tfinsert.c,v

来自「关于TCP方面的」· C,V 代码 · 共 70 行

C,V
70
字号
head	1.2;access;symbols;locks	dls:1.2; strict;comment	@ * @;1.2date	97.09.21.19.29.52;	author dls;	state Dist;branches;next	1.1;1.1date	94.01.14.03.51.20;	author dls;	state v2e1;branches;next	;desc@@1.2log@pre-3e code@text@/* tfinsert.c - tfinsert */#include <conf.h>#include <kernel.h>#include <network.h>#include <q.h>/*------------------------------------------------------------------------ *  tfinsert - add a new TCP segment fragment to a TCB sequence queue *------------------------------------------------------------------------ */int	tfinsert(ptcb, seq, datalen, gotfin)struct	tcb	*ptcb;tcpseq		seq;int		datalen, gotfin;{	struct	tcpfrag	*tf;	if (datalen == 0)		return OK;	tf = (struct tcpfrag *)getmem(sizeof(struct tcpfrag));	tf->tf_seq = seq;	tf->tf_len = datalen;	if (ptcb->tcb_rsegq < 0)		ptcb->tcb_rsegq = newq(NTCPFRAG, QF_WAIT);	if (enq(ptcb->tcb_rsegq, tf, -tf->tf_seq) < 0)		freemem(tf, sizeof(struct tcpfrag));	return OK;}@1.1log@Initial revision@text@d15 1a15 1int		datalen;@

⌨️ 快捷键说明

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