avatar
r*n
2
研究这个的说哈,谢谢了。
avatar
z*y
3
为什么UDP header里有length field,而TCP header却没有?
avatar
s*s
4
【 以下文字转载自 Hardware 讨论区 】
发信人: shakuras (doskey), 信区: Hardware
标 题: ATI显卡如何设置双显示器
发信站: BBS 未名空间站 (Sun Nov 9 00:09:07 2008), 转信
用自带的软件设置播放视频的时候自动在TV上最大化, 现在只有用WMP的时候是
成功的, 用影音风暴或者pplive的时候就不会, 请问应该怎样设置.
avatar
r*n
5
是不是垃圾方向啊?没人搞的???

【在 r*******n 的大作中提到】
: 研究这个的说哈,谢谢了。
avatar
a*k
6
datagram vs. stream

【在 z*y 的大作中提到】
: 为什么UDP header里有length field,而TCP header却没有?
avatar
s*g
7
Good question! I searched Google, the consensus of all answers is that the
length field in either TCP or UDP (or lack there of) is redundant, because
the length can always be inferred from IP payload length minus UDP/TCP
header size.

【在 z*y 的大作中提到】
: 为什么UDP header里有length field,而TCP header却没有?
avatar
v*n
8
none of them is needed.
the length field makes it a good alignment, i guess.

【在 z*y 的大作中提到】
: 为什么UDP header里有length field,而TCP header却没有?
avatar
z*y
9

I know, that is why I ask.
Since both are redundant. Why is included in UDP but not TCP?
I guess not every engineering decision has a reason.

【在 v**n 的大作中提到】
: none of them is needed.
: the length field makes it a good alignment, i guess.

avatar
z*r
10
agree, and TCP UDP were designed by different groups

【在 v**n 的大作中提到】
: none of them is needed.
: the length field makes it a good alignment, i guess.

avatar
z*r
11
did a quick search
http://stackoverflow.com/questions/281606/why-does-udp-have-a-l
There is a 96 bit pseudo header conceptually prefixed to the TCP header that
contains the information already.
The checksum field description from this source gives the answer:
Checksum: 16 bits
The checksum field is the 16 bit one's complement of the one's complemen
t sum of all 16 bit words in the header and text. If a segment contains an o
dd number of header and text octets to be checksummed, the last octet is pad
ded on the right with zeros to form a 16 bit word for checksum purposes. The
pad is not transmitted as part of the segment. While computing the checksum
, the checksum field itself is replaced with zeros.
The checksum also covers a 96 bit pseudo header conceptually prefixed to
the TCP header. This pseudo header contains the Source Address, the Destina
tion Address, the Protocol, and TCP length. This gives the TCP protection ag
ainst misrouted segments. This information is carried in the Internet Protoc
ol and is transferred across the TCP/Network interface in the arguments or r
esults of calls by the TCP on the IP.
+--------+--------+--------+--------+
| Source Address |
+--------+--------+--------+--------+
| Destination Address |
+--------+--------+--------+--------+
| zero | PTCL | TCP Length |
+--------+--------+--------+--------+
The information is not needed at the TCP level since TCP is a stream based p
rotocol.

【在 z**r 的大作中提到】
: agree, and TCP UDP were designed by different groups
avatar
B*R
12
赫赫,面试时没词儿了我就喜欢问UDP CHECKSUM怎么算的

field-in-the-header-and-tcp-does-not
that
complemen
an o
pad
The

【在 z**r 的大作中提到】
: did a quick search
: http://stackoverflow.com/questions/281606/why-does-udp-have-a-l
: There is a 96 bit pseudo header conceptually prefixed to the TCP header that
: contains the information already.
: The checksum field description from this source gives the answer:
: Checksum: 16 bits
: The checksum field is the 16 bit one's complement of the one's complemen
: t sum of all 16 bit words in the header and text. If a segment contains an o
: dd number of header and text octets to be checksummed, the last octet is pad
: ded on the right with zeros to form a 16 bit word for checksum purposes. The

avatar
x*n
13
you are way too evil..

【在 B*****R 的大作中提到】
: 赫赫,面试时没词儿了我就喜欢问UDP CHECKSUM怎么算的
:
: field-in-the-header-and-tcp-does-not
: that
: complemen
: an o
: pad
: The

avatar
z*r
14
good question

【在 B*****R 的大作中提到】
: 赫赫,面试时没词儿了我就喜欢问UDP CHECKSUM怎么算的
:
: field-in-the-header-and-tcp-does-not
: that
: complemen
: an o
: pad
: The

avatar
f*n
15
UDP里的length看来是多余的, stevens那本书里也这么说
但是TCP要length有啥用? 本来就是stream oriented protocol, length这个概念就不
适合TCP

that
complemen
o
pad
The

【在 z**r 的大作中提到】
: did a quick search
: http://stackoverflow.com/questions/281606/why-does-udp-have-a-l
: There is a 96 bit pseudo header conceptually prefixed to the TCP header that
: contains the information already.
: The checksum field description from this source gives the answer:
: Checksum: 16 bits
: The checksum field is the 16 bit one's complement of the one's complemen
: t sum of all 16 bit words in the header and text. If a segment contains an o
: dd number of header and text octets to be checksummed, the last octet is pad
: ded on the right with zeros to form a 16 bit word for checksum purposes. The

avatar
u*n
16
TCP has checksum field so that application can verify data integrity by
given TCP packet. UDP checksum could be zero so that application needs to
know how many bytes are valid.
My guess...

【在 z*y 的大作中提到】
: 为什么UDP header里有length field,而TCP header却没有?
avatar
m*t
17
There is an offset field to contain the option header length though
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。