lsa_xmit.c,v

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

C,V
98
字号
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.13.19.38.53;	author dls;	state Works;
branches;
next	;


desc
@@


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

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

/*------------------------------------------------------------------------
 *  lsa_xmit - transmit pending Database Description packets
 *------------------------------------------------------------------------
 */
int lsa_xmit(pif, pnb)
struct ospf_if	*pif;
struct ospf_nb	*pnb;
{
}
@


1.1
log
@Initial revision
@
text
@a15 43
	struct	ep	*pephead, *pep;
	struct	ip	*pip;
	struct	ospf	*po;
	struct	ospf_dd	*pdd;
	int		len;

kprintf("lsa_xmit\n");

#ifdef notdef
	pep = (struct ep *)getbuf(Net.netpool);
	if ((int)pep == SYSERR)
		return SYSERR;
	if (pephead = (struct ep *)headq(pnb->nb_lsrl)) {
		/* make a copy */
		pip = (struct ip *)pephead->ep_data;
		po = (struct ospf *)pip->ip_data;
		len = EP_HLEN + IPMHLEN + po->ospf_len;
		blkcopy(pep, pephead, len);
		pip = (struct ip *)pep->ep_data;
		po = (struct ospf *)pip->ip_data;
		pdd = (struct ospf_dd *)po->ospf_data;
	} else {
		/* no DD's to send; create an ACK-only */
		ospfddtmpl(pif, pep);
		pip = (struct ip *)pep->ep_data;
		po = (struct ospf *)pip->ip_data;
		pdd = (struct ospf_dd *)po->ospf_data;
		if (pnb->nb_master)
			pdd->dd_control = DDC_MSTR;
		else
			pdd->dd_control = 0;
	}
	pdd->dd_seq = pnb->nb_seq;
	po->ospf_authtype = pif->if_area->ar_authtype;
	bzero(po->ospf_auth, AUTHLEN);
	po->ospf_cksum = 0;
	po->ospf_cksum = cksum(po, po->ospf_len>>1);
	blkcopy(po->ospf_auth, pif->if_area->ar_auth, AUTHLEN);
	blkcopy(pip->ip_src, ip_anyaddr, IP_ALEN);
kprintf("lsa_xmit calling ipsend:\n");
	ipsend(pnb->nb_ipa, pep, po->ospf_len, IPT_OSPF, IPP_INCTL,
		IP_TTL);
#endif /* notdef */
@

⌨️ 快捷键说明

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