* Opens an interface for reading and writing */
| 1078 | * Opens an interface for reading and writing |
| 1079 | */ |
| 1080 | static inline int |
| 1081 | open_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 | |
| 1097 | static inline int |
| 1098 | set_iface_direction(const char *iface, pcap_t *pcap, |
nothing calls this directly
no test coverage detected