summaryrefslogtreecommitdiffstats
path: root/man7/udp.7
diff options
context:
space:
mode:
Diffstat (limited to 'man7/udp.7')
-rw-r--r--man7/udp.728
1 files changed, 14 insertions, 14 deletions
diff --git a/man7/udp.7 b/man7/udp.7
index 45c5cad..6b643a2 100644
--- a/man7/udp.7
+++ b/man7/udp.7
@@ -4,7 +4,7 @@
.\"
.\" $Id: udp.7,v 1.7 2000/01/22 01:55:05 freitag Exp $
.\"
-.TH udp 7 2023-07-15 "Linux man-pages 6.05.01"
+.TH udp 7 2023-10-31 "Linux man-pages 6.7"
.SH NAME
udp \- User Datagram Protocol for IPv4
.SH SYNOPSIS
@@ -12,7 +12,7 @@ udp \- User Datagram Protocol for IPv4
.B #include <sys/socket.h>
.B #include <netinet/in.h>
.B #include <netinet/udp.h>
-.PP
+.P
.IB udp_socket " = socket(AF_INET, SOCK_DGRAM, 0);"
.fi
.SH DESCRIPTION
@@ -21,7 +21,7 @@ described in RFC\ 768.
It implements a connectionless, unreliable datagram packet service.
Packets may be reordered or duplicated before they arrive.
UDP generates and checks checksums to catch transmission errors.
-.PP
+.P
When a UDP socket is created,
its local and remote addresses are unspecified.
Datagrams can be sent immediately using
@@ -50,7 +50,7 @@ a free local port out of the range defined by
.I /proc/sys/net/ipv4/ip_local_port_range
and bind the socket to
.BR INADDR_ANY .
-.PP
+.P
All receive operations return only one packet.
When the packet is smaller than the passed buffer, only that much
data is returned; when it is bigger, the packet is truncated and the
@@ -58,7 +58,7 @@ data is returned; when it is bigger, the packet is truncated and the
flag is set.
.B MSG_WAITALL
is not supported.
-.PP
+.P
IP options may be sent or received using the socket options described in
.BR ip (7).
They are processed by the kernel only when the appropriate
@@ -67,12 +67,12 @@ parameter
is enabled (but still passed to the user even when it is turned off).
See
.BR ip (7).
-.PP
+.P
When the
.B MSG_DONTROUTE
flag is set on sending, the destination address must refer to a local
interface address and the packet is sent only to that interface.
-.PP
+.P
By default, Linux UDP does path MTU (Maximum Transmission Unit) discovery.
This means the kernel
will keep track of the MTU to a specific target IP address and return
@@ -106,7 +106,7 @@ This behavior differs from many other BSD socket implementations
which don't pass any errors unless the socket is connected.
Linux's behavior is mandated by
.BR RFC\ 1122 .
-.PP
+.P
For compatibility with legacy code, in Linux 2.0 and 2.2
it was possible to set the
.B SO_BSDCOMPAT
@@ -120,7 +120,7 @@ Locally generated errors are always passed.
Support for this socket option was removed in later kernels; see
.BR socket (7)
for further information.
-.PP
+.P
When the
.B IP_RECVERR
option is enabled, all errors are stored in the socket error queue,
@@ -181,7 +181,7 @@ Unless otherwise noted,
.I optval
is a pointer to an
.IR int .
-.PP
+.P
Following is a list of UDP-specific socket options.
For details of some other socket options that are also applicable
for UDP sockets, see
@@ -246,7 +246,7 @@ This option should not be used in code intended to be portable.
These ioctls can be accessed using
.BR ioctl (2).
The correct syntax is:
-.PP
+.P
.RS
.nf
.BI int " value";
@@ -275,7 +275,7 @@ to distinguish these cases.
.BR TIOCOUTQ " (" SIOCOUTQ )
Returns the number of data bytes in the local send queue.
Supported only with Linux 2.4 and above.
-.PP
+.P
In addition, all ioctls documented in
.BR ip (7)
and
@@ -301,10 +301,10 @@ is a new feature in Linux 2.2.
.BR raw (7),
.BR socket (7),
.BR udplite (7)
-.PP
+.P
The kernel source file
.IR Documentation/networking/ip\-sysctl.txt .
-.PP
+.P
RFC\ 768 for the User Datagram Protocol.
.br
RFC\ 1122 for the host requirements.