#someip #autosar

someip_parse

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

1 unstable release

0.1.0 Sep 9, 2018
Download history 7/week @ 2018-09-09

2 downloads per month

BSD-3-Clause

36KB
694 lines

SOMEIP Parse

Build Status Code Coverage pipeline status

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

Usage

First, add the following to your Cargo.toml:

[dependencies]
someip_parse = "0.1.0"

Next, add this to your crate root:

extern crate someip_parse;

Example

examples/print_messages.rs:

//trying parsing some ip messages located in a udp payload
for someip_message in SliceIterator::new(value.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

Dependencies

~110KB