![]() |
Namespaces | |
namespace | protlib |
Functions | |
protlib::address::address (subtype_t st) | |
constructor with subtype | |
void | protlib::address::throw_nomem_error () const |
virtual destructor | |
virtual hostaddress * | protlib::hostaddress::new_instance () const |
virtual hostaddress * | protlib::hostaddress::copy () const |
virtual bool | protlib::hostaddress::operator== (const address &ie) const |
protlib::hostaddress::hostaddress (const char *str, bool *res=NULL) | |
constructor from string | |
bool | protlib::hostaddress::set_ipv4 (const char *str) |
set IPv4 from string | |
void | protlib::hostaddress::set_ip (const struct in_addr &in) |
set IPv4 from in_addr | |
bool | protlib::hostaddress::set_ipv6 (const char *str) |
set IPv6 from string | |
void | protlib::hostaddress::set_ip (const struct in6_addr &in) |
set IPv6 from in6_addr | |
void | protlib::hostaddress::set_ip (const hostaddress &h) |
set IP from hostaddress | |
bool | protlib::hostaddress::is_ip_unspec () const |
is IP unspecified | |
const char * | protlib::hostaddress::get_ip_str () const |
get ip address as string | |
const char * | protlib::hostaddress::get_ip_str (char *str) const |
get ip address as string | |
bool | protlib::hostaddress::get_ip (struct in_addr &in) const |
get as in_addr? | |
bool | protlib::hostaddress::get_ip (struct in6_addr &in) const |
get as in6_addr? | |
bool | protlib::hostaddress::is_bogus_source () const |
is bogus source (e.g. localhost, multicast) | |
virtual void | protlib::hostaddress::convert_to_ipv6 () |
convert to iPv6 | |
virtual bool | protlib::hostaddress::equiv (const hostaddress &h) const |
are they equivalent | |
virtual void | protlib::hostaddress::set_subtype (bool ipv4) |
set subtype and IPv4 flag | |
void | protlib::hostaddress::clear_ip () |
clear IP buffer (sets IP address to undefined/any and deletes any outstring) | |
virtual int | protlib::hostaddress::match_against (const hostaddress &ha) const |
match against IP address | |
virtual int | protlib::hostaddress::match_against (const netaddress &na) const |
match against network prefix | |
virtual appladdress * | protlib::appladdress::new_instance () const |
virtual appladdress * | protlib::appladdress::copy () const |
virtual bool | protlib::appladdress::operator== (const address &ie) const |
virtual netaddress * | protlib::netaddress::new_instance () const |
virtual netaddress * | protlib::netaddress::copy () const |
virtual bool | protlib::netaddress::operator== (const address &ie) const |
virtual void | protlib::netaddress::convert_to_ipv6 () |
convert to iPv6 | |
virtual void | protlib::netaddress::set_subtype (bool ipv4) |
set subtype and IPv4 flag | |
protlib::netaddress::netaddress () | |
constructor | |
protlib::netaddress::netaddress (const netaddress &na) | |
copy constructor | |
protlib::netaddress::netaddress (const hostaddress &h, prefix_length_t len=128) | |
constructor from hostaddress and prefix length | |
protlib::netaddress::netaddress (const char *str, bool *res=NULL) | |
constructor from string | |
protlib::netaddress::netaddress (const char *str, prefix_length_t len, bool *res=NULL) | |
constructor from string and prefix length | |
netaddress & | protlib::netaddress::operator= (const netaddress &na) |
assignment | |
netaddress & | protlib::netaddress::operator= (const hostaddress &ha) |
assignment | |
prefix_length_t | protlib::netaddress::set_pref_len (prefix_length_t len) |
bool | protlib::netaddress::operator< (const netaddress &na) const |
comparison for prefixmap | |
int | protlib::netaddress::rdx_cmp (const netaddress *na, int *pos) const |
virtual udsaddress * | protlib::udsaddress::new_instance () const |
virtual udsaddress * | protlib::udsaddress::copy () const |
virtual bool | protlib::udsaddress::operator== (const address &ie) const |
protlib::AddressList::AddressList () | |
protlib::AddressList::~AddressList () | |
iflist_t * | protlib::AddressList::get_interfaces () |
bool | protlib::AddressList::by_interface (bool start_empty=true) |
bool | protlib::AddressList::add_interface (char *name) |
bool | protlib::AddressList::del_interface (char *name) |
bool | protlib::AddressList::add_property (netaddress &na, AddrProperty *p=ConfiguredAddr_P, bool propagate=true) |
bool | protlib::AddressList::del_property (netaddress &na, AddrProperty *p=ConfiguredAddr_P, bool propagate=true) |
bool | protlib::AddressList::add_host_prop (const char *name, AddrProperty *p=ConfiguredAddr_P) |
bool | protlib::AddressList::del_host_prop (const char *name, AddrProperty *p=ConfiguredAddr_P) |
bool | protlib::AddressList::ignore (netaddress &na, bool propagate=true) |
bool | protlib::AddressList::unignore (netaddress &na, bool propagate=true) |
bool | protlib::AddressList::ignore_bogons (void) |
bool | protlib::AddressList::ignore_locals (void) |
bool | protlib::AddressList::ignore_loopback (void) |
bool | protlib::AddressList::addr_is (netaddress &na, AddrProperty *prop) |
bool | protlib::AddressList::addr_is_in (netaddress &na, AddrProperty *prop) |
addrlist_t * | protlib::AddressList::get_addrs (AddrProperty *prop=LocalAddr_P) |
netaddress * | protlib::AddressList::get_first (AddrProperty *p=LocalAddr_P, bool IPv4=true) |
netaddress * | protlib::AddressList::get_src_addr (const netaddress &dest, uint32_t *prefs) |
void | protlib::AddressList::getifaddrs_iflist (iflist_t &list) |
bool | protlib::AddressList::getifaddrs_is_local (netaddress &na) |
void | protlib::AddressList::getifaddrs_get_addrs (addrlist_t &list) |
void | protlib::AddressList::bequeath (addr2prop_t::node *head, AddrProperty *p, bool add=true) |
void | protlib::AddressList::collect (addr2prop_t::node *head, AddrProperty *p, addrlist_t &list) |
addr2prop_t::node * | protlib::AddressList::collect_first (addr2prop_t::node *head, AddrProperty *p) |
Variables | |
static AddrProperty * | protlib::AddressList::LocalAddr_P |
static AddrProperty * | protlib::AddressList::ConfiguredAddr_P |
static AddrProperty * | protlib::AddressList::IgnoreAddr_P |
static AddrProperty * | protlib::AddressList::AnyAddr_P |
bool protlib::AddressList::add_host_prop | ( | const char * | name, | |
AddrProperty * | p = ConfiguredAddr_P | |||
) | [inherited] |
Definition at line 958 of file address.cpp.
References protlib::AddressList::add_property(), protlib::hostaddress::set_ip(), and protlib::netaddress::set_pref_len().
bool protlib::AddressList::add_interface | ( | char * | name | ) | [inherited] |
bool protlib::AddressList::add_property | ( | netaddress & | na, | |
AddrProperty * | p = ConfiguredAddr_P , |
|||
bool | propagate = true | |||
) | [inherited] |
Definition at line 864 of file address.cpp.
References protlib::AddressList::bequeath(), protlib::RadixTrie< _dT >::insert(), protlib::RadixTrie< _dT >::lookup(), protlib::RadixTrie< _dT >::lookup_node(), and protlib::AddressList::prop_trie.
Referenced by protlib::AddressList::add_host_prop(), and protlib::AddressList::ignore().
bool protlib::AddressList::addr_is | ( | netaddress & | na, | |
AddrProperty * | prop | |||
) | [inherited] |
Definition at line 1225 of file address.cpp.
References protlib::AddressList::addr_is_in(), protlib::AddressList::getifaddrs_is_local(), protlib::AddressList::IgnoreAddr_P, protlib::AddressList::LocalAddr_P, protlib::RadixTrie< _dT >::lookup(), and protlib::AddressList::prop_trie.
Referenced by protlib::AddressList::addr_is().
bool protlib::AddressList::addr_is_in | ( | netaddress & | na, | |
AddrProperty * | prop | |||
) | [inherited] |
Definition at line 1248 of file address.cpp.
References protlib::RadixTrie< _dT >::lookup(), protlib::RadixTrie< _dT >::lookup_node(), and protlib::AddressList::prop_trie.
Referenced by protlib::AddressList::addr_is(), protlib::AddressList::addr_is_in(), and protlib::AddressList::getifaddrs_get_addrs().
protlib::address::address | ( | subtype_t | st | ) | [protected, inherited] |
protlib::AddressList::AddressList | ( | ) | [inherited] |
Definition at line 801 of file address.cpp.
References protlib::AddressList::AnyAddr_P, protlib::AddressList::ConfiguredAddr_P, protlib::AddressList::IgnoreAddr_P, protlib::AddressList::interfaces, and protlib::AddressList::LocalAddr_P.
void protlib::AddressList::bequeath | ( | addr2prop_t::node * | head, | |
AddrProperty * | p, | |||
bool | add = true | |||
) | [private, inherited] |
Definition at line 1474 of file address.cpp.
References protlib::AddressList::AnyAddr_P.
Referenced by protlib::AddressList::add_property(), and protlib::AddressList::del_property().
bool protlib::AddressList::by_interface | ( | bool | start_empty = true |
) | [inherited] |
Definition at line 833 of file address.cpp.
References protlib::AddressList::getifaddrs_iflist(), and protlib::AddressList::interfaces.
void protlib::hostaddress::clear_ip | ( | ) | [inherited] |
clear IP buffer (sets IP address to undefined/any and deletes any outstring)
Clear the IP address buffer and the outstring if it exists.
Definition at line 333 of file address.cpp.
References protlib::hostaddress::ipv6addr, and protlib::hostaddress::outstring.
Referenced by protlib::hostaddress::convert_to_ipv6(), protlib::hostaddress::hostaddress(), and protlib::hostaddress::set_ip().
void protlib::AddressList::collect | ( | addr2prop_t::node * | head, | |
AddrProperty * | p, | |||
addrlist_t & | list | |||
) | [private, inherited] |
Definition at line 1505 of file address.cpp.
References protlib::AddressList::AnyAddr_P.
Referenced by protlib::AddressList::get_addrs().
AddressList::addr2prop_t::node * protlib::AddressList::collect_first | ( | addr2prop_t::node * | head, | |
AddrProperty * | p | |||
) | [private, inherited] |
Definition at line 1531 of file address.cpp.
References protlib::AddressList::AnyAddr_P.
Referenced by protlib::AddressList::get_first().
void protlib::netaddress::convert_to_ipv6 | ( | ) | [virtual, inherited] |
convert to iPv6
Convert the IP address to IPv6 by mapping it from IPv4 to IPv6 if necessary. The prefix length is converted, too.
Reimplemented from protlib::hostaddress.
Definition at line 477 of file address.cpp.
References protlib::hostaddress::ipv4flag, protlib::netaddress::prefix_length, and protlib::netaddress::set_pref_len().
void protlib::hostaddress::convert_to_ipv6 | ( | ) | [virtual, inherited] |
convert to iPv6
Convert the IP address to IPv6 by mapping it from IPv4 to IPv6 if necessary
Reimplemented in protlib::netaddress.
Definition at line 277 of file address.cpp.
References protlib::hostaddress::clear_ip(), protlib::hostaddress::get_ip(), protlib::hostaddress::ipv4flag, protlib::hostaddress::is_ip_unspec(), protlib::hostaddress::set_ip(), and protlib::hostaddress::set_subtype().
Referenced by protlib::hostaddress::equiv(), protlib::TPoverTCP::tcpsend(), ariba::transport::tcpip::terminate(), and protlib::TPoverUDP::udpsend().
udsaddress * protlib::udsaddress::copy | ( | ) | const [virtual, inherited] |
Implements protlib::address.
Definition at line 783 of file address.cpp.
References catch_bad_alloc, and protlib::udsaddress::udsaddress().
netaddress * protlib::netaddress::copy | ( | ) | const [virtual, inherited] |
Reimplemented from protlib::hostaddress.
Definition at line 452 of file address.cpp.
References catch_bad_alloc, and protlib::netaddress::netaddress().
appladdress * protlib::appladdress::copy | ( | ) | const [virtual, inherited] |
Reimplemented from protlib::hostaddress.
Definition at line 420 of file address.cpp.
References protlib::appladdress::appladdress(), and catch_bad_alloc.
Referenced by protlib::TPoverTCP::receiver_thread().
hostaddress * protlib::hostaddress::copy | ( | ) | const [virtual, inherited] |
Implements protlib::address.
Reimplemented in protlib::appladdress, and protlib::netaddress.
Definition at line 81 of file address.cpp.
References catch_bad_alloc, and protlib::hostaddress::hostaddress().
Referenced by protlib::hostaddress::equiv().
bool protlib::AddressList::del_host_prop | ( | const char * | name, | |
AddrProperty * | p = ConfiguredAddr_P | |||
) | [inherited] |
Definition at line 1004 of file address.cpp.
References protlib::AddressList::del_property(), protlib::hostaddress::set_ip(), and protlib::netaddress::set_pref_len().
Referenced by protlib::AddressList::purge_host_prop().
bool protlib::AddressList::del_interface | ( | char * | name | ) | [inherited] |
bool protlib::AddressList::del_property | ( | netaddress & | na, | |
AddrProperty * | p = ConfiguredAddr_P , |
|||
bool | propagate = true | |||
) | [inherited] |
Definition at line 902 of file address.cpp.
References protlib::AddressList::AnyAddr_P, protlib::AddressList::bequeath(), protlib::RadixTrie< _dT >::insert(), protlib::RadixTrie< _dT >::lookup(), protlib::RadixTrie< _dT >::lookup_node(), and protlib::AddressList::prop_trie.
Referenced by protlib::AddressList::del_host_prop(), protlib::AddressList::ignore(), protlib::AddressList::purge_properties(), and protlib::AddressList::unignore().
bool protlib::hostaddress::equiv | ( | const hostaddress & | h | ) | const [virtual, inherited] |
are they equivalent
Two addresses are equivalent if they are equal after converting both to IPv6.
Definition at line 296 of file address.cpp.
References protlib::hostaddress::convert_to_ipv6(), protlib::hostaddress::copy(), protlib::hostaddress::is_ipv4(), and protlib::hostaddress::is_mapped_ip().
Referenced by std::equal_to< protlib::netaddress >::operator()(), std::equal_to< protlib::appladdress >::operator()(), and std::equal_to< protlib::hostaddress >::operator()().
AddressList::addrlist_t * protlib::AddressList::get_addrs | ( | AddrProperty * | prop = LocalAddr_P |
) | [inherited] |
Definition at line 1270 of file address.cpp.
References protlib::AddressList::AnyAddr_P, protlib::AddressList::collect(), protlib::AddressList::getifaddrs_get_addrs(), protlib::AddressList::LocalAddr_P, protlib::RadixTrie< _dT >::lookup_node(), protlib::AddressList::prop_trie, protlib::hostaddress::set_ip(), and protlib::netaddress::set_pref_len().
netaddress * protlib::AddressList::get_first | ( | AddrProperty * | p = LocalAddr_P , |
|
bool | IPv4 = true | |||
) | [inherited] |
Definition at line 1295 of file address.cpp.
References protlib::AddressList::collect_first(), protlib::AddressList::getifaddrs_get_addrs(), protlib::AddressList::LocalAddr_P, protlib::RadixTrie< _dT >::lookup_node(), protlib::AddressList::prop_trie, protlib::hostaddress::set_ip(), and protlib::netaddress::set_pref_len().
AddressList::iflist_t * protlib::AddressList::get_interfaces | ( | ) | [inherited] |
Definition at line 818 of file address.cpp.
References protlib::AddressList::getifaddrs_iflist(), and protlib::AddressList::interfaces.
bool protlib::hostaddress::get_ip | ( | struct in6_addr & | in | ) | const [inherited] |
get as in6_addr?
Get IP address as an in6_addr. If this is an IPv4 address, it is mapped to IPv6.
Definition at line 237 of file address.cpp.
References protlib::hostaddress::ipv4addr, protlib::hostaddress::ipv4flag, and protlib::hostaddress::ipv6addr.
bool protlib::hostaddress::get_ip | ( | struct in_addr & | in | ) | const [inherited] |
get as in_addr?
Get IP address as an in_addr if possible.
Definition at line 223 of file address.cpp.
References protlib::hostaddress::ipv4addr, protlib::hostaddress::ipv4flag, and protlib::hostaddress::ipv6addr.
Referenced by protlib::AddressList::get_src_addr(), and protlib::TPoverUDP::udpsend().
const char * protlib::hostaddress::get_ip_str | ( | char * | str | ) | const [inherited] |
get ip address as string
Get IP address as a string.
str | string buffer |
Definition at line 211 of file address.cpp.
References protlib::hostaddress::ipv4addr, protlib::hostaddress::ipv4flag, and protlib::hostaddress::ipv6addr.
const char * protlib::hostaddress::get_ip_str | ( | ) | const [inherited] |
get ip address as string
Get IP address as a string. The output string is kept inside the hostaddress object and should be copied if used for a longer time.
Definition at line 187 of file address.cpp.
References protlib::hostaddress::ipv4flag, and protlib::hostaddress::outstring.
Referenced by ariba::transport::convert(), protlib::TPoverTCP::get_connection_to(), protlib::TPoverTCP::master_listener_thread(), protlib::operator<<(), protlib::hostaddress::operator==(), and protlib::TPoverTCP::tcpsend().
netaddress * protlib::AddressList::get_src_addr | ( | const netaddress & | dest, | |
uint32_t * | prefs | |||
) | [inherited] |
Definition at line 1326 of file address.cpp.
References protlib::hostaddress::get_ip(), protlib::hostaddress::is_ipv4(), protlib::hostaddress::set_ip(), and protlib::netaddress::set_pref_len().
void protlib::AddressList::getifaddrs_get_addrs | ( | addrlist_t & | list | ) | [private, inherited] |
Definition at line 1436 of file address.cpp.
References protlib::AddressList::addr_is_in(), protlib::AddressList::IgnoreAddr_P, protlib::AddressList::interfaces, protlib::hostaddress::set_ip(), and protlib::netaddress::set_pref_len().
Referenced by protlib::AddressList::get_addrs(), and protlib::AddressList::get_first().
void protlib::AddressList::getifaddrs_iflist | ( | iflist_t & | list | ) | [private, inherited] |
Definition at line 1385 of file address.cpp.
Referenced by protlib::AddressList::by_interface(), and protlib::AddressList::get_interfaces().
bool protlib::AddressList::getifaddrs_is_local | ( | netaddress & | na | ) | [private, inherited] |
Definition at line 1400 of file address.cpp.
References protlib::netaddress::get_pref_len(), protlib::AddressList::interfaces, protlib::hostaddress::match_against(), and protlib::hostaddress::set_ip().
Referenced by protlib::AddressList::addr_is().
protlib::hostaddress::hostaddress | ( | const char * | str, | |
bool * | res = NULL | |||
) | [inherited] |
constructor from string
Initialize hostaddress from string if possible.
Definition at line 104 of file address.cpp.
References protlib::hostaddress::clear_ip(), and protlib::hostaddress::set_ip().
bool protlib::AddressList::ignore | ( | netaddress & | na, | |
bool | propagate = true | |||
) | [inherited] |
Definition at line 1045 of file address.cpp.
References protlib::AddressList::add_property(), protlib::AddressList::AnyAddr_P, protlib::AddressList::del_property(), and protlib::AddressList::IgnoreAddr_P.
Referenced by protlib::AddressList::ignore_bogons(), protlib::AddressList::ignore_locals(), and protlib::AddressList::ignore_loopback().
bool protlib::AddressList::ignore_bogons | ( | void | ) | [inherited] |
Definition at line 1058 of file address.cpp.
References protlib::AddressList::ignore(), protlib::hostaddress::set_ip(), and protlib::netaddress::set_pref_len().
bool protlib::AddressList::ignore_locals | ( | void | ) | [inherited] |
Definition at line 1193 of file address.cpp.
References protlib::AddressList::ignore(), protlib::hostaddress::set_ip(), and protlib::netaddress::set_pref_len().
bool protlib::AddressList::ignore_loopback | ( | void | ) | [inherited] |
Definition at line 1212 of file address.cpp.
References protlib::AddressList::ignore(), protlib::hostaddress::set_ip(), and protlib::netaddress::set_pref_len().
bool protlib::hostaddress::is_bogus_source | ( | ) | const [inherited] |
is bogus source (e.g. localhost, multicast)
returns false if address is not allowed to be used as source address: loopback, multicast, broadcast, unspecified
Definition at line 250 of file address.cpp.
References protlib::hostaddress::ipv4addr, protlib::hostaddress::ipv4flag, and protlib::hostaddress::ipv6addr.
bool protlib::hostaddress::is_ip_unspec | ( | ) | const [inherited] |
is IP unspecified
Check if IP address is unspecified (set to 0).
Definition at line 177 of file address.cpp.
References protlib::hostaddress::ipv4addr, protlib::hostaddress::ipv4flag, and protlib::hostaddress::ipv6addr.
Referenced by protlib::hostaddress::convert_to_ipv6().
int protlib::hostaddress::match_against | ( | const netaddress & | na | ) | const [virtual, inherited] |
match against network prefix
Match this IP address against the given network prefix.
the length of the matched prefix.
Reimplemented in protlib::netaddress.
Definition at line 361 of file address.cpp.
References protlib::netaddress::get_pref_len(), protlib::hostaddress::ipv4addr, protlib::hostaddress::ipv4flag, and protlib::hostaddress::ipv6addr.
int protlib::hostaddress::match_against | ( | const hostaddress & | ha | ) | const [virtual, inherited] |
match against IP address
Match this IP address against another IP address. Two IP addresses match if they are equal.
the length of the matched prefix.
Definition at line 348 of file address.cpp.
References protlib::hostaddress::ipv4flag.
Referenced by protlib::AddressList::getifaddrs_is_local().
protlib::netaddress::netaddress | ( | const char * | str, | |
prefix_length_t | len, | |||
bool * | res = NULL | |||
) | [inherited] |
constructor from string and prefix length
Initialize from string and prefix length. If the string does not contain a valid IP address, it is set to all 0 by the hostaddress constructor.
Definition at line 570 of file address.cpp.
References protlib::hostaddress::ipv4flag, protlib::netaddress::set_pref_len(), and protlib::netaddress::set_subtype().
protlib::netaddress::netaddress | ( | const char * | str, | |
bool * | res = NULL | |||
) | [inherited] |
constructor from string
Initialize from string which contains IP and prefix length separated by '/'.
Definition at line 527 of file address.cpp.
References protlib::hostaddress::ipv4flag, protlib::netaddress::prefix_length, protlib::hostaddress::set_ip(), and protlib::netaddress::set_subtype().
protlib::netaddress::netaddress | ( | const hostaddress & | h, | |
prefix_length_t | len = 128 | |||
) | [inherited] |
constructor from hostaddress and prefix length
Initialize with the given host address and prefix length. Prefix length is optional and set to 0 if missing.
Definition at line 519 of file address.cpp.
References protlib::hostaddress::ipv4flag, protlib::netaddress::set_pref_len(), and protlib::netaddress::set_subtype().
protlib::netaddress::netaddress | ( | const netaddress & | na | ) | [inherited] |
copy constructor
Definition at line 511 of file address.cpp.
References protlib::hostaddress::ipv4flag, protlib::netaddress::prefix_length, and protlib::netaddress::set_subtype().
protlib::netaddress::netaddress | ( | ) | [inherited] |
constructor
Constructor sets address type and clears prefix length.
Definition at line 504 of file address.cpp.
References protlib::hostaddress::ipv4flag, and protlib::netaddress::set_subtype().
Referenced by protlib::netaddress::copy(), and protlib::netaddress::new_instance().
udsaddress * protlib::udsaddress::new_instance | ( | ) | const [virtual, inherited] |
Implements protlib::address.
Definition at line 777 of file address.cpp.
References catch_bad_alloc, and protlib::udsaddress::udsaddress().
netaddress * protlib::netaddress::new_instance | ( | ) | const [virtual, inherited] |
Reimplemented from protlib::hostaddress.
Definition at line 446 of file address.cpp.
References catch_bad_alloc, and protlib::netaddress::netaddress().
appladdress * protlib::appladdress::new_instance | ( | ) | const [virtual, inherited] |
Reimplemented from protlib::hostaddress.
Definition at line 414 of file address.cpp.
References protlib::appladdress::appladdress(), and catch_bad_alloc.
hostaddress * protlib::hostaddress::new_instance | ( | ) | const [virtual, inherited] |
Implements protlib::address.
Reimplemented in protlib::appladdress, and protlib::netaddress.
Definition at line 75 of file address.cpp.
References catch_bad_alloc, and protlib::hostaddress::hostaddress().
bool protlib::netaddress::operator< | ( | const netaddress & | na | ) | const [inherited] |
comparison for prefixmap
Compare two netaddress objects. If neither a<b and b<a then a and b are considered equal.
Definition at line 606 of file address.cpp.
References protlib::hostaddress::ipv4addr, protlib::hostaddress::ipv4flag, protlib::hostaddress::ipv6addr, and protlib::netaddress::prefix_length.
netaddress & protlib::netaddress::operator= | ( | const hostaddress & | na | ) | [inherited] |
assignment
Assigns the given netaddress address by using hostaddress::operator=().
Reimplemented from protlib::hostaddress.
Definition at line 584 of file address.cpp.
References protlib::netaddress::operator=(), and protlib::netaddress::set_pref_len().
netaddress & protlib::netaddress::operator= | ( | const netaddress & | na | ) | [inherited] |
assignment
Assigns the given netaddress address by using hostaddress::operator=().
Definition at line 576 of file address.cpp.
References protlib::netaddress::prefix_length.
Referenced by protlib::netaddress::operator=().
bool protlib::udsaddress::operator== | ( | const address & | ie | ) | const [virtual, inherited] |
Implements protlib::address.
Definition at line 789 of file address.cpp.
References protlib::udsaddress::socknum, and protlib::udsaddress::uds_socket.
bool protlib::netaddress::operator== | ( | const address & | ie | ) | const [virtual, inherited] |
Reimplemented from protlib::hostaddress.
Definition at line 458 of file address.cpp.
References protlib::netaddress::prefix_length.
bool protlib::appladdress::operator== | ( | const address & | ie | ) | const [virtual, inherited] |
Reimplemented from protlib::hostaddress.
Definition at line 426 of file address.cpp.
References protlib::appladdress::port, and protlib::appladdress::proto.
bool protlib::hostaddress::operator== | ( | const address & | ie | ) | const [virtual, inherited] |
Implements protlib::address.
Reimplemented in protlib::appladdress, and protlib::netaddress.
Definition at line 87 of file address.cpp.
References protlib::log::DEBUG_LOG, protlib::hostaddress::get_ip_str(), protlib::hostaddress::ipv4addr, protlib::hostaddress::ipv4flag, protlib::hostaddress::ipv6addr, Log, and protlib::log::LOG_NORMAL.
int protlib::netaddress::rdx_cmp | ( | const netaddress * | na, | |
int * | pos | |||
) | const [inherited] |
Compare function for the radix trie:
Compare this and na from *pos up to max(this->prefix, na->prefix)
In pos return the position where the compare ended.
The return value is 0 if the strings are equal and all of this' string was consumed, otherwise the sign will indicate the bit in this' string at pos (i.e. if the search should continue left or right of na).
pos < 0 indicates error
Definition at line 669 of file address.cpp.
References protlib::hostaddress::ipv4addr, protlib::hostaddress::ipv4flag, protlib::hostaddress::ipv6addr, and protlib::netaddress::prefix_length.
Referenced by protlib::RadixTrie< propmap_t >::insert(), protlib::RadixTrie< propmap_t >::lookup_node(), and protlib::AddressList::AddressList::ltna::operator()().
void protlib::hostaddress::set_ip | ( | const hostaddress & | h | ) | [inherited] |
set IP from hostaddress
Definition at line 166 of file address.cpp.
References protlib::hostaddress::clear_ip(), protlib::hostaddress::ipv4addr, protlib::hostaddress::ipv4flag, protlib::hostaddress::ipv6addr, and protlib::hostaddress::set_subtype().
void protlib::hostaddress::set_ip | ( | const struct in6_addr & | in | ) | [inherited] |
set IPv6 from in6_addr
Set IPv6 address from struct in6_addr. This changes object type to IPv6.
Definition at line 156 of file address.cpp.
References protlib::hostaddress::clear_ip(), protlib::hostaddress::ipv6addr, and protlib::hostaddress::set_subtype().
void protlib::hostaddress::set_ip | ( | const struct in_addr & | in | ) | [inherited] |
set IPv4 from in_addr
Set IPv4 address from struct in_addr. This changes object type to IPv4.
Definition at line 132 of file address.cpp.
References protlib::hostaddress::clear_ip(), protlib::hostaddress::ipv4addr, and protlib::hostaddress::set_subtype().
Referenced by protlib::AddressList::add_host_prop(), protlib::hostaddress::convert_to_ipv6(), protlib::AddressList::del_host_prop(), protlib::AddressList::get_addrs(), protlib::AddressList::get_first(), protlib::AddressList::get_src_addr(), protlib::AddressList::getifaddrs_get_addrs(), protlib::AddressList::getifaddrs_is_local(), protlib::hostaddress::hostaddress(), protlib::AddressList::ignore_bogons(), protlib::AddressList::ignore_locals(), protlib::AddressList::ignore_loopback(), protlib::TPoverUDP::listener_thread(), protlib::netaddress::netaddress(), protlib::hostaddress::operator=(), protlib::hostaddress::set_ip(), protlib::hostaddress::set_ipv4(), and protlib::hostaddress::set_ipv6().
bool protlib::hostaddress::set_ipv4 | ( | const char * | str | ) | [inherited] |
set IPv4 from string
Set IPv4 from string or leave object unchanged. This changes object type to IPv4.
Definition at line 121 of file address.cpp.
References protlib::hostaddress::set_ip().
Referenced by protlib::hostaddress::set_ip().
bool protlib::hostaddress::set_ipv6 | ( | const char * | str | ) | [inherited] |
set IPv6 from string
Set IPv6 from string or leave object unchanged. This changes object type to IPv6.
Definition at line 144 of file address.cpp.
References protlib::hostaddress::set_ip().
Referenced by protlib::hostaddress::set_ip().
prefix_length_t protlib::netaddress::set_pref_len | ( | prefix_length_t | len | ) | [inherited] |
Set prefix length and return old value. will also cut prefix_length if needed (i.e., if len too large for addr type)
Definition at line 594 of file address.cpp.
References protlib::hostaddress::ipv4flag, and protlib::netaddress::prefix_length.
Referenced by protlib::AddressList::add_host_prop(), protlib::netaddress::convert_to_ipv6(), protlib::AddressList::del_host_prop(), protlib::AddressList::get_addrs(), protlib::AddressList::get_first(), protlib::AddressList::get_src_addr(), protlib::AddressList::getifaddrs_get_addrs(), protlib::AddressList::ignore_bogons(), protlib::AddressList::ignore_locals(), protlib::AddressList::ignore_loopback(), protlib::netaddress::netaddress(), and protlib::netaddress::operator=().
void protlib::netaddress::set_subtype | ( | bool | ipv4 | ) | [protected, virtual, inherited] |
set subtype and IPv4 flag
Set subtype and IPv4 flag. This does NOT clear the outstring buffer. Use clear_ip(). In addition the prefix length is checked and set to reasonable values.
Reimplemented from protlib::hostaddress.
Definition at line 490 of file address.cpp.
References protlib::hostaddress::ipv4flag, protlib::address::IPv4NetAddress, protlib::address::IPv6NetAddress, protlib::netaddress::prefix_length, and protlib::address::subtype.
Referenced by protlib::netaddress::netaddress().
void protlib::hostaddress::set_subtype | ( | bool | ipv4 | ) | [protected, virtual, inherited] |
set subtype and IPv4 flag
Set subtype and IPv4 flag. This does NOT clear the outstring buffer. Use clear_ip().
Reimplemented in protlib::appladdress, and protlib::netaddress.
Definition at line 327 of file address.cpp.
References protlib::hostaddress::ipv4flag, protlib::address::IPv4HostAddress, protlib::address::IPv6HostAddress, and protlib::address::subtype.
Referenced by protlib::hostaddress::convert_to_ipv6(), protlib::hostaddress::hostaddress(), and protlib::hostaddress::set_ip().
void protlib::address::throw_nomem_error | ( | ) | const [protected, inherited] |
virtual destructor
Log and throw a nomem_error
Definition at line 63 of file address.cpp.
References ERRCLog, and protlib::IEError::ERROR_NO_MEM.
bool protlib::AddressList::unignore | ( | netaddress & | na, | |
bool | propagate = true | |||
) | [inherited] |
Definition at line 1052 of file address.cpp.
References protlib::AddressList::del_property(), and protlib::AddressList::IgnoreAddr_P.
protlib::AddressList::~AddressList | ( | ) | [inherited] |
Definition at line 812 of file address.cpp.
AddressList::AddrProperty * protlib::AddressList::AnyAddr_P [static, private, inherited] |
Definition at line 1136 of file address.h.
Referenced by protlib::AddressList::AddressList(), protlib::AddressList::bequeath(), protlib::AddressList::collect(), protlib::AddressList::collect_first(), protlib::AddressList::del_property(), protlib::AddressList::get_addrs(), protlib::AddressList::ignore(), protlib::AddressList::purge_host_prop(), and protlib::AddressList::purge_properties().
AddressList::AddrProperty * protlib::AddressList::ConfiguredAddr_P [static, inherited] |
AddressList::AddrProperty * protlib::AddressList::IgnoreAddr_P [static, private, inherited] |
Definition at line 1135 of file address.h.
Referenced by protlib::AddressList::addr_is(), protlib::AddressList::AddressList(), protlib::AddressList::getifaddrs_get_addrs(), protlib::AddressList::ignore(), and protlib::AddressList::unignore().
AddressList::AddrProperty * protlib::AddressList::LocalAddr_P [static, inherited] |
Definition at line 1130 of file address.h.
Referenced by protlib::AddressList::addr_is(), protlib::AddressList::AddressList(), protlib::AddressList::get_addrs(), and protlib::AddressList::get_first().