📄 ospf_interface_state_machine.c
字号:
/* ospf_interface_state_machine.c - interface state machine functions and tables *//* Copyright 1984 - 2001 Wind River Systems, Inc. *//*modification history-------------------- 20,12december01,kc Invoked ospf2Mapi_request() only if interface sm is executed. 19,13october01,kc Dynamic configuration changes. 18,14august01,kc Added support for ospfVirtIfTable updates. 17,26june01,jkw Moved global variables to ospf_globals.h for cleanup 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_interface_state_machine.c is used for executing the interface state machine. This filetakes in an interface event and the interface's current state and executes the interface statemachine to produce a new interface state.This file is used whenever the interface state machine is called.*/#include "ospf.h"#if defined (__OSPF_VIRTUAL_STACK__)#include "ospf_vs_lib.h"#endif /* __OSPF_VIRTUAL_STACK__ */#include "ospf_interface_state_machine.h"/*************************************************************************** ospf_execute_interface_state_machine - Execute interface state machine** This routine will execute the appropriate interface state machine function* based on the interface event received and what state the interface is * currently in.** <event> Interface event** <state> Current interface state** <sptr_interface> OSPF interface** RETURNS: N/A** ERRNO: N/A** NOMANUAL*/void ospf_execute_interface_state_machine (enum OSPF_INTERFACE_EVENT event,enum OSPF_INTERFACE_STATE state,OSPF_INTERFACE *sptr_interface){#if defined (__OPAQUE_LSA__) OSPF_OPAQUE_CALLBACK *sptr_opaque_callback = NULL; OSPF_OPAQUE_CALLBACK *sptr_next_node = NULL;#endif /* __OPAQUE_LSA__ */ OSPF_PRINTF_PROLOGUE (OSPF_PROLOGUE_PRINTF, "OSPF: Entering ospf_execute_interface_state_machine\r\n"); if (ospf_interface_event_processing_table[event][state].fptr_interface_transition_function != NULL) { (*ospf_interface_event_processing_table[event][state].fptr_interface_transition_function) (sptr_interface);#if defined (__OSPF_MIB__) /* tell OSPF MIB to update its operational status and statistics for this interface */ if ( sptr_interface->type == OSPF_VIRTUAL_LINK) ospf2Mapi_request( (void *)sptr_interface, ospfVirtIfUpdateReqType ); else ospf2Mapi_request( (void *)sptr_interface, ospfIfUpdateReqType );#endif /* __OSPF_MIB__ */ }#if defined (__OPAQUE_LSA__) for (sptr_opaque_callback = ospf.sptr_type_9_callback_list_head; sptr_opaque_callback != NULL; sptr_opaque_callback = sptr_next_node) { sptr_next_node = sptr_opaque_callback->sptr_forward_link; sptr_opaque_callback->interface_state_machine_change_hook(event,state,sptr_interface); } for (sptr_opaque_callback = ospf.sptr_type_10_callback_list_head; sptr_opaque_callback != NULL; sptr_opaque_callback = sptr_next_node) { sptr_next_node = sptr_opaque_callback->sptr_forward_link; sptr_opaque_callback->interface_state_machine_change_hook(event,state,sptr_interface); } for (sptr_opaque_callback = ospf.sptr_type_11_callback_list_head; sptr_opaque_callback != NULL; sptr_opaque_callback = sptr_next_node) { sptr_next_node = sptr_opaque_callback->sptr_forward_link; sptr_opaque_callback->interface_state_machine_change_hook(event,state,sptr_interface); }#endif /* __OPAQUE_LSA__ */}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -