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.

775 lines
22 KiB

  1. /* Copyright (c) 1993, Microsoft Corporation, all rights reserved
  2. **
  3. ** rasppp.h
  4. ** Remote Access PPP
  5. ** Public PPP client API and server API header
  6. */
  7. #ifndef _RASPPP_H_
  8. #define _RASPPP_H_
  9. #include <ras.h>
  10. #include <mprapi.h> // For definitions of IPADDRESSLEN,IPXADDRESSLEN
  11. // and ATADDRESSLEN
  12. #define MAXPPPFRAMESIZE 1500
  13. #define PARAMETERBUFLEN 500
  14. /*---------------------------------------------------------------------------
  15. ** PPP Engine -> Client/DDM messages
  16. **---------------------------------------------------------------------------
  17. */
  18. /* Client PPP configuration values set with RasPppStart.
  19. */
  20. typedef struct _PPP_CONFIG_INFO
  21. {
  22. DWORD dwConfigMask;
  23. DWORD dwCallbackDelay;
  24. }
  25. PPP_CONFIG_INFO;
  26. /* dwConfigMask bit values.
  27. **
  28. ** Note: Due to the implentation of compression and encryption in the drivers,
  29. ** 'UseSwCompression' and 'RequireMsChap' must be set, whenever
  30. ** 'RequireEncryption' is set.
  31. */
  32. #define PPPCFG_UseCallbackDelay 0x00000001
  33. #define PPPCFG_UseSwCompression 0x00000002
  34. #define PPPCFG_ProjectNbf 0x00000004
  35. #define PPPCFG_ProjectIp 0x00000008
  36. #define PPPCFG_ProjectIpx 0x00000010
  37. #define PPPCFG_ProjectAt 0x00000020
  38. #define PPPCFG_NegotiateSPAP 0x00000040
  39. #define PPPCFG_RequireEncryption 0x00000080
  40. #define PPPCFG_NegotiateMSCHAP 0x00000100
  41. #define PPPCFG_UseLcpExtensions 0x00000200
  42. #define PPPCFG_NegotiateMultilink 0x00000400
  43. #define PPPCFG_AuthenticatePeer 0x00000800
  44. #define PPPCFG_RequireStrongEncryption 0x00001000
  45. #define PPPCFG_NegotiateBacp 0x00002000
  46. #define PPPCFG_AllowNoAuthentication 0x00004000
  47. #define PPPCFG_NegotiateEAP 0x00008000
  48. #define PPPCFG_NegotiatePAP 0x00010000
  49. #define PPPCFG_NegotiateMD5CHAP 0x00020000
  50. #define PPPCFG_RequireIPSEC 0x00040000
  51. #define PPPCFG_DisableEncryption 0x00080000
  52. #define PPPCFG_UseLmPassword 0x00200000
  53. #define PPPCFG_AllowNoAuthOnDCPorts 0x00400000
  54. #define PPPCFG_NegotiateStrongMSCHAP 0x00800000
  55. #define PPPCFG_NoCallback 0x01000000
  56. #define PPPCFG_MachineAuthentication 0x02000000
  57. /*
  58. **New config flag added for whistler. This is used
  59. **for ras audio accelerator
  60. */
  61. #define PPPCFG_AudioAccelerator 0x02000000
  62. #define PPP_FAILURE_REMOTE_DISCONNECT 0x00000001
  63. /* PPP stopped message sent by ppp to bring down the link
  64. */
  65. typedef struct _PPP_STOPPED
  66. {
  67. DWORD dwFlags;
  68. }
  69. PPP_STOPPED;
  70. /* PPP error notification returned by RasPppGetInfo.
  71. */
  72. typedef struct _PPP_FAILURE
  73. {
  74. DWORD dwError;
  75. DWORD dwExtendedError; // 0 if none
  76. }
  77. PPP_FAILURE;
  78. /* PPP control protocol results returned by RasPppGetInfo.
  79. */
  80. typedef struct _PPP_NBFCP_RESULT
  81. {
  82. DWORD dwError;
  83. DWORD dwNetBiosError;
  84. CHAR szName[ NETBIOS_NAME_LEN + 1 ];
  85. WCHAR wszWksta[ NETBIOS_NAME_LEN + 1 ];
  86. }
  87. PPP_NBFCP_RESULT;
  88. typedef struct _PPP_IPCP_RESULT
  89. {
  90. DWORD dwError;
  91. BOOL fSendVJHCompression;
  92. BOOL fReceiveVJHCompression;
  93. DWORD dwLocalAddress;
  94. DWORD dwLocalWINSAddress;
  95. DWORD dwLocalWINSBackupAddress;
  96. DWORD dwLocalDNSAddress;
  97. DWORD dwLocalDNSBackupAddress;
  98. DWORD dwRemoteAddress;
  99. DWORD dwRemoteWINSAddress;
  100. DWORD dwRemoteWINSBackupAddress;
  101. DWORD dwRemoteDNSAddress;
  102. DWORD dwRemoteDNSBackupAddress;
  103. }
  104. PPP_IPCP_RESULT;
  105. typedef struct _PPP_IPXCP_RESULT
  106. {
  107. DWORD dwError;
  108. BYTE bLocalAddress[10];
  109. BYTE bRemoteAddress[10];
  110. }
  111. PPP_IPXCP_RESULT;
  112. typedef struct _PPP_ATCP_RESULT
  113. {
  114. DWORD dwError;
  115. DWORD dwLocalAddress;
  116. DWORD dwRemoteAddress;
  117. }
  118. PPP_ATCP_RESULT;
  119. typedef struct _PPP_CCP_RESULT
  120. {
  121. DWORD dwError;
  122. DWORD dwSendProtocol;
  123. DWORD dwSendProtocolData;
  124. DWORD dwReceiveProtocol;
  125. DWORD dwReceiveProtocolData;
  126. }
  127. PPP_CCP_RESULT;
  128. #define PPPLCPO_PFC 0x00000001
  129. #define PPPLCPO_ACFC 0x00000002
  130. #define PPPLCPO_SSHF 0x00000004
  131. #define PPPLCPO_DES_56 0x00000008
  132. #define PPPLCPO_3_DES 0x00000010
  133. typedef struct _PPP_LCP_RESULT
  134. {
  135. /* Valid handle indicates one of the possibly multiple connections to
  136. ** which this connection is bundled. INVALID_HANDLE_VALUE indicates the
  137. ** connection is not bundled.
  138. */
  139. HPORT hportBundleMember;
  140. DWORD dwLocalAuthProtocol;
  141. DWORD dwLocalAuthProtocolData;
  142. DWORD dwLocalEapTypeId;
  143. DWORD dwLocalFramingType;
  144. DWORD dwLocalOptions; // Look at PPPLCPO_*
  145. DWORD dwRemoteAuthProtocol;
  146. DWORD dwRemoteAuthProtocolData;
  147. DWORD dwRemoteEapTypeId;
  148. DWORD dwRemoteFramingType;
  149. DWORD dwRemoteOptions; // Look at PPPLCPO_*
  150. CHAR* szReplyMessage;
  151. }
  152. PPP_LCP_RESULT;
  153. typedef struct _PPP_PROJECTION_RESULT
  154. {
  155. PPP_NBFCP_RESULT nbf;
  156. PPP_IPCP_RESULT ip;
  157. PPP_IPXCP_RESULT ipx;
  158. PPP_ATCP_RESULT at;
  159. PPP_CCP_RESULT ccp;
  160. PPP_LCP_RESULT lcp;
  161. }
  162. PPP_PROJECTION_RESULT;
  163. /* PPP error notification
  164. */
  165. typedef struct _PPPDDM_FAILURE
  166. {
  167. DWORD dwError;
  168. CHAR szUserName[ UNLEN + 1 ];
  169. CHAR szLogonDomain[ DNLEN + 1 ];
  170. }
  171. PPPDDM_FAILURE;
  172. /* Call back configuration information received by PPPDDMMSG routine.
  173. */
  174. typedef struct _PPPDDM_CALLBACK_REQUEST
  175. {
  176. BOOL fUseCallbackDelay;
  177. DWORD dwCallbackDelay;
  178. CHAR szCallbackNumber[ RAS_MaxCallbackNumber + 1 ];
  179. }
  180. PPPDDM_CALLBACK_REQUEST;
  181. /* BAP request to callback the remote peer
  182. */
  183. typedef struct _PPPDDM_BAP_CALLBACK_REQUEST
  184. {
  185. HCONN hConnection;
  186. CHAR szCallbackNumber[ RAS_MaxCallbackNumber + 1 ];
  187. }
  188. PPPDDM_BAP_CALLBACK_REQUEST;
  189. /* Authentication information received by PPPDDMMSG routine.
  190. */
  191. typedef struct _PPPDDM_AUTH_RESULT
  192. {
  193. CHAR szUserName[ UNLEN + 1 ];
  194. CHAR szLogonDomain[ DNLEN + 1 ];
  195. BOOL fAdvancedServer;
  196. }
  197. PPPDDM_AUTH_RESULT;
  198. /* Notification of a new BAP link up
  199. */
  200. typedef struct _PPPDDM_NEW_BAP_LINKUP
  201. {
  202. HRASCONN hRasConn;
  203. }PPPDDM_NEW_BAP_LINKUP;
  204. /* Notification of a new Bundle
  205. */
  206. typedef struct _PPPDDM_NEW_BUNDLE
  207. {
  208. PBYTE pClientInterface;
  209. } PPPDDM_NEW_BUNDLE;
  210. /* Client should invoke EAP UI dialog
  211. */
  212. typedef struct _PPP_INVOKE_EAP_UI
  213. {
  214. DWORD dwEapTypeId;
  215. DWORD dwContextId;
  216. PBYTE pUIContextData;
  217. DWORD dwSizeOfUIContextData;
  218. }PPP_INVOKE_EAP_UI;
  219. /* Client should save per-connection data
  220. */
  221. typedef struct _PPP_SET_CUSTOM_AUTH_DATA
  222. {
  223. BYTE* pConnectionData;
  224. DWORD dwSizeOfConnectionData;
  225. }PPP_SET_CUSTOM_AUTH_DATA;
  226. /* Notification of port addition\removal\usage change
  227. */
  228. typedef struct _PPPDDM_PNP_NOTIFICATION
  229. {
  230. PNP_EVENT_NOTIF PnPNotification;
  231. } PPPDDM_PNP_NOTIFICATION;
  232. /* Notification of PPP session termination
  233. */
  234. typedef struct _PPPDDM_STOPPED
  235. {
  236. DWORD dwReason;
  237. } PPPDDM_STOPPED;
  238. typedef enum _PPP_MSG_ID
  239. {
  240. PPPMSG_PppDone = 0, // PPP negotiated all successfully.
  241. PPPMSG_PppFailure, // PPP failure (fatal error including
  242. // authentication failure with no
  243. // retries), disconnect line.
  244. PPPMSG_AuthRetry, // Authentication failed, have retries.
  245. PPPMSG_Projecting, // Executing specified NCPs.
  246. PPPMSG_ProjectionResult, // NCP completion status.
  247. PPPMSG_CallbackRequest = 5, // Server needs "set-by-caller" number.
  248. PPPMSG_Callback, // Server is about to call you back.
  249. PPPMSG_ChangePwRequest, // Server needs new password (expired).
  250. PPPMSG_LinkSpeed, // Calculating link speed.
  251. PPPMSG_Progress, // A retry or other sub-state of
  252. // progress has been reached in the
  253. // current state.
  254. PPPMSG_Stopped = 10, // Response to RasPppStop indicating
  255. // PPP engine has stopped.
  256. PPPMSG_InvokeEapUI, // Client should invoke EAP UI dialog
  257. PPPMSG_SetCustomAuthData, // Save per-connection data
  258. PPPDDMMSG_PppDone, // PPP negotiated successfully.
  259. PPPDDMMSG_PppFailure, // PPP server failure (fatal error),
  260. // disconnect line.
  261. PPPDDMMSG_CallbackRequest = 15, // Callback client now.
  262. PPPDDMMSG_BapCallbackRequest, // Callback remote BAP peer.
  263. PPPDDMMSG_Authenticated, // Client has been authenticated.
  264. PPPDDMMSG_Stopped, // Response to PppDdmStop indicating
  265. // PPP engine has stopped.
  266. PPPDDMMSG_NewLink, // Client is a new link in a bundle
  267. PPPDDMMSG_NewBundle = 20, // Client is a new bundle
  268. PPPDDMMSG_NewBapLinkUp, // Client is a new BAP link in a bundle
  269. PPPDDMMSG_PnPNotification, // Port is being added or removed or usage
  270. // is being changed, transport being added
  271. // or removed etc.
  272. PPPDDMMSG_PortCleanedUp // PPP port control block is now cleaned up
  273. } PPP_MSG_ID;
  274. /* Client/DDM notifications read with RasPppGetInfo.
  275. */
  276. typedef struct _PPP_MESSAGE
  277. {
  278. struct _PPP_MESSAGE * pNext;
  279. DWORD dwError;
  280. PPP_MSG_ID dwMsgId;
  281. HPORT hPort;
  282. union
  283. {
  284. /* dwMsgId is PPPMSG_ProjectionResult or PPPDDMMSG_Done.
  285. */
  286. PPP_PROJECTION_RESULT ProjectionResult;
  287. /* dwMsgId is PPPMSG_Failure.
  288. */
  289. PPP_FAILURE Failure;
  290. /*
  291. */
  292. PPP_STOPPED Stopped;
  293. /* dwMsgId is PPPMSG_InvokeEapUI
  294. */
  295. PPP_INVOKE_EAP_UI InvokeEapUI;
  296. /* dwMsgId is PPPMSG_SetCustomAuthData
  297. */
  298. PPP_SET_CUSTOM_AUTH_DATA SetCustomAuthData;
  299. /* dwMsgId is PPPDDMMSG_Failure.
  300. */
  301. PPPDDM_FAILURE DdmFailure;
  302. /* dwMsgId is PPPDDMMSG_Authenticated.
  303. */
  304. PPPDDM_AUTH_RESULT AuthResult;
  305. /* dwMsgId is PPPDDMMSG_CallbackRequest.
  306. */
  307. PPPDDM_CALLBACK_REQUEST CallbackRequest;
  308. /* dwMsgId is PPPDDMMSG_BapCallbackRequest.
  309. */
  310. PPPDDM_BAP_CALLBACK_REQUEST BapCallbackRequest;
  311. /* dwMsgId is PPPDDMMSG_NewBapLinkUp
  312. */
  313. PPPDDM_NEW_BAP_LINKUP BapNewLinkUp;
  314. /* dwMsgId is PPPDDMMSG_NewBundle
  315. */
  316. PPPDDM_NEW_BUNDLE DdmNewBundle;
  317. /* dwMsgId is PPPDDMMSG_PnPNotification
  318. */
  319. PPPDDM_PNP_NOTIFICATION DdmPnPNotification;
  320. /* dwMsgId is PPPDDMMSG_Stopped
  321. */
  322. PPPDDM_STOPPED DdmStopped;
  323. }
  324. ExtraInfo;
  325. }
  326. PPP_MESSAGE;
  327. /*---------------------------------------------------------------------------
  328. ** Client/DDM -> Engine messages
  329. **---------------------------------------------------------------------------
  330. */
  331. /* Set of interface handles passed from DIM to PPP
  332. */
  333. typedef struct _PPP_INTERFACE_INFO
  334. {
  335. ROUTER_INTERFACE_TYPE IfType;
  336. HANDLE hIPInterface;
  337. HANDLE hIPXInterface;
  338. CHAR szzParameters[ PARAMETERBUFLEN ];
  339. }
  340. PPP_INTERFACE_INFO;
  341. typedef struct _PPP_BAPPARAMS
  342. {
  343. DWORD dwDialMode;
  344. DWORD dwDialExtraPercent;
  345. DWORD dwDialExtraSampleSeconds;
  346. DWORD dwHangUpExtraPercent;
  347. DWORD dwHangUpExtraSampleSeconds;
  348. }
  349. PPP_BAPPARAMS;
  350. typedef struct _PPP_EAP_UI_DATA
  351. {
  352. DWORD dwContextId;
  353. PBYTE pEapUIData;
  354. DWORD dwSizeOfEapUIData;
  355. }
  356. PPP_EAP_UI_DATA;
  357. #define PPPFLAGS_DisableNetbt 0x00000001
  358. /* Parameters to start client PPP on a port.
  359. */
  360. typedef struct _PPP_START
  361. {
  362. CHAR szPortName[ MAX_PORT_NAME +1 ];
  363. CHAR szUserName[ UNLEN + 1 ];
  364. CHAR szPassword[ PWLEN + 1 ];
  365. CHAR szDomain[ DNLEN + 1 ];
  366. LUID Luid;
  367. PPP_CONFIG_INFO ConfigInfo;
  368. CHAR szzParameters[ PARAMETERBUFLEN ];
  369. BOOL fThisIsACallback;
  370. BOOL fRedialOnLinkFailure;
  371. HANDLE hEvent;
  372. DWORD dwPid;
  373. PPP_INTERFACE_INFO PppInterfaceInfo;
  374. DWORD dwAutoDisconnectTime;
  375. PPP_BAPPARAMS BapParams;
  376. CHAR * pszPhonebookPath;
  377. CHAR * pszEntryName;
  378. CHAR * pszPhoneNumber;
  379. HANDLE hToken;
  380. PRAS_CUSTOM_AUTH_DATA pCustomAuthConnData;
  381. DWORD dwEapTypeId;
  382. BOOL fLogon;
  383. BOOL fNonInteractive;
  384. DWORD dwFlags;
  385. PRAS_CUSTOM_AUTH_DATA pCustomAuthUserData;
  386. PPP_EAP_UI_DATA EapUIData;
  387. CHAR chSeed; //Seed used to encode the password
  388. }
  389. PPP_START;
  390. /* Parameters to stop client/server PPP on a port.
  391. */
  392. typedef struct _PPP_STOP
  393. {
  394. DWORD dwStopReason;
  395. }
  396. PPP_STOP;
  397. /* Parameters to start server PPP on a port.
  398. */
  399. typedef struct _PPPDDM_START
  400. {
  401. DWORD dwAuthRetries;
  402. CHAR szPortName[MAX_PORT_NAME+1];
  403. CHAR achFirstFrame[ MAXPPPFRAMESIZE ];
  404. DWORD cbFirstFrame;
  405. }
  406. PPPDDM_START;
  407. /* Parameters to notify PPP that callback is complete.
  408. */
  409. typedef struct _PPP_CALLBACK_DONE
  410. {
  411. CHAR szCallbackNumber[ MAX_PHONE_NUMBER_LEN + 1 ];
  412. }
  413. PPP_CALLBACK_DONE;
  414. /* Parameters to notify server of "set-by-caller" callback options.
  415. */
  416. typedef struct _PPP_CALLBACK
  417. {
  418. CHAR szCallbackNumber[ RAS_MaxCallbackNumber + 1 ];
  419. }
  420. PPP_CALLBACK;
  421. /* Parameters to notify server of new password after it's told client the
  422. ** password has expired. The user name and old password are also provided
  423. ** since they are required to support the auto-logon case.
  424. */
  425. typedef struct _PPP_CHANGEPW
  426. {
  427. CHAR szUserName[ UNLEN + 1 ];
  428. CHAR szOldPassword[ PWLEN + 1 ];
  429. CHAR szNewPassword[ PWLEN + 1 ];
  430. CHAR chSeed; //Seed used to encode the password
  431. }
  432. PPP_CHANGEPW;
  433. /* Parameters to notify server of new authentication credentials after it's
  434. ** told client the original credentials are invalid but a retry is allowed.
  435. */
  436. typedef struct _PPP_RETRY
  437. {
  438. CHAR szUserName[ UNLEN + 1 ];
  439. CHAR szPassword[ PWLEN + 1 ];
  440. CHAR szDomain[ DNLEN + 1 ];
  441. CHAR chSeed; //Seed used to encode the password
  442. }
  443. PPP_RETRY;
  444. /*
  445. ** Parameters to notify PPP that a packet has arrived from the peer
  446. */
  447. typedef struct _PPP_RECEIVE
  448. {
  449. DWORD dwNumBytes; // The number of bytes in the buffer
  450. BYTE* pbBuffer; // The data sent by the peer
  451. }
  452. PPP_RECEIVE;
  453. /*
  454. ** Parameters to notify PPP that a BAP event (add/drop link) has fired
  455. */
  456. typedef struct _PPP_BAP_EVENT
  457. {
  458. BOOL fAdd; // Add a link iff TRUE
  459. BOOL fTransmit; // Send threshold iff TRUE
  460. DWORD dwSendPercent; // Send bandwidth utilization
  461. DWORD dwRecvPercent; // Recv bandwidth utilization
  462. }
  463. PPP_BAP_EVENT;
  464. typedef struct _PPP_BAP_CALLBACK_RESULT
  465. {
  466. DWORD dwCallbackResultCode;
  467. }
  468. PPP_BAP_CALLBACK_RESULT;
  469. typedef struct _PPP_DHCP_INFORM
  470. {
  471. WCHAR* wszDevice;
  472. DWORD dwNumDNSAddresses;
  473. DWORD* pdwDNSAddresses;
  474. DWORD dwWINSAddress1;
  475. DWORD dwWINSAddress2;
  476. DWORD dwSubnetMask;
  477. CHAR* szDomainName;
  478. PBYTE pbDhcpRoutes;
  479. }
  480. PPP_DHCP_INFORM;
  481. typedef struct _PPP_PROTOCOL_EVENT
  482. {
  483. USHORT usProtocolType;
  484. ULONG ulFlags;
  485. }
  486. PPP_PROTOCOL_EVENT;
  487. typedef struct _PPP_IP_ADDRESS_LEASE_EXPIRED
  488. {
  489. ULONG nboIpAddr;
  490. }
  491. PPP_IP_ADDRESS_LEASE_EXPIRED;
  492. typedef struct _PPP_POST_LINEDOWN
  493. {
  494. VOID * pPcb; //This is required because PCB has been already removed from the
  495. //table
  496. }PPP_POST_LINE_DOWN;
  497. /* Client/DDM->Engine messages.
  498. */
  499. typedef struct _PPPE_MESSAGE
  500. {
  501. DWORD dwMsgId;
  502. HPORT hPort;
  503. HCONN hConnection;
  504. union
  505. {
  506. PPP_START Start; // PPPEMSG_Start
  507. PPP_STOP Stop; // PPPEMSG_Stop
  508. PPP_CALLBACK Callback; // PPPEMSG_Callback
  509. PPP_CHANGEPW ChangePw; // PPPEMSG_ChangePw
  510. PPP_RETRY Retry; // PPPEMSG_Retry
  511. PPP_RECEIVE Receive; // PPPEMSG_Receive
  512. PPP_BAP_EVENT BapEvent; // PPPEMSG_BapEvent
  513. PPPDDM_START DdmStart; // PPPEMSG_DdmStart
  514. PPP_CALLBACK_DONE CallbackDone; // PPPEMSG_DdmCallbackDone
  515. PPP_INTERFACE_INFO InterfaceInfo; // PPPEMSG_DdmInterfaceInfo
  516. PPP_BAP_CALLBACK_RESULT
  517. BapCallbackResult; // PPPEMSG_DdmBapCallbackResult
  518. PPP_DHCP_INFORM DhcpInform; // PPPEMSG_DhcpInform
  519. PPP_EAP_UI_DATA EapUIData; // PPPEMSG_EapUIData
  520. PPP_PROTOCOL_EVENT ProtocolEvent; // PPPEMSG_ProtocolEvent
  521. PPP_IP_ADDRESS_LEASE_EXPIRED // PPPEMSG_IpAddressLeaseExpired
  522. IpAddressLeaseExpired;
  523. PPP_POST_LINE_DOWN PostLineDown; //PPPEMSG_PostLineDown
  524. }
  525. ExtraInfo;
  526. }
  527. PPPE_MESSAGE;
  528. /* PPPE_MESSAGE dwMsgId codes for client and DDM sessions.
  529. */
  530. typedef enum _PPPE_MSG_ID
  531. {
  532. PPPEMSG_Start, // Starts client PPP on a port.
  533. PPPEMSG_Stop, // Stops PPP on a port.
  534. PPPEMSG_Callback, // Provides "set-by-caller" number to server.
  535. PPPEMSG_ChangePw, // Provides new password (expired) to server.
  536. PPPEMSG_Retry, // Provides new credentials for authentication.
  537. PPPEMSG_Receive, // A packet has arrived.
  538. PPPEMSG_LineDown, // The line has gone down.
  539. PPPEMSG_ListenResult, // The result of a call to RasPortListen
  540. PPPEMSG_BapEvent, // A BAP event (add/drop link) has fired.
  541. PPPEMSG_DdmStart, // Starts server PPP on a port.
  542. PPPEMSG_DdmCallbackDone, // Notify PPP that callback is complete.
  543. PPPEMSG_DdmInterfaceInfo, // Interface handles from DDM
  544. PPPEMSG_DdmBapCallbackResult,// Result of a BAP callback request.
  545. PPPEMSG_DhcpInform, // The result of a DHCPINFORM
  546. PPPEMSG_EapUIData, // Data from EAP interactive UI
  547. PPPEMSG_DdmChangeNotification, // Change notification in DDM
  548. PPPEMSG_ProtocolEvent, // Protocol added/removed notification
  549. PPPEMSG_IpAddressLeaseExpired, // IP address lease expired. Used by rasiphlp
  550. PPPEMSG_PostLineDown //Accounting completed after linedown
  551. } PPPE_MSG_ID;
  552. //
  553. // Prototypes of function exported by RASPPP.DLL for use by RASMAN
  554. //
  555. DWORD APIENTRY
  556. StartPPP(
  557. DWORD NumPorts
  558. /*,DWORD (*SendPPPMessageToRasman)( PPP_MESSAGE * PppMsg )*/
  559. );
  560. DWORD APIENTRY
  561. StopPPP(
  562. HANDLE hEventStopPPP
  563. );
  564. DWORD APIENTRY
  565. SendPPPMessageToEngine(
  566. IN PPPE_MESSAGE* pMessage
  567. );
  568. //
  569. // PPP client side Apis
  570. //
  571. DWORD APIENTRY
  572. RasPppStop(
  573. IN HPORT hPort
  574. );
  575. DWORD APIENTRY
  576. RasPppCallback(
  577. IN HPORT hPort,
  578. IN CHAR* pszCallbackNumber
  579. );
  580. DWORD APIENTRY
  581. RasPppChangePassword(
  582. IN HPORT hPort,
  583. IN CHAR* pszUserName,
  584. IN CHAR* pszOldPassword,
  585. IN CHAR* pszNewPassword
  586. );
  587. DWORD APIENTRY
  588. RasPppGetInfo(
  589. IN HPORT hPort,
  590. OUT PPP_MESSAGE* pMsg
  591. );
  592. DWORD APIENTRY
  593. RasPppRetry(
  594. IN HPORT hPort,
  595. IN CHAR* pszUserName,
  596. IN CHAR* pszPassword,
  597. IN CHAR* pszDomain
  598. );
  599. DWORD APIENTRY
  600. RasPppStart(
  601. IN HPORT hPort,
  602. IN CHAR* pszPortName,
  603. IN CHAR* pszUserName,
  604. IN CHAR* pszPassword,
  605. IN CHAR* pszDomain,
  606. IN LUID* pLuid,
  607. IN PPP_CONFIG_INFO* pConfigInfo,
  608. IN LPVOID pPppInterfaceInfo,
  609. IN CHAR* pszzParameters,
  610. IN BOOL fThisIsACallback,
  611. IN HANDLE hEvent,
  612. IN DWORD dwAutoDisconnectTime,
  613. IN BOOL fRedialOnLinkFailure,
  614. IN PPP_BAPPARAMS* pBapParams,
  615. IN BOOL fNonInteractive,
  616. IN DWORD dwEapTypeId,
  617. IN DWORD dwFlags
  618. );
  619. //
  620. // DDM API prototypes
  621. //
  622. DWORD
  623. PppDdmInit(
  624. IN VOID (*SendPPPMessageToDdm)( PPP_MESSAGE * PppMsg ),
  625. IN DWORD dwServerFlags,
  626. IN DWORD dwLoggingLevel,
  627. IN DWORD dwNASIpAddress,
  628. IN BOOL fRadiusAuthentication,
  629. IN LPVOID lpfnRasAuthProviderAuthenticateUser,
  630. IN LPVOID lpfnRasAuthProviderFreeAttributes,
  631. IN LPVOID lpfnRasAcctProviderStartAccounting,
  632. IN LPVOID lpfnRasAcctProviderInterimAccounting,
  633. IN LPVOID lpfnRasAcctProviderStopAccounting,
  634. IN LPVOID lpfnRasAcctProviderFreeAttributes,
  635. IN LPVOID lpfnGetNextAccountingSessionId
  636. );
  637. VOID
  638. PppDdmDeInit(
  639. );
  640. DWORD
  641. PppDdmCallbackDone(
  642. IN HPORT hPort,
  643. IN WCHAR* pwszCallbackNumber
  644. );
  645. DWORD
  646. PppDdmStart(
  647. IN HPORT hPort,
  648. IN WCHAR* wszPortName,
  649. IN CHAR* pchFirstFrame,
  650. IN DWORD cbFirstFrame,
  651. IN DWORD dwAuthRetries
  652. );
  653. DWORD
  654. PppDdmStop(
  655. IN HPORT hPort,
  656. IN DWORD dwStopReason
  657. );
  658. DWORD
  659. PppDdmChangeNotification(
  660. IN DWORD dwServerFlags,
  661. IN DWORD dwLoggingLevel
  662. );
  663. DWORD
  664. PppDdmSendInterfaceInfo(
  665. IN HCONN hConnection,
  666. IN PPP_INTERFACE_INFO * pInterfaceInfo
  667. );
  668. DWORD
  669. PppDdmBapCallbackResult(
  670. IN HCONN hConnection,
  671. IN DWORD dwBapCallbackResultCode
  672. );
  673. #endif // _RASPPP_H_