diff --git a/include/tins/hw_address.h b/include/tins/hw_address.h index 5715f8bb..bcf9d6f7 100644 --- a/include/tins/hw_address.h +++ b/include/tins/hw_address.h @@ -374,6 +374,20 @@ class HWAddress { return !is_broadcast() && !is_multicast(); } + /** + * \brief Indicates whether this is a globally unique address. + */ + bool is_globally_unique() const { + return !is_locally_assigned(); + } + + /** + * \brief Indicates whether this is a locally assigned address. + */ + bool is_locally_assigned() const { + return (*begin() & 0x02); + } + /** * \brief Convert this address to a hex-notation std::string address. *