droptail and ipv4address dox
authorRaj Bhattacharjea <raj.b@gatech.edu>
Mon, 14 May 2007 14:07:26 -0400
changeset 625 12fa3d0c4f94
parent 624 11cc5c692eb4
child 626 581bbde423d2
droptail and ipv4address dox
src/node/drop-tail.h
src/node/ipv4-address.h
--- a/src/node/drop-tail.h	Mon May 14 10:38:08 2007 -0400
+++ b/src/node/drop-tail.h	Mon May 14 14:07:26 2007 -0400
@@ -31,14 +31,29 @@
 
 const int DTQ_NPACKETS_MAX_DEFAULT = 100;
 
+/**
+ * \brief A FIFO packet queue that drops tail-end packets on overflow
+ */
 class DropTailQueue : public Queue {
 public:
   static const ClassId cid;
+  /**
+   * \brief DropTailQueue Constructor
+   *
+   * Creates a droptail queue with a maximum size of 100 packets by default
+   */
   DropTailQueue ();
 
   virtual ~DropTailQueue();
-
+  /**
+   * \param npackets The maximum number of packets this queue will hold before
+   * dropping packets.
+   */
   void SetMaxPackets (uint32_t npackets);
+  /**
+   * \return The maximum number of packets this queue will hold before dropping
+   * packets.
+   */
   uint32_t GetMaxPackets (void);
 
 private:
--- a/src/node/ipv4-address.h	Mon May 14 10:38:08 2007 -0400
+++ b/src/node/ipv4-address.h	Mon May 14 14:07:26 2007 -0400
@@ -27,31 +27,57 @@
 
 namespace ns3 {
 
-/* Ipv4 addresses are stored in host order in
- * this class.
- */
+/** Ipv4 addresses are stored in host order in
+  * this class.
+  */
 class Ipv4Address {
 public:
   Ipv4Address ();
-  /* input address is in host order. */
+  /**
+   * input address is in host order.
+   * \param address The host order 32-bit address
+   */
   Ipv4Address (uint32_t address);
-  /* input address is in format:
-   * hhh.xxx.xxx.lll
-   * where h is the high byte and l the
-   * low byte
+  /** 
+    * \brief Constructs an Ipv4Address by parsing a the input C-string
+    *
+    * Input address is in format:
+    * hhh.xxx.xxx.lll
+    * where h is the high byte and l the
+    * low byte
+    * \param address C-string containing the address as described above
+    */
+  Ipv4Address (char const *address);
+  
+  /**
+   * \brief Comparison operation between two Ipv4Addresses
+   * \param other address to which to compare this address
+   * \return True if the addresses are equal. False otherwise.
    */
-  Ipv4Address (char const *address);
-
   bool IsEqual (Ipv4Address other) const;
 
-  /* Using this method is frowned upon.
+  /** 
+   * \brief Get the host-order 32-bit IP address
+   *
+   * Using this method is frowned upon.
    * Please, do _not_ use this method.
    * It is there only for chunk-ipv4.
+   * \return the host-order 32-bit IP address
    */
   uint32_t GetHostOrder (void) const;
   void SetHostOrder (uint32_t ip);
+  /**
+   * Serialize this address to a 4-byte buffer
+   * \param buf output buffer to which this address gets overwritten with this
+   * Ipv4Address
+   */
   void Serialize (uint8_t buf[4]) const;
-
+  /**
+   * \brief Print this address to the given output stream
+   *
+   * The print format is in the typical "192.168.1.1"
+   * \param os The output stream to which this Ipv4Address is printed
+   */
   void Print (std::ostream &os) const;
 
   bool IsBroadcast (void);