- 在线时间
 - 0 小时
 - 最后登录
 - 2013-3-7
 - 威望
 - 0 
 - 金钱
 - 154 
 - 贡献
 - 19 
 - 注册时间
 - 2012-12-29
 - 阅读权限
 - 10
 - 主题
 - 19
 - 帖子
 - 54
 - 分享
 - 1
 - 精华
 - 0
 - 积分
 - 227
 - 相册
 - 0
  
 
 
 
   
 | 
下面是我对sndcp分片重组的理解,不知是否正确还请多多指正。 
 
在收到sndcp分片后对数据的处理和重组的理解: 
 
如果收到的第一数据不是第一个分片,丢弃; 
继续接收,如果仍不是第一个分片,仍然丢弃,直到接收到第一个分片; 
然后准备接收后续数据: 
如果收到的数据是最后一个分片,把数据排序重组,如果数据完整说明全部收到;如果数据片段缺失,则将收到的所有数据丢弃,并进入接收另外一个N-PDU的第一片的状态; 
如果收到的数据不是最后一个分片,则判断是否是第一个分片,如果不是第一个分片,则保存,继续接收后面的数据;如果是第一个分片,则判断DCOMP 和PCOMP是否与接收到的第一个分片的一致,如果一致则将该数据覆盖原数据或不做任何处理,继续接收后面的数据;如果不一致,则将前面接收的数据全部丢弃,并进入接收另外一个N-PDU的第一片的状态; 
 
对协议不是很明白,附在下面以供参考。 
附: 
6.7.4 Exception situations 
6.7.4.1 Receive First Segment state 
    If an SN-UNITDATA PDU is received with the F bit set to 0, the SN-UNITDATA PDU shall be discarded. The 
Receive First Segment state shall be entered if the M bit is set to 0, otherwise the Discard state shall be entered. 
If an SN-DATA PDU is received with the F bit set to 0, the SN-DATA PDU shall be discarded, and the acknowledged 
LLC operation shall be re-established for the SAPI used. 
6.7.4.2 Receive Subsequent Segment state 
    If an SN-UNITDATA PDU is received with the F bit set to 1, and if DCOMP or PCOMP is different from those in the 
first segment, then the SN-UNITDATA PDU and all previous segments belonging to the same N-PDU shall be 
discarded. The Received First Segment state shall be entered if the M bit is set to 0, otherwise the Discard state shall be 
entered. 
    If an SN-DATA PDU is received with the F bit set to 1, and if DCOMP, PCOMP or N-PDU number is different from 
those in the first segment, then the SN-DATA PDU and all previous segments belonging to the same N-PDU shall be 
discarded, and the acknowledged LLC operation shall be re-established for the SAPI used. 
6.7.4.3 Discard state 
   If an SN-PDU is received with the M bit set to 1, the SN-PDU shall be discarded and the SNDCP entity shall remain in 
the Discard state. 
   If an SN-PDU is received with the M bit set to 0, the SN-PDU shall be discarded and the Receive First Segment state 
entered. 
 |   
 
  
 |