BSD loopback (NULL)

LINKTYPE 0, decoded since 11.2.0 (#95): four bytes of address family, then the IP packet. The family is written in the byte order of the capturing host and the format keeps no trace of it, so the field is read in both byte orders and the reading that names a known family is kept; that family must then agree with the IP version nibble: it is a cross-check, not the source of truth. AF_INET is 2 everywhere; AF_INET6 is accepted under every value Wireshark's epan/aftypes.h lists (10 Linux, 24 NetBSD/OpenBSD/BSD/OS, 26 Solaris, 28 FreeBSD/DragonFly, 30 Darwin), because a shorter list would reject the captures of a whole platform. 23 is deliberately refused: it is AF_INET6 on Windows but AF_IPX on BSD, which is how Wireshark's packet-null.c reads it, and overruling the reference dissector would take a capture that attests the Windows reading; the repository has none. An unknown or contradicting family is LinkLayerError::InvalidAddressFamily (its family is the little-endian reading). The decoded packet is a RawIp view whose link_type() stays NULL. LINKTYPE_LOOP (108), the OpenBSD twin in network order, is deliberately not handled: no capture attests it.

The NULL/loopback pseudo-header of frame 1 of radius_localhost.pcap: the four bytes 02 00 00 00 are the address family AF_INET written in the byte order of the capturing host, read both ways and matched against the version nibble of the IP header that follows; the crate exposes the result as a RawIp link layer with ip_version 4 and the 115-byte IPv4 packet as payload.