📄 nvutils.h
字号:
/* $Header: /usr/cvsroot/target/h/wrn/wm/demo/nvutils.h,v 1.3 2002/05/23 18:51:11 josh Exp $ *//* * Copyright (C) 1999-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. *//**************************************************************************** * Copyright 1993-1997 Epilogue Technology Corporation. * Copyright 1998 Integrated Systems, Inc. * All rights reserved. ****************************************************************************//* * $Log: nvutils.h,v $ * Revision 1.3 2002/05/23 18:51:11 josh * code modifications to support the entity MIB * * Revision 1.2 2001/11/07 14:27:44 tneale * Added wm to include path * * Revision 1.1.1.1 2001/11/05 17:47:36 tneale * Tornado shuffle * * Revision 7.16.4.3 2001/09/18 19:07:55 josh * base-level support for proxy and coexistence nvram routines * * Revision 7.16.4.2 2001/07/20 20:36:58 josh * nvutils support for community objects * * Revision 7.16.4.1 2001/06/28 18:24:11 josh * Seeding the Cormorant branch with the code from the old * cormorant branch * * Revision 7.16 2001/04/13 19:52:04 josh * overwriting the trunk version of this file with the one from * the kingfisher branch * * Revision 7.15 2001/01/19 22:23:35 paul * Update copyright. * * Revision 7.14 2000/06/09 15:00:28 josh * updated for new proxy code and new installation options * * Revision 7.13.4.1 2001/04/13 19:50:33 josh * preserving special proxy-related changes to this file * on the cormorant branch * * Revision 7.13.2.3 2001/03/12 22:09:28 tneale * Updated copyright * * Revision 7.13.2.2 2001/01/19 21:38:28 josh * a new mechanism for hardcoding traps with arbitrary varbind lists * into an agent. useful for testing purposes * * Revision 7.13.2.1 2000/09/20 19:05:40 josh * bringing branch into line with root tree * * Revision 7.13 2000/03/17 00:12:12 meister * Update copyright message * * Revision 7.12 1999/10/19 15:16:31 josh * adding support for new sections: target_addr, target_params, notify, * notify_filter_profile, and notify_filter. * * Revision 7.11 1998/09/16 19:56:46 sar * Added some user exits for the v3 method routines to use in the binary code * * Revision 7.10 1998/06/28 00:21:58 sar * Corrected type signature for nv_view_add_mod * * Revision 7.9 1998/06/23 20:46:18 sar * Update the calling arguments for the config routine * * Revision 7.8 1998/06/16 05:34:53 sar * clean up some type info * return the 1445 routines to their previous state * return the proper errors for v3 routines * * Revision 7.7 1998/06/09 22:14:08 sar * Added TV3CONTEXT and TV3CNAME * * Revision 7.6 1998/06/07 02:10:34 sar * Move the global configuration arguments here and renamed them * (NV_Config_Static et al). * * Revision 7.5 1998/05/23 19:11:33 sar * Modified the view routines to include rfc2275 and added other * routines to deal with v3 mibs (access, groups, users, engineids etc). * * Revision 7.4 1998/02/25 04:57:59 sra * Update copyrights. * * Revision 7.3 1997/03/20 06:53:51 sra * DFARS-safe copyright text. Zap! * * Revision 7.2 1997/02/25 10:58:16 sra * Update copyright notice, dust under the bed. * * Revision 7.1 1997/01/08 01:58:11 sar * Removed no_pp stuff and updated copyrights * * Revision 7.0 1996/03/18 20:19:20 sar * Updated rev to 7.0 and copyright to 96 * * Revision 6.2 1996/01/10 16:41:40 sar * Usec updates - added a new set of options to the config file * for use with the usec agentid, access, context and user info. * * Revision 6.1 1995/10/20 22:39:59 sar * Cut nvutils down to only have the routines for dealing with views. * * Revision 6.0 1995/05/31 21:50:18 sra * Release 6.0. * * Revision 5.2 1994/11/01 17:54:49 sar * Added a flag to the mod list entry to allow us to determine if the * entry was being deleted and therefore shouldn't be written out. * * Revision 5.1 1994/09/23 19:29:50 sar * Removed the old non volatile scheme and added a new one that is hopefully * easier to use and allows for some new options such as a read only * flag to prohibit creating a new config file. The config stuff will * only be included if needed. * In snmptalk and snmpint added a next function. * * Revision 5.0 1994/05/16 15:57:40 sar * Updated revision to 5.0 and copyright to include 1994 * * Revision 4.0 1993/06/24 17:14:56 sar * Updated rev to 4.0 and copyright to 93 * * Revision 1.4 1993/06/02 23:23:10 dab * since this file gets included by other things, it needs to include * envoy files with <envoy/h/file.h> not just <file.h> * * Revision 1.3 1993/05/31 19:07:48 sar * changed to use a text rather than binary format for non volatile * storage, this allows me to use an editor to change the config files. * * Revision 1.2 1993/05/13 22:00:33 sar * changed stat to statflg to avoid conflicts elsewhere. * * Revision 1.1 1993/05/13 19:08:06 sar * Initial revision * *//* [clearcase]modification history-------------------01a,20apr05,job update copyright notices*//***************************************************************************** ***************************************************************************** Note well: some of these definitions are used in the pSOS examples as part of the api. Don't make changes without understanding which parts are in use. ***************************************************************************** ****************************************************************************/#include <wrn/wm/snmp/engine/asn1conf.h>#include <wrn/wm/snmp/engine/asn1.h>#include <wrn/wm/snmp/engine/buffer.h>#include <wrn/wm/snmp/engine/snmpdefs.h>#include <stdio.h>#if !defined(nvutils_inc)#define nvutils_inc#define NV_VIEW_MAXNAMELEN 32typedef struct TB_S { int token_tag; /* Tag for this token */ char *token_string; /* String representation for this token */ } TB_T;typedef struct MODS_S { struct MODS_S *next; /* The next entry in the linked list */ PTR_T data; /* The structure for the entity */ PTR_T newdata; /* new info for the entry */ INT_32_T flags; /* Flags to describe what to do with this entity. Currently only destroy is defined */#if (INSTALL_ENVOY_SNMP_RFC2275_VIEWS) bits8_t name[NV_VIEW_MAXNAMELEN]; /* the name of the view */ ALENGTH_T namelen; /* length of the name */#endif } MODS_T;#define NV_MOD_DESTROY 1#define TVERSION 1#define TCOMMENT 1#define TPREAMBLE 2#define TVIEW 3#define TMYAGENT 4#define TAGENT 5#define TACCESS 6#define TCONTEXT 7#define TUSER 8#define TV3MYENGINE 9#define TV3ENGINE 10#define TV3USER 11#define TV3GROUP 12#define TV3ACCESS 13#define TV3CONTEXT 14#define TV3TADDR 15#define TV3TPARM 16#define TV3NTFY 17#define TV3NPROF 18#define TV3NFILT 19#define TV3TRAP 20#define TV3PROXY 21#define TCOMMUNITY 22#define TENTLOGIC 23#define TVID 1#define TVSTATUS 2#define TVSTORAGE 3#define TVMASK 4#define TVTYPE 5#define TAGID 1#define TAGBOOTS 2#define TACID 1#define TACUNAME 2#define TACCNAME 3#define TACQOS 4#define TACPRIV 5#define TACRIND 6#define TACWIND 7#define TCID 1#define TCCNAME 2#define TCFLAGS 3#define TUID 1#define TUUNAME 2#define TUAUTHPROT 3#define TUAUTHKEY 4#define TENGID 1#define TENGBOOTS 2#define TENGTADDR 3#define TV3UID 1#define TV3UUNAME 2#define TV3UAUTHPROT 3#define TV3UAUTHKEY 4#define TV3UPRIVPROT 5#define TV3UPRIVKEY 6#define TV3USTATUS 7#define TV3USTORAGE 8#define TV3GUSER 1#define TV3GMODEL 2#define TV3GGROUP 3#define TV3GSTATUS 4#define TV3GSTORAGE 5#define TV3ACGROUP 1#define TV3ACPREFIX 2#define TV3ACMATCH 3#define TV3ACMODEL 4#define TV3ACLEVEL 5#define TV3ACREAD 6#define TV3ACWRITE 7#define TV3ACNOTIFY 8#define TV3ACSTATUS 9#define TV3ACSTORAGE 10#define TV3CNAME 1#define TV3TADDRNAME 1#define TV3TADDRTDOM 2#define TV3TADDRTADDR 3#define TV3TADDRTMASK 4#define TV3TADDRTMOUT 5#define TV3TADDRRETRY 6#define TV3TADDRTLIST 7#define TV3TADDRTMMS 8#define TV3TADDRPARMS 9#define TV3TADDRSTORAGE 10#define TV3TADDRSTATUS 11#define TV3TPARMNAME 1#define TV3TPARMMPMOD 2#define TV3TPARMSECMOD 3#define TV3TPARMSECNAM 4#define TV3TPARMSECLVL 5
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -