s/PF_/AF_/ for socket family constants. Reasons: the AF_ and

PF_ constants have always had the same values; there never has
been a protocol family that had more than one address family,
and POSIX.1-2001 only specifies the AF_* constants.
This commit is contained in:
Michael Kerrisk 2008-08-08 16:47:53 +00:00
parent 77117f4fc5
commit d4c8c97c31
16 changed files with 74 additions and 77 deletions

View File

@ -62,7 +62,7 @@
.\" Modified 1998, 1999 by Andi Kleen
.\" Modified 2004-06-23 by Michael Kerrisk <mtk.manpages@gmail.com>
.\"
.TH CONNECT 2 2007-12-28 "Linux" "Linux Programmer's Manual"
.TH CONNECT 2 2008-08-08 "Linux" "Linux Programmer's Manual"
.SH NAME
connect \- initiate a connection on a socket
.SH SYNOPSIS
@ -155,7 +155,7 @@ field.
.B EAGAIN
No more free local ports or insufficient entries in the routing cache.
For
.B PF_INET
.B AF_INET
see the
.I net.ipv4.ip_local_port_range
sysctl in

View File

@ -38,7 +38,7 @@
.\" Modified 2002-07-17 by Michael Kerrisk <mtk.manpages@gmail.com>
.\" Modified 2004-06-17 by Michael Kerrisk <mtk.manpages@gmail.com>
.\"
.TH SOCKET 2 2004-06-17 "Linux" "Linux Programmer's Manual"
.TH SOCKET 2 2008-08-08 "Linux" "Linux Programmer's Manual"
.SH NAME
socket \- create an endpoint for communication
.SH SYNOPSIS
@ -63,52 +63,52 @@ tab(:);
l l l.
Name:Purpose:Man page
T{
.BR PF_UNIX ", " PF_LOCAL
.BR AF_UNIX ", " AF_LOCAL
T}:T{
Local communication
T}:T{
.BR unix (7)
T}
T{
.B PF_INET
.B AF_INET
T}:IPv4 Internet protocols:T{
.BR ip (7)
T}
T{
.B PF_INET6
.B AF_INET6
T}:IPv6 Internet protocols:T{
.BR ipv6 (7)
T}
T{
.B PF_IPX
.B AF_IPX
T}:IPX \- Novell protocols:
T{
.B PF_NETLINK
.B AF_NETLINK
T}:T{
Kernel user interface device
T}:T{
.BR netlink (7)
T}
T{
.B PF_X25
.B AF_X25
T}:ITU-T X.25 / ISO-8208 protocol:T{
.BR x25 (7)
T}
T{
.B PF_AX25
.B AF_AX25
T}:T{
Amateur radio AX.25 protocol
T}:
T{
.B PF_ATMPVC
.B AF_ATMPVC
T}:Access to raw ATM PVCs:
T{
.B PF_APPLETALK
.B AF_APPLETALK
T}:Appletalk:T{
.BR ddp (7)
T}
T{
.B PF_PACKET
.B AF_PACKET
T}:T{
Low level packet interface
T}:T{

View File

@ -4,7 +4,7 @@
.\" and in case of nontrivial modification author and date
.\" of the modification is added to the header.
.\" $Id: rtnetlink.3,v 1.2 1999/05/18 10:35:10 freitag Exp $
.TH RTNETLINK 3 1999-05-14 "GNU" "Linux Programmer's Manual"
.TH RTNETLINK 3 2008-08-08 "GNU" "Linux Programmer's Manual"
.SH NAME
rtnetlink \- macros to manipulate rtnetlink messages
.SH SYNOPSIS
@ -16,7 +16,7 @@ rtnetlink \- macros to manipulate rtnetlink messages
.br
.B #include <sys/socket.h>
.BI "rtnetlink_socket = socket(PF_NETLINK, int " socket_type \
.BI "rtnetlink_socket = socket(AF_NETLINK, int " socket_type \
", NETLINK_ROUTE);"
.sp
.BI "int RTA_OK(struct rtattr *" rta ", int " rtabuflen );
@ -94,7 +94,7 @@ Creating a rtnetlink message to set the MTU of a device:
struct rtattr *rta;
unsigned int mtu = 1000;
int rtnetlink_sk = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_ROUTE);
int rtnetlink_sk = socket(AF_NETLINK, SOCK_DGRAM, NETLINK_ROUTE);
memset(&req, 0, sizeof(req));
req.nh.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifinfomsg));

View File

@ -6,7 +6,7 @@
.\" of the modification is added to the header.
.\" Modified June 1999 Andi Kleen
.\" $Id: arp.7,v 1.10 2000/04/27 19:31:38 ak Exp $
.TH ARP 7 2007-07-27 "Linux" "Linux Programmer's Manual"
.TH ARP 7 2008-08-08 "Linux" "Linux Programmer's Manual"
.SH NAME
arp \- Linux ARP kernel module.
.SH DESCRIPTION
@ -28,7 +28,7 @@ sockets.
The ARP table can also be controlled via
.BR ioctl (2)
on any
.B PF_INET
.B AF_INET
socket.
The ARP module maintains a cache of mappings between hardware addresses
@ -68,7 +68,7 @@ enabled on the receiving interface.
When there is a reject route for the target no proxy arp entry is added.
.SS Ioctls
Three ioctls are available on all
.B PF_INET
.B AF_INET
sockets.
They take a pointer to a
.I struct arpreq

View File

@ -4,7 +4,7 @@
.\" and in case of nontrivial modification author and date
.\" of the modification is added to the header.
.\" $Id: ddp.7,v 1.3 1999/05/13 11:33:22 freitag Exp $
.TH DDP 7 1999-05-01 "Linux" "Linux Programmer's Manual"
.TH DDP 7 2008-08-08 "Linux" "Linux Programmer's Manual"
.SH NAME
ddp \- Linux AppleTalk protocol implementation
.SH SYNOPSIS
@ -12,9 +12,9 @@ ddp \- Linux AppleTalk protocol implementation
.br
.B #include <netatalk/at.h>
.sp
.IB ddp_socket " = socket(PF_APPLETALK, SOCK_DGRAM, 0);"
.IB ddp_socket " = socket(AF_APPLETALK, SOCK_DGRAM, 0);"
.br
.IB raw_socket " = socket(PF_APPLETALK, SOCK_RAW, " protocol ");"
.IB raw_socket " = socket(AF_APPLETALK, SOCK_RAW, " protocol ");"
.SH DESCRIPTION
Linux implements the Appletalk protocols described in
.IR "Inside Appletalk" .
@ -35,7 +35,7 @@ For more information on sockets, see
An AppleTalk socket is created by calling the
.BR socket (2)
function with a
.B PF_APPLETALK
.B AF_APPLETALK
socket family argument.
Valid socket types are
.B SOCK_DGRAM

View File

@ -6,7 +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 $
.TH IP 7 2001-06-19 "Linux" "Linux Programmer's Manual"
.TH IP 7 2008-08-08 "Linux" "Linux Programmer's Manual"
.SH NAME
ip \- Linux IPv4 protocol implementation
.SH SYNOPSIS
@ -18,11 +18,11 @@ ip \- Linux IPv4 protocol implementation
.br
.B #include <netinet/ip.h> \fR/* superset of previous */
.sp
.IB tcp_socket " = socket(PF_INET, SOCK_STREAM, 0);"
.IB tcp_socket " = socket(AF_INET, SOCK_STREAM, 0);"
.br
.IB udp_socket " = socket(PF_INET, SOCK_DGRAM, 0);"
.IB udp_socket " = socket(AF_INET, SOCK_DGRAM, 0);"
.br
.IB raw_socket " = socket(PF_INET, SOCK_RAW, " protocol ");"
.IB raw_socket " = socket(AF_INET, SOCK_RAW, " protocol ");"
.SH DESCRIPTION
Linux implements the Internet Protocol, version 4,
described in RFC\ 791 and RFC\ 1122.
@ -39,7 +39,7 @@ For more information on sockets, see
An IP socket is created by calling the
.BR socket (2)
function as
.BR "socket(PF_INET, socket_type, protocol)" .
.BR "socket(AF_INET, socket_type, protocol)" .
Valid socket types are
.B SOCK_STREAM
to open a
@ -983,12 +983,12 @@ socket options level isn't portable, BSD-based stacks use
level.
.SS Compatibility
For compatibility with Linux 2.0, the obsolete
.BI "socket(PF_INET, SOCK_PACKET, " protocol )
.BI "socket(AF_INET, SOCK_PACKET, " protocol )
syntax is still supported to open a
.BR packet (7)
socket.
This is deprecated and should be replaced by
.BI "socket(PF_PACKET, SOCK_RAW, " protocol )
.BI "socket(AF_PACKET, SOCK_RAW, " protocol )
instead.
The main difference is the new
.I sockaddr_ll

View File

@ -4,19 +4,19 @@
.\" and in case of nontrivial modification author and date
.\" of the modification is added to the header.
.\" $Id: ipv6.7,v 1.3 2000/12/20 18:10:31 ak Exp $
.TH IPV6 7 2008-07-17 "Linux" "Linux Programmer's Manual"
.TH IPV6 7 2008-08-08 "Linux" "Linux Programmer's Manual"
.SH NAME
ipv6, PF_INET6 \- Linux IPv6 protocol implementation
ipv6, AF_INET6 \- Linux IPv6 protocol implementation
.SH SYNOPSIS
.B #include <sys/socket.h>
.br
.B #include <netinet/in.h>
.sp
.IB tcp6_socket " = socket(PF_INET6, SOCK_STREAM, 0);"
.IB tcp6_socket " = socket(AF_INET6, SOCK_STREAM, 0);"
.br
.IB raw6_socket " = socket(PF_INET6, SOCK_RAW, " protocol ");"
.IB raw6_socket " = socket(AF_INET6, SOCK_RAW, " protocol ");"
.br
.IB udp6_socket " = socket(PF_INET6, SOCK_DGRAM, " protocol ");"
.IB udp6_socket " = socket(AF_INET6, SOCK_DGRAM, " protocol ");"
.SH DESCRIPTION
Linux 2.2 optionally implements the Internet Protocol, version 6.
This man page contains a description of the IPv6 basic API as

View File

@ -4,16 +4,16 @@
.\" 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 $
.TH NETLINK 7 2005-12-27 "Linux" "Linux Programmer's Manual"
.TH NETLINK 7 2008-08-08 "Linux" "Linux Programmer's Manual"
.SH NAME
netlink \- Communication between kernel and userspace (PF_NETLINK)
netlink \- Communication between kernel and userspace (AF_NETLINK)
.SH SYNOPSIS
.nf
.B #include <asm/types.h>
.B #include <sys/socket.h>
.B #include <linux/netlink.h>
.BI "netlink_socket = socket(PF_NETLINK, " socket_type ", " netlink_family );
.BI "netlink_socket = socket(AF_NETLINK, " socket_type ", " netlink_family );
.fi
.SH DESCRIPTION
Netlink is used to transfer information between kernel and

View File

@ -4,9 +4,9 @@
.\" 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 $
.TH PACKET 7 1999-04-29 "Linux" "Linux Programmer's Manual"
.TH PACKET 7 2008-08-08 "Linux" "Linux Programmer's Manual"
.SH NAME
packet, PF_PACKET \- packet interface on device level.
packet, AF_PACKET \- packet interface on device level.
.SH SYNOPSIS
.nf
.B #include <sys/socket.h>
@ -15,7 +15,7 @@ packet, PF_PACKET \- packet interface on device level.
.br
.B #include <net/ethernet.h> /* the L2 protocols */
.sp
.BI "packet_socket = socket(PF_PACKET, int " socket_type ", int "protocol );
.BI "packet_socket = socket(AF_PACKET, int " socket_type ", int "protocol );
.fi
.SH DESCRIPTION
Packet sockets are used to receive or send raw packets at the device driver
@ -64,7 +64,7 @@ destination address.
Some device drivers always add other headers.
.B SOCK_RAW
is similar to but not compatible with the obsolete
.B PF_INET/SOCK_PACKET
.B AF_INET/SOCK_PACKET
of Linux 2.0.
.B SOCK_DGRAM
@ -274,7 +274,7 @@ User has insufficient privileges to carry out this operation.
In addition other errors may be generated by the low-level driver.
.SH VERSIONS
.B PF_PACKET
.B AF_PACKET
is a new feature in Linux 2.2.
Earlier Linux versions supported only
.BR SOCK_PACKET .
@ -293,11 +293,11 @@ Older systems need:
.in
.SH NOTES
For portable programs it is suggested to use
.B PF_PACKET
.B AF_PACKET
via
.BR pcap (3);
although this only covers a subset of the
.B PF_PACKET
.B AF_PACKET
features.
The
@ -324,7 +324,7 @@ 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.
.BI "socket(AF_INET, SOCK_PACKET, " protocol )\fR.
This is still supported but strongly deprecated.
The main difference between the two methods is that
.B SOCK_PACKET
@ -383,7 +383,7 @@ packets via
.BR SOCK_DGRAM .
.\" .SH CREDITS
.\" This man page was written by Andi Kleen with help from Matthew Wilcox.
.\" PF_PACKET in Linux 2.2 was implemented
.\" AF_PACKET in Linux 2.2 was implemented
.\" by Alexey Kuznetsov, based on code by Alan Cox and others.
.SH "SEE ALSO"
.BR socket (2),

View File

@ -6,7 +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 $
.TH RAW 7 1998-10-02 "Linux" "Linux Programmer's Manual"
.TH RAW 7 2008-08-08 "Linux" "Linux Programmer's Manual"
.SH NAME
raw, SOCK_RAW \- Linux IPv4 raw sockets
.SH SYNOPSIS
@ -14,7 +14,7 @@ raw, SOCK_RAW \- Linux IPv4 raw sockets
.br
.B #include <netinet/in.h>
.br
.BI "raw_socket = socket(PF_INET, SOCK_RAW, int " protocol );
.BI "raw_socket = socket(AF_INET, SOCK_RAW, int " protocol );
.SH DESCRIPTION
Raw sockets allow new IPv4 protocols to be implemented in user space.
A raw socket receives or sends the raw datagram not

View File

@ -8,7 +8,7 @@
.\" Based on the original comments from Alexey Kuznetsov, written with
.\" help from Matthew Wilcox.
.\" $Id: rtnetlink.7,v 1.8 2000/01/22 01:55:04 freitag Exp $
.TH RTNETLINK 7 1999-04-30 "Linux" "Linux Programmer's Manual"
.TH RTNETLINK 7 2008-08-08 "Linux" "Linux Programmer's Manual"
.SH NAME
rtnetlink, NETLINK_ROUTE \- Linux IPv4 routing socket
.SH SYNOPSIS
@ -20,7 +20,7 @@ rtnetlink, NETLINK_ROUTE \- Linux IPv4 routing socket
.br
.B #include <sys/socket.h>
.sp
.BI "rtnetlink_socket = socket(PF_NETLINK, int " socket_type ", NETLINK_ROUTE);"
.BI "rtnetlink_socket = socket(AF_NETLINK, int " socket_type ", NETLINK_ROUTE);"
.SH DESCRIPTION
Rtnetlink allows the kernel's routing tables to be read and altered.
It is used within the kernel to communicate between

View File

@ -14,10 +14,7 @@
.\" Added notes on capability requirements
.\" A few small grammar fixes
.\"
.\" FIXME probably all PF_* should be AF_* in this page, since
.\" POSIX only specifies the latter values.
.\"
.TH SOCKET 7 2007-12-28 Linux "Linux Programmer's Manual"
.TH SOCKET 7 2008-08-08 Linux "Linux Programmer's Manual"
.SH NAME
socket \- Linux socket interface
.SH SYNOPSIS
@ -33,7 +30,7 @@ between the user process and the network protocol stacks in the kernel.
The protocol modules are grouped into
.I protocol families
like
.BR PF_INET ", " PF_IPX ", " PF_PACKET
.BR AF_INET ", " AF_IPX ", " AF_PACKET
and
.I socket types
like
@ -62,7 +59,7 @@ is used to get a new socket with a new incoming connection.
.BR socketpair (2)
returns two connected anonymous sockets (only implemented for a few
local families like
.BR PF_UNIX )
.BR AF_UNIX )
.PP
.BR send (2),
.BR sendto (2),
@ -327,9 +324,9 @@ For more information see
.B SO_PEERCRED
Return the credentials of the foreign process connected to this socket.
This is only possible for connected
.B PF_UNIX
.B AF_UNIX
stream sockets and
.B PF_UNIX
.B AF_UNIX
stream and datagram socket pairs created using
.BR socketpair (2);
see
@ -447,7 +444,7 @@ Indicates that the rules used in validating addresses supplied in a
.BR bind (2)
call should allow reuse of local addresses.
For
.B PF_INET
.B AF_INET
sockets this
means that a socket may bind, except when there
is an active listening socket bound to the address.

View File

@ -12,7 +12,7 @@
.\" documented: tcp_mtu_probing, tcp_base_mss, and
.\" tcp_workaround_signed_windows
.\"
.TH TCP 7 2007-11-25 "Linux" "Linux Programmer's Manual"
.TH TCP 7 2008-08-08 "Linux" "Linux Programmer's Manual"
.SH NAME
tcp \- TCP protocol
.SH SYNOPSIS
@ -22,7 +22,7 @@ tcp \- TCP protocol
.br
.B #include <netinet/tcp.h>
.sp
.B tcp_socket = socket(PF_INET, SOCK_STREAM, 0);
.B tcp_socket = socket(AF_INET, SOCK_STREAM, 0);
.SH DESCRIPTION
This is an implementation of the TCP protocol defined in
RFC\ 793, RFC\ 1122 and RFC\ 2001 with the NewReno and SACK

View File

@ -5,7 +5,7 @@
.\" of the modification is added to the header.
.\" $Id: udp.7,v 1.7 2000/01/22 01:55:05 freitag Exp $
.\"
.TH UDP 7 1998-10-02 "Linux" "Linux Programmer's Manual"
.TH UDP 7 2008-08-08 "Linux" "Linux Programmer's Manual"
.SH NAME
udp \- User Datagram Protocol for IPv4
.SH SYNOPSIS
@ -13,7 +13,7 @@ udp \- User Datagram Protocol for IPv4
.br
.B #include <netinet/in.h>
.sp
.B udp_socket = socket(PF_INET, SOCK_DGRAM, 0);
.B udp_socket = socket(AF_INET, SOCK_DGRAM, 0);
.SH DESCRIPTION
This is an implementation of the User Datagram Protocol
described in RFC\ 768.

View File

@ -12,23 +12,23 @@
.\" address that can appear in the sockaddr_un structure: pathname,
.\" unnamed, and abstract.
.\"
.TH UNIX 7 2008-06-17 "Linux" "Linux Programmer's Manual"
.TH UNIX 7 2008-08-08 "Linux" "Linux Programmer's Manual"
.SH NAME
unix, PF_UNIX, AF_UNIX, PF_LOCAL, AF_LOCAL \- Sockets for local
unix, AF_UNIX, AF_LOCAL \- Sockets for local
interprocess communication
.SH SYNOPSIS
.B #include <sys/socket.h>
.br
.B #include <sys/un.h>
.IB unix_socket " = socket(PF_UNIX, type, 0);"
.IB unix_socket " = socket(AF_UNIX, type, 0);"
.br
.IB error " = socketpair(PF_UNIX, type, 0, int *" sv ");"
.IB error " = socketpair(AF_UNIX, type, 0, int *" sv ");"
.SH DESCRIPTION
The
.B PF_UNIX
.B AF_UNIX
(also known as
.BR PF_LOCAL )
.BR AF_LOCAL )
socket family is used to communicate between processes on the same machine
efficiently.
Traditionally, Unix sockets can be either unnamed,
@ -132,7 +132,7 @@ The abstract socket namespace is a non-portable Linux extension.
For historical reasons these socket options are specified with a
.B SOL_SOCKET
type even though they are
.B PF_UNIX
.B AF_UNIX
specific.
They can be set with
.BR setsockopt (2)
@ -185,7 +185,7 @@ For historical reasons the ancillary message types listed below
are specified with a
.B SOL_SOCKET
type even though they are
.B PF_UNIX
.B AF_UNIX
specific.
To send them set the
.I cmsg_level
@ -295,7 +295,7 @@ or
.BR recvmsg (2).
.TP
.B EPROTONOSUPPORT
Passed protocol is not PF_UNIX.
Passed protocol is not AF_UNIX.
.TP
.B EPROTOTYPE
Remote socket does not match the local socket type

View File

@ -4,15 +4,15 @@
.\" 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 $
.TH X25 7 1998-12-01 "Linux" "Linux Programmer's Manual"
.TH X25 7 2008-08-08 "Linux" "Linux Programmer's Manual"
.SH NAME
x25, PF_X25 \- ITU-T X.25 / ISO-8208 protocol interface.
x25, AF_X25 \- ITU-T X.25 / ISO-8208 protocol interface.
.SH SYNOPSIS
.B #include <sys/socket.h>
.br
.B #include <linux/x25.h>
.sp
.B x25_socket = socket(PF_X25, SOCK_SEQPACKET, 0);
.B x25_socket = socket(AF_X25, SOCK_SEQPACKET, 0);
.SH DESCRIPTION
X25 sockets provide an interface to the X.25 packet layer protocol.
This allows applications to
@ -93,7 +93,7 @@ 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.
The AF_X25 protocol family is a new feature of Linux 2.2.
.SH BUGS
Plenty, as the X.25 PLP implementation is
.BR CONFIG_EXPERIMENTAL .