📄 getpdu.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 1988-1997 Epilogue Technology Corporation. * Copyright 1998 Integrated Systems, Inc. * All rights reserved. *//* * $Log: getpdu.c,v $ * Revision 1.4 2003/01/15 14:05:04 josh * directory structure shifting * * Revision 1.3 2001/11/06 21:50:47 josh * second (and hopefully final) pass of new path hacking * * Revision 1.2 2001/11/06 21:20:13 josh * revised new path hacking * * Revision 1.1.1.1 2001/11/05 17:47:42 tneale * Tornado shuffle * * Revision 9.2.4.1 2001/08/07 21:53:31 meister * reworked to use dynamic component configuration macros, to allow * separate vxworks agentx components * * Revision 9.2 2001/01/19 22:22:21 paul * Update copyright. * * Revision 9.1 2000/03/17 00:19:06 meister * Update copyright message * * Revision 9.0 1998/10/16 22:11:30 sar * Update version stamp to match release * * Revision 8.7 1998/06/16 05:25:00 sar * clean up some type stuff, some calls to send error * * Revision 8.6 1998/06/08 22:05:25 sar * Tidied up some v3 error returns, notably authorization error * * Revision 8.5 1998/06/05 18:53:13 sra * "#include <foo.h>" => "#include <envoy/h/foo.h>". * * Revision 8.4 1998/05/29 04:31:14 sar * Add and use defines for v2 types and v2 protocol pieces. This allows * us to include the types and pieces for other versions, such as v3, * without having to touch all of the seperate files that use the * types or pieces. * * Revision 8.3 1998/05/24 04:44:05 sar * Added a call to find the view family, in nextpdu also modified the view_check * call to be view_family_check * * Revision 8.2 1998/02/25 15:21:30 sra * Finish moving types.h, bug.h, and bugdef.h to common/h/. * * Revision 8.1 1998/02/25 04:51:50 sra * Update copyrights. * * Revision 8.0 1997/11/18 00:56:49 sar * Updated revision to 8.0 * * Revision 7.4 1997/10/22 03:10:21 sar * Modified the installation options for agentx and the older sub agent scheme * * Also moved the allocation of the locks into envoy_init (env_init.c), * so they can be initialized if necessary. * * Revision 7.3 1997/10/16 00:45:53 sar * Updated for agentx support, with most of the work in mibutils.c to deal * with interior leaves and the pdu processors to deal with agentx leaves, * especially their reference counts. * * Add a bug macro into the get_{read write}_lock calls to give the user * a chance if things start going wrong. * * Fixed a potential problem int the proxy code where we were trying to * stuff a 32 bit quantity into a pointer which may or may not work depending * on the platform. * * Revision 7.2 1997/03/20 06:48:56 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/18 20:01:11 sar * Updated revision to 7.0 and copyright to 96 * * Revision 6.1 1995/11/01 00:46:48 sar * Added a default option in the version case statement to allow * new versions such as usec to be added without touching getpdu * * Revision 6.0 1995/05/31 21:47:24 sra * Release 6.0. * * Revision 5.3 1995/03/21 00:25:01 sar * Basically rewritten to use the new async apis. * * Revision 5.2 1994/09/29 18:37:21 sar * If we aren't using the v2 types remove the code to handle them mostly * this means ifdef the code. In mibutils.c and snmp_d.c we need to * examine the version of the packet in some cases to reject v2 types for * a v1 packet when both v1 and v2 are installed. * * Revision 5.1 1994/06/17 21:00:45 sar * After we are done with the incoming error-status and error_index * set them to 0 so we can use it for error replies from gets. * * Revision 5.0 1994/05/16 15:42:42 sar * Updated revision to 5.0 and copyright to include 1994 * * Revision 4.6 1994/05/12 17:16:29 sar * in call_the_get_routine, for get routines that return pointers check * to see if the pointer is 0 in which case we zero the object value. * * Revision 4.5 1994/05/04 22:45:43 sar * Added code to allow a failure during the getproc. This shouldn't be * used in general. * * Revision 4.4 1994/04/29 21:19:45 sar * Added some ifdefs for the sub agent scheme which required moving some * code around, modified the call to find_object_node and get_ui64. * * Revision 4.3 1994/01/25 20:46:16 sar * SNMPv2 requires a too big error return to have the var binds removed * we were not doing this. * * Revision 4.2 1993/11/11 22:00:51 sar * Increment the no such name counter when generating a no such error * the testproc failed. * * Revision 4.1 1993/09/30 20:28:23 sar * Added some size testing at the start of the routine to catch packets taht * will be too large for get bulk and silent drop them, also modified get * bulk to return no var bind packets if size so dictates. Modified the * code to decide the non repeaters and max reps in the face of different * word sizes and such. * * Revision 4.0 1993/06/24 15:45:46 sar * Updated revision to 4.0 and copyright to 93 * * Revision 3.18 1993/06/17 23:33:44 sar * removed the ENVOY_ from the UI64 routines. * * Revision 3.17 1993/06/07 18:26:04 sar * Modified call to get a 64 bit unsigned int. * * Revision 3.16 1993/06/02 23:09:24 dab * Changed #ifdef's to #if's for things from install.h * * Revision 3.15 1993/05/24 20:38:20 sar * Moved the use of vblp to be inside the ifdef v2 areas so we won't * get any compiler warnings about not using it. * * Revision 3.14 1993/05/19 20:25:22 sar * Tidied up types to make compilers happy (mostly int to ALENGTH_T). * * Revision 3.13 1993/05/14 19:02:36 sar * Mad maxreps and reps int_32_T and nonreps a size_t to avoid compileer * warnings. * * Revision 3.12 1993/05/03 17:16:12 sar * Added routines for local time, removed {party context} oids from packet * structure, added asn1len to {party context} structures and * SNMP_{Party Context}_Name where needed to lookup the name for a given * {Party Context}. * * Revision 3.11 1993/04/28 22:02:29 sar * moved the def of UINT_64_T and added some new types to the routines. * * Revision 3.10 1993/04/23 23:31:53 sar * In getbulk processing added check to see if all of the varbinds are at end of * mib. * * Revision 3.9 1993/04/22 20:06:36 sar * Much updating of macros and install options, mostly we now use * ISNTALL_ENVOY_SNMP_VERSION_1 or _2, VERSION_RFCXXXX is now SNMP_VERSION_2 * and other similiar items. * * Revision 3.8 1993/04/20 19:54:59 sar * Added code to handle adding new auth and priv routines, and cleaned up * the party set code and a padding argument in the priv structure. * * Revision 3.7 1993/04/19 18:28:34 sar * cleanup, mostly some correcting some non-ansi misspellings and adding * static defs. * * Revision 3.6 1993/03/24 01:01:40 sar * added a check on the non repeaters to make sure that we don't go off the * end of the vb list if non repeaters > count of var binds. * * Revision 3.5 1993/03/05 03:58:02 dab * fixed up types * * Revision 3.4 1993/03/01 20:52:16 sar * moved some definitions to allow clean version 1 compiles. * * Revision 3.3 1993/03/01 17:13:33 dab * Changed varialbe named index so it doesn't shadow index() routine * that some systems have. * * Revision 3.2 1993/02/24 01:02:41 sar * Changed many call to use OIDC_T/lenght pairs instead of OBJ_ID_T as now * we don't need to specifically allocate the OBJ_ID_T. * Removed the name objid from the PARTYLEAF_T as the name may be determined from * the tree itself. For efficiency purposes put the dest/src party names into * the pkt so we don't have to look them up frequently. * * Revision 3.1 1993/02/17 21:02:56 sar * Update stat keeping for v1 and v2 (or both or neither). * Added build_error_packet which create an error packet and does some * v2 size checking. * Updated Process_SNMP_GetClass_Pdu to handle the getbulk case. * (The other cases are treated as special cases of the getbulk case.) * Added VT_UINTEGER32 value case to the get area. * * Revision 3.0 92/04/03 19:52:37 dab * Release 3.0 * * Revision 2.108 92/02/24 11:11:51 dab * Don't do an extra copy on dynamic returns from get_oid. * * Revision 2.107 92/02/24 10:57:37 dab * In call_the_get_function, added the dynamic argument to get_oid and * the addr argument to get_ip_address. * * Revision 2.106 92/01/30 14:02:43 dab * Fixed up calls to getprocs so they had the proper procedure prototypes * including parameters for those compilers that care. * * Revision 2.105 91/10/30 20:41:59 dab * Directly include asn1conf.h, snmpdefs.h, and snmpstat.h (if needed). * * Revision 2.104 91/09/20 11:17:09 dab
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -