PcapPlusPlus
|
#include <PcapLiveDeviceList.h>
Public Member Functions | |
const std::vector< PcapLiveDevice * > & | getPcapLiveDevicesList () |
PcapLiveDevice * | getPcapLiveDeviceByIp (IPAddress *ipAddr) |
PcapLiveDevice * | getPcapLiveDeviceByIp (IPv4Address ipAddr) |
PcapLiveDevice * | getPcapLiveDeviceByIp (IPv6Address ip6Addr) |
PcapLiveDevice * | getPcapLiveDeviceByIp (const char *ipAddrAsString) |
PcapLiveDevice * | getPcapLiveDeviceByName (const std::string &name) |
std::vector< IPv4Address > & | getDnsServers () |
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
std::vector<IPv4Address>& pcpp::PcapLiveDeviceList::getDnsServers | ( | ) |
|
inlinestatic |
The access method to the singleton
PcapLiveDevice* pcpp::PcapLiveDeviceList::getPcapLiveDeviceByIp | ( | IPAddress * | ipAddr | ) |
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 | ) |
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 | ) |
Get a pointer to the live device by its IPv6 address
[in] | ip6Addr | The IPv6 address defined for the device |
PcapLiveDevice* pcpp::PcapLiveDeviceList::getPcapLiveDeviceByIp | ( | const char * | ipAddrAsString | ) |
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::getPcapLiveDeviceByName | ( | const std::string & | name | ) |
Get a pointer to the live device by its name
[in] | name | The name of the interface (e.g eth0) |
|
inline |