42_ft_nmap/include/scan.h
2025-06-03 13:05:52 +02:00

33 lines
488 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 {
const struct host *host;
const char *dest_addr;
uint16_t port_start;
uint16_t port;
e_scantype type;
uint8_t ttl;
uint8_t max_retries;
struct response *response;
};
int scan(struct scan *data);