class BGPVarRW
|
Allows reading an modifying a BGP route.
More... |
|
|
Public Types
- enum { VAR_NETWORK4 = VAR_PROTOCOL,
VAR_NEXTHOP4,
VAR_NETWORK6,
VAR_NEXTHOP6,
VAR_ASPATH,
VAR_ORIGIN,
VAR_NEIGHBOR,
VAR_LOCALPREF,
VAR_COMMUNITY,
VAR_MED,
VAR_MED_REMOVE,
VAR_AGGREGATE_PREFIX_LEN,
VAR_AGGREGATE_BRIEF_MODE,
VAR_WAS_AGGREGATED,
VAR_BGPMAX
}
Public Methods
Public Members
Protected Members
If the route is modified, the user is responsible for retrieving the
filtered message and deleting it.
enum { VAR_NETWORK4 = VAR_PROTOCOL,
VAR_NEXTHOP4,
VAR_NETWORK6,
VAR_NEXTHOP6,
VAR_ASPATH,
VAR_ORIGIN,
VAR_NEIGHBOR,
VAR_LOCALPREF,
VAR_COMMUNITY,
VAR_MED,
VAR_MED_REMOVE,
VAR_AGGREGATE_PREFIX_LEN,
VAR_AGGREGATE_BRIEF_MODE,
VAR_WAS_AGGREGATED,
VAR_BGPMAX
}
|
|
typedef Element* (*BGPVarRW::ReadCallback) ()
| (*BGPVarRW::ReadCallback) |
typedef void (*BGPVarRW::WriteCallback) (const Element& e)
| (*BGPVarRW::WriteCallback) |
BGPVarRW (const string& name)
| BGPVarRW |
This varrw allows for routes to remain untouched even though they are
filtered. This is useful in order to check if a route will be accepted
or rejected, without caring about its modifications.
Parameters:
name | the name of the filter to print in case of tracing.
|
[virtual]
void attach_route (const InternalMessage<A>& rtmsg, bool no_modify)
| attach_route |
Attach a route to the varrw.
Parameters:
rtmsg | the message to filter and possibly modify.
|
no_modify | if true, the route will not be modified.
|
Caller owns the message [responsible for delete].
Calling multiple times will always return the same message, not a copy.
Returns: the modified message. Null if no changes were made.
Element* single_read (const Id& id)
| single_read |
Reimplemented from SingleVarRW.
void single_write (const Id& id, const Element& e)
| single_write |
Reimplemented from SingleVarRW.
void end_write ()
| end_write |
Reimplemented from SingleVarRW.
bool modified ()
| modified |
If a route is modified, the caller may obtain it via the filtered_message
call.
Returns: true if route was modified. False otherwise.
string more_tracelog ()
| more_tracelog |
[virtual]
Output basic BGP specific information.
Returns: BGP trace based on verbosity level returned from trace().
Element* read_neighbor ()
| read_neighbor |
[virtual]
Reads the neighbor variable. This is different on input/output branch.
Returns: the neighbor variable.
Element* read_policytags ()
| read_policytags |
Element* read_filter_im ()
| read_filter_im |
Element* read_filter_sm ()
| read_filter_sm |
Element* read_filter_ex ()
| read_filter_ex |
Element* read_network4 ()
| read_network4 |
Element* read_network6 ()
| read_network6 |
Element* read_nexthop4 ()
| read_nexthop4 |
Element* read_nexthop6 ()
| read_nexthop6 |
Element* read_aspath ()
| read_aspath |
Element* read_origin ()
| read_origin |
Element* read_localpref ()
| read_localpref |
Element* read_community ()
| read_community |
Element* read_med ()
| read_med |
Element* read_med_remove ()
| read_med_remove |
Element* read_aggregate_prefix_len ()
| read_aggregate_prefix_len |
Element* read_aggregate_brief_mode ()
| read_aggregate_brief_mode |
Element* read_was_aggregated ()
| read_was_aggregated |
void write_filter_im (const Element& e)
| write_filter_im |
void write_filter_sm (const Element& e)
| write_filter_sm |
void write_filter_ex (const Element& e)
| write_filter_ex |
void write_policytags (const Element& e)
| write_policytags |
void write_nexthop4 (const Element& e)
| write_nexthop4 |
void write_nexthop6 (const Element& e)
| write_nexthop6 |
void write_aspath (const Element& e)
| write_aspath |
void write_origin (const Element& e)
| write_origin |
void write_aggregate_prefix_len (const Element& e)
| write_aggregate_prefix_len |
void write_aggregate_brief_mode (const Element& e)
| write_aggregate_brief_mode |
void write_was_aggregated (const Element& e)
| write_was_aggregated |
void write_localpref (const Element& e)
| write_localpref |
void write_community (const Element& e)
| write_community |
void write_med (const Element& e)
| write_med |
void write_med_remove (const Element& e)
| write_med_remove |
[protected]
[protected]
Generated by: pavlin on possum.icir.org on Wed Aug 2 15:36:33 2006, using kdoc $.