定义urgent数据的目的:
urgent机制,是用于通知应用层需要接收urgent data,在urgent data接收完成后,通知应用层urgent data数据接收完毕。相关协议文本RFC793 RFC1122 RFC6093
哪些数据是urgent data?
协议规定
在TCP报头的URG位有效的时候,通过TCP报头中的urgent pointer来标识urgent data的位置,但是在urgent pointer的解析方式上各个协议文本的描述有差异:解读一:RFC793 P17,描述是“The urgent pointer points to the sequence number of the octet following the urgent data.”,在P41有描述“This mechanism permits a point in the data stream to be designated as the end of urgent information. Whenever this point is in advance of the receive sequence number (RCV.NXT) at the receiving TCP, that TCP must tell the user to go into "urgent mode"; when the receive sequence number catches up to the urgent pointer, the TCP must tell user to go”,可以认为是:当前接收的报文中SEQ在SEG.SEQ+Urgent Pointer之前的都是,而urgent pointer是第一个非urgent data( TCP已经接受,但是还没有提交给应用的数据是不是呢?)
解读二:在P56的描述是“If the urgent flag is set, then SND.UP <-SND.NXT-1 and set the urgent pointer in the outgoing segments”,也

TCP的URG标志用于标记紧急数据,旨在告知应用层存在需要立即处理的数据。根据RFC793和RFC1122,紧急指针指向最后一个urgent data字节。在Linux中,尽管RFC1122澄清了这一点,但实现上仍遵循不同的解释。Linux提供了tcp_stdurg配置来调整这种行为。紧急数据的长度和与Out-of-Band(OOB)数据的关系也是TCP协议的重要部分。
最低0.47元/天 解锁文章
1344

被折叠的 条评论
为什么被折叠?



