什么是地址族?

发布于 2024-10-17 00:18:49 字数 168 浏览 2 评论 0原文

当我阅读套接字编程时,我了解到 AF_ 代表地址族。但从字面上看,一个家庭应该有很多成员。那么,AF_INET 地址族有哪些成员呢?

在我看来,我认为说“地址类型”比“地址家庭”更合适。这也适用于 PF(协议族)。

谢谢。

When I read about socket programming, I get to know that AF_ stands for Address Family. But literally, a family should have many members. So, what are the members of, say, AF_INET address family?

In my opinion, I think it would be more appropriate to say Address Type than Addresss Family. Also this applies to PF (Protocol Family).

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

浅忆流年 2024-10-24 00:18:49

AF_INET 地址族的成员是 IPv4 地址。

AF_INET6 地址族的成员是 IPv6 地址。

AF_UNIX 地址族的成员是 Unix 域套接字的名称(例如 /var/run/mysqld/mysqld.sock )。

AF_IPX 地址族的成员是 IPX 地址,依此类推。

我认为您真的不需要在这里区分家庭类型。这些只是同义词;除了“family”看起来更专业,非常适合此目的,而“type”则负担过重,过于笼统。

最终,这是一个约定。有太多的文献使用“地址族”,以至于它已经成为一个行之有效的术语,即使不是人类的一生,也已经有几十年的历史了。

Members of AF_INET address family are IPv4 addresses.

Members of AF_INET6 address family are IPv6 addresses.

Members of AF_UNIX address family are names of Unix domain sockets (/var/run/mysqld/mysqld.sock is an example).

Members of AF_IPX address family are IPX addresses, and so on.

I don't think you really need to distinguish between family and type here. These are merely synonyms; except that family looks more specialized, well-suited for this purpose, whilst type is much overloaded, way too general word.

Ultimately, it's a convention. There's just so much literature using "address family" that it's well-established terminology, by decades if not human lifetimes.

是伱的 2024-10-24 00:18:49
  Name                   Purpose                 
   AF_UNIX, AF_LOCAL      Local communication              
   AF_INET                IPv4 Internet protocols        
   AF_INET6               IPv6 Internet protocols
   AF_IPX                 IPX - Novell protocols
   AF_NETLINK             Kernel user interface device    
   AF_X25                 ITU-T X.25 / ISO-8208 protocol 
   AF_AX25                Amateur radio AX.25 protocol
   AF_ATMPVC              Access to raw ATM PVCs
   AF_APPLETALK           Appletalk                      
   AF_PACKET              Low level packet interface   
  Name                   Purpose                 
   AF_UNIX, AF_LOCAL      Local communication              
   AF_INET                IPv4 Internet protocols        
   AF_INET6               IPv6 Internet protocols
   AF_IPX                 IPX - Novell protocols
   AF_NETLINK             Kernel user interface device    
   AF_X25                 ITU-T X.25 / ISO-8208 protocol 
   AF_AX25                Amateur radio AX.25 protocol
   AF_ATMPVC              Access to raw ATM PVCs
   AF_APPLETALK           Appletalk                      
   AF_PACKET              Low level packet interface   
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文