#pragma once #include #include #include "agent_context.h" #include "net.h" #ifndef TH_FIN #define TH_FIN 0x01 #endif #ifndef TH_SYN #define TH_SYN 0x02 #endif #ifndef TH_RST #define TH_RST 0x04 #endif #ifndef TH_PUSH #define TH_PUSH 0x08 #endif #ifndef TH_ACK #define TH_ACK 0x10 #endif #ifndef TH_URG #define TH_URG 0x20 #endif #ifndef TH_ECE #define TH_ECE 0x40 #endif #ifndef TH_CWR #define TH_CWR 0x80 #endif sock_t sniffer_init_interface(const char *interface, bool promisc); void sniffer_handle_packet(sock_t sniffer, agent_context_t *ctx); pid_t match_udp_inode(uint32_t ip_be, uint16_t port_be);