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.

139 lines
2.5 KiB

  1. /*++
  2. Copyright (c) 2001 Microsoft Corporation
  3. Module Name:
  4. sspics.hxx
  5. Abstract:
  6. sspics
  7. Author:
  8. Larry Zhu (LZhu) January 1, 2002
  9. Environment:
  10. User Mode
  11. Revision History:
  12. --*/
  13. #ifndef SSPI_CS_HXX
  14. #define SSPI_CS_HXX
  15. #include "sockcomm.h"
  16. #include "transport.hxx"
  17. enum ESspiParameterType {
  18. kInvalidThreadParameters,
  19. kSspiSrvThreadParameters,
  20. kSspiCliThreadParameters,
  21. kSspiSrvMainThreadParameters,
  22. };
  23. enum ESspiPort {
  24. kServerSocketPort = 6217,
  25. kClientSocketPort = 6218,
  26. };
  27. class TSspiClientThreadParam {
  28. public:
  29. TSspiClientThreadParam(
  30. VOID
  31. );
  32. virtual
  33. ~TSspiClientThreadParam(
  34. VOID
  35. );
  36. ESspiParameterType ParameterType; // kSspiCliThreadParameters
  37. USHORT ServerSocketPort;
  38. USHORT ClientSocketPort;
  39. PSTR pszServer;
  40. private:
  41. NO_COPY(TSspiClientThreadParam);
  42. };
  43. DWORD WINAPI
  44. SspiClientThread(
  45. IN PVOID pParameter // thread data
  46. );
  47. HRESULT
  48. SspiClientStart(
  49. IN TSspiClientThreadParam* pParameter, // thread data
  50. IN SOCKET ServerSocket,
  51. IN SOCKET ClientSocket
  52. );
  53. class TSspiServerThreadParam {
  54. public:
  55. TSspiServerThreadParam(
  56. VOID
  57. );
  58. virtual
  59. ~TSspiServerThreadParam(
  60. VOID
  61. );
  62. ESspiParameterType ParameterType; // kSspiSrvThreadParameters
  63. SOCKET ServerSocket;
  64. private:
  65. NO_COPY(TSspiServerThreadParam);
  66. };
  67. class TSsiServerMainLoopThreadParam {
  68. public:
  69. TSsiServerMainLoopThreadParam(
  70. VOID
  71. );
  72. virtual
  73. ~TSsiServerMainLoopThreadParam(
  74. VOID
  75. );
  76. ESspiParameterType ParameterType; // kSspiSrvMainThreadParameters
  77. USHORT ServerSocketPort;
  78. private:
  79. NO_COPY(TSsiServerMainLoopThreadParam);
  80. };
  81. DWORD WINAPI
  82. SspiServerThread(
  83. IN PVOID pParameter // thread data
  84. );
  85. HRESULT
  86. SspiServerStart(
  87. IN TSspiServerThreadParam* pParameter, // thread data
  88. IN SOCKET ClientSocket
  89. );
  90. DWORD WINAPI
  91. SspiServerMainLoopThread(
  92. IN PVOID pParameter // thread data
  93. );
  94. HRESULT
  95. SspiStartCS(
  96. IN OPTIONAL TSsiServerMainLoopThreadParam *pSrvMainParam,
  97. IN OPTIONAL TSspiClientThreadParam* pCliParam
  98. );
  99. HRESULT
  100. SspiAcquireServerParam(
  101. IN TSsiServerMainLoopThreadParam *pSrvMainParam,
  102. OUT TSspiServerThreadParam** ppServerParam
  103. );
  104. VOID
  105. SspiReleaseServerParam(
  106. IN TSspiServerThreadParam* pServerParam
  107. );
  108. #endif // #ifndef SSPI_CS_HXX