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.

103 lines
3.3 KiB

  1. /*++
  2. Copyright (c) 1992-1997 Microsoft Corporation
  3. Module Name:
  4. varbinds.h
  5. Abstract:
  6. Contains definitions for manipulating varbinds.
  7. Environment:
  8. User Mode - Win32
  9. Revision History:
  10. 10-Feb-1997 DonRyan
  11. Rewrote to implement SNMPv2 support.
  12. --*/
  13. #ifndef _VARBINDS_H_
  14. #define _VARBINDS_H_
  15. ///////////////////////////////////////////////////////////////////////////////
  16. // //
  17. // Include files //
  18. // //
  19. ///////////////////////////////////////////////////////////////////////////////
  20. #include "regions.h"
  21. #include "network.h"
  22. ///////////////////////////////////////////////////////////////////////////////
  23. // //
  24. // Public definitions //
  25. // //
  26. ///////////////////////////////////////////////////////////////////////////////
  27. typedef struct _VARBIND_LIST_ENTRY {
  28. LIST_ENTRY Link;
  29. LIST_ENTRY QueryLink;
  30. SnmpVarBind ResolvedVb;
  31. SnmpVarBindList ResolvedVbl;
  32. UINT nState;
  33. UINT nErrorIndex;
  34. UINT nMaxRepetitions;
  35. PMIB_REGION_LIST_ENTRY pCurrentRLE;
  36. } VARBIND_LIST_ENTRY, *PVARBIND_LIST_ENTRY;
  37. #define VARBIND_UNINITIALIZED 0 // varbind info invalid
  38. #define VARBIND_INITIALIZED 1 // varbind info valid
  39. #define VARBIND_RESOLVING 2 // involved in query now
  40. #define VARBIND_PARTIALLY_RESOLVED 3 // subsequent query needed
  41. #define VARBIND_RESOLVED 4 // completed successfully
  42. #define VARBIND_ABORTED 5 // completed unsuccessfully
  43. #define VARBINDSTATESTRING(nState) \
  44. ((nState == VARBIND_INITIALIZED) \
  45. ? "initialized" \
  46. : (nState == VARBIND_PARTIALLY_RESOLVED) \
  47. ? "partially resolved" \
  48. : (nState == VARBIND_RESOLVED) \
  49. ? "resolved" \
  50. : (nState == VARBIND_RESOLVING) \
  51. ? "resolving" \
  52. : (nState == VARBIND_UNINITIALIZED) \
  53. ? "uninitialized" \
  54. : "aborted")
  55. ///////////////////////////////////////////////////////////////////////////////
  56. // //
  57. // Public prototypes //
  58. // //
  59. ///////////////////////////////////////////////////////////////////////////////
  60. BOOL
  61. ProcessVarBinds(
  62. PNETWORK_LIST_ENTRY pNLE
  63. );
  64. BOOL
  65. UnloadVarBinds(
  66. PNETWORK_LIST_ENTRY pNLE
  67. );
  68. BOOL
  69. AllocVLE(
  70. PVARBIND_LIST_ENTRY * ppVLE
  71. );
  72. BOOL
  73. FreeVLE(
  74. PVARBIND_LIST_ENTRY pVLE
  75. );
  76. #endif // _VARBINDS_H_