aurain
技术文摘
posts - 137,  comments - 268,  trackbacks - 0

最近在看udt协议的一些知识,先把包结构放上来

UDT包结构

 

总体结构:

0               1               2               3               

0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 

Packet Header(包头)

Data/Control Information Field(数据包/控制包 信息)

 

数据包包头结构:

0               1               2               3               

0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 

0 |                           Sequence Number

ff  |o |                       Message Number

                             Time Stamp

                             Destination Socket ID

 

bit 0:

0: Data Packet(0:数据包)

1: Control Packet1:控制包)

bit ff:

11: solo message packet11:单一的消息包)

10: first packet of a message10:一份消息的第一个包)

01: last packet of a message00:一份消息的最后一个包)

bit o:

0: in order delivery not required0:没有要求按正常序号传递)

1: in order delivery required1:要求按正常序号传递)

 

控制包包头结构:

0               1               2               3               

0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 

1 |       Type             |       Reserved

Additional Info

                             Time Stamp

                             Destination Socket ID

bit 0:

0: Data Packet(0:数据包)

1: Control Packet1:控制包)

bit 1~15:

       0: Protocol Connection Handshake

Add. Info:    Undefined

Control Info: Handshake information (see CHandShake)

1: Keep-alive

Add. Info:    Undefined

Control Info: None

2: Acknowledgement (ACK)

Add. Info:    The ACK sequence number

Control Info: The sequence number to which (but not include) all the previous packets have beed received

Optional:     RTT

RTT Variance

advertised flow window size (number of packets)

estimated bandwidth (number of packets per second)

3: Negative Acknowledgement (NAK)

Add. Info:    Undefined

Control Info: Loss list (see loss list coding below)

4: Congestion Warning

Add. Info:    Undefined

Control Info: None

5: Shutdown

Add. Info:    Undefined

Control Info: None

6: Acknowledgement of Acknowledement (ACK-square)

Add. Info:    The ACK sequence number

Control Info: None

7: Message Drop Request

Add. Info:    Message ID

Control Info: first sequence number of the message

last seqeunce number of the message

     65535: Explained by bits 16 - 31

 

bit 16 - 31:

This space is used for future expansion or user defined control packets.

 

posted on 2008-11-26 10:52 阅读(2964) 评论(0)  编辑 收藏 引用 所属分类: udt分析

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理



<2008年11月>
2627282930311
2345678
9101112131415
16171819202122
23242526272829
30123456

常用链接

留言簿(17)

随笔分类(138)

随笔档案(137)

网络开发

最新随笔

搜索

  •  

积分与排名

  • 积分 - 493494
  • 排名 - 36

最新随笔

最新评论

阅读排行榜

评论排行榜