28 #ifndef NDN_NET_ETHERNET_HPP 29 #define NDN_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>
125 #endif // NDN_NET_ETHERNET_HPP const size_t CRC_LEN
Octets in Ethernet frame check sequence.
static Address fromString(const std::string &str)
Creates an Address from a string containing an Ethernet address in hexadecimal notation, with colons or hyphens as separators.
Copyright (c) 2011-2015 Regents of the University of California.
const size_t MIN_DATA_LEN
Min octets in Ethernet payload (assuming no 802.1Q tag)
std::ostream & operator<<(std::ostream &o, const Address &a)
const size_t TAG_LEN
Octets in 802.1Q tag (TPID + priority + VLAN)
const size_t ADDR_LEN
Octets in one Ethernet address.
bool isNull() const
True if this is a null address (00:00:00:00:00:00)
bool isBroadcast() const
True if this is a broadcast address (ff:ff:ff:ff:ff:ff)
std::string toString(char sep=':') const
Converts the address to a human-readable string.
Address getDefaultMulticastAddress()
Returns the default Ethernet multicast address for NDN.
Address getBroadcastAddress()
Returns the Ethernet broadcast address (ff:ff:ff:ff:ff:ff)
const size_t HDR_LEN
Total octets in Ethernet header (without 802.1Q tag)
const size_t TYPE_LEN
Octets in Ethertype field.
const uint16_t ETHERTYPE_NDN
bool isMulticast() const
True if this is a multicast address.
represents an Ethernet hardware address
Address()
Constructs a null Ethernet address (00:00:00:00:00:00)
const size_t MAX_DATA_LEN
Max octets in Ethernet payload.