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

📄 scan_loc.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 1991-1997 Epilogue Technology Corporation. *  Copyright 1998 Integrated Systems, Inc. *  All rights reserved. *//* * $Log: scan_loc.c,v $ * Revision 1.2  2001/11/06 21:20:27  josh * revised new path hacking * * Revision 1.1.1.1  2001/11/05 17:47:40  tneale * Tornado shuffle * * Revision 9.2  2001/01/19 22:21:59  paul * Update copyright. * * Revision 9.1  2000/03/17 00:17:45  meister * Update copyright message * * Revision 9.0  1998/10/16 22:09:48  sar * Update version stamp to match release * * Revision 8.2  1998/06/05 18:53:00  sra * "#include <foo.h>" => "#include <envoy/h/foo.h>". * * Revision 8.1  1998/02/25 04:50:09  sra * Update copyrights. * * Revision 8.0  1997/11/18 00:56:16  sar * Updated revision to 8.0 * * Revision 7.2  1997/03/20 06:50:26  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.1  1996/01/05  19:02:18  sar * Removed no_pp style definitions as well as unnecessary include files * * Revision 6.0  1995/05/31  21:50:55  sra * Release 6.0. * * Revision 5.0  1994/05/16  15:29:57  sar * Updated revision to 5.0 and copyright to 1994 * * Revision 4.0  1993/06/24  15:58:43  sar * Updated rev to 4.0 and copyright to 93 * * Revision 3.2  1993/06/02  23:07:24  dab * Changed #ifdef's to #if's for things from install.h * * Revision 3.1  1993/04/26  20:22:55  sar * Added ifdefs to allow clean version 1 or version 2 makes. * * Revision 3.0  1992/04/03  19:53:01  dab * Release 3.0 * * Revision 1.2  91/10/30  20:38:41  dab * Directly include asn1conf.h and snmpdefs.h. *  * Revision 1.1  91/10/24  11:09:05  dab * 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/asn1.h>#include <wrn/wm/snmp/engine/localio.h>#include <wrn/wm/snmp/engine/buffer.h>#include <wrn/wm/snmp/engine/decode.h>#include <wrn/wm/snmp/engine/snmpdefs.h>#include <wrn/wm/snmp/engine/snmp.h>#include <wrn/wm/snmp/engine/mib.h>#include <wrn/wm/snmp/engine/auxfuncs.h>/****************************************************************************NAME:  scan_vb_for_locatorPURPOSE:  scan the VB list of a packet structure looking for a particular	  locator value.PARAMETERS:	  SNMP_PKT_T *	The whole received packet.	  int		The index of the VB_T where to start the search			(0 is the index of the first VB_T).	  UINT_16_T	The desired locator.RETURNS:  int		The index in the varBindList of the VB_T which			references the MIB leaf with the specified locator.			-1 if none are found.CAVEAT: It is assumed that the vb_ml field of the various VB_Ts has been	already set and has valid contents.NOTE: It is possible for a VB list to have more VB_Ts whichreference the same MIB leaf.****************************************************************************/intscan_vb_for_locator(SNMP_PKT_T *	pktp,		    int			vb_index,		    UINT_16_T		loc){  VB_T *	vbp;  VBL_T *	vblp;  #if INSTALL_ENVOY_SNMP_VERSION_1  if (pktp->pdu_type == TRAP_PDU)    vblp = &(pktp->pdu.trap_pdu.trap_vbl);    else#endif    vblp = &(pktp->pdu.std_pdu.std_vbl);  for (vbp = &(vblp->vblist[vb_index]);       vb_index < vblp->vbl_count;       vb_index++,  vbp++) {    if ((vbp->vb_ml.ml_leaf)->locator == loc)      return vb_index;  }    return -1;	/* Not found */}

⌨️ 快捷键说明

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