#someip #autosar

someip_parse

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

2 unstable releases

new 0.2.0 Feb 16, 2019
0.1.0 Sep 9, 2018
Download history 10/week @ 2018-11-01 8/week @ 2018-11-08 58/week @ 2018-11-15 20/week @ 2018-11-22 22/week @ 2018-11-29 46/week @ 2018-12-06 21/week @ 2018-12-13 39/week @ 2018-12-20 41/week @ 2018-12-27 2/week @ 2019-01-03 3/week @ 2019-01-10 1/week @ 2019-01-17 1/week @ 2019-01-24 1/week @ 2019-01-31 1/week @ 2019-02-07

13 downloads per month

BSD-3-Clause

54KB
1K SLoC

Crates.io docs.rs Build Status Build Status Build Status Coverage Status

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.2.0"

Example

examples/print_messages.rs:

use someip_parse::SliceIterator;

//trying parsing some ip messages located in a udp payload
for someip_message in SliceIterator::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)
    }
}

Todo

  • Example how to serialize someip packets
  • SOMEIP Service Discovery Message Parsing

References

License

Licensed under the BSD 3-Clause license. Please see the LICENSE file for more information.

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.

Dependencies

~106KB