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.

335 lines
9.1 KiB

  1. /*++
  2. Copyright (c) 1992-1998 Microsoft Corporation
  3. Module Name:
  4. H323pdu.h
  5. Abstract:
  6. Describes interface between H323TSP and H323MSP.
  7. Environment:
  8. User Mode - Win32
  9. --*/
  10. #ifndef __H323_PDU_H_
  11. #define __H323_PDU_H_
  12. typedef enum {
  13. //
  14. // H323TSP_NEW_CALL_INDICATION - sent only from the TSP
  15. // to the MSP in order to initiate communication once
  16. // a call has been created.
  17. //
  18. H323TSP_NEW_CALL_INDICATION,
  19. //
  20. // H323TSP_CLOSE_CALL_COMMAND - sent only from the TSP
  21. // to the MSP in order to stop all the streaming for a call.
  22. //
  23. H323TSP_CLOSE_CALL_COMMAND,
  24. //
  25. // H323TSP_OPEN_CHANNEL_RESPONSE - sent only from the TSP
  26. // to the MSP in response to H323MSP_OPEN_CHANNEL_REQUEST.
  27. //
  28. H323TSP_OPEN_CHANNEL_RESPONSE,
  29. //
  30. // H323TSP_ACCEPT_CHANNEL_REQUEST - sent only from the TSP
  31. // to the MSP in order to request the acceptance of an
  32. // incoming logical channel.
  33. //
  34. H323TSP_ACCEPT_CHANNEL_REQUEST,
  35. //
  36. // H323TSP_CLOSE_CHANNEL_COMMAND - sent only from the TSP
  37. // to the MSP in order to demand the immediate closure of
  38. // an incoming or outgoing logical channel.
  39. //
  40. H323TSP_CLOSE_CHANNEL_COMMAND,
  41. //
  42. // H323TSP_VIDEO_FAST_UPDATE_PICTURE_COMMAND - sent only from the TSP
  43. // to the MSP in order to request an I-frame transmittal
  44. //
  45. H323TSP_VIDEO_FAST_UPDATE_PICTURE_COMMAND,
  46. //
  47. // H323TSP_FLOW_CONTROL_COMMAND - sent only from the TSP
  48. // to the MSP in order to request media stream bit rate
  49. // change
  50. H323TSP_FLOW_CONTROL_COMMAND
  51. } H323TSP_MESSAGE_TYPE;
  52. typedef enum {
  53. //
  54. // H323MSP_OPEN_CHANNEL_REQUEST - sent only from the MSP
  55. // to the TSP in order to request the negotiation on an
  56. // outgoing logical channel.
  57. //
  58. H323MSP_OPEN_CHANNEL_REQUEST,
  59. //
  60. // H323MSP_ACCEPT_CHANNEL_RESPONSE - sent only from the MSP
  61. // to the TSP in reponse to H323TSP_ACCEPT_CHANNEL_REQUEST.
  62. //
  63. H323MSP_ACCEPT_CHANNEL_RESPONSE,
  64. //
  65. // H323MSP_CLOSE_CHANNEL_COMMAND - sent only from the MSP
  66. // to the TSP in order to demand the immediate closure of
  67. // an incoming or outgoing logical channel.
  68. //
  69. H323MSP_CLOSE_CHANNEL_COMMAND,
  70. //
  71. // H323MSP_QOS_EVENT - sent only from the MSP to the TSP for
  72. // QOS events. In the future, we might move the event to MSP space.
  73. //
  74. H323MSP_QOS_Evnet,
  75. //
  76. // H323MSP_VIDEO_FAST_UPDATE_PICTURE_COMMAND - sent only from the
  77. // MSP to the TSP in order to request an I-frame transmittal from
  78. // the remote entity
  79. //
  80. H323MSP_VIDEO_FAST_UPDATE_PICTURE_COMMAND,
  81. //
  82. // H323MSP_FLOW_CONTROL_COMMAND - sent only from the MSP to the TSP
  83. // in order to ask the remote entity to change media stream bit rate
  84. //
  85. H323MSP_FLOW_CONTROL_COMMAND,
  86. //
  87. // H323MSP_CONFIG_T120_COMMAND - sent only from the MSP to the TSP
  88. // in order to set an external T120 address to the TSP.
  89. //
  90. H323MSP_CONFIG_T120_COMMAND,
  91. //
  92. // H323MSP_CONFIG_CAPABILITY_COMMAND - sent only from the MSP to the TSP
  93. // in order to configure the capability array of the TSP.
  94. //
  95. H323MSP_CONFIG_CAPABILITY_COMMAND,
  96. //
  97. // H323MSP_SET_ALIAS_COMMAND - sent only from the MSP to the TSP
  98. // to setup an alias name for the address
  99. //
  100. H323MSP_SET_ALIAS_COMMAND
  101. } H323MSP_MESSAGE_TYPE;
  102. typedef enum {
  103. MEDIA_AUDIO,
  104. MEDIA_VIDEO
  105. } MEDIATYPE;
  106. #ifndef H245_CAPABILITY_DEFINED
  107. typedef enum H245_CAPABILITY
  108. {
  109. HC_G711,
  110. HC_G723,
  111. HC_H263QCIF,
  112. HC_H261QCIF
  113. } H245_CAPABILITY;
  114. #endif
  115. #define MAX_CAPS (HC_H261QCIF - HC_G711 + 1)
  116. typedef struct _VIDEOSETTINGS
  117. {
  118. BOOL bCIF;
  119. DWORD dwMaxBitRate; // the encoder should never exceed this value.
  120. DWORD dwStartUpBitRate; // the encoder uses this value to start
  121. } VIDEOSETTINGS, *PVIDEOSETTINGS;
  122. typedef struct _G723SETTINGS
  123. {
  124. BOOL bG723LowSpeed;
  125. } G723SETTINGS, *PG723SETTINGS;
  126. typedef struct _G729SETTINGS
  127. {
  128. BOOL bDummy; // I.K. 03-23-1999.
  129. // A dummy field for now.
  130. } G729SETTINGS, *PG729SETTINGS;
  131. typedef struct _AUDIOSETTINGS
  132. {
  133. DWORD dwMillisecondsPerPacket;
  134. union {
  135. G723SETTINGS G723Settings;
  136. G729SETTINGS G729Settings;
  137. };
  138. } AUDIOSETTINGS, *PAUDIOSETTINGS;
  139. typedef struct _STREAMSETTINGS
  140. {
  141. MEDIATYPE MediaType;
  142. DWORD dwPayloadType; // RTP payload type
  143. DWORD dwDynamicType; // RTP dynamic payload type
  144. DWORD dwIPLocal; // local IP address in host byte order.
  145. WORD wRTPPortLocal; // local port number in host byte order.
  146. WORD wRTCPPortLocal;
  147. DWORD dwIPRemote; // remote IP address in host byte order.
  148. WORD wRTPPortRemote; // remote port number in host byte order.
  149. WORD wRTCPPortRemote;
  150. union {
  151. VIDEOSETTINGS Video;
  152. AUDIOSETTINGS Audio;
  153. };
  154. } STREAMSETTINGS, *PSTREAMSETTINGS;
  155. typedef struct _H323MSG_OPEN_CHANNEL_REQUEST {
  156. HANDLE hmChannel; // msp channel handle
  157. STREAMSETTINGS Settings; // local address and requested settings
  158. } H323MSG_OPEN_CHANNEL_REQUEST, *PH323MSG_OPEN_CHANNEL_REQUEST;
  159. typedef struct _H323MSG_OPEN_CHANNEL_RESPONSE {
  160. HANDLE hmChannel; // handle from OPEN_CHANNEL_REQUEST
  161. HANDLE htChannel; // tsp channel channel
  162. STREAMSETTINGS Settings; // remote address and agreed upon settings
  163. } H323MSG_OPEN_CHANNEL_RESPONSE, *PH323MSG_OPEN_CHANNEL_RESPONSE;
  164. typedef struct _H323MSG_ACCEPT_CHANNEL_REQUEST {
  165. HANDLE htChannel; // tsp channel handle
  166. STREAMSETTINGS Settings; // remote address and requested settings
  167. } H323MSG_ACCEPT_CHANNEL_REQUEST, *PH323MSG_ACCEPT_CHANNEL_REQUEST;
  168. typedef struct _H323MSG_ACCEPT_CHANNEL_RESPONSE {
  169. HANDLE htChannel; // handle from ACCEPT_CHANNEL_REQUEST
  170. HANDLE hmChannel; // msp channel handle
  171. STREAMSETTINGS Settings; // local address and agreed upon settings
  172. } H323MSG_ACCEPT_CHANNEL_RESPONSE, *PH323MSG_ACCEPT_CHANNEL_RESPONSE;
  173. typedef struct _H323MSG_CLOSE_CHANNEL_COMMAND {
  174. DWORD dwReason; // normal case is zero
  175. HANDLE hChannel; // channel handle
  176. } H323MSG_CLOSE_CHANNEL_COMMAND, *PH323MSG_CLOSE_CHANNEL_COMMAND;
  177. typedef struct _H323MSG_FLOW_CONTROL_COMMAND {
  178. DWORD dwBitRate; // requested bit rate (units of bps)
  179. HANDLE hChannel; // MSP or TSP channel handle
  180. } H323MSG_FLOW_CONTROL_COMMAND, *PH323MSG_FLOW_CONTROL_COMMAND;
  181. typedef struct _H323MSG_CONFIG_T120_COMMAND {
  182. BOOL fEnable; // Enable or disable T120.
  183. DWORD dwIP; // The IP address of the external T120 service.
  184. WORD wPort; // The port number of the external T120 service.
  185. } H323MSG_CONFIG_T120_COMMAND, *PH323MSG_CONFIG_T120_COMMAND;
  186. typedef struct _H323MSG_CONFIG_CAPABILITY_COMMAND {
  187. DWORD dwNumCaps;
  188. DWORD pCapabilities[MAX_CAPS]; // The list of capabilities.
  189. DWORD pdwWeights[MAX_CAPS]; // MSP or TSP channel handle
  190. } H323MSG_CONFIG_CAPABILITY_COMMAND, *PH323MSG_CONFIG_CAPABILITY_COMMAND;
  191. #define MAX_ALIAS_LENGTH 64
  192. typedef struct _H323MSG_SET_ALIAS_COMMAND {
  193. WCHAR strAlias[MAX_ALIAS_LENGTH]; // alias name
  194. DWORD dwLength; // length of the alias
  195. } H323MSG_SET_ALIAS_COMMAND, *PH323MSG_SET_ALIAS_COMMAND;
  196. typedef struct _H323MSG_VIDEO_FAST_UPDATE_PICTURE_COMMAND {
  197. HANDLE hChannel; // MSP or TSP channel handle
  198. } H323MSG_VIDEO_FAST_UPDATE_PICTURE_COMMAND,
  199. *PH323MSG_VIDEO_FAST_UPDATE_PICTURE_COMMAND;
  200. typedef struct _H323MSG_QOS_EVENT {
  201. DWORD dwEvent; // the QOS event as defined in TSPI.h
  202. HANDLE htChannel; // channel handle
  203. } H323MSG_QOS_EVENT, *PH323MSG_QOS_EVENT;
  204. typedef struct _H323TSP_MESSAGE {
  205. H323TSP_MESSAGE_TYPE Type;
  206. union {
  207. H323MSG_OPEN_CHANNEL_RESPONSE OpenChannelResponse;
  208. H323MSG_ACCEPT_CHANNEL_REQUEST AcceptChannelRequest;
  209. H323MSG_CLOSE_CHANNEL_COMMAND CloseChannelCommand;
  210. H323MSG_VIDEO_FAST_UPDATE_PICTURE_COMMAND VideoFastUpdatePictureCommand;
  211. H323MSG_FLOW_CONTROL_COMMAND FlowControlCommand;
  212. };
  213. } H323TSP_MESSAGE, *PH323TSP_MESSAGE;
  214. typedef struct _H323MSP_MESSAGE {
  215. H323MSP_MESSAGE_TYPE Type;
  216. union {
  217. H323MSG_OPEN_CHANNEL_REQUEST OpenChannelRequest;
  218. H323MSG_ACCEPT_CHANNEL_RESPONSE AcceptChannelResponse;
  219. H323MSG_CLOSE_CHANNEL_COMMAND CloseChannelCommand;
  220. H323MSG_QOS_EVENT QOSEvent;
  221. H323MSG_VIDEO_FAST_UPDATE_PICTURE_COMMAND VideoFastUpdatePictureCommand;
  222. H323MSG_FLOW_CONTROL_COMMAND FlowControlCommand;
  223. H323MSG_CONFIG_T120_COMMAND ConfigT120Command;
  224. H323MSG_CONFIG_CAPABILITY_COMMAND ConfigCapabilityCommand;
  225. H323MSG_SET_ALIAS_COMMAND SetAliasCommand;
  226. };
  227. } H323MSP_MESSAGE, *PH323MSP_MESSAGE;
  228. #endif