The values stored in the link-layer header type field in the savefile header are, in most but not all cases, the same as the values returned by pcap_datalink(). The names for those values begin with LINKTYPE_.
The link-layer header types supported by libpcap are listed here. The value corresponding to LINKTYPE_ names are given; the value corresponding to DLT_ values are, in some cases, platform dependent, and are not given; applications should check for particular DLT_ values by name.
a 1-byte flag, which is 0 for packets received by the machine and 1 for packets sent by the machine;
a 1-byte field, the upper 4 bits of which indicate the type of packet, as per RFC 1144:
for UNCOMPRESSED_TCP, the rest of the modified IP header, and for COMPRESSED_TCP, the compressed TCP/IP datagram header;
for a total of 16 bytes; the uncompressed IP datagram follows the header.
a 2-byte "packet type", in network byte order, which is one of:
a 2-byte field, in network byte order, containing a Linux ARPHRD_ value for the link layer device type;
a 2-byte field, in network byte order, containing the length of the link layer address of the sender of the packet (which could be 0);
an 8-byte field containing that number of bytes of the link layer header (if there are more than 8 bytes, only the first 8 are present);
a 2-byte field containing an Ethernet protocol type, in network byte order, or containing 1 for Novell 802.3 frames without an 802.2 LLC header or 4 for frames beginning with an 802.2 LLC header.
a 1-byte flag field, containing a direction flag in the uppermost bit, which is set for packets transmitted by the machine and clear for packets received by the machine, and a 4-byte traffic type in the low-order 4 bits, which is one of:
a 1-byte VPI value;
a 2-byte VCI field, in network byte order.