📄 rowloose.c
字号:
/* rowloose.c - rowloose.c routines *//* * 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: rowloose.c,v $ * Revision 1.2 2001/11/06 21:20:21 josh * revised new path hacking * * Revision 1.1.1.1 2001/11/05 17:47:40 tneale * Tornado shuffle * * Revision 9.3 2001/01/19 22:21:58 paul * Update copyright. * * Revision 9.2 2000/03/17 00:17:43 meister * Update copyright message * * Revision 9.1 1999/05/24 20:12:06 josh * 'compc' and 'compl' have been replaced by 'tcount' and 'tlist' * to avoid C++ compiler errors. * * Revision 9.0 1998/10/16 22:09:41 sar * Update version stamp to match release * * Revision 8.2 1998/06/05 18:52:58 sra * "#include <foo.h>" => "#include <envoy/h/foo.h>". * * Revision 8.1 1998/02/25 04:50:00 sra * Update copyrights. * * Revision 8.0 1997/11/18 00:56:14 sar * Updated revision to 8.0 * * Revision 7.2 1997/03/20 06:50:21 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:53 sra * Release 6.0. * * Revision 5.1 1995/03/16 21:13:45 sar * Modified internal calls to use a var bind pointer instead of an index. * * 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 1.6 1993/05/14 15:19:18 sar * added header and log to the file. * *//* [clearcase]modification history-------------------01d,12may05,job fix apigen comments01c,18apr05,job update copyright notices01b,23feb05,job apigen for documented APIs01a,24nov03,job update copyright information*//*DESCRIPTIONThis library contains rowloose.c routines.INCLUDE FILES: snmp.h, auxfuncs.h*/#include <wrn/wm/snmp/engine/asn1conf.h>#include <wrn/wm/snmp/engine/asn1.h>#include <wrn/wm/snmp/engine/snmpdefs.h>#include <wrn/wm/snmp/engine/snmp.h>#include <wrn/wm/snmp/engine/auxfuncs.h>/********************************************************************************* vb_extract_row_loose - group similar VarBinds in several packets to create a table row* SYNOPSIS** \cs* VB_T * vb_extract_row_loose * ( * SNMP_PKT_T * pktp, * int index, * MIBLEAF_T ** leaves, * int tcount, * OIDC_T * tlist * )* \ce** DESCRIPTION** This routine implements a type of row create sets known as dribble creates. * In this situation, the management station splits the creation of a new table * entry into multiple packets. Unlike vb_extract_row(), vb_extract_row_loose() * does not guarantee that a specific item is in a packet. Starting at <index>, * this routine searched the 'VarBinds' in a packet for any 'VarBinds' that * match the MIB leaf pointer specified in the <leaves> array and instance * specified by <tcount> and <tlist>. It links all the 'VarBinds' that match * this criteria.* This routine does not set any flags in the 'VarBinds'. Your calling routine * must set the tested or set flags. For an example of how this routine is used, * see 'viewmth.c'.** \&NOTE: This routine is obsolete and maintained for backward compatibility. * Use group_by_getproc_and_instance() for new applications.** PARAMETERS* \is* \i <*pktp>* Specify an SNMP packet.* \i <index>* Specify the first 'VarBind'.* \i <**leaves>* Specify the MIB leaf pointer array.* \i <tcount>* Specify the component count of the object identifier of the 'VarBind'.* \i <*tlist>* Specify the components of the object identifier of the 'VarBind'.* \ie** RETURNS: If successful, this routine returns the first 'VarBind' in the first * packet that matches the criteria. If this routine does not find a matching * 'VarBind', it returns 0.** ERRNO: N/A** SEE ALSO: group_by_getproc_and_instance(), vb_extract_row()*/VB_T * vb_extract_row_loose(SNMP_PKT_T *pktp, int indx, MIBLEAF_T **leaves, int tcount, OIDC_T *tlist){VB_T *vbp, *startvbp = 0;for(; *leaves != 0; leaves++) { vbp = index_to_vbp(pktp, indx); while((vbp = scan_for_leaf_and_match(pktp, vbp, *leaves, tcount, tlist)) != 0) { vbp->vb_link = startvbp; startvbp = vbp; vbp++; } }return(startvbp);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -