|
SatCat5
|
An Ethernet MAC address (with serializable interface).
Definition at line 29 of file eth_header.h.
#include <eth_header.h>
Public Member Functions | |
| MacAddr (const MacAddr &t)=default | |
| MacAddr & | operator= (const MacAddr &t)=default |
| constexpr u64 | to_u64 () const |
| Convert from MacAddr to u64. | |
| constexpr u64 | to_ptp_clockid () const |
| Convert to PTP Clock-ID (IEEE 1588-2008 7.5.2.2.2 Note 2). More... | |
| bool | is_broadcast () const |
| Broadcast (FF:FF:FF:FF:FF:FF) | |
| bool | is_l2multicast () const |
| L2 multicast (01:80:C2:*:*:* except link-local) | |
| bool | is_l3multicast () const |
| L3 multicast (01:00:5E:*:*:*) | |
| bool | is_multicast () const |
| Broadcast, L2 multicast, or L3 multicast. | |
| bool | is_swcontrol () const |
| Link-local control (01:80:C2:00:00:*) | |
| bool | is_unicast () const |
| Any normal single-destination address. | |
| bool | is_valid () const |
| Any nonzero address. | |
| void | log_to (satcat5::log::LogBuffer &wr) const |
| Format this field as a human-readable string. | |
| void | write_to (satcat5::io::Writeable *wr) const |
| Write this field to a byte-stream. | |
| bool | read_from (satcat5::io::Readable *rd) |
| Read this field from a byte-stream. | |
| bool | operator== (const satcat5::eth::MacAddr &other) const |
| Basic comparisons. | |
| bool | operator< (const satcat5::eth::MacAddr &other) const |
| Basic comparisons. | |
| bool | operator!= (const satcat5::eth::MacAddr &other) const |
| Basic comparisons. | |
Static Public Member Functions | |
| static constexpr satcat5::eth::MacAddr | from_u64 (u64 x) |
| Convert from u64 to MacAddr. | |
Public Attributes | |
| u8 | addr [6] |
| Byte array in network order (Index 0 = MSB) | |
|
inlineconstexpr |
Convert to PTP Clock-ID (IEEE 1588-2008 7.5.2.2.2 Note 2).
Deprecated in IEEE 1588-2019 unless MAC/OUI is globally-unique.
Definition at line 55 of file eth_header.h.