Browse Source

[2187] Improve doxygen comments.

Marcin Siodelski 12 years ago
parent
commit
02dd6ed0dd
2 changed files with 22 additions and 0 deletions
  1. 6 0
      src/lib/dhcp/iface_mgr.h
  2. 16 0
      tests/tools/perfdhcp/test_control.h

+ 6 - 0
src/lib/dhcp/iface_mgr.h

@@ -372,6 +372,8 @@ public:
     ///
     ///
     /// @param pkt packet to be sent
     /// @param pkt packet to be sent
     ///
     ///
+    /// @throw isc::BadValue if invalid interface specified in the packet.
+    /// @throw isc::dhcp::SocketWriteError if sendmsg() failed to send packet.
     /// @return true if sending was successful
     /// @return true if sending was successful
     bool send(const Pkt6Ptr& pkt);
     bool send(const Pkt6Ptr& pkt);
 
 
@@ -383,6 +385,8 @@ public:
     ///
     ///
     /// @param pkt a packet to be sent
     /// @param pkt a packet to be sent
     ///
     ///
+    /// @throw isc::BadValue if invalid interface specified in the packet.
+    /// @throw isc::dhcp::SocketWriteError if sendmsg() failed to send packet.
     /// @return true if sending was successful
     /// @return true if sending was successful
     bool send(const Pkt4Ptr& pkt);
     bool send(const Pkt4Ptr& pkt);
 
 
@@ -401,6 +405,7 @@ public:
     /// (in microseconds)
     /// (in microseconds)
     ///
     ///
     /// @throw isc::BadValue if timeout_usec is greater than one million
     /// @throw isc::BadValue if timeout_usec is greater than one million
+    /// @throw isc::dhcp::SocketReadError if error occured when receiving a packet.
     /// @return Pkt6 object representing received packet (or NULL)
     /// @return Pkt6 object representing received packet (or NULL)
     Pkt6Ptr receive6(uint32_t timeout_sec, uint32_t timeout_usec = 0);
     Pkt6Ptr receive6(uint32_t timeout_sec, uint32_t timeout_usec = 0);
 
 
@@ -415,6 +420,7 @@ public:
     /// (in microseconds)
     /// (in microseconds)
     ///
     ///
     /// @throw isc::BadValue if timeout_usec is greater than one million
     /// @throw isc::BadValue if timeout_usec is greater than one million
+    /// @throw isc::dhcp::SocketReadError if error occured when receiving a packet.
     /// @return Pkt4 object representing received packet (or NULL)
     /// @return Pkt4 object representing received packet (or NULL)
     Pkt4Ptr receive4(uint32_t timeout_sec, uint32_t timeout_usec = 0);
     Pkt4Ptr receive4(uint32_t timeout_sec, uint32_t timeout_usec = 0);
 
 

+ 16 - 0
tests/tools/perfdhcp/test_control.h

@@ -550,8 +550,10 @@ protected:
     ///
     ///
     /// \param socket socket to be used to send the message.
     /// \param socket socket to be used to send the message.
     /// \param preload preload mode, packets not included in statistics.
     /// \param preload preload mode, packets not included in statistics.
+    ///
     /// \throw isc::Unexpected if failed to create new packet instance.
     /// \throw isc::Unexpected if failed to create new packet instance.
     /// \throw isc::BadValue if MAC address has invalid length.
     /// \throw isc::BadValue if MAC address has invalid length.
+    /// \throw isc::dhcp::SocketWriteError if failed to send the packet.
     void sendDiscover4(const TestControlSocket& socket,
     void sendDiscover4(const TestControlSocket& socket,
                        const bool preload = false);
                        const bool preload = false);
 
 
@@ -567,7 +569,9 @@ protected:
     /// \param socket socket to be used to send the message.
     /// \param socket socket to be used to send the message.
     /// \param template_buf buffer holding template packet.
     /// \param template_buf buffer holding template packet.
     /// \param preload preload mode, packets not included in statistics.
     /// \param preload preload mode, packets not included in statistics.
+    ///
     /// \throw isc::OutOfRange if randomization offset is out of bounds.
     /// \throw isc::OutOfRange if randomization offset is out of bounds.
+    /// \throw isc::dhcp::SocketWriteError if failed to send the packet.
     void sendDiscover4(const TestControlSocket& socket,
     void sendDiscover4(const TestControlSocket& socket,
                        const std::vector<uint8_t>& template_buf,
                        const std::vector<uint8_t>& template_buf,
                        const bool preload = false);
                        const bool preload = false);
@@ -581,9 +585,11 @@ protected:
     /// \param socket socket to be used to send message.
     /// \param socket socket to be used to send message.
     /// \param discover_pkt4 DISCOVER packet sent.
     /// \param discover_pkt4 DISCOVER packet sent.
     /// \param offer_pkt4 OFFER packet object.
     /// \param offer_pkt4 OFFER packet object.
+    ///
     /// \throw isc::Unexpected if unexpected error occured.
     /// \throw isc::Unexpected if unexpected error occured.
     /// \throw isc::InvalidOperation if Statistics Manager has not been
     /// \throw isc::InvalidOperation if Statistics Manager has not been
     /// initialized.
     /// initialized.
+    /// \throw isc::dhcp::SocketWriteError if failed to send the packet.
     void sendRequest4(const TestControlSocket& socket,
     void sendRequest4(const TestControlSocket& socket,
                       const dhcp::Pkt4Ptr& discover_pkt4,
                       const dhcp::Pkt4Ptr& discover_pkt4,
                       const dhcp::Pkt4Ptr& offer_pkt4);
                       const dhcp::Pkt4Ptr& offer_pkt4);
@@ -598,6 +604,8 @@ protected:
     /// \param template_buf buffer holding template packet.
     /// \param template_buf buffer holding template packet.
     /// \param discover_pkt4 DISCOVER packet sent.
     /// \param discover_pkt4 DISCOVER packet sent.
     /// \param offer_pkt4 OFFER packet received.
     /// \param offer_pkt4 OFFER packet received.
+    ///
+    /// \throw isc::dhcp::SocketWriteError if failed to send the packet.
     void sendRequest4(const TestControlSocket& socket,
     void sendRequest4(const TestControlSocket& socket,
                       const std::vector<uint8_t>& template_buf,
                       const std::vector<uint8_t>& template_buf,
                       const dhcp::Pkt4Ptr& discover_pkt4,
                       const dhcp::Pkt4Ptr& discover_pkt4,
@@ -618,6 +626,8 @@ protected:
     /// \throw isc::Unexpected if unexpected error occured.
     /// \throw isc::Unexpected if unexpected error occured.
     /// \throw isc::InvalidOperation if Statistics Manager has not been
     /// \throw isc::InvalidOperation if Statistics Manager has not been
     /// initialized.
     /// initialized.
+    ///
+    /// \throw isc::dhcp::SocketWriteError if failed to send the packet.
     void sendRequest6(const TestControlSocket& socket,
     void sendRequest6(const TestControlSocket& socket,
                       const dhcp::Pkt6Ptr& advertise_pkt6);
                       const dhcp::Pkt6Ptr& advertise_pkt6);
 
 
@@ -630,6 +640,8 @@ protected:
     /// \param socket socket to be used to send message.
     /// \param socket socket to be used to send message.
     /// \param template_buf packet template buffer.
     /// \param template_buf packet template buffer.
     /// \param advertise_pkt6 ADVERTISE packet object.
     /// \param advertise_pkt6 ADVERTISE packet object.
+    ///
+    /// \throw isc::dhcp::SocketWriteError if failed to send the packet.
     void sendRequest6(const TestControlSocket& socket,
     void sendRequest6(const TestControlSocket& socket,
                       const std::vector<uint8_t>& template_buf,
                       const std::vector<uint8_t>& template_buf,
                       const dhcp::Pkt6Ptr& advertise_pkt6);
                       const dhcp::Pkt6Ptr& advertise_pkt6);
@@ -648,7 +660,9 @@ protected:
     ///
     ///
     /// \param socket socket to be used to send the message.
     /// \param socket socket to be used to send the message.
     /// \param preload mode, packets not included in statistics.
     /// \param preload mode, packets not included in statistics.
+    ///
     /// \throw isc::Unexpected if failed to create new packet instance.
     /// \throw isc::Unexpected if failed to create new packet instance.
+    /// \throw isc::dhcp::SocketWriteError if failed to send the packet.
     void sendSolicit6(const TestControlSocket& socket,
     void sendSolicit6(const TestControlSocket& socket,
                       const bool preload = false);
                       const bool preload = false);
 
 
@@ -661,6 +675,8 @@ protected:
     /// \param socket socket to be used to send the message.
     /// \param socket socket to be used to send the message.
     /// \param template_buf packet template buffer.
     /// \param template_buf packet template buffer.
     /// \param preload mode, packets not included in statistics.
     /// \param preload mode, packets not included in statistics.
+    ///
+    /// \throw isc::dhcp::SocketWriteError if failed to send the packet.
     void sendSolicit6(const TestControlSocket& socket,
     void sendSolicit6(const TestControlSocket& socket,
                       const std::vector<uint8_t>& template_buf,
                       const std::vector<uint8_t>& template_buf,
                       const bool preload = false);
                       const bool preload = false);