{"id":16714220,"url":"https://github.com/flier/rust-manuf","last_synced_at":"2025-04-10T06:09:53.569Z","repository":{"id":57636576,"uuid":"144145679","full_name":"flier/rust-manuf","owner":"flier","description":"Ethernet vendor codes, and well-known MAC addresses","archived":false,"fork":false,"pushed_at":"2020-05-20T11:04:03.000Z","size":650,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T07:13:58.022Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flier.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-08-09T11:49:44.000Z","updated_at":"2020-06-12T19:54:52.000Z","dependencies_parsed_at":"2022-09-26T20:21:51.990Z","dependency_job_id":null,"html_url":"https://github.com/flier/rust-manuf","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flier%2Frust-manuf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flier%2Frust-manuf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flier%2Frust-manuf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flier%2Frust-manuf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flier","download_url":"https://codeload.github.com/flier/rust-manuf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247767250,"owners_count":20992541,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-12T20:49:54.551Z","updated_at":"2025-04-10T06:09:53.537Z","avatar_url":"https://github.com/flier.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rust-manuf [![LICENSE](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) [![Crates.io Version](https://img.shields.io/crates/v/manuf.svg)](https://crates.io/crates/manuf) [![Document](https://docs.rs/manuf/badge.svg)](https://docs.rs/manuf/) [![Build Status](https://travis-ci.org/flier/rust-manuf.svg?branch=master)](https://travis-ci.org/flier/rust-manuf) [![Codecov](https://codecov.io/gh/flier/rust-manuf/branch/master/graph/badge.svg)](https://codecov.io/gh/flier/rust-manuf)\n\n`rust-manuf` is a Rust library provides the Ethernet vendor codes, and well-known MAC addresses\n\n## Usage\n\nTo use `rust-manuf`, add this to your `Cargo.toml`:\n\n```toml\n[dependencies]\nmanuf = \"0.2\"\n```\n\nUse `vendor` function to find name and description base on an ethernet (MAC) address.\n\n```rust\nassert_eq!(\n    manuf::vendor([0x8c, 0x85, 0x90, 0x0b, 0xcb, 0x9e]),\n    Some((\"Apple\", \"Apple, Inc.\"))\n);\n```\n\nUse `prefix` function to find vendor's prefix and mask for the ethernet (MAC) address.\n\n```rust\nassert!(\n    manuf::prefix(\"Apple\")\n        .any(|prefix| prefix == ([0x8c, 0x85, 0x90, 0x00, 0x00, 0x00], 24))\n);\n```\n\nuse `parse` function to extract verdor's `((prefix, prefix_length), (name, description))` from a `manuf` file.\n\n```rust\nlet f = File::open(\"manuf\").unwrap();\nlet r = BufReader::new(f);\n\nfor ((prefix, prefix_len), (name, desc)) in manuf::parse(r) {\n    println!(\"{:?}/{}\\t{}\\t{}\", prefix, prefix_len, name, desc)\n}\n```\n\n**Note:** The [manuf](src/manuf) file was generated by [the Wireshark project](https://github.com/wireshark/wireshark/blob/master/manuf).\n\nIf you want to use the latest version of `manuf` file, please add the `latest` feature.\n\n```toml\n[dependencies]\nmanuf = { version = \"0.2\", features = [\"latest\"] }\n```\n\n## License\n\nReleased under the terms of the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflier%2Frust-manuf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflier%2Frust-manuf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflier%2Frust-manuf/lists"}