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.

198 lines
6.6 KiB

  1. /****************************************************************************
  2. *
  3. * $Archive: S:/STURGEON/SRC/INCLUDE/VCS/incommon.h_v $
  4. *
  5. * INTEL Corporation Prorietary Information
  6. *
  7. * This listing is supplied under the terms of a license agreement
  8. * with INTEL Corporation and may not be copied nor disclosed except
  9. * in accordance with the terms of that agreement.
  10. *
  11. * Copyright (c) 1996 Intel Corporation.
  12. *
  13. * $Revision: 1.41 $
  14. * $Date: 12 Feb 1997 09:34:42 $
  15. * $Author: MANDREWS $
  16. *
  17. * Deliverable: INCOMMON.H
  18. *
  19. * Abstract: commonly used structures
  20. *
  21. *
  22. * Notes:
  23. *
  24. ***************************************************************************/
  25. #ifndef INCOMMON_H
  26. #define INCOMMON_H
  27. #pragma pack(push,8)
  28. #define CC_INVALID_HANDLE 0
  29. // CCRC_CALL_REJECTED reason codes (includes cause values)
  30. #define CC_REJECT_NO_BANDWIDTH 1
  31. #define CC_REJECT_GATEKEEPER_RESOURCES 2
  32. #define CC_REJECT_UNREACHABLE_DESTINATION 3
  33. #define CC_REJECT_DESTINATION_REJECTION 4
  34. #define CC_REJECT_INVALID_REVISION 5
  35. #define CC_REJECT_NO_PERMISSION 6
  36. #define CC_REJECT_UNREACHABLE_GATEKEEPER 7
  37. #define CC_REJECT_GATEWAY_RESOURCES 8
  38. #define CC_REJECT_BAD_FORMAT_ADDRESS 9
  39. #define CC_REJECT_ADAPTIVE_BUSY 10
  40. #define CC_REJECT_IN_CONF 11
  41. #define CC_REJECT_ROUTE_TO_GATEKEEPER 12
  42. #define CC_REJECT_CALL_FORWARDED 13
  43. #define CC_REJECT_ROUTE_TO_MC 14
  44. #define CC_REJECT_UNDEFINED_REASON 15
  45. #define CC_REJECT_INTERNAL_ERROR 16 // Internal error occured in peer CS stack.
  46. #define CC_REJECT_NORMAL_CALL_CLEARING 17 // Normal call hangup
  47. #define CC_REJECT_USER_BUSY 18 // User is busy with another call
  48. #define CC_REJECT_NO_ANSWER 19 // Callee does not answer
  49. #define CC_REJECT_NOT_IMPLEMENTED 20 // Service has not been implemented
  50. #define CC_REJECT_MANDATORY_IE_MISSING 21 // Pdu missing mandatory ie
  51. #define CC_REJECT_INVALID_IE_CONTENTS 22 // Pdu ie was incorrect
  52. #define CC_REJECT_TIMER_EXPIRED 23 // Own timer expired
  53. #define CC_REJECT_CALL_DEFLECTION 24 // You deflected the call, so lets quit.
  54. #define CC_REJECT_GATEKEEPER_TERMINATED 25 // Gatekeeper terminated call
  55. // Q931 call types
  56. #define CC_CALLTYPE_UNKNOWN 0
  57. #define CC_CALLTYPE_PT_PT 1
  58. #define CC_CALLTYPE_1_N 2
  59. #define CC_CALLTYPE_N_1 3
  60. #define CC_CALLTYPE_N_N 4
  61. // alias contants
  62. #define CC_ALIAS_MAX_H323_ID 256
  63. #define CC_ALIAS_MAX_H323_PHONE 128
  64. // unicode character mask contants
  65. #define CC_ALIAS_H323_PHONE_CHARS L"0123456789#*,"
  66. #define CC_ODOTTO_CHARS L".0123456789"
  67. // alias type codes
  68. #define CC_ALIAS_H323_ID 1 // Return call information.
  69. #define CC_ALIAS_H323_PHONE 2 // H323 Phone Number.
  70. // default port id's
  71. #define CC_H323_GATE_DISC 1718 // Gatekeeper IP Discovery Port
  72. #define CC_H323_GATE_STAT 1719 // Gatekeeper UDP Reg. and Status Port
  73. #define CC_H323_HOST_CALL 1720 // Endpoint TCP Call Signalling Por
  74. // Call creation goals
  75. #define CC_GOAL_UNKNOWN 0
  76. #define CC_GOAL_CREATE 1
  77. #define CC_GOAL_JOIN 2
  78. #define CC_GOAL_INVITE 3
  79. // H245 non-standard message types
  80. #define CC_H245_MESSAGE_REQUEST 0
  81. #define CC_H245_MESSAGE_RESPONSE 1
  82. #define CC_H245_MESSAGE_COMMAND 2
  83. #define CC_H245_MESSAGE_INDICATION 3
  84. // Call Control handle typedefs
  85. typedef DWORD CC_HLISTEN, *PCC_HLISTEN;
  86. typedef DWORD CC_HCONFERENCE, *PCC_HCONFERENCE;
  87. typedef DWORD CC_HCALL, *PCC_HCALL;
  88. typedef DWORD CC_HCHANNEL, *PCC_HCHANNEL;
  89. // IP address in domain name format
  90. typedef struct
  91. {
  92. WORD wPort; // UDP or TCP port (host byte order)
  93. WCHAR cAddr[255]; // UNICODE zstring
  94. } CC_IP_DomainName_t;
  95. // IP address in conventional �dot� notation
  96. typedef struct
  97. {
  98. WORD wPort; // UDP or TCP port (host byte order)
  99. WCHAR cAddr[16]; // UNICODE zstring
  100. } CC_IP_Dot_t;
  101. // IP address in binary format
  102. typedef struct
  103. {
  104. WORD wPort; // UDP or TCP port (host byte order)
  105. DWORD dwAddr; // binary address (host byte order)
  106. } CC_IP_Binary_t;
  107. typedef enum
  108. {
  109. CC_IP_DOMAIN_NAME,
  110. CC_IP_DOT,
  111. CC_IP_BINARY
  112. } CC_ADDRTYPE;
  113. typedef struct _ADDR
  114. {
  115. CC_ADDRTYPE nAddrType;
  116. BOOL bMulticast;
  117. union
  118. {
  119. CC_IP_DomainName_t IP_DomainName;
  120. CC_IP_Dot_t IP_Dot;
  121. CC_IP_Binary_t IP_Binary;
  122. } Addr;
  123. } CC_ADDR, *PCC_ADDR;
  124. typedef struct
  125. {
  126. BYTE *pOctetString;
  127. WORD wOctetStringLength;
  128. } CC_OCTETSTRING, *PCC_OCTETSTRING;
  129. typedef struct
  130. {
  131. CC_OCTETSTRING sData; // pointer to Octet data.
  132. BYTE bCountryCode;
  133. BYTE bExtension;
  134. WORD wManufacturerCode;
  135. } CC_NONSTANDARDDATA, *PCC_NONSTANDARDDATA;
  136. #define CC_MAX_PRODUCT_LENGTH 256
  137. #define CC_MAX_VERSION_LENGTH 256
  138. #define CC_MAX_DISPLAY_LENGTH 82
  139. typedef struct
  140. {
  141. BYTE bCountryCode;
  142. BYTE bExtension;
  143. WORD wManufacturerCode;
  144. PCC_OCTETSTRING pProductNumber;
  145. PCC_OCTETSTRING pVersionNumber;
  146. } CC_VENDORINFO, *PCC_VENDORINFO;
  147. typedef struct
  148. {
  149. PCC_VENDORINFO pVendorInfo;
  150. BOOL bIsTerminal;
  151. BOOL bIsGateway; // for now, the H323 capability will be hard-coded.
  152. } CC_ENDPOINTTYPE, *PCC_ENDPOINTTYPE;
  153. typedef struct
  154. {
  155. WORD wType;
  156. WORD wPrefixLength;
  157. LPWSTR pPrefix;
  158. WORD wDataLength; // UNICODE character count
  159. LPWSTR pData; // UNICODE data.
  160. } CC_ALIASITEM, *PCC_ALIASITEM;
  161. typedef struct
  162. {
  163. WORD wCount;
  164. PCC_ALIASITEM pItems;
  165. } CC_ALIASNAMES, *PCC_ALIASNAMES;
  166. typedef struct _CONFERENCE_ID
  167. {
  168. BYTE buffer[16]; // This is OCTET data, not ASCII.
  169. } CC_CONFERENCEID, *PCC_CONFERENCEID;
  170. #pragma pack(pop)
  171. #endif INCOMMON_H