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.

165 lines
6.7 KiB

  1. /*++
  2. Copyright (c) 1999, Microsoft Corporation
  3. Module Name:
  4. sample\rtmapi.h
  5. Abstract:
  6. The file contains the header for rtmapi.c...
  7. --*/
  8. #ifndef _RTMAPI_H_
  9. #define _RTMAPI_H_
  10. //
  11. // this indirection would be useful if i ever write a protocol emulator
  12. //
  13. #define RTM_RegisterEntity(preiEntity, \
  14. preemMethods, \
  15. recCallback, \
  16. bReserve, \
  17. rrpProfile, \
  18. phHandle) \
  19. RtmRegisterEntity(preiEntity, \
  20. preemMethods, \
  21. recCallback, \
  22. bReserve, \
  23. rrpProfile, \
  24. phHandle)
  25. #define RTM_DeregisterEntity(hHandle) \
  26. RtmDeregisterEntity(hHandle)
  27. #define RTM_RegisterForChangeNotification(hHandle, \
  28. rvsViews, \
  29. rnfFlags, \
  30. pvContext, \
  31. phNotificationHandle) \
  32. RtmRegisterForChangeNotification(hHandle, \
  33. rvsViews, \
  34. rnfFlags, \
  35. pvContext, \
  36. phNotificationHandle)
  37. #define RTM_DeregisterFromChangeNotification(hHandle, \
  38. hNotificationHandle) \
  39. RtmDeregisterFromChangeNotification(hHandle, \
  40. hNotificationHandle)
  41. #define RTM_GetChangedDests(hRtmHandle, \
  42. hNotificationHandle, \
  43. puiNumDests, \
  44. pRtmDestInfo) \
  45. RtmGetChangedDests(hRtmHandle, \
  46. hNotificationHandle, \
  47. puiNumDests, \
  48. pRtmDestInfo)
  49. #define RTM_ReleaseChangedDests(hRtmHandle, \
  50. hNotificationHandle, \
  51. uiNumDests, \
  52. pRtmDestInfo) \
  53. RtmReleaseChangedDests(hRtmHandle, \
  54. hNotificationHandle, \
  55. uiNumDests, \
  56. pRtmDestInfo)
  57. #define RTM_SetAddress(prnaAddress, \
  58. ipAddress) \
  59. RTM_IPV4_SET_ADDR_AND_LEN(prnaAddress, \
  60. ipAddress, \
  61. sizeof(IPADDRESS))
  62. #define RTM_GetAddress(pipAddress, \
  63. prnaAddress) \
  64. ( \
  65. IP_ASSIGN((pipAddress), (* (ULONG *) (prnaAddress)->AddrBits)) \
  66. )
  67. #define RTM_GetMostSpecificDestination (RtmRegHandle, \
  68. DestAddress, \
  69. ProtocolId, \
  70. TargetView, \
  71. DestInfo) \
  72. RtmGetMostSpecificDestination (RtmRegHandle, \
  73. DestAddress, \
  74. ProtocolId, \
  75. TargetView, \
  76. DestInfo)
  77. #define RTM_ReleaseDestInfo (RtmRegHandle, \
  78. DestInfo) \
  79. RtmReleaseDestInfo (RtmRegHandle, \
  80. DestInfo)
  81. #define RTM_MarkDestForChangeNotification (RtmRegHandle, \
  82. NotifyHandle, \
  83. DestHandle, \
  84. MarkDest) \
  85. RtmMarkDestForChangeNotification (RtmRegHandle, \
  86. NotifyHandle, \
  87. DestHandle, \
  88. MarkDest)
  89. #define RTM_IsMarkedForChangeNotification (RtmRegHandle, \
  90. NotifyHandle, \
  91. DestHandle, \
  92. DestMarked) \
  93. RtmIsMarkedForChangeNotification (RtmRegHandle, \
  94. NotifyHandle, \
  95. DestHandle, \
  96. DestMarked)
  97. #define RTM_GetOpaqueInformationPointer (RtmRegHandle, \
  98. DestHandle, \
  99. OpaqueInfoPointer) \
  100. RtmGetOpaqueInformationPointer (RtmRegHandle, \
  101. DestHandle, \
  102. OpaqueInfoPointer)
  103. //
  104. // function declarations for rtmv2 interface
  105. //
  106. #ifdef DEBUG
  107. DWORD
  108. RTM_DisplayDestInfo(
  109. IN PRTM_DEST_INFO prdi);
  110. #else
  111. #define RTM_DisplayDestInfo(prdi)
  112. #endif // DEBUG
  113. DWORD
  114. RTM_NextHop (
  115. IN PRTM_DEST_INFO prdiDestination,
  116. OUT PDWORD pdwIfIndex,
  117. OUT PIPADDRESS pipNeighbor);
  118. DWORD
  119. APIENTRY
  120. RTM_CallbackEvent (
  121. IN RTM_ENTITY_HANDLE hRtmHandle,
  122. IN RTM_EVENT_TYPE retEvent,
  123. IN PVOID pvContext1,
  124. IN PVOID pvContext2);
  125. #endif // _RTMAPI_H_