Crate manuf[−][src]
rust-manuf
is a rust library provides Ethernet vendor codes, and well-known MAC addresses.
Example
#[macro_use] extern crate manuf; 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
ETHER_ADDR_LEN |
The number of bytes in an ethernet (MAC) address. |
Functions
prefix |
Find vendor's prefix and mask for the ethernet (MAC) address. |
vendor |
Find vendor name and description base on an ethernet (MAC) address. |
Type Definitions
EtherAddr |
Structure of a 48-bit Ethernet address. |