represents an Ethernet hardware address More...
#include <ethernet.hpp>
Public Member Functions | |
Address () | |
Constructs a null Ethernet address (00:00:00:00:00:00) More... | |
Address (uint8_t a1, uint8_t a2, uint8_t a3, uint8_t a4, uint8_t a5, uint8_t a6) | |
Constructs a new Ethernet address with the given octets. More... | |
Address (const uint8_t octets[ADDR_LEN]) | |
Constructs a new Ethernet address with the given octets. More... | |
bool | isBroadcast () const |
True if this is a broadcast address (ff:ff:ff:ff:ff:ff) More... | |
bool | isMulticast () const |
True if this is a multicast address. More... | |
bool | isNull () const |
True if this is a null address (00:00:00:00:00:00) More... | |
std::string | toString (char sep=':') const |
Converts the address to a human-readable string. More... | |
Static Public Member Functions | |
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. More... | |
represents an Ethernet hardware address
Definition at line 52 of file ethernet.hpp.
ndn::ethernet::Address::Address | ( | ) |
Constructs a null Ethernet address (00:00:00:00:00:00)
Definition at line 39 of file ethernet.cpp.
Referenced by isNull().
ndn::ethernet::Address::Address | ( | uint8_t | a1, |
uint8_t | a2, | ||
uint8_t | a3, | ||
uint8_t | a4, | ||
uint8_t | a5, | ||
uint8_t | a6 | ||
) |
Constructs a new Ethernet address with the given octets.
Definition at line 44 of file ethernet.cpp.
|
explicit |
Constructs a new Ethernet address with the given octets.
Definition at line 54 of file ethernet.cpp.
References nonstd::span_lite::size().
bool ndn::ethernet::Address::isBroadcast | ( | ) | const |
True if this is a broadcast address (ff:ff:ff:ff:ff:ff)
Definition at line 60 of file ethernet.cpp.
References ndn::ethernet::getBroadcastAddress().
Referenced by nfd::face::MulticastEthernetTransport::MulticastEthernetTransport().
bool ndn::ethernet::Address::isMulticast | ( | ) | const |
True if this is a multicast address.
Definition at line 66 of file ethernet.cpp.
Referenced by nfd::face::EthernetFactory::createMulticastFace(), nfd::face::EthernetTransport::doClose(), nfd::face::EthernetFactory::EthernetFactory(), nfd::face::MulticastEthernetTransport::MulticastEthernetTransport(), and nfd::face::EthernetTransport::receivePayload().
bool ndn::ethernet::Address::isNull | ( | ) | const |
True if this is a null address (00:00:00:00:00:00)
Definition at line 72 of file ethernet.cpp.
References Address().
Referenced by nfd::face::NetworkPredicateBase::assign(), and nfd::face::EthernetFactory::createMulticastFace().
std::string ndn::ethernet::Address::toString | ( | char | sep = ':' | ) | const |
Converts the address to a human-readable string.
sep | A character used to visually separate the octets, usually ':' (the default value) or '-' |
Definition at line 78 of file ethernet.cpp.
Referenced by nfd::ethernet::checkFrameHeader(), nfd::face::doesNetifMatchRule(), ndn::EtherCanonizeProvider::isCanonical(), nfd::face::MulticastEthernetTransport::MulticastEthernetTransport(), ndn::ethernet::operator<<(), and nfd::face::UnicastEthernetTransport::UnicastEthernetTransport().
|
static |
Creates an Address from a string containing an Ethernet address in hexadecimal notation, with colons or hyphens as separators.
str | The string to be parsed |
Definition at line 90 of file ethernet.cpp.
Referenced by nfd::face::NetworkPredicateBase::assign(), ndn::EtherCanonizeProvider::canonize(), nfd::face::EthernetFactory::EthernetFactory(), and ndn::EtherCanonizeProvider::isCanonical().