Tony Finch <dot@dotat.at> writes:
But they don't differ in addressing. In BSD sockets the difference between streams and packets lies in "socket type", while addresses are split into "address families" which bijectively correspond to "protocol families".
I believe there are some obscure protocol families that have more than one address family, which is why the two concepts exist in the API.
Single Unix Specification v3 specifies only AF_* constants, used for both. Linux man socket says: NOTE The manifest constants used under BSD 4.* for protocol families are PF_UNIX, PF_INET, etc., while AF_UNIX etc. are used for address fami- lies. However, already the BSD man page promises: "The protocol family generally is the same as the address family", and subsequent standards use AF_* everywhere. -- __("< Marcin Kowalczyk \__/ qrczak@knm.org.pl ^^ http://qrnik.knm.org.pl/~qrczak/