diff options
Diffstat (limited to 'man7/udp.7')
| -rw-r--r-- | man7/udp.7 | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/man7/udp.7 b/man7/udp.7 index d2fa710499..5941abefc8 100644 --- a/man7/udp.7 +++ b/man7/udp.7 @@ -21,20 +21,22 @@ 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. -When a UDP socket is created, its local and remote addresses are unspecified. +When a UDP socket is created, +its local and remote addresses are unspecified. Datagrams can be sent immediately using .BR sendto (2) or .BR sendmsg (2) with a valid destination address as an argument. When .BR connect (2) -is called on the socket the default destination address is set and datagrams -can now be sent using +is called on the socket the default destination address is set and +datagrams can now be sent using .BR send (2) or .BR write (2) without specifying an destination address. -It is still possible to send to other destinations by passing an address to +It is still possible to send to other destinations by passing an +address to .BR sendto (2) or .BR sendmsg (2). @@ -47,9 +49,9 @@ a free local port out of the range defined by and bind the socket to .IR INADDR_ANY . -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 +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 .B MSG_TRUNC flag is set. .I MSG_WAITALL @@ -58,7 +60,8 @@ is not supported. IP options may be sent or received using the socket options described in .BR ip (7). They are only processed by the kernel when the appropriate sysctl -is enabled (but still passed to the user even when it is turned off). See +is enabled (but still passed to the user even when it is turned off). +See .BR ip (7). When the @@ -137,12 +140,13 @@ The correct syntax is: .RE .TP .BR FIONREAD " (" SIOCINQ ) -Gets a pointer to an integer as argument. Returns the size of the next -pending datagram in the integer in bytes, or 0 when no datagram is pending. +Gets a pointer to an integer as argument. +Returns the size of the next pending datagram in the integer in bytes, +or 0 when no datagram is pending. .TP .BR TIOCOUTQ " (" SIOCOUTQ ) -Returns the number of data bytes in the local send queue. Only supported -with Linux 2.4 and above. +Returns the number of data bytes in the local send queue. +Only supported with Linux 2.4 and above. .PP In addition all ioctls documented in .BR ip (7) @@ -157,8 +161,8 @@ or may be returned by a send or receive on a UDP socket. .B ECONNREFUSED -No receiver was associated with the destination address. This might be -caused by a previous packet sent over the socket. +No receiver was associated with the destination address. +This might be caused by a previous packet sent over the socket. .SH VERSIONS IP_RECVERR is a new feature in Linux 2.2. |
