ether-type 0.1.5

A parser for IEEE 802.3 EtherTypes.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#![no_std]

use macro_bits::serializable_enum;

serializable_enum! {
    #[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]
    /// The EtherType as described in IEEE 802.3
    pub enum EtherType: u16 {
        #[default]
        IPv4 => 0x0800,
        ARP => 0x0806,
        WoLAN => 0x0842,
        IPv6 => 0x86DD,
        Eapol => 0x888e
    }
}