| Crates.io | aipn |
| lib.rs | aipn |
| version | 0.1.2 |
| created_at | 2024-08-06 12:44:13.373913+00 |
| updated_at | 2024-12-31 13:00:37.766946+00 |
| description | Enumeration of all Assigned Internet Protocol Numbers as per IANA. |
| homepage | |
| repository | https://github.com/starkbamse/aipn-rust |
| max_upload_size | |
| id | 1327236 |
| size | 12,642 |
aipn-rust - All Assigned Internet Protocol Numbers in RustThis crate/repository provides a list of all known Assigned Internet Protocol Numbers as per the IANA Protocol Numbers. It was created because I required a list of all protocol numbers for a project and could not find a rust crate that provided this information. Including this manually just for a single project, seemed like a waste of time. Therefore, to avoid repeating this process, I decided to create this crate.
To use this crate, add the following to your Cargo.toml:
[dependencies]
aipn = "0.1.2"
Then, you can use the crate as follows:
use aipn::AIPN;
let protocol = AIPN::TCP;
println!("Protocol type: {:?}", protocol);
match protocol {
AIPN::TCP => {
// Adjust code execution according to the protocol
},
_ => println!("Unknown protocol"),
}
let some_protocol_value=17;
let protocol=AIPN::from_u8(some_protocol_value);
println!("Protocol type: {:?}", protocol);
This crate is licensed under the MIT license. See the LICENSE file for more details.
If you would like to contribute to this crate, feel free to open a pull request or an issue. I am always open to suggestions and improvements.