#include <pcap.h>
Go to the source code of this file.
Functions | |
errorcode | init_packet_capture (pcap_t **pcap_desc, char *device, int timeout, char *errbuf, long errbuf_len) |
initializes the pcap functions | |
errorcode | find_tcp_packet (pcap_t *pcap_desc, tcp_packet_info_t *tcp_skeleton, flag_t *break_flag, unsigned char **payload, unsigned long *payload_len) |
finds a tcp packet, looping over all captured packets until the correct one is found | |
errorcode | process_packet (unsigned char *packet, tcp_packet_info_t *tcp_skeleton, unsigned char **payload, unsigned long *payload_len) |
Definition in file sniff_private.h.
|
finds a tcp packet, looping over all captured packets until the correct one is found If the passed in flag takes on any value other than FLAG_UNSET then this function will return early
Definition at line 156 of file sniff.c. References CHECK_NOT_NULL, DBG_SNIFF, DEBUG, ERROR_NULL_ARG_1, ERROR_NULL_ARG_2, ERROR_NULL_ARG_3, errorcode, FAILED, process_packet(), and tcp_packet_info_t. Referenced by capture_flooded_synack(), and capture_peer_to_buddy_syn(). |
|
initializes the pcap functions
Definition at line 110 of file sniff.c. References CHECK_GREATER_THAN, CHECK_NOT_NULL, DBG_SNIFF, DEBUG, ERROR_ARG_5, ERROR_NULL_ARG_1, ERROR_NULL_ARG_2, ERROR_NULL_ARG_4, and errorcode. Referenced by capture_flooded_synack(), and capture_peer_to_buddy_syn(). |
|
Definition at line 190 of file sniff.c. References tcp_packet_info::ack_flag, tcp_packet_info::ack_num, BOOL_MATCH, CHECK_NOT_NULL, tcp_packet_info::d_addr, tcp_packet_info::d_port, DBG_IP, DBG_PORT, DBG_SNIFF, DEBUG, ERROR_NULL_ARG_1, ERROR_NULL_ARG_2, errorcode, FLAG_SET, tcp_packet_info::s_addr, tcp_packet_info::s_port, tcp_packet_info::seq_num, tcp_packet_info::syn_flag, tcp_packet_info_t, and tcp_packet_info::window. Referenced by find_tcp_packet(). |