📄 ipftimer.c,v
字号:
head 1.1;access;symbols;locks dls:1.1; strict;comment @ * @;1.1date 97.09.21.19.27.09; author dls; state Dist;branches;next ;desc@@1.1log@pre-3e code@text@/* ipftimer.c - ipftimer */#include <conf.h>#include <kernel.h>#include <network.h>/*------------------------------------------------------------------------ * ipftimer - update time-to-live fields and delete expired fragments *------------------------------------------------------------------------ */void ipftimer(gran)int gran; /* granularity of this run */{ struct ep *pep; struct ip *pip; int i; wait(ipfmutex); for (i=0; i<IP_FQSIZE; ++i) { struct ipfq *iq = &ipfqt[i]; if (iq->ipf_state == IPFF_FREE) continue; iq->ipf_ttl -= gran; if (iq->ipf_ttl <= 0) { if (iq->ipf_state == IPFF_BOGUS) { /* resources already gone */ iq->ipf_state = IPFF_FREE; continue; } if (pep = (struct ep *)deq(iq->ipf_q)) { IpReasmFails++; pip = (struct ip *)pep->ep_data; icmp(ICT_TIMEX, ICC_FTIMEX, pip->ip_src, pep); } while (pep = (struct ep *)deq(iq->ipf_q)) { IpReasmFails++; freebuf(pep); } freeq(iq->ipf_q); iq->ipf_state = IPFF_FREE; } } signal(ipfmutex);}@
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -