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.

361 lines
14 KiB

  1. //****************************************************************************
  2. //
  3. // File: wancfg.h
  4. // Content: This file contains the general WAN-device related declaration
  5. //
  6. // Copyright (c) 1992-1995, Microsoft Corporation, all rights reserved
  7. //
  8. // History:
  9. // Tues 8-15-95 ScottH Created
  10. //
  11. //****************************************************************************
  12. #ifndef _WANCFG_H_
  13. #define _WANCFG_H_
  14. //
  15. // Device types known to the WAN.TSP
  16. //
  17. #define WAN_DEVICETYPE_ISDN 0
  18. #define WAN_DEVICETYPE_PPTP 1
  19. #define WAN_DEVICETYPE_ATM 2
  20. #define MAX_DEVICETYPE 32
  21. #define MAX_DEVICEDESC 260
  22. typedef struct tagWANCONFIG {
  23. DWORD cbSize; /* size of structure */
  24. DWORD cbTotalSize; /* Total mem used by struct & var data */
  25. TCHAR szDeviceType[MAX_DEVICETYPE]; /* device type */
  26. TCHAR szDeviceDesc[MAX_DEVICEDESC]; /* device description */
  27. DWORD dwDeviceOffset; /* offset of device specific data in
  28. bytes from the start */
  29. DWORD cbDeviceSize; /* size of the device specific data
  30. field */
  31. WCHAR wcData[1]; /* device specific data */
  32. } WANCONFIG, FAR * LPWANCONFIG;
  33. // WAN Device Types
  34. #define SZ_WANTYPE_ISDN "ISDN"
  35. #define SZ_WANTYPE_X25 "X.25"
  36. #define SZ_WANTYPE_PPTP "PPTP"
  37. #define SZ_WANTYPE_ATM "ATM"
  38. //
  39. // WAN Phone book data. This data is stored on a per connection basis
  40. // and the device info used for TAPI get and set dev config.
  41. //
  42. typedef struct tagWANPBCONFIG {
  43. DWORD cbSize; /* size of structure */
  44. DWORD cbTotalSize; /* Total size used by struct & var data */
  45. TCHAR szDeviceType[MAX_DEVICETYPE]; /* device type */
  46. DWORD dwDeviceOffset; /* offset of device specific data in
  47. bytes from the start */
  48. DWORD cbDeviceSize; /* size of the device specific data
  49. field */
  50. DWORD dwVendorOffset; /* offset of vendor specific data in
  51. bytes from the start */
  52. DWORD cbVendorSize; /* size of the vendor specific data
  53. field */
  54. DWORD dwReservedOffset; /* offset of reserved data in bytes
  55. from the start */
  56. DWORD cbReservedSize; /* size of the reserved data field */
  57. WCHAR wcData[1]; /* variable data */
  58. } WANPBCONFIG, FAR * LPWANPBCONFIG;
  59. //
  60. // ISDN Phone book data. This data is stored on a per connection basis
  61. // and is the structure returned for get and set dev config.
  62. //
  63. typedef struct tagISDNPBCONFIG {
  64. DWORD dwFlags; /* flags for the line (ISDN_CHAN_*) */
  65. DWORD dwOptions; /* options for the line (ISDN_CHANOPT_) */
  66. DWORD dwSpeedType; /* channel speed and type */
  67. DWORD dwInactivityTimeout; /* disconnect time in seconds */
  68. } ISDNPBCONFIG, FAR * LPISDNPBCONFIG;
  69. typedef struct tagISDNDEVCAPS {
  70. DWORD cbSize; /* size of structure */
  71. DWORD dwFlags; /* flags for the device (ISDN_*) */
  72. DWORD nSubType; /* device subtype (ISDN_SUBTYPE_*) */
  73. DWORD cLinesMax; /* number of physical lines supported */
  74. DWORD cActiveLines; /* number of active physical lines */
  75. } ISDNDEVCAPS, FAR * LPISDNDEVCAPS;
  76. // Flags for ISDNDEVCAPS
  77. #define ISDN_DEFAULT 0x00000000L
  78. #define ISDN_NO_RESTART 0x00000001L
  79. #define ISDN_VENDOR_CONFIG 0x00000002L
  80. // Subtype ordinals
  81. #define ISDN_SUBTYPE_INTERNAL 0L
  82. #define ISDN_SUBTYPE_PCMCIA 1L
  83. #define ISDN_SUBTYPE_PPTP 2L
  84. typedef struct tagISDNLINECAPS {
  85. DWORD cbSize; /* size of structure */
  86. DWORD dwFlags; /* flags for the line (ISDN_LINE_*) */
  87. DWORD dwChannelFlags; /* flags for the channels (ISDN_CHAN_*) */
  88. DWORD dwSwitchType; /* switches supported */
  89. DWORD dwSpeedType; /* speed type */
  90. DWORD cChannelsMax; /* number of B-channels per line supported */
  91. DWORD cActiveChannels; /* number of active channels */
  92. } ISDNLINECAPS, FAR * LPISDNLINECAPS;
  93. // Flags for ISDNLINECAPS
  94. #define ISDN_LINE_DEFAULT 0x00000000L
  95. #define ISDN_LINE_INACTIVE 0x00000001L
  96. // Channel flags for ISDNLINECAPS
  97. #define ISDN_CHAN_DEFAULT 0x00000000L
  98. #define ISDN_CHAN_INACTIVE 0x00000001L
  99. #define ISDN_CHAN_SPEED_ADJUST 0x00000002L
  100. // Switch type
  101. //#define ISDN_SWITCH_NONE 0x00000000L
  102. #define ISDN_SWITCH_AUTO 0x00000001L
  103. #define ISDN_SWITCH_ATT 0x00000002L
  104. #define ISDN_SWITCH_NI1 0x00000004L
  105. #define ISDN_SWITCH_NTI 0x00000008L
  106. #define ISDN_SWITCH_INS64 0x00000010L
  107. #define ISDN_SWITCH_1TR6 0x00000020L
  108. #define ISDN_SWITCH_VN3 0x00000040L /* retained for compatibility, use VN4*/
  109. #define ISDN_SWITCH_NET3 0x00000080L /* retained for compatibility, use DSS1*/
  110. #define ISDN_SWITCH_DSS1 0x00000080L
  111. #define ISDN_SWITCH_AUS 0x00000100L
  112. #define ISDN_SWITCH_BEL 0x00000200L
  113. #define ISDN_SWITCH_VN4 0x00000400L
  114. #define ISDN_SWITCH_NI2 0x00000800L
  115. #define MAX_SWITCH 12 /* Needs to be updated with above list */
  116. // Speed type
  117. #define ISDN_SPEED_64K_DATA 0x00000001L
  118. #define ISDN_SPEED_56K_DATA 0x00000002L
  119. #define ISDN_SPEED_56K_VOICE 0x00000004L
  120. #define ISDN_SPEED_128K_DATA 0x00000008L
  121. typedef struct tagISDNCONFIG {
  122. DWORD cbSize; /* size of structure */
  123. DWORD cbTotalSize; /* Total mem used by struct & var data */
  124. DWORD dwFlags; /* flags for the device (ISDN_*) */
  125. ISDNDEVCAPS idc; /* device capabilities */
  126. DWORD cLines; /* number of physical lines in the
  127. line specific data block */
  128. HKEY hkeyDriver; /* handle to driver registry key */
  129. DWORD dwVendorOffset; /* offset of vendor specific data in
  130. bytes from the start */
  131. DWORD cbVendorSize; /* size of the vendor specific data
  132. field */
  133. DWORD dwReservedOffset; /* offset of reserved data in bytes
  134. from the start */
  135. DWORD cbReservedSize; /* size of the reserved data field */
  136. DWORD dwLineOffset; /* offset of line specific data
  137. in bytes from the start */
  138. DWORD cbLineSize; /* size of the line specific data */
  139. WORD padding; /* padding for dword alignment */
  140. WCHAR wcData[1]; /* variable data */
  141. } ISDNCONFIG, FAR * LPISDNCONFIG;
  142. typedef struct tagISDNLINE {
  143. DWORD cbSize; /* size of structure */
  144. DWORD cbTotalSize; /* Total mem used by struct & var data */
  145. DWORD dwLineID; /* unique line ID */
  146. DWORD dwFlags; /* flags for the line (ISDN_LINE_*) */
  147. DWORD dwOptions; /* options for the line (ISDN_LINEOPT_) */
  148. DWORD dwSwitchType; /* switch type */
  149. DWORD dwUseChannel; /* specific channel to use or number
  150. of channels to use */
  151. ISDNLINECAPS ilc; /* line capabilities */
  152. DWORD cChannels; /* number of channels in the channel
  153. specific data block */
  154. HKEY hkeyLine; /* handle to line registry key */
  155. DWORD dwVendorOffset; /* offset of vendor specific data in
  156. bytes from the start */
  157. DWORD cbVendorSize; /* size of the vendor specific data
  158. field */
  159. DWORD dwReservedOffset; /* offset of reserved data in bytes
  160. from the start */
  161. DWORD cbReservedSize; /* size of the reserved data field */
  162. DWORD dwChannelOffset; /* offset of channel specific data
  163. in bytes from the start */
  164. DWORD cbChannelSize; /* size of the channel specific data */
  165. WORD padding; /* padding for dword alignment */
  166. WCHAR wcData[1]; /* variable data */
  167. } ISDNLINE, FAR * LPISDNLINE;
  168. // Options for line
  169. #define ISDN_LINEOPT_DEFAULT 0x00000000L
  170. #define ISDN_LINEOPT_CHANNELID 0x00000001L
  171. #define ISDN_LINEOPT_FIXEDCOUNT 0x00000002L
  172. #define MAX_PHONE 32
  173. #define MAX_SPID 32
  174. typedef struct tagISDNCHANNEL {
  175. DWORD cbSize; /* size of structure */
  176. DWORD cbTotalSize; /* Total mem used by struct & var data */
  177. DWORD dwChannelID; /* unique channel ID */
  178. DWORD dwFlags; /* flags for the line (ISDN_CHAN_*) */
  179. DWORD dwOptions; /* options for the line (ISDN_CHANOPT_) */
  180. DWORD dwSpeedType; /* channel speed and type */
  181. DWORD dwInactivityTimeout; /* disconnect time in seconds */
  182. TCHAR szPhone[MAX_PHONE]; /* phone number */
  183. TCHAR szSPID[MAX_SPID]; /* SPID */
  184. HKEY hkeyChannel; /* handle to channel registry key */
  185. DWORD dwVendorOffset; /* offset of vendor specific data in
  186. bytes from the start */
  187. DWORD cbVendorSize; /* size of the vendor specific data
  188. field */
  189. DWORD dwReservedOffset; /* offset of reserved data in bytes
  190. from the start */
  191. DWORD cbReservedSize; /* size of the reserved data field */
  192. WORD padding; /* padding for dword alignment */
  193. WCHAR wcData[1]; /* variable data */
  194. } ISDNCHANNEL, FAR * LPISDNCHANNEL;
  195. // Options for channel
  196. #define ISDN_CHANOPT_DEFAULT 0x00000000L
  197. #define ISDN_CHANOPT_SHOW_STATUS 0x00000001L
  198. #define ISDN_CHANOPT_ENABLE_LOG 0x00000002L
  199. #define ISDN_CHANOPT_INACTIVE_TIMEOUT 0x00000004L
  200. //
  201. // ATM Configuration info
  202. //
  203. typedef struct tagATMCONFIG {
  204. DWORD cbSize; /* size of structure */
  205. DWORD cbTotalSize; /* Total mem used by struct & var data */
  206. DWORD dwFlags; /* flags for the device */
  207. DWORD dwCircuitFlags; /* flags for the circuit */
  208. HKEY hkeyDriver; /* handle to driver registry key */
  209. DWORD dwVendorOffset; /* offset of vendor specific data in
  210. bytes from the start */
  211. DWORD cbVendorSize; /* size of the vendor specific data
  212. field */
  213. DWORD dwReservedOffset; /* offset of reserved data in bytes
  214. from the start */
  215. DWORD cbReservedSize; /* size of the reserved data field */
  216. WCHAR wcData[1]; /* variable data */
  217. } ATMCONFIG, FAR * LPATMCONFIG;
  218. //
  219. // ATM Phone book data. This data is stored on a per connection basis
  220. // and is the structure returned for get and set dev config.
  221. //
  222. typedef struct tagATMPBCONFIG {
  223. DWORD dwGeneralOpt; /* General options */
  224. DWORD dwCircuitOpt; /* Circuit options */
  225. DWORD dwCircuitSpeed; /* Circuit Speed */
  226. WORD wPvcVpi; /* PVC: VPI */
  227. WORD wPvcVci; /* PVC: VCI */
  228. } ATMPBCONFIG, FAR * LPATMPBCONFIG;
  229. //
  230. // Flags for ATM Phone Book entry
  231. //
  232. //
  233. // ATM General Options
  234. //
  235. #define ATM_GENERAL_OPT_VENDOR_CONFIG 0x00000001L
  236. #define ATM_GENERAL_OPT_SHOW_STATUS 0x00000002L
  237. #define ATM_GENERAL_OPT_ENABLE_LOG 0x00000004L
  238. #define ATM_GENERAL_OPT_MASK 0x0000000FL
  239. #define ATM_GENERAL_OPT_DEFAULT 0x00000000L
  240. //
  241. // ATM Circuit Options
  242. //
  243. #define ATM_CIRCUIT_OPT_QOS_ADJUST 0x00000010L
  244. #define ATM_CIRCUIT_OPT_SPEED_ADJUST 0x00000020L
  245. #define ATM_CIRCUIT_OPT_SVC 0x00000040L
  246. #define ATM_CIRCUIT_OPT_PVC 0x00000080L
  247. #define ATM_CIRCUIT_OPT_MASK 0x000000F0L
  248. #define ATM_CIRCUIT_OPT_DEFAULT (ATM_CIRCUIT_OPT_SVC | ATM_CIRCUIT_OPT_QOS_ADJUST | ATM_CIRCUIT_OPT_SPEED_ADJUST)
  249. //
  250. // ATM QOS Flags
  251. //
  252. #define ATM_CIRCUIT_QOS_VBR 0x00000100L
  253. #define ATM_CIRCUIT_QOS_CBR 0x00000200L
  254. #define ATM_CIRCUIT_QOS_ABR 0x00000400L
  255. #define ATM_CIRCUIT_QOS_UBR 0x00000800L
  256. #define ATM_CIRCUIT_QOS_MASK 0x00000F00L
  257. #define ATM_CIRCUIT_QOS_DEFAULT (ATM_CIRCUIT_QOS_UBR)
  258. //
  259. // ATM Speed Flags
  260. //
  261. #define ATM_CIRCUIT_SPEED_LINE_RATE 0x00001000L
  262. #define ATM_CIRCUIT_SPEED_USER_SPEC 0x00002000L
  263. #define ATM_CIRCUIT_SPEED_512KB 0x00004000L
  264. #define ATM_CIRCUIT_SPEED_1536KB 0x00008000L
  265. #define ATM_CIRCUIT_SPEED_25MB 0x00010000L
  266. #define ATM_CIRCUIT_SPEED_155MB 0x00020000L
  267. #define ATM_CIRCUIT_SPEED_MASK 0x000FF000L
  268. #define ATM_CIRCUIT_SPEED_DEFAULT (ATM_CIRCUIT_SPEED_LINE_RATE)
  269. //
  270. // ATM Encapsulation Flags
  271. //
  272. #define ATM_CIRCUIT_ENCAP_NULL 0x00100000L
  273. #define ATM_CIRCUIT_ENCAP_LLC 0x00200000L
  274. #define ATM_CIRCUIT_ENCAP_MASK 0x00F00000L
  275. #define ATM_CIRCUIT_ENCAP_DEFAULT (ATM_CIRCUIT_ENCAP_NULL)
  276. //
  277. // WAN Handler binding
  278. //
  279. DWORD WINAPI WanBind_Get(LPCTSTR pszDeviceType);
  280. DWORD WINAPI WanBind_Release(LPCTSTR pszDeviceType);
  281. HICON WINAPI WanBind_GetIcon(LPCTSTR pszDeviceType);
  282. DWORD WINAPI WanBind_ConfigDialog(LPCTSTR pszDeviceType, LPCTSTR pszFriendlyName, HWND hwndOwner, LPWANCONFIG pwc, LPWANPBCONFIG pwpbc);
  283. DWORD WINAPI WanBind_QueryConfigData(LPCTSTR pszDeviceType, HKEY hkey, DWORD dwLineID, LPVOID pvData, LPDWORD pcbData);
  284. //
  285. // Exports by the handler
  286. //
  287. DWORD WINAPI WanQueryConfigData(HKEY hkey, DWORD dwLineID, LPVOID pvData, LPDWORD pcbData);
  288. DWORD WINAPI WanConfigDialog(LPCTSTR pszFriendlyName, HWND hwndOwner, LPWANCONFIG lpwanconfig, LPWANPBCONFIG pwpbc);
  289. #endif //_WANCFG_H_