|
xorp
|
A two-hop neighbor. More...
#include <twohop.hh>
Public Member Functions | |
| TwoHopNeighbor (EventLoop &ev, Neighborhood *parent, const OlsrTypes::TwoHopNodeID id, const IPv4 &main_addr, const OlsrTypes::TwoHopLinkID tlid) | |
| OlsrTypes::TwoHopNodeID | id () const |
| IPv4 | main_addr () const |
| string | toStringBrief () |
| void | add_twohop_link (const OlsrTypes::TwoHopLinkID tlid) |
| Associate this N2 with an N1, using an instance of the association class TwoHopLink. | |
| bool | delete_twohop_link (const OlsrTypes::TwoHopLinkID tlid) |
| Delete the given N1 from the set of Neighbors which may be used to reach this N2. | |
| size_t | delete_all_twohop_links () |
|
const set < OlsrTypes::TwoHopLinkID > & | twohop_links () const |
| void | add_covering_mpr (const OlsrTypes::NeighborID nid) |
| Add the given neighbor as an MPR which covers this node. | |
| void | withdraw_covering_mpr (const OlsrTypes::NeighborID nid) |
| Withdraw the given neighbor as an MPR which covers this node. | |
| void | reset_covering_mprs () |
| Reset the MPR coverage state for this N2 node. | |
| uint32_t | coverage () const |
| bool | is_covered () const |
| uint32_t | reachability () const |
| void | set_reachability (uint32_t value) |
| Set this N2's reachability. | |
| bool | is_reachable () const |
| bool | is_strict () const |
| void | set_is_strict (bool is_strict) |
| Set if this N2 is a strict two-hop neighbor. | |
| const set < OlsrTypes::TwoHopLinkID > & | twohop_links () |
Private Attributes | |
| EventLoop & | _ev |
| Neighborhood * | _parent |
| OlsrTypes::TwoHopNodeID | _id |
| Unique ID of this N2 node. | |
| IPv4 | _main_addr |
| N_2hop_addr protocol variable. | |
| bool | _is_strict |
| true if this N2 is NOT also an N1 node. | |
| uint32_t | _coverage |
| The number of strict N1 which can reach this strict N2, and which have been selected as MPRs by the Neighborhood. | |
| uint32_t | _reachability |
| The number of strict N1 which can reach this strict N2. | |
| set< OlsrTypes::TwoHopLinkID > | _twohop_links |
| Links by which this two-hop neighbor is reachable. | |
| void TwoHopNeighbor::add_covering_mpr | ( | const OlsrTypes::NeighborID | nid | ) |
| void TwoHopNeighbor::add_twohop_link | ( | const OlsrTypes::TwoHopLinkID | tlid | ) |
Associate this N2 with an N1, using an instance of the association class TwoHopLink.
| tlid | the ID of a two-hop link. |
| uint32_t TwoHopNeighbor::coverage | ( | ) | const [inline] |
| bool TwoHopNeighbor::delete_twohop_link | ( | const OlsrTypes::TwoHopLinkID | tlid | ) |
| bool TwoHopNeighbor::is_covered | ( | ) | const [inline] |
| bool TwoHopNeighbor::is_reachable | ( | ) | const [inline] |
| bool TwoHopNeighbor::is_strict | ( | ) | const [inline] |
| uint32_t TwoHopNeighbor::reachability | ( | ) | const [inline] |
| void TwoHopNeighbor::set_is_strict | ( | bool | is_strict | ) | [inline] |
Set if this N2 is a strict two-hop neighbor.
| is_strict | true if this N2 does NOT also appear as an N1. |
| const set<OlsrTypes::TwoHopLinkID>& TwoHopNeighbor::twohop_links | ( | ) | [inline] |
| void TwoHopNeighbor::withdraw_covering_mpr | ( | const OlsrTypes::NeighborID | nid | ) |
IPv4 TwoHopNeighbor::_main_addr [private] |
N_2hop_addr protocol variable.
Main protocol address of this N2 node.