pcappp::Address Class Reference

#include <Address.h>

List of all members.

Public Member Functions

 Address (Address const &addr)
 Creates an Address object as a copy of another.
pcap_addr_t const * cobj () const
 Gets the underlying libpcap C structure.
pcap_addr_t * cobj ()
 Gets the underlying libpcap C structure.
struct sockaddr const * get_address () const
 Gets the address.
struct sockaddr const * get_bcast_address () const
 Gets the broadcast address corresponding to the address.
struct sockaddr const * get_dest_address () const
 Gets the destination address corresponding to the address.
struct sockaddr const * get_netmask () const
 Gets the netmask corresponding to the address.
Addressoperator= (Address const &addr)
 Assigns another Address object's contents to this one.
virtual ~Address ()
 Destroys an Address object.


Detailed Description

An Address 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

Constructor & Destructor Documentation

pcappp::Address::Address ( Address const &  addr  )  [inline]

Creates an Address object as a copy of another.

virtual pcappp::Address::~Address (  )  [inline, virtual]

Destroys an Address object.


Member Function Documentation

pcap_addr_t const* pcappp::Address::cobj (  )  const [inline]

Gets the underlying libpcap C structure.

Returns:
A const pointer to the underlying pcap_addr_t

pcap_addr_t* pcappp::Address::cobj (  )  [inline]

Gets the underlying libpcap C structure.

Returns:
A pointer to the underlying pcap_addr_t

struct sockaddr const* pcappp::Address::get_address (  )  const [inline, read]

Gets the address.

struct sockaddr const* pcappp::Address::get_bcast_address (  )  const [inline, read]

Gets the broadcast address corresponding to the address.

Returns:
A pointer to the broadcast address, or NULL if the device does not support broadcasts

struct sockaddr const* pcappp::Address::get_dest_address (  )  const [inline, read]

Gets the destination address corresponding to the address.

Returns:
A pointer to the destination address, or NULL if the device is not a point-to-point one

struct sockaddr const* pcappp::Address::get_netmask (  )  const [inline, read]

Gets the netmask corresponding to the address.

Returns:
A pointer to the netmask, or NULL

Address& pcappp::Address::operator= ( Address const &  addr  )  [inline]

Assigns another Address object's contents to this one.


The documentation for this class was generated from the following file:

Generated on Tue Apr 15 17:36:29 2008 for libpcap++ by  doxygen 1.5.5