connect.2, listen.2, send.2, uname.2, cmsg.3, proc.5, arp.7, ddp.7, icmp.7, ip.7, raw.7, socket.7, tcp.7, udp.7: Global fix: eliminate mention of the obsolete sysctl(2) interface

Many pages still mention use of the obsolete sysctl(2) system
call, or used the term "sysctls"; rewrite these mentions to
instead be in terms of /proc interfaces.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2008-11-20 15:37:11 -05:00
parent 5f06e2ff26
commit 5a2ff571fb
14 changed files with 132 additions and 131 deletions

View File

@ -62,7 +62,7 @@
.\" Modified 1998, 1999 by Andi Kleen .\" Modified 1998, 1999 by Andi Kleen
.\" Modified 2004-06-23 by Michael Kerrisk <mtk.manpages@gmail.com> .\" Modified 2004-06-23 by Michael Kerrisk <mtk.manpages@gmail.com>
.\" .\"
.TH CONNECT 2 2008-08-08 "Linux" "Linux Programmer's Manual" .TH CONNECT 2 2008-11-20 "Linux" "Linux Programmer's Manual"
.SH NAME .SH NAME
connect \- initiate a connection on a socket connect \- initiate a connection on a socket
.SH SYNOPSIS .SH SYNOPSIS
@ -156,11 +156,10 @@ field.
No more free local ports or insufficient entries in the routing cache. No more free local ports or insufficient entries in the routing cache.
For For
.B AF_INET .B AF_INET
see the see the description of
.I net.ipv4.ip_local_port_range .I /proc/sys/net/ipv4/ip_local_port_range
sysctl in
.BR ip (7) .BR ip (7)
on how to increase the number of local ports. for information on how to increase the number of local ports.
.TP .TP
.B EALREADY .B EALREADY
The socket is non-blocking and a previous connection attempt has not yet The socket is non-blocking and a previous connection attempt has not yet

View File

@ -40,7 +40,7 @@
.\" Modified 11 May 2001 by Sam Varshavchik <mrsam@courier-mta.com> .\" Modified 11 May 2001 by Sam Varshavchik <mrsam@courier-mta.com>
.\" .\"
.\" .\"
.TH LISTEN 2 2007-12-28 "Linux" "Linux Programmer's Manual" .TH LISTEN 2 2008-11-20 "Linux" "Linux Programmer's Manual"
.SH NAME .SH NAME
listen \- listen for connections on a socket listen \- listen for connections on a socket
.SH SYNOPSIS .SH SYNOPSIS
@ -141,11 +141,10 @@ Now it specifies the queue length for
established sockets waiting to be accepted, established sockets waiting to be accepted,
instead of the number of incomplete connection requests. instead of the number of incomplete connection requests.
The maximum length of the queue for incomplete sockets The maximum length of the queue for incomplete sockets
can be set using the can be set using
.I tcp_max_syn_backlog .IR /proc/sys/net/ipv4/tcp_max_syn_backlog .
sysctl.
When syncookies are enabled there is no logical maximum When syncookies are enabled there is no logical maximum
length and this sysctl setting is ignored. length and this setting is ignored.
See See
.BR tcp (7) .BR tcp (7)
for more information. for more information.

View File

@ -35,7 +35,7 @@
.\" Modified Oct 2003 by aeb .\" Modified Oct 2003 by aeb
.\" Modified 2004-07-01 by mtk .\" Modified 2004-07-01 by mtk
.\" .\"
.TH SEND 2 2008-10-06 "Linux" "Linux Programmer's Manual" .TH SEND 2 2008-11-20 "Linux" "Linux Programmer's Manual"
.SH NAME .SH NAME
send, sendto, sendmsg \- send a message on a socket send, sendto, sendmsg \- send a message on a socket
.SH SYNOPSIS .SH SYNOPSIS
@ -255,9 +255,9 @@ and
.I msg_controllen .I msg_controllen
members. members.
The maximum control buffer length the kernel can process is limited The maximum control buffer length the kernel can process is limited
per socket by the per socket by the value in
.I net.core.optmem_max .IR /proc/sys/net/core/optmem_max ;
sysctl; see see
.BR socket (7). .BR socket (7).
.\" Still to be documented: .\" Still to be documented:
.\" Send file descriptors and user credentials using the .\" Send file descriptors and user credentials using the

View File

@ -22,7 +22,7 @@
.\" .\"
.\" 2007-07-05 mtk: Added details on underlying system call interfaces .\" 2007-07-05 mtk: Added details on underlying system call interfaces
.\" .\"
.TH UNAME 2 2008-11-19 "Linux" "Linux Programmer's Manual" .TH UNAME 2 2008-11-20 "Linux" "Linux Programmer's Manual"
.SH NAME .SH NAME
uname \- get name and information about current kernel uname \- get name and information about current kernel
.SH SYNOPSIS .SH SYNOPSIS
@ -119,8 +119,6 @@ idea to use any of these constants; just use sizeof(...).
Often 257 is chosen in order to have room for an internet hostname. Often 257 is chosen in order to have room for an internet hostname.
.LP .LP
Part of the utsname information is also accessible via Part of the utsname information is also accessible via
.BR sysctl (2)
and via
.IR /proc/sys/kernel/ { ostype , .IR /proc/sys/kernel/ { ostype ,
.IR hostname , .IR hostname ,
.IR osrelease , .IR osrelease ,

View File

@ -4,7 +4,7 @@
.\" and in case of nontrivial modification author and date .\" and in case of nontrivial modification author and date
.\" of the modification is added to the header. .\" of the modification is added to the header.
.\" $Id: cmsg.3,v 1.8 2000/12/20 18:10:31 ak Exp $ .\" $Id: cmsg.3,v 1.8 2000/12/20 18:10:31 ak Exp $
.TH CMSG 3 1998-10-02 "Linux" "Linux Programmer's Manual" .TH CMSG 3 2008-11-20 "Linux" "Linux Programmer's Manual"
.SH NAME .SH NAME
CMSG_ALIGN, CMSG_SPACE, CMSG_NXTHDR, CMSG_FIRSTHDR \- Access ancillary data CMSG_ALIGN, CMSG_SPACE, CMSG_NXTHDR, CMSG_FIRSTHDR \- Access ancillary data
.SH SYNOPSIS .SH SYNOPSIS
@ -51,9 +51,9 @@ structures with appended data.
This sequence should only be accessed This sequence should only be accessed
using the macros described in this manual page and never directly. using the macros described in this manual page and never directly.
See the specific protocol man pages for the available control message types. See the specific protocol man pages for the available control message types.
The maximum ancillary buffer size allowed per socket can be set using the The maximum ancillary buffer size allowed per socket can be set using
.I net.core.optmem_max .IR /proc/sys/net/core/optmem_max ;
sysctl; see see
.BR socket (7). .BR socket (7).
.PP .PP
.BR CMSG_FIRSTHDR () .BR CMSG_FIRSTHDR ()

View File

@ -1706,7 +1706,7 @@ See also
This directory (present since 1.3.57) contains a number of files This directory (present since 1.3.57) contains a number of files
and subdirectories corresponding to kernel variables. and subdirectories corresponding to kernel variables.
These variables can be read and sometimes modified using These variables can be read and sometimes modified using
the \fI/proc\fP file system, and the the \fI/proc\fP file system, and the (deprecated)
.BR sysctl (2) .BR sysctl (2)
system call. system call.
Presently, there are subdirectories Presently, there are subdirectories

View File

@ -6,7 +6,7 @@
.\" of the modification is added to the header. .\" of the modification is added to the header.
.\" Modified June 1999 Andi Kleen .\" Modified June 1999 Andi Kleen
.\" $Id: arp.7,v 1.10 2000/04/27 19:31:38 ak Exp $ .\" $Id: arp.7,v 1.10 2000/04/27 19:31:38 ak Exp $
.TH ARP 7 2008-08-08 "Linux" "Linux Programmer's Manual" .TH ARP 7 2008-11-20 "Linux" "Linux Programmer's Manual"
.SH NAME .SH NAME
arp \- Linux ARP kernel module. arp \- Linux ARP kernel module.
.SH DESCRIPTION .SH DESCRIPTION
@ -39,10 +39,14 @@ Entries which are marked
as permanent are never deleted by the garbage-collector. as permanent are never deleted by the garbage-collector.
The cache can The cache can
be directly manipulated by the use of ioctls and its behavior can be be directly manipulated by the use of ioctls and its behavior can be
tuned by the sysctls defined below. tuned by the
.I /proc
interfaces described below.
When there is no positive feedback for an existing mapping after some When there is no positive feedback for an existing mapping after some
time (see the sysctls below) a neighbor cache entry is considered stale. time (see the
.I /proc
interfaces below) a neighbor cache entry is considered stale.
Positive feedback can be gotten from a higher layer; for example from Positive feedback can be gotten from a higher layer; for example from
a successful TCP ACK. a successful TCP ACK.
Other protocols can signal forward progress Other protocols can signal forward progress
@ -128,19 +132,18 @@ Linux 2.2 does not support proxy network ARP entries, so this
should be set to 0xffffffff, or 0 to remove an existing proxy arp entry. should be set to 0xffffffff, or 0 to remove an existing proxy arp entry.
.B ATF_USETRAILERS .B ATF_USETRAILERS
is obsolete and should not be used. is obsolete and should not be used.
.SS Sysctls .SS /proc interfaces
ARP supports a sysctl interface to configure parameters on a global ARP supports a range of
or per-interface basis. .I /proc
The sysctls can be accessed by reading or writing the interfaces to configure parameters on a global or per-interface basis.
The interfaces can be accessed by reading or writing the
.I /proc/sys/net/ipv4/neigh/*/* .I /proc/sys/net/ipv4/neigh/*/*
files or with the files.
.BR sysctl (2)
interface.
Each interface in the system has its own directory in Each interface in the system has its own directory in
/proc/sys/net/ipv4/neigh/. .IR /proc/sys/net/ipv4/neigh/ .
The setting in the "default" directory is used for all newly created The setting in the "default" directory is used for all newly created
devices. devices.
Unless otherwise specified time-related sysctls are specified Unless otherwise specified time-related interfaces are specified
in seconds. in seconds.
.TP .TP
.I anycast_delay .I anycast_delay
@ -249,7 +252,7 @@ forwarding and proxy arp is enabled for the interface).
The The
.I neigh/* .I neigh/*
sysctls did not exist before Linux 2.2. interfaces did not exist before Linux 2.2.
.SH BUGS .SH BUGS
Some timer settings are specified in jiffies, which is architecture- Some timer settings are specified in jiffies, which is architecture-
and kernel version-dependent; see and kernel version-dependent; see

View File

@ -4,7 +4,7 @@
.\" and in case of nontrivial modification author and date .\" and in case of nontrivial modification author and date
.\" of the modification is added to the header. .\" of the modification is added to the header.
.\" $Id: ddp.7,v 1.3 1999/05/13 11:33:22 freitag Exp $ .\" $Id: ddp.7,v 1.3 1999/05/13 11:33:22 freitag Exp $
.TH DDP 7 2008-08-08 "Linux" "Linux Programmer's Manual" .TH DDP 7 2008-11-20 "Linux" "Linux Programmer's Manual"
.SH NAME .SH NAME
ddp \- Linux AppleTalk protocol implementation ddp \- Linux AppleTalk protocol implementation
.SH SYNOPSIS .SH SYNOPSIS
@ -114,14 +114,12 @@ local broadcast address.
.\" FIXME this doesn't make sense [johnl] .\" FIXME this doesn't make sense [johnl]
.SS "Socket Options" .SS "Socket Options"
No protocol-specific socket options are supported. No protocol-specific socket options are supported.
.SS Sysctls .SS /proc interfaces
IP supports a sysctl interface to configure some global AppleTalk IP supports a set of
parameters. .I /proc
The sysctls can be accessed by reading or writing the interfaces to configure some global AppleTalk parameters.
.I /proc/sys/net/atalk/* The parameters can be accessed by reading or writing files in the directory
files or with the .IR /proc/sys/net/atalk/ .
.BR sysctl (2)
interface.
.TP .TP
.I aarp-expiry-time .I aarp-expiry-time
The time interval (in seconds) before an AARP cache entry expires. The time interval (in seconds) before an AARP cache entry expires.
@ -141,7 +139,7 @@ changed.
.SS Ioctls .SS Ioctls
All ioctls described in All ioctls described in
.BR socket (7) .BR socket (7)
apply to ddp. apply to DDP.
.\" FIXME Add a section about multicasting .\" FIXME Add a section about multicasting
.SH ERRORS .SH ERRORS
.\" FIXME document all errors. We should really fix the kernels to .\" FIXME document all errors. We should really fix the kernels to
@ -218,9 +216,8 @@ The socket was unconfigured, or an unknown socket type was requested.
.SH VERSIONS .SH VERSIONS
Appletalk is supported by Linux 2.0 or higher. Appletalk is supported by Linux 2.0 or higher.
The The
.B sysctl .I /proc
interface is interfaces exist since Linux 2.2.
new in Linux 2.2.
.SH NOTES .SH NOTES
Be very careful with the Be very careful with the
.B SO_BROADCAST .B SO_BROADCAST

View File

@ -4,7 +4,7 @@
.\" and in case of nontrivial modification author and date .\" and in case of nontrivial modification author and date
.\" of the modification is added to the header. .\" of the modification is added to the header.
.\" $Id: icmp.7,v 1.6 2000/08/14 08:03:45 ak Exp $ .\" $Id: icmp.7,v 1.6 2000/08/14 08:03:45 ak Exp $
.TH ICMP 7 1999-04-27 "Linux" "Linux Programmer's Manual" .TH ICMP 7 2008-11-20 "Linux" "Linux Programmer's Manual"
.SH NAME .SH NAME
icmp, IPPROTO_ICMP \- Linux IPv4 ICMP kernel module. icmp, IPPROTO_ICMP \- Linux IPv4 ICMP kernel module.
.SH DESCRIPTION .SH DESCRIPTION
@ -33,14 +33,13 @@ Linux limits the rate of ICMP error packets to each destination.
and and
.B ICMP_DEST_UNREACH .B ICMP_DEST_UNREACH
are also limited by the destination route of the incoming packets. are also limited by the destination route of the incoming packets.
.SS Sysctls .SS /proc interfaces
ICMP supports a sysctl interface to configure some global IP parameters. ICMP supports a set of
The sysctls can be accessed by reading or writing the .I /proc
.I /proc/sys/net/ipv4/* interfaces to configure some global IP parameters.
files or with the The parameters can be accessed by reading or writing files in the directory
.BR sysctl (2) .IR /proc/sys/net/ipv4/ .
interface. Most of these parameters are rate limitations for specific ICMP types.
Most of these sysctls are rate limitations for specific ICMP types.
Linux 2.2 uses a token bucket filter to limit ICMPs. Linux 2.2 uses a token bucket filter to limit ICMPs.
.\" FIXME better description needed .\" FIXME better description needed
The value is the timeout in jiffies until the token bucket filter is The value is the timeout in jiffies until the token bucket filter is

View File

@ -228,7 +228,8 @@ is established.
The processing of all incoming source routing options The processing of all incoming source routing options
is disabled by default and can be enabled by using the is disabled by default and can be enabled by using the
.I accept_source_route .I accept_source_route
sysctl. .I /proc
interface.
Other options like timestamps are still handled. Other options like timestamps are still handled.
For datagram sockets, IP options can be only set by the local user. For datagram sockets, IP options can be only set by the local user.
Calling Calling
@ -519,8 +520,8 @@ as defined in RFC\ 1191
on this socket. on this socket.
The don't fragment flag is set on all outgoing datagrams. The don't fragment flag is set on all outgoing datagrams.
The system-wide default is controlled by the The system-wide default is controlled by the
.I ip_no_pmtu_disc .I /proc/sys/net/ipv4/ip_no_pmtu_disc
sysctl for file for
.B SOCK_STREAM .B SOCK_STREAM
sockets, and disabled on all others. sockets, and disabled on all others.
For For
@ -700,18 +701,17 @@ structure similar to
When an invalid socket option is passed, When an invalid socket option is passed,
.B ENOPROTOOPT .B ENOPROTOOPT
is returned. is returned.
.SS Sysctls .SS /proc interfaces
The IP protocol The IP protocol
supports the sysctl interface to configure some global options. supports a set of
The sysctls can be accessed by reading or writing the .I /proc
.I /proc/sys/net/ipv4/* interfaces to configure some global parameters.
files or using the The parameters can be accessed by reading or writing files in the directory
.IR /proc/sys/net/ipv4/ .
.\" FIXME As at 2.6.12, 14 Jun 2005, the following are undocumented: .\" FIXME As at 2.6.12, 14 Jun 2005, the following are undocumented:
.\" ip_queue_maxlen .\" ip_queue_maxlen
.\" ip_conntrack_max .\" ip_conntrack_max
.BR sysctl (2) Interfaces described as
interface.
Variables described as
.I Boolean .I Boolean
take an integer value, with a non-zero value ("true") meaning that take an integer value, with a non-zero value ("true") meaning that
the corresponding option is enabled, and a zero value ("false") the corresponding option is enabled, and a zero value ("false")
@ -818,8 +818,8 @@ bytes.
.I neigh/* .I neigh/*
See See
.BR arp (7). .BR arp (7).
.\" FIXME Document the conf/*/* sysctls .\" FIXME Document the conf/*/* interfaces
.\" FIXME Document the route/* sysctls .\" FIXME Document the route/* interfaces
.\" FIXME document them all .\" FIXME document them all
.SS Ioctls .SS Ioctls
All ioctls described in All ioctls described in
@ -952,7 +952,9 @@ is new in Linux 2.2.
Linux 2.0 only supported Linux 2.0 only supported
.BR ip_mreq . .BR ip_mreq .
.PP .PP
The sysctls were introduced with Linux 2.2. The
.I /proc
interfaces were introduced with Linux 2.2.
.SH NOTES .SH NOTES
Be very careful with the Be very careful with the
.B SO_BROADCAST .B SO_BROADCAST

View File

@ -6,7 +6,7 @@
.\" and in case of nontrivial modification author and date .\" and in case of nontrivial modification author and date
.\" of the modification is added to the header. .\" of the modification is added to the header.
.\" $Id: raw.7,v 1.6 1999/06/05 10:32:08 freitag Exp $ .\" $Id: raw.7,v 1.6 1999/06/05 10:32:08 freitag Exp $
.TH RAW 7 2008-08-08 "Linux" "Linux Programmer's Manual" .TH RAW 7 2008-11-20 "Linux" "Linux Programmer's Manual"
.SH NAME .SH NAME
raw, SOCK_RAW \- Linux IPv4 raw sockets raw, SOCK_RAW \- Linux IPv4 raw sockets
.SH SYNOPSIS .SH SYNOPSIS
@ -190,8 +190,8 @@ When this happens the application should decrease the packet size.
Path MTU discovery can be also turned off using the Path MTU discovery can be also turned off using the
.B IP_MTU_DISCOVER .B IP_MTU_DISCOVER
socket option or the socket option or the
.I ip_no_pmtu_disc .I /proc/sys/net/ipv4/ip_no_pmtu_disc
sysctl, see file, see
.BR ip (7) .BR ip (7)
for details. for details.
When turned off raw sockets will fragment outgoing packets When turned off raw sockets will fragment outgoing packets

View File

@ -14,7 +14,7 @@
.\" Added notes on capability requirements .\" Added notes on capability requirements
.\" A few small grammar fixes .\" A few small grammar fixes
.\" .\"
.TH SOCKET 7 2008-08-08 Linux "Linux Programmer's Manual" .TH SOCKET 7 2008-11-20 Linux "Linux Programmer's Manual"
.SH NAME .SH NAME
socket \- Linux socket interface socket \- Linux socket interface
.SH SYNOPSIS .SH SYNOPSIS
@ -364,10 +364,10 @@ when it is set using
and this doubled value is returned by and this doubled value is returned by
.BR getsockopt (2). .BR getsockopt (2).
The default value is set by the The default value is set by the
.I rmem_default .I /proc/sys/net/core/rmem_default
sysctl and the maximum allowed value is set by the file, and the maximum allowed value is set by the
.I rmem_max .I /proc/sys/net/core/rmem_max
sysctl. file.
The minimum (doubled) value for this option is 256. The minimum (doubled) value for this option is 256.
.TP .TP
.BR SO_RCVBUFFORCE " (since Linux 2.6.14)" .BR SO_RCVBUFFORCE " (since Linux 2.6.14)"
@ -463,10 +463,10 @@ when it is set using
and this doubled value is returned by and this doubled value is returned by
.BR getsockopt (2). .BR getsockopt (2).
The default value is set by the The default value is set by the
.I wmem_default .I /proc/sys/net/core/wmem_default
sysctl and the maximum allowed value is set by the file and the maximum allowed value is set by the
.I wmem_max .I /proc/sys/net/core/wmem_max
sysctl. file.
The minimum (doubled) value for this option is 2048. The minimum (doubled) value for this option is 2048.
.TP .TP
.BR SO_SNDBUFFORCE " (since Linux 2.6.14)" .BR SO_SNDBUFFORCE " (since Linux 2.6.14)"
@ -544,12 +544,10 @@ may have already disappeared when the process reacts to the signal.
If this happens, the process should wait again because Linux If this happens, the process should wait again because Linux
will resend the signal later. will resend the signal later.
.\" .SS Ancillary Messages .\" .SS Ancillary Messages
.SS Sysctls .SS /proc interfaces
The core socket networking sysctls can be accessed using the The core socket networking parameters can be accessed
.I /proc/sys/net/core/* via files in the directory
files or with the .IR /proc/sys/net/core/ .
.BR sysctl (2)
interface.
.TP .TP
.I rmem_default .I rmem_default
contains the default setting in bytes of the socket receive buffer. contains the default setting in bytes of the socket receive buffer.
@ -678,7 +676,9 @@ The same as the
was introduced in Linux 2.0.30. was introduced in Linux 2.0.30.
.B SO_PASSCRED .B SO_PASSCRED
is new in Linux 2.2. is new in Linux 2.2.
The sysctls are new in Linux 2.2. The
.I /proc
interfaces was introduced in Linux 2.2.
.B SO_RCVTIMEO .B SO_RCVTIMEO
and and
.B SO_SNDTIMEO .B SO_SNDTIMEO
@ -687,8 +687,9 @@ Earlier, timeouts were fixed to
a protocol-specific setting, and could not be read or written. a protocol-specific setting, and could not be read or written.
.SH NOTES .SH NOTES
Linux assumes that half of the send/receive buffer is used for internal Linux assumes that half of the send/receive buffer is used for internal
kernel structures; thus the sysctls are twice what can be observed kernel structures; thus the values in the corresponding
on the wire. .I /proc
files are twice what can be observed on the wire.
Linux will only allow port re-use with the Linux will only allow port re-use with the
.B SO_REUSEADDR .B SO_REUSEADDR

View File

@ -12,7 +12,7 @@
.\" documented: tcp_mtu_probing, tcp_base_mss, and .\" documented: tcp_mtu_probing, tcp_base_mss, and
.\" tcp_workaround_signed_windows .\" tcp_workaround_signed_windows
.\" .\"
.TH TCP 7 2008-08-08 "Linux" "Linux Programmer's Manual" .TH TCP 7 2008-11-20 "Linux" "Linux Programmer's Manual"
.SH NAME .SH NAME
tcp \- TCP protocol tcp \- TCP protocol
.SH SYNOPSIS .SH SYNOPSIS
@ -71,10 +71,10 @@ latency or bandwidth.
To make use of them, the send and To make use of them, the send and
receive buffer sizes must be increased. receive buffer sizes must be increased.
They can be set globally with the They can be set globally with the
.I net.ipv4.tcp_wmem .I /proc/sys/net/ipv4/tcp_wmem
and and
.I net.ipv4.tcp_rmem .I /proc/sys/net/ipv4/tcp_rmem
sysctl variables, or on individual sockets by using the files, or on individual sockets by using the
.B SO_SNDBUF .B SO_SNDBUF
and and
.B SO_RCVBUF .B SO_RCVBUF
@ -86,11 +86,11 @@ The maximum sizes for socket buffers declared via the
.B SO_SNDBUF .B SO_SNDBUF
and and
.B SO_RCVBUF .B SO_RCVBUF
mechanisms are limited by the global mechanisms are limited by the values in the
.I net.core.rmem_max .I /proc/sys/net/core/rmem_max
and and
.I net.core.wmem_max .I /proc/sys/net/core/wmem_max
sysctls. files.
Note that TCP actually allocates twice the size of Note that TCP actually allocates twice the size of
the buffer requested in the the buffer requested in the
.BR setsockopt (2) .BR setsockopt (2)
@ -101,7 +101,9 @@ in the
.BR setsockopt (2) .BR setsockopt (2)
call. call.
TCP uses the extra space for administrative purposes and internal TCP uses the extra space for administrative purposes and internal
kernel structures, and the sysctl variables reflect the kernel structures, and the
/proc
file values reflect the
larger sizes compared to the actual TCP windows. larger sizes compared to the actual TCP windows.
On individual connections, the socket buffer size must be On individual connections, the socket buffer size must be
set prior to the set prior to the
@ -161,13 +163,12 @@ apply to TCP.
TCP only supports point-to-point TCP only supports point-to-point
communication; broadcasting and multicasting are not communication; broadcasting and multicasting are not
supported. supported.
.SS Sysctls .SS /proc interfaces
These variables can be accessed by the System-wide TCP parameter settings can be accessed by files in the directory
.I /proc/sys/net/ipv4/* .IR /proc/sys/net/ipv4/ .
files or with the In addition, most IP
.BR sysctl (2) .I /proc
interface. interfaces also apply to TCP; see
In addition, most IP sysctls also apply to TCP; see
.BR ip (7). .BR ip (7).
Variables described as Variables described as
.I Boolean .I Boolean
@ -444,7 +445,7 @@ These parameters are used by TCP to regulate receive
buffer sizes. buffer sizes.
TCP dynamically adjusts the size of the TCP dynamically adjusts the size of the
receive buffer from the defaults listed below, in the range receive buffer from the defaults listed below, in the range
of these sysctl variables, depending on memory available of these values, depending on memory available
in the system. in the system.
.RS .RS
.TP 9 .TP 9
@ -606,8 +607,8 @@ TCP Reno in wired networks and throughput over wireless links.
This is a vector of 3 integers: [min, default, max]. This is a vector of 3 integers: [min, default, max].
These parameters are used by TCP to regulate send buffer sizes. These parameters are used by TCP to regulate send buffer sizes.
TCP dynamically adjusts the size of the send buffer from the TCP dynamically adjusts the size of the send buffer from the
default values listed below, in the range of these sysctl default values listed below, in the range of these values,
variables, depending on memory available. depending on memory available.
.I min .I min
- minimum size of the send buffer used by each TCP socket. - minimum size of the send buffer used by each TCP socket.
@ -629,15 +630,15 @@ defined for all protocols.
The default value is 16K bytes. The default value is 16K bytes.
If larger send buffer sizes are desired, this value If larger send buffer sizes are desired, this value
should be increased (to affect all sockets). should be increased (to affect all sockets).
To employ large TCP windows, the sysctl variable To employ large TCP windows, the
.I net.ipv4.tcp_window_scaling .I /proc/sys/net/ipv4/tcp_window_scaling
must be enabled (default). must be set to a non-zero value (default).
.I max .I max
- the maximum size of the send buffer used by - the maximum size of the send buffer used by
each TCP socket. each TCP socket.
This value does not override the global This value does not override the value in
.IR net.core.wmem_max . .IR /proc/sys/net/core/wmem_max .
This is not used to limit the size of the send buffer This is not used to limit the size of the send buffer
declared using declared using
.B SO_SNDBUF .B SO_SNDBUF
@ -715,9 +716,9 @@ portable.
.TP .TP
.B TCP_LINGER2 .B TCP_LINGER2
The lifetime of orphaned FIN_WAIT2 state sockets. The lifetime of orphaned FIN_WAIT2 state sockets.
This option can be used to override the system wide sysctl This option can be used to override the system-wide setting in the file
.I tcp_fin_timeout .I /proc/sys/net/ipv4/tcp_fin_timeout
on this socket. for this socket.
This is not to be confused with the This is not to be confused with the
.BR socket (7) .BR socket (7)
level option level option
@ -882,11 +883,13 @@ Support for Explicit Congestion Notification, zero-copy
reordering support and some SACK extensions reordering support and some SACK extensions
(DSACK) were introduced in 2.4. (DSACK) were introduced in 2.4.
Support for forward acknowledgement (FACK), TIME_WAIT recycling, Support for forward acknowledgement (FACK), TIME_WAIT recycling,
per connection keepalive socket options and sysctls per connection keepalive socket options and the
were introduced in 2.3. .I /proc
interfaces were introduced in 2.3.
The default values and descriptions for the sysctl variables The default values and descriptions for the
given above are applicable for the 2.4 kernel. .I /proc
files given above are applicable for the 2.4 kernel.
.SH NOTES .SH NOTES
TCP has no real out-of-band data; it has urgent data. TCP has no real out-of-band data; it has urgent data.
In Linux this means if the other end sends newer out-of-band In Linux this means if the other end sends newer out-of-band
@ -900,9 +903,8 @@ Linux uses the BSD compatible interpretation of the urgent
pointer field by default. pointer field by default.
This violates RFC\ 1122, but is This violates RFC\ 1122, but is
required for interoperability with other stacks. required for interoperability with other stacks.
It can be changed by the It can be changed via
.I tcp_stdurg .IR /proc/sys/net/ipv4/tcp_stdurg .
sysctl.
.SH BUGS .SH BUGS
Not all errors are documented. Not all errors are documented.
.br .br
@ -925,7 +927,6 @@ IPv6 is not described.
.BR sendfile (2), .BR sendfile (2),
.BR sendmsg (2), .BR sendmsg (2),
.BR socket (2), .BR socket (2),
.BR sysctl (2),
.BR ip (7), .BR ip (7),
.BR socket (7) .BR socket (7)
.sp .sp

View File

@ -5,7 +5,7 @@
.\" of the modification is added to the header. .\" of the modification is added to the header.
.\" $Id: udp.7,v 1.7 2000/01/22 01:55:05 freitag Exp $ .\" $Id: udp.7,v 1.7 2000/01/22 01:55:05 freitag Exp $
.\" .\"
.TH UDP 7 2008-08-08 "Linux" "Linux Programmer's Manual" .TH UDP 7 2008-11-20 "Linux" "Linux Programmer's Manual"
.SH NAME .SH NAME
udp \- User Datagram Protocol for IPv4 udp \- User Datagram Protocol for IPv4
.SH SYNOPSIS .SH SYNOPSIS
@ -60,7 +60,9 @@ is not supported.
IP options may be sent or received using the socket options described in IP options may be sent or received using the socket options described in
.BR ip (7). .BR ip (7).
They are only processed by the kernel when the appropriate sysctl They are only processed by the kernel when the appropriate
/proc
parameter
is enabled (but still passed to the user even when it is turned off). is enabled (but still passed to the user even when it is turned off).
See See
.BR ip (7). .BR ip (7).
@ -79,8 +81,8 @@ When this happens the application should decrease the packet size.
Path MTU discovery can be also turned off using the Path MTU discovery can be also turned off using the
.B IP_MTU_DISCOVER .B IP_MTU_DISCOVER
socket option or the socket option or the
.I ip_no_pmtu_disc .I /proc/sys/net/ipv4/ip_no_pmtu_disc
sysctl, see file; see
.BR ip (7) .BR ip (7)
for details. for details.
When turned off UDP will fragment outgoing UDP packets When turned off UDP will fragment outgoing UDP packets