Public Member Functions |
|
| Nodes (Simulator *r, EventLoop &ev) |
| bool | create_node (const vector< IPv4 > &addrs) |
| | Simulation graph creation.
|
| bool | destroy_node (const IPv4 &main_addr) |
| | Destroy an OLSR node in the simulator.
|
| size_t | purge_links_by_node (const IPv4 &main_addr) throw (NoSuchAddress) |
| | Given the main address of an OLSR node, destroy all links referencing that node.
|
| bool | configure_address (const IPv4 &iface_addr) |
| | Mark an OLSR node address as administratively up.
|
| bool | unconfigure_address (const IPv4 &iface_addr) |
| | Mark an OLSR node address as administratively down.
|
|
void | set_default_hello_interval (const int value) |
|
void | set_default_mid_interval (const int value) |
|
void | set_default_mpr_coverage (const int value) |
|
void | set_default_refresh_interval (const int value) |
|
void | set_default_tc_interval (const int value) |
|
void | set_default_hna_interval (const int value) |
|
void | set_default_dup_hold_time (const int value) |
|
void | set_default_willingness (const int value) |
|
void | set_default_tc_redundancy (const int value) |
| bool | set_hello_interval (const IPv4 &main_addr, const int value) |
| | Set HELLO_INTERVAL variable for the node given by main_addr.
|
| bool | set_mid_interval (const IPv4 &main_addr, const int value) |
| | Set MID_INTERVAL variable for the node given by main_addr.
|
| bool | set_mpr_coverage (const IPv4 &main_addr, const int value) |
| | Set MPR_COVERAGE variable for the node given by main_addr.
|
| bool | set_refresh_interval (const IPv4 &main_addr, const int value) |
| | Set REFRESH_INTERVAL variable for the node given by main_addr.
|
| bool | set_tc_interval (const IPv4 &main_addr, const int value) |
| | Set TC_INTERVAL variable for the node given by main_addr.
|
| bool | set_tc_redundancy (const IPv4 &main_addr, const int value) |
| | Set TC_REDUNDANCY variable for the node given by main_addr.
|
| bool | set_willingness (const IPv4 &main_addr, const int value) |
| | Set WILLINGNESS variable for the node given by main_addr.
|
| bool | set_hna_interval (const IPv4 &main_addr, const int value) |
| | Set HNA_INTERVAL variable for the node given by main_addr.
|
| bool | set_dup_hold_time (const IPv4 &main_addr, const int value) |
| | Set DUP_HOLD_TIME variable for the node given by main_addr.
|
| bool | select_node (const IPv4 &main_addr) |
| | Select the OLSR node with the given main address for the verification commands which follow.
|
| bool | dump_routing_table (const IPv4 &main_addr) |
| | Dump a node's routing table to cout.
|
| bool | verify_all_link_state_empty () |
| | Verify that the link state database at every node in the topology is empty (N1/N2/TC/MPR/MID).
|
| bool | verify_node_link_state_empty (NodeTuple &nat) |
| | Verify that the link state database in the given node is empty (N1/N2/TC/MPR/MID).
|
| bool | verify_n1 (const IPv4 &n1_addr, const bool expected_is_n1) |
| | Verify that the neighbor given by n1_addr is a one-hop neighbor of the currently selected node.
|
| bool | verify_n2 (const IPv4 &n2_addr, const bool expected_is_n2) |
| | Verify that n2_addr is the address of a two-hop neighbor of the currently selected node.
|
| bool | verify_is_mpr (const bool expected_is_mpr) |
| | Verify the MPR status of the selected node.
|
| bool | verify_mpr_set (const vector< IPv4 > &mpr_addrs) |
| | Verify the MPR set of the selected node.
|
| bool | verify_mpr_selector_set (const vector< IPv4 > &mprs_addrs) |
| | Verify the MPR selector set of the selected node.
|
| bool | verify_mid_node_count (const size_t expected) |
| | Verify the MID database of the selected node contains the expected number of nodes (Note: this is NOT the same as entries; rather, it's the number of unique keys we have in the _mid_addr multimap.)
|
| bool | verify_mid_node_addrs (const IPv4 &origin, const vector< IPv4 > &addrs) |
| | Verify the MID database of the selected node contains the given entries for the given protocol address.
|
| bool | verify_mid_address_distance (const IPv4 &origin, const IPv4 &iface_addr, const uint16_t expected_distance) |
| | Verify the MID database of the selected node contains an entry for the given main address and interface address, at the given network distance measured in hops.
|
| bool | verify_tc_origin_count (const size_t expected_count) |
| | Verify the TC database of the selected node contains entries which have originated from the given number of unique OLSR nodes.
|
| bool | verify_tc_ans (const IPv4 &origin, const uint16_t expected_ansn, const vector< IPv4 > &expected_addrs) |
| | Verify that the Advertised Neighbor Set of 'origin', as seen at the currently selected node, has the expected ANSN and the expected neighbor set contents.
|
| bool | verify_tc_origin_seen (const IPv4 &origin, const bool expected_seen) |
| | Verify that the selected node has seen TC broadcasts from 'origin' at least once during the lifetime of the simulation.
|
| bool | verify_tc_distance (const IPv4 &origin, const IPv4 &neighbor_addr, const uint16_t expected_distance) |
| | Verify that the given TC entry has the expected hop count, as observed at the currently selected node's TC database.
|
| bool | verify_tc_destination (const IPv4 &dest_addr, const size_t expected_count) |
| | Verify that the currently selected node has a given number of TC entries pointing to the given destination.
|
| bool | verify_hna_entry (const IPv4Net &dest, const IPv4 &origin) |
| | Verify the HNA database of the selected node contains an entry for the given destination from the given origin.
|
| bool | verify_hna_distance (const IPv4Net &dest, const IPv4 &origin, const uint16_t distance) |
| | Verify the HNA database of the selected node contains an entry for the given destination from the given origin, at the given distance.
|
| bool | verify_hna_entry_count (const size_t expected_count) |
| | Verify the HNA database of the selected node contains exactly the given number of entries.
|
| bool | verify_hna_origin_count (const size_t expected_count) |
| | Verify the HNA database of the selected node contains entries which have originated from the given number of unique OLSR nodes.
|
| bool | verify_hna_dest_count (const size_t expected_count) |
| | Verify the HNA database of the selected node contains the given number of leanred network prefixes.
|
| bool | originate_hna (const IPv4Net &dest) |
| | Add a prefix to the HNA "routes out" database of the currently selected node, and start advertising it.
|
| bool | withdraw_hna (const IPv4Net &dest) |
| | Withdraw a prefix from the HNA "routes out" database of the currently selected node, and stop advertising it.
|
| bool | verify_routing_table_size (const size_t rtsize) |
| | Verify the routing table of the selected node contains exactly the given number of entries.
|
| bool | verify_routing_entry (IPv4Net dest, IPv4 nexthop, uint32_t metric) |
| | Verify the routing table of the selected node contains the given route entry.
|
| NodeTuple & | get_node_tuple_by_addr (const IPv4 &addr) throw (NoSuchAddress) |
| | Given an OLSR protocol address, return the corresponding NodeTuple instance by value.
|
Protected Member Functions |
|
bool | node_is_selected () |
Private Attributes |
|
Simulator * | _parent |
|
EventLoop & | _eventloop |
|
int | _next_instance_id |
| | The next available instance ID for a pair of OLSR/DebugIO instances.
|
|
int | _default_hello_interval |
|
int | _default_mid_interval |
|
int | _default_mpr_coverage |
|
int | _default_refresh_interval |
|
int | _default_tc_interval |
|
int | _default_hna_interval |
|
int | _default_dup_hold_time |
|
int | _default_willingness |
|
int | _default_tc_redundancy |
| map< IPv4, NodeTuple > | _nodes |
| | Database of current simulation instances, keyed by protocol address; one entry for each OLSR address.
|
|
NodeTuple | _selected_node |
| | The currently selected node.
|