This article from http://blog.sina.com.cn/s/blog_3e28c8a50100abci.html
AF indicates the address family.
PF indicates protocl family protocol FAMILY
In Winsock2.h
# Define AF_INET 0
# Define PF_INET AF_INET
In windows, AF_INET and PF_INET are exactly the same.
In Unix/Linux systems, the two are slightly different in different versions.
For BSD, It is AF, and for POSIX is PF
The domain parameters of the socketpair and socket functions include AF_UNIX, AF_LOCAL, AF_INET, PF_UNIX, PF_LOCAL, and PF_INET. AF_UNIX = AF_LOCAL, PF_UNIX = PF_LOCAL, AF_LOCAL = PF_LOCAL, AF_INET = PF_INET. ** suggestion: for the domain parameters of socketpair and socket, use the PF_LOCAL series. When initializing the address structure of the set interface, use AF_LOCAL. example: z = socket (PF_LOCAL, SOCK_STREAM, 0); adr_unix.sin_family = AF_LOCAL;
This article from the CSDN blog, reproduced please indicate the source: http://blog.csdn.net/arau_sh/archive/2008/10/09/3041479.aspx