Class implementing the OLSR state machine. More...
#include <olsr-agent.h>
Public Member Functions | |
virtual void | SetNode (Ptr< Node > node)=0 |
virtual void | SetMainInterface (uint32_t interface)=0 |
Sets the main interface to be used by OLSR. | |
virtual void | Start ()=0 |
Starts the OLSR protocol operation. | |
virtual Ptr< const olsr::RoutingTable > | GetRoutingTable () const =0 |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
This method returns the TypeId associated to ns3::olsr::Agent. |
Class implementing the OLSR state machine.
This class represents an instance of the OLSR protocol. It attaches itself to a Node, and its lifecycle is bound to that node. Normally the functions in the ns3::olsr namespace are more simple to use to start OLSR on nodes, but access to the underlying OLSR agent can be useful in order to customize the OLSR parameters. Example:
Ptr<olsr::Agent> olsr = Agend::CreateDefault (); agent->SetMainInterface (2); agent->Start ();
Definition at line 46 of file olsr-agent.h.
virtual Ptr<const olsr::RoutingTable> ns3::olsr::Agent::GetRoutingTable | ( | ) | const [pure virtual] |
Implemented in ns3::olsr::AgentImpl.
TypeId ns3::olsr::Agent::GetTypeId | ( | void | ) | [static] |
This method returns the TypeId associated to ns3::olsr::Agent.
This object is accessible through the following paths with Config::Set and Config::Connect:
No Attributes defined for this type.
No TraceSources defined for this type.
Reimplemented from ns3::Object.
Reimplemented in ns3::olsr::AgentImpl.
Definition at line 29 of file olsr-agent.cc.
References ns3::TypeId::SetParent().
virtual void ns3::olsr::Agent::SetMainInterface | ( | uint32_t | interface | ) | [pure virtual] |
Sets the main interface to be used by OLSR.
Normally OLSR supports multiple interfaces, but the protocol requires the definition of a "main interface". This interface's IPv4 address provides the identity of the node, and all outgoing OLSR routing messages must have the main interface address, regardless of the actual interface used to transmit the packet. This method allows one to explicitly select an interface as the main interface. It must be called before the agent starts, but calling it is optional; if not called, the agent tries to guess and uses a suitable interface.
Implemented in ns3::olsr::AgentImpl.
Implemented in ns3::olsr::AgentImpl.
virtual void ns3::olsr::Agent::Start | ( | ) | [pure virtual] |
Starts the OLSR protocol operation.
Calling this method essentially bootstraps the OLSR protocol, and causes the agent to start broadcasting OLSR messages to neighbors, as well start listening to messages from neighbors.
Implemented in ns3::olsr::AgentImpl.