stash_cache.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef STASH_CACHE_H
  2. #define STASH_CACHE_H
  3. #include <net-snmp/library/oid_stash.h>
  4. #include <net-snmp/library/tools.h>
  5. #define STASH_CACHE_NAME "stash_cache"
  6. typedef struct netsnmp_stash_cache_info_s {
  7. int cache_valid;
  8. marker_t cache_time;
  9. netsnmp_oid_stash_node *cache;
  10. int cache_length;
  11. } netsnmp_stash_cache_info;
  12. typedef struct netsnmp_stash_cache_data_s {
  13. void *data;
  14. size_t data_len;
  15. u_char data_type;
  16. } netsnmp_stash_cache_data;
  17. /* function prototypes */
  18. void netsnmp_init_stash_cache_helper(void);
  19. netsnmp_mib_handler *netsnmp_get_bare_stash_cache_handler(void);
  20. netsnmp_mib_handler *netsnmp_get_stash_cache_handler(void);
  21. netsnmp_mib_handler *netsnmp_get_timed_bare_stash_cache_handler(int timeout,
  22. oid *rootoid, size_t rootoid_len);
  23. netsnmp_mib_handler *netsnmp_get_timed_stash_cache_handler(int timeout,
  24. oid *rootoid, size_t rootoid_len);
  25. Netsnmp_Node_Handler netsnmp_stash_cache_helper;
  26. netsnmp_oid_stash_node **netsnmp_extract_stash_cache(netsnmp_agent_request_info *reqinfo);
  27. 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);
  28. #endif /* STASH_CACHE_H */