eSNMP API Routines esnmp_register2
esnmp_register2
Requests registration of a single MIB subtree. This indicates to the master agent that the subagent instantiates MIB variables within the registered MIB subtree. The esnmp_register2 routine offers extensions to the esnmp_register routine.
Format
int esnmp_register2 ( ESNMP_REG *reg ) ;
Arguments
reg
A pointer to an ESNMP_REG structure that contains the following fields:
Field Name | Description |
|
|
subtree | A pointer to a subtree structure corresponding to the |
| MIB subtree to be handled. The subtree structures |
| are externally declared and initialized in the code |
| emitted by the MIBCOMP command (subtree_TBL.C |
| and subtree_TBL.H, where subtree is the name of the |
| MIB subtree). This code is taken directly from the MIB |
| document. |
| All memory pointed to by this field must have |
| permanent storage since it is referenced by libesnmp |
| for the duration of the program. You should use the |
| data declarations emitted by the MIBCOMP command. |
priority | The registration priority. The entry with the largest |
| number has the highest priority. The range is 1 to 255. |
| The subagent that has registered a MIB subtree with |
| the highest priority over a range of object identifiers |
| gets all requests for that range of OIDs. |
| MIB subtrees that are registered with the same |
| priority are considered duplicates, and the registration |
| is rejected by the master agent. |
| The priority field is a mechanism for cooperating |
| subagents to handle different configurations. |
timeout | The number of seconds the master agent should wait |
| for responses when requesting data in this MIB |
| subtree. This value must be between zero and 300. |
| If the value is zero, the default timeout (3 seconds) |
| is used. You should use the default. For information |
| about modifying the default timeout value, refer to |
| Section 6.2. |
range_subid | An integer value that, when nonzero, together with |
| the range_upper_bound field specifies a range instead |
| of one of the MIB subtree’s OID subidentifiers. The |
| range_subid field specifies the OID subidentifier |
| modified by the range_upper_bound field. |
eSNMP API Routines