Comtrol eCos User Manual
Page 564
Chapter 38. TCP/IP Library Reference
SO_DEBUG enables debugging in the underlying protocol modules.
SO_REUSEADDR indicates that the rules used in validating addresses sup-
plied in a bind(2) call should allow reuse of local addresses.
SO_REUSEPORT allows completely duplicate bindings by multiple processes
if they all set SO_REUSEPORT before binding the port.
This option per-
mits multiple instances of a program to each receive UDP/IP multicast or
broadcast datagrams destined for the bound port.
SO_KEEPALIVE enables
the periodic transmission of messages on a connected socket.
Should the
connected party fail to respond to these messages, the connection is con-
sidered broken and processes using the socket are notified via a SIGPIPE
signal when attempting to send data.
SO_DONTROUTE indicates that outgo-
ing messages should bypass the standard routing facilities.
Instead,
messages are directed to the appropriate network interface according to
the network portion of the destination address.
SO_LINGER controls the action taken when unsent messages are queued on
socket and a close(2) is performed.
If the socket promises reliable
delivery of data and SO_LINGER is set, the system will block the process
on the close(2) attempt until it is able to transmit the data or until it
decides it is unable to deliver the information (a timeout period mea-
sured in seconds, termed the linger interval, is specified in the
setsockopt() call when SO_LINGER is requested).
If SO_LINGER is disabled
and a close(2) is issued, the system will process the close in a manner
that allows the process to continue as quickly as possible.
The option SO_BROADCAST requests permission to send broadcast datagrams
on the socket.
Broadcast was a privileged operation in earlier versions
of the system.
With protocols that support out-of-band data, the
SO_OOBINLINE option requests that out-of-band data be placed in the nor-
mal data input queue as received; it will then be accessible with recv(2)
or read(2) calls without the MSG_OOB flag.
Some protocols always behave
as if this option is set.
SO_SNDBUF and SO_RCVBUF are options to adjust
the normal buffer sizes allocated for output and input buffers, respec-
tively.
The buffer size may be increased for high-volume connections, or
may be decreased to limit the possible backlog of incoming data.
The
system places an absolute limit on these values.
SO_SNDLOWAT is an option to set the minimum count for output operations.
Most output operations process all of the data supplied by the call,
delivering data to the protocol for transmission and blocking as neces-
sary for flow control.
Nonblocking output operations will process as
much data as permitted subject to flow control without blocking, but will
process no data if flow control does not allow the smaller of the low
water mark value or the entire request to be processed.
A select(2) or
poll(2) operation testing the ability to write to a socket will return
true only if the low water mark amount could be processed.
The default
value for SO_SNDLOWAT is set to a convenient size for network efficiency,
often 1024.
SO_RCVLOWAT is an option to set the minimum count for input
operations.
In general, receive calls will block until any (non-zero)
amount of data is received, then return with the smaller of the amount
available or the amount requested.
The default value for SO_RCVLOWAT is
1.
If SO_RCVLOWAT is set to a larger value, blocking receive calls nor-
mally wait until they have received the smaller of the low water mark
value or the requested amount.
Receive calls may still return less than
the low water mark if an error occurs, a signal is caught, or the type of
460