|
Overview |
|
|
|
Group |
|
|
|
Quick Info
Windows NT
| Yes
| Win95
| No
| Win32s
| No
| Import Library
| user-defined
| Header File
| -
| Unicode
| No
| Platform Notes
| None
|
|
|
SnmpExtensionQuery
The extensible agent calls the SnmpExtensionQuery function in the extension agent DLL to resolve SNMP requests that contain
variables within one or more of the extension agent's registered MIB subtrees.
BOOL SnmpExtensionQuery(
BYTE requestType,
|
| RFC1157VarBindList *variableBindings,
|
| AsnInteger *errorStatus,
|
| AsnInteger *errorIndex
|
| );
|
|
Parameters
requestType
[in] Specifies the SNMP request type. This parameter can be one of the
following values:
Value
| Meaning
| ASN_RFC1157_GETREQUEST
| Search and receive a value from a specified variable.
| ASN_RFC1157_GETNEXTREQUEST
| Search and receive a value from a variable without knowing the name of the
variable.
| ASN_RFC1157_SETREQUEST
| Store a value within a specific variable.
|
[in/out] Points to the variable bindings list.
errorStatus
[out] Points to a variable in which the error status result will be returned.
This parameter can be one of the following values:
Value
| Meaning
| SNMP_ERRORSTATUS_NOERROR
| The agent reports that no errors occurred during transmission.
| SNMP_ERRORSTATUS_TOOBIG
| The agent could not place the results of the requested operation into a single
SNMP message.
| SNMP_ERRORSTATUS_NOSUCHNAME
| The requested operation identified an unknown variable.
| SNMP_ERRORSTATUS_BADVALUE
| The requested operation tried to change a variable but it specified either a
syntax or value error.
| SNMP_ERRORSTATUS_READONLY
| The requested operation tried to change a variable that was not allowed to
change according to the community profile of the variable.
| SNMP_ERRORSTATUS_GENERR
| An error other than one of those listed here occurred during the requested
operation.
|
errorIndex
[out] Points to a variable in which the error index result will be returned.
Return Values
If the function succeeds, the return value is TRUE.
If the function fails, the return value is FALSE.
Remarks
When the extensible agent must resolve a Get, Get Next, or Set command within the subtree indicated by the SnmpExtensionInit function, it must call the SnmpExtensionQuery function. For Get or Set commands, the extension agent must follow the rules in RFC 1157 to either resolve the variable bindings request or generate an error.
A Get Next command is more complicated to process because the extension agent may not be
able to resolve the requested variable binding. If the variable binding can be
resolved, the extension agent must follow the rules in RFC 1157 to either
resolve the variable bindings request or generate an error. If the extension agent
cannot resolve the variable binding, it must change the name field of the RFC1157VarBind structure to the value following the MIB subtree value specified in the supportedView parameter of the SnmpExtensionInit function. For example, if the agent supports view ".1.3.6.1.4.1.77.1", a Get Next command on ".1.3.6.1.4.1.77.1.5.1" would result in a modified name field of ".1.3.6.1.4.1.77.2". This signals the extensible agent to continue
the attempt to resolve the variable bindings with other extension agents.
It is important to note that the extensible agent and the extension agent may
need to exchange dynamically allocated memory during a call to the SnmpExtensionQuery function. The extensible agent dynamically allocates the object identifier in
each RFC1157VarBind structure it passes to the extension agent. However, the extension agent must
release this memory in order to replace the object identifier when it
processes a Get Next request. The extension agent allocates dynamic memory for variable-length
object types. The extensible agent needs to release this memory after the object
is placed in the response.
In order to avoid heap corruption and memory leaks, both the extensible agent
and the extension agent must use memory allocation routines that resolve to the
same heap. Extension agents should use the SnmpUtilMemAlloc function to allocate memory and the SnmpUtilMemFree function to release memory. These functions are located in the utility
dynamic-link library SNMPAPI.DLL.
See Also
RFC1157VarBind, SnmpExtensionInit, SnmpUtilMemAlloc, SnmpUtilMemFree
| Last news from Greatis Software |
 |
|
Nostalgia .Net |
|
.Net is powerful, but not all-powerful, so sometimes we need to use Win32 API for our .Net applications. It's simple enough with Platform Invoke if you have Win32 skill, but we do not always have time to dig the ancient documentation, declare the special types that are compatible with Win32, find the values of the Win32's constants and so on. Nostalgia .Net offers several simple-to-use classes, and components that will allow you to forget about the headache of Win32 and just use the power of Win32 in your application the same way as you use the native. Net classes. More » |
| Recommended software for developers |
 |
|
Ultimate Pack |
|
Component pack for Delphi and C++ Builder that contains runtime form designer, runtime object inspector, print suite and much more for the very special price. More » |
 |
|
Form Designer .Net |
|
Unique runtime form design solution that allows to edit any form in .Net WinForms application at runtime with full source codes for only 300 euro! More » |
 |
|
Print Suite .Net |
|
Print Suite .Net is a set of components for easy printing texts, images and grids from your WinForms applications. Full C# source codes are available More » |
 |
|
Gradient Controls .Net |
|
Gradient Controls .Net offers controls with gradient background feature. Labels, panels and so on... Full C# source codes are available More » |
 |
|
Greatis iGrid |
|
iGrid plots drawing grid right over your desktop, so you can use it everywhere, with any drawing application without any special plugins for different graphic editors. More » |
All the contacts and projectsDmitry Vasiliev (just.dmitry)
Related LinksSoftware for Visual Studio .NET developers Software for Delphi and C++ Builder developers Software for Visual Basic 6 developers Delphi Tips&Tricks MegaDetailed.NET More Online Helps Win32 Programmer's Reference Win32 Multimedia Programmer's Reference OLE Programmer's Reference Microsoft Windows Pen API Programmer's Reference Microsoft Windows Sockets 2 Reference Microsoft Windows Telephony API (TAPI) Programmer's Reference Unix Manual Pages
|