CS144's user-space TCP library
Classes | Typedefs | Functions | Variables
ethernet_header.hh File Reference
#include "parser.hh"
#include <array>
Include dependency graph for ethernet_header.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


struct  EthernetHeader
 Ethernet frame header. More...


using EthernetAddress = std::array< uint8_t, 6 >
 Helper type for an Ethernet address (an array of six bytes) More...


std::string to_string (const EthernetAddress address)
 Printable representation of an EthernetAddress. More...


constexpr EthernetAddress ETHERNET_BROADCAST = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}
 Ethernet broadcast address (ff:ff:ff:ff:ff:ff) More...

Typedef Documentation

◆ EthernetAddress

using EthernetAddress = std::array<uint8_t, 6>

Helper type for an Ethernet address (an array of six bytes)

Definition at line 9 of file ethernet_header.hh.

Function Documentation

◆ to_string()

std::string to_string ( const EthernetAddress  address)

Printable representation of an EthernetAddress.

A string with a textual representation of an Ethernet address

Definition at line 52 of file ethernet_header.cc.

Variable Documentation


constexpr EthernetAddress ETHERNET_BROADCAST = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}

Ethernet broadcast address (ff:ff:ff:ff:ff:ff)

Definition at line 12 of file ethernet_header.hh.