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.

208 lines
7.1 KiB

  1. /*-------------------------------------------------------------------------
  2. // File : RRCM.H
  3. //
  4. // RRCM's include files .
  5. //
  6. // INTEL Corporation Proprietary Information
  7. // This listing is supplied under the terms of a license agreement with
  8. // Intel Corporation and may not be copied nor disclosed except in
  9. // accordance with the terms of that agreement.
  10. // Copyright (c) 1995 Intel Corporation.
  11. //-----------------------------------------------------------------------*/
  12. #ifndef __RRCM_H_
  13. #define __RRCM_H_
  14. #define INCL_WINSOCK_API_TYPEDEFS 1
  15. #include <windows.h>
  16. //#include <wsw.h>
  17. #include <winsock2.h>
  18. #include <stdio.h>
  19. #include <io.h>
  20. #include <string.h>
  21. #include <stdlib.h>
  22. #include <time.h>
  23. #include <math.h>
  24. #include <process.h>
  25. #include <mmsystem.h>
  26. //#include <assert.h>
  27. #include <confdbg.h>
  28. #if (defined(_DEBUG) || defined(PCS_COMPLIANCE))
  29. //INTEROP
  30. #include "interop.h"
  31. #include "rtpplog.h"
  32. #endif
  33. typedef CHAR *PCHAR;
  34. //#define ENABLE_ISDM2
  35. #ifdef ENABLE_ISDM2
  36. #include "isdmapi2.h"
  37. #endif
  38. #include "rrcm_dll.h"
  39. #include "rrcmdata.h"
  40. #include "rrcmprot.h"
  41. #include "rtp.h"
  42. #include "isrg.h"
  43. //----------------------------------------------------------------------------
  44. // RTP/RTCP: Registry information under:
  45. // HKEY_LOCAL_MACHINE\SOFTWARE\INTEL\RRCM
  46. //----------------------------------------------------------------------------
  47. #define szRegRRCMSubKey TEXT("RRCM")
  48. #define szRegRRCMSubKeyIntel TEXT("iRRCM")
  49. #define szRegRRCMKey TEXT("SOFTWARE\\Microsoft\\Conferencing\\")
  50. #define szRegRRCMWsLib TEXT("WsLib")
  51. #define szRegRRCMNumSessions TEXT("NumSessions")
  52. #define szRegRRCMNumFreeSSRC TEXT("NumFreeSSRC")
  53. #define szRegRRCMNumRTCPPostedBfr TEXT("NumRTCPPostedBfr")
  54. #define szRegRRCMRTCPrcvBfrSize TEXT("RTCPrcvBfrSize")
  55. //----------------------------------------------------------------------------
  56. // RTP/RTCP: Dynamically loaded DLL
  57. //----------------------------------------------------------------------------
  58. #ifdef ENABLE_ISDM2
  59. #define szISDMdll TEXT("ISDM2")
  60. #endif
  61. #define szRRCMdefaultLib TEXT("ws2_32")
  62. #ifdef ENABLE_ISDM2
  63. //----------------------------------------------------------------------------
  64. // RTP/RTCP: ISDM module
  65. //----------------------------------------------------------------------------
  66. #define szSSRCtoken TEXT("SSRC")
  67. #define szPcktSentToken TEXT("Number of packets send")
  68. #define szByteSentToken TEXT("Number of bytes send")
  69. #define szPcktRcvdToken TEXT("Number of packets received")
  70. #define szByteRcvdToken TEXT("Number of bytes received")
  71. #define szFractionLostToken TEXT("Fraction lost")
  72. #define szCumNumPcktLostToken TEXT("Cumulative number of packets lost")
  73. #define szXntHighSeqNumToken TEXT("Extended highest sequence number")
  74. #define szInterarrivalJitterToken TEXT("Interarrival jitter")
  75. #define szLastSRtoken TEXT("Last sender report")
  76. #define szDSLRtoken TEXT("Delay since last sender report")
  77. #define szNTPfracToken TEXT("NTP fraction")
  78. #define szNTPsecToken TEXT("NTP seconds")
  79. #define szWhoAmItoken TEXT("Who Am I")
  80. #define szFdbkFractionLostToken TEXT("Fraction lost feedback")
  81. #define szFdbkCumNumPcktLostToken \
  82. TEXT("Cumulative number of packets lost feedback")
  83. #define szFdbkLastSRtoken TEXT("Last sender report feedback")
  84. #define szFdbkDSLRtoken \
  85. TEXT("Delay since last sender report feedback")
  86. #define szFdbkInterarrivalJitterToken TEXT("Interarrival jitter feedback")
  87. #endif
  88. //----------------------------------------------------------------------------
  89. // RTP: Bitmaps used to isolate errors detected for incoming received packets
  90. //----------------------------------------------------------------------------
  91. #define SSRC_LOOP_DETECTED (1)
  92. #define SSRC_COLLISION_DETECTED (2)
  93. #define INVALID_RTP_HEADER (3)
  94. #define MCAST_LOOPBACK_NOT_OFF (4)
  95. #define RTP_RUNT_PACKET (5)
  96. //----------------------------------------------------------------------------
  97. // RTP: Default number of RTP sessions
  98. //----------------------------------------------------------------------------
  99. #define NUM_RRCM_SESS 50
  100. #define MIN_NUM_RRCM_SESS 5
  101. #define MAX_NUM_RRCM_SESS 100
  102. //----------------------------------------------------------------------------
  103. // RTP: Number of entries in the hash table
  104. //----------------------------------------------------------------------------
  105. #define NUM_RTP_HASH_SESS 65
  106. //----------------------------------------------------------------------------
  107. // RTP: DEFINES TO DETERMINE SEQUENCE NUMBER WRAP or STALENESS (per RFC)
  108. //----------------------------------------------------------------------------
  109. #define MAX_DROPOUT 3000
  110. #define MAX_MISORDER 100
  111. #define MIN_SEQUENTIAL 2
  112. //----------------------------------------------------------------------------
  113. // RTCP: Defined
  114. //----------------------------------------------------------------------------
  115. #define MAX_RR_ENTRIES 31 // Max # of Receiver Reports
  116. #define TIMEOUT_CHK_FREQ 30000 // Timeout check freq. - 30s
  117. #define RTCP_TIME_OUT_MINUTES 30 // 30 minutes timeout
  118. #define RTCP_XMT_MINTIME 2500
  119. #define RTCP_TIMEOUT_WITHIN_RANGE 100
  120. #define ONE_K 1024
  121. #define NUM_FREE_SSRC 100
  122. #define MIN_NUM_FREE_SSRC 5
  123. #define MAX_NUM_FREE_SSRC 500
  124. #define NUM_FREE_CONTEXT_CELLS 100
  125. #define MAXNUM_CONTEXT_CELLS_REALLOC 10
  126. #define NUM_FREE_RCV_BFR 8
  127. #define NUM_FREE_XMT_BFR 2
  128. #define NUM_RCV_BFR_POSTED 4
  129. #define MIN_NUM_RCV_BFR_POSTED 1
  130. #define MAX_NUM_RCV_BFR_POSTED 8
  131. #define RRCM_RCV_BFR_SIZE (8*ONE_K)
  132. #define MIN_RRCM_RCV_BFR_SIZE (1*ONE_K)
  133. #define MAX_RRCM_RCV_BFR_SIZE (8*ONE_K)
  134. #define RRCM_XMT_BFR_SIZE (8*ONE_K)
  135. #define RCV_BFR_LIST_HEAP_SIZE (4*ONE_K) // Rcv bfr list heap size
  136. #define XMT_BFR_LIST_HEAP_SIZE (4*ONE_K) // Xmt bfr list heap size
  137. #define INITIAL_RTCP_BANDWIDTH 50 // BW in bytes/sec (~ G.723)
  138. // 5% of 6.3Kb/s = 35 bytes
  139. #define MAX_STREAMS_PER_SESSION 64 // Max number of active
  140. // streams per RTP session
  141. #define MAX_NUM_SDES 9 // Number of SDES support
  142. //----------------------------------------------------------------------------
  143. // RTP/RTCP Misc defined
  144. //----------------------------------------------------------------------------
  145. #define UNKNOWN_PAYLOAD_TYPE 0xFFFFFFFF
  146. #define szDfltCname TEXT("No Cname")
  147. //----------------------------------------------------------------------------
  148. // RTP/RTCP: Debug Defined
  149. //----------------------------------------------------------------------------
  150. #define DBG_STRING_LEN 200
  151. #define IO_CHECK 0
  152. #define FLUSH_RTP_PAYLOAD_TYPE 90
  153. enum ISRBDG_CODE{
  154. DBG_NOTIFY = 1,
  155. DBG_CRITICAL,
  156. DBG_ERROR,
  157. DBG_WARNING,
  158. DBG_TRACE,
  159. DBG_TEMP
  160. };
  161. #ifdef _DEBUG
  162. //#define ASSERT(x) assert(x) // defined in confdbg.h
  163. #define RRCM_DBG_MSG(x,e,f,l,t) RRCMdebugMsg(x,e,f,l,t)
  164. #else
  165. //#define ASSERT(x) defined in confdbg.h
  166. #define RRCM_DBG_MSG(x,e,f,l,t) {} // DO NOT DELETE BRACKETS ...
  167. #endif
  168. #ifdef IN_OUT_CHK
  169. #define IN_OUT_STR(x) OutputDebugString (x);
  170. #else
  171. #define IN_OUT_STR(x)
  172. #endif
  173. #endif /* __RRCM_H_ */