From: Marcin Siodelski Date: Wed, 18 Jun 2014 09:17:01 +0000 (+0200) Subject: [3437] Corrected doxygen docs for multicast-bound sockets. X-Git-Tag: trac3473_base~2^2~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ac4e478fea648a061c2ff15ddddedc8620cfc970;p=thirdparty%2Fkea.git [3437] Corrected doxygen docs for multicast-bound sockets. --- diff --git a/src/lib/dhcp/iface_mgr.cc b/src/lib/dhcp/iface_mgr.cc index e6aea3d55e..cabc269d24 100644 --- a/src/lib/dhcp/iface_mgr.cc +++ b/src/lib/dhcp/iface_mgr.cc @@ -545,9 +545,9 @@ IfaceMgr::openSockets6(const uint16_t port, continue; } - // Run OS-specific function to open a socket on link-local address - // and join multicast group (non-Linux OSes), or open two sockets and - // bind one to link-local, another one to multicast address. + // Run OS-specific function to open a socket capable of receiving + // packets sent to All_DHCP_Relay_Agents_and_Servers multicast + // address. if (openMulticastSocket(*iface, *addr, port, error_handler)) { ++count; } diff --git a/src/lib/dhcp/iface_mgr.h b/src/lib/dhcp/iface_mgr.h index 40076049db..b3ebd69d1c 100644 --- a/src/lib/dhcp/iface_mgr.h +++ b/src/lib/dhcp/iface_mgr.h @@ -1020,11 +1020,10 @@ private: /// @brief Open an IPv6 socket with multicast support. /// - /// This function opens socket(s) to allow reception of the DHCPv6 sent - /// to multicast address. It opens an IPv6 socket, binds it to link-local - /// address and joins multicast group (on non-Linux systems) or opens two - /// IPv6 sockets and binds one of them to link-local address and another - /// one to multicast address (on Linux systems). + /// This function opens a socket capable of receiving messages sent to + /// the All_DHCP_Relay_Agents_and_Servers (ff02::1:2) multicast address. + /// The socket is bound to the in6addr_any address and the IPV6_JOIN_GROUP + /// option is set to point to the ff02::1:2 multicast address. /// /// @note This function is intended to be called internally by the /// @c IfaceMgr::openSockets6. It is not intended to be called from any diff --git a/src/lib/dhcp/pkt_filter6.h b/src/lib/dhcp/pkt_filter6.h index dcddf6c20b..6f5960a1b5 100644 --- a/src/lib/dhcp/pkt_filter6.h +++ b/src/lib/dhcp/pkt_filter6.h @@ -125,10 +125,9 @@ public: /// @brief Joins IPv6 multicast group on a socket. /// - /// Socket must be created and bound to an address. Note that this - /// address is different than the multicast address. For example DHCPv6 - /// server should bind its socket to link-local address (fe80::1234...) - /// and later join ff02::1:2 multicast group. + /// This function joins the socket to the specified multicast group. + /// The socket descriptor must point to a valid socket bound to the + /// in6addr_any prior to calling this function. /// /// @param sock A socket descriptor (socket must be bound). /// @param ifname An interface name (for link-scoped multicast groups). diff --git a/src/lib/dhcp/pkt_filter_inet6.h b/src/lib/dhcp/pkt_filter_inet6.h index c475cf5de5..df524b36c2 100644 --- a/src/lib/dhcp/pkt_filter_inet6.h +++ b/src/lib/dhcp/pkt_filter_inet6.h @@ -37,7 +37,11 @@ public: /// @brief Opens a socket. /// /// This function open an IPv6 socket on an interface and binds it to a - /// specified UDP port and IP address. + /// specified UDP port and IP address. If the @c join_multicast parameter + /// is set to @c true, the function will attempt to join the socket to + /// the ff02::1:2 multicast group so as the multicast traffic can be + /// received. In this case the socket is bound to the in6addr_any + /// instead. /// /// @param iface Interface descriptor. /// @param addr Address on the interface to be used to send packets.