PcapPlusPlus
24.09
|
#include <OUILookup.h>
Public Member Functions | |
int64_t | initOUIDatabaseFromJson (const std::string &path="") |
std::string | getVendorName (const pcpp::MacAddress &addr) |
Provides vendor name matching functionality from MAC addresses. It uses an internal database to define name of the vendor. The class itself should be initialized by using initOUIDatabaseFromJson() otherwise all requests will return "Unknown" as vendor. The class itself currently does not support on-fly modifying the database but anyone who wants to add/modify/remove entries, should modify 3rdParty/OUILookup/PCPP_OUIDatabase.json file and call to initOUIDatabaseFromJson() function to renew the internal data.
std::string pcpp::OUILookup::getVendorName | ( | const pcpp::MacAddress & | addr | ) |
Returns the vendor of the MAC address. OUI database should be initialized with initOUIDatabaseFromJson()
[in] | addr | MAC address to search |
int64_t pcpp::OUILookup::initOUIDatabaseFromJson | ( | const std::string & | path = "" | ) |
Initialise internal OUI database from a JSON file
[in] | path | Path to OUI database. The database itself is located at 3rdParty/OUILookup/PCPP_OUIDatabase.json |