Crate someip_parse

source ·
Expand description

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

Modules

  • Error types of someip_parse.
  • Constants related to sd entries.
  • Constants related to the flags in the sd header
  • Constants related to sd options.

Structs

  • SOMEIP service discovery header
  • Flags at the start of a SOMEIP service discovery header.
  • SOMEIP header (including tp header if present).
  • A slice containing an some ip header & payload of that message.
  • Allows iterating over the someip messages in a udp or tcp payload.
  • Buffer to reconstruct one SOMEIP TP packet stream without checks that the message id & request id are the same for all packets (this has to be done by the caller).
  • Configuration of a TP buffers maximum allowed size and initial allocated buffer size.
  • Additional header when a packet contains a TP header (transporting large SOME/IP messages).
  • Pool of buffers to reconstruct multiple SOMEIP TP packet streams in parallel (re-uses buffers to minimize allocations).
  • Describing the range of received data in an TP stream.

Enums

Constants

Type Aliases