conexus logo

Conexus::Address Class Reference

This top level class provides a pure-virtual inheritance interface for children to inherit from. More...

#include <address.h>

Inheritance diagram for Conexus::Address:

Inheritance graph
[legend]

List of all members.

Public Types

typedef ConexusPointer< Addresspointer

Public Member Functions

 Address ()
 Address (const struct sockaddr_storage &addr)
virtual ~Address ()
virtual struct sockaddrsockaddr_ptr () const
virtual struct sockaddr_storage * sockaddr_storage_ptr () const
virtual socklen_t sockaddr_size () const
virtual bool is_broadcast () const

Protected Attributes

union {
   struct sockaddr_storage   storage
   struct sockaddr   sockaddr
   struct sockaddr_in   ipv4
   struct sockaddr_in6   ipv6
   struct sockaddr_ll   ll
m_sockaddr


Detailed Description

This top level class provides a pure-virtual inheritance interface for children to inherit from.

In concept, this class is much like the BSD raw sockaddr structure.

Author:
Rick L Vinyard Jr

Member Typedef Documentation

typedef ConexusPointer<Address> Conexus::Address::pointer

Reimplemented from Conexus::Object.

Reimplemented in Conexus::IPv4::Address.


Constructor & Destructor Documentation

Conexus::Address::Address (  ) 

References m_sockaddr.

Referenced by Conexus::IPv4::Address::create().

Conexus::Address::Address ( const struct sockaddr_storage &  addr  ) 

Reimplemented in Conexus::IPv4::Address.

References m_sockaddr.

Conexus::Address::~Address (  )  [virtual]


Member Function Documentation

bool Conexus::Address::is_broadcast (  )  const [virtual]

Returns:
true if this is considered a broadcast address
Is relative to a specific child protocol implementation and returns false unless child provides a specific implementation.

Reimplemented in Conexus::IPv4::Address, and Conexus::LL::Address.

struct sockaddr * Conexus::Address::sockaddr_ptr (  )  const [read, virtual]

Returns:
the raw sockaddr structure of this address type

References m_sockaddr, and sockaddr.

Referenced by Conexus::NSPR::addr_to_nspr().

socklen_t Conexus::Address::sockaddr_size (  )  const [virtual]

Returns:
the length of the raw sockaddr structure in bytes

Reimplemented in Conexus::IPv4::Address, and Conexus::LL::Address.

struct sockaddr_storage * Conexus::Address::sockaddr_storage_ptr (  )  const [read, virtual]

References m_sockaddr.

Referenced by Conexus::IPv4::Address::operator=().


Member Data Documentation

struct sockaddr_in Conexus::Address::ipv4 [read]

struct sockaddr_in6 Conexus::Address::ipv6 [read]

struct sockaddr_ll Conexus::Address::ll [read]

union { ... } Conexus::Address::m_sockaddr [protected]

Referenced by sockaddr_ptr().

struct sockaddr_storage Conexus::Address::storage [read]


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

Generated on Wed Jul 8 15:51:17 2009 for conexus by doxygen 1.5.8