conexus logo

Conexus::IPAddress Class Reference

IP network address interface. More...

#include <conexus/ipaddress.h>

Inheritance diagram for Conexus::IPAddress:

Inheritance graph
[legend]

List of all members.

Public Types

typedef ConexusPointer< IPAddresspointer

Public Member Functions

 IPAddress ()
 IPAddress (const struct sockaddr_storage &addr)
virtual ~IPAddress ()
virtual std::string address_string () const =0
 Returns the address as a string.
virtual std::string subnet_mask_string () const =0
 Returns the netmask associated with this address as a string.
virtual unsigned prefix_length () const =0
 Returns the prefix length of the subnet mask associated with this address.
virtual std::string prefix_length_string () const =0
 Returns the prefix length of the subnet mask associated with this address as a string.
virtual std::string address_subnet_mask_string () const =0
 Returns the address as an address/subnetmask string.
virtual std::string cidr_address_string () const =0
 Returns the address as a CIDR address/prefixlen string.
virtual std::string prefix_string () const =0
 Returns the prefix part of this address as a string.
virtual std::string local_address_string () const =0
 Returns the local part of this address as a string.
virtual uint16_t port () const =0
 Returns the port number associated with this address.
virtual std::string port_string () const =0
 Returns the port number associated with this address as a string.
virtual void set_address (const std::string &address)=0
 Sets the address to the specified value.
virtual void set_address (const std::string &address, uint16_t port)=0
 Sets the address and port to the specified value.
virtual void set_prefix_length (unsigned prefix_length)=0
 Sets the prefix length to the specified value.
virtual void set_prefix_length (const std::string &prefix_length)=0
 Sets the prefix length to the specified value.
virtual void set_port (uint16_t port)=0
 Sets the port portion of this address.
virtual void set_port (const std::string &port)=0
 Sets the port to the specified value.
virtual std::string hostname () const =0
 Performs a DNS query on the currently set address and returns the hostname string.
virtual std::string servicename () const =0
 Performs a service name lookup on the currently set port and returns the servicename string.
virtual bool is_multicast () const =0
 True if this is a multicast address.
virtual bool is_any () const =0
 True if this is the any address.
virtual bool is_loopback () const =0
 True if this is the loopback address.
virtual sigc::signal< void > signal_changed ()=0
virtual sigc::signal< void > signal_address_changed ()=0
virtual sigc::signal< void > signal_port_changed ()=0
virtual sigc::signal< void > signal_prefix_changed ()=0
virtual bool is_ipv4 ()=0
virtual bool is_ipv6 ()=0


Detailed Description

IP network address interface.

This class represents an IP address string based interface to both IPv4 and IPv6 addresses which are further implemented in IPv4::Address and IPv6::Address.

Author:
Rick L Vinyard Jr <rvinyard@cs.nmsu.edu>

Member Typedef Documentation

typedef ConexusPointer<IPAddress> Conexus::IPAddress::pointer

Reimplemented from Conexus::Address.

Reimplemented in Conexus::IPv4::Address.


Constructor & Destructor Documentation

Conexus::IPAddress::IPAddress (  )  [inline]

Conexus::IPAddress::IPAddress ( const struct sockaddr_storage &  addr  )  [inline]

virtual Conexus::IPAddress::~IPAddress (  )  [inline, virtual]


Member Function Documentation

virtual std::string Conexus::IPAddress::address_string (  )  const [pure virtual]

Returns the address as a string.

Implemented in Conexus::IPv4::Address.

virtual std::string Conexus::IPAddress::address_subnet_mask_string (  )  const [pure virtual]

Returns the address as an address/subnetmask string.

Implemented in Conexus::IPv4::Address.

virtual std::string Conexus::IPAddress::cidr_address_string (  )  const [pure virtual]

Returns the address as a CIDR address/prefixlen string.

Implemented in Conexus::IPv4::Address.

virtual std::string Conexus::IPAddress::hostname (  )  const [pure virtual]

Performs a DNS query on the currently set address and returns the hostname string.

Implemented in Conexus::IPv4::Address.

virtual bool Conexus::IPAddress::is_any (  )  const [pure virtual]

True if this is the any address.

Implemented in Conexus::IPv4::Address.

virtual bool Conexus::IPAddress::is_ipv4 (  )  [pure virtual]

Implemented in Conexus::IPv4::Address.

virtual bool Conexus::IPAddress::is_ipv6 (  )  [pure virtual]

Implemented in Conexus::IPv4::Address.

virtual bool Conexus::IPAddress::is_loopback (  )  const [pure virtual]

True if this is the loopback address.

Implemented in Conexus::IPv4::Address.

virtual bool Conexus::IPAddress::is_multicast (  )  const [pure virtual]

True if this is a multicast address.

Implemented in Conexus::IPv4::Address.

virtual std::string Conexus::IPAddress::local_address_string (  )  const [pure virtual]

Returns the local part of this address as a string.

Implemented in Conexus::IPv4::Address.

virtual uint16_t Conexus::IPAddress::port (  )  const [pure virtual]

Returns the port number associated with this address.

Implemented in Conexus::IPv4::Address.

virtual std::string Conexus::IPAddress::port_string (  )  const [pure virtual]

Returns the port number associated with this address as a string.

Implemented in Conexus::IPv4::Address.

virtual unsigned Conexus::IPAddress::prefix_length (  )  const [pure virtual]

Returns the prefix length of the subnet mask associated with this address.

Implemented in Conexus::IPv4::Address.

virtual std::string Conexus::IPAddress::prefix_length_string (  )  const [pure virtual]

Returns the prefix length of the subnet mask associated with this address as a string.

Implemented in Conexus::IPv4::Address.

virtual std::string Conexus::IPAddress::prefix_string (  )  const [pure virtual]

Returns the prefix part of this address as a string.

Implemented in Conexus::IPv4::Address.

virtual std::string Conexus::IPAddress::servicename (  )  const [pure virtual]

Performs a service name lookup on the currently set port and returns the servicename string.

Implemented in Conexus::IPv4::Address.

virtual void Conexus::IPAddress::set_address ( const std::string &  address,
uint16_t  port 
) [pure virtual]

Sets the address and port to the specified value.

Implemented in Conexus::IPv4::Address.

virtual void Conexus::IPAddress::set_address ( const std::string &  address  )  [pure virtual]

Sets the address to the specified value.

Implemented in Conexus::IPv4::Address.

virtual void Conexus::IPAddress::set_port ( const std::string &  port  )  [pure virtual]

Sets the port to the specified value.

Implemented in Conexus::IPv4::Address.

virtual void Conexus::IPAddress::set_port ( uint16_t  port  )  [pure virtual]

Sets the port portion of this address.

Implemented in Conexus::IPv4::Address.

virtual void Conexus::IPAddress::set_prefix_length ( const std::string &  prefix_length  )  [pure virtual]

Sets the prefix length to the specified value.

Implemented in Conexus::IPv4::Address.

virtual void Conexus::IPAddress::set_prefix_length ( unsigned  prefix_length  )  [pure virtual]

Sets the prefix length to the specified value.

Implemented in Conexus::IPv4::Address.

virtual sigc::signal<void> Conexus::IPAddress::signal_address_changed (  )  [pure virtual]

Implemented in Conexus::IPv4::Address.

virtual sigc::signal<void> Conexus::IPAddress::signal_changed (  )  [pure virtual]

Implemented in Conexus::IPv4::Address.

virtual sigc::signal<void> Conexus::IPAddress::signal_port_changed (  )  [pure virtual]

Implemented in Conexus::IPv4::Address.

virtual sigc::signal<void> Conexus::IPAddress::signal_prefix_changed (  )  [pure virtual]

Implemented in Conexus::IPv4::Address.

virtual std::string Conexus::IPAddress::subnet_mask_string (  )  const [pure virtual]

Returns the netmask associated with this address as a string.

Implemented in Conexus::IPv4::Address.


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

Generated on Tue Mar 3 09:48:02 2009 for conexus by doxygen 1.5.7.1