protlib::netaddress Class Reference

Network Prefix (or net address). More...

#include <source/ariba/utility/transport/tcpip/protlib/address.h>

Inherits protlib::hostaddress.

Collaboration diagram for protlib::netaddress:

Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual netaddressnew_instance () const
virtual netaddresscopy () const
virtual bool operator== (const address &ie) const
virtual void convert_to_ipv6 ()
 convert to iPv6
virtual size_t get_hash () const
 hash function
virtual int match_against (const netaddress &na) const
 match against network prefix
 netaddress ()
 constructor
 netaddress (const netaddress &na)
 copy constructor
 netaddress (const hostaddress &h, prefix_length_t len=128)
 constructor from hostaddress and prefix length
 netaddress (const char *str, bool *res=NULL)
 constructor from string
 netaddress (const char *str, prefix_length_t len, bool *res=NULL)
 constructor from string and prefix length
netaddressoperator= (const netaddress &na)
 assignment
netaddressoperator= (const hostaddress &ha)
 assignment
prefix_length_t set_pref_len (prefix_length_t len)
prefix_length_t get_pref_len () const
bool operator< (const netaddress &na) const
 comparison for prefixmap
int rdx_cmp (const netaddress *na, int *pos) const

Protected Member Functions

virtual void set_subtype (bool ipv4)
 set subtype and IPv4 flag

Private Attributes

prefix_length_t prefix_length


Detailed Description

Network Prefix (or net address).

Holds an IP address and a prefix length in bits.

Definition at line 634 of file address.h.


Member Function Documentation

size_t protlib::netaddress::get_hash (  )  const [inline, virtual]

hash function

Reimplemented from protlib::hostaddress.

Definition at line 1361 of file address.h.

References protlib::hostaddress::get_hash(), and prefix_length.

Referenced by __gnu_cxx::hash< protlib::netaddress >::operator()().

prefix_length_t protlib::netaddress::get_pref_len (  )  const [inline]

int protlib::netaddress::match_against ( const netaddress na  )  const [inline, virtual]

match against network prefix

Match this IP address against the given network prefix.

Returns:
-1 on no match or error, e.g. when IPv4 and IPv6 are matched

the length of the matched prefix.

Reimplemented from protlib::hostaddress.

Definition at line 1367 of file address.h.

References prefix_length.


Member Data Documentation


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

Generated on Fri Aug 14 23:39:46 2009 for Ariba by  doxygen 1.5.8