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

📄 envoy.h

📁 wm PNE 3.3 source code, running at more than vxworks6.x version.
💻 H
📖 第 1 页 / 共 3 页
字号:
 ----------------------------------------------------------------*/extern void user_post_set(SNMP_PKT_T *pkt);#define SNMP_user_post_set(pkt) user_post_set(pkt)/***************************************************************** The following are a series of macros that will connect the method routines we supplied for the RFC1445 or RFC2275 view schemes to your non-volatile storage areas.  You should consult the manuals for more information about these macros.*****************************************************************/#if (INSTALL_ENVOY_SNMP_RFC1445_VIEWS)#include <wrn/wm/demo/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 /* #if (INSTALL_ENVOY_SNMP_RFC1445_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)                    \			snmp_view_2275_set(PKT, VBP, CUR, NEW)#define SNMP_VIEW_2275_UPDATE_SET(PKT, VBP, CUR, NEW)                    \			snmp_view_2275_set(PKT, VBP, CUR, NEW)#define SNMP_VIEW_2275_DESTROY_BACKOUT(CUR, NEW)	 \			snmp_view_2275_backout(CUR, NEW)#define SNMP_VIEW_2275_CREATE_BACKOUT(CUR, NEW)		 \			snmp_view_2275_backout(CUR, NEW)#define SNMP_VIEW_2275_UPDATE_BACKOUT(CUR, NEW)		 \			snmp_view_2275_backout(CUR, NEW)#define SNMP_VIEW_2275_CREATE_UNDO(PKT, VBP, CUR, SAV)	 \			snmp_view_2275_undo(PKT, VBP, CUR, SAV)#define SNMP_VIEW_2275_UPDATE_UNDO(PKT, VBP, CUR, SAV)	 \			snmp_view_2275_undo(PKT, VBP, CUR, SAV)#define SNMP_VIEW_2275_DESTROY_UNDO(PKT, VBP, CUR, SAV)	 \			snmp_view_2275_undo(PKT, VBP, CUR, SAV)#define SNMP_VIEW_2275_FINISHED() snmp_view_2275_finished()#endif /* #if (INSTALL_ENVOY_SNMP_RFC2275_VIEWS) *//***************************************************************** If version 3 is installed we may need the following macros. ENVOY_TIME - returns a clock with a granularity of seconds  PARAMETERS: none  returns:    bits32_t SNMP_validate_address  This routine gives the user a chance to examine the address  information as well as most of the packet itself before a v3  packet is processed.  The routine must attach the address  information to the packet.  It may attach a non-default mib  tree if desired.  Note: in some error cases the packet will  not be decoded when this routine is called.  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:	0 - ok	1 - failure, drop the packet Lastly are are a series of macros that will connect the method routines we supplied for the v3 tables to your non-volatile storage areas.  You should consult the manuals for more information about these macros.*****************************************************************/#if INSTALL_ENVOY_SNMP_VERSION_3#include <wrn/wm/demo/nvutils.h>extern bits32_t get_curtime(void);#define ENVOY_TIME() get_curtime()extern int validate_SNMP_address __((SNMP_PKT_T *,				     SNMPADDR_T *,				     SNMPADDR_T *));#define SNMP_validate_address(p, s, d) validate_SNMP_address(p, s, d)#if INSTALL_ENVOY_SNMP_V3_TARGETextern int envoy_snmpaddr_to_taddress __((SNMPADDR_T *, OBJ_ID_T *, 					  EBUFFER_T *));extern int envoy_taddress_to_snmpaddr __((SNMPADDR_T *, OBJ_ID_T *, 					  EBUFFER_T *));#define ENVOY_TADDRESS_TO_SNMPADDR(A, D, T) \        envoy_taddress_to_snmpaddr(A, D, T)#define ENVOY_SNMPADDR_TO_TADDRESS(A, D, T) \        envoy_snmpaddr_to_taddress(A, D, T)#endif#define SNMP_V3_GROUP_DESTROY_TEST(PKT, VBP, CUR, NEW)                   \			snmp_v3_group_test(PKT, VBP, CUR, NEW)#define SNMP_V3_GROUP_CREATE_TEST(PKT, VBP, CUR, NEW)                    \			snmp_v3_group_test(PKT, VBP, CUR, NEW)#define SNMP_V3_GROUP_UPDATE_TEST(PKT, VBP, CUR, NEW)                    \			snmp_v3_group_test(PKT, VBP, CUR, NEW)#define SNMP_V3_GROUP_DESTROY_SET(PKT, VBP, CUR, NEW)                   \			snmp_v3_group_set(PKT, VBP, CUR, NEW)#define SNMP_V3_GROUP_CREATE_SET(PKT, VBP, CUR, NEW)                    \			snmp_v3_group_set(PKT, VBP, CUR, NEW)#define SNMP_V3_GROUP_UPDATE_SET(PKT, VBP, CUR, NEW)                    \			snmp_v3_group_set(PKT, VBP, CUR, NEW)#define SNMP_V3_GROUP_DESTROY_BACKOUT(CUR, NEW)	 \			snmp_v3_group_backout(CUR, NEW)#define SNMP_V3_GROUP_CREATE_BACKOUT(CUR, NEW)		 \			snmp_v3_group_backout(CUR, NEW)#define SNMP_V3_GROUP_UPDATE_BACKOUT(CUR, NEW)		 \			snmp_v3_group_backout(CUR, NEW)#define SNMP_V3_GROUP_CREATE_UNDO(PKT, VBP, CUR, SAV)	 \			snmp_v3_group_undo(PKT, VBP, CUR, SAV)#define SNMP_V3_GROUP_UPDATE_UNDO(PKT, VBP, CUR, SAV)	 \			snmp_v3_group_undo(PKT, VBP, CUR, SAV)#define SNMP_V3_GROUP_DESTROY_UNDO(PKT, VBP, CUR, SAV)	 \			snmp_v3_group_undo(PKT, VBP, CUR, SAV)#define SNMP_V3_GROUP_FINISHED() snmp_v3_group_finished()#define SNMP_V3_ACCESS_DESTROY_TEST(PKT, VBP, CUR, NEW)                   \			snmp_v3_access_test(PKT, VBP, CUR, NEW)#define SNMP_V3_ACCESS_CREATE_TEST(PKT, VBP, CUR, NEW)                    \			snmp_v3_access_test(PKT, VBP, CUR, NEW)#define SNMP_V3_ACCESS_UPDATE_TEST(PKT, VBP, CUR, NEW)                    \			snmp_v3_access_test(PKT, VBP, CUR, NEW)#define SNMP_V3_ACCESS_DESTROY_SET(PKT, VBP, CUR, NEW)                   \			snmp_v3_access_set(PKT, VBP, CUR, NEW)#define SNMP_V3_ACCESS_CREATE_SET(PKT, VBP, CUR, NEW)                    \			snmp_v3_access_set(PKT, VBP, CUR, NEW)#define SNMP_V3_ACCESS_UPDATE_SET(PKT, VBP, CUR, NEW)                    \			snmp_v3_access_set(PKT, VBP, CUR, NEW)#define SNMP_V3_ACCESS_DESTROY_BACKOUT(CUR, NEW)	 \			snmp_v3_access_backout(CUR, NEW)#define SNMP_V3_ACCESS_CREATE_BACKOUT(CUR, NEW)		 \			snmp_v3_access_backout(CUR, NEW)#define SNMP_V3_ACCESS_UPDATE_BACKOUT(CUR, NEW)		 \			snmp_v3_access_backout(CUR, NEW)#define SNMP_V3_ACCESS_CREATE_UNDO(PKT, VBP, CUR, SAV)	 \			snmp_v3_access_undo(PKT, VBP, CUR, SAV)#define SNMP_V3_ACCESS_UPDATE_UNDO(PKT, VBP, CUR, SAV)	 \			snmp_v3_access_undo(PKT, VBP, CUR, SAV)#define SNMP_V3_ACCESS_DESTROY_UNDO(PKT, VBP, CUR, SAV)	 \			snmp_v3_access_undo(PKT, VBP, CUR, SAV)#define SNMP_V3_ACCESS_FINISHED() snmp_v3_access_finished()#define SNMP_V3_USER_DESTROY_TEST(PKT, VBP, CUR, NEW)                   \			snmp_v3_user_test(PKT, VBP, CUR, NEW)#define SNMP_V3_USER_CREATE_TEST(PKT, VBP, CUR, NEW)                    \			snmp_v3_user_test(PKT, VBP, CUR, NEW)#define SNMP_V3_USER_UPDATE_TEST(PKT, VBP, CUR, NEW)                    \			snmp_v3_user_test(PKT, VBP, CUR, NEW)#define SNMP_V3_USER_DESTROY_SET(PKT, VBP, CUR, NEW)                   \			snmp_v3_user_set(PKT, VBP, CUR, NEW)#define SNMP_V3_USER_CREATE_SET(PKT, VBP, CUR, NEW)                    \			snmp_v3_user_set(PKT, VBP, CUR, NEW)#define SNMP_V3_USER_UPDATE_SET(PKT, VBP, CUR, NEW)                    \			snmp_v3_user_set(PKT, VBP, CUR, NEW)#define SNMP_V3_USER_DESTROY_BACKOUT(CUR, NEW)	 \			snmp_v3_user_backout(CUR, NEW)#define SNMP_V3_USER_CREATE_BACKOUT(CUR, NEW)		 \			snmp_v3_user_backout(CUR, NEW)#define SNMP_V3_USER_UPDATE_BACKOUT(CUR, NEW)		 \			snmp_v3_user_backout(CUR, NEW)#define SNMP_V3_USER_CREATE_UNDO(PKT, VBP, CUR, SAV)	 \			snmp_v3_user_undo(PKT, VBP, CUR, SAV)#define SNMP_V3_USER_UPDATE_UNDO(PKT, VBP, CUR, SAV)	 \			snmp_v3_user_undo(PKT, VBP, CUR, SAV)#define SNMP_V3_USER_DESTROY_UNDO(PKT, VBP, CUR, SAV)	 \			snmp_v3_user_undo(PKT, VBP, CUR, SAV)#define SNMP_V3_USER_FINISHED() snmp_v3_user_finished()#define SNMP_V3_TADDR_DESTROY_TEST(PKT, VBP, CUR, NEW)                   \			snmp_v3_taddr_test(PKT, VBP, CUR, NEW)#define SNMP_V3_TADDR_CREATE_TEST(PKT, VBP, CUR, NEW)                    \			snmp_v3_taddr_test(PKT, VBP, CUR, NEW)#define SNMP_V3_TADDR_UPDATE_TEST(PKT, VBP, CUR, NEW)                    \			snmp_v3_taddr_test(PKT, VBP, CUR, NEW)#define SNMP_V3_TADDR_DESTROY_SET(PKT, VBP, CUR, NEW)                   \			snmp_v3_taddr_set(PKT, VBP, CUR, NEW)#define SNMP_V3_TADDR_CREATE_SET(PKT, VBP, CUR, NEW)                    \			snmp_v3_taddr_set(PKT, VBP, CUR, NEW)#define SNMP_V3_TADDR_UPDATE_SET(PKT, VBP, CUR, NEW)                    \			snmp_v3_taddr_set(PKT, VBP, CUR, NEW)#define SNMP_V3_TADDR_DESTROY_BACKOUT(CUR, NEW)	 \			snmp_v3_taddr_backout(CUR, NEW)#define SNMP_V3_TADDR_CREATE_BACKOUT(CUR, NEW)		 \			snmp_v3_taddr_backout(CUR, NEW)#define SNMP_V3_TADDR_UPDATE_BACKOUT(CUR, NEW)		 \			snmp_v3_taddr_backout(CUR, NEW)#define SNMP_V3_TADDR_CREATE_UNDO(PKT, VBP, CUR, SAV)	 \			snmp_v3_taddr_undo(PKT, VBP, CUR, SAV)#define SNMP_V3_TADDR_UPDATE_UNDO(PKT, VBP, CUR, SAV)	 \			snmp_v3_taddr_undo(PKT, VBP, CUR, SAV)#define SNMP_V3_TADDR_DESTROY_UNDO(PKT, VBP, CUR, SAV)	 \			snmp_v3_taddr_undo(PKT, VBP, CUR, SAV)#define SNMP_V3_TADDR_FINISHED() snmp_v3_taddr_finished()#define SNMP_V3_TPARAM_DESTROY_TEST(PKT, VBP, CUR, NEW)                   \			snmp_v3_tparam_test(PKT, VBP, CUR, NEW)#define SNMP_V3_TPARAM_CREATE_TEST(PKT, VBP, CUR, NEW)                    \			snmp_v3_tparam_test(PKT, VBP, CUR, NEW)#define SNMP_V3_TPARAM_UPDATE_TEST(PKT, VBP, CUR, NEW)                    \			snmp_v3_tparam_test(PKT, VBP, CUR, NEW)#define SNMP_V3_TPARAM_DESTROY_SET(PKT, VBP, CUR, NEW)                   \			snmp_v3_tparam_set(PKT, VBP, CUR, NEW)#define SNMP_V3_TPARAM_CREATE_SET(PKT, VBP, CUR, NEW)                    \			snmp_v3_tparam_set(PKT, VBP, CUR, NEW)#define SNMP_V3_TPARAM_UPDATE_SET(PKT, VBP, CUR, NEW)                    \			snmp_v3_tparam_set(PKT, VBP, CUR, NEW)#define SNMP_V3_TPARAM_DESTROY_BACKOUT(CUR, NEW)	 \			snmp_v3_tparam_backout(CUR, NEW)#define SNMP_V3_TPARAM_CREATE_BACKOUT(CUR, NEW)		 \			snmp_v3_tparam_backout(CUR, NEW)#define SNMP_V3_TPARAM_UPDATE_BACKOUT(CUR, NEW)		 \			snmp_v3_tparam_backout(CUR, NEW)#define SNMP_V3_TPARAM_CREATE_UNDO(PKT, VBP, CUR, SAV)	 \			snmp_v3_tparam_undo(PKT, VBP, CUR, SAV)#define SNMP_V3_TPARAM_UPDATE_UNDO(PKT, VBP, CUR, SAV)	 \			snmp_v3_tparam_undo(PKT, VBP, CUR, SAV)#define SNMP_V3_TPARAM_DESTROY_UNDO(PKT, VBP, CUR, SAV)	 \			snmp_v3_tparam_undo(PKT, VBP, CUR, SAV)#define SNMP_V3_TPARAM_FINISHED() snmp_v3_tparam_finished()#define SNMP_V3_NOTIFY_DESTROY_TEST(PKT, VBP, CUR, NEW)                   \			snmp_v3_notify_test(PKT, VBP, CUR, NEW)#define SNMP_V3_NOTIFY_CREATE_TEST(PKT, VBP, CUR, NEW)                    \			snmp_v3_notify_test(PKT, VBP, CUR, NEW)

⌨️ 快捷键说明

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