nb_reform.c,v
来自「TCP-IP红宝书源代码」· C,V 代码 · 共 111 行
C,V
111 行
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.32; author dls; state Ok;
branches;
next ;
desc
@@
1.4
log
@pre-3e code
@
text
@/* nb_reform.c - nb_reform */
#include <conf.h>
#include <kernel.h>
#include <network.h>
#include <ospf.h>
/*------------------------------------------------------------------------
* nb_reform - reform adjacencies after a DR or BDR change
*------------------------------------------------------------------------
*/
int nb_reform(pif)
struct ospf_if *pif;
{
struct ospf_nb *pnb = &pif->if_nbtab[1];
int nn;
for (nn=0; nn<MAXNBR; ++nn, ++pnb) {
if (pnb->nb_state >= NBS_EXSTART) {
if (!nb_aok(pif, pnb)) {
/* break an adjacency */
pnb->nb_state = NBS_2WAY;
nb_clearl(pnb);
}
} else if (pnb->nb_state == NBS_2WAY) {
if (nb_aok(pif, pnb)) {
/* form an adjacency */
gettime(&pnb->nb_seq);
pnb->nb_state = NBS_EXSTART;
nb_makel(pnb);
dd_queue(pif, pnb);
}
}
}
}
@
1.3
log
@*** empty log message ***
@
text
@a21 1
@
1.2
log
@*** empty log message ***
@
text
@a17 2
kprintf("nb_reform\n");
a24 1
kprintf("breaking adj with %X\n", pnb->nb_rid);
a31 1
kprintf("forming adj with %X\n", pnb->nb_rid);
@
1.1
log
@Initial revision
@
text
@d36 1
a36 1
dd_send(pif, pnb);
@
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?