?? lsr_add.c,v
字號:
head 1.1;
access;
symbols;
locks
dls:1.1; strict;
comment @ * @;
1.1
date 97.09.21.19.28.38; author dls; state Dist;
branches;
next ;
desc
@@
1.1
log
@pre-3e code
@
text
@/* lsr_add.c - lsr_add */
#include <conf.h>
#include <kernel.h>
#include <network.h>
#include <ospf.h>
/*------------------------------------------------------------------------
* lsr_add - add a link state summary to a link state request packet
*------------------------------------------------------------------------
*/
struct ep *lsr_add(pif, plss, pep)
struct ospf_if *pif;
struct ospf_lss *plss;
struct ep *pep;
{
struct ip *pip;
struct ospf *po;
struct ospf_lsr *plsr;
struct ep *ospflsrtmpl();
kprintf("lsr_add\n");
if (pep == 0) {
pep = ospflsrtmpl(pif);
if (pep == 0)
return 0;
}
pip = (struct ip *)pep->ep_data;
po = (struct ospf *)pip->ip_data;
plsr = (struct ospf_lsr *)((char *)po + po->ospf_len);
plsr->lsr_type = net2hl((unsigned long)plss->lss_type);
plsr->lsr_lsid = plss->lss_lsid;
plsr->lsr_rid = plss->lss_rid;
po->ospf_len += LSRLEN;
return pep;
}
@
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -