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

📄 os_port.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: 2002/01/31 17:21:28 $*  $Source: M:/psisrc/routing/incl/rcs/os_port.h $*  $Revision: 1.9 $**************************************************************************  File Description:  OSPF - target platform specific definitions  *************************************************************************/#define PROTO 1#define PENT_BSIZE		   512#define PENT_MAXBLK         16/* used for allocations, value used in pdus is settable *//* size of hashing tables *//* we avoid division, so table size is binary number */#define NBR_HASH_BITS       4#define NBR_HASHES          (1 << NBR_HASH_BITS)#define LSD_HASH_BITS       4#define LSD_HASHES          (1 << LSD_HASH_BITS)#define OS_CIRC_HASH_BITS   1#define OS_CIRC_HASHES      (1 << CIRC_HASH_BITS)/* true if virtual links to all area borders shouldbe automatically created when an area border routeris found.*/ #define DEF_AUTO_VLINK	    0#define ALL_METRICS         0       /* support all routing metrics *//* true if multiple paths are supported */#define LOAD_SHARE          0#if LOAD_SHARE#define MAX_MSPLIT          3#else#define MAX_MSPLIT          1#endif /* LOAD_SHARE *//* set true if a disabled circuit is considered in the ospf   domain, otherwise set false. if false, disabled circ   results in ospf extern for that circ.*/#define OSPF_DISABLED_IN_DOMAIN  0/* MEMORY ALLOCATION MACROS */#ifndef OSPF_MALLOC#define OSPF_MALLOC(a) OS_MALLOC(a,1)#endif#ifndef OSPF_FREE#define OSPF_FREE	OS_FREE#endif/* alloc output frame */#define ospfOfAlloc(len)        ospf_oframe_alloc(len)  /* returns ibd_pt*/#define ospfOfFree(ptr)         ospf_oframe_free(ptr)/* free an input packet */#define ospfIfFree(ptr)        #define ospfNbrAlloc(len)			(Neighbor *)OSPF_MALLOC(len) /* adj structure */#define ospfNbrFree(ptr)			OSPF_FREE(ptr)#define ospfNodeAlloc()				OSPF_MALLOC(sizeof(OSPF_NODE))#define ospfCircAlloc()   			OSPF_MALLOC(sizeof(OS_CIRC))#define ospfCircFree(ptr)    		OSPF_FREE(ptr)/* link state pdus */#define ospfLsaAlloc(len)       OSPF_MALLOC(len)#define ospfLsaFree(ptr)        OSPF_FREE(ptr)#define ospfRouteAlloc(len)     OSPF_MALLOC(len) /* route hash*/#define ospfRouteFree(ptr)      OSPF_FREE(ptr)/* various lsp structures */#define ospfLsdAlloc(len)       OSPF_MALLOC(len)#define ospfLsdFree(ptr)   	  OSPF_FREE(ptr)#define ospfTimerAlloc()		  OSPF_MALLOC(sizeof(OTIMER))#define ospfTimerFree(ptr)	  OSPF_FREE(ptr)#define ospfCRAlloc()		  OSPF_MALLOC(sizeof(CFG_RANGE))#define ospfCRFree(ptr)		  OSPF_FREE(ptr)#define ospfAreaAlloc()		  OSPF_MALLOC(sizeof(AREA))#define ospfAreaFree(ptr)	  OSPF_FREE(ptr)#define ospfNbmaAlloc()		  OSPF_MALLOC(sizeof(NBMA_DST))#define ospfNbmaFree(ptr)	  OSPF_FREE(ptr)#define ospfHostRtAlloc()	  OSPF_MALLOC(sizeof(HOST_RT))#define ospfHostRtFree(ptr)	  OSPF_FREE(ptr)#define ospfDBReqBlkAlloc(s)   OSPF_MALLOC(s)#define ospfDBReqBlkFree(ptr)  OSPF_FREE(ptr)#define ospfRetransBlkAlloc(s)  OSPF_MALLOC(s)#define ospfRetransBlkFree(ptr) OSPF_FREE(ptr)#define ospfAcknodeAlloc(s) (lsa_ack*)OSPF_MALLOC(s);#define ospfAcknodeFree(ptr) OSPF_FREE(ptr)#define ospf_db_packet_alloc(s) OSPF_MALLOC(s)#define ospf_db_packet_free(p)  OSPF_FREE(p)#define osDelBlkAlloc(s)		(OSDELBLK *)OSPF_MALLOC(s)#define osDelBlkFree(p)		OSPF_FREE(p)/* NOTE: this mem copy assumes a 0 len copy is valid !!! */#define ospfCopyMem(xdst,xsrc,xlen)  rrCopyMem((byte *)(xdst),(byte *)(xsrc),xlen)#define ospfFillMem(xdst,xdata,xlen)   rrFillMem((byte *)xdst,xdata,xlen) /*fill */#define ospfCmpMem(xdst,xsrc,xlen)  rrCmpMem((byte *)(xdst),(byte *)(xsrc),xlen)/* proto defs moved to rrport.h */#define ospfLink rrLink#define ospfGenLink rrGenLink#define ospfULink rrULink/* byte access macros moved to rrport.h */#define n2rripa(xpdua) (rripa)uns_p2l(xpdua)#define rripa2n(xpdua,xval)  uns_l2p((xpdua),(xval))#define TRACE_NBR(x)	if(ospfNode->n_trnbr) os_printf x#define TRACE_LSA(x)	if(ospfNode->n_trlsa) os_printf x#define TRACE_DR(x)		if(ospfNode->n_trdr) os_printf x#ifndef TRACE_DEF_NBR#define TRACE_DEF_NBR	0#endif#ifndef TRACE_DEF_DR#define TRACE_DEF_DR	0#endif#ifndef TRACE_DEF_LSA#define TRACE_DEF_LSA	0#endif/* min time between spf runs */#define OSPF_SPF_HOLD	3/* number of vertices in spf to traverse before returning.   spf will be broken into "chunks" of this size, one   chunk being executed per tic.*/#define OSPF_SUSPEND_CNT 5000

⌨️ 快捷键说明

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