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.

336 lines
4.6 KiB

  1. /*++
  2. Copyright (c) 1998 Microsoft Corporation
  3. Module Name:
  4. tcpipx.h
  5. Abstract:
  6. Contains definitions for TCP/IP dumping library.
  7. Author:
  8. Scott Holden (sholden) 4/24/1999
  9. Revision History:
  10. --*/
  11. #include "tdint.h"
  12. #include "tcp.h"
  13. #include "tcpconn.h"
  14. #include "addr.h"
  15. #include "udp.h"
  16. #include "raw.h"
  17. #include "winsock.h"
  18. #include "tcb.h"
  19. #include "tcpsend.h"
  20. #include "tcprcv.h"
  21. #include "tcpdump.h"
  22. #ifndef _TCPIPX_H_
  23. #define _TCPIPX_H_
  24. //
  25. // Verbosity level of dumping. Three levels. Typically MIN and MAX will be
  26. // supported and MED will default to MIN when not supported.
  27. //
  28. typedef enum _VERBOSITY_LEVEL
  29. {
  30. VERB_MIN = 0, // One-liner.
  31. VERB_MED,
  32. VERB_MAX // Full structure dump.
  33. } VERB;
  34. BOOL
  35. InitTcpipx();
  36. // Helper dump functions.
  37. BOOL
  38. DumpCTEEvent(
  39. CTEEvent *pCe
  40. );
  41. BOOL
  42. DumpCTETimer(
  43. CTETimer *pCt
  44. );
  45. BOOL
  46. DumpCTEBlockStruc(
  47. CTEBlockStruc *pCbs
  48. );
  49. BOOL
  50. DumpWORK_QUEUE_ITEM(
  51. WORK_QUEUE_ITEM *pWqi
  52. );
  53. BOOL
  54. DumpSHARE_ACCESS(
  55. SHARE_ACCESS *pSa
  56. );
  57. BOOL
  58. DumpKEVENT(
  59. KEVENT *pKe
  60. );
  61. BOOL
  62. DumpNDIS_STRING(
  63. NDIS_STRING *pNs
  64. );
  65. // Real dump functions.
  66. BOOL
  67. DumpTCB(
  68. TCB *pTcb,
  69. ULONG_PTR TcbAddr,
  70. VERB verb
  71. );
  72. BOOL
  73. DumpTWTCB(
  74. TWTCB *pTwtcb,
  75. ULONG_PTR TwtcbAddr,
  76. VERB verb
  77. );
  78. BOOL
  79. DumpAddrObj(
  80. AddrObj *pAo,
  81. ULONG_PTR AddrObjAddr,
  82. VERB verb
  83. );
  84. BOOL
  85. DumpNetTableEntry(
  86. NetTableEntry *pNte,
  87. ULONG_PTR NteAddr,
  88. VERB verb
  89. );
  90. BOOL
  91. DumpTCPRcvReq(
  92. TCPRcvReq *pRr,
  93. ULONG_PTR RrAddr,
  94. VERB verb
  95. );
  96. BOOL
  97. DumpTCPSendReq(
  98. TCPSendReq *pSr,
  99. ULONG_PTR SrAddr,
  100. VERB verb
  101. );
  102. BOOL
  103. DumpTCPReq(
  104. TCPReq *pReq,
  105. ULONG_PTR ReqAddr,
  106. VERB verb
  107. );
  108. BOOL
  109. DumpSendCmpltContext(
  110. SendCmpltContext *pScc,
  111. ULONG_PTR SccAddr,
  112. VERB verb
  113. );
  114. BOOL
  115. DumpTCPRAHdr(
  116. TCPRAHdr *pTrh,
  117. ULONG_PTR TrhAddr,
  118. VERB verb
  119. );
  120. BOOL
  121. DumpDGRcvReq(
  122. DGRcvReq *pDrr,
  123. ULONG_PTR DrrAddr,
  124. VERB verb
  125. );
  126. BOOL
  127. DumpDGSendReq(
  128. DGSendReq *pDsr,
  129. ULONG_PTR DsrAddr,
  130. VERB verb
  131. );
  132. BOOL
  133. DumpTCPConn(
  134. TCPConn *pTc,
  135. ULONG_PTR TcAddr,
  136. VERB verb
  137. );
  138. BOOL
  139. DumpTCPConnBlock(
  140. TCPConnBlock *pCb,
  141. ULONG_PTR CbAddr,
  142. VERB verb
  143. );
  144. BOOL
  145. DumpFILE_OBJECT(
  146. FILE_OBJECT *pFo,
  147. ULONG_PTR FoAddr,
  148. VERB verb
  149. );
  150. BOOL
  151. DumpIPInfo(
  152. IPInfo *pIpi,
  153. ULONG_PTR IpiAddr,
  154. VERB verb
  155. );
  156. BOOL
  157. DumpPacketContext(
  158. PacketContext *pPc,
  159. ULONG_PTR PcAddr,
  160. VERB verb
  161. );
  162. BOOL
  163. DumpARPInterface(
  164. ARPInterface *pAi,
  165. ULONG_PTR AiAddr,
  166. VERB verb
  167. );
  168. BOOL
  169. DumpRouteCacheEntry(
  170. RouteCacheEntry *pRce,
  171. ULONG_PTR RceAddr,
  172. VERB verb
  173. );
  174. BOOL
  175. DumpIPHeader(
  176. IPHeader *pIph,
  177. ULONG_PTR IphAddr,
  178. VERB verb
  179. );
  180. BOOL
  181. DumpARPIPAddr(
  182. ARPIPAddr *pAia,
  183. ULONG_PTR AiaAddr,
  184. VERB verb
  185. );
  186. BOOL
  187. DumpARPTableEntry(
  188. ARPTableEntry *pAte,
  189. ULONG_PTR AteAddr,
  190. VERB verb
  191. );
  192. BOOL
  193. DumpRouteTableEntry(
  194. RouteTableEntry *pRte,
  195. ULONG_PTR RteAddr,
  196. VERB verb
  197. );
  198. BOOL
  199. DumpLinkEntry(
  200. LinkEntry *pLink,
  201. ULONG_PTR LinkAddr,
  202. VERB verb
  203. );
  204. BOOL
  205. DumpInterface(
  206. Interface *pIf,
  207. ULONG_PTR IfAddr,
  208. VERB verb
  209. );
  210. BOOL
  211. DumpIPOptInfo(
  212. IPOptInfo *pIoi,
  213. ULONG_PTR IoiAddr,
  214. VERB verb
  215. );
  216. BOOL
  217. DumpUDPHeader(
  218. UDPHeader *pUdp,
  219. ULONG_PTR UdpAddr,
  220. VERB verb
  221. );
  222. BOOL
  223. DumpTCPHeader(
  224. TCPHeader *pTcp,
  225. ULONG_PTR TcpAddr,
  226. VERB verb
  227. );
  228. BOOL
  229. DumpTCP_CONTEXT(
  230. TCP_CONTEXT *pTc,
  231. ULONG_PTR TcAddr,
  232. VERB verb
  233. );
  234. BOOL
  235. DumpTCP_CONTEXT_typed(
  236. TCP_CONTEXT *pTc,
  237. ULONG_PTR TcAddr,
  238. VERB verb,
  239. ULONG FsContext2
  240. );
  241. BOOL
  242. DumpMDL(
  243. MDL *pMdl,
  244. ULONG_PTR MdlAddr,
  245. VERB verb
  246. );
  247. BOOL
  248. DumpICMPHeader(
  249. ICMPHeader *pIch,
  250. ULONG_PTR IchAddr,
  251. VERB verb
  252. );
  253. BOOL
  254. DumpLLIPBindInfo(
  255. LLIPBindInfo *pLip,
  256. ULONG_PTR LipAddr,
  257. VERB verb
  258. );
  259. BOOL
  260. DumpARPHeader(
  261. ARPHeader *pAh,
  262. ULONG_PTR AhAddr,
  263. VERB verb
  264. );
  265. BOOL
  266. DumpNPAGED_LOOKASIDE_LIST(
  267. PNPAGED_LOOKASIDE_LIST pPpl,
  268. ULONG_PTR PplAddr,
  269. VERB verb
  270. );
  271. BOOL
  272. DumpNDIS_PACKET(
  273. PNDIS_PACKET pPacket,
  274. ULONG_PTR PacketAddr,
  275. VERB Verb
  276. );
  277. #endif // _TCPIPX_H_