pub struct OuiDb { /* private fields */ }Expand description
§Organizationally Unique Identifiers (OUI) database
Implementations§
Source§impl OuiDb
impl OuiDb
Sourcepub fn is_virtual_nic(name: &str) -> bool
pub fn is_virtual_nic(name: &str) -> bool
Sourcepub fn oui_subtable_name() -> &'static str
pub fn oui_subtable_name() -> &'static str
Returns the name identifier of the subtable (oui_28, oui_32, oui_36) in the database.
§Returns
Returns the subtable name string "Ieee Registration Authority".
Sourcepub fn lookup_mac(&self, mac: MacAddress) -> Option<&'static str>
pub fn lookup_mac(&self, mac: MacAddress) -> Option<&'static str>
Looks up the organization name (OUI vendor information) for a given MAC address.
§Arguments
mac- The MAC address as aMacAddresstype.
§Returns
Returns Some(&'static str) if the organization name is found, otherwise None.
§Example
use macaddr_ouidb::*;
let mac = MacAddress::new([0x00, 0x1A, 0x2B, 0x3C, 0x4D, 0x5E]);
let org = OUI_DB.lookup_mac(mac);Sourcepub fn lookup(&self, mac: [u8; 6]) -> Option<&'static str>
pub fn lookup(&self, mac: [u8; 6]) -> Option<&'static str>
Looks up the organization name (OUI vendor information) for a given MAC address byte array.
Supports 24-bit, 28-bit, and 36-bit OUI queries.
§Arguments
mac- A 6-byte MAC address byte array.
§Returns
Returns Some(&'static str) if the organization name is found. Returns None if the MAC
address length is not 6 bytes or no match is found.
Auto Trait Implementations§
impl Freeze for OuiDb
impl RefUnwindSafe for OuiDb
impl Send for OuiDb
impl Sync for OuiDb
impl Unpin for OuiDb
impl UnsafeUnpin for OuiDb
impl UnwindSafe for OuiDb
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more