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

Function open_iface

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

Source from the content-addressed store, hash-verified

1110}
1111
1112static inline int
1113open_iface(const char *key, const char *value, void *extra_args)
1114{
1115 const char *iface = value;
1116 struct pmd_devargs *pmd = extra_args;
1117 pcap_t *pcap = NULL;
1118
1119 if (open_single_iface(iface, &pcap) < 0)
1120 return -1;
1121 if (add_queue(pmd, iface, key, pcap, NULL) < 0) {
1122 pcap_close(pcap);
1123 return -1;
1124 }
1125
1126 return 0;
1127}
1128
1129/*
1130 * Opens a NIC for reading packets from it

Callers 2

open_rx_ifaceFunction · 0.70
open_tx_ifaceFunction · 0.70

Calls 2

open_single_ifaceFunction · 0.85
add_queueFunction · 0.70

Tested by

no test coverage detected