unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* doc getsockopt, setsockopt
@ 2005-09-28 21:31 Kevin Ryde
  2005-09-30 15:58 ` Greg Troxel
  0 siblings, 1 reply; 8+ messages in thread
From: Kevin Ryde @ 2005-09-28 21:31 UTC (permalink / 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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-10-12 14:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-28 21:31 doc getsockopt, setsockopt Kevin Ryde
2005-09-30 15:58 ` 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

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).