[xfer] Remove address family from definition of a socket opener

All implemented socket openers provide definitions for both IPv4 and
IPv6 using exactly the same opener method.  Simplify the logic by
omitting the address family from the definition.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2020-07-15 18:46:58 +01:00
parent 78ca890c35
commit a95a2eafc5
5 changed files with 7 additions and 35 deletions

View File

@@ -396,17 +396,9 @@ static struct interface_descriptor udp_xfer_desc =
***************************************************************************
*/
/** UDP IPv4 socket opener */
struct socket_opener udp_ipv4_socket_opener __socket_opener = {
/** UDP socket opener */
struct socket_opener udp_socket_opener __socket_opener = {
.semantics = UDP_SOCK_DGRAM,
.family = AF_INET,
.open = udp_open,
};
/** UDP IPv6 socket opener */
struct socket_opener udp_ipv6_socket_opener __socket_opener = {
.semantics = UDP_SOCK_DGRAM,
.family = AF_INET6,
.open = udp_open,
};