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.

192 lines
4.1 KiB

  1. /********************************************************************/
  2. /** Copyright(c) 1996 Microsoft Corporation. **/
  3. /********************************************************************/
  4. //***
  5. //
  6. // Filename: arapif.h
  7. //
  8. // Description: Contains structures and definitions for components that
  9. // interface directly or indirectly with the Arap module
  10. // These componenets are Arap and DDM
  11. //
  12. // History: Sep 9, 1996 Shirish Koti Created original version.
  13. //
  14. //***
  15. #ifndef _ARAPIF_
  16. #define _ARAPIF_
  17. //#include <ras.h>
  18. //#include <mprapi.h>
  19. typedef struct _ARAPCONFIGINFO
  20. {
  21. DWORD dwNumPorts; // total number of ports configured
  22. PVOID FnMsgDispatch; // function that Arap should use to send msgs to DDM
  23. DWORD NASIpAddress; // ipaddress of the system
  24. PVOID FnAuthProvider; // function that Arap should use to call AuthProvider
  25. PVOID FnAuthFreeAttrib;
  26. PVOID FnAcctStartAccounting;
  27. PVOID FnAcctInterimAccounting;
  28. PVOID FnAcctStopAccounting;
  29. PVOID FnAcctFreeAttrib;
  30. DWORD dwAuthRetries; // retries for Authentication
  31. } ARAPCONFIGINFO;
  32. //
  33. // Authentication info sent to DDM by Arap
  34. //
  35. typedef struct _ARAPDDM_AUTH_RESULT
  36. {
  37. WCHAR wchUserName[ UNLEN + 1 ];
  38. WCHAR wchLogonDomain[ DNLEN + 1 ];
  39. } ARAPDDM_AUTH_RESULT;
  40. //
  41. // Callback info sent to DDM by Arap
  42. //
  43. typedef struct _ARAPDDM_CALLBACK_REQUEST
  44. {
  45. BOOL fUseCallbackDelay;
  46. DWORD dwCallbackDelay;
  47. CHAR szCallbackNumber[ RAS_MaxCallbackNumber + 1 ];
  48. } ARAPDDM_CALLBACK_REQUEST;
  49. //
  50. // ARAP error notification
  51. //
  52. typedef struct _ARAPDDM_DISCONNECT
  53. {
  54. DWORD dwError;
  55. WCHAR wchUserName[ UNLEN + 1 ];
  56. WCHAR wchLogonDomain[ DNLEN + 1 ];
  57. } ARAPDDM_DISCONNECT;
  58. typedef struct _ARAPDDM_DONE
  59. {
  60. DWORD NetAddress;
  61. DWORD SessTimeOut;
  62. } ARAPDDM_DONE;
  63. //
  64. // Message used for Arap/DDM notification
  65. //
  66. typedef struct _ARAP_MESSAGE
  67. {
  68. struct _ARAP_MESSAGE * pNext;
  69. DWORD dwError;
  70. DWORD dwMsgId;
  71. HPORT hPort;
  72. union
  73. {
  74. ARAPDDM_AUTH_RESULT AuthResult; // dwMsgId = ARAPDDMMSG_Authenticated
  75. ARAPDDM_CALLBACK_REQUEST CallbackRequest; // dwMsgId = ARAPDDMMSG_CallbackRequest
  76. ARAPDDM_DONE Done; // dwMsgId = ARAPDDMMSG_Done
  77. ARAPDDM_DISCONNECT FailureInfo; // dwMsgId = ARAPDDMMSG_Failure
  78. } ExtraInfo;
  79. } ARAP_MESSAGE;
  80. //
  81. // ARAP_MESSAGE dwMsgId codes.
  82. //
  83. typedef enum _ARAP_MSG_ID
  84. {
  85. ARAPDDMMSG_Started, // ARAP engine has started (response to ArapStartup)
  86. ARAPDDMMSG_Authenticated, // Client has been authenticated.
  87. ARAPDDMMSG_CallbackRequest, // Callback client now.
  88. ARAPDDMMSG_Done, // ARAP negotiated successfully and connection is up
  89. ARAPDDMMSG_Failure, // Client has been authenticated.
  90. ARAPDDMMSG_Disconnected, // Client has been authenticated.
  91. ARAPDDMMSG_Inactive, // Client is inactive
  92. ARAPDDMMSG_Stopped, // ARAP engine has stopped (response to ArapShutdown)
  93. } ARAP_MSG_ID;
  94. typedef DWORD (* ARAPPROC1)(ARAP_MESSAGE *pArapMsg);
  95. //
  96. // prototypes for Arap functions
  97. //
  98. DWORD
  99. ArapDDMLoadModule(
  100. IN VOID
  101. );
  102. VOID
  103. ArapEventHandler(
  104. IN VOID
  105. );
  106. VOID
  107. ArapSetModemParms(
  108. IN PVOID pDevObjPtr,
  109. IN BOOLEAN TurnItOff
  110. );
  111. //
  112. // exports from rasarap.lib
  113. //
  114. DWORD
  115. ArapStartup(
  116. IN ARAPCONFIGINFO *pArapConfig
  117. );
  118. DWORD
  119. ArapAcceptConnection(
  120. IN HPORT hPort,
  121. IN HANDLE hConnection,
  122. IN PCHAR Frame,
  123. IN DWORD FrameLen
  124. );
  125. DWORD
  126. ArapDisconnect(
  127. IN HPORT hPort
  128. );
  129. DWORD
  130. ArapCallBackDone(
  131. IN HPORT hPort
  132. );
  133. DWORD
  134. ArapSendUserMsg(
  135. IN HPORT hPort,
  136. IN PCHAR MsgBuf,
  137. IN DWORD MsgBufLen
  138. );
  139. DWORD
  140. ArapForcePwdChange(
  141. IN HPORT hPort,
  142. IN DWORD Reason
  143. );
  144. DWORD
  145. ArapShutdown(
  146. IN VOID
  147. );
  148. #endif
  149.