This file contains some definitions and helper functions related to layer 2 (e.g., MAC). More...


Classes | |
| struct | Myra::L2::Header |
| Layer 2, Ethernet frame. More... | |
| struct | Myra::L2::Header_with_VLAN |
| Layer 2 can also have an optional 802.1Q VLAN tag, which pushes fields out by 4 bytes. More... | |
Namespaces | |
| Myra | |
| Namespace declaration for all of the Myra Canyon helper functions. | |
| Myra::L2 | |
| Layer 2 (ethernet). | |
Enumerations | |
| enum | Myra::L2::Ethertype { Myra::L2::Ethertype::Unknown = 0x0000, Myra::L2::Ethertype::IPv4 = 0x0008, Myra::L2::Ethertype::ARP = 0x0608, Myra::L2::Ethertype::IPv6 = 0xdd86 } |
| The Ethertype in network byte order. More... | |
Functions | |
| const Header * | Myra::L2::get_header (const uint8_t *ptr) |
| Get the layer 2 header. More... | |
| Ethertype | Myra::L2::get_ethertype (const Header *header) |
| Get the ethertype. More... | |
| const uint8_t * | Myra::L2::get_L3_pointer (const Header *header) |
| Get the layer 3 pointer. More... | |
| std::string | Myra::L2::to_string (const Ethertype &type) |
| Convert the type to a short text string. More... | |
| bool | Myra::L2::is_known_ethertype (const Ethertype &type) |
| Determine if the Ethertype is known. More... | |
| bool | Myra::L2::is_known_ethertype (const Header *header) |
| Determine if the Ethertype is known. More... | |
| bool | Myra::L2::is_unknown_ethertype (const Ethertype &type) |
| Determine if the Ethertype is unknown. More... | |
| bool | Myra::L2::is_unknown_ethertype (const Header *header) |
| Determine if the Ethertype is unknown. More... | |
This file contains some definitions and helper functions related to layer 2 (e.g., MAC).