old_api.h
上传用户:wxp200602
上传日期:2007-10-30
资源大小:4028k
文件大小:1k
源码类别:

SNMP编程

开发平台:

Unix_Linux

  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.                                          struct variable *var,
  23.                                          size_t varsize,
  24.                                          size_t numvars,
  25.                                          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 */