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.

2026 lines
72 KiB

  1. #ifndef H245API_H
  2. #define H245API_H
  3. /******************************************************************************
  4. *
  5. * INTEL Corporation Proprietary Information
  6. * Copyright (c) 1994, 1995, 1996 Intel Corporation.
  7. *
  8. * This listing is supplied under the terms of a license agreement
  9. * with INTEL Corporation and may not be used, copied, nor disclosed
  10. * except in accordance with the terms of that agreement.
  11. *
  12. *****************************************************************************/
  13. /******************************************************************************
  14. *
  15. * $Workfile: h245api.h $
  16. * $Revision: 1.64 $
  17. * $Modtime: 04 Mar 1997 16:51:38 $
  18. * $Log: S:/sturgeon/src/include/vcs/h245api.h_v $
  19. *
  20. * Rev 1.64 04 Mar 1997 17:32:36 MANDREWS
  21. * H245CopyCap() and H245CopyCapDescriptor() now return HRESULTs.
  22. *
  23. * Rev 1.63 26 Feb 1997 10:56:20 MANDREWS
  24. * Added H245_MAX_CAPID.
  25. *
  26. * Rev 1.62 Feb 24 1997 18:28:26 tomitowx
  27. * multiple modedescriptor support
  28. *
  29. * Rev 1.61 19 Dec 1996 17:16:10 EHOWARDX
  30. * Now using ASN.1 compiler C++ flag.
  31. *
  32. * Rev 1.60 17 Dec 1996 17:14:12 EHOWARDX
  33. * Added pSeparateStack to IND_OPEN_T.
  34. *
  35. * Rev 1.59 12 Dec 1996 11:24:38 EHOWARDX
  36. * Backed out H245_CONF_H323_OLD change.
  37. *
  38. * Rev 1.57 11 Dec 1996 13:46:46 SBELL1
  39. * Changed H245Init to return linkLayer Physical ID
  40. *
  41. * Rev 1.56 24 Oct 1996 15:57:54 MANDREWS
  42. * Fixed typo in last update.
  43. *
  44. * Rev 1.55 Oct 21 1996 17:11:00 mandrews
  45. * Fixed type in last check-in.
  46. *
  47. * Rev 1.54 Oct 21 1996 16:41:20 mandrews
  48. * Added H245_MASTER_SLAVE_CONFLICT as an additional openChannelReject
  49. * reason code.
  50. *
  51. * Rev 1.53 17 Oct 1996 18:17:54 EHOWARDX
  52. * Changed general string to always be Unicode.
  53. *
  54. * Rev 1.52 14 Oct 1996 14:00:28 EHOWARDX
  55. *
  56. * Unicode changes.
  57. *
  58. * Rev 1.51 03 Sep 1996 18:09:54 EHOWARDX
  59. *
  60. * Changed some parameters to const.
  61. * Changed H245_REQ_ENTRY_H243_CONFERENCE_ID to H245_REQ_ENTER_H243_CONFERENCE
  62. *
  63. * Rev 1.50 15 Aug 1996 14:33:48 EHOWARDX
  64. * Changed definition of H245_COMM_MODE_ENTRY_T as per Mike Andrews' request.
  65. *
  66. * Rev 1.49 24 Jul 1996 15:18:16 EHOWARDX
  67. * Backed out change of IndNonstandardRequest to IndNonstandardReq,
  68. * IndNonstandardResponse to IndNonStandardRsp, and IndNonstandardCommand to
  69. * IndNonstandardCmd to make less work for upper layers (CCTEST).
  70. *
  71. * Rev 1.48 19 Jul 1996 14:12:20 EHOWARDX
  72. *
  73. * Added indication callback structure for CommunicationModeResponse and
  74. * CommunicationModeCommand.
  75. *
  76. * Rev 1.47 19 Jul 1996 12:50:30 EHOWARDX
  77. *
  78. * Multipoint clean-up.
  79. *
  80. * Rev 1.46 16 Jul 1996 17:53:48 unknown
  81. * Added FNS indication.
  82. *
  83. * Rev 1.45 16 Jul 1996 11:51:58 EHOWARDX
  84. *
  85. * Changed ERROR_LOCAL_BASE_ID to ERROR_BASE_ID.
  86. *
  87. * Rev 1.44 16 Jul 1996 11:46:10 EHOWARDX
  88. *
  89. * Eliminated H245_ERROR_MUX_CAPS_ALREADY_SET (changing the existing
  90. * mux cap should not be an error).
  91. *
  92. * Rev 1.43 11 Jul 1996 18:42:14 rodellx
  93. *
  94. * Fixed bug where HRESULT ids were in violation of Facility and/or Code
  95. * value rules.
  96. *
  97. * Rev 1.42 10 Jul 1996 11:33:42 unknown
  98. * Changed error base.
  99. *
  100. * Rev 1.41 01 Jul 1996 22:07:24 EHOWARDX
  101. * Added Conference and CommunicationMode structures and API functions.
  102. *
  103. * Rev 1.40 18 Jun 1996 14:48:54 EHOWARDX
  104. *
  105. * Bumped version number to 2 and modified H245MaintenanceLoopRelease()
  106. * and associated Confirms.
  107. *
  108. * Rev 1.39 14 Jun 1996 18:59:38 EHOWARDX
  109. * Geneva update.
  110. *
  111. * Rev 1.38 31 May 1996 18:19:46 EHOWARDX
  112. * Brought error codes in line with STURERR.DOC guidelines.
  113. *
  114. * Rev 1.37 30 May 1996 23:37:26 EHOWARDX
  115. * Clean up.
  116. *
  117. * Rev 1.36 30 May 1996 13:55:02 EHOWARDX
  118. * Changed H245EndConnection to H245EndSession.
  119. * Removed H245_CONF_ENDCONNECTION.
  120. *
  121. * Rev 1.35 29 May 1996 14:23:58 EHOWARDX
  122. * Changed definition of H245_ERROR_OK back to 0 (NOERROR == S_OK == 0).
  123. *
  124. * Rev 1.34 29 May 1996 13:19:50 EHOWARDX
  125. * RESULT to HRESULT conversion.
  126. *
  127. * Rev 1.33 24 May 1996 23:12:56 EHOWARDX
  128. * Tel Aviv update.
  129. *
  130. * Rev 1.32 21 May 1996 18:23:58 EHOWARDX
  131. *
  132. * Added dwTransId parameter to H245RequestMultiplexEntry,
  133. * H245RequestMode, and H245MaintenanceLoopRequest.
  134. *
  135. * Rev 1.31 20 May 1996 14:14:42 EHOWARDX
  136. * Fixed typo.
  137. *
  138. * Rev 1.30 20 May 1996 14:05:20 EHOWARDX
  139. * Removed dwTransId formal parameter from H245EndConnection().
  140. *
  141. * Rev 1.29 16 May 1996 15:51:56 EHOWARDX
  142. * Fixed typo in H245_INVALID_CAPDESCID.
  143. *
  144. * Rev 1.28 16 May 1996 10:57:46 unknown
  145. * Added H245_INVALID_CAPDESCID.
  146. *
  147. * Rev 1.27 14 May 1996 20:20:14 EHOWARDX
  148. * Removed H245_IND_SYS.
  149. *
  150. * Rev 1.26 14 May 1996 19:00:58 EHOWARDX
  151. * Deleted unused H245_SYSCON_xxx values.
  152. *
  153. * Rev 1.25 14 May 1996 16:58:48 EHOWARDX
  154. * Changed H245_IND_CAPDESC_T To H245_TOTCAPDESC_T.
  155. * H245EnumCaps() cap desc callback now takes single pointer to
  156. * H245_TOTCAPDESC_T instead of separate H245_CAPDESCID_T and
  157. * H245_CAPDESC_T pointer.
  158. *
  159. * Rev 1.24 13 May 1996 23:13:46 EHOWARDX
  160. * Everything ready for Micrsoft drop on the 17th.
  161. *
  162. * Rev 1.23 13 May 1996 15:43:16 EHOWARDX
  163. * Changed return type of H245CopyCapDescriptor from H245_CAPDESC_T pointer
  164. * to H245_TOTCAPDESC_T pointer.
  165. *
  166. * Rev 1.22 13 May 1996 14:05:16 EHOWARDX
  167. * Added H245CopyCapDescriptor() and H245FreeCapDescriptor().
  168. *
  169. * Rev 1.21 11 May 1996 20:00:34 EHOWARDX
  170. * Changed IS1381 to IS13818 (correct name for capability).
  171. * Changed H245SystemControl() - eliminated dwTransId and added
  172. * H245_SYSCON_GET_XXX requests.
  173. *
  174. * Rev 1.20 10 May 1996 17:38:28 unknown
  175. * Changed H245GetCaps and H245EnumCaps to also return Cap Descriptors.
  176. *
  177. * Rev 1.19 09 May 1996 20:22:58 EHOWARDX
  178. * Latest and greatest...
  179. *
  180. * Rev 1.35 09 May 1996 19:38:14 EHOWARDX
  181. * Redesigned locking logic and added new functionality.
  182. *
  183. * Rev 1.34 06 May 1996 13:19:44 EHOWARDX
  184. * Moved enums out of structures.
  185. * Added H245NonStandardH221() and H245NonStandardObject().
  186. *
  187. * Rev 1.33 01 May 1996 19:29:16 EHOWARDX
  188. * Added H245CopyCap(), H245FreeCap(), H245CopyMux(), H245FreeMux().
  189. * Changed H2250_xxx definitions for H.225.0 address to H245_xxx.
  190. *
  191. * Rev 1.32 27 Apr 1996 21:04:26 EHOWARDX
  192. * Changed channel numbers to words, added new open/open ack fields.
  193. *
  194. * Rev 1.31 26 Apr 1996 15:57:14 EHOWARDX
  195. * Added new Terminal Capabilities.
  196. *
  197. * Rev 1.27.1.6 25 Apr 1996 17:53:06 EHOWARDX
  198. * Added H245_INVALID_ID, currently set to zero, should be 0xFFFFFFFF later.
  199. *
  200. * Rev 1.27.1.5 25 Apr 1996 16:50:04 EHOWARDX
  201. * Added new functions as per API Changes spec.
  202. *
  203. * Rev 1.27.1.4 24 Apr 1996 20:57:30 EHOWARDX
  204. * Added new OpenLogicalChannelAck/OpenLogicalChannelReject support.
  205. *
  206. * Rev 1.27.1.3 18 Apr 1996 15:56:42 EHOWARDX
  207. * Updated to 1.30.
  208. *
  209. * Rev 1.27.1.2 16 Apr 1996 20:09:52 EHOWARDX
  210. * Added new H2250LogicalChannelParameter fields.
  211. *
  212. * Rev 1.27.1.1 16 Apr 1996 18:45:24 EHOWARDX
  213. * Added silenceSupression to H.225.0 Logical Channel Parameters.
  214. *
  215. * Rev 1.27.1.0 03 Apr 1996 15:56:14 cjutzi
  216. * Branched for H.323.
  217. *
  218. * Rev 1.27 02 Apr 1996 08:29:44 cjutzi
  219. * - Changed CapDescriptor API
  220. *
  221. * Rev 1.26 01 Apr 1996 16:46:50 cjutzi
  222. *
  223. * - Completed ENdConnection, and made asynch.. rather
  224. * than sync.. as before
  225. * Changed H245ShutDown to be sync rather than async..
  226. *
  227. * Rev 1.25 29 Mar 1996 14:55:52 cjutzi
  228. *
  229. * - added USERINPUT stuff
  230. * - Added hooks for stats in SYSCON H245SystemControl
  231. *
  232. * Rev 1.24 27 Mar 1996 10:55:40 cjutzi
  233. * - added c++ wrapper for API calls..
  234. *
  235. * Rev 1.23 20 Mar 1996 14:42:46 cjutzi
  236. * - added ERROR NO_CAPDESC
  237. *
  238. * Rev 1.22 18 Mar 1996 15:14:56 cjutzi
  239. *
  240. * - added RxPort and TEST_TIMER
  241. *
  242. * Rev 1.21 12 Mar 1996 15:49:24 cjutzi
  243. *
  244. * - implemented locking
  245. * - added EndSession
  246. * - added Shutdown
  247. *
  248. *
  249. * Rev 1.20 08 Mar 1996 14:06:04 cjutzi
  250. *
  251. * - Removed Simultanious capability api
  252. * - added CapabilityDescriptor api.. (very similar.. made more sence)
  253. * - compeleted Mux Table upcall information..
  254. *
  255. * Rev 1.19 06 Mar 1996 08:45:58 cjutzi
  256. *
  257. * - added ERROR ASN1
  258. *
  259. * Rev 1.18 05 Mar 1996 17:32:24 cjutzi
  260. *
  261. * - master slave indication message from Hani.. implemented..
  262. * added H245_IND_MSTSLV ..
  263. *
  264. * Rev 1.17 05 Mar 1996 16:36:46 cjutzi
  265. *
  266. * - removed MUX_ENTRY_DESC_T .. cleaned it up.. don't need it..
  267. *
  268. * Rev 1.16 05 Mar 1996 10:06:30 cjutzi
  269. *
  270. * - added mux table entry stuff
  271. * - changed errors to map to 10000
  272. *
  273. * Rev 1.15 01 Mar 1996 13:46:20 cjutzi
  274. * - added more error messages
  275. *
  276. * Rev 1.14 29 Feb 1996 17:27:38 cjutzi
  277. *
  278. * - bi-directional channel working
  279. *
  280. * Rev 1.13 29 Feb 1996 11:33:50 cjutzi
  281. * - fixed bug w/ H245_CONF_IND_T .. as global union.. fixed to be
  282. * struct
  283. *
  284. * Rev 1.12 29 Feb 1996 08:26:48 cjutzi
  285. *
  286. * - added 2 error messages (SIMCAPID and DATA_FORMAT)
  287. *
  288. * Rev 1.11 27 Feb 1996 13:28:50 cjutzi
  289. * - added global protocol id H245_PROTOID
  290. *
  291. * Rev 1.10 26 Feb 1996 17:24:10 cjutzi
  292. *
  293. * - added MiscCommand.. had to add channel to H245_IND_MISC_T..
  294. *
  295. * Rev 1.9 26 Feb 1996 11:07:24 cjutzi
  296. *
  297. * - added simultanoius caps..
  298. *
  299. * Rev 1.8 16 Feb 1996 12:59:26 cjutzi
  300. * - added tracing and debug..
  301. * - got close to work.. Added structure to H245_IND_T.. new CLOSE indication
  302. *
  303. * Rev 1.7 15 Feb 1996 14:13:08 cjutzi
  304. *
  305. * - re-arranged the AL_T entries for more clairity..
  306. *
  307. * Rev 1.6 15 Feb 1996 10:48:30 cjutzi
  308. *
  309. * - major changes..
  310. * - added MUX_T
  311. * - changed H245_IND_T
  312. * - changed IND_OPEN/IND_OPEN_NEEDSRSP etc..
  313. *
  314. * Rev 1.5 09 Feb 1996 16:14:04 cjutzi
  315. *
  316. * - removed init_success
  317. * - removed shutdown success
  318. * - added masterslave type for callback/confirm
  319. * - added SYSCON TraceLvl
  320. *
  321. *****************************************************************************/
  322. //
  323. // H.245 return codes
  324. //
  325. #if defined(OIL)
  326. #include "common.x"
  327. #define HRESULT RESULT
  328. #define ERROR_BASE_ID 0x8000
  329. #define MAKE_H245_ERROR(error) (error)
  330. #define H245_ERROR_OK 0
  331. #define H245_ERROR_INVALID_DATA_FORMAT MAKE_H245_ERROR(ERROR_BASE_ID+0x01) /* Data Structure passed down is somehow invalid */
  332. #define H245_ERROR_NOMEM MAKE_H245_ERROR(ERROR_BASE_ID+0x02) /* memory allocation failure */
  333. #define H245_ERROR_NOSUP MAKE_H245_ERROR(ERROR_BASE_ID+0x03) /* H245 feature not valid, or not in this H245 spec */
  334. #define H245_ERROR_PARAM MAKE_H245_ERROR(ERROR_BASE_ID+0x04) /* invalid parameter or data structure passed to API*/
  335. #define H245_ERROR_ALREADY_INIT MAKE_H245_ERROR(ERROR_BASE_ID+0x05) /* system has already been initialized */
  336. #define H245_ERROR_NOT_CONNECTED MAKE_H245_ERROR(ERROR_BASE_ID+0x06) /* system is not in the connected state */
  337. #else
  338. #pragma warning( disable : 4115 4201 4214 4514 )
  339. #include "apierror.h"
  340. #define H245_ERROR_OK NOERROR
  341. #define H245_ERROR_INVALID_DATA_FORMAT MAKE_H245_ERROR(ERROR_INVALID_DATA) /* Data Structure passed down is somehow invalid */
  342. #define H245_ERROR_NOMEM MAKE_H245_ERROR(ERROR_OUTOFMEMORY) /* memory allocation failure */
  343. #define H245_ERROR_NOSUP MAKE_H245_ERROR(ERROR_NOT_SUPPORTED) /* H245 feature not valid, or not in this H245 spec */
  344. #define H245_ERROR_PARAM MAKE_H245_ERROR(ERROR_INVALID_PARAMETER) /* invalid parameter or data structure passed to API*/
  345. #define H245_ERROR_ALREADY_INIT MAKE_H245_ERROR(ERROR_ALREADY_INITIALIZED)/* system has already been initialized */
  346. #define H245_ERROR_NOT_CONNECTED MAKE_H245_ERROR(ERROR_NOT_CONNECTED) /* system is not in the connected state */
  347. #endif
  348. #define H245_ERROR_NORESOURCE MAKE_H245_ERROR(ERROR_BASE_ID+0x10) /* No resources left for this call */
  349. #define H245_ERROR_NOTIMP MAKE_H245_ERROR(ERROR_BASE_ID+0x11) /* H245 feature should be implemented.. but is not */
  350. #define H245_ERROR_SUBSYS MAKE_H245_ERROR(ERROR_BASE_ID+0x12) /* subsystem failure.. error unknown */
  351. #define H245_ERROR_FATAL MAKE_H245_ERROR(ERROR_BASE_ID+0x13) /* fatal error.. system will be coming down.. */
  352. #define H245_ERROR_MAXTBL MAKE_H245_ERROR(ERROR_BASE_ID+0x14) /* you have reached the maxium number of tbl entries*/
  353. #define H245_ERROR_CHANNEL_INUSE MAKE_H245_ERROR(ERROR_BASE_ID+0x15) /* channel is currently in use */
  354. #define H245_ERROR_INVALID_CAPID MAKE_H245_ERROR(ERROR_BASE_ID+0x16) /* Invalid Cap ID.. can not be found */
  355. #define H245_ERROR_INVALID_OP MAKE_H245_ERROR(ERROR_BASE_ID+0x17) /* Invalid operation at this time.. */
  356. #define H245_ERROR_UNKNOWN MAKE_H245_ERROR(ERROR_BASE_ID+0x18) /* unknown error */
  357. #define H245_ERROR_NOBANDWIDTH MAKE_H245_ERROR(ERROR_BASE_ID+0x19) /* Bandwidth will not allow this */
  358. #define H245_ERROR_LOSTCON MAKE_H245_ERROR(ERROR_BASE_ID+0x1A) /* System connection .. channel 0 was lost */
  359. #define H245_ERROR_INVALID_MUXTBLENTRY MAKE_H245_ERROR(ERROR_BASE_ID+0x1B) /* Invalid Multiplex Table Entry */
  360. #define H245_ERROR_INVALID_INST MAKE_H245_ERROR(ERROR_BASE_ID+0x1C) /* instance is either no longer valid or is invalid */
  361. #define H245_ERROR_INPROCESS MAKE_H245_ERROR(ERROR_BASE_ID+0x1D) /* request is denied.. action already in process */
  362. #define H245_ERROR_INVALID_STATE MAKE_H245_ERROR(ERROR_BASE_ID+0x1E) /* Not proper state to process request */
  363. #define H245_ERROR_TIMEOUT MAKE_H245_ERROR(ERROR_BASE_ID+0x1F) /* Timeout occured */
  364. #define H245_ERROR_INVALID_CHANNEL MAKE_H245_ERROR(ERROR_BASE_ID+0x20) /* Invalid channel */
  365. #define H245_ERROR_INVALID_CAPDESCID MAKE_H245_ERROR(ERROR_BASE_ID+0x21) /* Invalid Capbility Descriptor ID */
  366. #define H245_ERROR_CANCELED MAKE_H245_ERROR(ERROR_BASE_ID+0x22) /* operation you are responding to has been canceled*/
  367. #define H245_ERROR_MUXELEMENT_DEPTH MAKE_H245_ERROR(ERROR_BASE_ID+0x23) /* Mux Table Entry is too complex.. MAX recursion */
  368. #define H245_ERROR_MUXELEMENT_WIDTH MAKE_H245_ERROR(ERROR_BASE_ID+0x24) /* Mux Table Entry has reached max subelement width */
  369. #define H245_ERROR_ASN1 MAKE_H245_ERROR(ERROR_BASE_ID+0x25) /* ASN1 PDU compiler error - see PDU log */
  370. #define H245_ERROR_NO_MUX_CAPS MAKE_H245_ERROR(ERROR_BASE_ID+0x26) /* Mux Capabilities have not been loaded */
  371. #define H245_ERROR_NO_CAPDESC MAKE_H245_ERROR(ERROR_BASE_ID+0x27) /* No Capability Descriptors set */
  372. #if(0) // it's all in one DLL, no need for export
  373. // declare exported functions
  374. #if defined(H245DLL_EXPORT)
  375. #define H245DLL __declspec (dllexport)
  376. #else // (H245DLL_EXPORT)
  377. #define H245DLL __declspec (dllimport)
  378. #endif // (H245DLL_EXPORT)
  379. #else
  380. #define H245DLL
  381. #endif
  382. /************************************/
  383. /* ASN.1 DATASTRUCTURES ABSTRACTION */
  384. /************************************/
  385. #include "h245asn1.h"
  386. typedef struct NonStandardIdentifier H245_NONSTANDID_T;
  387. typedef struct NonStandardParameter H245_NONSTANDARD_PARAMETER_T;
  388. typedef H245_NONSTANDARD_PARAMETER_T H245_CAP_NONSTANDARD_T;
  389. typedef struct H261VideoCapability H245_CAP_H261_T;
  390. typedef struct H262VideoCapability H245_CAP_H262_T;
  391. typedef struct H263VideoCapability H245_CAP_H263_T;
  392. typedef struct IS11172VideoCapability H245_CAP_VIS11172_T;
  393. typedef struct IS11172AudioCapability H245_CAP_AIS11172_T;
  394. typedef struct IS13818AudioCapability H245_CAP_IS13818_T;
  395. typedef struct DataApplicationCapability H245_CAP_DATAAPPLICATION_T;
  396. typedef struct H222Capability H245_CAP_H222_T;
  397. typedef struct H223Capability H245_CAP_H223_T;
  398. typedef struct V76Capability H245_CAP_VGMUX_T;
  399. typedef struct H2250Capability H245_CAP_H2250_T;
  400. typedef struct ConferenceCapability H245_CAP_CONFERENCE_T;
  401. typedef struct TerminalLabel H245_TERMINAL_LABEL_T;
  402. #define PDU_T MltmdSystmCntrlMssg
  403. #define H245_ACCESS_T NetworkAccessParameters
  404. typedef DWORD_PTR H245_INST_T;
  405. typedef unsigned short H245_CHANNEL_T;
  406. typedef unsigned long H245_PORT_T;
  407. #define H245_INVALID_ID ((H245_INST_T)0)
  408. #define H245_INVALID_CHANNEL ((H245_CHANNEL_T)0)
  409. #define H245_INVALID_PORT_NUMBER ((H245_PORT_T)-1)
  410. typedef struct
  411. {
  412. unsigned int length;
  413. unsigned char *value;
  414. } H245_OCTET_STRING_T;
  415. /************************/
  416. /* H245 ABSTRACTION */
  417. /************************/
  418. /* H245_CAPDIR_T */
  419. typedef enum
  420. {
  421. H245_CAPDIR_DONTCARE = 0,
  422. H245_CAPDIR_RMTRX,
  423. H245_CAPDIR_RMTTX,
  424. H245_CAPDIR_RMTRXTX,
  425. H245_CAPDIR_LCLRX,
  426. H245_CAPDIR_LCLTX,
  427. H245_CAPDIR_LCLRXTX
  428. } H245_CAPDIR_T;
  429. /* H245_DATA_T */
  430. typedef enum
  431. {
  432. H245_DATA_DONTCARE = 0,
  433. H245_DATA_NONSTD,
  434. H245_DATA_NULL,
  435. H245_DATA_VIDEO,
  436. H245_DATA_AUDIO,
  437. H245_DATA_DATA,
  438. H245_DATA_ENCRYPT_D,
  439. H245_DATA_CONFERENCE,
  440. H245_DATA_MUX /* mux parameters */
  441. } H245_DATA_T;
  442. /* H245_CLIENT_T */
  443. typedef enum
  444. {
  445. H245_CLIENT_DONTCARE = 0, // For H245EnumCap/H245GetCap
  446. H245_CLIENT_NONSTD,
  447. H245_CLIENT_VID_NONSTD,
  448. H245_CLIENT_VID_H261,
  449. H245_CLIENT_VID_H262,
  450. H245_CLIENT_VID_H263,
  451. H245_CLIENT_VID_IS11172,
  452. H245_CLIENT_AUD_NONSTD,
  453. H245_CLIENT_AUD_G711_ALAW64,
  454. H245_CLIENT_AUD_G711_ALAW56,
  455. H245_CLIENT_AUD_G711_ULAW64,
  456. H245_CLIENT_AUD_G711_ULAW56,
  457. H245_CLIENT_AUD_G722_64,
  458. H245_CLIENT_AUD_G722_56,
  459. H245_CLIENT_AUD_G722_48,
  460. H245_CLIENT_AUD_G723,
  461. H245_CLIENT_AUD_G728,
  462. H245_CLIENT_AUD_G729,
  463. H245_CLIENT_AUD_GDSVD,
  464. H245_CLIENT_AUD_IS11172,
  465. H245_CLIENT_AUD_IS13818,
  466. H245_CLIENT_DAT_NONSTD,
  467. H245_CLIENT_DAT_T120,
  468. H245_CLIENT_DAT_DSMCC,
  469. H245_CLIENT_DAT_USERDATA,
  470. H245_CLIENT_DAT_T84,
  471. H245_CLIENT_DAT_T434,
  472. H245_CLIENT_DAT_H224,
  473. H245_CLIENT_DAT_NLPID,
  474. H245_CLIENT_DAT_DSVD,
  475. H245_CLIENT_DAT_H222,
  476. H245_CLIENT_ENCRYPTION_TX,
  477. H245_CLIENT_ENCRYPTION_RX,
  478. H245_CLIENT_CONFERENCE,
  479. // Multiplex capabilities
  480. H245_CLIENT_MUX_NONSTD,
  481. H245_CLIENT_MUX_H222,
  482. H245_CLIENT_MUX_H223,
  483. H245_CLIENT_MUX_VGMUX,
  484. H245_CLIENT_MUX_H2250,
  485. H245_CLIENT_MUX_H223_ANNEX_A
  486. } H245_CLIENT_T;
  487. /* H245_CAP_T */
  488. typedef union
  489. {
  490. H245_CAP_NONSTANDARD_T H245_NonStd; /* not implemented */
  491. H245_CAP_NONSTANDARD_T H245Vid_NONSTD;
  492. H245_CAP_H261_T H245Vid_H261;
  493. H245_CAP_H262_T H245Vid_H262;
  494. H245_CAP_H263_T H245Vid_H263;
  495. H245_CAP_VIS11172_T H245Vid_IS11172;
  496. H245_CAP_NONSTANDARD_T H245Aud_NONSTD;
  497. unsigned short H245Aud_G711_ALAW64;
  498. unsigned short H245Aud_G711_ALAW56;
  499. unsigned short H245Aud_G711_ULAW64;
  500. unsigned short H245Aud_G711_ULAW56;
  501. unsigned short H245Aud_G722_64;
  502. unsigned short H245Aud_G722_56;
  503. unsigned short H245Aud_G722_48;
  504. H245_CAP_G723_T H245Aud_G723;
  505. unsigned short H245Aud_G728;
  506. unsigned short H245Aud_G729;
  507. unsigned short H245Aud_GDSVD;
  508. H245_CAP_AIS11172_T H245Aud_IS11172;
  509. H245_CAP_IS13818_T H245Aud_IS13818;
  510. H245_CAP_DATAAPPLICATION_T H245Dat_NONSTD;
  511. H245_CAP_DATAAPPLICATION_T H245Dat_T120;
  512. H245_CAP_DATAAPPLICATION_T H245Dat_DSMCC;
  513. H245_CAP_DATAAPPLICATION_T H245Dat_USERDATA;
  514. H245_CAP_DATAAPPLICATION_T H245Dat_T84;
  515. H245_CAP_DATAAPPLICATION_T H245Dat_T434;
  516. H245_CAP_DATAAPPLICATION_T H245Dat_H224;
  517. H245_CAP_DATAAPPLICATION_T H245Dat_NLPID;
  518. H245_CAP_DATAAPPLICATION_T H245Dat_DSVD;
  519. H245_CAP_DATAAPPLICATION_T H245Dat_H222;
  520. ASN1_BOOL H245Encryption_TX;
  521. unsigned char H245Encryption_RX;
  522. H245_CAP_CONFERENCE_T H245Conference;
  523. // Multiplex capabilities
  524. H245_CAP_NONSTANDARD_T H245Mux_NONSTD;
  525. H245_CAP_H222_T H245Mux_H222;
  526. H245_CAP_H223_T H245Mux_H223;
  527. H245_CAP_VGMUX_T H245Mux_VGMUX;
  528. H245_CAP_H2250_T H245Mux_H2250;
  529. } H245_CAP_T;
  530. /* H245_CAPID_T */
  531. typedef unsigned short H245_CAPID_T;
  532. #define H245_INVALID_CAPID ((H245_CAPID_T)-1)
  533. #define H245_MAX_CAPID (((H245_CAPID_T)-1) / 2)
  534. /* H245_CAPDESCID_T */
  535. typedef unsigned short H245_CAPDESCID_T;
  536. #define H245_INVALID_CAPDESCID ((H245_CAPDESCID_T)-1)
  537. /* H245_SIMCAP_T */
  538. #define H245_MAX_ALTCAPS 16
  539. typedef struct
  540. {
  541. unsigned short Length; /* number of CapId's in Array */
  542. H245_CAPID_T AltCaps[H245_MAX_ALTCAPS]; /* list of alternatives CapId's */
  543. } H245_SIMCAP_T;
  544. #define H245_MAX_SIMCAPS 16
  545. /* H245_CAPDESC_T */
  546. typedef struct
  547. {
  548. unsigned short Length;
  549. H245_SIMCAP_T SimCapArray[H245_MAX_SIMCAPS];
  550. } H245_CAPDESC_T;
  551. /* H245_TOTCAPDESC_T */
  552. typedef struct
  553. {
  554. H245_CAPDESCID_T CapDescId;
  555. H245_CAPDESC_T CapDesc;
  556. } H245_TOTCAPDESC_T;
  557. /* H245_TOTCAP_T */
  558. typedef struct
  559. {
  560. H245_CAPDIR_T Dir;
  561. H245_DATA_T DataType;
  562. H245_CLIENT_T ClientType;
  563. H245_CAPID_T CapId;
  564. H245_CAP_T Cap;
  565. } H245_TOTCAP_T;
  566. /* H245_CONFIG_T */
  567. typedef enum
  568. {
  569. H245_CONF_H324 = 1,
  570. H245_CONF_H323,
  571. H245_CONF_H310,
  572. H245_CONF_GVD
  573. } H245_CONFIG_T;
  574. /* H245_ACC_REJ_T */
  575. typedef unsigned long H245_ACC_REJ_T;
  576. #define H245_ACC 0
  577. #define H245_REJ 1 // unspecified
  578. // Master Slave Determination reject causes
  579. #define H245_REJ_MSD_IDENTICAL identicalNumbers_chosen
  580. // Terminal Capability Set reject causes
  581. #define H245_REJ_UNDEF_TBL_ENTRY undefinedTableEntryUsed_chosen
  582. #define H245_REJ_DIS_CAP_EXCEED dscrptrCpctyExcdd_chosen
  583. #define H245_REJ_TBLENTRY_CAP_EXCEED tblEntryCpctyExcdd_chosen
  584. // Open Logical Channel reject causes
  585. #define H245_REJ_REV_PARAM unstblRvrsPrmtrs_chosen
  586. #define H245_REJ_TYPE_NOTSUPPORT dataTypeNotSupported_chosen
  587. #define H245_REJ_TYPE_NOTAVAIL dataTypeNotAvailable_chosen
  588. #define H245_REJ_TYPE_UNKNOWN unknownDataType_chosen
  589. #define H245_REJ_AL_COMB dtTypALCmbntnNtSpprtd_chosen
  590. #define H245_REJ_MULTICAST mltcstChnnlNtAllwd_chosen
  591. #define H245_REJ_BANDWIDTH insufficientBandwidth_chosen
  592. #define H245_REJ_STACK sprtStckEstblshmntFld_chosen
  593. #define H245_REJ_SESSION_ID invalidSessionID_chosen
  594. #define H245_REJ_MASTER_SLAVE_CONFLICT masterSlaveConflict_chosen
  595. // Request Channel Close reject causes - use H245_REJ
  596. // Multiplex Table Entry Send reject causes
  597. #define H245_REJ_MUX_COMPLICATED descriptorTooComplex_chosen
  598. // Request Mode reject causes
  599. #define H245_REJ_UNAVAILABLE modeUnavailable_chosen
  600. #define H245_REJ_MULTIPOINT multipointConstraint_chosen
  601. #define H245_REJ_DENIED requestDenied_chosen
  602. /* H245_ACC_REJ_MUX_T */
  603. typedef struct
  604. {
  605. H245_ACC_REJ_T AccRej;
  606. unsigned long MuxEntryId;
  607. } H245_ACC_REJ_MUX_T[15];
  608. /* H245_H222_LOGICAL_PARAM_T */
  609. typedef struct
  610. {
  611. unsigned short resourceID;
  612. unsigned short subChannelID;
  613. ASN1_BOOL pcr_pidPresent;
  614. unsigned short pcr_pid; // optional
  615. H245_OCTET_STRING_T programDescriptors; // optional
  616. H245_OCTET_STRING_T streamDescriptors; // optional
  617. } H245_H222_LOGICAL_PARAM_T;
  618. /* H245_H223_LOGICAL_PARAM_T */
  619. typedef enum
  620. {
  621. H245_H223_AL_NONSTD = H223LCPs_aLTp_nnStndrd_chosen,
  622. H245_H223_AL_AL1FRAMED = H223LCPs_aLTp_al1Frmd_chosen,
  623. H245_H223_AL_AL1NOTFRAMED = H223LCPs_aLTp_al1NtFrmd_chosen,
  624. H245_H223_AL_AL2NOSEQ = H223LCPs_aLTp_a2WSNs_1_chosen,
  625. H245_H223_AL_AL2SEQ = H223LCPs_aLTp_a2WSNs_2_chosen,
  626. H245_H223_AL_AL3 = H223LCPs_aLTp_al3_chosen
  627. } H245_H223_AL_T;
  628. typedef struct
  629. {
  630. H245_H223_AL_T AlType;
  631. unsigned int SndBufSize; // 0..16777215
  632. unsigned char CtlFldOctet; // 0..2
  633. ASN1_BOOL SegmentFlag;
  634. H245_NONSTANDARD_PARAMETER_T H223_NONSTD;
  635. } H245_H223_LOGICAL_PARAM_T;
  636. /* H245_VGMUX_LOGICAL_PARAM_T */
  637. typedef enum
  638. {
  639. H245_V76_CRC8BIT = crc8bit_chosen,
  640. H245_V76_CRC16BIT = crc16bit_chosen,
  641. H245_V76_CRC32BIT = crc32bit_chosen
  642. } H245_V76_CRC_LENGTH_T;
  643. typedef enum
  644. {
  645. H245_V76_NONE = noSuspendResume_chosen,
  646. H245_V76_WITH_ADDRESS = V76LogicalChannelParameters_suspendResume_suspendResumewAddress_chosen,
  647. H245_V76_WITHOUT_ADDRESS = V76LogicalChannelParameters_suspendResume_suspendResumewoAddress_chosen
  648. // the older (Version 2?) ASN had these spellings
  649. // H245_V76_WITH_ADDRESS = wAddress_chosen,
  650. // H245_V76_WITHOUT_ADDRESS = woAddress_chosen
  651. } H245_V76_SUSPEND_RESUME_T;
  652. typedef enum
  653. {
  654. H245_V76_ERM = eRM_chosen,
  655. H245_V76_UNERM = uNERM_chosen
  656. } H245_V76_MODE_T;
  657. typedef enum
  658. {
  659. H245_V76_REJ = rej_chosen,
  660. H245_V76_SREJ = sREJ_chosen,
  661. H245_V76_MSREJ = mSREJ_chosen
  662. } H245_V76_RECOVERY_T;
  663. typedef struct
  664. {
  665. H245_V76_CRC_LENGTH_T crcLength;
  666. unsigned short n401;
  667. ASN1_BOOL loopbackTestProcedure;
  668. H245_V76_SUSPEND_RESUME_T suspendResume;
  669. ASN1_BOOL uIH;
  670. H245_V76_MODE_T mode;
  671. unsigned short windowSize; // Only valid if mode = ERM
  672. H245_V76_RECOVERY_T recovery; // Only valid if mode = ERM
  673. ASN1_BOOL audioHeaderPresent;
  674. } H245_VGMUX_LOGICAL_PARAM_T;
  675. typedef struct
  676. {
  677. unsigned char type;
  678. /* Note: All unicast types should be odd */
  679. #define H245_IP_UNICAST 1
  680. #define H245_IP_MULTICAST 2
  681. #define H245_IP6_UNICAST 3
  682. #define H245_IP6_MULTICAST 4
  683. #define H245_IPSSR_UNICAST 5 // IP Strict Source Route
  684. #define H245_IPLSR_UNICAST 6 // IP Loose Source Route
  685. #define H245_IPX_UNICAST 9
  686. #define H245_NETBIOS_UNICAST 11
  687. union
  688. {
  689. // type == H245_IP_UNICAST or H245_IP_MULTICAST
  690. struct
  691. {
  692. unsigned short tsapIdentifier;
  693. unsigned char network[4];
  694. } ip;
  695. // type == H245_IP6_UNICAST or H245_IP6_MULTICAST
  696. struct
  697. {
  698. unsigned short tsapIdentifier;
  699. unsigned char network[16];
  700. } ip6;
  701. // type == H245_IPSSR_UNICAST or H245_IPLSR_UNICAST
  702. struct
  703. {
  704. unsigned short tsapIdentifier;
  705. unsigned char network[4];
  706. unsigned char * route; // Routing info
  707. unsigned long dwCount; // Number of addresses in above
  708. } ipSourceRoute;
  709. // type == H245_IPX_UNICAST
  710. struct
  711. {
  712. unsigned char node[6];
  713. unsigned char netnum[4];
  714. unsigned char tsapIdentifier[2];
  715. } ipx;
  716. // type == H245_NETBIOS_UNICAST
  717. unsigned char netBios[16];
  718. } u;
  719. } H245_TRANSPORT_ADDRESS_T;
  720. /* H245_H2250_LOGICAL_PARAM_T */
  721. typedef struct
  722. {
  723. // Note: first 8 fields MUST be same as H245_H2250ACK_LOGICAL_PARAM_T
  724. H2250LCPs_nnStndrdLink nonStandardList; // Optional
  725. H245_TRANSPORT_ADDRESS_T mediaChannel; // Media Channel Address
  726. ASN1_BOOL mediaChannelPresent; // TRUE if previous field used
  727. H245_TRANSPORT_ADDRESS_T mediaControlChannel; // Reverse RTCP channel
  728. ASN1_BOOL mediaControlChannelPresent; // TRUE if previous field used
  729. unsigned char dynamicRTPPayloadType; // 96..127
  730. ASN1_BOOL dynamicRTPPayloadTypePresent; // TRUE if previous field used
  731. unsigned char sessionID; // 0..255
  732. unsigned char associatedSessionID; // 1..255
  733. ASN1_BOOL associatedSessionIDPresent; // TRUE if previous field used
  734. ASN1_BOOL mediaGuaranteed; // TRUE if guaranteed delivery
  735. ASN1_BOOL mediaGuaranteedPresent; // TRUE if previous field used
  736. ASN1_BOOL mediaControlGuaranteed; // TRUE if previous field used
  737. ASN1_BOOL mediaControlGuaranteedPresent;// TRUE if previous field used
  738. ASN1_BOOL silenceSuppression; // TRUE if using silence suppression
  739. ASN1_BOOL silenceSuppressionPresent; // TRUE if previous field used
  740. H245_TERMINAL_LABEL_T destination; // Terminal label for destination
  741. ASN1_BOOL destinationPresent; // TRUE if previous field used
  742. ASN1_BOOL h261aVideoPacketization;
  743. } H245_H2250_LOGICAL_PARAM_T;
  744. /* H245_H2250ACK_LOGICAL_PARAM_T */
  745. typedef struct
  746. {
  747. H2250LCAPs_nnStndrdLink nonStandardList; // Optional
  748. H245_TRANSPORT_ADDRESS_T mediaChannel; // Transport address
  749. ASN1_BOOL mediaChannelPresent; // TRUE if previous field used
  750. H245_TRANSPORT_ADDRESS_T mediaControlChannel; // Forward RTCP channel
  751. ASN1_BOOL mediaControlChannelPresent; // TRUE if previous field used
  752. unsigned char dynamicRTPPayloadType; // 96..127
  753. ASN1_BOOL dynamicRTPPayloadTypePresent;// TRUE if previous field used
  754. unsigned char sessionID; // 1..255
  755. ASN1_BOOL sessionIDPresent; // TRUE if previous field used
  756. } H245_H2250ACK_LOGICAL_PARAM_T;
  757. // 07/17/98, mikev comments: this enum is hacky - it's using the ASN.1 choice
  758. // integers to tag internal structures. The internal structures don't always
  759. // have a 1:1 relationship with the ASN.1. For example, H245_H2250ACK_LOGICAL_PARAM_T
  760. // is tagged H245_H2250ACK, and there is no real "choice" for that
  761. /* H245_MUX_T */
  762. typedef enum
  763. {
  764. H245_H222 = fLCPs_mPs_h222LCPs_chosen,
  765. H245_H223 = fLCPs_mPs_h223LCPs_chosen,
  766. H245_VGMUX = fLCPs_mPs_v76LCPs_chosen,
  767. H245_H2250 = fLCPs_mPs_h2250LCPs_chosen,
  768. H245_H2250ACK = H245_H2250 + 1 //
  769. } H245_MUX_KIND_T;
  770. typedef struct
  771. {
  772. H245_MUX_KIND_T Kind;
  773. union
  774. {
  775. H245_H222_LOGICAL_PARAM_T H222;
  776. H245_H223_LOGICAL_PARAM_T H223;
  777. H245_VGMUX_LOGICAL_PARAM_T VGMUX;
  778. H245_H2250_LOGICAL_PARAM_T H2250;
  779. H245_H2250ACK_LOGICAL_PARAM_T H2250ACK;
  780. } u;
  781. } H245_MUX_T;
  782. /*
  783. H245_MUX_ENTRY_ELEMENT_T
  784. This structure defines the multiplex pattern
  785. which will be used to decode bit patterns in
  786. a given mux table entry. the Kind defines
  787. whether this is a recursive structure (i.e.
  788. pointing to yet another Mux Entry Element) or
  789. whether it is a terminating leaf in the recursive
  790. mux tree.
  791. RepeatCount indicates how many bits should be
  792. used for this channel. If bit count == 0 this
  793. indicates repeat sequence until close flag
  794. */
  795. typedef enum
  796. {
  797. H245_MUX_LOGICAL_CHANNEL = 1, /* logical channel number (Terminate list) */
  798. H245_MUX_ENTRY_ELEMENT /* recursive.. yet another one */
  799. } H245_MUX_ENTRY_KIND_T;
  800. typedef struct H245_MUX_ENTRY_ELEMENT_T
  801. {
  802. struct H245_MUX_ENTRY_ELEMENT_T *pNext;
  803. H245_MUX_ENTRY_KIND_T Kind;
  804. union
  805. {
  806. H245_CHANNEL_T Channel;
  807. struct H245_MUX_ENTRY_ELEMENT_T *pMuxTblEntryElem;
  808. } u;
  809. /* RepeatCount */
  810. /* RepeatCount == 0 -> repeat until close */
  811. /* RepeatCount != 0 -> repeate count */
  812. unsigned long RepeatCount;
  813. } H245_MUX_ENTRY_ELEMENT_T;
  814. /*
  815. H245_MUX_TABLE_T
  816. an H245 Mux Table is defined as a linked list of
  817. Mux Entry Descriptors. Each descriptor has an
  818. associated entry number. These entry numbers
  819. range from 1-15 and must be unique within the table.
  820. The end of the list is designated by a pNext == NULL
  821. */
  822. typedef struct H245_MUX_TABLE_T
  823. {
  824. struct H245_MUX_TABLE_T *pNext;
  825. unsigned long MuxEntryId;
  826. H245_MUX_ENTRY_ELEMENT_T *pMuxTblEntryElem; /* NULL indicates delete entry */
  827. } H245_MUX_TABLE_T;
  828. /********************/
  829. /********************/
  830. /* Indicator Code */
  831. /********************/
  832. /********************/
  833. #define H245_IND_MSTSLV 0x01
  834. #define H245_IND_CAP 0x02
  835. #define H245_IND_CESE_RELEASE 0x30
  836. #define H245_IND_OPEN 0x03
  837. #define H245_IND_OPEN_CONF 0x04
  838. #define H245_IND_CLOSE 0x05
  839. #define H245_IND_REQ_CLOSE 0x06
  840. #define H245_IND_CLCSE_RELEASE 0x31
  841. #define H245_IND_MUX_TBL 0x07
  842. #define H245_IND_MTSE_RELEASE 0x08
  843. #define H245_IND_RMESE 0x09
  844. #define H245_IND_RMESE_RELEASE 0x0A
  845. #define H245_IND_MRSE 0x0B
  846. #define H245_IND_MRSE_RELEASE 0x0C
  847. #define H245_IND_MLSE 0x0D
  848. #define H245_IND_MLSE_RELEASE 0x0E
  849. #define H245_IND_NONSTANDARD_REQUEST 0x0F
  850. #define H245_IND_NONSTANDARD_RESPONSE 0x10
  851. #define H245_IND_NONSTANDARD_COMMAND 0x11
  852. #define H245_IND_NONSTANDARD 0x12
  853. #define H245_IND_MISC_COMMAND 0x13
  854. #define H245_IND_MISC 0x14
  855. #define H245_IND_COMM_MODE_REQUEST 0x15
  856. #define H245_IND_COMM_MODE_RESPONSE 0x16
  857. #define H245_IND_COMM_MODE_COMMAND 0x17
  858. #define H245_IND_CONFERENCE_REQUEST 0x18
  859. #define H245_IND_CONFERENCE_RESPONSE 0x19
  860. #define H245_IND_CONFERENCE_COMMAND 0x1A
  861. #define H245_IND_CONFERENCE 0x1B
  862. #define H245_IND_SEND_TERMCAP 0x1C
  863. #define H245_IND_ENCRYPTION 0x1D
  864. #define H245_IND_FLOW_CONTROL 0x1E
  865. #define H245_IND_ENDSESSION 0x1F
  866. #define H245_IND_FUNCTION_NOT_UNDERSTOOD 0x20
  867. #define H245_IND_JITTER 0x21
  868. #define H245_IND_H223_SKEW 0x22
  869. #define H245_IND_NEW_ATM_VC 0x23
  870. #define H245_IND_USERINPUT 0x24
  871. #define H245_IND_H2250_MAX_SKEW 0x25
  872. #define H245_IND_MC_LOCATION 0x26
  873. #define H245_IND_VENDOR_ID 0x27
  874. #define H245_IND_FUNCTION_NOT_SUPPORTED 0x28
  875. #define H245_IND_H223_RECONFIG 0x29
  876. #define H245_IND_H223_RECONFIG_ACK 0x2A
  877. #define H245_IND_H223_RECONFIG_REJECT 0x2B
  878. /* H245_MSTSLV_T */
  879. typedef enum
  880. {
  881. H245_INDETERMINATE = 0, // Master/Slave Determination failed
  882. H245_MASTER = master_chosen, // Local terminal is Master
  883. H245_SLAVE = slave_chosen // Local terminal is Slave
  884. } H245_MSTSLV_T;
  885. /* H245_IND_OPEN_T */
  886. typedef struct
  887. {
  888. /* for receive */
  889. H245_CHANNEL_T RxChannel;
  890. H245_PORT_T RxPort; // optional
  891. H245_DATA_T RxDataType;
  892. H245_CLIENT_T RxClientType;
  893. H245_CAP_T *pRxCap;
  894. H245_MUX_T *pRxMux;
  895. /* for bi-directional channel */
  896. /* requested transmit stuff */
  897. H245_DATA_T TxDataType;
  898. H245_CLIENT_T TxClientType;
  899. H245_CAP_T *pTxCap;
  900. H245_MUX_T *pTxMux;
  901. H245_ACCESS_T *pSeparateStack; // optional
  902. } H245_IND_OPEN_T;
  903. /* H245_IND_OPEN_CONF_T */
  904. typedef struct
  905. {
  906. /* receive channel */
  907. /* remote requested channel # */
  908. H245_CHANNEL_T RxChannel;
  909. /* transmit channel */
  910. /* locally opened transmit channel # */
  911. H245_CHANNEL_T TxChannel;
  912. } H245_IND_OPEN_CONF_T;
  913. /* H245_IND_CLOSE_T */
  914. typedef enum
  915. {
  916. H245_USER = user_chosen,
  917. H245_LCSE = lcse_chosen
  918. } H245_IND_CLOSE_REASON_T;
  919. typedef struct
  920. {
  921. H245_CHANNEL_T Channel;
  922. H245_IND_CLOSE_REASON_T Reason;
  923. } H245_IND_CLOSE_T;
  924. /* H245_IND_MUX_TBL */
  925. typedef struct
  926. {
  927. H245_MUX_TABLE_T *pMuxTbl;
  928. unsigned long Count;
  929. } H245_IND_MUXTBL_T;
  930. /* H245_RMESE_T */
  931. typedef struct
  932. {
  933. unsigned short awMultiplexTableEntryNumbers[15];
  934. unsigned long dwCount;
  935. } H245_RMESE_T;
  936. /* H245_IND_MRSE_T */
  937. typedef struct
  938. {
  939. RequestedModesLink pRequestedModes;
  940. } H245_IND_MRSE_T;
  941. /* H245_MLSE_T */
  942. typedef enum
  943. {
  944. H245_SYSTEM_LOOP = systemLoop_chosen,
  945. H245_MEDIA_LOOP = mediaLoop_chosen,
  946. H245_CHANNEL_LOOP = logicalChannelLoop_chosen
  947. } H245_LOOP_TYPE_T;
  948. typedef struct
  949. {
  950. H245_LOOP_TYPE_T LoopType;
  951. H245_CHANNEL_T Channel;
  952. } H245_MLSE_T;
  953. /* H245_IND_ENDSESSION_T */
  954. typedef enum
  955. {
  956. H245_ENDSESSION_NONSTD = EndSssnCmmnd_nonStandard_chosen,
  957. H245_ENDSESSION_DISCONNECT = disconnect_chosen,
  958. H245_ENDSESSION_TELEPHONY,
  959. H245_ENDSESSION_V8BIS,
  960. H245_ENDSESSION_V34DSVD,
  961. H245_ENDSESSION_V34DUPFAX,
  962. H245_ENDSESSION_V34H324
  963. } H245_ENDSESSION_T;
  964. typedef struct
  965. {
  966. H245_ENDSESSION_T SessionMode;
  967. /* if non standard chosen */
  968. H245_NONSTANDARD_PARAMETER_T SessionNonStd;
  969. } H245_IND_ENDSESSION_T;
  970. /* H245_IND_NONSTANDARD_T */
  971. typedef struct
  972. {
  973. unsigned char * pData;
  974. unsigned long dwDataLength;
  975. unsigned short * pwObjectId;
  976. unsigned long dwObjectIdLength;
  977. unsigned char byCountryCode;
  978. unsigned char byExtension;
  979. unsigned short wManufacturerCode;
  980. } H245_IND_NONSTANDARD_T;
  981. typedef struct
  982. {
  983. CMTEy_nnStndrdLink pNonStandard; // NULL if not present
  984. unsigned char sessionID; // 0..255
  985. unsigned char associatedSessionID; // 1..255
  986. ASN1_BOOL associatedSessionIDPresent; // TRUE if previous field used
  987. H245_TERMINAL_LABEL_T terminalLabel;
  988. ASN1_BOOL terminalLabelPresent;
  989. unsigned short * pSessionDescription;
  990. unsigned short wSessionDescriptionLength;
  991. H245_TOTCAP_T dataType;
  992. H245_TRANSPORT_ADDRESS_T mediaChannel; // Media Channel Address
  993. ASN1_BOOL mediaChannelPresent; // TRUE if previous field used
  994. H245_TRANSPORT_ADDRESS_T mediaControlChannel; // Reverse RTCP channel
  995. ASN1_BOOL mediaControlChannelPresent; // TRUE if previous field used
  996. ASN1_BOOL mediaGuaranteed; // TRUE if guaranteed delivery
  997. ASN1_BOOL mediaGuaranteedPresent; // TRUE if previous field used
  998. ASN1_BOOL mediaControlGuaranteed; // TRUE if previous field used
  999. ASN1_BOOL mediaControlGuaranteedPresent;// TRUE if previous field used
  1000. } H245_COMM_MODE_ENTRY_T;
  1001. typedef struct
  1002. {
  1003. H245_COMM_MODE_ENTRY_T *pTable;
  1004. unsigned char byTableCount;
  1005. } H245_IND_COMM_MODE_T;
  1006. typedef enum
  1007. {
  1008. H245_REQ_TERMINAL_LIST = terminalListRequest_chosen,
  1009. H245_REQ_MAKE_ME_CHAIR = makeMeChair_chosen,
  1010. H245_REQ_CANCEL_MAKE_ME_CHAIR = cancelMakeMeChair_chosen,
  1011. H245_REQ_DROP_TERMINAL = dropTerminal_chosen,
  1012. H245_REQ_TERMINAL_ID = requestTerminalID_chosen,
  1013. H245_REQ_ENTER_H243_PASSWORD = enterH243Password_chosen,
  1014. H245_REQ_ENTER_H243_TERMINAL_ID = enterH243TerminalID_chosen,
  1015. H245_REQ_ENTER_H243_CONFERENCE_ID = enterH243ConferenceID_chosen
  1016. } H245_CONFER_REQ_ENUM_T;
  1017. typedef struct
  1018. {
  1019. H245_CONFER_REQ_ENUM_T RequestType;
  1020. unsigned char byMcuNumber;
  1021. unsigned char byTerminalNumber;
  1022. } H245_CONFER_REQ_T;
  1023. typedef enum
  1024. {
  1025. H245_RSP_MC_TERMINAL_ID = mCTerminalIDResponse_chosen,
  1026. H245_RSP_TERMINAL_ID = terminalIDResponse_chosen,
  1027. H245_RSP_CONFERENCE_ID = conferenceIDResponse_chosen,
  1028. H245_RSP_PASSWORD = passwordResponse_chosen,
  1029. H245_RSP_TERMINAL_LIST = terminalListResponse_chosen,
  1030. H245_RSP_VIDEO_COMMAND_REJECT = videoCommandReject_chosen,
  1031. H245_RSP_TERMINAL_DROP_REJECT = terminalDropReject_chosen,
  1032. H245_RSP_DENIED_CHAIR_TOKEN,
  1033. H245_RSP_GRANTED_CHAIR_TOKEN
  1034. } H245_CONFER_RSP_ENUM_T;
  1035. typedef struct
  1036. {
  1037. H245_CONFER_RSP_ENUM_T ResponseType;
  1038. unsigned char byMcuNumber;
  1039. unsigned char byTerminalNumber;
  1040. unsigned char *pOctetString;
  1041. unsigned char byOctetStringLength;
  1042. TerminalLabel *pTerminalList;
  1043. unsigned short wTerminalListCount;
  1044. } H245_CONFER_RSP_T;
  1045. typedef enum
  1046. {
  1047. H245_CMD_BROADCAST_CHANNEL = brdcstMyLgclChnnl_chosen,
  1048. H245_CMD_CANCEL_BROADCAST_CHANNEL = cnclBrdcstMyLgclChnnl_chosen,
  1049. H245_CMD_BROADCASTER = ConferenceCommand_makeTerminalBroadcaster_chosen,
  1050. H245_CMD_CANCEL_BROADCASTER = cnclMkTrmnlBrdcstr_chosen,
  1051. H245_CMD_SEND_THIS_SOURCE = ConferenceCommand_sendThisSource_chosen,
  1052. H245_CMD_CANCEL_SEND_THIS_SOURCE = cancelSendThisSource_chosen,
  1053. H245_CMD_DROP_CONFERENCE = dropConference_chosen
  1054. } H245_CONFER_CMD_ENUM_T;
  1055. typedef struct
  1056. {
  1057. H245_CONFER_CMD_ENUM_T CommandType;
  1058. H245_CHANNEL_T Channel;
  1059. unsigned char byMcuNumber;
  1060. unsigned char byTerminalNumber;
  1061. } H245_CONFER_CMD_T;
  1062. typedef enum
  1063. {
  1064. H245_IND_SBE_NUMBER = sbeNumber_chosen,
  1065. H245_IND_TERMINAL_NUMBER_ASSIGN = terminalNumberAssign_chosen,
  1066. H245_IND_TERMINAL_JOINED = terminalJoinedConference_chosen,
  1067. H245_IND_TERMINAL_LEFT = terminalLeftConference_chosen,
  1068. H245_IND_SEEN_BY_ONE_OTHER = seenByAtLeastOneOther_chosen,
  1069. H245_IND_CANCEL_SEEN_BY_ONE_OTHER = cnclSnByAtLstOnOthr_chosen,
  1070. H245_IND_SEEN_BY_ALL = seenByAll_chosen,
  1071. H245_IND_CANCEL_SEEN_BY_ALL = cancelSeenByAll_chosen,
  1072. H245_IND_TERMINAL_YOU_ARE_SEEING = terminalYouAreSeeing_chosen,
  1073. H245_IND_REQUEST_FOR_FLOOR = requestForFloor_chosen
  1074. } H245_CONFER_IND_ENUM_T;
  1075. typedef struct
  1076. {
  1077. H245_CONFER_IND_ENUM_T IndicationType;
  1078. unsigned char bySbeNumber;
  1079. unsigned char byMcuNumber;
  1080. unsigned char byTerminalNumber;
  1081. } H245_CONFER_IND_T;
  1082. typedef enum
  1083. {
  1084. H245_SCOPE_CHANNEL_NUMBER = FCCd_scp_lgclChnnlNmbr_chosen,
  1085. H245_SCOPE_RESOURCE_ID = FlwCntrlCmmnd_scp_rsrcID_chosen,
  1086. H245_SCOPE_WHOLE_MULTIPLEX = FCCd_scp_whlMltplx_chosen
  1087. } H245_SCOPE_T;
  1088. #define H245_NO_RESTRICTION 0xFFFFFFFFL
  1089. typedef struct
  1090. {
  1091. H245_SCOPE_T Scope;
  1092. H245_CHANNEL_T Channel; // only used if Scope is H245_SCOPE_CHANNEL_NUMBER
  1093. unsigned short wResourceID; // only used if Scope is H245_SCOPE_RESOURCE_ID
  1094. unsigned long dwRestriction; // H245_NO_RESTRICTION if no restriction
  1095. } H245_IND_FLOW_CONTROL_T;
  1096. /* H245_USERINPUT_T */
  1097. typedef enum
  1098. {
  1099. H245_USERINPUT_NONSTD = UsrInptIndctn_nnStndrd_chosen,
  1100. H245_USERINPUT_STRING = alphanumeric_chosen
  1101. } H245_USERINPUT_KIND_T;
  1102. typedef struct
  1103. {
  1104. H245_USERINPUT_KIND_T Kind;
  1105. union
  1106. {
  1107. WCHAR * pGenString;
  1108. H245_NONSTANDARD_PARAMETER_T NonStd;
  1109. } u;
  1110. } H245_IND_USERINPUT_T;
  1111. typedef struct
  1112. {
  1113. H245_CHANNEL_T LogicalChannelNumber1;
  1114. H245_CHANNEL_T LogicalChannelNumber2;
  1115. unsigned short wSkew;
  1116. } H245_IND_SKEW_T;
  1117. typedef struct
  1118. {
  1119. H245_NONSTANDID_T Identifier;
  1120. unsigned char *pProductNumber;
  1121. unsigned char byProductNumberLength;
  1122. unsigned char *pVersionNumber;
  1123. unsigned char byVersionNumberLength;
  1124. } H245_IND_VENDOR_ID_T;
  1125. typedef enum
  1126. {
  1127. UNKNOWN,
  1128. REQ_NONSTANDARD,
  1129. REQ_MASTER_SLAVE,
  1130. REQ_TERMCAP_SET,
  1131. REQ_OPEN_LOGICAL_CHANNEL,
  1132. REQ_CLOSE_LOGICAL_CHANNEL,
  1133. REQ_REQUEST_CHANNEL_CLOSE,
  1134. REQ_MULTIPLEX_ENTRY_SEND,
  1135. REQ_REQUEST_MULTIPLEX_ENTRY,
  1136. REQ_REQUEST_MODE,
  1137. REQ_ROUND_TRIP_DELAY,
  1138. REQ_MAINTENANCE_LOOP,
  1139. REQ_COMMUNICATION_MODE,
  1140. REQ_CONFERENCE,
  1141. REQ_H223_ANNEX_A_RECONFIG,
  1142. RSP_NONSTANDARD,
  1143. RSP_MASTER_SLAVE_ACK,
  1144. RSP_MASTER_SLAVE_REJECT,
  1145. RSP_TERMCAP_SET_ACK,
  1146. RSP_TERMCAP_SET_REJECT,
  1147. RSP_OPEN_LOGICAL_CHANNEL_ACK,
  1148. RSP_OPEN_LOGICAL_CHANNEL_REJECT,
  1149. RSP_CLOSE_LOGICAL_CHANNEL_ACK,
  1150. RSP_REQUEST_CHANNEL_CLOSE_ACK,
  1151. RSP_REQUEST_CHANNEL_CLOSE_REJECT,
  1152. RSP_MULTIPLEX_ENTRY_SEND_ACK,
  1153. RSP_MULTIPLEX_ENTRY_SEND_REJECT,
  1154. RSP_REQUEST_MULTIPLEX_ENTRY_ACK,
  1155. RSP_REQUEST_MULTIPLEX_ENTRY_REJECT,
  1156. RSP_REQUEST_MODE_ACK,
  1157. RSP_REQUEST_MODE_REJECT,
  1158. RSP_ROUND_TRIP_DELAY,
  1159. RSP_MAINTENANCE_LOOP_ACK,
  1160. RSP_MAINTENANCE_LOOP_REJECT,
  1161. RSP_COMMUNICATION_MODE,
  1162. RSP_CONFERENCE,
  1163. RSP_H223_ANNEX_A_RECONFIG_ACK,
  1164. RSP_H223_ANNEX_A_RECONFIG_REJECT,
  1165. CMD_NONSTANDARD,
  1166. CMD_MAINTENANCE_LOOP_OFF,
  1167. CMD_SEND_TERMCAP,
  1168. CMD_ENCRYPTION,
  1169. CMD_FLOW_CONTROL,
  1170. CMD_END_SESSION,
  1171. CMD_MISCELLANEOUS,
  1172. CMD_COMMUNICATION_MODE,
  1173. CMD_CONFERENCE,
  1174. IND_NONSTANDARD,
  1175. IND_FUNCTION_NOT_UNDERSTOOD,
  1176. IND_MASTER_SLAVE_RELEASE,
  1177. IND_TERMCAP_SET_RELEASE,
  1178. IND_OPEN_LOGICAL_CHANNEL_CONFIRM,
  1179. IND_REQUEST_CHANNEL_CLOSE_RELEASE,
  1180. IND_MULTIPLEX_ENTRY_SEND_RELEASE,
  1181. IND_REQUEST_MULTIPLEX_ENTRY_RELEASE,
  1182. IND_REQUEST_MODE_RELEASE,
  1183. IND_MISCELLANEOUS,
  1184. IND_JITTER,
  1185. IND_H223_SKEW,
  1186. IND_NEW_ATM_VC,
  1187. IND_USER_INPUT,
  1188. IND_H2250_MAX_SKEW,
  1189. IND_MC_LOCATION,
  1190. IND_CONFERENCE_INDICATION,
  1191. IND_VENDOR_IDENTIFICATION,
  1192. IND_FUNCTION_NOT_SUPPORTED,
  1193. } H245_SUBMESSAGE_T;
  1194. typedef enum
  1195. {
  1196. H245_SYNTAX_ERROR = syntaxError_chosen,
  1197. H245_SEMANTIC_ERROR = semanticError_chosen,
  1198. H245_UNKNOWN_FUNCTION = unknownFunction_chosen
  1199. } H245_FNS_CAUSE_T;
  1200. typedef struct
  1201. {
  1202. H245_FNS_CAUSE_T Cause;
  1203. H245_SUBMESSAGE_T Type;
  1204. } H245_IND_FNS_T;
  1205. /**************/
  1206. /* H245_IND_T */
  1207. /**************/
  1208. typedef struct
  1209. {
  1210. unsigned long Indicator; // Type
  1211. DWORD_PTR dwPreserved; // User supplied dwPreserved from H245Init()
  1212. union
  1213. {
  1214. H245_MSTSLV_T IndMstSlv; // H245_IND_MSTSLV
  1215. // H245_IND_CAP
  1216. // H245_IND_CESE_RELEASE
  1217. H245_IND_OPEN_T IndOpen; // H245_IND_OPEN
  1218. H245_IND_OPEN_CONF_T IndOpenConf; // H245_IND_OPEN_CONF
  1219. H245_IND_CLOSE_T IndClose; // H245_IND_CLOSE
  1220. H245_CHANNEL_T IndReqClose; // H245_IND_REQ_CLOSE
  1221. // H245_IND_CLCSE_RELEASE
  1222. H245_IND_MUXTBL_T IndMuxTbl; // H245_IND_MUX_TBL
  1223. // H245_IND_MTSE_RELEASE
  1224. H245_RMESE_T IndRmese; // H245_IND_RMESE
  1225. // H245_IND_RMESE_RELEASE
  1226. H245_IND_MRSE_T IndMrse; // H245_IND_MRSE
  1227. // H245_IND_MRSE_RELEASE
  1228. H245_MLSE_T IndMlse; // H245_IND_MLSE
  1229. // H245_IND_MLSE_RELEASE
  1230. H245_IND_NONSTANDARD_T IndNonstandardRequest; // H245_IND_NONSTANDARD_REQUEST
  1231. H245_IND_NONSTANDARD_T IndNonstandardResponse; // H245_IND_NONSTANDARD_RESPONSE
  1232. H245_IND_NONSTANDARD_T IndNonstandardCommand; // H245_IND_NONSTANDARD_COMMAND
  1233. H245_IND_NONSTANDARD_T IndNonstandard; // H245_IND_NONSTANDARD
  1234. // H245_IND_MISC_COMMAND
  1235. // H245_IND_MISC
  1236. // H245_IND_COMM_MODE_REQUEST
  1237. H245_IND_COMM_MODE_T IndCommRsp; // H245_IND_COMM_MODE_RESPONSE
  1238. H245_IND_COMM_MODE_T IndCommCmd; // H245_IND_COMM_MODE_COMMAND
  1239. H245_CONFER_REQ_T IndConferReq; // H245_IND_CONFERENCE_REQUEST
  1240. H245_CONFER_RSP_T IndConferRsp; // H245_IND_CONFERENCE_RESPONSE
  1241. H245_CONFER_CMD_T IndConferCmd; // H245_IND_CONFERENCE_COMMAND
  1242. H245_CONFER_IND_T IndConfer; // H245_IND_CONFERENCE
  1243. // H245_IND_SEND_TERMCAP
  1244. // H245_IND_ENCRYPTION
  1245. H245_IND_FLOW_CONTROL_T IndFlowControl; // H245_IND_FLOW_CONTROL
  1246. H245_IND_ENDSESSION_T IndEndSession; // H245_IND_ENDSESSION
  1247. // H245_IND_FUNCTION_NOT_UNDERSTOOD
  1248. // H245_IND_JITTER
  1249. H245_IND_SKEW_T IndH223Skew; // H245_IND_H223_SKEW
  1250. // H245_IND_NEW_ATM_VC
  1251. H245_IND_USERINPUT_T IndUserInput; // H245_IND_USERINPUT
  1252. H245_IND_SKEW_T IndH2250MaxSkew; // H245_IND_H2250_MAX_SKEW
  1253. H245_TRANSPORT_ADDRESS_T IndMcLocation; // H245_IND_MC_LOCATION
  1254. H245_IND_VENDOR_ID_T IndVendorId; // H245_IND_VENDOR_ID
  1255. H245_IND_FNS_T IndFns; // H245_IND_FUNCTION_NOT_SUPPORTED
  1256. // H245_IND_H223_RECONFIG
  1257. // H245_IND_H223_RECONFIG_ACK
  1258. // H245_IND_H223_RECONFIG_REJECT
  1259. } u;
  1260. } H245_IND_T;
  1261. /********************/
  1262. /********************/
  1263. /* Confirm Code */
  1264. /********************/
  1265. /********************/
  1266. #define H245_CONF_INIT_MSTSLV 0x101
  1267. #define H245_CONF_SEND_TERMCAP 0x102
  1268. #define H245_CONF_OPEN 0x103
  1269. #define H245_CONF_NEEDRSP_OPEN 0x104
  1270. #define H245_CONF_CLOSE 0x105
  1271. #define H245_CONF_REQ_CLOSE 0x106
  1272. #define H245_CONF_MUXTBL_SND 0x107
  1273. #define H245_CONF_RMESE 0x109
  1274. #define H245_CONF_RMESE_REJECT 0x10A
  1275. #define H245_CONF_RMESE_EXPIRED 0x10B
  1276. #define H245_CONF_MRSE 0x10C
  1277. #define H245_CONF_MRSE_REJECT 0x10D
  1278. #define H245_CONF_MRSE_EXPIRED 0x10E
  1279. #define H245_CONF_MLSE 0x10F
  1280. #define H245_CONF_MLSE_REJECT 0x110
  1281. #define H245_CONF_MLSE_EXPIRED 0x111
  1282. #define H245_CONF_RTDSE 0x112
  1283. #define H245_CONF_RTDSE_EXPIRED 0x113
  1284. /* H245_CONF_SEND_TERMCAP_T */
  1285. typedef struct
  1286. {
  1287. H245_ACC_REJ_T AccRej;
  1288. } H245_CONF_SEND_TERMCAP_T;
  1289. /* H245_CONF_OPEN_T */
  1290. typedef struct
  1291. {
  1292. H245_ACC_REJ_T AccRej;
  1293. H245_CHANNEL_T TxChannel;
  1294. H245_MUX_T * pTxMux; // optional
  1295. H245_CHANNEL_T RxChannel; // bi-dir only
  1296. H245_MUX_T * pRxMux; // bi-dir only
  1297. H245_PORT_T RxPort; // bi-dir only
  1298. H245_ACCESS_T * pSeparateStack; // optional
  1299. } H245_CONF_OPEN_T;
  1300. typedef H245_CONF_OPEN_T H245_CONF_NEEDRSP_OPEN_T;
  1301. /* H245_CONF_CLOSE_T */
  1302. typedef struct
  1303. {
  1304. H245_ACC_REJ_T AccRej;
  1305. H245_CHANNEL_T Channel;
  1306. } H245_CONF_CLOSE_T;
  1307. /* H245_CONF_REQ_CLOSE_T */
  1308. typedef H245_CONF_CLOSE_T H245_CONF_REQ_CLOSE_T;
  1309. /* H245_CONF_MUXTBL_T */
  1310. typedef struct
  1311. {
  1312. H245_ACC_REJ_T AccRej;
  1313. unsigned long MuxEntryId;
  1314. } H245_CONF_MUXTBL_T;
  1315. /***************/
  1316. /* H245_CONF_T */
  1317. /***************/
  1318. typedef struct
  1319. {
  1320. unsigned long Confirm; // Type
  1321. DWORD_PTR dwPreserved; // User supplied dwPreserved from H245Init()
  1322. DWORD_PTR dwTransId; // User supplied dwTransId from originating call
  1323. HRESULT Error; // Error code
  1324. union // Data for specific indications:
  1325. {
  1326. H245_MSTSLV_T ConfMstSlv; // H245_CONF_INIT_MSTSLV
  1327. H245_CONF_SEND_TERMCAP_T ConfSndTcap; // H245_CONF_SEND_TERMCAP
  1328. H245_CONF_OPEN_T ConfOpen; // H245_CONF_OPEN
  1329. H245_CONF_NEEDRSP_OPEN_T ConfOpenNeedRsp; // H245_CONF_NEEDRSP_OPEN
  1330. H245_CONF_CLOSE_T ConfClose; // H245_CONF_CLOSE
  1331. H245_CONF_REQ_CLOSE_T ConfReqClose; // H245_CONF_REQ_CLOSE
  1332. H245_CONF_MUXTBL_T ConfMuxSnd; // H245_CONF_MUXTBL_SND
  1333. H245_RMESE_T ConfRmese; // H245_CONF_RMESE
  1334. H245_RMESE_T ConfRmeseReject; // H245_CONF_RMESE_REJECT
  1335. // H245_CONF_RMESE_EXPIRED
  1336. unsigned short ConfMrse; // H245_CONF_MRSE
  1337. unsigned short ConfMrseReject; // H245_CONF_MRSE_REJECT
  1338. // H245_CONF_MRSE_EXPIRED
  1339. H245_MLSE_T ConfMlse; // H245_CONF_MLSE
  1340. H245_MLSE_T ConfMlseReject; // H245_CONF_MLSE_REJECT
  1341. // H245_CONF_MLSE_EXPIRED
  1342. // H245_CONF_RTDSE
  1343. // H245_CONF_RTDSE_EXPIRED
  1344. } u;
  1345. } H245_CONF_T;
  1346. typedef enum
  1347. {
  1348. H245_MESSAGE_REQUEST = MltmdSystmCntrlMssg_rqst_chosen,
  1349. H245_MESSAGE_RESPONSE = MSCMg_rspns_chosen,
  1350. H245_MESSAGE_COMMAND = MSCMg_cmmnd_chosen,
  1351. H245_MESSAGE_INDICATION = indication_chosen
  1352. } H245_MESSAGE_TYPE_T;
  1353. /*******************/
  1354. /* H245_CONF_IND_T */
  1355. /*******************/
  1356. typedef enum
  1357. {
  1358. H245_CONF = 1,
  1359. H245_IND
  1360. } H245_CONF_IND_KIND_T;
  1361. typedef struct
  1362. {
  1363. H245_CONF_IND_KIND_T Kind;
  1364. union
  1365. {
  1366. H245_CONF_T Confirm;
  1367. H245_IND_T Indication;
  1368. } u;
  1369. } H245_CONF_IND_T;
  1370. /***************************/
  1371. /* SYSTEM CONTROL MESSAGES */
  1372. /***************************/
  1373. typedef struct
  1374. {
  1375. unsigned long NumPduTx; /* number of tranmitted pdu's */
  1376. unsigned long NumPduRx; /* number of received pdu's */
  1377. unsigned long NumCRCErrors; /* number of crc errors */
  1378. unsigned long NumPduReTx; /* number of pdu's retransmitted */
  1379. } H245_SYSCON_STATS_T;
  1380. #define H245_SYSCON_TRACE_LVL 0x0100 /* pData = &dwTraceLevel */
  1381. #define H245_SYSCON_DUMP_TRACKER 0x0200 /* pData = NULL (debug) */
  1382. #define H245_SYSCON_GET_STATS 0x0300 /* pData = &H245_SYSCON_STATS_T */
  1383. #define H245_SYSCON_RESET_STATS 0x0400 /* pData = NULL */
  1384. #define H245_SYSCON_SET_FSM_N100 0x1000 /* pData = &dwRetryCount */
  1385. #define H245_SYSCON_SET_FSM_T101 0x1100 /* pData = &dwMilliseconds */
  1386. #define H245_SYSCON_SET_FSM_T102 0x1200 /* pData = &dwMilliseconds */
  1387. #define H245_SYSCON_SET_FSM_T103 0x1300 /* pData = &dwMilliseconds */
  1388. #define H245_SYSCON_SET_FSM_T104 0x1400 /* pData = &dwMilliseconds */
  1389. #define H245_SYSCON_SET_FSM_T105 0x1500 /* pData = &dwMilliseconds */
  1390. #define H245_SYSCON_SET_FSM_T106 0x1600 /* pData = &dwMilliseconds */
  1391. #define H245_SYSCON_SET_FSM_T107 0x1700 /* pData = &dwMilliseconds */
  1392. #define H245_SYSCON_SET_FSM_T108 0x1800 /* pData = &dwMilliseconds */
  1393. #define H245_SYSCON_SET_FSM_T109 0x1900 /* pData = &dwMilliseconds */
  1394. #define H245_SYSCON_GET_FSM_N100 0x2000 /* pData = &dwRetryCount */
  1395. #define H245_SYSCON_GET_FSM_T101 0x2100 /* pData = &dwMilliseconds */
  1396. #define H245_SYSCON_GET_FSM_T102 0x2200 /* pData = &dwMilliseconds */
  1397. #define H245_SYSCON_GET_FSM_T103 0x2300 /* pData = &dwMilliseconds */
  1398. #define H245_SYSCON_GET_FSM_T104 0x2400 /* pData = &dwMilliseconds */
  1399. #define H245_SYSCON_GET_FSM_T105 0x2500 /* pData = &dwMilliseconds */
  1400. #define H245_SYSCON_GET_FSM_T106 0x2600 /* pData = &dwMilliseconds */
  1401. #define H245_SYSCON_GET_FSM_T107 0x2700 /* pData = &dwMilliseconds */
  1402. #define H245_SYSCON_GET_FSM_T108 0x2800 /* pData = &dwMilliseconds */
  1403. #define H245_SYSCON_GET_FSM_T109 0x2900 /* pData = &dwMilliseconds */
  1404. /************************/
  1405. /* PROTOCOL ID FOR H245 */
  1406. /************************/
  1407. #define H245_PROTOID "0.0.8.245.0.3"
  1408. /**************************************************/
  1409. /* API Procedure Call Typedefs and API Prototypes */
  1410. /**************************************************/
  1411. typedef DWORD_PTR H245_INST_T;
  1412. typedef HRESULT (*H245_CONF_IND_CALLBACK_T)(H245_CONF_IND_T *, void *);
  1413. typedef int (*H245_CAP_CALLBACK_T)(DWORD_PTR, H245_TOTCAP_T *);
  1414. typedef int (*H245_CAPDESC_CALLBACK_T)(DWORD_PTR, H245_TOTCAPDESC_T *);
  1415. #ifdef __cplusplus
  1416. extern "C" {
  1417. #endif
  1418. H245DLL H245_INST_T
  1419. H245Init (
  1420. H245_CONFIG_T Configuration,
  1421. unsigned long dwPhysId,
  1422. unsigned long *pdwLinkLayerPhysId,
  1423. DWORD_PTR dwPreserved,
  1424. H245_CONF_IND_CALLBACK_T CallBack,
  1425. unsigned char byTerminalType
  1426. );
  1427. H245DLL HRESULT
  1428. H245EndSession (
  1429. H245_INST_T dwInst,
  1430. H245_ENDSESSION_T Mode,
  1431. const H245_NONSTANDARD_PARAMETER_T * pNonStd
  1432. );
  1433. H245DLL HRESULT
  1434. H245ShutDown (H245_INST_T dwInst);
  1435. H245DLL HRESULT
  1436. H245InitMasterSlave (
  1437. H245_INST_T dwInst,
  1438. DWORD_PTR dwTransId
  1439. );
  1440. H245DLL HRESULT
  1441. H245SetLocalCap (
  1442. H245_INST_T dwInst,
  1443. H245_TOTCAP_T * pTotCap,
  1444. H245_CAPID_T * pCapId
  1445. );
  1446. H245DLL HRESULT
  1447. H245DelLocalCap (
  1448. H245_INST_T dwInst,
  1449. H245_CAPID_T CapId
  1450. );
  1451. H245DLL HRESULT
  1452. H245SetCapDescriptor (
  1453. H245_INST_T dwInst,
  1454. H245_CAPDESC_T *pCapDesc,
  1455. H245_CAPDESCID_T *pCapDescId
  1456. );
  1457. H245DLL HRESULT
  1458. H245DelCapDescriptor (
  1459. H245_INST_T dwInst,
  1460. H245_CAPDESCID_T CapDescId
  1461. );
  1462. H245DLL HRESULT
  1463. H245SendTermCaps (
  1464. H245_INST_T dwInst,
  1465. DWORD_PTR dwTransId
  1466. );
  1467. H245DLL HRESULT
  1468. H245EnumCaps (
  1469. H245_INST_T dwInst,
  1470. DWORD_PTR dwTransId,
  1471. H245_CAPDIR_T Direction,
  1472. H245_DATA_T DataType,
  1473. H245_CLIENT_T ClientType,
  1474. H245_CAP_CALLBACK_T pfCapCallback,
  1475. H245_CAPDESC_CALLBACK_T pfCapDescCallback
  1476. );
  1477. H245DLL HRESULT
  1478. H245GetCaps (
  1479. H245_INST_T dwInst,
  1480. H245_CAPDIR_T Direction,
  1481. H245_DATA_T DataType,
  1482. H245_CLIENT_T ClientType,
  1483. H245_TOTCAP_T * * ppTotCap,
  1484. unsigned long * pdwTotCapLen,
  1485. H245_TOTCAPDESC_T * * ppCapDesc,
  1486. unsigned long * pdwCapDescLen
  1487. );
  1488. H245DLL HRESULT
  1489. H245CopyCap (H245_TOTCAP_T **ppDestTotCap,
  1490. const H245_TOTCAP_T *pTotCap);
  1491. H245DLL HRESULT
  1492. H245FreeCap (H245_TOTCAP_T *pTotCap);
  1493. H245DLL HRESULT
  1494. H245CopyCapDescriptor (H245_TOTCAPDESC_T **ppDestCapDesc,
  1495. const H245_TOTCAPDESC_T *pCapDesc);
  1496. H245DLL HRESULT
  1497. H245FreeCapDescriptor (H245_TOTCAPDESC_T *pCapDesc);
  1498. H245DLL H245_MUX_T *
  1499. H245CopyMux (const H245_MUX_T * pMux);
  1500. H245DLL HRESULT
  1501. H245FreeMux (H245_MUX_T * pMux);
  1502. H245DLL HRESULT
  1503. H245OpenChannel (
  1504. H245_INST_T dwInst,
  1505. DWORD_PTR dwTransId,
  1506. H245_CHANNEL_T wTxChannel,
  1507. const H245_TOTCAP_T * pTxMode,
  1508. const H245_MUX_T * pTxMux,
  1509. H245_PORT_T dwTxPort, // optional
  1510. const H245_TOTCAP_T * pRxMode, // bi-dir only
  1511. const H245_MUX_T * pRxMux, // bi-dir only
  1512. const H245_ACCESS_T * pSeparateStack // optional
  1513. );
  1514. H245DLL HRESULT
  1515. H245OpenChannelAccept (
  1516. H245_INST_T dwInst,
  1517. DWORD_PTR dwTransId,
  1518. H245_CHANNEL_T wRxChannel, // RxChannel from IND_OPEN
  1519. const H245_MUX_T * pRxMux, // optional H2250LogicalChannelAckParameters
  1520. H245_CHANNEL_T wTxChannel, // bi-dir only
  1521. const H245_MUX_T * pTxMux, // bi-dir only optional H2250LogicalChannelParameters
  1522. H245_PORT_T dwTxPort, // bi-dir only optional
  1523. const H245_ACCESS_T * pSeparateStack // optional
  1524. );
  1525. H245DLL HRESULT
  1526. H245OpenChannelReject (
  1527. H245_INST_T dwInst,
  1528. H245_CHANNEL_T wRxChannel, // RxChannel from IND_OPEN
  1529. unsigned short wCause
  1530. );
  1531. H245DLL HRESULT
  1532. H245CloseChannel (
  1533. H245_INST_T dwInst,
  1534. DWORD_PTR dwTransId,
  1535. H245_CHANNEL_T wTxChannel
  1536. );
  1537. H245DLL HRESULT
  1538. H245CloseChannelReq (
  1539. H245_INST_T dwInst,
  1540. DWORD_PTR dwTransId,
  1541. H245_CHANNEL_T wRxChannel
  1542. );
  1543. H245DLL HRESULT
  1544. H245CloseChannelReqResp (
  1545. H245_INST_T dwInst,
  1546. H245_ACC_REJ_T AccRej,
  1547. H245_CHANNEL_T wChannel
  1548. );
  1549. H245DLL HRESULT
  1550. H245SendLocalMuxTable (
  1551. H245_INST_T dwInst,
  1552. DWORD_PTR dwTransId,
  1553. H245_MUX_TABLE_T *pMuxTable
  1554. );
  1555. H245DLL HRESULT
  1556. H245MuxTableIndResp (
  1557. H245_INST_T dwInst,
  1558. H245_ACC_REJ_MUX_T AccRejMux,
  1559. unsigned long dwCount
  1560. );
  1561. H245DLL HRESULT
  1562. H245RequestMultiplexEntry (
  1563. H245_INST_T dwInst,
  1564. DWORD_PTR dwTransId,
  1565. const unsigned short * pwMultiplexTableEntryNumbers,
  1566. unsigned long dwCount
  1567. );
  1568. H245DLL HRESULT
  1569. H245RequestMultiplexEntryAck (
  1570. H245_INST_T dwInst,
  1571. const unsigned short * pwMultiplexTableEntryNumbers,
  1572. unsigned long dwCount
  1573. );
  1574. H245DLL HRESULT
  1575. H245RequestMultiplexEntryReject (
  1576. H245_INST_T dwInst,
  1577. const unsigned short * pwMultiplexTableEntryNumbers,
  1578. unsigned long dwCount
  1579. );
  1580. /*
  1581. H245DLL HRESULT
  1582. H245RequestMode (
  1583. H245_INST_T dwInst,
  1584. DWORD_PTR dwTransId,
  1585. const ModeElement * pModeElements,
  1586. unsigned long dwCount
  1587. );
  1588. */
  1589. H245DLL HRESULT
  1590. H245RequestMode (
  1591. H245_INST_T dwInst,
  1592. DWORD_PTR dwTransId,
  1593. // const ModeElement * pModeElements,
  1594. //[email protected]
  1595. ModeDescription ModeDescriptions[],
  1596. //[email protected]
  1597. unsigned long dwCount
  1598. ) ;
  1599. H245DLL HRESULT
  1600. H245RequestModeAck (
  1601. H245_INST_T dwInst,
  1602. unsigned short wResponse
  1603. );
  1604. H245DLL HRESULT
  1605. H245RequestModeReject (
  1606. H245_INST_T dwInst,
  1607. unsigned short wCause
  1608. );
  1609. H245DLL HRESULT
  1610. H245RoundTripDelayRequest (
  1611. H245_INST_T dwInst,
  1612. DWORD_PTR dwTransId
  1613. );
  1614. H245DLL HRESULT
  1615. H245MaintenanceLoop (
  1616. H245_INST_T dwInst,
  1617. DWORD_PTR dwTransId,
  1618. H245_LOOP_TYPE_T dwLoopType,
  1619. H245_CHANNEL_T wChannel
  1620. );
  1621. H245DLL HRESULT
  1622. H245MaintenanceLoopRelease (H245_INST_T dwInst);
  1623. H245DLL HRESULT
  1624. H245MaintenanceLoopAccept (
  1625. H245_INST_T dwInst,
  1626. H245_CHANNEL_T wChannel
  1627. );
  1628. H245DLL HRESULT
  1629. H245MaintenanceLoopReject (
  1630. H245_INST_T dwInst,
  1631. H245_CHANNEL_T wChannel,
  1632. unsigned short wCause
  1633. );
  1634. H245DLL HRESULT
  1635. H245NonStandardObject (
  1636. H245_INST_T dwInst,
  1637. H245_MESSAGE_TYPE_T MessageType,
  1638. const unsigned char * pData,
  1639. unsigned long dwDataLength,
  1640. const unsigned short * pwObjectId,
  1641. unsigned long dwObjectIdLength
  1642. );
  1643. H245DLL HRESULT
  1644. H245NonStandardH221 (
  1645. H245_INST_T dwInst,
  1646. H245_MESSAGE_TYPE_T MessageType,
  1647. const unsigned char * pData,
  1648. unsigned long dwDataLength,
  1649. unsigned char byCountryCode,
  1650. unsigned char byExtension,
  1651. unsigned short wManufacturerCode
  1652. );
  1653. H245DLL HRESULT
  1654. H245CommunicationModeRequest(H245_INST_T dwInst);
  1655. H245DLL HRESULT
  1656. H245CommunicationModeResponse(
  1657. H245_INST_T dwInst,
  1658. const H245_COMM_MODE_ENTRY_T *pTable,
  1659. unsigned char byTableCount
  1660. );
  1661. H245DLL HRESULT
  1662. H245CommunicationModeCommand(
  1663. H245_INST_T dwInst,
  1664. const H245_COMM_MODE_ENTRY_T *pTable,
  1665. unsigned char byTableCount
  1666. );
  1667. H245DLL HRESULT
  1668. H245ConferenceRequest (
  1669. H245_INST_T dwInst,
  1670. H245_CONFER_REQ_ENUM_T RequestType,
  1671. unsigned char byMcuNumber,
  1672. unsigned char byTerminalNumber
  1673. );
  1674. H245DLL HRESULT
  1675. H245ConferenceResponse (
  1676. H245_INST_T dwInst,
  1677. H245_CONFER_RSP_ENUM_T ResponseType,
  1678. unsigned char byMcuNumber,
  1679. unsigned char byTerminalNumber,
  1680. const unsigned char *pOctetString,
  1681. unsigned char byOctetStringLength,
  1682. const TerminalLabel *pTerminalList,
  1683. unsigned short wTerminalListCount
  1684. );
  1685. H245DLL HRESULT
  1686. H245ConferenceCommand (
  1687. H245_INST_T dwInst,
  1688. H245_CONFER_CMD_ENUM_T CommandType,
  1689. H245_CHANNEL_T Channel,
  1690. unsigned char byMcuNumber,
  1691. unsigned char byTerminalNumber
  1692. );
  1693. H245DLL HRESULT
  1694. H245ConferenceIndication(
  1695. H245_INST_T dwInst,
  1696. H245_CONFER_IND_ENUM_T IndicationType,
  1697. unsigned char bySbeNumber,
  1698. unsigned char byMcuNumber,
  1699. unsigned char byTerminalNumber
  1700. );
  1701. H245DLL HRESULT
  1702. H245UserInput (
  1703. H245_INST_T dwInst,
  1704. const WCHAR * pGenString,
  1705. const H245_NONSTANDARD_PARAMETER_T * pNonStd
  1706. );
  1707. H245DLL HRESULT
  1708. H245FlowControl (
  1709. H245_INST_T dwInst,
  1710. H245_SCOPE_T Scope,
  1711. H245_CHANNEL_T Channel, // only used if Scope is H245_SCOPE_CHANNEL_NUMBER
  1712. unsigned short wResourceID, // only used if Scope is H245_SCOPE_RESOURCE_ID
  1713. unsigned long dwRestriction // H245_NO_RESTRICTION if no restriction
  1714. );
  1715. H245DLL HRESULT
  1716. H245H223SkewIndication (
  1717. H245_INST_T dwInst,
  1718. H245_CHANNEL_T wLogicalChannelNumber1,
  1719. H245_CHANNEL_T wLogicalChannelNumber2,
  1720. unsigned short wSkew
  1721. );
  1722. H245DLL HRESULT
  1723. H245H2250MaximumSkewIndication(
  1724. H245_INST_T dwInst,
  1725. H245_CHANNEL_T wLogicalChannelNumber1,
  1726. H245_CHANNEL_T wLogicalChannelNumber2,
  1727. unsigned short wMaximumSkew
  1728. );
  1729. H245DLL HRESULT
  1730. H245MCLocationIndication(
  1731. H245_INST_T dwInst,
  1732. const H245_TRANSPORT_ADDRESS_T * pSignalAddress
  1733. );
  1734. H245DLL HRESULT
  1735. H245VendorIdentification(
  1736. H245_INST_T dwInst,
  1737. const H245_NONSTANDID_T *pIdentifier,
  1738. const unsigned char *pProductNumber, // optional
  1739. unsigned char byProductNumberLength,// optional
  1740. const unsigned char *pVersionNumber, // optional
  1741. unsigned char byVersionNumberLength // optional
  1742. );
  1743. H245DLL HRESULT
  1744. H245SendPDU (
  1745. H245_INST_T dwInst,
  1746. PDU_T * pPdu
  1747. );
  1748. H245DLL HRESULT
  1749. H245SystemControl (
  1750. H245_INST_T dwInst,
  1751. unsigned long dwRequest,
  1752. void * pData
  1753. );
  1754. #ifdef __cplusplus
  1755. }
  1756. #endif
  1757. #endif
  1758.