xorp

ProtoUnit Class Reference

Base class for each protocol unit (node, vif, etc). More...

#include <proto_unit.hh>

Inheritance diagram for ProtoUnit:
ProtoState ServiceBase BugCatcher MfeaMrouter MfeaVif Mld6igmpVif Mld6igmpVif PimBsr PimVif ProtoNode< V > ProtoNode< MfeaVif > ProtoNode< Mld6igmpVif > ProtoNode< PimVif > ProtoNode< Vif > ProtoNodeCli RpTable

List of all members.

Public Member Functions

 ProtoUnit (int init_family, xorp_module_id init_module_id)
 Constructor for a given address family and module ID.
virtual ~ProtoUnit ()
 Destructor.
int family () const
 Get the address family.
xorp_module_id module_id () const
 Get the module ID.
int proto_version () const
 Get the current protocol version.
void set_proto_version (int v)
 Set the current protocol version.
int proto_version_default () const
 Get the default protocol version.
void set_proto_version_default (int v)
 Set the default protocol version.
bool is_ipv4 () const
 Test if the address family of the unit is IPv4.
bool is_ipv6 () const
 Test if the address family of the unit is IPv6.
const char * module_name () const
 Get the module name.
int comm_handler () const
 Get the communication handler for this unit.
void set_comm_handler (int v)
 Set the communication handler for this unit.
bool proto_is_mld6igmp () const
 Test if the protocol is MLD6 or IGMP.
bool proto_is_igmp () const
 Test if the protocol is IGMP.
bool proto_is_mld6 () const
 Test if the protocol is MLD6.
bool proto_is_pimsm () const
 Test if the protocol is PIM-SM.
bool proto_is_pimdm () const
 Test if the protocol is PIM-DM.
bool proto_is_bgmp () const
 Test if the protocol is BGMP.
bool proto_is_bgp () const
 Test if the protocol is BGP.
bool proto_is_ospf () const
 Test if the protocol is OSPF.
bool proto_is_rip () const
 Test if the protocol is RIP.
bool proto_is_static_routes () const
 Test if the protocol is StaticRoutes.
bool proto_is_fib2mrib () const
 Test if the protocol is Fib2mrib.

Private Attributes

int _family
xorp_module_id _module_id
int _comm_handler
int _proto_version
int _proto_version_default
string _module_name

Detailed Description

Base class for each protocol unit (node, vif, etc).


Constructor & Destructor Documentation

ProtoUnit::ProtoUnit ( int  init_family,
xorp_module_id  init_module_id 
)

Constructor for a given address family and module ID.

ProtoUnit::ProtoUnit: : The address family (AF_INET or AF_INET6 for IPv4 and IPv6 respectively).

Parameters:
init_familythe address family.
init_module_idthe module ID (xorp_module_id).

: The module ID (XORP_MODULE_*).

Proto unit constructor.


Member Function Documentation

int ProtoUnit::comm_handler ( ) const [inline]

Get the communication handler for this unit.

Note: currently, the purpose of the communication handler is undefined.

Returns:
the communication handler for this unit.
int ProtoUnit::family ( ) const [inline]

Get the address family.

Returns:
the address family (e.g., AF_INET or AF_INET6 for IPv4 and IPv6 respectively).

Reimplemented in XrlMld6igmpNode, XrlMfeaNode, XrlMld6igmpNode, and XrlPimNode.

bool ProtoUnit::is_ipv4 ( ) const [inline]

Test if the address family of the unit is IPv4.

Returns:
true if the address family of the unit is IPv4.
bool ProtoUnit::is_ipv6 ( ) const [inline]

Test if the address family of the unit is IPv6.

Returns:
true if the address family of the unit is IPv6.
xorp_module_id ProtoUnit::module_id ( ) const [inline]

Get the module ID.

Returns:
the module ID (xorp_module_id).
const char* ProtoUnit::module_name ( ) const [inline]

Get the module name.

TODO: temporary, all names are listed in "_xorp_module_name[][]" in proto_unit.cc.

Returns:
C-style string with the module name.
bool ProtoUnit::proto_is_bgmp ( ) const [inline]

Test if the protocol is BGMP.

Returns:
true if the protocol is BGMP.
bool ProtoUnit::proto_is_bgp ( ) const [inline]

Test if the protocol is BGP.

Returns:
true if the protocol is BGP.
bool ProtoUnit::proto_is_fib2mrib ( ) const [inline]

Test if the protocol is Fib2mrib.

Returns:
true if the protocol is Fib2mrib
bool ProtoUnit::proto_is_igmp ( ) const [inline]

Test if the protocol is IGMP.

Returns:
true if the protocol is IGMP.
bool ProtoUnit::proto_is_mld6 ( ) const [inline]

Test if the protocol is MLD6.

Returns:
true if the protocol is MLD6.
bool ProtoUnit::proto_is_mld6igmp ( ) const [inline]

Test if the protocol is MLD6 or IGMP.

Returns:
true if the protocol is MLD6 or IGMP.
bool ProtoUnit::proto_is_ospf ( ) const [inline]

Test if the protocol is OSPF.

Returns:
true if the protocol is OSPF.
bool ProtoUnit::proto_is_pimdm ( ) const [inline]

Test if the protocol is PIM-DM.

Returns:
true if the protocol is PIM-DM.
bool ProtoUnit::proto_is_pimsm ( ) const [inline]

Test if the protocol is PIM-SM.

Returns:
true if the protocol is PIM-SM.
bool ProtoUnit::proto_is_rip ( ) const [inline]

Test if the protocol is RIP.

Returns:
true if the protocol is RIP.
bool ProtoUnit::proto_is_static_routes ( ) const [inline]

Test if the protocol is StaticRoutes.

Returns:
true if the protocol is StaticRoutes
int ProtoUnit::proto_version ( ) const [inline]

Get the current protocol version.

Returns:
the current protocol version.
int ProtoUnit::proto_version_default ( ) const [inline]

Get the default protocol version.

Returns:
the default protocol version.
void ProtoUnit::set_comm_handler ( int  v) [inline]

Set the communication handler for this unit.

Parameters:
vthe communication handler to set for this unit.
void ProtoUnit::set_proto_version ( int  v) [inline]

Set the current protocol version.

Parameters:
vthe protocol version.

Reimplemented in Mld6igmpVif, Mld6igmpVif, and PimVif.

void ProtoUnit::set_proto_version_default ( int  v) [inline]

Set the default protocol version.

Parameters:
vthe default protocol version.

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