class Olsr

An OLSR routing process. More...

 
LOGO
 Annotated List  Files  Globals  Hierarchy  Index  Top

Public Methods


Detailed Description

IO is performed by the associated class IO.

 Olsr (EventLoop& eventloop, IO* io)

Olsr

inline bool  running ()

running

Returns: true if this routing process is running.

ProcessStatus  status (string& reason)

status

Determine routing process status.

Parameters:

reasona text description of the current process status.

Returns: status of the routing process.

void  shutdown ()

shutdown

Shut down this routing process.

void  receive (const string& interface, const string& vif, IPv4 dst, uint16_t dport, IPv4 src, uint16_t sport, uint8_t* data, uint32_t len)

receive

Callback method to: receive a datagram.

All packets for OLSR are received through this interface. All good packets are sent to the face manager which verifies that the packet is expected, and is wholly responsible for further processing.

bool  transmit (const string& interface, const string& vif, const IPv4& dst, const uint16_t& dport, const IPv4& src, const uint16_t& sport, uint8_t* data, const uint32_t& len)

transmit

Transmit a datagram.

inline void  register_vif_status (IO::VifStatusCb cb)

register_vif_status

Register vif status callback with the FEA.

Parameters:

cbthe callback to register.
inline void  register_address_status (IO::AddressStatusCb cb)

register_address_status

Register address status callback with the FEA.

Parameters:

cbthe callback to register.
inline EventLoop&  get_eventloop ()

get_eventloop

inline FaceManager&  face_manager ()

face_manager

inline Neighborhood&  neighborhood ()

neighborhood

inline TopologyManager&  topology_manager ()

topology_manager

inline ExternalRoutes&  external_routes ()

external_routes

inline RouteManager&  route_manager ()

route_manager

inline bool  set_main_addr (const IPv4& addr)

set_main_addr

Set the main address for the node.

Parameters:

addrthe main address to set.

Returns: true if the main address was set successfully.

inline IPv4  get_main_addr ()

get_main_addr

Returns: the main address.

inline bool  set_mpr_coverage (const uint32_t mpr_coverage)

set_mpr_coverage

Set the MPR_COVERAGE for the node.

Parameters:

mpr_coveragethe new value of MPR_COVERAGE.

Returns: true if MPR_COVERAGE was set successfully.

inline uint32_t  get_mpr_coverage ()

get_mpr_coverage

Returns: the value of the MPR_COVERAGE variable.

inline bool  set_tc_redundancy (const uint32_t tc_redundancy)

set_tc_redundancy

Set the TC_REDUNDANCY for the node.

Parameters:

tc_redundancythe new value of TC_REDUNDANCY.

Returns: true if TC_REDUNDANCY was set successfully.

inline uint32_t  get_tc_redundancy ()

get_tc_redundancy

Returns: the value of the TC_REDUNDANCY variable.

inline bool  set_hello_interval (const TimeVal& interval)

set_hello_interval

Set the HELLO_INTERVAL.

Parameters:

intervalthe new value of HELLO_INTERVAL.

Returns: true if HELLO_INTERVAL was set successfully.

inline TimeVal  get_hello_interval ()

get_hello_interval

Returns: the value of the HELLO_INTERVAL variable.

inline bool  set_mid_interval (const TimeVal& interval)

set_mid_interval

Set the MID_INTERVAL.

Parameters:

intervalthe new value of MID_INTERVAL.

Returns: true if MID_INTERVAL was set successfully.

inline TimeVal  get_mid_interval ()

get_mid_interval

Returns: the value of the MID_INTERVAL variable.

inline bool  set_refresh_interval (const TimeVal& interval)

set_refresh_interval

Set the REFRESH_INTERVAL.

Parameters:

intervalthe new refresh interval.

Returns: true if the refresh interval was set successfully.

inline TimeVal  get_refresh_interval ()

get_refresh_interval

Returns: the value of the REFRESH_INTERVAL protocol variable.

inline bool  set_tc_interval (TimeVal interval)

set_tc_interval

Set the TC interval for the node.

Parameters:

intervalthe new TC interval.

Returns: true if the TC interval was set successfully.

inline TimeVal  get_tc_interval ()

get_tc_interval

Returns: the value of the TC_INTERVAL protocol variable.

inline bool  set_willingness (const OlsrTypes::WillType willingness)

set_willingness

Set the WILLINGNESS.

Parameters:

willingnessthe new willingness-to-forward.

Returns: true if the willingness was set successfully.

inline OlsrTypes::WillType  get_willingness ()

get_willingness

Returns: the WILLINGNESS protocol variable.

inline bool  set_hna_interval (const TimeVal& interval)

set_hna_interval

Set the HNA interval.

Parameters:

intervalthe new HNA interval.

Returns: true if the HNA interval was set successfully.

inline TimeVal  get_hna_interval ()

get_hna_interval

Returns: the value of the HNA_INTERVAL protocol variable.

inline bool  set_dup_hold_time (const TimeVal& interval)

set_dup_hold_time

Set the DUP_HOLD_TIME.

Parameters:

intervalthe new duplicate message hold time

Returns: true if the DUP_HOLD_TIME was set successfully.

inline TimeVal  get_dup_hold_time ()

get_dup_hold_time

Returns: the value of the DUP_HOLD_TIME protocol variable.

bool  bind_address (const string& interface, const string& vif, const IPv4& local_addr, const uint32_t& local_port, const IPv4& all_nodes_addr, const uint32_t& all_nodes_port)

bind_address

Bind OLSR to an interface.

Parameters:

interfacethe name of the interface to listen on.
vifthe name of the vif to listen on.
local_addrthe address to listen on.
local_portthe address on the interface to listen on.
all_nodes_addrthe address to transmit to.
all_nodes_portthe port to transmit to.

Returns: true if the address was bound successfully.

bool  unbind_address (const string& interface, const string& vif)

unbind_address

Unbind OLSR from an interface.

OLSR may only be bound to a single address on an interface, therefore there is no 'address' argument to this method.

Parameters:

interfacethe name of the interface to unbind.
vifthe name of the vif to unbind.

Returns: true if the interface was unbound successfully.

bool  enable_address (const string& interface, const string& vif, const IPv4& address, const uint16_t& port, const IPv4& all_nodes_address)

enable_address

Enable I/O for OLSR on a given address.

Proxy for class IO.

Parameters:

interfacethe name of the interface to listen on.
vifthe name of the vif to listen on.
addressthe name of the address to listen on.
portthe name of the port to listen on.
all_nodes_addressthe name of the address to transmit to.

Returns: true if the address was enabled successfully.

bool  disable_address (const string& interface, const string& vif, const IPv4& address, const uint16_t& port)

disable_address

Disable I/O for OLSR on a given address.

Proxy for class IO.

Parameters:

interfacethe name of the interface to listen on.
vifthe name of the vif to listen on.
addressthe name of the address to listen on.
portthe name of the port to listen on.

Returns: true if the address was enabled successfully.

bool  set_interface_enabled (const string& interface, const string& vif, const bool enabled)

set_interface_enabled

Enable or disable an interface for OLSR.

Parameters:

interfacethe name of the interface to enable/disable.
vifthe name of the vif to enable/disable.
enabledthe new enable state of the interface.

Returns: true if the interface state was set to @param enabled successfully.

bool  get_interface_enabled (const string& interface, const string& vif, bool& enabled)

get_interface_enabled

Determine if an interface is enabled for OLSR.

Parameters:

interfacethe name of the interface to examine.
vifthe name of the vif to examine.
enabledoutput variable will be set to the enable state of the interface.

Returns: true if the enable state was retrieved successfully.

bool  get_interface_stats (const string& interface, const string& vif, FaceCounters& stats)

get_interface_stats

Get an interface's statistics.

Parameters:

interfacethe name of the interface to examine.
vifthe name of the vif to examine.
statsoutput variable will be set to the interface stats.

Returns: true if the stats werre retrieved successfully.

inline bool  set_interface_cost (const string& interface, const string& vif, int cost)

set_interface_cost

Set the cost on an interface.

Parameters:

interfacethe name of the interface to set cost for.
vifthe name of the vif to set cost for.
costthe new cost of the interface.

Returns: true if the interface cost was set successfully.

uint32_t  get_mtu (const string& interface)

get_mtu

Get the MTU of an interface.

Parameters:

interfacethe name of the interface to get MTU for.

Returns: the MTU of the interface.

bool  get_broadcast_address (const string& interface, const string& vif, const IPv4& address, IPv4& bcast_address)

get_broadcast_address

Get the primary IPv4 broadcast address configured for this interface/vif/address.

Parameters:

interfacethe interface to get broadcast address for.
vifthe vif to get broadcast address for.
addressthe IPv4 interface address.
bcast_address(out argument) the IPv4 broadcast address.

Returns: true if the broadcast address was obtained successfully.

bool  is_vif_broadcast_capable (const string& interface, const string& vif)

is_vif_broadcast_capable

Test whether this interface/vif is broadcast capable.

Parameters:

interfacethe interface to test.
vifthe vif to test.

Returns: true if it is broadcast capable, otherwise false.

bool  is_vif_multicast_capable (const string& interface, const string& vif)

is_vif_multicast_capable

Test whether this interface/vif is multicast capable.

Parameters:

interfacethe interface to test.
vifthe vif to test.

Returns: true if it is multicast capable, otherwise false.

bool  add_route (IPv4Net net, IPv4 nexthop, uint32_t nexthop_id, uint32_t metric, const PolicyTags& policytags)

add_route

Add route.

Parameters:

netnetwork
nexthop_idinterface ID towards the nexthop
metricto network
policytagspolicy info to the RIB.
bool  replace_route (IPv4Net net, IPv4 nexthop, uint32_t nexthop_id, uint32_t metric, const PolicyTags& policytags)

replace_route

Replace route.

Parameters:

netnetwork
nexthop_idinterface ID towards the nexthop
metricto network
policytagspolicy info to the RIB.
bool  delete_route (IPv4Net net)

delete_route

Delete route.

Parameters:

netnetwork
void  configure_filter (const uint32_t& filter, const string& conf)

configure_filter

Configure a policy filter

Parameters:

filterId of filter to configure.
confConfiguration of filter.
void  reset_filter (const uint32_t& filter)

reset_filter

Reset a policy filter.

Parameters:

filterId of filter to reset.
void  push_routes ()

push_routes

Push routes through policy filters for re-filtering.

bool  originate_external_route (const IPv4Net& net, const IPv4& nexthop, const uint32_t& metric, const PolicyTags& policytags)

originate_external_route

Originate an external route in HNA.

Parameters:

netnetwork prefix to originate.
nexthopthe next hop. Ignored by HNA.
metricexternal metric for this route.
policytagsthe policy tags associated with this route.

Returns: true if the route was originated successfully.

bool  withdraw_external_route (const IPv4Net& net)

withdraw_external_route

Withdraw an external route from HNA.

Parameters:

netnetwork prefix to withdraw.

Returns: true if the route was withdrawn successfully.

PolicyFilters&  get_policy_filters ()

get_policy_filters

Returns: a reference to the policy filters

Trace&  trace ()

trace

Returns: a reference to the tracing variables

bool  clear_database ()

clear_database

Clear protocol databases.

A full routing recomputation should be triggered by this operation. This specifically clears links, MID, TC, learned HNA entries, and the duplicate message set only.


Generated by: bms on anglepoise.lon.incunabulum.net on Wed Jul 23 10:06:13 2008, using kdoc 2.0a54+XORP.