Source code of Windows XP (NT5)
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.

257 lines
4.6 KiB

  1. /*++
  2. Copyright (C) 1994-98 Microsft Corporation. All rights reserved.
  3. Module Name:
  4. rasapip.h
  5. Abstract:
  6. This file has definitions for private apis for ras connections.
  7. These apis are exported from rasapi32.dll
  8. Author:
  9. Rao Salapaka (raos) 30-Jan-1998
  10. Revision History:
  11. --*/
  12. #ifndef _RASAPIP_
  13. #define _RASAPIP_
  14. #include <windef.h> //for MAX_PATH
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18. #define RASAPIP_MAX_DEVICE_NAME 128
  19. #define RASAPIP_MAX_ENTRY_NAME 256
  20. #define RAS_DEVICE_TYPE(_x) ((_x) & 0x0000FFFF)
  21. #define RAS_DEVICE_CLASS(_x) ((_x) & 0xFFFF0000)
  22. enum _RASDEVICETYPE
  23. {
  24. RDT_Modem = 0,
  25. RDT_X25,
  26. RDT_Isdn,
  27. RDT_Serial,
  28. RDT_FrameRelay,
  29. RDT_Atm,
  30. RDT_Sonet,
  31. RDT_Sw56,
  32. RDT_Tunnel_Pptp,
  33. RDT_Tunnel_L2tp,
  34. RDT_Irda,
  35. RDT_Parallel,
  36. RDT_Other,
  37. //
  38. // The following flags when set
  39. // specify the class of the device
  40. //
  41. RDT_Tunnel = 0x00010000,
  42. RDT_Direct = 0x00020000,
  43. RDT_Null_Modem = 0x000040000
  44. };
  45. typedef enum _RASDEVICETYPE RASDEVICETYPE;
  46. typedef struct _RASENUMENTRYDETAILS
  47. {
  48. DWORD dwSize;
  49. DWORD dwFlags; // same as RASENTRYNAME.dwFlags
  50. DWORD dwType; // same as RASENTRY.dwType
  51. GUID guidId; // same as RASENTRY.guidId
  52. BOOL fShowMonitorIconInTaskBar; // same as RASENTRY.fShowMonitorIconInTaskBar
  53. RASDEVICETYPE rdt;
  54. WCHAR szDeviceName[RASAPIP_MAX_DEVICE_NAME];
  55. WCHAR szEntryName[RASAPIP_MAX_ENTRY_NAME + 1];
  56. WCHAR szPhonebookPath[MAX_PATH + 1];
  57. } RASENUMENTRYDETAILS, *LPRASENUMENTRYDETAILS;
  58. DWORD
  59. APIENTRY
  60. DwEnumEntryDetails (
  61. IN LPCWSTR lpszPhonebookPath,
  62. OUT LPRASENUMENTRYDETAILS lprasentryname,
  63. IN OUT LPDWORD lpcb,
  64. OUT LPDWORD lpcEntries
  65. );
  66. DWORD
  67. DwCloneEntry(
  68. IN LPCWSTR lpwszPhonebookPath,
  69. IN LPCWSTR lpwszSrcEntryName,
  70. IN LPCWSTR lpwszDstEntryName
  71. );
  72. // Implemented in rasman.dll
  73. //
  74. DWORD
  75. APIENTRY
  76. RasReferenceRasman (
  77. IN BOOL fAttach
  78. );
  79. // Implemented in netcfgx.dll
  80. //
  81. HRESULT
  82. WINAPI
  83. RasAddBindings (
  84. IN OUT UINT* pcIpOut,
  85. IN OUT UINT* pcNbfIn,
  86. IN OUT UINT* pcNbfOut);
  87. HRESULT
  88. WINAPI
  89. RasCountBindings (
  90. OUT UINT* pcIpOut,
  91. OUT UINT* pcNbfIn,
  92. OUT UINT* pcNbfOut);
  93. HRESULT
  94. WINAPI
  95. RasRemoveBindings (
  96. IN OUT UINT* pcIpOutBindings,
  97. IN const GUID* pguidIpOutBindings,
  98. IN OUT UINT* pcNbfIn,
  99. IN OUT UINT* pcNbfOut);
  100. typedef struct _RASCONFIGENDPOINTS
  101. {
  102. DWORD dwSize;
  103. DWORD dwFlags;
  104. INT cTotalEndpoints;
  105. INT cLimitSimultaneousIncomingCalls;
  106. INT cLimitSimultaneousOutgoingCalls;
  107. } RASCONFIGENDPOINTS;
  108. HRESULT
  109. APIENTRY
  110. RasConfigureEndpoints (
  111. IN OUT RASCONFIGENDPOINTS* pInfo
  112. );
  113. //+---------------------------------------------------------------------------
  114. // RAS Event notifications into netman.
  115. //
  116. typedef enum _RASEVENTTYPE
  117. {
  118. ENTRY_ADDED,
  119. ENTRY_DELETED,
  120. ENTRY_MODIFIED,
  121. ENTRY_RENAMED,
  122. ENTRY_CONNECTED,
  123. ENTRY_CONNECTING,
  124. ENTRY_DISCONNECTING,
  125. ENTRY_DISCONNECTED,
  126. INCOMING_CONNECTED,
  127. INCOMING_DISCONNECTED,
  128. SERVICE_EVENT,
  129. } RASEVENTTYPE;
  130. typedef enum _SERVICEEVENTTYPE
  131. {
  132. RAS_SERVICE_STARTED,
  133. RAS_SERVICE_STOPPED,
  134. } SERVICEEVENTTYPE;
  135. typedef enum _RASSERVICE
  136. {
  137. RASMAN,
  138. RASAUTO,
  139. REMOTEACCESS,
  140. } RASSERVICE;
  141. typedef struct _RASEVENT
  142. {
  143. RASEVENTTYPE Type;
  144. union
  145. {
  146. // ENTRY_ADDED,
  147. // ENTRY_MODIFIED,
  148. struct
  149. {
  150. RASENUMENTRYDETAILS Details;
  151. };
  152. // ENTRY_DELETED,
  153. // ENTRY_CONNECTED,
  154. // ENTRY_CONNECTING,
  155. // ENTRY_DISCONNECTING,
  156. // ENTRY_DISCONNECTED,
  157. // INCOMING_CONNECTED,
  158. // INCOMING_DISCONNECTED,
  159. // guidId is valid
  160. // ENTRY_RENAMED,
  161. struct
  162. {
  163. GUID guidId;
  164. WCHAR pszwNewName [RASAPIP_MAX_ENTRY_NAME + 1];
  165. };
  166. // SERVICE_EVENT,
  167. struct
  168. {
  169. SERVICEEVENTTYPE Event;
  170. RASSERVICE Service;
  171. };
  172. };
  173. } RASEVENT;
  174. typedef struct _RASENTRYHEADER
  175. {
  176. DWORD dwEntryType;
  177. WCHAR szEntryName[RASAPIP_MAX_ENTRY_NAME + 1];
  178. } RASENTRYHEADER, *PRASENTRYHEADER;
  179. // Implemented in netman.dll
  180. //
  181. typedef VOID (APIENTRY *RASEVENTNOTIFYPROC)(const RASEVENT* pEvent);
  182. VOID
  183. APIENTRY
  184. RasEventNotify (
  185. const RASEVENT* pEvent);
  186. DWORD
  187. DwEnumEntriesForAllUsers(
  188. DWORD *lpcb,
  189. DWORD *lpcEntries,
  190. RASENTRYHEADER * pRasEntryHeader);
  191. #ifdef __cplusplus
  192. }
  193. #endif
  194. #endif // _RASAPIP_