class OriginTable

RouteTable that receives and stores raw routes sent by routing protocols. More...

 
LOGO
 Annotated List  Files  Globals  Hierarchy  Index  Top

Public Types

Public Methods


Detailed Description

OriginTable is a RouteTable that accepts route_add requests from a single routing protocol, stores the route, and propagates it downstream. It also answers lookup_route and lookup_route_range requests from downstream using the routes it has stored.

Its template class, A, must be either the IPv4 class of the IPv6 class.

typedef Trie<A, const IPRouteEntry<A>*> RouteContainer

RouteContainer

 OriginTable (const string& tablename, uint32_t admin_distance, ProtocolType protocol_type, EventLoop& eventloop)

OriginTable

OriginTable constructor.

Parameters:

tablenametypically the name of the routing protocol that supplies routes to this origin table, or "connected" for the OriginTable that holds directly connected routes, or "static" for the OriginTable that holds locally configured static routes.
admin_distancethe default administrative distance for routes in this table.
protocol_typethe routing protocol type (ProtocolType).
eventloopthe main event loop.
 ~OriginTable ()

~OriginTable

OriginTable destructor.

int  add_route (const IPRouteEntry<A>& route)

add_route

Add a route to the OriginTable. The route must not already be in the OriginTable.

Parameters:

routethe route entry to be added.

Returns: XORP_OK on success, otherwise XORP_ERROR.

Reimplemented from RouteTable.

int  add_route (const IPRouteEntry<A>&, RouteTable<A>* )

add_route

Generic RouteTable method that is not used on OriginTable.

Returns: XORP_OK on success, otherwise XORP_ERROR.

Reimplemented from RouteTable.

int  delete_route (const IPNet<A>& net)

delete_route

Delete a route from the OriginTable.

Parameters:

netthe subnet of the route entry to be deleted.

Returns: XORP_OK on success, otherwise XORP_ERROR.

Reimplemented from RouteTable.

int  delete_route (const IPRouteEntry<A>* , RouteTable<A>* )

delete_route

Generic RouteTable method that is not used on OriginTable.

Returns: XORP_OK on success, otherwise XORP_ERROR.

Reimplemented from RouteTable.

void  delete_all_routes ()

delete_all_routes

Delete all the routes that are in this OriginTable. The deletion is not propagated downstream, so this is only useful when shutting down the RIB.

void  routing_protocol_shutdown ()

routing_protocol_shutdown

Delete all the routes that are in this OriginTable, and propagate the deletions downstream.

const IPRouteEntry<A>*  lookup_route (const IPNet<A>& net)

lookup_route

[const]

Lookup a specific subnet to see if it is in this OriginTable.

Parameters:

netthe subnet to look up.

Returns: a pointer to the route entry if it exists, NULL otherwise.

Reimplemented from RouteTable.

const IPRouteEntry<A>*  lookup_route (const A& addr)

lookup_route

[const]

Lookup an IP address to get the most specific (longest prefix length) route in the OriginTable that matches this address.

Parameters:

addrthe IP address to look up.

Returns: a pointer to the most specific route entry if any entry matches, NULL otherwise.

Reimplemented from RouteTable.

RouteRange<A>*  lookup_route_range (const A& addr)

lookup_route_range

[const]

Lookup an IP addressto get the most specific (longest prefix length) route in the OriginTable that matches this address, along with the RouteRange information for this address and route.

Parameters:

addrthe IP address to look up.

Returns: a pointer to a RouteRange class instance containing the relevant answer. It is up to the recipient of this pointer to free the associated memory.

See also: RouteRange

Reimplemented from RouteTable.

uint32_t  admin_distance ()

admin_distance

[const]

Returns: the default administrative distance for this OriginTable

int  protocol_type ()

protocol_type

[const]

Returns: the routing protocol type (ProtocolType).

TableType  type ()

type

[const]

Returns: the table type (TableType).

Reimplemented from RouteTable.

void  replumb (RouteTable<A>* , RouteTable<A>* )

replumb

Generic RouteTable method that is not used on OriginTable.

Reimplemented from RouteTable.

string  str ()

str

[const]

Render the OriginTable as a string for debugging purposes

Reimplemented from RouteTable.

inline uint32_t  generation ()

generation

[const]

Get the number of times routing protocol has been shutdown and restarted.

inline uint32_t  route_count ()

route_count

[const]

Get the number of routes held internally.

inline const RouteContainer&  route_container ()

route_container

[const]

Get the trie.


Generated by: pavlin on possum.icir.org on Wed Apr 13 21:53:20 2005, using kdoc $.