ether_type/
lib.rs

1#![no_std]
2
3use macro_bits::serializable_enum;
4
5serializable_enum! {
6    #[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]
7    /// The EtherType as described in IEEE 802.3
8    pub enum EtherType: u16 {
9        #[default]
10        IPv4 => 0x0800,
11        ARP => 0x0806,
12        WoLAN => 0x0842,
13        IPv6 => 0x86DD,
14        Eapol => 0x888e
15    }
16}