* Choose interface to capture if no -i option given. * Select the first DPDK port, this matches what dumpcap does. */
| 251 | * Select the first DPDK port, this matches what dumpcap does. |
| 252 | */ |
| 253 | static void set_default_interface(void) |
| 254 | { |
| 255 | struct interface *intf; |
| 256 | char name[RTE_ETH_NAME_MAX_LEN]; |
| 257 | uint16_t p; |
| 258 | |
| 259 | RTE_ETH_FOREACH_DEV(p) { |
| 260 | if (rte_eth_dev_get_name_by_port(p, name) < 0) |
| 261 | continue; |
| 262 | |
| 263 | intf = add_interface(name); |
| 264 | intf->port = p; |
| 265 | return; |
| 266 | } |
| 267 | rte_exit(EXIT_FAILURE, "No usable interfaces found\n"); |
| 268 | } |
| 269 | |
| 270 | /* Display list of possible interfaces that can be used. */ |
| 271 | static void dump_interfaces(void) |
no test coverage detected