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;
}
/// @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
/// @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).
/// @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.