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

📄 dyncfgvx.c

📁 wm PNE 3.3 source code, running at more than vxworks6.x version.
💻 C
字号:
/* *  Copyright 2001-2005 Wind River Systems, Inc. *  All rights reserved.  Provided under license only. *  Distribution or other use of this software is only *  permitted pursuant to the terms of a license agreement *  from Wind River Systems (and is otherwise prohibited). *  Refer to that license agreement for terms of use. *//* * $Log: dyncfgvx.c,v $ * Revision 1.5  2003/01/15 14:05:04  josh * directory structure shifting * * Revision 1.4  2001/12/11 18:19:58  meister * A_DecodeInteger64Data doesn't really need to be DYNCFG'd. * * Revision 1.3  2001/11/06 21:50:46  josh * second (and hopefully final) pass of new path hacking * * Revision 1.2  2001/11/06 21:20:08  josh * revised new path hacking * * Revision 1.1.1.1  2001/11/05 17:47:42  tneale * Tornado shuffle * * Revision 1.1.2.10  2001/11/02 17:13:11  meister * split out user and core dynamic config initialization * * Revision 1.1.2.9  2001/10/19 21:09:33  meister * get rid of the message-queue method of communicating which components * are installed, in favor of a directly accessible bit-mask variable. We never * never used the message queue for anything the simple bit mask couldnt do. * * Revision 1.1.2.8  2001/10/16 18:32:03  meister * dynamic function pointers for snmpAxMonitorSpawn, axMasterIoInit * * Revision 1.1.2.7  2001/10/01 18:54:59  meister * dynamic config variable for envoy_use_v2_types should always be on when * is on. * * Revision 1.1.2.6  2001/09/27 13:45:15  meister * dynamic config rototill; missed SNMP_Check_Retrans_List() * * Revision 1.1.2.5  2001/09/27 13:26:09  meister * Use new dyncfg macro DYNCFG_FUNCPTR to set dynnamic version of * SNMP_community_lookup() * * Revision 1.1.2.4  2001/09/27 01:11:34  meister * dynamic V3 config rototill * * Revision 1.1.2.3  2001/09/20 17:10:45  meister * added some missing dynamic component function pointer initializations * * Revision 1.1.2.2  2001/09/18 21:22:15  meister * configMsgQ --> snmpdConfigMsgQ * * Revision 1.1.2.1  2001/09/13 17:35:24  meister * added some casts to deal with compiler warnings * *//* [clearcase]modification history-------------------01b,18apr05,job  update copyright notices01a,24nov03,job  update copyright information*/#include <vxWorks.h>#include <msgQLib.h>#include <semLib.h>#include <taskLib.h>#include <wrn/wm/snmp/engine/snmp.h>#include <wrn/wm/snmp/engine/snmpdefs.h>#include <wrn/wm/snmp/engine/localio.h>#include <wrn/wm/snmp/engine/agentx.h>#include <wrn/wm/snmp/engine/vxcmpnts.h>#include <wrn/wm/common/dyncfg.h>extern unsigned int snmpdInstalledComponentsValue;extern SEM_ID   snmpdConfigMutex;DYNCFG_FUNCPTR8(_snmp_find_next_helper_ax, int, MIBNODE_T *, int,                 OIDC_T*, OBJ_ID_T *, int, VB_T *, SNMP_PKT_T *, int)DYNCFG_FUNCPTR2(_snmp_find_next_bound, int, MIBNODE_T *, VB_T *)DYNCFG_EXTERN_FUNCPTR0(envoy_ax_ma_init,void)DYNCFG_FUNCPTR6(SNMP_Decode_V3_Packet,SNMP_PKT_T*,SNMP_PKT_T *,                       LCL_FILE *, SNMPADDR_T *, SNMPADDR_T *, ALENGTH_T,                        int *)DYNCFG_FUNCPTR1(SNMP_Check_Retrans_List,void,SNMP_PKT_T *)DYNCFG_EXTERN_FUNCPTR0(envoy_v3_init,void)DYNCFG_FUNCPTR0(SNMP_Auth_Add_MD5,int)DYNCFG_FUNCPTR0(SNMP_Auth_Add_SHA,int)DYNCFG_FUNCPTR0(SNMP_Priv_Add_DES,int)DYNCFG_FUNCPTR1(bufsize_for_v3_pkt,ALENGTH_T,SNMP_PKT_T *)DYNCFG_FUNCPTR2(encode_snmp_v3,int,SNMP_PKT_T *,EBUFFER_T *)DYNCFG_FUNCPTR9(Send_Report_PDU,SNMP_PKT_T *,SNMP_PKT_T *,LCL_FILE *,                       bits8_t,OIDC_T *,int,bits32_t,int *,SNMPADDR_T *,                       SNMPADDR_T *)/* from snmp core code */DYNCFG_VBL_DECLARE_EXTERN(envoy_use_v2_types)DYNCFG_VBL_DECLARE_EXTERN(envoy_use_v2_protos)DYNCFG_VBL_DECLARE_EXTERN(envoy_snmp_coexistence)DYNCFG_VBL_DECLARE_EXTERN(envoy_snmp_proxy)DYNCFG_VBL_DECLARE_EXTERN(envoy_snmp_target)DYNCFG_VBL_DECLARE_EXTERN(envoy_snmp_notify)DYNCFG_VBL_DECLARE_EXTERN(snmpv3_component)DYNCFG_VBL_DECLARE_EXTERN(agentx_master_component)DYNCFG_VBL_DECLARE_EXTERN(agentx_subagent_component)void determineSnmpdComponents (void){     semTake (snmpdConfigMutex, WAIT_FOREVER);     DYNCFG_VBL_SET(envoy_use_v2_types, 1);     DYNCFG_VBL_SET(envoy_use_v2_protos, 1);     if (snmpdInstalledComponentsValue & SNMPD_AGENTX_MASTER_COMPONENT)         DYNCFG_VBL_SET(agentx_master_component, 1);     if (snmpdInstalledComponentsValue & SNMPD_AGENTX_SUBAGENT_COMPONENT)         DYNCFG_VBL_SET(agentx_subagent_component, 1);     if (snmpdInstalledComponentsValue & SNMPD_VERSION_3_COMPONENT)     {   DYNCFG_VBL_SET(snmpv3_component, 1);         DYNCFG_VBL_SET(envoy_snmp_coexistence, 1);         DYNCFG_VBL_SET(envoy_snmp_proxy, 1);         DYNCFG_VBL_SET(envoy_snmp_target, 1);         DYNCFG_VBL_SET(envoy_snmp_notify, 1);     }     semGive (snmpdConfigMutex);}

⌨️ 快捷键说明

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