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

Function open_tx_pcap

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

* Opens a pcap file for writing and stores a reference to it * for use it later on. */

Source from the content-addressed store, hash-verified

1057 * for use it later on.
1058 */
1059static int
1060open_tx_pcap(const char *key, const char *value, void *extra_args)
1061{
1062 const char *pcap_filename = value;
1063 struct pmd_devargs *dumpers = extra_args;
1064 pcap_dumper_t *dumper;
1065
1066 if (open_single_tx_pcap(pcap_filename, &dumper) < 0)
1067 return -1;
1068
1069 if (add_queue(dumpers, pcap_filename, key, NULL, dumper) < 0) {
1070 pcap_dump_close(dumper);
1071 return -1;
1072 }
1073
1074 return 0;
1075}
1076
1077/*
1078 * Opens an interface for reading and writing

Callers

nothing calls this directly

Calls 2

open_single_tx_pcapFunction · 0.85
add_queueFunction · 0.70

Tested by

no test coverage detected