xorp

Links Class Reference

List of all members.

Classes

struct  LinkTuple
 A structure describing an emulated link between two nodes. More...

Public Member Functions

 Links (Simulator *r, EventLoop &ev, Nodes *n)
bool add_link (const IPv4 &left_addr, const IPv4 &right_addr) throw (NoSuchAddress)
 Add a link between two OLSR instances, given their addresses.
bool remove_link (const IPv4 &left_addr, const IPv4 &right_addr) throw (NoSuchAddress)
 Remove a link between two OLSR instances, given their addresses.
size_t remove_all_links ()
 Remove all links in the topology, without removing the nodes.
void purge_link_tuple (LinkTuple &lt, const IPv4 &left_addr, const IPv4 &right_addr)
 Purge a link given a reference to it.
bool remove_all_links_for_addr (const IPv4 &link_addr) throw (NoSuchAddress)
 Given the interface address of an OLSR node, remove all links referencing that interface and destroy them.
Simulatorparent ()
EventLoopeventloop ()
Nodesnodes ()

Private Attributes

Simulator_parent
EventLoop_eventloop
Nodes_nodes
multimap< pair< IPv4, IPv4 >
, LinkTuple
_links

Member Function Documentation

bool Links::add_link ( const IPv4 left_addr,
const IPv4 right_addr 
) throw (NoSuchAddress)

Add a link between two OLSR instances, given their addresses.

If no previously created link exists, a new instance of EmulateSubnet is created. The link local broadcast address is always assumed to be 255.255.255.255 on the link.

Parameters:
left_addrThe OLSR interface address of the left hand node.
right_addrThe OLSR interface address of the right hand node.
Returns:
true if the link was successfully created, otherwise false.
Exceptions:
NoSuchAddressif neither address exists.
void Links::purge_link_tuple ( LinkTuple lt,
const IPv4 left_addr,
const IPv4 right_addr 
)

Purge a link given a reference to it.

Parameters:
ltreference to a LinkTuple.
left_addrThe OLSR interface address of the left hand node.
right_addrThe OLSR interface address of the right hand node.
size_t Links::remove_all_links ( )

Remove all links in the topology, without removing the nodes.

Returns:
the number of links removed.
bool Links::remove_all_links_for_addr ( const IPv4 link_addr) throw (NoSuchAddress)

Given the interface address of an OLSR node, remove all links referencing that interface and destroy them.

Parameters:
left_addrThe OLSR interface address of the left hand node.
Returns:
true if the link was successfully created, otherwise false.
Exceptions:
NoSuchAddressif link_addr does not exist.
bool Links::remove_link ( const IPv4 left_addr,
const IPv4 right_addr 
) throw (NoSuchAddress)

Remove a link between two OLSR instances, given their addresses.

Parameters:
left_addrThe OLSR interface address of the left hand node.
right_addrThe OLSR interface address of the right hand node.
Returns:
true if the link was successfully remove, otherwise false.
Exceptions:
NoSuchAddressif neither address exists.

The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Typedefs Enumerations