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

📄 ospf_receive_utilities.c

📁 vxworks下ospf协议栈
💻 C
字号:
/* ospf_receive_utilities.c *//* Copyright 2000 Wind River Systems, Inc. *//*modification history___________________ 17,20december01,jkw		Removed sptr_area->sptr_interfaces structure. 16,26september00,reshma	Added WindRiver CopyRight 15,25september00,reshma	RFC-1587 implementation for OSPF NSSA Option, also tested against ANVL. 14,07july00,reshma			Unix compatibility related changes. 13,04april00,reshma		Added some MIB support (Read only).Passed all important ANVL OSPF tests. 12,23december99,reshma		Compatibility with VxWorks-IP and VxWorks RTM-interface 11,28december98,jack		Compiled and added some comments 10,11november98,jack		Config changes, linted and big endian changes 09,30october98,jack		Incorporate changes for compilation on Vxworks 08,23august98,jack			ANVL tested OSPF with PATRICIA tree route table and no recursion 07,10august98,jack			PATRICIA Route Table Based OSPF Code Base 06,04june98,jack			Integration with RTM and BGP 05,24april98,jack			RTM changes 04,10july97,cindy			Pre-release v1.52b 03,02october97,cindy		Release Version 1.52 02,22october96,cindy		Release Version 1.50 01,05june96,cindy			First Beta Release*//*DESCRIPTIONospf_receive_utilities.c is used for checking to see if the received link state advertisement isself originated.This file is used whenever a new OSPF link state advertisement is received.*/#include "ospf.h"#if defined (__OSPF_VIRTUAL_STACK__)#include "ospf_vs_lib.h"#endif /* __OSPF_VIRTUAL_STACK__ *//********************************************************************************************************************************/enum TEST ospf_check_if_advertisements_link_state_id_is_equal_to_one_of_the_routers_own_IP_interface_addresses (	OSPF_ROUTER_LINK_ADVERTISEMENT_HEADER *sptr_advertisement){	OSPF_AREA_ENTRY *sptr_area = NULL;	OSPF_AREA_ENTRY *sptr_next_area = NULL;	OSPF_INTERFACE *sptr_interface = NULL;	OSPF_INTERFACE *sptr_next_interface = NULL;	ULONG link_state_id;	for (sptr_area = ospf.sptr_area_list; sptr_area != NULL; sptr_area = sptr_next_area)		{		sptr_next_area = sptr_area->sptr_forward_link;		for (sptr_interface = sptr_area->sptr_interfaces; sptr_interface != NULL; sptr_interface = sptr_next_interface)			{			sptr_next_interface = sptr_interface->sptr_forward_link;			if (sptr_interface->area_id == sptr_area->area_id)				{				link_state_id = sptr_advertisement->ls_header.id;				link_state_id = net_to_host_long (link_state_id);				if (sptr_interface->address == link_state_id)					{					return (PASS);					}				}			}		}	return (FAIL);}

⌨️ 快捷键说明

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