nb_aok.c,v

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

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


1.2
date	97.09.21.19.28.38;	author dls;	state Dist;
branches;
next	1.1;

1.1
date	94.02.06.18.20.24;	author dls;	state Works;
branches;
next	;


desc
@@


1.2
log
@pre-3e code
@
text
@/* nb_aok.c - nb_aok */

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

/*------------------------------------------------------------------------
 *  nb_aok - determine if adjacency with a neighbor is ok
 *------------------------------------------------------------------------
 */
int nb_aok(pif, pnb)
struct ospf_if	*pif;
struct ospf_nb	*pnb;
{
	if (pif->if_type == IFT_PT2PT || pif->if_type  == IFT_VIRTUAL)
		return TRUE;
	if (pif->if_drid == pif->if_rid || pif->if_brid == pif->if_rid)
		return TRUE;
	if (pif->if_drid == pnb->nb_rid || pif->if_brid == pnb->nb_rid)
		return TRUE;
	return FALSE;
}
@


1.1
log
@Initial revision
@
text
@@

⌨️ 快捷键说明

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