From 08933e35296b80940be3e3f9c1675ae65dba8e56 Mon Sep 17 00:00:00 2001 From: JOLIMAITRE Matthieu Date: Fri, 21 Jun 2024 03:01:13 +0200 Subject: [PATCH] dm secu --- securite/dm/pcap_analyzer/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/securite/dm/pcap_analyzer/src/main.rs b/securite/dm/pcap_analyzer/src/main.rs index 71f26d3..e68cc3f 100644 --- a/securite/dm/pcap_analyzer/src/main.rs +++ b/securite/dm/pcap_analyzer/src/main.rs @@ -22,11 +22,11 @@ fn main() -> Result<(), Box> { while let Ok(packet) = pcap.next_packet() { total += 1; let ether_type = &packet.data[20..][..2]; - if ether_type == [0x08, 0x00] { + if ether_type == [0x00, 0x08] { total_ipv4 += 1; } } - println!("Count: {total: >9}"); + println!("Count: {total: >9}"); println!("Count IPv4: {total_ipv4: >9}"); } }