tcpaddhole.c,v

来自「TCP-IP红宝书源代码」· C,V 代码 · 共 48 行

C,V
48
字号
head	1.1;
access;
symbols;
locks
	dls:1.1; strict;
comment	@ * @;


1.1
date	94.01.14.04.11.50;	author dls;	state v2e1;
branches;
next	;


desc
@@


1.1
log
@Initial revision
@
text
@/* tcpaddhole.c - tcpaddhole */

#include <conf.h>
#include <kernel.h>
#include <network.h>
#include <q.h>

/*------------------------------------------------------------------------
 *  tcpaddhole  -  add an URGENT data hole to the receive hole queue
 *------------------------------------------------------------------------
 */
int tcpaddhole(ptcb, puqe)
struct	tcb	*ptcb;
struct	uqe	*puqe;
{
	freebuf(puqe->uq_data, puqe->uq_len);
	puqe->uq_data = 0;
	if (ptcb->tcb_ruhq < 0)
		ptcb->tcb_ruhq = newq(TCPUQLEN, QF_WAIT);
	if (enq(ptcb->tcb_ruhq, puqe, RUHK(ptcb, puqe->uq_seq)) < 0)
		uqfree(puqe);
	return OK;
}
@

⌨️ 快捷键说明

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