mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-14 23:50:19 +02:00
Define IPPROTO_IPV6 and IPV6_V6ONLY.
* libguile/socket.c (scm_init_socket): Define IPPROTO_IPV6 and IPV6_V6ONLY. * doc/ref/posix.texi (Network Sockets and Communication): Document them.
This commit is contained in:
parent
6da4be170a
commit
abd39f3328
2 changed files with 18 additions and 0 deletions
|
@ -3202,6 +3202,7 @@ Databases}).
|
||||||
|
|
||||||
@defvar SOL_SOCKET
|
@defvar SOL_SOCKET
|
||||||
@defvarx IPPROTO_IP
|
@defvarx IPPROTO_IP
|
||||||
|
@defvarx IPPROTO_IPV6
|
||||||
@defvarx IPPROTO_TCP
|
@defvarx IPPROTO_TCP
|
||||||
@defvarx IPPROTO_UDP
|
@defvarx IPPROTO_UDP
|
||||||
@end defvar
|
@end defvar
|
||||||
|
@ -3266,6 +3267,16 @@ the interface @var{INTERFACEADDR}. @var{INTERFACEADDR} can be
|
||||||
@var{INTERFACEADDR} can also be an interface index number, on systems
|
@var{INTERFACEADDR} can also be an interface index number, on systems
|
||||||
supporting that.
|
supporting that.
|
||||||
@end defvar
|
@end defvar
|
||||||
|
|
||||||
|
Last, for IPv6 level (@code{IPPROTO_IPV6}), the following @var{optname}s
|
||||||
|
are defined. See @command{man 7 ipv6} for details.
|
||||||
|
|
||||||
|
@defvar IPV6_V6ONLY
|
||||||
|
Determines whether an @code{AF_INET6} socket is restricted to
|
||||||
|
transmitting IPv6 packets only, or whether it can also transmit packets
|
||||||
|
for an IPv4-mapped IPv6 address.
|
||||||
|
@end defvar
|
||||||
|
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
For @code{IPPROTO_TCP} level the following @var{optname}s are defined
|
For @code{IPPROTO_TCP} level the following @var{optname}s are defined
|
||||||
|
|
|
@ -1712,6 +1712,9 @@ scm_init_socket ()
|
||||||
#ifdef IPPROTO_IP
|
#ifdef IPPROTO_IP
|
||||||
scm_c_define ("IPPROTO_IP", scm_from_int (IPPROTO_IP));
|
scm_c_define ("IPPROTO_IP", scm_from_int (IPPROTO_IP));
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef IPPROTO_IPV6
|
||||||
|
scm_c_define ("IPPROTO_IPV6", scm_from_int (IPPROTO_IPV6));
|
||||||
|
#endif
|
||||||
#ifdef IPPROTO_TCP
|
#ifdef IPPROTO_TCP
|
||||||
scm_c_define ("IPPROTO_TCP", scm_from_int (IPPROTO_TCP));
|
scm_c_define ("IPPROTO_TCP", scm_from_int (IPPROTO_TCP));
|
||||||
#endif
|
#endif
|
||||||
|
@ -1801,6 +1804,10 @@ scm_init_socket ()
|
||||||
scm_c_define ("IP_MULTICAST_IF", scm_from_int ( IP_MULTICAST_IF));
|
scm_c_define ("IP_MULTICAST_IF", scm_from_int ( IP_MULTICAST_IF));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef IPV6_V6ONLY
|
||||||
|
scm_c_define ("IPV6_V6ONLY", scm_from_int (IPV6_V6ONLY));
|
||||||
|
#endif
|
||||||
|
|
||||||
scm_add_feature ("socket");
|
scm_add_feature ("socket");
|
||||||
|
|
||||||
#include "socket.x"
|
#include "socket.x"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue