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

Function print_packet

dpdk/app/test/test_pcapng.c:214–224  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

212};
213
214static void
215print_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 */
227static void

Callers 1

parse_pcap_packetFunction · 0.85

Calls 3

fmt_timeFunction · 0.85
rte_ether_format_addrFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected