net-snmp 5.7
|
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 void netsnmp_init_stash_cache_helper(void); 00024 netsnmp_mib_handler *netsnmp_get_bare_stash_cache_handler(void); 00025 netsnmp_mib_handler *netsnmp_get_stash_cache_handler(void); 00026 netsnmp_mib_handler *netsnmp_get_timed_bare_stash_cache_handler(int timeout, 00027 oid *rootoid, size_t rootoid_len); 00028 netsnmp_mib_handler *netsnmp_get_timed_stash_cache_handler(int timeout, 00029 oid *rootoid, size_t rootoid_len); 00030 Netsnmp_Node_Handler netsnmp_stash_cache_helper; 00031 netsnmp_oid_stash_node **netsnmp_extract_stash_cache(netsnmp_agent_request_info *reqinfo); 00032 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); 00033 00034 00035 #endif /* STASH_CACHE_H */