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

Function count_packets_in_pcap

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

Source from the content-addressed store, hash-verified

587}
588
589static uint64_t
590count_packets_in_pcap(pcap_t **pcap, struct pcap_rx_queue *pcap_q)
591{
592 const u_char *packet;
593 struct pcap_pkthdr header;
594 uint64_t pcap_pkt_count = 0;
595
596 while ((packet = pcap_next(*pcap, &header)))
597 pcap_pkt_count++;
598
599 /* The pcap is reopened so it can be used as normal later. */
600 pcap_close(*pcap);
601 *pcap = NULL;
602 open_single_rx_pcap(pcap_q->name, pcap);
603
604 return pcap_pkt_count;
605}
606
607static int
608eth_dev_start(struct rte_eth_dev *dev)

Callers 1

eth_rx_queue_setupFunction · 0.85

Calls 1

open_single_rx_pcapFunction · 0.85

Tested by

no test coverage detected