⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 db_new.c

📁 TCP-IP红宝书源代码
💻 C
字号:
/* db_new.c - db_new */

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

/*------------------------------------------------------------------------
 *  db_new - create a new topological database entry
 *------------------------------------------------------------------------
 */
struct ospf_db *
db_new(struct ospf_ar *par, struct ospf_lsa *plsa)
{
	struct ospf_db	*pdb;

	pdb = (struct ospf_db *)getbuf(ospf_lspool);
	if ((int)pdb == SYSERR)
		return 0;
	memset(pdb, 0, sizeof(struct ospf_db));
	pdb->db_lsa = *plsa;	/* structure copy */
	return pdb;
}

⌨️ 快捷键说明

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