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

📄 ospf_cfg.c

📁 vxworks下ospf协议栈
💻 C
字号:
/* ospf_cfg.c - Static configuration file for OSPF *//* Copyright 1998-2003 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------01c,20feb03,kc  Fixed SPR#86319 - provide special notes for stub area configuration.01b,19nov02,mwv merge TMS code SPR 8428401a,07feb02,kc  Added TMS-specific modification.*//*DESCRIPTIONThis file contains the static configuration for OSPF.OSPF will use static configuration when the __OSPF_FTP__ preprocis not enabled.  This file contains the minimum amount of configurationneeded to start OSPF.  This file is the place to statically configureOSPF.SPECIAL NOTES #1:-----------------For TMS-based system, the configuration within the INCLUDE_TMS_MODS preproc will beused. DO NOT modify this file for TMS-based product. This configuration file contains only the minimum sets of the configuration keywords that are required to correctly startup WindNet OSPF for TMS system.  All the OSPF configuration shall be done via the RFC1850 MIB as well as the WRN-OSPF Enterprise MIB. TMS only supports dynamic configurations for OSPF via SNMP MIBS. The previously used static configuration methodology is not applicable and will not be supported for TMS. Hence, all the static configuration keywords described in the WindNet OSPF User's Guide are not applicable to TMS-based system.SPECIAL NOTES #2:-----------------If static configuration is desirable for non-TMS based system, the simplest configuration for an OSPF Stub Area can be achieved using the following static configuration keywords:"OSPF Area ID = 01,0.0.0.1\n""OSPF Area External Routing Capability = 01,disabled\n""OSPF Area Inject Summary LSA Into Stub Area = 01,disabled\n"The "OSPF Area External Routing Capability" must be disabled for OSPF Stub Area becauseAS external link-state advertisements are not flooded to the stub area. The ""OSPF Area Inject Summary LSA Into Stub Area" controls the import of summary LSAsinto the stub area and has no effect on other areas. If "disabled", the router willneither originate  nor  propagate summary LSAs into the stub area. It will rely entirelyon its default route. If "enabled", the router will summarize and propagate summary LSAsinto the stub area.*/#include <vxWorks.h>#include <stdio.h>#include <string.h>#include "ospf.h"#if defined (__OSPF_VIRTUAL_STACK__)#include "ospf_vs_lib.h"#endif /* __OSPF_VIRTUAL_STACK__ */#if !defined (__OSPF_VIRTUAL_STACK__)extern char ospf_configuration_text[];#endif /* __OSPF_VIRTUAL_STACK__ *//*************************************************************************** ospf_cfg - String of configuration variables** This routine copies the configuration string to an array string to * be processed when initializing OSPF.** RETURNS: N/A** ERRNO: N/A** NOMANUAL*/void ospf_cfg (void){	OSPF_PRINTF_PROLOGUE (OSPF_PROLOGUE_PRINTF, "OSPF: Entering ospf_cfg\r\n");	OSPF_PRINTF_DEBUG (OSPF_DEBUG_PRINTF, "writing to 0x%lx\n",(ULONG)ospf_configuration_text);	strcpy(ospf_configuration_text,#ifdef INCLUDE_TMS_MODS"[[OSPF Routing = Section Start]]\n""OSPF Use Default Values = enabled\n""OSPF = enabled\n""OSPF Number of Areas = 0\n""OSPF Number of Ports = 0\n""OSPF Total Number of Area Address Ranges = 0\n""OSPF Route Queue Process Interval = 1\n""OSPF Type of Service Capability = disabled\n""OSPF IP Multicast = enabled\n"            #else /* for standalone WindNet OSPF */"[[OSPF Routing = Section Start]]\n""OSPF Use Default Values = enabled\n""OSPF = enabled\n""OSPF Router ID = 40.0.0.17\n""OSPF Number of Areas = 1\n""OSPF Total Number of Area Address Ranges = 1\n""OSPF Number of Ports = 1\n""OSPF Port Passive-Interface = none\n""OSPF Autonomous System Border Router = disabled\n""OSPF Redistribute Default = disabled\n"/* Needs to be enabled for redistribution of routes */"OSPF Redistribute Static = disabled\n"	/* Needs to be enabled for redistribution of routes */"OSPF Redistribute BGP = disabled\n" 	/* Needs to be enabled for OSPF-BGP interaction */"OSPF Redistribute RIP = disabled\n"    /* Needs to be enabled for OSPF-RIP interaction */"OSPF IP Multicast = enabled\n""OSPF Type of Service Capability = disabled\n""OSPF Printf = enabled\n""OSPF Printf INTERFACE = disabled\n""OSPF Printf NEIGHBOR = disabled\n""OSPF Printf Memory = disabled\n""OSPF Printf Alarm = disabled\n""OSPF Printf SNMP = disabled\n""OSPF Printf Packets = disabled\n""OSPF Printf Routing Table = disabled\n""OSPF Printf Debug = disabled\n""OSPF Printf DB Overflow = disabled\n""OSPF Printf Prologue = disabled\n""OSPF Printf Search = disabled\n""OSPF Route Queue Process Interval = 1\n""OSPF Opaque Capability = disabled\n""OSPF RFC1583 Compatibility = enabled\n""OSPF Point to Point Router Lsa Option = 2\n""OSPF Number of Maximum age LSAs Deleted Per Second = 50\n"#if defined (__OSPF_DB_OVERFLOW_SUPPORT__)"OSPF External LSDB Limit = -1\n"		/*( Value of -1 indicates no Limit on External LSDB )*/"OSPF Exit Overflow Interval = 0\n"		/*( value of 0 indicates router will not come out of overflow state)*/#endif /*__OSPF_DB_OVERFLOW_SUPPORT__*/"\n""OSPF Area ID = 00,0.0.0.0\n""OSPF Area External Routing Capability = 00,enabled\n""\n""OSPF Area Address Range Address = 00,0.0.0.0\n""OSPF Area Address Range Mask = 00,0.0.0.0\n""OSPF Area Address Range Advertise = 00,enabled\n""OSPF Area Address Range Area ID = 00,0.0.0.0\n""\n""OSPF Port = 00,enabled\n""OSPF Port Address = 00,40.0.0.17\n""OSPF Port Address Mask = 00,255.0.0.0\n""OSPF Port Area ID = 00,0.0.0.0\n""OSPF Port Priority = 00,1\n""OSPF Port Cost = 00,1\n""OSPF Port Hello Interval = 00,10\n""OSPF Port Router Dead Interval = 00,40\n""OSPF Port Transmit Delay = 00,1\n""OSPF Port Poll Interval = 00, 120\n""OSPF Port Retransmit Interval = 00, 5\n""OSPF Port Passive = 00, disabled\n""OSPF Port Type = 00,2\n"/*"OSPF Port Authentication Type =00,0\n"*/						/* 0=No Password ; 1=Simple Password ; 2=MD5 Authentication *//*"OSPF Port Plain Text Password = 00,ospf\n"*/					/* Needs to be enabled for Authentication Type = 1(Simple Password) *//*"OSPF Port MD5 Authentication Secret Key = 00,ospf,255\n"*/	/* Needs to be enabled for Authentication Type = 2(MD5 Authentication)*/"\n"/*"OSPF Port = 01,enabled\n""OSPF Port Address = 01,20.0.0.17\n""OSPF Port Address Mask = 01,255.0.0.0\n""OSPF Port Area ID = 01,0.0.0.0\n""OSPF Port Priority = 01,1\n""OSPF Port Cost = 01,1\n""OSPF Port Hello Interval = 01,10\n""OSPF Port Router Dead Interval = 01,40\n""OSPF Port Transmit Delay = 01,1\n""OSPF Port Passive = 00, disabled\n""OSPF Port Type = 00,2\n"*/#endif /* INCLUDE_TMS_MODS */		);	return;}

⌨️ 快捷键说明

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