Documentation
¶
Overview ¶
Package rtps decodes the RTPS (Real-Time Publish-Subscribe) wire protocol — the on-the-wire protocol of OMG DDS, the publish/subscribe middleware that runs **ROS 2 robotics, autonomous vehicles, naval combat systems and industrial control**. It joins the project's OT / ICS decoder family (modbus, dnp3, iec104, s7comm, enip, profinetdcp, opcua, ethercat, knxnetip, hicp) as the DDS member. RTPS is a recon-rich OT target: the discovery traffic (SPDP / SEDP) and data flow on a DDS bus are unauthenticated by default, so a captured RTPS message fingerprints the **DDS vendor** (RTI Connext / eProsima FastDDS / Eclipse Cyclone / OpenDDS / …), identifies the **participant** (GUID prefix) and maps the submessage flow (discovery vs data, heartbeats, ACKNACKs).
Wrap-vs-native judgement ¶
Native. An RTPS message is a 20-byte header ('RTPS' magic, protocol
version, vendor id, 12-byte GUID prefix) followed by a list of
submessages, each a 4-byte common header (id, flags, octetsToNextHeader)
plus a body. A byte-field read + a submessage walk; stdlib only, no new
go.mod dep.
Verifiable / no confidently-wrong output ¶
The header (magic / version / vendor id / GUID prefix) was verified field-for-field against scapy's RTPS layer (scapy.contrib.rtps), and the vendor-id table is transcribed from scapy's authoritative map. The submessage walk follows the RTPS spec's defined boundary — the per-submessage octetsToNextHeader, read in the submessage's own endianness (the E flag) — so each submessage's kind, endianness and length are deterministic. The submessage **bodies** (the SPDP / SEDP parameter lists, serialized data) are vendor- and QoS-heavy and are surfaced as raw hex rather than decoded into possibly-wrong fields; only the INFO_DST destination GUID prefix (a fixed 12-byte field) is lifted out.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Result ¶
type Result struct {
ProtocolVersion string `json:"protocol_version"`
VendorID string `json:"vendor_id"`
VendorName string `json:"vendor_name"`
GUIDPrefix string `json:"guid_prefix"`
HostID string `json:"host_id"`
AppID string `json:"app_id"`
InstanceID string `json:"instance_id"`
SubMessages []SubMessage `json:"submessages"`
Notes []string `json:"notes,omitempty"`
}
Result is the decoded view of an RTPS message.
type SubMessage ¶
type SubMessage struct {
Kind int `json:"kind"`
KindName string `json:"kind_name"`
Endianness string `json:"endianness"`
FlagsHex string `json:"flags_hex"`
OctetsToNext int `json:"octets_to_next_header"`
DestGUIDPrefix string `json:"dest_guid_prefix,omitempty"` // INFO_DST
BodyHex string `json:"body_hex,omitempty"`
}
SubMessage is one decoded RTPS submessage (the framing, not the body).