|
xorp
|
A vertex in the shortest path tree. More...
#include <vertex.hh>
Public Member Functions | |
| Vertex () | |
| Default constructor for Vertex. | |
| Vertex (const Neighbor &n) | |
| Explicit constructor to: Create a Vertex from a Neighbor. | |
| Vertex (const TwoHopNeighbor &n2) | |
| Explicit constructor to: Create a Vertex from a TwoHopNeighbor. | |
| Vertex (const IPv4 &main_addr) | |
| Explicit constructor to: Create a Vertex from a protocol address. | |
| Vertex (const TopologyEntry &tc) | |
| Explicit constructor to: Create a Vertex from a topology control tuple. | |
| bool | operator< (const Vertex &other) const |
| Compare two Vertex instances for less-than ordering. | |
| bool | operator== (const Vertex &other) const |
| Compare two Vertex instances for equality. | |
| void | set_main_addr (const IPv4 &main_addr) |
| IPv4 | main_addr () const |
| void | set_nodeid (uint32_t nid) |
| uint32_t | nodeid () const |
| void | set_is_origin (bool v) |
| bool | is_origin () const |
| void | set_producer (const IPv4 &producer) |
| IPv4 | producer () const |
| void | set_faceid (const OlsrTypes::FaceID fid) |
| OlsrTypes::FaceID | faceid () const |
| const LogicalLink * | link () const |
| void | set_link (const LogicalLink *l) |
| const TwoHopLink * | twohop_link () const |
| void | set_twohop_link (const TwoHopLink *l2) |
| void | set_type (const OlsrTypes::VertexType t) |
| OlsrTypes::VertexType | type () const |
| string | str () const |
| bool | operator< (const Vertex &other) const |
| bool | operator== (const Vertex &other) const |
| void | set_version (OspfTypes::Version v) |
| OspfTypes::Version | get_version () const |
| void | set_type (OspfTypes::VertexType t) |
| OspfTypes::VertexType | get_type () const |
| void | set_nodeid (uint32_t nodeid) |
| uint32_t | get_nodeid () const |
| void | set_lsa (Lsa::LsaRef lsar) |
| OSPFv2 only. | |
| Lsa::LsaRef | get_lsa () const |
| OSPFv2 only. | |
| list< Lsa::LsaRef > & | get_lsas () |
| OSPFv3 only. | |
| void | set_interface_id (uint32_t interface_id) |
| uint32_t | get_interface_id () const |
| void | set_origin (bool origin) |
| bool | get_origin () const |
| void | set_address (IPv4 address) |
| IPv4 | get_address_ipv4 () const |
| void | set_address (IPv6 address) |
| IPv6 | get_address_ipv6 () const |
| void | set_nexthop_id (uint32_t nexthop_id) |
| uint32_t | get_nexthop_id () const |
| string | str () const |
Private Attributes | |
| bool | _is_origin |
| true if this Vertex represents this OLSR router. | |
| OlsrTypes::VertexType | _t |
| The type of node in the OLSR link state databases from which this Vertex is derived. | |
| uint32_t | _nodeid |
| ID of the Neighbor, TwoHopNeighbor or TopologyEntry responsible for the creation of this vertex. | |
| IPv4 | _main_addr |
| The main protocol address of the OLSR node is used as the unique node identifier in the shortest-path tree. | |
| IPv4 | _producer |
| The main protocol address of the OLSR node from where this vertex was learned. | |
| OlsrTypes::FaceID | _faceid |
| If the OLSR node which this vertex represents is directly connected to the origin, this is the FaceID which should be used to reach the next hop. | |
| const LogicalLink * | _link |
| If this is a one-hop neighbor vertex, this is the link which was chosen to reach the neighbor. | |
| const TwoHopLink * | _twohop_link |
| If this is a two-hop neighbor vertex, this is the link which was chosen to reach it. | |
| OspfTypes::Version | _version |
| OspfTypes::VertexType | _t |
| uint32_t | _interface_id |
| bool | _origin |
| IPv4 | _address_ipv4 |
| IPv6 | _address_ipv6 |
| uint32_t | _nexthop_id |
| list< Lsa::LsaRef > | _lsars |
| Vertex::Vertex | ( | const Neighbor & | n | ) | [inline, explicit] |
| Vertex::Vertex | ( | const TwoHopNeighbor & | n2 | ) | [inline, explicit] |
Explicit constructor to: Create a Vertex from a TwoHopNeighbor.
The producer of a two-hop vertex is the one-hop neighbor which advertised the link we choose to reach it, which we set after creation using set_producer().
The face ID is not known until the SPT calculation has run and paths have been chosen; it will be that of the path selected at radius = 1.
| n2 | the TwoHopNeighbor represented by this Vertex. |
| Vertex::Vertex | ( | const IPv4 & | main_addr | ) | [inline, explicit] |
| Vertex::Vertex | ( | const TopologyEntry & | tc | ) | [inline, explicit] |
| Lsa::LsaRef Vertex::get_lsa | ( | ) | const [inline] |
OSPFv2 only.
Get the LSA that is responsible for this vertex.
| list<Lsa::LsaRef>& Vertex::get_lsas | ( | ) | [inline] |
OSPFv3 only.
Return the list of LSAs that may be responsible for this vertex.
| bool Vertex::is_origin | ( | ) | const [inline] |
| const LogicalLink* Vertex::link | ( | ) | const [inline] |
| bool Vertex::operator< | ( | const Vertex & | other | ) | const [inline] |
Compare two Vertex instances for less-than ordering.
Collation order for sort: 1. Main address; always unique.
XXX The following two can't be relied upon... because differentiating them at all means we can't look up nodes purely by their address! 2. Is origin vertex: true, false. 3. Vertex type: origin, onehop, twohop, tc.
| other | node to compare with. |
| bool Vertex::operator== | ( | const Vertex & | other | ) | const [inline] |
| void Vertex::set_lsa | ( | Lsa::LsaRef | lsar | ) | [inline] |
OSPFv2 only.
Set the LSA that is responsible for this vertex.
| const TwoHopLink* Vertex::twohop_link | ( | ) | const [inline] |
IPv4 Vertex::_producer [private] |