more doxygen cleanup
authorTom Henderson <tomh@tomh.org>
Sun, 31 May 2009 22:11:52 -0700
changeset 4484 0a92e073bf7b
parent 4483 9250a25ee683
child 4485 4c4c445efebe
more doxygen cleanup
src/node/ipv4-list-routing.h
src/node/ipv4-route.h
src/node/ipv4-routing-protocol.h
src/node/ipv4-routing-table-entry.h
src/node/ipv4-static-routing.h
src/node/ipv4.h
--- a/src/node/ipv4-list-routing.h	Sat May 30 15:20:56 2009 -0700
+++ b/src/node/ipv4-list-routing.h	Sun May 31 22:11:52 2009 -0700
@@ -24,10 +24,8 @@
 namespace ns3 {
 
 /**
- * \ingroup ipv4 
- */
-
-/**
+ * \ingroup ipv4-routing 
+ *
  * This class is a specialization of Ipv4RoutingProtocol that allows 
  * other instances of Ipv4RoutingProtocol to be inserted in a 
  * prioritized list.  Routing protocols in the list are consulted one
@@ -50,9 +48,16 @@
    * Values may range between -32768 and +32767.  
    */
   virtual void AddRoutingProtocol (Ptr<Ipv4RoutingProtocol> routingProtocol, int16_t priority) = 0;
-
+  /**
+   * \return number of routing protocols in the list
+   */
   virtual uint32_t GetNRoutingProtocols (void) const = 0;
-
+  /**
+   * \return pointer to routing protocol indexed by 
+   * \param index index of protocol to return
+   * \param priority output parameter, set to the priority of the protocol
+            being returned
+   */
   virtual Ptr<Ipv4RoutingProtocol> GetRoutingProtocol (uint32_t index, int16_t& priority) const = 0;
 };
 
--- a/src/node/ipv4-route.h	Sat May 30 15:20:56 2009 -0700
+++ b/src/node/ipv4-route.h	Sun May 31 22:11:52 2009 -0700
@@ -31,25 +31,53 @@
 class NetDevice;
 
 /**
+ * \ingroup ipv4-routing
+ *
  *\brief Ipv4 route cache entry (similar to Linux struct rtable)
  *
- * In the future, we will add other entries from struct dst_entry, struct rtable, and struct dst_ops as needed.
+ * This is a reference counted object.  In the future, we will add other 
+ * entries from struct dst_entry, struct rtable, and struct dst_ops as needed.
  */
 class Ipv4Route : public RefCountBase {
 public:
   Ipv4Route ();
 
+  /**
+   * \param dest Destination Ipv4Address
+   */
   void SetDestination (Ipv4Address dest);
+  /**
+   * \return Destination Ipv4Address of the route
+   */
   Ipv4Address GetDestination (void) const;
 
+  /**
+   * \param src Source Ipv4Address
+   */
   void SetSource (Ipv4Address src);
+  /**
+   * \return Source Ipv4Address of the route
+   */
   Ipv4Address GetSource (void) const;
 
+  /**
+   * \param gw Gateway (next hop) Ipv4Address
+   */
   void SetGateway (Ipv4Address gw);
+  /**
+   * \return Ipv4Address of the gateway (next hop) 
+   */
   Ipv4Address GetGateway (void) const;
 
-  // dst_entry.dev
+  /**
+   * Equivalent in Linux to dst_entry.dev
+   *
+   * \param outputDevice pointer to NetDevice for outgoing packets
+   */
   void SetOutputDevice (Ptr<NetDevice> outputDevice);
+  /**
+   * \return pointer to NetDevice for outgoing packets
+   */
   Ptr<NetDevice> GetOutputDevice (void) const;
 
 #ifdef NOTYET
@@ -71,26 +99,54 @@
 std::ostream& operator<< (std::ostream& os, Ipv4Route const& route);
 
 /**
- *\brief Ipv4 multicast route cache entry (similar to Linux struct mfc_cache)
+ * \ingroup ipv4-routing
+ * 
+ * \brief Ipv4 multicast route cache entry (similar to Linux struct mfc_cache)
  */
 class Ipv4MulticastRoute : public RefCountBase {
 public:
   Ipv4MulticastRoute ();
 
+  /**
+   * \param group Ipv4Address of the multicast group
+   */
   void SetGroup (const Ipv4Address group);
+  /**
+   * \return Ipv4Address of the multicast group
+   */
   Ipv4Address GetGroup (void) const; 
 
-  void SetOrigin (const Ipv4Address group);
+  /**
+   * \param origin Ipv4Address of the origin address
+   */
+  void SetOrigin (const Ipv4Address origin);
+  /**
+   * \return Ipv4Address of the origin address
+   */
   Ipv4Address GetOrigin (void) const; 
   
+  /**
+   * \param iif Parent (input interface) for this route
+   */
   void SetParent (uint32_t iif);
+  /**
+   * \return Parent (input interface) for this route
+   */
   uint32_t GetParent (void) const;
 
+  /**
+   * \param oif Outgoing interface index
+   * \param ttl time-to-live for this route
+   */
   void SetOutputTtl (uint32_t oif, uint32_t ttl);
+  /**
+   * \param oif outgoing interface
+   * \return TTL for this route
+   */
   uint32_t GetOutputTtl (uint32_t oif) const;
   
-  static const uint32_t MAX_INTERFACES = 16;
-  static const uint32_t MAX_TTL = 255;
+  static const uint32_t MAX_INTERFACES = 16;  // Maximum number of multicast interfaces on a router
+  static const uint32_t MAX_TTL = 255;  // Maximum time-to-live (TTL)
 
 private:
   Ipv4Address m_group;      // Group 
--- a/src/node/ipv4-routing-protocol.h	Sat May 30 15:20:56 2009 -0700
+++ b/src/node/ipv4-routing-protocol.h	Sun May 31 22:11:52 2009 -0700
@@ -31,7 +31,9 @@
 class NetDevice;
 
 /**
- * \ingroup ipv4 
+ * \ingroup node 
+ * \defgroup ipv4-routing Ipv4 Routing
+ *
  * Abstract base class for Ipv4 routing protocols.  Defines two
  * virtual functions for packet routing and forwarding.  The first, 
  * RouteOutput(), is used for locally originated packets, and the second,
--- a/src/node/ipv4-routing-table-entry.h	Sat May 30 15:20:56 2009 -0700
+++ b/src/node/ipv4-routing-table-entry.h	Sun May 31 22:11:52 2009 -0700
@@ -29,8 +29,10 @@
 namespace ns3 {
 
 /**
- * \ingroup internetStack
- * \brief A record of an IPv4 routing table entry for Ipv4GlobalRouting and Ipv4StaticRouting
+ * \ingroup ipv4-routing
+ *
+ * A record of an IPv4 routing table entry for Ipv4GlobalRouting and 
+ * Ipv4StaticRouting.  This is not a reference counted object.
  */
 class Ipv4RoutingTableEntry {
 public:
@@ -38,50 +40,95 @@
    * \brief This constructor does nothing
    */
   Ipv4RoutingTableEntry ();
-
   /**
    * \brief Copy Constructor
    * \param route The route to copy
    */
   Ipv4RoutingTableEntry (Ipv4RoutingTableEntry const &route);
-
   /**
    * \brief Copy Constructor
    * \param route The route to copy
    */
   Ipv4RoutingTableEntry (Ipv4RoutingTableEntry const *route);
-
+  /**
+   * \return True if this route is a host route; false otherwise
+   */
   bool IsHost (void) const;
   /**
    * \return The IPv4 address of the destination of this route
    */
-  Ipv4Address GetDest (void) const;
-
   bool IsNetwork (void) const;
-  Ipv4Address GetDestNetwork (void) const;
-  Ipv4Mask GetDestNetworkMask (void) const;
   /**
    * \return True if this route is a default route; false otherwise
    */
   bool IsDefault (void) const;
-
+  /**
+   * \return True if this route is a gateway route; false otherwise
+   */
   bool IsGateway (void) const;
+  /**
+   * \return address of the gateway stored in this entry
+   */
   Ipv4Address GetGateway (void) const;
-
+  /**
+   * \return The IPv4 address of the destination of this route
+   */
+  Ipv4Address GetDest (void) const;
+  /**
+   * \return The IPv4 network number of the destination of this route
+   */
+  Ipv4Address GetDestNetwork (void) const;
+  /**
+   * \return The IPv4 network mask of the destination of this route
+   */
+  Ipv4Mask GetDestNetworkMask (void) const;
+  /**
+   * \return The Ipv4 interface number used for sending outgoing packets
+   */
   uint32_t GetInterface (void) const;
-
+  /**
+   * \return An Ipv4RoutingTableEntry object corresponding to the input parameters.
+   * \param dest Ipv4Address of the destination
+   * \param nextHop Ipv4Address of the next hop
+   * \param interface Outgoing interface 
+   */
   static Ipv4RoutingTableEntry CreateHostRouteTo (Ipv4Address dest, 
 				      Ipv4Address nextHop, 
 				      uint32_t interface);
+  /**
+   * \return An Ipv4RoutingTableEntry object corresponding to the input parameters.
+   * \param dest Ipv4Address of the destination
+   * \param interface Outgoing interface 
+   */
   static Ipv4RoutingTableEntry CreateHostRouteTo (Ipv4Address dest, 
 				      uint32_t interface);
+  /**
+   * \return An Ipv4RoutingTableEntry object corresponding to the input parameters.
+   * \param network Ipv4Address of the destination network
+   * \param networkMask Ipv4Mask of the destination network mask
+   * \param nextHop Ipv4Address of the next hop
+   * \param interface Outgoing interface 
+   */
   static Ipv4RoutingTableEntry CreateNetworkRouteTo (Ipv4Address network, 
 					 Ipv4Mask networkMask, 
 					 Ipv4Address nextHop, 
 					 uint32_t interface);
+  /**
+   * \return An Ipv4RoutingTableEntry object corresponding to the input parameters.
+   * \param network Ipv4Address of the destination network
+   * \param networkMask Ipv4Mask of the destination network mask
+   * \param interface Outgoing interface 
+   */
   static Ipv4RoutingTableEntry CreateNetworkRouteTo (Ipv4Address network, 
 					 Ipv4Mask networkMask, 
 					 uint32_t interface);
+  /**
+   * \return An Ipv4RoutingTableEntry object corresponding to the input 
+   * parameters.  This route is distinguished; it will match any 
+   * destination for which a more specific route does not exist.
+   * \param nextHop Ipv4Address of the next hop
+   * \param interface Outgoing interface 
+   */
   static Ipv4RoutingTableEntry CreateDefaultRoute (Ipv4Address nextHop, 
 				       uint32_t interface);
   
@@ -108,7 +155,8 @@
 std::ostream& operator<< (std::ostream& os, Ipv4RoutingTableEntry const& route);
 
 /**
- * \ingroup internetStack
+ * \ingroup ipv4-routing
+ *
  * \brief A record of an IPv4 multicast route for Ipv4GlobalRouting and Ipv4StaticRouting
  */
 class Ipv4MulticastRoutingTableEntry {
@@ -123,43 +171,42 @@
    * \param route The route to copy
    */
   Ipv4MulticastRoutingTableEntry (Ipv4MulticastRoutingTableEntry const &route);
-
   /**
    * \brief Copy Constructor
    * \param route The route to copy
    */
   Ipv4MulticastRoutingTableEntry (Ipv4MulticastRoutingTableEntry const *route);
-
   /**
    * \return The IPv4 address of the source of this route
    */
   Ipv4Address GetOrigin (void) const;
-
   /**
    * \return The IPv4 address of the multicast group of this route
    */
   Ipv4Address GetGroup (void) const;
-
   /**
    * \return The IPv4 address of the input interface of this route
    */
   uint32_t GetInputInterface (void) const;
-
   /**
    * \return The number of output interfaces of this route
    */
   uint32_t GetNOutputInterfaces (void) const;
-
   /**
    * \return A specified output interface.
    */
   uint32_t GetOutputInterface (uint32_t n) const;
-
   /**
    * \return A vector of all of the output interfaces of this route.
    */
   std::vector<uint32_t> GetOutputInterfaces (void) const;
-
+  /**
+   * \return Ipv4MulticastRoutingTableEntry corresponding to the input parameters.
+   * \param origin Source address for the multicast route 
+   * \param group Group destination address for the multicast route
+   * \param inputInterface Input interface that multicast datagram must be received on
+   * \param outputInterfaces vector of output interfaces to copy and forward the datagram to
+   */
   static Ipv4MulticastRoutingTableEntry CreateMulticastRoute (Ipv4Address origin, 
     Ipv4Address group, uint32_t inputInterface,
     std::vector<uint32_t> outputInterfaces);
--- a/src/node/ipv4-static-routing.h	Sat May 30 15:20:56 2009 -0700
+++ b/src/node/ipv4-static-routing.h	Sun May 31 22:11:52 2009 -0700
@@ -44,6 +44,8 @@
 class Ipv4MulticastRoutingTableEntry;
 
 /**
+ * \ingroup ipv4-routing
+ * 
  * \brief Static routing protocol for IP version 4 stacks.
  *
  * In ns-3 we have the concept of a pluggable routing protocol.  Routing
--- a/src/node/ipv4.h	Sat May 30 15:20:56 2009 -0700
+++ b/src/node/ipv4.h	Sun May 31 22:11:52 2009 -0700
@@ -37,9 +37,7 @@
 /**
  * \ingroup node
  * \defgroup ipv4 Ipv4
- */
-
-/**
+ * 
  * \brief Access to the Ipv4 forwarding table, interfaces, and configuration
  *
  * This class defines the API to manipulate the following aspects of