ieee_registry/eth.rs
1use super::utils;
2
3const URL: &str = "http://standards-oui.ieee.org/ethertype/eth.csv";
4const CACHE: &str = "~/.local/share/ieee/eth.csv";
5
6type BoxResult<T> = std::result::Result<T, Box<dyn std::error::Error>>;
7
8/// Cache the EtherType™ (eth)
9pub fn get_eth_path() -> BoxResult<String> {
10 utils::download(URL, CACHE)?;
11
12 Ok(utils::expand_path(CACHE))
13}