| 212 | }; |
| 213 | |
| 214 | static void |
| 215 | print_packet(uint64_t ts_ns, const struct rte_ether_hdr *eh, size_t len) |
| 216 | { |
| 217 | char tbuf[128], src[64], dst[64]; |
| 218 | |
| 219 | fmt_time(tbuf, sizeof(tbuf), ts_ns); |
| 220 | rte_ether_format_addr(dst, sizeof(dst), &eh->dst_addr); |
| 221 | rte_ether_format_addr(src, sizeof(src), &eh->src_addr); |
| 222 | printf("%s: %s -> %s type %x length %zu\n", |
| 223 | tbuf, src, dst, rte_be_to_cpu_16(eh->ether_type), len); |
| 224 | } |
| 225 | |
| 226 | /* Callback from pcap_loop used to validate packets in the file */ |
| 227 | static void |
no test coverage detected