Crates.io | someip_parse |
lib.rs | someip_parse |
version | 0.6.2 |
source | src |
created_at | 2018-09-09 06:47:13.714075 |
updated_at | 2024-09-23 06:10:33.117403 |
description | A library for parsing the SOME/IP network protocol (without payload interpretation). |
homepage | |
repository | https://github.com/JulianSchmid/someip-parse-rs |
max_upload_size | |
id | 83692 |
size | 248,190 |
A Rust library for parsing the SOME/IP network protocol (without payload interpretation).
Add the following to your Cargo.toml
:
[dependencies]
someip_parse = "0.6.1"
use someip_parse::SomeipMsgsIterator;
//trying parsing some ip messages located in a udp payload
for someip_message in SomeipMsgsIterator::new(&udp_payload) {
match someip_message {
Ok(value) => {
if value.is_someip_sd() {
println!("someip service discovery packet");
} else {
println!("0x{:x} (service id: 0x{:x}, method/event id: 0x{:x})",
value.message_id(),
value.service_id(),
value.event_or_method_id());
}
println!(" with payload {:?}", value.payload())
},
Err(_) => {} //error reading a someip packet (based on size, protocol version value or message type value)
}
}
Licensed under either of Apache License, Version 2.0 or MIT license at your option. The corresponding license texts can be found in the LICENSE-APACHE file and the LICENSE-MIT file.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you shall be licensed as above, without any additional terms or conditions.