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.

228 lines
7.3 KiB

  1. /*++
  2. Copyright (c) 1998 Microsoft Corporation
  3. Module Name:
  4. rascmn.h
  5. Abstract:
  6. Defines constants needed for both the Win9x and NT sides of
  7. RAS migration.
  8. Author:
  9. Marc R. Whitten (marcw) 22-Nov-1998
  10. Revision History:
  11. <alias> <date> <comments>
  12. --*/
  13. #pragma once
  14. // Whistler bug 34270 Win9x: Upgrade: Require Data Encryption setting for VPN
  15. // connections is not migrated
  16. //
  17. // Session configuration options
  18. //
  19. // from win9x\TELECOM\rna\inc\rnaspi.h
  20. //
  21. #define SMMCFG_SW_COMPRESSION 0x00000001 // Software compression is on
  22. #define SMMCFG_PW_ENCRYPTED 0x00000002 // Encrypted password only
  23. #define SMMCFG_NW_LOGON 0x00000004 // Logon to the network
  24. #define SMMCFG_UNUSED 0x00000010 // Not used, legacy
  25. #define SMMCFG_LOGGING 0x00000100 // Record a log file
  26. #define SMMCFG_SW_ENCRYPTION 0x00000200 // 40 bit encryption is required
  27. #define SMMCFG_SW_ENCRYPTION_STRONG 0x00000400 // 128 bit encryption is required
  28. #define SMMCFG_MULTILINK 0x80000000 // Use multilink
  29. // 'DwDataEncryption' codes. These are now bitmask-ish for the convenience of
  30. // the UI in building capability masks, though more than one bit will never be
  31. // set in 'dwDataEncryption'.
  32. ///
  33. // FYI - We store these are decimal values in the pbk
  34. //
  35. // from nt\net\rras\ras\ui\inc\pbk.h
  36. //
  37. #define DE_None TEXT("0") // Do not encrypt
  38. #define DE_IfPossible TEXT("8") // Request encryption but none OK
  39. #define DE_Require TEXT("256") // Require encryption of any strength
  40. #define DE_RequireMax TEXT("512") // Require maximum strength encryption
  41. // Base protocol definitions (see dwBaseProtocol).
  42. //
  43. // from nt\net\rras\ras\ui\inc\pbk.h
  44. //
  45. #define BP_Ppp TEXT("1")
  46. #define BP_Slip TEXT("2")
  47. #define BP_Ras TEXT("3")
  48. // VPN Strategy
  49. //
  50. // from nt\net\published\inc\ras.w
  51. //
  52. #define VS_Default TEXT("0") // default (PPTP for now)
  53. #define VS_PptpOnly TEXT("1") // Only PPTP is attempted.
  54. #define VS_PptpFirst TEXT("2") // PPTP is tried first.
  55. #define VS_L2tpOnly TEXT("3") // Only L2TP is attempted.
  56. #define VS_L2tpFirst TEXT("4") // L2TP is tried first.
  57. // The entry type used to determine which UI properties
  58. // are to be presented to user. This generally corresponds
  59. // to a Connections "add" wizard selection.
  60. //
  61. // from nt\net\rras\ras\ui\inc\pbk.h
  62. //
  63. #define RASET_Phone TEXT("1") // Phone lines: modem, ISDN, X.25, etc
  64. #define RASET_Vpn TEXT("2") // Virtual private network
  65. #define RASET_Direct TEXT("3") // Direct connect: serial, parallel
  66. #define RASET_Internet TEXT("4") // BaseCamp internet
  67. #define RASET_Broadband TEXT("5") // Broadband
  68. // Media strings
  69. //
  70. #define RASMT_Rastapi TEXT("rastapi") // media for RASET_Vpn/RASET_Broadband
  71. #define RASMT_Serial TEXT("serial") // media for RASET_Phone/RASET_Direct
  72. #define RASMT_Vpn TEXT("WAN Miniport (PPTP)")
  73. // RASENTRY 'szDeviceType' strings
  74. //
  75. // from win9x\TELECOM\rna\inc\rnaph.h
  76. //
  77. #define RASDT_Modem TEXT("modem") // Modem
  78. #define RASDT_Isdn TEXT("isdn") // ISDN
  79. //#define RASDT_X25 TEXT("x25") // X.25
  80. #define RASDT_Vpn TEXT("vpn") // VPN
  81. //#define RASDT_Pad TEXT("pad") // PAD
  82. #define RASDT_Atm TEXT("atm") // ATM
  83. // Internal, used to track what device type is being used
  84. //
  85. #define RASDT_Modem_V 1 // Modem
  86. #define RASDT_Isdn_V 2 // ISDN
  87. //#define RASDT_X25_V 3 // X.25
  88. #define RASDT_Vpn_V 4 // VPN
  89. //#define RASDT_Pad_V 5 // PAD
  90. #define RASDT_Atm_V 6 // ATM
  91. // RASENTRY 'szDeviceType' default strings
  92. //
  93. // from: nt\net\published\inc\ras.w
  94. //
  95. #define RASDT_Modem_NT TEXT("modem")
  96. #define RASDT_Isdn_NT TEXT("isdn")
  97. //#define RASDT_X25_NT TEXT("x25")
  98. #define RASDT_Vpn_NT TEXT("vpn")
  99. //#define RASDT_Pad_NT TEXT("pad")
  100. #define RASDT_Generic_NT TEXT("GENERIC")
  101. #define RASDT_Serial_NT TEXT("SERIAL")
  102. #define RASDT_FrameRelay_NT TEXT("FRAMERELAY")
  103. #define RASDT_Atm_NT TEXT("ATM")
  104. #define RASDT_Sonet_NT TEXT("SONET")
  105. #define RASDT_SW56_NT TEXT("SW56")
  106. #define RASDT_Irda_NT TEXT("IRDA")
  107. #define RASDT_Parallel_NT TEXT("PARALLEL")
  108. #define RASDT_PPPoE_NT TEXT("PPPoE")
  109. // from: nt\net\rras\ras\inc\rasmxs.h
  110. //
  111. #define MXS_SWITCH_TXT TEXT("switch")
  112. #define MXS_NULL_TXT TEXT("null")
  113. // Negotiated protocols
  114. //
  115. #define SMMPROT_NB 0x00000001 // NetBEUI
  116. #define SMMPROT_IPX 0x00000002 // IPX
  117. #define SMMPROT_IP 0x00000004 // TCP/IP
  118. // from: win9x\TELECOM\rna\inc\rnap.h
  119. //
  120. #define DIALUI_NO_PROMPT 0x00000001 // Do not display connect prompt
  121. #define DIALUI_NO_CONFIRM 0x00000002 // Do not display connect confirm
  122. #define DIALUI_NO_TRAY 0x00000004 // No tray icon
  123. #define DIALUI_NO_NW_LOGOFF 0x00000008 // Do not display NetWare logoff dialog
  124. // "Typical" authentication setting masks.See 'dwAuthRestrictions'
  125. //
  126. // Values have been converted to decimal from nt\net\rras\ras\ui\inc\pbk.h
  127. //
  128. // AR_F_TypicalUnsecure = AR_F_AuthPAP | AR_F_AuthSPAP | AR_F_AuthMD5CHAP |
  129. // AR_F_AuthMSCHAP | AR_F_AuthMSCHAP2
  130. // AR_F_TypicalSecure = AR_F_AuthMD5CHAP | AR_F_AuthMSCHAP | AR_F_AuthMSCHAP2
  131. //
  132. #define AR_F_TypicalUnsecure TEXT("632")
  133. #define AR_F_TypicalSecure TEXT("608")
  134. // Flags for the fdwTCPIP field
  135. //
  136. // from: win9x\TELECOM\rna\inc\rnap.h
  137. //
  138. #define IPF_IP_SPECIFIED 0x00000001
  139. #define IPF_NAME_SPECIFIED 0x00000002
  140. #define IPF_NO_COMPRESS 0x00000004
  141. #define IPF_NO_WAN_PRI 0x00000008
  142. // IP address source definitions (see dwIpAddressSource)
  143. //
  144. // from: nt\net\rras\ras\ui\inc\pbk.h
  145. //
  146. #define ASRC_ServerAssigned TEXT("1") // For router means "the ones in NCPA"
  147. #define ASRC_RequireSpecific TEXT("2")
  148. #define ASRC_None TEXT("3") // Router only
  149. // Entry Defaults
  150. //
  151. #define DEF_IpFrameSize TEXT("1006")
  152. #define DEF_HangUpSeconds TEXT("120")
  153. #define DEF_HangUpPercent TEXT("10")
  154. #define DEF_DialSeconds TEXT("120")
  155. #define DEF_DialPercent TEXT("75")
  156. #define DEF_RedialAttempts TEXT("3")
  157. #define DEF_RedialSeconds TEXT("60")
  158. #define DEF_NetAddress TEXT("0.0.0.0")
  159. #define DEF_CustomAuthKey TEXT("-1")
  160. #define DEF_VPNPort TEXT("VPN2-0")
  161. #define DEF_ATMPort TEXT("ATM1-0")
  162. //
  163. // 'OverridePref' bits. Set indicates the corresponding value read from the
  164. // phonebook should be used. Clear indicates the global user preference
  165. // should be used.
  166. //
  167. // from: nt\net\rras\ras\ui\inc\pbk.h
  168. //
  169. // RASOR_RedialAttempts | RASOR_RedialSeconds | RASOR_IdleDisconnectSeconds |
  170. // RASOR_RedialOnLinkFailure
  171. //
  172. #define DEF_OverridePref TEXT("15")
  173. //
  174. // RASENTRY 'dwDialMode' values.
  175. //
  176. // from: nt\net\published\inc\ras.w
  177. //
  178. #define DEF_DialMode TEXT("1")
  179. // "Typical" authentication setting constants. See 'dwTypicalAuth'.
  180. //
  181. // from: nt\net\rras\ras\ui\inc\pbk.h
  182. //
  183. #define TA_Unsecure TEXT("1")
  184. #define TA_Secure TEXT("2")
  185. #define TA_CardOrCert TEXT("3")
  186. #define RAS_UI_FLAG_TERMBEFOREDIAL 0x1
  187. #define RAS_UI_FLAG_TERMAFTERDIAL 0x2
  188. #define RAS_UI_FLAG_OPERATORASSISTED 0x4
  189. #define RAS_UI_FLAG_MODEMSTATUS 0x8
  190. #define RAS_CFG_FLAG_HARDWARE_FLOW_CONTROL 0x00000010
  191. #define RAS_CFG_FLAG_SOFTWARE_FLOW_CONTROL 0x00000020
  192. #define RAS_CFG_FLAG_STANDARD_EMULATION 0x00000040
  193. #define RAS_CFG_FLAG_COMPRESS_DATA 0x00000001
  194. #define RAS_CFG_FLAG_USE_ERROR_CONTROL 0x00000002
  195. #define RAS_CFG_FLAG_ERROR_CONTROL_REQUIRED 0x00000004
  196. #define RAS_CFG_FLAG_USE_CELLULAR_PROTOCOL 0x00000008
  197. #define RAS_CFG_FLAG_NO_WAIT_FOR_DIALTONE 0x00000200