next up previous contents index
Next: 6.7 Roadmap and Future Up: 6. ns-3 routing Previous: 6.5 Support for multiple   Contents   Index

6.6 Optimized Link State Routing (OLSR)

This is the first dynamic routing protocol for ns-3. The implementation is found in the src/routing/olsr directory, and an example script is in examples/simple-point-to-point-olsr.cc.

The following commands will enable OLSR in a simulation.

  olsr::EnableAllNodes ();  // Start OLSR on all nodes
  olsr::EnableNodes(InputIterator begin, InputIterator end); // Start on
    // a list of nodes
  olsr::EnableNode (Ptr<Node> node);  // Start OLSR on "node" only

Once instantiated, the agent can be started with the Start() command, and the OLSR "main interface" can be set with the SetMainInterface() command. A number of protocol constants are defined in olsr-agent-impl.cc.



2007-10-16