ospflsrtmpl.c,v
来自「TCP-IP红宝书源代码」· C,V 代码 · 共 57 行
C,V
57 行
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
@/* ospflsrtmpl.c - ospflsrtmpl */
#include <conf.h>
#include <kernel.h>
#include <network.h>
#include <ospf.h>
/*------------------------------------------------------------------------
* ospflsrtmpl - fill in OSPF Link State Request packet template
*------------------------------------------------------------------------
*/
struct ep *ospflsrtmpl(pif)
struct ospf_if *pif;
{
struct ep *pep;
struct ip *pip;
struct ospf *po;
pep = (struct ep *)getbuf(Net.netpool);
if ((int)pep == SYSERR)
return 0;
pip = (struct ip *)pep->ep_data;
po = (struct ospf *)pip->ip_data;
po->ospf_version = OSPF_VERSION;
po->ospf_type = T_LSREQ;
po->ospf_len = MINHDRLEN;
po->ospf_rid = pif->if_rid;
po->ospf_aid = pif->if_area->ar_id;
po->ospf_authtype = pif->if_area->ar_authtype;
blkcopy(po->ospf_auth, pif->if_auth, AUTHLEN);
return pep;
}
@
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?