FD.io VPP
v20.01-48-g3e0dafb74
Vector Packet Processing
|
MPCAP utility definitions. More...
Go to the source code of this file.
Data Structures | |
struct | mpcap_file_header_t |
File header struct. More... | |
struct | mpcap_packet_header_t |
Packet header. More... | |
struct | mpcap_main_t |
MPCAP main state data structure. More... | |
Macros | |
#define | foreach_vnet_mpcap_packet_type |
Packet types supported by MPCAP. More... | |
#define | foreach_mpcap_file_header |
#define | foreach_mpcap_packet_header |
#define | MPCAP_FLAG_INIT_DONE (1 << 0) |
#define | MPCAP_FLAG_THREAD_SAFE (1 << 1) |
#define | MPCAP_FLAG_WRITE_ENABLE (1 << 2) |
#define | MPCAP_DEFAULT_FILE_SIZE (10<<20) |
Enumerations | |
enum | mpcap_packet_type_t { foreach_vnet_mpcap_packet_type } |
Functions | |
clib_error_t * | mpcap_init (mpcap_main_t *pm) |
initialize a mpcap file (for writing) More... | |
clib_error_t * | mpcap_close (mpcap_main_t *pm) |
Flush / unmap a mpcap file. More... | |
clib_error_t * | mpcap_map (mpcap_main_t *pm) |
mmap a mpcap data file. More... | |
static void * | mpcap_add_packet (mpcap_main_t *pm, f64 time_now, u32 n_bytes_in_trace, u32 n_bytes_in_packet) |
Add packet. More... | |
static void | mpcap_add_buffer (mpcap_main_t *pm, vlib_main_t *vm, f64 time_now, u32 buffer_index, u32 n_bytes_in_trace) |
Add buffer (vlib_buffer_t) to the trace. More... | |
MPCAP utility definitions.
Definition in file mpcap.h.
#define foreach_mpcap_file_header |
#define foreach_mpcap_packet_header |
#define foreach_vnet_mpcap_packet_type |
enum mpcap_packet_type_t |
|
inlinestatic |
Add buffer (vlib_buffer_t) to the trace.
*pm | - mpcap_main_t |
*vm | - vlib_main_t |
time_now | - f64 |
buffer_index | - u32 |
n_bytes_in_trace | - u32 |
Definition at line 213 of file mpcap.h.
|
inlinestatic |
Add packet.
*pm | - mpcap_main_t |
time_now | - f64 |
n_bytes_in_trace | - u32 |
n_bytes_in_packet | - u32 |
Definition at line 177 of file mpcap.h.
clib_error_t* mpcap_close | ( | mpcap_main_t * | pm | ) |
Flush / unmap a mpcap file.
Flush / unmap a mpcap file.
mpcap_main_t | * pm |
Definition at line 56 of file mpcap.c.
clib_error_t* mpcap_init | ( | mpcap_main_t * | pm | ) |
initialize a mpcap file (for writing)
initialize a mpcap file (for writing)
mpcap_main_t | * pm |
Definition at line 85 of file mpcap.c.
clib_error_t* mpcap_map | ( | mpcap_main_t * | pm | ) |
mmap a mpcap data file.
mmap a mpcap data file.
to read from another process
pcap_main_t | *pm |