#define AF_UNSPEC 0
#define AF_UNIX 1
#define AF_INET 2
#define PF_UNIX AF_UNIX
#define PF_INET...;
};
2 Unix协议
struct proto_ops unix_proto_ops = {
unix_proto_init,
unix_proto_create,
unix_proto_dup...,
unix_proto_release,
unix_proto_bind,
unix_proto_connect,
unix_proto_socketpair,
unix_proto_accept...,
unix_proto_getname,
unix_proto_read,
unix_proto_write,
unix_proto_select,
unix_proto_ioctl
};...Unix Socket与Pipe的不同在于Pipe是单缓冲区,只能用于单向通信,而Unix Socket是双缓冲区,能够双向通信。