diff --git a/src/internet-apps/helper/dhcp-helper.h b/src/internet-apps/helper/dhcp-helper.h index 7fbbe171c..cb13b86c8 100644 --- a/src/internet-apps/helper/dhcp-helper.h +++ b/src/internet-apps/helper/dhcp-helper.h @@ -61,14 +61,14 @@ public: /** * \brief Install DHCP client of a nodes / NetDevice - * \param netDevice The NetDevice on which DHCP client application has to be installed + * \param netDevice The NetDevice that the DHCP client will use * \return The application container with DHCP client installed */ ApplicationContainer InstallDhcpClient (Ptr netDevice) const; /** * \brief Install DHCP client of a set of nodes / NetDevices - * \param netDevices The NetDevices on which DHCP client application has to be installed + * \param netDevices The NetDevices that the DHCP client will use * \return The application container with DHCP client installed */ ApplicationContainer InstallDhcpClient (NetDeviceContainer netDevices) const; @@ -95,15 +95,16 @@ public: /** * \brief Assign a fixed IP addresses to a net device. * \param netDevice The NetDevice on which the address has to be installed - * \param serverAddr The Ipv4Address - * \param poolMask The network mask + * \param addr The Ipv4Address + * \param mask The network mask + * \return the Ipv4 interface container */ Ipv4InterfaceContainer InstallFixedAddress (Ptr netDevice, Ipv4Address addr, Ipv4Mask mask); private: /** * \brief Function to install DHCP client on a node - * \param node The node on which DHCP client application has to be installed + * \param netDevice The NetDevice on which DHCP client application has to be installed * \return The pointer to the installed DHCP client */ Ptr InstallDhcpClientPriv (Ptr netDevice) const; diff --git a/src/internet-apps/model/dhcp-client.h b/src/internet-apps/model/dhcp-client.h index 7c1552391..90108d23d 100644 --- a/src/internet-apps/model/dhcp-client.h +++ b/src/internet-apps/model/dhcp-client.h @@ -96,6 +96,7 @@ protected: virtual void DoDispose (void); private: + /// client states enum States { WAIT_OFFER = 1, //!< State of a client that waits for the offer @@ -115,39 +116,39 @@ private: */ virtual void StopApplication (void); - /* + /** * \brief Handles changes in LinkState */ void LinkStateHandler (void); - /* + /** * \brief Handles incoming packets from the network * \param socket Socket bound to port 68 of the DHCP client */ void NetHandler (Ptr socket); - /* + /** * \brief Sends DHCP DISCOVER and changes the client state to WAIT_OFFER */ void Boot (void); - /* + /** * \brief Stores DHCP offers in m_offerList * \param header DhcpHeader of the DHCP OFFER message */ void OfferHandler (DhcpHeader header); - /* + /** * \brief Selects an OFFER from m_offerList */ void Select (void); - /* + /** * \brief Sends the DHCP REQUEST message and changes the client state to WAIT_ACK */ void Request (void); - /* + /** * \brief Receives the DHCP ACK and configures IP address of the client. * It also triggers the timeout, renew and rebind events. * \param header DhcpHeader of the DHCP ACK message @@ -155,7 +156,7 @@ private: */ void AcceptAck (DhcpHeader header, Address from); - /* + /** * \brief Remove the current DHCP information and restart the process */ void RemoveAndStart (); diff --git a/src/internet-apps/model/dhcp-header.h b/src/internet-apps/model/dhcp-header.h index 0b8b0356c..a6497adc7 100644 --- a/src/internet-apps/model/dhcp-header.h +++ b/src/internet-apps/model/dhcp-header.h @@ -99,6 +99,7 @@ public: */ ~DhcpHeader (); + /// BOOTP options enum Options { OP_MASK = 1, //!< BOOTP Option 1: Address Mask @@ -112,6 +113,7 @@ public: OP_END = 255 //!< BOOTP Option 255: END }; + /// DHCP messages enum Messages { DHCPDISCOVER = 0, //!< Code for DHCP Discover diff --git a/src/internet-apps/model/dhcp-server.h b/src/internet-apps/model/dhcp-server.h index c9a3c5dec..82fc7ef17 100644 --- a/src/internet-apps/model/dhcp-server.h +++ b/src/internet-apps/model/dhcp-server.h @@ -72,13 +72,13 @@ protected: private: static const int PORT = 67; //!< Port number of DHCP server - /* + /** * \brief Handles incoming packets from the network * \param socket Socket bound to port 67 of the DHCP server */ void NetHandler (Ptr socket); - /* + /** * \brief Sends DHCP offer after receiving DHCP Discover * \param iDev incoming NetDevice * \param header DHCP header of the received message @@ -86,7 +86,7 @@ private: */ void SendOffer (Ptr iDev, DhcpHeader header, InetSocketAddress from); - /* + /** * \brief Sends DHCP ACK (or NACK) after receiving Request * \param iDev incoming NetDevice * \param header DHCP header of the received message @@ -94,17 +94,17 @@ private: */ void SendAck (Ptr iDev, DhcpHeader header, InetSocketAddress from); - /* + /** * \brief Modifies the remaining lease time of addresses */ void TimerHandler (void); - /* + /** * \brief Starts the DHCP Server application */ virtual void StartApplication (void); - /* + /** * \brief Stops the DHCP client application */ virtual void StopApplication (void); diff --git a/src/internet-apps/test/dhcp-test.cc b/src/internet-apps/test/dhcp-test.cc index 619088a86..68586e00c 100644 --- a/src/internet-apps/test/dhcp-test.cc +++ b/src/internet-apps/test/dhcp-test.cc @@ -51,6 +51,7 @@ public: virtual ~DhcpTestCase (); /** * Triggered by an address lease on a client. + * \param context The test name. * \param newAddress The leased address. */ void LeaseObtained (std::string context, const Ipv4Address& newAddress);