https://github.com/JulianSchmid/someip-parse-rs
  
  
    A Rust library for parsing the SOME/IP network protocol (without payload interpretation). 
    https://github.com/JulianSchmid/someip-parse-rs
  
        Last synced: 8 months ago 
        JSON representation
    
A Rust library for parsing the SOME/IP network protocol (without payload interpretation).
- Host: GitHub
 - URL: https://github.com/JulianSchmid/someip-parse-rs
 - Owner: JulianSchmid
 - License: apache-2.0
 - Created: 2018-07-28T18:19:04.000Z (over 7 years ago)
 - Default Branch: main
 - Last Pushed: 2024-09-23T06:09:48.000Z (about 1 year ago)
 - Last Synced: 2025-03-17T19:35:50.575Z (8 months ago)
 - Language: Rust
 - Homepage:
 - Size: 182 KB
 - Stars: 30
 - Watchers: 4
 - Forks: 6
 - Open Issues: 0
 - 
            Metadata Files:
            
- Readme: README.md
 - License: LICENSE-APACHE
 
 
Awesome Lists containing this project
- awesome-rust-cn - JulianSchmid/someip_parse - ci.org/JulianSchmid/someip-parse-rs.svg?branch=master">](https://travis-ci.org/JulianSchmid/someip-parse-rs) (Libraries / Automotive)
 - awesome-rust - JulianSchmid/someip_parse - ci.org/JulianSchmid/someip-parse-rs.svg?branch=master">](https://travis-ci.org/JulianSchmid/someip-parse-rs) (Libraries / Automotive)
 - awesome-rust-zh - JulianSchmid/someip_parse - 用于解析 SOME / IP 网络协议的库(无有效负载解释)[<img src="https://api.travis-ci.org/JulianSchmid/someip-parse-rs.svg?branch=master">](https://travis-ci.org/JulianSchmid/someip-parse-rs) (库 / 汽车)
 - awesome-rust - JulianSchmid/someip_parse - ci.org/JulianSchmid/someip-parse-rs.svg?branch=master">](https://travis-ci.org/JulianSchmid/someip-parse-rs) (库 Libraries / 汽车 Automotive)
 
README
          [](https://crates.io/crates/someip_parse)
[](https://docs.rs/someip_parse)
[](https://github.com/JulianSchmid/someip-parse-rs/actions/workflows/main.yml)
[](https://gitlab.com/julian.schmid/someip-parse-rs/-/commits/master)
[](https://codecov.io/gh/JulianSchmid/someip-parse-rs)
# someip_parse
A Rust library for parsing the SOME/IP network protocol (without payload interpretation).
## Usage
Add the following to your `Cargo.toml`:
```toml
[dependencies]
someip_parse = "0.6.1"
```
## Example
[examples/print_messages.rs](examples/print_messages.rs):
```rust
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
* [AUTOSAR Foundation](https://www.autosar.org/standards/foundation) \(contains SOMEIP Protocol Specification & SOME/IP Service Discovery Protocol Specification\)
* [SOME/IP Protocol Specification R22-11](https://www.autosar.org/fileadmin/standards/R22-11/FO/AUTOSAR_PRS_SOMEIPProtocol.pdf)
* [SOME/IP Service Discovery Protocol Specification R22-11](https://www.autosar.org/fileadmin/standards/R22-11/FO/AUTOSAR_PRS_SOMEIPServiceDiscoveryProtocol.pdf)
## 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.