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.

149 lines
3.1 KiB

  1. /*++
  2. Copyright (c) 1995 Microsoft Corporation
  3. Module Name:
  4. ntos\tdi\isn\fwd\ddreqs.h
  5. Abstract:
  6. Management of demand dial request queues
  7. Author:
  8. Vadim Eydelman
  9. Revision History:
  10. --*/
  11. #ifndef _IPXFWD_DDREQS_
  12. #define _IPXFWD_DDREQS_
  13. // Connection requests to DIM
  14. // Queue of request that need to be satisfied by DIM
  15. extern LIST_ENTRY ConnectionRequestQueue;
  16. // Queue of request IRPs posted by the router manager
  17. extern LIST_ENTRY ConnectionIrpQueue;
  18. /*++
  19. I n i t i a l i z e C o n n e c t i o n Q u e u e s
  20. Routine Description:
  21. Initializes connection request and irp queues
  22. Arguments:
  23. None
  24. Return Value:
  25. None
  26. --*/
  27. //VOID
  28. //InitializeConnectionQueues (
  29. // void
  30. // );
  31. #define InitializeConnectionQueues() { \
  32. InitializeListHead (&ConnectionIrpQueue); \
  33. InitializeListHead (&ConnectionRequestQueue); \
  34. }
  35. /*++
  36. F i l l C o n n e c t i o n R e q u e s t
  37. Routine Description:
  38. Fills the provided buffer with index of interface that needs
  39. to be connected and packet that prompted the request
  40. Arguments:
  41. index - if index
  42. packet - packet that prompted the request
  43. data - pointer to IPX data (IPX header) inside of the packet
  44. request - request buffer to fill
  45. reqSize - size of request buffer
  46. bytesCopied - bytesCopied into the request buffer
  47. Return Value:
  48. STATUS_SUCCESS - array was filled successfully
  49. This routine assumes that there it is called only when there
  50. are outstanding requests in the request queue
  51. --*/
  52. VOID
  53. FillConnectionRequest (
  54. IN ULONG index,
  55. IN PNDIS_PACKET packet,
  56. IN PUCHAR data,
  57. IN OUT PFWD_DIAL_REQUEST request,
  58. IN ULONG reqSize,
  59. OUT PULONG bytesCopied
  60. );
  61. /*++
  62. F a i l C o n n e c t i o n R e q u e s t s
  63. Routine Description:
  64. Cleans up on connection request failure
  65. Arguments:
  66. InterfaceIndex - index of interface that could not be connected
  67. Return Value:
  68. STATUS_SUCCESS - clean up was successfull
  69. STATUS_UNSUCCESSFUL - interface with this index does not exist
  70. --*/
  71. NTSTATUS
  72. FailConnectionRequest (
  73. IN ULONG InterfaceIndex
  74. );
  75. /*++
  76. Q u e u e C o n n e c t i o n R e q u e s t
  77. Routine Description:
  78. Adds request to connected the interface to the queue
  79. Arguments:
  80. ifCB - control block of the interface that needs to be
  81. connected
  82. packet - packet that prompted the connection request
  83. data - pointer to actual data in the packet
  84. oldIRQL - IRQL at which interface lock was acquired
  85. Return Value:
  86. None
  87. Note that interface lock must be acquired before calling this
  88. routine which will release it
  89. --*/
  90. VOID
  91. QueueConnectionRequest (
  92. PINTERFACE_CB ifCB,
  93. PNDIS_PACKET packet,
  94. PUCHAR data,
  95. KIRQL oldIRQL
  96. );
  97. /*++
  98. D e q u e u e C o n n e c t i o n R e q u e s t
  99. Routine Description:
  100. Removes conection requset for the interface from the queue
  101. Arguments:
  102. ifCB - control block of the interface that needs to be
  103. removed
  104. Return Value:
  105. None
  106. --*/
  107. VOID
  108. DequeueConnectionRequest (
  109. PINTERFACE_CB ifCB
  110. );
  111. #endif