old_api.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #ifndef OLD_API_H
  2. #define OLD_API_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #define OLD_API_NAME "old_api"
  7. typedef struct netsnmp_old_api_info_s {
  8. struct variable *var;
  9. size_t varsize;
  10. size_t numvars;
  11. /*
  12. * old stuff
  13. */
  14. netsnmp_session *ss;
  15. int flags;
  16. } netsnmp_old_api_info;
  17. typedef struct old_opi_cache_s {
  18. u_char *data;
  19. WriteMethod *write_method;
  20. } netsnmp_old_api_cache;
  21. int netsnmp_register_old_api(const char *moduleName,
  22. const struct variable *var,
  23. size_t varsize,
  24. size_t numvars,
  25. const oid * mibloc,
  26. size_t mibloclen,
  27. int priority,
  28. int range_subid,
  29. oid range_ubound,
  30. netsnmp_session * ss,
  31. const char *context,
  32. int timeout, int flags);
  33. Netsnmp_Node_Handler netsnmp_old_api_helper;
  34. /*
  35. * really shouldn't be used
  36. */
  37. netsnmp_agent_session *netsnmp_get_current_agent_session(void);
  38. #ifdef __cplusplus
  39. }
  40. #endif
  41. #endif /* OLD_API_H */