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.

171 lines
5.2 KiB

  1. /*++
  2. Copyright (c) 1989 Microsoft Corporation
  3. Module Name:
  4. ntrxce.h
  5. Abstract:
  6. This module contains the NT implementation related includes for the RxCe.
  7. Revision History:
  8. Balan Sethu Raman [SethuR] 15-Feb-1995
  9. Notes:
  10. --*/
  11. #ifndef _RXTDIP_H_
  12. #define _RXTDIP_H_
  13. typedef struct _RXTDI_REQUEST_COMPLETION_CONTEXT_ {
  14. PVOID pEventContext;
  15. PRXCE_VC pVc; // VC Handle for connections
  16. PMDL pPartialMdl; // the partial Mdl that was built for Xmit
  17. PVOID pCompletionContext; // the callback context
  18. union {
  19. PRXCE_IND_SEND_COMPLETE SendCompletionHandler; // for datagrams
  20. PRXCE_IND_CONNECTION_SEND_COMPLETE ConnectionSendCompletionHandler; // for VC sends
  21. };
  22. } RXTDI_REQUEST_COMPLETION_CONTEXT, *PRXTDI_REQUEST_COMPLETION_CONTEXT;
  23. PIRP
  24. RxCeAllocateIrpWithMDL(
  25. IN CCHAR StackSize,
  26. IN BOOLEAN ChargeQuota,
  27. IN PMDL Buffer);
  28. #define RxCeAllocateIrp(StackSize,ChargeQuota) \
  29. RxCeAllocateIrpWithMDL(StackSize,ChargeQuota,NULL)
  30. extern
  31. VOID RxCeFreeIrp(PIRP pIrp);
  32. extern
  33. NTSTATUS RxTdiRequestCompletion(
  34. IN PDEVICE_OBJECT DeviceObject,
  35. IN PIRP Irp,
  36. IN PVOID Context);
  37. extern
  38. NTSTATUS RxTdiAsynchronousRequestCompletion(
  39. IN PDEVICE_OBJECT DeviceObject,
  40. IN PIRP Irp,
  41. IN PVOID Context);
  42. extern NTSTATUS
  43. RxTdiSendPossibleEventHandler (
  44. IN PVOID EventContext,
  45. IN PVOID ConnectionContext,
  46. IN ULONG BytesAvailable);
  47. extern NTSTATUS
  48. BuildEaBuffer (
  49. IN ULONG EaNameLength,
  50. IN PVOID pEaName,
  51. IN ULONG EaValueLength,
  52. IN PVOID pEaValue,
  53. OUT PFILE_FULL_EA_INFORMATION *pEaBuffer,
  54. OUT PULONG pEaBufferLength
  55. );
  56. extern NTSTATUS
  57. RxCeSubmitTdiRequest (
  58. IN PDEVICE_OBJECT pDeviceObject,
  59. IN PIRP pIrp
  60. );
  61. extern NTSTATUS
  62. RxCeSubmitAsynchronousTdiRequest (
  63. IN PDEVICE_OBJECT pDeviceObject,
  64. IN PIRP pIrp,
  65. IN PRXTDI_REQUEST_COMPLETION_CONTEXT pRequestContext
  66. );
  67. //
  68. // TDI event handler extern definitions
  69. //
  70. extern
  71. NTSTATUS
  72. RxTdiConnectEventHandler(
  73. IN PVOID TdiEventContext,
  74. IN LONG RemoteAddressLength,
  75. IN PVOID RemoteAddress,
  76. IN LONG UserDataLength,
  77. IN PVOID UserData,
  78. IN LONG OptionsLength,
  79. IN PVOID Options,
  80. OUT CONNECTION_CONTEXT *ConnectionContext,
  81. OUT PIRP *AcceptIrp
  82. );
  83. extern NTSTATUS
  84. RxTdiDisconnectEventHandler(
  85. IN PVOID EventContext,
  86. IN CONNECTION_CONTEXT ConnectionContext,
  87. IN LONG DisconnectDataLength,
  88. IN PVOID DisconnectData,
  89. IN LONG DisconnectInformationLength,
  90. IN PVOID DisconnectInformation,
  91. IN ULONG DisconnectFlags
  92. );
  93. extern NTSTATUS
  94. RxTdiErrorEventHandler(
  95. IN PVOID TdiEventContext,
  96. IN NTSTATUS Status // status code indicating error type.
  97. );
  98. extern NTSTATUS
  99. RxTdiReceiveEventHandler(
  100. IN PVOID EventContext,
  101. IN CONNECTION_CONTEXT ConnectionContext,
  102. IN ULONG ReceiveFlags,
  103. IN ULONG BytesIndicated,
  104. IN ULONG BytesAvailable,
  105. OUT ULONG *BytesTaken,
  106. IN PVOID Tsdu, // pointer describing this TSDU, typically a lump of bytes
  107. OUT PIRP *IoRequestPacket // TdiReceive IRP if MORE_PROCESSING_REQUIRED.
  108. );
  109. extern NTSTATUS
  110. RxTdiReceiveDatagramEventHandler(
  111. IN PVOID TdiEventContext, // the event context
  112. IN LONG SourceAddressLength, // length of the originator of the datagram
  113. IN PVOID SourceAddress, // string describing the originator of the datagram
  114. IN LONG OptionsLength, // options for the receive
  115. IN PVOID Options, //
  116. IN ULONG ReceiveDatagramFlags, //
  117. IN ULONG BytesIndicated, // number of bytes this indication
  118. IN ULONG BytesAvailable, // number of bytes in complete Tsdu
  119. OUT ULONG *BytesTaken, // number of bytes used
  120. IN PVOID Tsdu, // pointer describing this TSDU, typically a lump of bytes
  121. OUT PIRP *pIrp // TdiReceive IRP if MORE_PROCESSING_REQUIRED.
  122. );
  123. extern NTSTATUS
  124. RxTdiReceiveExpeditedEventHandler(
  125. IN PVOID EventContext,
  126. IN CONNECTION_CONTEXT ConnectionContext,
  127. IN ULONG ReceiveFlags, //
  128. IN ULONG BytesIndicated, // number of bytes in this indication
  129. IN ULONG BytesAvailable, // number of bytes in complete Tsdu
  130. OUT ULONG *BytesTaken, // number of bytes used by indication routine
  131. IN PVOID Tsdu, // pointer describing this TSDU, typically a lump of bytes
  132. OUT PIRP *IoRequestPacket // TdiReceive IRP if MORE_PROCESSING_REQUIRED.
  133. );
  134. // Initialization routines
  135. extern NTSTATUS
  136. InitializeMiniRedirectorNotifier();
  137. #endif // _RXTDIP_H_