Logo
Home page Net-SNMP

Archive Search:

Require all words?

Site Search:
Google
Main Page | Modules | Data Structures | File List | Data Fields | Related Pages | Examples

stash_cache: automatically caches data for certain handlers.
[Net-SNMP Agent handler and extensibility API]

This handler caches data in an optimized way which may aleviate the need for the lower level handlers to perform as much optimization. More...

Functions

netsnmp_stash_cache_info *  netsnmp_get_new_stash_cache (void)
netsnmp_mib_handler netsnmp_get_timed_bare_stash_cache_handler (int timeout, oid *rootoid, size_t rootoid_len)
  returns a stash_cache handler that can be injected into a given handler chain (with the specified timeout and root OID values), but *only* if that handler chain explicitly supports stash cache processing.
netsnmp_mib_handler netsnmp_get_bare_stash_cache_handler (void)
  returns a single stash_cache handler that can be injected into a given handler chain (with a fixed timeout), but *only* if that handler chain explicitly supports stash cache processing.
netsnmp_mib_handler netsnmp_get_stash_cache_handler (void)
  returns a stash_cache handler sub-chain that can be injected into a given (arbitrary) handler chain, using a fixed cache timeout.
netsnmp_mib_handler netsnmp_get_timed_stash_cache_handler (int timeout, oid *rootoid, size_t rootoid_len)
  returns a stash_cache handler sub-chain that can be injected into a given (arbitrary) handler chain, using a configurable cache timeout.
netsnmp_oid_stash_node **  netsnmp_extract_stash_cache (netsnmp_agent_request_info *reqinfo)
  extracts a pointer to the stash_cache info from the reqinfo structure.
int  netsnmp_stash_cache_helper (netsnmp_mib_handler *handler, netsnmp_handler_registration *reginfo, netsnmp_agent_request_info *reqinfo, netsnmp_request_info *requests)
int  _netsnmp_stash_cache_load (netsnmp_cache *cache, void *magic)
  updates a given cache depending on whether it needs to or not.
void  _netsnmp_stash_cache_free (netsnmp_cache *cache, void *magic)
void  netsnmp_init_stash_cache_helper (void)
  initializes the stash_cache helper which then registers a stash_cache handler as a run-time injectable handler for configuration file use.

Detailed Description

This handler caches data in an optimized way which may aleviate the need for the lower level handlers to perform as much optimization.

Specifically, somewhere in the lower level handlers must be a handler that supports the MODE_GET_STASH operation. Note that the table_iterator helper supports this.


Function Documentation

int _netsnmp_stash_cache_load netsnmp_cache *  cache,
void *  magic
 

updates a given cache depending on whether it needs to or not.

Definition at line 188 of file stash_cache.c.

References netsnmp_agent_request_info_s::mode, netsnmp_call_next_handler(), netsnmp_create_data_list(), netsnmp_handler_registration, netsnmp_mib_handler, and netsnmp_mib_handler_s::next.

netsnmp_oid_stash_node** netsnmp_extract_stash_cache netsnmp_agent_request_info reqinfo  ) 
 

extracts a pointer to the stash_cache info from the reqinfo structure.

Definition at line 110 of file stash_cache.c.

netsnmp_mib_handler* netsnmp_get_bare_stash_cache_handler void   ) 
 

returns a single stash_cache handler that can be injected into a given handler chain (with a fixed timeout), but *only* if that handler chain explicitly supports stash cache processing.

Definition at line 76 of file stash_cache.c.

References netsnmp_get_timed_bare_stash_cache_handler().

Referenced by netsnmp_get_stash_cache_handler().

netsnmp_mib_handler* netsnmp_get_stash_cache_handler void   ) 
 

returns a stash_cache handler sub-chain that can be injected into a given (arbitrary) handler chain, using a fixed cache timeout.

Definition at line 85 of file stash_cache.c.

References netsnmp_get_bare_stash_cache_handler(), netsnmp_get_stash_to_next_handler(), netsnmp_mib_handler, and netsnmp_mib_handler_s::next.

Referenced by netsnmp_init_stash_cache_helper().

netsnmp_mib_handler* netsnmp_get_timed_bare_stash_cache_handler int  timeout,
oid *  rootoid,
size_t  rootoid_len
 

returns a stash_cache handler that can be injected into a given handler chain (with the specified timeout and root OID values), but *only* if that handler chain explicitly supports stash cache processing.

Definition at line 43 of file stash_cache.c.

References netsnmp_mib_handler_s::myvoid, netsnmp_cache_create(), netsnmp_cache_handler_get(), netsnmp_create_handler(), netsnmp_mib_handler, and netsnmp_mib_handler_s::next.

Referenced by netsnmp_get_bare_stash_cache_handler(), and netsnmp_get_timed_stash_cache_handler().

netsnmp_mib_handler* netsnmp_get_timed_stash_cache_handler int  timeout,
oid *  rootoid,
size_t  rootoid_len
 

returns a stash_cache handler sub-chain that can be injected into a given (arbitrary) handler chain, using a configurable cache timeout.

Definition at line 98 of file stash_cache.c.

References netsnmp_get_stash_to_next_handler(), netsnmp_get_timed_bare_stash_cache_handler(), netsnmp_mib_handler, and netsnmp_mib_handler_s::next.

void netsnmp_init_stash_cache_helper void   ) 
 

initializes the stash_cache helper which then registers a stash_cache handler as a run-time injectable handler for configuration file use.

Definition at line 231 of file stash_cache.c.

References netsnmp_get_stash_cache_handler(), and netsnmp_register_handler_by_name().

Referenced by netsnmp_init_helpers().


Generated on Fri Dec 30 13:48:00 2005 for net-snmp by  doxygen 1.3.9.1

Valid CSS!


Last modified: Thursday, 01-Mar-2007 16:20:08 PST
For questions regarding web content and site functionality, please write to the net-snmp-users mail list.