Difference between revisions of "Agent Helpers"

From Net-SNMP Wiki
Jump to: navigation, search
(added descriptions)
 
(2 intermediate revisions by the same user not shown)
Line 32: Line 32:
 
| [[serialize]]
 
| [[serialize]]
 
| Calls sub handlers one request at a time.
 
| Calls sub handlers one request at a time.
 
  
 
|-
 
|-
Line 94: Line 93:
 
|-
 
|-
 
| [[cache_handler]]
 
| [[cache_handler]]
|  
+
| Helps build and auto-refresh a cache of date based on a timer
  
 
|-
 
|-
Line 122: Line 121:
 
|-
 
|-
 
| [[null]]
 
| [[null]]
|  
+
| The null helper doesn't provide any values, all requests are answered with NOSUCHVALUE
  
 
|-
 
|-

Latest revision as of 15:03, 14 July 2011

Net-SNMP Agent Helpers

The Net-SNMP agent library provides several special purpose Handlers to reduce the work needed to implement a MIB module. See the Agent Architecture documentation for details on how the handler system is implemented within the Net-SNMP Agent. The FAQ item "What's the difference between the various mib2c configuration files?" gives an overview of the major mib2c-related helpers. The the doxygen generated documentation for the helpers are also useful documents]

Here is a list of all current helpers, by file name as found in agent/helpers/, organized by type:

Handler call flow
baby_steps Calls your handler in baby_steps for set processing.
bulk_to_next Convert GETBULK requests into GETNEXT requests for the handler.
mode_end_call At the end of a series of requests, call another handler hook.
multiplexer Splits mode requests into calls to different handlers.
row_merge Calls sub handlers with request for one row at a time.
serialize Calls sub handlers one request at a time.
Scalar related
instance Process individual MIB instances easily.
scalar Process scalars easily.
scalar_group Process groups of scalars.
Table related
row_merge Calls sub handlers with request for one row at a time.
table Helps you implement a table.
table_container Helps you implement a table when data can be found via a netsnmp_container.
table_data Helps you implement a table with datamatted storage.
table_dataset Helps you implement a table with automatted storage.
table_generic General requirements for a table helper.
table_iterator The table iterator helper is designed to simplify the task of writing a table handler for the net-snmp agent when the data being accessed is not in an oid sorted form and must be accessed externally.
table_row Helps you implement a table shared across two or more subagents, or otherwise split into individual row slices.
table_tdata Implement a table with datamatted storage.


Data caching
cache_handler Helps build and auto-refresh a cache of date based on a timer
stash_cache Automatically caches data for certain handlers.
stash_to_next Convert GET_STASH requests into GETNEXT requests for the handler.


Miscellaneous
debug_handler Print out debugging information about the handler chain being called.
old_api Calls mib module code written in the old style of code.
read_only Make your handler read_only automatically The only purpose of this handler is to return an appropriate error for any requests passed to it in a SET mode.
null The null helper doesn't provide any values, all requests are answered with NOSUCHVALUE
watcher Watch a specified variable and process it as an instance or scalar object.
Deprecated/Legacy Helpers
table_array