Partager via


SnmpTfx Framework

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

  1. 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.

  2. 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.

  3. 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.

  4. Define all of the OIDs for the MIB variables and tables in the extension agent, and define the root OID of the extension agent.

  5. 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.

  6. Define the SnmpMibTable array.

    Each entry consists of one MIB_TABLE macro, which corresponds to one table in the extension-agent MIB.

  7. Define the SnmpMibView structure by using the MIB_VIEW macro.

See Also

SnmpTfx API Functions | Extension-Agent Implementor APIs | Worker Callback Functions and Data | Simple Network Management Protocol

 Last updated on Saturday, April 10, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.