免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1313 | 回复: 0
打印 上一主题 下一主题

[网络] nids IP重组 [复制链接]

论坛徽章:
3
午马
日期:2013-09-09 21:55:38天秤座
日期:2014-03-04 10:39:14午马
日期:2014-05-05 18:56:36
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2014-04-25 17:33 |只看该作者 |倒序浏览
大神们好,现在我正在学习ip分片与重组,在libnids中ip_defrag中

   579   if (qp != NULL) {
580     /* ANK. If the first fragment is received, we should remember the correct
581        IP header (with options) */
582     if (offset == 0) {
583       qp->ihlen = ihl;
584       memcpy(qp->iph, iph, ihl + ;
585     }
586     del_timer(&qp->timer);
587     qp->timer.expires = jiffies() + IP_FRAG_TIME;       /* about 30 seconds */
588     qp->timer.data = (unsigned long) qp;        /* pointer to queue */
589     qp->timer.function = ip_expire;     /* expire function */
590     add_timer(&qp->timer);
591   }
第584行,为什么要拷贝ihl+8个字节呢,为什么不是ihl?谢谢
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP