FD.io VPP  v16.06
Vector Packet Processing
pcap.h File Reference
+ Include dependency graph for pcap.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  pcap_file_header_t
 
struct  pcap_packet_header_t
 
struct  pcap_main_t
 

Macros

#define foreach_vnet_pcap_packet_type
 
#define foreach_pcap_file_header
 
#define foreach_pcap_packet_header
 
#define PCAP_MAIN_INIT_DONE   (1 << 0)
 

Enumerations

enum  pcap_packet_type_t { foreach_vnet_pcap_packet_type }
 

Functions

clib_error_tpcap_write (pcap_main_t *pm)
 
clib_error_tpcap_read (pcap_main_t *pm)
 
static voidpcap_add_packet (pcap_main_t *pm, f64 time_now, u32 n_bytes_in_trace, u32 n_bytes_in_packet)
 
static void pcap_add_buffer (pcap_main_t *pm, vlib_main_t *vm, u32 buffer_index, u32 n_bytes_in_trace)
 

Macro Definition Documentation

#define foreach_pcap_file_header
Value:
/* 0xa1b2c3d4 host byte order. \
0xd4c3b2a1 => need to byte swap everything. */ \
_ (u32, magic) \
\
/* Currently major 2 minor 4. */ \
_ (u16, major_version) \
_ (u16, minor_version) \
\
/* 0 for GMT. */ \
_ (u32, time_zone) \
\
/* Accuracy of timestamps. Typically set to 0. */ \
_ (u32, sigfigs) \
\
/* Size of largest packet in file. */ \
_ (u32, max_packet_size_in_bytes) \
\
/* One of vnet_pcap_packet_type_t. */ \
_ (u32, packet_type)
unsigned int u32
Definition: types.h:88
unsigned short u16
Definition: types.h:57

Definition at line 58 of file pcap.h.

#define foreach_pcap_packet_header
Value:
/* Time stamp in seconds and microseconds. */ \
_ (u32, time_in_sec) \
_ (u32, time_in_usec) \
\
/* Number of bytes stored in file and size of actual packet. */ \
_ (u32, n_packet_bytes_stored_in_file) \
_ (u32, n_bytes_in_packet)
unsigned int u32
Definition: types.h:88

Definition at line 86 of file pcap.h.

#define foreach_vnet_pcap_packet_type
Value:
_ (null, 0) \
_ (ethernet, 1) \
_ (ppp, 9) \
_ (ip, 12) \
_ (hdlc, 104)

Definition at line 45 of file pcap.h.

#define PCAP_MAIN_INIT_DONE   (1 << 0)

Definition at line 118 of file pcap.h.

Enumeration Type Documentation

Enumerator
foreach_vnet_pcap_packet_type 

Definition at line 52 of file pcap.h.

Function Documentation

static void pcap_add_buffer ( pcap_main_t pm,
vlib_main_t vm,
u32  buffer_index,
u32  n_bytes_in_trace 
)
inlinestatic

Definition at line 159 of file pcap.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void* pcap_add_packet ( pcap_main_t pm,
f64  time_now,
u32  n_bytes_in_trace,
u32  n_bytes_in_packet 
)
inlinestatic

Definition at line 140 of file pcap.h.

+ Here is the caller graph for this function:

clib_error_t* pcap_read ( pcap_main_t pm)

Definition at line 142 of file pcap.c.

+ Here is the caller graph for this function:

clib_error_t* pcap_write ( pcap_main_t pm)

Definition at line 62 of file pcap.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function: