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.

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