24 lines
368 B
C
24 lines
368 B
C
#pragma once
|
|
|
|
#include <netinet/tcp.h>
|
|
#include <netinet/udp.h>
|
|
#include <stdint.h>
|
|
|
|
#include "scan.h"
|
|
|
|
typedef enum {
|
|
OPEN,
|
|
CLOSE,
|
|
FILTERED,
|
|
UNFILTERED,
|
|
} e_state;
|
|
|
|
struct response {
|
|
uint16_t port;
|
|
e_state state;
|
|
char *service;
|
|
};
|
|
|
|
void tcp_response(struct tcphdr *tcp, const struct scan *data);
|
|
void udp_response(struct udphdr *udp, const struct scan *data);
|