|
xorp
|
Enables reading and writing variables to a RIB route. More...
#include <rib_varrw.hh>
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. | |
| Element * | single_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 |
Enables reading and writing variables to a RIB route.
This class is intended for connected routes only, and supports only policytags being altered.
| RIBVarRW< A >::RIBVarRW | ( | IPRouteEntry< A > & | route | ) |
| route | route to filter and possibly modify. |
| 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.
| r | route from which to read addresses. |
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.
Implements SingleVarRW.