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.

342 lines
8.0 KiB

  1. /*++
  2. Copyright (c) 1999 Microsoft Corporation
  3. Module Name:
  4. tspmspif.h
  5. Abstract:
  6. Message interface between H.32X MSP and TSP
  7. Author:
  8. Michael Vanbuskirk (mikev) 05/12/99
  9. --*/
  10. #ifndef __TSPMSPIF_H_
  11. #define __TSPMSPIF_H_
  12. #include <winsock2.h>
  13. typedef enum tag_TspMspMessageType
  14. {
  15. SP_MSG_InitiateCall,
  16. SP_MSG_AnswerCall,
  17. SP_MSG_PrepareToAnswer,
  18. SP_MSG_ProceedWithAnswer,
  19. SP_MSG_ReadyToInitiate,
  20. SP_MSG_ReadyToAnswer,
  21. SP_MSG_FastConnectResponse,
  22. SP_MSG_StartH245,
  23. SP_MSG_ConnectComplete,
  24. SP_MSG_H245PDU,
  25. SP_MSG_MCLocationIdentify,
  26. SP_MSG_Hold,
  27. SP_MSG_H245Hold,
  28. SP_MSG_ConferenceList,
  29. SP_MSG_SendDTMFDigits,
  30. SP_MSG_ReleaseCall,
  31. SP_MSG_CallShutdown,
  32. SP_MSG_H245Terminated,
  33. SP_MSG_LegacyDefaultAlias,
  34. SP_MSG_RASRegistration,
  35. SP_MSG_RASRegistrationEvent,
  36. SP_MSG_RASLocationRequest,
  37. SP_MSG_RASLocationConfirm,
  38. SP_MSG_RASBandwidthRequest,
  39. SP_MSG_RASBandwidthConfirm
  40. }TspMspMessageType;
  41. /*
  42. InitiateCall
  43. - Handle of TSP's replacement call (if applicable)
  44. - Handle of conference call (if applicable)
  45. */
  46. typedef struct
  47. {
  48. HANDLE hTSPReplacementCall; /* replacement call handle of the
  49. entity sending the message (MSP's or TSP's handle) */
  50. HANDLE hTSPConferenceCall;
  51. SOCKADDR_IN saLocalQ931Addr;
  52. } TSPMSP_InitiateCallMessage;
  53. // AnswerCall (TSP to MSP). // no parameters
  54. /*
  55. PrepareToAnswer (TSP to MSP).
  56. - Received fastConnect parameters
  57. - Received h245Tunneling capability
  58. - WaitForConnect flag
  59. - Q.931 setup parameters
  60. - Handle of replacement call (if applicable)
  61. */
  62. typedef struct
  63. {
  64. HANDLE hReplacementCall; /* replacement call handle of the
  65. entity sending the message (either the MSP TSP) */
  66. SOCKADDR_IN saLocalQ931Addr;
  67. } TSPMSP_PrepareToAnswerMessage;
  68. /*
  69. ProceedWithAnswer (MSP to TSP)
  70. - Address of MC to deflect the call to
  71. */
  72. typedef struct
  73. {
  74. BOOL fMCAddressPresent; // true if AddrMC contains the MC address
  75. // FALSE if simply proceeding
  76. SOCKADDR_IN saAddrMC; // address of MC to route call to
  77. HANDLE hMSPReplacementCall; /* MSP's replacement call handle (if applicable) */
  78. } TSPMSP_ProceedWithAnswerMessage;
  79. /*
  80. ReadyToInitiate
  81. - Additional callee addresses, callee alias(es)
  82. - FastConnect proposal
  83. - WaitForConnect flag
  84. - Security profile ID(s)
  85. - Security token(s)
  86. - Handle of MSP's replacement call (if applicable)
  87. */
  88. typedef struct
  89. {
  90. HANDLE hMSPReplacementCall; /* MSP's replacement call handle (if applicable) */
  91. } TSPMSP_ReadyToInitiateMessage;
  92. /*
  93. ReadyToAnswer (MSP to TSP)
  94. - Fast Connect response
  95. - Security profile ID(s)
  96. - Security token(s)
  97. - Handle of MSP's replacement call (if applicable)
  98. */
  99. typedef struct
  100. {
  101. HANDLE hMSPReplacementCall; /* MSP's replacement call handle (if applicable) */
  102. } TSPMSP_ReadyToAnswerMessage;
  103. /*
  104. FastConnectResponse (TSP to MSP)
  105. - Fast Connect response
  106. - Security profile ID(s)
  107. - Security token(s)
  108. - Handle of MSP's replacement call (if applicable)
  109. */
  110. typedef struct
  111. {
  112. HANDLE hTSPReplacementCall; /* MSP's replacement call handle */
  113. BOOL fH245TunnelCapability;
  114. SOCKADDR_IN saH245Addr;
  115. } TSPMSP_FastConnectResponseMessage;
  116. /*
  117. StartH245 (TSP->MSP)
  118. - Call handle of call to replace (used in the "call transfer" case only)
  119. - Handle of TSP's replacement call (if applicable)
  120. - H.245 address
  121. - Received h245Tunneling capability
  122. - Conference call identifier (local MC case only)
  123. optional (ASN.1):
  124. - Security token(s) received via Q.931
  125. - Security profile identifier(s) received via Q.931
  126. - Received fastConnect response (outgoing call case)
  127. */
  128. typedef struct
  129. {
  130. HANDLE hMSPReplaceCall; /* handle of MSP's call being replaced */
  131. HANDLE hTSPReplacementCall; /* TSP's replacement call handle */
  132. BYTE ConferenceID[16];
  133. BOOL fH245TunnelCapability;
  134. BOOL fH245AddressPresent;
  135. SOCKADDR_IN saH245Addr;
  136. SOCKADDR_IN saQ931Addr; // always present
  137. } TSPMSP_StartH245Message;
  138. /*
  139. ConnectComplete (TSP->MSP) // no parameters
  140. */
  141. /*
  142. H245PDU (MSP->TSP, TSP->MSP) // tunneled, encoded, pure ASN.1
  143. */
  144. typedef struct
  145. {
  146. } TSPMSP_H245PDUMessage;
  147. /*
  148. MCLocationIdentify (MSP->TSP)
  149. */
  150. typedef struct
  151. {
  152. BOOL fMCIsLocal; // true if the MC is on the local machine
  153. SOCKADDR_IN AddrMC; // address of MC to route call to
  154. } TSPMSP_MCLocationIdentifyMessage;
  155. /*
  156. Hold (TSP->MSP)
  157. */
  158. typedef struct
  159. {
  160. BOOL fHold;
  161. } TSPMSP_HoldMessage;
  162. /*
  163. H245Hold (MSP->TSP)
  164. */
  165. typedef struct
  166. {
  167. BOOL fHold;
  168. } TSPMSP_H245HoldMessage;
  169. /*
  170. ConferenceList(MSP->TSP, TSP->MSP)
  171. */
  172. typedef struct
  173. {
  174. HANDLE hTSPReplacementCall; /* MSP's replacement call handle */
  175. } TSPMSP_ConferenceListMessage;
  176. /*
  177. SendDTMFDigits (TSP->MSP)
  178. */
  179. typedef struct
  180. {
  181. WORD wNumDigits; // number of characters in TspMspMessage.u.WideChars
  182. } TSPMSP_SendDTMFDigitsMessage;
  183. /*
  184. ReleaseCall(MSP->TSP) // no parameters
  185. */
  186. /*
  187. CallShutdown (TSP->MSP) // no parameters
  188. */
  189. /*
  190. H245Terminated (MSP->TSP) // no parameters
  191. */
  192. typedef struct
  193. {
  194. WORD wNumChars; // number of characters in TspMspMessage.u.WideChars
  195. } TSPMSP_LegacyDefaultAliasMessage;
  196. /*
  197. RASRegistration (MSP->TSP)
  198. - The list of aliases to register or unregister
  199. */
  200. typedef struct
  201. {
  202. SOCKADDR_IN saGateKeeperAddr;
  203. } TSPMSP_RegistrationRequestMessage;
  204. /*
  205. RASRegistrationEvent (TSP->MSP) // in encoded ASN.1 form
  206. - The event (URQ, DRQ, UCF, RCF)
  207. - The list of aliases that are affected by the event
  208. */
  209. typedef struct
  210. {
  211. } TSPMSP_RASEventMessage;
  212. /*
  213. RASLocationRequest (MSP->TSP) // in encoded ASN.1 form
  214. */
  215. typedef struct
  216. {
  217. } TSPMSP_LocationRequestMessage;
  218. /*
  219. RASLocationConfirm (TSP->MSP) // in encoded ASN.1 form
  220. */
  221. typedef struct
  222. {
  223. } TSPMSP_LocationConfirmMessage;
  224. /*
  225. RASBandwidthRequest (MSP->TSP) // in encoded ASN.1 form
  226. */
  227. typedef struct
  228. {
  229. } TSPMSP_BandwidthRequestMessage;
  230. /*
  231. RASBandwidthConfirm (TSP->MSP) // in encoded ASN.1 form
  232. */
  233. typedef struct
  234. {
  235. } TSPMSP_BandwidthConfirmMessage;
  236. typedef struct tag_TspMspMessage
  237. {
  238. TspMspMessageType MessageType;
  239. DWORD dwMessageSize; // total size of the block, including this
  240. // structure
  241. union
  242. {
  243. TSPMSP_InitiateCallMessage InitiateCallMessage;
  244. TSPMSP_PrepareToAnswerMessage PrepareToAnswerMessage;
  245. TSPMSP_ProceedWithAnswerMessage ProceedWithAnswerMessage;
  246. TSPMSP_ReadyToInitiateMessage ReadyToInitiateMessage;
  247. TSPMSP_ReadyToAnswerMessage ReadyToAnswerMessage;
  248. TSPMSP_FastConnectResponseMessage FastConnectResponseMessage;
  249. TSPMSP_StartH245Message StartH245Message;
  250. TSPMSP_H245PDUMessage H245PDUMessage;
  251. TSPMSP_MCLocationIdentifyMessage MCLocationIdentifyMessage;
  252. TSPMSP_HoldMessage HoldMessage;
  253. TSPMSP_H245HoldMessage H245HoldMessage;
  254. TSPMSP_ConferenceListMessage ConferenceListMessage;
  255. TSPMSP_SendDTMFDigitsMessage SendDTMFDigitsMessage;
  256. TSPMSP_LegacyDefaultAliasMessage LegacyDefaultAliasMessage;
  257. TSPMSP_RegistrationRequestMessage RegistrationRequestMessage;
  258. TSPMSP_RASEventMessage RASEventMessage;
  259. TSPMSP_LocationRequestMessage LocationRequestMessage;
  260. TSPMSP_LocationConfirmMessage LocationConfirmMessage;
  261. TSPMSP_BandwidthRequestMessage BandwidthRequestMessage;
  262. TSPMSP_BandwidthConfirmMessage BandwidthConfirmMessage;
  263. }MsgBody;
  264. DWORD dwEncodedASNSize;
  265. union
  266. {
  267. BYTE EncodedASN[1];
  268. WORD WideChars[1];
  269. }u;
  270. #define pEncodedASNBuf u.EncodedASN
  271. #define pWideChars u.WideChars
  272. }TspMspMessage, *PTspMspMessage;
  273. // The true total size of the message is:
  274. // sizeof(TspMspMessage) + (the size of variable parts, e.g. #of encoded ASN.1 bytes)
  275. // - 1 byte.
  276. #endif //__TSPMSPIF_H_