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.

950 lines
21 KiB

  1. ///============================================================================
  2. // Copyright (C) Microsoft Corporation, 1997 - 1999
  3. //
  4. // File: rtrcfg.h
  5. //
  6. // Router configuration property pages
  7. //
  8. //============================================================================
  9. #ifndef _RTRCFG_H
  10. #define _RTRCFG_H
  11. #if _MSC_VER >= 1000
  12. #pragma once
  13. #endif // _MSC_VER >= 1000
  14. #ifndef _INFO_H
  15. #include "info.h"
  16. #endif
  17. #ifndef _RTRSHEET_H
  18. #include "rtrsheet.h"
  19. #endif
  20. #ifndef __IPCTRL_H
  21. #include "ipctrl.h"
  22. #endif
  23. #ifndef __ATLKENV_H
  24. #include "atlkenv.h"
  25. #endif
  26. #ifndef __IPCTRL_H
  27. #include "ipctrl.h"
  28. #endif
  29. #ifndef _DIALOG_H_
  30. #include "dialog.h"
  31. #endif
  32. #ifndef _ADDRPOOL_H
  33. #include "addrpool.h"
  34. #endif
  35. template <class T> class Ptr {
  36. public:
  37. T* p;
  38. Ptr(T* p_=NULL) : p(p_) {}
  39. ~Ptr(void) { delete p;}
  40. operator T*(void) { return p; }
  41. T& operator*(void) { return *p; }
  42. T* operator->(void) { return p; }
  43. Ptr& operator=(T* p_)
  44. {
  45. delete p;
  46. p = p_;
  47. return *this;
  48. }
  49. };
  50. class RtrCfgSheet;
  51. /*---------------------------------------------------------------------------
  52. Struct: AdapterData
  53. This structure is used to hold information about NICs and their GUIDs
  54. ---------------------------------------------------------------------------*/
  55. struct AdapterData
  56. {
  57. CString m_stFriendlyName;
  58. CString m_stGuid; // the identifying guid
  59. };
  60. typedef CList<AdapterData, AdapterData&> AdapterList;
  61. /*---------------------------------------------------------------------------
  62. Class: DATA_SRV_IP
  63. Data inteface class for IP data.
  64. ---------------------------------------------------------------------------*/
  65. class DATA_SRV_IP
  66. {
  67. public:
  68. DWORD m_dwAllowNetworkAccess;
  69. DWORD m_dwOldAllowNetworkAccess;
  70. DWORD m_dwUseDhcp;
  71. AddressPoolList m_addressPoolList;
  72. CString m_stNetworkAdapterGUID;
  73. DWORD m_dwEnableIn;
  74. AdapterList m_adapterList;
  75. //
  76. // Member variable that control forwarding of NETBT
  77. // name request broadcasts
  78. //
  79. DWORD m_dwEnableNetbtBcastFwd;
  80. DWORD m_dwOldEnableNetbtBcastFwd;
  81. // The next two variables are used by the install wizard
  82. // specifically for NAT
  83. CString m_stPrivateAdapterGUID;
  84. CString m_stPublicAdapterGUID;
  85. DATA_SRV_IP();
  86. HRESULT LoadFromReg(LPCTSTR pServerName,
  87. const RouterVersionInfo& routerVersion);
  88. HRESULT SaveToReg(IRouterInfo *pRouter,
  89. const RouterVersionInfo& routerVersion);
  90. HRESULT UseDefaults(LPCTSTR pServerName, BOOL fNT4);
  91. void GetDefault();
  92. BOOL FNeedRestart();
  93. HRESULT LoadAdapters(IRouterInfo *pRouter, AdapterList *pAdapterList);
  94. private:
  95. BOOL m_fNT4;
  96. RegKey m_regkey;
  97. RegKey m_regkeyNT4;
  98. CString m_stServerName;
  99. SPIRouterInfo m_spRouterInfo;
  100. RouterVersionInfo m_routerVersion;
  101. };
  102. /*---------------------------------------------------------------------------
  103. Class: DATA_SRV_IPX
  104. ---------------------------------------------------------------------------*/
  105. class DATA_SRV_IPX
  106. {
  107. public:
  108. DWORD m_dwAllowNetworkAccess;
  109. DWORD m_dwUseAutoAddr;
  110. DWORD m_dwUseSameNetNum;
  111. DWORD m_dwAllowClientNetNum;
  112. DWORD m_dwIpxNetFirst;
  113. DWORD m_dwIpxNetLast;
  114. DWORD m_dwEnableIn;
  115. DWORD m_fEnableType20Broadcasts;
  116. DATA_SRV_IPX();
  117. HRESULT LoadFromReg(LPCTSTR pServerName=NULL, BOOL fNT4 =FALSE);
  118. HRESULT SaveToReg(IRouterInfo *pRouter);
  119. HRESULT UseDefaults(LPCTSTR pServerName, BOOL fNT4);
  120. void GetDefault();
  121. static const int mc_nIpxNetNumRadix;
  122. private:
  123. BOOL m_fNT4;
  124. RegKey m_regkeyNT4;
  125. RegKey m_regkey;
  126. };
  127. /*---------------------------------------------------------------------------
  128. Class: DATA_SRV_NBF
  129. ---------------------------------------------------------------------------*/
  130. class DATA_SRV_NBF
  131. {
  132. public:
  133. DWORD m_dwAllowNetworkAccess;
  134. DWORD m_dwOldAllowNetworkAccess;
  135. DWORD m_dwEnableIn;
  136. DWORD m_dwOldEnableIn;
  137. DATA_SRV_NBF();
  138. HRESULT LoadFromReg(LPCTSTR pServerName = NULL, BOOL fNT4 = FALSE);
  139. HRESULT SaveToReg();
  140. HRESULT UseDefaults(LPCTSTR pServerName, BOOL fNT4);
  141. void GetDefault();
  142. BOOL FNeedRestart();
  143. private:
  144. BOOL m_fNT4;
  145. RegKey m_regkey;
  146. RegKey m_regkeyNT4;
  147. CString m_stServerName;
  148. };
  149. /*---------------------------------------------------------------------------
  150. Class: DATA_SRV_ARAP
  151. ---------------------------------------------------------------------------*/
  152. class DATA_SRV_ARAP
  153. {
  154. public:
  155. DWORD m_dwEnableIn;
  156. DATA_SRV_ARAP();
  157. HRESULT LoadFromReg(LPCTSTR pServerName = NULL, BOOL fNT4 = FALSE);
  158. HRESULT SaveToReg();
  159. HRESULT UseDefaults(LPCTSTR pServerName, BOOL fNT4);
  160. void GetDefault();
  161. private:
  162. RegKey m_regkey;
  163. };
  164. /*---------------------------------------------------------------------------
  165. Class: DATA_SRV_GENERAL
  166. ---------------------------------------------------------------------------*/
  167. class DATA_SRV_GENERAL
  168. {
  169. public:
  170. DWORD m_dwRouterType;
  171. DWORD m_dwOldRouterType;
  172. DATA_SRV_GENERAL();
  173. HRESULT LoadFromReg(LPCTSTR pServerName = NULL);
  174. HRESULT SaveToReg();
  175. void GetDefault();
  176. BOOL FNeedRestart();
  177. private:
  178. RegKey m_regkey;
  179. CString m_stServerName;
  180. };
  181. //*****************************************************************
  182. // PPP configuration
  183. //*****************************************************************
  184. class DATA_SRV_PPP
  185. {
  186. public:
  187. BOOL m_fUseMultilink;
  188. BOOL m_fUseBACP;
  189. BOOL m_fUseLCPExtensions;
  190. BOOL m_fUseSwCompression;
  191. DATA_SRV_PPP();
  192. HRESULT LoadFromReg(LPCTSTR pServerName,
  193. const RouterVersionInfo& routerVersion);
  194. HRESULT SaveToReg();
  195. void GetDefault();
  196. private:
  197. RegKey m_regkey;
  198. };
  199. /*---------------------------------------------------------------------------
  200. Struct: AuthProviderData
  201. This structure is used to hold information for Authentication AND
  202. Accounting providers.
  203. ---------------------------------------------------------------------------*/
  204. struct AuthProviderData
  205. {
  206. // The following fields will hold data for ALL auth/acct/EAP providers
  207. CString m_stTitle;
  208. CString m_stConfigCLSID; // CLSID for config object
  209. CString m_stProviderTypeGUID; // GUID for the provider type
  210. // These fields are used by auth/acct providers.
  211. CString m_stGuid; // the identifying guid
  212. // This flag is used for EAP providers
  213. CString m_stKey; // name of registry key (for this provider)
  214. BOOL m_fSupportsEncryption; // used by EAP provider data
  215. DWORD m_dwFlags;
  216. BOOL m_fConfiguredInThisSession;
  217. };
  218. typedef CList<AuthProviderData, AuthProviderData&> AuthProviderList;
  219. /*---------------------------------------------------------------------------
  220. Class: DATA_SRV_AUTH
  221. ---------------------------------------------------------------------------*/
  222. #define DATA_SRV_AUTH_MAX_SHARED_KEY_LEN 255
  223. class DATA_SRV_AUTH
  224. {
  225. public:
  226. // The authentication data (as read in from the Rasman flags parameter)
  227. DWORD m_dwFlags;
  228. // The original auth provider
  229. CString m_stGuidOriginalAuthProv;
  230. // The original acct provider
  231. CString m_stGuidOriginalAcctProv;
  232. // The current authentication provider
  233. CString m_stGuidActiveAuthProv;
  234. // The current accounting provider
  235. CString m_stGuidActiveAcctProv;
  236. //Flag which tells us if the router service is running
  237. BOOL m_fRouterRunning;
  238. // Flag indicating whether or not to use Custom IPSEC policy ( preshared key )
  239. BOOL m_fUseCustomIPSecPolicy;
  240. // Current Preshared Key
  241. TCHAR m_szPreSharedKey[DATA_SRV_AUTH_MAX_SHARED_KEY_LEN];
  242. DATA_SRV_AUTH();
  243. HRESULT LoadFromReg(LPCTSTR pServerName,
  244. const RouterVersionInfo& routerVersion);
  245. HRESULT SaveToReg(HWND hWnd);
  246. HRESULT UseDefaults(LPCTSTR pServerName, BOOL fNT4);
  247. void GetDefault();
  248. AuthProviderList m_authProvList;
  249. AuthProviderList m_acctProvList;
  250. AuthProviderList m_eapProvList;
  251. AuthProviderData * FindProvData(AuthProviderList &provList,
  252. const TCHAR *pszGuid);
  253. private:
  254. RegKey m_regkeyAuth; // reg key of the Router\Auth
  255. RegKey m_regkeyAcct; // reg key of the Router\Acct
  256. RegKey m_regkeyRasmanPPP;
  257. RegKey m_regkeyRemoteAccess; // regkey for RemoteAccess\Parameters
  258. HRESULT LoadEapProviders(HKEY hkeyBase, AuthProviderList *pProvList);
  259. HRESULT LoadProviders(HKEY hkeyBase, AuthProviderList *pProvList);
  260. HRESULT LoadPSK();
  261. HRESULT SetNewActiveAuthProvider(HWND hWnd);
  262. HRESULT SetNewActiveAcctProvider(HWND hWnd);
  263. HRESULT SetPSK();
  264. CString m_stServer;
  265. };
  266. /*---------------------------------------------------------------------------
  267. Class: DATA_SRV_RASERRLOG
  268. ---------------------------------------------------------------------------*/
  269. class DATA_SRV_RASERRLOG
  270. {
  271. public:
  272. DWORD m_dwLogLevel;
  273. DWORD m_dwEnableFileTracing;
  274. DWORD m_dwOldEnableFileTracing;
  275. DATA_SRV_RASERRLOG();
  276. HRESULT LoadFromReg(LPCTSTR pszServerName=NULL);
  277. HRESULT SaveToReg();
  278. HRESULT UseDefaults(LPCTSTR pServerName, BOOL fNT4);
  279. void GetDefault();
  280. BOOL FNeedRestart();
  281. private:
  282. RegKey m_regkey;
  283. RegKey m_regkeyFileLogging;
  284. CString m_stServer;
  285. };
  286. /*---------------------------------------------------------------------------
  287. Class: RtrGenCfgPage
  288. General configuration UI
  289. ---------------------------------------------------------------------------*/
  290. class RtrGenCfgPage : public RtrPropertyPage
  291. {
  292. public:
  293. RtrGenCfgPage(UINT nIDTemplate, UINT nIDCaption = 0);
  294. ~RtrGenCfgPage();
  295. HRESULT Init(RtrCfgSheet * pRtrCfgSheet,
  296. const RouterVersionInfo& routerVersion);
  297. // Copy the control settings into the DATA_SRV_GENERAL
  298. void SaveSettings();
  299. //{{AFX_DATA(RtrGenCfgPage)
  300. //}}AFX_DATA
  301. DATA_SRV_GENERAL m_DataGeneral;
  302. //{{AFX_VIRTUAL(RtrIPCfgPage)
  303. protected:
  304. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  305. //}}AFX_VIRTUAL
  306. void EnableRtrCtrls();
  307. protected:
  308. virtual BOOL OnApply();
  309. RtrCfgSheet* m_pRtrCfgSheet;
  310. //{{AFX_MSG(RtrGenCfgPage)
  311. afx_msg void OnButtonClick();
  312. afx_msg void OnCbSrvAsRtr();
  313. //}}AFX_MSG
  314. virtual BOOL OnInitDialog();
  315. DECLARE_MESSAGE_MAP()
  316. };
  317. /*---------------------------------------------------------------------------
  318. Class: RtrAuthCfgPage
  319. Authentication configuration UI
  320. ---------------------------------------------------------------------------*/
  321. class RtrAuthCfgPage : public RtrPropertyPage
  322. {
  323. // Construction
  324. public:
  325. RtrAuthCfgPage(UINT nIDTemplate, UINT nIDCaption = 0);
  326. ~RtrAuthCfgPage();
  327. HRESULT Init(RtrCfgSheet * pRtrCfgSheet,
  328. const RouterVersionInfo& routerVersion);
  329. //{{AFX_DATA(RtrAuthCfgPage)
  330. CComboBox m_authprov;
  331. CComboBox m_acctprov;
  332. //}}AFX_DATA
  333. DATA_SRV_AUTH m_DataAuth;
  334. //{{AFX_VIRTUAL(RtrAuthCfgPage)
  335. protected:
  336. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  337. //}}AFX_VIRTUAL
  338. protected:
  339. DWORD m_dwAuthFlags; // Flags as enabled
  340. CString m_stActiveAuthProv;
  341. CString m_stActiveAcctProv;
  342. RouterVersionInfo m_RouterInfo;
  343. void FillProviderListBox(CComboBox &provCtrl,
  344. AuthProviderList &provList,
  345. const CString& stGuid);
  346. virtual BOOL OnApply();
  347. RtrCfgSheet* m_pRtrCfgSheet;
  348. //{{AFX_MSG(RtrAuthCfgPage)
  349. afx_msg void OnChangeAuthProv();
  350. afx_msg void OnChangeAcctProv();
  351. afx_msg void OnConfigureAcctProv();
  352. afx_msg void OnConfigureAuthProv();
  353. afx_msg void OnAuthSettings();
  354. afx_msg void OnChangeCustomPolicySettings();
  355. afx_msg void OnChangePreSharedKey();
  356. //}}AFX_MSG
  357. virtual BOOL OnInitDialog();
  358. DECLARE_MESSAGE_MAP()
  359. };
  360. /*---------------------------------------------------------------------------
  361. Class: RtrIPCfgPage
  362. IP configuration UI
  363. ---------------------------------------------------------------------------*/
  364. class RtrIPCfgPage : public RtrPropertyPage
  365. {
  366. // Construction
  367. public:
  368. RtrIPCfgPage(UINT nIDTemplate, UINT nIDCaption = 0);
  369. ~RtrIPCfgPage();
  370. HRESULT Init(RtrCfgSheet * pRtrCfgSheet,
  371. const RouterVersionInfo& routerVersion);
  372. HRESULT SaveSettings(HWND hWnd);
  373. //{{AFX_DATA(RtrIPCfgPage)
  374. enum { IDD = IDD_RTR_IP };
  375. CComboBox m_adapter;
  376. //}}AFX_DATA
  377. DATA_SRV_IP m_DataIP;
  378. //{{AFX_VIRTUAL(RtrIPCfgPage)
  379. protected:
  380. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  381. //}}AFX_VIRTUAL
  382. protected:
  383. CListCtrl m_listCtrl;
  384. BOOL m_bReady;
  385. virtual BOOL OnApply();
  386. RtrCfgSheet* m_pRtrCfgSheet;
  387. void EnableStaticPoolCtrls(BOOL fEnable) ;
  388. void FillAdapterListBox(CComboBox &adapterCtrl,
  389. AdapterList &adapterList,
  390. const CString& stGuid);
  391. //{{AFX_MSG(RtrIPCfgPage)
  392. afx_msg void OnAllowRemoteTcpip();
  393. afx_msg void OnRtrEnableIPRouting();
  394. afx_msg void OnRtrIPRbDhcp();
  395. afx_msg void OnRtrIPRbPool();
  396. afx_msg void OnSelendOkAdapter();
  397. virtual BOOL OnInitDialog();
  398. afx_msg void OnBtnAdd();
  399. afx_msg void OnBtnEdit();
  400. afx_msg void OnBtnRemove();
  401. afx_msg void OnEnableNetbtBcastFwd();
  402. afx_msg void OnListDblClk(NMHDR *, LRESULT *);
  403. afx_msg void OnListChange(NMHDR *, LRESULT *);
  404. //}}AFX_MSG
  405. DECLARE_MESSAGE_MAP()
  406. };
  407. /*---------------------------------------------------------------------------
  408. Class: RtrIPXCfgPage
  409. IPX configuration UI
  410. ---------------------------------------------------------------------------*/
  411. class RtrIPXCfgPage : public RtrPropertyPage
  412. {
  413. public:
  414. RtrIPXCfgPage(UINT nIDTemplate, UINT nIDCaption = 0);
  415. ~RtrIPXCfgPage();
  416. HRESULT Init(RtrCfgSheet * pRtrCfgSheet,
  417. const RouterVersionInfo& routerVersion);
  418. DATA_SRV_IPX m_DataIPX;
  419. //{{AFX_VIRTUAL(RtrIPXCfgPage)
  420. protected:
  421. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  422. //}}AFX_VIRTUAL
  423. protected:
  424. virtual BOOL OnApply();
  425. RtrCfgSheet* m_pRtrCfgSheet;
  426. void EnableNetworkRangeCtrls(BOOL fEnable);
  427. //{{AFX_MSG(RtrIPXCfgPage)
  428. afx_msg void OnRtrIPxRbAuto();
  429. afx_msg void OnRtrIPxRbPool();
  430. virtual BOOL OnInitDialog();
  431. afx_msg void OnChangeSomething();
  432. //}}AFX_MSG
  433. DECLARE_MESSAGE_MAP()
  434. };
  435. /*---------------------------------------------------------------------------
  436. Class: RtrNBFCfgPage
  437. NetBEUI router configuration UI
  438. ---------------------------------------------------------------------------*/
  439. class RtrNBFCfgPage : public RtrPropertyPage
  440. {
  441. public:
  442. RtrNBFCfgPage(UINT nIDTemplate, UINT nIDCaption = 0);
  443. ~RtrNBFCfgPage();
  444. HRESULT Init(RtrCfgSheet * pRtrCfgSheet,
  445. const RouterVersionInfo& routerVersion);
  446. DATA_SRV_NBF m_DataNBF;
  447. //{{AFX_VIRTUAL(RtrNBFCfgPage)
  448. protected:
  449. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  450. //}}AFX_VIRTUAL
  451. // Copy the control settings into the DATA_SRV_GENERAL
  452. void SaveSettings();
  453. protected:
  454. virtual BOOL OnApply();
  455. RtrCfgSheet* m_pRtrCfgSheet;
  456. //{{AFX_MSG(RtrNBFCfgPage)
  457. afx_msg void OnButtonClick();
  458. virtual BOOL OnInitDialog();
  459. //}}AFX_MSG
  460. DECLARE_MESSAGE_MAP()
  461. };
  462. /*---------------------------------------------------------------------------
  463. Class: RtrARAPCfgPage
  464. Appletalk routing configuration UI
  465. ---------------------------------------------------------------------------*/
  466. class RtrARAPCfgPage : public RtrPropertyPage
  467. {
  468. public:
  469. RtrARAPCfgPage(UINT nIDTemplate, UINT nIDCaption = 0);
  470. ~RtrARAPCfgPage();
  471. HRESULT Init(RtrCfgSheet * pRtrCfgSheet,
  472. const RouterVersionInfo& routerVersion);
  473. void EnableSettings(BOOL bEnable);
  474. //{{AFX_DATA(RtrARAPCfgPage)
  475. enum { IDD = IDD_RTR_ARAP };
  476. //}}AFX_DATA
  477. DATA_SRV_ARAP m_DataARAP;
  478. // if the page is changed and applied
  479. BOOL m_bApplied;
  480. // need to access from the property sheet
  481. CATLKEnv m_AdapterInfo;
  482. // ClassWizard generate virtual function overrides
  483. //{{AFX_VIRTUAL(RtrARAPCfgPage)
  484. protected:
  485. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  486. //}}AFX_VIRTUAL
  487. protected:
  488. virtual BOOL OnApply();
  489. RtrCfgSheet* m_pRtrCfgSheet;
  490. //{{AFX_MSG(RtrARAPCfgPage)
  491. virtual BOOL OnInitDialog();
  492. afx_msg void OnRtrArapCbRemotearap();
  493. //}}AFX_MSG
  494. DECLARE_MESSAGE_MAP()
  495. };
  496. /*---------------------------------------------------------------------------
  497. Class: RtrPPPCfgPage
  498. PPP options configuration UI
  499. ---------------------------------------------------------------------------*/
  500. class RtrPPPCfgPage : public RtrPropertyPage
  501. {
  502. // Construction
  503. public:
  504. RtrPPPCfgPage(UINT nIDTemplate, UINT nIDCaption = 0);
  505. ~RtrPPPCfgPage();
  506. HRESULT Init(RtrCfgSheet * pRtrCfgSheet,
  507. const RouterVersionInfo& routerVersion);
  508. //{{AFX_DATA(RtrPPPCfgPage)
  509. //}}AFX_DATA
  510. DATA_SRV_PPP m_DataPPP;
  511. //{{AFX_VIRTUAL(RtrPPPCfgPage)
  512. protected:
  513. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  514. //}}AFX_VIRTUAL
  515. protected:
  516. virtual BOOL OnApply();
  517. RtrCfgSheet* m_pRtrCfgSheet;
  518. //{{AFX_MSG(RtrPPPCfgPage)
  519. afx_msg void OnButtonClickMultilink();
  520. afx_msg void OnButtonClick();
  521. //}}AFX_MSG
  522. virtual BOOL OnInitDialog();
  523. DECLARE_MESSAGE_MAP()
  524. };
  525. /*---------------------------------------------------------------------------
  526. Class: RtrLogLevelCfgPage
  527. ---------------------------------------------------------------------------*/
  528. class RtrLogLevelCfgPage : public RtrPropertyPage
  529. {
  530. // Construction
  531. public:
  532. RtrLogLevelCfgPage(UINT nIDTemplate, UINT nIDCaption = 0);
  533. ~RtrLogLevelCfgPage();
  534. HRESULT Init(RtrCfgSheet * pRtrCfgSheet,
  535. const RouterVersionInfo& routerVersion);
  536. //{{AFX_DATA(RtrLogLevelCfgPage)
  537. //}}AFX_DATA
  538. DATA_SRV_RASERRLOG m_DataRASErrLog;
  539. //{{AFX_VIRTUAL(RtrLogLevelCfgPage)
  540. protected:
  541. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  542. //}}AFX_VIRTUAL
  543. protected:
  544. virtual BOOL OnApply();
  545. RtrCfgSheet* m_pRtrCfgSheet;
  546. //{{AFX_MSG(RtrLogLevelCfgPage)
  547. afx_msg void OnButtonClick();
  548. //}}AFX_MSG
  549. virtual BOOL OnInitDialog();
  550. // Copy the control settings into the DATA_SRV_GENERAL
  551. void SaveSettings();
  552. DECLARE_MESSAGE_MAP()
  553. };
  554. /*---------------------------------------------------------------------------
  555. Class: RtrCfgSheet
  556. Router configuration property sheet
  557. ---------------------------------------------------------------------------*/
  558. class RtrCfgSheet :
  559. public RtrPropertySheet
  560. {
  561. public:
  562. RtrCfgSheet(ITFSNode *pNode,
  563. IRouterInfo *pRouter,
  564. IComponentData *pComponentData,
  565. ITFSComponentData *pTFSCompData,
  566. LPCTSTR pszSheetName,
  567. CWnd *pParent = NULL,
  568. UINT iPage=0,
  569. BOOL fScopePane = TRUE);
  570. ~RtrCfgSheet();
  571. HRESULT Init(LPCTSTR pServerName);
  572. virtual BOOL SaveSheetData();
  573. CString m_stServerName;
  574. BOOL m_fNT4;
  575. RouterVersionInfo m_routerVersion;
  576. SPIRouterInfo m_spRouter;
  577. // Helper function - this will prompt the user, stop the service,
  578. // save changes, and then restart. This is for those changes
  579. // that require a restart. It is placed in a separate function
  580. // so that the various pages may call this. The restart will occur
  581. // only once though.
  582. // ----------------------------------------------------------------
  583. HRESULT SaveRequiredRestartChanges(HWND hWnd);
  584. protected:
  585. friend class RtrGenCfgPage;
  586. friend class RtrAuthCfgPage;
  587. friend class RtrIPCfgPage;
  588. friend class RtrIPXCfgPage;
  589. friend class RtrNBFCfgPage;
  590. friend class RtrARAPCfgPage;
  591. BOOL m_fIpxLoaded;
  592. BOOL m_fIpLoaded;
  593. BOOL m_fNbfLoaded;
  594. BOOL m_fARAPLoaded;
  595. Ptr<RtrIPCfgPage> m_pRtrIPCfgPage;
  596. Ptr<RtrIPXCfgPage> m_pRtrIPXCfgPage;
  597. Ptr<RtrNBFCfgPage> m_pRtrNBFCfgPage;
  598. Ptr<RtrARAPCfgPage> m_pRtrARAPCfgPage;
  599. Ptr<RtrGenCfgPage> m_pRtrGenCfgPage;
  600. Ptr<RtrAuthCfgPage> m_pRtrAuthCfgPage;
  601. Ptr<RtrPPPCfgPage> m_pRtrPPPCfgPage;
  602. Ptr<RtrLogLevelCfgPage> m_pRtrLogLevelCfgPage;
  603. SPITFSNode m_spNode;
  604. };
  605. /*---------------------------------------------------------------------------
  606. class: EAPConfigurationDlg
  607. Brings up the list of EAP providers (along with a configure button).
  608. ---------------------------------------------------------------------------*/
  609. class EAPConfigurationDialog : public CBaseDialog
  610. {
  611. public:
  612. EAPConfigurationDialog(LPCTSTR pszMachine,
  613. AuthProviderList *pProvList) :
  614. CBaseDialog(IDD_RTR_EAP_CFG),
  615. m_pProvList(pProvList),
  616. m_stMachine(pszMachine)
  617. {};
  618. ~EAPConfigurationDialog();
  619. protected:
  620. AuthProviderList *m_pProvList;
  621. CString m_stMachine; // name of the server
  622. CListBox m_listBox;
  623. //{{AFX_VIRTUAL(EAPConfigurationDialog)
  624. protected:
  625. virtual VOID DoDataExchange(CDataExchange *pDX);
  626. virtual BOOL OnInitDialog();
  627. //}}AFX_VIRTUAL
  628. afx_msg void OnListChange();
  629. // config buttion is moved to NAP/Profile/Authentication page
  630. // afx_msg void OnConfigure();
  631. DECLARE_MESSAGE_MAP()
  632. };
  633. /*---------------------------------------------------------------------------
  634. Class: AuthenticationSettingsDialog
  635. ---------------------------------------------------------------------------*/
  636. class AuthenticationSettingsDialog : public CBaseDialog
  637. {
  638. public:
  639. AuthenticationSettingsDialog(LPCTSTR pszServerName,
  640. AuthProviderList *pProvList) :
  641. CBaseDialog(IDD_AUTHENTICATION_SETTINGS),
  642. m_dwFlags(0),
  643. m_stMachine(pszServerName),
  644. m_pProvList(pProvList)
  645. {};
  646. void SetAuthFlags(DWORD dwFlags);
  647. DWORD GetAuthFlags();
  648. protected:
  649. void CheckAuthenticationControls(DWORD dwFlags);
  650. // Read the state of the flags from the checkboxes in the UI
  651. void ReadFlagState();
  652. DWORD m_dwFlags;
  653. // Used by the EAP dialog
  654. AuthProviderList *m_pProvList;
  655. CString m_stMachine; // name of the server
  656. //{{AFX_VIRTUAL(AuthenticationSettingsDialog)
  657. protected:
  658. afx_msg void OnRtrAuthCfgEAP();
  659. virtual VOID DoDataExchange(CDataExchange *pDX);
  660. virtual BOOL OnInitDialog();
  661. virtual void OnOK();
  662. //}}AFX_VIRTUAL
  663. DECLARE_MESSAGE_MAP()
  664. };
  665. #endif _RTRCFG_H