[tcp] Add AF_INET6 socket opener

Signed-off-by: Michael Brown <mcb30@ipxe.org>
pull/14/merge
Michael Brown 2013-10-21 14:17:03 +01:00
parent 7405685df2
commit 9f324cf9a5
1 changed files with 9 additions and 2 deletions

View File

@ -1396,13 +1396,20 @@ static struct interface_descriptor tcp_xfer_desc =
***************************************************************************
*/
/** TCP socket opener */
struct socket_opener tcp_socket_opener __socket_opener = {
/** TCP IPv4 socket opener */
struct socket_opener tcp_ipv4_socket_opener __socket_opener = {
.semantics = TCP_SOCK_STREAM,
.family = AF_INET,
.open = tcp_open,
};
/** TCP IPv6 socket opener */
struct socket_opener tcp_ipv6_socket_opener __socket_opener = {
.semantics = TCP_SOCK_STREAM,
.family = AF_INET6,
.open = tcp_open,
};
/** Linkage hack */
int tcp_sock_stream = TCP_SOCK_STREAM;