Ver código fonte

[tcp] Add AF_INET6 socket opener

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 11 anos atrás
pai
commit
9f324cf9a5
1 arquivos alterados com 9 adições e 2 exclusões
  1. 9
    2
      src/net/tcp.c

+ 9
- 2
src/net/tcp.c Ver arquivo

@@ -1396,13 +1396,20 @@ static struct interface_descriptor tcp_xfer_desc =
1396 1396
  ***************************************************************************
1397 1397
  */
1398 1398
 
1399
-/** TCP socket opener */
1400
-struct socket_opener tcp_socket_opener __socket_opener = {
1399
+/** TCP IPv4 socket opener */
1400
+struct socket_opener tcp_ipv4_socket_opener __socket_opener = {
1401 1401
 	.semantics	= TCP_SOCK_STREAM,
1402 1402
 	.family		= AF_INET,
1403 1403
 	.open		= tcp_open,
1404 1404
 };
1405 1405
 
1406
+/** TCP IPv6 socket opener */
1407
+struct socket_opener tcp_ipv6_socket_opener __socket_opener = {
1408
+	.semantics	= TCP_SOCK_STREAM,
1409
+	.family		= AF_INET6,
1410
+	.open		= tcp_open,
1411
+};
1412
+
1406 1413
 /** Linkage hack */
1407 1414
 int tcp_sock_stream = TCP_SOCK_STREAM;
1408 1415
 

Carregando…
Cancelar
Salvar