summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2022-07-04 11:39:14 +0200
committerLudovic Courtès <ludo@gnu.org>2022-07-04 11:39:14 +0200
commit6da4be170ac40c8e86123d0e0d0907cb61e64872 (patch)
treeed26c2628f0f743c8fe5f26511cb3d812b5109b4 /doc
parentbaa14243355b8a4a7f5228d347ad3ff7057e7312 (diff)
downloadguile-6da4be170ac40c8e86123d0e0d0907cb61e64872.tar.gz
Define IN6ADDR_ANY and IN6ADDR_LOOPBACK.
* libguile/socket.c (scm_init_socket): Define IN6ADDR_ANY and IN6ADDR_LOOPBACK. * doc/ref/posix.texi (Network Address Conversion): Document them.
Diffstat (limited to 'doc')
-rw-r--r--doc/ref/posix.texi17
1 files changed, 16 insertions, 1 deletions
diff --git a/doc/ref/posix.texi b/doc/ref/posix.texi
index 7633bd5a3..50085cd80 100644
--- a/doc/ref/posix.texi
+++ b/doc/ref/posix.texi
@@ -2524,7 +2524,22 @@ Make an IPv4 Internet address by combining the network number
@cindex IPv6
An IPv6 Internet address is a 16-byte value, represented in Guile as
-an integer in host byte order, so that say ``::1'' is 1.
+an integer in host byte order, so that say ``::1'' is 1. The following
+constants are defined for convenience.
+
+@defvar IN6ADDR_ANY
+For a server, this can be used with @code{bind} (@pxref{Network Sockets
+and Communication}) to allow connections from any IPv6 interface on the
+machine.
+@end defvar
+
+@defvar IN6ADDR_LOOPBACK
+The address of the local host using the loopback device, ie.@:
+@samp{::1}.
+@end defvar
+
+The procedures below convert an IPv6 @emph{or} an IPv4 address to and
+from its textual representation.
@deffn {Scheme Procedure} inet-ntop family address
@deffnx {C Function} scm_inet_ntop (family, address)