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.

159 lines
3.6 KiB

  1. /*++
  2. Copyright (c) 1989-2001 Microsoft Corporation
  3. Module Name:
  4. tdihndlr.h
  5. Abstract:
  6. TDI handlers
  7. Author:
  8. Jiandong Ruan
  9. Revision History:
  10. --*/
  11. #ifndef __TDIHNDLR_H__
  12. #define __TDIHNDLR_H__
  13. NTSTATUS
  14. SmbTdiConnectHandler(
  15. IN PSMB_DEVICE DeviceObject,
  16. IN LONG RemoteAddressLength,
  17. IN PTRANSPORT_ADDRESS RemoteAddress,
  18. IN LONG UserDataLength,
  19. IN PVOID UserData,
  20. IN LONG OptionsLength,
  21. IN PVOID Options,
  22. OUT CONNECTION_CONTEXT *ConnectionContext,
  23. OUT PIRP *AcceptIrp
  24. );
  25. NTSTATUS
  26. CommonDisconnectHandler (
  27. IN PSMB_DEVICE DeviceObject,
  28. IN PSMB_CONNECT ConnectObject,
  29. IN ULONG DisconnectFlags
  30. );
  31. NTSTATUS
  32. SmbTdiDisconnectHandler (
  33. IN PSMB_DEVICE DeviceObject,
  34. IN PSMB_TCP_CONNECT TcpConnect,
  35. IN LONG DisconnectDataLength,
  36. IN PVOID DisconnectData,
  37. IN LONG DisconnectInformationLength,
  38. IN PVOID DisconnectInformation,
  39. IN ULONG DisconnectFlags
  40. );
  41. NTSTATUS
  42. Indicate (
  43. IN PSMB_DEVICE DeviceObject,
  44. IN PSMB_CONNECT ConnectObject,
  45. IN ULONG ReceiveFlags,
  46. IN LONG BytesIndicated,
  47. IN LONG BytesAvailable,
  48. OUT LONG *BytesTaken,
  49. IN PVOID Tsdu,
  50. OUT PIRP *Irp
  51. );
  52. NTSTATUS
  53. WaitingHeader (
  54. IN PSMB_DEVICE DeviceObject,
  55. IN PSMB_CONNECT ConnectObject,
  56. IN ULONG ReceiveFlags,
  57. IN LONG BytesIndicated,
  58. IN LONG BytesAvailable,
  59. OUT LONG *BytesTaken,
  60. IN PVOID Tsdu,
  61. OUT PIRP *Irp
  62. );
  63. NTSTATUS
  64. SmbPartialRcv (
  65. IN PSMB_DEVICE DeviceObject,
  66. IN PSMB_CONNECT ConnectObject,
  67. IN ULONG ReceiveFlags,
  68. IN LONG BytesIndicated,
  69. IN LONG BytesAvailable,
  70. OUT LONG *BytesTaken,
  71. IN PVOID Tsdu,
  72. OUT PIRP *Irp
  73. );
  74. NTSTATUS
  75. SmbTdiReceiveHandler (
  76. IN PSMB_DEVICE DeviceObject,
  77. IN PSMB_TCP_CONNECT TcpConnect,
  78. IN ULONG ReceiveFlags,
  79. IN LONG BytesIndicated,
  80. IN LONG BytesAvailable,
  81. OUT LONG *BytesTaken,
  82. IN PVOID Tsdu,
  83. OUT PIRP *Irp
  84. );
  85. #ifdef NO_ZERO_BYTE_INDICATE
  86. NTSTATUS
  87. TdiReceiveHandlerRdr (
  88. IN PSMB_DEVICE DeviceObject,
  89. IN PSMB_TCP_CONNECT TcpConnect,
  90. IN ULONG ReceiveFlags,
  91. IN LONG BytesIndicated,
  92. IN LONG BytesAvailable,
  93. OUT LONG *BytesTaken,
  94. IN PVOID Tsdu,
  95. OUT PIRP *Irp
  96. );
  97. #endif
  98. NTSTATUS
  99. TdiSetEventHandler(
  100. PFILE_OBJECT FileObject,
  101. ULONG EventType,
  102. PVOID EventHandler,
  103. PVOID Context
  104. );
  105. NTSTATUS
  106. SmbSynchTdiCompletion(
  107. IN PDEVICE_OBJECT DeviceObject,
  108. IN PIRP Irp,
  109. IN PVOID Context
  110. );
  111. NTSTATUS
  112. SmbFillIrp(
  113. IN PSMB_CONNECT ConnectObject,
  114. IN PVOID Tsdu,
  115. IN LONG BytesIndicated,
  116. OUT LONG *BytesTaken
  117. );
  118. VOID
  119. SmbGetHeaderDpc(
  120. IN PKDPC Dpc,
  121. IN PSMB_CONNECT ConnectObject,
  122. IN PVOID SystemArgument1,
  123. IN PVOID SystemArgument2
  124. );
  125. VOID
  126. SmbPrepareReceiveIrp(
  127. IN PSMB_CONNECT ConnectObject
  128. );
  129. #if DBG
  130. BOOL
  131. IsValidPartialRcvState(
  132. IN PSMB_CONNECT ConnectObject
  133. );
  134. #endif
  135. #endif