nb_mismatch.c

来自「TCP-IP红宝书源代码」· C语言 代码 · 共 30 行

C
30
字号
/* nb_mismatch.c - nb_mismatch */

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

/*------------------------------------------------------------------------
 *  nb_mismatch - handle sequence # mismatch event
 *------------------------------------------------------------------------
 */
int
nb_mismatch(struct ospf_if *pif, struct ospf_nb *pnb)
{
	struct ep	*pep;

	pnb->nb_state = NBS_EXSTART;
	
	/* empty lists */
	while (pep = (struct ep *)deq(pnb->nb_lsal))
		freebuf(pep);
	while (pep = (struct ep *)deq(pnb->nb_dsl))
		freebuf(pep);
	while (pep = (struct ep *)deq(pnb->nb_lsrl))
		freebuf(pep);
	pnb->nb_seq++;
	dd_queue(pif, pnb);
	return 0;
}

⌨️ 快捷键说明

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