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.

237 lines
8.8 KiB

  1. /* Copyright (c) 1992-1995, Microsoft Corporation, all rights reserved
  2. **
  3. ** ras.h
  4. ** Remote Access Session Management Service Provider Interface
  5. ** Public header for Session Management Provider Interface
  6. */
  7. #ifndef _RNASPI_H_
  8. #define _RNASPI_H_
  9. //****************************************************************************
  10. // RNA Session Management Module Service Provider Interface
  11. //****************************************************************************
  12. #define RNA_MaxSMMType 32
  13. // The type of RNA session
  14. //
  15. typedef enum {
  16. SESSTYPE_INITIATOR,
  17. SESSTYPE_RESPONDER
  18. } SESSTYPE;
  19. // Session configuration options
  20. //
  21. #define SMMCFG_SW_COMPRESSION 0x00000001 // Software compression is on
  22. #define SMMCFG_PW_ENCRYPTED 0x00000002 // Encrypted password only
  23. #define SMMCFG_NW_LOGON 0x00000004 // Logon to the network
  24. #define SMMCFG_SW_ENCRYPTION 0x00000010 // SW encryption is okay
  25. #define SMMCFG_ALL 0x00000017 // All the user-specified options
  26. // Negotiated protocols
  27. //
  28. #define SMMPROT_NB 0x00000001 // NetBEUI
  29. #define SMMPROT_IPX 0x00000002 // IPX
  30. #define SMMPROT_IP 0x00000004 // TCP/IP
  31. #define SMMPROT_ALL 0x00000007 // all protocols negotiated
  32. // Error codes that a MAC can return when posting disconnect message
  33. //
  34. #define MACERR_REMOTE_DISCONNECTING 0x00000001
  35. #define MACERR_REMOTE_NO_RESPONSE 0x00000002
  36. // The session confuration information
  37. //
  38. typedef struct tagSESS_CONFIGURATION_INFO
  39. {
  40. DWORD dwSize;
  41. char szEntryName[RAS_MaxEntryName + 1];
  42. SESSTYPE stSessType;
  43. DWORD fdwSessOption;
  44. DWORD fdwProtocols;
  45. BOOL fUserSecurity;
  46. char szUserName[UNLEN + 1];
  47. char szPassword[PWLEN + 1];
  48. char szDomainName[DNLEN + 1];
  49. } SESS_CONFIGURATION_INFO, *PSESS_CONFIGURATION_INFO,
  50. FAR *LPSESS_CONFIGURATION_INFO;
  51. // Session configuration start/stop functions
  52. //
  53. typedef DWORD (WINAPI * SESSSTARTPROC)(HANDLE, LPSESS_CONFIGURATION_INFO);
  54. typedef DWORD (WINAPI * SESSSTOPPROC)(HANDLE);
  55. // Session configuration entry point table
  56. //
  57. typedef struct tagRNA_FUNCS
  58. {
  59. DWORD dwSize; // The structure size
  60. SESSSTARTPROC lpfnStart; // RnaSessStart Entry
  61. SESSSTOPPROC lpfnStop; // RnaSessStop Entry
  62. } RNA_FUNCS, *PRNA_FUNCS, FAR *LPRNA_FUNCS;
  63. // Session Management Module initialization function
  64. //
  65. typedef DWORD (WINAPI * SESSINITIALIZEPROC)(LPSTR, LPRNA_FUNCS);
  66. //****************************************************************************
  67. // RNA Session Manager Service Interface
  68. //****************************************************************************
  69. typedef struct tagRnaComplete_Info
  70. {
  71. DWORD dwSize; // The structure size
  72. DWORD dwResult; // The returning error code
  73. UINT idMsg; // SMM-specific error message ID
  74. BOOL fUnload; // Unload the module on success?
  75. HANDLE hThread; // Event to wait for unloading
  76. } COMPLETE_INFO, *PCOMPLETE_INFO, FAR *LPCOMPLETE_INFO;
  77. typedef struct tagProjection_Info
  78. {
  79. DWORD dwSize; // The structure size
  80. RASPROJECTION RasProjection; // The projection type
  81. union {
  82. RASAMB RasAMB;
  83. RASPPPNBF RasPPPNBF;
  84. RASPPPIPX RasPPPIPX;
  85. RASPPPIP RasPPPIP;
  86. } ProjInfo;
  87. } PROJECTION_INFO, *PPROJECTION_INFO, FAR *LPPROJECTION_INFO;
  88. //
  89. // Responses to Session Management Request
  90. //
  91. DWORD WINAPI RnaComplete( HANDLE hConn, LPCOMPLETE_INFO lpci,
  92. LPPROJECTION_INFO lppi, DWORD cEntries);
  93. DWORD WINAPI RnaTerminate( HANDLE hConn, HANDLE hThread );
  94. //
  95. // MAC management services
  96. //
  97. #define IEEE_ADDRESS_LENGTH 6 // Token-ring and Ethernet address lengths
  98. typedef struct tagMAC_FEATURES {
  99. DWORD SendFeatureBits; // A bit field of compression/features sendable
  100. DWORD RecvFeatureBits; // A bit field of compression/features receivable
  101. DWORD MaxSendFrameSize; // Maximum frame size that can be sent
  102. // must be less than or equal default
  103. DWORD MaxRecvFrameSize; // Maximum frame size that can be rcvd
  104. // must be less than or equal default
  105. DWORD LinkSpeed; // New RAW link speed in bits/sec
  106. // Ignored if 0
  107. } MAC_FEATURES, *PMAC_FEATURES, FAR* LPMAC_FEATURES;
  108. #ifdef _WIN64
  109. #pragma pack(8)
  110. #else
  111. #pragma pack(4)
  112. #endif
  113. typedef struct tagMAC_OPEN {
  114. WORD hRasEndpoint; // unique for each endpoint assigned
  115. LPVOID MacAdapter; // Which binding to AsyMac to use
  116. // if NULL, will default to last binding
  117. DWORD LinkSpeed; // RAW link speed in bits per sec
  118. WORD QualOfConnect; // NdisAsyncRaw, NdisAsyncErrorControl, ...
  119. BYTE IEEEAddress[IEEE_ADDRESS_LENGTH]; // The 802.5 or 802.3
  120. MAC_FEATURES macFeatures; // Readable configuration parameters
  121. enum { // All different types of device drivers
  122. SERIAL_DEVICE, // are listed here. For instance
  123. SNA_DEVICE, // the serial driver requires diff.
  124. // irps than the SNA driver.
  125. MINIPORT_DEVICE // NDIS WAN Miniport Devices.
  126. } DeviceType;
  127. union { // handles required for above device
  128. // driver types.
  129. LONG FileHandle; // the Win32 or Nt File Handle
  130. struct SNAHandle {
  131. LPVOID ReadHandle;
  132. LPVOID WriteHandle;
  133. };
  134. } Handles;
  135. DWORD hWndConn; // Window handle for connection
  136. DWORD wMsg; // The msg to post when disconnecting
  137. DWORD dwStatus; // The status of the open call
  138. } MAC_OPEN, *PMAC_OPEN, FAR* LPMAC_OPEN;
  139. #pragma pack()
  140. typedef struct tagDEVICE_PORT_INFO {
  141. DWORD dwSize;
  142. HANDLE hDevicePort;
  143. HANDLE hLine;
  144. HANDLE hCall;
  145. DWORD dwAddressID;
  146. DWORD dwLinkSpeed;
  147. char szDeviceClass[RAS_MaxDeviceType+1];
  148. } DEVICE_PORT_INFO, *PDEVICE_PORT_INFO, FAR* LPDEVICE_PORT_INFO;
  149. DWORD WINAPI RnaGetDevicePort( HANDLE hConn, LPDEVICE_PORT_INFO lpdpi );
  150. DWORD WINAPI RnaOpenMac( HANDLE hConn, HANDLE *lphMAC,
  151. LPMAC_OPEN lpmo, DWORD dwSize, HANDLE hEvent );
  152. DWORD WINAPI RnaCloseMac( HANDLE hConn );
  153. //
  154. // User Profile Services
  155. //
  156. typedef enum tagRNAACCESSTYPE { PCONLY, NETANDPC } RNAACCESSTYPE;
  157. typedef struct tagUSER_PROFILE
  158. {
  159. DWORD dwSize;
  160. char szUserName[UNLEN + 1];
  161. char szPassword[PWLEN + 1];
  162. char szDomainName[DNLEN + 1];
  163. BOOL fUseCallbacks;
  164. RNAACCESSTYPE accesstype;
  165. UINT uTimeOut;
  166. } USER_PROFILE, *PUSER_PROFILE, FAR *LPUSER_PROFILE;
  167. DWORD WINAPI RnaGetUserProfile( HANDLE hConn, LPUSER_PROFILE lpUserProfile );
  168. //
  169. // Callback security services
  170. //
  171. // Callback security type
  172. //
  173. enum {
  174. CALLBACK_SECURE,
  175. CALLBACK_CONVENIENCE
  176. };
  177. DWORD WINAPI RnaGetCallbackList( DWORD * lpdwType,
  178. LPSTR lpszLocList, LPINT lpcbLoc,
  179. LPSTR lpszPhoneList, LPINT lpcbPhone,
  180. LPINT lpcEntries);
  181. DWORD WINAPI RnaUICallbackDialog( HANDLE hConn, LPSTR lpszLocList,
  182. DWORD dwType, BOOL fOptional,
  183. LPINT lpIndex,
  184. LPSTR lpszSelectLocation, UINT cbBuff);
  185. DWORD WINAPI RnaStartCallback( HANDLE hConn, HANDLE hEvent);
  186. // Miscellaneous services
  187. //
  188. DWORD WINAPI RnaUIUsernamePassword( HANDLE hConn, LPSTR lpszUsername,
  189. UINT cbUsername, LPSTR lpszPassword,
  190. UINT cbPassword, LPSTR lpszDomain,
  191. UINT cbDomain);
  192. DWORD WINAPI RnaUIChangePassword( HANDLE hConn, LPSTR lpszUsername,
  193. UINT cbPassword);
  194. DWORD WINAPI RnaGetOverlaidSMM ( LPSTR lpszSMMType, LPSTR lpszModuleName,
  195. LPBYTE lpBuf, DWORD dwSize);
  196. #endif // _RNASPI_H_