xorp

IfTreeAddr4 Class Reference

Class for holding an IPv4 interface address and address related items. More...

#include <iftree.hh>

Inheritance diagram for IfTreeAddr4:
IfTreeItem NONCOPYABLE

List of all members.

Public Member Functions

 IfTreeAddr4 (const IPv4 &addr)
const IPv4addr () const
bool enabled () const
bool broadcast () const
bool loopback () const
bool point_to_point () const
bool multicast () const
void set_enabled (bool en)
void set_broadcast (bool v)
void set_loopback (bool v)
void set_point_to_point (bool v)
void set_multicast (bool v)
uint32_t prefix_len () const
 Get prefix length associates with address.
int set_prefix_len (uint32_t prefix_len)
 Set prefix length associate with address.
IPv4 bcast () const
 Get the broadcast address.
void set_bcast (const IPv4 &baddr)
 Set the broadcast address.
IPv4 endpoint () const
 Get the endpoint address of a point-to-point link.
void set_endpoint (const IPv4 &oaddr)
 Set the endpoint address of a point-to-point link.
void copy_state (const IfTreeAddr4 &o)
 Copy state of internal variables from another IfTreeAddr4.
bool is_same_state (const IfTreeAddr4 &o)
 Test if the address-specific internal state is same.
void finalize_state ()
 Virtual method to be implemented to flush out state associated objects, ie if an object is marked CREATED or CHANGED it should be marked NO_CHANGE, if an object is marked DELETED, it should be removed from the relevant container and destructed.
string str () const

Private Attributes

IPv4 _addr
bool _enabled
bool _broadcast
bool _loopback
bool _point_to_point
bool _multicast
IPv4 _oaddr
uint32_t _prefix_len

Detailed Description

Class for holding an IPv4 interface address and address related items.


Member Function Documentation

IPv4 IfTreeAddr4::bcast ( ) const

Get the broadcast address.

Returns:
the broadcast address or IPv4::ZERO() if there is no broadcast address set.
IPv4 IfTreeAddr4::endpoint ( ) const

Get the endpoint address of a point-to-point link.

Returns:
the broadcast address or IPv4::ZERO() if there is no broadcast address set.
bool IfTreeAddr4::is_same_state ( const IfTreeAddr4 o) [inline]

Test if the address-specific internal state is same.

Parameters:
othe IfTreeAddr4 to compare against.
Returns:
true if the address-specific internal state is same.
void IfTreeAddr4::set_bcast ( const IPv4 baddr)

Set the broadcast address.

Parameters:
baddrthe broadcast address.
void IfTreeAddr4::set_endpoint ( const IPv4 oaddr)

Set the endpoint address of a point-to-point link.

Parameters:
oaddrthe endpoint address.
int IfTreeAddr4::set_prefix_len ( uint32_t  prefix_len)

Set prefix length associate with address.

Returns:
XORP_OK on success, otherwise XORP_ERROR.

The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations