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.

722 lines
23 KiB

  1. /************************************************************************
  2. * *
  3. * mcx.h -- This module defines the 32-Bit Windows MCX APIs *
  4. * *
  5. * Copyright (c) 1990-1999, Microsoft Corp. All rights reserved. *
  6. * *
  7. ************************************************************************/
  8. #ifndef _MCX_H_
  9. #define _MCX_H_
  10. #if _MSC_VER > 1000
  11. #pragma once
  12. #endif
  13. typedef struct _MODEMDEVCAPS {
  14. DWORD dwActualSize;
  15. DWORD dwRequiredSize;
  16. DWORD dwDevSpecificOffset;
  17. DWORD dwDevSpecificSize;
  18. // product and version identification
  19. DWORD dwModemProviderVersion;
  20. DWORD dwModemManufacturerOffset;
  21. DWORD dwModemManufacturerSize;
  22. DWORD dwModemModelOffset;
  23. DWORD dwModemModelSize;
  24. DWORD dwModemVersionOffset;
  25. DWORD dwModemVersionSize;
  26. // local option capabilities
  27. DWORD dwDialOptions; // bitmap of supported values
  28. DWORD dwCallSetupFailTimer; // maximum in seconds
  29. DWORD dwInactivityTimeout; // maximum in seconds
  30. DWORD dwSpeakerVolume; // bitmap of supported values
  31. DWORD dwSpeakerMode; // bitmap of supported values
  32. DWORD dwModemOptions; // bitmap of supported values
  33. DWORD dwMaxDTERate; // maximum value in bit/s
  34. DWORD dwMaxDCERate; // maximum value in bit/s
  35. // Variable portion for proprietary expansion
  36. BYTE abVariablePortion [1];
  37. } MODEMDEVCAPS, *PMODEMDEVCAPS, *LPMODEMDEVCAPS;
  38. typedef struct _MODEMSETTINGS {
  39. DWORD dwActualSize;
  40. DWORD dwRequiredSize;
  41. DWORD dwDevSpecificOffset;
  42. DWORD dwDevSpecificSize;
  43. // static local options (read/write)
  44. DWORD dwCallSetupFailTimer; // seconds
  45. DWORD dwInactivityTimeout; // seconds
  46. DWORD dwSpeakerVolume; // level
  47. DWORD dwSpeakerMode; // mode
  48. DWORD dwPreferredModemOptions; // bitmap
  49. // negotiated options (read only) for current or last call
  50. DWORD dwNegotiatedModemOptions; // bitmap
  51. DWORD dwNegotiatedDCERate; // bit/s
  52. // Variable portion for proprietary expansion
  53. BYTE abVariablePortion [1];
  54. } MODEMSETTINGS, *PMODEMSETTINGS, *LPMODEMSETTINGS;
  55. // Dial Options
  56. #define DIALOPTION_BILLING 0x00000040 // Supports wait for bong "$"
  57. #define DIALOPTION_QUIET 0x00000080 // Supports wait for quiet "@"
  58. #define DIALOPTION_DIALTONE 0x00000100 // Supports wait for dial tone "W"
  59. // SpeakerVolume for MODEMDEVCAPS
  60. #define MDMVOLFLAG_LOW 0x00000001
  61. #define MDMVOLFLAG_MEDIUM 0x00000002
  62. #define MDMVOLFLAG_HIGH 0x00000004
  63. // SpeakerVolume for MODEMSETTINGS
  64. #define MDMVOL_LOW 0x00000000
  65. #define MDMVOL_MEDIUM 0x00000001
  66. #define MDMVOL_HIGH 0x00000002
  67. // SpeakerMode for MODEMDEVCAPS
  68. #define MDMSPKRFLAG_OFF 0x00000001
  69. #define MDMSPKRFLAG_DIAL 0x00000002
  70. #define MDMSPKRFLAG_ON 0x00000004
  71. #define MDMSPKRFLAG_CALLSETUP 0x00000008
  72. // SpeakerMode for MODEMSETTINGS
  73. #define MDMSPKR_OFF 0x00000000
  74. #define MDMSPKR_DIAL 0x00000001
  75. #define MDMSPKR_ON 0x00000002
  76. #define MDMSPKR_CALLSETUP 0x00000003
  77. // Modem Options
  78. #define MDM_COMPRESSION 0x00000001
  79. #define MDM_ERROR_CONTROL 0x00000002
  80. #define MDM_FORCED_EC 0x00000004
  81. #define MDM_CELLULAR 0x00000008
  82. #define MDM_FLOWCONTROL_HARD 0x00000010
  83. #define MDM_FLOWCONTROL_SOFT 0x00000020
  84. #define MDM_CCITT_OVERRIDE 0x00000040
  85. #define MDM_SPEED_ADJUST 0x00000080
  86. #define MDM_TONE_DIAL 0x00000100
  87. #define MDM_BLIND_DIAL 0x00000200
  88. #define MDM_V23_OVERRIDE 0x00000400
  89. #define MDM_DIAGNOSTICS 0x00000800
  90. //=========================================================================
  91. //
  92. //
  93. // EXTENDED MODEM OPTIONS INFORMATION
  94. //
  95. // THE following macros define additional bits in dwPreferredModemOptions.
  96. //
  97. // These bits specify information relevant to making ISDN and GSM
  98. // calls, such as which protocol to use.
  99. //
  100. //=========================================================================
  101. #define MDM_MASK_BEARERMODE 0x0000f000
  102. #define MDM_SHIFT_BEARERMODE 12
  103. #define MDM_MASK_PROTOCOLID 0x000f0000
  104. #define MDM_SHIFT_PROTOCOLID 16
  105. #define MDM_MASK_PROTOCOLDATA 0x0ff00000
  106. #define MDM_SHIFT_PROTOCOLDATA 20
  107. //
  108. // PROTOCOLINFO is the union of PROTOCOLID and PROTOCOLDATA ...
  109. //
  110. #define MDM_MASK_PROTOCOLINFO (MDM_MASK_PROTOCOLID|MDM_MASK_PROTOCOLDATA)
  111. #define MDM_SHIFT_PROTOCOLINFO MDM_SHIFT_PROTOCOLID
  112. //
  113. // EXTENDEDINFO is the union of BEARERMODE and PROTOCOLINFO
  114. //
  115. #define MDM_MASK_EXTENDEDINFO (MDM_MASK_BEARERMODE|MDM_MASK_PROTOCOLINFO)
  116. #define MDM_SHIFT_EXTENDEDINFO MDM_SHIFT_BEARERMODE
  117. #define MDM_GET_BEARERMODE(_dwOptions) \
  118. (((_dwOptions)&MDM_MASK_BEARERMODE) >> MDM_SHIFT_BEARERMODE)
  119. #define MDM_SET_BEARERMODE(_dwOptions,_bm) \
  120. (((_dwOptions) &= ~MDM_MASK_BEARERMODE), \
  121. ((_dwOptions) |= (((_bm)<<MDM_SHIFT_BEARERMODE)&MDM_MASK_BEARERMODE)))
  122. #define MDM_GET_PROTOCOLID(_dwOptions) \
  123. (((_dwOptions)&MDM_MASK_PROTOCOLID) >> MDM_SHIFT_PROTOCOLID)
  124. #define MDM_SET_PROTOCOLID(_dwOptions,_prot) \
  125. (((_dwOptions) &= ~MDM_MASK_PROTOCOLID), \
  126. ((_dwOptions) |= (((_prot)<<MDM_SHIFT_PROTOCOLID)&MDM_MASK_PROTOCOLID)))
  127. #define MDM_GET_PROTOCOLDATA(_dwOptions) \
  128. (((_dwOptions)&MDM_MASK_PROTOCOLDATA) >> MDM_SHIFT_PROTOCOLDATA)
  129. #define MDM_SET_PROTOCOLDATA(_dwOptions,_pd) \
  130. (((_dwOptions) &= ~MDM_MASK_PROTOCOLDATA), \
  131. ((_dwOptions) |= (((_pd)<<MDM_SHIFT_PROTOCOLDATA)&MDM_MASK_PROTOCOLDATA)))
  132. //
  133. // MDM_GET_PROTOCOLINFO gets the protocol-id and info bits in
  134. // their IN-PLACE form (preserving their place in dwModemPreferredOptions)
  135. //
  136. #define MDM_GET_PROTOCOLINFO(_dwOptions) \
  137. ((_dwOptions)&MDM_MASK_PROTOCOLINFO)
  138. //
  139. // MDM_SET_PROTOCOLINFO takes as its argument the protocol-id and info bits in
  140. // their IN-PLACE form (final position within dwModemPreferredOptions)
  141. //
  142. #define MDM_SET_PROTOCOLINFO(_dwOptions,_pinfo) \
  143. (((_dwOptions) &= ~MDM_MASK_PROTOCOLINFO), \
  144. ((_dwOptions) |= ((_pinfo)&MDM_MASK_PROTOCOLINFO)))
  145. //
  146. // MDM_GEN_PROTOCOLINFO generates the the protocol-id and info bits in
  147. // their IN-PLACE form (final position within dwModemPreferredOptions).
  148. //
  149. #define MDM_GEN_PROTOCOLINFO(_pid, _pdata) \
  150. ((((_pid )<<MDM_SHIFT_PROTOCOLID )&MDM_MASK_PROTOCOLID ) \
  151. |(((_pdata)<<MDM_SHIFT_PROTOCOLDATA)&MDM_MASK_PROTOCOLDATA))
  152. //
  153. // MDM_GET_EXTENDEDIONFO gets the bearermode and protocol information in
  154. // their IN-PLACE form (preserving their place in dwModemPreferredOptions)
  155. //
  156. #define MDM_GET_EXTENDEDINFO(_dwOptions) \
  157. ((_dwOptions)&MDM_MASK_EXTENDEDINFO)
  158. //
  159. // MDM_SET_PROTOCOLINFO takes as its argument the bearermode and
  160. // protocol bits in their IN-PLACE form (final position within
  161. // dwModemPreferredOptions)
  162. //
  163. #define MDM_SET_EXTENDEDINFO(_dwOptions,_extinfo) \
  164. (((_dwOptions) &= ~MDM_MASK_EXTENDEDINFO), \
  165. ((_dwOptions) |= ((_extinfo) & MDM_MASK_EXTENDEDINFO)))
  166. //
  167. // MDM_GEN_EXTENDEDINFO generates the bearermode and protocol information
  168. // in their IN-PLACE form (final position within dwModemPreferredOptions0.
  169. //
  170. #define MDM_GEN_EXTENDEDINFO(_bearermode, _pinfo) \
  171. (((_pinfo)&MDM_MASK_PROTOCOLINFO ) \
  172. |(((_bearermode)<<MDM_SHIFT_BEARERMODE)&MDM_MASK_BEARERMODE))
  173. //=========================================================================
  174. // BEARER MODES
  175. //=========================================================================
  176. //
  177. #define MDM_BEARERMODE_ANALOG 0x0
  178. #define MDM_BEARERMODE_ISDN 0x1
  179. #define MDM_BEARERMODE_GSM 0x2
  180. //=========================================================================
  181. // PROTOCOL IDs
  182. //=========================================================================
  183. //
  184. #define MDM_PROTOCOLID_DEFAULT 0x0
  185. #define MDM_PROTOCOLID_HDLCPPP 0x1
  186. #define MDM_PROTOCOLID_V128 0x2
  187. #define MDM_PROTOCOLID_X75 0x3
  188. #define MDM_PROTOCOLID_V110 0x4
  189. #define MDM_PROTOCOLID_V120 0x5
  190. #define MDM_PROTOCOLID_AUTO 0x6 // Auto protocol detection.
  191. #define MDM_PROTOCOLID_ANALOG 0x7 // Applicable only to GSM
  192. #define MDM_PROTOCOLID_GPRS 0x8
  193. #define MDM_PROTOCOLID_PIAFS 0x9
  194. //=========================================================================
  195. // HDLC PPP PROTOCOL INFORMATION
  196. //=========================================================================
  197. //
  198. // Following are specific to the HDLC-PPP protocol.
  199. // The shifts are w.r.t. the start of the PROTOCOLDATA field.
  200. #define MDM_SHIFT_HDLCPPP_SPEED 0x0
  201. #define MDM_MASK_HDLCPPP_SPEED 0x7 // 3 bits
  202. #define MDM_HDLCPPP_SPEED_DEFAULT 0x0
  203. #define MDM_HDLCPPP_SPEED_64K 0x1
  204. #define MDM_HDLCPPP_SPEED_56K 0x2
  205. #define MDM_SHIFT_HDLCPPP_AUTH 0x3
  206. #define MDM_MASK_HDLCPPP_AUTH (0x7<<3) // 3 bits
  207. #define MDM_HDLCPPP_AUTH_DEFAULT 0x0
  208. #define MDM_HDLCPPP_AUTH_NONE 0x1
  209. #define MDM_HDLCPPP_AUTH_PAP 0x2
  210. #define MDM_HDLCPPP_AUTH_CHAP 0x3
  211. #define MDM_HDLCPPP_AUTH_MSCHAP 0x4
  212. #define MDM_SHIFT_HDLCPPP_ML 0x6
  213. #define MDM_MASK_HDLCPPP_ML (0x3<<6) // 2 bits
  214. #define MDM_HDLCPPP_ML_DEFAULT 0x0
  215. #define MDM_HDLCPPP_ML_NONE 0x1
  216. #define MDM_HDLCPPP_ML_2 0x2
  217. #define MDM_GEN_HDLCPPP_PROTOCOL_DATA(_speed, _auth, _ml) \
  218. ((((_speed)<<MDM_SHIFT_HDLCPPP_SPEED)&MDM_MASK_HDLCPPP_SPEED) \
  219. |(((_auth )<<MDM_SHIFT_HDLCPPP_AUTH )&MDM_MASK_HDLCPPP_AUTH ) \
  220. |(((_ml )<<MDM_SHIFT_HDLCPPP_ML )&MDM_MASK_HDLCPPP_ML ))
  221. #define MDM_PROTOCOL_HDLCPPP_64K \
  222. MDM_GEN_PROTOCOLINFO( \
  223. MDM_PROTOCOLID_HDLCPPP, \
  224. MDM_GEN_HDLCPPP_PROTOCOL_DATA ( \
  225. MDM_HDLCPPP_SPEED_64K, \
  226. MDM_HDLCPPP_AUTH_DEFAULT, \
  227. MDM_HDLCPPP_ML_DEFAULT \
  228. ) \
  229. )
  230. #define MDM_PROTOCOL_HDLCPPP_56K \
  231. MDM_GEN_PROTOCOLINFO( \
  232. MDM_PROTOCOLID_HDLCPPP, \
  233. MDM_GEN_HDLCPPP_PROTOCOL_DATA ( \
  234. MDM_HDLCPPP_SPEED_56K, \
  235. MDM_HDLCPPP_AUTH_DEFAULT, \
  236. MDM_HDLCPPP_ML_DEFAULT \
  237. ) \
  238. )
  239. #define MDM_PROTOCOL_HDLCPPP_112K \
  240. MDM_GEN_PROTOCOLINFO( \
  241. MDM_PROTOCOLID_HDLCPPP, \
  242. MDM_GEN_HDLCPPP_PROTOCOL_DATA ( \
  243. MDM_HDLCPPP_SPEED_56K, \
  244. MDM_HDLCPPP_AUTH_DEFAULT, \
  245. MDM_HDLCPPP_ML_2 \
  246. ) \
  247. )
  248. #define MDM_PROTOCOL_HDLCPPP_112K_PAP \
  249. MDM_GEN_PROTOCOLINFO( \
  250. MDM_PROTOCOLID_HDLCPPP, \
  251. MDM_GEN_HDLCPPP_PROTOCOL_DATA ( \
  252. MDM_HDLCPPP_SPEED_56K, \
  253. MDM_HDLCPPP_AUTH_PAP, \
  254. MDM_HDLCPPP_ML_2 \
  255. ) \
  256. )
  257. #define MDM_PROTOCOL_HDLCPPP_112K_CHAP \
  258. MDM_GEN_PROTOCOLINFO( \
  259. MDM_PROTOCOLID_HDLCPPP, \
  260. MDM_GEN_HDLCPPP_PROTOCOL_DATA ( \
  261. MDM_HDLCPPP_SPEED_56K, \
  262. MDM_HDLCPPP_AUTH_CHAP, \
  263. MDM_HDLCPPP_ML_2 \
  264. ) \
  265. )
  266. #define MDM_PROTOCOL_HDLCPPP_112K_MSCHAP\
  267. MDM_GEN_PROTOCOLINFO( \
  268. MDM_PROTOCOLID_HDLCPPP, \
  269. MDM_GEN_HDLCPPP_PROTOCOL_DATA ( \
  270. MDM_HDLCPPP_SPEED_56K, \
  271. MDM_HDLCPPP_AUTH_MSCHAP, \
  272. MDM_HDLCPPP_ML_2 \
  273. ) \
  274. )
  275. #define MDM_PROTOCOL_HDLCPPP_128K \
  276. MDM_GEN_PROTOCOLINFO( \
  277. MDM_PROTOCOLID_HDLCPPP, \
  278. MDM_GEN_HDLCPPP_PROTOCOL_DATA ( \
  279. MDM_HDLCPPP_SPEED_64K, \
  280. MDM_HDLCPPP_AUTH_DEFAULT, \
  281. MDM_HDLCPPP_ML_2 \
  282. ) \
  283. )
  284. #define MDM_PROTOCOL_HDLCPPP_128K_PAP \
  285. MDM_GEN_PROTOCOLINFO( \
  286. MDM_PROTOCOLID_HDLCPPP, \
  287. MDM_GEN_HDLCPPP_PROTOCOL_DATA ( \
  288. MDM_HDLCPPP_SPEED_64K, \
  289. MDM_HDLCPPP_AUTH_PAP, \
  290. MDM_HDLCPPP_ML_2 \
  291. ) \
  292. )
  293. #define MDM_PROTOCOL_HDLCPPP_128K_CHAP \
  294. MDM_GEN_PROTOCOLINFO( \
  295. MDM_PROTOCOLID_HDLCPPP, \
  296. MDM_GEN_HDLCPPP_PROTOCOL_DATA ( \
  297. MDM_HDLCPPP_SPEED_64K, \
  298. MDM_HDLCPPP_AUTH_CHAP, \
  299. MDM_HDLCPPP_ML_2 \
  300. ) \
  301. )
  302. #define MDM_PROTOCOL_HDLCPPP_128K_MSCHAP\
  303. MDM_GEN_PROTOCOLINFO( \
  304. MDM_PROTOCOLID_HDLCPPP, \
  305. MDM_GEN_HDLCPPP_PROTOCOL_DATA ( \
  306. MDM_HDLCPPP_SPEED_64K, \
  307. MDM_HDLCPPP_AUTH_MSCHAP, \
  308. MDM_HDLCPPP_ML_2 \
  309. ) \
  310. )
  311. //=========================================================================
  312. // V120 PROTOCOL INFORMATION
  313. //
  314. // The shifts are w.r.t. the start of the PROTOCOLDATA field.
  315. //
  316. //=========================================================================
  317. #define MDM_SHIFT_V120_SPEED 0x0
  318. #define MDM_MASK_V120_SPEED 0x7 // 3 bits
  319. #define MDM_V120_SPEED_DEFAULT 0x0
  320. #define MDM_V120_SPEED_64K 0x1
  321. #define MDM_V120_SPEED_56K 0x2
  322. #define MDM_SHIFT_V120_ML 0x6
  323. #define MDM_MASK_V120_ML (0x3<<6) // 2 bits
  324. #define MDM_V120_ML_DEFAULT 0x0
  325. #define MDM_V120_ML_NONE 0x1
  326. #define MDM_V120_ML_2 0x2
  327. #define MDM_GEN_V120_PROTOCOL_DATA(_speed, _ml) \
  328. ((((_speed)<<MDM_SHIFT_V120_SPEED)&MDM_MASK_V120_SPEED) \
  329. |(((_ml )<<MDM_SHIFT_V120_ML )&MDM_MASK_V120_ML ))
  330. #define MDM_PROTOCOL_V120_64K \
  331. MDM_GEN_PROTOCOLINFO( \
  332. MDM_PROTOCOLID_V120, \
  333. MDM_GEN_V120_PROTOCOL_DATA (\
  334. MDM_V120_SPEED_64K, \
  335. MDM_V120_ML_NONE \
  336. ) \
  337. )
  338. #define MDM_PROTOCOL_V120_56K \
  339. MDM_GEN_PROTOCOLINFO( \
  340. MDM_PROTOCOLID_V120, \
  341. MDM_GEN_V120_PROTOCOL_DATA (\
  342. MDM_V120_SPEED_56K, \
  343. MDM_V120_ML_NONE \
  344. ) \
  345. )
  346. #define MDM_PROTOCOL_V120_112K \
  347. MDM_GEN_PROTOCOLINFO( \
  348. MDM_PROTOCOLID_V120, \
  349. MDM_GEN_V120_PROTOCOL_DATA (\
  350. MDM_V120_SPEED_56K, \
  351. MDM_V120_ML_2 \
  352. ) \
  353. )
  354. #define MDM_PROTOCOL_V120_128K \
  355. MDM_GEN_PROTOCOLINFO( \
  356. MDM_PROTOCOLID_V120, \
  357. MDM_GEN_V120_PROTOCOL_DATA (\
  358. MDM_V120_SPEED_64K, \
  359. MDM_V120_ML_2 \
  360. ) \
  361. )
  362. //=========================================================================
  363. // X75 PROTOCOL INFORMATION
  364. //
  365. // The shifts are w.r.t. the start of the PROTOCOLDATA field.
  366. //
  367. //=========================================================================
  368. #define MDM_SHIFT_X75_DATA 0x0
  369. #define MDM_MASK_X75_DATA 0x7 // 3 bits
  370. #define MDM_X75_DATA_DEFAULT 0x0
  371. #define MDM_X75_DATA_64K 0x1
  372. #define MDM_X75_DATA_128K 0x2
  373. #define MDM_X75_DATA_T_70 0x3
  374. #define MDM_X75_DATA_BTX 0x4
  375. #define MDM_GEN_X75_PROTOCOL_DATA(_data) \
  376. (((_data)<<MDM_SHIFT_X75_DATA)&MDM_MASK_X75_DATA)
  377. #define MDM_PROTOCOL_X75_64K \
  378. MDM_GEN_PROTOCOLINFO( \
  379. MDM_PROTOCOLID_X75, \
  380. MDM_GEN_X75_PROTOCOL_DATA ( \
  381. MDM_X75_DATA_64K \
  382. ) \
  383. )
  384. #define MDM_PROTOCOL_X75_128K \
  385. MDM_GEN_PROTOCOLINFO( \
  386. MDM_PROTOCOLID_X75, \
  387. MDM_GEN_X75_PROTOCOL_DATA ( \
  388. MDM_X75_DATA_128K \
  389. ) \
  390. )
  391. #define MDM_PROTOCOL_X75_T_70 \
  392. MDM_GEN_PROTOCOLINFO( \
  393. MDM_PROTOCOLID_X75, \
  394. MDM_GEN_X75_PROTOCOL_DATA ( \
  395. MDM_X75_DATA_T_70 \
  396. ) \
  397. ) \
  398. #define MDM_PROTOCOL_X75_BTX \
  399. MDM_GEN_PROTOCOLINFO( \
  400. MDM_PROTOCOLID_X75, \
  401. MDM_GEN_X75_PROTOCOL_DATA ( \
  402. MDM_X75_DATA_BTX \
  403. ) \
  404. )
  405. //=========================================================================
  406. // V110 PROTOCOL INFORMATION
  407. //
  408. // The shifts are w.r.t. the start of the PROTOCOLDATA field.
  409. //
  410. //=========================================================================
  411. #define MDM_SHIFT_V110_SPEED 0x0
  412. #define MDM_MASK_V110_SPEED 0xf // 4 bits
  413. #define MDM_V110_SPEED_DEFAULT 0x0
  414. #define MDM_V110_SPEED_1DOT2K 0x1
  415. #define MDM_V110_SPEED_2DOT4K 0x2
  416. #define MDM_V110_SPEED_4DOT8K 0x3
  417. #define MDM_V110_SPEED_9DOT6K 0x4
  418. #define MDM_V110_SPEED_12DOT0K 0x5
  419. #define MDM_V110_SPEED_14DOT4K 0x6
  420. #define MDM_V110_SPEED_19DOT2K 0x7
  421. #define MDM_V110_SPEED_28DOT8K 0x8
  422. #define MDM_V110_SPEED_38DOT4K 0x9
  423. #define MDM_V110_SPEED_57DOT6K 0xA
  424. #define MDM_GEN_V110_PROTOCOL_DATA(_data) \
  425. (((_data)<<MDM_SHIFT_V110_SPEED)&MDM_MASK_V110_SPEED)
  426. #define MDM_PROTOCOL_V110_1DOT2K \
  427. MDM_GEN_PROTOCOLINFO( \
  428. MDM_PROTOCOLID_V110, \
  429. MDM_GEN_V110_PROTOCOL_DATA (\
  430. MDM_V110_SPEED_1DOT2K \
  431. ) \
  432. )
  433. #define MDM_PROTOCOL_V110_2DOT4K \
  434. MDM_GEN_PROTOCOLINFO( \
  435. MDM_PROTOCOLID_V110, \
  436. MDM_GEN_V110_PROTOCOL_DATA (\
  437. MDM_V110_SPEED_2DOT4K \
  438. ) \
  439. )
  440. #define MDM_PROTOCOL_V110_4DOT8K \
  441. MDM_GEN_PROTOCOLINFO( \
  442. MDM_PROTOCOLID_V110, \
  443. MDM_GEN_V110_PROTOCOL_DATA (\
  444. MDM_V110_SPEED_4DOT8K \
  445. ) \
  446. )
  447. #define MDM_PROTOCOL_V110_9DOT6K \
  448. MDM_GEN_PROTOCOLINFO( \
  449. MDM_PROTOCOLID_V110, \
  450. MDM_GEN_V110_PROTOCOL_DATA (\
  451. MDM_V110_SPEED_9DOT6K \
  452. ) \
  453. )
  454. #define MDM_PROTOCOL_V110_12DOT0K \
  455. MDM_GEN_PROTOCOLINFO( \
  456. MDM_PROTOCOLID_V110, \
  457. MDM_GEN_V110_PROTOCOL_DATA (\
  458. MDM_V110_SPEED_12DOT0K \
  459. ) \
  460. )
  461. #define MDM_PROTOCOL_V110_14DOT4K \
  462. MDM_GEN_PROTOCOLINFO( \
  463. MDM_PROTOCOLID_V110, \
  464. MDM_GEN_V110_PROTOCOL_DATA (\
  465. MDM_V110_SPEED_14DOT4K \
  466. ) \
  467. )
  468. #define MDM_PROTOCOL_V110_19DOT2K \
  469. MDM_GEN_PROTOCOLINFO( \
  470. MDM_PROTOCOLID_V110, \
  471. MDM_GEN_V110_PROTOCOL_DATA (\
  472. MDM_V110_SPEED_19DOT2K \
  473. ) \
  474. )
  475. #define MDM_PROTOCOL_V110_28DOT8K \
  476. MDM_GEN_PROTOCOLINFO( \
  477. MDM_PROTOCOLID_V110, \
  478. MDM_GEN_V110_PROTOCOL_DATA (\
  479. MDM_V110_SPEED_28DOT8K \
  480. ) \
  481. )
  482. #define MDM_PROTOCOL_V110_38DOT4K \
  483. MDM_GEN_PROTOCOLINFO( \
  484. MDM_PROTOCOLID_V110, \
  485. MDM_GEN_V110_PROTOCOL_DATA (\
  486. MDM_V110_SPEED_38DOT4K \
  487. ) \
  488. )
  489. #define MDM_PROTOCOL_V110_57DOT6K \
  490. MDM_GEN_PROTOCOLINFO( \
  491. MDM_PROTOCOLID_V110, \
  492. MDM_GEN_V110_PROTOCOL_DATA (\
  493. MDM_V110_SPEED_57DOT6K \
  494. ) \
  495. )
  496. //=========================================================================
  497. // AUTO PROTOCOL INFORMATION (ie, when the protocol is detected automatically)
  498. //
  499. // The shifts are w.r.t. the start of the PROTOCOLDATA field.
  500. //
  501. //=========================================================================
  502. //
  503. // Following are specific to the AUTO-protocol
  504. //
  505. #define MDM_SHIFT_AUTO_SPEED 0x0
  506. #define MDM_MASK_AUTO_SPEED 0x7 // 3 bits
  507. #define MDM_AUTO_SPEED_DEFAULT 0x0
  508. #define MDM_SHIFT_AUTO_ML 0x6
  509. #define MDM_MASK_AUTO_ML (0x3<<6) // 2 bits
  510. #define MDM_AUTO_ML_DEFAULT 0x0
  511. #define MDM_AUTO_ML_NONE 0x1
  512. #define MDM_AUTO_ML_2 0x2
  513. #define MDM_GEN_AUTO_PROTOCOL_DATA(_speed, _ml) \
  514. ((((_speed)<<MDM_SHIFT_AUTO_SPEED)&MDM_MASK_AUTO_SPEED) \
  515. |(((_ml )<<MDM_SHIFT_AUTO_ML )&MDM_MASK_AUTO_ML))
  516. #define MDM_PROTOCOL_AUTO_1CH \
  517. MDM_GEN_PROTOCOLINFO( \
  518. MDM_PROTOCOLID_AUTO, \
  519. MDM_GEN_AUTO_PROTOCOL_DATA (\
  520. MDM_AUTO_SPEED_DEFAULT, \
  521. MDM_AUTO_ML_NONE \
  522. ) \
  523. )
  524. #define MDM_PROTOCOL_AUTO_2CH \
  525. MDM_GEN_PROTOCOLINFO( \
  526. MDM_PROTOCOLID_AUTO, \
  527. MDM_GEN_AUTO_PROTOCOL_DATA (\
  528. MDM_AUTO_SPEED_DEFAULT, \
  529. MDM_AUTO_ML_2 \
  530. ) \
  531. )
  532. //=========================================================================
  533. // ANALOG PROTOCOL INFORMATION (Applicable only to GSM)
  534. //=========================================================================
  535. //
  536. // Following are specific to GSM Analog protocol
  537. //
  538. #define MDM_ANALOG_RLP_ON 0x0
  539. #define MDM_ANALOG_RLP_OFF 0x1
  540. #define MDM_ANALOG_V34 0x2
  541. #define MDM_GEN_ANALOG_PROTOCOL_DATA(_rlp) \
  542. (_rlp)
  543. #define MDM_PROTOCOL_ANALOG_RLP \
  544. MDM_GEN_PROTOCOLINFO( \
  545. MDM_PROTOCOLID_ANALOG, \
  546. MDM_GEN_ANALOG_PROTOCOL_DATA ( \
  547. MDM_ANALOG_RLP_ON \
  548. ) \
  549. )
  550. #define MDM_PROTOCOL_ANALOG_NRLP \
  551. MDM_GEN_PROTOCOLINFO( \
  552. MDM_PROTOCOLID_ANALOG, \
  553. MDM_GEN_ANALOG_PROTOCOL_DATA ( \
  554. MDM_ANALOG_RLP_OFF \
  555. ) \
  556. )
  557. //
  558. // v34 anolog for isdn
  559. //
  560. #define MDM_PROTOCOL_ANALOG_V34 \
  561. MDM_GEN_PROTOCOLINFO( \
  562. MDM_PROTOCOLID_ANALOG, \
  563. MDM_GEN_ANALOG_PROTOCOL_DATA ( \
  564. MDM_ANALOG_V34 \
  565. ) \
  566. )
  567. //=========================================================================
  568. // GPRS PROTOCOL INFORMATION (Applicable only to GSM)
  569. //=========================================================================
  570. //
  571. // Following are specific to GPRS protocol
  572. //
  573. #define MDM_PROTOCOL_GPRS \
  574. MDM_GEN_PROTOCOLINFO( \
  575. MDM_PROTOCOLID_GPRS, \
  576. 0 \
  577. )
  578. //=========================================================================
  579. // PIAFS PROTOCOL INFORMATION
  580. //=========================================================================
  581. //
  582. // Following are specific to PIAFS protocol
  583. //
  584. #define MDM_PIAFS_INCOMING 0
  585. #define MDM_PIAFS_OUTGOING 1
  586. #define MDM_PROTOCOL_PIAFS_INCOMING \
  587. MDM_GEN_PROTOCOLINFO( \
  588. MDM_PROTOCOLID_PIAFS, \
  589. MDM_PIAFS_INCOMING \
  590. )
  591. #define MDM_PROTOCOL_PIAFS_OUTGOING \
  592. MDM_GEN_PROTOCOLINFO( \
  593. MDM_PROTOCOLID_PIAFS, \
  594. MDM_PIAFS_OUTGOING \
  595. )
  596. #endif /* _MCX_H_ */