udp.7: grfix

This commit is contained in:
Michael Kerrisk 2008-11-21 17:43:46 -05:00
parent 93de498adc
commit fe10db363b
1 changed files with 9 additions and 10 deletions

View File

@ -30,7 +30,7 @@ or
with a valid destination address as an argument.
When
.BR connect (2)
is called on the socket the default destination address is set and
is called on the socket, the default destination address is set and
datagrams can now be sent using
.BR send (2)
or
@ -41,7 +41,7 @@ address to
.BR sendto (2)
or
.BR sendmsg (2).
In order to receive packets the socket can be bound to a local
In order to receive packets, the socket can be bound to a local
address first by using
.BR bind (2).
Otherwise the socket layer will automatically assign
@ -51,8 +51,8 @@ and bind the socket to
.BR 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
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.
.B MSG_WAITALL
@ -77,7 +77,7 @@ This means the kernel
will keep track of the MTU to a specific target IP address and return
.B EMSGSIZE
when a UDP packet write exceeds it.
When this happens the application should decrease the packet size.
When this happens, the application should decrease the packet size.
Path MTU discovery can be also turned off using the
.B IP_MTU_DISCOVER
socket option or the
@ -85,9 +85,9 @@ socket option or the
file; see
.BR ip (7)
for details.
When turned off UDP will fragment outgoing UDP packets
When turned off, UDP will fragment outgoing UDP packets
that exceed the interface MTU.
However disabling it is not recommended
However, disabling it is not recommended
for performance and reliability reasons.
.SS "Address Format"
UDP uses the IPv4
@ -106,7 +106,7 @@ which don't pass any errors unless the socket is connected.
Linux's behavior is mandated by
.BR RFC\ 1122 .
For compatibility with legacy code in Linux 2.0 and 2.2
For compatibility with legacy code, in Linux 2.0 and 2.2
it was possible to set the
.B SO_BSDCOMPAT
.B SOL_SOCKET
@ -122,7 +122,7 @@ for further information.
When the
.B IP_RECVERR
option is enabled all errors are stored in the socket error queue
option is enabled, all errors are stored in the socket error queue,
and can be received by
.BR recvmsg (2)
with the
@ -148,7 +148,6 @@ portable.
.\" #define UDP_ENCAP_ESPINUDP_NON_IKE 1 /* draft-ietf-ipsec-nat-t-ike-00/01 */
.\" #define UDP_ENCAP_ESPINUDP 2 /* draft-ietf-ipsec-udp-encaps-06 */
.\" #define UDP_ENCAP_L2TPINUDP 3 /* rfc2661 */
.SS Ioctls
These ioctls can be accessed using
.BR ioctl (2).