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.

2018 lines
71 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. // declare exported functions
  373. #if defined(H245DLL_EXPORT)
  374. #define H245DLL __declspec (dllexport)
  375. #else // (H245DLL_EXPORT)
  376. #define H245DLL __declspec (dllimport)
  377. #endif // (H245DLL_EXPORT)
  378. /************************************/
  379. /* ASN.1 DATASTRUCTURES ABSTRACTION */
  380. /************************************/
  381. #include "h245asn1.h"
  382. typedef struct NonStandardIdentifier H245_NONSTANDID_T;
  383. typedef struct NonStandardParameter H245_NONSTANDARD_PARAMETER_T;
  384. typedef H245_NONSTANDARD_PARAMETER_T H245_CAP_NONSTANDARD_T;
  385. typedef struct H261VideoCapability H245_CAP_H261_T;
  386. typedef struct H262VideoCapability H245_CAP_H262_T;
  387. typedef struct H263VideoCapability H245_CAP_H263_T;
  388. typedef struct IS11172VideoCapability H245_CAP_VIS11172_T;
  389. typedef struct IS11172AudioCapability H245_CAP_AIS11172_T;
  390. typedef struct IS13818AudioCapability H245_CAP_IS13818_T;
  391. typedef struct DataApplicationCapability H245_CAP_DATAAPPLICATION_T;
  392. typedef struct H222Capability H245_CAP_H222_T;
  393. typedef struct H223Capability H245_CAP_H223_T;
  394. typedef struct V76Capability H245_CAP_VGMUX_T;
  395. typedef struct H2250Capability H245_CAP_H2250_T;
  396. typedef struct ConferenceCapability H245_CAP_CONFERENCE_T;
  397. typedef struct TerminalLabel H245_TERMINAL_LABEL_T;
  398. #define PDU_T MltmdSystmCntrlMssg
  399. #define H245_ACCESS_T NetworkAccessParameters
  400. typedef unsigned long H245_INST_T;
  401. typedef unsigned short H245_CHANNEL_T;
  402. typedef unsigned long H245_PORT_T;
  403. #define H245_INVALID_ID ((H245_INST_T)0)
  404. #define H245_INVALID_CHANNEL ((H245_CHANNEL_T)0)
  405. #define H245_INVALID_PORT_NUMBER ((H245_PORT_T)-1)
  406. typedef struct
  407. {
  408. unsigned int length;
  409. unsigned char *value;
  410. } H245_OCTET_STRING_T;
  411. /************************/
  412. /* H245 ABSTRACTION */
  413. /************************/
  414. /* H245_CAPDIR_T */
  415. typedef enum
  416. {
  417. H245_CAPDIR_DONTCARE = 0,
  418. H245_CAPDIR_RMTRX,
  419. H245_CAPDIR_RMTTX,
  420. H245_CAPDIR_RMTRXTX,
  421. H245_CAPDIR_LCLRX,
  422. H245_CAPDIR_LCLTX,
  423. H245_CAPDIR_LCLRXTX
  424. } H245_CAPDIR_T;
  425. /* H245_DATA_T */
  426. typedef enum
  427. {
  428. H245_DATA_DONTCARE = 0,
  429. H245_DATA_NONSTD,
  430. H245_DATA_NULL,
  431. H245_DATA_VIDEO,
  432. H245_DATA_AUDIO,
  433. H245_DATA_DATA,
  434. H245_DATA_ENCRYPT_D,
  435. H245_DATA_CONFERENCE,
  436. H245_DATA_MUX /* mux parameters */
  437. } H245_DATA_T;
  438. /* H245_CLIENT_T */
  439. typedef enum
  440. {
  441. H245_CLIENT_DONTCARE = 0, // For H245EnumCap/H245GetCap
  442. H245_CLIENT_NONSTD,
  443. H245_CLIENT_VID_NONSTD,
  444. H245_CLIENT_VID_H261,
  445. H245_CLIENT_VID_H262,
  446. H245_CLIENT_VID_H263,
  447. H245_CLIENT_VID_IS11172,
  448. H245_CLIENT_AUD_NONSTD,
  449. H245_CLIENT_AUD_G711_ALAW64,
  450. H245_CLIENT_AUD_G711_ALAW56,
  451. H245_CLIENT_AUD_G711_ULAW64,
  452. H245_CLIENT_AUD_G711_ULAW56,
  453. H245_CLIENT_AUD_G722_64,
  454. H245_CLIENT_AUD_G722_56,
  455. H245_CLIENT_AUD_G722_48,
  456. H245_CLIENT_AUD_G723,
  457. H245_CLIENT_AUD_G728,
  458. H245_CLIENT_AUD_G729,
  459. H245_CLIENT_AUD_GDSVD,
  460. H245_CLIENT_AUD_IS11172,
  461. H245_CLIENT_AUD_IS13818,
  462. H245_CLIENT_DAT_NONSTD,
  463. H245_CLIENT_DAT_T120,
  464. H245_CLIENT_DAT_DSMCC,
  465. H245_CLIENT_DAT_USERDATA,
  466. H245_CLIENT_DAT_T84,
  467. H245_CLIENT_DAT_T434,
  468. H245_CLIENT_DAT_H224,
  469. H245_CLIENT_DAT_NLPID,
  470. H245_CLIENT_DAT_DSVD,
  471. H245_CLIENT_DAT_H222,
  472. H245_CLIENT_ENCRYPTION_TX,
  473. H245_CLIENT_ENCRYPTION_RX,
  474. H245_CLIENT_CONFERENCE,
  475. // Multiplex capabilities
  476. H245_CLIENT_MUX_NONSTD,
  477. H245_CLIENT_MUX_H222,
  478. H245_CLIENT_MUX_H223,
  479. H245_CLIENT_MUX_VGMUX,
  480. H245_CLIENT_MUX_H2250,
  481. H245_CLIENT_MUX_H223_ANNEX_A
  482. } H245_CLIENT_T;
  483. /* H245_CAP_T */
  484. typedef union
  485. {
  486. H245_CAP_NONSTANDARD_T H245_NonStd; /* not implemented */
  487. H245_CAP_NONSTANDARD_T H245Vid_NONSTD;
  488. H245_CAP_H261_T H245Vid_H261;
  489. H245_CAP_H262_T H245Vid_H262;
  490. H245_CAP_H263_T H245Vid_H263;
  491. H245_CAP_VIS11172_T H245Vid_IS11172;
  492. H245_CAP_NONSTANDARD_T H245Aud_NONSTD;
  493. unsigned short H245Aud_G711_ALAW64;
  494. unsigned short H245Aud_G711_ALAW56;
  495. unsigned short H245Aud_G711_ULAW64;
  496. unsigned short H245Aud_G711_ULAW56;
  497. unsigned short H245Aud_G722_64;
  498. unsigned short H245Aud_G722_56;
  499. unsigned short H245Aud_G722_48;
  500. H245_CAP_G723_T H245Aud_G723;
  501. unsigned short H245Aud_G728;
  502. unsigned short H245Aud_G729;
  503. unsigned short H245Aud_GDSVD;
  504. H245_CAP_AIS11172_T H245Aud_IS11172;
  505. H245_CAP_IS13818_T H245Aud_IS13818;
  506. H245_CAP_DATAAPPLICATION_T H245Dat_NONSTD;
  507. H245_CAP_DATAAPPLICATION_T H245Dat_T120;
  508. H245_CAP_DATAAPPLICATION_T H245Dat_DSMCC;
  509. H245_CAP_DATAAPPLICATION_T H245Dat_USERDATA;
  510. H245_CAP_DATAAPPLICATION_T H245Dat_T84;
  511. H245_CAP_DATAAPPLICATION_T H245Dat_T434;
  512. H245_CAP_DATAAPPLICATION_T H245Dat_H224;
  513. H245_CAP_DATAAPPLICATION_T H245Dat_NLPID;
  514. H245_CAP_DATAAPPLICATION_T H245Dat_DSVD;
  515. H245_CAP_DATAAPPLICATION_T H245Dat_H222;
  516. ASN1_BOOL H245Encryption_TX;
  517. unsigned char H245Encryption_RX;
  518. H245_CAP_CONFERENCE_T H245Conference;
  519. // Multiplex capabilities
  520. H245_CAP_NONSTANDARD_T H245Mux_NONSTD;
  521. H245_CAP_H222_T H245Mux_H222;
  522. H245_CAP_H223_T H245Mux_H223;
  523. H245_CAP_VGMUX_T H245Mux_VGMUX;
  524. H245_CAP_H2250_T H245Mux_H2250;
  525. } H245_CAP_T;
  526. /* H245_CAPID_T */
  527. typedef unsigned short H245_CAPID_T;
  528. #define H245_INVALID_CAPID ((H245_CAPID_T)-1)
  529. #define H245_MAX_CAPID (((H245_CAPID_T)-1) / 2)
  530. /* H245_CAPDESCID_T */
  531. typedef unsigned short H245_CAPDESCID_T;
  532. #define H245_INVALID_CAPDESCID ((H245_CAPDESCID_T)-1)
  533. /* H245_SIMCAP_T */
  534. #define H245_MAX_ALTCAPS 16
  535. typedef struct
  536. {
  537. unsigned short Length; /* number of CapId's in Array */
  538. H245_CAPID_T AltCaps[H245_MAX_ALTCAPS]; /* list of alternatives CapId's */
  539. } H245_SIMCAP_T;
  540. #define H245_MAX_SIMCAPS 16
  541. /* H245_CAPDESC_T */
  542. typedef struct
  543. {
  544. unsigned short Length;
  545. H245_SIMCAP_T SimCapArray[H245_MAX_SIMCAPS];
  546. } H245_CAPDESC_T;
  547. /* H245_TOTCAPDESC_T */
  548. typedef struct
  549. {
  550. H245_CAPDESCID_T CapDescId;
  551. H245_CAPDESC_T CapDesc;
  552. } H245_TOTCAPDESC_T;
  553. /* H245_TOTCAP_T */
  554. typedef struct
  555. {
  556. H245_CAPDIR_T Dir;
  557. H245_DATA_T DataType;
  558. H245_CLIENT_T ClientType;
  559. H245_CAPID_T CapId;
  560. H245_CAP_T Cap;
  561. } H245_TOTCAP_T;
  562. /* H245_CONFIG_T */
  563. typedef enum
  564. {
  565. H245_CONF_H324 = 1,
  566. H245_CONF_H323,
  567. H245_CONF_H310,
  568. H245_CONF_GVD
  569. } H245_CONFIG_T;
  570. /* H245_ACC_REJ_T */
  571. typedef unsigned long H245_ACC_REJ_T;
  572. #define H245_ACC 0
  573. #define H245_REJ 1 // unspecified
  574. // Master Slave Determination reject causes
  575. #define H245_REJ_MSD_IDENTICAL identicalNumbers_chosen
  576. // Terminal Capability Set reject causes
  577. #define H245_REJ_UNDEF_TBL_ENTRY undefinedTableEntryUsed_chosen
  578. #define H245_REJ_DIS_CAP_EXCEED dscrptrCpctyExcdd_chosen
  579. #define H245_REJ_TBLENTRY_CAP_EXCEED tblEntryCpctyExcdd_chosen
  580. // Open Logical Channel reject causes
  581. #define H245_REJ_REV_PARAM unstblRvrsPrmtrs_chosen
  582. #define H245_REJ_TYPE_NOTSUPPORT dataTypeNotSupported_chosen
  583. #define H245_REJ_TYPE_NOTAVAIL dataTypeNotAvailable_chosen
  584. #define H245_REJ_TYPE_UNKNOWN unknownDataType_chosen
  585. #define H245_REJ_AL_COMB dtTypALCmbntnNtSpprtd_chosen
  586. #define H245_REJ_MULTICAST mltcstChnnlNtAllwd_chosen
  587. #define H245_REJ_BANDWIDTH insufficientBandwidth_chosen
  588. #define H245_REJ_STACK sprtStckEstblshmntFld_chosen
  589. #define H245_REJ_SESSION_ID invalidSessionID_chosen
  590. #define H245_REJ_MASTER_SLAVE_CONFLICT masterSlaveConflict_chosen
  591. // Request Channel Close reject causes - use H245_REJ
  592. // Multiplex Table Entry Send reject causes
  593. #define H245_REJ_MUX_COMPLICATED descriptorTooComplex_chosen
  594. // Request Mode reject causes
  595. #define H245_REJ_UNAVAILABLE modeUnavailable_chosen
  596. #define H245_REJ_MULTIPOINT multipointConstraint_chosen
  597. #define H245_REJ_DENIED requestDenied_chosen
  598. /* H245_ACC_REJ_MUX_T */
  599. typedef struct
  600. {
  601. H245_ACC_REJ_T AccRej;
  602. unsigned long MuxEntryId;
  603. } H245_ACC_REJ_MUX_T[15];
  604. /* H245_H222_LOGICAL_PARAM_T */
  605. typedef struct
  606. {
  607. unsigned short resourceID;
  608. unsigned short subChannelID;
  609. ASN1_BOOL pcr_pidPresent;
  610. unsigned short pcr_pid; // optional
  611. H245_OCTET_STRING_T programDescriptors; // optional
  612. H245_OCTET_STRING_T streamDescriptors; // optional
  613. } H245_H222_LOGICAL_PARAM_T;
  614. /* H245_H223_LOGICAL_PARAM_T */
  615. typedef enum
  616. {
  617. H245_H223_AL_NONSTD = H223LCPs_aLTp_nnStndrd_chosen,
  618. H245_H223_AL_AL1FRAMED = H223LCPs_aLTp_al1Frmd_chosen,
  619. H245_H223_AL_AL1NOTFRAMED = H223LCPs_aLTp_al1NtFrmd_chosen,
  620. H245_H223_AL_AL2NOSEQ = H223LCPs_aLTp_a2WSNs_1_chosen,
  621. H245_H223_AL_AL2SEQ = H223LCPs_aLTp_a2WSNs_2_chosen,
  622. H245_H223_AL_AL3 = H223LCPs_aLTp_al3_chosen
  623. } H245_H223_AL_T;
  624. typedef struct
  625. {
  626. H245_H223_AL_T AlType;
  627. unsigned int SndBufSize; // 0..16777215
  628. unsigned char CtlFldOctet; // 0..2
  629. ASN1_BOOL SegmentFlag;
  630. H245_NONSTANDARD_PARAMETER_T H223_NONSTD;
  631. } H245_H223_LOGICAL_PARAM_T;
  632. /* H245_VGMUX_LOGICAL_PARAM_T */
  633. typedef enum
  634. {
  635. H245_V76_CRC8BIT = crc8bit_chosen,
  636. H245_V76_CRC16BIT = crc16bit_chosen,
  637. H245_V76_CRC32BIT = crc32bit_chosen
  638. } H245_V76_CRC_LENGTH_T;
  639. typedef enum
  640. {
  641. H245_V76_WITH_ADDRESS = wAddress_chosen,
  642. H245_V76_WITHOUT_ADDRESS = woAddress_chosen
  643. } H245_V76_SUSPEND_RESUME_T;
  644. typedef enum
  645. {
  646. H245_V76_ERM = eRM_chosen,
  647. H245_V76_UNERM = uNERM_chosen
  648. } H245_V76_MODE_T;
  649. typedef enum
  650. {
  651. H245_V76_REJ = rej_chosen,
  652. H245_V76_SREJ = sREJ_chosen,
  653. H245_V76_MSREJ = mSREJ_chosen
  654. } H245_V76_RECOVERY_T;
  655. typedef struct
  656. {
  657. H245_V76_CRC_LENGTH_T crcLength;
  658. unsigned short n401;
  659. ASN1_BOOL loopbackTestProcedure;
  660. H245_V76_SUSPEND_RESUME_T suspendResume;
  661. ASN1_BOOL uIH;
  662. H245_V76_MODE_T mode;
  663. unsigned short windowSize; // Only valid if mode = ERM
  664. H245_V76_RECOVERY_T recovery; // Only valid if mode = ERM
  665. ASN1_BOOL audioHeaderPresent;
  666. } H245_VGMUX_LOGICAL_PARAM_T;
  667. typedef struct
  668. {
  669. unsigned char type;
  670. /* Note: All unicast types should be odd */
  671. #define H245_IP_UNICAST 1
  672. #define H245_IP_MULTICAST 2
  673. #define H245_IP6_UNICAST 3
  674. #define H245_IP6_MULTICAST 4
  675. #define H245_IPSSR_UNICAST 5 // IP Strict Source Route
  676. #define H245_IPLSR_UNICAST 6 // IP Loose Source Route
  677. #define H245_IPX_UNICAST 9
  678. #define H245_NETBIOS_UNICAST 11
  679. union
  680. {
  681. // type == H245_IP_UNICAST or H245_IP_MULTICAST
  682. struct
  683. {
  684. unsigned short tsapIdentifier;
  685. unsigned char network[4];
  686. } ip;
  687. // type == H245_IP6_UNICAST or H245_IP6_MULTICAST
  688. struct
  689. {
  690. unsigned short tsapIdentifier;
  691. unsigned char network[16];
  692. } ip6;
  693. // type == H245_IPSSR_UNICAST or H245_IPLSR_UNICAST
  694. struct
  695. {
  696. unsigned short tsapIdentifier;
  697. unsigned char network[4];
  698. unsigned char * route; // Routing info
  699. unsigned long dwCount; // Number of addresses in above
  700. } ipSourceRoute;
  701. // type == H245_IPX_UNICAST
  702. struct
  703. {
  704. unsigned char node[6];
  705. unsigned char netnum[4];
  706. unsigned char tsapIdentifier[2];
  707. } ipx;
  708. // type == H245_NETBIOS_UNICAST
  709. unsigned char netBios[16];
  710. } u;
  711. } H245_TRANSPORT_ADDRESS_T;
  712. /* H245_H2250_LOGICAL_PARAM_T */
  713. typedef struct
  714. {
  715. // Note: first 8 fields MUST be same as H245_H2250ACK_LOGICAL_PARAM_T
  716. H2250LCPs_nnStndrdLink nonStandardList; // Optional
  717. H245_TRANSPORT_ADDRESS_T mediaChannel; // Media Channel Address
  718. ASN1_BOOL mediaChannelPresent; // TRUE if previous field used
  719. H245_TRANSPORT_ADDRESS_T mediaControlChannel; // Reverse RTCP channel
  720. ASN1_BOOL mediaControlChannelPresent; // TRUE if previous field used
  721. unsigned char dynamicRTPPayloadType; // 96..127
  722. ASN1_BOOL dynamicRTPPayloadTypePresent; // TRUE if previous field used
  723. unsigned char sessionID; // 0..255
  724. unsigned char associatedSessionID; // 1..255
  725. ASN1_BOOL associatedSessionIDPresent; // TRUE if previous field used
  726. ASN1_BOOL mediaGuaranteed; // TRUE if guaranteed delivery
  727. ASN1_BOOL mediaGuaranteedPresent; // TRUE if previous field used
  728. ASN1_BOOL mediaControlGuaranteed; // TRUE if previous field used
  729. ASN1_BOOL mediaControlGuaranteedPresent;// TRUE if previous field used
  730. ASN1_BOOL silenceSuppression; // TRUE if using silence suppression
  731. ASN1_BOOL silenceSuppressionPresent; // TRUE if previous field used
  732. H245_TERMINAL_LABEL_T destination; // Terminal label for destination
  733. ASN1_BOOL destinationPresent; // TRUE if previous field used
  734. ASN1_BOOL h261aVideoPacketization;
  735. } H245_H2250_LOGICAL_PARAM_T;
  736. /* H245_H2250ACK_LOGICAL_PARAM_T */
  737. typedef struct
  738. {
  739. H2250LCAPs_nnStndrdLink nonStandardList; // Optional
  740. H245_TRANSPORT_ADDRESS_T mediaChannel; // Transport address
  741. ASN1_BOOL mediaChannelPresent; // TRUE if previous field used
  742. H245_TRANSPORT_ADDRESS_T mediaControlChannel; // Forward RTCP channel
  743. ASN1_BOOL mediaControlChannelPresent; // TRUE if previous field used
  744. unsigned char dynamicRTPPayloadType; // 96..127
  745. ASN1_BOOL dynamicRTPPayloadTypePresent;// TRUE if previous field used
  746. unsigned char sessionID; // 1..255
  747. ASN1_BOOL sessionIDPresent; // TRUE if previous field used
  748. } H245_H2250ACK_LOGICAL_PARAM_T;
  749. /* H245_MUX_T */
  750. typedef enum
  751. {
  752. H245_H222 = fLCPs_mPs_h222LCPs_chosen,
  753. H245_H223 = fLCPs_mPs_h223LCPs_chosen,
  754. H245_VGMUX = fLCPs_mPs_v76LCPs_chosen,
  755. H245_H2250 = fLCPs_mPs_h2250LCPs_chosen,
  756. H245_H2250ACK = fLCPs_mPs_h223AALCPs_chosen
  757. } H245_MUX_KIND_T;
  758. typedef struct
  759. {
  760. H245_MUX_KIND_T Kind;
  761. union
  762. {
  763. H245_H222_LOGICAL_PARAM_T H222;
  764. H245_H223_LOGICAL_PARAM_T H223;
  765. H245_VGMUX_LOGICAL_PARAM_T VGMUX;
  766. H245_H2250_LOGICAL_PARAM_T H2250;
  767. H245_H2250ACK_LOGICAL_PARAM_T H2250ACK;
  768. } u;
  769. } H245_MUX_T;
  770. /*
  771. H245_MUX_ENTRY_ELEMENT_T
  772. This structure defines the multiplex pattern
  773. which will be used to decode bit patterns in
  774. a given mux table entry. the Kind defines
  775. whether this is a recursive structure (i.e.
  776. pointing to yet another Mux Entry Element) or
  777. whether it is a terminating leaf in the recursive
  778. mux tree.
  779. RepeatCount indicates how many bits should be
  780. used for this channel. If bit count == 0 this
  781. indicates repeat sequence until close flag
  782. */
  783. typedef enum
  784. {
  785. H245_MUX_LOGICAL_CHANNEL = 1, /* logical channel number (Terminate list) */
  786. H245_MUX_ENTRY_ELEMENT /* recursive.. yet another one */
  787. } H245_MUX_ENTRY_KIND_T;
  788. typedef struct H245_MUX_ENTRY_ELEMENT_T
  789. {
  790. struct H245_MUX_ENTRY_ELEMENT_T *pNext;
  791. H245_MUX_ENTRY_KIND_T Kind;
  792. union
  793. {
  794. H245_CHANNEL_T Channel;
  795. struct H245_MUX_ENTRY_ELEMENT_T *pMuxTblEntryElem;
  796. } u;
  797. /* RepeatCount */
  798. /* RepeatCount == 0 -> repeat until close */
  799. /* RepeatCount != 0 -> repeate count */
  800. unsigned long RepeatCount;
  801. } H245_MUX_ENTRY_ELEMENT_T;
  802. /*
  803. H245_MUX_TABLE_T
  804. an H245 Mux Table is defined as a linked list of
  805. Mux Entry Descriptors. Each descriptor has an
  806. associated entry number. These entry numbers
  807. range from 1-15 and must be unique within the table.
  808. The end of the list is designated by a pNext == NULL
  809. */
  810. typedef struct H245_MUX_TABLE_T
  811. {
  812. struct H245_MUX_TABLE_T *pNext;
  813. unsigned long MuxEntryId;
  814. H245_MUX_ENTRY_ELEMENT_T *pMuxTblEntryElem; /* NULL indicates delete entry */
  815. } H245_MUX_TABLE_T;
  816. /********************/
  817. /********************/
  818. /* Indicator Code */
  819. /********************/
  820. /********************/
  821. #define H245_IND_MSTSLV 0x01
  822. #define H245_IND_CAP 0x02
  823. #define H245_IND_CESE_RELEASE 0x30
  824. #define H245_IND_OPEN 0x03
  825. #define H245_IND_OPEN_CONF 0x04
  826. #define H245_IND_CLOSE 0x05
  827. #define H245_IND_REQ_CLOSE 0x06
  828. #define H245_IND_CLCSE_RELEASE 0x31
  829. #define H245_IND_MUX_TBL 0x07
  830. #define H245_IND_MTSE_RELEASE 0x08
  831. #define H245_IND_RMESE 0x09
  832. #define H245_IND_RMESE_RELEASE 0x0A
  833. #define H245_IND_MRSE 0x0B
  834. #define H245_IND_MRSE_RELEASE 0x0C
  835. #define H245_IND_MLSE 0x0D
  836. #define H245_IND_MLSE_RELEASE 0x0E
  837. #define H245_IND_NONSTANDARD_REQUEST 0x0F
  838. #define H245_IND_NONSTANDARD_RESPONSE 0x10
  839. #define H245_IND_NONSTANDARD_COMMAND 0x11
  840. #define H245_IND_NONSTANDARD 0x12
  841. #define H245_IND_MISC_COMMAND 0x13
  842. #define H245_IND_MISC 0x14
  843. #define H245_IND_COMM_MODE_REQUEST 0x15
  844. #define H245_IND_COMM_MODE_RESPONSE 0x16
  845. #define H245_IND_COMM_MODE_COMMAND 0x17
  846. #define H245_IND_CONFERENCE_REQUEST 0x18
  847. #define H245_IND_CONFERENCE_RESPONSE 0x19
  848. #define H245_IND_CONFERENCE_COMMAND 0x1A
  849. #define H245_IND_CONFERENCE 0x1B
  850. #define H245_IND_SEND_TERMCAP 0x1C
  851. #define H245_IND_ENCRYPTION 0x1D
  852. #define H245_IND_FLOW_CONTROL 0x1E
  853. #define H245_IND_ENDSESSION 0x1F
  854. #define H245_IND_FUNCTION_NOT_UNDERSTOOD 0x20
  855. #define H245_IND_JITTER 0x21
  856. #define H245_IND_H223_SKEW 0x22
  857. #define H245_IND_NEW_ATM_VC 0x23
  858. #define H245_IND_USERINPUT 0x24
  859. #define H245_IND_H2250_MAX_SKEW 0x25
  860. #define H245_IND_MC_LOCATION 0x26
  861. #define H245_IND_VENDOR_ID 0x27
  862. #define H245_IND_FUNCTION_NOT_SUPPORTED 0x28
  863. #define H245_IND_H223_RECONFIG 0x29
  864. #define H245_IND_H223_RECONFIG_ACK 0x2A
  865. #define H245_IND_H223_RECONFIG_REJECT 0x2B
  866. /* H245_MSTSLV_T */
  867. typedef enum
  868. {
  869. H245_INDETERMINATE = 0, // Master/Slave Determination failed
  870. H245_MASTER = master_chosen, // Local terminal is Master
  871. H245_SLAVE = slave_chosen // Local terminal is Slave
  872. } H245_MSTSLV_T;
  873. /* H245_IND_OPEN_T */
  874. typedef struct
  875. {
  876. /* for receive */
  877. H245_CHANNEL_T RxChannel;
  878. H245_PORT_T RxPort; // optional
  879. H245_DATA_T RxDataType;
  880. H245_CLIENT_T RxClientType;
  881. H245_CAP_T *pRxCap;
  882. H245_MUX_T *pRxMux;
  883. /* for bi-directional channel */
  884. /* requested transmit stuff */
  885. H245_DATA_T TxDataType;
  886. H245_CLIENT_T TxClientType;
  887. H245_CAP_T *pTxCap;
  888. H245_MUX_T *pTxMux;
  889. H245_ACCESS_T *pSeparateStack; // optional
  890. } H245_IND_OPEN_T;
  891. /* H245_IND_OPEN_CONF_T */
  892. typedef struct
  893. {
  894. /* receive channel */
  895. /* remote requested channel # */
  896. H245_CHANNEL_T RxChannel;
  897. /* transmit channel */
  898. /* locally opened transmit channel # */
  899. H245_CHANNEL_T TxChannel;
  900. } H245_IND_OPEN_CONF_T;
  901. /* H245_IND_CLOSE_T */
  902. typedef enum
  903. {
  904. H245_USER = user_chosen,
  905. H245_LCSE = lcse_chosen
  906. } H245_IND_CLOSE_REASON_T;
  907. typedef struct
  908. {
  909. H245_CHANNEL_T Channel;
  910. H245_IND_CLOSE_REASON_T Reason;
  911. } H245_IND_CLOSE_T;
  912. /* H245_IND_MUX_TBL */
  913. typedef struct
  914. {
  915. H245_MUX_TABLE_T *pMuxTbl;
  916. unsigned long Count;
  917. } H245_IND_MUXTBL_T;
  918. /* H245_RMESE_T */
  919. typedef struct
  920. {
  921. unsigned short awMultiplexTableEntryNumbers[15];
  922. unsigned long dwCount;
  923. } H245_RMESE_T;
  924. /* H245_IND_MRSE_T */
  925. typedef struct
  926. {
  927. RequestedModesLink pRequestedModes;
  928. } H245_IND_MRSE_T;
  929. /* H245_MLSE_T */
  930. typedef enum
  931. {
  932. H245_SYSTEM_LOOP = systemLoop_chosen,
  933. H245_MEDIA_LOOP = mediaLoop_chosen,
  934. H245_CHANNEL_LOOP = logicalChannelLoop_chosen
  935. } H245_LOOP_TYPE_T;
  936. typedef struct
  937. {
  938. H245_LOOP_TYPE_T LoopType;
  939. H245_CHANNEL_T Channel;
  940. } H245_MLSE_T;
  941. /* H245_IND_ENDSESSION_T */
  942. typedef enum
  943. {
  944. H245_ENDSESSION_NONSTD = EndSssnCmmnd_nonStandard_chosen,
  945. H245_ENDSESSION_DISCONNECT = disconnect_chosen,
  946. H245_ENDSESSION_TELEPHONY,
  947. H245_ENDSESSION_V8BIS,
  948. H245_ENDSESSION_V34DSVD,
  949. H245_ENDSESSION_V34DUPFAX,
  950. H245_ENDSESSION_V34H324
  951. } H245_ENDSESSION_T;
  952. typedef struct
  953. {
  954. H245_ENDSESSION_T SessionMode;
  955. /* if non standard chosen */
  956. H245_NONSTANDARD_PARAMETER_T SessionNonStd;
  957. } H245_IND_ENDSESSION_T;
  958. /* H245_IND_NONSTANDARD_T */
  959. typedef struct
  960. {
  961. unsigned char * pData;
  962. unsigned long dwDataLength;
  963. unsigned short * pwObjectId;
  964. unsigned long dwObjectIdLength;
  965. unsigned char byCountryCode;
  966. unsigned char byExtension;
  967. unsigned short wManufacturerCode;
  968. } H245_IND_NONSTANDARD_T;
  969. typedef struct
  970. {
  971. CMTEy_nnStndrdLink pNonStandard; // NULL if not present
  972. unsigned char sessionID; // 0..255
  973. unsigned char associatedSessionID; // 1..255
  974. ASN1_BOOL associatedSessionIDPresent; // TRUE if previous field used
  975. H245_TERMINAL_LABEL_T terminalLabel;
  976. ASN1_BOOL terminalLabelPresent;
  977. unsigned short * pSessionDescription;
  978. unsigned short wSessionDescriptionLength;
  979. H245_TOTCAP_T dataType;
  980. H245_TRANSPORT_ADDRESS_T mediaChannel; // Media Channel Address
  981. ASN1_BOOL mediaChannelPresent; // TRUE if previous field used
  982. H245_TRANSPORT_ADDRESS_T mediaControlChannel; // Reverse RTCP channel
  983. ASN1_BOOL mediaControlChannelPresent; // TRUE if previous field used
  984. ASN1_BOOL mediaGuaranteed; // TRUE if guaranteed delivery
  985. ASN1_BOOL mediaGuaranteedPresent; // TRUE if previous field used
  986. ASN1_BOOL mediaControlGuaranteed; // TRUE if previous field used
  987. ASN1_BOOL mediaControlGuaranteedPresent;// TRUE if previous field used
  988. } H245_COMM_MODE_ENTRY_T;
  989. typedef struct
  990. {
  991. H245_COMM_MODE_ENTRY_T *pTable;
  992. unsigned char byTableCount;
  993. } H245_IND_COMM_MODE_T;
  994. typedef enum
  995. {
  996. H245_REQ_TERMINAL_LIST = terminalListRequest_chosen,
  997. H245_REQ_MAKE_ME_CHAIR = makeMeChair_chosen,
  998. H245_REQ_CANCEL_MAKE_ME_CHAIR = cancelMakeMeChair_chosen,
  999. H245_REQ_DROP_TERMINAL = dropTerminal_chosen,
  1000. H245_REQ_TERMINAL_ID = requestTerminalID_chosen,
  1001. H245_REQ_ENTER_H243_PASSWORD = enterH243Password_chosen,
  1002. H245_REQ_ENTER_H243_TERMINAL_ID = enterH243TerminalID_chosen,
  1003. H245_REQ_ENTER_H243_CONFERENCE_ID = enterH243ConferenceID_chosen
  1004. } H245_CONFER_REQ_ENUM_T;
  1005. typedef struct
  1006. {
  1007. H245_CONFER_REQ_ENUM_T RequestType;
  1008. unsigned char byMcuNumber;
  1009. unsigned char byTerminalNumber;
  1010. } H245_CONFER_REQ_T;
  1011. typedef enum
  1012. {
  1013. H245_RSP_MC_TERMINAL_ID = mCTerminalIDResponse_chosen,
  1014. H245_RSP_TERMINAL_ID = terminalIDResponse_chosen,
  1015. H245_RSP_CONFERENCE_ID = conferenceIDResponse_chosen,
  1016. H245_RSP_PASSWORD = passwordResponse_chosen,
  1017. H245_RSP_TERMINAL_LIST = terminalListResponse_chosen,
  1018. H245_RSP_VIDEO_COMMAND_REJECT = videoCommandReject_chosen,
  1019. H245_RSP_TERMINAL_DROP_REJECT = terminalDropReject_chosen,
  1020. H245_RSP_DENIED_CHAIR_TOKEN,
  1021. H245_RSP_GRANTED_CHAIR_TOKEN
  1022. } H245_CONFER_RSP_ENUM_T;
  1023. typedef struct
  1024. {
  1025. H245_CONFER_RSP_ENUM_T ResponseType;
  1026. unsigned char byMcuNumber;
  1027. unsigned char byTerminalNumber;
  1028. unsigned char *pOctetString;
  1029. unsigned char byOctetStringLength;
  1030. TerminalLabel *pTerminalList;
  1031. unsigned short wTerminalListCount;
  1032. } H245_CONFER_RSP_T;
  1033. typedef enum
  1034. {
  1035. H245_CMD_BROADCAST_CHANNEL = brdcstMyLgclChnnl_chosen,
  1036. H245_CMD_CANCEL_BROADCAST_CHANNEL = cnclBrdcstMyLgclChnnl_chosen,
  1037. H245_CMD_BROADCASTER = makeTerminalBroadcaster_chosen,
  1038. H245_CMD_CANCEL_BROADCASTER = cnclMkTrmnlBrdcstr_chosen,
  1039. H245_CMD_SEND_THIS_SOURCE = sendThisSource_chosen,
  1040. H245_CMD_CANCEL_SEND_THIS_SOURCE = cancelSendThisSource_chosen,
  1041. H245_CMD_DROP_CONFERENCE = dropConference_chosen
  1042. } H245_CONFER_CMD_ENUM_T;
  1043. typedef struct
  1044. {
  1045. H245_CONFER_CMD_ENUM_T CommandType;
  1046. H245_CHANNEL_T Channel;
  1047. unsigned char byMcuNumber;
  1048. unsigned char byTerminalNumber;
  1049. } H245_CONFER_CMD_T;
  1050. typedef enum
  1051. {
  1052. H245_IND_SBE_NUMBER = sbeNumber_chosen,
  1053. H245_IND_TERMINAL_NUMBER_ASSIGN = terminalNumberAssign_chosen,
  1054. H245_IND_TERMINAL_JOINED = terminalJoinedConference_chosen,
  1055. H245_IND_TERMINAL_LEFT = terminalLeftConference_chosen,
  1056. H245_IND_SEEN_BY_ONE_OTHER = seenByAtLeastOneOther_chosen,
  1057. H245_IND_CANCEL_SEEN_BY_ONE_OTHER = cnclSnByAtLstOnOthr_chosen,
  1058. H245_IND_SEEN_BY_ALL = seenByAll_chosen,
  1059. H245_IND_CANCEL_SEEN_BY_ALL = cancelSeenByAll_chosen,
  1060. H245_IND_TERMINAL_YOU_ARE_SEEING = terminalYouAreSeeing_chosen,
  1061. H245_IND_REQUEST_FOR_FLOOR = requestForFloor_chosen
  1062. } H245_CONFER_IND_ENUM_T;
  1063. typedef struct
  1064. {
  1065. H245_CONFER_IND_ENUM_T IndicationType;
  1066. unsigned char bySbeNumber;
  1067. unsigned char byMcuNumber;
  1068. unsigned char byTerminalNumber;
  1069. } H245_CONFER_IND_T;
  1070. typedef enum
  1071. {
  1072. H245_SCOPE_CHANNEL_NUMBER = FCCd_scp_lgclChnnlNmbr_chosen,
  1073. H245_SCOPE_RESOURCE_ID = FlwCntrlCmmnd_scp_rsrcID_chosen,
  1074. H245_SCOPE_WHOLE_MULTIPLEX = FCCd_scp_whlMltplx_chosen
  1075. } H245_SCOPE_T;
  1076. #define H245_NO_RESTRICTION 0xFFFFFFFFL
  1077. typedef struct
  1078. {
  1079. H245_SCOPE_T Scope;
  1080. H245_CHANNEL_T Channel; // only used if Scope is H245_SCOPE_CHANNEL_NUMBER
  1081. unsigned short wResourceID; // only used if Scope is H245_SCOPE_RESOURCE_ID
  1082. unsigned long dwRestriction; // H245_NO_RESTRICTION if no restriction
  1083. } H245_IND_FLOW_CONTROL_T;
  1084. /* H245_USERINPUT_T */
  1085. typedef enum
  1086. {
  1087. H245_USERINPUT_NONSTD = UsrInptIndctn_nnStndrd_chosen,
  1088. H245_USERINPUT_STRING = alphanumeric_chosen
  1089. } H245_USERINPUT_KIND_T;
  1090. typedef struct
  1091. {
  1092. H245_USERINPUT_KIND_T Kind;
  1093. union
  1094. {
  1095. WCHAR * pGenString;
  1096. H245_NONSTANDARD_PARAMETER_T NonStd;
  1097. } u;
  1098. } H245_IND_USERINPUT_T;
  1099. typedef struct
  1100. {
  1101. H245_CHANNEL_T LogicalChannelNumber1;
  1102. H245_CHANNEL_T LogicalChannelNumber2;
  1103. unsigned short wSkew;
  1104. } H245_IND_SKEW_T;
  1105. typedef struct
  1106. {
  1107. H245_NONSTANDID_T Identifier;
  1108. unsigned char *pProductNumber;
  1109. unsigned char byProductNumberLength;
  1110. unsigned char *pVersionNumber;
  1111. unsigned char byVersionNumberLength;
  1112. } H245_IND_VENDOR_ID_T;
  1113. typedef enum
  1114. {
  1115. UNKNOWN,
  1116. REQ_NONSTANDARD,
  1117. REQ_MASTER_SLAVE,
  1118. REQ_TERMCAP_SET,
  1119. REQ_OPEN_LOGICAL_CHANNEL,
  1120. REQ_CLOSE_LOGICAL_CHANNEL,
  1121. REQ_REQUEST_CHANNEL_CLOSE,
  1122. REQ_MULTIPLEX_ENTRY_SEND,
  1123. REQ_REQUEST_MULTIPLEX_ENTRY,
  1124. REQ_REQUEST_MODE,
  1125. REQ_ROUND_TRIP_DELAY,
  1126. REQ_MAINTENANCE_LOOP,
  1127. REQ_COMMUNICATION_MODE,
  1128. REQ_CONFERENCE,
  1129. REQ_H223_ANNEX_A_RECONFIG,
  1130. RSP_NONSTANDARD,
  1131. RSP_MASTER_SLAVE_ACK,
  1132. RSP_MASTER_SLAVE_REJECT,
  1133. RSP_TERMCAP_SET_ACK,
  1134. RSP_TERMCAP_SET_REJECT,
  1135. RSP_OPEN_LOGICAL_CHANNEL_ACK,
  1136. RSP_OPEN_LOGICAL_CHANNEL_REJECT,
  1137. RSP_CLOSE_LOGICAL_CHANNEL_ACK,
  1138. RSP_REQUEST_CHANNEL_CLOSE_ACK,
  1139. RSP_REQUEST_CHANNEL_CLOSE_REJECT,
  1140. RSP_MULTIPLEX_ENTRY_SEND_ACK,
  1141. RSP_MULTIPLEX_ENTRY_SEND_REJECT,
  1142. RSP_REQUEST_MULTIPLEX_ENTRY_ACK,
  1143. RSP_REQUEST_MULTIPLEX_ENTRY_REJECT,
  1144. RSP_REQUEST_MODE_ACK,
  1145. RSP_REQUEST_MODE_REJECT,
  1146. RSP_ROUND_TRIP_DELAY,
  1147. RSP_MAINTENANCE_LOOP_ACK,
  1148. RSP_MAINTENANCE_LOOP_REJECT,
  1149. RSP_COMMUNICATION_MODE,
  1150. RSP_CONFERENCE,
  1151. RSP_H223_ANNEX_A_RECONFIG_ACK,
  1152. RSP_H223_ANNEX_A_RECONFIG_REJECT,
  1153. CMD_NONSTANDARD,
  1154. CMD_MAINTENANCE_LOOP_OFF,
  1155. CMD_SEND_TERMCAP,
  1156. CMD_ENCRYPTION,
  1157. CMD_FLOW_CONTROL,
  1158. CMD_END_SESSION,
  1159. CMD_MISCELLANEOUS,
  1160. CMD_COMMUNICATION_MODE,
  1161. CMD_CONFERENCE,
  1162. IND_NONSTANDARD,
  1163. IND_FUNCTION_NOT_UNDERSTOOD,
  1164. IND_MASTER_SLAVE_RELEASE,
  1165. IND_TERMCAP_SET_RELEASE,
  1166. IND_OPEN_LOGICAL_CHANNEL_CONFIRM,
  1167. IND_REQUEST_CHANNEL_CLOSE_RELEASE,
  1168. IND_MULTIPLEX_ENTRY_SEND_RELEASE,
  1169. IND_REQUEST_MULTIPLEX_ENTRY_RELEASE,
  1170. IND_REQUEST_MODE_RELEASE,
  1171. IND_MISCELLANEOUS,
  1172. IND_JITTER,
  1173. IND_H223_SKEW,
  1174. IND_NEW_ATM_VC,
  1175. IND_USER_INPUT,
  1176. IND_H2250_MAX_SKEW,
  1177. IND_MC_LOCATION,
  1178. IND_CONFERENCE_INDICATION,
  1179. IND_VENDOR_IDENTIFICATION,
  1180. IND_FUNCTION_NOT_SUPPORTED,
  1181. } H245_SUBMESSAGE_T;
  1182. typedef enum
  1183. {
  1184. H245_SYNTAX_ERROR = syntaxError_chosen,
  1185. H245_SEMANTIC_ERROR = semanticError_chosen,
  1186. H245_UNKNOWN_FUNCTION = unknownFunction_chosen
  1187. } H245_FNS_CAUSE_T;
  1188. typedef struct
  1189. {
  1190. H245_FNS_CAUSE_T Cause;
  1191. H245_SUBMESSAGE_T Type;
  1192. } H245_IND_FNS_T;
  1193. /**************/
  1194. /* H245_IND_T */
  1195. /**************/
  1196. typedef struct
  1197. {
  1198. unsigned long Indicator; // Type
  1199. unsigned long dwPreserved; // User supplied dwPreserved from H245Init()
  1200. union
  1201. {
  1202. H245_MSTSLV_T IndMstSlv; // H245_IND_MSTSLV
  1203. // H245_IND_CAP
  1204. // H245_IND_CESE_RELEASE
  1205. H245_IND_OPEN_T IndOpen; // H245_IND_OPEN
  1206. H245_IND_OPEN_CONF_T IndOpenConf; // H245_IND_OPEN_CONF
  1207. H245_IND_CLOSE_T IndClose; // H245_IND_CLOSE
  1208. H245_CHANNEL_T IndReqClose; // H245_IND_REQ_CLOSE
  1209. // H245_IND_CLCSE_RELEASE
  1210. H245_IND_MUXTBL_T IndMuxTbl; // H245_IND_MUX_TBL
  1211. // H245_IND_MTSE_RELEASE
  1212. H245_RMESE_T IndRmese; // H245_IND_RMESE
  1213. // H245_IND_RMESE_RELEASE
  1214. H245_IND_MRSE_T IndMrse; // H245_IND_MRSE
  1215. // H245_IND_MRSE_RELEASE
  1216. H245_MLSE_T IndMlse; // H245_IND_MLSE
  1217. // H245_IND_MLSE_RELEASE
  1218. H245_IND_NONSTANDARD_T IndNonstandardRequest; // H245_IND_NONSTANDARD_REQUEST
  1219. H245_IND_NONSTANDARD_T IndNonstandardResponse; // H245_IND_NONSTANDARD_RESPONSE
  1220. H245_IND_NONSTANDARD_T IndNonstandardCommand; // H245_IND_NONSTANDARD_COMMAND
  1221. H245_IND_NONSTANDARD_T IndNonstandard; // H245_IND_NONSTANDARD
  1222. // H245_IND_MISC_COMMAND
  1223. // H245_IND_MISC
  1224. // H245_IND_COMM_MODE_REQUEST
  1225. H245_IND_COMM_MODE_T IndCommRsp; // H245_IND_COMM_MODE_RESPONSE
  1226. H245_IND_COMM_MODE_T IndCommCmd; // H245_IND_COMM_MODE_COMMAND
  1227. H245_CONFER_REQ_T IndConferReq; // H245_IND_CONFERENCE_REQUEST
  1228. H245_CONFER_RSP_T IndConferRsp; // H245_IND_CONFERENCE_RESPONSE
  1229. H245_CONFER_CMD_T IndConferCmd; // H245_IND_CONFERENCE_COMMAND
  1230. H245_CONFER_IND_T IndConfer; // H245_IND_CONFERENCE
  1231. // H245_IND_SEND_TERMCAP
  1232. // H245_IND_ENCRYPTION
  1233. H245_IND_FLOW_CONTROL_T IndFlowControl; // H245_IND_FLOW_CONTROL
  1234. H245_IND_ENDSESSION_T IndEndSession; // H245_IND_ENDSESSION
  1235. // H245_IND_FUNCTION_NOT_UNDERSTOOD
  1236. // H245_IND_JITTER
  1237. H245_IND_SKEW_T IndH223Skew; // H245_IND_H223_SKEW
  1238. // H245_IND_NEW_ATM_VC
  1239. H245_IND_USERINPUT_T IndUserInput; // H245_IND_USERINPUT
  1240. H245_IND_SKEW_T IndH2250MaxSkew; // H245_IND_H2250_MAX_SKEW
  1241. H245_TRANSPORT_ADDRESS_T IndMcLocation; // H245_IND_MC_LOCATION
  1242. H245_IND_VENDOR_ID_T IndVendorId; // H245_IND_VENDOR_ID
  1243. H245_IND_FNS_T IndFns; // H245_IND_FUNCTION_NOT_SUPPORTED
  1244. // H245_IND_H223_RECONFIG
  1245. // H245_IND_H223_RECONFIG_ACK
  1246. // H245_IND_H223_RECONFIG_REJECT
  1247. } u;
  1248. } H245_IND_T;
  1249. /********************/
  1250. /********************/
  1251. /* Confirm Code */
  1252. /********************/
  1253. /********************/
  1254. #define H245_CONF_INIT_MSTSLV 0x101
  1255. #define H245_CONF_SEND_TERMCAP 0x102
  1256. #define H245_CONF_OPEN 0x103
  1257. #define H245_CONF_NEEDRSP_OPEN 0x104
  1258. #define H245_CONF_CLOSE 0x105
  1259. #define H245_CONF_REQ_CLOSE 0x106
  1260. #define H245_CONF_MUXTBL_SND 0x107
  1261. #define H245_CONF_RMESE 0x109
  1262. #define H245_CONF_RMESE_REJECT 0x10A
  1263. #define H245_CONF_RMESE_EXPIRED 0x10B
  1264. #define H245_CONF_MRSE 0x10C
  1265. #define H245_CONF_MRSE_REJECT 0x10D
  1266. #define H245_CONF_MRSE_EXPIRED 0x10E
  1267. #define H245_CONF_MLSE 0x10F
  1268. #define H245_CONF_MLSE_REJECT 0x110
  1269. #define H245_CONF_MLSE_EXPIRED 0x111
  1270. #define H245_CONF_RTDSE 0x112
  1271. #define H245_CONF_RTDSE_EXPIRED 0x113
  1272. /* H245_CONF_SEND_TERMCAP_T */
  1273. typedef struct
  1274. {
  1275. H245_ACC_REJ_T AccRej;
  1276. } H245_CONF_SEND_TERMCAP_T;
  1277. /* H245_CONF_OPEN_T */
  1278. typedef struct
  1279. {
  1280. H245_ACC_REJ_T AccRej;
  1281. H245_CHANNEL_T TxChannel;
  1282. H245_MUX_T * pTxMux; // optional
  1283. H245_CHANNEL_T RxChannel; // bi-dir only
  1284. H245_MUX_T * pRxMux; // bi-dir only
  1285. H245_PORT_T RxPort; // bi-dir only
  1286. H245_ACCESS_T * pSeparateStack; // optional
  1287. } H245_CONF_OPEN_T;
  1288. typedef H245_CONF_OPEN_T H245_CONF_NEEDRSP_OPEN_T;
  1289. /* H245_CONF_CLOSE_T */
  1290. typedef struct
  1291. {
  1292. H245_ACC_REJ_T AccRej;
  1293. H245_CHANNEL_T Channel;
  1294. } H245_CONF_CLOSE_T;
  1295. /* H245_CONF_REQ_CLOSE_T */
  1296. typedef H245_CONF_CLOSE_T H245_CONF_REQ_CLOSE_T;
  1297. /* H245_CONF_MUXTBL_T */
  1298. typedef struct
  1299. {
  1300. H245_ACC_REJ_T AccRej;
  1301. unsigned long MuxEntryId;
  1302. } H245_CONF_MUXTBL_T;
  1303. /***************/
  1304. /* H245_CONF_T */
  1305. /***************/
  1306. typedef struct
  1307. {
  1308. unsigned long Confirm; // Type
  1309. unsigned long dwPreserved; // User supplied dwPreserved from H245Init()
  1310. unsigned long dwTransId; // User supplied dwTransId from originating call
  1311. HRESULT Error; // Error code
  1312. union // Data for specific indications:
  1313. {
  1314. H245_MSTSLV_T ConfMstSlv; // H245_CONF_INIT_MSTSLV
  1315. H245_CONF_SEND_TERMCAP_T ConfSndTcap; // H245_CONF_SEND_TERMCAP
  1316. H245_CONF_OPEN_T ConfOpen; // H245_CONF_OPEN
  1317. H245_CONF_NEEDRSP_OPEN_T ConfOpenNeedRsp; // H245_CONF_NEEDRSP_OPEN
  1318. H245_CONF_CLOSE_T ConfClose; // H245_CONF_CLOSE
  1319. H245_CONF_REQ_CLOSE_T ConfReqClose; // H245_CONF_REQ_CLOSE
  1320. H245_CONF_MUXTBL_T ConfMuxSnd; // H245_CONF_MUXTBL_SND
  1321. H245_RMESE_T ConfRmese; // H245_CONF_RMESE
  1322. H245_RMESE_T ConfRmeseReject; // H245_CONF_RMESE_REJECT
  1323. // H245_CONF_RMESE_EXPIRED
  1324. unsigned short ConfMrse; // H245_CONF_MRSE
  1325. unsigned short ConfMrseReject; // H245_CONF_MRSE_REJECT
  1326. // H245_CONF_MRSE_EXPIRED
  1327. H245_MLSE_T ConfMlse; // H245_CONF_MLSE
  1328. H245_MLSE_T ConfMlseReject; // H245_CONF_MLSE_REJECT
  1329. // H245_CONF_MLSE_EXPIRED
  1330. // H245_CONF_RTDSE
  1331. // H245_CONF_RTDSE_EXPIRED
  1332. } u;
  1333. } H245_CONF_T;
  1334. typedef enum
  1335. {
  1336. H245_MESSAGE_REQUEST = MltmdSystmCntrlMssg_rqst_chosen,
  1337. H245_MESSAGE_RESPONSE = MSCMg_rspns_chosen,
  1338. H245_MESSAGE_COMMAND = MSCMg_cmmnd_chosen,
  1339. H245_MESSAGE_INDICATION = indication_chosen
  1340. } H245_MESSAGE_TYPE_T;
  1341. /*******************/
  1342. /* H245_CONF_IND_T */
  1343. /*******************/
  1344. typedef enum
  1345. {
  1346. H245_CONF = 1,
  1347. H245_IND
  1348. } H245_CONF_IND_KIND_T;
  1349. typedef struct
  1350. {
  1351. H245_CONF_IND_KIND_T Kind;
  1352. union
  1353. {
  1354. H245_CONF_T Confirm;
  1355. H245_IND_T Indication;
  1356. } u;
  1357. } H245_CONF_IND_T;
  1358. /***************************/
  1359. /* SYSTEM CONTROL MESSAGES */
  1360. /***************************/
  1361. typedef struct
  1362. {
  1363. unsigned long NumPduTx; /* number of tranmitted pdu's */
  1364. unsigned long NumPduRx; /* number of received pdu's */
  1365. unsigned long NumCRCErrors; /* number of crc errors */
  1366. unsigned long NumPduReTx; /* number of pdu's retransmitted */
  1367. } H245_SYSCON_STATS_T;
  1368. #define H245_SYSCON_TRACE_LVL 0x0100 /* pData = &dwTraceLevel */
  1369. #define H245_SYSCON_DUMP_TRACKER 0x0200 /* pData = NULL (debug) */
  1370. #define H245_SYSCON_GET_STATS 0x0300 /* pData = &H245_SYSCON_STATS_T */
  1371. #define H245_SYSCON_RESET_STATS 0x0400 /* pData = NULL */
  1372. #define H245_SYSCON_SET_FSM_N100 0x1000 /* pData = &dwRetryCount */
  1373. #define H245_SYSCON_SET_FSM_T101 0x1100 /* pData = &dwMilliseconds */
  1374. #define H245_SYSCON_SET_FSM_T102 0x1200 /* pData = &dwMilliseconds */
  1375. #define H245_SYSCON_SET_FSM_T103 0x1300 /* pData = &dwMilliseconds */
  1376. #define H245_SYSCON_SET_FSM_T104 0x1400 /* pData = &dwMilliseconds */
  1377. #define H245_SYSCON_SET_FSM_T105 0x1500 /* pData = &dwMilliseconds */
  1378. #define H245_SYSCON_SET_FSM_T106 0x1600 /* pData = &dwMilliseconds */
  1379. #define H245_SYSCON_SET_FSM_T107 0x1700 /* pData = &dwMilliseconds */
  1380. #define H245_SYSCON_SET_FSM_T108 0x1800 /* pData = &dwMilliseconds */
  1381. #define H245_SYSCON_SET_FSM_T109 0x1900 /* pData = &dwMilliseconds */
  1382. #define H245_SYSCON_GET_FSM_N100 0x2000 /* pData = &dwRetryCount */
  1383. #define H245_SYSCON_GET_FSM_T101 0x2100 /* pData = &dwMilliseconds */
  1384. #define H245_SYSCON_GET_FSM_T102 0x2200 /* pData = &dwMilliseconds */
  1385. #define H245_SYSCON_GET_FSM_T103 0x2300 /* pData = &dwMilliseconds */
  1386. #define H245_SYSCON_GET_FSM_T104 0x2400 /* pData = &dwMilliseconds */
  1387. #define H245_SYSCON_GET_FSM_T105 0x2500 /* pData = &dwMilliseconds */
  1388. #define H245_SYSCON_GET_FSM_T106 0x2600 /* pData = &dwMilliseconds */
  1389. #define H245_SYSCON_GET_FSM_T107 0x2700 /* pData = &dwMilliseconds */
  1390. #define H245_SYSCON_GET_FSM_T108 0x2800 /* pData = &dwMilliseconds */
  1391. #define H245_SYSCON_GET_FSM_T109 0x2900 /* pData = &dwMilliseconds */
  1392. /************************/
  1393. /* PROTOCOL ID FOR H245 */
  1394. /************************/
  1395. #define H245_PROTOID "0.0.8.245.0.2"
  1396. /**************************************************/
  1397. /* API Procedure Call Typedefs and API Prototypes */
  1398. /**************************************************/
  1399. typedef unsigned long H245_INST_T;
  1400. typedef HRESULT (*H245_CONF_IND_CALLBACK_T)(H245_CONF_IND_T *, void *);
  1401. typedef int (*H245_CAP_CALLBACK_T)(unsigned long, H245_TOTCAP_T *);
  1402. typedef int (*H245_CAPDESC_CALLBACK_T)(unsigned long, H245_TOTCAPDESC_T *);
  1403. #ifdef __cplusplus
  1404. extern "C" {
  1405. #endif
  1406. H245DLL H245_INST_T
  1407. H245Init (
  1408. H245_CONFIG_T Configuration,
  1409. unsigned long dwPhysId,
  1410. unsigned long *pdwLinkLayerPhysId,
  1411. unsigned long dwPreserved,
  1412. H245_CONF_IND_CALLBACK_T CallBack,
  1413. unsigned char byTerminalType
  1414. );
  1415. H245DLL H245_INST_T
  1416. H245GetInstanceId (unsigned long dwPhysicalId);
  1417. H245DLL HRESULT
  1418. H245EndSession (
  1419. H245_INST_T dwInst,
  1420. H245_ENDSESSION_T Mode,
  1421. const H245_NONSTANDARD_PARAMETER_T * pNonStd
  1422. );
  1423. H245DLL HRESULT
  1424. H245ShutDown (H245_INST_T dwInst);
  1425. H245DLL HRESULT
  1426. H245InitMasterSlave (
  1427. H245_INST_T dwInst,
  1428. unsigned long dwTransId
  1429. );
  1430. H245DLL HRESULT
  1431. H245SetLocalCap (
  1432. H245_INST_T dwInst,
  1433. H245_TOTCAP_T * pTotCap,
  1434. H245_CAPID_T * pCapId
  1435. );
  1436. H245DLL HRESULT
  1437. H245DelLocalCap (
  1438. H245_INST_T dwInst,
  1439. H245_CAPID_T CapId
  1440. );
  1441. H245DLL HRESULT
  1442. H245SetCapDescriptor (
  1443. H245_INST_T dwInst,
  1444. H245_CAPDESC_T *pCapDesc,
  1445. H245_CAPDESCID_T *pCapDescId
  1446. );
  1447. H245DLL HRESULT
  1448. H245DelCapDescriptor (
  1449. H245_INST_T dwInst,
  1450. H245_CAPDESCID_T CapDescId
  1451. );
  1452. H245DLL HRESULT
  1453. H245SendTermCaps (
  1454. H245_INST_T dwInst,
  1455. unsigned long dwTransId
  1456. );
  1457. H245DLL HRESULT
  1458. H245EnumCaps (
  1459. H245_INST_T dwInst,
  1460. unsigned long dwTransId,
  1461. H245_CAPDIR_T Direction,
  1462. H245_DATA_T DataType,
  1463. H245_CLIENT_T ClientType,
  1464. H245_CAP_CALLBACK_T pfCapCallback,
  1465. H245_CAPDESC_CALLBACK_T pfCapDescCallback
  1466. );
  1467. H245DLL HRESULT
  1468. H245GetCaps (
  1469. H245_INST_T dwInst,
  1470. H245_CAPDIR_T Direction,
  1471. H245_DATA_T DataType,
  1472. H245_CLIENT_T ClientType,
  1473. H245_TOTCAP_T * * ppTotCap,
  1474. unsigned long * pdwTotCapLen,
  1475. H245_TOTCAPDESC_T * * ppCapDesc,
  1476. unsigned long * pdwCapDescLen
  1477. );
  1478. H245DLL HRESULT
  1479. H245CopyCap (H245_TOTCAP_T **ppDestTotCap,
  1480. const H245_TOTCAP_T *pTotCap);
  1481. H245DLL HRESULT
  1482. H245FreeCap (H245_TOTCAP_T *pTotCap);
  1483. H245DLL HRESULT
  1484. H245CopyCapDescriptor (H245_TOTCAPDESC_T **ppDestCapDesc,
  1485. const H245_TOTCAPDESC_T *pCapDesc);
  1486. H245DLL HRESULT
  1487. H245FreeCapDescriptor (H245_TOTCAPDESC_T *pCapDesc);
  1488. H245DLL H245_MUX_T *
  1489. H245CopyMux (const H245_MUX_T * pMux);
  1490. H245DLL HRESULT
  1491. H245FreeMux (H245_MUX_T * pMux);
  1492. H245DLL HRESULT
  1493. H245OpenChannel (
  1494. H245_INST_T dwInst,
  1495. unsigned long dwTransId,
  1496. H245_CHANNEL_T wTxChannel,
  1497. const H245_TOTCAP_T * pTxMode,
  1498. const H245_MUX_T * pTxMux,
  1499. H245_PORT_T dwTxPort, // optional
  1500. const H245_TOTCAP_T * pRxMode, // bi-dir only
  1501. const H245_MUX_T * pRxMux, // bi-dir only
  1502. const H245_ACCESS_T * pSeparateStack // optional
  1503. );
  1504. H245DLL HRESULT
  1505. H245OpenChannelAccept (
  1506. H245_INST_T dwInst,
  1507. unsigned long dwTransId,
  1508. H245_CHANNEL_T wRxChannel, // RxChannel from IND_OPEN
  1509. const H245_MUX_T * pRxMux, // optional H2250LogicalChannelAckParameters
  1510. H245_CHANNEL_T wTxChannel, // bi-dir only
  1511. const H245_MUX_T * pTxMux, // bi-dir only optional H2250LogicalChannelParameters
  1512. H245_PORT_T dwTxPort, // bi-dir only optional
  1513. const H245_ACCESS_T * pSeparateStack // optional
  1514. );
  1515. H245DLL HRESULT
  1516. H245OpenChannelReject (
  1517. H245_INST_T dwInst,
  1518. H245_CHANNEL_T wRxChannel, // RxChannel from IND_OPEN
  1519. unsigned short wCause
  1520. );
  1521. H245DLL HRESULT
  1522. H245CloseChannel (
  1523. H245_INST_T dwInst,
  1524. unsigned long dwTransId,
  1525. H245_CHANNEL_T wTxChannel
  1526. );
  1527. H245DLL HRESULT
  1528. H245CloseChannelReq (
  1529. H245_INST_T dwInst,
  1530. unsigned long dwTransId,
  1531. H245_CHANNEL_T wRxChannel
  1532. );
  1533. H245DLL HRESULT
  1534. H245CloseChannelReqResp (
  1535. H245_INST_T dwInst,
  1536. H245_ACC_REJ_T AccRej,
  1537. H245_CHANNEL_T wChannel
  1538. );
  1539. H245DLL HRESULT
  1540. H245SendLocalMuxTable (
  1541. H245_INST_T dwInst,
  1542. unsigned long dwTransId,
  1543. H245_MUX_TABLE_T *pMuxTable
  1544. );
  1545. H245DLL HRESULT
  1546. H245MuxTableIndResp (
  1547. H245_INST_T dwInst,
  1548. H245_ACC_REJ_MUX_T AccRejMux,
  1549. unsigned long dwCount
  1550. );
  1551. H245DLL HRESULT
  1552. H245RequestMultiplexEntry (
  1553. H245_INST_T dwInst,
  1554. unsigned long dwTransId,
  1555. const unsigned short * pwMultiplexTableEntryNumbers,
  1556. unsigned long dwCount
  1557. );
  1558. H245DLL HRESULT
  1559. H245RequestMultiplexEntryAck (
  1560. H245_INST_T dwInst,
  1561. const unsigned short * pwMultiplexTableEntryNumbers,
  1562. unsigned long dwCount
  1563. );
  1564. H245DLL HRESULT
  1565. H245RequestMultiplexEntryReject (
  1566. H245_INST_T dwInst,
  1567. const unsigned short * pwMultiplexTableEntryNumbers,
  1568. unsigned long dwCount
  1569. );
  1570. /*
  1571. H245DLL HRESULT
  1572. H245RequestMode (
  1573. H245_INST_T dwInst,
  1574. unsigned long dwTransId,
  1575. const ModeElement * pModeElements,
  1576. unsigned long dwCount
  1577. );
  1578. */
  1579. H245DLL HRESULT
  1580. H245RequestMode (
  1581. H245_INST_T dwInst,
  1582. unsigned long dwTransId,
  1583. // const ModeElement * pModeElements,
  1584. //[email protected]
  1585. ModeDescription ModeDescriptions[],
  1586. //[email protected]
  1587. unsigned long dwCount
  1588. ) ;
  1589. H245DLL HRESULT
  1590. H245RequestModeAck (
  1591. H245_INST_T dwInst,
  1592. unsigned short wResponse
  1593. );
  1594. H245DLL HRESULT
  1595. H245RequestModeReject (
  1596. H245_INST_T dwInst,
  1597. unsigned short wCause
  1598. );
  1599. H245DLL HRESULT
  1600. H245RoundTripDelayRequest (
  1601. H245_INST_T dwInst,
  1602. unsigned long dwTransId
  1603. );
  1604. H245DLL HRESULT
  1605. H245MaintenanceLoop (
  1606. H245_INST_T dwInst,
  1607. unsigned long dwTransId,
  1608. H245_LOOP_TYPE_T dwLoopType,
  1609. H245_CHANNEL_T wChannel
  1610. );
  1611. H245DLL HRESULT
  1612. H245MaintenanceLoopRelease (H245_INST_T dwInst);
  1613. H245DLL HRESULT
  1614. H245MaintenanceLoopAccept (
  1615. H245_INST_T dwInst,
  1616. H245_CHANNEL_T wChannel
  1617. );
  1618. H245DLL HRESULT
  1619. H245MaintenanceLoopReject (
  1620. H245_INST_T dwInst,
  1621. H245_CHANNEL_T wChannel,
  1622. unsigned short wCause
  1623. );
  1624. H245DLL HRESULT
  1625. H245NonStandardObject (
  1626. H245_INST_T dwInst,
  1627. H245_MESSAGE_TYPE_T MessageType,
  1628. const unsigned char * pData,
  1629. unsigned long dwDataLength,
  1630. const unsigned short * pwObjectId,
  1631. unsigned long dwObjectIdLength
  1632. );
  1633. H245DLL HRESULT
  1634. H245NonStandardH221 (
  1635. H245_INST_T dwInst,
  1636. H245_MESSAGE_TYPE_T MessageType,
  1637. const unsigned char * pData,
  1638. unsigned long dwDataLength,
  1639. unsigned char byCountryCode,
  1640. unsigned char byExtension,
  1641. unsigned short wManufacturerCode
  1642. );
  1643. H245DLL HRESULT
  1644. H245CommunicationModeRequest(H245_INST_T dwInst);
  1645. H245DLL HRESULT
  1646. H245CommunicationModeResponse(
  1647. H245_INST_T dwInst,
  1648. const H245_COMM_MODE_ENTRY_T *pTable,
  1649. unsigned char byTableCount
  1650. );
  1651. H245DLL HRESULT
  1652. H245CommunicationModeCommand(
  1653. H245_INST_T dwInst,
  1654. const H245_COMM_MODE_ENTRY_T *pTable,
  1655. unsigned char byTableCount
  1656. );
  1657. H245DLL HRESULT
  1658. H245ConferenceRequest (
  1659. H245_INST_T dwInst,
  1660. H245_CONFER_REQ_ENUM_T RequestType,
  1661. unsigned char byMcuNumber,
  1662. unsigned char byTerminalNumber
  1663. );
  1664. H245DLL HRESULT
  1665. H245ConferenceResponse (
  1666. H245_INST_T dwInst,
  1667. H245_CONFER_RSP_ENUM_T ResponseType,
  1668. unsigned char byMcuNumber,
  1669. unsigned char byTerminalNumber,
  1670. const unsigned char *pOctetString,
  1671. unsigned char byOctetStringLength,
  1672. const TerminalLabel *pTerminalList,
  1673. unsigned short wTerminalListCount
  1674. );
  1675. H245DLL HRESULT
  1676. H245ConferenceCommand (
  1677. H245_INST_T dwInst,
  1678. H245_CONFER_CMD_ENUM_T CommandType,
  1679. H245_CHANNEL_T Channel,
  1680. unsigned char byMcuNumber,
  1681. unsigned char byTerminalNumber
  1682. );
  1683. H245DLL HRESULT
  1684. H245ConferenceIndication(
  1685. H245_INST_T dwInst,
  1686. H245_CONFER_IND_ENUM_T IndicationType,
  1687. unsigned char bySbeNumber,
  1688. unsigned char byMcuNumber,
  1689. unsigned char byTerminalNumber
  1690. );
  1691. H245DLL HRESULT
  1692. H245UserInput (
  1693. H245_INST_T dwInst,
  1694. const WCHAR * pGenString,
  1695. const H245_NONSTANDARD_PARAMETER_T * pNonStd
  1696. );
  1697. H245DLL HRESULT
  1698. H245FlowControl (
  1699. H245_INST_T dwInst,
  1700. H245_SCOPE_T Scope,
  1701. H245_CHANNEL_T Channel, // only used if Scope is H245_SCOPE_CHANNEL_NUMBER
  1702. unsigned short wResourceID, // only used if Scope is H245_SCOPE_RESOURCE_ID
  1703. unsigned long dwRestriction // H245_NO_RESTRICTION if no restriction
  1704. );
  1705. H245DLL HRESULT
  1706. H245H223SkewIndication (
  1707. H245_INST_T dwInst,
  1708. H245_CHANNEL_T wLogicalChannelNumber1,
  1709. H245_CHANNEL_T wLogicalChannelNumber2,
  1710. unsigned short wSkew
  1711. );
  1712. H245DLL HRESULT
  1713. H245H2250MaximumSkewIndication(
  1714. H245_INST_T dwInst,
  1715. H245_CHANNEL_T wLogicalChannelNumber1,
  1716. H245_CHANNEL_T wLogicalChannelNumber2,
  1717. unsigned short wMaximumSkew
  1718. );
  1719. H245DLL HRESULT
  1720. H245MCLocationIndication(
  1721. H245_INST_T dwInst,
  1722. const H245_TRANSPORT_ADDRESS_T * pSignalAddress
  1723. );
  1724. H245DLL HRESULT
  1725. H245VendorIdentification(
  1726. H245_INST_T dwInst,
  1727. const H245_NONSTANDID_T *pIdentifier,
  1728. const unsigned char *pProductNumber, // optional
  1729. unsigned char byProductNumberLength,// optional
  1730. const unsigned char *pVersionNumber, // optional
  1731. unsigned char byVersionNumberLength // optional
  1732. );
  1733. H245DLL HRESULT
  1734. H245SendPDU (
  1735. H245_INST_T dwInst,
  1736. PDU_T * pPdu
  1737. );
  1738. H245DLL HRESULT
  1739. H245SystemControl (
  1740. H245_INST_T dwInst,
  1741. unsigned long dwRequest,
  1742. void * pData
  1743. );
  1744. #ifdef __cplusplus
  1745. }
  1746. #endif
  1747. #endif