关于单报文是否可包含多个SOMEIP头部的技术咨询
Hey there! Let me share my practical insights on this question as someone who's worked with SOME/IP implementations:
First off, from the official SOME/IP Protocol Specification, there's no explicit statement either allowing or prohibiting multiple independent SOME/IP headers (i.e., full SOME/IP messages) being embedded within a single network packet. That's exactly why you couldn't find clear guidance when checking the spec.
To break it down further:
- SOME/IP is built around individual protocol units—each SOME/IP message has its own dedicated header (with version, message ID, length fields, etc.) and payload. In standard implementations, a single UDP datagram or TCP segment typically carries exactly one SOME/IP message. The length field in the SOME/IP header is meant to indicate the total size of that single message, so packing multiple messages into one packet would create ambiguity for receiving stacks, which expect to parse a single message based on the length value.
- If you're seeing what looks like multiple SOME/IP headers in your pcap, there are two likely scenarios:
- It could be a capture artifact, like incorrect fragment reassembly or a parsing bug in your packet analysis tool.
- It might be a vendor-specific private extension, but this would be non-standard. Most compliant SOME/IP stacks won't handle this kind of encapsulation, so it's not a practice you'd want to rely on for interoperable systems.
The spec doesn't address this case because its core focus is on defining the structure and behavior of individual SOME/IP messages and their key transport mechanisms (like service discovery, RPC, events). Edge cases like packing multiple messages into one transport packet fall outside the standard scope.
备注:内容来源于stack exchange,提问作者automotive_dev

