#mac-address #mac #wireshark #unique-identifier #networking #eui-48 #comments

oui

Lookup MAC OUI vendor information from the Wireshark manufacturer database

6 releases (3 breaking)

0.8.1 May 1, 2021
0.8.0 Jan 8, 2021
0.7.0 Feb 10, 2020
0.6.0 May 8, 2019
0.5.1 Jul 24, 2018

#690 in Database interfaces

Download history 110/week @ 2024-02-25 54/week @ 2024-03-03 75/week @ 2024-03-10 103/week @ 2024-03-17 68/week @ 2024-03-24 151/week @ 2024-03-31 118/week @ 2024-04-07 140/week @ 2024-04-14 102/week @ 2024-04-21 38/week @ 2024-04-28 20/week @ 2024-05-05 21/week @ 2024-05-12 113/week @ 2024-05-19 131/week @ 2024-05-26 106/week @ 2024-06-02 216/week @ 2024-06-09

567 downloads per month

MIT/Apache

570KB
212 lines

oui

Rust library to lookup MAC/EUI48 OUI vendor name information from the Wireshark manufacturer database.

docs.rs Build Status

This library allows you to provide a MAC/EUI48 address and returns information on the vendor registered to the Organizationally Unique Identifier (OUI) component of the supplied address. For each entry in the Wireshark database, this will be at a minimum the vendor's Wireshark short name, but most entries include the full organization/company name and some also include a descriptive comment.

Where IEEE Registration Authority blocks have been sub-divided, the specific manufacturer is returned. Note that a vendor/organization may have been allocated multiple blocks by the IEEE - these are each treated independently, should a vendor sub-division be later re-allocated or renamed following acquisition.

Example wget command to download the manufacturer database: wget -O manuf.txt 'https://code.wireshark.org/review/gitweb?p=wireshark.git;a=blob_plain;f=manuf'

oui is available on crates.io and can be included in your Cargo.toml as follows:

[dependencies]
oui = "0.8"

For example, querying the database for the MAC address 00:00:18:00:20:01 returns the following information:

OuiEntry {
        name_short: "WebsterC",
        name_long: Some(
            "Webster Computer Corporation",
        ),
        comment: Some(
            "Appletalk/Ethernet Gateway",
        ),
    }

Documentation

Documentation can be found at the official documentation repository: https://docs.rs/oui

Examples

Check the /examples directory for usage.

Simple MAC address lookups:

RUST_LOG=oui=debug cargo run --example lookup

Export and subsequent re-import of the parsed Wireshark database:

RUST_LOG=oui=debug cargo run --example dumpdb

Feedback and Enhancements

I welcome feedback and enhancements to this library. Please create a Github Issue or a Pull Request subject to the license and contribution sections below.

License

oui is licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in oui by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~3–5MB
~92K SLoC