sniffer 2.4 KB

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