Skip to content

A Rust library for parsing the SOME/IP network protocol (without payload interpretation).

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

JulianSchmid/someip-parse-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

7e472ce · Sep 23, 2024
May 2, 2024
Nov 5, 2023
Sep 23, 2024
Sep 22, 2024
Sep 23, 2024
Jul 28, 2018
Jul 29, 2018
Sep 23, 2024
Nov 5, 2023
Nov 5, 2023
Nov 13, 2023
Nov 5, 2023

Repository files navigation

Crates.io docs.rs Build Status Github Build Status Gitlab codecov

someip_parse

A Rust library for parsing the SOME/IP network protocol (without payload interpretation).

Usage

Add the following to your Cargo.toml:

[dependencies]
someip_parse = "0.6.1"

Example

examples/print_messages.rs:

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)
    }
}

References

License

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.

Contribution

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.