**建议:对于socketpair与socket的domain参数,使用PF_LOCAL系列,而在初始化套接口地址结构时,则使用AF_LOCAL。
例如:
AF_* stands for Address Family
PF_* stands for Protocol Family
BSD man page promises:
"The protocol family generally is the same as the address family", and subsequent standards use AF_* everywhere.
Even linux/socket.h specifies as
#define PF_INET AF_INET
Yet, we can say
int socket(int family,int type,int prototype);
Here,family identifies family by address or protocol.Address family identifies a collection of protocol with the SAME ADDRESS FORMAT,while protocol family identifies a collection of protocol having SAME ARCHITECTURE.