Browse Source

[4067] Addressed review comments

    Updated commentary in pkt_filter_test_stub.h as requested.
Thomas Markwalder 9 years ago
parent
commit
0709db27b3
1 changed files with 5 additions and 3 deletions
  1. 5 3
      src/lib/dhcp/tests/pkt_filter_test_stub.h

+ 5 - 3
src/lib/dhcp/tests/pkt_filter_test_stub.h

@@ -47,9 +47,11 @@ public:
 
     /// @brief Simulate opening of the socket.
     ///
-    /// This function simulates opening a primary socket. In reality, it doesn't
-    /// open a socket but the socket descriptor returned in the SocketInfo
-    /// structure is always set to 0.
+    /// This function simulates opening a primary socket. Rather than open
+    /// an actual socket, the stub peforms a read-only open of "/dev/null".
+    /// The fd returned by this open saved as the socket's descriptor in the
+    /// SocketInfo structure.  This way the filter consumes an actual
+    /// descriptor and retains it until its socket is closed.
     ///
     /// @param iface An interface descriptor.
     /// @param addr Address on the interface to be used to send packets.