diff options
Diffstat (limited to 'man7/udp.7')
-rw-r--r-- | man7/udp.7 | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/man7/udp.7 b/man7/udp.7 index 5827102b4..906f0c8fc 100644 --- a/man7/udp.7 +++ b/man7/udp.7 @@ -25,26 +25,26 @@ UDP generates and checks checksums to catch transmission errors. When a UDP socket is created, its local and remote addresses are unspecified. Datagrams can be sent immediately using -.BR sendto (2) +.MR sendto 2 or -.BR sendmsg (2) +.MR sendmsg 2 with a valid destination address as an argument. When -.BR connect (2) +.MR connect 2 is called on the socket, the default destination address is set and datagrams can now be sent using -.BR send (2) +.MR send 2 or -.BR write (2) +.MR write 2 without specifying a destination address. It is still possible to send to other destinations by passing an address to -.BR sendto (2) +.MR sendto 2 or -.BR sendmsg (2). +.MR sendmsg 2 . In order to receive packets, the socket can be bound to a local address first by using -.BR bind (2). +.MR bind 2 . Otherwise, the socket layer will automatically assign a free local port out of the range defined by .I /proc/sys/net/ipv4/ip_local_port_range @@ -60,13 +60,13 @@ flag is set. is not supported. .P IP options may be sent or received using the socket options described in -.BR ip (7). +.MR ip 7 . They are processed by the kernel only when the appropriate .I /proc parameter is enabled (but still passed to the user even when it is turned off). See -.BR ip (7). +.MR ip 7 . .P When the .B MSG_DONTROUTE @@ -84,7 +84,7 @@ Path MTU discovery can be also turned off using the socket option or the .I /proc/sys/net/ipv4/ip_no_pmtu_disc file; see -.BR ip (7) +.MR ip 7 for details. When turned off, UDP will fragment outgoing UDP packets that exceed the interface MTU. @@ -94,7 +94,7 @@ for performance and reliability reasons. UDP uses the IPv4 .I sockaddr_in address format described in -.BR ip (7). +.MR ip 7 . .SS Error handling All fatal errors will be passed to the user as an error return even when the socket is not connected. @@ -118,14 +118,14 @@ and .BR EMSGSIZE ). Locally generated errors are always passed. Support for this socket option was removed in later kernels; see -.BR socket (7) +.MR socket 7 for further information. .P When the .B IP_RECVERR option is enabled, all errors are stored in the socket error queue, and can be received by -.BR recvmsg (2) +.MR recvmsg 2 with the .B MSG_ERRQUEUE flag set. @@ -148,7 +148,7 @@ this number, UDP starts to moderate memory usage. This value was introduced to follow the format of .I tcp_mem (see -.BR tcp (7)). +.MR tcp 7 ). .TP .I max Number of pages allowed for queueing by all UDP sockets. @@ -172,9 +172,9 @@ even if total pages of UDP sockets exceed pressure. .SS Socket options To set or get a UDP socket option, call -.BR getsockopt (2) +.MR getsockopt 2 to read or -.BR setsockopt (2) +.MR setsockopt 2 to write the option with the option level argument set to .BR IPPROTO_UDP . Unless otherwise noted, @@ -185,7 +185,7 @@ is a pointer to an Following is a list of UDP-specific socket options. For details of some other socket options that are also applicable for UDP sockets, see -.BR socket (7). +.MR socket 7 . .TP .BR UDP_CORK " (since Linux 2.5.44)" If this option is enabled, then all data output on this socket @@ -203,7 +203,7 @@ portable. .BR UDP_SEGMENT " (since Linux 4.18)" Enables UDP segmentation offload. Segmentation offload reduces -.BR send (2) +.MR send 2 cost by transferring multiple datagrams worth of data as a single large packet through the kernel transmit path, even when that exceeds MTU. @@ -223,9 +223,9 @@ the same MTU rules that apply to datagrams sent without this option. Segmentation offload depends on checksum offload, as datagram checksums are computed after segmentation. The option may also be set for individual -.BR sendmsg (2) +.MR sendmsg 2 calls by passing it as a -.BR cmsg (3). +.MR cmsg 3 . A value of zero disables the feature. This option should not be used in code intended to be portable. .TP @@ -235,7 +235,7 @@ If enabled, the socket may receive multiple datagrams worth of data as a single large buffer, together with a -.BR cmsg (3) +.MR cmsg 3 that holds the segment size. This option is the inverse of segmentation offload. It reduces receive cost by handling multiple datagrams worth of data @@ -244,7 +244,7 @@ even when that exceeds MTU. This option should not be used in code intended to be portable. .SS Ioctls These ioctls can be accessed using -.BR ioctl (2). +.MR ioctl 2 . The correct syntax is: .P .RS @@ -264,10 +264,10 @@ Using it is impossible to distinguish the case where no datagram is pending from the case where the next pending datagram contains zero bytes of data. It is safer to use -.BR select (2), -.BR poll (2), +.MR select 2 , +.MR poll 2 , or -.BR epoll (7) +.MR epoll 7 to distinguish these cases. .\" See http://www.securiteam.com/unixfocus/5KP0I15IKO.html .\" "GNUnet DoS (UDP Socket Unreachable)", 14 May 2006 @@ -277,15 +277,15 @@ Returns the number of data bytes in the local send queue. Supported only with Linux 2.4 and above. .P In addition, all ioctls documented in -.BR ip (7) +.MR ip 7 and -.BR socket (7) +.MR socket 7 are supported. .SH ERRORS All errors documented for -.BR socket (7) +.MR socket 7 or -.BR ip (7) +.MR ip 7 may be returned by a send or receive on a UDP socket. .TP .B ECONNREFUSED @@ -297,10 +297,10 @@ is a new feature in Linux 2.2. .\" .SH CREDITS .\" This man page was written by Andi Kleen. .SH SEE ALSO -.BR ip (7), -.BR raw (7), -.BR socket (7), -.BR udplite (7) +.MR ip 7 , +.MR raw 7 , +.MR socket 7 , +.MR udplite 7 .P The kernel source file .IR Documentation/networking/ip\-sysctl.txt . |