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.

197 lines
6.9 KiB

  1. //=============================================================================
  2. // Microsoft (R) Network Monitor (tm).
  3. // Copyright (C) 1991-1999. All rights reserved.
  4. //
  5. // MODULE: bhsupp.h
  6. //=============================================================================
  7. #if !defined(_NMSUPP_H)
  8. #define _NMSUPP_H
  9. #pragma pack(1)
  10. #ifdef __cplusplus
  11. extern "C" {
  12. #endif
  13. #ifndef __cplusplus
  14. #ifndef try
  15. #define try __try
  16. #endif
  17. #ifndef except
  18. #define except __except
  19. #endif
  20. #endif
  21. //=============================================================================
  22. // Windows version constants.
  23. //=============================================================================
  24. #define WINDOWS_VERSION_UNKNOWN 0
  25. #define WINDOWS_VERSION_WIN32S 1
  26. #define WINDOWS_VERSION_WIN32C 2
  27. #define WINDOWS_VERSION_WIN32 3
  28. //=============================================================================
  29. // Frame masks.
  30. //=============================================================================
  31. #define FRAME_MASK_ETHERNET ((BYTE) ~0x01)
  32. #define FRAME_MASK_TOKENRING ((BYTE) ~0x80)
  33. #define FRAME_MASK_FDDI ((BYTE) ~0x01)
  34. //=============================================================================
  35. // ACCESSRIGHTS
  36. //=============================================================================
  37. typedef enum _ACCESSRIGHTS
  38. {
  39. AccessRightsNoAccess, //... Access denied, invalid password.
  40. AccessRightsMonitoring, //... Monitoring mode only.
  41. AccessRightsUserAccess, //... User-level access rights.
  42. AccessRightsAllAccess //... All access.
  43. } ACCESSRIGHTS;
  44. typedef ACCESSRIGHTS *PACCESSRIGHTS;
  45. typedef LPVOID HPASSWORD;
  46. #define HANDLE_TYPE_PASSWORD MAKE_IDENTIFIER('P', 'W', 'D', '$')
  47. //=============================================================================
  48. // Object heap type.
  49. //=============================================================================
  50. typedef LPVOID HOBJECTHEAP; //... Opaque.
  51. //=============================================================================
  52. // Object cleanup procedure.
  53. //=============================================================================
  54. typedef VOID (WINAPI *OBJECTPROC)(HOBJECTHEAP, LPVOID);
  55. #pragma pack()
  56. //=============================================================================
  57. // Network Monitor timers.
  58. //=============================================================================
  59. typedef struct _TIMER *HTIMER;
  60. typedef VOID (WINAPI *BHTIMERPROC)(LPVOID);
  61. extern HTIMER WINAPI BhSetTimer(BHTIMERPROC TimerProc, LPVOID InstData, DWORD TimeOut);
  62. extern VOID WINAPI BhKillTimer(HTIMER hTimer);
  63. //=============================================================================
  64. // Network Monitor driver support.
  65. //=============================================================================
  66. extern LPVOID WINAPI BhAllocSystemMemory(DWORD nBytes);
  67. extern LPVOID WINAPI BhFreeSystemMemory(LPVOID ptr);
  68. extern LPVOID WINAPI BhGetNetworkRequestAddress(DWORD NalRequestType);
  69. //=============================================================================
  70. // Network Monitor global error API.
  71. //=============================================================================
  72. extern DWORD WINAPI BhGetLastError(VOID);
  73. extern DWORD WINAPI BhSetLastError(DWORD Error);
  74. //=============================================================================
  75. // Object manager function prototypes.
  76. //=============================================================================
  77. extern HOBJECTHEAP WINAPI CreateObjectHeap(DWORD ObjectSize, OBJECTPROC ObjectProc);
  78. extern HOBJECTHEAP WINAPI DestroyObjectHeap(HOBJECTHEAP hObjectHeap);
  79. extern LPVOID WINAPI AllocObject(HOBJECTHEAP hObjectHeap);
  80. extern LPVOID WINAPI FreeObject(HOBJECTHEAP hObjectHeap, LPVOID ObjectMemory);
  81. extern DWORD WINAPI GrowObjectHeap(HOBJECTHEAP hObjectHeap, DWORD nObjects);
  82. extern DWORD WINAPI GetObjectHeapSize(HOBJECTHEAP hObjectHeap);
  83. extern VOID WINAPI PurgeObjectHeap(HOBJECTHEAP hObjectHeap);
  84. //=============================================================================
  85. // Memory functions.
  86. //=============================================================================
  87. extern LPVOID WINAPI AllocMemory(SIZE_T size);
  88. extern LPVOID WINAPI ReallocMemory(LPVOID ptr, SIZE_T NewSize);
  89. extern VOID WINAPI FreeMemory(LPVOID ptr);
  90. extern VOID WINAPI TestMemory(LPVOID ptr);
  91. extern SIZE_T WINAPI MemorySize(LPVOID ptr);
  92. extern HANDLE WINAPI MemoryHandle(LPBYTE ptr);
  93. //=============================================================================
  94. // Password API's.
  95. //=============================================================================
  96. extern HPASSWORD WINAPI CreatePassword(LPSTR password);
  97. extern VOID WINAPI DestroyPassword(HPASSWORD hPassword);
  98. extern ACCESSRIGHTS WINAPI ValidatePassword(HPASSWORD hPassword);
  99. //=============================================================================
  100. // EXPRESSION API's
  101. //=============================================================================
  102. extern LPEXPRESSION WINAPI InitializeExpression(LPEXPRESSION Expression);
  103. extern LPPATTERNMATCH WINAPI InitializePattern(LPPATTERNMATCH Pattern, LPVOID ptr, DWORD offset, DWORD length);
  104. extern LPEXPRESSION WINAPI AndExpression(LPEXPRESSION Expression, LPPATTERNMATCH Pattern);
  105. extern LPEXPRESSION WINAPI OrExpression(LPEXPRESSION Expression, LPPATTERNMATCH Pattern);
  106. extern LPPATTERNMATCH WINAPI NegatePattern(LPPATTERNMATCH Pattern);
  107. extern LPADDRESSTABLE WINAPI AdjustOperatorPrecedence(LPADDRESSTABLE AddressTable);
  108. extern LPADDRESS WINAPI NormalizeAddress(LPADDRESS Address);
  109. extern LPADDRESSTABLE WINAPI NormalizeAddressTable(LPADDRESSTABLE AddressTable);
  110. //=============================================================================
  111. // SERVICE API's
  112. //=============================================================================
  113. extern HANDLE WINAPI BhOpenService(LPSTR ServiceName);
  114. extern VOID WINAPI BhCloseService(HANDLE ServiceHandle);
  115. extern DWORD WINAPI BhStartService(HANDLE ServiceHandle);
  116. extern DWORD WINAPI BhStopService(HANDLE ServiceHandle);
  117. //=============================================================================
  118. // MISC. API's
  119. //=============================================================================
  120. extern DWORD WINAPI BhGetWindowsVersion(VOID);
  121. extern BOOL WINAPI IsDaytona(VOID);
  122. extern VOID _cdecl dprintf(LPSTR format, ...);
  123. #ifdef __cplusplus
  124. }
  125. #endif
  126. #endif