1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

Support MA-S, MA-M, and MA-L reg lookups for OUI/MAC/EUI-48

This commit is contained in:
dmiller
2022-09-08 23:37:54 +00:00
parent ecf3b63189
commit 7013eefb05
3 changed files with 93 additions and 29 deletions

View File

@@ -68,19 +68,18 @@
#include <nbase.h>
/* Takes a three byte MAC address prefix (passing the whole MAC is OK
too) and returns the company which has registered the prefix.
/* Takes a MAC address and returns the company which has registered the prefix.
NULL is returned if no vendor is found for the given prefix or if there
is some other error. */
const char *MACPrefix2Corp(const u8 *prefix);
/* Takes a string and looks through the table for a vendor name which
contains that string. Sets the first three bytes in mac_data and
returns true for the first matching entry found. If no entries
match, leaves mac_data untouched and returns false. Note that this
contains that string. Sets the initial bytes in mac_data and returns the
number of nibbles (half-bytes) set for the first matching entry found. If no
entries match, leaves mac_data untouched and returns false. Note that this
is not particularly efficient and so should be rewritten if it is
called often */
bool MACCorp2Prefix(const char *vendorstr, u8 *mac_data);
int MACCorp2Prefix(const char *vendorstr, u8 *mac_data);
#endif /* MACLOOKUP_H */