| 1110 | } |
| 1111 | |
| 1112 | static inline int |
| 1113 | open_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 |
no test coverage detected