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

Function open_rx_tx_iface

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

* Opens an interface for reading and writing */

Source from the content-addressed store, hash-verified

1078 * Opens an interface for reading and writing
1079 */
1080static inline int
1081open_rx_tx_iface(const char *key, const char *value, void *extra_args)
1082{
1083 const char *iface = value;
1084 struct pmd_devargs *tx = extra_args;
1085 pcap_t *pcap = NULL;
1086
1087 if (open_single_iface(iface, &pcap) < 0)
1088 return -1;
1089
1090 tx->queue[0].pcap = pcap;
1091 tx->queue[0].name = iface;
1092 tx->queue[0].type = key;
1093
1094 return 0;
1095}
1096
1097static inline int
1098set_iface_direction(const char *iface, pcap_t *pcap,

Callers

nothing calls this directly

Calls 1

open_single_ifaceFunction · 0.85

Tested by

no test coverage detected