You can use the SnmpTfx framework to bypass the need to write the intermediate-level code between the Get-PDU and Set-PDU for individual SNMP variables and the core SNMP master-agent code.
To implement the SnmpTfx framework
Create a master structure that defines all of the AsnAny variables that are used in the MIB to generate the access/set buffers for extension-agent MIB actions.
Define the necessary gb_ and sb_ variables, so that they correspond to the master structure.
Because the master agent is single-threaded with respect to manager requests, the sb_ and gb_ variables can share the same buffer.
Define Get and Set operations for all of the variables, and define gf**_** and sf**_** symbols for all of the extension-agent MIB variables that require Get and Set operations.
When designing the structure of the extension agent, you should define only one or two functions, and then use #define statements. This way, you can ensure that all of the MIB variable Get and Set operations use the same functions.
Define all of the OIDs for the MIB variables and tables in the extension agent, and define the root OID of the extension agent.
Lay out the SnmpMibEntry array in the order of the MIB definition for the extension agent.
The entries in this array consist of MIB_variable_type_xx(), MIB_TABLE_ROOT(), and MIB_TABLE_ENTRY() macros, and must be terminated by using a MIB_END() macro.
Define the SnmpMibTable array.
Each entry consists of one MIB_TABLE() macro, which corresponds to one table in the extension-agent MIB.
Define the SnmpMibView structure by using the MIB_VIEW() macro.
Last updated on Friday, April 02, 2004
© 1992-2000 Microsoft Corporation. All rights reserved.