#someip #autosar

someip_parse

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

8 releases (5 breaking)

0.6.1 Nov 13, 2023
0.6.0 Nov 13, 2023
0.5.0 Nov 5, 2023
0.4.0 Oct 12, 2021
0.1.0 Sep 9, 2018

#472 in Network programming

Download history 306/week @ 2023-10-29 384/week @ 2023-11-05 347/week @ 2023-11-12 193/week @ 2023-11-19 220/week @ 2023-11-26 209/week @ 2023-12-03 205/week @ 2023-12-10 214/week @ 2023-12-17 92/week @ 2023-12-24 148/week @ 2023-12-31 181/week @ 2024-01-07 200/week @ 2024-01-14 122/week @ 2024-01-21 233/week @ 2024-01-28 277/week @ 2024-02-04 370/week @ 2024-02-11

1,008 downloads per month
Used in 2 crates (via someip)

MIT/Apache

215KB
4.5K SLoC

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.

No runtime deps