sniffer 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. #------------------------------------------------------------------------------
  2. # sniffer: file(1) magic for packet captured files
  3. #
  4. # From: guy@netapp.com (Guy Harris)
  5. #
  6. # Microsoft NetMon (packet capture/display program) capture files.
  7. #
  8. 0 string RTSS NetMon capture file
  9. >4 byte x - version %d
  10. >5 byte x \b.%d
  11. >6 leshort 0 (Unknown)
  12. >6 leshort 1 (Ethernet)
  13. >6 leshort 2 (Token Ring)
  14. >6 leshort 3 (FDDI)
  15. #
  16. # Network General Sniffer capture files.
  17. #
  18. 0 string TRSNIFF\ data\ \ \ \ \032 Sniffer capture file
  19. >23 leshort x - version %d
  20. >25 leshort x \b.%d
  21. >33 byte x (Format %d,
  22. >32 byte 0 Token ring)
  23. >32 byte 1 Ethernet)
  24. >32 byte 2 ARCNET)
  25. >32 byte 3 StarLAN)
  26. >32 byte 4 PC Network broadband)
  27. >32 byte 5 LocalTalk)
  28. >32 byte 6 Znet)
  29. #
  30. # Cinco Networks NetXRay capture files.
  31. #
  32. 0 string XCP\0 NetXRay capture file
  33. >4 string >\0 - version %s
  34. #
  35. # "libpcap" capture files.
  36. # (We call them "tcpdump capture file(s)" for now, as "tcpdump" is
  37. # the main program that uses that format, but there's also "tcpview",
  38. # and there may be others in the future.)
  39. #
  40. 0 ubelong 0xa1b2c3d4 tcpdump capture file (big-endian)
  41. >4 beshort x - version %d
  42. >6 beshort x \b.%d
  43. >20 belong 0 (No link-layer encapsulation
  44. >20 belong 1 (Ethernet
  45. >20 belong 2 (3Mb Ethernet
  46. >20 belong 3 (AX.25
  47. >20 belong 4 (ProNET
  48. >20 belong 5 (CHAOS
  49. >20 belong 6 (IEEE 802.x network
  50. >20 belong 7 (ARCNET
  51. >20 belong 8 (SLIP
  52. >20 belong 9 (PPP
  53. >20 belong 10 (FDDI
  54. >20 belong 11 (RFC 1483 ATM
  55. >20 belong 12 (raw IP
  56. >20 belong 13 (BSD/OS SLIP
  57. >20 belong 14 (BSD/OS PPP
  58. >16 belong x \b, capture length %d)
  59. 0 ulelong 0xa1b2c3d4 tcpdump capture file (little-endian)
  60. >4 leshort x - version %d
  61. >6 leshort x \b.%d
  62. >20 lelong 0 (No link-layer encapsulation
  63. >20 lelong 1 (Ethernet
  64. >20 lelong 2 (3Mb Ethernet
  65. >20 lelong 3 (AX.25
  66. >20 lelong 4 (ProNET
  67. >20 lelong 5 (CHAOS
  68. >20 lelong 6 (IEEE 802.x network
  69. >20 lelong 7 (ARCNET
  70. >20 lelong 8 (SLIP
  71. >20 lelong 9 (PPP
  72. >20 lelong 10 (FDDI
  73. >20 lelong 11 (RFC 1483 ATM
  74. >20 lelong 12 (raw IP
  75. >20 lelong 13 (BSD/OS SLIP
  76. >20 lelong 14 (BSD/OS PPP
  77. >16 lelong x \b, capture length %d)