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

📄 rrcfg.h

📁 用于嵌入式系统的TCP/IP协议栈及若干服务
💻 H
字号:
/**            Copyright (c) 1998-2001 by NETsilicon Inc.**  This software is copyrighted by and is the sole property of*  NETsilicon.  All rights, title, ownership, or other interests*  in the software remain the property of NETsilicon.  This*  software may only be used in accordance with the corresponding*  license agreement.  Any unauthorized use, duplication, transmission,*  distribution, or disclosure of this software is expressly forbidden.**  This Copyright notice may not be removed or modified without prior*  written consent of NETsilicon.**  NETsilicon, reserves the right to modify this software*  without notice.**  NETsilicon*  411 Waverley Oaks Road                  USA 781.647.1234*  Suite 227                               http://www.netsilicon.com*  Waltham, MA 02452                       AmericaSales@netsilicon.com***************************************************************************  $Name: Fusion 6.52 Fusion 6.51 $*  $Date: 2001/08/22 13:38:56 $*  $Source: M:/psisrc/routing/incl/rcs/rrcfg.h $*  $Revision: 1.1 $****************************************************************************  File Description: configuration block definition. used to restore *                    saved parameters on reboot.  ***************************************************************************/typedef struct rrconfig_blk{	unsigned char	prot_id;	/* protocol entity */	unsigned char	type;		/* block type in protocol */	unsigned short	len;		/* len of blk including 					   this header */	unsigned  short	version;	/* version of blk */}rrcfg;/* configurable protocol types */#define RRCFG_IP	1#define RRCFG_OSPF	2#define RRCFG_IPX	3#define RRCFG_NLSP	4#define RRCFG_ATALK	5#define RRCFG_DECNET	6#define RRCFG_OSI	7#define RRCFG_BGP	8#define RRCFG_IPV6	9#define RRCFG_BR	10#define RRCFG_DVMRP	11#define RRCFG_PIM	12#define RRCFG_ISIS	13#define RRCFG_END	255/******************************************version control:we will enforce the following when changingthe contents of a config block:- when deleting a member, declared it as unused.  it will never be used subsequently.- when adding a member, add it at the end of a  block.These two requirements will allow us to use blocksof a lower version and therefore allow version update without tossing old configured information.When restoring, check the version level. If it islower than the current version, check the length ofthe block. If it is longer than the current length,someone has violated the above rules, ignore theblock and return an error.If the old version is ok, create a default templateof the new block. This can be done in two ways:- If the object the block refers to already exists,(for example a node structure which always exists),you can do the equivalent to a save operation intothe template. This has the advantage that there isvirtually no additional programming effort.- If the object block does not exist, the programmerwill need to manually write a default function tofill in the template.After the template is filled in, copy the contents ofthe old block into the template. The template can nowbe used for the restore operation.***************************************************//* Error Codes */#define RRCFG_NOERROR		0#define RRCFG_BADVER		1#define RRCFG_2LONG		2#define RRCFG_UNKNOWN_OBJ	3#define RRCFG_NOCIRC		4#define RRCFG_NOAREA		5#define RRCFG_NOLEN		6#define RRCFG_GENERAL		7#define RRCFG_NOAKEY		8   /* no area key */#define RRCFG_NODKEY		9   /* no domain key */

⌨️ 快捷键说明

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