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.

105 lines
3.2 KiB

  1. /* (C) 1996-1999 Microsoft Corp.
  2. *
  3. * file : MCSKernl.h
  4. * author : Erik Mavrinac
  5. *
  6. * description: Kernel mode MCS initialization and user attachment interface
  7. * definitions which supplement common definitions of MCSCommn.h.
  8. */
  9. #ifndef __MCSKERNL_H
  10. #define __MCSKERNL_H
  11. #include "MCSCommn.h"
  12. #include "MCSIoctl.h"
  13. /*
  14. * Defines
  15. */
  16. // Required prefix bytes when allocating a user mode buffer or
  17. // kernel mode OutBuf when making a send-data request. Allows reuse
  18. // of the buffer for local indications and constructing PDUs.
  19. // Must be the greater of 16 bytes or sizeof(MCSSendDataIndicationIoctl).
  20. #define SendDataReqPrefixBytes sizeof(SendDataIndicationIoctl)
  21. // Used when allocating memory for send-data request, allows ASN.1
  22. // segmentation while copying the least amount of data.
  23. #define SendDataReqSuffixBytes 2
  24. /*
  25. * API prototypes.
  26. */
  27. #ifdef __cplusplus
  28. extern "C" {
  29. #endif
  30. // Prototypes for functons dealing with ICA stack ioctls downward and TD
  31. // data coming upward.
  32. NTSTATUS MCSIcaChannelInput(void *, CHANNELCLASS,
  33. VIRTUALCHANNELCLASS, PINBUF, BYTE *, ULONG);
  34. NTSTATUS MCSIcaRawInput(void *, PINBUF, BYTE *, ULONG);
  35. NTSTATUS MCSIcaVirtualQueryBindings(DomainHandle, PSD_VCBIND *, unsigned *);
  36. NTSTATUS MCSIcaT120Request(DomainHandle, PSD_IOCTL);
  37. void MCSIcaStackCancelIo(DomainHandle);
  38. // Kernel-specific prototypes.
  39. MCSError MCSInitialize(PSDCONTEXT, PSD_OPEN, DomainHandle *, void *);
  40. MCSError APIENTRY MCSSetShadowChannel(
  41. DomainHandle hDomain,
  42. ChannelID shadowChannel);
  43. MCSError APIENTRY MCSGetDefaultDomain(PSDCONTEXT pContext,
  44. PDomainParameters pDomParams,
  45. unsigned *MaxSendSize,
  46. unsigned *MaxX224DataSize,
  47. unsigned *X224SourcePort);
  48. MCSError APIENTRY MCSCreateDefaultDomain(PSDCONTEXT pContext,
  49. DomainHandle hDomain);
  50. MCSError APIENTRY MCSGetDomainInfo(
  51. DomainHandle hDomain,
  52. PDomainParameters pDomParams, // client's domain params
  53. unsigned *MaxSendSize, // client max PDU size
  54. unsigned *MaxX224DataSize, // client X.224
  55. unsigned *X224SourcePort); // client X.224
  56. MCSError MCSCleanup(DomainHandle *phDomain);
  57. UserID APIENTRY MCSGetUserIDFromHandle(UserHandle hUser);
  58. ChannelID APIENTRY MCSGetChannelIDFromHandle(ChannelHandle hChannel);
  59. MCSError __fastcall MCSSendDataRequest(
  60. UserHandle hUser,
  61. ChannelHandle hChannel,
  62. DataRequestType RequestType,
  63. ChannelID ChannelID,
  64. MCSPriority Priority,
  65. Segmentation Segmentation,
  66. POUTBUF pOutBuf);
  67. void APIENTRY MCSProtocolErrorEvent(PSDCONTEXT, PPROTOCOLSTATUS, unsigned,
  68. BYTE *, unsigned);
  69. BOOLEAN __fastcall DecodeLengthDeterminantPER(BYTE *, unsigned, BOOLEAN *,
  70. unsigned *, unsigned *);
  71. #ifdef __cplusplus
  72. }
  73. #endif
  74. #endif // !defined(__MCSKERNL_H)