⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ipfjoin.c,v

📁 关于IP协议方面的
💻 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@/* ipfjoin.c - ipfjoin */#include <conf.h>#include <kernel.h>#include <proc.h>#include <network.h>struct	ep	*ipfcons();/*------------------------------------------------------------------------ *  ipfjoin  -  join fragments, if all collected *------------------------------------------------------------------------ */struct ep *ipfjoin(iq)struct	ipfq	*iq;{	struct	ep	*pep;	struct	ip 	*pip = 0;	int		off, packoff;	if (iq->ipf_state == IPFF_BOGUS)		return 0;	/* see if we have the whole datagram */	off = 0;	while (pep=(struct ep *)seeq(iq->ipf_q)) {		pip = (struct ip *)pep->ep_data;		packoff =  (pip->ip_fragoff & IP_FRAGOFF)<<3;		if (off < packoff) {			while(seeq(iq->ipf_q))				/*empty*/;			return 0;		}		off = packoff + pip->ip_len - IP_HLEN(pip);	}	if (off > MAXLRGBUF) {		/* too big for us to handle */		while (pep = (struct ep *)deq(iq->ipf_q))			freebuf(pep);		freeq(iq->ipf_q);		iq->ipf_state = IPFF_FREE;		return 0;	}	if (pip == 0 || (pip->ip_fragoff & IP_MF) == 0)		return ipfcons(iq);	return 0;}@

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -