PcapPlusPlus
21.11
|
#include <PcapRemoteDeviceList.h>
Public Types | |
typedef std::vector< PcapRemoteDevice * >::iterator | RemoteDeviceListIterator |
typedef std::vector< PcapRemoteDevice * >::const_iterator | ConstRemoteDeviceListIterator |
Public Member Functions | |
IPAddress | getRemoteMachineIpAddress () const |
uint16_t | getRemoteMachinePort () const |
PcapRemoteDevice * | getRemoteDeviceByIP (const IPv4Address &ip4Addr) const |
PcapRemoteDevice * | getRemoteDeviceByIP (const IPv6Address &ip6Addr) const |
PcapRemoteDevice * | getRemoteDeviceByIP (const IPAddress &ipAddr) const |
PcapRemoteDevice * | getRemoteDeviceByIP (const std::string &ipAddrAsString) const |
RemoteDeviceListIterator | begin () |
ConstRemoteDeviceListIterator | begin () const |
RemoteDeviceListIterator | end () |
ConstRemoteDeviceListIterator | end () const |
Static Public Member Functions | |
static PcapRemoteDeviceList * | getRemoteDeviceList (const IPAddress &ipAddress, uint16_t port) |
static PcapRemoteDeviceList * | getRemoteDeviceList (const IPAddress &ipAddress, uint16_t port, PcapRemoteAuthentication *remoteAuth) |
A class that creates, stores and provides access to all instances of PcapRemoteDevice for a certain remote machine. To get an instance of this class use one of the static methods of getRemoteDeviceList(). These methods creates a PcapRemoteDeviceList instance for the certain remote machine which holds a list of PcapRemoteDevice instances, one for each remote network interface. Note there is not a public constructor for this class, so the only way to get an instance of it is through getRemoteDeviceList(). After getting this object, this class provides ways to access the PcapRemoteDevice instances: either through IP address of the remote network interface or by iterating the PcapRemoteDevice instances (through the PcapRemoteDeviceList::RemoteDeviceListIterator iterator)
Since Remote Capture is supported in WinPcap and Npcap only, this class is available in Windows only
typedef std::vector<PcapRemoteDevice*>::const_iterator pcpp::PcapRemoteDeviceList::ConstRemoteDeviceListIterator |
Const iterator object that can be used for iterating all PcapRemoteDevice in a constant list
typedef std::vector<PcapRemoteDevice*>::iterator pcpp::PcapRemoteDeviceList::RemoteDeviceListIterator |
Iterator object that can be used for iterating all PcapRemoteDevice in list
|
inline |
|
inline |
|
inline |
|
inline |
PcapRemoteDevice* pcpp::PcapRemoteDeviceList::getRemoteDeviceByIP | ( | const IPv4Address & | ip4Addr | ) | const |
Search a PcapRemoteDevice in the list by its IPv4 address
[in] | ip4Addr | The IPv4 address |
PcapRemoteDevice* pcpp::PcapRemoteDeviceList::getRemoteDeviceByIP | ( | const IPv6Address & | ip6Addr | ) | const |
Search a PcapRemoteDevice in the list by its IPv6 address
[in] | ip6Addr | The IPv6 address |
PcapRemoteDevice* pcpp::PcapRemoteDeviceList::getRemoteDeviceByIP | ( | const IPAddress & | ipAddr | ) | const |
Search a PcapRemoteDevice in the list by its IP address (IPv4 or IPv6)
[in] | ipAddr | The IP address |
PcapRemoteDevice* pcpp::PcapRemoteDeviceList::getRemoteDeviceByIP | ( | const std::string & | ipAddrAsString | ) | const |
Search a PcapRemoteDevice in the list by its IP address
[in] | ipAddrAsString | The IP address in string format |
|
static |
A static method for creating a PcapRemoteDeviceList instance for a certain remote machine. This methods creates the instance, and also creates a list of PcapRemoteDevice instances stored in it, one for each remote network interface. Notice this method allocates the PcapRemoteDeviceList instance and returns a pointer to it. It's the user responsibility to free it when done using it
This method overload is for remote daemons which don't require authentication for accessing them. For daemons which do require authentication use the other method overload
[in] | ipAddress | The IP address of the remote machine through which clients can connect to the rpcapd daemon |
[in] | port | The port of the remote machine through which clients can connect to the rpcapd daemon |
|
static |
An overload of the previous getRemoteDeviceList() method but with authentication support. This method is suitable for connecting to remote daemons which require authentication for accessing them
[in] | ipAddress | The IP address of the remote machine through which clients can connect to the rpcapd daemon |
[in] | port | The port of the remote machine through which clients can connect to the rpcapd daemon |
[in] | remoteAuth | A pointer to the authentication object which contains the username and password for connecting to the remote daemon |
|
inline |
|
inline |