有人可以解释为什么TCP / IP头文件的组织方式如此。
在ubuntu-14.04上的libc6-dev
:
arpa/
netinet/
x86-64-linux-gnu/
...
为什么?
答案 0 :(得分:0)
我从维基找到了答案。
<sys/socket.h> Core BSD socket functions and data structures.
<netinet/in.h> AF INET and AF INET6 address families and their corresponding protocol families PF_INET and PF_INET6. Widely used on the Internet, these include IP addresses and TCP and UDP port numbers.
<sys/un.h> PF_UNIX/PF_LOCAL address family. Used for local communication between programs running on the same computer. Not used on networks.
<arpa/inet.h> Functions for manipulating numeric IP addresses.
<netdb.h> Functions for translating protocol names and host names into numeric addresses. Searches local data as well as DNS.