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.

176 lines
2.7 KiB

  1. /*++
  2. Copyright (c) 1995 Microsoft Corporation
  3. Module Name:
  4. routing\ip\wanarp\ioctl.c
  5. Abstract:
  6. Header for ioctl.c
  7. Revision History:
  8. Amritansh Raghav
  9. --*/
  10. //
  11. // Notification events
  12. //
  13. typedef struct _PENDING_NOTIFICATION
  14. {
  15. LIST_ENTRY leNotificationLink;
  16. WORK_QUEUE_ITEM wqi;
  17. WANARP_NOTIFICATION wnMsg;
  18. }PENDING_NOTIFICATION, *PPENDING_NOTIFICATION;
  19. //
  20. // The lookaside list for notifications
  21. //
  22. extern NPAGED_LOOKASIDE_LIST g_llNotificationBlocks;
  23. #define WANARP_NOTIFICATION_LOOKASIDE_DEPTH 4
  24. //++
  25. //
  26. // PPENDING_NOTIFICATION
  27. // AllocateNotification(
  28. // VOID
  29. // )
  30. //
  31. // Allocate a notification blob from g_llNotificationBlocks
  32. //
  33. //--
  34. #define AllocateNotification() \
  35. ExAllocateFromNPagedLookasideList(&g_llNotificationBlocks)
  36. //++
  37. //
  38. // VOID
  39. // FreeNotification(
  40. // PPENDING_NOTIFICATION pMsg
  41. // )
  42. //
  43. // Free a notification blob to g_llNotificationBlocks
  44. //
  45. //--
  46. #define FreeNotification(n) \
  47. ExFreeToNPagedLookasideList(&g_llNotificationBlocks, (n))
  48. //
  49. // List of pending notifications
  50. //
  51. LIST_ENTRY g_lePendingNotificationList;
  52. //
  53. // List of pending IRPs
  54. //
  55. LIST_ENTRY g_lePendingIrpList;
  56. //
  57. // Set to true if we want to queue notifications
  58. //
  59. BOOLEAN g_bQueueNotifications;
  60. NTSTATUS
  61. WanProcessNotification(
  62. PIRP pIrp,
  63. ULONG ulInLength,
  64. ULONG ulOutLength
  65. );
  66. NTSTATUS
  67. WanAddUserModeInterface(
  68. PIRP pIrp,
  69. ULONG ulInLength,
  70. ULONG ulOutLength
  71. );
  72. NTSTATUS
  73. WanDeleteUserModeInterface(
  74. PIRP pIrp,
  75. ULONG ulInLength,
  76. ULONG ulOutLength
  77. );
  78. VOID
  79. WanpCleanOutInterfaces(
  80. VOID
  81. );
  82. VOID
  83. WanpDeleteInterface(
  84. PUMODE_INTERFACE pInterface
  85. );
  86. NTSTATUS
  87. WanDeleteAdapters(
  88. PIRP pIrp,
  89. ULONG ulInLength,
  90. ULONG ulOutLength
  91. );
  92. NTSTATUS
  93. WanProcessConnectionFailure(
  94. PIRP pIrp,
  95. ULONG ulInLength,
  96. ULONG ulOutLength
  97. );
  98. NTSTATUS
  99. WanGetIfStats(
  100. PIRP pIrp,
  101. ULONG ulInLength,
  102. ULONG ulOutLength
  103. );
  104. NTSTATUS
  105. WanMapServerAdapter(
  106. PIRP pIrp,
  107. ULONG ulInLength,
  108. ULONG ulOutLength
  109. );
  110. NTSTATUS
  111. WanStartStopQueuing(
  112. PIRP pIrp,
  113. ULONG ulInLength,
  114. ULONG ulOutLength
  115. );
  116. VOID
  117. WanCancelNotificationIrp(
  118. PDEVICE_OBJECT pDeviceObject,
  119. PIRP pIrp
  120. );
  121. VOID
  122. WanpCompleteIrp(
  123. PPENDING_NOTIFICATION pEvent
  124. );
  125. NTSTATUS
  126. WanpGetNewIndex(
  127. OUT PULONG pulIndex
  128. );
  129. VOID
  130. WanpFreeIndex(
  131. IN ULONG ulIndex
  132. );