A Rust library for parsing the SOME/IP network protocol (without payload interpretation).
Add the following to your Cargo.toml
:
toml
[dependencies]
someip_parse = "0.3.0"
examples/printmessages.rs: ```rust use someipparse::SliceIterator;
//trying parsing some ip messages located in a udp payload for someipmessage in SliceIterator::new(&udppayload) { match someipmessage { Ok(value) => { if value.issomeipsd() { println!("someip service discovery packet"); } else { println!("0x{:x} (service id: 0x{:x}, method/event id: 0x{:x})", value.messageid(), value.serviceid(), value.eventormethodid()); } println!(" with payload {:?}", value.payload()) }, Err(_) => {} //error reading a someip packet (based on size, protocol version value or message type value) } } ```
Licensed under the BSD 3-Clause license. Please see the LICENSE file for more information.
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.