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.

576 lines
22 KiB

  1. /*****************************************************************************\
  2. * *
  3. * rnap.h - Remote Network Access (RNA) private interface *
  4. * *
  5. * Version 1.00 *
  6. * *
  7. * Copyright (c) 1992-1993, Microsoft Corp. All rights reserved. *
  8. * *
  9. ******************************************************************************/
  10. #ifndef _RNAP_H_
  11. #define _RNAP_H_
  12. #define RAS_MaxPortName 128
  13. #define RAS_MaxComment 255
  14. #define RAS_MaxCountry 3
  15. #define RAS_MaxAreaCode 10
  16. #define RAS_MaxLocal 36
  17. #define RAS_MaxExtension 5
  18. #define RAS_MaxSMMDesc 63
  19. #define RAS_MaxProtocolDesc 63
  20. /******************************************************************************
  21. Private RASCONNSTATE
  22. ******************************************************************************/
  23. #define RASCS_PrivateStart RASCS_Disconnected+1
  24. #define RASCS_StartClosing RASCS_PrivateStart
  25. #define RASCS_LoggingOff RASCS_PrivateStart+1
  26. #define RASCS_Closing RASCS_PrivateStart+2
  27. #define RASCS_Closed RASCS_PrivateStart+3
  28. #define RASCS_Terminating RASCS_PrivateStart+4
  29. /******************************************************************************
  30. Registry key paths
  31. ******************************************************************************/
  32. #define REGSTR_KEY_RNA "RemoteAccess"
  33. #define REGSTR_PATH_RNA REGSTR_PATH_SERVICES"\\"REGSTR_KEY_RNA
  34. #define REGSTR_VAL_IMPLICIT "EnableImplicit"
  35. #define REGSTR_VAL_DIALUI "DialUI"
  36. #define REGSTR_KEY_PROF REGSTR_KEY_RNA"\\Profile"
  37. #define REGSTR_VAL_USER "User"
  38. #define REGSTR_VAL_DOMAIN "Domain"
  39. #define REGSTR_VAL_NUMBER "Number"
  40. #define REGSTR_VAL_SCRIPT "PPPScript"
  41. #define REGSTR_VAL_MODE "Mode"
  42. #define REGSTR_VAL_TERM "Terminal"
  43. #define REGSTR_VAL_AUTODIALDLL "AutodialDllName"
  44. #define REGSTR_VAL_AUTODIALFN "AutodialFcnName"
  45. #define REGSTR_VAL_ML "MultiLink"
  46. /******************************************************************************
  47. Related RNA module names and internal exported
  48. ******************************************************************************/
  49. #define RNA_SERVER_MOD_NAME "RNASERV.DLL"
  50. #define CALLER_ACCESS_FUNC_NAME "CallerAccess"
  51. #define RNADLL_MODULE_NAME "RASAPI32.DLL"
  52. #define RNASCRIPT_MODULE_NAME "SMMSCRPT.DLL"
  53. #define RUN_SCRIPT_FUNC_NAME "RunRnaScript"
  54. #define RNAUI_MODULE_NAME "RNAUI.DLL"
  55. #define CREATE_ENTRY_FUNC_NAME "Remote_CreateEntry"
  56. #define EDIT_ENTRY_FUNC_NAME "Remote_EditEntry"
  57. #define NOTIFY_FUNC_NAME "Remote_Notify"
  58. /******************************************************************************
  59. Asynchronous event notification from RNA engine via WM_RASDIALEVENT
  60. ******************************************************************************/
  61. #define RNA_ASYNCEVENT 0xFFFFFFFF // wParam value
  62. #define RNA_ADD_DEVICE 0 // A new device was added
  63. #define RNA_DEL_DEVICE 1 // A new device was removed
  64. #define RNA_REINIT_DEVICE 2 // The device needs to be reintied
  65. #define RNA_SHUTDOWN 3 // The engine needs to shutdown
  66. #define RNA_TRANSLATECHANGE 4 // Translate address caps changed
  67. /******************************************************************************
  68. Communication with RNA engine
  69. ******************************************************************************/
  70. #define CLIENT_CONNECTION 1 // Client connection
  71. #define SERVER_CONNECTION 2 // Server connection
  72. #define WM_RNAMSG WM_USER+10
  73. #define RL_MINMSG WM_RNAMSG
  74. #define RL_CREATE RL_MINMSG // create a connection
  75. #define RL_TERMINATE RL_MINMSG+1 // terminate the connection
  76. #define RL_CONNECTED RL_MINMSG+2 // a connection is active
  77. #define RL_DISCONNECTED RL_MINMSG+3 // a connection is not active
  78. #define RL_SUPRV RL_MINMSG+4 // initialize supervisor
  79. #define RL_ACTIVATE RL_MINMSG+5 // activate supervisor change
  80. #define RL_REINIT RL_MINMSG+6 // Reinitialize the engine
  81. #define RL_REG_DEVCHG RL_MINMSG+7 // Register device notification
  82. #define RL_GET_COUNT RL_MINMSG+8 // Get the count
  83. #define RL_GW_NOTIFY RL_MINMSG+9 // Gateway callback
  84. /******************************************************************************
  85. Communication with Dial engine
  86. ******************************************************************************/
  87. #define DL_MINMSG WM_RNAMSG
  88. #define DL_DIALEVENT DL_MINMSG // continue dial-up sequence
  89. #define DL_DISCONNECTED DL_MINMSG+1 // a connection is not active
  90. #define DL_AUTHENTICATE DL_MINMSG+2 // auth module sent a message
  91. #define DL_CONNECTED DL_MINMSG+3 // a new connection is active
  92. #define DL_CLOSE DL_MINMSG+4 // Terminate the connection window
  93. #define DL_MAC_MSG DL_MINMSG+5 // MAC requests disconnection
  94. #define DL_RECONNECT DL_MINMSG+6 // a connection needs reconnect
  95. #define DL_NOTIFYICON DL_MINMSG+7 // tray icon notification
  96. #define DL_SHOW_STAT DL_MINMSG+8 // display the status dialog
  97. //****************************************************************************
  98. // Communication with gateway manager
  99. //****************************************************************************
  100. #define GW_MINMSG WM_RNAMSG
  101. #define GW_DIALEVENT DL_DIALEVENT // !!WARNING!! shared message
  102. #define GW_CONNECTED GW_MINMSG + 1
  103. #define GW_DISCONNECTED GW_MINMSG + 2
  104. #define GW_LOG GW_MINMSG + 3
  105. #define GW_CLOSE DL_CLOSE // !!WARNING!! shared message
  106. #define GW_MAC_MSG DL_MAC_MSG // MAC requests disconnection
  107. #define MAX_AUTODISCONNECT 60000 // server autodisconnect sec.
  108. //
  109. // Gateway to Supervisor Communication
  110. //
  111. LRESULT WINAPI DialInMessage(HWND, UINT, WPARAM, LPARAM);
  112. /******************************************************************************
  113. Request for services from RNADLL
  114. ******************************************************************************/
  115. DWORD WINAPI RnaEngineRequest (UINT uCommand, DWORD dwParam);
  116. DWORD WINAPI DialEngineRequest (UINT uCommand, DWORD dwParam1, DWORD dwParam2);
  117. DWORD WINAPI SuprvRequest (UINT uCommand, DWORD dwParam1, DWORD dwParam2);
  118. #define RA_MINCMD 0
  119. #define RA_LOAD RA_MINCMD // Notify Rna process is a loader
  120. #define RA_INIT RA_MINCMD+1 // Initialize the rna engine
  121. #define RA_TERMINATE RA_MINCMD+2 // rna engine terminated
  122. #define RA_REG_DEVCHG RA_MINCMD+3 // register dev change notification
  123. #define RA_DEREG_DEVCHG RA_MINCMD+4 // deregister dev change notification
  124. #define RA_REINIT RA_MINCMD+5 // Reinitialize the rna engine
  125. #define RA_ADD_DEVICE RA_MINCMD+6 // Device added
  126. #define RA_DEL_DEVICE RA_MINCMD+7 // Device removed
  127. #define RA_GET_PROP RA_MINCMD+8 // Get property page
  128. #define RA_MAXCMD RA_MINCMD+50
  129. #define GA_MINCMD RA_MAXCMD+1
  130. #define GA_INIT_SUPRV GA_MINCMD // Initialize supervisor
  131. #define GA_ACTIVE_SUPRV GA_MINCMD+1 // Activate supervisor
  132. #define GA_SHUTDOWN RA_MINCMD+2 // Shutdown the system
  133. #define GA_LOG_SUPRV GA_MINCMD+3 // Register log event
  134. #define GA_LOGON_INFO GA_MINCMD+4 // Logon session information
  135. #define GA_DISCONNECT GA_MINCMD+5 // Terminate logon session
  136. #define GA_START_SUPRV GA_MINCMD+6 // Start the host
  137. #define GA_STOP_SUPRV GA_MINCMD+7 // Stop the host
  138. #define GA_DEV_CHANGE GA_MINCMD+8 // A device changed
  139. #define GA_GET_STATS GA_MINCMD+9 // Get the server information
  140. #define GA_COUNT_ACTIVE GA_MINCMD+10 // Count the active connection
  141. #define GA_MAXCMD GA_MINCMD+50
  142. #define DA_MINCMD GA_MAXCMD+1
  143. #define DA_CONNINFO DA_MINCMD // connection information
  144. #define DA_DISCONNECT DA_MINCMD+1 // disconnect an active connection
  145. #define DA_RECONNECT DA_MINCMD+2 // reconnect a dropped connection
  146. #define DA_NEWCONN DA_MINCMD+3 // a new connection is added
  147. #define DA_SHUTDOWN DA_MINCMD+4 // Shutdown the system
  148. #define DA_NEWEVENT DA_MINCMD+5 // Notify a new event
  149. #define DA_COMPASYN DA_MINCMD+6 // Notify a async operation completion
  150. #define DA_DEV_CHANGE DA_MINCMD+7 // A device changed
  151. #define DA_GET_UI_WND DA_MINCMD+8 // Get the UI window
  152. #define DA_SET_WND_POS DA_MINCMD+9 // Set the status window position
  153. #define DA_GETSTATS DL_MINMSG+10 // a connection needs stats
  154. #define DA_GET_CONNSTAT DL_MINMSG+11 // Get current connection status
  155. #define DA_GET_SUBENTRY DL_MINMSG+12 // Get sub-entry information
  156. #define DA_DIAL_SUBENTRY DL_MINMSG+13 // Dial a sub-entry
  157. #define DA_MAXCMD DA_MINCMD+50
  158. typedef struct tagConnInfo {
  159. char szEntryName[RAS_MaxEntryName+1];
  160. DWORD dwRate;
  161. char szSMMDesc[RAS_MaxSMMDesc+1];
  162. DWORD fdwProtocols;
  163. char szDeviceType[RAS_MaxDeviceType+1];
  164. char szDeviceName[RAS_MaxDeviceName+1];
  165. } CONNINFO, *PCONNINFO, FAR* LPCONNINFO;
  166. typedef struct tagMLInfo {
  167. BOOL fEnabled;
  168. DWORD cSubEntries;
  169. } MLINFO, *PMLINFO, FAR* LPMLINFO;
  170. typedef struct tagSubConnInfo {
  171. DWORD iSubEntry;
  172. MLINFO mli;
  173. } SUBCONNINFO, *PSUBCONNINFO, FAR* LPSUBCONNINFO;
  174. #define PARENT_ENTRY_ID 0xFFFFFFFF
  175. // Flags for protocols in fdwProtocols
  176. //
  177. #define PROTOCOL_AMB 0x00000001
  178. #define PROTOCOL_PPPNBF 0x00000002
  179. #define PROTOCOL_PPPIPX 0x00000004
  180. #define PROTOCOL_PPPIP 0x00000008
  181. //****************************************************************************
  182. // RNAAPP Command line interface
  183. //****************************************************************************
  184. #define RNAAPP_EXE_NAME "rnaapp"
  185. #define LOAD_REQ "-l" // RnaDll loads Rnaapp
  186. //****************************************************************************
  187. // RNAUI Private Interface
  188. //****************************************************************************
  189. #define DT_NULLMODEM "null"
  190. #define DT_MODEM "modem"
  191. #define DT_ISDN "isdn"
  192. #define DT_UNKNOWN "unknown"
  193. #define DIRECTCC "Direct Cable Connection Host Logon"
  194. typedef HICON FAR* LPHICON;
  195. // SMM Usage type flags
  196. //
  197. #define CLIENT_SMM 0x00000001
  198. #define SERVER_SMM 0x00000002
  199. typedef struct tagSMMCFG {
  200. DWORD dwSize;
  201. DWORD fdwOptions;
  202. DWORD fdwProtocols;
  203. } SMMCFG, *PSMMCFG, FAR* LPSMMCFG;
  204. typedef struct tagSMMINFO {
  205. char szSMMType[RNA_MaxSMMType+1];
  206. SMMCFG SMMConfig;
  207. } SMMINFO, *PSMMINFO, FAR* LPSMMINFO;
  208. typedef struct tagIPData {
  209. DWORD dwSize;
  210. DWORD fdwTCPIP;
  211. DWORD dwIPAddr;
  212. DWORD dwDNSAddr;
  213. DWORD dwDNSAddrAlt;
  214. DWORD dwWINSAddr;
  215. DWORD dwWINSAddrAlt;
  216. } IPDATA, *PIPDATA, FAR *LPIPDATA;
  217. typedef struct tagSMMData {
  218. struct tagSMMData *pNext;
  219. SMMINFO smmi;
  220. DWORD fdwOptAllow;
  221. DWORD fdwProtAllow;
  222. IPDATA ipData;
  223. } SMMDATA, *PSMMDATA, FAR *LPSMMDATA;
  224. // Flags for the fdwTCPIP field
  225. //
  226. #define IPF_IP_SPECIFIED 0x00000001
  227. #define IPF_NAME_SPECIFIED 0x00000002
  228. #define IPF_NO_COMPRESS 0x00000004
  229. #define IPF_NO_WAN_PRI 0x00000008
  230. typedef struct tagDEVICEINFO {
  231. DWORD dwVersion;
  232. UINT uSize;
  233. char szDeviceName[RAS_MaxDeviceName+1];
  234. char szDeviceType[RAS_MaxDeviceType+1];
  235. } DEVICEINFO, *PDEVICEINFO, FAR* LPDEVICEINFO;
  236. typedef struct tagDevConfig {
  237. HICON hIcon;
  238. SMMINFO smmi;
  239. DEVICEINFO di;
  240. } DEVCONFIG, *PDEVCONFIG, FAR* LPDEVCONFIG;
  241. typedef struct tagPhoneNum {
  242. DWORD dwCountryID;
  243. DWORD dwCountryCode;
  244. char szAreaCode[RAS_MaxAreaCode+1];
  245. char szLocal[RAS_MaxLocal+1];
  246. char szExtension[RAS_MaxExtension+1];
  247. } PHONENUM, *PPHONENUM, FAR *LPPHONENUM;
  248. typedef struct tagCountryInfo {
  249. DWORD dwCountryID;
  250. DWORD dwNextCountryID;
  251. DWORD dwCountryCode;
  252. DWORD dwCountryNameOffset;
  253. } COUNTRYINFO, *PCOUNTRYINFO, FAR* LPCOUNTRYINFO;
  254. typedef struct tagConnEntry {
  255. PSTR pszEntry;
  256. PHONENUM pn;
  257. PDEVCONFIG pDevConfig;
  258. DWORD dwFlags;
  259. DWORD cSubEntry;
  260. } CONNENTRY, *PCONNENTRY, FAR* LPCONNENTRY;
  261. #define CESZENTRY(pCE) ((PSTR)(((PBYTE)pCE)+sizeof(CONNENTRY)))
  262. #define DEVCONFIGSIZE(diSize) (diSize+(sizeof(DEVCONFIG)-sizeof(DEVICEINFO)))
  263. typedef struct tagSubConnEntry {
  264. DWORD dwSize;
  265. DWORD dwFlags;
  266. char szDeviceType[RAS_MaxDeviceType+1];
  267. char szDeviceName[RAS_MaxDeviceName+1];
  268. char szLocal[RAS_MaxPhoneNumber+1];
  269. } SUBCONNENTRY, *PSUBCONNENTRY, FAR* LPSUBCONNENTRY;
  270. typedef struct tagConnEntDlg {
  271. PCONNENTRY pConnEntry;
  272. PDEVCONFIG pDevConfig;
  273. PSMMDATA pSMMList;
  274. PSMMDATA pSMMType;
  275. PMLINFO pmli;
  276. DWORD cmlChannel;
  277. } CONNENTDLG, *PCONNENTDLG, FAR *LPCONNENTDLG;
  278. typedef struct tagRNAPropPage {
  279. UINT idPage;
  280. HMODULE hModule;
  281. UINT idRes;
  282. DLGPROC pfn;
  283. } RNAPROPPAGE, *PRNAPROPPAGE, FAR *LPRNAPROPPAGE;
  284. #define SRV_TYPE_PAGE 0 // Server Type page id
  285. DWORD WINAPI RnaEnumConnEntries(LPSTR lpBuf, UINT cb, LPDWORD lpcEntries);
  286. PCONNENTRY WINAPI RnaGetConnEntry(LPSTR szEntry, BOOL bNeedIcon, BOOL fDevice);
  287. BOOL WINAPI RnaFreeConnEntry(PCONNENTRY);
  288. DWORD WINAPI RnaSaveConnEntry(PCONNENTRY lpConnEntry);
  289. BOOL WINAPI RnaDeleteConnEntry(LPSTR szEntry);
  290. DWORD WINAPI RnaRenameConnEntry(LPSTR szOldEntry, LPSTR szNewEntry);
  291. DWORD WINAPI RnaValidateEntryName (LPSTR szEntry, BOOL fNew);
  292. DWORD WINAPI RnaEnumCountryInfo (LPCOUNTRYINFO, LPDWORD);
  293. DWORD WINAPI RnaGetAreaCodeList (LPSTR, LPDWORD);
  294. DWORD WINAPI RnaGetCurrentCountry (LPDWORD);
  295. DWORD WINAPI RnaEnumDevices (LPBYTE lpBuff, LPDWORD lpcbSize,
  296. LPDWORD lpcEntries);
  297. PDEVCONFIG WINAPI RnaGetDefaultDevConfig (LPSTR szDeviceName);
  298. DWORD WINAPI RnaGetDeviceInfo(LPSTR szDeviceName, LPDEVICEINFO lpdi);
  299. DWORD WINAPI RnaGetDeviceChannel (LPSTR szDeviceName);
  300. PDEVCONFIG WINAPI RnaBuildDevConfig (PDEVCONFIG pDevConfig, HICON hIcon, BOOL bNeedIcon);
  301. DWORD WINAPI RnaDevConfigDlg(HWND hWnd, PDEVCONFIG pDevConfig);
  302. BOOL WINAPI RnaFreeDevConfig(PDEVCONFIG pDevConfig);
  303. DWORD WINAPI RnaSMMInfoDialog(HWND hWnd, LPSTR szEntryName,
  304. LPSTR szDeviceName,
  305. LPSMMINFO lpsmmi, DWORD dwUsage);
  306. DWORD WINAPI RnaEnumerateMacNames (LPSTR szDeviceName, LPBYTE lpBuff,
  307. LPDWORD lpcb);
  308. DWORD WINAPI RnaEnumerateSMMNames (LPSTR szDeviceName, LPBYTE lpBuff,
  309. LPDWORD lpcb, DWORD dwType);
  310. DWORD WINAPI RnaGetDefaultSMMInfo(LPSTR szDeviceName, LPSMMINFO lpsmmi,
  311. BOOL fClient);
  312. DWORD WINAPI RnaGetIPInfo(LPSTR szEntryName, PIPDATA pIpData,
  313. BOOL fDefault);
  314. DWORD WINAPI RnaSetIPInfo(LPSTR szEntryName, PIPDATA pIpData);
  315. DWORD WINAPI RnaLogon(HWND);
  316. DWORD WINAPI RnaActivateEngine();
  317. DWORD WINAPI RnaDeactivateEngine();
  318. DWORD WINAPI RnaUIDial(HWND, LPSTR);
  319. DWORD WINAPI RnaImplicitDial(HWND, LPSTR);
  320. DWORD WINAPI RnaFindDriver(HWND hwnd, LPSTR lpszDriverList);
  321. DWORD WINAPI RnaInstallDriver (HWND hwnd, LPSTR lpszDriverList);
  322. DWORD WINAPI RnaExportEntry (LPSTR szEntryName, LPSTR szFileName);
  323. DWORD WINAPI RnaImportEntry (LPSTR szFileName, LPBYTE lpBuff, DWORD cb);
  324. DWORD WINAPI RnaValidateImportEntry (LPSTR szFileName);
  325. DWORD WINAPI RnaGetMultiLinkInfo (LPSTR, LPMLINFO);
  326. DWORD WINAPI RnaSetMultiLinkInfo (LPSTR, LPMLINFO);
  327. DWORD WINAPI RnaGetSubEntry (LPSTR, DWORD, PSUBCONNENTRY, LPDWORD);
  328. DWORD WINAPI RnaSetSubEntry (LPSTR, DWORD, PSUBCONNENTRY, DWORD);
  329. #define LOG_INACTIVE 0
  330. #define LOG_DISCONNECTION 1
  331. #define LOG_ACTIVE 2
  332. #define LOG_LISTEN 3
  333. #define LOG_AUTH_TIMEOUT 4
  334. #define LOG_CALLBACK 5
  335. #define LOG_ANSWERED 6
  336. #define LOG_ERROR 7
  337. typedef struct tagLOGINFO {
  338. LPSTR szPortName;
  339. HWND hwnd;
  340. UINT uLogEvent;
  341. } LOGINFO, *PLOGINFO, FAR* LPLOGINFO;
  342. typedef struct tagGWLOGONINFO {
  343. LPSTR szPortName;
  344. char szUserName[UNLEN+1];
  345. SYSTEMTIME sysTime;
  346. } GWLOGONINFO, *PGWLOGONINFO, FAR* LPGWLOGONINFO;
  347. typedef enum tagRNASECURITY { RNAPASSWORD, RNAPASSTHROUGH } RNASECURITY;
  348. #define RNAADMIN_DIALIN 1
  349. #define USERTYPE_USER 0x00000001
  350. #define USERTYPE_GROUP 0x00000002
  351. #define USERTYPE_WORLD 0x00000004
  352. typedef struct tagUSER_ACCESS {
  353. RNAACCESSTYPE accesstype;
  354. BOOL fUseCallbacks;
  355. DWORD dwUsertype;
  356. } USERACCESS, *PUSERACCESS, FAR *LPUSERACCESS;
  357. typedef struct tagPORTSTATS
  358. {
  359. char szPortName[RAS_MaxPortName+1];
  360. char szDeviceType[RAS_MaxDeviceType+1];
  361. BOOL fAccessEnabled;
  362. UINT TimeOut;
  363. SMMINFO smmi;
  364. char szComment[RAS_MaxComment+1];
  365. BOOL AdminAccess;
  366. RNASECURITY security;
  367. union {
  368. struct tagPassthru {
  369. DWORD cUsers;
  370. DWORD dwOffsetUsers; }
  371. Passthru;
  372. struct tagPassword {
  373. USERACCESS shareaccess;
  374. char szPassword[PWLEN+1]; }
  375. Password;
  376. };
  377. } RNAPORTSTATS, *PRNAPORTSTATS, FAR *LPRNAPORTSTATS;
  378. DWORD WINAPI SuprvEnumAccessInfo (LPBYTE, LPINT, LPINT);
  379. DWORD WINAPI SuprvGetAccessInfo (LPSTR, LPRNAPORTSTATS, LPDWORD);
  380. DWORD WINAPI SuprvSetAccessInfo (LPRNAPORTSTATS);
  381. DWORD WINAPI SuprvInitialize (LPDWORD);
  382. DWORD WINAPI SuprvDeInitialize();
  383. DWORD WINAPI SuprvGetAdminConfig();
  384. DWORD WINAPI RnaSetCallbackList (DWORD, LPSTR, LPSTR, int);
  385. DWORD WINAPI RnaAllocateLana(HANDLE hConn, LPDWORD lpLana);
  386. DWORD WINAPI RnaDeallocateLana(HANDLE hConn);
  387. DWORD WINAPI RnaRunScript(HANDLE hConn, PSESS_CONFIGURATION_INFO lpSCI,
  388. BOOL fForce);
  389. typedef DWORD (WINAPI * LPFNCREATE)(HWND);
  390. typedef DWORD (WINAPI * LPFNEDIT)(HWND, LPSTR);
  391. typedef void (WINAPI * LPFNUINOTIFY)(LPSTR);
  392. DWORD WINAPI Remote_CreateEntry (HWND);
  393. DWORD WINAPI Remote_EditEntry (HWND, LPSTR);
  394. void WINAPI Remote_Notify (LPSTR);
  395. //***************************************************************************
  396. // Dial global setting for redial and implicit connection
  397. //***************************************************************************
  398. #define MAX_REDIAL_COUNT 100
  399. #define MIN_REDIAL_COUNT 1
  400. #define MAX_REDIAL_MINUTE 119
  401. #define MIN_REDIAL_MINUTE 0
  402. #define MAX_REDIAL_SECOND 59
  403. #define MIN_REDIAL_SECOND 0
  404. typedef struct tagRnaSetting {
  405. BOOL fRedial;
  406. DWORD cRetry;
  407. DWORD dwMin;
  408. DWORD dwSec;
  409. BOOL fImplicit;
  410. DWORD dwDialUI;
  411. } RNASETTING, *PRNASETTING, FAR *LPRNASETTING;
  412. #define DIALUI_NO_PROMPT 0x00000001 // Do not display connect prompt
  413. #define DIALUI_NO_CONFIRM 0x00000002 // Do not display connect confirm
  414. #define DIALUI_NO_TRAY 0x00000004 // No tray icon
  415. DWORD WINAPI RnaGetDialSettings(LPRNASETTING);
  416. DWORD WINAPI RnaSetDialSettings(LPRNASETTING);
  417. //***************************************************************************
  418. // The following are SMM Interface we cut from version 1.0
  419. //***************************************************************************
  420. #ifndef WINNT_RAS
  421. //
  422. // CALLBACKINFO conflicts with a structure defined in "pbuser.h",
  423. // and RAS_STATISTICS conflicts with a structure in "rasman.h".
  424. // The Win9x scripting code uses neither, so they have been commented out.
  425. //
  426. // Callback request information
  427. //
  428. typedef struct tagCALLBACKINFO
  429. {
  430. DWORD dwSize;
  431. BOOL fUseCallbackDelay;
  432. DWORD dwCallbackDelay;
  433. char szPhoneNumber[RAS_MaxPhoneNumber+1];
  434. } CALLBACKINFO, *PCALLBACKINFO, FAR* LPCALLBACKINFO;
  435. DWORD WINAPI RnaSetCallbackInfo( HANDLE hConn, LPCALLBACKINFO lpcbinfo );
  436. DWORD WINAPI RnaReportLinkSpeed( HANDLE hConn, DWORD dwLinkSpeed );
  437. DWORD WINAPI RnaUIStatus( HANDLE hConn, LPSTR lpszStatusMsg );
  438. DWORD WINAPI RnaLog( HANDLE hConn, LPSTR lpszLogMsg );
  439. //***************************************************************************
  440. // The following are connection statistics
  441. //***************************************************************************
  442. #define NUM_RAS_SERIAL_STATS 14
  443. #define BYTES_XMITED 0 //Generic Stats
  444. #define BYTES_RCVED 1
  445. #define FRAMES_XMITED 2
  446. #define FRAMES_RCVED 3
  447. #define CRC_ERR 4 //Serial Stats
  448. #define TIMEOUT_ERR 5
  449. #define ALIGNMENT_ERR 6
  450. #define SERIAL_OVERRUN_ERR 7
  451. #define FRAMING_ERR 8
  452. #define BUFFER_OVERRUN_ERR 9
  453. #define BYTES_XMITED_UNCOMP 10 //Compression Stats
  454. #define BYTES_RCVED_UNCOMP 11
  455. #define BYTES_XMITED_COMP 12
  456. #define BYTES_RCVED_COMP 13
  457. typedef struct tagRAS_STATISTICS
  458. {
  459. DWORD S_NumOfStatistics ;
  460. DWORD S_Statistics[NUM_RAS_SERIAL_STATS] ;
  461. } RAS_STATISTICS, FAR* LPRAS_STATISTICS;
  462. #endif // WINNT_RAS
  463. //**************************************************************************
  464. // Script support
  465. //**************************************************************************
  466. // Script processing mode
  467. //
  468. #define NORMAL_MODE 0
  469. #define TEST_MODE 1
  470. typedef DWORD (WINAPI * PFN_RUN_SCRIPT)(HANDLE, LPSESS_CONFIGURATION_INFO);
  471. #endif // _RNAP_H_