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

📄 envoy.h

📁 wm PNE 3.3 source code, running at more than vxworks6.x version.
💻 H
📖 第 1 页 / 共 3 页
字号:
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/vxworks/envoy.h,v 1.6 2002/05/23 19:42:41 josh Exp $ *//* * Copyright (C) 1999-2004 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. *//**************************************************************************** *  Copyright 1994-1997 Epilogue Technology Corporation. *  Copyright 1998 Integrated Systems, Inc. *  All rights reserved. ****************************************************************************//*modification history--------------------01g,02may05,job  vxWorks-specific definition of SNMP_DH_RAND moves here01f,06oct04,job  draw processor alignment from vxWorks header files01e,26nov03,ps  copyright update01d,05nov03,ps  merge from latest on ickthwa_devel_branch.nh01c,19apr98,ann changed ENVOY_SNMP_INIT_LOCK macro01b,04jun96,rjc changed #if defined to #if01a,01may96,rjc Added copyright header*//* envoy/port/sunos/envoy.h *    configuration for Envoy on VxWorks *//* * $Date: 2002/05/23 19:42:41 $ * $Revision: 1.6 $ * $Author: josh $ * * $Log: envoy.h,v $ * Revision 1.6  2002/05/23 19:42:41  josh * updates to support the entity MIB * * Revision 1.5  2002/04/05 13:45:18  andre * Add ENVOY_AX_GET_CONNID user-exit. * * Revision 1.4  2002/04/04 15:23:15  andre * Clean up; change enum params to int. * * Revision 1.2  2001/11/07 14:26:53  tneale * Added wm to include path * * Revision 1.1.1.1  2001/11/05 17:47:17  tneale * Tornado shuffle * * Revision 1.7.4.3  2001/10/29 21:42:50  josh * adding a spot for the proxy forwarding routine * * Revision 1.7.4.2  2001/09/24 16:44:39  josh * add a prototype for a function * * Revision 1.7.4.1  2001/08/24 15:35:20  josh * add nonvolatile access definitions for proxy and community tables * * Revision 1.7  2001/04/13 18:09:25  josh * merging in changes from kingfisher branch * * Revision 1.6  2000/07/26 19:39:31  josh * fixing a broken comment * * Revision 1.5  2000/06/09 14:57:35  josh * updating header files to correspond with new installation options and * new code * * Revision 1.4.2.5  2001/03/12 22:09:03  tneale * Updated copyright * * Revision 1.4.2.4  2000/12/07 22:09:56  tneale * Added definition for ENVOY_AX_SA_MIB_ROOT_NODE * * Revision 1.4.2.3  2000/10/26 21:36:00  josh * fixing a few bugs in the vxWorks AgentX master agent * * Revision 1.4.2.2  2000/10/18 20:05:41  josh * added a definition for ENVOY_SNMP_FREE_LOCK_TAG() and removed * responsibility for cleaning continue lock from * snmpHookPrivRelease() * * Revision 1.4.2.1  2000/10/13 21:33:16  josh * AgentX updates * * Revision 1.4  2000/03/08 20:01:13  josh * SNMPv3 support for the vxWorks port of Envoy * * Revision 1.3  2000/03/07 21:23:37  josh * overwriting old envoy.h withnew one corresponding to new demo * * Revision 7.0  1996/03/18  20:25:29  sar * Updated rev to 7.0 and copyright ot 96 * * Revision 6.5  1996/02/27  00:03:03  sar * Updated partytime to be usectime * * Revision 6.4  1995/11/14  22:37:59  sar * If proxy is installed release_private is proxy_release_private * * Revision 6.3  1995/11/10  23:59:08  sar * stopped using the pre & post set user exits for the nvview stuff * * Revision 6.2  1995/11/06  20:05:22  sar * Removed validate_community's dependency on install v1 * removed validate_address & validate_vesion * * Revision 6.1  1995/10/20  23:15:55  sar * remvoed party, context and acl macros * * Revision 6.0  1995/05/31  22:00:33  sra * Release 6.0. * * Revision 5.6  1995/05/22  19:39:24  sar * Modified the lock code to add some new macros. * * Revision 5.5  1995/05/02  23:39:31  sar * Added the envoy timer macros. * * Revision 5.4  1995/05/01  21:58:15  sar * Put the example lock macros in an ifdef block * * Revision 5.3  1995/05/01  20:59:29  sra * Have to test CONFIG_PREAMBLE with #ifdef, not #if. * * Revision 5.2  1994/11/01  17:59:04  sar * *_add_mod routines now take a flag as well as an data block. * * Revision 5.1  1994/09/29  20:39:39  sar * added macros for a simple locking scheme to test the compiliation of * our code * Modified the macros for use with the non volatile storage stuff to * use the new (as of fall 94) scheme. * * Revision 5.0  1994/05/16  16:47:41  sar  * Updated revision to 5.0 and copyright to include 1994  *  * Revision 4.3  1994/05/12  17:24:05  sar  * moved the include for nvutils.h to make it available for everybody  * that needs it.  *  * Revision 4.2  1994/05/10  20:21:45  sar  * moved view defines aroudn so they are available in other than v2 settings. * * Revision 4.1  1994/05/09  21:06:41  sar * Added define for SNMP_RESETSYSUPTIME to be nothing. * * Revision 4.0  1993/06/24  17:44:26  sar * Updated rev to 4.0 and copyright to 93 * * Revision 1.1  1993/06/09  19:33:45  dab * Initial revision * *  *//* [clearcase]modification history-------------------*/#ifdef __cplusplusextern "C" {#endif  /* __cplusplus */#include <vxWorks.h>#ifdef INSTALL_ON_BIG_ENDIAN#undef INSTALL_ON_BIG_ENDIAN#endif    #ifdef INSTALL_ON_LITTLE_ENDIAN#undef INSTALL_ON_LITTLE_ENDIAN#endif    #if (_BYTE_ORDER == _BIG_ENDIAN)#define INSTALL_ON_BIG_ENDIAN 1#define INSTALL_ON_LITTLE_ENDIAN 0#elif (_BYTE_ORDER == _LITTLE_ENDIAN)#define INSTALL_ON_LITTLE_ENDIAN 1#define INSTALL_ON_BIT_ENDIAN 0#endif    #ifdef INSTALL_ENVOY_SNMP_LOCK#include <semLib.h>#endif /* INSTALL_ENVOY_SNMP_LOCK */#ifdef CONFIG_PREAMBLE/***************************************************************** * * System Includes: * *     The SNMP uses memcpy(), memset(), and strlen().  The appropriate * include file should be put here to see that these routines are * properly declared.  If no such include file exists on the system * then declare memcpy() and memset() here directly.  The SNMP also * uses min() and max().  Include the system's definition or use the * macros supplied below. *****************************************************************/#include <string.h>/***************************************************************** * Memory allocation routines.  The SNMP needs to allocate memory to * decode the packet into and also to store the response data for GET's * and GET-NEXT's. *****************************************************************//*---------------------------------------------------------------- * Make sure that the routines used by the SNMP_memory_alloc() and * SNMP_memory_free() macros are declared.  If system memory routines * are used (e.g. malloc() and free()) then include the appropriate * system header file here. ----------------------------------------------------------------*/extern  void * snmpdMemoryAlloc (size_t);extern  void   snmpdMemoryFree (void *);#define SNMP_memory_alloc(p)     snmpdMemoryAlloc (p)#define SNMP_memory_free(p)      snmpdMemoryFree (p)/* Define the maximum packet size this implementation will accept.      *//* There is no hard upper limit.  SNMP_MAX_PACKET_SIZE should not be    *//* reduced below the value of SNMP_MIN_PACKET_SIZE.                     *//* xxxxxxxxxxxxxxxxxxxxxxxxxxx*/#define SNMP_MAX_PACKET_SIZE            (8*1024)#define SNMP_MIN_PACKET_SIZE            484 /* shouldn't change *//* Say what is the maximum number of components of an object identifer  *//* which we can handle, including those in the instance.                */#define MAX_OID_COUNT                   32#if (INSTALL_ENVOY_SNMP_LOCK)typedef SEM_ID ENVOY_LOCK_T;#endif #define ENVOY_SA_SET_TIMEOUT 100000#else   /* CONFIG_PREAMBLE *//***************************************************************** * * The following macro definitions allow access to the user configurable * part of the SNMP code. * *****************************************************************//***************************************************************** * Include any declarations needed for the routines specified below * by the macros.  Don't put <snmp.h> here because this file is * included by that one. *****************************************************************//*---------------------------------------------------------------- SNMP_validate_community -- Check an operation against the community name.         Parameters:        SNMP_PKT_T *pkt         The received packet (decoded format)        SNMPADDR_T *src         Source of the packet        SNMPADDR_T *dst         Destination of the packet (most likely                                the address of the machine on which this                                code is running.)Returns:        This procedure should return 0 if happy with the community and        1 if not.        This routine should fill in the packet structure with the mib        view mask associated with the community string.        This routine may hang additional data onto the "private" field of        the packet structure.  The user will be given the opportinity to        release that memory via SNMP_release_private(). ----------------------------------------------------------------*/extern int snmpIoCommunityValidate __((SNMP_PKT_T *, SNMPADDR_T *, \                                                SNMPADDR_T *));#define SNMP_validate_community(pkt, src, dst) \    snmpIoCommunityValidate (pkt, src, dst) #if (INSTALL_ENVOY_SNMP_RFC1445_VIEWS)#if 0   /* not supported for vxWorks agent */#include <envoy/utils/nvutils.h>#define SNMP_VIEW_CREATE_TEST(PKT, NEW)         SNMP_NV_View_Add_Mod(NEW, 0)#define SNMP_VIEW_UPDATE_TEST(PKT, OLD, NEW)    SNMP_NV_View_Add_Mod(NEW, 0)#define SNMP_VIEW_DESTROY_TEST(PKT, OLD)        SNMP_NV_View_Add_Mod(OLD, 1)#define SNMP_VIEW_BACKOUT_HOOK(NEW)             SNMP_NV_Clean()#define SNMP_VIEW_CREATE_UNDO(NEW)              (SNMP_NV_Clean(), 0)#define SNMP_VIEW_UPDATE_UNDO(OLD, NEW)         (SNMP_NV_Clean(), 0)#define SNMP_VIEW_DESTROY_UNDO(OLD)             (SNMP_NV_Clean(), 0)#define SNMP_VIEW_DESTROY_BACKOUT(OLD)          SNMP_NV_Clean()#define SNMP_VIEW_FINISHED                      SNMP_NV_Doit()#endif  /* 0 (not supported for vxWorks agent) */#endif /* version2, master agent, v2 views */#if (INSTALL_ENVOY_SNMP_RFC2275_VIEWS)#include <wrn/wm/demo/nvutils.h>#define SNMP_VIEW_2275_DESTROY_TEST(PKT, VBP, CUR, NEW)                   \			snmp_view_2275_test(PKT, VBP, CUR, NEW)#define SNMP_VIEW_2275_CREATE_TEST(PKT, VBP, CUR, NEW)                    \			snmp_view_2275_test(PKT, VBP, CUR, NEW)#define SNMP_VIEW_2275_UPDATE_TEST(PKT, VBP, CUR, NEW)                    \			snmp_view_2275_test(PKT, VBP, CUR, NEW)#define SNMP_VIEW_2275_DESTROY_SET(PKT, VBP, CUR, NEW)                   \			snmp_view_2275_set(PKT, VBP, CUR, NEW)#define SNMP_VIEW_2275_CREATE_SET(PKT, VBP, CUR, NEW)                    \

⌨️ 快捷键说明

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