Method routines are sections of code which perform the actions specified by SNMP directives, such as retrieving or setting the value of a certain variable (a GET or SET routine, respectively).
The design of method routines must be based on the variables which the routines view and alter. mibcomp, the provided MIB compiler, can produce a "stub", a set of code which a designer can use as a starting point for creating method routines. For more information, see 6.3 Compile-time MIB Extensions, and A. The MIB Compiler User's Guide. Also see the section on m2Lib in the VxWorks Reference Manual.
Method routines can be written to behave asynchronously from the SNMP agent. In this case, the method routine spawns a task to complete the requested activities, and the method routine returns before the task completes. For more information, see 6.5 Asynchronous Method Routines.