xorp

RIBVarRW< A > Class Template Reference

Enables reading and writing variables to a RIB route. More...

#include <rib_varrw.hh>

Inheritance diagram for RIBVarRW< A >:
SingleVarRW NONCOPYABLE VarRW

List of all members.

Public Types

enum  {
  VAR_NETWORK4 = VAR_PROTOCOL, VAR_NEXTHOP4, VAR_NETWORK6, VAR_NEXTHOP6,
  VAR_METRIC
}

Public Member Functions

 RIBVarRW (IPRouteEntry< A > &route)
void start_read ()
 If any reads are performed, this is a marker which informs the derived class that reads will now start.
void single_write (const Id &id, const Element &e)
 Write a variable.
Elementsingle_read (const Id &id)
 Read of a variable.

Private Member Functions

void read_route_nexthop (IPRouteEntry< A > &r)
 Specialized template to read nexthop and ip address.
template<>
void read_route_nexthop (IPRouteEntry< IPv4 > &route)
template<>
void read_route_nexthop (IPRouteEntry< IPv6 > &route)

Private Attributes

IPRouteEntry< A > & _route
ElementFactory _ef

Detailed Description

template<class A>
class RIBVarRW< A >

Enables reading and writing variables to a RIB route.

This class is intended for connected routes only, and supports only policytags being altered.


Constructor & Destructor Documentation

template<class A >
RIBVarRW< A >::RIBVarRW ( IPRouteEntry< A > &  route)
Parameters:
routeroute to filter and possibly modify.

Member Function Documentation

template<class A >
void RIBVarRW< A >::read_route_nexthop ( IPRouteEntry< A > &  r) [private]

Specialized template to read nexthop and ip address.

If it is a v4 specialization, v6 addresses are set to null and vice-versa.

Parameters:
rroute from which to read addresses.
template<class A >
Element * RIBVarRW< A >::single_read ( const Id &  id) [virtual]

Read of a variable.

The VarRW needs to read a particular element. This may return NULL indicating ElemNull---i.e. variable not present in THIS route.

Returns:
variable requested.
Parameters:
idthe id of the variable.

Implements SingleVarRW.

template<class A >
void RIBVarRW< A >::single_write ( const Id &  id,
const Element e 
) [virtual]

Write a variable.

Parameters:
idvariablea to write.
evalue of variable.

Implements SingleVarRW.


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