Public Member Functions | |
WpcAddress (WpcAddress const &addr) | |
Creates an WpcAddress object as a copy of another. | |
WpcAddress (pcap_addr_t const &addr) | |
Creates an WpcAddress object as a copy of pcap_addr_t. | |
WpcAddress (unsigned int &addr) | |
Creates an WpcAddress object from IPv4 address. | |
WpcAddress & | operator= (WpcAddress const &addr) |
Assigns another Address object's contents to this one. | |
virtual | ~WpcAddress () |
Destroys an Address object. | |
struct sockaddr const * | GetAddress () const |
Gets the address. | |
string const | GetAddressStr () const |
Gets the address as string. | |
unsigned int | GetAddressIP4 () |
Gets the address as u_int32. | |
struct sockaddr const * | GetNetmask () const |
Gets the netmask corresponding to the address. | |
string const | GetNetmaskStr () const |
Gets the netmask corresponding to the address as string. | |
struct sockaddr const * | GetBcastAddress () const |
Gets the broadcast address corresponding to the address. | |
string const | GetBcastAddressStr () const |
Gets the broadcast address corresponding to the address as string. | |
struct sockaddr const * | GetDestAddress () const |
Gets the destination address corresponding to the address. | |
string const | GetDestAddressStr () const |
Gets the destination address corresponding to the address. | |
pcap_addr_t * | c_obj () |
Gets the underlying libpcap C structure. | |
pcap_addr_t const * | c_obj () const |
Gets the underlying libpcap C structure. | |
Private Attributes | |
pcap_addr_t | m_addr_t |
Inherited libpcap's address object. |
An WpcAddress object represents an address associated to a network interface.
Note that not all the addresses in the list of addresses are necessarily IPv4 or IPv6 addresses: You must check the sa_family member of the struct sockaddr before interpreting the contents of the address
wpcGetMac.cpp, and wpcInit.cpp.
WpcAddress::WpcAddress | ( | WpcAddress const & | addr | ) |
Creates an WpcAddress object as a copy of another.
WpcAddress::WpcAddress | ( | pcap_addr_t const & | addr | ) |
Creates an WpcAddress object as a copy of pcap_addr_t.
WpcAddress::WpcAddress | ( | unsigned int & | addr | ) |
Creates an WpcAddress object from IPv4 address.
Address must be given in the network order
virtual WpcAddress::~WpcAddress | ( | ) | [inline, virtual] |
Destroys an Address object.
pcap_addr_t const* WpcAddress::c_obj | ( | ) | const [inline] |
Gets the underlying libpcap C structure.
pcap_addr_t* WpcAddress::c_obj | ( | ) | [inline] |
Gets the underlying libpcap C structure.
struct sockaddr const* WpcAddress::GetAddress | ( | ) | const [inline, read] |
Gets the address.
unsigned int WpcAddress::GetAddressIP4 | ( | ) |
Gets the address as u_int32.
string const WpcAddress::GetAddressStr | ( | ) | const |
struct sockaddr const* WpcAddress::GetBcastAddress | ( | ) | const [inline, read] |
Gets the broadcast address corresponding to the address.
string const WpcAddress::GetBcastAddressStr | ( | ) | const |
Gets the broadcast address corresponding to the address as string.
struct sockaddr const* WpcAddress::GetDestAddress | ( | ) | const [inline, read] |
Gets the destination address corresponding to the address.
string const WpcAddress::GetDestAddressStr | ( | ) | const |
Gets the destination address corresponding to the address.
struct sockaddr const* WpcAddress::GetNetmask | ( | ) | const [inline, read] |
Gets the netmask corresponding to the address.
string const WpcAddress::GetNetmaskStr | ( | ) | const |
WpcAddress& WpcAddress::operator= | ( | WpcAddress const & | addr | ) | [inline] |
Assigns another Address object's contents to this one.
pcap_addr_t WpcAddress::m_addr_t [private] |
Inherited libpcap's address object.
©2009 Positive Technologies |
Generated on Fri May 22 18:17:01 2009 for wpcObj by |
|
1.5.7 |
|