Introduction
A snoop file is a packet capture written by snoop, the network capture
command of Sun’s Solaris, now Oracle Solaris. It does the same job as a
PCAP file from tcpdump: each packet is stored with
the time it was seen. The format is described in RFC 1761.
Captures taken on Solaris systems, and on some network equipment that adopted the format, are still met in this form. Wireshark reads them directly.
Structure
All values are big-endian. The file starts with a 16-byte
header: the identification pattern
snoop followed by three zero bytes, the version number, 2, and the data
link type, such as 4 for Ethernet.
Packet records follow. Each starts with a 24-byte header giving the packet’s original length, the number of bytes included, the total length of this record, the number of packets dropped so far, and the time in seconds and microseconds. The packet bytes follow, then padding; Solaris pads each record to a multiple of 4 bytes.
0File headersnoopand zeros, version, link type16 bytes16Packet record one per packetrepeated+0Record header original and included length, record length, drops, time24 bytes+24Packet data then paddingvaries
Not described
Known, not yet covered
- Viewer: the viewer reads the header and every record, and takes the packets apart with the same protocol dissectors as PCAP, for datalink types 0 and 4 (Ethernet), 2 (Token Ring) and 8 (FDDI). Packets of the other datalink types are listed as bytes by name: HDLC, the ATM and Fibre Channel types, loopback, Solaris’s private types. The Shomiti 16-byte trailer, the ATM pseudo-header and the Shomiti wireless pseudo-header are shown as padding or packet bytes, not as fields. Versions 3 to 5 are read as version 2. A record whose length is smaller than its header and data ends the walk, because the next record cannot be found; the bytes after it are shown unread.
Unknown
- Reference: the Shomiti wireless pseudo-header’s undecoded bytes
(
undecrypt,preamble,code,qual, and anything past the first 12 bytes) and the ATM direction bit’s meaning: Wireshark’s own comments leave them open (packet records).
Links
Software
- snoop – the packet capture command built into Oracle Solaris (Solaris)
- Wireshark and TShark – free network analyser that reads snoop files and converts them with editcap (Windows, macOS, Linux)
Reference
- RFC 1761 – Snoop Version 2 Packet Capture File Format