From 5a94a32d7d3dac8a4c45a7161ac0d436bc81f58b Mon Sep 17 00:00:00 2001 From: Thibaut Vandervelden Date: Wed, 8 Nov 2023 11:10:17 +0100 Subject: [PATCH] fix(pcap): IEEE802.15.4 without FCS pcap link type Since smoltcp does not generate the FCS, the pcap link type should be set to IEEE802.15.4 without FCS. --- src/phy/pcap_writer.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/phy/pcap_writer.rs b/src/phy/pcap_writer.rs index fc6c3b236..aadf2a27f 100644 --- a/src/phy/pcap_writer.rs +++ b/src/phy/pcap_writer.rs @@ -14,8 +14,8 @@ enum_with_unknown! { Ethernet = 1, /// IPv4 or IPv6 packets (depending on the version field) Ip = 101, - /// IEEE 802.15.4 packets with FCS included. - Ieee802154WithFcs = 195, + /// IEEE 802.15.4 packets without FCS. + Ieee802154WithoutFcs = 230, } } @@ -135,7 +135,7 @@ impl PcapWriter { #[cfg(feature = "medium-ethernet")] Medium::Ethernet => PcapLinkType::Ethernet, #[cfg(feature = "medium-ieee802154")] - Medium::Ieee802154 => PcapLinkType::Ieee802154WithFcs, + Medium::Ieee802154 => PcapLinkType::Ieee802154WithoutFcs, }; sink.global_header(link_type); PcapWriter {