Expand description
rust-manuf
is a rust library provides Ethernet vendor codes, and well-known MAC addresses.
§Example
#[macro_use]
extern crate manuf;
fn main() {
assert_eq!(
manuf::vendor([0x8c, 0x85, 0x90, 0x0b, 0xcb, 0x9e]),
Some(("Apple", "Apple, Inc."))
);
assert!(
manuf::prefix("Apple")
.any(|prefix| prefix == ([0x8c, 0x85, 0x90, 0x00, 0x00, 0x00], 24))
);
}
Constants§
- The number of bytes in an ethernet (MAC) address.
Functions§
- Parse
manuf
file for vendor’s((prefix, prefix_length), (name, description))
. - Find vendor’s prefix and mask for the ethernet (MAC) address.
- Find vendor name and description base on an ethernet (MAC) address.
Type Aliases§
- Structure of a 48-bit Ethernet address.