pcpp::PcapRemoteAuthentication Struct Reference

#include <PcapRemoteDevice.h>

Public Member Functions

 PcapRemoteAuthentication (const std::string username, const std::string password)
 PcapRemoteAuthentication (const PcapRemoteAuthentication &other)
pcap_rmtauth getPcapRmAuth ()

Public Attributes

std::string userName
std::string password

Detailed Description

The remote daemon (rpcapd) can be configured to require authentication before allowing a client to connect. This is done for security reasons of course. This struct wraps the WinPcap authentication object (pcap_rmtauth) and can (but not must) be given to PcapRemoteDeviceList when initiating a connection to the remote daemon

Constructor & Destructor Documentation

pcpp::PcapRemoteAuthentication::PcapRemoteAuthentication ( const std::string  username,
const std::string  password 

A constructor that sets username and password

[in]usernameThe username for authentication with the remote daemon
[in]passwordThe password for authentication with the remote daemon
pcpp::PcapRemoteAuthentication::PcapRemoteAuthentication ( const PcapRemoteAuthentication other)

A copy c'tor for this object

[in]otherThe object to copy from

Member Function Documentation

pcap_rmtauth pcpp::PcapRemoteAuthentication::getPcapRmAuth ( )

A conversion method from PcapRemoteAuthentication to pcap_rmtauth. Note: the char* pointers of the returned pcap_rmtauth points to the same places in memory as PcapRemoteAuthentication::userName and PcapRemoteAuthentication::password so the user should avoid freeing this memory

A pcap_rmtauth that is converted from this class

Member Data Documentation

std::string pcpp::PcapRemoteAuthentication::password

The password for authentication

std::string pcpp::PcapRemoteAuthentication::userName

The username for authentication