42_ft_nmap/include/scan.h

33 lines
480 B
C

#pragma once
#include <stdint.h>
#include "host.h"
typedef enum {
SCAN_NULL,
SCAN_SYN,
SCAN_ACK,
SCAN_FIN,
SCAN_XMAS,
SCAN_UDP,
SCAN_ALL,
} e_scantype;
[[__maybe_unused__]] static const char *types_str[] = {
"NULL", "SYN", "ACK", "FIN", "XMAS", "UDP",
};
struct scan {
struct host host;
char *dest_addr;
uint16_t port_start;
uint16_t port_end;
e_scantype type;
uint8_t ttl;
uint8_t max_retries;
struct response *responses;
};
int scan(struct scan *data);