为什么IP头中的分片字段以字节为单位表示偏移量,而不是按顺序表示?

发布于 2025-01-20 11:26:23 字数 159 浏览 3 评论 0原文

标题说什么。由于偏移编号指示单个片段在整个数据报中的位置,并且由于将偏移量除以8的长度以节省空间,为什么不偏置数字?它肯定会节省更多的空间,而不是将偏移量除以8,而且我怀疑偏移量是否会提供有关错误检测和类似内容的大量信息。 那么,为什么不顺序节省更多空间?它不会被偏移了,就像位置号一样,但含义是相同的。

Exactly what the title says. Since the offset number indicates the position of the single fragment in the overall datagram, and since they went to such lengths as dividing the offset by 8, to save space, why isn't the offset a sequential number? It would certainly save more space than dividing the offset by 8, and plus, i doubt that the offset could give much informations about error detection and similar stuff.
So, why isn't it sequential, to save even more space? It would not be offset anymore, it would be like position number, but the meaning would be the same.

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

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

发布评论

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

评论(1

给不了的爱 2025-01-27 11:26:23

如果数据包到达订单(这很常见),则具有偏移量会使内存中的大数据包在内存中重新组装好的,而不会将片段放入其位置,而不会额外的记忆随机放置。如果您只有序列编号,您将不知道将数据片段放在哪里。

对于高速网络,这可能会带来明显的性能差异。

If the packets arrive out of order (which is pretty common), having offsets makes it much easier to reassemble the big packet in the memory by putting the fragments right into their place, without additional memory shuffling. If you only had sequence numbers, you wouldn't know where to put the fragment of the data.

For high-speed networking, this might make a noticeable performance difference.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文