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

📄 ospf_mib_api.h

📁 vxworks下ospf协议栈
💻 H
📖 第 1 页 / 共 2 页
字号:
/* ospf_mib_api.h - public interface for managing OSPFv2 *//* Copyright 1998-2003 Wind River Systems, Inc. *//* modification history--------------------02w,28feb03,kc  Fixed SPR#86502 - Added INCLUDE_OSPF_MIB_UTILITIES define. Also                renamed INCLUDE_OSPF_SHOW_ROUTINES to INCLUDE_OSPF_MIB_SHOW_ROUTINES.02v,28feb03,kc  Fixed SPR#86493 - changed the max number of  concurrent rows that                 can be configured for the Type-9 Opaque LSAs, Type-10 Opaque LSAs                 and Type-11 Opaque LSAs to match the user's guide.02u,31jan03,kc  Fixed SPR#86007 - added ospfMapiSetHelper() prototype.02t,19nov02,mwv Merge TMS code SPR 8428402s,12nov02,kc  Changed returned type for ospfMapiDestroy prototype. Added                 ospfMapiIsInited() prototype.02r,17jun02,kc  Added currObjInProcess to mApiOspfClass_t.02q,10apr02,kc  Remerged changes for unnumbered interface support.02p,29mar02,kc  Added ospfBackboneActive boolean flag to mApiOspfClass_t.02o,26mar02,kc  Added ospfMapiDebug and ospfMapiErrorDebug variables to the                mApiOspfPrintf and mApiOspfError debug macros.02n,09mar02,kc  Added ospfBackboneExist boolean flag to mApiOspfClass_t.02m,22feb02,kc  Renamed prototypes for all functions using WRS naming convention.02l,13feb02,kc  Added currMapiReqType to mApiOspfClass_t.02k,07feb02,kc  Added mApiNvmSetReqFailedCnt to mApiOspfClass_t. 02j,28dec01,kc  Added ospfProtoType_t enumeration values.02i,15dec02,kc  Added argument for pObjInfo pointer to ospf_rs2mApi_errorGet().02h,14dec01,kc  Removed ospf_mApi_avlTreeErase() prototype.02g,06dec01,kc  Added semTimeout to mApiOspfClass_t.02f,09nov01,kc  Redefine the DEFAULT_OSPF_MAPI_xxx_MAX system dependent                 configuration parameters.02e,25oct01,kc  Always define INCLUDE_OSPF_SHOW_ROUTINES for now until Project                Facility supports it.02d,21oct01,kc  Added ospf_mApi_avlTreeErase() prototype.02c,21oct01,kc  Added ospfProtoInit, ospfDbOverflow, ospfNssaEnabled and                 ospfOpaqueEnable boolean variables to mApiOspfClass_t.02b,20oct01,kc  Added Area Aggregation support to mApiOspfClass_t.02a,18oct01,kc  Redefine arguments for ospf_mApi_init() prototype.01z,17oct01,kc  Added ospfRfcProto ospfProtoType_t enum value to mApiOspfClass_t.01y,16oct01,kc  Removed __WRN_OSPF_MIB__ preproc.01x,16oct01,kc  Added wrnOspf_mApi_getXXX() prototypes.01w,16oct01,kc  Fixed OSPF_MIB_BUFLEN_CHECK macro. Exception is not error.01v,15oct01,kc  Removed pOspfFreePool pointer from mApiOspfAvlClass_t. No longer                 preallocated all memory pool at init time.01u,15oct01,kc  Changed DEFAULT_OSPF_MAPI_EXT_LSDB_MAX value to use the default                value for external lsdb. Removed the mApiMaxOspfReqBuf argument                from ospf_mApi_init().01t,13oct01,kc  Added various operational error statistics to mApiOspfClass_t.01s,10oct01,kc  Added ospf_mApi_setNbr() prototype.01r,10oct01,kc  Moved mApiOspfClientType_t and mApiOspfClient_t declaration to                ospf_rfc1850_mApiHelper.h.01q,10oct01,kc  Added ospfNbrTable Row Status handler.01p,08oct01,kc  Added wrn-ospf mib specific stuffs.01o.07oct01,kc  Moved NVRAM_SAVE_FUNCPTR and NVRAM_RETRIEVE_FUNCPTR typedefs                to ospf_mApi_helper.h.01n,21sep01,kc  Renamed all mApiOspfAvlClass_t instances for clarification,01m,20sep01,kc  Added DEFAULT_OSPF_REQUEST_BUFFER_CNT define.01l,18sep01,kc  Added system configuration parameters for ospf enterprise mib.01k,18sep01,kc  Modified ospf_mApi_init() prototype.01j,15sep01,kc  Added function pointers for user supplied nvram save/retrieve                 callbacks. Save callback function pointers to mApiOspfClass_t. 01i,12sep01,kc  Added mApiOspfClient_t structure and mApiOspfClientType_t enums.01h,12sep01,kc  Added INCLUDE_OSPF_SHOW_ROUTINES for command line build.01g,11sep01,kc  Removed all show routines prototypes (after moved all show routines                to ospf_mApi_show.c)01f,04sep01,kc  Added prototypes for show routines.01e,24aug01,kc  Added SET related function pointers to support the implementation of                the ospf_mApi_processSetReq() routine.01d,24aug01,kc  Added prototypes for MIB API compliant SET routines.01c,21aug01,kc  Added GET related function pointers to support the implementation of                the ospf_mApi_processGetReq() routine.01b,16aug01,kc  Added prototypes for MIB API compliant GET routines.   01a,14aug01,kc  Initial file creation.*//*DESCRIPTION:This file contains the definitions for constants, data structures and function prototypes used to implement the OSPF Management Interface.*/ #ifndef __INCospf_mib_apih#define __INCospf_mib_apih#ifdef __cplusplusextern "C" {#endif /* __cplusplus *//* initially turn off all the debug switch */IMPORT int ospfMapiDebug;IMPORT int ospfMapiErrorDebug;/* mib api debug macro. */#undef mApiOspfDbgEnabled#ifdef mApiOspfDbgEnabled#define mApiOspfPrintf( _x )  { if (ospfMapiDebug) {printf _x;} }#else#define mApiOspfPrintf( _x )#endif /* mApiOspfDbgEnabled */#undef mApiOspfErrorEnabled#ifdef mApiOspfErrorEnabled#define mApiOspfError( _x )  { if (ospfMapiErrorDebug) {printf _x;} }#else#define mApiOspfError( _x )#endif /* mApiOspfErrorEnabled *//* SPR#86502 - INCLUDE_OSPF_MIB_SHOW_ROUTINES provides the vxWorks show routines  * for MIB API  */#define INCLUDE_OSPF_MIB_SHOW_ROUTINES/* SPR#86502 - INCLUDE_OSPF_MIB_UTILITIES provides the command-line SNMP-like MIB  * API utilities  */#define INCLUDE_OSPF_MIB_UTILITIES/* OSPF specific MIB API application defined error */#define MAPI_INVALID_INSTANCE       10000/* pointer to function for MIB API GET request */typedef STATUS (* MAPI_GET_RTN)( mApiRequest_t *pRequest, mApiReqType_t reqType );/* pointer to function for MIB API SET request */typedef STATUS (* MAPI_SET_RTN)( mApiRequest_t *pRequest, mApiReqType_t reqType );/* pointer to function for processing the SET request */typedef STATUS (* MAPI_HELPER_SET_RTN)( mApiRequest_t *pRequest, mApiReqType_t reqType );/* pointer to function for dynamically configuring the OSPF protocol */typedef STATUS (* MAPI_HELPER_CONFIG_RTN)( mApiRequest_t *pRequest );/* pointer to function for processing the GET/GET NEXT request */typedef STATUS (* MAPI_HELPER_GET_RTN)( void *pRow, mApiRequest_t *pRequest,                                         mApiObject_t *pReqObject );/* pointer to function for setting the next index value for the GET NEXT request */typedef void (* MAPI_INDEX_SET_RTN)( void *pRow, mApiRequest_t *pRequest );                                 /* pointer to function that is used by AVL to compare two instances */typedef int (* MAPI_AVL_COMPARE_RTN)(void * node, GENERIC_ARGUMENT key);/* system dependenet configuration parameters. These parameters determine the number * of concurrent instances that can be configured for each table in the OSPF-MIB. */#define DEFAULT_OSPF_MAPI_AREA_MAX           8#define DEFAULT_OSPF_MAPI_STUB_MAX           4    #define DEFAULT_OSPF_MAPI_HOST_MAX           4#define DEFAULT_OSPF_MAPI_INTF_MAX           16#define DEFAULT_OSPF_MAPI_VIRT_INTF_MAX      8#define DEFAULT_OSPF_MAPI_NBR_MAX            24#define DEFAULT_OSPF_MAPI_LSDB_MAX           512#define DEFAULT_OSPF_MAPI_EXT_LSDB_MAX       1024#define DEFAULT_OSPF_MAPI_AREA_AG_MAX        12/* SPR#86493 - changed the max number of  concurrent rows that can be configured for * the Type-9 Opaque LSAs, Type-10 Opaque LSAs and Type-11 Opaque LSAs */#define DEFAULT_OSPF_MAPI_TYPE9_LSA_MAX      12  /* for wrnOspfLocalLsdbTable */#define DEFAULT_OSPF_MAPI_TYPE10_LSA_MAX     32  /* for wrnOpsfLsdbTable */#define DEFAULT_OSPF_MAPI_TYPE11_LSA_MAX     12  /* for wrnOspfExtLsdbTable *//* the following define is for unnumbered interface support in wrnOspfIfTable. Set the * maximum number of instances allowed to be one entry less than the maximum number of * instances in ospfIfTable. This is done this way because it may be possible that all * but one instances in the ospfIfTable are created as unnumbered interface. In that * case there must be at least one interface with IP Address so that those unnumbered * interfaces can be initialized. */#define DEFAULT_OSPF_MAPI_WRN_INTF_MAX       DEFAULT_OSPF_MAPI_INTF_MAX-1/* OSPF_REQUEST_BUFFER_CNT is the number of request buffers that will be allocated. * These request buffers are used by ospf to provide operational status and stastitical * update to the MIB API asynchronous. Although this number is arbitrary picked and  * can be tuned according to the system needs, the number of buffers allocated must * be able to handle the maximum number of external link state advertisement updates * from ospf during the flooding. */#define DEFAULT_OSPF_REQUEST_BUFFER_CNT    DEFAULT_OSPF_MAPI_EXT_LSDB_MAX/* system dependent application callback functions *//* The following typedefs have been moved to ospf_mib_helper_update.h. The definitions  * for these typedefs solely remain here for clarification purposes only. * * 1) NVRAM_SAVE_FUNCPTR is the function pointer pointed to a system dependent save  * routine for saving the given object to the nvram. * * typedef STATUS (* NVRAM_SAVE_FUNCPTR)( ulong_t *pInstance, ushort_t instanceLen, *                                        ulong_t oidPrefixEnum, void *pValueBuf, *                                        ulong_t valueLen ); * * 2) NVRAM_DELETE_FUNCPTR is the function pointer pointed to a system dependent delete  * routine for deleting a table row from the nvram.  * * typedef STATUS (* NVRAM_DELETE_FUNCPTR)( ulong_t *pInstance, ushort_t instanceLen ); * * 3) NVRAM_RETRIEVE_FUNCPTR is the function pointer pointed to a system dependent  *    retrieve routine for retrieving all prevously saved OSPF configuration from nvram.  *    The retrieve routine must invoke the MIB API for read-create objects in each ospf  *    table with the mApiRequest_t set to MAPI_NVM_SET request type so that MIB API can  *    repopulate its management database at system startup. * * typedef STATUS (* NVRAM_RETRIEVE_FUNCPTR)( void ); *//* define the OSPF RFC that is currently using */typedef enum {    EospfProtoType_rfc1583 = 1,  /* RFC1583 OSPFv2 */    EospfProtoType_rfc2178,      /* RFC2178 OSPFv2 */    EospfProtoType_rfc2328       /* RFC2328 OSPFv2 */     } ospfProtoType_t;typedef struct mApiOspfAvlClass{    LIST                  ospfFreePoolList;    /* free memory list */    AVL_NODE              *pOspfAvlRoot;       /* AVL tree root */    int                   memReqFailedCnt;     /* memory request from pool failed */    MAPI_AVL_COMPARE_RTN  ospfAvlCompareRtn;   /* AVL compare routine */} mApiOspfAvlClass_t;/*************************************************************************************** * Management Interface Data Structure. */typedef struct mApiOspfClass{    /* OSPF Protocol Information */    ospfProtoType_t  ospfRfcProto;      /* version of OSPFv2 RFC that is using */    BOOL             ospfProtoInit;     /* if true, OSPF protocol is up */    BOOL             ospfOpaqueEnable;  /* if true, support Opaque LSA */    BOOL             ospfDbOverflow;    /* if true, support OSPF database overflow */    BOOL             ospfNssaEnabled;   /* if true, support NSSA */    BOOL             ospfBackboneExist; /* if true, OSPF backbone area exists */    BOOL             ospfBackboneActive; /* if true, one more interfaces are active */    SEM_ID           semMapiMutex;   /* mutex semaphore */    int              semTimeout;     /* semaphore wait time, used by ospf2Mapi task */    BOOL             rebootRouter;   /* restart router if true, destroyed MIB API */    BOOL             dynamicConfig;  /* true if dynamic configuration is required */    BOOL             dynamicDelete;  /* true if dynamic deletion from nvram required */        /* system dependent callback functions for saving/retrieving ospf configuration      * to/from nvram      */    NVRAM_SAVE_FUNCPTR      nvramSaveRtn;      /* to save configuration to nvram */    NVRAM_DELETE_FUNCPTR    nvramDelRtn;       /* to delete a table row from nvram */    NVRAM_RETRIEVE_FUNCPTR  nvramRetrieveRtn;  /* to retrieve configuration from nvram */    /* system dependent configuration parameters for standard OSPF-MIB */    int mApiOspfMaxArea;     /* max number of instances for ospfAreaTable */    int mApiOspfMaxStub;     /* max number of instances for ospfStubTable */    int mApiOspfMaxLsdb;     /* max number of instances for ospfLsdbTable */    int mApiOspfMaxHost;     /* max number of instances for ospfHostTable */    int mApiOspfMaxIf;       /* max number of instances for ospfIfTable  */    int mApiOspfMaxIfMetric; /* max number of instances for ospfIfMetricTable */    int mApiOspfMaxVirtIf;   /* max number of instances for ospfVirtIfTable */    int mApiOspfMaxNbr;      /* max number of instances for ospfNbrTable */

⌨️ 快捷键说明

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