- 论坛徽章:
- 3
|
大神们好,现在我正在学习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?谢谢 |
|