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

📄 sas_ui64.c

📁 wm PNE 3.3 source code, running at more than vxworks6.x version.
💻 C
字号:
/* *  Copyright 2000-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 1995-1997 Epilogue Technology Corporation. *  Copyright 1998 Integrated Systems, Inc. *  All rights reserved. *//* * $Log: sas_ui64.c,v $ * Revision 1.2  2001/11/06 21:20:26  josh * revised new path hacking * * Revision 1.1.1.1  2001/11/05 17:47:40  tneale * Tornado shuffle * * Revision 9.4  2001/01/19 22:21:59  paul * Update copyright. * * Revision 9.3  2000/03/17 00:17:44  meister * Update copyright message * * Revision 9.2  1999/05/24 20:12:07  josh * 'compc' and 'compl' have been replaced by 'tcount' and 'tlist' * to avoid C++ compiler errors. * * Revision 9.1  1999/04/09 20:36:58  josh * Obsoleting ENVOY_SNMP_VERSON_USEC and ENVOY_40_VB_FREE_COMPAT * * Revision 9.0  1998/10/16 22:09:45  sar * Update version stamp to match release * * Revision 8.3  1998/06/19 20:18:54  sar * Make all files include asn1conf.h and snmp.h to make sure we get the * common code * * Revision 8.2  1998/06/05 18:52:59  sra * "#include <foo.h>" => "#include <envoy/h/foo.h>". * * Revision 8.1  1998/02/25 04:50:04  sra * Update copyrights. * * Revision 8.0  1997/11/18 00:56:15  sar * Updated revision to 8.0 * * Revision 7.2  1997/03/20 06:50:24  sra * DFARS-safe copyright text.  Zap! * * Revision 7.1  1997/02/25 10:49:26  sra * Update copyright notice, dust under the bed. * * Revision 7.0  1996/03/15 22:21:24  sar * Updated revision to 7.0 and copyright to 96 * * Revision 6.0  1995/05/31  21:50:54  sra * Release 6.0. * * Revision 1.1  1995/03/08  23:08:05  sar * Initial revision * * *//* [clearcase]modification history-------------------01b,18apr05,job  update copyright notices01a,24nov03,job  update copyright information*/#include <wrn/wm/snmp/engine/asn1conf.h>#include <wrn/wm/snmp/engine/ui64.h>#include <wrn/wm/snmp/engine/snmpdefs.h>#include <wrn/wm/snmp/engine/snmp.h>#include <wrn/wm/snmp/engine/auxfuncs.h>/* Routine to clean up the space allocated by the uint 64 test routine */void  ui64_async_cleanup(PTR_T value){SNMP_memory_free(((VB_T *)value)->vb_priv);return;}/* Undo the set, restore the information we saved to the vb_priv pointer   during the test phase back to the cookie pointer */void  ui64_async_undo(OIDC_T	 lastmatch,		  int		 tcount,		  OIDC_T	*tlist,		  SNMP_PKT_T	*pktp,		  VB_T		*vbp){UI64_Copy((UINT_64_T *)(VB_TO_COOKIE(vbp)), (UINT_64_T *)vbp->vb_priv);SNMP_memory_free(vbp->vb_priv);vbp->vb_free_priv = 0;undoproc_good(pktp, vbp);return;}/* Attempt to allocate space to save the current value in case an undo   is required */void  ui64_async_test(OIDC_T	 lastmatch,		  int		 tcount,		  OIDC_T	*tlist,		  SNMP_PKT_T	*pktp,		  VB_T		*vbp){UINT_64_T *value;if ((value = (UINT_64_T *)SNMP_memory_alloc(sizeof(UINT_64_T))) == 0) {    testproc_error(pktp, vbp, RESOURCE_UNAVAILABLE);    return;    }UI64_Copy(value, (UINT_64_T *)(VB_TO_COOKIE(vbp)));vbp->vb_priv = (PTR_T)value;vbp->vb_free_priv = ui64_async_cleanup;undoproc_set(pktp, vbp, ui64_async_undo);testproc_good(pktp, vbp);return;}/* Set 64-bit unsigned integer referenced by cookie. */void  ui64_async_set(OIDC_T		 lastmatch,		 int		 tcount,		 OIDC_T		*tlist,		 SNMP_PKT_T	*pktp,		 VB_T		*vbp){UI64_Copy((UINT_64_T *)(VB_TO_COOKIE(vbp)), VB_GET_UINT64(vbp));setproc_good(pktp, vbp);return;}

⌨️ 快捷键说明

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