Crate someip_parse[][src]

Expand description

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


Add the following to your Cargo.toml:

someip_parse = "0.4.0"



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})", 
            println!("  with payload {:?}", value.payload())
        Err(_) => {} //error reading a someip packet (based on size, protocol version value or message type value)


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



Allows iterating over the someip messages in a udp or tcp payload.

SOMEIP header (including tp header if present).

A slice containing an some ip header & payload of that message.

Additional header when a packet contains a TP header (transporting large SOME/IP messages).


Message types of a SOME/IP message.

Errors that can occur when reading someip headers.

Return code contained in a SOME/IP header.

Range errors in fields of the someip & tp header struct. These can occur when serializing or modifying an error.

Errors that can occur when serializing a someip & tp header.


Length of a someip header.

Flag in the message type field marking the package a as tp message (transporting large SOME/IP messages of UDP).

Offset that must be substracted from the length field to determine the length of the actual payload.

Maximum payload length supported by some ip. This is NOT the maximum length that is supported when sending packets over UDP. This constant is based on the limitation of the length field data type (uint32).

The currently supported protocol version.

Message id of SOMEIP service discovery messages

Length of the tp header that follows a someip header if a someip packet has been flaged as tp.