LINKTYPE_NULL

Packet structure for BSD loopback encapsulation

+---------------------------+
|       Protocol type       |
|         (4 Octets)        |
+---------------------------+
|           Payload         |
.                           .
.                           .
.                           .

Description

The protocol type field is in the host byte order of the machine on which the capture was done. The values for that field are:

  • 2 - payload is an IPv4 packet;
  • 24 - payload is an IPv6 packet;
  • 28 - payload is an IPv6 packet;
  • 30 - payload is an IPv6 packet;
  • 7 - payload is an OSI packet;
  • 23 - payload is an IPX packet.

All of the IPv6 values correspond to IPv6 packets; code reading files should check for all of them.

Note that ``host byte order'' is the byte order of the machine on that the packets are captured; if a live capture is being done, ``host byte order'' is the byte order of the machine capturing the packets, but if a ``savefile'' is being read, the byte order is not necessarily that of the machine reading the capture file.