V2EX  ›  英汉词典

Network Byte Order

定义 / Definition

网络字节序:在网络协议中用于表示多字节整数的统一字节排列方式,通常指 大端序(big-endian),即高位字节在前、低位字节在后。常用于 TCP/IP 等协议以及套接字编程中(如 htons/htonlntohs/ntohl 的转换)。

发音 / Pronunciation (IPA)

/ˈnɛtˌwɝk baɪt ˈɔɹdɚ/

例句 / Examples

The port number must be in network byte order.
端口号必须使用网络字节序。

Before sending the packet, the program converts the 32-bit length field to network byte order to ensure it is interpreted correctly across different CPU architectures.
在发送数据包之前,程序将 32 位长度字段转换为网络字节序,以确保在不同 CPU 架构上都能被正确解析。

词源 / Etymology

该术语由三部分组成:network(网络)+ byte(字节)+ order(顺序/排列)。随着互联网协议的发展,为了让不同硬件平台(可能使用不同端序,如小端序或大端序)之间能够一致地解释数据字段,TCP/IP 体系将“网络上传输的标准字节顺序”固定为大端序,并称为 network byte order

相关词 / Related Words

文学与经典文献中的出现 / Notable Works

  • *RFC 791: Internet Protocol (IPv4)*(以“网络字节序/大端序”作为多字节字段的约定基础)
  • *RFC 793: Transmission Control Protocol (TCP)*(TCP 头部字段的解释依赖网络字节序约定)
  • W. Richard Stevens, UNIX Network Programming(套接字编程中大量使用并解释 network byte order 与转换函数)
  • Brian W. Kernighan & Dennis M. Ritchie, The C Programming Language(虽非专门讨论网络,但在相关系统编程语境中常引出字节序概念)
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   1582 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 6ms · UTC 16:13 · PVG 00:13 · LAX 08:13 · JFK 11:13
♥ Do have faith in what you're doing.