summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-10-13 19:05:49 -0700
committerKaz Kylheku <kaz@kylheku.com>2016-10-13 19:05:49 -0700
commitaa48ae0df546d78602962096b3b9578fae47b645 (patch)
treed946e05ed4ebe69b931ffbb7ce53984ef114a63f /txr.1
parentd94af272503d246929556087ae687d0fa8170611 (diff)
downloadtxr-aa48ae0df546d78602962096b3b9578fae47b645.tar.gz
txr-aa48ae0df546d78602962096b3b9578fae47b645.tar.bz2
txr-aa48ae0df546d78602962096b3b9578fae47b645.zip
Adding family slot to socket addresses.
A static slot indicating the address family simplifies code which wants to map a socket address to its family. * lisplib.c (sock_instantiate): Call sock_load_init before loading socket.tl rather than after, because socket.tl now references variables defined inside sock_load_init. * share/txr/stdlib/socket.tl (sockaddr, sockaddr-in, sockaddr-in6, sockaddr-un): New static slot, family. * txr.1: Documented family slots.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.132
1 files changed, 28 insertions, 4 deletions
diff --git a/txr.1 b/txr.1
index 051eafff..2f410c14 100644
--- a/txr.1
+++ b/txr.1
@@ -43009,7 +43009,8 @@ newly created datagram socket which is returned.
.coNP Structure @ sockaddr
.synb
-.mets (defstruct sockaddr nil)
+.mets (defstruct sockaddr nil
+.mets \ \ (:static family nil))
.syne
.desc
The
@@ -43021,10 +43022,16 @@ several other types are derived:
and
.codn sockaddr-un .
+It has a single slot called
+.code family
+which is static, and initialized to
+.codn nil .
+
.coNP Structure @ sockaddr-in
.synb
.mets (defstruct sockaddr-in sockaddr
-.mets \ \ (addr 0) (port 0))
+.mets \ \ (addr 0) (port 0)
+.mets \ \ (:static family af-inet))
.syne
.desc
The
@@ -43056,10 +43063,16 @@ for instance, when the
function is used with the aim of looking up the address of a host, without
caring about the port number.
+The
+.code family
+static slot holds the value
+.codn af-inet .
+
.coNP Structure @ sockaddr-in6
.synb
.mets (defstruct sockaddr-in6 sockaddr
-.mets \ \ (addr 0) (port 0) (flow-info 0) (scope-id 0))
+.mets \ \ (addr 0) (port 0) (flow-info 0) (scope-id 0)
+.mets \ \ (:static family af-inet6))
.syne
.desc
The
@@ -43092,10 +43105,16 @@ members of the
.code sockaddr_in6
C language structure. Their meaning and use are beyond the scope of this document.
+The
+.code family
+static slot holds the value
+.codn af-inet .
+
.coNP Structure @ sockaddr-un
.synb
.mets (defstruct sockaddr-un sockaddr
-.mets \ \ path)
+.mets \ \ path
+.mets \ \ (:static family af-unix))
.syne
.desc
The
@@ -43144,6 +43163,11 @@ is valid and represents an abstract address consisting of the three bytes
.str "foo"
followed by null padding bytes.
+The
+.code family
+static slot holds the value
+.codn af-inet .
+
.coNP Structure @ addrinfo
.synb
.mets (defstruct addrinfo nil