From: Kevin Ryde <user42@zip.com.au>
Subject: doc getsockopt, setsockopt
Date: Thu, 29 Sep 2005 07:31:38 +1000 [thread overview]
Message-ID: <87k6h0g9qd.fsf@zip.com.au> (raw)
I'm looking to combine the getsockopt and setsockopt descriptions and
add the available constants, including the new IP_ADD_MEMBERSHIP and
IP_DROP_MEMBERSHIP, especially since you need to know to pass a pair
for those (and for SO_LINGER).
I'm not sure if SOL_IP is meant to be used directly. You'd think so
from the name, but the getsockopt man page refers to getprotoent(). I
think I'll change socket.c from IPPROTO_IP to SOL_IP. The two are the
same value, but best to ensure the code matches the docs.
-- Scheme Procedure: getsockopt sock level optname
-- Scheme Procedure: setsockopt sock level optname value
-- C Function: scm_getsockopt (sock, level, optname)
-- C Function: scm_setsockopt (sock, level, optname, value)
Get or set an option on socket port SOCK. `getsockopt' returns
the current value. `setsockopt' sets a value and the return is
unspecified.
LEVEL is an integer specifying a protocol layer. The following
values are defined (when provided by the system),
-- Variable: SOL_SOCKET
-- Variable: SOL_IP
-- Variable: SOL_TCP
-- Variable: SOL_UDP
OPTNAME is an integer specifying an option within the protocol
layer.
For `SOL_SOCK' level the following OPTNAMEs are defined (when
provided by the system). For what they mean see *note
Socket-Level Options: (libc)Socket-Level Options, or `man 7
socket'.
-- Variable: SO_DEBUG
-- Variable: SO_REUSEADDR
-- Variable: SO_STYLE
-- Variable: SO_TYPE
-- Variable: SO_ERROR
-- Variable: SO_DONTROUTE
-- Variable: SO_BROADCAST
-- Variable: SO_SNDBUF
-- Variable: SO_RCVBUF
-- Variable: SO_KEEPALIVE
-- Variable: SO_OOBINLINE
-- Variable: SO_NO_CHECK
-- Variable: SO_PRIORITY
The VALUE taken or returned is an integer.
-- Variable: SO_LINGER
The VALUE taken or returned is a pair of integers `(ENABLE .
TIMEOUT)'. On old systems without timeout support (ie.
without `struct linger'), only ENABLE has an effect, but the
value in Guile is still a pair.
For `SOL_IP' level the following options are defined (when
provided by the system). See `man 7 ip' for what they mean.
-- Variable: IP_ADD_MEMBERSHIP
-- Variable: IP_DROP_MEMBERSHIP
These can be used only with `setsockopt', not `getsockopt'.
VALUE is a pair of integer IPv4 addresses `(MULTIADDR .
INTERFACEADDR)' (*note Network Address Conversion::).
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel
next reply other threads:[~2005-09-28 21:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-28 21:31 Kevin Ryde [this message]
2005-09-30 15:58 ` doc getsockopt, setsockopt Greg Troxel
2005-09-30 23:06 ` Kevin Ryde
2005-10-02 23:09 ` Greg Troxel
2005-10-03 1:10 ` Kevin Ryde
2005-10-03 23:46 ` Greg Troxel
2005-10-11 22:54 ` Kevin Ryde
2005-10-12 14:30 ` Greg Troxel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k6h0g9qd.fsf@zip.com.au \
--to=user42@zip.com.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).