28 #ifndef NDN_CXX_NET_ETHERNET_HPP
29 #define NDN_CXX_NET_ETHERNET_HPP
52 class Address :
public std::array<uint8_t, ADDR_LEN>
59 Address(uint8_t a1, uint8_t a2, uint8_t a3,
60 uint8_t a4, uint8_t a5, uint8_t a6);
117 struct hash<
ndn::ethernet::Address>
represents an Ethernet hardware address
Address()
Constructs a null Ethernet address (00:00:00:00:00:00)
std::string toString(char sep=':') const
Converts the address to a human-readable string.
bool isMulticast() const
True if this is a multicast address.
bool isBroadcast() const
True if this is a broadcast address (ff:ff:ff:ff:ff:ff)
bool isNull() const
True if this is a null address (00:00:00:00:00:00)
static Address fromString(const std::string &str)
Creates an Address from a string containing an Ethernet address in hexadecimal notation,...
const size_t CRC_LEN
Octets in Ethernet frame check sequence.
const size_t MIN_DATA_LEN
Min octets in Ethernet payload (assuming no 802.1Q tag)
Address getDefaultMulticastAddress()
Returns the default Ethernet multicast address for NDN.
const size_t TAG_LEN
Octets in 802.1Q tag (TPID + priority + VLAN)
const size_t TYPE_LEN
Octets in Ethertype field.
const uint16_t ETHERTYPE_NDN
const size_t ADDR_LEN
Octets in one Ethernet address.
const size_t MAX_DATA_LEN
Max octets in Ethernet payload.
const size_t HDR_LEN
Total octets in Ethernet header (without 802.1Q tag)
Address getBroadcastAddress()
Returns the Ethernet broadcast address (ff:ff:ff:ff:ff:ff)
std::ostream & operator<<(std::ostream &o, const Address &a)