struct.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #ifndef UCD_SNMP_STRUCT
  2. #define UCD_SNMP_STRUCT
  3. #define STRMAX 1024
  4. #define SHPROC 1
  5. #define EXECPROC 2
  6. #define PASSTHRU 3
  7. #define PASSTHRU_PERSIST 4
  8. #define MIBMAX 30
  9. struct extensible {
  10. char name[STRMAX];
  11. char *command;
  12. char fixcmd[STRMAX];
  13. int type;
  14. int result;
  15. char output[STRMAX];
  16. struct extensible *next;
  17. oid miboid[MIBMAX];
  18. size_t miblen;
  19. int mibpriority;
  20. netsnmp_pid_t pid;
  21. #if defined(WIN32)
  22. HANDLE tid; /* WIN32 thread */
  23. #endif
  24. #ifdef USING_SINGLE_COMMON_PASSPERSIST_INSTANCE
  25. struct extensible *passpersist_inst;
  26. #endif /* USING_SINGLE_COMMON_PASSPERSIST_INSTANCE */
  27. };
  28. struct myproc {
  29. char name[STRMAX];
  30. #ifdef HAVE_PCRE_H
  31. netsnmp_regex_ptr regexp;
  32. #endif
  33. char fixcmd[STRMAX];
  34. int min;
  35. int max;
  36. struct myproc *next;
  37. };
  38. /*
  39. * struct mibinfo
  40. * {
  41. * int numid;
  42. * unsigned long mibid[10];
  43. * char *name;
  44. * void (*handle) ();
  45. * };
  46. */
  47. #endif