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

Function set_iface_direction

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

Source from the content-addressed store, hash-verified

1095}
1096
1097static inline int
1098set_iface_direction(const char *iface, pcap_t *pcap,
1099 pcap_direction_t direction)
1100{
1101 const char *direction_str = (direction == PCAP_D_IN) ? "IN" : "OUT";
1102 if (pcap_setdirection(pcap, direction) < 0) {
1103 PMD_LOG(ERR, "Setting %s pcap direction %s failed - %s",
1104 iface, direction_str, pcap_geterr(pcap));
1105 return -1;
1106 }
1107 PMD_LOG(INFO, "Setting %s pcap direction %s",
1108 iface, direction_str);
1109 return 0;
1110}
1111
1112static inline int
1113open_iface(const char *key, const char *value, void *extra_args)

Callers 1

open_rx_ifaceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected