Node for IPv4 map. More...
Inherits IpMap::Node, and ts::detail::Interval< in_addr_t, in_addr_t >.
Public Types | |
typedef Ip4Node | self |
Self reference type. | |
Public Member Functions | |
Ip4Node (ArgType min, ArgType max, void *data) | |
Construct with values. | |
virtual sockaddr const * | min () const |
virtual sockaddr const * | max () const |
self & | setData (void *data) |
Set the client data. | |
Protected Member Functions | |
self & | setMin (ArgType min) |
Set the minimum value of the interval. | |
self & | setMax (ArgType max) |
Set the maximum value of the interval. | |
self & | setMaxMinusOne (ArgType max) |
Set the maximum value to one less than max. | |
self & | setMinPlusOne (ArgType min) |
Set the minimum value to one more than min. | |
self & | decrementMax () |
Decremement the maximum value in place. | |
self & | incrementMin () |
Increment the minimum value in place. | |
Static Protected Member Functions | |
static void | inc (Metric &m) |
Increment a metric. | |
static void | dec (Metric &m) |
Decrement a metric. | |
static Metric | deref (ArgType addr) |
static ArgType | argue (Metric const &metric) |
Protected Attributes | |
struct { | |
sockaddr_in _min | |
sockaddr_in _max | |
} | _sa |
Addresses in API compliant form. | |
Friends | |
struct | IpMapBase< Ip4Node > |
Node for IPv4 map.
We store the address in host order in the _min and _max members for performance. We store copies in the _sa member for API compliance (which requires sockaddr*
access).
Definition at line 972 of file IpMap.cc.
typedef Ip4Node ts::detail::Ip4Node::self |
Construct with values.
min | Minimum address (host order). | |
max | Maximum address (host order). | |
data | Client data. |
Definition at line 978 of file IpMap.cc.
References _sa, ats_ip4_set(), and ats_ip_sa_cast().
static void ts::detail::Ip4Node::dec | ( | Metric & | m | ) | [inline, static, protected] |
self& ts::detail::Ip4Node::decrementMax | ( | ) | [inline, protected] |
static void ts::detail::Ip4Node::inc | ( | Metric & | m | ) | [inline, static, protected] |
self& ts::detail::Ip4Node::incrementMin | ( | ) | [inline, protected] |
virtual sockaddr const* ts::detail::Ip4Node::max | ( | ) | const [inline, virtual] |
Definition at line 991 of file IpMap.cc.
References _sa, and ats_ip_sa_cast().
virtual sockaddr const* ts::detail::Ip4Node::min | ( | ) | const [inline, virtual] |
Definition at line 987 of file IpMap.cc.
References _sa, and ats_ip_sa_cast().
self& ts::detail::Ip4Node::setData | ( | void * | data | ) | [inline] |
Set the client data.
data | Client data. |
Definition at line 995 of file IpMap.cc.
References IpMap::Node::_data.
Set the maximum value of the interval.
max | Maximum value (host order). |
Definition at line 1015 of file IpMap.cc.
Referenced by decrementMax(), and setMaxMinusOne().
Set the minimum value of the interval.
min | Minimum value (host order). |
Definition at line 1005 of file IpMap.cc.
Referenced by incrementMin(), and setMinPlusOne().
sockaddr_in ts::detail::Ip4Node::_max |
Maximum value in span.
Reimplemented from ts::detail::Interval< T, A >.
Definition at line 1084 of file IpMap.cc.
Referenced by decrementMax(), and setMax().
sockaddr_in ts::detail::Ip4Node::_min |
Minimum value in span.
Reimplemented from ts::detail::Interval< T, A >.
Definition at line 1083 of file IpMap.cc.
Referenced by incrementMin(), and setMin().
struct { ... } ts::detail::Ip4Node::_sa [protected] |