nb_clearl.c,v

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

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


1.4
date	97.09.21.19.28.38;	author dls;	state Dist;
branches;
next	1.3;

1.3
date	94.02.26.19.50.44;	author dls;	state Works;
branches;
next	1.2;

1.2
date	94.02.13.19.38.53;	author dls;	state Works;
branches;
next	1.1;

1.1
date	94.02.06.18.20.26;	author dls;	state Ok;
branches;
next	;


desc
@@


1.4
log
@pre-3e code
@
text
@/* nb_clearl.c - nb_clearl */

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

/*------------------------------------------------------------------------
 *  nb_clearl - clear lists of pending messages for a given neighbor
 *------------------------------------------------------------------------
 */
int nb_clearl(pnb)
struct	ospf_nb	*pnb;
{
	struct ep	*pep;

	while (pep = (struct ep *)deq(pnb->nb_lsal))
		freebuf(pep);
	freeq(pnb->nb_lsal);
	pnb->nb_lsal = EMPTY;

	while (pep = (struct ep *)deq(pnb->nb_dsl))
		freebuf(pep);
	freeq(pnb->nb_dsl);
	pnb->nb_dsl = EMPTY;

	while (pep = (struct ep *)deq(pnb->nb_lsrl))
		freebuf(pep);
	freeq(pnb->nb_lsrl);
	pnb->nb_lsrl = EMPTY;
}
@


1.3
log
@*** empty log message ***
@
text
@a15 1
kprintf("nb_clearl %X\n", pnb->nb_rid);
@


1.2
log
@*** empty log message ***
@
text
@d9 1
a9 1
 *  nb_clearl - clear an adjacencies pending advertisement lists
@


1.1
log
@Initial revision
@
text
@d18 1
a18 1
	while (pep = (struct ep *)deq(pnb->nb_lsar))
d20 2
a21 2
	freeq(pnb->nb_lsar);
	pnb->nb_lsar = EMPTY;
d28 1
a28 1
	while (pep = (struct ep *)deq(pnb->nb_lsrr))
d30 2
a31 2
	freeq(pnb->nb_lsrr);
	pnb->nb_lsrr = EMPTY;
@

⌨️ 快捷键说明

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