What is an address family?
We generally look at the socket programming is often only concerned about TCP/IP-related addresses and communication methods, however, for Linux sockets, not only IP one address is not only a TCP data protocol. Communication we want to solve two of the most important problems, one is to locate the target, a press transfer data. The former is addressed by address and the latter is resolved by agreement. There are many types of IP addresses for sockets (192.168.2.3), and other such as UNIX addresses (/data/sock), and of course others, as shown in the address family. Each address has an optional protocol, such as IP address has tcp/udp can choose, Unix also has its own protocol, Linux to this kind of protocol further abstraction, such as TCP is similar to the characteristics of the stream, similar to the UDP feature is reported. OK, in fact, Linux to the address to the protocol are abstracted, abstracted into what, the abstract into the BSD (Berkeleysoftware distribution).
Thank you: http://blog.csdn.net/liuxingen/article/details/44995467
Socket address families and types