Bug#2237: setsockopt(2) doesn't document struct linger
Package: manpages
Version: 1.9-2
The manual page for setsockopt(2) doesn't adequately
document struct linger. Here's a quote:
Most socket-level options utilize an int parameter for
optval. For setsockopt, the parameter should be non-zero
to enable a boolean option, or zero if the option is to be
disabled. SO_LINGER uses a struct linger parameter,
defined in sys/socket.h, which specifies the desired state
of the option and the linger interval (see below).
While more information is given on the significance of the linger
interval, the struct itself is not documented. Furthermore,
more /usr/include/sys/socket.h is not adequate to find the
structure, so you have to go searching around the includes to
find the struct. [Turns out that it's in /usr/include/linux/socket.h
at the moment, but I'm going to have to either read the kernel sources
or chance upon better documentation for this thing before I feel
confident knowing what I'm doing with it. The include file doesn't
even document the units used to measure time.]
I could guess that l_onoff should be 1, and l_linger should be in
seconds, but...
--
Raul
Reply to: