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.

88 lines
1.7 KiB

  1. /*++
  2. Copyright (c) 1995 Microsoft Corporation
  3. Module Name:
  4. net\rtm\rtmdlg.c
  5. Abstract:
  6. Routing Table Manager DLL. Debugging code to display table entries
  7. in dialog box. External prototypes
  8. Author:
  9. Vadim Eydelman
  10. Revision History:
  11. --*/
  12. #ifndef _RTMDLG_
  13. #define _RTMDLG_
  14. #include <windows.h>
  15. #include <stdio.h>
  16. #include "rtdlg.h"
  17. #define DbgLevelValueName TEXT("DbgLevel")
  18. #define TicksWrapAroundValueName TEXT("TicksWrapAround")
  19. #define MaxMessagesValueName TEXT("MaxMessages")
  20. #define RT_ADDROUTE (WM_USER+10)
  21. #define RT_UPDATEROUTE (WM_USER+11)
  22. #define RT_DELETEROUTE (WM_USER+12)
  23. // Debug flags
  24. #define DEBUG_DISPLAY_TABLE 0x00000001
  25. #define DEBUG_SYNCHRONIZATION 0x00000002
  26. extern DWORD DbgLevel;
  27. #define IF_DEBUG(flag) if (DbgLevel & DEBUG_ ## flag)
  28. // Make it setable to be able to test time wraparound
  29. extern ULONG MaxTicks;
  30. #undef MAXTICKS
  31. #define MAXTICKS MaxTicks
  32. #define GetTickCount() (GetTickCount()&MaxTicks)
  33. #undef IsLater
  34. #define IsLater(Time1,Time2) \
  35. (((Time1-Time2)&MaxTicks)<MaxTicks/2)
  36. #undef TimeDiff
  37. #define TimeDiff(Time1,Time2) \
  38. ((Time1-Time2)&MaxTicks)
  39. #undef IsPositiveTimeDiff
  40. #define IsPositiveTimeDiff(TimeDiff) \
  41. (TimeDiff<MaxTicks/2)
  42. extern DWORD MaxMessages;
  43. #undef RTM_MAX_ROUTE_CHANGE_MESSAGES
  44. #define RTM_MAX_ROUTE_CHANGE_MESSAGES MaxMessages
  45. // Routing Table Dialog Thread
  46. extern HANDLE RTDlgThreadHdl;
  47. extern HWND RTDlg;
  48. DWORD WINAPI
  49. RTDialogThread (
  50. LPVOID param
  51. );
  52. VOID
  53. AddRouteToLB (
  54. PRTM_TABLE Table,
  55. PRTM_ROUTE_NODE node,
  56. INT idx
  57. );
  58. VOID
  59. DeleteRouteFromLB (
  60. PRTM_TABLE Table,
  61. PRTM_ROUTE_NODE node
  62. );
  63. #endif