This is based on commit b89a6f64123f778090d1dd6ec48e6b8e8906ea11 from the zeek-af_packet-plugin repository.