00001 #ifndef STASH_CACHE_H 00002 #define STASH_CACHE_H 00003 00004 #include <net-snmp/library/oid_stash.h> 00005 #include <net-snmp/library/tools.h> 00006 00007 #define STASH_CACHE_NAME "stash_cache" 00008 00009 typedef struct netsnmp_stash_cache_info_s { 00010 int cache_valid; 00011 marker_t cache_time; 00012 netsnmp_oid_stash_node *cache; 00013 int cache_length; 00014 } netsnmp_stash_cache_info; 00015 00016 typedef struct netsnmp_stash_cache_data_s { 00017 void *data; 00018 size_t data_len; 00019 u_char data_type; 00020 } netsnmp_stash_cache_data; 00021 00022 /* function prototypes */ 00023 netsnmp_mib_handler *netsnmp_get_bare_stash_cache_handler(void); 00024 netsnmp_mib_handler *netsnmp_get_stash_cache_handler(void); 00025 netsnmp_mib_handler *netsnmp_get_timed_bare_stash_cache_handler(int timeout, 00026 oid *rootoid, size_t rootoid_len); 00027 netsnmp_mib_handler *netsnmp_get_timed_stash_cache_handler(int timeout, 00028 oid *rootoid, size_t rootoid_len); 00029 Netsnmp_Node_Handler netsnmp_stash_cache_helper; 00030 netsnmp_oid_stash_node **netsnmp_extract_stash_cache(netsnmp_agent_request_info *reqinfo); 00031 int netsnmp_stash_cache_update(netsnmp_mib_handler *handler, netsnmp_handler_registration *reginfo, netsnmp_agent_request_info *reqinfo, netsnmp_request_info *requests, netsnmp_stash_cache_info *cinfo); 00032 00033 00034 #endif /* STASH_CACHE_H */