dm secu
This commit is contained in:
parent
d53d053f43
commit
08933e3529
1 changed files with 2 additions and 2 deletions
|
@ -22,11 +22,11 @@ fn main() -> Result<(), Box<dyn Error>> {
|
||||||
while let Ok(packet) = pcap.next_packet() {
|
while let Ok(packet) = pcap.next_packet() {
|
||||||
total += 1;
|
total += 1;
|
||||||
let ether_type = &packet.data[20..][..2];
|
let ether_type = &packet.data[20..][..2];
|
||||||
if ether_type == [0x08, 0x00] {
|
if ether_type == [0x00, 0x08] {
|
||||||
total_ipv4 += 1;
|
total_ipv4 += 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
println!("Count: {total: >9}");
|
println!("Count: {total: >9}");
|
||||||
println!("Count IPv4: {total_ipv4: >9}");
|
println!("Count IPv4: {total_ipv4: >9}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue