tracedump
single application IP packet sniffer
Data Structures | Defines | Functions

pcap.h File Reference

#include "tracedump.h"

Go to the source code of this file.

Data Structures

struct  pcap
 Represents internal data. More...
struct  pcap_file_hdr
struct  pcap_pkt_hdr
struct  pcap_sll_hdr

Defines

#define PCAP_MAGIC_NUMBER   0xa1b2c3d4
#define LINKTYPE_LINUX_SLL   113

Functions

void pcap_init (struct tracedump *td)
 Initialize PCAP and set the "null filter".
void pcap_deinit (struct tracedump *td)
 Reverse of pcap_init()
void pcap_update (struct tracedump *td)
 Update the BPF filter on the sniffer socket.

Define Documentation

#define LINKTYPE_LINUX_SLL   113

Definition at line 24 of file pcap.h.

Referenced by pcap_init().

#define PCAP_MAGIC_NUMBER   0xa1b2c3d4

Definition at line 21 of file pcap.h.

Referenced by pcap_init().


Function Documentation

void pcap_deinit ( struct tracedump td)

Reverse of pcap_init()

Definition at line 79 of file pcap.c.

Referenced by main().

void pcap_init ( struct tracedump td)

Initialize PCAP and set the "null filter".

Definition at line 29 of file pcap.c.

Referenced by main().

void pcap_update ( struct tracedump td)

Update the BPF filter on the sniffer socket.

Definition at line 92 of file pcap.c.

Referenced by gc_thread(), handle_socket(), and pcap_init().

 All Data Structures Files Functions Variables Enumerations Enumerator Defines