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.

171 lines
4.6 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows/NT **/
  3. /** Copyright(c) Microsoft Corporation, 1997 - 1999 **/
  4. /**********************************************************************/
  5. /*
  6. rtrwiz.h
  7. FILE HISTORY:
  8. */
  9. #if !defined _RTRWIZ_H_
  10. #define _RTRWIZ_H_
  11. #if _MSC_VER >= 1000
  12. #pragma once
  13. #endif // _MSC_VER >= 1000
  14. #include "listctrl.h"
  15. #include "ports.h"
  16. #include "rasppp.h" // for PPPCFG_XXX constants
  17. #include "rtrcfg.h" // for DATA_SRV_??? structures
  18. // forward declarations
  19. class NewRtrWizData;
  20. // Use these flags to help determine what the allowed encryption settings are
  21. #define USE_PPPCFG_AUTHFLAGS \
  22. ( PPPCFG_NegotiateSPAP | \
  23. PPPCFG_NegotiateMSCHAP | \
  24. PPPCFG_NegotiateEAP | \
  25. PPPCFG_NegotiatePAP | \
  26. PPPCFG_NegotiateMD5CHAP | \
  27. PPPCFG_NegotiateStrongMSCHAP | \
  28. PPPCFG_AllowNoAuthentication \
  29. )
  30. //
  31. // Note: this is also used to define ALL of the authentication methods.
  32. // At least one of these has to be set!
  33. //
  34. #define USE_PPPCFG_ALL_METHODS \
  35. ( PPPCFG_NegotiateSPAP | \
  36. PPPCFG_NegotiateMSCHAP | \
  37. PPPCFG_NegotiateEAP | \
  38. PPPCFG_NegotiatePAP | \
  39. PPPCFG_NegotiateMD5CHAP | \
  40. PPPCFG_AllowNoAuthentication | \
  41. PPPCFG_NegotiateStrongMSCHAP )
  42. //
  43. // This is used to define the methods selected
  44. // when the "use all methods" in the wizard
  45. //
  46. #define USE_PPPCFG_ALLOW_ALL_METHODS \
  47. ( PPPCFG_NegotiateSPAP | \
  48. PPPCFG_NegotiateMSCHAP | \
  49. PPPCFG_NegotiateEAP | \
  50. PPPCFG_NegotiatePAP | \
  51. PPPCFG_NegotiateStrongMSCHAP )
  52. #define USE_PPPCFG_SECURE \
  53. ( PPPCFG_NegotiateMSCHAP | \
  54. PPPCFG_NegotiateEAP | \
  55. PPPCFG_NegotiateStrongMSCHAP \
  56. )
  57. enum RtrConfigFlags
  58. {
  59. RTRCONFIG_SETUP_NAT = 0x00000001,
  60. RTRCONFIG_SETUP_DNS_PROXY = 0x00000002,
  61. RTRCONFIG_SETUP_DHCP_ALLOCATOR = 0x00000004,
  62. RTRCONFIG_SETUP_H323 = 0x00000008, // deonb added
  63. RTRCONFIG_SETUP_FTP = 0x00000020
  64. };
  65. struct RtrConfigData
  66. {
  67. CString m_stServerName;
  68. BOOL m_fRemote;
  69. // These are flags that have meaning outside of this context.
  70. // For example, if you are setting up NAT, you would set a flag
  71. // here.
  72. DWORD m_dwConfigFlags;
  73. // This is the router type chosen by the user:
  74. // ROUTER_TYPE_LAN ROUTER_TYPE_WAN ROUTER_TYPE_RAS
  75. DWORD m_dwRouterType;
  76. // This is the network access or local only
  77. // this setting is then propagated down to the individual
  78. // transports structures.
  79. BOOL m_dwAllowNetworkAccess;
  80. // This is set if IP is installed.
  81. BOOL m_fUseIp;
  82. // If this is set to FALSE, then the IP address choice needs
  83. // to be reset depending on the router type
  84. BOOL m_fIpSetup;
  85. DATA_SRV_IP m_ipData;
  86. // This is set if IPX is installed.
  87. BOOL m_fUseIpx;
  88. DATA_SRV_IPX m_ipxData;
  89. // This is set if NetBEUI is installed
  90. BOOL m_fUseNbf;
  91. DATA_SRV_NBF m_nbfData;
  92. // This is set if Appletalk is installed AND we are running locally
  93. BOOL m_fUseArap;
  94. DATA_SRV_ARAP m_arapData;
  95. // Use this for the error logging
  96. // Note, this is not used in the UI but we use this to set the
  97. // defaults.
  98. DATA_SRV_RASERRLOG m_errlogData;
  99. // Use this for authentication
  100. // Note, this is not used in the UI but we use this to set the
  101. // defaults.
  102. DATA_SRV_AUTH m_authData;
  103. RtrConfigData()
  104. {
  105. m_dwRouterType = ROUTER_TYPE_RAS;
  106. m_fRemote = 0;
  107. m_fUseIp = FALSE;
  108. m_fUseIpx = FALSE;
  109. m_fUseNbf = FALSE;
  110. m_fUseArap = FALSE;
  111. // This contains the default values for the authentication flags.
  112. // The only flags that can be set in this variable are the
  113. // flags in USE_PPPCFG_AUTHFLAGS
  114. m_dwConfigFlags = 0;
  115. m_dwAllowNetworkAccess = TRUE;
  116. m_fIpSetup = FALSE;
  117. }
  118. HRESULT Init(LPCTSTR pszServerName, IRouterInfo *pRouter);
  119. };
  120. DWORD RtrWizFinish(RtrConfigData* pRtrConfigData, IRouterInfo *pRouterInfo);
  121. HRESULT AddIGMPToRasServer(RtrConfigData* pRtrConfigData,
  122. IRouterInfo *pRouterInfo);
  123. HRESULT AddIGMPToNATServer(RtrConfigData* pRtrConfigData,
  124. IRouterInfo *pRouterInfo);
  125. HRESULT AddNATToServer(NewRtrWizData *pNewRtrWizData,
  126. RtrConfigData *pRtrConfigData,
  127. IRouterInfo *pRouter,
  128. BOOL fDemandDial,
  129. BOOL fAddProtocolOnly
  130. );
  131. DWORD CleanupTunnelFriendlyNames(IRouterInfo *pRouter);
  132. HRESULT AddIPBOOTPToServer(RtrConfigData* pRtrConfigData,
  133. IRouterInfo *pRouterInfo,
  134. DWORD dwDhcpServer);
  135. #endif // !defined _RTRWIZ_H_