Public Types |
| enum | PathType { intra_area = 1,
inter_area = 2,
type1 = 3,
type2 = 4
} |
| | The ordering is important used to select the best route.
|
|
typedef A | Addr |
|
typedef IPNet< A > | Net |
|
typedef RouteEntryOrigin< A > | Origin |
Public Member Functions |
|
OlsrTypes::VertexType | destination_type () const |
| void | set_destination_type (const OlsrTypes::VertexType vt) |
| | Set the type of the destination in this route entry.
|
| bool | direct () const |
| void | set_direct (bool is_direct) |
| | Set if the destination is directly connected.
|
| IPv4 | nexthop () const |
| void | set_nexthop (const IPv4 &nexthop) |
| | Set protocol address of next hop.
|
| OlsrTypes::FaceID | faceid () |
| void | set_faceid (const OlsrTypes::FaceID faceid) |
| | Set the ID of the interface used to reach the destination.
|
| uint32_t | cost () const |
| void | set_cost (const uint32_t cost) |
| | Set OLSR protocol cost of route.
|
| IPv4 | originator () const |
| void | set_originator (const IPv4 &originator) |
| | Set the originator of this route.
|
| IPv4 | main_address () const |
| void | set_main_address (const IPv4 &main_addr) |
| | Set the main address of the destination.
|
| bool | filtered () const |
| void | set_filtered (const bool was_filtered) |
| | Set if this route has been filtered by policy filters.
|
| string | str () |
|
void | set_destination_type (OspfTypes::VertexType destination_type) |
|
OspfTypes::VertexType | get_destination_type () const |
|
void | set_discard (bool discard) |
|
bool | get_discard () const |
|
void | set_directly_connected (bool direct) |
|
bool | get_directly_connected () const |
|
void | set_address (uint32_t address) |
|
uint32_t | get_address () const |
|
void | set_router_id (OspfTypes::RouterID id) |
|
OspfTypes::RouterID | get_router_id () const |
|
void | set_area_border_router (bool area_border_router) |
|
bool | get_area_border_router () const |
|
void | set_as_boundary_router (bool as_boundary_router) |
|
bool | get_as_boundary_router () const |
|
void | set_area (OspfTypes::AreaID area) |
|
OspfTypes::AreaID | get_area () const |
|
void | set_path_type (PathType path_type) |
|
PathType | get_path_type () const |
|
void | set_cost (uint32_t cost) |
|
uint32_t | get_cost () const |
|
void | set_type_2_cost (uint32_t type_2_cost) |
|
uint32_t | get_type_2_cost () const |
|
void | set_nexthop (A nexthop) |
|
A | get_nexthop () const |
|
void | set_nexthop_id (uint32_t nexthop_id) |
|
uint32_t | get_nexthop_id () |
|
void | set_advertising_router (uint32_t advertising_router) |
|
uint32_t | get_advertising_router () const |
|
void | set_lsa (Lsa::LsaRef lsar) |
|
Lsa::LsaRef | get_lsa () const |
|
void | set_filtered (bool filtered) |
|
bool | get_filtered () const |
|
string | str () |
| | RouteEntry (RibVif *vif, NextHop *nexthop, const Protocol &protocol, uint32_t metric) |
| | Constructor for a route entry.
|
|
virtual | ~RouteEntry () |
| | Destructor.
|
| RibVif * | vif () const |
| | Get the VIF.
|
| NextHop * | nexthop () const |
| | Get the NextHop router.
|
| void | set_nexthop (NextHop *v) |
| | Set the NextHop router.
|
| uint16_t | admin_distance () const |
| | Get the Administrative Distance.
|
| void | set_admin_distance (uint16_t ad) |
| | Set the Administrative Distance.
|
| const Protocol & | protocol () const |
| | Get the routing protocol.
|
|
virtual string | str () const =0 |
| | Display the route for debugging purposes.
|
| void | set_metric (uint32_t metric) |
| | Set the routing protocol metric on this route.
|
| uint32_t | metric () const |
| | Get the routing protocol metric.
|
| | RouteEntry (const Net &n, const Addr &nh, const string &ifname, const string &vifname, uint16_t cost, Origin *&o, uint16_t tag) |
| | Constructor.
|
|
| RouteEntry (const Net &n, const Addr &nh, const string &ifname, const string &vifname, uint16_t cost, Origin *&o, uint16_t tag, const PolicyTags &policytags) |
| | ~RouteEntry () |
| | Destructor.
|
|
const IPNet< A > & | net () const |
| | Get network.
|
| bool | set_nexthop (const A &nh) |
| | Set next hop.
|
| const A & | nexthop () const |
| | Get next hop.
|
| const string & | ifname () const |
| | Get the outgoing interface name.
|
| bool | set_ifname (const string &ifname) |
| | Set the outgoing interface name.
|
| const string & | vifname () const |
| | Get the outgoing vif name.
|
| bool | set_vifname (const string &vifname) |
| | Set the outgoing vif name.
|
| bool | set_cost (uint16_t cost) |
| | Set the cost metric.
|
| uint16_t | cost () const |
| | Get the cost metric.
|
| bool | set_origin (Origin *origin) |
| | Set the origin.
|
| const Origin * | origin () const |
| | Get the origin.
|
| Origin * | origin () |
| | Get the origin.
|
| bool | set_tag (uint16_t tag) |
| | Set the tag value.
|
| uint16_t | tag () const |
| | Get the tag.
|
|
void | set_timer (const XorpTimer &t) |
| | Set a Timer Event associated with this route.
|
|
const XorpTimer & | timer () const |
| | Get Timer associated with route.
|
| const PolicyTags & | policytags () const |
|
PolicyTags & | policytags () |
| bool | set_policytags (const PolicyTags &tags) |
| | Replace policy-tags of route.
|
| bool | filtered () const |
| void | set_filtered (bool v) |
| | Set if route is accepted or rejected.
|
Protected Member Functions |
|
void | dissociate () |
|
void | associate (Origin *o) |
Protected Attributes |
|
RibVif * | _vif |
|
NextHop * | _nexthop |
|
const Protocol & | _protocol |
|
uint16_t | _admin_distance |
|
uint32_t | _metric |
|
Net | _net |
|
Addr | _nh |
|
string | _ifname |
|
string | _vifname |
|
uint16_t | _cost |
|
Origin * | _origin |
|
uint16_t | _tag |
|
uint16_t | _ref_cnt |
|
XorpTimer | _timer |
|
PolicyTags | _policytags |
Private Member Functions |
|
void | ref () |
|
uint16_t | unref () |
|
uint16_t | ref_cnt () const |
Private Attributes |
|
OlsrTypes::VertexType | _destination_type |
|
bool | _direct |
|
IPv4 | _nexthop |
|
OlsrTypes::FaceID | _faceid |
|
uint32_t | _cost |
|
IPv4 | _originator |
|
IPv4 | _main_address |
|
bool | _filtered |
|
OspfTypes::VertexType | _destination_type |
|
bool | _discard |
|
uint32_t | _address |
|
OspfTypes::RouterID | _id |
|
bool | _area_border_router |
|
bool | _as_boundary_router |
|
OspfTypes::AreaID | _area |
|
PathType | _path_type |
|
uint32_t | _type_2_cost |
|
A | _nexthop |
|
uint32_t | _nexthop_id |
|
uint32_t | _advertising_router |
|
Lsa::LsaRef | _lsar |
Friends |
|
class | RouteEntryRef< A > |
template<typename A>
class RouteEntry< A >
An OLSR internal route entry.
RIP Route Entry Class.
Base class for RIB routing table entries.
External view of a routing entry.
OLSRv1, unlike OSPF, does not implement areas, therefore there is no need in the current design to have logical separation between the routes which it processes internally and those which it exports to the RIB.
It also has no concept of network LSAs [HNA routes are not used in calculating reachability in the OLSR topology] therefore the address property is not present here, nor is the 'discard' flag, nor is the path type.
TODO: Import this definition into UML. TODO: Templatize to hold IPv6.
This is the base class from which RIB routing table entries are derived. It's not useful by itself.
This class is used for storing RIPv2 and RIPng route entries. It is a template class taking an address family type as a template argument. Only IPv4 and IPv6 types may be supplied.