42_ft_nmap/include/scan.h
Starnakin 9ae1e29f71 core: use only one struct data instead of thead_data and scan_data
core: do parsing in the main, put all in struct general
fix: code support port > 1024
2025-06-03 16:49:41 +02:00

34 lines
501 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;
uint8_t nb_threads;
};
int scan(struct scan *data);