summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Ryde <user42@zip.com.au>2003-09-12 23:59:30 +0000
committerKevin Ryde <user42@zip.com.au>2003-09-12 23:59:30 +0000
commit957f9f622d0de2747698af20c002971903f28814 (patch)
treee4b7543aed45ca12e2aed619ffef5b41b89f0c0c
parent5c3917e7f5fa22337f7988f0dd550d3cb1e4054c (diff)
downloadguile-957f9f622d0de2747698af20c002971903f28814.tar.gz
(Network Address Conversion): Under IPv4, describe
numeric representation in Guile, add INADDR_LOOPBACK and INADDR_BROADCAST, add commented-out INADDR_NONE.
-rw-r--r--doc/ref/posix.texi23
1 files changed, 23 insertions, 0 deletions
diff --git a/doc/ref/posix.texi b/doc/ref/posix.texi
index 33f6d7ca4..e70357f8a 100644
--- a/doc/ref/posix.texi
+++ b/doc/ref/posix.texi
@@ -1810,6 +1810,29 @@ between numeric and string formats.
@subsubsection IPv4 Address Conversion
+An IPv4 Internet address is a 4-byte value, represented in Guile as an
+integer in network byte order (meaning the first byte is the most
+significant in the number).
+
+@defvar INADDR_LOOPBACK
+The address of the local host using the loopback device, ie.@:
+@samp{127.0.0.1}.
+@end defvar
+
+@defvar INADDR_BROADCAST
+The broadcast address on the local network.
+@end defvar
+
+@c INADDR_NONE is defined in the code, but serves no purpose.
+@c inet_addr() returns it as an error indication, but that function
+@c isn't provided, for the good reason that inet_aton() does the same
+@c job and gives an unambiguous error indication. (INADDR_NONE is a
+@c valid 4-byte value, in glibc it's the same as INADDR_BROADCAST.)
+@c
+@c @defvar INADDR_NONE
+@c No address.
+@c @end defvar
+
@deffn {Scheme Procedure} inet-aton address
@deffnx {C Function} scm_inet_aton (address)
Convert an IPv4 Internet address from printable string