MCPcopy Create free account
hub / github.com/F-Stack/f-stack / open_rx_pcap

Function open_rx_pcap

dpdk/drivers/net/pcap/pcap_ethdev.c:1037–1053  ·  view source on GitHub ↗

* Function handler that opens the pcap file for reading a stores a * reference of it for use it later on. */

Source from the content-addressed store, hash-verified

1035 * reference of it for use it later on.
1036 */
1037static int
1038open_rx_pcap(const char *key, const char *value, void *extra_args)
1039{
1040 const char *pcap_filename = value;
1041 struct pmd_devargs *rx = extra_args;
1042 pcap_t *pcap = NULL;
1043
1044 if (open_single_rx_pcap(pcap_filename, &pcap) < 0)
1045 return -1;
1046
1047 if (add_queue(rx, pcap_filename, key, pcap, NULL) < 0) {
1048 pcap_close(pcap);
1049 return -1;
1050 }
1051
1052 return 0;
1053}
1054
1055/*
1056 * Opens a pcap file for writing and stores a reference to it

Callers

nothing calls this directly

Calls 2

open_single_rx_pcapFunction · 0.85
add_queueFunction · 0.70

Tested by

no test coverage detected