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.

186 lines
5.2 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. //
  58. // This is used to define the default set of methods
  59. // selected by the wizard
  60. //
  61. #define USE_PPPCFG_DEFAULT_METHODS \
  62. ( PPPCFG_NegotiateMSCHAP | \
  63. PPPCFG_NegotiateEAP | \
  64. PPPCFG_NegotiateStrongMSCHAP \
  65. )
  66. enum RtrConfigFlags
  67. {
  68. RTRCONFIG_SETUP_NAT = 0x00000001,
  69. RTRCONFIG_SETUP_DNS_PROXY = 0x00000002,
  70. RTRCONFIG_SETUP_DHCP_ALLOCATOR = 0x00000004,
  71. RTRCONFIG_SETUP_H323 = 0x00000008, // deonb added
  72. RTRCONFIG_SETUP_ALG = 0x00000010 // savasg added
  73. };
  74. struct RtrConfigData
  75. {
  76. CString m_stServerName;
  77. BOOL m_fRemote;
  78. // These are flags that have meaning outside of this context.
  79. // For example, if you are setting up NAT, you would set a flag
  80. // here.
  81. DWORD m_dwConfigFlags;
  82. // This is the router type chosen by the user:
  83. // ROUTER_TYPE_LAN ROUTER_TYPE_WAN ROUTER_TYPE_RAS
  84. DWORD m_dwRouterType;
  85. // This is the network access or local only
  86. // this setting is then propagated down to the individual
  87. // transports structures.
  88. BOOL m_dwAllowNetworkAccess;
  89. // This is set if IP is installed.
  90. BOOL m_fUseIp;
  91. // If this is set to FALSE, then the IP address choice needs
  92. // to be reset depending on the router type
  93. BOOL m_fIpSetup;
  94. DATA_SRV_IP m_ipData;
  95. // This is set if IPX is installed.
  96. BOOL m_fUseIpx;
  97. DATA_SRV_IPX m_ipxData;
  98. // This is set if NetBEUI is installed
  99. BOOL m_fUseNbf;
  100. DATA_SRV_NBF m_nbfData;
  101. // This is set if Appletalk is installed AND we are running locally
  102. BOOL m_fUseArap;
  103. DATA_SRV_ARAP m_arapData;
  104. // Use this for the error logging
  105. // Note, this is not used in the UI but we use this to set the
  106. // defaults.
  107. DATA_SRV_RASERRLOG m_errlogData;
  108. // Use this for authentication
  109. // Note, this is not used in the UI but we use this to set the
  110. // defaults.
  111. DATA_SRV_AUTH m_authData;
  112. RtrConfigData()
  113. {
  114. m_dwRouterType = ROUTER_TYPE_RAS;
  115. m_fRemote = 0;
  116. m_fUseIp = FALSE;
  117. m_fUseIpx = FALSE;
  118. m_fUseNbf = FALSE;
  119. m_fUseArap = FALSE;
  120. // This contains the default values for the authentication flags.
  121. // The only flags that can be set in this variable are the
  122. // flags in USE_PPPCFG_AUTHFLAGS
  123. m_dwConfigFlags = 0;
  124. m_dwAllowNetworkAccess = TRUE;
  125. m_fIpSetup = FALSE;
  126. }
  127. HRESULT Init(LPCTSTR pszServerName, IRouterInfo *pRouter);
  128. };
  129. DWORD RtrWizFinish(RtrConfigData* pRtrConfigData, IRouterInfo *pRouterInfo);
  130. HRESULT AddIGMPToRasServer(RtrConfigData* pRtrConfigData,
  131. IRouterInfo *pRouterInfo);
  132. HRESULT AddIGMPToNATServer(NewRtrWizData *pNewRtrWizData,
  133. RtrConfigData* pRtrConfigData,
  134. IRouterInfo *pRouterInfo,
  135. BOOL fAddInternal);
  136. HRESULT AddNATToServer(NewRtrWizData *pNewRtrWizData,
  137. RtrConfigData *pRtrConfigData,
  138. IRouterInfo *pRouter,
  139. BOOL fDemandDial,
  140. BOOL fAddProtocolOnly
  141. );
  142. #ifdef KSL_IPINIP
  143. DWORD CleanupTunnelFriendlyNames(IRouterInfo *pRouter);
  144. #endif //KSL_IPINIP
  145. HRESULT AddIPBOOTPToServer(RtrConfigData* pRtrConfigData,
  146. IRouterInfo *pRouterInfo,
  147. DWORD dwDhcpServer);
  148. #endif // !defined _RTRWIZ_H_