eSNMP API Routines
*_set Routine
•ESNMP_ACT_UNDO
For each conceptual row that was successfully committed, the same method routine is called with
The method routine should attempt to restore conditions to what they were before it executed the COMMIT phase. (This is typically done using the data pointed to by the
If successful, return ESNMP_MTHD_noError; otherwise, return ESNMP_ MTHD_undoFail.
•ESNMP_ACT_CLEANUP
Regardless of what else has happened, at this point each ROW_CONTEXT participates in cleanup phase. The same method routine that was called for in the COMMIT phase is called with
ESNMP_ACT_CLEANUP.
This indicates the end of processing for the set request. The method routine should perform whatever cleanup is required; for instance, freeing dynamic memory that might have been allocated and stored in
The function return status value is ignored for the CLEANUP phase.
5.2.2Method Routine Applications Programming
You must write the code for the method routines declared in the subtree_TBL.H file. Each method routine has one argument, which is a pointer to the METHOD structure, as follows:
int mib_group_get(
METHOD *method int mib_group_set(
METHOD *method );
The Get method routines are used to perform Get, GetNext, and GetBulk operations.
The Get method routines perform the following tasks:
•Extract the instance portion of the requested OID. You can do this manually by comparing the
the
•Determine the instance validity. The instance OID can be null or any length, depending on what was requested and how your object was selected. You may be able to reject the request immediately by checking on the instance OID.
•Extract the data. Based on the instance OID and