#include <source/ariba/utility/transport/tcpip/protlib/address.h>
Inherits protlib::hostaddress.
Public Member Functions | |
virtual netaddress * | new_instance () const |
virtual netaddress * | copy () 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 | |
netaddress & | operator= (const netaddress &na) |
assignment | |
netaddress & | operator= (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 |
Holds an IP address and a prefix length in bits.
Definition at line 634 of file address.h.
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] |
Definition at line 1358 of file address.h.
References prefix_length.
Referenced by protlib::AddressList::getifaddrs_is_local(), protlib::RadixTrie< propmap_t >::insert(), protlib::RadixTrie< propmap_t >::lookup_node(), protlib::hostaddress::match_against(), and protlib::operator<<().
int protlib::netaddress::match_against | ( | const netaddress & | na | ) | const [inline, virtual] |
match against network prefix
Match this IP address against the given network prefix.
the length of the matched prefix.
Reimplemented from protlib::hostaddress.
Definition at line 1367 of file address.h.
References prefix_length.
Definition at line 675 of file address.h.
Referenced by convert_to_ipv6(), get_hash(), get_pref_len(), match_against(), netaddress(), operator<(), operator=(), operator==(), rdx_cmp(), set_pref_len(), and set_subtype().