ether-addr-util: introduce hw_addr_is_valid()

Take this from udev, and adapt it to make it re-usable elsewhere.
This commit is contained in:
Nick Rosbrook
2026-03-30 10:48:54 -04:00
parent 566a4f3437
commit caeec0de6d
3 changed files with 27 additions and 22 deletions
+1
View File
@@ -57,6 +57,7 @@ static inline bool hw_addr_equal(const struct hw_addr_data *a, const struct hw_a
return hw_addr_compare(a, b) == 0;
}
bool hw_addr_is_null(const struct hw_addr_data *addr) _pure_;
bool hw_addr_is_valid(const struct hw_addr_data *addr, uint16_t iftype);
extern const struct hash_ops hw_addr_hash_ops;
extern const struct hash_ops hw_addr_hash_ops_free;