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.

156 lines
4.4 KiB

  1. /*++
  2. Copyright (c) Microsoft Corporation. All rights reserved.
  3. Module Name:
  4. rasshost.h
  5. Abstract:
  6. This header defines the interface between third party security
  7. DLLs and the RAS server.
  8. --*/
  9. #ifndef _RASSHOST_
  10. #define _RASSHOST_
  11. #if _MSC_VER > 1000
  12. #pragma once
  13. #endif
  14. #include <mprapi.h>
  15. typedef DWORD HPORT;
  16. typedef struct _SECURITY_MESSAGE
  17. {
  18. DWORD dwMsgId;
  19. HPORT hPort;
  20. DWORD dwError; // Should be non-zero only if error
  21. // occurred during the security dialog.
  22. // Should contain errors from winerror.h
  23. // or raserror.h
  24. CHAR UserName[UNLEN+1]; // Should always contain username if
  25. // dwMsgId is SUCCESS/FAILURE
  26. CHAR Domain[DNLEN+1]; // Should always contain domain if
  27. // dwMsgId is SUCCESS/FAILURE
  28. } SECURITY_MESSAGE, *PSECURITY_MESSAGE;
  29. // Values for dwMsgId in SECURITY_MESSAGE structure
  30. #define SECURITYMSG_SUCCESS 1
  31. #define SECURITYMSG_FAILURE 2
  32. #define SECURITYMSG_ERROR 3
  33. // Used by RasSecurityGetInfo call
  34. typedef struct _RAS_SECURITY_INFO
  35. {
  36. DWORD LastError; // SUCCESS = receive completed
  37. // PENDING = receive pending
  38. // else completed with error
  39. DWORD BytesReceived; // only valid if LastError == SUCCESS
  40. CHAR DeviceName[MAX_DEVICE_NAME+1];
  41. }RAS_SECURITY_INFO,*PRAS_SECURITY_INFO;
  42. typedef DWORD (WINAPI *RASSECURITYPROC)();
  43. //
  44. // Called by third party DLL to notify the supervisor of termination of
  45. // the security dialog
  46. //
  47. VOID WINAPI
  48. RasSecurityDialogComplete(
  49. IN SECURITY_MESSAGE * pSecMsg // Pointer to the above info. structure
  50. );
  51. //
  52. // Called by supervisor into the security DLL to notify it to begin the
  53. // security dialog for a client.
  54. //
  55. // Should return errors from winerror.h or raserror.h
  56. //
  57. DWORD WINAPI
  58. RasSecurityDialogBegin(
  59. IN HPORT hPort, // RAS handle to port
  60. IN PBYTE pSendBuf, // Pointer to the buffer used in
  61. // RasSecurityDialogSend
  62. IN DWORD SendBufSize, // Size of above bufer in bytes
  63. IN PBYTE pRecvBuf, // Pointer to the buffer used in
  64. // RasSecurityDialogReceive
  65. IN DWORD RecvBufSize, // Size of above buffer
  66. IN VOID (WINAPI *RasSecurityDialogComplete)( SECURITY_MESSAGE* )
  67. // Pointer to function RasSecurityDialogComplete.
  68. // Guaranteed to be the same on every call.
  69. );
  70. //
  71. // Called by supervisor into the security DLL to notify it to stop the
  72. // security dialog for a client. If this call returns an error, then it is not
  73. // neccesary for the dll to call RasSecurityDialogComplete. Otherwise the DLL
  74. // must call RasSecurityDialogComplete.
  75. //
  76. // Should return errors from winerror.h or raserror.h
  77. //
  78. DWORD WINAPI
  79. RasSecurityDialogEnd(
  80. IN HPORT hPort // RAS handle to port.
  81. );
  82. //
  83. // The following entrypoints should be loaded by calling GetProcAddress from
  84. // RasMan.lib
  85. //
  86. // Called to send data to remote host
  87. // Will return errors from winerror.h or raserror.h
  88. //
  89. DWORD WINAPI
  90. RasSecurityDialogSend(
  91. IN HPORT hPort, // RAS handle to port.
  92. IN PBYTE pBuffer, // Pointer to buffer containing data to send
  93. IN WORD BufferLength // Length of above buffer.
  94. );
  95. //
  96. // Called to receive data from remote host
  97. // Will return errors from winerror.h or raserror.h
  98. //
  99. DWORD WINAPI
  100. RasSecurityDialogReceive(
  101. IN HPORT hPort, // RAS handle to port.
  102. IN PBYTE pBuffer, // Pointer to buffer to receive data
  103. IN PWORD pBufferLength, // length of data received in bytes.
  104. IN DWORD Timeout, // in seconds
  105. IN HANDLE hEvent // Event to set when receive completes or
  106. // timeouts
  107. );
  108. //
  109. // Called to get Information about port.
  110. // Will return errors from winerror.h or raserror.h
  111. //
  112. DWORD WINAPI
  113. RasSecurityDialogGetInfo(
  114. IN HPORT hPort, // RAS handle to port.
  115. IN RAS_SECURITY_INFO* pBuffer // Pointer to get info structure.
  116. );
  117. #endif