Source code of Windows XP (NT5)
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.

241 lines
3.0 KiB

  1. /*++
  2. Copyright (c) 1998-2001 Microsoft Corporation
  3. Module Name:
  4. conn.c
  5. Abstract:
  6. Dumps UL_CONNECTION and HTTP_CONNECTION structures.
  7. Author:
  8. Keith Moore (keithmo) 26-Jun-1998
  9. Environment:
  10. User Mode.
  11. Revision History:
  12. --*/
  13. #include "precomp.h"
  14. //
  15. // Public functions.
  16. //
  17. DECLARE_API( ulconn )
  18. /*++
  19. Routine Description:
  20. Dumps UL_CONNECTION structures.
  21. Arguments:
  22. None.
  23. Return Value:
  24. None.
  25. --*/
  26. {
  27. ULONG_PTR address = 0;
  28. ULONG result;
  29. UL_CONNECTION connection;
  30. SNAPSHOT_EXTENSION_DATA();
  31. //
  32. // Snag the address from the command line.
  33. //
  34. address = GetExpression( args );
  35. if (address == 0)
  36. {
  37. PrintUsage( "ulconn" );
  38. return;
  39. }
  40. //
  41. // Read the connection.
  42. //
  43. if (!ReadMemory(
  44. address,
  45. &connection,
  46. sizeof(connection),
  47. &result
  48. ))
  49. {
  50. dprintf(
  51. "ulconn: cannot read UL_CONNECTION @ %p\n",
  52. address
  53. );
  54. return;
  55. }
  56. //
  57. // Dump it.
  58. //
  59. DumpUlConnection(
  60. "",
  61. "ulconn: ",
  62. address,
  63. &connection
  64. );
  65. } // ulconn
  66. DECLARE_API( httpconn )
  67. /*++
  68. Routine Description:
  69. Dumps HTTP_CONNECTION structures.
  70. Arguments:
  71. None.
  72. Return Value:
  73. None.
  74. --*/
  75. {
  76. ULONG_PTR address = 0;
  77. ULONG result;
  78. UL_HTTP_CONNECTION connection;
  79. SNAPSHOT_EXTENSION_DATA();
  80. //
  81. // Snag the address from the command line.
  82. //
  83. address = GetExpression( args );
  84. if (address == 0)
  85. {
  86. PrintUsage( "httpconn" );
  87. return;
  88. }
  89. //
  90. // Read the connection.
  91. //
  92. if (!ReadMemory(
  93. address,
  94. &connection,
  95. sizeof(connection),
  96. &result
  97. ))
  98. {
  99. dprintf(
  100. "httpconn: cannot read HTTP_CONNECTION @ %p\n",
  101. address
  102. );
  103. return;
  104. }
  105. //
  106. // Dump it.
  107. //
  108. DumpHttpConnection(
  109. "",
  110. "httpconn: ",
  111. address,
  112. &connection
  113. );
  114. } // httpconn
  115. DECLARE_API( httpreq )
  116. /*++
  117. Routine Description:
  118. Dumps UL_INTERNAL_REQUEST structures.
  119. Arguments:
  120. None.
  121. Return Value:
  122. None.
  123. --*/
  124. {
  125. ULONG_PTR address = 0;
  126. ULONG result;
  127. UL_INTERNAL_REQUEST request;
  128. SNAPSHOT_EXTENSION_DATA();
  129. //
  130. // Snag the address from the command line.
  131. //
  132. address = GetExpression( args );
  133. if (address == 0)
  134. {
  135. PrintUsage( "httpreq" );
  136. return;
  137. }
  138. //
  139. // Read the connection.
  140. //
  141. if (!ReadMemory(
  142. address,
  143. &request,
  144. sizeof(request),
  145. &result
  146. ))
  147. {
  148. dprintf(
  149. "httpreq: cannot read HTTP_REQUEST @ %p\n",
  150. address
  151. );
  152. return;
  153. }
  154. //
  155. // Dump it.
  156. //
  157. DumpHttpRequest(
  158. "",
  159. "httpreq: ",
  160. address,
  161. &request
  162. );
  163. } // httpreq