PcapPlusPlus  Next
PcapDevice.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <cstdint>
4 
6 
9 namespace pcpp
10 {
13  struct PcapStats
14  {
16  uint64_t packetsRecv;
18  uint64_t packetsDrop;
21  };
22 
25  {
26  public:
27  virtual ~IPcapStatisticsProvider() = default;
28 
32 
35  virtual void getStatistics(PcapStats& stats) const = 0;
36  };
37 } // namespace pcpp
An interface for providing Pcap-based device statistics.
Definition: PcapDevice.h:25
virtual void getStatistics(PcapStats &stats) const =0
PcapStats getStatistics() const
Get statistics from the device.
The main namespace for the PcapPlusPlus lib.
Definition: AssertionUtils.h:19
Definition: PcapDevice.h:14
uint64_t packetsRecv
Number of packets received.
Definition: PcapDevice.h:16
uint64_t packetsDropByInterface
number of packets dropped by interface (not supported on all platforms)
Definition: PcapDevice.h:20
uint64_t packetsDrop
Number of packets dropped.
Definition: PcapDevice.h:18