TCP/IP头文件的组织

TCP/IP头文件的组织,c,linux,tcp,C,Linux,Tcp,有人可以解释为什么TCP/IP头文件是这样组织的 在ubuntu-14.04上的libc6 dev中: arpa/ netinet/ x86-64-linux-gnu/ ... 为什么?我从维基上找到了答案 <sys/socket.h> Core BSD socket functions and data structures. <netinet/in.h> AF INET and AF INET6 address families and their corresp

有人可以解释为什么TCP/IP头文件是这样组织的

在ubuntu-14.04上的libc6 dev中:

arpa/
netinet/
x86-64-linux-gnu/
...

为什么?

我从维基上找到了答案

<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.
核心BSD套接字函数和数据结构。
AF INET和AF INET6地址族及其对应的协议族PF_INET和PF_INET6。在Internet上广泛使用,包括IP地址、TCP和UDP端口号。
PF_UNIX/PF_本地地址系列。用于在同一台计算机上运行的程序之间进行本地通信。不在网络上使用。

为什么不呢?你真的希望在30年前完成这项工作的时候在这里找到一位TCP/IP开发人员吗?对不起,我只是想知道为什么。因为我总是对包含哪个文件感到困惑。所以我想知道原因,以便能够轻松记住。应该是吗?请阅读手册页面了解你想要使用的功能,然后添加手册页面上所需的
#include
语句。这样,你只需要记住函数名(API),这应该会容易得多。我知道这一点。我只是不想每次都
man