aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--man7/arp.739
-rw-r--r--man7/icmp.734
-rw-r--r--man7/ip.768
-rw-r--r--man7/ipv6.758
-rw-r--r--man7/netdevice.711
-rw-r--r--man7/packet.748
-rw-r--r--man7/raw.731
-rw-r--r--man7/rtnetlink.721
-rw-r--r--man7/socket.724
-rw-r--r--man7/tcp.76
-rw-r--r--man7/udp.732
-rw-r--r--man7/unix.726
12 files changed, 217 insertions, 181 deletions
diff --git a/man7/arp.7 b/man7/arp.7
index dacd09e1fc..d674f7209b 100644
--- a/man7/arp.7
+++ b/man7/arp.7
@@ -54,10 +54,10 @@ times. If that fails too it will broadcast a new ARP
request to the network. Requests are only send when there is data queued
for sending.
-Linux will automatically add a non-permanent proxy arp entry when it receives
-a request for an address it forwards to and proxy arp is enabled on the
-receiving interface. When there is a reject route for the target
-no proxy arp entry is added.
+Linux will automatically add a non-permanent proxy arp entry when it
+receives a request for an address it forwards to and proxy arp is
+enabled on the receiving interface.
+When there is a reject route for the target no proxy arp entry is added.
.SH IOCTLS
Three ioctls are available on all
@@ -69,8 +69,7 @@ as their parameter.
.nf
.ta 4 20 33
-struct arpreq
-{
+struct arpreq {
struct sockaddr arp_pa; /* protocol address */
struct sockaddr arp_ha; /* hardware address */
int arp_flags; /* flags */
@@ -131,8 +130,10 @@ files or with the
.BR sysctl (2)
interface. Each interface in the system has its own directory in
/proc/sys/net/ipv4/neigh/.
-The setting in the `default' directory is used for all newly created devices.
-Unless otherwise specified time related sysctls are specified in seconds.
+The setting in the `default' directory is used for all newly created
+devices.
+Unless otherwise specified time related sysctls are specified
+in seconds.
.TP
.B anycast_delay
The maximum number of jiffies to delay before replying to a
@@ -195,8 +196,8 @@ mapping (generally due to network misconfiguration).
Defaults to 1 second.
.TP
.B mcast_solicit
-The maximum number of attempts to resolve an address by multicast/broadcast
-before marking the entry as unreachable.
+The maximum number of attempts to resolve an address by
+multicast/broadcast before marking the entry as unreachable.
Defaults to 3.
.TP
.B proxy_delay
@@ -226,13 +227,15 @@ address by other network layers.
Defaults to 3.
.SH BUGS
-Some timer settings are specified in jiffies, which is architecture related.
-On the Alpha a jiffy is 1/1024 of a second, on most other architectures it
-is 1/100s.
+Some timer settings are specified in jiffies, which is architecture
+related.
+On the Alpha a jiffy is 1/1024 of a second, on most other
+architectures it is 1/100s.
-There is no way to signal positive feedback from user space. This means
-connection oriented protocols implemented in user space will generate
-excessive ARP traffic, because ndisc will regularly reprobe the MAC address.
+There is no way to signal positive feedback from user space.
+This means connection oriented protocols implemented in user space
+will generate excessive ARP traffic, because ndisc will regularly
+reprobe the MAC address.
The same problem applies for some kernel protocols (e.g. NFS over UDP).
This man page mashes IPv4 specific and shared between IPv4 and IPv6
@@ -248,8 +251,8 @@ Support for the old ioctls was dropped in Linux 2.2.
Support for proxy arp entries for networks (netmask not equal 0xffffffff)
was dropped in Linux 2.2. It is replaced by automatic proxy arp setup by
-the kernel for all reachable hosts on other interfaces (when forwarding and
-proxy arp is enabled for the interface).
+the kernel for all reachable hosts on other interfaces (when
+forwarding and proxy arp is enabled for the interface).
The neigh/* sysctls did not exist before Linux 2.2.
diff --git a/man7/icmp.7 b/man7/icmp.7
index 9bf75c620d..3b61380ebc 100644
--- a/man7/icmp.7
+++ b/man7/icmp.7
@@ -8,12 +8,13 @@
.SH NAME
icmp, IPPROTO_ICMP \- Linux IPv4 ICMP kernel module.
.SH DESCRIPTION
-This kernel protocol module implements the Internet Control Message Protocol
-defined in RFC\ 792. It is used to signal error conditions and for diagnosis.
-The user doesn't interact directly with this module; instead it communicates
-with the other protocols in the kernel and these pass the ICMP
-errors to the application layers. The kernel ICMP module also
-answers ICMP requests.
+This kernel protocol module implements the Internet Control
+Message Protocol defined in RFC\ 792.
+It is used to signal error conditions and for diagnosis.
+The user doesn't interact directly with this module;
+instead it communicates with the other protocols in the kernel
+and these pass the ICMP errors to the application layers.
+The kernel ICMP module also answers ICMP requests.
.PP
A user protocol may receive ICMP packets for all local sockets by opening
a raw socket with the protocol
@@ -37,16 +38,19 @@ The sysctls can be accessed by reading or writing the
.I /proc/sys/net/ipv4/*
files or with the
.BR sysctl (2)
-interface. Most of these sysctls are rate limitations for specific ICMP types.
+interface.
+Most of these sysctls are rate limitations for specific ICMP types.
Linux 2.2 uses a token bucket filter to limit ICMPs.
.\" FIXME better description needed
-The value is the timeout in jiffies until the token bucket filter is cleared
-after a burst. A jiffy is a system dependent unit, usually 10ms on x86 and
+The value is the timeout in jiffies until the token bucket filter is
+cleared after a burst.
+A jiffy is a system dependent unit, usually 10ms on x86 and
about 1ms on alpha and IA64.
.TP
.B icmp_destunreach_rate
-Maximum rate to send ICMP Destination Unreachable packets. This limits the
-rate at which packets are sent to any individual route or destination.
+Maximum rate to send ICMP Destination Unreachable packets.
+This limits the rate at which packets are sent to any individual
+route or destination.
The limit does not affect sending of
.B ICMP_FRAG_NEEDED
packets needed for path MTU discovery.
@@ -90,15 +94,15 @@ should not be relied on in portable programs.
.PP
.B ICMP_REDIRECT
packets are not sent when Linux is not acting as a router.
-They are also only accepted from the old gateway defined in the routing table and
-the redirect routes are expired after some time.
+They are also only accepted from the old gateway defined in the
+routing table and the redirect routes are expired after some time.
.PP
The 64-bit timestamp returned by
.B ICMP_TIMESTAMP
is in milliseconds since January 1, 1970.
.PP
-Linux ICMP internally uses a raw socket to send ICMPs. This raw socket
-may appear in
+Linux ICMP internally uses a raw socket to send ICMPs.
+This raw socket may appear in
.BR netstat (8)
output with a zero inode.
.PP
diff --git a/man7/ip.7 b/man7/ip.7
index e532c32359..5343ea214c 100644
--- a/man7/ip.7
+++ b/man7/ip.7
@@ -54,8 +54,8 @@ to open a
.BR raw (7)
socket to access the IP protocol directly.
.I protocol
-is the IP protocol in the IP header to be received or sent. The only valid
-values for
+is the IP protocol in the IP header to be received or sent.
+The only valid values for
.I protocol
are
.B 0
@@ -72,8 +72,8 @@ a valid IANA IP protocol defined in
RFC\ 1700
assigned numbers.
.PP
-.\" FIXME ip current does an autobind in listen, but I'm not sure if that should
-.\" be documented.
+.\" FIXME ip current does an autobind in listen, but I'm not sure
+.\" if that should be documented.
When a process wants to receive new incoming packets or connections, it
should bind a socket to a local interface address using
.BR bind (2).
@@ -98,8 +98,8 @@ flag has been set. Care should be taken when using this flag as it
makes TCP less reliable.
.SH "ADDRESS FORMAT"
-An IP socket address is defined as a combination of an IP interface address
-and a 16-bit port number.
+An IP socket address is defined as a combination of an IP interface
+address and a 16-bit port number.
The basic IP protocol does not supply port numbers, they
are implemented by higher level protocols like
.BR udp (7)
@@ -141,7 +141,8 @@ Only processes with effective user ID 0 or the
.B CAP_NET_BIND_SERVICE
capability may
.BR bind (2)
-to these sockets. Note that the raw IPv4 protocol as such has no concept of a
+to these sockets.
+Note that the raw IPv4 protocol as such has no concept of a
port, they are only implemented by higher protocols like
.BR tcp (7)
and
@@ -164,9 +165,9 @@ library functions or directly with the name resolver (see
IPv4 addresses are divided into unicast, broadcast
and multicast addresses.
Unicast addresses specify a single interface of a host,
-broadcast addresses specify all hosts on a network and multicast addresses
-address all hosts in a multicast group. Datagrams to broadcast addresses
-can be only sent or received when the
+broadcast addresses specify all hosts on a network and multicast
+addresses address all hosts in a multicast group.
+Datagrams to broadcast addresses can be only sent or received when the
.B SO_BROADCAST
socket flag is set.
In the current implementation connection oriented sockets are only allowed
@@ -238,8 +239,9 @@ ancillary message that contains a
.I pktinfo
structure that supplies some information about the incoming packet.
This only works for datagram oriented sockets.
-The argument is a flag that tells the socket whether the IP_PKTINFO message
-should be passed or not. The message itself can only be sent/retrieved
+The argument is a flag that tells the socket whether the IP_PKTINFO
+message should be passed or not.
+The message itself can only be sent/retrieved
as control message with a packet using
.BR recvmsg (2)
or
@@ -283,8 +285,9 @@ for the routing table lookup.
.B IP_RECVTOS
If enabled the
.I IP_TOS
-ancillary message is passed with incoming packets. It contains a byte which
-specifies the Type of Service/Precedence field of the packet header.
+ancillary message is passed with incoming packets.
+It contains a byte which specifies the Type of Service/Precedence
+field of the packet header.
Expects a boolean integer flag.
.TP
@@ -328,8 +331,8 @@ to optimize throughput,
to optimize for reliability,
.B IPTOS_MINCOST
should be used for "filler data" where slow transmission doesn't matter.
-At most one of these TOS values can be specified. Other bits are invalid and
-shall be cleared.
+At most one of these TOS values can be specified.
+Other bits are invalid and shall be cleared.
Linux sends
.B IPTOS_LOWDELAY
datagrams first by default,
@@ -657,8 +660,8 @@ When an invalid socket option is passed,
is returned.
.SH SYSCTLS
The IP protocol
-supports the sysctl interface to configure some global options. The sysctls
-can be accessed by reading or writing the
+supports the sysctl interface to configure some global options.
+The sysctls can be accessed by reading or writing the
.I /proc/sys/net/ipv4/*
files or using the
.\" FIXME As at 2.6.12, 14 Jun 2005, the following are undocumented:
@@ -674,8 +677,8 @@ meaning that the option is disabled.
.\"
.TP
.BR ip_always_defrag " (Boolean)"
-[New with kernel 2.2.13; in earlier kernel version the feature was controlled
-at compile time by the
+[New with kernel 2.2.13; in earlier kernel version the feature
+was controlled at compile time by the
.B CONFIG_IP_ALWAYS_DEFRAG
option; this file is not present in 2.4.x and later]
@@ -702,8 +705,8 @@ Not documented.
.\"
.TP
.BR ip_default_ttl " (integer; default: 64)"
-Set the default time-to-live value of outgoing packets. This can be changed
-per socket with the
+Set the default time-to-live value of outgoing packets.
+This can be changed per socket with the
.I IP_TTL
option.
.\"
@@ -792,10 +795,11 @@ Ioctls to configure generic device parameters are described in
.SH NOTES
Be very careful with the
.B SO_BROADCAST
-option \- it is not privileged in Linux. It is easy to overload the network
+option \- it is not privileged in Linux.
+It is easy to overload the network
with careless broadcasts. For new application protocols
-it is better to use a multicast group instead of broadcasting. Broadcasting
-is discouraged.
+it is better to use a multicast group instead of broadcasting.
+Broadcasting is discouraged.
.PP
Some other BSD sockets implementations provide
.I IP_RCVDSTADDR
@@ -866,7 +870,8 @@ User doesn't have permission to set high priority, change configuration,
or send signals to the requested process or group.
.TP
.B EADDRNOTAVAIL
-A non-existent interface was requested or the requested source address was
+A non-existent interface was requested or the requested source
+address was
not local.
.TP
.B EAGAIN
@@ -894,9 +899,9 @@ The connection was unexpectedly closed or shut down by the other end.
was called on a socket where no packet arrived.
.TP
.B EHOSTUNREACH
-No valid routing table entry matches the destination address. This error
-can be caused by a ICMP message from a remote router or for the local
-routing table.
+No valid routing table entry matches the destination address.
+This error can be caused by a ICMP message from a remote router or
+for the local routing table.
.TP
.B ENODEV
Network device not available or not capable of sending IP.
@@ -906,8 +911,9 @@ A kernel subsystem was not configured.
.TP
.BR ENOBUFS ", " ENOMEM
Not enough free memory.
-This often means that the memory allocation is limited by the socket buffer
-limits, not by the system memory, but this is not 100% consistent.
+This often means that the memory allocation is limited by the socket
+buffer limits, not by the system memory, but this is not
+100% consistent.
.PP
Other errors may be generated by the overlaying protocols; see
.BR tcp (7),
diff --git a/man7/ipv6.7 b/man7/ipv6.7
index 393bfa0cbc..d3d25a1bee 100644
--- a/man7/ipv6.7
+++ b/man7/ipv6.7
@@ -47,14 +47,17 @@ variable. For initializations
.B IN6ADDR_LOOPBACK_INIT
should be used.
.PP
-IPv4 connections can be handled with the v6 API by using the v4-mapped-on-v6
-address type; thus a program only needs only to support this API type to
-support both protocols. This is handled transparently by the address
+IPv4 connections can be handled with the v6 API by using the
+v4-mapped-on-v6 address type;
+thus a program only needs only to support this API type to
+support both protocols.
+This is handled transparently by the address
handling functions in libc.
.PP
-IPv4 and IPv6 share the local port space. When you get an IPv4 connection
-or packet to a IPv6 socket its source address will be mapped to v6 and it'll
-be mapped to v6.
+IPv4 and IPv6 share the local port space.
+When you get an IPv4 connection
+or packet to a IPv6 socket its source address will be mapped
+to v6 and it'll be mapped to v6.
.SH "ADDRESS FORMAT"
.sp
.RS
@@ -88,20 +91,23 @@ is the IPv6 flow identifier;
.B sin6_addr
is the 128bit IPv6 address.
.B sin6_scope_id
-is an ID of depending of on the scope of the address. It is new in Linux 2.4.
+is an ID of depending of on the scope of the address.
+It is new in Linux 2.4.
Linux only supports it for link scope addresses, in that case
.I sin6_scope_id
contains the interface index (see
.BR netdevice (7))
.PP
IPv6 supports several address types: unicast to address a single
-host, multicast to address a group of hosts, anycast to address the nearest
-member of a group of hosts (not implemented in Linux), IPv4-on-IPv6 to
+host, multicast to address a group of hosts,
+anycast to address the nearest member of a group of hosts
+(not implemented in Linux), IPv4-on-IPv6 to
address a IPv4 host, and other reserved address types.
.PP
-The address notation for IPv6 is a group of 16 2 digit hexadecimal numbers,
-separated with a ':'. '::' stands for a string of 0 bits. Special addresses
-are ::1 for loopback and ::FFFF:<IPv4 address> for IPv4-mapped-on-IPv6.
+The address notation for IPv6 is a group of 16 2 digit hexadecimal
+numbers, separated with a ':'. '::' stands for a string of 0 bits.
+Special addresses are ::1 for loopback and ::FFFF:<IPv4 address>
+for IPv4-mapped-on-IPv6.
.PP
The port space of IPv6 is shared with IPv4.
.SH "SOCKET OPTIONS"
@@ -125,7 +131,7 @@ is a pointer to a integer containing
This is useful to pass v4-mapped sockets as file descriptors to
programs that don't know how to deal with the IPv6 API.
.TP
-.B IPV6_ADD_MEMBERSHIP, IPV6_DROP_MEMBERSHIP
+.BR IPV6_ADD_MEMBERSHIP, IPV6_DROP_MEMBERSHIP
Control membership in multicast groups. Argument is a pointer to a
.I struct ipv6_mreq
structure.
@@ -153,7 +159,8 @@ for details.
.TP
.B IPV6_MULTICAST_HOPS
Set the multicast hop limit for the socket. Argument is a pointer to an
-integer. \-1 in the value means use the route default, otherwise it should be
+integer.
+\-1 in the value means use the route default, otherwise it should be
between 0 and 255.
.TP
.B IPV6_MULTICAST_IF
@@ -184,8 +191,8 @@ sockets. Argument is a pointer to a boolean value in an integer.
.nh
.B IPV6_RTHDR, IPV6_AUTHHDR, IPV6_DSTOPS, IPV6_HOPOPTS, IPV6_FLOWINFO, IPV6_HOPLIMIT
.hy
-Set delivery of control messages for incoming datagrams containing extension
-headers from the received packet.
+Set delivery of control messages for incoming datagrams containing
+extension headers from the received packet.
.I IPV6_RTHDR
delivers the routing header,
.I IPV6_AUTHHDR
@@ -217,14 +224,15 @@ for details.
Argument is a pointer to boolean.
.TP
.B IPV6_ROUTER_ALERT
-Pass all forwarded packets containing an router alert option to this socket.
-Only allowed for datagram sockets and for root. Argument is a pointer to
-boolean.
+Pass all forwarded packets containing an router alert option to
+this socket.
+Only allowed for datagram sockets and for root.
+Argument is a pointer to boolean.
.TP
.B IPV6_UNICAST_HOPS
Set the unicast hop limit for the socket. Argument is an pointer to an
-integer. \-1 in the value means use the route default, otherwise it should be
-between 0 and 255.
+integer. \-1 in the value means use the route default,
+otherwise it should be between 0 and 255.
.\" FLOWLABEL_MGR, FLOWINFO_SEND
.SH VERSIONS
The older
@@ -244,8 +252,9 @@ a problem for 32bit hosts like i386.
The
.B sin6_flowinfo
field is new in Linux 2.4. It is transparently passed/read by the kernel
-when the passed address length contains it. Some programs that pass a
-longer address buffer and then check the outgoing address length may break.
+when the passed address length contains it.
+Some programs that pass a longer address buffer and then
+check the outgoing address length may break.
.SH "PORTING NOTES"
The
.I sockaddr_in6
@@ -257,7 +266,8 @@ need to be changed to use
.I struct sockaddr_storage
for that instead.
.SH BUGS
-The IPv6 extended API as in RFC\ 2292 is currently only partly implemented;
+The IPv6 extended API as in RFC\ 2292 is currently only partly
+implemented;
although the 2.2 kernel has near complete support for receiving options,
the macros for generating IPv6 options are missing in glibc 2.1.
.PP
diff --git a/man7/netdevice.7 b/man7/netdevice.7
index cdd396422a..4143fedb7d 100644
--- a/man7/netdevice.7
+++ b/man7/netdevice.7
@@ -20,8 +20,9 @@ netdevice \- Low level access to Linux network devices
This man page describes the sockets interface which is used to configure
network devices.
-Linux supports some standard ioctls to configure network devices. They
-can be used on any socket's file descriptor regardless of the family or type.
+Linux supports some standard ioctls to configure network devices.
+They can be used on any socket's file descriptor regardless of the
+family or type.
They pass an
.B ifreq
structure:
@@ -153,8 +154,7 @@ Get or set the interface's hardware parameters using
Setting the parameters is a privileged operation.
.nf
-struct ifmap
-{
+struct ifmap {
unsigned long mem_start;
unsigned long mem_end;
unsigned short base_addr;
@@ -228,7 +228,8 @@ interface options. See the protocol man pages for a description.
For configuring IP addresses see
.BR ip (7).
.PP
-In addition some devices support private ioctls. These are not described here.
+In addition some devices support private ioctls.
+These are not described here.
.SH NOTES
Strictly speaking,
.B SIOCGIFCONF
diff --git a/man7/packet.7 b/man7/packet.7
index 1d9d519d85..f20acc6be5 100644
--- a/man7/packet.7
+++ b/man7/packet.7
@@ -61,17 +61,18 @@ is similar to but not compatible with the obsolete
of Linux 2.0.
.B SOCK_DGRAM
-operates on a slightly higher level. The physical header is removed before
-the packet is passed to the user. Packets sent through a
+operates on a slightly higher level.
+The physical header is removed before the packet is passed to the user.
+Packets sent through a
.B SOCK_DGRAM
-packet socket get a suitable physical layer header based on the information
-in the
+packet socket get a suitable physical layer header based on the
+information in the
.B sockaddr_ll
destination address before they are queued.
By default all packets of the specified protocol type
-are passed to a packet socket. To only get packets from a specific interface
-use
+are passed to a packet socket.
+To only get packets from a specific interface use
.BR bind (2)
specifying an address in a
.I struct sockaddr_ll
@@ -91,8 +92,8 @@ flag is passed to
.BR recvmsg (2),
.BR recv (2),
.BR recvfrom (2)
-the real length of the packet on the wire is always returned, even when it
-is longer than the buffer.
+the real length of the packet on the wire is always returned,
+even when it is longer than the buffer.
.SH "ADDRESS TYPES"
The sockaddr_ll is a device independent physical layer address.
@@ -179,8 +180,7 @@ structure as argument:
.RS
.nf
.ta 4n 20n 35n
-struct packet_mreq
-{
+struct packet_mreq {
int mr_ifindex; /* interface index */
unsigned short mr_type; /* action */
unsigned short mr_alen; /* address length */
@@ -206,7 +206,8 @@ and
.BR mr_alen ,
and
.B PACKET_MR_ALLMULTI
-sets the socket up to receive all multicast packets arriving at the interface.
+sets the socket up to receive all multicast packets arriving at
+the interface.
In addition the traditional ioctls
.BR SIOCSIFFLAGS ,
@@ -217,8 +218,8 @@ can be used for the same purpose.
.SH IOCTLS
.B SIOCGSTAMP
-can be used to receive the time stamp of the last received packet. Argument
-is a
+can be used to receive the time stamp of the last received packet.
+Argument is a
.I struct timeval.
In addition all standard ioctls defined in
@@ -228,9 +229,9 @@ and
are valid on packet sockets.
.SH "ERROR HANDLING"
-Packet sockets do no error handling other than errors occurred while passing
-the packet to the device driver. They don't have the concept of a pending
-error.
+Packet sockets do no error handling other than errors occurred
+while passing the packet to the device driver.
+They don't have the concept of a pending error.
.SH COMPATIBILITY
In Linux 2.0, the only way to get a packet socket was by calling
@@ -240,13 +241,13 @@ The main difference between the two methods is that
.B SOCK_PACKET
uses the old
.I struct sockaddr_pkt
-to specify an interface, which doesn't provide physical layer independence.
+to specify an interface, which doesn't provide physical layer
+independence.
.RS
.nf
.ta 4n 20n 35n
-struct sockaddr_pkt
-{
+struct sockaddr_pkt {
unsigned short spkt_family;
unsigned char spkt_device[14];
unsigned short spkt_protocol;
@@ -284,9 +285,9 @@ When
.B ETH_P_802_3
is specified as protocol for sending the kernel creates the
802.3 frame and fills out the length field; the user has to supply the LLC
-header to get a fully conforming packet. Incoming 802.3 packets are not
-multiplexed on the DSAP/SSAP protocol fields; instead they are supplied to the
-user as protocol
+header to get a fully conforming packet.
+Incoming 802.3 packets are not multiplexed on the DSAP/SSAP protocol
+fields; instead they are supplied to the user as protocol
.B ETH_P_802_2
with the LLC header prepended. It is thus not possible to bind to
.BR ETH_P_802_3 ;
@@ -360,7 +361,8 @@ The suggested workaround is to use
#endif
.fi
.RE
-This is fixed in later glibc versions and also does not occur on libc5 systems.
+This is fixed in later glibc versions and also does not occur on
+libc5 systems.
The IEEE 802.2/803.3 LLC handling could be considered as a bug.
diff --git a/man7/raw.7 b/man7/raw.7
index c647ebe478..172aa5b0d7 100644
--- a/man7/raw.7
+++ b/man7/raw.7
@@ -42,7 +42,8 @@ A protocol of
.B IPPROTO_RAW
implies enabled
.B IP_HDRINCL
-and is able to send any IP protocol that is specified in the passed header.
+and is able to send any IP protocol that is specified in the passed
+header.
Receiving of all IP protocols via
.B IPPROTO_RAW
is not possible using raw sockets.
@@ -126,7 +127,8 @@ In addition all
socket options valid for datagram sockets are supported.
.SH NOTES
-Raw sockets fragment a packet when its total length exceeds the interface MTU
+Raw sockets fragment a packet when its total length exceeds the
+interface MTU
(but see BUGS).
A more network friendly and faster alternative is to implement path MTU
discovery as described in the
@@ -160,19 +162,19 @@ on that particular socket; see
.BR ip (7).
Raw sockets may tap all IP protocols in Linux, even
-protocols like ICMP or TCP which have a protocol module in the kernel. In
-this case the packets are passed to both the kernel module and the raw
+protocols like ICMP or TCP which have a protocol module in the kernel.
+In this case the packets are passed to both the kernel module and the raw
socket(s).
This should not be relied upon in portable programs, many other BSD
socket implementation have limitations here.
-Linux never changes headers passed from the user (except for filling in some
-zeroed fields as described for
+Linux never changes headers passed from the user (except for filling
+in some zeroed fields as described for
.BR IP_HDRINCL ).
This differs from many other implementations of raw sockets.
-RAW sockets are generally rather unportable and should be avoided in programs
-intended to be portable.
+RAW sockets are generally rather unportable and should be avoided in
+programs intended to be portable.
Sending on raw sockets should take the IP protocol from
.BR sin_port ;
@@ -195,12 +197,12 @@ all network errors are saved in the error queue.
.B EMSGSIZE
Packet too big. Either Path MTU Discovery is enabled (the
.B IP_MTU_DISCOVER
-socket flag) or the packet size exceeds the maximum allowed IPv4 packet size
-of 64KB.
+socket flag) or the packet size exceeds the maximum allowed IPv4
+packet size of 64KB.
.TP
.B EACCES
-User tried to send to a broadcast address without having the broadcast flag
-set on the socket.
+User tried to send to a broadcast address without having the
+broadcast flag set on the socket.
.TP
.B EPROTO
An ICMP error has arrived reporting a parameter problem.
@@ -228,8 +230,9 @@ and
are new in Linux 2.2. They are Linux extensions
and should not be used in portable programs.
-Linux 2.0 enabled some bug-to-bug compatibility with BSD in the raw socket
-code when the SO_BSDCOMPAT socket option was set \(em since Linux 2.2,
+Linux 2.0 enabled some bug-to-bug compatibility with BSD in the
+raw socket code when the
+SO_BSDCOMPAT socket option was set \(em since Linux 2.2,
this option no longer has that effect.
.SH BUGS
diff --git a/man7/rtnetlink.7 b/man7/rtnetlink.7
index 16299add11..8a29907664 100644
--- a/man7/rtnetlink.7
+++ b/man7/rtnetlink.7
@@ -42,8 +42,7 @@ Some rtnetlink messages have optional attributes after the initial header:
.nf
.ta 4 19 32
-struct rtattr
-{
+struct rtattr {
unsigned short rta_len; /* Length of option */
unsigned short rta_type; /* Type of option */
/* Data follows */
@@ -68,8 +67,7 @@ structures.
.nf
.ta 4 19 32
-struct ifinfomsg
-{
+struct ifinfomsg {
unsigned char ifi_family; /* AF_UNSPEC */
unsigned short ifi_type; /* Device type */
int ifi_index; /* Interface index */
@@ -119,8 +117,7 @@ routing attributes.
.nf
.ta 4 19 32
-struct ifaddrmsg
-{
+struct ifaddrmsg {
unsigned char ifa_family; /* Address type */
unsigned char ifa_prefixlen; /* Prefixlength of the address */
unsigned char ifa_flags; /* Address flags */
@@ -187,8 +184,7 @@ and
.nf
.ta 4 19 32
-struct rtmsg
-{
+struct rtmsg {
unsigned char rtm_family; /* Address family of route */
unsigned char rtm_dst_len; /* Length of source */
unsigned char rtm_src_len; /* Length of destination */
@@ -335,8 +331,7 @@ structure.
.nf
.ta 4 19 32
-struct ndmsg
-{
+struct ndmsg {
unsigned char ndm_family;
int ndm_ifindex; /* Interface index */
__u16 ndm_state; /* State */
@@ -344,8 +339,7 @@ struct ndmsg
__u8 ndm_type;
};
-struct nda_cacheinfo
-{
+struct nda_cacheinfo {
__u32 ndm_confirmed;
__u32 ndm_used;
__u32 ndm_updated;
@@ -417,8 +411,7 @@ attributes.
.nf
.ta 4 19 32
-struct tcmsg
-{
+struct tcmsg {
unsigned char tcm_family;
int tcm_ifindex; /* interface index */
__u32 tcm_handle; /* Qdisc handle */
diff --git a/man7/socket.7 b/man7/socket.7
index 1935e1c10a..75e20d92f8 100644
--- a/man7/socket.7
+++ b/man7/socket.7
@@ -45,9 +45,9 @@ See
for more information on families and types.
.SH "SOCKET LAYER FUNCTIONS"
-These functions are used by the user process to send or receive packets and
-to do other socket operations. For more information see their respective
-manual pages.
+These functions are used by the user process to send or receive packets
+and to do other socket operations.
+For more information see their respective manual pages.
.BR socket (2)
creates a socket,
@@ -429,10 +429,12 @@ When the socket is closed as part of
it always lingers in the background.
.TP
.B SO_PRIORITY
-Set the protocol-defined priority for all packets to be sent on this socket.
-Linux uses this value to order the networking queues: packets with a higher
-priority may be processed first depending on the selected device queueing
-discipline. For
+Set the protocol-defined priority for all packets to be sent on
+this socket.
+Linux uses this value to order the networking queues:
+packets with a higher priority may be processed first depending
+on the selected device queueing discipline.
+For
.BR ip (7),
this also sets the IP type-of-service (TOS) field for outgoing packets.
Setting a priority outside the range 0 to 6 requires the
@@ -494,12 +496,12 @@ See
.BR fcntl (2)
for more information.
.PP
-Under some circumstances (e.g. multiple processes accessing a single socket),
-the condition that caused the
+Under some circumstances (e.g. multiple processes accessing a
+single socket), the condition that caused the
.B SIGIO
may have already disappeared when the process reacts to the signal.
-If this happens, the process should wait again because Linux will resend the
-signal later.
+If this happens, the process should wait again because Linux
+will resend the signal later.
.\" .SH ANCILLARY MESSAGES
.SH SYSCTLS
The core socket networking sysctls can be accessed using the
diff --git a/man7/tcp.7 b/man7/tcp.7
index d89a65cca7..d3cf0f993f 100644
--- a/man7/tcp.7
+++ b/man7/tcp.7
@@ -28,7 +28,8 @@ full-duplex connection between two sockets on top of
for both v4 and v6 versions.
TCP guarantees that the data arrives in order and
retransmits lost packets.
-It generates and checks a per-packet checksum to catch transmission errors.
+It generates and checks a per-packet checksum to catch
+transmission errors.
TCP does not preserve record boundaries.
A newly created TCP socket has no remote or local address and is not
@@ -86,7 +87,8 @@ call, and so a succeeding
call will not return the same size of buffer as requested
in the
.BR setsockopt (2)
-call. TCP uses the extra space for administrative purposes and internal
+call.
+TCP uses the extra space for administrative purposes and internal
kernel structures, and the sysctl variables reflect the
larger sizes compared to the actual TCP windows.
On individual connections, the socket buffer size must be
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.
diff --git a/man7/unix.7 b/man7/unix.7
index 1591691a4f..9751abd5e9 100644
--- a/man7/unix.7
+++ b/man7/unix.7
@@ -45,8 +45,8 @@ and (since kernel 2.6.4)
for a connection-oriented socket that preserves message boundaries
and delivers messages in the order that they were sent.
-Unix sockets support passing file descriptors or process credentials to other
-processes using ancillary data.
+Unix sockets support passing file descriptors or process credentials
+to other processes using ancillary data.
.SH "ADDRESS FORMAT"
A Unix address is defined as a filename in the filesystem or
@@ -81,7 +81,8 @@ If
.B sun_path
starts with a zero byte it refers to the abstract namespace maintained by
the Unix protocol module.
-The socket's address in this namespace is given by the rest of the bytes in
+The socket's address in this namespace is given by the rest of the
+bytes in
.BR sun_path .
Note that names in the abstract namespace are not zero-terminated.
@@ -96,7 +97,8 @@ by specifying SOL_SOCKET as the socket family.
.TP
.B SO_PASSCRED
Enables the receiving of the credentials of the sending process
-ancillary message. When this option is set and the socket is not yet connected
+ancillary message.
+When this option is set and the socket is not yet connected
a unique name in the abstract namespace will be generated automatically.
Expects an integer boolean flag.
@@ -135,7 +137,8 @@ Ancillary data is sent and received using
and
.BR recvmsg (2).
For historical reasons the ancillary message types listed below
-are specified with a SOL_SOCKET type even though they are PF_UNIX specific.
+are specified with a SOL_SOCKET type even though they are PF_UNIX
+specific.
To send them set the
.B cmsg_level
field of the struct
@@ -177,7 +180,8 @@ The sender must specify its own process ID (unless it has the capability
.BR CAP_SYS_ADMIN ),
its user ID, effective user ID, or saved set-user-ID (unless it has
.BR CAP_SETUID ),
-and its group ID, effective group ID, or saved set-group-ID (unless it has
+and its group ID, effective group ID, or saved set-group-ID
+(unless it has
.BR CAP_SETGID ).
To receive a
.I struct ucred
@@ -231,8 +235,10 @@ the remote socket does not exist or the filename is not a socket.
.TP
.B EINVAL
Invalid argument passed. A common cause is the missing setting of AF_UNIX
-in the sun_type field of passed addresses or the socket being in an invalid
-state for the applied operation.
+in the
+.I sun_type
+field of passed addresses or the socket being in an
+invalid state for the applied operation.
.TP
.B EOPNOTSUPP
Stream operation called on non-stream oriented socket or tried to
@@ -249,8 +255,8 @@ Remote socket does not match the local socket type (SOCK_DGRAM vs.
SOCK_STREAM)
.TP
.B EADDRINUSE
-Selected local address is already taken or filesystem socket object already
-exists.
+Selected local address is already taken or filesystem socket
+object already exists.
.TP
.B EISCONN
.BR connect (2)