xorp

NextHop Class Reference

Generic class for next-hop information. More...

#include <nexthop.hh>

Inheritance diagram for NextHop:
DiscardNextHop IPNextHop< A > UnreachableNextHop IPEncapsNextHop< A > IPExternalNextHop< A > IPPeerNextHop< A >

List of all members.

Public Member Functions

 NextHop ()
 Default constructor.
virtual ~NextHop ()
 Destructor.
virtual int type ()=0
 Get the nexthop type.
virtual string str () const =0
 Convert this nexthop from binary form to presentation format.

Detailed Description

Generic class for next-hop information.

NextHop is the generic class for holding information about routing next hops. NextHops can be of many types, including immediate neighbors, remote routers (with IBGP), discard or unreachable interfaces encapsulation endpoints, etc. NextHop itself doesn't really do anything useful, except to provide a generic handle for the specialized subclasses.


Member Function Documentation

virtual string NextHop::str ( ) const [pure virtual]

Convert this nexthop from binary form to presentation format.

Returns:
C++ string with the human-readable ASCII representation of the nexthop.

Implemented in IPPeerNextHop< A >, IPEncapsNextHop< A >, IPExternalNextHop< A >, DiscardNextHop, and UnreachableNextHop.

virtual int NextHop::type ( ) [pure virtual]

Get the nexthop type.

Returns:
the type of the nexthop. One of:
   GENERIC_NEXTHOP	0
   PEER_NEXTHOP		1
   ENCAPS_NEXTHOP	2
   EXTERNAL_NEXTHOP	3
   DISCARD_NEXTHOP	4
   UNREACHABLE_NEXTHOP	5

Implemented in IPPeerNextHop< A >, IPEncapsNextHop< A >, IPExternalNextHop< A >, DiscardNextHop, and UnreachableNextHop.


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