Public Types | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Friends

ts::detail::Ip4Node Class Reference

Node for IPv4 map. More...

Inherits IpMap::Node, and ts::detail::Interval< in_addr_t, in_addr_t >.

Collaboration diagram for ts::detail::Ip4Node:
Collaboration graph
[legend]

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 >

Detailed Description

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.


Member Typedef Documentation

Self reference type.

Definition at line 975 of file IpMap.cc.


Constructor & Destructor Documentation

ts::detail::Ip4Node::Ip4Node ( ArgType  min,
ArgType  max,
void *  data 
) [inline]

Construct with values.

Parameters:
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().


Member Function Documentation

static ArgType ts::detail::Ip4Node::argue ( Metric const &  metric  )  [inline, static, protected]
Returns:
The argument type for the metric.

Definition at line 1076 of file IpMap.cc.

static void ts::detail::Ip4Node::dec ( Metric &  m  )  [inline, static, protected]

Decrement a metric.

Parameters:
m Decremented in place.

Definition at line 1062 of file IpMap.cc.

self& ts::detail::Ip4Node::decrementMax (  )  [inline, protected]

Decremement the maximum value in place.

Returns:
This object.

Definition at line 1042 of file IpMap.cc.

References _max, and setMax().

static Metric ts::detail::Ip4Node::deref ( ArgType  addr  )  [inline, static, protected]
Returns:
Dereferenced addr.
Parameters:
addr Argument to dereference.

Definition at line 1069 of file IpMap.cc.

static void ts::detail::Ip4Node::inc ( Metric &  m  )  [inline, static, protected]

Increment a metric.

Parameters:
m Incremented in place.

Definition at line 1055 of file IpMap.cc.

self& ts::detail::Ip4Node::incrementMin (  )  [inline, protected]

Increment the minimum value in place.

Returns:
This object.

Definition at line 1049 of file IpMap.cc.

References _min, and setMin().

virtual sockaddr const* ts::detail::Ip4Node::max (  )  const [inline, virtual]
Returns:
The maximum value of the interval.

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]
Returns:
The minimum value of the interval.

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.

Parameters:
data Client data.

Definition at line 995 of file IpMap.cc.

References IpMap::Node::_data.

self& ts::detail::Ip4Node::setMax ( ArgType  max  )  [inline, protected]

Set the maximum value of the interval.

Returns:
This interval.
Parameters:
max Maximum value (host order).

Definition at line 1015 of file IpMap.cc.

References _max, and _sa.

Referenced by decrementMax(), and setMaxMinusOne().

self& ts::detail::Ip4Node::setMaxMinusOne ( ArgType  max  )  [inline, protected]

Set the maximum value to one less than max.

Returns:
This object.
Parameters:
max One more than maximum value.

Definition at line 1026 of file IpMap.cc.

References setMax().

self& ts::detail::Ip4Node::setMin ( ArgType  min  )  [inline, protected]

Set the minimum value of the interval.

Returns:
This interval.
Parameters:
min Minimum value (host order).

Definition at line 1005 of file IpMap.cc.

References _min, and _sa.

Referenced by incrementMin(), and setMinPlusOne().

self& ts::detail::Ip4Node::setMinPlusOne ( ArgType  min  )  [inline, protected]

Set the minimum value to one more than min.

Returns:
This object.
Parameters:
min One less than minimum value.

Definition at line 1034 of file IpMap.cc.

References setMin().


Friends And Related Function Documentation

friend struct IpMapBase< Ip4Node > [friend]

Definition at line 973 of file IpMap.cc.


Field Documentation

Maximum value in span.

Reimplemented from ts::detail::Interval< T, A >.

Definition at line 1084 of file IpMap.cc.

Referenced by decrementMax(), and setMax().

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]

Addresses in API compliant form.

Referenced by Ip4Node(), max(), min(), setMax(), and setMin().


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