Source code of Windows XP (NT5)
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.

104 lines
3.2 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. #include "snmppdus.h"
  23. ///////////////////////////////////////////////////////////////////////////////
  24. // //
  25. // Public definitions //
  26. // //
  27. ///////////////////////////////////////////////////////////////////////////////
  28. typedef struct _VARBIND_LIST_ENTRY {
  29. LIST_ENTRY Link;
  30. LIST_ENTRY QueryLink;
  31. SnmpVarBind ResolvedVb;
  32. SnmpVarBindList ResolvedVbl;
  33. UINT nState;
  34. UINT nErrorIndex;
  35. UINT nMaxRepetitions;
  36. PMIB_REGION_LIST_ENTRY pCurrentRLE;
  37. } VARBIND_LIST_ENTRY, *PVARBIND_LIST_ENTRY;
  38. #define VARBIND_UNINITIALIZED 0 // varbind info invalid
  39. #define VARBIND_INITIALIZED 1 // varbind info valid
  40. #define VARBIND_RESOLVING 2 // involved in query now
  41. #define VARBIND_PARTIALLY_RESOLVED 3 // subsequent query needed
  42. #define VARBIND_RESOLVED 4 // completed successfully
  43. #define VARBIND_ABORTED 5 // completed unsuccessfully
  44. #define VARBINDSTATESTRING(nState) \
  45. ((nState == VARBIND_INITIALIZED) \
  46. ? "initialized" \
  47. : (nState == VARBIND_PARTIALLY_RESOLVED) \
  48. ? "partially resolved" \
  49. : (nState == VARBIND_RESOLVED) \
  50. ? "resolved" \
  51. : (nState == VARBIND_RESOLVING) \
  52. ? "resolving" \
  53. : (nState == VARBIND_UNINITIALIZED) \
  54. ? "uninitialized" \
  55. : "aborted")
  56. ///////////////////////////////////////////////////////////////////////////////
  57. // //
  58. // Public prototypes //
  59. // //
  60. ///////////////////////////////////////////////////////////////////////////////
  61. BOOL
  62. ProcessVarBinds(
  63. PNETWORK_LIST_ENTRY pNLE
  64. );
  65. BOOL
  66. UnloadVarBinds(
  67. PNETWORK_LIST_ENTRY pNLE
  68. );
  69. BOOL
  70. AllocVLE(
  71. PVARBIND_LIST_ENTRY * ppVLE
  72. );
  73. BOOL
  74. FreeVLE(
  75. PVARBIND_LIST_ENTRY pVLE
  76. );
  77. #endif // _VARBINDS_H_