28 #ifndef NDN_UTIL_ETHERNET_HPP 29 #define NDN_UTIL_ETHERNET_HPP 53 class Address :
public std::array<uint8_t, ADDR_LEN>
60 Address(uint8_t a1, uint8_t a2, uint8_t a3,
61 uint8_t a4, uint8_t a5, uint8_t a6);
65 Address(
const uint8_t octets[ADDR_LEN]);
120 struct hash<
ndn::util::ethernet::Address>
128 #endif // NDN_UTIL_ETHERNET_HPP bool isNull() const
True if this is a null address (00:00:00:00:00:00)
Copyright (c) 2011-2015 Regents of the University of California.
const size_t TAG_LEN
Octets in 802.1Q tag (TPID + priority + VLAN)
const size_t ADDR_LEN
Octets in one Ethernet address.
represents an Ethernet hardware address
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.
Address getBroadcastAddress()
Returns the Ethernet broadcast address (ff:ff:ff:ff:ff:ff)
Address getDefaultMulticastAddress()
Returns the default Ethernet multicast address for NDN.
const size_t TYPE_LEN
Octets in Ethertype field.
bool isMulticast() const
True if this is a multicast address.
std::string toString(char sep= ':') const
Converts the address to a human-readable string.
bool isBroadcast() const
True if this is a broadcast address (ff:ff:ff:ff:ff:ff)
const size_t MIN_DATA_LEN
Min octets in Ethernet payload (assuming no 802.1Q tag)
Address()
Constructs a null Ethernet address (00:00:00:00:00:00)
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)
std::ostream & operator<<(std::ostream &o, const Address &a)
const size_t CRC_LEN
Octets in Ethernet frame check sequence.
const uint16_t ETHERTYPE_NDN