|
xorp
|
Enables reading and writing variables of RIP routes. More...
#include <rip_varrw.hh>
Public Types | |
| enum | { VAR_NETWORK4 = VAR_PROTOCOL, VAR_NEXTHOP4, VAR_NETWORK6, VAR_NEXTHOP6, VAR_METRIC } |
Public Member Functions | |
| RIPVarRW (RouteEntry< A > &route) | |
| void | start_read () |
| If any reads are performed, this is a marker which informs the derived class that reads will now start. | |
| Element * | single_read (const Id &id) |
| Read of a variable. | |
| void | single_write (const Id &id, const Element &e) |
| Write of a variable. | |
Private Member Functions | |
| void | read_route_nexthop (RouteEntry< A > &route) |
| bool | write_nexthop (const Id &id, const Element &e) |
| Specialized template method to write correct nexthop value based on address family of route. | |
Private Attributes | |
| RouteEntry< A > & | _route |
Enables reading and writing variables of RIP routes.
| RIPVarRW< A >::RIPVarRW | ( | RouteEntry< A > & | route | ) |
| route | route to read/write values from. |
| void RIPVarRW< A >::read_route_nexthop | ( | RouteEntry< A > & | route | ) | [private] |
| route | route to read nexthop and network from. |
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.
Write of a variable.
The write MUST be performed now, as the element pointer may become invalid after this call. Also, a single write will be called for each modified element.
| id | identifier of variable to be written to. |
| e | value of variable. |
Implements SingleVarRW.
Specialized template method to write correct nexthop value based on address family of route.
| id | variable to write. |
| e | value of variable. |