Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

100 lines
2.8 KiB

  1. /*++
  2. Copyright (c) 1992-1997 Microsoft Corporation
  3. Module Name:
  4. snmpmgmt.h
  5. Abstract:
  6. Contains the definitions of service management variables (as defined in RFC1213)
  7. Environment:
  8. User Mode - Win32
  9. Revision History:
  10. 30-Mar-1998 FlorinT
  11. --*/
  12. #ifndef _SNMPMIB_H
  13. #define _SNMPMIB_H
  14. #include <snmp.h>
  15. // defines the number of AsnCounters in the SNMP_MGMTVARS.AsnCounterPool[]
  16. #define NC_MAX_COUNT 27
  17. // indices in the SNMP_MGMTVARS.AsnCounterPool[]
  18. #define CsnmpInPkts 0
  19. #define CsnmpOutPkts 1
  20. #define CsnmpInBadVersions 2
  21. #define CsnmpInBadCommunityNames 3
  22. #define CsnmpInBadCommunityUses 4
  23. #define CsnmpInASNParseErrs 5
  24. #define CsnmpInTooBigs 6
  25. #define CsnmpInNoSuchNames 7
  26. #define CsnmpInBadValues 8
  27. #define CsnmpInReadOnlys 9
  28. #define CsnmpInGenErrs 10
  29. #define CsnmpInTotalReqVars 11
  30. #define CsnmpInTotalSetVars 12
  31. #define CsnmpInGetRequests 13
  32. #define CsnmpInGetNexts 14
  33. #define CsnmpInSetRequests 15
  34. #define CsnmpInGetResponses 16
  35. #define CsnmpInTraps 17
  36. #define CsnmpOutTooBigs 18
  37. #define CsnmpOutNoSuchNames 19
  38. #define CsnmpOutBadValues 20
  39. #define CsnmpOutGenErrs 21
  40. #define CsnmpOutGetRequests 22
  41. #define CsnmpOutGetNexts 23
  42. #define CsnmpOutSetRequests 24
  43. #define CsnmpOutGetResponses 25
  44. #define CsnmpOutTraps 26
  45. // defines the number of AsnIntegers in the SNMP_MGMTVARS.AsnIntegerPool[]
  46. #define NI_MAX_COUNT 2
  47. // indices in the SNMP_MGMTVARS.AsnIntegerPool[]
  48. #define IsnmpEnableAuthenTraps 0
  49. #define IsnmpNameResolutionRetries 1
  50. // defines the number of AsnObjects in the SNMP_MGMTVARS.AsnObjectIDs[]
  51. #define NO_MAX_COUNT 1
  52. // indices in the SNMP_MGMTVARS.AsnObjectIDs[]
  53. #define OsnmpSysObjectID 0
  54. // flag for mgmtUtilUpdate* functions
  55. #define IN_errStatus 0
  56. #define OUT_errStatus 1
  57. typedef struct _snmp_mgmtvars
  58. {
  59. AsnAny AsnCounterPool[NC_MAX_COUNT]; // storage place for management counters.
  60. AsnAny AsnIntegerPool[NI_MAX_COUNT]; // storage place for management integers.
  61. AsnAny AsnObjectIDs[NO_MAX_COUNT]; // storage place for management obj IDs.
  62. } SNMP_MGMTVARS, *PSNMP_MGMTVARS;
  63. extern SNMP_MGMTVARS snmpMgmtBase;
  64. void mgmtInit();
  65. void mgmtCleanup();
  66. int mgmtCTick(int index);
  67. int mgmtCAdd(int index, AsnCounter value);
  68. int mgmtISet(int index, AsnInteger value);
  69. int mgmtOSet(int index, AsnObjectIdentifier *pValue, BOOL bAlloc);
  70. // utility functions
  71. void mgmtUtilUpdateErrStatus(UINT flag, DWORD errStatus);
  72. #endif