From 013cc27059b42c43286b82166fdf7f349e661f9d Mon Sep 17 00:00:00 2001 From: Afloat <132809511+Afloat16@users.noreply.github.com> Date: Tue, 17 Nov 2026 08:37:44 -0500 Subject: [PATCH] pcap: preserve capture and protocol source history Port relevant PCAP implementation and regression snapshots from Craft Anything e3d95b43000e947e97abb6c4601644dc1e18c388. --- crates/pcap/src/lib.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/crates/pcap/src/lib.rs b/crates/pcap/src/lib.rs index c017cfa6e..866f3b013 100644 --- a/crates/pcap/src/lib.rs +++ b/crates/pcap/src/lib.rs @@ -1304,6 +1304,18 @@ mod tests { classic_link_word(0x24000001, true, true, 4); } + #[test] + fn fcs_bits_are_masked_in_big_endian_nanosecond_files() { + classic_link_word(0x24000001, false, true, 4); + classic_link_word(1, false, true, 0); + } + + #[test] + fn fcs_bits_do_not_change_big_endian_nanosecond_raw_ip() { + classic_link_word(0x24000065, false, true, 4); + classic_link_word(101, false, true, 0); + } + #[test] fn a_one_word_fcs_length_is_masked() { classic_link_word(0x14000001, true, false, 2);