summaryrefslogtreecommitdiff
path: root/usr.bin/mg
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2021-02-26 01:12:38 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2021-02-26 01:12:38 +0000
commited597998317e49a2469994e25c9e81ff0177947b (patch)
treea69ac2f8e762b36e7b074fde12648656e5c579a9 /usr.bin/mg
parent6987d16183af78147ee3bf5812c9f5dd91fc8b2b (diff)
add some helpers for working with ethernet addresses as uint64_t
the main bits are ether_addr_to_e64 and ether_e64_to addr for loading an ethernet address into a uin64_t and visa versa. there's also some macros for testing if an address in a uint64_t is multicast, broadcast, anyaddr, or if it's an 802.1q reserved multicast group address. the reason for this functionality is once you have an ethernet address as a uint64_t, operations like compares, bit tests, and so on are fast and easy. tested on amd64 and sparc64
Diffstat (limited to 'usr.bin/mg')
0 files changed, 0 insertions, 0 deletions