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.

162 lines
6.1 KiB

  1. /******************************************************************************
  2. *
  3. * INTEL Corporation Proprietary Information
  4. * Copyright (c) 1994, 1995, 1996 Intel Corporation.
  5. *
  6. * This listing is supplied under the terms of a license agreement
  7. * with INTEL Corporation and may not be used, copied, nor disclosed
  8. * except in accordance with the terms of that agreement.
  9. *
  10. *****************************************************************************/
  11. /******************************************************************************
  12. *
  13. * $Workfile: api_Debu.c $
  14. * $Revision: 1.4 $
  15. * $Modtime: 10 Jun 1996 12:36:08 $
  16. * $Log: S:/STURGEON/SRC/H245/SRC/VCS/api_Debu.c_v $
  17. *
  18. * Rev 1.4 10 Jun 1996 16:53:06 EHOWARDX
  19. * Eliminated #include "h245init.x"
  20. *
  21. * Rev 1.3 06 Jun 1996 18:51:14 EHOWARDX
  22. * Made tracker dump more aesthetically pleasing.
  23. *
  24. * Rev 1.2 28 May 1996 14:25:36 EHOWARDX
  25. * Tel Aviv update.
  26. *
  27. * Rev 1.1 20 May 1996 14:34:42 EHOWARDX
  28. * Got rid of asynchronous H245EndConnection/H245ShutDown stuff...
  29. *
  30. * Rev 1.0 09 May 1996 21:06:06 EHOWARDX
  31. * Initial revision.
  32. *
  33. * Rev 1.7 09 May 1996 19:30:24 EHOWARDX
  34. * Redesigned thread locking logic.
  35. * Added new API functions.
  36. *
  37. * Rev 1.6 02 Apr 1996 10:14:08 cjutzi
  38. * - changed tracker structure
  39. *
  40. * Rev 1.5 11 Mar 1996 14:28:48 cjutzi
  41. *
  42. * - removed oil debug include
  43. * d
  44. *
  45. * Rev 1.4 06 Mar 1996 12:33:46 cjutzi
  46. * - renamed API_MUX_T to API_SEND_MUX_T
  47. *
  48. * Rev 1.3 16 Feb 1996 13:00:30 cjutzi
  49. *
  50. * - added tracker dumper
  51. *
  52. * Rev 1.2 15 Feb 1996 15:42:52 cjutzi
  53. *
  54. * - std.h and wtypes.h modified.. al'a Loren..
  55. *
  56. * Rev 1.1 09 Feb 1996 16:58:08 cjutzi
  57. *
  58. * - cleanup.. and some fixes..
  59. * - added and or changed headers to reflect the log of changes
  60. * $Ident$
  61. *
  62. *****************************************************************************/
  63. #ifndef STRICT
  64. #define STRICT
  65. #endif
  66. #include "precomp.h"
  67. /***********************/
  68. /* H245 INCLUDES */
  69. /***********************/
  70. #include "h245api.h"
  71. #include "h245com.h"
  72. #include "h245sys.x"
  73. /*****************************************************************************
  74. *
  75. * TYPE: GLOBAL
  76. *
  77. * PROCEDURE: dump_tracker
  78. *
  79. * DESCRIPTION:
  80. *
  81. * RETURN:
  82. *
  83. *****************************************************************************/
  84. void
  85. dump_tracker(struct InstanceStruct *pInstance)
  86. {
  87. register Tracker_T *p_tracker;
  88. register char *p_str;
  89. ASSERT (pInstance != NULL);
  90. H245TRACE(pInstance->dwInst, 0, "************ TRACKER DUMP START ********");
  91. for (p_tracker = pInstance->API.pTracker; p_tracker; p_tracker = p_tracker->p_next)
  92. {
  93. if (p_tracker != pInstance->API.pTracker)
  94. H245TRACE(pInstance->dwInst, 0, "");
  95. H245TRACE(pInstance->dwInst, 0, "TransId %04d(0x%04x)",p_tracker->TransId,p_tracker->TransId);
  96. switch (p_tracker->TrackerType)
  97. {
  98. case API_TERMCAP_T: p_str="API_TERMCAP_T"; break;
  99. case API_OPEN_CHANNEL_T: p_str="API_OPEN_CHANNEL_T"; break;
  100. case API_CLOSE_CHANNEL_T: p_str="API_CLOSE_CHANNEL_T";break;
  101. case API_MSTSLV_T: p_str="API_MSTSLV_T"; break;
  102. case API_SEND_MUX_T: p_str="API_SEND_MUX_T"; break;
  103. case API_RECV_MUX_T: p_str="API_RECV_MUX_T"; break;
  104. default: p_str="<<UNKNOWN>>"; break;
  105. }
  106. H245TRACE(pInstance->dwInst, 0, "Tracker Type %s",p_str);
  107. switch (p_tracker->State)
  108. {
  109. case API_ST_WAIT_RMTACK: p_str="API_ST_WAIT_RMTACK"; break;
  110. case API_ST_WAIT_LCLACK: p_str="API_ST_WAIT_LCLACK"; break;
  111. case API_ST_WAIT_LCLACK_CANCEL: p_str="API_ST_WAIT_LCLACK_CANCEL"; break;
  112. case API_ST_WAIT_CONF: p_str="API_ST_WAIT_CONF"; break;
  113. case API_ST_IDLE: p_str="API_ST_IDLE"; break;
  114. default: p_str="<<UNKNOWN>>"; break;
  115. }
  116. H245TRACE(pInstance->dwInst, 0, "Tracker State %s",p_str);
  117. if (p_tracker->TrackerType == API_OPEN_CHANNEL_T ||
  118. p_tracker->TrackerType == API_CLOSE_CHANNEL_T)
  119. {
  120. switch (p_tracker->u.Channel.ChannelAlloc)
  121. {
  122. case API_CH_ALLOC_UNDEF: p_str="API_CH_ALLOC_UNDEF"; break;
  123. case API_CH_ALLOC_LCL: p_str="API_CH_ALLOC_LCL"; break;
  124. case API_CH_ALLOC_RMT: p_str="API_CH_ALLOC_RMT"; break;
  125. default: p_str="<<UNKNOWN>>"; break;
  126. }
  127. H245TRACE(pInstance->dwInst, 0, "Channel Alloc %s",p_str);
  128. switch (p_tracker->u.Channel.ChannelType)
  129. {
  130. case API_CH_TYPE_UNDEF: p_str="API_CH_TYPE_UNDEF"; break;
  131. case API_CH_TYPE_UNI: p_str="API_CH_TYPE_UNI"; break;
  132. case API_CH_TYPE_BI: p_str="API_CH_TYPE_BI"; break;
  133. default: p_str="<<UNKNOWN>>"; break;
  134. }
  135. H245TRACE(pInstance->dwInst, 0, "Channel Type %s",p_str);
  136. if (p_tracker->u.Channel.RxChannel == H245_INVALID_CHANNEL)
  137. H245TRACE(pInstance->dwInst, 0, "Channel Rx H245_INVALID_CHANNEL");
  138. else
  139. H245TRACE(pInstance->dwInst, 0, "Channel Rx %d",p_tracker->u.Channel.RxChannel);
  140. if (p_tracker->u.Channel.TxChannel == H245_INVALID_CHANNEL)
  141. H245TRACE(pInstance->dwInst, 0, "Channel Tx H245_INVALID_CHANNEL");
  142. else
  143. H245TRACE(pInstance->dwInst, 0, "Channel Tx %d",p_tracker->u.Channel.TxChannel);
  144. }
  145. else if (p_tracker->TrackerType == API_SEND_MUX_T ||
  146. p_tracker->TrackerType == API_RECV_MUX_T)
  147. {
  148. H245TRACE(pInstance->dwInst, 0, "MuxEntryCount %d",p_tracker->u.MuxEntryCount);
  149. }
  150. }
  151. H245TRACE(pInstance->dwInst, 0, "************ TRACKER DUMP END **********");
  152. }