PcapPlusPlus
19.12
|
#include <PcapLiveDeviceList.h>
Public Member Functions | |
const std::vector< PcapLiveDevice * > & | getPcapLiveDevicesList () const |
PcapLiveDevice * | getPcapLiveDeviceByIp (IPAddress *ipAddr) const |
PcapLiveDevice * | getPcapLiveDeviceByIp (IPv4Address ipAddr) const |
PcapLiveDevice * | getPcapLiveDeviceByIp (IPv6Address ip6Addr) const |
PcapLiveDevice * | getPcapLiveDeviceByIp (const char *ipAddrAsString) const |
PcapLiveDevice * | getPcapLiveDeviceByName (const std::string &name) const |
const std::vector< IPv4Address > & | getDnsServers () const |
void | reset () |
Static Public Member Functions | |
static PcapLiveDeviceList & | getInstance () |
A singleton class that creates, stores and provides access to all PcapLiveDevice (on Linux) or WinPcapLiveDevice (on Windows) instances. All live devices are initialized on startup and wrap the network interfaces installed on the machine. This class enables access to them through their IP addresses or get a vector of all of them so the user can search them in some other way
|
inline |
|
inlinestatic |
The access method to the singleton
PcapLiveDevice* pcpp::PcapLiveDeviceList::getPcapLiveDeviceByIp | ( | const char * | ipAddrAsString | ) | const |
Get a pointer to the live device by its IP address represented as string. IP address can be both IPv4 or IPv6
[in] | ipAddrAsString | The IP address defined for the device as string |
PcapLiveDevice* pcpp::PcapLiveDeviceList::getPcapLiveDeviceByIp | ( | IPAddress * | ipAddr | ) | const |
Get a pointer to the live device by its IP address. IP address can be both IPv4 or IPv6
[in] | ipAddr | The IP address defined for the device |
PcapLiveDevice* pcpp::PcapLiveDeviceList::getPcapLiveDeviceByIp | ( | IPv4Address | ipAddr | ) | const |
Get a pointer to the live device by its IPv4 address
[in] | ipAddr | The IPv4 address defined for the device |
PcapLiveDevice* pcpp::PcapLiveDeviceList::getPcapLiveDeviceByIp | ( | IPv6Address | ip6Addr | ) | const |
Get a pointer to the live device by its IPv6 address
[in] | ip6Addr | The IPv6 address defined for the device |
PcapLiveDevice* pcpp::PcapLiveDeviceList::getPcapLiveDeviceByName | ( | const std::string & | name | ) | const |
Get a pointer to the live device by its name
[in] | name | The name of the interface (e.g eth0) |
|
inline |
void pcpp::PcapLiveDeviceList::reset | ( | ) |
Reset the live device list and DNS server list, meaning clear and refetch them