packet_parser 1.2.0

A powerful and modular Rust crate for network packet parsing.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use core::fmt;
use std::fmt::{Display, Formatter};

use crate::parse::data_link::vlan_tag::VlanTag;

impl Display for VlanTag {
    fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
        write!(
            f,
            "ID: {:02x}, PCP: {:02x}, DEI: {}",
            self.id, self.pcp, self.dei
        )
    }
}