PcapPlusPlus
PfRingDeviceList.h
Go to the documentation of this file.
1 #ifndef PCAPPP_PF_RING_DEVICE_LIST
2 #define PCAPPP_PF_RING_DEVICE_LIST
3 
4 #include "PfRingDevice.h"
5 
7 
12 namespace pcpp
13 {
14 
21  {
22  private:
23  std::vector<PfRingDevice*> m_PfRingDeviceList;
24  std::string m_PfRingVersion;
25 
27  // private copy c'tor
28  PfRingDeviceList(const PfRingDeviceList& other);
29  PfRingDeviceList& operator=(const PfRingDeviceList& other);
30  // private d'tor
32 
33  void calcPfRingVersion(void* ring);
34  public:
39  static inline PfRingDeviceList& getInstance()
40  {
41  static PfRingDeviceList instance;
42  return instance;
43  }
44 
49  inline const std::vector<PfRingDevice*>& getPfRingDevicesList() { return m_PfRingDeviceList; }
50 
56  PfRingDevice* getPfRingDeviceByName(const std::string devName);
57 
58 
63  inline std::string getPfRingVersion() { return m_PfRingVersion; }
64  };
65 
66 } // namespace pcpp
67 
68 #endif /* PCAPPP_PF_RING_DEVICE_LIST */
PfRingDevice * getPfRingDeviceByName(const std::string devName)
static PfRingDeviceList & getInstance()
Definition: PfRingDeviceList.h:39
Definition: PfRingDeviceList.h:20
Definition: PfRingDevice.h:32
const std::vector< PfRingDevice * > & getPfRingDevicesList()
Definition: PfRingDeviceList.h:49
std::string getPfRingVersion()
Definition: PfRingDeviceList.h:63
The main namespace for the PcapPlusPlus lib.