diff --git a/doc/models/Makefile b/doc/models/Makefile index c009651f9..8688cd291 100644 --- a/doc/models/Makefile +++ b/doc/models/Makefile @@ -39,6 +39,7 @@ SOURCES = \ $(SRC)/internet/doc/ipv6.rst \ $(SRC)/internet/doc/routing-overview.rst \ $(SRC)/internet/doc/tcp.rst \ + $(SRC)/olsr/doc/olsr.rst \ $(SRC)/openflow/doc/openflow-switch.rst \ $(SRC)/point-to-point/doc/point-to-point.rst \ $(SRC)/wifi/doc/wifi.rst \ diff --git a/doc/models/source/index.rst b/doc/models/source/index.rst index a83257b52..1bbe1d082 100644 --- a/doc/models/source/index.rst +++ b/doc/models/source/index.rst @@ -34,6 +34,7 @@ This document is written in `reStructuredText - */ - -#ifndef OLSR_H -#define OLSR_H - -/** - * \defgroup olsr OLSR Routing - * - * \section model Model - * - * This model implements the base specification of the Optimized - * Link State Routing (OLSR) protocol, which is a dynamic mobile ad hoc - * unicast routing protocol. It has been developed at the - * University of Murcia (Spain) by Francisco J. Ros for NS-2, and was - * ported to NS-3 by Gustavo Carneiro at INESC Porto (Portugal). - * - * Here is a summary of software's main features: - * - Mostly compliant with OLSR as documented in RFC 3626 (http://www.ietf.org/rfc/rfc3626.txt), with the following differences: - * - The use of multiple interfaces was not supported by the NS-2 version, but is supported in NS-3; - * - * \section api API and Usage - * - * A helper class for OLSR has been written. After an IPv4 topology - * has been created and unique IP addresses assigned to each node, the - * simulation script writer can call one of three overloaded functions - * with different scope to enable OLSR: ns3::OlsrHelper::Install - * (NodeContainer container); ns3::OlsrHelper::Install (Ptr - * node); or ns3::OlsrHelper::InstallAll (void); - * - * In addition, the behavior of OLSR can be modified by changing certain - * attributes. The method ns3::OlsrHelper::Set () can be used - * to set OLSR attributes. These include HelloInterval, TcInterval, - * MidInterval, Willingness. Other parameters are defined as macros - * in olsr-routing-protocol.cc. - * - * Host Network Association (HNA) is supported in this implementation - * of OLSR. Refer to examples/routing/olsr-hna.cc to see how the API - * is used. - * - * \section list Open Issues - * - * - OLSR does not respond to the routing event notifications corresponding - * to dynamic interface up and down (RoutingProtocol::NotifyInterfaceUp and - * RoutingProtocol::NotifyInterfaceDown) or address insertion/removal - * (RoutingProtocol::NotifyAddAddress and - * RoutingProtocol::NotifyRemoveAddress). - * - Unlike the NS-2 version, does not yet support MAC layer feedback as described in RFC 3626; - * - */ - - -#endif /* OLSR_H */ diff --git a/src/olsr/doc/olsr.rst b/src/olsr/doc/olsr.rst new file mode 100644 index 000000000..feaff8a4d --- /dev/null +++ b/src/olsr/doc/olsr.rst @@ -0,0 +1,81 @@ +.. include:: replace.txt + +Optimized Link State Routing (OLSR) +----------------------------------- + +This model implements the base specification of the Optimized +Link State Routing (OLSR) protocol, which is a dynamic mobile ad hoc +unicast routing protocol. It has been developed at the +University of Murcia (Spain) by Francisco J. Ros for NS-2, and was +ported to NS-3 by Gustavo Carneiro at INESC Porto (Portugal). + +Model Description +***************** + +The source code for the OLSR model lives in the directory `src/olsr`. + +Design +++++++ + +Scope and Limitations ++++++++++++++++++++++ + +The model is for IPv4 only. + +* Mostly compliant with OLSR as documented in [rfc3626]_, +* The use of multiple interfaces was not supported by the NS-2 version, but is supported in NS-3; +* OLSR does not respond to the routing event notifications corresponding to dynamic interface up and down (``ns3::RoutingProtocol::NotifyInterfaceUp`` and ``ns3::RoutingProtocol::NotifyInterfaceDown``) or address insertion/removal ``ns3::RoutingProtocol::NotifyAddAddress`` and ``ns3::RoutingProtocol::NotifyRemoveAddress``). +* Unlike the NS-2 version, does not yet support MAC layer feedback as described in RFC 3626; + +Host Network Association (HNA) is supported in this implementation +of OLSR. Refer to ``examples/olsr-hna.cc`` to see how the API +is used. + +References +++++++++++ + +.. [rfc3626] RFC 3626 *Optimized Link State Routing* + +Usage +***** + +Examples +++++++++ + +Helpers ++++++++ + +A helper class for OLSR has been written. After an IPv4 topology +has been created and unique IP addresses assigned to each node, the +simulation script writer can call one of three overloaded functions +with different scope to enable OLSR: ``ns3::OlsrHelper::Install +(NodeContainer container)``; ``ns3::OlsrHelper::Install (Ptr +node)``; or ``ns3::OlsrHelper::InstallAll (void)`` + +Attributes +++++++++++ + +In addition, the behavior of OLSR can be modified by changing certain +attributes. The method ``ns3::OlsrHelper::Set ()`` can be used +to set OLSR attributes. These include HelloInterval, TcInterval, +MidInterval, Willingness. Other parameters are defined as macros +in ``olsr-routing-protocol.cc``. + +Tracing ++++++++ + +Logging ++++++++ + +Caveats ++++++++ + +Validation +********** + +Unit tests +++++++++++ + +Larger-scale performance tests +++++++++++++++++++++++++++++++ + diff --git a/src/olsr/model/olsr-routing-protocol.h b/src/olsr/model/olsr-routing-protocol.h index 68f410c83..485fb5a73 100644 --- a/src/olsr/model/olsr-routing-protocol.h +++ b/src/olsr/model/olsr-routing-protocol.h @@ -47,6 +47,10 @@ namespace ns3 { namespace olsr { +/// +/// \defgroup olsr OLSR Routing +/// This section documents the API of the ns-3 OLSR module. For a generic +/// functional description, please refer to the ns-3 manual. /// An %OLSR's routing table entry. struct RoutingTableEntry