diff options
Diffstat (limited to 'man7')
| -rw-r--r-- | man7/arp.7 | 32 | ||||
| -rw-r--r-- | man7/capabilities.7 | 6 | ||||
| -rw-r--r-- | man7/ddp.7 | 34 | ||||
| -rw-r--r-- | man7/epoll.7 | 17 | ||||
| -rw-r--r-- | man7/futex.7 | 24 | ||||
| -rw-r--r-- | man7/icmp.7 | 16 | ||||
| -rw-r--r-- | man7/inotify.7 | 20 | ||||
| -rw-r--r-- | man7/ip.7 | 79 | ||||
| -rw-r--r-- | man7/man.7 | 8 | ||||
| -rw-r--r-- | man7/netdevice.7 | 2 | ||||
| -rw-r--r-- | man7/netlink.7 | 55 | ||||
| -rw-r--r-- | man7/packet.7 | 135 | ||||
| -rw-r--r-- | man7/pty.7 | 18 | ||||
| -rw-r--r-- | man7/raw.7 | 115 | ||||
| -rw-r--r-- | man7/socket.7 | 37 | ||||
| -rw-r--r-- | man7/tcp.7 | 57 | ||||
| -rw-r--r-- | man7/udp.7 | 8 | ||||
| -rw-r--r-- | man7/unix.7 | 77 | ||||
| -rw-r--r-- | man7/uri.7 | 17 | ||||
| -rw-r--r-- | man7/x25.7 | 9 |
20 files changed, 388 insertions, 378 deletions
diff --git a/man7/arp.7 b/man7/arp.7 index df7b016eaa..e02db706bd 100644 --- a/man7/arp.7 +++ b/man7/arp.7 @@ -66,7 +66,7 @@ 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 +.SS Ioctls Three ioctls are available on all .B PF_INET sockets. @@ -126,7 +126,7 @@ Linux 2.2 does not support proxy network ARP entries, so this should be set to 0xffffffff, or 0 to remove an existing proxy arp entry. .B ATF_USETRAILERS is obsolete and should not be used. -.SH SYSCTLS +.SS Sysctls ARP supports a sysctl interface to configure parameters on a global or per-interface basis. The sysctls can be accessed by reading or writing the @@ -231,20 +231,6 @@ Defaults to 3. The maximum number of packets which may be queued for each unresolved 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. - -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 -functionality together. .SH VERSIONS The .I struct arpreq @@ -260,6 +246,20 @@ 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. +.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. + +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 +functionality together. .SH "SEE ALSO" .BR capabilities (7), .BR ip (7) diff --git a/man7/capabilities.7 b/man7/capabilities.7 index c6c599648d..92da0b17b7 100644 --- a/man7/capabilities.7 +++ b/man7/capabilities.7 @@ -511,6 +511,9 @@ all of its user IDs to non-zero values, it can do so using the .BR prctl () .B PR_SET_KEEPCAPS operation. +.SH "CONFORMING TO" +No standards govern capabilities, but the Linux capability implementation +is based on the withdrawn POSIX.1e draft standard. .SH NOTES The .I libcap @@ -520,9 +523,6 @@ to change than the interface provided by .BR capset (2) and .BR capget (2). -.SH "CONFORMING TO" -No standards govern capabilities, but the Linux capability implementation -is based on the withdrawn POSIX.1e draft standard. .SH BUGS There is as yet no file system support allowing capabilities to be associated with executable files. diff --git a/man7/ddp.7 b/man7/ddp.7 index f953567df6..9a75fcbe5d 100644 --- a/man7/ddp.7 +++ b/man7/ddp.7 @@ -57,7 +57,7 @@ Raw sockets may be only opened by a process with effective user ID 0 or when the process has the .B CAP_NET_RAW capability. -.SH "ADDRESS FORMAT" +.SS "Address Format" An Appletalk socket address is defined as a combination of a network number, a node number, and a port number. .PP @@ -113,9 +113,9 @@ wildcard and also implies \(lqthis node.\(rq The value of is a link local broadcast address. .\" FIXME this doesn't make sense [johnl] -.SH "SOCKET OPTIONS" +.SS "Socket Options" No protocol-specific socket options are supported. -.SH SYSCTLS +.SS Sysctls IP supports a sysctl interface to configure some global AppleTalk parameters. The sysctls can be accessed by reading or writing the @@ -139,23 +139,11 @@ The timer rate (in seconds) for the timer driving AARP. .PP The default values match the specification and should never need to be changed. -.SH IOCTLS +.SS Ioctls All ioctls described in .BR socket (7) apply to ddp. .\" FIXME Add a section about multicasting -.SH NOTES -Be very careful with the -.B SO_BROADCAST -option \- it is not privileged in Linux. -It is easy to overload the network -with careless sending to broadcast addresses. -.SH VERSIONS -Appletalk is supported by Linux 2.0 or higher. -The -.B sysctl -interface is -new in Linux 2.2. .SH ERRORS .\" FIXME document all errors. We should really fix the kernels to .\" give more uniform error returns (ENOMEM vs ENOBUFS, EPERM vs @@ -228,7 +216,19 @@ Network device not available or not capable of sending IP. .TP .B ENOPKG A kernel subsystem was not configured. -.SH COMPATIBILITY +.SH VERSIONS +Appletalk is supported by Linux 2.0 or higher. +The +.B sysctl +interface is +new in Linux 2.2. +.SH NOTES +Be very careful with the +.B SO_BROADCAST +option \- it is not privileged in Linux. +It is easy to overload the network +with careless sending to broadcast addresses. +.SS Compatibility The basic AppleTalk socket interface is compatible with .B netatalk on BSD-derived systems. diff --git a/man7/epoll.7 b/man7/epoll.7 index 46457e5e60..155be81688 100644 --- a/man7/epoll.7 +++ b/man7/epoll.7 @@ -19,6 +19,7 @@ .\" Davide Libenzi <davidel@xmailserver.org> .\" .\" +.\" FIXME Section titles and orderings in this page are very inconsistent .TH EPOLL 7 2002-10-23 "Linux" "Linux Programmer's Manual" .SH NAME epoll \- I/O event notification facility @@ -46,7 +47,7 @@ Interest for certain file descriptors is then registered via .BR epoll_ctl (2). Finally, the actual wait is started by .BR epoll_wait (2). -.SH NOTES +.SS Level Triggered and Edge Triggered The .B epoll event distribution interface is able to behave both as Edge Triggered @@ -161,7 +162,7 @@ it is caller responsibility to rearm the file descriptor using .BR epoll_ctl (2) with .BR EPOLL_CTL_MOD . -.SH EXAMPLE FOR SUGGESTED USAGE +.SS Example for Suggested Usage While the usage of .B epoll when employed like a Level Triggered interface does have the same @@ -230,7 +231,7 @@ calling .BR epoll_ctl (2) with .BR EPOLL_CTL_MOD . -.SH QUESTIONS AND ANSWERS +.SS Questions and Answers .TP .B Q1 What happens if you add the same fd to an epoll_set twice? @@ -334,7 +335,7 @@ I/O space for such file descriptor. Same is valid when writing using the .BR write (2) function. -.SH POSSIBLE PITFALLS AND WAYS TO AVOID THEM +.SS Possible Pitfalls and Ways to Avoid Them .TP .B o Starvation ( Edge Triggered ) .PP @@ -377,6 +378,10 @@ data structure as removed and link it to a cleanup list. If you find another event for fd 13 in your batch processing, you will discover the fd had been previously removed and there will be no confusion. +.SH VERSIONS +.BR epoll (7) +is a new API introduced in Linux kernel 2.5.44. +Its interface should be finalized in Linux kernel 2.5.66. .SH CONFORMING TO The epoll API is Linux specific. Some other systems provide similar @@ -384,10 +389,6 @@ mechanisms, e.g., FreeBSD has .IR kqueue , and Solaris has .IR /dev/poll . -.SH VERSIONS -.BR epoll (7) -is a new API introduced in Linux kernel 2.5.44. -Its interface should be finalized in Linux kernel 2.5.66. .SH "SEE ALSO" .BR epoll_create (2), .BR epoll_ctl (2), diff --git a/man7/futex.7 b/man7/futex.7 index 55371e934f..6329efb5c2 100644 --- a/man7/futex.7 +++ b/man7/futex.7 @@ -82,6 +82,11 @@ to for more details. The same holds for asynchronous futex waiting. +.SH "VERSIONS" +.PP +Initial futex support was merged in Linux 2.5.7 +but with different semantics from those described above. +Current semantics are available from Linux 2.5.40 onwards. .SH "NOTES" .PP To reiterate, bare futexes are not intended as an easy to use @@ -93,18 +98,13 @@ below. This man page illustrates the most common use of the .BR futex (2) primitives: it is by no means the only one. -.SH "AUTHORS" -.PP -Futexes were designed and worked on by Hubertus Franke -(IBM Thomas J. Watson Research Center), -Matthew Kirkwood, Ingo Molnar (Red Hat) and -Rusty Russell (IBM Linux Technology Center). -This page written by bert hubert. -.SH "VERSIONS" -.PP -Initial futex support was merged in Linux 2.5.7 -but with different semantics from those described above. -Current semantics are available from Linux 2.5.40 onwards. +.\" .SH "AUTHORS" +.\" .PP +.\" Futexes were designed and worked on by Hubertus Franke +.\" (IBM Thomas J. Watson Research Center), +.\" Matthew Kirkwood, Ingo Molnar (Red Hat) and +.\" Rusty Russell (IBM Linux Technology Center). +.\" This page written by bert hubert. .SH "SEE ALSO" .PP .BR futex (2), diff --git a/man7/icmp.7 b/man7/icmp.7 index 1d17107501..ff6380a34c 100644 --- a/man7/icmp.7 +++ b/man7/icmp.7 @@ -85,6 +85,14 @@ Maximum rate for sending packets. These packets are sent to prevent loops when a packet has crossed too many hops. +.SH VERSIONS +Support for the +.B ICMP_ADDRESS +request was removed in 2.2. +.PP +Support for +.B ICMP_SOURCE_QUENCH +was removed in Linux 2.2. .SH NOTES As many other implementations don't support .B IPPROTO_ICMP @@ -107,14 +115,6 @@ Linux ICMP internally uses a raw socket to send ICMPs. This raw socket may appear in .BR netstat (8) output with a zero inode. -.SH VERSIONS -Support for the -.B ICMP_ADDRESS -request was removed in 2.2. -.PP -Support for -.B ICMP_SOURCE_QUENCH -was removed in Linux 2.2. .SH "SEE ALSO" .BR ip (7) .PP diff --git a/man7/inotify.7 b/man7/inotify.7 index 9ead9b24cc..a3b9cec9ab 100644 --- a/man7/inotify.7 +++ b/man7/inotify.7 @@ -247,6 +247,16 @@ that can be created per real user ID. .IR /proc/sys/fs/inotify/max_user_watches This specifies a limit on the number of watches that can be associated with each inotify instance. +.SH "VERSIONS" +Inotify was merged into the 2.6.13 Linux kernel. +The required library interfaces were added to glibc in version 2.4. +.RB ( IN_DONT_FOLLOW , +.BR IN_MASK_ADD , +and +.B IN_ONLYDIR +were only added in version 2.5.) +.SH "CONFORMING TO" +The inotify API is Linux specific. .SH "NOTES" Inotify file descriptors can be monitored using .BR select (2), @@ -278,21 +288,11 @@ inotify file descriptor. Inotify monitoring of directories is not recursive: to monitor subdirectories under a directory, additional watches must be created. -.SH "VERSIONS" -Inotify was merged into the 2.6.13 Linux kernel. -The required library interfaces were added to glibc in version 2.4. -.RB ( IN_DONT_FOLLOW , -.BR IN_MASK_ADD , -and -.B IN_ONLYDIR -were only added in version 2.5.) .SH "BUGS" In kernels before 2.6.16, the .B IN_ONESHOT .I mask flag does not work. -.SH "CONFORMING TO" -The inotify API is Linux specific. .SH "SEE ALSO" .BR inotify_add_watch (2), .BR inotify_init (2), @@ -6,6 +6,7 @@ .\" and in case of nontrivial modification author and date .\" of the modification is added to the header. .\" $Id: ip.7,v 1.19 2000/12/20 18:10:31 ak Exp $ +.\" FIXME Section titles and orderings in this page are very inconsistent .TH IP 7 2001-06-19 "Linux" "Linux Programmer's Manual" .SH NAME ip \- Linux IPv4 protocol implementation @@ -99,7 +100,7 @@ unless the flag has been set. Care should be taken when using this flag as it makes TCP less reliable. -.SH "ADDRESS FORMAT" +.SS Address Format 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 @@ -194,7 +195,7 @@ means any address for binding; means any host and has the same effect on bind as .B INADDR_ANY for historical reasons. -.SH "SOCKET OPTIONS" +.SS Socket Options IP supports some protocol specific socket options that can be set with .BR setsockopt (2) and read with @@ -691,7 +692,7 @@ structure similar to When an invalid socket option is passed, .B ENOPROTOOPT is returned. -.SH SYSCTLS +.SS Sysctls The IP protocol supports the sysctl interface to configure some global options. The sysctls can be accessed by reading or writing the @@ -813,7 +814,7 @@ See .\" FIXME Document the conf/*/* sysctls .\" FIXME Document the route/* sysctls .\" FIXME document them all -.SH IOCTLS +.SS Ioctls All ioctls described in .BR socket (7) apply to ip. @@ -829,40 +830,6 @@ apply to ip. Ioctls to configure generic device parameters are described in .BR netdevice (7). .\" FIXME Add a discussion of multicasting -.SH NOTES -Be very careful with the -.B SO_BROADCAST -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. -.PP -Some other BSD sockets implementations provide -.I IP_RCVDSTADDR -and -.I IP_RECVIF -socket options to get the destination address and the interface of -received datagrams. -Linux has the more general -.I IP_PKTINFO -for the same task. -.PP -Some BSD sockets implementations also provide an -.I IP_RECVTTL -option, but an ancillary message with type -.I IP_RECVTTL -is passed with the incoming packet. -This is different from the -.I IP_TTL -option used in Linux. -.PP -Using -.I SOL_IP -socket options level isn't portable, BSD-based stacks use -.I IPPROTO_IP -level. .SH ERRORS .\" FIXME document all errors. .\" We should really fix the kernels to give more uniform @@ -981,7 +948,41 @@ Linux 2.0 only supported .BR ip_mreq . .PP The sysctls were introduced with Linux 2.2. -.SH COMPATIBILITY +.SH NOTES +Be very careful with the +.B SO_BROADCAST +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. +.PP +Some other BSD sockets implementations provide +.I IP_RCVDSTADDR +and +.I IP_RECVIF +socket options to get the destination address and the interface of +received datagrams. +Linux has the more general +.I IP_PKTINFO +for the same task. +.PP +Some BSD sockets implementations also provide an +.I IP_RECVTTL +option, but an ancillary message with type +.I IP_RECVTTL +is passed with the incoming packet. +This is different from the +.I IP_TTL +option used in Linux. +.PP +Using +.I SOL_IP +socket options level isn't portable, BSD-based stacks use +.I IPPROTO_IP +level. +.SS Compatibility For compatibility with Linux 2.0, the obsolete .BI "socket(PF_INET, SOCK_PACKET, " protocol ) syntax is still supported to open a diff --git a/man7/man.7 b/man7/man.7 index 2314029c20..bd3bd19f1d 100644 --- a/man7/man.7 +++ b/man7/man.7 @@ -778,6 +778,10 @@ Once you've confirmed that the additional capability is safe, let the maintainer of this document know about the safe command or sequence that should be added to this list. +.SH FILES +.IR /usr/share/groff/ [*/] tmac/tmac.an +.br +.I /usr/man/whatis .SH NOTES .PP By all means include full URLs (or URIs) in the text itself; @@ -827,10 +831,6 @@ tbl(1) .TP .B v vgrind(1) -.SH FILES -.IR /usr/share/groff/ [*/] tmac/tmac.an -.br -.I /usr/man/whatis .SH BUGS .PP Most of the macros describe formatting (e.g., font type and spacing) instead diff --git a/man7/netdevice.7 b/man7/netdevice.7 index 5c70b583a0..5dd6125b4d 100644 --- a/man7/netdevice.7 +++ b/man7/netdevice.7 @@ -61,7 +61,7 @@ Normally, the user specifies which device to affect by setting to the name of the interface. All other members of the structure may share memory. -.SH IOCTLS +.SS Ioctls If an ioctl is marked as privileged then using it requires an effective user ID of 0 or the .B CAP_NET_ADMIN diff --git a/man7/netlink.7 b/man7/netlink.7 index a07daf25ce..29d695fd69 100644 --- a/man7/netlink.7 +++ b/man7/netlink.7 @@ -4,6 +4,7 @@ .\" Based on the original comments from Alexey Kuznetsov .\" Modified 2005-12-27 by Hasso Tepper <hasso@estpak.ee> .\" $Id: netlink.7,v 1.8 2000/06/22 13:23:00 ak Exp $ +.\" FIXME Section titles and orderings in this page are very inconsistent .TH NETLINK 7 2005-12-27 "Linux" "Linux Programmer's Manual" .SH NAME netlink \- Communication between kernel and userspace (PF_NETLINK) @@ -345,6 +346,33 @@ Only processes with an effective UID of 0 or the capability may send or listen to a netlink multicast group. Any replies to a message received for a multicast group should be sent back to the sending PID and the multicast group. +.SH VERSIONS +The socket interface to netlink is a new feature of Linux 2.2. + +Linux 2.0 supported a more primitive device based netlink interface +(which is still available as a compatibility option). +This obsolete interface is not described here. + +NETLINK_SELINUX appeared in Linux 2.6.4. + +NETLINK_AUDIT appeared in Linux 2.6.6. + +NETLINK_KOBJECT_UEVENT appeared in Linux 2.6.10. + +NETLINK_W1 and NETLINK_FIB_LOOKUP appeared in Linux 2.6.13. + +NETLINK_INET_DIAG, NETLINK_CONNECTOR and NETLINK_NETFILTER appeared in +Linux 2.6.14. + +NETLINK_GENERIC and NETLINK_ISCSI appeared in Linux 2.6.15. +.SH NOTES +It is often better to use netlink via +.B libnetlink +or +.B libnl +than via the low level kernel interface. +.SH BUGS +This manual page is not complete. .SH EXAMPLE The following example creates a .B NETLINK_ROUTE @@ -420,33 +448,6 @@ for (nh = (struct nlmsghdr *) buf; NLMSG_OK (nh, len); } .fi .in -0.25i -.SH BUGS -This manual page is not complete. -.SH NOTES -It is often better to use netlink via -.B libnetlink -or -.B libnl -than via the low level kernel interface. -.SH VERSIONS -The socket interface to netlink is a new feature of Linux 2.2. - -Linux 2.0 supported a more primitive device based netlink interface -(which is still available as a compatibility option). -This obsolete interface is not described here. - -NETLINK_SELINUX appeared in Linux 2.6.4. - -NETLINK_AUDIT appeared in Linux 2.6.6. - -NETLINK_KOBJECT_UEVENT appeared in Linux 2.6.10. - -NETLINK_W1 and NETLINK_FIB_LOOKUP appeared in Linux 2.6.13. - -NETLINK_INET_DIAG, NETLINK_CONNECTOR and NETLINK_NETFILTER appeared in -Linux 2.6.14. - -NETLINK_GENERIC and NETLINK_ISCSI appeared in Linux 2.6.15. .SH "SEE ALSO" .BR cmsg (3), .BR netlink (3), diff --git a/man7/packet.7 b/man7/packet.7 index 5ce68f58b8..b80f5218e8 100644 --- a/man7/packet.7 +++ b/man7/packet.7 @@ -4,6 +4,7 @@ .\" and in case of nontrivial modification author and date .\" of the modification is added to the header. .\" $Id: packet.7,v 1.13 2000/08/14 08:03:45 ak Exp $ +.\" FIXME Section titles and orderings in this page are very inconsistent .TH PACKET 7 1999-04-29 "Linux" "Linux Programmer's Manual" .SH NAME packet, PF_PACKET \- packet interface on device level. @@ -102,7 +103,7 @@ flag is passed to .BR recvfrom (2) the real length of the packet on the wire is always returned, even when it is longer than the buffer. -.SH "ADDRESS TYPES" +.SS Address Types The sockaddr_ll is a device independent physical layer address. .in +0.25i @@ -171,7 +172,7 @@ For bind only and .B sll_ifindex are used. -.SH "SOCKET OPTIONS" +.SS Socket Options Packet sockets can be used to configure physical layer multicasting and promiscuous mode. It works by calling @@ -220,7 +221,7 @@ In addition the traditional ioctls .BR SIOCADDMULTI , .B SIOCDELMULTI can be used for the same purpose. -.SH IOCTLS +.SS Ioctls .B SIOCGSTAMP can be used to receive the time stamp of the last received packet. Argument is a @@ -231,73 +232,10 @@ In addition all standard ioctls defined in and .BR socket (7) are valid on packet sockets. -.SH "ERROR HANDLING" +.SS 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. -.SH COMPATIBILITY -In Linux 2.0, the only way to get a packet socket was by calling -.BI "socket(PF_INET, SOCK_PACKET, " protocol )\fR. -This is still supported but strongly deprecated. -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. - -.in +0.25i -.nf -struct sockaddr_pkt { - unsigned short spkt_family; - unsigned char spkt_device[14]; - unsigned short spkt_protocol; -}; -.fi -.in -0.25i - -.B spkt_family -contains -the device type, -.B spkt_protocol -is the IEEE 802.3 protocol type as defined in -.I <sys/if_ether.h> -and -.B spkt_device -is the device name as a null terminated string, e.g. eth0. - -This structure is obsolete and should not be used in new code. -.SH NOTES -For portable programs it is suggested to use -.B PF_PACKET -via -.BR pcap (3); -although this only covers a subset of the -.B PF_PACKET -features. - -The -.B SOCK_DGRAM -packet sockets make no attempt to create or parse the IEEE 802.2 LLC -header for a IEEE 802.3 frame. -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 -.B ETH_P_802_2 -with the LLC header prepended. -It is thus not possible to bind to -.BR ETH_P_802_3 ; -bind to -.B ETH_P_802_2 -instead and do the protocol multiplex yourself. -The default for sending is the standard Ethernet DIX -encapsulation with the protocol filled in. - -Packet sockets are not subject to the input or output firewall chains. .SH ERRORS .TP .B ENETDOWN @@ -352,6 +290,69 @@ Older systems need: #include <linux/if_ether.h> /* The L2 protocols */ .fi .in +.SH NOTES +For portable programs it is suggested to use +.B PF_PACKET +via +.BR pcap (3); +although this only covers a subset of the +.B PF_PACKET +features. + +The +.B SOCK_DGRAM +packet sockets make no attempt to create or parse the IEEE 802.2 LLC +header for a IEEE 802.3 frame. +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 +.B ETH_P_802_2 +with the LLC header prepended. +It is thus not possible to bind to +.BR ETH_P_802_3 ; +bind to +.B ETH_P_802_2 +instead and do the protocol multiplex yourself. +The default for sending is the standard Ethernet DIX +encapsulation with the protocol filled in. + +Packet sockets are not subject to the input or output firewall chains. +.SS Compatibility +In Linux 2.0, the only way to get a packet socket was by calling +.BI "socket(PF_INET, SOCK_PACKET, " protocol )\fR. +This is still supported but strongly deprecated. +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. + +.in +0.25i +.nf +struct sockaddr_pkt { + unsigned short spkt_family; + unsigned char spkt_device[14]; + unsigned short spkt_protocol; +}; +.fi +.in -0.25i + +.B spkt_family +contains +the device type, +.B spkt_protocol +is the IEEE 802.3 protocol type as defined in +.I <sys/if_ether.h> +and +.B spkt_device +is the device name as a null terminated string, e.g. eth0. + +This structure is obsolete and should not be used in new code. .SH BUGS glibc 2.1 does not have a define for .BR SOL_PACKET . diff --git a/man7/pty.7 b/man7/pty.7 index 3fe954ce89..0c9f6caaca 100644 --- a/man7/pty.7 +++ b/man7/pty.7 @@ -115,15 +115,6 @@ A process finds an unused pseudo-terminal pair by trying to each pseudo-terminal master until an open succeeds. The corresponding pseudo-terminal slave (substitute "tty" for "pty" in the name of the master) can then be opened. -.SH "NOTES" -A description of the -.B TIOCPKT -.BR ioctl (2), -which controls packet mode operation, can be found in -.BR tty_ioctl (4). - -The BSD ioctl(2)s TIOCSTOP, TIOCSTART, TIOCUCNTL, TIOCREMOTE have -not been implemented under Linux. .SH "FILES" .I /dev/ptmx (Unix 98 master clone device) @@ -137,6 +128,15 @@ not been implemented under Linux. .I /dev/tty[p-za-e][0-9a-f] (BSD slave devices) .I +.SH "NOTES" +A description of the +.B TIOCPKT +.BR ioctl (2), +which controls packet mode operation, can be found in +.BR tty_ioctl (4). + +The BSD ioctl(2)s TIOCSTOP, TIOCSTART, TIOCUCNTL, TIOCREMOTE have +not been implemented under Linux. .SH "SEE ALSO" .BR select (2), .BR setsid (2), diff --git a/man7/raw.7 b/man7/raw.7 index b4b3779fb4..e0cb4f3b2d 100644 --- a/man7/raw.7 +++ b/man7/raw.7 @@ -6,6 +6,7 @@ .\" and in case of nontrivial modification author and date .\" of the modification is added to the header. .\" $Id: raw.7,v 1.6 1999/06/05 10:32:08 freitag Exp $ +.\" FIXME Section titles and orderings in this page are very inconsistent .TH RAW 7 1998-10-02 "Linux" "Linux Programmer's Manual" .SH NAME raw, SOCK_RAW \- Linux IPv4 raw sockets @@ -86,7 +87,7 @@ protocols or protocols with no user interface (like ICMP). When a packet is received, it is passed to any raw sockets which have been bound to its protocol before it is passed to other protocol handlers (e.g. kernel protocol modules). -.SH "ADDRESS FORMAT" +.SS Address Format Raw sockets use the standard .I sockaddr_in address structure defined in @@ -102,7 +103,7 @@ is set to the protocol of the packet. See the .I <netinet/in.h> include file for valid IP protocols. -.SH "SOCKET OPTIONS" +.SS Socket Options Raw socket options can be set with .BR setsockopt (2) and read with @@ -124,6 +125,61 @@ In addition all .BR ip (7) .B IPPROTO_IP socket options valid for datagram sockets are supported. +.SS Error Handling +Errors originating from the network are only passed to the user when the +socket is connected or the +.B IP_RECVERR +flag is enabled. +For connected sockets only +.B EMSGSIZE +and +.B EPROTO +are passed for compatibility. +With +.B IP_RECVERR +all network errors are saved in the error queue. +.SH ERRORS +.TP +.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. +.TP +.B EACCES +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. +.TP +.B EFAULT +An invalid memory address was supplied. +.TP +.B EOPNOTSUPP +Invalid flag has been passed to a socket call (like +.BR MSG_OOB ). +.TP +.B EINVAL +Invalid argument. +.TP +.B EPERM +The user doesn't have permission to open raw sockets. +Only processes with a effective user ID of 0 or the +.B CAP_NET_RAW +attribute may do that. +.SH VERSIONS +.B IP_RECVERR +and +.B ICMP_FILTER +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, +this option no longer has that effect. .SH NOTES By default raw sockets do path MTU (Maximum Transmission Unit) discovery. This means the kernel @@ -189,61 +245,6 @@ Sending on raw sockets should take the IP protocol from this ability was lost in Linux 2.2. The workaround is to use .BR IP_HDRINCL . -.SH "ERROR HANDLING" -Errors originating from the network are only passed to the user when the -socket is connected or the -.B IP_RECVERR -flag is enabled. -For connected sockets only -.B EMSGSIZE -and -.B EPROTO -are passed for compatibility. -With -.B IP_RECVERR -all network errors are saved in the error queue. -.SH ERRORS -.TP -.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. -.TP -.B EACCES -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. -.TP -.B EFAULT -An invalid memory address was supplied. -.TP -.B EOPNOTSUPP -Invalid flag has been passed to a socket call (like -.BR MSG_OOB ). -.TP -.B EINVAL -Invalid argument. -.TP -.B EPERM -The user doesn't have permission to open raw sockets. -Only processes with a effective user ID of 0 or the -.B CAP_NET_RAW -attribute may do that. -.SH VERSIONS -.B IP_RECVERR -and -.B ICMP_FILTER -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, -this option no longer has that effect. .SH BUGS Transparent proxy extensions are not described. diff --git a/man7/socket.7 b/man7/socket.7 index d49d0bb6ed..cf34236182 100644 --- a/man7/socket.7 +++ b/man7/socket.7 @@ -17,6 +17,7 @@ .\" FIXME probably all PF_* should be AF_* in this page, since .\" POSIX only specifies the latter values. .\" +.\" FIXME Section titles and orderings in this page are very inconsistent .TH SOCKET 7 2004-05-27 "Linux 2.6.6" "Linux Programmer's Manual" .SH NAME socket \- Linux socket interface @@ -43,7 +44,7 @@ or See .BR socket (2) for more information on families and types. -.SH "SOCKET LAYER FUNCTIONS" +.SS 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. @@ -193,7 +194,7 @@ must be installed via See the .I SIGNALS discussion below. -.SH "SOCKET OPTIONS" +.SS Socket Options These socket options can be set by using .BR setsockopt (2) and read with @@ -487,7 +488,7 @@ Gets the socket type as an integer (like Can only be read with .BR getsockopt (2). -.SH SIGNALS +.SS Signals When writing onto a connection-oriented socket that has been shut down (by the local or the remote end) .B SIGPIPE @@ -530,8 +531,8 @@ single socket), the condition that caused the 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. -.\" .SH ANCILLARY MESSAGES -.SH SYSCTLS +.\" .SS Ancillary Messages +.SH Sysctls The core socket networking sysctls can be accessed using the .I /proc/sys/net/core/* files or with the @@ -567,7 +568,7 @@ Maximum number of packets in the global input queue. Maximum length of ancillary data and user control data like the iovecs per socket. .\" netdev_fastroute is not documented because it is experimental -.SH IOCTLS +.SS Ioctls These operations can be accessed using .BR ioctl (2): @@ -653,6 +654,18 @@ The same as the SIOCGPGRP .BR FIOSETOWN The same as the SIOCSPGRP .BR ioctl (2). +.SH VERSIONS +.B SO_BINDTODEVICE +was introduced in Linux 2.0.30. +.B SO_PASSCRED +is new in Linux 2.2. +The sysctls are new in Linux 2.2. +.B SO_RCVTIMEO +and +.B SO_SNDTIMEO +are supported since Linux 2.3.41. +Earlier, timeouts were fixed to +a protocol specific setting, and could not be read or written. .SH NOTES Linux assumes that half of the send/receive buffer is used for internal kernel structures; thus the sysctls are twice what can be observed @@ -677,18 +690,6 @@ are not documented. The suggested interface to use them is via the libpcap library. -.SH VERSIONS -.B SO_BINDTODEVICE -was introduced in Linux 2.0.30. -.B SO_PASSCRED -is new in Linux 2.2. -The sysctls are new in Linux 2.2. -.B SO_RCVTIMEO -and -.B SO_SNDTIMEO -are supported since Linux 2.3.41. -Earlier, timeouts were fixed to -a protocol specific setting, and could not be read or written. .\" .SH AUTHORS .\" This man page was written by Andi Kleen. .SH "SEE ALSO" diff --git a/man7/tcp.7 b/man7/tcp.7 index c80d628a8d..97fb474b05 100644 --- a/man7/tcp.7 +++ b/man7/tcp.7 @@ -12,6 +12,7 @@ .\" documented: tcp_mtu_probing, tcp_base_mss, and .\" tcp_workaround_signed_windows .\" +.\" FIXME Section titles and orderings in this page are very inconsistent .TH TCP 7 2005-06-15 "Linux" "Linux Programmer's Manual" .SH NAME tcp \- TCP protocol @@ -152,7 +153,7 @@ Some of these features include support for zero-copy Explicit Congestion Notification, new management of TIME_WAIT sockets, keep-alive socket options and support for Duplicate SACK extensions. -.SH "ADDRESS FORMATS" +.SS Address Formats TCP is built on top of IP (see .BR ip (7)). The address formats defined by @@ -161,7 +162,7 @@ apply to TCP. TCP only supports point-to-point communication; broadcasting and multicasting are not supported. -.SH SYSCTLS +.SS Sysctls These variables can be accessed by the .I /proc/sys/net/ipv4/* files or with the @@ -635,7 +636,7 @@ on a socket. The default value is 128K bytes. It is lowered to 64K depending on the memory available in the system. -.SH "SOCKET OPTIONS" +.SS Socket Options To set or get a TCP socket option, call .BR getsockopt (2) to read or @@ -765,7 +766,7 @@ Bound the size of the advertised window to this value. The kernel imposes a minimum size of SOCK_MIN_RCVBUF/2. This option should not be used in code intended to be portable. -.SH IOCTLS +.SS Ioctls These following .BR ioctl (2) calls return information in @@ -826,7 +827,7 @@ returns false. Returns the amount of unsent data in the socket send queue. The socket must not be in LISTEN state, otherwise an error (EINVAL) is returned. -.SH "ERROR HANDLING" +.SS Error Handling When a network error occurs, TCP tries to resend the packet. If it doesn't succeed after some time, either .B ETIMEDOUT @@ -843,22 +844,6 @@ errors are immediately passed to the user program. Use this option with care \(em it makes TCP less tolerant to routing changes and other normal network conditions. -.SH NOTES -TCP has no real out-of-band data; it has urgent data. -In Linux this means if the other end sends newer out-of-band -data the older urgent data is inserted as normal data into -the stream (even when -.B SO_OOBINLINE -is not set). -This differs from BSD-based stacks. -.PP -Linux uses the BSD compatible interpretation of the urgent -pointer field by default. -This violates RFC\ 1122, but is -required for interoperability with other stacks. -It can be changed by the -.B tcp_stdurg -sysctl. .SH ERRORS .TP .B EPIPE @@ -878,13 +863,6 @@ was not Any errors defined for .BR ip (7) or the generic socket layer may also be returned for TCP. -.SH BUGS -Not all errors are documented. -.br -IPv6 is not described. -.\" Only a single Linux kernel version is described -.\" Info for 2.2 was lost. Should be added again, -.\" or put into a separate page. .SH VERSIONS Support for Explicit Congestion Notification, zero-copy .BR sendfile (2), @@ -896,6 +874,29 @@ were introduced in 2.3. The default values and descriptions for the sysctl variables given above are applicable for the 2.4 kernel. +.SH NOTES +TCP has no real out-of-band data; it has urgent data. +In Linux this means if the other end sends newer out-of-band +data the older urgent data is inserted as normal data into +the stream (even when +.B SO_OOBINLINE +is not set). +This differs from BSD-based stacks. +.PP +Linux uses the BSD compatible interpretation of the urgent +pointer field by default. +This violates RFC\ 1122, but is +required for interoperability with other stacks. +It can be changed by the +.B tcp_stdurg +sysctl. +.SH BUGS +Not all errors are documented. +.br +IPv6 is not described. +.\" Only a single Linux kernel version is described +.\" Info for 2.2 was lost. Should be added again, +.\" or put into a separate page. .\" .SH AUTHORS .\" This man page was originally written by Andi Kleen. .\" It was updated for 2.4 by Nivedita Singhvi with input from diff --git a/man7/udp.7 b/man7/udp.7 index da9a4c6f40..3fe2f6ec51 100644 --- a/man7/udp.7 +++ b/man7/udp.7 @@ -87,12 +87,12 @@ When turned off UDP will fragment outgoing UDP packets that exceed the interface MTU. However disabling it is not recommended for performance and reliability reasons. -.SH "ADDRESS FORMAT" +.SS "Address Format" UDP uses the IPv4 .B sockaddr_in address format described in .BR ip (7). -.SH "ERROR HANDLING" +.SS "Error Handling" All fatal errors will be passed to the user as an error return even when the socket is not connected. This includes asynchronous errors @@ -125,7 +125,7 @@ and can be received by with the .B MSG_ERRQUEUE flag set. -.SH "SOCKET OPTIONS" +.SS "Socket Options" To set or get a UDP socket option, call .BR getsockopt (2) to read or @@ -140,7 +140,7 @@ the option is disabled. This option should not be used in code intended to be portable. .\" FIXME document UDP_ENCAP (new in kernel 2.5.67) -.SH IOCTLS +.SS Ioctls These ioctls can be accessed using .BR ioctl (2). The correct syntax is: diff --git a/man7/unix.7 b/man7/unix.7 index 13568ba65d..1cdc335fba 100644 --- a/man7/unix.7 +++ b/man7/unix.7 @@ -9,6 +9,7 @@ .\" Modified, 2004-05-27, Michael Kerrisk, <mtk-manpages@gmx.net> .\" Added SOCK_SEQPACKET .\" +.\" FIXME Section titles and orderings in this page are very inconsistent .TH UNIX 7 2004-05-27 "Linux" "Linux Programmer's Manual" .SH NAME unix, PF_UNIX, AF_UNIX, PF_LOCAL, AF_LOCAL \- Sockets for local @@ -48,7 +49,7 @@ 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. -.SH "ADDRESS FORMAT" +.SS Address Format A Unix address is defined as a filename in the filesystem or as a unique string in the abstract namespace. Sockets created by @@ -87,7 +88,7 @@ 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. -.SH "SOCKET OPTIONS" +.SS Socket Options For historical reasons these socket options are specified with a SOL_SOCKET type even though they are PF_UNIX specific. They can be set with @@ -102,7 +103,7 @@ 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. -.SH "(UN)SUPPORTED FEATURES" +.SS (Un)supported Features The following paragraphs describe domain-specific details and unsupported features of the sockets API for Unix domain sockets on Linux. @@ -130,7 +131,7 @@ value imposes an upper limit on the size of outgoing datagrams. This limit is calculated as the doubled (see .BR socket (7)) option value less 32 bytes used for overhead. -.SH "ANCILLARY MESSAGES" +.SS Ancillary Messages Ancillary data is sent and received using .BR sendmsg (2) and @@ -186,40 +187,6 @@ To receive a message the .B SO_PASSCRED option must be enabled on the socket. -.SH VERSIONS -.B SCM_CREDENTIALS -and the abstract namespace were introduced with Linux 2.2 and should not -be used in portable programs. -(Some BSD-derived systems also support credential passing, -but the implementation details differ.) -.SH NOTES -In the Linux implementation, sockets which are visible in the -filesystem honour the permissions of the directory they are in. -Their owner, group and their permissions can be changed. -Creation of a new socket will fail if the process does not have write and -search (execute) permission on the directory the socket is created in. -Connecting to the socket object requires read/write permission. -This behavior differs from many BSD-derived systems which -ignore permissions for Unix sockets. -Portable programs should not rely on -this feature for security. - -Binding to a socket with a filename creates a socket -in the file system that must be deleted by the caller when it is no -longer needed (using -.BR unlink (2)). -The usual Unix close-behind semantics apply; the socket can be unlinked -at any time and will be finally removed from the file system when the last -reference to it is closed. - -To pass file descriptors or credentials over a SOCK_STREAM, you need -to send or receive at least one byte of non-ancillary data in the same -.BR sendmsg (2) -or -.BR recvmsg (2) -call. - -Unix domain stream sockets do not support the notion of out-of-band data. .SH ERRORS .TP .B ENOMEM @@ -290,6 +257,40 @@ The sender passed invalid credentials in the Other errors can be generated by the generic socket layer or by the filesystem while generating a filesystem socket object. See the appropriate manual pages for more information. +.SH VERSIONS +.B SCM_CREDENTIALS +and the abstract namespace were introduced with Linux 2.2 and should not +be used in portable programs. +(Some BSD-derived systems also support credential passing, +but the implementation details differ.) +.SH NOTES +In the Linux implementation, sockets which are visible in the +filesystem honour the permissions of the directory they are in. +Their owner, group and their permissions can be changed. +Creation of a new socket will fail if the process does not have write and +search (execute) permission on the directory the socket is created in. +Connecting to the socket object requires read/write permission. +This behavior differs from many BSD-derived systems which +ignore permissions for Unix sockets. +Portable programs should not rely on +this feature for security. + +Binding to a socket with a filename creates a socket +in the file system that must be deleted by the caller when it is no +longer needed (using +.BR unlink (2)). +The usual Unix close-behind semantics apply; the socket can be unlinked +at any time and will be finally removed from the file system when the last +reference to it is closed. + +To pass file descriptors or credentials over a SOCK_STREAM, you need +to send or receive at least one byte of non-ancillary data in the same +.BR sendmsg (2) +or +.BR recvmsg (2) +call. + +Unix domain stream sockets do not support the notion of out-of-band data. .SH "SEE ALSO" .BR recvmsg (2), .BR sendmsg (2), diff --git a/man7/uri.7 b/man7/uri.7 index cd46e46aeb..0fba60e2b0 100644 --- a/man7/uri.7 +++ b/man7/uri.7 @@ -44,6 +44,7 @@ .\" Modified Fri Aug 21 23:00:00 1999 by David A. Wheeler (dwheeler@dwheeler.com) .\" Modified Tue Mar 14 2000 by David A. Wheeler (dwheeler@dwheeler.com) .\" +.\" FIXME Section titles and orderings in this page are very inconsistent .TH URI 7 2000-03-14 "Linux" "Linux Programmer's Manual" .SH NAME uri, url, urn \- uniform resource identifier (URI), including a URL or URN @@ -540,6 +541,13 @@ permitted, and can only be used when there is no defined base (such as in dialog boxes). Don't use abbreviated URIs as hypertext links inside a document; use the standard format as described here. +.SH "CONFORMING TO" +.PP +.IR http://www.ietf.org/rfc/rfc2396.txt +(IETF RFC\ 2396), +.I http://www.w3.org/TR/REC-html40 +(HTML 4.0). +.UE .SH NOTES Any tool accepting URIs (e.g., a web browser) on a Linux system should be able to handle (directly or indirectly) all of the schemes described here, @@ -577,7 +585,7 @@ It is expected that GNOME and KDE will converge to common URI formats, and a future version of this man page will describe the converged result. Efforts to aid this convergence are encouraged. -.SH SECURITY +.SS Security .PP A URI does not in itself pose a security threat. There is no general guarantee that a URL, which at one time @@ -620,13 +628,6 @@ intended to be secret. In particular, the use of a password within the 'userinfo' component of a URI is strongly recommended against except in those rare cases where the 'password' parameter is intended to be public. -.SH "CONFORMING TO" -.PP -.IR http://www.ietf.org/rfc/rfc2396.txt -(IETF RFC\ 2396), -.I http://www.w3.org/TR/REC-html40 -(HTML 4.0). -.UE .SH BUGS .PP Documentation may be placed in a variety of locations, so there diff --git a/man7/x25.7 b/man7/x25.7 index 8c51da6c5f..3ca08c3343 100644 --- a/man7/x25.7 +++ b/man7/x25.7 @@ -4,6 +4,7 @@ .\" and in case of nontrivial modification author and date .\" of the modification is added to the header. .\" $Id: x25.7,v 1.4 1999/05/18 10:35:12 freitag Exp $ +.\" FIXME Section titles and orderings in this page are very inconsistent .TH X25 7 1998-12-01 "Linux" "Linux Programmer's Manual" .SH NAME x25, PF_X25 \- ITU-T X.25 / ISO-8208 protocol interface. @@ -39,7 +40,7 @@ there is a temporary lack of system resources or when other constraints (such as socket memory or buffer size limits) become effective. If that occurs, the X.25 connection will be reset. -.SH "SOCKET ADDRESSES" +.SS Socket Addresses The .B AF_X25 socket address family uses the @@ -64,7 +65,7 @@ to be interpreted as a null-terminated string. consists of up to 15 (not counting the terminating 0) ASCII characters forming the X.121 address. Only the decimal digit characters from `0' to `9' are allowed. -.SH "SOCKET OPTIONS" +.SS Socket Options The following X.25 specific socket options can be set by using .BR setsockopt (2) and read with @@ -90,6 +91,8 @@ If the first byte of the data written to the socket is 1 the Q-bit of the corresponding outgoing data packets will be set. If the first byte is 0 the Q-bit will not be set. +.SH VERSIONS +The PF_X25 protocol family is a new feature of Linux 2.2. .SH BUGS Plenty, as the X.25 PLP implementation is .BR CONFIG_EXPERIMENTAL . @@ -106,8 +109,6 @@ interface are not binary compatible. X.25 N-Reset events are not propagated to the user process yet. Thus, if a reset occurred, data might be lost without notice. -.SH VERSIONS -The PF_X25 protocol family is a new feature of Linux 2.2. .SH "SEE ALSO" .BR socket (2), .BR socket (7) |
