BIND 10 #1238: IfaceMgr support for IPv4 (incl. Socket binding for v4)

BIND 10 Development do-not-reply at isc.org
Mon Dec 5 16:33:53 UTC 2011


#1238: IfaceMgr support for IPv4 (incl. Socket binding for v4)
-------------------------------------+-------------------------------------
                   Reporter:         |                 Owner:  tomek
  stephen                            |                Status:  reviewing
                       Type:  task   |             Milestone:  Sprint-
                   Priority:  major  |  DHCP-20111207
                  Component:  dhcp4  |            Resolution:
                   Keywords:         |             Sensitive:  0
            Defect Severity:  N/A    |           Sub-Project:  DHCP
Feature Depending on Ticket:         |  Estimated Difficulty:  0
        Add Hours to Ticket:  0      |           Total Hours:  0
                  Internal?:  0      |
-------------------------------------+-------------------------------------

Comment (by tomek):

 Replying to [comment:6 stephen]:
 > Changes between 7d2f07481169780071bf564223a20a219b550385 and
 a26b979adb54baabdf939ed1a7852b2ee9b8b93c
 >
 > '''src/bin/dhcp6/iface_mgr.h'''[[BR]]
 > At some time in the future we can probably replace !SocketInfo by a
 boost::ip::udp::socket (or an asiolink/udp_socket) object. (But not now,
 although please create a ticket to review this suggestion.)
 Created #1469.

 > Iface::delAddress: This removes the first element in the list that has
 the specified value. If the intention is to remove all elements in the
 vector with that value, an alternative is:
 > {{{
 > addrs_.erase(remove(addrs_.begin(), addrs_.end(), *a), addrs_.end());
 > }}}
 > (See Scott Meyers's "Effective STL", Item 9.)  (delSocket probably can't
 be optimised the same way owing to the need to close the socket only if
 the socket is found and the need to create a comparison function for two
 !SocketInfo structures.)
 That is a nice code. In theory, it is not useful here as the expectation
 is that OS will not allow adding the same address to specific interface
 more than once. Anyway, modified the code to use this approach.

 > openSocket6(): at the statement before the return, could get rid of the
 temporary variable "info" with:
 > {{{
 > iface.addSocket(SocketInfo(sock, addr, port));
 > }}}
 Having a temporary variable is marginally less effective, but it is easier
 for debugging. Nevertheless, done as you suggested. Also fixed that in
 openSocket4().

 > send() and receive4(): the correct "not implemented" exception is
 !NotImplemented.
 Done.
 >
 > '''src/bin/dhcp6/tests/dhcp6_srv_unittest.cc'''[[BR]]
 > Failes to compile due to error at line 124 (one or both of the arguments
 to the EXPECT_EQ don't have operator<<() defined.)
 Done.

-- 
Ticket URL: <http://bind10.isc.org/ticket/1238#comment:8>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list