PcapPlusPlus  23.09
OUILookup.h
Go to the documentation of this file.
1 #include "MacAddress.h"
2 
3 #include <unordered_map>
4 #include <vector>
5 
7 
12 namespace pcpp
13 {
21  class OUILookup
22  {
23  private:
28  struct MaskedFilter
29  {
30  int mask;
31  std::unordered_map<uint64_t, std::string> vendorMap;
32  };
33 
35  struct VendorData
36  {
37  std::string vendorName;
38  std::vector<MaskedFilter> maskedFilter;
39  };
40 
45  typedef std::unordered_map<uint64_t, VendorData> OUIVendorMap;
46 
48  OUIVendorMap vendorMap;
49 
50  template <typename T>
51  int64_t internalParser(T &jsonData);
52 
53  public:
54 
60  int64_t initOUIDatabaseFromJson(const std::string &path = "");
61 
67  std::string getVendorName(const pcpp::MacAddress &addr);
68  };
69 } // namespace pcpp
The main namespace for the PcapPlusPlus lib.
std::string getVendorName(const pcpp::MacAddress &addr)
int64_t initOUIDatabaseFromJson(const std::string &path="")
Definition: OUILookup.h:21
Definition: MacAddress.h:28