FD.io VPP
v19.01.3-6-g70449b9b9
Vector Packet Processing
|
PCAP function. More...
Go to the source code of this file.
Functions | |
clib_error_t * | pcap_close (pcap_main_t *pm) |
Close PCAP file. More... | |
clib_error_t * | pcap_write (pcap_main_t *pm) |
Write PCAP file. More... | |
clib_error_t * | pcap_read (pcap_main_t *pm) |
Read PCAP file. More... | |
PCAP function.
Usage:
#include <vppinfra/pcap.h>
static pcap_main_t pcap = { .file_name = "/tmp/ip4", .n_packets_to_capture = 2, .packet_type = PCAP_PACKET_TYPE_ip, };
To add a buffer:
pcap_add_buffer (&pcap, vm, pi0, 128);
File will be written after n_packets_to_capture
or call to pcap_write (&pcap).
Definition in file pcap.c.
clib_error_t* pcap_close | ( | pcap_main_t * | pm | ) |
Close PCAP file.
Definition at line 74 of file pcap.c.
clib_error_t* pcap_read | ( | pcap_main_t * | pm | ) |
Read PCAP file.
Read data from file.
Definition at line 179 of file pcap.c.
clib_error_t* pcap_write | ( | pcap_main_t * | pm | ) |
Write PCAP file.
Write out data to output file.
Definition at line 89 of file pcap.c.