/builds/wireshark/wireshark/epan/dissectors/packet-rtps.c (2024)

clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name packet-rtps.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -fhalf-no-semantic-interposition -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -ffloat16-excess-precision=fast -fbfloat16-excess-precision=fast -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fcoverage-compilation-dir=/builds/wireshark/wireshark/build -resource-dir /usr/lib/llvm-17/lib/clang/17 -isystem /usr/include/glib-2.0 -isystem /usr/lib/x86_64-linux-gnu/glib-2.0/include -isystem /usr/include/mit-krb5 -isystem /usr/include/libxml2 -isystem /builds/wireshark/wireshark/build/epan/dissectors -isystem /builds/wireshark/wireshark/epan/dissectors -isystem /builds/wireshark/wireshark/epan -D G_DISABLE_DEPRECATED -D G_DISABLE_SINGLE_INCLUDES -D WS_BUILD_DLL -D WS_DEBUG -D WS_DEBUG_UTF_8 -I /builds/wireshark/wireshark/build -I /builds/wireshark/wireshark -I /builds/wireshark/wireshark/include -internal-isystem /usr/lib/llvm-17/lib/clang/17/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/11/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -fmacro-prefix-map=/builds/wireshark/wireshark/= -fmacro-prefix-map=/builds/wireshark/wireshark/build/= -fmacro-prefix-map=../= -Wno-error=stringop-overflow= -Wno-error=deprecated-declarations -Wno-format-truncation -Wno-pointer-sign -std=gnu11 -fdebug-compilation-dir=/builds/wireshark/wireshark/build -ferror-limit 19 -fvisibility=hidden -fwrapv -fgnuc-version=4.2.1 -fcolor-diagnostics -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /builds/wireshark/wireshark/sbout/2024-06-12-100241-3155-1 -x c /builds/wireshark/wireshark/epan/dissectors/packet-rtps.c

1/* packet-rtps.c2 * ~~~~~~~~~~~~~3 *4 * Routines for Real-Time Publish-Subscribe Protocol (RTPS) dissection5 *6 * (c) 2005-2014 Copyright, Real-Time Innovations, Inc.7 * Real-Time Innovations, Inc.8 * 232 East Java Drive9 * Sunnyvale, CA 9408910 *11 * Copyright 2003, LUKAS POKORNY <[emailprotected]>12 * PETR SMOLIK <[emailprotected]>13 * ZDENEK SEBEK <[emailprotected]>14 *15 * Czech Technical University in Prague16 * Faculty of Electrical Engineering <www.fel.cvut.cz>17 * Department of Control Engineering <dce.felk.cvut.cz>18 *19 * Wireshark - Network traffic analyzer20 * By Gerald Combs <[emailprotected]>21 * Copyright 1998 Gerald Combs22 *23 * SPDX-License-Identifier: GPL-2.0-or-later24 *25 * -------------------------------------26 *27 * The following file is part of the RTPS packet dissector for Wireshark.28 *29 * RTPS protocol was developed by Real-Time Innovations, Inc. as wire30 * protocol for Data Distribution System.31 * Additional information at:32 *33 * OMG DDS standards: http://portals.omg.org/dds/omg-dds-standard/34 *35 * Older OMG DDS specification:36 * http://www.omg.org/cgi-bin/doc?ptc/2003-07-0737 *38 * NDDS and RTPS information: http://www.rti.com/resources.html39 *40 * Vendor ID listing can be found at:41 * https://www.dds-foundation.org/dds-rtps-vendor-and-product-ids/42 */43 44#include "config.h"45 46#include <epan/packet.h>47#include <epan/expert.h>48#include <epan/prefs.h>49#include "packet-rtps.h"50#include <epan/addr_resolv.h>51#include <epan/exceptions.h>52#include <epan/proto_data.h>53#include <epan/reassemble.h>54#include <epan/strutil.h>55#if defined(HAVE_ZLIB1) && !defined(HAVE_ZLIBNG)56#define ZLIB_CONST57#define ZLIB_PREFIX(x)x x58#include <zlib.h>59typedef z_stream zlib_stream;60#endif /* HAVE_ZLIB */61 62#ifdef HAVE_ZLIBNG63#define ZLIB_PREFIX(x)x zng_ ## x64#include <zlib-ng.h>65typedef zng_stream zlib_stream;66#endif /* HAVE_ZLIBNG */67 68#include <epan/crc32-tvb.h>69#include <wsutil/crc32.h>70#include <wsutil/str_util.h>71#include <gcrypt.h>72#include <uat.h>73 74void proto_register_rtps(void);75void proto_reg_handoff_rtps(void);76 77#define MAX_GUID_PREFIX_SIZE(128) (128)78#define MAX_GUID_SIZE(160) (160)79#define GUID_SIZE(16) (16)80#define MAX_VENDOR_ID_SIZE(128) (128)81#define MAX_PARAM_SIZE(256) (256)82#define MAX_TIMESTAMP_SIZE(128) (128)83 84#define LONG_ALIGN(x)(x = (x+3)&0xfffffffc) (x = (x+3)&0xfffffffc)85#define SHORT_ALIGN(x)(x = (x+1)&0xfffffffe) (x = (x+1)&0xfffffffe)86#define MAX_ARRAY_DIMENSION10 1087#define ALIGN_ME(offset, alignment)offset = (((offset) + ((alignment) - 1)) & ~((alignment) -
1))
\
88 offset = (((offset) + ((alignment) - 1)) & ~((alignment) - 1))89#define ALIGN_ZERO(offset, alignment, zero)(offset -= zero, offset = (((offset) + ((alignment) - 1)) &
~((alignment) - 1)), offset += zero)
(offset -= zero, ALIGN_ME(offset, alignment)offset = (((offset) + ((alignment) - 1)) & ~((alignment) -
1))
, offset += zero)
90 91#define KEY_COMMENT(" //@key") (" //@key")92 93#define LONG_ALIGN_ZERO(x,zero)(x -= zero, (x = (x+3)&0xfffffffc), x += zero) (x -= zero, LONG_ALIGN(x)(x = (x+3)&0xfffffffc), x += zero)94#define SHORT_ALIGN_ZERO(x,zero)(x -= zero, (x = (x+1)&0xfffffffe), x += zero) (x -= zero, SHORT_ALIGN(x)(x = (x+1)&0xfffffffe), x += zero)95 96#define DISSECTION_INFO_MAX_ELEMENTS_DEFAULT_VALUE(100) (100)97#define DISSECTION_INFO_ARRAY_MAX_ELEMENTS_DEFAULT_VALUE(100) (100)98#define DISSECTION_INFO_REMAINING_ELEMENTS_STR_d"... %d items(s) remaining. The number of items shown is configurable through RTPS properties under Preferences/Protocols." "... %d items(s) remaining. The number of items shown is configurable through RTPS properties under Preferences/Protocols."99#define MAX_MEMBER_NAME(256) (256)100#define HASHMAP_DISCRIMINATOR_CONSTANT(-2) (-2)101#define UUID_SIZE(9) (9)102#define LONG_ADDRESS_SIZE(16) (16)103 104#define INSTANCE_STATE_DATA_RESPONSE_NUM_ELEMENTS7 7105#define SEQUENCE_100_IINSTANCE_TRANSITION_DATA_BOUND100 100106#define INSTANCE_TRANSITION_DATA_NUM_ELEMENTS4 4107#define GUID_T_NUM_ELEMENTS1 1108#define VALUE_NUM_ELEMENTS16 16109#define KEY_HAS_VALUE_NUM_ELEMENTS16 16110#define NTPTIME_T_NUM_ELEMENTS2 2111#define SEQUENCE_NUMBER_T_NUM_ELEMENTS2 2112#define SECURE_TAG_COMMON_AND_SPECIFIC_MAC_LENGTH16 16 /* bytes. */113 114typedef struct _union_member_mapping {115 guint64 union_type_id;116 guint64 member_type_id;117 gint32 discriminator;118 gchar member_name[MAX_MEMBER_NAME(256)];119} union_member_mapping;120 121typedef struct _mutable_member_mapping {122 gint64 key;123 guint64 struct_type_id;124 guint64 member_type_id;125 guint32 member_id;126 gchar member_name[MAX_MEMBER_NAME(256)];127} mutable_member_mapping;128 129typedef struct _dissection_element {130 guint64 type_id;131 guint16 flags;132 guint32 member_id;133 gchar member_name[MAX_MEMBER_NAME(256)];134} dissection_element;135 136typedef enum {137 EXTENSIBILITY_INVALID = 1,138 EXTENSIBILITY_FINAL,139 EXTENSIBILITY_EXTENSIBLE,140 EXTENSIBILITY_MUTABLE141} RTICdrTypeObjectExtensibility;142 143typedef struct _dissection_info {144 guint64 type_id;145 gint member_kind;146 guint64 base_type_id;147 guint32 member_length;148 gchar member_name[MAX_MEMBER_NAME(256)];149 150 RTICdrTypeObjectExtensibility extensibility;151 152 gint32 bound;153 guint32 num_elements;154 dissection_element* elements;155 156} dissection_info;157 158 159typedef struct _submessage_col_info {160 const gchar* status_info;161 const gchar* topic_name;162 const gchar* data_session_kind;163} submessage_col_info;164 165typedef enum {166 RTI_CDR_TK_NULL = 0,167 RTI_CDR_TK_SHORT,168 RTI_CDR_TK_LONG,169 RTI_CDR_TK_USHORT,170 RTI_CDR_TK_ULONG,171 RTI_CDR_TK_FLOAT,172 RTI_CDR_TK_DOUBLE,173 RTI_CDR_TK_BOOLEAN,174 RTI_CDR_TK_CHAR,175 RTI_CDR_TK_OCTET,176 RTI_CDR_TK_STRUCT,177 RTI_CDR_TK_UNION,178 RTI_CDR_TK_ENUM,179 RTI_CDR_TK_STRING,180 RTI_CDR_TK_SEQUENCE,181 RTI_CDR_TK_ARRAY,182 RTI_CDR_TK_ALIAS,183 RTI_CDR_TK_LONGLONG,184 RTI_CDR_TK_ULONGLONG,185 RTI_CDR_TK_LONGDOUBLE,186 RTI_CDR_TK_WCHAR,187 RTI_CDR_TK_WSTRING,188 RTI_CDR_TK_VALUE,189 RTI_CDR_TK_VALUE_PARAM190} RTICdrTCKind;191 192typedef enum {193 RTI_CDR_TYPE_OBJECT_TYPE_KIND_NO_TYPE=0,194 RTI_CDR_TYPE_OBJECT_TYPE_KIND_BOOLEAN_TYPE=1,195 RTI_CDR_TYPE_OBJECT_TYPE_KIND_BYTE_TYPE=2,196 RTI_CDR_TYPE_OBJECT_TYPE_KIND_INT_16_TYPE=3,197 RTI_CDR_TYPE_OBJECT_TYPE_KIND_UINT_16_TYPE=4,198 RTI_CDR_TYPE_OBJECT_TYPE_KIND_INT_32_TYPE=5,199 RTI_CDR_TYPE_OBJECT_TYPE_KIND_UINT_32_TYPE=6,200 RTI_CDR_TYPE_OBJECT_TYPE_KIND_INT_64_TYPE=7,201 RTI_CDR_TYPE_OBJECT_TYPE_KIND_UINT_64_TYPE=8,202 RTI_CDR_TYPE_OBJECT_TYPE_KIND_FLOAT_32_TYPE=9,203 RTI_CDR_TYPE_OBJECT_TYPE_KIND_FLOAT_64_TYPE=10,204 RTI_CDR_TYPE_OBJECT_TYPE_KIND_FLOAT_128_TYPE=11,205 RTI_CDR_TYPE_OBJECT_TYPE_KIND_CHAR_8_TYPE=12,206 RTI_CDR_TYPE_OBJECT_TYPE_KIND_CHAR_32_TYPE=13,207 RTI_CDR_TYPE_OBJECT_TYPE_KIND_ENUMERATION_TYPE=14,208 RTI_CDR_TYPE_OBJECT_TYPE_KIND_BITSET_TYPE=15,209 RTI_CDR_TYPE_OBJECT_TYPE_KIND_ALIAS_TYPE=16,210 RTI_CDR_TYPE_OBJECT_TYPE_KIND_ARRAY_TYPE=17,211 RTI_CDR_TYPE_OBJECT_TYPE_KIND_SEQUENCE_TYPE=18,212 RTI_CDR_TYPE_OBJECT_TYPE_KIND_STRING_TYPE=19,213 RTI_CDR_TYPE_OBJECT_TYPE_KIND_MAP_TYPE=20,214 RTI_CDR_TYPE_OBJECT_TYPE_KIND_UNION_TYPE=21,215 RTI_CDR_TYPE_OBJECT_TYPE_KIND_STRUCTURE_TYPE=22,216 RTI_CDR_TYPE_OBJECT_TYPE_KIND_ANNOTATION_TYPE=23,217 RTI_CDR_TYPE_OBJECT_TYPE_KIND_MODULE=24218} RTICdrTypeObjectTypeKind;219 220typedef struct _rtps_dissector_data {221 guint16 encapsulation_id;222 /* Represents the position of a sample within a batch. Since the223 position can be 0, we use -1 as not valid (not a batch) */224 gint position_in_batch;225} rtps_dissector_data;226 227typedef struct _rtps_tvb_field {228 tvbuff_t *tvb;229 gint tvb_offset;230 gint tvb_len;231} rtps_tvb_field;232 233static const value_string type_object_kind [] = {234 { RTI_CDR_TYPE_OBJECT_TYPE_KIND_NO_TYPE, "NO_TYPE" },235 { RTI_CDR_TYPE_OBJECT_TYPE_KIND_BOOLEAN_TYPE, "BOOLEAN_TYPE" },236 { RTI_CDR_TYPE_OBJECT_TYPE_KIND_BYTE_TYPE, "BYTE_TYPE" },237 { RTI_CDR_TYPE_OBJECT_TYPE_KIND_INT_16_TYPE, "INT_16_TYPE" },238 { RTI_CDR_TYPE_OBJECT_TYPE_KIND_UINT_16_TYPE, "UINT_16_TYPE" },239 { RTI_CDR_TYPE_OBJECT_TYPE_KIND_INT_32_TYPE, "INT_32_TYPE" },240 { RTI_CDR_TYPE_OBJECT_TYPE_KIND_UINT_32_TYPE, "UINT_32_TYPE" },241 { RTI_CDR_TYPE_OBJECT_TYPE_KIND_INT_64_TYPE, "INT_64_TYPE" },242 { RTI_CDR_TYPE_OBJECT_TYPE_KIND_UINT_64_TYPE, "UINT_64_TYPE" },243 { RTI_CDR_TYPE_OBJECT_TYPE_KIND_FLOAT_32_TYPE, "FLOAT_32_TYPE" },244 { RTI_CDR_TYPE_OBJECT_TYPE_KIND_FLOAT_64_TYPE, "FLOAT_64_TYPE" },245 { RTI_CDR_TYPE_OBJECT_TYPE_KIND_FLOAT_128_TYPE, "FLOAT_128_TYPE" },246 { RTI_CDR_TYPE_OBJECT_TYPE_KIND_CHAR_8_TYPE, "CHAR_8_TYPE" },247 { RTI_CDR_TYPE_OBJECT_TYPE_KIND_CHAR_32_TYPE, "CHAR_32_TYPE" },248 { RTI_CDR_TYPE_OBJECT_TYPE_KIND_ENUMERATION_TYPE, "ENUMERATION_TYPE" },249 { RTI_CDR_TYPE_OBJECT_TYPE_KIND_BITSET_TYPE, "BITSET_TYPE" },250 { RTI_CDR_TYPE_OBJECT_TYPE_KIND_ALIAS_TYPE, "ALIAS_TYPE" },251 { RTI_CDR_TYPE_OBJECT_TYPE_KIND_ARRAY_TYPE, "ARRAY_TYPE" },252 { RTI_CDR_TYPE_OBJECT_TYPE_KIND_SEQUENCE_TYPE, "SEQUENCE_TYPE" },253 { RTI_CDR_TYPE_OBJECT_TYPE_KIND_STRING_TYPE, "STRING_TYPE" },254 { RTI_CDR_TYPE_OBJECT_TYPE_KIND_MAP_TYPE, "MAP_TYPE" },255 { RTI_CDR_TYPE_OBJECT_TYPE_KIND_UNION_TYPE, "UNION_TYPE" },256 { RTI_CDR_TYPE_OBJECT_TYPE_KIND_STRUCTURE_TYPE, "STRUCTURE_TYPE" },257 { RTI_CDR_TYPE_OBJECT_TYPE_KIND_ANNOTATION_TYPE, "ANNOTATION_TYPE" },258 { 0, NULL((void*)0) }259};260 261static wmem_map_t * dissection_infos;262static wmem_map_t * builtin_dissection_infos;263static wmem_map_t * union_member_mappings;264static wmem_map_t * mutable_member_mappings;265 266/***************************************************************************/267/* Preferences */268/***************************************************************************/269static guint rtps_max_batch_samples_dissected = 16;270static guint rtps_max_data_type_elements = DISSECTION_INFO_MAX_ELEMENTS_DEFAULT_VALUE(100);271static guint rtps_max_array_data_type_elements = DISSECTION_INFO_ARRAY_MAX_ELEMENTS_DEFAULT_VALUE(100);272static bool_Bool enable_topic_info = true1;273static bool_Bool enable_rtps_reassembly = false0;274static bool_Bool enable_user_data_dissection = false0;275static bool_Bool enable_max_array_data_type_elements = true1;276static bool_Bool enable_max_data_type_elements = true1;277static bool_Bool enable_rtps_crc_check = false0;278static bool_Bool enable_rtps_psk_decryption = false0;279static dissector_table_t rtps_type_name_table;280 281/***************************************************************************/282/* Variable definitions */283/***************************************************************************/284#define RTPS_MAGIC_NUMBER0x52545053 0x52545053 /* RTPS */285#define RTPX_MAGIC_NUMBER0x52545058 0x52545058 /* RTPX */286#define RTPS_SEQUENCENUMBER_UNKNOWN0xffffffff00000000 0xffffffff00000000 /* {-1,0} as uint64 */287 288#define RTPS_TOPIC_QUERY_SELECTION_KIND_HISTORY_SNAPSHOT0 0289#define RTPS_TOPIC_QUERY_SELECTION_KIND_CONTINUOUS1 1290 291/* Traffic type */292#define PORT_BASE(7400) (7400)293#define DOMAIN_GAIN(250) (250)294#define PORT_METATRAFFIC_UNICAST(0) (0)295#define PORT_USERTRAFFIC_MULTICAST(1) (1)296#define PORT_METATRAFFIC_MULTICAST(2) (2)297#define PORT_USERTRAFFIC_UNICAST(3) (3)298 299/* Flags defined in the 'flag' bitmask of a submessage */300#define FLAG_E(0x01) (0x01) /* Common to all the submessages */301#define FLAG_DATA_D(0x02) (0x02)302#define FLAG_DATA_D_v2(0x04) (0x04)303#define FLAG_DATA_A(0x04) (0x04)304#define FLAG_DATA_H(0x08) (0x08)305#define FLAG_DATA_Q(0x10) (0x10)306#define FLAG_DATA_Q_v2(0x02) (0x02)307#define FLAG_DATA_FRAG_Q(0x02) (0x02)308#define FLAG_DATA_FRAG_H(0x04) (0x04)309#define FLAG_DATA_I(0x10) (0x10)310#define FLAG_DATA_U(0x20) (0x20)311#define FLAG_NOKEY_DATA_Q(0x02) (0x02)312#define FLAG_NOKEY_DATA_D(0x04) (0x04)313#define FLAG_ACKNACK_F(0x02) (0x02)314#define FLAG_HEARTBEAT_F(0x02) (0x02)315#define FLAG_GAP_F(0x02) (0x02)316#define FLAG_INFO_TS_T(0x02) (0x02)317#define FLAG_INFO_REPLY_IP4_M(0x02) (0x02)318#define FLAG_INFO_REPLY_M(0x02) (0x02)319#define FLAG_RTPS_DATA_Q(0x02) (0x02)320#define FLAG_RTPS_DATA_D(0x04) (0x04)321#define FLAG_RTPS_DATA_K(0x08) (0x08)322#define FLAG_RTPS_DATA_FRAG_Q(0x02) (0x02)323#define FLAG_RTPS_DATA_FRAG_K(0x04) (0x04)324#define FLAG_RTPS_DATA_BATCH_Q(0x02) (0x02)325#define FLAG_SAMPLE_INFO_T(0x01) (0x01)326#define FLAG_SAMPLE_INFO_Q(0x02) (0x02)327#define FLAG_SAMPLE_INFO_O(0x04) (0x04)328#define FLAG_SAMPLE_INFO_D(0x08) (0x08)329#define FLAG_SAMPLE_INFO_I(0x10) (0x10)330#define FLAG_SAMPLE_INFO_K(0x20) (0x20)331 332#define FLAG_VIRTUAL_HEARTBEAT_V(0x02) (0x02)333#define FLAG_VIRTUAL_HEARTBEAT_W(0x04) (0x04)334#define FLAG_VIRTUAL_HEARTBEAT_N(0x08) (0x08)335 336/* UDPv4 WAN Transport locator flags */337#define FLAG_UDPV4_WAN_LOCATOR_U(0x01) (0x01)338#define FLAG_UDPV4_WAN_LOCATOR_P(0x02) (0x02)339#define FLAG_UDPV4_WAN_LOCATOR_B(0x04) (0x04)340#define FLAG_UDPV4_WAN_LOCATOR_R(0x08) (0x08)341 342/* UDP WAN BINDING_PING submessage flags */343#define FLAG_UDPV4_WAN_BINDING_PING_FLAG_E(0x01) (0x01)344#define FLAG_UDPV4_WAN_BINDING_PING_FLAG_L(0x02) (0x02)345#define FLAG_UDPV4_WAN_BINDING_PING_FLAG_B(0x04) (0x04)346 347 348/* The following PIDs are defined since RTPS 1.0 */349#define PID_PAD(0x00) (0x00)350#define PID_SENTINEL(0x01) (0x01)351#define PID_PARTICIPANT_LEASE_DURATION(0x02) (0x02)352#define PID_TIME_BASED_FILTER(0x04) (0x04)353#define PID_TOPIC_NAME(0x05) (0x05)354#define PID_OWNERSHIP_STRENGTH(0x06) (0x06)355#define PID_TYPE_NAME(0x07) (0x07)356#define PID_METATRAFFIC_MULTICAST_IPADDRESS(0x0b) (0x0b)357#define PID_DEFAULT_UNICAST_IPADDRESS(0x0c) (0x0c)358#define PID_METATRAFFIC_UNICAST_PORT(0x0d) (0x0d)359#define PID_DEFAULT_UNICAST_PORT(0x0e) (0x0e)360#define PID_MULTICAST_IPADDRESS(0x11) (0x11)361#define PID_PROTOCOL_VERSION(0x15) (0x15)362#define PID_VENDOR_ID(0x16) (0x16)363#define PID_RELIABILITY(0x1a) (0x1a)364#define PID_LIVELINESS(0x1b) (0x1b)365#define PID_DURABILITY(0x1d) (0x1d)366#define PID_DURABILITY_SERVICE(0x1e) (0x1e)367#define PID_OWNERSHIP(0x1f) (0x1f)368#define PID_PRESENTATION(0x21) (0x21)369#define PID_DEADLINE(0x23) (0x23)370#define PID_DESTINATION_ORDER(0x25) (0x25)371#define PID_LATENCY_BUDGET(0x27) (0x27)372#define PID_PARTITION(0x29) (0x29)373#define PID_LIFESPAN(0x2b) (0x2b)374#define PID_USER_DATA(0x2c) (0x2c)375#define PID_GROUP_DATA(0x2d) (0x2d)376#define PID_TOPIC_DATA(0x2e) (0x2e)377#define PID_UNICAST_LOCATOR(0x2f) (0x2f)378#define PID_MULTICAST_LOCATOR(0x30) (0x30)379#define PID_DEFAULT_UNICAST_LOCATOR(0x31) (0x31)380#define PID_METATRAFFIC_UNICAST_LOCATOR(0x32) (0x32)381#define PID_METATRAFFIC_MULTICAST_LOCATOR(0x33) (0x33)382#define PID_PARTICIPANT_MANUAL_LIVELINESS_COUNT(0x34) (0x34)383#define PID_CONTENT_FILTER_PROPERTY(0x35) (0x35)384#define PID_PROPERTY_LIST_OLD(0x36) (0x36) /* For compatibility between 4.2d and 4.2e */385#define PID_HISTORY(0x40) (0x40)386#define PID_RESOURCE_LIMIT(0x41) (0x41)387#define PID_EXPECTS_INLINE_QOS(0x43) (0x43)388#define PID_PARTICIPANT_BUILTIN_ENDPOINTS(0x44) (0x44)389#define PID_METATRAFFIC_UNICAST_IPADDRESS(0x45) (0x45)390#define PID_METATRAFFIC_MULTICAST_PORT(0x46) (0x46)391#define PID_TYPECODE(0x47) (0x47)392#define PID_PARTICIPANT_GUID(0x50) (0x50)393#define PID_PARTICIPANT_ENTITY_ID(0x51) (0x51)394#define PID_GROUP_GUID(0x52) (0x52)395#define PID_GROUP_ENTITY_ID(0x53) (0x53)396#define PID_FILTER_SIGNATURE(0x55) (0x55)397#define PID_COHERENT_SET(0x56) (0x56)398#define PID_GROUP_COHERENT_SET(0x0063) (0x0063)399#define PID_END_COHERENT_SET(0x8022) (0x8022)400#define PID_END_GROUP_COHERENT_SET(0x8023) (0x8023)401#define MIG_RTPS_PID_END_COHERENT_SET_SAMPLE_COUNT(0x8024) (0x8024)402 403/* The following QoS are deprecated */404#define PID_PERSISTENCE(0x03) (0x03)405#define PID_TYPE_CHECKSUM(0x08) (0x08)406#define PID_TYPE2_NAME(0x09) (0x09)407#define PID_TYPE2_CHECKSUM(0x0a) (0x0a)408#define PID_EXPECTS_ACK(0x10) (0x10)409#define PID_MANAGER_KEY(0x12) (0x12)410#define PID_SEND_QUEUE_SIZE(0x13) (0x13)411#define PID_RELIABILITY_ENABLED(0x14) (0x14)412#define PID_RECV_QUEUE_SIZE(0x18) (0x18)413#define PID_VARGAPPS_SEQUENCE_NUMBER_LAST(0x17) (0x17)414#define PID_RELIABILITY_OFFERED(0x19) (0x19)415#define PID_LIVELINESS_OFFERED(0x1c) (0x1c)416#define PID_OWNERSHIP_OFFERED(0x20) (0x20)417#define PID_PRESENTATION_OFFERED(0x22) (0x22)418#define PID_DEADLINE_OFFERED(0x24) (0x24)419#define PID_DESTINATION_ORDER_OFFERED(0x26) (0x26)420#define PID_LATENCY_BUDGET_OFFERED(0x28) (0x28)421#define PID_PARTITION_OFFERED(0x2a) (0x2a)422 423/* The following PIDs are defined since RTPS 2.0 */424#define PID_DEFAULT_MULTICAST_LOCATOR(0x0048) (0x0048)425#define PID_TRANSPORT_PRIORITY(0x0049) (0x0049)426#define PID_CONTENT_FILTER_INFO(0x0055) (0x0055)427#define PID_DIRECTED_WRITE(0x0057) (0x0057)428#define PID_BUILTIN_ENDPOINT_SET(0x0058) (0x0058)429#define PID_PROPERTY_LIST(0x0059) (0x0059) /* RTI DDS 4.2e and newer */430#define PID_ENDPOINT_GUID(0x005a) (0x005a)431#define PID_TYPE_MAX_SIZE_SERIALIZED(0x0060) (0x0060)432#define PID_ORIGINAL_WRITER_INFO(0x0061) (0x0061)433#define PID_ENTITY_NAME(0x0062) (0x0062)434#define PID_KEY_HASH(0x0070) (0x0070)435#define PID_STATUS_INFO(0x0071) (0x0071)436#define PID_TYPE_OBJECT(0x0072) (0x0072)437#define PID_DATA_REPRESENTATION(0x0073) (0x0073)438#define PID_TYPE_CONSISTENCY(0x0074) (0x0074)439#define PID_EQUIVALENT_TYPE_NAME(0x0075) (0x0075)440#define PID_BASE_TYPE_NAME(0x0076) (0x0076)441#define PID_BUILTIN_ENDPOINT_QOS(0x0077) (0x0077)442#define PID_ENABLE_AUTHENTICATION(0x0078) (0x0078)443#define PID_DOMAIN_ID(0x000f) (0x000f)444#define PID_DOMAIN_TAG(0x4014) (0x4014)445 446/* Vendor-specific: RTI */447#define PID_PRODUCT_VERSION(0x8000) (0x8000)448#define PID_PLUGIN_PROMISCUITY_KIND(0x8001) (0x8001)449#define PID_ENTITY_VIRTUAL_GUID(0x8002) (0x8002)450#define PID_SERVICE_KIND(0x8003) (0x8003)451#define PID_TYPECODE_RTPS2(0x8004) (0x8004) /* Was: 0x47 in RTPS 1.2 */452#define PID_DISABLE_POSITIVE_ACKS(0x8005) (0x8005)453#define PID_LOCATOR_FILTER_LIST(0x8006) (0x8006)454#define PID_EXPECTS_VIRTUAL_HB(0x8009) (0x8009)455#define PID_ROLE_NAME(0x800a) (0x800a)456#define PID_ACK_KIND(0x800b) (0x800b)457#define PID_PEER_HOST_EPOCH(0x800e) (0x800e)458#define PID_RELATED_ORIGINAL_WRITER_INFO(0x800f) (0x800f)/* inline QoS */459#define PID_RTI_DOMAIN_ID(0x800f) (0x800f)460#define PID_RELATED_READER_GUID(0x8010) (0x8010)/* inline QoS */461#define PID_TRANSPORT_INFO_LIST(0x8010) (0x8010)462#define PID_SOURCE_GUID(0x8011) (0x8011)/* inline QoS */463#define PID_DIRECT_COMMUNICATION(0x8011) (0x8011)464#define PID_RELATED_SOURCE_GUID(0x8012) (0x8012)/* inline QoS */465#define PID_TOPIC_QUERY_GUID(0x8013) (0x8013)/* inline QoS */466#define PID_TOPIC_QUERY_PUBLICATION(0x8014) (0x8014)467#define PID_ENDPOINT_PROPERTY_CHANGE_EPOCH(0x8015) (0x8015)468#define PID_REACHABILITY_LEASE_DURATION(0x8016) (0x8016)469#define PID_VENDOR_BUILTIN_ENDPOINT_SET(0x8017) (0x8017)470#define PID_ENDPOINT_SECURITY_ATTRIBUTES(0x8018) (0x8018)471#define PID_SAMPLE_SIGNATURE(0x8019) (0x8019)/* inline QoS */472#define PID_EXTENDED(0x3f01) (0x3f01)473#define PID_LIST_END(0x3f02) (0x3f02)474#define PID_UNICAST_LOCATOR_EX(0x8007) (0x8007)475 476#define PID_IDENTITY_TOKEN(0x1001) (0x1001)477#define PID_PERMISSIONS_TOKEN(0x1002) (0x1002)478#define PID_DATA_TAGS(0x1003) (0x1003)479#define PID_ENDPOINT_SECURITY_INFO(0x1004) (0x1004)480#define PID_PARTICIPANT_SECURITY_INFO(0x1005) (0x1005)481#define PID_IDENTITY_STATUS_TOKEN(0x1006) (0x1006)482#define PID_PARTICIPANT_SECURITY_DIGITAL_SIGNATURE_ALGO(0x1010) (0x1010)483#define PID_PARTICIPANT_SECURITY_KEY_ESTABLISHMENT_ALGO(0x1011) (0x1011)484#define PID_PARTICIPANT_SECURITY_SYMMETRIC_CIPHER_ALGO(0x1012) (0x1012)485#define PID_ENDPOINT_SECURITY_SYMMETRIC_CIPHER_ALGO(0x1013) (0x1013)486 487#define PID_TYPE_OBJECT_LB(0x8021) (0x8021)488 489/* Vendor-specific: ADLink */490#define PID_ADLINK_WRITER_INFO(0x8001) (0x8001)491#define PID_ADLINK_READER_DATA_LIFECYCLE(0x8002) (0x8002)492#define PID_ADLINK_WRITER_DATA_LIFECYCLE(0x8003) (0x8003)493#define PID_ADLINK_ENDPOINT_GUID(0x8004) (0x8004)494#define PID_ADLINK_SYNCHRONOUS_ENDPOINT(0x8005) (0x8005)495#define PID_ADLINK_RELAXED_QOS_MATCHING(0x8006) (0x8006)496#define PID_ADLINK_PARTICIPANT_VERSION_INFO(0x8007) (0x8007)497#define PID_ADLINK_NODE_NAME(0x8008) (0x8008)498#define PID_ADLINK_EXEC_NAME(0x8009) (0x8009)499#define PID_ADLINK_PROCESS_ID(0x800a) (0x800a)500#define PID_ADLINK_SERVICE_TYPE(0x800b) (0x800b)501#define PID_ADLINK_ENTITY_FACTORY(0x800c) (0x800c)502#define PID_ADLINK_WATCHDOG_SCHEDULING(0x800d) (0x800d)503#define PID_ADLINK_LISTENER_SCHEDULING(0x800e) (0x800e)504#define PID_ADLINK_SUBSCRIPTION_KEYS(0x800f) (0x800f)505#define PID_ADLINK_READER_LIFESPAN(0x8010) (0x8010)506#define PID_ADLINK_SHARE(0x8011) (0x8011)507#define PID_ADLINK_TYPE_DESCRIPTION(0x8012) (0x8012)508#define PID_ADLINK_LAN_ID(0x8013) (0x8013)509#define PID_ADLINK_ENDPOINT_GID(0x8014) (0x8014)510#define PID_ADLINK_GROUP_GID(0x8015) (0x8015)511#define PID_ADLINK_EOTINFO(0x8016) (0x8016)512#define PID_ADLINK_PART_CERT_NAME(0x8017) (0x8017)513#define PID_ADLINK_LAN_CERT_NAME(0x8018) (0x8018)514 515/* appId.appKind possible values */516#define APPKIND_UNKNOWN(0x00) (0x00)517#define APPKIND_MANAGED_APPLICATION(0x01) (0x01)518#define APPKIND_MANAGER(0x02) (0x02)519 520#define RTI_SERVICE_REQUEST_ID_UNKNOWN0 0521#define RTI_SERVICE_REQUEST_ID_TOPIC_QUERY1 1522#define RTI_SERVICE_REQUEST_ID_LOCATOR_REACHABILITY2 2523#define RTI_SERVICE_REQUEST_ID_INSTANCE_STATE3 3524 525/* Predefined EntityId */526#define ENTITYID_UNKNOWN(0x00000000) (0x00000000)527#define ENTITYID_PARTICIPANT(0x000001c1) (0x000001c1)528#define ENTITYID_BUILTIN_TOPIC_WRITER(0x000002c2) (0x000002c2)529#define ENTITYID_BUILTIN_TOPIC_READER(0x000002c7) (0x000002c7)530#define ENTITYID_BUILTIN_PUBLICATIONS_WRITER(0x000003c2) (0x000003c2)531#define ENTITYID_BUILTIN_PUBLICATIONS_READER(0x000003c7) (0x000003c7)532#define ENTITYID_BUILTIN_SUBSCRIPTIONS_WRITER(0x000004c2) (0x000004c2)533#define ENTITYID_BUILTIN_SUBSCRIPTIONS_READER(0x000004c7) (0x000004c7)534#define ENTITYID_BUILTIN_PARTICIPANT_WRITER(0x000100c2) (0x000100c2)535#define ENTITYID_BUILTIN_PARTICIPANT_READER(0x000100c7) (0x000100c7)536#define ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_WRITER(0x000200c2) (0x000200c2)537#define ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_READER(0x000200c7) (0x000200c7)538#define ENTITYID_RTI_BUILTIN_PARTICIPANT_BOOTSTRAP_WRITER(0x00010082) (0x00010082)539#define ENTITYID_RTI_BUILTIN_PARTICIPANT_BOOTSTRAP_READER(0x00010087) (0x00010087)540#define ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_WRITER(0x00010182) (0x00010182)541#define ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_READER(0x00010187) (0x00010187)542#define ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_WRITER(0xff010182) (0xff010182)543#define ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_READER(0xff010187) (0xff010187)544 545 546#define ENTITYID_RESERVED_META_CST_GROUP_WRITER(0xcb) (0xcb)547#define ENTITYID_RESERVED_META_GROUP_WRITER(0xcc) (0xcc)548#define ENTITYID_RESERVED_META_GROUP_READER(0xcd) (0xcd)549#define ENTITYID_RESERVED_META_CST_GROUP_READER(0xce) (0xce)550#define ENTITYID_OBJECT_NORMAL_META_WRITER_GROUP(0x88) (0x88)551#define ENTITYID_OBJECT_NORMAL_META_READER_GROUP(0x89) (0x89)552#define ENTITYID_OBJECT_NORMAL_META_TOPIC(0x8a) (0x8a)553#define ENTITYID_NORMAL_META_CST_GROUP_WRITER(0x8b) (0x8b)554#define ENTITYID_NORMAL_META_GROUP_WRITER(0x8c) (0x8c)555#define ENTITYID_NORMAL_META_GROUP_READER(0x8d) (0x8d)556#define ENTITYID_NORMAL_META_CST_GROUP_READER(0x8e) (0x8e)557#define ENTITYID_RESERVED_USER_CST_GROUP_WRITER(0x4b) (0x4b)558#define ENTITYID_RESERVED_USER_GROUP_WRITER(0x4c) (0x4c)559#define ENTITYID_RESERVED_USER_GROUP_READER(0x4d) (0x4d)560#define ENTITYID_RESERVED_USER_CST_GROUP_READER(0x4e) (0x4e)561#define ENTITYID_NORMAL_USER_CST_GROUP_WRITER(0x0b) (0x0b)562#define ENTITYID_NORMAL_USER_GROUP_WRITER(0x0c) (0x0c)563#define ENTITYID_NORMAL_USER_GROUP_READER(0x0d) (0x0d)564#define ENTITYID_NORMAL_USER_CST_GROUP_READER(0x0e) (0x0e)565 566 567/* Secure DDS */568#define ENTITYID_P2P_BUILTIN_PARTICIPANT_STATELESS_WRITER(0x000201c3) (0x000201c3)569#define ENTITYID_P2P_BUILTIN_PARTICIPANT_STATELESS_READER(0x000201c4) (0x000201c4)570#define ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_WRITER(0xff0003c2) (0xff0003c2)571#define ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_READER(0xff0003c7) (0xff0003c7)572#define ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_WRITER(0xff0004c2) (0xff0004c2)573#define ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_READER(0xff0004c7) (0xff0004c7)574#define ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_SECURE_WRITER(0xff0200c2) (0xff0200c2)575#define ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_SECURE_READER(0xff0200c7) (0xff0200c7)576#define ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_WRITER(0xff0202c3) (0xff0202c3)577#define ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_READER(0xff0202c4) (0xff0202c4)578#define ENTITYID_SPDP_RELIABLE_BUILTIN_PARTICIPANT_SECURE_WRITER(0xff0101c2) (0xff0101c2)579#define ENTITYID_SPDP_RELIABLE_BUILTIN_PARTICIPANT_SECURE_READER(0xff0101c7) (0xff0101c7)580 581/* Vendor-specific: RTI */582#define ENTITYID_RTI_BUILTIN_SERVICE_REQUEST_WRITER(0x00020082) (0x00020082)583#define ENTITYID_RTI_BUILTIN_SERVICE_REQUEST_READER(0x00020087) (0x00020087)584#define ENTITYID_RTI_BUILTIN_LOCATOR_PING_WRITER(0x00020182) (0x00020182)585#define ENTITYID_RTI_BUILTIN_LOCATOR_PING_READER(0x00020187) (0x00020187)586 587/* Deprecated EntityId */588#define ENTITYID_APPLICATIONS_WRITER(0x000001c2) (0x000001c2)589#define ENTITYID_APPLICATIONS_READER(0x000001c7) (0x000001c7)590#define ENTITYID_CLIENTS_WRITER(0x000005c2) (0x000005c2)591#define ENTITYID_CLIENTS_READER(0x000005c7) (0x000005c7)592#define ENTITYID_SERVICES_WRITER(0x000006c2) (0x000006c2)593#define ENTITYID_SERVICES_READER(0x000006c7) (0x000006c7)594#define ENTITYID_MANAGERS_WRITER(0x000007c2) (0x000007c2)595#define ENTITYID_MANAGERS_READER(0x000007c7) (0x000007c7)596#define ENTITYID_APPLICATION_SELF(0x000008c1) (0x000008c1)597#define ENTITYID_APPLICATION_SELF_WRITER(0x000008c2) (0x000008c2)598#define ENTITYID_APPLICATION_SELF_READER(0x000008c7) (0x000008c7)599 600/* Predefined Entity Kind */601#define ENTITYKIND_APPDEF_UNKNOWN(0x00) (0x00)602#define ENTITYKIND_APPDEF_PARTICIPANT(0x01) (0x01)603#define ENTITYKIND_APPDEF_WRITER_WITH_KEY(0x02) (0x02)604#define ENTITYKIND_APPDEF_WRITER_NO_KEY(0x03) (0x03)605#define ENTITYKIND_APPDEF_READER_NO_KEY(0x04) (0x04)606#define ENTITYKIND_APPDEF_READER_WITH_KEY(0x07) (0x07)607#define ENTITYKIND_BUILTIN_PARTICIPANT(0xc1) (0xc1)608#define ENTITYKIND_BUILTIN_WRITER_WITH_KEY(0xc2) (0xc2)609#define ENTITYKIND_BUILTIN_WRITER_NO_KEY(0xc3) (0xc3)610#define ENTITYKIND_BUILTIN_READER_NO_KEY(0xc4) (0xc4)611#define ENTITYKIND_BUILTIN_READER_WITH_KEY(0xc7) (0xc7)612 613/* vendor specific RTI */614#define ENTITYKIND_RTI_BUILTIN_WRITER_WITH_KEY(0x82) (0x82)615#define ENTITYKIND_RTI_BUILTIN_WRITER_NO_KEY(0x83) (0x83)616#define ENTITYKIND_RTI_BUILTIN_READER_NO_KEY(0x84) (0x84)617#define ENTITYKIND_RTI_BUILTIN_READER_WITH_KEY(0x87) (0x87)618 619/* Submessage Type */620#define SUBMESSAGE_HEADER_EXTENSION(0x0) (0x0)621#define SUBMESSAGE_PAD(0x01) (0x01)622#define SUBMESSAGE_DATA(0x02) (0x02)623#define SUBMESSAGE_NOKEY_DATA(0x03) (0x03)624#define SUBMESSAGE_ACKNACK(0x06) (0x06)625#define SUBMESSAGE_HEARTBEAT(0x07) (0x07)626#define SUBMESSAGE_GAP(0x08) (0x08)627#define SUBMESSAGE_INFO_TS(0x09) (0x09)628#define SUBMESSAGE_INFO_SRC(0x0c) (0x0c)629#define SUBMESSAGE_INFO_REPLY_IP4(0x0d) (0x0d)630#define SUBMESSAGE_INFO_DST(0x0e) (0x0e)631#define SUBMESSAGE_INFO_REPLY(0x0f) (0x0f)632 633#define SUBMESSAGE_DATA_FRAG(0x10) (0x10) /* RTPS 2.0 Only */634#define SUBMESSAGE_NOKEY_DATA_FRAG(0x11) (0x11) /* RTPS 2.0 Only */635#define SUBMESSAGE_NACK_FRAG(0x12) (0x12) /* RTPS 2.0 Only */636#define SUBMESSAGE_HEARTBEAT_FRAG(0x13) (0x13) /* RTPS 2.0 Only */637 638#define SUBMESSAGE_RTPS_DATA_SESSION(0x14) (0x14) /* RTPS 2.1 only */639#define SUBMESSAGE_RTPS_DATA(0x15) (0x15) /* RTPS 2.1 only */640#define SUBMESSAGE_RTPS_DATA_FRAG(0x16) (0x16) /* RTPS 2.1 only */641#define SUBMESSAGE_ACKNACK_BATCH(0x17) (0x17) /* RTPS 2.1 only */642#define SUBMESSAGE_RTPS_DATA_BATCH(0x18) (0x18) /* RTPS 2.1 Only */643#define SUBMESSAGE_HEARTBEAT_BATCH(0x19) (0x19) /* RTPS 2.1 only */644#define SUBMESSAGE_ACKNACK_SESSION(0x1a) (0x1a) /* RTPS 2.1 only */645#define SUBMESSAGE_HEARTBEAT_SESSION(0x1b) (0x1b) /* RTPS 2.1 only */646#define SUBMESSAGE_APP_ACK(0x1c) (0x1c)647#define SUBMESSAGE_APP_ACK_CONF(0x1d) (0x1d)648#define SUBMESSAGE_HEARTBEAT_VIRTUAL(0x1e) (0x1e)649#define SUBMESSAGE_SEC_BODY(0x30) (0x30)650#define SUBMESSAGE_SEC_PREFIX(0x31) (0x31)651#define SUBMESSAGE_SEC_POSTFIX(0x32) (0x32)652#define SUBMESSAGE_SRTPS_PREFIX(0x33) (0x33)653#define SUBMESSAGE_SRTPS_POSTFIX(0x34) (0x34)654#define SUBMESSAGE_RTI_CRC(0x80) (0x80)655#define SUBMESSAGE_RTI_DATA_FRAG_SESSION(0x81) (0x81) /* Vendor Specific */656#define SUBMESSAGE_RTI_UDP_WAN_BINDING_PING(0x82) (0x82)657 658 659/* An invalid IP Address:660 * Make sure the _STRING macro is bigger than a normal IP661 */662#define IPADDRESS_INVALID(0) (0)663#define IPADDRESS_INVALID_STRING"ADDRESS_INVALID" "ADDRESS_INVALID"664 665/* Identifies the value of an invalid port number:666 * Make sure the _STRING macro is bigger than a normal port667 */668#define PORT_INVALID(0) (0)669#define PORT_INVALID_STRING"PORT_INVALID" "PORT_INVALID"670 671/* Protocol Vendor Information (guint16) as per July 2020 */672#define RTPS_VENDOR_UNKNOWN(0x0000) (0x0000)673#define RTPS_VENDOR_UNKNOWN_STRING"VENDOR_ID_UNKNOWN (0x0000)" "VENDOR_ID_UNKNOWN (0x0000)"674#define RTPS_VENDOR_RTI_DDS(0x0101) (0x0101)675#define RTPS_VENDOR_RTI_DDS_STRING"Real-Time Innovations, Inc. - Connext DDS" "Real-Time Innovations, Inc. - Connext DDS"676#define RTPS_VENDOR_ADL_DDS(0x0102) (0x0102)677#define RTPS_VENDOR_ADL_DDS_STRING"ADLink Ltd. - OpenSplice DDS" "ADLink Ltd. - OpenSplice DDS"678#define RTPS_VENDOR_OCI(0x0103) (0x0103)679#define RTPS_VENDOR_OCI_STRING"Object Computing, Inc. (OCI) - OpenDDS" "Object Computing, Inc. (OCI) - OpenDDS"680#define RTPS_VENDOR_MILSOFT(0x0104) (0x0104)681#define RTPS_VENDOR_MILSOFT_STRING"MilSoft" "MilSoft"682#define RTPS_VENDOR_KONGSBERG(0x0105) (0x0105)683#define RTPS_VENDOR_KONGSBERG_STRING"Kongsberg - InterCOM DDS" "Kongsberg - InterCOM DDS"684#define RTPS_VENDOR_TOC(0x0106) (0x0106)685#define RTPS_VENDOR_TOC_STRING"TwinOaks Computing, Inc. - CoreDX DDS" "TwinOaks Computing, Inc. - CoreDX DDS"686#define RTPS_VENDOR_LAKOTA_TSI(0x0107) (0x0107)687#define RTPS_VENDOR_LAKOTA_TSI_STRING"Lakota Technical Solutions, Inc." "Lakota Technical Solutions, Inc."688#define RTPS_VENDOR_ICOUP(0x0108) (0x0108)689#define RTPS_VENDOR_ICOUP_STRING"ICOUP Consulting" "ICOUP Consulting"690#define RTPS_VENDOR_ETRI(0x0109) (0x0109)691#define RTPS_VENDOR_ETRI_STRING"Electronics and Telecommunication Research Institute (ETRI) - Diamond DDS" "Electronics and Telecommunication Research Institute (ETRI) - Diamond DDS"692#define RTPS_VENDOR_RTI_DDS_MICRO(0x010A) (0x010A)693#define RTPS_VENDOR_RTI_DDS_MICRO_STRING"Real-Time Innovations, Inc. (RTI) - Connext DDS Micro" "Real-Time Innovations, Inc. (RTI) - Connext DDS Micro"694#define RTPS_VENDOR_ADL_CAFE(0x010B) (0x010B)695#define RTPS_VENDOR_ADL_CAFE_STRING"ADLink Ltd. - Vortex Cafe" "ADLink Ltd. - Vortex Cafe"696#define RTPS_VENDOR_PT(0x010C) (0x010C)697#define RTPS_VENDOR_PT_STRING"PrismTech" "PrismTech"698#define RTPS_VENDOR_ADL_LITE(0x010D) (0x010D)699#define RTPS_VENDOR_ADL_LITE_STRING"ADLink Ltd. - Vortex Lite" "ADLink Ltd. - Vortex Lite"700#define RTPS_VENDOR_TECHNICOLOR(0x010E) (0x010E)701#define RTPS_VENDOR_TECHNICOLOR_STRING"Technicolor Inc. - Qeo" "Technicolor Inc. - Qeo"702#define RTPS_VENDOR_EPROSIMA(0x010F) (0x010F)703#define RTPS_VENDOR_EPROSIMA_STRING"eProsima - Fast-RTPS" "eProsima - Fast-RTPS"704#define RTPS_VENDOR_ECLIPSE(0x0110) (0x0110)705#define RTPS_VENDOR_ECLIPSE_STRING"Eclipse Foundation - Cyclone DDS" "Eclipse Foundation - Cyclone DDS"706#define RTPS_VENDOR_GURUM(0x0111) (0x0111)707#define RTPS_VENDOR_GURUM_STRING"GurumNetworks Ltd. - GurumDDS" "GurumNetworks Ltd. - GurumDDS"708#define RTPS_VENDOR_RUST(0x0112) (0x0112)709#define RTPS_VENDOR_RUST_STRING"Atostek - RustDDS" "Atostek - RustDDS"710#define RTPS_VENDOR_ZRDDS(0x0113) (0x0113)711#define RTPS_VENDOR_ZRDDS_STRING"Nanjing Zhenrong Software Technology Co. - ZRDDS" "Nanjing Zhenrong Software Technology Co. - ZRDDS"712#define RTPS_VENDOR_DUST(0x0114) (0x0114)713#define RTPS_VENDOR_DUST_STRING"S2E Software Systems B.V. - Dust DDS" "S2E Software Systems B.V. - Dust DDS"714 715 716/* Data encapsulation */717#define ENCAPSULATION_CDR_BE(0x0000) (0x0000)718#define ENCAPSULATION_CDR_LE(0x0001) (0x0001)719#define ENCAPSULATION_PL_CDR_BE(0x0002) (0x0002)720#define ENCAPSULATION_PL_CDR_LE(0x0003) (0x0003)721#define ENCAPSULATION_CDR2_BE(0x0006) (0x0006)722#define ENCAPSULATION_CDR2_LE(0x0007) (0x0007)723#define ENCAPSULATION_D_CDR2_BE(0x0008) (0x0008)724#define ENCAPSULATION_D_CDR2_LE(0x0009) (0x0009)725#define ENCAPSULATION_PL_CDR2_BE(0x000a) (0x000a)726#define ENCAPSULATION_PL_CDR2_LE(0x000b) (0x000b)727#define ENCAPSULATION_SHMEM_REF_PLAIN(0xC000) (0xC000)728#define ENCAPSULATION_SHMEM_REF_FLAT_DATA(0xC001) (0xC001)729 730/* Data encapsulation options */731#define ENCAPSULATION_OPTIONS_COMPRESSION_BYTES_MASK(0x1C) (0x1C)732#define GET_ENCAPSULATION_COMPRESSION_OPTIONS(encapsulation_options_in, compression_options_out)(compression_options_out = (((encapsulation_options_in) &
((0x1C))) >> 2))
\
733 (compression_options_out = (((encapsulation_options_in) & (ENCAPSULATION_OPTIONS_COMPRESSION_BYTES_MASK(0x1C))) >> 2))734#define ENCAPSULATION_OPTIONS_COMPRESSION_EXTENDED_HEADER_VALUE(0x1C) ENCAPSULATION_OPTIONS_COMPRESSION_BYTES_MASK(0x1C)735#define ENCAPSULATION_OPTIONS_COMPRESSION_PADDING_BYTES_MASK(0x3) (0x3)736 737 738/* Parameter Liveliness */739#define LIVELINESS_AUTOMATIC(0) (0)740#define LIVELINESS_BY_PARTICIPANT(1) (1)741#define LIVELINESS_BY_TOPIC(2) (2)742 743/* Parameter Durability */744#define DURABILITY_VOLATILE(0) (0)745#define DURABILITY_TRANSIENT_LOCAL(1) (1)746#define DURABILITY_TRANSIENT(2) (2)747#define DURABILITY_PERSISTENT(3) (3)748 749/* Parameter Ownership */750#define OWNERSHIP_SHARED(0) (0)751#define OWNERSHIP_EXCLUSIVE(1) (1)752 753/* Parameter Presentation */754#define PRESENTATION_INSTANCE(0) (0)755#define PRESENTATION_TOPIC(1) (1)756#define PRESENTATION_GROUP(2) (2)757 758#define LOCATOR_KIND_INVALID(-1) (-1)759#define LOCATOR_KIND_RESERVED(0) (0)760#define LOCATOR_KIND_UDPV4(1) (1)761#define LOCATOR_KIND_UDPV6(2) (2)762/* Vendor specific - rti */763#define LOCATOR_KIND_DTLS(6) (6)764#define LOCATOR_KIND_TCPV4_LAN(8) (8)765#define LOCATOR_KIND_TCPV4_WAN(9) (9)766#define LOCATOR_KIND_TLSV4_LAN(10) (10)767#define LOCATOR_KIND_TLSV4_WAN(11) (11)768#define LOCATOR_KIND_SHMEM(0x01000000) (0x01000000)769#define LOCATOR_KIND_TUDPV4(0x01001001) (0x01001001)770#define LOCATOR_KIND_UDPV4_WAN(0x01000001) (0x01000001)771 772/* History Kind */773#define HISTORY_KIND_KEEP_LAST(0) (0)774#define HISTORY_KIND_KEEP_ALL(1) (1)775 776/* Reliability Values */777#define RELIABILITY_BEST_EFFORT(1) (1)778#define RELIABILITY_RELIABLE(2) (2)779 780/* Destination Order */781#define BY_RECEPTION_TIMESTAMP(0) (0)782#define BY_SOURCE_TIMESTAMP(1) (1)783 784/* Member flags */785#define MEMBER_IS_KEY(1) (1)786#define MEMBER_OPTIONAL(2) (2)787#define MEMBER_SHAREABLE(4) (4)788#define MEMBER_UNION_DEFAULT(8) (8)789/* Participant message data kind */790#define PARTICIPANT_MESSAGE_DATA_KIND_UNKNOWN(0x00000000) (0x00000000)791#define PARTICIPANT_MESSAGE_DATA_KIND_AUTOMATIC_LIVELINESS_UPDATE(0x00000001) (0x00000001)792#define PARTICIPANT_MESSAGE_DATA_KIND_MANUAL_LIVELINESS_UPDATE(0x00000002) (0x00000002)793 794/* Type Consistency Kinds */795#define DISALLOW_TYPE_COERCION(0) (0)796#define ALLOW_TYPE_COERCION(1) (1)797 798/* Ack kind */799#define PROTOCOL_ACKNOWLEDGMENT(0) (0)800#define APPLICATION_AUTO_ACKNOWLEDGMENT(1) (1)801#define APPLICATION_ORDERED_ACKNOWLEDGMENT(2) (2)802#define APPLICATION_EXPLICIT_ACKNOWLEDGMENT(3) (3)803 804#define CRYPTO_TRANSFORMATION_KIND_NONE(0) (0)805#define CRYPTO_TRANSFORMATION_KIND_AES128_GMAC(1) (1)806#define CRYPTO_TRANSFORMATION_KIND_AES128_GCM(2) (2)807#define CRYPTO_TRANSFORMATION_KIND_AES256_GMAC(3) (3)808#define CRYPTO_TRANSFORMATION_KIND_AES256_GCM(4) (4)809 810#define SECURITY_SYMMETRIC_CIPHER_BIT_AES128_GCM0x00000001 0x00000001811#define SECURITY_SYMMETRIC_CIPHER_BIT_AES256_GCM0x00000002 0x00000002812#define SECURITY_SYMMETRIC_CIPHER_BIT_CUSTOM_ALGORITHM0x40000000 0x40000000813 814#define SECURITY_DIGITAL_SIGNATURE_BIT_RSASSAPSSMGF1SHA256_2048_SHA2560x00000001 0x00000001815#define SECURITY_DIGITAL_SIGNATURE_BIT_RSASSAPKCS1V15_2048_SHA2560x00000002 0x00000002816#define SECURITY_DIGITAL_SIGNATURE_BIT_ECDSA_P256_SHA2560x00000004 0x00000004817#define SECURITY_DIGITAL_SIGNATURE_BIT_ECDSA_P384_SHA3840x00000008 0x00000008818#define SECURITY_DIGITAL_SIGNATURE_BIT_CUSTOM_ALGORITHM0x40000000 0x40000000819 820#define SECURITY_KEY_ESTABLISHMENT_BIT_DHE_MODP20482560x00000001 0x00000001821#define SECURITY_KEY_ESTABLISHMENT_BIT_ECDHECEUM_P2560x00000002 0x00000002822#define SECURITY_KEY_ESTABLISHMENT_BIT_ECDHECEUM_P3840x00000004 0x00000004823#define SECURITY_KEY_ESTABLISHMENT_BIT_CUSTOM_ALGORITHM0x40000000 0x40000000824 825#define SECURITY_ALGORITHM_BIT_COMPATIBILITY_MODE0x80000000 0x80000000826 827#define TOPIC_INFO_ADD_GUID(0x01) (0x01)828#define TOPIC_INFO_ADD_TYPE_NAME(0x02) (0x02)829#define TOPIC_INFO_ADD_TOPIC_NAME(0x04) (0x04)830#define TOPIC_INFO_ALL_SET(0x07) (0x07)831 832#define NOT_A_FRAGMENT(-1) (-1)833 834/* */835#define RTI_OSAPI_COMPRESSION_CLASS_ID_NONE(0) (0)836#define RTI_OSAPI_COMPRESSION_CLASS_ID_ZLIB(1) (1)837#define RTI_OSAPI_COMPRESSION_CLASS_ID_BZIP2(2) (2)838#define RTI_OSAPI_COMPRESSION_CLASS_ID_LZ4(4) (4)839#define RTI_OSAPI_COMPRESSION_CLASS_ID_AUTO(((guint32) 0xffffffff)) (G_MAXUINT32((guint32) 0xffffffff))840 841/* VENDOR_BUILTIN_ENDPOINT_SET FLAGS */842#define VENDOR_BUILTIN_ENDPOINT_SET_FLAG_PARTICIPANT_CONFIG_WRITER(0x00000001U << 7) (0x00000001U << 7)843#define VENDOR_BUILTIN_ENDPOINT_SET_FLAG_PARTICIPANT_CONFIG_READER(0x00000001U << 8) (0x00000001U << 8)844#define VENDOR_BUILTIN_ENDPOINT_SET_FLAG_PARTICIPANT_CONFIG_SECURE_WRITER(0x00000001U << 9) (0x00000001U << 9)845#define VENDOR_BUILTIN_ENDPOINT_SET_FLAG_PARTICIPANT_CONFIG_SECURE_READER(0x00000001U << 10) (0x00000001U << 10)846#define VENDOR_BUILTIN_ENDPOINT_SET_FLAG_MONITORING_PERIODIC_WRITER(0x00000001U << 11) (0x00000001U << 11)847#define VENDOR_BUILTIN_ENDPOINT_SET_FLAG_MONITORING_PERIODIC_READER(0x00000001U << 12) (0x00000001U << 12)848#define VENDOR_BUILTIN_ENDPOINT_SET_FLAG_MONITORING_EVENT_WRITER(0x00000001U << 13) (0x00000001U << 13)849#define VENDOR_BUILTIN_ENDPOINT_SET_FLAG_MONITORING_EVENT_READER(0x00000001U << 14) (0x00000001U << 14)850#define VENDOR_BUILTIN_ENDPOINT_SET_FLAG_MONITORING_LOGGING_WRITER(0x00000001U << 15) (0x00000001U << 15)851#define VENDOR_BUILTIN_ENDPOINT_SET_FLAG_MONITORING_LOGGING_READER(0x00000001U << 16) (0x00000001U << 16)852#define VENDOR_BUILTIN_ENDPOINT_SET_FLAG_PARTICIPANT_BOOTSTRAP_WRITER(0x00000001U << 17) (0x00000001U << 17)853#define VENDOR_BUILTIN_ENDPOINT_SET_FLAG_PARTICIPANT_BOOTSTRAP_READER(0x00000001U << 18) (0x00000001U << 18)854 855static int hf_rtps_dissection_boolean;856static int hf_rtps_dissection_byte;857static int hf_rtps_dissection_int16;858static int hf_rtps_dissection_uint16;859static int hf_rtps_dissection_int32;860static int hf_rtps_dissection_uint32;861static int hf_rtps_dissection_int64;862static int hf_rtps_dissection_uint64;863static int hf_rtps_dissection_float;864static int hf_rtps_dissection_double;865static int hf_rtps_dissection_int128;866static int hf_rtps_dissection_string;867 868static const char *const SM_EXTRA_RPLUS = "(r+)";869static const char *const SM_EXTRA_RMINUS = "(r-)";870static const char *const SM_EXTRA_WPLUS = "(w+)";871static const char *const SM_EXTRA_WMINUS = "(w-)";872static const char *const SM_EXTRA_PPLUS = "(p+)";873static const char *const SM_EXTRA_PMINUS = "(p-)";874static const char *const SM_EXTRA_TPLUS = "(t+)";875static const char *const SM_EXTRA_TMINUS = "(t-)";876 877/***************************************************************************/878/* Protocol Fields Identifiers */879static int proto_rtps;880static int hf_rtps_magic;881static int hf_rtps_ping;882static int hf_rtps_protocol_version;883static int hf_rtps_protocol_version_major;884static int hf_rtps_protocol_version_minor;885static int hf_rtps_vendor_id;886 887static int hf_rtps_domain_id;888static int hf_rtps_domain_tag;889static int hf_rtps_participant_idx;890static int hf_rtps_nature_type;891 892static int hf_rtps_guid_prefix_v1;893static int hf_rtps_guid_prefix;894static int hf_rtps_guid_prefix_src;895static int hf_rtps_guid_prefix_dst;896static int hf_rtps_host_id;897static int hf_rtps_app_id;898static int hf_rtps_app_id_instance_id;899static int hf_rtps_app_id_app_kind;900 901static int hf_rtps_sm_id;902static int hf_rtps_sm_idv2;903static int hf_rtps_sm_flags;904static int hf_rtps_sm_flags2;905static int hf_rtps_sm_octets_to_next_header;906static int hf_rtps_sm_guid_prefix_v1;907static int hf_rtps_sm_guid_prefix;908static int hf_rtps_sm_host_id;909static int hf_rtps_sm_app_id;910static int hf_rtps_sm_instance_id_v1;911static int hf_rtps_sm_app_kind;912static int hf_rtps_sm_instance_id;913static int hf_rtps_sm_entity_id;914static int hf_rtps_sm_entity_id_key;915static int hf_rtps_sm_entity_id_kind;916static int hf_rtps_sm_rdentity_id;917static int hf_rtps_sm_rdentity_id_key;918static int hf_rtps_sm_rdentity_id_kind;919static int hf_rtps_sm_wrentity_id;920static int hf_rtps_sm_wrentity_id_key;921static int hf_rtps_sm_wrentity_id_kind;922static int hf_rtps_sm_seq_number;923 924static int hf_rtps_info_src_ip;925static int hf_rtps_info_src_unused;926 927static int hf_rtps_parameter_id;928static int hf_rtps_parameter_id_v2;929static int hf_rtps_parameter_id_inline_rti;930static int hf_rtps_parameter_id_toc;931static int hf_rtps_parameter_id_rti;932static int hf_rtps_parameter_id_adl;933static int hf_rtps_parameter_length;934static int hf_rtps_string_length;935static int hf_rtps_coherent_set_start;936static int hf_rtps_coherent_set_end;937static int hf_rtps_param_topic_name;938static int hf_rtps_param_strength;939static int hf_rtps_param_type_name;940static int hf_rtps_param_user_data;941static int hf_rtps_param_group_data;942static int hf_rtps_param_topic_data;943static int hf_rtps_param_content_filter_topic_name;944static int hf_rtps_param_related_topic_name;945static int hf_rtps_param_filter_class_name;946static int hf_rtps_issue_data;947static int hf_rtps_durability_service_cleanup_delay;948static int hf_rtps_liveliness_lease_duration;949static int hf_rtps_participant_lease_duration;950static int hf_rtps_time_based_filter_minimum_separation;951static int hf_rtps_reliability_max_blocking_time;952static int hf_rtps_deadline_period;953static int hf_rtps_latency_budget_duration;954static int hf_rtps_lifespan_duration;955static int hf_rtps_persistence;956static int hf_rtps_info_ts_timestamp;957static int hf_rtps_timestamp;958static int hf_rtps_locator_kind;959static int hf_rtps_locator_port;960/* static int hf_rtps_logical_port; */961static int hf_rtps_locator_public_address_port;962static int hf_rtps_locator_ipv4;963static int hf_rtps_locator_ipv6;964static int hf_rtps_participant_builtin_endpoints;965static int hf_rtps_participant_manual_liveliness_count;966static int hf_rtps_history_depth;967static int hf_rtps_resource_limit_max_samples;968static int hf_rtps_resource_limit_max_instances;969static int hf_rtps_resource_limit_max_samples_per_instances;970static int hf_rtps_filter_bitmap;971static int hf_rtps_type_checksum;972static int hf_rtps_queue_size;973static int hf_rtps_acknack_count;974static int hf_rtps_durability_service_history_kind;975static int hf_rtps_durability_service_history_depth;976static int hf_rtps_durability_service_max_samples;977static int hf_rtps_durability_service_max_instances;978static int hf_rtps_durability_service_max_samples_per_instances;979static int hf_rtps_liveliness_kind;980static int hf_rtps_manager_key;981static int hf_rtps_locator_udp_v4;982static int hf_rtps_locator_udp_v4_port;983static int hf_param_ip_address;984static int hf_rtps_param_port;985static int hf_rtps_expects_inline_qos;986static int hf_rtps_presentation_coherent_access;987static int hf_rtps_presentation_ordered_access;988static int hf_rtps_expects_ack;989static int hf_rtps_reliability_kind;990static int hf_rtps_durability;991static int hf_rtps_ownership;992static int hf_rtps_presentation_access_scope;993static int hf_rtps_destination_order;994static int hf_rtps_history_kind;995static int hf_rtps_data_status_info;996static int hf_rtps_param_serialize_encap_kind;997static int hf_rtps_param_serialize_encap_len;998static int hf_rtps_param_transport_priority;999static int hf_rtps_param_type_max_size_serialized;1000static int hf_rtps_param_entity_name;1001static int hf_rtps_param_role_name;1002static int hf_rtps_disable_positive_ack;1003static int hf_rtps_participant_guid_v1;1004static int hf_rtps_participant_guid;1005static int hf_rtps_group_guid_v1;1006static int hf_rtps_group_guid;1007static int hf_rtps_endpoint_guid;1008static int hf_rtps_param_host_id;1009static int hf_rtps_param_app_id;1010static int hf_rtps_param_instance_id;1011static int hf_rtps_param_instance_id_v1;1012static int hf_rtps_param_app_kind;1013static int hf_rtps_param_entity;1014static int hf_rtps_param_entity_key;1015static int hf_rtps_param_entity_kind;1016static int hf_rtps_data_frag_number;1017static int hf_rtps_data_frag_num_fragments;1018static int hf_rtps_data_frag_size;1019static int hf_rtps_data_frag_sample_size;1020static int hf_rtps_nokey_data_frag_number;1021static int hf_rtps_nokey_data_frag_num_fragments;1022static int hf_rtps_nokey_data_frag_size;1023static int hf_rtps_nack_frag_count;1024static int hf_rtps_heartbeat_frag_number;1025static int hf_rtps_heartbeat_frag_count;1026static int hf_rtps_heartbeat_batch_count;1027static int hf_rtps_data_serialize_data;1028static int hf_rtps_data_batch_timestamp;1029static int hf_rtps_data_batch_offset_to_last_sample_sn;1030static int hf_rtps_data_batch_sample_count;1031static int hf_rtps_data_batch_offset_sn;1032static int hf_rtps_data_batch_octets_to_sl_encap_id;1033static int hf_rtps_data_batch_serialized_data_length;1034static int hf_rtps_data_batch_octets_to_inline_qos;1035static int hf_rtps_fragment_number_base64;1036static int hf_rtps_fragment_number_base;1037static int hf_rtps_fragment_number_num_bits;1038static int hf_rtps_bitmap_num_bits;1039static int hf_rtps_param_partition_num;1040static int hf_rtps_param_partition;1041static int hf_rtps_param_filter_expression;1042static int hf_rtps_param_expression_parameters_num;1043static int hf_rtps_param_expression_parameters;1044static int hf_rtps_locator_filter_list_num_channels;1045static int hf_rtps_locator_filter_list_filter_name;1046static int hf_rtps_locator_filter_list_filter_exp;1047static int hf_rtps_extra_flags;1048static int hf_rtps_param_builtin_endpoint_set_flags;1049static int hf_rtps_param_vendor_builtin_endpoint_set_flags;1050static int hf_rtps_param_endpoint_security_attributes;1051static int hf_rtps_param_plugin_promiscuity_kind;1052static int hf_rtps_param_service_kind;1053 1054static int hf_rtps_param_sample_signature_epoch;1055static int hf_rtps_param_sample_signature_nonce;1056static int hf_rtps_param_sample_signature_length;1057static int hf_rtps_param_sample_signature_signature;1058static int hf_rtps_secure_secure_data_length;1059static int hf_rtps_secure_secure_data;1060static int hf_rtps_param_enable_authentication;1061static int hf_rtps_param_builtin_endpoint_qos;1062static int hf_rtps_secure_dataheader_transformation_kind;1063static int hf_rtps_secure_dataheader_transformation_key_revision_id;1064static int hf_rtps_secure_dataheader_transformation_key_id;1065static int hf_rtps_secure_dataheader_passphrase_id;1066static int hf_rtps_secure_dataheader_passphrase_key_id;1067static int hf_rtps_secure_dataheader_init_vector_suffix;1068static int hf_rtps_secure_dataheader_session_id;1069static int hf_rtps_secure_datatag_plugin_sec_tag;1070static int hf_rtps_secure_datatag_plugin_sec_tag_key;1071static int hf_rtps_secure_datatag_plugin_sec_tag_common_mac;1072static int hf_rtps_secure_datatag_plugin_specific_macs_len;1073static int hf_rtps_pgm;1074static int hf_rtps_pgm_dst_participant_guid;1075static int hf_rtps_pgm_dst_endpoint_guid;1076static int hf_rtps_pgm_src_endpoint_guid;1077static int hf_rtps_source_participant_guid;1078static int hf_rtps_message_identity_source_guid;1079static int hf_rtps_pgm_message_class_id;1080static int hf_rtps_pgm_data_holder_class_id;1081static int hf_rtps_secure_session_key;1082/* static int hf_rtps_pgm_data_holder_stringseq_size; */1083/* static int hf_rtps_pgm_data_holder_stringseq_name; */1084/* static int hf_rtps_pgm_data_holder_long_long; */1085 1086static int hf_rtps_param_timestamp_sec;1087static int hf_rtps_param_timestamp_fraction;1088static int hf_rtps_transportInfo_classId;1089static int hf_rtps_transportInfo_messageSizeMax;1090static int hf_rtps_param_app_ack_count;1091static int hf_rtps_param_app_ack_virtual_writer_count;1092static int hf_rtps_param_app_ack_conf_virtual_writer_count;1093static int hf_rtps_param_app_ack_conf_count;1094static int hf_rtps_param_app_ack_interval_payload_length;1095static int hf_rtps_param_app_ack_interval_flags;1096static int hf_rtps_param_app_ack_interval_count;1097static int hf_rtps_param_app_ack_octets_to_next_virtual_writer;1098static int hf_rtps_expects_virtual_heartbeat;1099static int hf_rtps_direct_communication;1100static int hf_rtps_param_peer_host_epoch;1101static int hf_rtps_param_endpoint_property_change_epoch;1102static int hf_rtps_virtual_heartbeat_count;1103static int hf_rtps_virtual_heartbeat_num_virtual_guids;1104static int hf_rtps_virtual_heartbeat_num_writers;1105static int hf_rtps_param_extended_parameter;1106static int hf_rtps_param_extended_pid_length;1107static int hf_rtps_param_type_consistency_kind;1108static int hf_rtps_param_data_representation;1109static int hf_rtps_param_ignore_sequence_bounds;1110static int hf_rtps_param_ignore_string_bounds;1111static int hf_rtps_param_ignore_member_names;1112static int hf_rtps_param_prevent_type_widening;1113static int hf_rtps_param_force_type_validation;1114static int hf_rtps_param_ignore_enum_literal_names;1115static int hf_rtps_parameter_data;1116static int hf_rtps_param_product_version_major;1117static int hf_rtps_param_product_version_minor;1118static int hf_rtps_param_product_version_release;1119static int hf_rtps_param_product_version_release_as_char;1120static int hf_rtps_param_product_version_revision;1121static int hf_rtps_param_acknowledgment_kind;1122static int hf_rtps_param_topic_query_publication_enable;1123static int hf_rtps_param_topic_query_publication_sessions;1124 1125static int hf_rtps_srm;1126static int hf_rtps_srm_service_id;1127static int hf_rtps_srm_request_body;1128static int hf_rtps_srm_instance_id;1129static int hf_rtps_topic_query_selection_filter_class_name;1130static int hf_rtps_topic_query_selection_filter_expression;1131static int hf_rtps_topic_query_selection_num_parameters;1132static int hf_rtps_topic_query_selection_filter_parameter;1133static int hf_rtps_topic_query_topic_name;1134static int hf_rtps_topic_query_original_related_reader_guid;1135 1136static int hf_rtps_encapsulation_id;1137static int hf_rtps_encapsulation_kind;1138static int hf_rtps_octets_to_inline_qos;1139static int hf_rtps_filter_signature;1140static int hf_rtps_bitmap;1141static int hf_rtps_acknack_analysis;1142static int hf_rtps_property_name;1143static int hf_rtps_property_value;1144static int hf_rtps_union;1145static int hf_rtps_union_case;1146static int hf_rtps_struct;1147static int hf_rtps_member_name;1148static int hf_rtps_sequence;1149static int hf_rtps_array;1150static int hf_rtps_bitfield;1151static int hf_rtps_datatype;1152static int hf_rtps_sequence_size;1153static int hf_rtps_guid;1154static int hf_rtps_heartbeat_count;1155static int hf_rtps_encapsulation_options;1156static int hf_rtps_serialized_key;1157static int hf_rtps_serialized_data;1158static int hf_rtps_type_object_type_id_disc;1159static int hf_rtps_type_object_type_id;1160static int hf_rtps_type_object_primitive_type_id;1161static int hf_rtps_type_object_base_type;1162static int hf_rtps_type_object_base_primitive_type_id;1163static int hf_rtps_type_object_element_raw;1164static int hf_rtps_type_object_type_property_name;1165static int hf_rtps_type_object_flags;1166static int hf_rtps_type_object_member_id;1167static int hf_rtps_type_object_annotation_value_d;1168static int hf_rtps_type_object_annotation_value_16;1169static int hf_rtps_type_object_union_label;1170static int hf_rtps_type_object_bound;1171static int hf_rtps_type_object_enum_constant_name;1172static int hf_rtps_type_object_enum_constant_value;1173static int hf_rtps_type_object_element_shared;1174static int hf_rtps_type_object_name;1175static int hf_rtps_type_object_element_module_name;1176static int hf_rtps_uncompressed_serialized_length;1177static int hf_rtps_compression_plugin_class_id;1178static int hf_rtps_compressed_serialized_type_object;1179static int hf_rtps_pl_cdr_member;1180static int hf_rtps_pl_cdr_member_id;1181static int hf_rtps_pl_cdr_member_length;1182static int hf_rtps_pl_cdr_member_id_ext;1183static int hf_rtps_pl_cdr_member_length_ext;1184static int hf_rtps_dcps_publication_data_frame_number;1185static int hf_rtps_udpv4_wan_locator_flags;1186static int hf_rtps_uuid;1187static int hf_rtps_udpv4_wan_locator_public_ip;1188static int hf_rtps_udpv4_wan_locator_public_port;1189static int hf_rtps_udpv4_wan_locator_local_ip;1190static int hf_rtps_udpv4_wan_locator_local_port;1191static int hf_rtps_udpv4_wan_binding_ping_port;1192static int hf_rtps_udpv4_wan_binding_ping_flags;1193static int hf_rtps_long_address;1194static int hf_rtps_param_group_coherent_set;1195static int hf_rtps_param_end_group_coherent_set;1196static int hf_rtps_param_mig_end_coherent_set_sample_count;1197static int hf_rtps_encapsulation_options_compression_plugin_class_id;1198static int hf_rtps_padding_bytes;1199static int hf_rtps_topic_query_selection_kind;1200static int hf_rtps_data_session_intermediate;1201 1202/* Flag bits */1203static int hf_rtps_flag_reserved80;1204static int hf_rtps_flag_reserved40;1205static int hf_rtps_flag_reserved20;1206static int hf_rtps_flag_reserved10;1207static int hf_rtps_flag_reserved08;1208static int hf_rtps_flag_reserved04;1209static int hf_rtps_flag_reserved02;1210static int hf_rtps_flag_reserved8000;1211static int hf_rtps_flag_reserved4000;1212static int hf_rtps_flag_reserved2000;1213static int hf_rtps_flag_reserved1000;1214static int hf_rtps_flag_reserved0800;1215static int hf_rtps_flag_reserved0400;1216static int hf_rtps_flag_reserved0200;1217static int hf_rtps_flag_reserved0100;1218static int hf_rtps_flag_reserved0080;1219static int hf_rtps_flag_reserved0040;1220 1221static int hf_rtps_flag_builtin_endpoint_set_reserved;1222static int hf_rtps_flag_unregister;1223static int hf_rtps_flag_inline_qos_v1;1224static int hf_rtps_flag_hash_key;1225static int hf_rtps_flag_alive;1226static int hf_rtps_flag_data_present_v1;1227static int hf_rtps_flag_multisubmessage;1228static int hf_rtps_flag_endianness;1229static int hf_rtps_flag_additional_authenticated_data;1230static int hf_rtps_flag_protected_with_psk;1231static int hf_rtps_flag_vendor_specific_content;1232static int hf_rtps_flag_status_info;1233static int hf_rtps_flag_data_present_v2;1234static int hf_rtps_flag_inline_qos_v2;1235static int hf_rtps_flag_final;1236static int hf_rtps_flag_hash_key_rti;1237static int hf_rtps_flag_liveliness;1238static int hf_rtps_flag_multicast;1239static int hf_rtps_flag_data_serialized_key;1240static int hf_rtps_flag_data_frag_serialized_key;1241static int hf_rtps_flag_timestamp;1242static int hf_rtps_flag_no_virtual_guids;1243static int hf_rtps_flag_multiple_writers;1244static int hf_rtps_flag_multiple_virtual_guids;1245static int hf_rtps_flag_serialize_key16;1246static int hf_rtps_flag_invalid_sample;1247static int hf_rtps_flag_data_present16;1248static int hf_rtps_flag_offsetsn_present;1249static int hf_rtps_flag_inline_qos16_v2;1250static int hf_rtps_flag_timestamp_present;1251static int hf_rtps_flag_unregistered;1252static int hf_rtps_flag_disposed;1253static int hf_rtps_param_status_info_flags;1254 1255static int hf_rtps_flag_participant_announcer;1256static int hf_rtps_flag_participant_detector;1257static int hf_rtps_flag_publication_announcer;1258static int hf_rtps_flag_publication_detector;1259static int hf_rtps_flag_subscription_announcer;1260static int hf_rtps_flag_subscription_detector;1261static int hf_rtps_flag_participant_proxy_announcer;1262static int hf_rtps_flag_participant_proxy_detector;1263static int hf_rtps_flag_participant_state_announcer;1264static int hf_rtps_flag_participant_state_detector;1265static int hf_rtps_flag_participant_message_datawriter;1266static int hf_rtps_flag_participant_message_datareader;1267static int hf_rtps_flag_secure_publication_writer;1268static int hf_rtps_flag_secure_publication_reader;1269static int hf_rtps_flag_secure_subscription_writer;1270static int hf_rtps_flag_secure_subscription_reader;1271static int hf_rtps_flag_secure_participant_message_writer;1272static int hf_rtps_flag_secure_participant_message_reader;1273static int hf_rtps_flag_participant_stateless_message_writer;1274static int hf_rtps_flag_participant_stateless_message_reader;1275static int hf_rtps_flag_secure_participant_volatile_message_writer;1276static int hf_rtps_flag_secure_participant_volatile_message_reader;1277static int hf_rtps_flag_participant_secure_writer;1278static int hf_rtps_flag_participant_secure_reader;1279static int hf_rtps_flag_typeflag_final;1280static int hf_rtps_flag_typeflag_mutable;1281static int hf_rtps_flag_typeflag_nested;1282static int hf_rtps_flag_memberflag_key;1283static int hf_rtps_flag_memberflag_optional;1284static int hf_rtps_flag_memberflag_shareable;1285static int hf_rtps_flag_memberflag_union_default;1286static int hf_rtps_flag_service_request_writer;1287static int hf_rtps_flag_service_request_reader;1288static int hf_rtps_flag_locator_ping_writer;1289static int hf_rtps_flag_locator_ping_reader;1290static int hf_rtps_flag_secure_service_request_writer;1291static int hf_rtps_flag_cloud_discovery_service_announcer;1292static int hf_rtps_flag_participant_config_writer;1293static int hf_rtps_flag_participant_config_reader;1294static int hf_rtps_flag_participant_config_secure_writer;1295static int hf_rtps_flag_participant_config_secure_reader;1296static int hf_rtps_flag_participant_bootstrap_writer;1297static int hf_rtps_flag_participant_bootstrap_reader;1298static int hf_rtps_flag_monitoring_periodic_writer;1299static int hf_rtps_flag_monitoring_periodic_reader;1300static int hf_rtps_flag_monitoring_event_writer;1301static int hf_rtps_flag_monitoring_event_reader;1302static int hf_rtps_flag_monitoring_logging_writer;1303static int hf_rtps_flag_monitoring_logging_reader;1304static int hf_rtps_flag_secure_service_request_reader;1305static int hf_rtps_flag_security_access_protected;1306static int hf_rtps_flag_security_discovery_protected;1307static int hf_rtps_flag_security_submessage_protected;1308static int hf_rtps_param_participant_security_symmetric_cipher_algorithms_builtin_endpoints_required_mask;1309static int hf_rtps_param_participant_security_symmetric_cipher_algorithms_builtin_endpoints_key_exchange_used_bit;1310static int hf_rtps_param_participant_security_symmetric_cipher_algorithms_supported_mask;1311static int hf_rtps_flag_security_symmetric_cipher_mask_aes128_gcm;1312static int hf_rtps_flag_security_symmetric_cipher_mask_aes256_gcm;1313static int hf_rtps_flag_security_symmetric_cipher_mask_custom_algorithm;1314static int hf_rtps_param_compression_id_mask;1315static int hf_rtps_flag_compression_id_zlib;1316static int hf_rtps_flag_compression_id_bzip2;1317static int hf_rtps_flag_compression_id_lz4;1318static int hf_rtps_param_crypto_algorithm_requirements_trust_chain;1319static int hf_rtps_param_crypto_algorithm_requirements_message_auth;1320static int hf_rtps_flag_security_digital_signature_mask_rsassapssmgf1sha256_2048_sha256;1321static int hf_rtps_flag_security_digital_signature_mask_rsassapkcs1v15_2048_sha256;1322static int hf_rtps_flag_security_digital_signature_mask_ecdsa_p256_sha256;1323static int hf_rtps_flag_security_digital_signature_mask_ecdsa_p384_sha384;1324static int hf_rtps_flag_security_digital_signature_mask_custom_algorithm;1325static int hf_rtps_flag_security_key_establishment_mask_dhe_modp2048256;1326static int hf_rtps_flag_security_key_establishment_mask_ecdheceum_p256;1327static int hf_rtps_flag_security_key_establishment_mask_ecdheceum_p384;1328static int hf_rtps_flag_security_key_establishment_mask_custom_algorithm;1329static int hf_rtps_flag_security_algorithm_compatibility_mode;1330static int hf_rtps_flag_security_payload_protected;1331static int hf_rtps_flag_endpoint_security_attribute_flag_is_read_protected;1332static int hf_rtps_flag_endpoint_security_attribute_flag_is_write_protected;1333static int hf_rtps_flag_endpoint_security_attribute_flag_is_discovery_protected;1334static int hf_rtps_flag_endpoint_security_attribute_flag_is_submessage_protected;1335static int hf_rtps_flag_endpoint_security_attribute_flag_is_payload_protected;1336static int hf_rtps_flag_endpoint_security_attribute_flag_is_key_protected;1337static int hf_rtps_flag_endpoint_security_attribute_flag_is_liveliness_protected;1338static int hf_rtps_flag_endpoint_security_attribute_flag_is_valid;1339static int hf_rtps_param_endpoint_security_attributes_mask;1340static int hf_rtps_flag_plugin_endpoint_security_attribute_flag_is_payload_encrypted;1341static int hf_rtps_flag_plugin_endpoint_security_attribute_flag_is_key_encrypted;1342static int hf_rtps_flag_plugin_endpoint_security_attribute_flag_is_liveliness_encrypted;1343static int hf_rtps_flag_plugin_endpoint_security_attribute_flag_is_valid;1344static int hf_rtps_param_plugin_endpoint_security_attributes_mask;1345static int hf_rtps_flag_participant_security_attribute_flag_key_psk_protected;1346static int hf_rtps_flag_participant_security_attribute_flag_is_rtps_protected;1347static int hf_rtps_flag_participant_security_attribute_flag_is_discovery_protected;1348static int hf_rtps_flag_participant_security_attribute_flag_is_liveliness_protected;1349static int hf_rtps_flag_participant_security_attribute_flag_key_revisions_enabled;1350static int hf_rtps_flag_participant_security_attribute_flag_is_valid;1351static int hf_rtps_param_participant_security_attributes_mask;1352static int hf_rtps_flag_plugin_participant_security_attribute_flag_is_psk_encrypted;1353static int hf_rtps_flag_plugin_participant_security_attribute_flag_is_rtps_encrypted;1354static int hf_rtps_flag_plugin_participant_security_attribute_flag_is_discovery_encrypted;1355static int hf_rtps_flag_plugin_participant_security_attribute_flag_is_liveliness_encrypted;1356static int hf_rtps_flag_plugin_participant_security_attribute_flag_is_rtps_origin_encrypted;1357static int hf_rtps_flag_plugin_participant_security_attribute_flag_is_discovery_origin_encrypted;1358static int hf_rtps_flag_plugin_participant_security_attribute_flag_is_liveliness_origin_encrypted;1359static int hf_rtps_flag_plugin_participant_security_attribute_flag_is_valid;1360static int hf_rtps_param_plugin_participant_security_attributes_mask;1361static int hf_rtps_sm_rti_crc_number;1362static int hf_rtps_sm_rti_crc_result;1363static int hf_rtps_data_tag_name;1364static int hf_rtps_data_tag_value;1365static int hf_rtps_flag_udpv4_wan_locator_u;1366static int hf_rtps_flag_udpv4_wan_locator_p;1367static int hf_rtps_flag_udpv4_wan_locator_b;1368static int hf_rtps_flag_udpv4_wan_locator_r;1369static int hf_rtps_flag_udpv4_wan_binding_ping_e;1370static int hf_rtps_flag_udpv4_wan_binding_ping_l;1371static int hf_rtps_flag_udpv4_wan_binding_ping_b;1372static int hf_rtps_header_extension_flags;1373static int hf_rtps_flag_header_extension_message_length;1374static int hf_rtps_flag_header_extension_uextension;1375static int hf_rtps_flag_header_extension_wextension;1376static int hf_rtps_flag_header_extension_checksum1;1377static int hf_rtps_flag_header_extension_checksum2;1378static int hf_rtps_flag_header_extension_parameters;1379static int hf_rtps_flag_header_extension_timestamp;1380 1381static int hf_rtps_fragments;1382static int hf_rtps_fragment;1383static int hf_rtps_fragment_overlap;1384static int hf_rtps_fragment_overlap_conflict;1385static int hf_rtps_fragment_multiple_tails;1386static int hf_rtps_fragment_too_long_fragment;1387static int hf_rtps_fragment_error;1388static int hf_rtps_fragment_count;1389static int hf_rtps_reassembled_in;1390static int hf_rtps_reassembled_length;1391static int hf_rtps_reassembled_data;1392static int hf_rtps_encapsulation_extended_compression_options;1393static int hf_rtps_message_length;1394static int hf_rtps_header_extension_checksum_crc32c;1395static int hf_rtps_header_extension_checksum_crc64;1396static int hf_rtps_header_extension_checksum_md5;1397static int hf_rtps_uextension;1398static int hf_rtps_wextension;1399static int hf_rtps_writer_group_oid;1400static int hf_rtps_reader_group_oid;1401static int hf_rtps_writer_session_id;1402 1403/* Subtree identifiers */1404static gint ett_rtps_dissection_tree;1405static gint ett_rtps;1406static gint ett_rtps_default_mapping;1407static gint ett_rtps_proto_version;1408static gint ett_rtps_submessage;1409static gint ett_rtps_parameter_sequence;1410static gint ett_rtps_parameter;1411static gint ett_rtps_flags;1412static gint ett_rtps_entity;1413static gint ett_rtps_generic_guid;1414static gint ett_rtps_rdentity;1415static gint ett_rtps_wrentity;1416static gint ett_rtps_guid_prefix;1417static gint ett_rtps_app_id;1418static gint ett_rtps_locator_udp_v4;1419static gint ett_rtps_locator;1420static gint ett_rtps_locator_list;1421static gint ett_rtps_timestamp;1422static gint ett_rtps_bitmap;1423static gint ett_rtps_seq_string;1424static gint ett_rtps_seq_ulong;1425static gint ett_rtps_resource_limit;1426static gint ett_rtps_durability_service;1427static gint ett_rtps_liveliness;1428static gint ett_rtps_manager_key;1429static gint ett_rtps_serialized_data;1430static gint ett_rtps_locator_filter_channel;1431static gint ett_rtps_part_message_data;1432static gint ett_rtps_sample_info_list;1433static gint ett_rtps_sample_info;1434static gint ett_rtps_sample_batch_list;1435static gint ett_rtps_locator_filter_locator;1436static gint ett_rtps_writer_heartbeat_virtual_list;1437static gint ett_rtps_writer_heartbeat_virtual;1438static gint ett_rtps_virtual_guid_heartbeat_virtual_list;1439static gint ett_rtps_virtual_guid_heartbeat_virtual;1440static gint ett_rtps_app_ack_virtual_writer_interval_list;1441static gint ett_rtps_app_ack_virtual_writer_interval;1442static gint ett_rtps_transport_info;1443static gint ett_rtps_app_ack_virtual_writer_list;1444static gint ett_rtps_app_ack_virtual_writer;1445static gint ett_rtps_product_version;1446static gint ett_rtps_property_list;1447static gint ett_rtps_property;1448static gint ett_rtps_topic_info;1449static gint ett_rtps_topic_info_dw_qos;1450static gint ett_rtps_type_object;1451static gint ett_rtps_type_library;1452static gint ett_rtps_type_element;1453static gint ett_rtps_type_annotation_usage_list;1454static gint ett_rtps_type_enum_constant;1455static gint ett_rtps_type_bound_list;1456static gint ett_rtps_secure_payload_tree;1457static gint ett_rtps_secure_dataheader_tree;1458static gint ett_rtps_secure_transformation_kind;1459static gint ett_rtps_pgm_data;1460static gint ett_rtps_message_identity;1461static gint ett_rtps_related_message_identity;1462static gint ett_rtps_data_holder_seq;1463static gint ett_rtps_data_holder;1464static gint ett_rtps_data_holder_properties;1465static gint ett_rtps_property_tree;1466static gint ett_rtps_param_header_tree;1467static gint ett_rtps_service_request_tree;1468static gint ett_rtps_locator_ping_tree;1469static gint ett_rtps_locator_reachability_tree;1470static gint ett_rtps_custom_dissection_info;1471static gint ett_rtps_locator_list_tree;1472static gint ett_rtps_topic_query_tree;1473static gint ett_rtps_topic_query_selection_tree;1474static gint ett_rtps_topic_query_filter_params_tree;1475static gint ett_rtps_data_member;1476static gint ett_rtps_data_tag_seq;1477static gint ett_rtps_data_tag_item;1478static gint ett_rtps_fragment;1479static gint ett_rtps_fragments;1480static gint ett_rtps_data_representation;1481static gint ett_rtps_decompressed_type_object;1482static gint ett_rtps_info_remaining_items;1483static gint ett_rtps_data_encapsulation_options;1484static gint ett_rtps_decompressed_serialized_data;1485static gint ett_rtps_instance_transition_data;1486static gint ett_rtps_crypto_algorithm_requirements;1487static gint ett_rtps_decrypted_payload;1488static gint ett_rtps_secure_postfix_tag_list_item;1489 1490static expert_field ei_rtps_sm_octets_to_next_header_error;1491static expert_field ei_rtps_checksum_check_error;1492static expert_field ei_rtps_port_invalid;1493static expert_field ei_rtps_ip_invalid;1494static expert_field ei_rtps_parameter_value_invalid;1495static expert_field ei_rtps_extra_bytes;1496static expert_field ei_rtps_missing_bytes;1497static expert_field ei_rtps_locator_port;1498static expert_field ei_rtps_more_samples_available;1499static expert_field ei_rtps_parameter_not_decoded;1500static expert_field ei_rtps_sm_octets_to_next_header_not_zero;1501static expert_field ei_rtps_pid_type_csonsistency_invalid_size;1502static expert_field ei_rtps_uncompression_error;1503static expert_field ei_rtps_value_too_large;1504static expert_field ei_rtps_invalid_psk;1505 1506/***************************************************************************/1507/* Value-to-String Tables */1508static const value_string vendor_vals[] = {1509 { RTPS_VENDOR_UNKNOWN(0x0000), RTPS_VENDOR_UNKNOWN_STRING"VENDOR_ID_UNKNOWN (0x0000)"},1510 { RTPS_VENDOR_RTI_DDS(0x0101), RTPS_VENDOR_RTI_DDS_STRING"Real-Time Innovations, Inc. - Connext DDS"},1511 { RTPS_VENDOR_ADL_DDS(0x0102), RTPS_VENDOR_ADL_DDS_STRING"ADLink Ltd. - OpenSplice DDS"},1512 { RTPS_VENDOR_OCI(0x0103), RTPS_VENDOR_OCI_STRING"Object Computing, Inc. (OCI) - OpenDDS"},1513 { RTPS_VENDOR_MILSOFT(0x0104), RTPS_VENDOR_MILSOFT_STRING"MilSoft"},1514 { RTPS_VENDOR_KONGSBERG(0x0105), RTPS_VENDOR_KONGSBERG_STRING"Kongsberg - InterCOM DDS"},1515 { RTPS_VENDOR_TOC(0x0106), RTPS_VENDOR_TOC_STRING"TwinOaks Computing, Inc. - CoreDX DDS"},1516 { RTPS_VENDOR_LAKOTA_TSI(0x0107), RTPS_VENDOR_LAKOTA_TSI_STRING"Lakota Technical Solutions, Inc."},1517 { RTPS_VENDOR_ICOUP(0x0108), RTPS_VENDOR_ICOUP_STRING"ICOUP Consulting"},1518 { RTPS_VENDOR_ETRI(0x0109), RTPS_VENDOR_ETRI_STRING"Electronics and Telecommunication Research Institute (ETRI) - Diamond DDS"},1519 { RTPS_VENDOR_RTI_DDS_MICRO(0x010A), RTPS_VENDOR_RTI_DDS_MICRO_STRING"Real-Time Innovations, Inc. (RTI) - Connext DDS Micro"},1520 { RTPS_VENDOR_ADL_CAFE(0x010B), RTPS_VENDOR_ADL_CAFE_STRING"ADLink Ltd. - Vortex Cafe"},1521 { RTPS_VENDOR_PT(0x010C), RTPS_VENDOR_PT_STRING"PrismTech"},1522 { RTPS_VENDOR_ADL_LITE(0x010D), RTPS_VENDOR_ADL_LITE_STRING"ADLink Ltd. - Vortex Lite"},1523 { RTPS_VENDOR_TECHNICOLOR(0x010E), RTPS_VENDOR_TECHNICOLOR_STRING"Technicolor Inc. - Qeo"},1524 { RTPS_VENDOR_EPROSIMA(0x010F), RTPS_VENDOR_EPROSIMA_STRING"eProsima - Fast-RTPS"},1525 { RTPS_VENDOR_ECLIPSE(0x0110), RTPS_VENDOR_ECLIPSE_STRING"Eclipse Foundation - Cyclone DDS"},1526 { RTPS_VENDOR_GURUM(0x0111), RTPS_VENDOR_GURUM_STRING"GurumNetworks Ltd. - GurumDDS"},1527 { RTPS_VENDOR_RUST(0x0112), RTPS_VENDOR_RUST_STRING"Atostek - RustDDS"},1528 { RTPS_VENDOR_ZRDDS(0x0113), RTPS_VENDOR_ZRDDS_STRING"Nanjing Zhenrong Software Technology Co. - ZRDDS"},1529 { RTPS_VENDOR_DUST(0x0114), RTPS_VENDOR_DUST_STRING"S2E Software Systems B.V. - Dust DDS"},1530 { 0, NULL((void*)0) }1531};1532 1533static const value_string entity_id_vals[] = {1534 { ENTITYID_UNKNOWN(0x00000000), "ENTITYID_UNKNOWN" },1535 { ENTITYID_PARTICIPANT(0x000001c1), "ENTITYID_PARTICIPANT" },1536 { ENTITYID_BUILTIN_TOPIC_WRITER(0x000002c2), "ENTITYID_BUILTIN_TOPIC_WRITER" },1537 { ENTITYID_BUILTIN_TOPIC_READER(0x000002c7), "ENTITYID_BUILTIN_TOPIC_READER" },1538 { ENTITYID_BUILTIN_PUBLICATIONS_WRITER(0x000003c2), "ENTITYID_BUILTIN_PUBLICATIONS_WRITER" },1539 { ENTITYID_BUILTIN_PUBLICATIONS_READER(0x000003c7), "ENTITYID_BUILTIN_PUBLICATIONS_READER" },1540 { ENTITYID_BUILTIN_SUBSCRIPTIONS_WRITER(0x000004c2), "ENTITYID_BUILTIN_SUBSCRIPTIONS_WRITER" },1541 { ENTITYID_BUILTIN_SUBSCRIPTIONS_READER(0x000004c7), "ENTITYID_BUILTIN_SUBSCRIPTIONS_READER" },1542 { ENTITYID_BUILTIN_PARTICIPANT_WRITER(0x000100c2), "ENTITYID_BUILTIN_PARTICIPANT_WRITER" },1543 { ENTITYID_BUILTIN_PARTICIPANT_READER(0x000100c7), "ENTITYID_BUILTIN_PARTICIPANT_READER" },1544 { ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_WRITER(0x000200c2), "ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_WRITER" },1545 { ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_READER(0x000200c7), "ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_READER" },1546 { ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_WRITER(0xff0003c2), "ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_WRITER" },1547 { ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_READER(0xff0003c7), "ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_READER" },1548 { ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_WRITER(0xff0004c2), "ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_WRITER" },1549 { ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_READER(0xff0004c7), "ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_READER" },1550 { ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_SECURE_WRITER(0xff0200c2), "ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_SECURE_WRITER" },1551 { ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_SECURE_READER(0xff0200c7), "ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_SECURE_READER" },1552 { ENTITYID_P2P_BUILTIN_PARTICIPANT_STATELESS_WRITER(0x000201c3), "ENTITYID_P2P_BUILTIN_PARTICIPANT_STATELESS_WRITER" },1553 { ENTITYID_P2P_BUILTIN_PARTICIPANT_STATELESS_READER(0x000201c4), "ENTITYID_P2P_BUILTIN_PARTICIPANT_STATELESS_READER" },1554 { ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_WRITER(0xff0202c3), "ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_WRITER" },1555 { ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_READER(0xff0202c4), "ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_READER" },1556 { ENTITYID_SPDP_RELIABLE_BUILTIN_PARTICIPANT_SECURE_WRITER(0xff0101c2), "ENTITYID_SPDP_RELIABLE_BUILTIN_PARTICIPANT_SECURE_WRITER"},1557 { ENTITYID_SPDP_RELIABLE_BUILTIN_PARTICIPANT_SECURE_READER(0xff0101c7), "ENTITYID_SPDP_RELIABLE_BUILTIN_PARTICIPANT_SECURE_READER"},1558 1559 /* vendor specific - RTI */1560 { ENTITYID_RTI_BUILTIN_LOCATOR_PING_WRITER(0x00020182), "ENTITYID_RTI_BUILTIN_LOCATOR_PING_WRITER" },1561 { ENTITYID_RTI_BUILTIN_LOCATOR_PING_READER(0x00020187), "ENTITYID_RTI_BUILTIN_LOCATOR_PING_READER" },1562 { ENTITYID_RTI_BUILTIN_SERVICE_REQUEST_WRITER(0x00020082), "ENTITYID_RTI_BUILTIN_SERVICE_REQUEST_WRITER" },1563 { ENTITYID_RTI_BUILTIN_SERVICE_REQUEST_READER(0x00020087), "ENTITYID_RTI_BUILTIN_SERVICE_REQUEST_READER" },1564 { ENTITYID_RTI_BUILTIN_PARTICIPANT_BOOTSTRAP_WRITER(0x00010082), "ENTITYID_RTI_BUILTIN_PARTICIPANT_BOOTSTRAP_WRITER" },1565 { ENTITYID_RTI_BUILTIN_PARTICIPANT_BOOTSTRAP_READER(0x00010087), "ENTITYID_RTI_BUILTIN_PARTICIPANT_BOOTSTRAP_READER" },1566 { ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_WRITER(0x00010182), "ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_WRITER" },1567 { ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_READER(0x00010187), "ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_READER" },1568 { ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_WRITER(0xff010182), "ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_WRITER"},1569 { ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_READER(0xff010187), "ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_READER"},1570 1571 /* Deprecated Items */1572 { ENTITYID_APPLICATIONS_WRITER(0x000001c2), "writerApplications [DEPRECATED]" },1573 { ENTITYID_APPLICATIONS_READER(0x000001c7), "readerApplications [DEPRECATED]" },1574 { ENTITYID_CLIENTS_WRITER(0x000005c2), "writerClients [DEPRECATED]" },1575 { ENTITYID_CLIENTS_READER(0x000005c7), "readerClients [DEPRECATED]" },1576 { ENTITYID_SERVICES_WRITER(0x000006c2), "writerServices [DEPRECATED]" },1577 { ENTITYID_SERVICES_READER(0x000006c7), "readerServices [DEPRECATED]" },1578 { ENTITYID_MANAGERS_WRITER(0x000007c2), "writerManagers [DEPRECATED]" },1579 { ENTITYID_MANAGERS_READER(0x000007c7), "readerManagers [DEPRECATED]" },1580 { ENTITYID_APPLICATION_SELF(0x000008c1), "applicationSelf [DEPRECATED]" },1581 { ENTITYID_APPLICATION_SELF_WRITER(0x000008c2), "writerApplicationSelf [DEPRECATED]" },1582 { ENTITYID_APPLICATION_SELF_READER(0x000008c7), "readerApplicationSelf [DEPRECATED]" },1583 { 0, NULL((void*)0) }1584};1585 1586static const value_string entity_kind_vals [] = {1587 { ENTITYKIND_APPDEF_UNKNOWN(0x00), "Application-defined unknown kind" },1588 { ENTITYKIND_APPDEF_PARTICIPANT(0x01), "Application-defined participant" },1589 { ENTITYKIND_APPDEF_WRITER_WITH_KEY(0x02), "Application-defined writer (with key)" },1590 { ENTITYKIND_APPDEF_WRITER_NO_KEY(0x03), "Application-defined writer (no key)" },1591 { ENTITYKIND_APPDEF_READER_WITH_KEY(0x07), "Application-defined reader (with key)" },1592 { ENTITYKIND_APPDEF_READER_NO_KEY(0x04), "Application-defined reader (no key)" },1593 { ENTITYKIND_BUILTIN_PARTICIPANT(0xc1), "Built-in participant" },1594 { ENTITYKIND_BUILTIN_WRITER_WITH_KEY(0xc2), "Built-in writer (with key)" },1595 { ENTITYKIND_BUILTIN_WRITER_NO_KEY(0xc3), "Built-in writer (no key)" },1596 { ENTITYKIND_BUILTIN_READER_WITH_KEY(0xc7), "Built-in reader (with key)" },1597 { ENTITYKIND_BUILTIN_READER_NO_KEY(0xc4), "Built-in reader (no key)" },1598 { ENTITYKIND_RTI_BUILTIN_WRITER_WITH_KEY(0x82), "RTI Built-in writer (with key)" },1599 { ENTITYKIND_RTI_BUILTIN_WRITER_NO_KEY(0x83), "RTI Built-in writer (no key)" },1600 { ENTITYKIND_RTI_BUILTIN_READER_WITH_KEY(0x87), "RTI Built-in reader (with key)" },1601 { ENTITYKIND_RTI_BUILTIN_READER_NO_KEY(0x84), "RTI Built-in reader (no key)" },1602 { ENTITYID_OBJECT_NORMAL_META_WRITER_GROUP(0x88), "Object normal meta writer group" },1603 { ENTITYID_OBJECT_NORMAL_META_READER_GROUP(0x89), "Object normal meta reader group" },1604 { ENTITYID_OBJECT_NORMAL_META_TOPIC(0x8a), "Object normal meta topic" },1605 1606 { ENTITYID_RESERVED_META_CST_GROUP_WRITER(0xcb), "Reserved meta CST group writer" },1607 { ENTITYID_RESERVED_META_GROUP_WRITER(0xcc), "Reserved meta group writer" },1608 { ENTITYID_RESERVED_META_GROUP_READER(0xcd), "Reserved meta group reader" },1609 { ENTITYID_RESERVED_META_CST_GROUP_READER(0xce), "Reserved meta CST group reader" },1610 { ENTITYID_NORMAL_META_CST_GROUP_WRITER(0x8b), "Normal meta CST group writer" },1611 { ENTITYID_NORMAL_META_GROUP_WRITER(0x8c), "Normal meta group writer" },1612 { ENTITYID_NORMAL_META_GROUP_READER(0x8d), "Normal meta group reader" },1613 { ENTITYID_NORMAL_META_CST_GROUP_READER(0x8e), "Normal meta CST group reader" },1614 { ENTITYID_RESERVED_USER_CST_GROUP_WRITER(0x4b), "Reserved user CST group writer" },1615 { ENTITYID_RESERVED_USER_GROUP_WRITER(0x4c), "Reserved user group writer" },1616 { ENTITYID_RESERVED_USER_GROUP_READER(0x4d), "Reserved user group reader" },1617 { ENTITYID_RESERVED_USER_CST_GROUP_READER(0x4e), "Reserved user CST group reader" },1618 { ENTITYID_NORMAL_USER_CST_GROUP_WRITER(0x0b), "Normal user CST group writer" },1619 { ENTITYID_NORMAL_USER_GROUP_WRITER(0x0c), "Normal user writer" },1620 { ENTITYID_NORMAL_USER_GROUP_READER(0x0d), "Normal user reader" },1621 { ENTITYID_NORMAL_USER_CST_GROUP_READER(0x0e), "Normal user CST group reader" },1622 { 0, NULL((void*)0) }1623};1624 1625 1626static const value_string nature_type_vals[] = {1627 { PORT_METATRAFFIC_UNICAST(0), "UNICAST_METATRAFFIC"},1628 { PORT_METATRAFFIC_MULTICAST(2), "MULTICAST_METATRAFFIC"},1629 { PORT_USERTRAFFIC_UNICAST(3), "UNICAST_USERTRAFFIC"},1630 { PORT_USERTRAFFIC_MULTICAST(1), "MULTICAST_USERTRAFFIC"},1631 { 0, NULL((void*)0) }1632};1633 1634 1635static const value_string app_kind_vals[] = {1636 { APPKIND_UNKNOWN(0x00), "APPKIND_UNKNOWN" },1637 { APPKIND_MANAGED_APPLICATION(0x01), "ManagedApplication" },1638 { APPKIND_MANAGER(0x02), "Manager" },1639 { 0, NULL((void*)0) }1640};1641 1642static const value_string rtps_locator_kind_vals[] = {1643 { LOCATOR_KIND_UDPV4(1), "LOCATOR_KIND_UDPV4" },1644 { LOCATOR_KIND_UDPV6(2), "LOCATOR_KIND_UDPV6" },1645 { LOCATOR_KIND_INVALID(-1), "LOCATOR_KIND_INVALID" },1646 { LOCATOR_KIND_DTLS(6), "LOCATOR_KIND_DTLS" },1647 { LOCATOR_KIND_TCPV4_LAN(8), "LOCATOR_KIND_TCPV4_LAN" },1648 { LOCATOR_KIND_TCPV4_WAN(9), "LOCATOR_KIND_TCPV4_WAN" },1649 { LOCATOR_KIND_TLSV4_LAN(10), "LOCATOR_KIND_TLSV4_LAN" },1650 { LOCATOR_KIND_TLSV4_WAN(11), "LOCATOR_KIND_TLSV4_WAN" },1651 { LOCATOR_KIND_SHMEM(0x01000000), "LOCATOR_KIND_SHMEM" },1652 { LOCATOR_KIND_TUDPV4(0x01001001), "LOCATOR_KIND_TUDPV4" },1653 { LOCATOR_KIND_RESERVED(0), "LOCATOR_KIND_RESERVED" },1654 { LOCATOR_KIND_UDPV4_WAN(0x01000001), "LOCATOR_KIND_UDPV4_WAN" },1655 { 0, NULL((void*)0) }1656};1657 1658static const value_string submessage_id_vals[] = {1659 { SUBMESSAGE_PAD(0x01), "PAD" },1660 { SUBMESSAGE_DATA(0x02), "DATA" },1661 { SUBMESSAGE_NOKEY_DATA(0x03), "NOKEY_DATA" },1662 { SUBMESSAGE_ACKNACK(0x06), "ACKNACK" },1663 { SUBMESSAGE_HEARTBEAT(0x07), "HEARTBEAT" },1664 { SUBMESSAGE_GAP(0x08), "GAP" },1665 { SUBMESSAGE_INFO_TS(0x09), "INFO_TS" },1666 { SUBMESSAGE_INFO_SRC(0x0c), "INFO_SRC" },1667 { SUBMESSAGE_INFO_REPLY_IP4(0x0d), "INFO_REPLY_IP4" },1668 { SUBMESSAGE_INFO_DST(0x0e), "INFO_DST" },1669 { SUBMESSAGE_INFO_REPLY(0x0f), "INFO_REPLY" },1670 { 0, NULL((void*)0) }1671};1672 1673static const value_string submessage_id_valsv2[] = {1674 { SUBMESSAGE_HEADER_EXTENSION(0x0), "HEADER_EXTENSION" },1675 { SUBMESSAGE_PAD(0x01), "PAD" },1676 { SUBMESSAGE_RTPS_DATA(0x15), "DATA" },1677 { SUBMESSAGE_RTPS_DATA_FRAG(0x16), "DATA_FRAG" },1678 { SUBMESSAGE_RTI_DATA_FRAG_SESSION(0x81), "DATA_FRAG_SESSION" },1679 { SUBMESSAGE_RTPS_DATA_BATCH(0x18), "DATA_BATCH" },1680 { SUBMESSAGE_ACKNACK(0x06), "ACKNACK" },1681 { SUBMESSAGE_HEARTBEAT(0x07), "HEARTBEAT" },1682 { SUBMESSAGE_GAP(0x08), "GAP" },1683 { SUBMESSAGE_INFO_TS(0x09), "INFO_TS" },1684 { SUBMESSAGE_INFO_SRC(0x0c), "INFO_SRC" },1685 { SUBMESSAGE_INFO_REPLY_IP4(0x0d), "INFO_REPLY_IP4" },1686 { SUBMESSAGE_INFO_DST(0x0e), "INFO_DST" },1687 { SUBMESSAGE_INFO_REPLY(0x0f), "INFO_REPLY" },1688 { SUBMESSAGE_NACK_FRAG(0x12), "NACK_FRAG" },1689 { SUBMESSAGE_HEARTBEAT_FRAG(0x13), "HEARTBEAT_FRAG" },1690 { SUBMESSAGE_ACKNACK_BATCH(0x17), "ACKNACK_BATCH" },1691 { SUBMESSAGE_HEARTBEAT_BATCH(0x19), "HEARTBEAT_BATCH" },1692 { SUBMESSAGE_ACKNACK_SESSION(0x1a), "ACKNACK_SESSION" },1693 { SUBMESSAGE_HEARTBEAT_SESSION(0x1b), "HEARTBEAT_SESSION" },1694 { SUBMESSAGE_RTPS_DATA_SESSION(0x14), "DATA_SESSION" },1695 { SUBMESSAGE_APP_ACK(0x1c), "APP_ACK" },1696 { SUBMESSAGE_APP_ACK_CONF(0x1d), "APP_ACK_CONF" },1697 { SUBMESSAGE_HEARTBEAT_VIRTUAL(0x1e), "HEARTBEAT_VIRTUAL" },1698 { SUBMESSAGE_SEC_BODY(0x30), "SEC_BODY" },1699 { SUBMESSAGE_SEC_PREFIX(0x31), "SEC_PREFIX" },1700 { SUBMESSAGE_SEC_POSTFIX(0x32), "SEC_POSTFIX" },1701 { SUBMESSAGE_SRTPS_PREFIX(0x33), "SRTPS_PREFIX" },1702 { SUBMESSAGE_SRTPS_POSTFIX(0x34), "SRTPS_POSTFIX" },1703 /* Deprecated submessages */1704 { SUBMESSAGE_DATA(0x02), "DATA_deprecated" },1705 { SUBMESSAGE_NOKEY_DATA(0x03), "NOKEY_DATA_deprecated" },1706 { SUBMESSAGE_DATA_FRAG(0x10), "DATA_FRAG_deprecated" },1707 { SUBMESSAGE_NOKEY_DATA_FRAG(0x11), "NOKEY_DATA_FRAG_deprecated" },1708 { 0, NULL((void*)0) }1709};1710 1711static const value_string submessage_id_rti[] = {1712 { SUBMESSAGE_RTI_CRC(0x80), "RTI_CRC" },1713 { SUBMESSAGE_RTI_UDP_WAN_BINDING_PING(0x82), "RTI_BINDING_PING" },1714 { SUBMESSAGE_RTI_DATA_FRAG_SESSION(0x81), "DATA_FRAG_SESSION" },1715 { 0, NULL((void*)0) }1716};1717 1718#if 01719static const value_string typecode_kind_vals[] = {1720 { RTI_CDR_TK_NULL, "(unknown)" },1721 { RTI_CDR_TK_SHORT, "short" },1722 { RTI_CDR_TK_LONG, "long" },1723 { RTI_CDR_TK_USHORT, "unsigned short" },1724 { RTI_CDR_TK_ULONG, "unsigned long" },1725 { RTI_CDR_TK_FLOAT, "float" },1726 { RTI_CDR_TK_DOUBLE, "double" },1727 { RTI_CDR_TK_BOOLEAN, "boolean" },1728 { RTI_CDR_TK_CHAR, "char" },1729 { RTI_CDR_TK_OCTET, "octet" },1730 { RTI_CDR_TK_STRUCT, "struct" },1731 { RTI_CDR_TK_UNION, "union" },1732 { RTI_CDR_TK_ENUM, "enum" },1733 { RTI_CDR_TK_STRING, "string" },1734 { RTI_CDR_TK_SEQUENCE, "sequence" },1735 { RTI_CDR_TK_ARRAY, "array" },1736 { RTI_CDR_TK_ALIAS, "alias" },1737 { RTI_CDR_TK_LONGLONG, "long long" },1738 { RTI_CDR_TK_ULONGLONG, "unsigned long long" },1739 { RTI_CDR_TK_LONGDOUBLE, "long double" },1740 { RTI_CDR_TK_WCHAR, "wchar" },1741 { RTI_CDR_TK_WSTRING, "wstring" },1742 { 0, NULL((void*)0) }1743};1744#endif1745 1746static const value_string parameter_id_vals[] = {1747 { PID_PAD(0x00), "PID_PAD" },1748 { PID_SENTINEL(0x01), "PID_SENTINEL" },1749 { PID_USER_DATA(0x2c), "PID_USER_DATA" },1750 { PID_TOPIC_NAME(0x05), "PID_TOPIC_NAME" },1751 { PID_TYPE_NAME(0x07), "PID_TYPE_NAME" },1752 { PID_GROUP_DATA(0x2d), "PID_GROUP_DATA" },1753 { PID_DEADLINE(0x23), "PID_DEADLINE" },1754 { PID_DEADLINE_OFFERED(0x24), "PID_DEADLINE_OFFERED [deprecated]" },1755 { PID_PARTICIPANT_LEASE_DURATION(0x02), "PID_PARTICIPANT_LEASE_DURATION" },1756 { PID_PERSISTENCE(0x03), "PID_PERSISTENCE" },1757 { PID_TIME_BASED_FILTER(0x04), "PID_TIME_BASED_FILTER" },1758 { PID_OWNERSHIP_STRENGTH(0x06), "PID_OWNERSHIP_STRENGTH" },1759 { PID_TYPE_CHECKSUM(0x08), "PID_TYPE_CHECKSUM [deprecated]" },1760 { PID_TYPE2_NAME(0x09), "PID_TYPE2_NAME [deprecated]" },1761 { PID_TYPE2_CHECKSUM(0x0a), "PID_TYPE2_CHECKSUM [deprecated]" },1762 { PID_METATRAFFIC_MULTICAST_IPADDRESS(0x0b),"PID_METATRAFFIC_MULTICAST_IPADDRESS"},1763 { PID_DEFAULT_UNICAST_IPADDRESS(0x0c), "PID_DEFAULT_UNICAST_IPADDRESS" },1764 { PID_METATRAFFIC_UNICAST_PORT(0x0d), "PID_METATRAFFIC_UNICAST_PORT" },1765 { PID_DEFAULT_UNICAST_PORT(0x0e), "PID_DEFAULT_UNICAST_PORT" },1766 { PID_EXPECTS_ACK(0x10), "PID_EXPECTS_ACK" },1767 { PID_MULTICAST_IPADDRESS(0x11), "PID_MULTICAST_IPADDRESS" },1768 { PID_MANAGER_KEY(0x12), "PID_MANAGER_KEY [deprecated]" },1769 { PID_SEND_QUEUE_SIZE(0x13), "PID_SEND_QUEUE_SIZE" },1770 { PID_RELIABILITY_ENABLED(0x14), "PID_RELIABILITY_ENABLED" },1771 { PID_PROTOCOL_VERSION(0x15), "PID_PROTOCOL_VERSION" },1772 { PID_VENDOR_ID(0x16), "PID_VENDOR_ID" },1773 { PID_VARGAPPS_SEQUENCE_NUMBER_LAST(0x17), "PID_VARGAPPS_SEQUENCE_NUMBER_LAST [deprecated]" },1774 { PID_RECV_QUEUE_SIZE(0x18), "PID_RECV_QUEUE_SIZE [deprecated]" },1775 { PID_RELIABILITY_OFFERED(0x19), "PID_RELIABILITY_OFFERED [deprecated]" },1776 { PID_RELIABILITY(0x1a), "PID_RELIABILITY" },1777 { PID_LIVELINESS(0x1b), "PID_LIVELINESS" },1778 { PID_LIVELINESS_OFFERED(0x1c), "PID_LIVELINESS_OFFERED [deprecated]" },1779 { PID_DURABILITY(0x1d), "PID_DURABILITY" },1780 { PID_DURABILITY_SERVICE(0x1e), "PID_DURABILITY_SERVICE" },1781 { PID_PRESENTATION_OFFERED(0x22), "PID_PRESENTATION_OFFERED [deprecated]" },1782 { PID_OWNERSHIP(0x1f), "PID_OWNERSHIP" },1783 { PID_OWNERSHIP_OFFERED(0x20), "PID_OWNERSHIP_OFFERED [deprecated]" },1784 { PID_PRESENTATION(0x21), "PID_PRESENTATION" },1785 { PID_DESTINATION_ORDER(0x25), "PID_DESTINATION_ORDER" },1786 { PID_DESTINATION_ORDER_OFFERED(0x26), "PID_DESTINATION_ORDER_OFFERED [deprecated]" },1787 { PID_LATENCY_BUDGET(0x27), "PID_LATENCY_BUDGET" },1788 { PID_LATENCY_BUDGET_OFFERED(0x28), "PID_LATENCY_BUDGET_OFFERED [deprecated]" },1789 { PID_PARTITION(0x29), "PID_PARTITION" },1790 { PID_PARTITION_OFFERED(0x2a), "PID_PARTITION_OFFERED [deprecated]" },1791 { PID_LIFESPAN(0x2b), "PID_LIFESPAN" },1792 { PID_TOPIC_DATA(0x2e), "PID_TOPIC_DATA" },1793 { PID_UNICAST_LOCATOR(0x2f), "PID_UNICAST_LOCATOR" },1794 { PID_MULTICAST_LOCATOR(0x30), "PID_MULTICAST_LOCATOR" },1795 { PID_DEFAULT_UNICAST_LOCATOR(0x31), "PID_DEFAULT_UNICAST_LOCATOR" },1796 { PID_METATRAFFIC_UNICAST_LOCATOR(0x32), "PID_METATRAFFIC_UNICAST_LOCATOR" },1797 { PID_METATRAFFIC_MULTICAST_LOCATOR(0x33), "PID_METATRAFFIC_MULTICAST_LOCATOR" },1798 { PID_PARTICIPANT_MANUAL_LIVELINESS_COUNT(0x34), "PID_PARTICIPANT_MANUAL_LIVELINESS_COUNT" },1799 { PID_HISTORY(0x40), "PID_HISTORY" },1800 { PID_RESOURCE_LIMIT(0x41), "PID_RESOURCE_LIMIT" },1801 { PID_METATRAFFIC_MULTICAST_PORT(0x46), "PID_METATRAFFIC_MULTICAST_PORT" },1802 { PID_EXPECTS_INLINE_QOS(0x43), "PID_EXPECTS_INLINE_QOS" },1803 { PID_METATRAFFIC_UNICAST_IPADDRESS(0x45), "PID_METATRAFFIC_UNICAST_IPADDRESS" },1804 { PID_PARTICIPANT_BUILTIN_ENDPOINTS(0x44), "PID_PARTICIPANT_BUILTIN_ENDPOINTS" },1805 { PID_CONTENT_FILTER_PROPERTY(0x35), "PID_CONTENT_FILTER_PROPERTY" },1806 { PID_PROPERTY_LIST_OLD(0x36), "PID_PROPERTY_LIST" },1807 { PID_FILTER_SIGNATURE(0x55), "PID_FILTER_SIGNATURE" },1808 { PID_COHERENT_SET(0x56), "PID_COHERENT_SET" },1809 { PID_TYPECODE(0x47), "PID_TYPECODE" },1810 { PID_PARTICIPANT_GUID(0x50), "PID_PARTICIPANT_GUID" },1811 { PID_PARTICIPANT_ENTITY_ID(0x51), "PID_PARTICIPANT_ENTITY_ID" },1812 { PID_GROUP_GUID(0x52), "PID_GROUP_GUID" },1813 { PID_GROUP_ENTITY_ID(0x53), "PID_GROUP_ENTITY_ID" },1814 { 0, NULL((void*)0) }1815};1816 1817static const value_string parameter_id_inline_qos_rti[] = {1818 { PID_RELATED_ORIGINAL_WRITER_INFO(0x800f), "PID_RELATED_ORIGINAL_WRITER_INFO" },1819 { PID_RELATED_SOURCE_GUID(0x8012), "PID_RELATED_SOURCE_GUID" },1820 { PID_RELATED_READER_GUID(0x8010), "PID_RELATED_READER_GUID" },1821 { PID_SOURCE_GUID(0x8011), "PID_SOURCE_GUID" },1822 { PID_TOPIC_QUERY_GUID(0x8013), "PID_TOPIC_QUERY_GUID" },1823 { PID_SAMPLE_SIGNATURE(0x8019), "PID_SAMPLE_SIGNATURE" },1824 { 0, NULL((void*)0) }1825};1826 1827static const value_string parameter_id_v2_vals[] = {1828 { PID_PAD(0x00), "PID_PAD" },1829 { PID_SENTINEL(0x01), "PID_SENTINEL" },1830 { PID_PARTICIPANT_LEASE_DURATION(0x02), "PID_PARTICIPANT_LEASE_DURATION" },1831 { PID_TIME_BASED_FILTER(0x04), "PID_TIME_BASED_FILTER" },1832 { PID_TOPIC_NAME(0x05), "PID_TOPIC_NAME" },1833 { PID_OWNERSHIP_STRENGTH(0x06), "PID_OWNERSHIP_STRENGTH" },1834 { PID_TYPE_NAME(0x07), "PID_TYPE_NAME" },1835 { PID_METATRAFFIC_MULTICAST_IPADDRESS(0x0b),"PID_METATRAFFIC_MULTICAST_IPADDRESS"},1836 { PID_DEFAULT_UNICAST_IPADDRESS(0x0c), "PID_DEFAULT_UNICAST_IPADDRESS" },1837 { PID_METATRAFFIC_UNICAST_PORT(0x0d), "PID_METATRAFFIC_UNICAST_PORT" },1838 { PID_DEFAULT_UNICAST_PORT(0x0e), "PID_DEFAULT_UNICAST_PORT" },1839 { PID_MULTICAST_IPADDRESS(0x11), "PID_MULTICAST_IPADDRESS" },1840 { PID_PROTOCOL_VERSION(0x15), "PID_PROTOCOL_VERSION" },1841 { PID_VENDOR_ID(0x16), "PID_VENDOR_ID" },1842 { PID_RELIABILITY(0x1a), "PID_RELIABILITY" },1843 { PID_LIVELINESS(0x1b), "PID_LIVELINESS" },1844 { PID_DURABILITY(0x1d), "PID_DURABILITY" },1845 { PID_DURABILITY_SERVICE(0x1e), "PID_DURABILITY_SERVICE" },1846 { PID_OWNERSHIP(0x1f), "PID_OWNERSHIP" },1847 { PID_PRESENTATION(0x21), "PID_PRESENTATION" },1848 { PID_DEADLINE(0x23), "PID_DEADLINE" },1849 { PID_DESTINATION_ORDER(0x25), "PID_DESTINATION_ORDER" },1850 { PID_LATENCY_BUDGET(0x27), "PID_LATENCY_BUDGET" },1851 { PID_PARTITION(0x29), "PID_PARTITION" },1852 { PID_LIFESPAN(0x2b), "PID_LIFESPAN" },1853 { PID_USER_DATA(0x2c), "PID_USER_DATA" },1854 { PID_GROUP_DATA(0x2d), "PID_GROUP_DATA" },1855 { PID_TOPIC_DATA(0x2e), "PID_TOPIC_DATA" },1856 { PID_UNICAST_LOCATOR(0x2f), "PID_UNICAST_LOCATOR" },1857 { PID_MULTICAST_LOCATOR(0x30), "PID_MULTICAST_LOCATOR" },1858 { PID_DEFAULT_UNICAST_LOCATOR(0x31), "PID_DEFAULT_UNICAST_LOCATOR" },1859 { PID_METATRAFFIC_UNICAST_LOCATOR(0x32), "PID_METATRAFFIC_UNICAST_LOCATOR" },1860 { PID_METATRAFFIC_MULTICAST_LOCATOR(0x33), "PID_METATRAFFIC_MULTICAST_LOCATOR" },1861 { PID_PARTICIPANT_MANUAL_LIVELINESS_COUNT(0x34), "PID_PARTICIPANT_MANUAL_LIVELINESS_COUNT" },1862 { PID_CONTENT_FILTER_PROPERTY(0x35), "PID_CONTENT_FILTER_PROPERTY" },1863 { PID_PROPERTY_LIST(0x0059), "PID_PROPERTY_LIST" },1864 { PID_HISTORY(0x40), "PID_HISTORY" },1865 { PID_RESOURCE_LIMIT(0x41), "PID_RESOURCE_LIMIT" },1866 { PID_EXPECTS_INLINE_QOS(0x43), "PID_EXPECTS_INLINE_QOS" },1867 { PID_PARTICIPANT_BUILTIN_ENDPOINTS(0x44), "PID_PARTICIPANT_BUILTIN_ENDPOINTS" },1868 { PID_METATRAFFIC_UNICAST_IPADDRESS(0x45), "PID_METATRAFFIC_UNICAST_IPADDRESS" },1869 { PID_METATRAFFIC_MULTICAST_PORT(0x46), "PID_METATRAFFIC_MULTICAST_PORT" },1870 { PID_DEFAULT_MULTICAST_LOCATOR(0x0048), "PID_DEFAULT_MULTICAST_LOCATOR" },1871 { PID_TRANSPORT_PRIORITY(0x0049), "PID_TRANSPORT_PRIORITY" },1872 { PID_PARTICIPANT_GUID(0x50), "PID_PARTICIPANT_GUID" },1873 { PID_PARTICIPANT_ENTITY_ID(0x51), "PID_PARTICIPANT_ENTITY_ID" },1874 { PID_GROUP_GUID(0x52), "PID_GROUP_GUID" },1875 { PID_GROUP_ENTITY_ID(0x53), "PID_GROUP_ENTITY_ID" },1876 { PID_CONTENT_FILTER_INFO(0x0055), "PID_CONTENT_FILTER_INFO" },1877 { PID_COHERENT_SET(0x56), "PID_COHERENT_SET" },1878 { PID_DIRECTED_WRITE(0x0057), "PID_DIRECTED_WRITE" },1879 { PID_BUILTIN_ENDPOINT_SET(0x0058), "PID_BUILTIN_ENDPOINT_SET" },1880 { PID_PROPERTY_LIST_OLD(0x36), "PID_PROPERTY_LIST" },1881 { PID_ENDPOINT_GUID(0x005a), "PID_ENDPOINT_GUID" },1882 { PID_TYPE_MAX_SIZE_SERIALIZED(0x0060), "PID_TYPE_MAX_SIZE_SERIALIZED" },1883 { PID_ORIGINAL_WRITER_INFO(0x0061), "PID_ORIGINAL_WRITER_INFO" },1884 { PID_ENTITY_NAME(0x0062), "PID_ENTITY_NAME" },1885 { PID_KEY_HASH(0x0070), "PID_KEY_HASH" },1886 { PID_STATUS_INFO(0x0071), "PID_STATUS_INFO" },1887 { PID_DATA_REPRESENTATION(0x0073), "PID_DATA_REPRESENTATION" },1888 { PID_TYPE_CONSISTENCY(0x0074), "PID_TYPE_CONSISTENCY" },1889 { PID_BUILTIN_ENDPOINT_QOS(0x0077), "PID_BUILTIN_ENDPOINT_QOS" },1890 { PID_ENABLE_AUTHENTICATION(0x0078), "PID_ENABLE_AUTHENTICATION" },1891 { PID_IDENTITY_TOKEN(0x1001), "PID_IDENTITY_TOKEN" },1892 { PID_PERMISSIONS_TOKEN(0x1002), "PID_PERMISSIONS_TOKEN" },1893 { PID_DATA_TAGS(0x1003), "PID_DATA_TAGS" },1894 { PID_ENDPOINT_SECURITY_INFO(0x1004), "PID_ENDPOINT_SECURITY_INFO" },1895 { PID_PARTICIPANT_SECURITY_INFO(0x1005), "PID_PARTICIPANT_SECURITY_INFO" },1896 { PID_PARTICIPANT_SECURITY_DIGITAL_SIGNATURE_ALGO(0x1010), "PID_PARTICIPANT_SECURITY_DIGITAL_SIGNATURE_ALGO" },1897 { PID_PARTICIPANT_SECURITY_KEY_ESTABLISHMENT_ALGO(0x1011), "PID_PARTICIPANT_SECURITY_KEY_ESTABLISHMENT_ALGO" },1898 { PID_PARTICIPANT_SECURITY_SYMMETRIC_CIPHER_ALGO(0x1012), "PID_PARTICIPANT_SECURITY_SYMMETRIC_CIPHER_ALGO" },1899 { PID_ENDPOINT_SECURITY_SYMMETRIC_CIPHER_ALGO(0x1013), "PID_ENDPOINT_SECURITY_SYMMETRIC_CIPHER_ALGO" },1900 { PID_IDENTITY_STATUS_TOKEN(0x1006), "PID_IDENTITY_STATUS_TOKEN"},1901 { PID_DOMAIN_ID(0x000f), "PID_DOMAIN_ID" },1902 { PID_DOMAIN_TAG(0x4014), "PID_DOMAIN_TAG" },1903 { PID_GROUP_COHERENT_SET(0x0063), "PID_GROUP_COHERENT_SET" },1904 { PID_END_COHERENT_SET(0x8022), "PID_END_COHERENT_SET" },1905 { PID_END_GROUP_COHERENT_SET(0x8023), "PID_END_GROUP_COHERENT_SET" },1906 { MIG_RTPS_PID_END_COHERENT_SET_SAMPLE_COUNT(0x8024), "MIG_RTPS_PID_END_COHERENT_SET_SAMPLE_COUNT" },1907 1908 /* The following PID are deprecated */1909 { PID_DEADLINE_OFFERED(0x24), "PID_DEADLINE_OFFERED [deprecated]" },1910 { PID_PERSISTENCE(0x03), "PID_PERSISTENCE [deprecated]" },1911 { PID_TYPE_CHECKSUM(0x08), "PID_TYPE_CHECKSUM [deprecated]" },1912 { PID_TYPE2_NAME(0x09), "PID_TYPE2_NAME [deprecated]" },1913 { PID_TYPE2_CHECKSUM(0x0a), "PID_TYPE2_CHECKSUM [deprecated]" },1914 { PID_EXPECTS_ACK(0x10), "PID_EXPECTS_ACK [deprecated]" },1915 { PID_MANAGER_KEY(0x12), "PID_MANAGER_KEY [deprecated]" },1916 { PID_SEND_QUEUE_SIZE(0x13), "PID_SEND_QUEUE_SIZE [deprecated]" },1917 { PID_RELIABILITY_ENABLED(0x14), "PID_RELIABILITY_ENABLED [deprecated]" },1918 { PID_VARGAPPS_SEQUENCE_NUMBER_LAST(0x17), "PID_VARGAPPS_SEQUENCE_NUMBER_LAST [deprecated]" },1919 { PID_RECV_QUEUE_SIZE(0x18), "PID_RECV_QUEUE_SIZE [deprecated]" },1920 { PID_RELIABILITY_OFFERED(0x19), "PID_RELIABILITY_OFFERED [deprecated]" },1921 { PID_LIVELINESS_OFFERED(0x1c), "PID_LIVELINESS_OFFERED [deprecated]" },1922 { PID_PRESENTATION_OFFERED(0x22), "PID_PRESENTATION_OFFERED [deprecated]" },1923 { PID_OWNERSHIP_OFFERED(0x20), "PID_OWNERSHIP_OFFERED [deprecated]" },1924 { PID_DESTINATION_ORDER_OFFERED(0x26), "PID_DESTINATION_ORDER_OFFERED [deprecated]" },1925 { PID_LATENCY_BUDGET_OFFERED(0x28), "PID_LATENCY_BUDGET_OFFERED [deprecated]" },1926 { PID_PARTITION_OFFERED(0x2a), "PID_PARTITION_OFFERED [deprecated]" },1927 { PID_EXTENDED(0x3f01), "PID_EXTENDED" },1928 { 0, NULL((void*)0) }1929};1930 1931static const value_string parameter_id_rti_vals[] = {1932 /* Vendor specific: RTI */1933 { PID_PRODUCT_VERSION(0x8000), "PID_PRODUCT_VERSION" },1934 { PID_PLUGIN_PROMISCUITY_KIND(0x8001), "PID_PLUGIN_PROMISCUITY_KIND" },1935 { PID_ENTITY_VIRTUAL_GUID(0x8002), "PID_ENTITY_VIRTUAL_GUID" },1936 { PID_SERVICE_KIND(0x8003), "PID_SERVICE_KIND" },1937 { PID_TYPECODE_RTPS2(0x8004), "PID_TYPECODE" },1938 { PID_DISABLE_POSITIVE_ACKS(0x8005), "PID_DISABLE_POSITIVE_ACKS" },1939 { PID_LOCATOR_FILTER_LIST(0x8006), "PID_LOCATOR_FILTER_LIST" },1940 { PID_ROLE_NAME(0x800a), "PID_ROLE_NAME"},1941 { PID_ACK_KIND(0x800b), "PID_ACK_KIND" },1942 { PID_PEER_HOST_EPOCH(0x800e), "PID_PEER_HOST_EPOCH" },1943 { PID_TRANSPORT_INFO_LIST(0x8010), "PID_TRANSPORT_INFO_LIST" },1944 { PID_DIRECT_COMMUNICATION(0x8011), "PID_DIRECT_COMMUNICATION" },1945 { PID_TYPE_OBJECT(0x0072), "PID_TYPE_OBJECT" },1946 { PID_EXPECTS_VIRTUAL_HB(0x8009), "PID_EXPECTS_VIRTUAL_HB" },1947 { PID_RTI_DOMAIN_ID(0x800f), "PID_RTI_DOMAIN_ID" },1948 { PID_TOPIC_QUERY_PUBLICATION(0x8014), "PID_TOPIC_QUERY_PUBLICATION" },1949 { PID_ENDPOINT_PROPERTY_CHANGE_EPOCH(0x8015), "PID_ENDPOINT_PROPERTY_CHANGE_EPOCH" },1950 { PID_REACHABILITY_LEASE_DURATION(0x8016), "PID_REACHABILITY_LEASE_DURATION" },1951 { PID_VENDOR_BUILTIN_ENDPOINT_SET(0x8017), "PID_VENDOR_BUILTIN_ENDPOINT_SET" },1952 { PID_ENDPOINT_SECURITY_ATTRIBUTES(0x8018), "PID_ENDPOINT_SECURITY_ATTRIBUTES" },1953 { PID_TYPE_OBJECT_LB(0x8021), "PID_TYPE_OBJECT_LB" },1954 { PID_UNICAST_LOCATOR_EX(0x8007), "PID_UNICAST_LOCATOR_EX"},1955 { 0, NULL((void*)0) }1956};1957static const value_string parameter_id_toc_vals[] = {1958 /* Vendor specific: Twin Oaks Computing */1959 { PID_TYPECODE_RTPS2(0x8004), "PID_TYPECODE_RTPS2" },1960 { 0, NULL((void*)0) }1961};1962 1963static const value_string parameter_id_adl_vals[] = {1964 /* Vendor specific: ADLink Ltd. */1965 { PID_ADLINK_WRITER_INFO(0x8001), "PID_ADLINK_WRITER_INFO" },1966 { PID_ADLINK_READER_DATA_LIFECYCLE(0x8002), "PID_ADLINK_READER_DATA_LIFECYCLE" },1967 { PID_ADLINK_WRITER_DATA_LIFECYCLE(0x8003), "PID_ADLINK_WRITER_DATA_LIFECYCLE" },1968 { PID_ADLINK_ENDPOINT_GUID(0x8004), "PID_ADLINK_ENDPOINT_GUID" },1969 { PID_ADLINK_SYNCHRONOUS_ENDPOINT(0x8005), "PID_ADLINK_SYNCHRONOUS_ENDPOINT" },1970 { PID_ADLINK_RELAXED_QOS_MATCHING(0x8006), "PID_ADLINK_RELAXED_QOS_MATCHING" },1971 { PID_ADLINK_PARTICIPANT_VERSION_INFO(0x8007), "PID_ADLINK_PARTICIPANT_VERSION_INFO" },1972 { PID_ADLINK_NODE_NAME(0x8008), "PID_ADLINK_NODE_NAME" },1973 { PID_ADLINK_EXEC_NAME(0x8009), "PID_ADLINK_EXEC_NAME" },1974 { PID_ADLINK_PROCESS_ID(0x800a), "PID_ADLINK_PROCESS_ID" },1975 { PID_ADLINK_SERVICE_TYPE(0x800b), "PID_ADLINK_SERVICE_TYPE" },1976 { PID_ADLINK_ENTITY_FACTORY(0x800c), "PID_ADLINK_ENTITY_FACTORY" },1977 { PID_ADLINK_WATCHDOG_SCHEDULING(0x800d), "PID_ADLINK_WATCHDOG_SCHEDULING" },1978 { PID_ADLINK_LISTENER_SCHEDULING(0x800e), "PID_ADLINK_LISTENER_SCHEDULING" },1979 { PID_ADLINK_SUBSCRIPTION_KEYS(0x800f), "PID_ADLINK_SUBSCRIPTION_KEYS" },1980 { PID_ADLINK_READER_LIFESPAN(0x8010), "PID_ADLINK_READER_LIFESPAN" },1981 { PID_ADLINK_SHARE(0x8011), "PID_ADLINK_SHARE" },1982 { PID_ADLINK_TYPE_DESCRIPTION(0x8012), "PID_ADLINK_TYPE_DESCRIPTION" },1983 { PID_ADLINK_LAN_ID(0x8013), "PID_ADLINK_LAN_ID" },1984 { PID_ADLINK_ENDPOINT_GID(0x8014), "PID_ADLINK_ENDPOINT_GID" },1985 { PID_ADLINK_GROUP_GID(0x8015), "PID_ADLINK_GROUP_GID" },1986 { PID_ADLINK_EOTINFO(0x8016), "PID_ADLINK_EOTINFO" },1987 { PID_ADLINK_PART_CERT_NAME(0x8017), "PID_ADLINK_PART_CERT_NAME" },1988 { PID_ADLINK_LAN_CERT_NAME(0x8018), "PID_ADLINK_LAN_CERT_NAME" },1989 { 0, NULL((void*)0) }1990};1991 1992static const value_string liveliness_qos_vals[] = {1993 { LIVELINESS_AUTOMATIC(0), "AUTOMATIC_LIVELINESS_QOS" },1994 { LIVELINESS_BY_PARTICIPANT(1), "MANUAL_BY_PARTICIPANT_LIVELINESS_QOS" },1995 { LIVELINESS_BY_TOPIC(2), "MANUAL_BY_TOPIC_LIVELINESS_QOS" },1996 { 0, NULL((void*)0) }1997};1998 1999static const value_string durability_qos_vals[] = {2000 { DURABILITY_VOLATILE(0), "VOLATILE_DURABILITY_QOS" },2001 { DURABILITY_TRANSIENT_LOCAL(1), "TRANSIENT_LOCAL_DURABILITY_QOS" },2002 { DURABILITY_TRANSIENT(2), "TRANSIENT_DURABILITY_QOS" },2003 { DURABILITY_PERSISTENT(3), "PERSISTENT_DURABILITY_QOS" },2004 { 0, NULL((void*)0) }2005};2006 2007static const value_string ownership_qos_vals[] = {2008 { OWNERSHIP_SHARED(0), "SHARED_OWNERSHIP_QOS" },2009 { OWNERSHIP_EXCLUSIVE(1), "EXCLUSIVE_OWNERSHIP_QOS" },2010 { 0, NULL((void*)0) }2011};2012 2013static const value_string presentation_qos_vals[] = {2014 { PRESENTATION_INSTANCE(0), "INSTANCE_PRESENTATION_QOS" },2015 { PRESENTATION_TOPIC(1), "TOPIC_PRESENTATION_QOS" },2016 { PRESENTATION_GROUP(2), "GROUP_PRESENTATION_QOS" },2017 { 0, NULL((void*)0) }2018};2019 2020static const value_string history_qos_vals[] = {2021 { HISTORY_KIND_KEEP_LAST(0), "KEEP_LAST_HISTORY_QOS" },2022 { HISTORY_KIND_KEEP_ALL(1), "KEEP_ALL_HISTORY_QOS" },2023 { 0, NULL((void*)0) }2024};2025 2026static const value_string reliability_qos_vals[] = {2027 { RELIABILITY_BEST_EFFORT(1), "BEST_EFFORT_RELIABILITY_QOS" },2028 { RELIABILITY_RELIABLE(2), "RELIABLE_RELIABILITY_QOS" },2029 { 0, NULL((void*)0) }2030};2031 2032static const value_string destination_order_qos_vals[] = {2033 { BY_RECEPTION_TIMESTAMP(0), "BY_RECEPTION_TIMESTAMP_DESTINATIONORDER_QOS" },2034 { BY_SOURCE_TIMESTAMP(1), "BY_SOURCE_TIMESTAMP_DESTINATIONORDER_QOS" },2035 { 0, NULL((void*)0) }2036};2037 2038static const value_string encapsulation_id_vals[] = {2039 { ENCAPSULATION_CDR_BE(0x0000), "CDR_BE" },2040 { ENCAPSULATION_CDR_LE(0x0001), "CDR_LE" },2041 { ENCAPSULATION_PL_CDR_BE(0x0002), "PL_CDR_BE" },2042 { ENCAPSULATION_PL_CDR_LE(0x0003), "PL_CDR_LE" },2043 { ENCAPSULATION_CDR2_BE(0x0006), "CDR2_BE" },2044 { ENCAPSULATION_CDR2_LE(0x0007), "CDR2_LE" },2045 { ENCAPSULATION_D_CDR2_BE(0x0008), "D_CDR2_BE" },2046 { ENCAPSULATION_D_CDR2_LE(0x0009), "D_CDR2_LE" },2047 { ENCAPSULATION_PL_CDR2_BE(0x000a), "PL_CDR2_BE" },2048 { ENCAPSULATION_PL_CDR2_LE(0x000b), "PL_CDR2_LE" },2049 { ENCAPSULATION_SHMEM_REF_PLAIN(0xC000), "SHMEM_REF_PLAIN" },2050 { ENCAPSULATION_SHMEM_REF_FLAT_DATA(0xC001), "SHMEM_REF_PLAIN" },2051 { 0, NULL((void*)0) }2052};2053 2054static const value_string data_representation_kind_vals[] = {2055 { 0, "XCDR_DATA_REPRESENTATION" },2056 { 1, "XML_DATA_REPRESENTATION" },2057 { 2, "XCDR2_DATA_REPRESENTATION" },2058 { 0, NULL((void*)0) }2059};2060 2061static const value_string plugin_promiscuity_kind_vals[] = {2062 { 0x0001, "MATCHING_REMOTE_ENTITIES_PROMISCUITY" },2063 { 0xffff, "ALL_REMOTE_ENTITIES_PROMISCUITY" },2064 { 0, NULL((void*)0) }2065};2066 2067static const value_string service_kind_vals[] = {2068 { 0x00000000, "NO_SERVICE_QOS" },2069 { 0x00000001, "PERSISTENCE_SERVICE_QOS" },2070 { 0, NULL((void*)0) }2071};2072 2073static const value_string secure_transformation_kind[] = {2074 { CRYPTO_TRANSFORMATION_KIND_NONE(0), "NONE" },2075 { CRYPTO_TRANSFORMATION_KIND_AES128_GMAC(1), "AES128_GMAC" },2076 { CRYPTO_TRANSFORMATION_KIND_AES128_GCM(2), "AES128_GCM" },2077 { CRYPTO_TRANSFORMATION_KIND_AES256_GMAC(3), "AES256_GMAC" },2078 { CRYPTO_TRANSFORMATION_KIND_AES256_GCM(4), "AES256_GCM" },2079 { 0, NULL((void*)0) }2080};2081 2082static const value_string participant_message_data_kind [] = {2083 { PARTICIPANT_MESSAGE_DATA_KIND_UNKNOWN(0x00000000), "PARTICIPANT_MESSAGE_DATA_KIND_UNKNOWN" },2084 { PARTICIPANT_MESSAGE_DATA_KIND_AUTOMATIC_LIVELINESS_UPDATE(0x00000001), "PARTICIPANT_MESSAGE_DATA_KIND_AUTOMATIC_LIVELINESS_UPDATE" },2085 { PARTICIPANT_MESSAGE_DATA_KIND_MANUAL_LIVELINESS_UPDATE(0x00000002), "PARTICIPANT_MESSAGE_DATA_KIND_MANUAL_LIVELINESS_UPDATE" },2086 { 0, NULL((void*)0) }2087};2088 2089/* Vendor specific: RTI */2090static const value_string type_consistency_kind_vals[] = {2091 { DISALLOW_TYPE_COERCION(0), "DISALLOW_TYPE_COERCION" },2092 { ALLOW_TYPE_COERCION(1), "ALLOW_TYPE_COERCION" },2093 { 0, NULL((void*)0) }2094};2095 2096static const value_string service_request_kind[] = {2097 { RTI_SERVICE_REQUEST_ID_UNKNOWN0, "RTI_SERVICE_REQUEST_ID_UNKNOWN" },2098 { RTI_SERVICE_REQUEST_ID_TOPIC_QUERY1, "RTI_SERVICE_REQUEST_ID_TOPIC_QUERY" },2099 { RTI_SERVICE_REQUEST_ID_INSTANCE_STATE3, "RTI_SERVICE_REQUEST_ID_INSTANCE_STATE" },2100 { 0, NULL((void*)0) }2101};2102/* Vendor specific: RTI */2103static const value_string acknowledgement_kind_vals[] = {2104 { PROTOCOL_ACKNOWLEDGMENT(0), "PROTOCOL_ACKNOWLEDGMENT" },2105 { APPLICATION_AUTO_ACKNOWLEDGMENT(1), "APPLICATION_AUTO_ACKNOWLEDGMENT" },2106 { APPLICATION_ORDERED_ACKNOWLEDGMENT(2), "APPLICATION_ORDERED_ACKNOWLEDGMENT" },2107 { APPLICATION_EXPLICIT_ACKNOWLEDGMENT(3), "APPLICATION_EXPLICIT_ACKNOWLEDGMENT" },2108 { 0, NULL((void*)0) }2109};2110 2111static int* const TYPE_FLAG_FLAGS[] = {2112 &hf_rtps_flag_typeflag_nested, /* Bit 2 */2113 &hf_rtps_flag_typeflag_mutable, /* Bit 1 */2114 &hf_rtps_flag_typeflag_final, /* Bit 0 */2115 NULL((void*)0)2116};2117 2118static int* const MEMBER_FLAGS[] = {2119 &hf_rtps_flag_memberflag_union_default, /* Bit 3 */2120 &hf_rtps_flag_memberflag_shareable, /* Bit 2 */2121 &hf_rtps_flag_memberflag_optional, /* Bit 1 */2122 &hf_rtps_flag_memberflag_key, /* Bit 0 */2123 NULL((void*)0)2124};2125 2126static int* const UDPV4_WAN_LOCATOR_FLAGS[] = {2127 &hf_rtps_flag_reserved80, /* Bit 7 */2128 &hf_rtps_flag_reserved40, /* Bit 6 */2129 &hf_rtps_flag_reserved20, /* Bit 5 */2130 &hf_rtps_flag_reserved10, /* Bit 4 */2131 &hf_rtps_flag_udpv4_wan_locator_r, /* Bit 3 */2132 &hf_rtps_flag_udpv4_wan_locator_b, /* Bit 2 */2133 &hf_rtps_flag_udpv4_wan_locator_p, /* Bit 1 */2134 &hf_rtps_flag_udpv4_wan_locator_u, /* Bit 0 */2135 NULL((void*)0)2136};2137 2138static int* const UDPV4_WAN_BINDING_PING_FLAGS[] = {2139 &hf_rtps_flag_reserved80, /* Bit 7 */2140 &hf_rtps_flag_reserved40, /* Bit 6 */2141 &hf_rtps_flag_reserved20, /* Bit 5 */2142 &hf_rtps_flag_reserved10, /* Bit 4 */2143 &hf_rtps_flag_reserved08, /* Bit 3 */2144 &hf_rtps_flag_udpv4_wan_binding_ping_b, /* Bit 2 */2145 &hf_rtps_flag_udpv4_wan_binding_ping_l, /* Bit 1 */2146 &hf_rtps_flag_udpv4_wan_binding_ping_e, /* Bit 0 */2147 NULL((void*)0)2148};2149 2150/* Vendor specific: RTI */2151static const value_string ndds_transport_class_id_vals[] = {2152 { NDDS_TRANSPORT_CLASSID_ANY(0), "ANY" },2153 { NDDS_TRANSPORT_CLASSID_UDPv4(1), "UDPv4" },2154 { NDDS_TRANSPORT_CLASSID_SHMEM(0x01000000), "SHMEM" },2155 { NDDS_TRANSPORT_CLASSID_INTRA(3), "INTRA" },2156 { NDDS_TRANSPORT_CLASSID_UDPv6(2), "UDPv6" },2157 { NDDS_TRANSPORT_CLASSID_DTLS(6), "DTLS" },2158 { NDDS_TRANSPORT_CLASSID_WAN(7), "WAN" },2159 { NDDS_TRANSPORT_CLASSID_TCPV4_LAN(8), "TCPv4_LAN" },2160 { NDDS_TRANSPORT_CLASSID_TCPV4_WAN(9), "TCPv4_WAN" },2161 { NDDS_TRANSPORT_CLASSID_TLSV4_LAN(10), "TLSv4_LAN" },2162 { NDDS_TRANSPORT_CLASSID_TLSV4_WAN(11), "TLSv4_WAN" },2163 { NDDS_TRANSPORT_CLASSID_PCIE(12), "PCIE" },2164 { NDDS_TRANSPORT_CLASSID_ITP(13), "ITP" },2165 { NDDS_TRANSPORT_CLASSID_UDPv4_WAN(0x01000001), "UDPv4_WAN" },2166 { 0, NULL((void*)0) }2167};2168 2169static const value_string class_id_enum_names[] = {2170 { RTI_OSAPI_COMPRESSION_CLASS_ID_NONE(0), "NONE" },2171 { RTI_OSAPI_COMPRESSION_CLASS_ID_ZLIB(1), "ZLIB" },2172 { RTI_OSAPI_COMPRESSION_CLASS_ID_BZIP2(2), "BZIP2" },2173 { RTI_OSAPI_COMPRESSION_CLASS_ID_AUTO(((guint32) 0xffffffff)), "AUTO"},2174 { 0, NULL((void*)0)}2175};2176 2177static const value_string topic_query_selection_kind[] = {2178 { RTPS_TOPIC_QUERY_SELECTION_KIND_HISTORY_SNAPSHOT0, "HISTORY_SNAPSHOT" },2179 { RTPS_TOPIC_QUERY_SELECTION_KIND_CONTINUOUS1, "CONTINUOUS" },2180 { 0, NULL((void*)0)}2181};2182 2183static int* const PAD_FLAGS[] = {2184 &hf_rtps_flag_reserved80, /* Bit 7 */2185 &hf_rtps_flag_reserved40, /* Bit 6 */2186 &hf_rtps_flag_reserved20, /* Bit 5 */2187 &hf_rtps_flag_reserved10, /* Bit 4 */2188 &hf_rtps_flag_reserved08, /* Bit 3 */2189 &hf_rtps_flag_reserved04, /* Bit 2 */2190 &hf_rtps_flag_reserved02, /* Bit 1 */2191 &hf_rtps_flag_endianness, /* Bit 0 */2192 NULL((void*)0)2193};2194 2195static int* const DATA_FLAGSv1[] = {2196 &hf_rtps_flag_reserved80, /* Bit 7 */2197 &hf_rtps_flag_reserved40, /* Bit 6 */2198 &hf_rtps_flag_unregister, /* Bit 5 */2199 &hf_rtps_flag_inline_qos_v1, /* Bit 4 */2200 &hf_rtps_flag_hash_key, /* Bit 3 */2201 &hf_rtps_flag_alive, /* Bit 2 */2202 &hf_rtps_flag_data_present_v1, /* Bit 1 */2203 &hf_rtps_flag_endianness, /* Bit 0 */2204 NULL((void*)0)2205};2206 2207static int* const DATA_FLAGSv2[] = {2208 &hf_rtps_flag_reserved80, /* Bit 7 */2209 &hf_rtps_flag_reserved40, /* Bit 6 */2210 &hf_rtps_flag_reserved20, /* Bit 5 */2211 &hf_rtps_flag_status_info, /* Bit 4 */2212 &hf_rtps_flag_hash_key, /* Bit 3 */2213 &hf_rtps_flag_data_present_v2, /* Bit 2 */2214 &hf_rtps_flag_inline_qos_v2, /* Bit 1 */2215 &hf_rtps_flag_endianness, /* Bit 0 */2216 NULL((void*)0)2217};2218 2219static int* const NOKEY_DATA_FRAG_FLAGS[] = {2220 &hf_rtps_flag_reserved80, /* Bit 7 */2221 &hf_rtps_flag_reserved40, /* Bit 6 */2222 &hf_rtps_flag_reserved20, /* Bit 5 */2223 &hf_rtps_flag_reserved10, /* Bit 4 */2224 &hf_rtps_flag_reserved08, /* Bit 3 */2225 &hf_rtps_flag_reserved04, /* Bit 2 */2226 &hf_rtps_flag_inline_qos_v2, /* Bit 1 */2227 &hf_rtps_flag_endianness, /* Bit 0 */2228 NULL((void*)0)2229};2230 2231static int* const NOKEY_DATA_FLAGS[] = {2232 &hf_rtps_flag_reserved80, /* Bit 7 */2233 &hf_rtps_flag_reserved40, /* Bit 6 */2234 &hf_rtps_flag_reserved20, /* Bit 5 */2235 &hf_rtps_flag_reserved10, /* Bit 4 */2236 &hf_rtps_flag_reserved08, /* Bit 3 */2237 &hf_rtps_flag_reserved04, /* Bit 2 */2238 &hf_rtps_flag_inline_qos_v2, /* Bit 1 */2239 &hf_rtps_flag_endianness, /* Bit 0 */2240 NULL((void*)0)2241};2242 2243static int* const ACKNACK_FLAGS[] = {2244 &hf_rtps_flag_reserved80, /* Bit 7 */2245 &hf_rtps_flag_reserved40, /* Bit 6 */2246 &hf_rtps_flag_reserved20, /* Bit 5 */2247 &hf_rtps_flag_reserved10, /* Bit 4 */2248 &hf_rtps_flag_reserved08, /* Bit 3 */2249 &hf_rtps_flag_reserved04, /* Bit 2 */2250 &hf_rtps_flag_final, /* Bit 1 */2251 &hf_rtps_flag_endianness, /* Bit 0 */2252 NULL((void*)0)2253};2254 2255static int* const NACK_FRAG_FLAGS[] = {2256 &hf_rtps_flag_reserved80, /* Bit 7 */2257 &hf_rtps_flag_reserved40, /* Bit 6 */2258 &hf_rtps_flag_reserved20, /* Bit 5 */2259 &hf_rtps_flag_reserved10, /* Bit 4 */2260 &hf_rtps_flag_reserved08, /* Bit 3 */2261 &hf_rtps_flag_reserved04, /* Bit 2 */2262 &hf_rtps_flag_reserved02, /* Bit 1 */2263 &hf_rtps_flag_endianness, /* Bit 0 */2264 NULL((void*)0)2265};2266 2267static int* const GAP_FLAGS[] = {2268 &hf_rtps_flag_reserved80, /* Bit 7 */2269 &hf_rtps_flag_reserved40, /* Bit 6 */2270 &hf_rtps_flag_reserved20, /* Bit 5 */2271 &hf_rtps_flag_reserved10, /* Bit 4 */2272 &hf_rtps_flag_reserved08, /* Bit 3 */2273 &hf_rtps_flag_reserved04, /* Bit 2 */2274 &hf_rtps_flag_reserved02, /* Bit 1 */2275 &hf_rtps_flag_endianness, /* Bit 0 */2276 NULL((void*)0)2277};2278 2279static int* const HEARTBEAT_FLAGS[] = {2280 &hf_rtps_flag_reserved80, /* Bit 7 */2281 &hf_rtps_flag_reserved40, /* Bit 6 */2282 &hf_rtps_flag_reserved20, /* Bit 5 */2283 &hf_rtps_flag_reserved10, /* Bit 4 */2284 &hf_rtps_flag_reserved08, /* Bit 3 */2285 &hf_rtps_flag_liveliness, /* Bit 2 */2286 &hf_rtps_flag_final, /* Bit 1 */2287 &hf_rtps_flag_endianness, /* Bit 0 */2288 NULL((void*)0)2289};2290 2291static int* const HEARTBEAT_BATCH_FLAGS[] = {2292 &hf_rtps_flag_reserved80, /* Bit 7 */2293 &hf_rtps_flag_reserved40, /* Bit 6 */2294 &hf_rtps_flag_reserved20, /* Bit 5 */2295 &hf_rtps_flag_reserved10, /* Bit 4 */2296 &hf_rtps_flag_reserved08, /* Bit 3 */2297 &hf_rtps_flag_liveliness, /* Bit 2 */2298 &hf_rtps_flag_final, /* Bit 1 */2299 &hf_rtps_flag_endianness, /* Bit 0 */2300 NULL((void*)0)2301};2302 2303static int* const HEARTBEAT_FRAG_FLAGS[] = {2304 &hf_rtps_flag_reserved80, /* Bit 7 */2305 &hf_rtps_flag_reserved40, /* Bit 6 */2306 &hf_rtps_flag_reserved20, /* Bit 5 */2307 &hf_rtps_flag_reserved10, /* Bit 4 */2308 &hf_rtps_flag_reserved08, /* Bit 3 */2309 &hf_rtps_flag_reserved04, /* Bit 2 */2310 &hf_rtps_flag_reserved02, /* Bit 1 */2311 &hf_rtps_flag_endianness, /* Bit 0 */2312 NULL((void*)0)2313};2314 2315static int* const RTPS_DATA_FLAGS[] = {2316 &hf_rtps_flag_reserved80, /* Bit 7 */2317 &hf_rtps_flag_reserved40, /* Bit 6 */2318 &hf_rtps_flag_reserved20, /* Bit 5 */2319 &hf_rtps_flag_reserved10, /* Bit 4 */2320 &hf_rtps_flag_data_serialized_key, /* Bit 3 */2321 &hf_rtps_flag_data_present_v2, /* Bit 2 */2322 &hf_rtps_flag_inline_qos_v2, /* Bit 1 */2323 &hf_rtps_flag_endianness, /* Bit 0 */2324 NULL((void*)0)2325};2326 2327static int* const RTPS_DATA_FRAG_FLAGS[] = {2328 &hf_rtps_flag_reserved80, /* Bit 7 */2329 &hf_rtps_flag_reserved40, /* Bit 6 */2330 &hf_rtps_flag_reserved20, /* Bit 5 */2331 &hf_rtps_flag_reserved10, /* Bit 4 */2332 &hf_rtps_flag_reserved08, /* Bit 3 */2333 &hf_rtps_flag_data_frag_serialized_key, /* Bit 2 */2334 &hf_rtps_flag_inline_qos_v2, /* Bit 1 */2335 &hf_rtps_flag_endianness, /* Bit 0 */2336 NULL((void*)0)2337};2338 2339static int* const RTPS_DATA_BATCH_FLAGS[] = {2340 &hf_rtps_flag_reserved80, /* Bit 7 */2341 &hf_rtps_flag_reserved40, /* Bit 6 */2342 &hf_rtps_flag_reserved20, /* Bit 5 */2343 &hf_rtps_flag_reserved10, /* Bit 4 */2344 &hf_rtps_flag_reserved08, /* Bit 3 */2345 &hf_rtps_flag_reserved04, /* Bit 2 */2346 &hf_rtps_flag_inline_qos_v2, /* Bit 1 */2347 &hf_rtps_flag_endianness, /* Bit 0 */2348 NULL((void*)0)2349};2350 2351static int* const RTPS_SAMPLE_INFO_FLAGS16[] = {2352 &hf_rtps_flag_reserved8000, /* Bit 15 */2353 &hf_rtps_flag_reserved4000, /* Bit 14 */2354 &hf_rtps_flag_reserved2000, /* Bit 13 */2355 &hf_rtps_flag_reserved1000, /* Bit 12 */2356 &hf_rtps_flag_reserved0800, /* Bit 11 */2357 &hf_rtps_flag_reserved0400, /* Bit 10 */2358 &hf_rtps_flag_reserved0200, /* Bit 9 */2359 &hf_rtps_flag_reserved0100, /* Bit 8 */2360 &hf_rtps_flag_reserved0080, /* Bit 7 */2361 &hf_rtps_flag_reserved0040, /* Bit 6 */2362 &hf_rtps_flag_serialize_key16, /* Bit 5 */2363 &hf_rtps_flag_invalid_sample, /* Bit 4 */2364 &hf_rtps_flag_data_present16, /* Bit 3 */2365 &hf_rtps_flag_offsetsn_present, /* Bit 2 */2366 &hf_rtps_flag_inline_qos16_v2, /* Bit 1 */2367 &hf_rtps_flag_timestamp_present, /* Bit 0 */2368 NULL((void*)0)2369};2370 2371static int* const INFO_TS_FLAGS[] = {2372 &hf_rtps_flag_reserved80, /* Bit 7 */2373 &hf_rtps_flag_reserved40, /* Bit 6 */2374 &hf_rtps_flag_reserved20, /* Bit 5 */2375 &hf_rtps_flag_reserved10, /* Bit 4 */2376 &hf_rtps_flag_reserved08, /* Bit 3 */2377 &hf_rtps_flag_reserved04, /* Bit 2 */2378 &hf_rtps_flag_timestamp, /* Bit 1 */2379 &hf_rtps_flag_endianness, /* Bit 0 */2380 NULL((void*)0)2381};2382 2383static int* const INFO_SRC_FLAGS[] = {2384 &hf_rtps_flag_reserved80, /* Bit 7 */2385 &hf_rtps_flag_reserved40, /* Bit 6 */2386 &hf_rtps_flag_reserved20, /* Bit 5 */2387 &hf_rtps_flag_reserved10, /* Bit 4 */2388 &hf_rtps_flag_reserved08, /* Bit 3 */2389 &hf_rtps_flag_reserved04, /* Bit 2 */2390 &hf_rtps_flag_reserved02, /* Bit 1 */2391 &hf_rtps_flag_endianness, /* Bit 0 */2392 NULL((void*)0)2393};2394 2395static int* const INFO_REPLY_IP4_FLAGS[] = {2396 &hf_rtps_flag_reserved80, /* Bit 7 */2397 &hf_rtps_flag_reserved40, /* Bit 6 */2398 &hf_rtps_flag_reserved20, /* Bit 5 */2399 &hf_rtps_flag_reserved10, /* Bit 4 */2400 &hf_rtps_flag_reserved08, /* Bit 3 */2401 &hf_rtps_flag_reserved04, /* Bit 2 */2402 &hf_rtps_flag_multicast, /* Bit 1 */2403 &hf_rtps_flag_endianness, /* Bit 0 */2404 NULL((void*)0)2405};2406 2407static int* const INFO_DST_FLAGS[] = {2408 &hf_rtps_flag_reserved80, /* Bit 7 */2409 &hf_rtps_flag_reserved40, /* Bit 6 */2410 &hf_rtps_flag_reserved20, /* Bit 5 */2411 &hf_rtps_flag_reserved10, /* Bit 4 */2412 &hf_rtps_flag_reserved08, /* Bit 3 */2413 &hf_rtps_flag_reserved04, /* Bit 2 */2414 &hf_rtps_flag_reserved02, /* Bit 1 */2415 &hf_rtps_flag_endianness, /* Bit 0 */2416 NULL((void*)0)2417};2418 2419static int* const INFO_REPLY_FLAGS[] = {2420 &hf_rtps_flag_reserved80, /* Bit 7 */2421 &hf_rtps_flag_reserved40, /* Bit 6 */2422 &hf_rtps_flag_reserved20, /* Bit 5 */2423 &hf_rtps_flag_reserved10, /* Bit 4 */2424 &hf_rtps_flag_reserved08, /* Bit 3 */2425 &hf_rtps_flag_reserved04, /* Bit 2 */2426 &hf_rtps_flag_multicast, /* Bit 1 */2427 &hf_rtps_flag_endianness, /* Bit 0 */2428 NULL((void*)0)2429};2430 2431static int* const RTI_CRC_FLAGS[] = {2432 &hf_rtps_flag_reserved80, /* Bit 7 */2433 &hf_rtps_flag_reserved40, /* Bit 6 */2434 &hf_rtps_flag_reserved20, /* Bit 5 */2435 &hf_rtps_flag_reserved10, /* Bit 4 */2436 &hf_rtps_flag_reserved08, /* Bit 3 */2437 &hf_rtps_flag_reserved04, /* Bit 2 */2438 &hf_rtps_flag_reserved02, /* Bit 1 */2439 &hf_rtps_flag_endianness, /* Bit 0 */2440 NULL((void*)0)2441};2442/* It is a 4 bytes field but with these 8 bits is enough */2443static int* const STATUS_INFO_FLAGS[] = {2444 &hf_rtps_flag_reserved80, /* Bit 7 */2445 &hf_rtps_flag_reserved40, /* Bit 6 */2446 &hf_rtps_flag_reserved20, /* Bit 5 */2447 &hf_rtps_flag_reserved10, /* Bit 4 */2448 &hf_rtps_flag_reserved08, /* Bit 3 */2449 &hf_rtps_flag_reserved04, /* Bit 2 */2450 &hf_rtps_flag_unregistered, /* Bit 1 */2451 &hf_rtps_flag_disposed, /* Bit 0 */2452 NULL((void*)0)2453};2454 2455static int* const BUILTIN_ENDPOINT_FLAGS[] = {2456 &hf_rtps_flag_participant_secure_reader, /* Bit 27 */2457 &hf_rtps_flag_participant_secure_writer, /* Bit 26 */2458 &hf_rtps_flag_secure_participant_volatile_message_reader, /* Bit 25 */2459 &hf_rtps_flag_secure_participant_volatile_message_writer, /* Bit 24 */2460 &hf_rtps_flag_participant_stateless_message_reader, /* Bit 23 */2461 &hf_rtps_flag_participant_stateless_message_writer, /* Bit 22 */2462 &hf_rtps_flag_secure_participant_message_reader, /* Bit 21 */2463 &hf_rtps_flag_secure_participant_message_writer, /* Bit 20 */2464 &hf_rtps_flag_secure_subscription_reader, /* Bit 19 */2465 &hf_rtps_flag_secure_subscription_writer, /* Bit 18 */2466 &hf_rtps_flag_secure_publication_reader, /* Bit 17 */2467 &hf_rtps_flag_secure_publication_writer, /* Bit 16 */2468 &hf_rtps_flag_builtin_endpoint_set_reserved, /* Bit 12-15 */2469 &hf_rtps_flag_participant_message_datareader, /* Bit 11 */2470 &hf_rtps_flag_participant_message_datawriter, /* Bit 10 */2471 &hf_rtps_flag_participant_state_detector, /* Bit 9 */2472 &hf_rtps_flag_participant_state_announcer, /* Bit 8 */2473 &hf_rtps_flag_participant_proxy_detector, /* Bit 7 */2474 &hf_rtps_flag_participant_proxy_announcer, /* Bit 6 */2475 &hf_rtps_flag_subscription_detector, /* Bit 5 */2476 &hf_rtps_flag_subscription_announcer, /* Bit 4 */2477 &hf_rtps_flag_publication_detector, /* Bit 3 */2478 &hf_rtps_flag_publication_announcer, /* Bit 2 */2479 &hf_rtps_flag_participant_detector, /* Bit 1 */2480 &hf_rtps_flag_participant_announcer, /* Bit 0 */2481 NULL((void*)0)2482};2483 2484static int* const SECURE_FLAGS[] = {2485 &hf_rtps_flag_reserved80, /* Bit 7 */2486 &hf_rtps_flag_reserved40, /* Bit 6 */2487 &hf_rtps_flag_reserved20, /* Bit 5 */2488 &hf_rtps_flag_reserved10, /* Bit 4 */2489 &hf_rtps_flag_reserved08, /* Bit 3 */2490 &hf_rtps_flag_reserved04, /* Bit 2 */2491 &hf_rtps_flag_multisubmessage, /* Bit 1 */2492 &hf_rtps_flag_endianness, /* Bit 0 */2493 NULL((void*)0)2494};2495 2496static int* const SECURE_PREFIX_FLAGS[] = {2497 &hf_rtps_flag_vendor_specific_content, /* Bit 7 */2498 &hf_rtps_flag_reserved40, /* Bit 6 */2499 &hf_rtps_flag_reserved20, /* Bit 5 */2500 &hf_rtps_flag_reserved10, /* Bit 4 */2501 &hf_rtps_flag_reserved08, /* Bit 3 */2502 &hf_rtps_flag_protected_with_psk, /* Bit 2 */2503 &hf_rtps_flag_additional_authenticated_data, /* Bit 1 */2504 &hf_rtps_flag_endianness, /* Bit 0 */2505 NULL((void*)0)2506};2507 2508static int* const SECURE_POSTFIX_FLAGS[] = {2509 &hf_rtps_flag_reserved80, /* Bit 7 */2510 &hf_rtps_flag_reserved40, /* Bit 6 */2511 &hf_rtps_flag_reserved20, /* Bit 5 */2512 &hf_rtps_flag_reserved10, /* Bit 4 */2513 &hf_rtps_flag_reserved08, /* Bit 3 */2514 &hf_rtps_flag_reserved04, /* Bit 2 */2515 &hf_rtps_flag_reserved02, /* Bit 1 */2516 &hf_rtps_flag_endianness, /* Bit 0 */2517 NULL((void*)0)2518};2519 2520static int* const ENDPOINT_SECURITY_INFO_FLAGS[] = {2521 &hf_rtps_flag_endpoint_security_attribute_flag_is_valid, /* Bit 31 */2522 &hf_rtps_flag_endpoint_security_attribute_flag_is_liveliness_protected, /* Bit 6 */2523 &hf_rtps_flag_endpoint_security_attribute_flag_is_key_protected, /* Bit 5 */2524 &hf_rtps_flag_endpoint_security_attribute_flag_is_payload_protected, /* Bit 4 */2525 &hf_rtps_flag_endpoint_security_attribute_flag_is_submessage_protected, /* Bit 3 */2526 &hf_rtps_flag_endpoint_security_attribute_flag_is_discovery_protected, /* Bit 2 */2527 &hf_rtps_flag_endpoint_security_attribute_flag_is_write_protected, /* Bit 1 */2528 &hf_rtps_flag_endpoint_security_attribute_flag_is_read_protected, /* Bit 0 */2529 NULL((void*)0)2530};2531 2532static int* const PLUGIN_ENDPOINT_SECURITY_INFO_FLAGS[] = {2533 &hf_rtps_flag_plugin_endpoint_security_attribute_flag_is_valid, /* Bit 31 */2534 &hf_rtps_flag_participant_security_attribute_flag_key_psk_protected, /* Bit 4 */2535 &hf_rtps_flag_plugin_endpoint_security_attribute_flag_is_liveliness_encrypted, /* Bit 2 */2536 &hf_rtps_flag_plugin_endpoint_security_attribute_flag_is_key_encrypted, /* Bit 1 */2537 &hf_rtps_flag_plugin_endpoint_security_attribute_flag_is_payload_encrypted, /* Bit 0 */2538 NULL((void*)0)2539};2540static int* const PARTICIPANT_SECURITY_INFO_FLAGS[] = {2541 &hf_rtps_flag_participant_security_attribute_flag_is_valid, /* Bit 31 */2542 &hf_rtps_flag_plugin_participant_security_attribute_flag_is_psk_encrypted, /* Bit 6 */2543 &hf_rtps_flag_participant_security_attribute_flag_key_revisions_enabled, /* Bit 3 */2544 &hf_rtps_flag_participant_security_attribute_flag_is_liveliness_protected, /* Bit 2 */2545 &hf_rtps_flag_participant_security_attribute_flag_is_discovery_protected, /* Bit 1 */2546 &hf_rtps_flag_participant_security_attribute_flag_is_rtps_protected, /* Bit 0 */2547 NULL((void*)0)2548};2549 2550static int* const PLUGIN_PARTICIPANT_SECURITY_INFO_FLAGS[] = {2551 &hf_rtps_flag_plugin_participant_security_attribute_flag_is_valid, /* Bit 31 */2552 &hf_rtps_flag_plugin_participant_security_attribute_flag_is_liveliness_origin_encrypted, /* Bit 5 */2553 &hf_rtps_flag_plugin_participant_security_attribute_flag_is_discovery_origin_encrypted, /* Bit 4 */2554 &hf_rtps_flag_plugin_participant_security_attribute_flag_is_rtps_origin_encrypted, /* Bit 3 */2555 &hf_rtps_flag_plugin_participant_security_attribute_flag_is_liveliness_encrypted, /* Bit 2 */2556 &hf_rtps_flag_plugin_participant_security_attribute_flag_is_discovery_encrypted, /* Bit 1 */2557 &hf_rtps_flag_plugin_participant_security_attribute_flag_is_rtps_encrypted, /* Bit 0 */2558 NULL((void*)0)2559};2560 2561/* Vendor specific: RTI */2562static int* const APP_ACK_FLAGS[] = {2563 &hf_rtps_flag_reserved80, /* Bit 7 */2564 &hf_rtps_flag_reserved40, /* Bit 6 */2565 &hf_rtps_flag_reserved20, /* Bit 5 */2566 &hf_rtps_flag_reserved10, /* Bit 4 */2567 &hf_rtps_flag_reserved08, /* Bit 3 */2568 &hf_rtps_flag_reserved04, /* Bit 2 */2569 &hf_rtps_flag_reserved02, /* Bit 1 */2570 &hf_rtps_flag_endianness, /* Bit 0 */2571 NULL((void*)0)2572};2573/* Vendor specific: RTI */2574static int* const APP_ACK_CONF_FLAGS[] = {2575 &hf_rtps_flag_reserved80, /* Bit 7 */2576 &hf_rtps_flag_reserved40, /* Bit 6 */2577 &hf_rtps_flag_reserved20, /* Bit 5 */2578 &hf_rtps_flag_reserved10, /* Bit 4 */2579 &hf_rtps_flag_reserved08, /* Bit 3 */2580 &hf_rtps_flag_reserved04, /* Bit 2 */2581 &hf_rtps_flag_reserved02, /* Bit 1 */2582 &hf_rtps_flag_endianness, /* Bit 0 */2583 NULL((void*)0)2584};2585/* Vendor specific: RTI */2586static int* const HEARTBEAT_VIRTUAL_FLAGS[] = {2587 &hf_rtps_flag_reserved80, /* Bit 7 */2588 &hf_rtps_flag_reserved40, /* Bit 6 */2589 &hf_rtps_flag_reserved20, /* Bit 5 */2590 &hf_rtps_flag_reserved10, /* Bit 4 */2591 &hf_rtps_flag_no_virtual_guids, /* Bit 3 */2592 &hf_rtps_flag_multiple_writers, /* Bit 2 */2593 &hf_rtps_flag_multiple_virtual_guids, /* Bit 1 */2594 &hf_rtps_flag_endianness, /* Bit 0 */2595 NULL((void*)0)2596};2597/* Vendor specific: RTI */2598static int* const DATA_FRAG_FLAGS[] = {2599 &hf_rtps_flag_reserved80, /* Bit 7 */2600 &hf_rtps_flag_reserved40, /* Bit 6 */2601 &hf_rtps_flag_reserved20, /* Bit 5 */2602 &hf_rtps_flag_reserved10, /* Bit 4 */2603 &hf_rtps_flag_reserved08, /* Bit 3 */2604 &hf_rtps_flag_hash_key_rti, /* Bit 2 */2605 &hf_rtps_flag_inline_qos_v2, /* Bit 1 */2606 &hf_rtps_flag_endianness, /* Bit 0 */2607 NULL((void*)0)2608};2609#if 02610/* Vendor specific: RTI */2611static int* const NACK_FLAGS[] = {2612 &hf_rtps_flag_reserved80, /* Bit 7 */2613 &hf_rtps_flag_reserved40, /* Bit 6 */2614 &hf_rtps_flag_reserved20, /* Bit 5 */2615 &hf_rtps_flag_reserved10, /* Bit 4 */2616 &hf_rtps_flag_reserved08, /* Bit 3 */2617 &hf_rtps_flag_reserved04, /* Bit 2 */2618 &hf_rtps_flag_final, /* Bit 1 */2619 &hf_rtps_flag_endianness, /* Bit 0 */2620 NULL((void*)0)2621};2622#endif2623 2624static int* const VENDOR_BUILTIN_ENDPOINT_FLAGS[] = {2625 &hf_rtps_flag_participant_bootstrap_reader, /* Bit 18 */2626 &hf_rtps_flag_participant_bootstrap_writer, /* Bit 17 */2627 &hf_rtps_flag_monitoring_logging_reader, /* Bit 16 */2628 &hf_rtps_flag_monitoring_logging_writer, /* Bit 15 */2629 &hf_rtps_flag_monitoring_event_reader, /* Bit 14 */2630 &hf_rtps_flag_monitoring_event_writer, /* Bit 13 */2631 &hf_rtps_flag_monitoring_periodic_reader, /* Bit 12 */2632 &hf_rtps_flag_monitoring_periodic_writer, /* Bit 11 */2633 &hf_rtps_flag_participant_config_secure_reader, /* Bit 10 */2634 &hf_rtps_flag_participant_config_secure_writer, /* Bit 9 */2635 &hf_rtps_flag_participant_config_reader, /* Bit 8 */2636 &hf_rtps_flag_participant_config_writer, /* Bit 7 */2637 &hf_rtps_flag_cloud_discovery_service_announcer, /* Bit 6 */2638 &hf_rtps_flag_secure_service_request_reader, /* Bit 5 */2639 &hf_rtps_flag_secure_service_request_writer, /* Bit 4 */2640 &hf_rtps_flag_locator_ping_reader, /* Bit 3 */2641 &hf_rtps_flag_locator_ping_writer, /* Bit 2 */2642 &hf_rtps_flag_service_request_reader, /* Bit 1 */2643 &hf_rtps_flag_service_request_writer, /* Bit 0 */2644 NULL((void*)0)2645};2646 2647static int* const ENDPOINT_SECURITY_ATTRIBUTES[] = {2648 &hf_rtps_flag_security_payload_protected, /* Bit 3 */2649 &hf_rtps_flag_security_submessage_protected, /* Bit 2 */2650 &hf_rtps_flag_security_discovery_protected, /* Bit 1 */2651 &hf_rtps_flag_security_access_protected, /* Bit 0 */2652 NULL((void*)0)2653};2654 2655 2656static int* const SECURITY_SIMMETRIC_CIPHER_MASK_FLAGS[] = {2657 &hf_rtps_flag_security_algorithm_compatibility_mode,2658 &hf_rtps_flag_security_symmetric_cipher_mask_custom_algorithm,2659 &hf_rtps_flag_security_symmetric_cipher_mask_aes256_gcm,2660 &hf_rtps_flag_security_symmetric_cipher_mask_aes128_gcm,2661 NULL((void*)0)2662};2663 2664static int* const COMPRESSION_ID_MASK_FLAGS[] = {2665 &hf_rtps_flag_compression_id_lz4,2666 &hf_rtps_flag_compression_id_bzip2,2667 &hf_rtps_flag_compression_id_zlib,2668 NULL((void*)0)2669};2670 2671static int* const SECURITY_KEY_ESTABLISHMENT_MASK_FLAGS[] = {2672 &hf_rtps_flag_security_algorithm_compatibility_mode,2673 &hf_rtps_flag_security_key_establishment_mask_custom_algorithm,2674 &hf_rtps_flag_security_key_establishment_mask_ecdheceum_p384,2675 &hf_rtps_flag_security_key_establishment_mask_ecdheceum_p256,2676 &hf_rtps_flag_security_key_establishment_mask_dhe_modp2048256,2677 NULL((void*)0)2678};2679 2680static int* const SECURITY_DIGITAL_SIGNATURE_MASK_FLAGS[] = {2681 &hf_rtps_flag_security_algorithm_compatibility_mode,2682 &hf_rtps_flag_security_digital_signature_mask_custom_algorithm,2683 &hf_rtps_flag_security_digital_signature_mask_ecdsa_p384_sha384,2684 &hf_rtps_flag_security_digital_signature_mask_ecdsa_p256_sha256,2685 &hf_rtps_flag_security_digital_signature_mask_rsassapkcs1v15_2048_sha256,2686 &hf_rtps_flag_security_digital_signature_mask_rsassapssmgf1sha256_2048_sha256,2687 NULL((void*)0)2688};2689 2690static int* const HEADER_EXTENSION_MASK_FLAGS[] = {2691 &hf_rtps_flag_header_extension_parameters, /* Bit 7 */2692 &hf_rtps_flag_header_extension_checksum1, /* Bit 6 */2693 &hf_rtps_flag_header_extension_checksum2, /* Bit 5 */2694 &hf_rtps_flag_header_extension_wextension, /* Bit 4 */2695 &hf_rtps_flag_header_extension_uextension, /* Bit 3 */2696 &hf_rtps_flag_header_extension_timestamp, /* Bit 2 */2697 &hf_rtps_flag_header_extension_message_length, /* Bit 1 */2698 &hf_rtps_flag_endianness, /* Bit 0 */2699 NULL((void*)0)2700};2701 2702/**TCP get DomainId feature constants**/2703#define RTPS_UNKNOWN_DOMAIN_ID_VAL-1 -12704#define RTPS_UNKNOWN_DOMAIN_ID_STR"Unknown" "Unknown"2705#define RTPS_UNKNOWN_DOMAIN_ID_STR_LENsizeof("Unknown") sizeof(RTPS_UNKNOWN_DOMAIN_ID_STR"Unknown")2706#define RTPS_TCPMAP_DOMAIN_ID_KEY_STR"ParticipantGuid" "ParticipantGuid"2707#define RTPS_TCPMAP_DOMAIN_ID_PROTODATA_KEY0 02708 2709/* Keys for mapping stuff in pinfo */2710#define RTPS_SERVICE_REQUEST_ID_PROTODATA_KEY1 12711#define RTPS_DATA_SESSION_FINAL_PROTODATA_KEY2 22712#define RTPS_CURRENT_SUBMESSAGE_COL_DATA_KEY3 32713#define RTPS_ROOT_MESSAGE_KEY4 42714#define RTPS_DECRYPTION_INFO_KEY5 52715 2716#define RTPS_CHECKSUM_MAX_LEN16 162717 2718/* End of TCP get DomainId feature constants */2719 2720typedef struct _participant_info {2721 gint domainId;2722} participant_info;2723 2724typedef struct _datawriter_qos {2725 guint32 reliability_kind;2726 guint32 durability_kind;2727 guint32 ownership_kind;2728} datawriter_qos;2729 2730#define MAX_TOPIC_AND_TYPE_LENGTH256 2562731typedef struct _type_mapping {2732 endpoint_guid guid;2733 gchar type_name[MAX_TOPIC_AND_TYPE_LENGTH256];2734 gchar topic_name[MAX_TOPIC_AND_TYPE_LENGTH256];2735 gint fields_visited;2736 datawriter_qos dw_qos;2737 guint32 dcps_publication_frame_number;2738 guint64 type_id;2739} type_mapping;2740 2741/* Links a coherent set with an specific writer. Useful to detect if an empty packet is the end of a coherent set */2742typedef struct _coherent_set_entity_info {2743 endpoint_guid guid;2744 guint64 writer_seq_number;2745 guint64 coherent_set_seq_number;2746 guint64 expected_coherent_set_end_writers_seq_number;2747} coherent_set_entity_info;2748 2749typedef struct _coherent_set_key {2750 endpoint_guid guid;2751 guint64 coherent_set_seq_number;2752} coherent_set_key;2753 2754/* Holds information about the coherent set */2755typedef struct _coherent_set_info {2756 coherent_set_key *key;2757 guint64 writer_seq_number;2758 gboolean is_set;2759} coherent_set_info;2760 2761/* Links a writer_seq_number with a coherent set. Useful when coherent set ends with parameter empty packet*/2762typedef struct _coherent_set_end {2763 guint64 writer_seq_number;2764 coherent_set_key coherent_set_id;2765} coherent_set_end;2766 2767typedef struct _coherent_set_track {2768 wmem_map_t *entities_using_map;2769 wmem_map_t *coherent_set_registry_map;2770} coherent_set_track;2771 2772static coherent_set_track coherent_set_tracking;2773static wmem_map_t * registry;2774static reassembly_table rtps_reassembly_table;2775static wmem_map_t *discovered_participants_domain_ids;2776 2777 2778typedef struct {2779 type_mapping instance_state_data_response_type_mapping;2780} builtin_types_type_mappings;2781 2782typedef struct {2783 dissection_info instance_state_data_response_dissection_info;2784 dissection_info alive_instances_dissection_info;2785 dissection_info disposed_instances_dissection_info;2786 dissection_info unregistered_instances_dissection_info;2787 dissection_info guid_t_dissection_info;2788 dissection_info value_dissection_info;2789 dissection_info instance_transition_data_dissection_info;2790 dissection_info key_hash_value_dissection_info;2791 dissection_info array_16_byte_dissection_info;2792 dissection_info ntptime_t_dissection_info;2793 dissection_info sequence_number_t_dissection_info;2794 dissection_info serialized_key_dissection_info;2795 dissection_info payload_dissection_info;2796} builtin_types_dissection_infos;2797 2798 2799/* Dissection info of types that are sent as user data but doesn't publish discovery data */2800typedef struct {2801 builtin_types_type_mappings type_mappings;2802 builtin_types_dissection_infos dissection_infos;2803} builtin_types_dissection_data_t;2804 2805static builtin_types_dissection_data_t builtin_types_dissection_data;2806 2807/*2808static type_mapping instance_state_data_response_type_mapping;2809static dissection_info instance_state_data_response_dissection_info;2810static dissection_info alive_instances_dissection_info;2811static dissection_info disposed_instances_dissection_info;2812static dissection_info unregistered_instances_dissection_info;2813static dissection_info writer_guid_dissection_info;2814static dissection_info reader_guid_dissection_info;2815static dissection_info value_dissection_info;2816*/2817 2818static const fragment_items rtps_frag_items = {2819 &ett_rtps_fragment,2820 &ett_rtps_fragments,2821 &hf_rtps_fragments,2822 &hf_rtps_fragment,2823 &hf_rtps_fragment_overlap,2824 &hf_rtps_fragment_overlap_conflict,2825 &hf_rtps_fragment_multiple_tails,2826 &hf_rtps_fragment_too_long_fragment,2827 &hf_rtps_fragment_error,2828 &hf_rtps_fragment_count,2829 &hf_rtps_reassembled_in,2830 &hf_rtps_reassembled_length,2831 &hf_rtps_reassembled_data,2832 "RTPS fragments"2833};2834 2835/******************************************************************************/2836/* PRE-SHARED KEY DECODING FUNCTIONALITY */2837/******************************************************************************/2838#define RTPS_HMAC_256_BUFFER_SIZE_BYTES32 322839 2840typedef struct {2841 guint32 host_id;2842 guint32 app_id;2843 guint32 instance_id;2844} rtps_guid_prefix_t;2845 2846typedef enum {2847 CRYPTO_ALGORITHM_NONE = CRYPTO_TRANSFORMATION_KIND_NONE(0),2848 CRYPTO_ALGORITHM_AES128_GMAC = CRYPTO_TRANSFORMATION_KIND_AES128_GMAC(1),2849 CRYPTO_ALGORITHM_AES128_GCM = CRYPTO_TRANSFORMATION_KIND_AES128_GCM(2),2850 CRYPTO_ALGORITHM_AES256_GMAC = CRYPTO_TRANSFORMATION_KIND_AES256_GMAC(3),2851 CRYPTO_ALGORITHM_AES256_GCM = CRYPTO_TRANSFORMATION_KIND_AES256_GCM(4)2852} rtps_encryption_algorithm_t;2853 2854#define RTPS_SECURITY_INIT_VECTOR_LEN12 122855typedef struct {2856 rtps_guid_prefix_t guid_prefix;2857 bool_Bool try_psk_decryption;2858 guint32 session_id;2859 guint32 transformation_key;2860 rtps_encryption_algorithm_t algorithm;2861 guint8 init_vector[RTPS_SECURITY_INIT_VECTOR_LEN12];2862 guint32 psk_index;2863} rtps_current_packet_decryption_info_t;2864 2865typedef struct {2866 guint32 value;2867 gboolean ignore;2868} rtps_psk_options_entry_uint32_string_t;2869 2870typedef struct {2871 char *passphrase_secret;2872 2873 char *passphrase_id_in;2874 rtps_psk_options_entry_uint32_string_t passphrase_id;2875 2876 char *host_id_in;2877 rtps_psk_options_entry_uint32_string_t host_id;2878 2879 char *app_id_in;2880 rtps_psk_options_entry_uint32_string_t app_id;2881 2882 char *instance_id_in;2883 rtps_psk_options_entry_uint32_string_t instance_id;2884 2885} rtps_psk_options_entry_t;2886 2887/* PSK table options in RTPS protocol options */2888typedef struct {2889 rtps_psk_options_entry_t *entries;2890 guint size;2891} rtps_psk_options_t;2892 2893static rtps_psk_options_t rtps_psk_options = { NULL((void*)0), 0 };2894 2895/*2896 * The table presented to the user has five columns: psk_index_str, psk,2897 * host_id, app_id, and instance_id. Decoding of the RTPS message using the2898 * pre-shared key will only take place if there is a match in the host_id,2899 * app_id, instance_id, and psk_index. These fields do not require a match if2900 * the user leaves them empty or containing only the '*' wildcard character2901 * (note that the the psk secret passphrase must always match). Ignoring all the2902 * previuos fields will result in an attempt to decode the RTPS message2903 * regardless of the GUID or the PSK index.2904 */2905UAT_CSTRING_CB_DEF(static void rtps_psk_table_entry_field_passphrase_id_in_set_cb
(void* rec, const char* buf, unsigned len, const void* u1 __attribute__
((unused)), const void* u2 __attribute__((unused))) { char* new_buf
= g_strndup(buf,len); g_free((((rtps_psk_options_entry_t*)rec
)->passphrase_id_in)); (((rtps_psk_options_entry_t*)rec)->
passphrase_id_in) = new_buf; } static void rtps_psk_table_entry_field_passphrase_id_in_tostr_cb
(void* rec, char** out_ptr, unsigned* out_len, const void* u1
__attribute__((unused)), const void* u2 __attribute__((unused
))) { if (((rtps_psk_options_entry_t*)rec)->passphrase_id_in
) { *out_ptr = g_strdup((((rtps_psk_options_entry_t*)rec)->
passphrase_id_in)); *out_len = (unsigned)strlen((((rtps_psk_options_entry_t
*)rec)->passphrase_id_in)); } else { *out_ptr = g_strdup(""
); *out_len = 0; } }
2906 rtps_psk_table_entry_field, passphrase_id_in,static void rtps_psk_table_entry_field_passphrase_id_in_set_cb
(void* rec, const char* buf, unsigned len, const void* u1 __attribute__
((unused)), const void* u2 __attribute__((unused))) { char* new_buf
= g_strndup(buf,len); g_free((((rtps_psk_options_entry_t*)rec
)->passphrase_id_in)); (((rtps_psk_options_entry_t*)rec)->
passphrase_id_in) = new_buf; } static void rtps_psk_table_entry_field_passphrase_id_in_tostr_cb
(void* rec, char** out_ptr, unsigned* out_len, const void* u1
__attribute__((unused)), const void* u2 __attribute__((unused
))) { if (((rtps_psk_options_entry_t*)rec)->passphrase_id_in
) { *out_ptr = g_strdup((((rtps_psk_options_entry_t*)rec)->
passphrase_id_in)); *out_len = (unsigned)strlen((((rtps_psk_options_entry_t
*)rec)->passphrase_id_in)); } else { *out_ptr = g_strdup(""
); *out_len = 0; } }
2907 rtps_psk_options_entry_t)static void rtps_psk_table_entry_field_passphrase_id_in_set_cb
(void* rec, const char* buf, unsigned len, const void* u1 __attribute__
((unused)), const void* u2 __attribute__((unused))) { char* new_buf
= g_strndup(buf,len); g_free((((rtps_psk_options_entry_t*)rec
)->passphrase_id_in)); (((rtps_psk_options_entry_t*)rec)->
passphrase_id_in) = new_buf; } static void rtps_psk_table_entry_field_passphrase_id_in_tostr_cb
(void* rec, char** out_ptr, unsigned* out_len, const void* u1
__attribute__((unused)), const void* u2 __attribute__((unused
))) { if (((rtps_psk_options_entry_t*)rec)->passphrase_id_in
) { *out_ptr = g_strdup((((rtps_psk_options_entry_t*)rec)->
passphrase_id_in)); *out_len = (unsigned)strlen((((rtps_psk_options_entry_t
*)rec)->passphrase_id_in)); } else { *out_ptr = g_strdup(""
); *out_len = 0; } }
2908UAT_CSTRING_CB_DEF(static void rtps_psk_table_entry_field_passphrase_secret_set_cb
(void* rec, const char* buf, unsigned len, const void* u1 __attribute__
((unused)), const void* u2 __attribute__((unused))) { char* new_buf
= g_strndup(buf,len); g_free((((rtps_psk_options_entry_t*)rec
)->passphrase_secret)); (((rtps_psk_options_entry_t*)rec)->
passphrase_secret) = new_buf; } static void rtps_psk_table_entry_field_passphrase_secret_tostr_cb
(void* rec, char** out_ptr, unsigned* out_len, const void* u1
__attribute__((unused)), const void* u2 __attribute__((unused
))) { if (((rtps_psk_options_entry_t*)rec)->passphrase_secret
) { *out_ptr = g_strdup((((rtps_psk_options_entry_t*)rec)->
passphrase_secret)); *out_len = (unsigned)strlen((((rtps_psk_options_entry_t
*)rec)->passphrase_secret)); } else { *out_ptr = g_strdup(
""); *out_len = 0; } }
2909 rtps_psk_table_entry_field, passphrase_secret,static void rtps_psk_table_entry_field_passphrase_secret_set_cb
(void* rec, const char* buf, unsigned len, const void* u1 __attribute__
((unused)), const void* u2 __attribute__((unused))) { char* new_buf
= g_strndup(buf,len); g_free((((rtps_psk_options_entry_t*)rec
)->passphrase_secret)); (((rtps_psk_options_entry_t*)rec)->
passphrase_secret) = new_buf; } static void rtps_psk_table_entry_field_passphrase_secret_tostr_cb
(void* rec, char** out_ptr, unsigned* out_len, const void* u1
__attribute__((unused)), const void* u2 __attribute__((unused
))) { if (((rtps_psk_options_entry_t*)rec)->passphrase_secret
) { *out_ptr = g_strdup((((rtps_psk_options_entry_t*)rec)->
passphrase_secret)); *out_len = (unsigned)strlen((((rtps_psk_options_entry_t
*)rec)->passphrase_secret)); } else { *out_ptr = g_strdup(
""); *out_len = 0; } }
2910 rtps_psk_options_entry_t)static void rtps_psk_table_entry_field_passphrase_secret_set_cb
(void* rec, const char* buf, unsigned len, const void* u1 __attribute__
((unused)), const void* u2 __attribute__((unused))) { char* new_buf
= g_strndup(buf,len); g_free((((rtps_psk_options_entry_t*)rec
)->passphrase_secret)); (((rtps_psk_options_entry_t*)rec)->
passphrase_secret) = new_buf; } static void rtps_psk_table_entry_field_passphrase_secret_tostr_cb
(void* rec, char** out_ptr, unsigned* out_len, const void* u1
__attribute__((unused)), const void* u2 __attribute__((unused
))) { if (((rtps_psk_options_entry_t*)rec)->passphrase_secret
) { *out_ptr = g_strdup((((rtps_psk_options_entry_t*)rec)->
passphrase_secret)); *out_len = (unsigned)strlen((((rtps_psk_options_entry_t
*)rec)->passphrase_secret)); } else { *out_ptr = g_strdup(
""); *out_len = 0; } }
2911UAT_CSTRING_CB_DEF(static void rtps_psk_table_entry_field_host_id_in_set_cb(void
* rec, const char* buf, unsigned len, const void* u1 __attribute__
((unused)), const void* u2 __attribute__((unused))) { char* new_buf
= g_strndup(buf,len); g_free((((rtps_psk_options_entry_t*)rec
)->host_id_in)); (((rtps_psk_options_entry_t*)rec)->host_id_in
) = new_buf; } static void rtps_psk_table_entry_field_host_id_in_tostr_cb
(void* rec, char** out_ptr, unsigned* out_len, const void* u1
__attribute__((unused)), const void* u2 __attribute__((unused
))) { if (((rtps_psk_options_entry_t*)rec)->host_id_in ) {
*out_ptr = g_strdup((((rtps_psk_options_entry_t*)rec)->host_id_in
)); *out_len = (unsigned)strlen((((rtps_psk_options_entry_t*)
rec)->host_id_in)); } else { *out_ptr = g_strdup(""); *out_len
= 0; } }
2912 rtps_psk_table_entry_field, host_id_in,static void rtps_psk_table_entry_field_host_id_in_set_cb(void
* rec, const char* buf, unsigned len, const void* u1 __attribute__
((unused)), const void* u2 __attribute__((unused))) { char* new_buf
= g_strndup(buf,len); g_free((((rtps_psk_options_entry_t*)rec
)->host_id_in)); (((rtps_psk_options_entry_t*)rec)->host_id_in
) = new_buf; } static void rtps_psk_table_entry_field_host_id_in_tostr_cb
(void* rec, char** out_ptr, unsigned* out_len, const void* u1
__attribute__((unused)), const void* u2 __attribute__((unused
))) { if (((rtps_psk_options_entry_t*)rec)->host_id_in ) {
*out_ptr = g_strdup((((rtps_psk_options_entry_t*)rec)->host_id_in
)); *out_len = (unsigned)strlen((((rtps_psk_options_entry_t*)
rec)->host_id_in)); } else { *out_ptr = g_strdup(""); *out_len
= 0; } }
2913 rtps_psk_options_entry_t)static void rtps_psk_table_entry_field_host_id_in_set_cb(void
* rec, const char* buf, unsigned len, const void* u1 __attribute__
((unused)), const void* u2 __attribute__((unused))) { char* new_buf
= g_strndup(buf,len); g_free((((rtps_psk_options_entry_t*)rec
)->host_id_in)); (((rtps_psk_options_entry_t*)rec)->host_id_in
) = new_buf; } static void rtps_psk_table_entry_field_host_id_in_tostr_cb
(void* rec, char** out_ptr, unsigned* out_len, const void* u1
__attribute__((unused)), const void* u2 __attribute__((unused
))) { if (((rtps_psk_options_entry_t*)rec)->host_id_in ) {
*out_ptr = g_strdup((((rtps_psk_options_entry_t*)rec)->host_id_in
)); *out_len = (unsigned)strlen((((rtps_psk_options_entry_t*)
rec)->host_id_in)); } else { *out_ptr = g_strdup(""); *out_len
= 0; } }
2914UAT_CSTRING_CB_DEF(static void rtps_psk_table_entry_field_app_id_in_set_cb(void*
rec, const char* buf, unsigned len, const void* u1 __attribute__
((unused)), const void* u2 __attribute__((unused))) { char* new_buf
= g_strndup(buf,len); g_free((((rtps_psk_options_entry_t*)rec
)->app_id_in)); (((rtps_psk_options_entry_t*)rec)->app_id_in
) = new_buf; } static void rtps_psk_table_entry_field_app_id_in_tostr_cb
(void* rec, char** out_ptr, unsigned* out_len, const void* u1
__attribute__((unused)), const void* u2 __attribute__((unused
))) { if (((rtps_psk_options_entry_t*)rec)->app_id_in ) { *
out_ptr = g_strdup((((rtps_psk_options_entry_t*)rec)->app_id_in
)); *out_len = (unsigned)strlen((((rtps_psk_options_entry_t*)
rec)->app_id_in)); } else { *out_ptr = g_strdup(""); *out_len
= 0; } }
2915 rtps_psk_table_entry_field, app_id_in,static void rtps_psk_table_entry_field_app_id_in_set_cb(void*
rec, const char* buf, unsigned len, const void* u1 __attribute__
((unused)), const void* u2 __attribute__((unused))) { char* new_buf
= g_strndup(buf,len); g_free((((rtps_psk_options_entry_t*)rec
)->app_id_in)); (((rtps_psk_options_entry_t*)rec)->app_id_in
) = new_buf; } static void rtps_psk_table_entry_field_app_id_in_tostr_cb
(void* rec, char** out_ptr, unsigned* out_len, const void* u1
__attribute__((unused)), const void* u2 __attribute__((unused
))) { if (((rtps_psk_options_entry_t*)rec)->app_id_in ) { *
out_ptr = g_strdup((((rtps_psk_options_entry_t*)rec)->app_id_in
)); *out_len = (unsigned)strlen((((rtps_psk_options_entry_t*)
rec)->app_id_in)); } else { *out_ptr = g_strdup(""); *out_len
= 0; } }
2916 rtps_psk_options_entry_t)static void rtps_psk_table_entry_field_app_id_in_set_cb(void*
rec, const char* buf, unsigned len, const void* u1 __attribute__
((unused)), const void* u2 __attribute__((unused))) { char* new_buf
= g_strndup(buf,len); g_free((((rtps_psk_options_entry_t*)rec
)->app_id_in)); (((rtps_psk_options_entry_t*)rec)->app_id_in
) = new_buf; } static void rtps_psk_table_entry_field_app_id_in_tostr_cb
(void* rec, char** out_ptr, unsigned* out_len, const void* u1
__attribute__((unused)), const void* u2 __attribute__((unused
))) { if (((rtps_psk_options_entry_t*)rec)->app_id_in ) { *
out_ptr = g_strdup((((rtps_psk_options_entry_t*)rec)->app_id_in
)); *out_len = (unsigned)strlen((((rtps_psk_options_entry_t*)
rec)->app_id_in)); } else { *out_ptr = g_strdup(""); *out_len
= 0; } }
2917UAT_CSTRING_CB_DEF(static void rtps_psk_table_entry_field_instance_id_in_set_cb(
void* rec, const char* buf, unsigned len, const void* u1 __attribute__
((unused)), const void* u2 __attribute__((unused))) { char* new_buf
= g_strndup(buf,len); g_free((((rtps_psk_options_entry_t*)rec
)->instance_id_in)); (((rtps_psk_options_entry_t*)rec)->
instance_id_in) = new_buf; } static void rtps_psk_table_entry_field_instance_id_in_tostr_cb
(void* rec, char** out_ptr, unsigned* out_len, const void* u1
__attribute__((unused)), const void* u2 __attribute__((unused
))) { if (((rtps_psk_options_entry_t*)rec)->instance_id_in
) { *out_ptr = g_strdup((((rtps_psk_options_entry_t*)rec)->
instance_id_in)); *out_len = (unsigned)strlen((((rtps_psk_options_entry_t
*)rec)->instance_id_in)); } else { *out_ptr = g_strdup("")
; *out_len = 0; } }
2918 rtps_psk_table_entry_field, instance_id_in,static void rtps_psk_table_entry_field_instance_id_in_set_cb(
void* rec, const char* buf, unsigned len, const void* u1 __attribute__
((unused)), const void* u2 __attribute__((unused))) { char* new_buf
= g_strndup(buf,len); g_free((((rtps_psk_options_entry_t*)rec
)->instance_id_in)); (((rtps_psk_options_entry_t*)rec)->
instance_id_in) = new_buf; } static void rtps_psk_table_entry_field_instance_id_in_tostr_cb
(void* rec, char** out_ptr, unsigned* out_len, const void* u1
__attribute__((unused)), const void* u2 __attribute__((unused
))) { if (((rtps_psk_options_entry_t*)rec)->instance_id_in
) { *out_ptr = g_strdup((((rtps_psk_options_entry_t*)rec)->
instance_id_in)); *out_len = (unsigned)strlen((((rtps_psk_options_entry_t
*)rec)->instance_id_in)); } else { *out_ptr = g_strdup("")
; *out_len = 0; } }
2919 rtps_psk_options_entry_t)static void rtps_psk_table_entry_field_instance_id_in_set_cb(
void* rec, const char* buf, unsigned len, const void* u1 __attribute__
((unused)), const void* u2 __attribute__((unused))) { char* new_buf
= g_strndup(buf,len); g_free((((rtps_psk_options_entry_t*)rec
)->instance_id_in)); (((rtps_psk_options_entry_t*)rec)->
instance_id_in) = new_buf; } static void rtps_psk_table_entry_field_instance_id_in_tostr_cb
(void* rec, char** out_ptr, unsigned* out_len, const void* u1
__attribute__((unused)), const void* u2 __attribute__((unused
))) { if (((rtps_psk_options_entry_t*)rec)->instance_id_in
) { *out_ptr = g_strdup((((rtps_psk_options_entry_t*)rec)->
instance_id_in)); *out_len = (unsigned)strlen((((rtps_psk_options_entry_t
*)rec)->instance_id_in)); } else { *out_ptr = g_strdup("")
; *out_len = 0; } }
2920 2921static uat_field_t rtps_psk_table_field_array[] = {2922 UAT_FLD_CSTRING({"passphrase_id_in", "Passphrase Id", PT_TXTMOD_STRING,{uat_fld_chk_str
,rtps_psk_table_entry_field_passphrase_id_in_set_cb,rtps_psk_table_entry_field_passphrase_id_in_tostr_cb
},{0,0,0},0,"Integer identifying the secret. " "Use the '*' character to match any Id."
,((void*)0)}
2923 rtps_psk_table_entry_field, passphrase_id_in,{"passphrase_id_in", "Passphrase Id", PT_TXTMOD_STRING,{uat_fld_chk_str
,rtps_psk_table_entry_field_passphrase_id_in_set_cb,rtps_psk_table_entry_field_passphrase_id_in_tostr_cb
},{0,0,0},0,"Integer identifying the secret. " "Use the '*' character to match any Id."
,((void*)0)}
2924 "Passphrase Id",{"passphrase_id_in", "Passphrase Id", PT_TXTMOD_STRING,{uat_fld_chk_str
,rtps_psk_table_entry_field_passphrase_id_in_set_cb,rtps_psk_table_entry_field_passphrase_id_in_tostr_cb
},{0,0,0},0,"Integer identifying the secret. " "Use the '*' character to match any Id."
,((void*)0)}
2925 "Integer identifying the secret. "{"passphrase_id_in", "Passphrase Id", PT_TXTMOD_STRING,{uat_fld_chk_str
,rtps_psk_table_entry_field_passphrase_id_in_set_cb,rtps_psk_table_entry_field_passphrase_id_in_tostr_cb
},{0,0,0},0,"Integer identifying the secret. " "Use the '*' character to match any Id."
,((void*)0)}
2926 "Use the '*' character to match any Id."){"passphrase_id_in", "Passphrase Id", PT_TXTMOD_STRING,{uat_fld_chk_str
,rtps_psk_table_entry_field_passphrase_id_in_set_cb,rtps_psk_table_entry_field_passphrase_id_in_tostr_cb
},{0,0,0},0,"Integer identifying the secret. " "Use the '*' character to match any Id."
,((void*)0)}
,2927 UAT_FLD_CSTRING({"passphrase_secret", "Passphrase Secret", PT_TXTMOD_STRING,{
uat_fld_chk_str,rtps_psk_table_entry_field_passphrase_secret_set_cb
,rtps_psk_table_entry_field_passphrase_secret_tostr_cb},{0,0,
0},0,"Seed used to derive the pre-shared secret key",((void*)
0)}
2928 rtps_psk_table_entry_field, passphrase_secret,{"passphrase_secret", "Passphrase Secret", PT_TXTMOD_STRING,{
uat_fld_chk_str,rtps_psk_table_entry_field_passphrase_secret_set_cb
,rtps_psk_table_entry_field_passphrase_secret_tostr_cb},{0,0,
0},0,"Seed used to derive the pre-shared secret key",((void*)
0)}
2929 "Passphrase Secret",{"passphrase_secret", "Passphrase Secret", PT_TXTMOD_STRING,{
uat_fld_chk_str,rtps_psk_table_entry_field_passphrase_secret_set_cb
,rtps_psk_table_entry_field_passphrase_secret_tostr_cb},{0,0,
0},0,"Seed used to derive the pre-shared secret key",((void*)
0)}
2930 "Seed used to derive the pre-shared secret key"){"passphrase_secret", "Passphrase Secret", PT_TXTMOD_STRING,{
uat_fld_chk_str,rtps_psk_table_entry_field_passphrase_secret_set_cb
,rtps_psk_table_entry_field_passphrase_secret_tostr_cb},{0,0,
0},0,"Seed used to derive the pre-shared secret key",((void*)
0)}
,2931 UAT_FLD_CSTRING({"host_id_in", "Host ID (Hex)", PT_TXTMOD_STRING,{uat_fld_chk_str
,rtps_psk_table_entry_field_host_id_in_set_cb,rtps_psk_table_entry_field_host_id_in_tostr_cb
},{0,0,0},0,"Limit the decoding to RTPS messages coming from the specified GUID."
"Leave the field empty or use the '*' character to match any GUID."
,((void*)0)}
2932 rtps_psk_table_entry_field, host_id_in,{"host_id_in", "Host ID (Hex)", PT_TXTMOD_STRING,{uat_fld_chk_str
,rtps_psk_table_entry_field_host_id_in_set_cb,rtps_psk_table_entry_field_host_id_in_tostr_cb
},{0,0,0},0,"Limit the decoding to RTPS messages coming from the specified GUID."
"Leave the field empty or use the '*' character to match any GUID."
,((void*)0)}
2933 "Host ID (Hex)",{"host_id_in", "Host ID (Hex)", PT_TXTMOD_STRING,{uat_fld_chk_str
,rtps_psk_table_entry_field_host_id_in_set_cb,rtps_psk_table_entry_field_host_id_in_tostr_cb
},{0,0,0},0,"Limit the decoding to RTPS messages coming from the specified GUID."
"Leave the field empty or use the '*' character to match any GUID."
,((void*)0)}
2934 "Limit the decoding to RTPS messages coming from the specified GUID."{"host_id_in", "Host ID (Hex)", PT_TXTMOD_STRING,{uat_fld_chk_str
,rtps_psk_table_entry_field_host_id_in_set_cb,rtps_psk_table_entry_field_host_id_in_tostr_cb
},{0,0,0},0,"Limit the decoding to RTPS messages coming from the specified GUID."
"Leave the field empty or use the '*' character to match any GUID."
,((void*)0)}
2935 "Leave the field empty or use the '*' character to match any GUID."){"host_id_in", "Host ID (Hex)", PT_TXTMOD_STRING,{uat_fld_chk_str
,rtps_psk_table_entry_field_host_id_in_set_cb,rtps_psk_table_entry_field_host_id_in_tostr_cb
},{0,0,0},0,"Limit the decoding to RTPS messages coming from the specified GUID."
"Leave the field empty or use the '*' character to match any GUID."
,((void*)0)}
,2936 UAT_FLD_CSTRING({"app_id_in", "App ID (Hex)", PT_TXTMOD_STRING,{uat_fld_chk_str
,rtps_psk_table_entry_field_app_id_in_set_cb,rtps_psk_table_entry_field_app_id_in_tostr_cb
},{0,0,0},0,"Limit the decoding to RTPS messages coming from the specified GUID."
"Leave the field empty or use the '*' character to match any GUID."
,((void*)0)}
2937 rtps_psk_table_entry_field, app_id_in,{"app_id_in", "App ID (Hex)", PT_TXTMOD_STRING,{uat_fld_chk_str
,rtps_psk_table_entry_field_app_id_in_set_cb,rtps_psk_table_entry_field_app_id_in_tostr_cb
},{0,0,0},0,"Limit the decoding to RTPS messages coming from the specified GUID."
"Leave the field empty or use the '*' character to match any GUID."
,((void*)0)}
2938 "App ID (Hex)",{"app_id_in", "App ID (Hex)", PT_TXTMOD_STRING,{uat_fld_chk_str
,rtps_psk_table_entry_field_app_id_in_set_cb,rtps_psk_table_entry_field_app_id_in_tostr_cb
},{0,0,0},0,"Limit the decoding to RTPS messages coming from the specified GUID."
"Leave the field empty or use the '*' character to match any GUID."
,((void*)0)}
2939 "Limit the decoding to RTPS messages coming from the specified GUID."{"app_id_in", "App ID (Hex)", PT_TXTMOD_STRING,{uat_fld_chk_str
,rtps_psk_table_entry_field_app_id_in_set_cb,rtps_psk_table_entry_field_app_id_in_tostr_cb
},{0,0,0},0,"Limit the decoding to RTPS messages coming from the specified GUID."
"Leave the field empty or use the '*' character to match any GUID."
,((void*)0)}
2940 "Leave the field empty or use the '*' character to match any GUID."){"app_id_in", "App ID (Hex)", PT_TXTMOD_STRING,{uat_fld_chk_str
,rtps_psk_table_entry_field_app_id_in_set_cb,rtps_psk_table_entry_field_app_id_in_tostr_cb
},{0,0,0},0,"Limit the decoding to RTPS messages coming from the specified GUID."
"Leave the field empty or use the '*' character to match any GUID."
,((void*)0)}
,2941 UAT_FLD_CSTRING({"instance_id_in", "Instance ID (Hex)", PT_TXTMOD_STRING,{uat_fld_chk_str
,rtps_psk_table_entry_field_instance_id_in_set_cb,rtps_psk_table_entry_field_instance_id_in_tostr_cb
},{0,0,0},0,"Limit the decoding to RTPS messages coming from the specified GUID."
"Leave the field empty or use the '*' character to match any GUID."
,((void*)0)}
2942 rtps_psk_table_entry_field, instance_id_in,{"instance_id_in", "Instance ID (Hex)", PT_TXTMOD_STRING,{uat_fld_chk_str
,rtps_psk_table_entry_field_instance_id_in_set_cb,rtps_psk_table_entry_field_instance_id_in_tostr_cb
},{0,0,0},0,"Limit the decoding to RTPS messages coming from the specified GUID."
"Leave the field empty or use the '*' character to match any GUID."
,((void*)0)}
2943 "Instance ID (Hex)",{"instance_id_in", "Instance ID (Hex)", PT_TXTMOD_STRING,{uat_fld_chk_str
,rtps_psk_table_entry_field_instance_id_in_set_cb,rtps_psk_table_entry_field_instance_id_in_tostr_cb
},{0,0,0},0,"Limit the decoding to RTPS messages coming from the specified GUID."
"Leave the field empty or use the '*' character to match any GUID."
,((void*)0)}
2944 "Limit the decoding to RTPS messages coming from the specified GUID."{"instance_id_in", "Instance ID (Hex)", PT_TXTMOD_STRING,{uat_fld_chk_str
,rtps_psk_table_entry_field_instance_id_in_set_cb,rtps_psk_table_entry_field_instance_id_in_tostr_cb
},{0,0,0},0,"Limit the decoding to RTPS messages coming from the specified GUID."
"Leave the field empty or use the '*' character to match any GUID."
,((void*)0)}
2945 "Leave the field empty or use the '*' character to match any GUID."){"instance_id_in", "Instance ID (Hex)", PT_TXTMOD_STRING,{uat_fld_chk_str
,rtps_psk_table_entry_field_instance_id_in_set_cb,rtps_psk_table_entry_field_instance_id_in_tostr_cb
},{0,0,0},0,"Limit the decoding to RTPS messages coming from the specified GUID."
"Leave the field empty or use the '*' character to match any GUID."
,((void*)0)}
,2946 UAT_END_FIELDS{((void*)0),((void*)0),PT_TXTMOD_NONE,{0,0,0},{0,0,0},0,0,((void
*)0)}
2947};2948 2949static void *rtps_psk_options_copy_entry(2950 void *destination,2951 const void *source,2952 size_t length _U___attribute__((unused)))2953{2954 const rtps_psk_options_entry_t *src = source;2955 rtps_psk_options_entry_t *dest = destination;2956 2957 dest->passphrase_secret = g_strdup(src->passphrase_secret);2958 2959 dest->passphrase_id = src->passphrase_id;2960 dest->passphrase_id_in = g_strdup(src->passphrase_id_in);2961 2962 dest->host_id = src->host_id;2963 dest->host_id_in = g_strdup(src->host_id_in);2964 2965 dest->app_id = src->app_id;2966 dest->app_id_in = g_strdup(src->app_id_in);2967 2968 dest->instance_id = src->instance_id;2969 dest->instance_id_in = g_strdup(src->instance_id_in);2970 2971 return dest;2972}2973 2974static void rtps_psk_options_free_entry(void *record)2975{2976 rtps_psk_options_entry_t *entry = record;2977 2978 g_free(entry->passphrase_secret);2979 entry->passphrase_secret = NULL((void*)0);2980 2981 g_free(entry->passphrase_id_in);2982 entry->passphrase_id_in = NULL((void*)0);2983 2984 g_free(entry->host_id_in);2985 entry->host_id_in = NULL((void*)0);2986 2987 g_free(entry->app_id_in);2988 entry->app_id_in = NULL((void*)0);2989 2990 g_free(entry->instance_id_in);2991 entry->instance_id_in = NULL((void*)0);2992 return;2993}2994 2995static bool_Bool rtps_psk_options_entry_uint32_string_validate(2996 char **error_string,2997 rtps_psk_options_entry_uint32_string_t *out,2998 char *in,2999 const char *field_name)3000{3001 if (in == NULL((void*)0) || strlen(in) == 0 || in[0] == '*') {3002 out->ignore = true1;3003 } else {3004 if (!ws_strtou32(in, NULL((void*)0), &out->value)) {3005 *error_string = g_strdup_printf(3006 "The '%s' field must be either the '*' wildcard character, or a "3007 "valid integer.",3008 field_name);3009 return false0;3010 }3011 }3012 return true1;3013}3014 3015static bool_Bool rtps_psk_options_update_entry(void *record, char **error_string)3016{3017 size_t PASSPHRASE_MAX_LENGTH = 512; /* fixed by specification. */3018 rtps_psk_options_entry_t *entry = record;3019 size_t passphrase_length = 0;3020 3021 /* Validation of the Passphrase Id. */3022 if (!rtps_psk_options_entry_uint32_string_validate(3023 error_string,3024 &entry->passphrase_id,3025 entry->passphrase_id_in,3026 "Passphrase Id")) {3027 return false0;3028 }3029 3030 /* Validation of the Passphrase Secret. */3031 if (entry->passphrase_secret == NULL((void*)0)) {3032 *error_string = g_strdup("The 'Passphrase Secret' field can't be empty");3033 return false0;3034 }3035 g_strstrip(entry->passphrase_secret)g_strchomp (g_strchug (entry->passphrase_secret));3036 3037 passphrase_length = strlen(entry->passphrase_secret);3038 if (passphrase_length == 0) {3039 *error_string = g_strdup("The 'Passphrase Secret' field can't be empty");3040 return false0;3041 }3042 if (passphrase_length > (PASSPHRASE_MAX_LENGTH - 1)) {3043 *error_string = g_strdup_printf(3044 "The 'Passphrase Secret' field has %zu characters length. "3045 "It cannot be larger than %zu characters.",3046 passphrase_length,3047 PASSPHRASE_MAX_LENGTH - 1); /* last byte is for null character. */3048 return false0;3049 }3050 3051 /* Validation of the Host Id. */3052 if (!rtps_psk_options_entry_uint32_string_validate(3053 error_string,3054 &entry->host_id,3055 entry->host_id_in,3056 "Host Id")) {3057 return false0;3058 }3059 3060 /* Validation of the App Id. */3061 if (!rtps_psk_options_entry_uint32_string_validate(3062 error_string,3063 &entry->app_id,3064 entry->app_id_in,3065 "App Id")) {3066 return false0;3067 }3068 3069 /* Validation of the Instance Id. */3070 if (!rtps_psk_options_entry_uint32_string_validate(3071 error_string,3072 &entry->instance_id,3073 entry->instance_id_in,3074 "Instance Id")) {3075 return false0;3076 }3077 3078 return true1;3079}3080/* End of PSK table options */3081 3082static void rtps_current_packet_decryption_info_reset(3083 rtps_current_packet_decryption_info_t *info)3084{3085 rtps_guid_prefix_t guid_prefix_zero = {0, 0, 0};3086 3087 info->guid_prefix = guid_prefix_zero;3088 info->try_psk_decryption = false0;3089 info->session_id = 0;3090 info->transformation_key = 0;3091 info->algorithm = CRYPTO_ALGORITHM_NONE;3092 memset(info->init_vector, 0, RTPS_SECURITY_INIT_VECTOR_LEN12);3093 info->psk_index = 0;3094 return;3095}3096 3097/* ----------------------- PSK Session Key Generation ---------------------- */3098/*3099 * The session key is calculated as follows:3100 * HMAC-SHA256(3101 * master_sender_key,3102 * "SessionKey" | master_sender_salt | session_id)3103 *3104 * This is implemented in rtps_psk_generate_session_key.3105 *3106 * Each component of the above formula can be obtained as follows:3107 *3108 * - master_sender_key and master_sender_salt 32 bytes element computed from:3109 * HMAC-SHA256(prk_key, <derivation_suffix> | 0x01)3110 *3111 * - prk_key: Implemented in rtps_psk_generate_prk_key.3112 * HMAC-SHA256(public_salt_for_master_key, preshared_secret_key)3113 *3114 * - public_salt_for_master_key (256 bits): Implemented in3115 * rtps_generate_public_salt.3116 * concatenate(3117 * <prk_prefix> (64 bits),3118 * <sender_key_id> (32 bits),3119 * RTPS header (160 bits))3120 * - preshared_secret_key: Secret key given by the user in the3121 * dialog.3122 *3123 * Where <derivation_suffix> is equal to "master sender key derivation" for3124 * the master_sender_key and "master salt derivation" for the3125 * master_sender_salt.3126 *3127 * Where <prk_prefix> is equal to "PSK-SKEY" for the master_sender_key and3128 * "PSK-SALT" for the master_sender_salt.3129 *3130 * Where <sender_key_id> is sent in the transformation_key_id field of the3131 * crypto header (only when the message is encoded using PSK).3132 *3133 * This is implemented in rtps_psk_generate_master_sender.3134 *3135 * - session_id: We can read the session_id from the crypto header of the3136 * SRTPS_PREFIX submessage.3137 * Note: The session_id is a counter starting at zero and increased by one3138 * every time we have encoded a specific number of messages.3139 */3140static bool_Bool rtps_psk_generate_master_sender(3141 guint8 *output,3142 bool_Bool is_salt,3143 const char* preshared_secret_key,3144 guint32 sender_key_id,3145 tvbuff_t *rtps_header_tvb,3146 gint rtps_header_tvb_offset);3147 3148static gcry_error_t rtps_util_generate_hmac_sha256(3149 void *output,3150 const void *key,3151 const void *data,3152 size_t datalen);3153 3154/**3155 * @brief Generate the session key that will be used to decrypt PSK-encoded RTPS3156 * messages. It requires the pre-shared secret key known and given by the user,3157 * the RTPS header, and two fields (sender key id and session id) sent on the3158 * wire.3159 */3160static bool_Bool rtps_psk_generate_session_key(3161 packet_info *pinfo,3162 const char *preshared_secret_key,3163 guint32 sender_key_id,3164 guint32 session_id,3165 guint8 *buffer)3166{3167 const char *sessionKeyString = "SessionKey";3168 rtps_tvb_field* rtps_root = NULL((void*)0);3169 guint8 sender_key[RTPS_HMAC_256_BUFFER_SIZE_BYTES32];3170 /*3171 * Must be big enough to fit the sessionKeyString, the master sender key and3172 * the session id.3173 */3174 guint8 input[50];3175 size_t offset = 0;3176 3177 rtps_root = (rtps_tvb_field*) p_get_proto_data(3178 pinfo->pool,3179 pinfo,3180 proto_rtps,3181 RTPS_ROOT_MESSAGE_KEY4);3182 if (rtps_root == NULL((void*)0) || buffer == NULL((void*)0)) {3183 return false0;3184 }3185 3186 memcpy(input, sessionKeyString, strlen(sessionKeyString));3187 offset += strlen(sessionKeyString);3188 3189 if (!rtps_psk_generate_master_sender(3190 input + offset,3191 true1, /* is_salt. */3192 preshared_secret_key,3193 sender_key_id,3194 rtps_root->tvb,3195 rtps_root->tvb_offset)) {3196 return false0;3197 }3198 offset += RTPS_HMAC_256_BUFFER_SIZE_BYTES32;3199 3200 memcpy(3201 input + offset,3202 &session_id,3203 sizeof(guint32));3204 offset += sizeof(guint32);3205 3206 if (!rtps_psk_generate_master_sender(3207 sender_key,3208 false0, /* is_salt. */3209 preshared_secret_key,3210 sender_key_id,3211 rtps_root->tvb,3212 rtps_root->tvb_offset)) {3213 return false0;3214 }3215 3216 return rtps_util_generate_hmac_sha256(3217 buffer,3218 sender_key,3219 input,3220 offset) == GPG_ERR_NO_ERROR;3221}3222 3223static bool_Bool rtps_psk_generate_prk_key(3224 guint8 *output,3225 const char *prefix,3226 const char *preshared_secret_key,3227 guint32 sender_key_id,3228 tvbuff_t *rtps_header_tvb,3229 gint rtps_header_tvb_offset);3230 3231/**3232 * @brief Generate the master sender key or master sender salt (depending on the3233 * is_salt parameter) that will be used to derive the session key.3234 */3235static bool_Bool rtps_psk_generate_master_sender(3236 guint8 *output,3237 bool_Bool is_salt,3238 const char* preshared_secret_key,3239 guint32 sender_key_id,3240 tvbuff_t *rtps_header_tvb,3241 gint rtps_header_tvb_offset)3242{3243 const char *prk_prefix = is_salt ? "PSK-SALT" : "PSK-SKEY";3244 const char *suffix = is_salt ?3245 "master salt derivation" :3246 "master sender key derivation";3247 guint8 prk_key[RTPS_HMAC_256_BUFFER_SIZE_BYTES32];3248 /* Must be big enough to fit the largest suffix and the 0x1 constant byte. */3249 guint8 input[50];3250 3251 if (!rtps_psk_generate_prk_key(3252 prk_key,3253 prk_prefix,3254 preshared_secret_key,3255 sender_key_id,3256 rtps_header_tvb,3257 rtps_header_tvb_offset)) {3258 return false0;3259 }3260 3261 memcpy(input, suffix, strlen(suffix));3262 input[strlen(suffix)] = 0x1; /* Fixed value. */3263 3264 return rtps_util_generate_hmac_sha256(3265 output,3266 prk_key,3267 input,3268 strlen(suffix) + 1) == GPG_ERR_NO_ERROR;3269}3270 3271static void rtps_generate_public_salt(3272 guint8 *output,3273 const char *prefix,3274 guint32 sender_key_id,3275 tvbuff_t *rtps_header_tvb,3276 gint rtps_header_tvb_offset);3277 3278/**3279 * @brief Compute the Pseudo-Random Key; an intermediate step to get the3280 * master sender. This function computes:3281 * HMAC-SHA256(3282 * concatenate(prefix, sender_key_id. rtps_header),3283 * preshared_secret_key)3284 */3285static bool_Bool rtps_psk_generate_prk_key(3286 guint8 *output,3287 const char *prefix,3288 const char *preshared_secret_key,3289 guint32 sender_key_id,3290 tvbuff_t *rtps_header_tvb,3291 gint rtps_header_tvb_offset)3292{3293 gcry_error_t error = GPG_ERR_NO_ERROR;3294 guint8 public_salt[RTPS_HMAC_256_BUFFER_SIZE_BYTES32];3295 3296 rtps_generate_public_salt(3297 public_salt,3298 prefix,3299 sender_key_id,3300 rtps_header_tvb,3301 rtps_header_tvb_offset);3302 3303 error = rtps_util_generate_hmac_sha256(3304 output,3305 public_salt,3306 preshared_secret_key,3307 strlen(preshared_secret_key));3308 return error == GPG_ERR_NO_ERROR;3309}3310 3311/**3312 * @brief Generates the public salt that can be used to derive the prk_key3313 * and prk_salt Pseudo-Random Keys.3314 *3315 * It does the concatenation of:3316 * concatenate(3317 * <8-byte prefix>,3318 * <4-byte sender's key id>,3319 * <20-byte RTPS header>)3320 * So output must be a 32-byte buffer (i.e. RTPS_HMAC_256_BUFFER_SIZE_BYTES).3321 */3322static void rtps_generate_public_salt(3323 guint8 *output,3324 const char *prefix,3325 guint32 sender_key_id,3326 tvbuff_t *rtps_header_tvb,3327 gint rtps_header_tvb_offset)3328{3329 size_t offset = 0;3330 3331 /* Copy the 8-byte prefix. */3332 memcpy(output, prefix, strlen(prefix));3333 offset += strlen(prefix);3334 3335 /* Copy the 4-byte sender's key id. */3336 memcpy(output + offset, &sender_key_id, sizeof(guint32));3337 offset += sizeof(guint32);3338 3339 /* Copy the 20-byte RTPS header. */3340 tvb_memcpy(3341 rtps_header_tvb,3342 output + offset,3343 rtps_header_tvb_offset,3344 20); /* RTPS HEADER SIZE. */3345 3346 return;3347}3348 3349/**3350 * @brief Compute the HMAC-SHA256 of the data using the key.3351 * This function is required to derive the PSK session key.3352 */3353static gcry_error_t rtps_util_generate_hmac_sha256(3354 void *output,3355 const void *key,3356 const void *data,3357 size_t datalen)3358{3359 gcry_mac_hd_t hmac;3360 gcry_error_t error = GPG_ERR_NO_ERROR;3361 size_t OUTPUT_SIZE = RTPS_HMAC_256_BUFFER_SIZE_BYTES32;3362 3363 error = gcry_mac_open(&hmac, GCRY_MAC_HMAC_SHA256, 0, NULL((void*)0));3364 if (error != GPG_ERR_NO_ERROR) {3365 gcry_mac_close(hmac);3366 return error;3367 }3368 3369 error = gcry_mac_setkey(hmac, key, RTPS_HMAC_256_BUFFER_SIZE_BYTES32);3370 if (error != GPG_ERR_NO_ERROR) {3371 gcry_mac_close(hmac);3372 return error;3373 }3374 3375 error = gcry_mac_write(hmac, data, datalen);3376 if (error != GPG_ERR_NO_ERROR) {3377 gcry_mac_close(hmac);3378 return error;3379 }3380 3381 error = gcry_mac_read(hmac, output, &OUTPUT_SIZE);3382 if (error != GPG_ERR_NO_ERROR) {3383 gcry_mac_close(hmac);3384 fprintf (stderrstderr, "Failure: %s/%s\n",3385 gcry_strsource (error),3386 gcry_strerror (error));3387 return error;3388 }3389 3390 gcry_mac_close(hmac);3391 return error;3392}3393/* ------------------------------------------------------------------------- */3394 3395/**3396 * @brief Translate between the RTPS and gcrypt types.3397 */3398static int rtps_encryption_algorithm_to_gcry_enum(3399 rtps_encryption_algorithm_t rtps_enum_in,3400 int *gcry_cipher_mode_out)3401{3402 if (gcry_cipher_mode_out == NULL((void*)0)) {3403 return -1;3404 }3405 switch(rtps_enum_in) {3406 case CRYPTO_ALGORITHM_AES128_GMAC:3407 *gcry_cipher_mode_out = GCRY_CIPHER_MODE_CCM;3408 return GCRY_CIPHER_AES128GCRY_CIPHER_AES;3409 case CRYPTO_ALGORITHM_AES128_GCM:3410 *gcry_cipher_mode_out = GCRY_CIPHER_MODE_GCM;3411 return GCRY_CIPHER_AES128GCRY_CIPHER_AES;3412 case CRYPTO_ALGORITHM_AES256_GMAC:3413 *gcry_cipher_mode_out = GCRY_CIPHER_MODE_CCM;3414 return GCRY_CIPHER_AES256;3415 case CRYPTO_ALGORITHM_AES256_GCM:3416 *gcry_cipher_mode_out = GCRY_CIPHER_MODE_GCM;3417 return GCRY_CIPHER_AES256;3418 case CRYPTO_ALGORITHM_NONE:3419 default:3420 *gcry_cipher_mode_out = GCRY_CIPHER_MODE_NONE;3421 return GCRY_CIPHER_NONE;3422 }3423}3424 3425static gcry_error_t rtps_util_decrypt_data(3426 guint8 *encrypted_data,3427 size_t encrypted_data_size,3428 guint8 *key,3429 guint8 *init_vector,3430 guint8 *tag,3431 rtps_encryption_algorithm_t algorithm)3432{3433 gcry_error_t err = GPG_ERR_NO_ERROR;3434 gcry_cipher_hd_t cipher_hd;3435 int encription_algo;3436 int encription_mode = 0;3437 3438 encription_algo = rtps_encryption_algorithm_to_gcry_enum(3439 algorithm,3440 &encription_mode);3441 3442 err = gcry_cipher_open(3443 &cipher_hd,3444 encription_algo,3445 encription_mode,3446 0);3447 if (err != GPG_ERR_NO_ERROR) {3448 ws_warning(do { if (1) { ws_log_full("", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 3451, __func__, "GCRY: cipher open %s/%s\n", gcry_strsource
(err), gcry_strerror(err)); } } while (0)
3449 "GCRY: cipher open %s/%s\n",do { if (1) { ws_log_full("", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 3451, __func__, "GCRY: cipher open %s/%s\n", gcry_strsource
(err), gcry_strerror(err)); } } while (0)
3450 gcry_strsource(err),do { if (1) { ws_log_full("", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 3451, __func__, "GCRY: cipher open %s/%s\n", gcry_strsource
(err), gcry_strerror(err)); } } while (0)
3451 gcry_strerror(err))do { if (1) { ws_log_full("", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 3451, __func__, "GCRY: cipher open %s/%s\n", gcry_strsource
(err), gcry_strerror(err)); } } while (0)
;3452 return err;3453 }3454 3455 err = gcry_cipher_setkey(cipher_hd, key, RTPS_HMAC_256_BUFFER_SIZE_BYTES32);3456 if (err != GPG_ERR_NO_ERROR) {3457 ws_warning(do { if (1) { ws_log_full("", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 3460, __func__, "GCRY: setkey %s/%s\n", gcry_strsource(err)
, gcry_strerror(err)); } } while (0)
3458 "GCRY: setkey %s/%s\n",do { if (1) { ws_log_full("", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 3460, __func__, "GCRY: setkey %s/%s\n", gcry_strsource(err)
, gcry_strerror(err)); } } while (0)
3459 gcry_strsource(err),do { if (1) { ws_log_full("", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 3460, __func__, "GCRY: setkey %s/%s\n", gcry_strsource(err)
, gcry_strerror(err)); } } while (0)
3460 gcry_strerror(err))do { if (1) { ws_log_full("", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 3460, __func__, "GCRY: setkey %s/%s\n", gcry_strsource(err)
, gcry_strerror(err)); } } while (0)
;3461 gcry_cipher_close(cipher_hd);3462 return err;3463 }3464 3465 if (init_vector != NULL((void*)0)) {3466 err = gcry_cipher_setiv(3467 cipher_hd,3468 init_vector,3469 RTPS_SECURITY_INIT_VECTOR_LEN12);3470 if (err != GPG_ERR_NO_ERROR) {3471 ws_warning(do { if (1) { ws_log_full("", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 3474, __func__, "GCRY: setiv %s/%s\n", gcry_strsource(err),
gcry_strerror(err)); } } while (0)
3472 "GCRY: setiv %s/%s\n",do { if (1) { ws_log_full("", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 3474, __func__, "GCRY: setiv %s/%s\n", gcry_strsource(err),
gcry_strerror(err)); } } while (0)
3473 gcry_strsource(err),do { if (1) { ws_log_full("", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 3474, __func__, "GCRY: setiv %s/%s\n", gcry_strsource(err),
gcry_strerror(err)); } } while (0)
3474 gcry_strerror(err))do { if (1) { ws_log_full("", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 3474, __func__, "GCRY: setiv %s/%s\n", gcry_strsource(err),
gcry_strerror(err)); } } while (0)
;3475 gcry_cipher_close(cipher_hd);3476 return err;3477 }3478 }3479 3480 err = gcry_cipher_decrypt(3481 cipher_hd,3482 encrypted_data,3483 encrypted_data_size,3484 NULL((void*)0),3485 0);3486 if (err != GPG_ERR_NO_ERROR) {3487 ws_warning(do { if (1) { ws_log_full("", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 3490, __func__, "GCRY: encrypt %s/%s\n", gcry_strsource(err
), gcry_strerror(err)); } } while (0)
3488 "GCRY: encrypt %s/%s\n",do { if (1) { ws_log_full("", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 3490, __func__, "GCRY: encrypt %s/%s\n", gcry_strsource(err
), gcry_strerror(err)); } } while (0)
3489 gcry_strsource(err),do { if (1) { ws_log_full("", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 3490, __func__, "GCRY: encrypt %s/%s\n", gcry_strsource(err
), gcry_strerror(err)); } } while (0)
3490 gcry_strerror(err))do { if (1) { ws_log_full("", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 3490, __func__, "GCRY: encrypt %s/%s\n", gcry_strsource(err
), gcry_strerror(err)); } } while (0)
;3491 gcry_cipher_close(cipher_hd);3492 return err;3493 }3494 3495 if (tag != NULL((void*)0)) {3496 err = gcry_cipher_checktag(cipher_hd, tag, SECURE_TAG_COMMON_AND_SPECIFIC_MAC_LENGTH16);3497 if (err != GPG_ERR_NO_ERROR) {3498 ws_warning(do { if (1) { ws_log_full("", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 3501, __func__, "GCRY: Decryption (checktag) failed: %s/%s\n"
, gcry_strsource(err), gcry_strerror(err)); } } while (0)
3499 "GCRY: Decryption (checktag) failed: %s/%s\n",do { if (1) { ws_log_full("", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 3501, __func__, "GCRY: Decryption (checktag) failed: %s/%s\n"
, gcry_strsource(err), gcry_strerror(err)); } } while (0)
3500 gcry_strsource(err),do { if (1) { ws_log_full("", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 3501, __func__, "GCRY: Decryption (checktag) failed: %s/%s\n"
, gcry_strsource(err), gcry_strerror(err)); } } while (0)
3501 gcry_strerror(err))do { if (1) { ws_log_full("", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 3501, __func__, "GCRY: Decryption (checktag) failed: %s/%s\n"
, gcry_strsource(err), gcry_strerror(err)); } } while (0)
;3502 }3503 }3504 3505 gcry_cipher_close(cipher_hd);3506 return err;3507}3508 3509/**3510 * @brief Generates the session key and uses it to decrypt the secure payload.3511 * The decripted payload is stored in an allocated buffer using the allocator3512 * passed as parameter.3513 */3514static guint8 *rtps_decrypt_secure_payload(3515 tvbuff_t *tvb,3516 packet_info *pinfo,3517 gint offset,3518 size_t secure_payload_len,3519 guint8 *preshared_secret_key,3520 guint8 *init_vector,3521 rtps_encryption_algorithm_t algorithm,3522 guint32 transformation_key,3523 guint32 session_id,3524 guint8 *tag,3525 guint8 *session_key_output,3526 gcry_error_t* error,3527 wmem_allocator_t *allocator)3528{3529 guint8 *secure_body_ptr;3530 3531 if (!rtps_psk_generate_session_key(3532 pinfo,3533 preshared_secret_key,3534 transformation_key,3535 session_id,3536 session_key_output)) {3537 return NULL((void*)0);3538 }3539 3540 secure_body_ptr = wmem_alloc0(allocator, secure_payload_len);3541 if (secure_body_ptr == NULL((void*)0)) {3542 return NULL((void*)0);3543 }3544 3545 tvb_memcpy(tvb, secure_body_ptr, offset, secure_payload_len);3546 3547 *error = rtps_util_decrypt_data(3548 secure_body_ptr,3549 secure_payload_len,3550 session_key_output,3551 init_vector,3552 tag,3553 algorithm);3554 3555 /*3556 * Free the allocated memory if the decryption goes wrong or if the content is3557 * not healthy.3558 */3559 if (*error != GPG_ERR_NO_ERROR) {3560 wmem_free(allocator, secure_body_ptr);3561 secure_body_ptr = NULL((void*)0);3562 }3563 return secure_body_ptr;3564}3565/******************************************************************************/3566 3567static const true_false_string tfs_little_big_endianness = { "Little-Endian", "Big-Endian" };3568 3569/* #19359 - ensure strings we copy aren't truncated halfway through a Unicode codepoint */3570static void rtps_strlcpy(char *dest, const char *src, size_t dest_size)3571{3572 /* Reserving the last character in case ws_utf8_truncate overwrites it */3573 (void) g_strlcpy(dest, src, dest_size);3574 ws_utf8_truncate(dest, strlen(dest));3575}3576 3577static gint check_offset_addition(gint offset, guint32 value, proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb)3578{3579 gint new_offset = offset + (gint)value;3580 if (new_offset < offset) {3581 proto_tree_add_expert_format(tree, pinfo, &ei_rtps_value_too_large, tvb, 0, 0, "Offset value too large: %u", value);3582 THROW(ReportedBoundsError)except_throw(1, (3), ((void*)0));3583 }3584 return new_offset;3585}3586 3587static void rtps_util_dissect_parameter_header(tvbuff_t * tvb, gint * offset,3588 const guint encoding, guint32 * member_id, guint32 * member_length) {3589 *member_id = tvb_get_guint16(tvb, *offset, encoding);3590 *offset += 2;3591 *member_length = tvb_get_guint16(tvb, *offset, encoding);3592 *offset += 2;3593 3594 if ((*member_id & PID_EXTENDED(0x3f01)) == PID_EXTENDED(0x3f01)) {3595 /* get extended member id and length */3596 *member_id = tvb_get_guint32(tvb, *offset, encoding);3597 *offset += 4;3598 *member_length = tvb_get_guint32(tvb, *offset, encoding);3599 *offset += 4;3600 }3601}3602 3603static gint dissect_crypto_algorithm_requirements(proto_tree *tree , tvbuff_t* tvb,3604 gint offset, gint encoding, int* const *flags) {3605 proto_tree_add_bitmask(3606 tree,3607 tvb,3608 offset,3609 hf_rtps_param_crypto_algorithm_requirements_trust_chain,3610 ett_rtps_flags, flags,3611 encoding);3612 offset += 4;3613 proto_tree_add_bitmask(3614 tree,3615 tvb,3616 offset,3617 hf_rtps_param_crypto_algorithm_requirements_message_auth,3618 ett_rtps_flags, flags,3619 encoding);3620 offset += 4;3621 return offset;3622}3623 3624static gint dissect_mutable_member(proto_tree *tree , tvbuff_t * tvb, packet_info *pinfo, gint offset, guint encoding, guint encoding_version,3625 dissection_info * info, gboolean * is_end, gboolean show);3626 3627static gint get_native_type_cdr_length(guint64 member_kind) {3628 guint length = 0;3629 3630 switch (member_kind) {3631 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_BOOLEAN_TYPE: {3632 length = 1;3633 break;3634 }3635 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_CHAR_8_TYPE:3636 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_BYTE_TYPE: {3637 length = 1;3638 break;3639 }3640 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_INT_16_TYPE: {3641 length = 2;3642 break;3643 }3644 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_UINT_16_TYPE: {3645 length = 2;3646 break;3647 }3648 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_ENUMERATION_TYPE:3649 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_INT_32_TYPE: {3650 length = 4;3651 break;3652 }3653 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_UINT_32_TYPE: {3654 length = 4;3655 break;3656 }3657 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_INT_64_TYPE: {3658 length = 8;3659 break;3660 }3661 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_UINT_64_TYPE: {3662 length = 8;3663 break;3664 }3665 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_FLOAT_32_TYPE: {3666 length = 4;3667 break;3668 }3669 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_FLOAT_64_TYPE: {3670 length = 8;3671 break;3672 }3673 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_FLOAT_128_TYPE: {3674 length = 16;3675 break;3676 }3677 default: {3678 /* XXX We should probably add expert info, but make sure our offset advances for now. */3679 length = 1;3680 break;3681 }3682 }3683 return length;3684}3685 3686static gint get_native_type_cdr_alignment(guint64 member_kind, gint encapsulation_version) {3687 guint align = 0;3688 3689 switch (member_kind) {3690 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_BOOLEAN_TYPE: {3691 align = 1;3692 break;3693 }3694 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_CHAR_8_TYPE:3695 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_BYTE_TYPE: {3696 align = 1;3697 break;3698 }3699 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_INT_16_TYPE: {3700 align = 2;3701 break;3702 }3703 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_UINT_16_TYPE: {3704 align = 2;3705 break;3706 }3707 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_ENUMERATION_TYPE:3708 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_INT_32_TYPE: {3709 align = 4;3710 break;3711 }3712 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_UINT_32_TYPE: {3713 align = 4;3714 break;3715 }3716 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_INT_64_TYPE: {3717 align = (encapsulation_version == 1) ? 8 : 4;3718 break;3719 }3720 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_UINT_64_TYPE: {3721 align = (encapsulation_version == 1) ? 8 : 4;3722 break;3723 }3724 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_FLOAT_32_TYPE: {3725 align = 4;3726 break;3727 }3728 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_FLOAT_64_TYPE: {3729 align = (encapsulation_version == 1) ? 8 : 4;3730 break;3731 }3732 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_FLOAT_128_TYPE: {3733 align = (encapsulation_version == 1) ? 8 : 4;3734 break;3735 }3736 default: {3737 align = 1;3738 break;3739 }3740 }3741 return align;3742}3743 3744static gint get_encapsulation_endianness(gint encapsulation_id)3745{3746 return (encapsulation_id == ENCAPSULATION_CDR_LE(0x0001) ||3747 encapsulation_id == ENCAPSULATION_PL_CDR_LE(0x0003) ||3748 encapsulation_id == ENCAPSULATION_CDR2_LE(0x0007) ||3749 encapsulation_id == ENCAPSULATION_D_CDR2_LE(0x0009) ||3750 encapsulation_id == ENCAPSULATION_PL_CDR2_LE(0x000b)) ? ENC_LITTLE_ENDIAN0x80000000 : ENC_BIG_ENDIAN0x00000000;3751}3752 3753static gint get_encapsulation_version(gint encapsulation_id)3754{3755 return (encapsulation_id == ENCAPSULATION_CDR2_LE(0x0007) ||3756 encapsulation_id == ENCAPSULATION_D_CDR2_LE(0x0009) ||3757 encapsulation_id == ENCAPSULATION_PL_CDR2_LE(0x000b)) ? 2 : 1;3758}3759 3760 3761static dissection_info* lookup_dissection_info_in_custom_and_builtin_types(guint64 type_id) {3762 dissection_info* info = NULL((void*)0);3763 if (dissection_infos != NULL((void*)0)) {3764 info = (dissection_info*)wmem_map_lookup(dissection_infos, &(type_id));3765 if (info == NULL((void*)0) && builtin_dissection_infos != NULL((void*)0)) {3766 info = (dissection_info*)wmem_map_lookup(builtin_dissection_infos, &(type_id));3767 }3768 }3769 return info;3770}3771 3772/* this is a recursive function. _info may or may not be NULL depending on the use iteration */3773// NOLINTNEXTLINE(misc-no-recursion)3774static gint dissect_user_defined(proto_tree *tree, tvbuff_t * tvb, packet_info *pinfo, gint offset, guint encoding, guint encoding_version,3775 dissection_info * _info, guint64 type_id, gchar * name,3776 RTICdrTypeObjectExtensibility extensibility, gint offset_zero,3777 guint16 flags, guint32 element_member_id, gboolean show) {3778 3779 guint64 member_kind;3780 dissection_info * info = NULL((void*)0);3781 guint32 member_id;3782 guint32 member_length = 0;3783 3784 if (_info) { /* first call enters here */3785 info = _info;3786 member_kind = info->member_kind;3787 } else {3788 info = lookup_dissection_info_in_custom_and_builtin_types(type_id);3789 if (info != NULL((void*)0)) {3790 member_kind = info->member_kind;3791 } else {3792 member_kind = type_id;3793 }3794 }3795 if ((flags & MEMBER_OPTIONAL(2)) != 0) {3796gint offset_before = offset;3797 /* Parameter header is at minimum 4 bytes */3798 ALIGN_ZERO((offset -= offset_zero, offset = (((offset) + ((get_native_type_cdr_alignment
(RTI_CDR_TYPE_OBJECT_TYPE_KIND_UINT_32_TYPE, encoding_version
)) - 1)) & ~((get_native_type_cdr_alignment(RTI_CDR_TYPE_OBJECT_TYPE_KIND_UINT_32_TYPE
, encoding_version)) - 1)), offset += offset_zero)
3799 offset,(offset -= offset_zero, offset = (((offset) + ((get_native_type_cdr_alignment
(RTI_CDR_TYPE_OBJECT_TYPE_KIND_UINT_32_TYPE, encoding_version
)) - 1)) & ~((get_native_type_cdr_alignment(RTI_CDR_TYPE_OBJECT_TYPE_KIND_UINT_32_TYPE
, encoding_version)) - 1)), offset += offset_zero)
3800 get_native_type_cdr_alignment(RTI_CDR_TYPE_OBJECT_TYPE_KIND_UINT_32_TYPE, encoding_version),(offset -= offset_zero, offset = (((offset) + ((get_native_type_cdr_alignment
(RTI_CDR_TYPE_OBJECT_TYPE_KIND_UINT_32_TYPE, encoding_version
)) - 1)) & ~((get_native_type_cdr_alignment(RTI_CDR_TYPE_OBJECT_TYPE_KIND_UINT_32_TYPE
, encoding_version)) - 1)), offset += offset_zero)
3801 offset_zero)(offset -= offset_zero, offset = (((offset) + ((get_native_type_cdr_alignment
(RTI_CDR_TYPE_OBJECT_TYPE_KIND_UINT_32_TYPE, encoding_version
)) - 1)) & ~((get_native_type_cdr_alignment(RTI_CDR_TYPE_OBJECT_TYPE_KIND_UINT_32_TYPE
, encoding_version)) - 1)), offset += offset_zero)
;3802rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);3803 if (info3804 && (flags & MEMBER_OPTIONAL(2)) == MEMBER_OPTIONAL(2)3805 && element_member_id != 03806 && member_id != element_member_id) {3807offset = offset_before;3808 return offset;3809 }3810 if (member_length == 0) {3811 return offset;3812 }3813 }3814 if (extensibility == EXTENSIBILITY_MUTABLE) {3815 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);3816 offset_zero = offset;3817 if ((member_id & PID_LIST_END(0x3f02)) == PID_LIST_END(0x3f02)){3818 /* If this is the end of the list, don't add a tree.3819 * If we add more logic here in the future, take into account that3820 * offset is incremented by 4 */3821 offset += 0;3822 return offset;3823 }3824 if (member_length == 0){3825 return offset;3826 }3827 }3828 //proto_item_append_text(tree, "(Before Switch 0x%016" PRIx64 ")", type_id);3829 3830 increment_dissection_depth(pinfo);3831 switch (member_kind) {3832 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_BOOLEAN_TYPE: {3833 gint length = get_native_type_cdr_length(member_kind);3834 if (show) {3835 ALIGN_ZERO(offset, get_native_type_cdr_alignment(member_kind, encoding_version), offset_zero)(offset -= offset_zero, offset = (((offset) + ((get_native_type_cdr_alignment
(member_kind, encoding_version)) - 1)) & ~((get_native_type_cdr_alignment
(member_kind, encoding_version)) - 1)), offset += offset_zero
)
;3836 gint16 value = tvb_get_gint8(tvb, offset);3837 proto_tree_add_boolean_format(tree, hf_rtps_dissection_boolean, tvb, offset, length, value,3838 "%s: %d", name, value);3839 }3840 offset += length;3841 break;3842 }3843 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_CHAR_8_TYPE:3844 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_BYTE_TYPE: {3845 gint length = get_native_type_cdr_length(member_kind);3846 if (show) {3847 ALIGN_ZERO(offset, get_native_type_cdr_alignment(member_kind, encoding_version), offset_zero)(offset -= offset_zero, offset = (((offset) + ((get_native_type_cdr_alignment
(member_kind, encoding_version)) - 1)) & ~((get_native_type_cdr_alignment
(member_kind, encoding_version)) - 1)), offset += offset_zero
)
;3848 gint16 value = tvb_get_gint8(tvb, offset);3849 proto_tree_add_uint_format(tree, hf_rtps_dissection_byte, tvb, offset, length, value,3850 "%s: %d", name, value);3851 }3852 offset += length;3853 break;3854 }3855 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_INT_16_TYPE: {3856 gint length = get_native_type_cdr_length(member_kind);3857 if (show) {3858 ALIGN_ZERO(offset, get_native_type_cdr_alignment(member_kind, encoding_version), offset_zero)(offset -= offset_zero, offset = (((offset) + ((get_native_type_cdr_alignment
(member_kind, encoding_version)) - 1)) & ~((get_native_type_cdr_alignment
(member_kind, encoding_version)) - 1)), offset += offset_zero
)
;3859 gint16 value = tvb_get_gint16(tvb, offset, encoding);3860 proto_tree_add_int_format(tree, hf_rtps_dissection_int16, tvb, offset, length, value,3861 "%s: %d", name, value);3862 }3863 offset += length;3864 break;3865 }3866 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_UINT_16_TYPE: {3867 gint length = get_native_type_cdr_length(member_kind);3868 if (show) {3869 ALIGN_ZERO(offset, get_native_type_cdr_alignment(member_kind, encoding_version), offset_zero)(offset -= offset_zero, offset = (((offset) + ((get_native_type_cdr_alignment
(member_kind, encoding_version)) - 1)) & ~((get_native_type_cdr_alignment
(member_kind, encoding_version)) - 1)), offset += offset_zero
)
;3870 guint16 value = tvb_get_guint16(tvb, offset, encoding);3871 proto_tree_add_uint_format(tree, hf_rtps_dissection_uint16, tvb, offset, length, value,3872 "%s: %u", name, value);3873 }3874 offset += length;3875 break;3876 }3877 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_ENUMERATION_TYPE:3878 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_INT_32_TYPE: {3879 gint length = get_native_type_cdr_length(member_kind);3880 if (show) {3881 ALIGN_ZERO(offset, get_native_type_cdr_alignment(member_kind, encoding_version), offset_zero)(offset -= offset_zero, offset = (((offset) + ((get_native_type_cdr_alignment
(member_kind, encoding_version)) - 1)) & ~((get_native_type_cdr_alignment
(member_kind, encoding_version)) - 1)), offset += offset_zero
)
;3882 gint value = tvb_get_gint32(tvb, offset, encoding);3883 proto_tree_add_int_format(tree, hf_rtps_dissection_int32, tvb, offset, length, value,3884 "%s: %d", name, value);3885 }3886 offset += length;3887 break;3888 }3889 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_UINT_32_TYPE: {3890 gint length = get_native_type_cdr_length(member_kind);3891 if (show) {3892 ALIGN_ZERO(offset, get_native_type_cdr_alignment(member_kind, encoding_version), offset_zero)(offset -= offset_zero, offset = (((offset) + ((get_native_type_cdr_alignment
(member_kind, encoding_version)) - 1)) & ~((get_native_type_cdr_alignment
(member_kind, encoding_version)) - 1)), offset += offset_zero
)
;3893 guint value = tvb_get_guint32(tvb, offset, encoding);3894 proto_tree_add_uint_format(tree, hf_rtps_dissection_uint32, tvb, offset, length, value,3895 "%s: %u", name, value);3896 }3897 offset += length;3898 break;3899 }3900 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_INT_64_TYPE: {3901 gint length = get_native_type_cdr_length(member_kind);3902 if (show) {3903 ALIGN_ZERO(offset, get_native_type_cdr_alignment(member_kind, encoding_version), offset_zero)(offset -= offset_zero, offset = (((offset) + ((get_native_type_cdr_alignment
(member_kind, encoding_version)) - 1)) & ~((get_native_type_cdr_alignment
(member_kind, encoding_version)) - 1)), offset += offset_zero
)
;3904 gint64 value = tvb_get_gint64(tvb, offset, encoding);3905 proto_tree_add_int64_format(tree, hf_rtps_dissection_int64, tvb, offset, length, value,3906 "%s: %"PRId64"l" "d", name, value);3907 }3908 offset += length;3909 break;3910 }3911 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_UINT_64_TYPE: {3912 gint length = get_native_type_cdr_length(member_kind);3913 if (show) {3914 ALIGN_ZERO(offset, get_native_type_cdr_alignment(member_kind, encoding_version), offset_zero)(offset -= offset_zero, offset = (((offset) + ((get_native_type_cdr_alignment
(member_kind, encoding_version)) - 1)) & ~((get_native_type_cdr_alignment
(member_kind, encoding_version)) - 1)), offset += offset_zero
)
;3915 guint64 value = tvb_get_guint64(tvb, offset, encoding);3916 proto_tree_add_uint64_format(tree, hf_rtps_dissection_uint64, tvb, offset, length, value,3917 "%s: %"PRIu64"l" "u", name, value);3918 }3919 offset += length;3920 break;3921 }3922 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_FLOAT_32_TYPE: {3923 gint length = get_native_type_cdr_length(member_kind);3924 if (show) {3925 ALIGN_ZERO(offset, get_native_type_cdr_alignment(member_kind, encoding_version), offset_zero)(offset -= offset_zero, offset = (((offset) + ((get_native_type_cdr_alignment
(member_kind, encoding_version)) - 1)) & ~((get_native_type_cdr_alignment
(member_kind, encoding_version)) - 1)), offset += offset_zero
)
;3926 gfloat value = tvb_get_ieee_float(tvb, offset, encoding);3927 proto_tree_add_float_format(tree, hf_rtps_dissection_float, tvb, offset, length, value,3928 "%s: %.6f", name, value);3929 }3930 offset += length;3931 break;3932 }3933 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_FLOAT_64_TYPE: {3934 gint length = get_native_type_cdr_length(member_kind);3935 if (show) {3936 ALIGN_ZERO(offset, get_native_type_cdr_alignment(member_kind, encoding_version), offset_zero)(offset -= offset_zero, offset = (((offset) + ((get_native_type_cdr_alignment
(member_kind, encoding_version)) - 1)) & ~((get_native_type_cdr_alignment
(member_kind, encoding_version)) - 1)), offset += offset_zero
)
;3937 gdouble value = tvb_get_ieee_double(tvb, offset, encoding);3938 proto_tree_add_double_format(tree, hf_rtps_dissection_double, tvb, offset, length, value,3939 "%s: %.6f", name, value);3940 }3941 offset += length;3942 break;3943 }3944 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_FLOAT_128_TYPE: {3945 gint length = get_native_type_cdr_length(member_kind);3946 if (show) {3947 ALIGN_ZERO(offset, get_native_type_cdr_alignment(member_kind, encoding_version), offset_zero)(offset -= offset_zero, offset = (((offset) + ((get_native_type_cdr_alignment
(member_kind, encoding_version)) - 1)) & ~((get_native_type_cdr_alignment
(member_kind, encoding_version)) - 1)), offset += offset_zero
)
;3948 proto_tree_add_item(tree, hf_rtps_dissection_int128, tvb, offset, length, encoding);3949 }3950 offset += length;3951 break;3952 }3953 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_ARRAY_TYPE: {3954 guint i;3955 guint num_elements;3956 proto_tree * aux_tree = NULL((void*)0);3957 gint base_offset = offset;3958 gboolean show_current_element = TRUE(!(0));3959 gint array_kind_length = 0;3960 guint bound = 0;3961 gint first_skipped_element_offset = 0;3962 3963 if (info != NULL((void*)0)) {3964 bound = (guint)info->bound;3965 3966 /* In case this array is not shown and is a native type. We get the sze length for calculating3967 * the whole array length */3968 array_kind_length = get_native_type_cdr_length(info->base_type_id);3969 }3970 /* Do not add any information to the tree if it is not shown */3971 if (show) {3972 aux_tree = proto_tree_add_subtree(tree, tvb, offset, -1, ett_rtps_dissection_tree,3973 NULL((void*)0), name);3974 } else if (array_kind_length != -1) {3975 /* Total length of the array. Nothing else to do here. */3976 offset += bound * array_kind_length;3977 break;3978 }3979 3980 /* Get the maximum number of elements to be shown */3981 num_elements = (enable_max_array_data_type_elements)3982 ? MIN(bound, rtps_max_array_data_type_elements)(((bound) < (rtps_max_array_data_type_elements)) ? (bound)
: (rtps_max_array_data_type_elements))
3983 : bound;3984 for (i = 0; i < bound; i++) {3985 gchar temp_buff[MAX_MEMBER_NAME(256)];3986 3987 if (show && i < num_elements) {3988 /* No need to copy if it will not be shown */3989 snprintf(temp_buff, MAX_MEMBER_NAME(256), "%s[%u]", name, i);3990 show_current_element = TRUE(!(0));3991 } else {3992 if (show_current_element) {3993 show_current_element = FALSE(0);3994 /* Updated only once */3995 first_skipped_element_offset = offset;3996 }3997 /* If this array has elements that won't be shown and is an array of native type3998 * we can calculate the total offset and break the loop */3999 if (array_kind_length != -1) {4000 offset += (bound - i) * array_kind_length;4001 break;4002 }4003 }4004 offset = dissect_user_defined(aux_tree, tvb, pinfo, offset, encoding, encoding_version, NULL((void*)0),4005 info->base_type_id, temp_buff, EXTENSIBILITY_INVALID, offset_zero, 0, 0, show_current_element);4006 }4007 4008 /* If reached the limit and there are remaining elements we need to show the message and4009 * assign the length of the ramining elements to this */4010 if (enable_max_array_data_type_elements && show && !show_current_element) {4011 proto_tree_add_subtree_format(4012 aux_tree,4013 tvb,4014 /* Start at the first item not shown */4015 first_skipped_element_offset,4016 offset - first_skipped_element_offset,4017 ett_rtps_info_remaining_items,4018 NULL((void*)0),4019 DISSECTION_INFO_REMAINING_ELEMENTS_STR_d"... %d items(s) remaining. The number of items shown is configurable through RTPS properties under Preferences/Protocols.",4020 bound - num_elements);4021 }4022 proto_item_set_len(aux_tree, offset - base_offset);4023 break;4024 }4025 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_SEQUENCE_TYPE: {4026 guint i;4027 guint num_elements;4028 proto_tree * aux_tree = NULL((void*)0);4029 gint base_offset = offset;4030 gboolean show_current_element = TRUE(!(0));4031 gint length = 4;4032 gint sequence_kind_length = 0;4033 gint first_skipped_element_offset = 0;4034 4035 ALIGN_ZERO(offset, length, offset_zero)(offset -= offset_zero, offset = (((offset) + ((length) - 1))
& ~((length) - 1)), offset += offset_zero)
;4036 guint seq_size = tvb_get_guint32(tvb, offset, encoding);4037 4038 /* In case this sequence is not shown and is a native type. We get the sze length for calculating4039 * the whole seuqnece length */4040 if (info != NULL((void*)0)) {4041 sequence_kind_length = get_native_type_cdr_length(info->base_type_id);4042 }4043 if (show) {4044 aux_tree = proto_tree_add_subtree_format(tree, tvb, offset, -1, ett_rtps_dissection_tree,4045 NULL((void*)0), "%s (%u elements)", name, seq_size);4046 /* If it is a native type we can calculate the sequence length and finish. */4047 } else if (sequence_kind_length != -1) {4048 /* Number of elements integer size + number of elements * size of the native type */4049 offset += 4 + seq_size * sequence_kind_length;4050 break;4051 }4052 offset += 4;4053 4054 num_elements = (enable_max_array_data_type_elements)4055 ? MIN(seq_size, rtps_max_array_data_type_elements)(((seq_size) < (rtps_max_array_data_type_elements)) ? (seq_size
) : (rtps_max_array_data_type_elements))
4056 : seq_size;4057 for (i = 0; i < seq_size; i++) {4058 gchar temp_buff[MAX_MEMBER_NAME(256)];4059 if (show && i < num_elements) {4060 /* No need to copy if it will not be shown */4061 snprintf(temp_buff, MAX_MEMBER_NAME(256), "%s[%u]", name, i);4062 show_current_element = TRUE(!(0));4063 } else {4064 if (show_current_element) {4065 show_current_element = FALSE(0);4066 /* Updated only once */4067 first_skipped_element_offset = offset;4068 }4069 /* If this array has elements that won't be shown and is an array of native type4070 * we can calculate the total offset and break the loop */4071 if (sequence_kind_length != -1) {4072 offset += (seq_size - i) * sequence_kind_length;4073 break;4074 }4075 }4076 if (info != NULL((void*)0) && info->base_type_id > 0)4077 offset = dissect_user_defined(aux_tree, tvb, pinfo, offset, encoding, encoding_version, NULL((void*)0),4078 info->base_type_id, temp_buff, EXTENSIBILITY_INVALID, offset_zero, 0, 0, show_current_element);4079 }4080 /* If reached the limit and there are remaining elements we need to show the message and4081 * assign the length of the ramining elements to this */4082 if (enable_max_array_data_type_elements && show && !show_current_element) {4083 proto_tree_add_subtree_format(4084 aux_tree,4085 tvb,4086 /* Start at the first item not shown */4087 first_skipped_element_offset,4088 offset - first_skipped_element_offset,4089 ett_rtps_info_remaining_items,4090 NULL((void*)0),4091 DISSECTION_INFO_REMAINING_ELEMENTS_STR_d"... %d items(s) remaining. The number of items shown is configurable through RTPS properties under Preferences/Protocols.",4092 seq_size - num_elements);4093 }4094 proto_item_set_len(aux_tree, offset - base_offset);4095 break;4096 }4097 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_STRING_TYPE: {4098 gchar * string_value = NULL((void*)0);4099 gint length = 4;4100 4101 ALIGN_ZERO(offset, length, offset_zero)(offset -= offset_zero, offset = (((offset) + ((length) - 1))
& ~((length) - 1)), offset += offset_zero)
;4102 guint string_size = tvb_get_guint32(tvb, offset, encoding);4103 offset += 4;4104 //proto_item_append_text(tree, "(String length: %u)", string_size);4105 if (show) {4106 string_value = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, string_size, ENC_ASCII0x00000000);4107 proto_tree_add_string_format(tree, hf_rtps_dissection_string, tvb, offset, string_size,4108 string_value, "%s: %s", name, string_value);4109 }4110 offset += string_size;4111 break;4112 }4113 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_ALIAS_TYPE: {4114 guint64 base_type_id = 0;4115 if (info != NULL((void*)0)) {4116 base_type_id = info->base_type_id;4117 }4118 offset = dissect_user_defined(tree, tvb, pinfo, offset, encoding, encoding_version, NULL((void*)0),4119 base_type_id, name, EXTENSIBILITY_INVALID, offset_zero, 0, 0, show);4120 break;4121 }4122 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_UNION_TYPE: {4123 guint64 key = type_id - 1;4124 union_member_mapping * result = (union_member_mapping *)wmem_map_lookup(union_member_mappings, &(key));4125 4126 if (result != NULL((void*)0)) {4127 gint value = tvb_get_gint32(tvb, offset, encoding);4128 offset += 4;4129 key = type_id + value;4130 result = (union_member_mapping *)wmem_map_lookup(union_member_mappings, &(key));4131 if (result != NULL((void*)0)) {4132 if (show) {4133 proto_item_append_text(tree, " (discriminator = %d, type_id = 0x%016" PRIx64"l" "x" ")",4134 value, result->member_type_id);4135 }4136 offset = dissect_user_defined(tree, tvb, pinfo, offset, encoding, encoding_version, NULL((void*)0),4137 result->member_type_id, result->member_name, EXTENSIBILITY_INVALID, offset, 0, 0, show);4138 } else {4139 /* the hashmap uses the type_id to index the objects. subtracting -2 here to lookup the discriminator4140 related to the type_id that identifies an union */4141 key = type_id + HASHMAP_DISCRIMINATOR_CONSTANT(-2);4142 result = (union_member_mapping *)wmem_map_lookup(union_member_mappings, &(key));4143 if (result != NULL((void*)0)) {4144 if (show) {4145 proto_item_append_text(tree, " (discriminator = %d, type_id = 0x%016" PRIx64"l" "x" ")",4146 value, result->member_type_id);4147 }4148 offset = dissect_user_defined(tree, tvb, pinfo, offset, encoding, encoding_version, NULL((void*)0),4149 result->member_type_id, result->member_name, EXTENSIBILITY_INVALID, offset, 0, 0, show);4150 }4151 }4152 } else {4153 if (show) {4154 proto_item_append_text(tree, "(NULL 0x%016" PRIx64"l" "x" ")", type_id);4155 }4156 }4157 break;4158 }4159 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_STRUCTURE_TYPE: {4160 guint i;4161 proto_tree * aux_tree = NULL((void*)0);4162 guint shown_elements = 0;4163 gboolean show_current_element = TRUE(!(0));4164 guint num_elements = 0;4165 gint first_skipped_element_offset = 0;4166 4167 if (info != NULL((void*)0)) {4168 if (show) {4169 aux_tree = proto_tree_add_subtree(tree, tvb, offset, -1, ett_rtps_dissection_tree,4170 NULL((void*)0), name);4171 }4172 if (info->extensibility == EXTENSIBILITY_MUTABLE) {4173 gboolean is_end = FALSE(0);4174 /* Don't know beforehand the number of elements. Need to count them */4175 while (!is_end) {4176 if (!(show && shown_elements < rtps_max_data_type_elements) && show_current_element) {4177 show_current_element = FALSE(0);4178 /* Updated only once */4179 first_skipped_element_offset = offset;4180 }4181 offset = dissect_mutable_member(aux_tree, tvb, pinfo, offset, encoding, encoding_version, info, &is_end, show_current_element);4182 ++num_elements;4183 if (show_current_element) {4184 ++shown_elements;4185 }4186 }4187 }4188 else {4189 if (info->base_type_id > 0) {4190 if (show) {4191 proto_item_append_text(tree, "(BaseId: 0x%016" PRIx64"l" "x" ")", info->base_type_id);4192 }4193 offset = dissect_user_defined(aux_tree, tvb, pinfo, offset, encoding, encoding_version, NULL((void*)0),4194 info->base_type_id, info->member_name, EXTENSIBILITY_INVALID,4195 offset, 0, 0, show);4196 }4197 4198 /* Get the maximum number of elements to be shown depending if enable_max_data_type_elements is enabled */4199 shown_elements = (enable_max_data_type_elements)4200 ? MIN(info->num_elements, rtps_max_data_type_elements)(((info->num_elements) < (rtps_max_data_type_elements))
? (info->num_elements) : (rtps_max_data_type_elements))
4201 : info->num_elements;4202 for (i = 0; i < info->num_elements; i++) {4203 if (info->elements[i].type_id > 0) {4204 /* A member is shown if the parent cluster is shown and the position is in the4205 * range of maximum number of elements shown */4206 if (!(show && i < shown_elements) && show_current_element) {4207 show_current_element = FALSE(0);4208 /* Updated only once */4209 first_skipped_element_offset = offset;4210 }4211 /* If a member is not shown all it children will inherit the "show_current_element" value */4212 offset = dissect_user_defined(aux_tree, tvb, pinfo, offset, encoding, encoding_version, NULL((void*)0),4213 info->elements[i].type_id, info->elements[i].member_name, info->extensibility,4214 offset_zero, info->elements[i].flags, info->elements[i].member_id, show_current_element);4215 }4216 }4217 num_elements = info->num_elements;4218 }4219 /* If reached the limit and there are remaining elements we need to show the message and4220 * assign the length of the ramining elements to this */4221 if (enable_max_array_data_type_elements && show && !show_current_element) {4222 proto_tree_add_subtree_format(4223 aux_tree,4224 tvb,4225 first_skipped_element_offset,4226 offset - first_skipped_element_offset,4227 ett_rtps_info_remaining_items,4228 NULL((void*)0),4229 DISSECTION_INFO_REMAINING_ELEMENTS_STR_d"... %d items(s) remaining. The number of items shown is configurable through RTPS properties under Preferences/Protocols.",4230 num_elements - shown_elements);4231 }4232 }4233 break;4234 }4235 default:{4236 /* undefined behavior. this should not happen. the following line helps to debug if it happened */4237 if (show) {4238 proto_item_append_text(tree, "(unknown 0x%016" PRIx64"l" "x" ")", member_kind);4239 }4240 break;4241 }4242 }4243 decrement_dissection_depth(pinfo);4244 4245 if (extensibility == EXTENSIBILITY_MUTABLE) {4246 offset_zero += member_length;4247 return offset_zero;4248 } else {4249 return offset;4250 }4251}4252 4253// NOLINTNEXTLINE(misc-no-recursion)4254static gint dissect_mutable_member(proto_tree *tree , tvbuff_t * tvb, packet_info *pinfo, gint offset, guint encoding, guint encoding_version,4255 dissection_info * info, gboolean * is_end, gboolean show) {4256 4257 proto_tree * member;4258 guint32 member_id, member_length;4259 mutable_member_mapping * mapping;4260 gint64 key;4261 4262 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);4263 if ((member_id & PID_LIST_END(0x3f02)) == PID_LIST_END(0x3f02)){4264 /* If this is the end of the list, don't add a tree.4265 * If we add more logic here in the future, take into account that4266 * offset is incremented by 4 */4267 offset += 0;4268 *is_end = TRUE(!(0));4269 return offset;4270 }4271 if (member_length == 0){4272 return offset;4273 }4274 member = proto_tree_add_subtree_format(tree, tvb, offset, member_length, ett_rtps_dissection_tree,4275 NULL((void*)0), "ID: %d, Length: %d", member_id, member_length);4276 4277 {4278 if (info->base_type_id > 0) {4279 key = (info->base_type_id + info->base_type_id * member_id);4280 mapping = (mutable_member_mapping *) wmem_map_lookup(mutable_member_mappings, &(key));4281 if (mapping) { /* the library knows how to dissect this */4282 proto_item_append_text(member, "(base found 0x%016" PRIx64"l" "x" ")", key);4283 dissect_user_defined(tree, tvb, pinfo, offset, encoding, encoding_version, NULL((void*)0), mapping->member_type_id,4284 mapping->member_name, EXTENSIBILITY_INVALID, offset, 0, mapping->member_id, show);4285 proto_item_set_hidden(member);4286 return check_offset_addition(offset, member_length, tree, NULL((void*)0), tvb);4287 } else4288 proto_item_append_text(member, "(base not found 0x%016" PRIx64"l" "x" " from 0x%016" PRIx64"l" "x" ")",4289 key, info->base_type_id);4290 }4291 }4292 4293 key = (info->type_id + info->type_id * member_id);4294 mapping = (mutable_member_mapping *) wmem_map_lookup(mutable_member_mappings, &(key));4295 if (mapping) { /* the library knows how to dissect this */4296 proto_item_append_text(member, "(found 0x%016" PRIx64"l" "x" ")", key);4297 dissect_user_defined(tree, tvb, pinfo, offset, encoding, encoding_version, NULL((void*)0), mapping->member_type_id,4298 mapping->member_name, EXTENSIBILITY_INVALID, offset, 0, mapping->member_id, show);4299 4300 } else4301 proto_item_append_text(member, "(not found 0x%016" PRIx64"l" "x" " from 0x%016" PRIx64"l" "x" ")",4302 key, info->type_id);4303 proto_item_set_hidden(member);4304 return check_offset_addition(offset, member_length, tree, NULL((void*)0), tvb);4305}4306 4307 4308/* *********************************************************************** */4309/* Appends extra formatting for those submessages that have a status info4310 */4311static void generate_status_info(packet_info *pinfo,4312 guint32 writer_id,4313 guint32 status_info) {4314 4315 /* Defines the extra information associated to the writer involved in4316 * this communication4317 *4318 * Format: [?Ptwrpm]\(u?d?\)4319 *4320 * First letter table:4321 *4322 * writerEntityId value | Letter4323 * ----------------------------------------------------------+--------4324 * ENTITYID_UNKNOWN | ?4325 * ENTITYID_PARTICIPANT | P4326 * ENTITYID_SEDP_BUILTIN_TOPIC_WRITER | t4327 * ENTITYID_SEDP_BUILTIN_PUBLICATIONS_WRITER | w4328 * ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_WRITER | r4329 * ENTITYID_SPDP_BUILTIN_PARTICIPANT_WRITER | p4330 * ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_WRITER | m4331 * ENTITYID_P2P_BUILTIN_PARTICIPANT_STATELESS_WRITER | s4332 * ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_WRITER | V4333 * ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_SECURE_WRITER | M4334 * ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_WRITER | W4335 * ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_WRITER | R4336 * ENTITYID_RTI_BUILTIN_PARTICIPANT_BOOTSTRAP_WRITER | Pc4337 * ENTITYID_RTI_BUILTIN_PARTICIPANT_BOOTSTRAP_READER | Pc4338 * ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_WRITER | Pb4339 * ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_READER | Pb4340 * ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_WRITER | sPc4341 * ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_READER | sPc4342 4343 4344 * The letter is followed by:4345 * status_info &1 | status_info & 2 | Text4346 * ---------------+-----------------------+--------------4347 * status_info not defined in inlineQos | [?]4348 * 0 | 0 | [__]4349 * 0 | 1 | [u_]4350 * 1 | 0 | [_d]4351 * 1 | 1 | [ud]4352 */4353 /* 0123456 */4354 gchar * writerId = NULL((void*)0);4355 gchar * disposeFlag = NULL((void*)0);4356 gchar * unregisterFlag = NULL((void*)0);4357 4358 wmem_strbuf_t *buffer = wmem_strbuf_create(wmem_packet_scope())wmem_strbuf_new(wmem_packet_scope(), "");4359 submessage_col_info* current_submessage_col_info = NULL((void*)0);4360 4361 current_submessage_col_info = (submessage_col_info*)p_get_proto_data(pinfo->pool, pinfo, proto_rtps, RTPS_CURRENT_SUBMESSAGE_COL_DATA_KEY3);4362 switch(writer_id) {4363 case ENTITYID_PARTICIPANT(0x000001c1):4364 case ENTITYID_SPDP_RELIABLE_BUILTIN_PARTICIPANT_SECURE_WRITER(0xff0101c2):4365 writerId = "P";4366 break;4367 case ENTITYID_BUILTIN_TOPIC_WRITER(0x000002c2):4368 writerId = "t";4369 break;4370 case ENTITYID_BUILTIN_PUBLICATIONS_WRITER(0x000003c2):4371 writerId = "w";4372 break;4373 case ENTITYID_BUILTIN_SUBSCRIPTIONS_WRITER(0x000004c2):4374 writerId = "r";4375 break;4376 case ENTITYID_BUILTIN_PARTICIPANT_WRITER(0x000100c2):4377 writerId = "p";4378 break;4379 case ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_WRITER(0x000200c2):4380 writerId = "m";4381 break;4382 case ENTITYID_P2P_BUILTIN_PARTICIPANT_STATELESS_WRITER(0x000201c3):4383 writerId = "s";4384 break;4385 case ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_WRITER(0xff0202c3):4386 writerId = "V";4387 break;4388 case ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_SECURE_WRITER(0xff0200c2):4389 writerId = "M";4390 break;4391 case ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_WRITER(0xff0003c2):4392 writerId = "W";4393 break;4394 case ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_WRITER(0xff0004c2):4395 writerId = "R";4396 break;4397 case ENTITYID_RTI_BUILTIN_PARTICIPANT_BOOTSTRAP_WRITER(0x00010082):4398 case ENTITYID_RTI_BUILTIN_PARTICIPANT_BOOTSTRAP_READER(0x00010087):4399 writerId = "Pb";4400 break;4401 case ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_WRITER(0x00010182):4402 case ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_READER(0x00010187):4403 writerId = "Pc";4404 break;4405 case ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_WRITER(0xff010182):4406 case ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_READER(0xff010187):4407 writerId = "sPc";4408 break;4409 case ENTITYID_RTI_BUILTIN_SERVICE_REQUEST_WRITER(0x00020082):4410 case ENTITYID_RTI_BUILTIN_SERVICE_REQUEST_READER(0x00020087): {4411 /* This is added to proto_rtps in rtps_util_add_rti_service_request* */4412 guint32* service_id = (guint32*)p_get_proto_data(pinfo->pool, pinfo, proto_rtps, RTPS_SERVICE_REQUEST_ID_PROTODATA_KEY1);4413 if (service_id != NULL((void*)0) && *service_id == RTI_SERVICE_REQUEST_ID_TOPIC_QUERY1) {4414 writerId = "tq";4415 }4416 break;4417 }4418 default:4419 /* Unknown writer ID, don't format anything */4420 break;4421 }4422 4423 switch(status_info) {4424 case 0: unregisterFlag = "_"; disposeFlag = "_"; break;4425 case 1: unregisterFlag = "_"; disposeFlag = "D"; break;4426 case 2: unregisterFlag = "U"; disposeFlag = "_"; break;4427 case 3: unregisterFlag = "U"; disposeFlag = "D"; break;4428 default: /* Unknown status info, omit it */4429 break;4430 }4431 4432 if (writerId != NULL((void*)0) || unregisterFlag != NULL((void*)0) ||4433 disposeFlag != NULL((void*)0) ) {4434 wmem_strbuf_append(buffer, "(");4435 if (writerId != NULL((void*)0)) {4436 wmem_strbuf_append(buffer, writerId);4437 }4438 if (unregisterFlag != NULL((void*)0) || disposeFlag != NULL((void*)0)) {4439 wmem_strbuf_append(buffer, "[");4440 wmem_strbuf_append(buffer, unregisterFlag);4441 wmem_strbuf_append(buffer, disposeFlag);4442 wmem_strbuf_append(buffer, "]");4443 }4444 wmem_strbuf_append(buffer, ")");4445 current_submessage_col_info->status_info = wmem_strbuf_get_str(buffer);4446 }4447}4448 4449/* *********************************************************************** */4450 4451/*4452 * Coherent set starts if seqNumber == writerSeqNumber4453 *4454 * Coherent sets end in three different ways:4455 * - A new coherence set starts with the consecutive writerSeqNumber of the last coherent set packet.4456 * -seqNumber == RTPS_SEQUENCENUMBER_UNKNOWN4457 * - A DATA packet sent with the consecutive writerSeqNumber of the last coherent set packet.4458 * - PID_END_COHERENT_SET received. That condition is not handled here. Check PID_END_COHERENT_SET dissection.4459 * Empty Data condition is not handled here. rtps_util_detect_coherent_set_end_empty_data_case called at the end of dissect_RTPS_DATA and dissect_RTPS_DATA_FRAG_kind4460 */4461static void rtps_util_add_coherent_set_general_cases_case(4462 proto_tree *tree,4463 tvbuff_t *tvb,4464 guint64 coherent_seq_number,4465 coherent_set_entity_info *coherent_set_entity_info_object) {4466 4467 coherent_set_entity_info *register_entry;4468 proto_tree *marked_item_tree;4469 coherent_set_info *coherent_set_info_entry;4470 coherent_set_key coherent_set_info_key;4471 4472 coherent_set_entity_info_object->coherent_set_seq_number = coherent_seq_number;4473 register_entry = (coherent_set_entity_info*)wmem_map_lookup(coherent_set_tracking.entities_using_map,4474 &coherent_set_entity_info_object->guid);4475 if (!register_entry) {4476 register_entry = (coherent_set_entity_info*)wmem_memdup(wmem_file_scope(), coherent_set_entity_info_object, sizeof(coherent_set_entity_info));4477 wmem_map_insert(4478 coherent_set_tracking.entities_using_map,4479 &register_entry->guid,4480 register_entry);4481 }4482 4483 /* The hash and compare functions treat the key as a sequence of bytes */4484 memset(&coherent_set_info_key, 0, sizeof(coherent_set_info_key));4485 coherent_set_info_key.guid = coherent_set_entity_info_object->guid;4486 coherent_set_info_key.coherent_set_seq_number = coherent_seq_number;4487 coherent_set_info_entry = (coherent_set_info*)wmem_map_lookup(coherent_set_tracking.coherent_set_registry_map,4488 &coherent_set_info_key);4489 if (!coherent_set_info_entry) {4490 coherent_set_info_entry = wmem_new0(wmem_file_scope(), coherent_set_info)((coherent_set_info*)wmem_alloc0((wmem_file_scope()), sizeof(
coherent_set_info)))
;4491 coherent_set_info_entry->key = (coherent_set_key*)wmem_memdup(wmem_file_scope(), &coherent_set_info_key, sizeof(coherent_set_key));4492 coherent_set_info_entry->is_set = FALSE(0);4493 wmem_map_insert(4494 coherent_set_tracking.coherent_set_registry_map,4495 coherent_set_info_entry->key,4496 coherent_set_info_entry);4497 }4498 4499 if (coherent_set_info_entry->writer_seq_number < coherent_set_entity_info_object->writer_seq_number) {4500 coherent_set_info_entry->writer_seq_number = coherent_set_entity_info_object->writer_seq_number;4501 }4502 /* Start */4503 if (coherent_set_entity_info_object->coherent_set_seq_number == coherent_set_entity_info_object->writer_seq_number) {4504 marked_item_tree = proto_tree_add_uint64(tree, hf_rtps_coherent_set_start,4505 tvb, 0, 0, coherent_seq_number);4506 proto_item_set_generated(marked_item_tree);4507 4508 /* End case: Start of a new coherent set */4509 if (coherent_set_entity_info_object->coherent_set_seq_number > register_entry->coherent_set_seq_number &&4510 coherent_set_entity_info_object->writer_seq_number - 1 == register_entry->writer_seq_number) {4511 coherent_set_info *previous_entry;4512 4513 marked_item_tree = proto_tree_add_uint64(tree, hf_rtps_coherent_set_end,4514 tvb, 0, 0, register_entry->coherent_set_seq_number);4515 proto_item_set_generated(marked_item_tree);4516 coherent_set_info_key.coherent_set_seq_number = register_entry->writer_seq_number;4517 coherent_set_info_key.guid = register_entry->guid;4518 previous_entry = (coherent_set_info*)wmem_map_lookup(coherent_set_tracking.coherent_set_registry_map, &coherent_set_info_key);4519 if (previous_entry) {4520 previous_entry->is_set = TRUE(!(0));4521 }4522 }4523 }4524 4525 if (!coherent_set_info_entry->is_set) {4526 4527 coherent_set_info_key.coherent_set_seq_number = coherent_seq_number - 1;4528 4529 /* End case: Sequence unknown received */4530 4531 if (coherent_set_entity_info_object->coherent_set_seq_number == RTPS_SEQUENCENUMBER_UNKNOWN0xffffffff00000000) {4532 register_entry->coherent_set_seq_number = coherent_set_entity_info_object->coherent_set_seq_number;4533 marked_item_tree = proto_tree_add_uint64(tree, hf_rtps_coherent_set_end,4534 tvb, 0, 0, coherent_set_info_entry->key->coherent_set_seq_number);4535 proto_item_set_generated(marked_item_tree);4536 coherent_set_info_entry->is_set = TRUE(!(0));4537 }4538 } else if (coherent_set_info_entry->writer_seq_number == coherent_set_entity_info_object->writer_seq_number) {4539 proto_tree *ti;4540 4541 ti = proto_tree_add_uint64(tree, hf_rtps_coherent_set_end,4542 tvb, 0, 0, coherent_set_info_entry->key->coherent_set_seq_number);4543 proto_item_set_generated(ti);4544 }4545 /* Update the entity */4546 coherent_set_entity_info_object->expected_coherent_set_end_writers_seq_number = coherent_set_entity_info_object->writer_seq_number + 1;4547 *register_entry = *coherent_set_entity_info_object;4548}4549 4550/*4551 * Handles the coherent set termination case where the coherent set finishes by sending a DATA or DATA_FRAG with no parameters.4552 * For the other cases, check rtps_util_add_coherent_set_general_cases_case.4553 * this function must be called at the end of dissect_RTPS_DATA and dissect_RTPS_DATA_FRAG_kind4554 */4555static void rtps_util_detect_coherent_set_end_empty_data_case(4556 4557 coherent_set_entity_info *coherent_set_entity_info_object) {4558 coherent_set_entity_info *coherent_set_entry = NULL((void*)0);4559 4560 coherent_set_entry = (coherent_set_entity_info*) wmem_map_lookup(coherent_set_tracking.entities_using_map, &coherent_set_entity_info_object->guid);4561 if (coherent_set_entry) {4562 coherent_set_info *coherent_set_info_entry;4563 coherent_set_key key;4564 4565 /* The hash and compare functions treat the key as a sequence of bytes. */4566 memset(&key, 0, sizeof(key));4567 key.guid = coherent_set_entity_info_object->guid;4568 key.coherent_set_seq_number = coherent_set_entry->coherent_set_seq_number;4569 4570 coherent_set_info_entry = (coherent_set_info*)wmem_map_lookup(coherent_set_tracking.coherent_set_registry_map, &key);4571 if (coherent_set_info_entry4572 && (coherent_set_entry->expected_coherent_set_end_writers_seq_number == coherent_set_entity_info_object->writer_seq_number)4573 && !coherent_set_info_entry->is_set) {4574 coherent_set_info_entry->is_set = TRUE(!(0));4575 coherent_set_info_entry->writer_seq_number = coherent_set_entry->expected_coherent_set_end_writers_seq_number - 1;4576 }4577 }4578}4579 4580static guint16 rtps_util_add_protocol_version(proto_tree *tree, /* Can NOT be NULL */4581 tvbuff_t *tvb,4582 gint offset) {4583 proto_item *ti;4584 proto_tree *version_tree;4585 guint16 version;4586 4587 version = tvb_get_ntohs(tvb, offset);4588 4589 ti = proto_tree_add_uint_format(tree, hf_rtps_protocol_version, tvb, offset, 2,4590 version, "Protocol version: %d.%d",4591 tvb_get_guint8(tvb, offset), tvb_get_guint8(tvb, offset+1));4592 version_tree = proto_item_add_subtree(ti, ett_rtps_proto_version);4593 4594 proto_tree_add_item(version_tree, hf_rtps_protocol_version_major, tvb, offset, 1, ENC_NA0x00000000);4595 proto_tree_add_item(version_tree, hf_rtps_protocol_version_minor, tvb, offset+1, 1, ENC_NA0x00000000);4596 4597 return version;4598}4599 4600 4601/* ------------------------------------------------------------------------- */4602/* Interpret the next bytes as vendor ID. If proto_tree and field ID is4603 * provided, it can also set.4604 */4605static guint16 rtps_util_add_vendor_id(proto_tree *tree,4606 tvbuff_t *tvb,4607 gint offset) {4608 guint8 major, minor;4609 guint16 vendor_id;4610 4611 major = tvb_get_guint8(tvb, offset);4612 minor = tvb_get_guint8(tvb, offset+1);4613 vendor_id = tvb_get_ntohs(tvb, offset);4614 4615 proto_tree_add_uint_format_value(tree, hf_rtps_vendor_id, tvb, offset, 2, vendor_id,4616 "%02d.%02d (%s)", major, minor,4617 val_to_str_const(vendor_id, vendor_vals, "Unknown"));4618 4619 return vendor_id;4620}4621 4622 4623 4624/* ------------------------------------------------------------------------- */4625/* Insert in the protocol tree the next 8 bytes interpreted as Locator_t4626 *4627 * Locator_t is a struct defined as:4628 * struct {4629 * long kind; // kind of locator4630 * unsigned long port;4631 * octet[16] address;4632 * } Locator_t;4633 */4634static gint rtps_util_add_locator_t(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, gint offset,4635 const guint encoding, const char *label) {4636 4637 proto_tree *ti;4638 proto_tree *locator_tree;4639 guint32 kind;4640 guint32 port;4641 const gint parameter_size = 24;4642 4643 locator_tree = proto_tree_add_subtree(tree, tvb, offset, parameter_size, ett_rtps_locator,4644 NULL((void*)0), label);4645 4646 proto_tree_add_item_ret_uint(locator_tree, hf_rtps_locator_kind, tvb, offset, 4, encoding, &kind);4647 switch (kind) {4648 case LOCATOR_KIND_UDPV4(1):4649 case LOCATOR_KIND_TUDPV4(0x01001001): {4650 ti = proto_tree_add_item_ret_uint(4651 locator_tree,4652 hf_rtps_locator_port,4653 tvb,4654 offset + 4,4655 4,4656 encoding,4657 &port);4658 4659 if (port == 0)4660 expert_add_info(pinfo, ti, &ei_rtps_locator_port);4661 proto_item_append_text(tree, " (%s, %s:%u)",4662 val_to_str(kind, rtps_locator_kind_vals, "%02x"),4663 tvb_ip_to_str(pinfo->pool, tvb, offset + 20)tvb_address_to_str(pinfo->pool, tvb, AT_IPv4, offset + 20), port);4664 proto_tree_add_item(locator_tree, hf_rtps_locator_ipv4, tvb, offset + 20, 4, ENC_BIG_ENDIAN0x00000000);4665 break;4666 }4667 case LOCATOR_KIND_TCPV4_LAN(8):4668 case LOCATOR_KIND_TCPV4_WAN(9):4669 case LOCATOR_KIND_TLSV4_LAN(10):4670 case LOCATOR_KIND_TLSV4_WAN(11): {4671 guint16 ip_kind;4672 ti = proto_tree_add_item_ret_uint(4673 locator_tree,4674 hf_rtps_locator_port,4675 tvb,4676 offset + 4,4677 4,4678 encoding,4679 &port);4680 if (port == 0)4681 expert_add_info(pinfo, ti, &ei_rtps_locator_port);4682 ip_kind = tvb_get_guint16(tvb, offset+16, encoding);4683 if (ip_kind == 0xFFFF) { /* IPv4 format */4684 guint16 public_address_port = tvb_get_guint16(tvb, offset + 18, ENC_BIG_ENDIAN0x00000000);4685 proto_tree_add_item(locator_tree, hf_rtps_locator_public_address_port,4686 tvb, offset+18, 2, ENC_BIG_ENDIAN0x00000000);4687 proto_tree_add_item(locator_tree, hf_rtps_locator_ipv4, tvb, offset+20,4688 4, ENC_BIG_ENDIAN0x00000000);4689 proto_item_append_text(tree, " (%s, %s:%d, Logical Port = %u)",4690 val_to_str(kind, rtps_locator_kind_vals, "%02x"),4691 tvb_ip_to_str(pinfo->pool, tvb, offset + 20)tvb_address_to_str(pinfo->pool, tvb, AT_IPv4, offset + 20), public_address_port, port);4692 } else { /* IPv6 format */4693 proto_tree_add_item(locator_tree, hf_rtps_locator_ipv6, tvb, offset+8,4694 16, ENC_NA0x00000000);4695 proto_item_append_text(tree, " (%s, %s, Logical Port = %u)",4696 val_to_str(kind, rtps_locator_kind_vals, "%02x"),4697 tvb_ip6_to_str(pinfo->pool, tvb, offset + 8)tvb_address_to_str(pinfo->pool, tvb, AT_IPv6, offset + 8), port);4698 }4699 break;4700 }4701 case LOCATOR_KIND_SHMEM(0x01000000): {4702 guint32 hostId;4703 ti = proto_tree_add_item_ret_uint(4704 locator_tree,4705 hf_rtps_locator_port,4706 tvb,4707 offset + 4,4708 4,4709 encoding,4710 &port);4711 proto_tree_add_item_ret_uint(locator_tree, hf_rtps_param_host_id, tvb, offset+10, 4, ENC_BIG_ENDIAN0x00000000, &hostId);4712 if (port == 0)4713 expert_add_info(pinfo, ti, &ei_rtps_locator_port);4714 proto_item_append_text(tree, " (%s, HostId = 0x%08x, Port = %u)",4715 val_to_str(kind, rtps_locator_kind_vals, "%02x"),4716 hostId, port);4717 break;4718 }4719 case LOCATOR_KIND_UDPV6(2): {4720 ti = proto_tree_add_item_ret_uint(4721 locator_tree,4722 hf_rtps_locator_port,4723 tvb,4724 offset + 4,4725 4,4726 encoding,4727 &port);4728 if (port == 0)4729 expert_add_info(pinfo, ti, &ei_rtps_locator_port);4730 proto_tree_add_item(locator_tree, hf_rtps_locator_ipv6, tvb, offset+8, 16, ENC_NA0x00000000);4731 proto_item_append_text(tree, " (%s, %s:%u)",4732 val_to_str(kind, rtps_locator_kind_vals, "%02x"),4733 tvb_ip6_to_str(pinfo->pool, tvb, offset + 8)tvb_address_to_str(pinfo->pool, tvb, AT_IPv6, offset + 8), port);4734 break;4735 }4736 case LOCATOR_KIND_DTLS(6): {4737 proto_tree_add_item_ret_uint(4738 locator_tree,4739 hf_rtps_locator_port,4740 tvb,4741 offset + 4,4742 4,4743 encoding,4744 &port);4745 proto_tree_add_item(locator_tree, hf_rtps_locator_ipv6, tvb, offset+8, 16, ENC_NA0x00000000);4746 proto_item_append_text(tree, " (%s, %s:%u)",4747 val_to_str(kind, rtps_locator_kind_vals, "%02x"),4748 tvb_ip6_to_str(pinfo->pool, tvb, offset + 8)tvb_address_to_str(pinfo->pool, tvb, AT_IPv6, offset + 8), port);4749 break;4750 }4751 /*4752 * +-------+-------+-------+-------+4753 * | Flags | |4754 * +-------+ +4755 * | DDS_Octet UUID[9] |4756 * + +-------+-------+4757 * | | public_port |4758 * +-------+-------+-------+-------+4759 * | DDS_Octet public_ip_address[4]|4760 * +-------+-------+-------+-------+4761 */4762 case LOCATOR_KIND_UDPV4_WAN(0x01000001): {4763 guint8 flags = 0;4764 ws_in4_addr locator_ip = 0;4765 const guint32 uuid_size = 9;4766 const guint32 locator_port_size = 4;4767 const guint32 locator_port_offset = offset + 4;4768 const guint32 flags_offset = locator_port_offset + locator_port_size;4769 const guint32 uuid_offset = flags_offset + 1;4770 const guint32 port_offset = uuid_offset + uuid_size;4771 const guint32 ip_offset = port_offset + 2;4772 int hf_port = 0;4773 int hf_ip = 0;4774 gchar* ip_str = NULL((void*)0);4775 guint32 public_port = 0;4776 gboolean is_public = FALSE(0);4777 4778 ti = proto_tree_add_item_ret_uint(4779 locator_tree,4780 hf_rtps_locator_port,4781 tvb,4782 locator_port_offset,4783 locator_port_size,4784 encoding,4785 &port);4786 flags = tvb_get_gint8(tvb, flags_offset);4787 proto_tree_add_bitmask_value(4788 locator_tree,4789 tvb,4790 flags_offset,4791 hf_rtps_udpv4_wan_locator_flags,4792 ett_rtps_flags,4793 UDPV4_WAN_LOCATOR_FLAGS,4794 (guint64)flags);4795 4796 /* UUID */4797 proto_tree_add_item(locator_tree, hf_rtps_uuid, tvb, uuid_offset, UUID_SIZE(9), encoding);4798 4799 /*4800 * The P flag indicates that the locator contains a globally public IP address4801 * and public port where a transport instance can be reached. public_ip_address4802 * contains the public IP address and public_port contains the public UDP port.4803 * Locators with the P flag set are called PUBLIC locators.4804 */4805 is_public = ((flags & FLAG_UDPV4_WAN_LOCATOR_P(0x02)) != 0);4806 if (is_public) {4807 hf_ip = hf_rtps_udpv4_wan_locator_public_ip;4808 hf_port = hf_rtps_udpv4_wan_locator_public_port;4809 } else {4810 hf_ip = hf_rtps_udpv4_wan_locator_local_ip;4811 hf_port = hf_rtps_udpv4_wan_locator_local_port;4812 }4813 4814 /* Port & IP */4815 ip_str = tvb_ip_to_str(pinfo->pool, tvb, ip_offset)tvb_address_to_str(pinfo->pool, tvb, AT_IPv4, ip_offset);4816 locator_ip = tvb_get_ipv4(tvb, ip_offset);4817 if (locator_ip != 0) {4818 proto_tree_add_item_ret_uint(4819 locator_tree,4820 hf_port,4821 tvb,4822 port_offset,4823 2,4824 ENC_NA0x00000000,4825 &public_port);4826 proto_tree_add_ipv4(4827 locator_tree,4828 hf_ip,4829 tvb,4830 ip_offset,4831 4,4832 locator_ip);4833 }4834 if (port == 0)4835 expert_add_info(pinfo, ti, &ei_rtps_locator_port);4836 if (ip_str != NULL((void*)0) && locator_ip != 0) {4837 if (is_public) {4838 proto_item_append_text(tree, " (%s, public: %s:%u, rtps port:%u)",4839 val_to_str(kind, rtps_locator_kind_vals, "%02x"),4840 ip_str, public_port, port);4841 } else {4842 proto_item_append_text(tree, " (%s, local: %s:%u)",4843 val_to_str(kind, rtps_locator_kind_vals, "%02x"),4844 ip_str, port);4845 }4846 }4847 }4848 /* Default case, we already have the locator kind so don't do anything */4849 default:4850 break;4851 }4852 return offset + parameter_size;4853}4854 4855/* ------------------------------------------------------------------------- */4856/* Insert in the protocol tree the next bytes interpreted as Sequence of4857 * unsigned shorts.4858 * The formatted buffer is: val1, val2, val3, ...4859 * Returns the new updated offset4860 */4861static gint rtps_util_add_seq_short(proto_tree *tree, tvbuff_t *tvb, gint offset, int hf_item,4862 const guint encoding, int param_length _U___attribute__((unused)), const char *label) {4863 guint32 num_elem;4864 guint32 i;4865 proto_tree *string_tree;4866 4867 num_elem = tvb_get_guint32(tvb, offset, encoding);4868 offset += 4;4869 4870 /* Create the string node with an empty string, the replace it later */4871 string_tree = proto_tree_add_subtree_format(tree, tvb, offset, num_elem * 4,4872 ett_rtps_seq_ulong, NULL((void*)0), "%s (%d elements)", label, num_elem);4873 4874 for (i = 0; i < num_elem; ++i) {4875 proto_tree_add_item(string_tree, hf_item, tvb, offset, 2, encoding);4876 offset += 2;4877 }4878 4879 return offset;4880}4881 4882static gint rtps_util_add_locator_ex_t(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, gint offset,4883 const guint encoding, int param_length) {4884 gint locator_offset = 0;4885 4886 locator_offset = rtps_util_add_locator_t(tree, pinfo, tvb,4887 offset, encoding, "locator");4888 offset += rtps_util_add_seq_short(tree, tvb, locator_offset, hf_rtps_encapsulation_id,4889 encoding, param_length - (locator_offset - offset), "encapsulations");4890 return offset;4891}4892 4893/* ------------------------------------------------------------------------- */4894/* Insert in the protocol tree the next bytes interpreted as a list of4895 * Locators:4896 * - unsigned long numLocators4897 * - locator 14898 * - locator 24899 * - ...4900 * - locator n4901 * Returns the new offset after parsing the locator list4902 */4903static int rtps_util_add_locator_list(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,4904 gint offset, const guint8 *label, const guint encoding) {4905 4906 proto_tree *locator_tree;4907 guint32 num_locators;4908 4909 num_locators = tvb_get_guint32(tvb, offset, encoding);4910 4911 locator_tree = proto_tree_add_subtree_format(tree, tvb, offset, 4,4912 ett_rtps_locator_udp_v4, NULL((void*)0), "%s: %d Locators", label, num_locators);4913 offset += 4;4914 if (num_locators > 0) {4915 guint32 i;4916 char temp_buff[20];4917 4918 for (i = 0; i < num_locators; ++i) {4919 snprintf(temp_buff, 20, "Locator[%d]", i);4920 rtps_util_add_locator_t(locator_tree, pinfo, tvb, offset,4921 encoding, temp_buff);4922 offset += 24;4923 }4924 }4925 return offset;4926}4927 4928/* ------------------------------------------------------------------------- */4929/* Insert in the protocol tree the next bytes interpreted as a list of4930* multichannel Locators:4931* - unsigned long numLocators4932* - locator 14933* - locator 24934* - ...4935* - locator n4936* Returns the new offset after parsing the locator list4937*/4938static int rtps_util_add_multichannel_locator_list(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,4939 gint offset, const guint8 *label, const guint encoding) {4940 4941 proto_tree *locator_tree;4942 guint32 num_locators;4943 4944 num_locators = tvb_get_guint32(tvb, offset, encoding);4945 locator_tree = proto_tree_add_subtree_format(tree, tvb, offset, 4,4946 ett_rtps_locator_udp_v4, NULL((void*)0), "%s: %d Locators", label, num_locators);4947 4948 offset += 4;4949 if (num_locators > 0) {4950 guint32 i;4951 for (i = 0; i < num_locators; ++i) {4952 proto_tree *ti, *locator_item_tree;4953 guint32 kind;4954 guint32 port;4955 gchar *channel_address;4956 locator_item_tree = proto_tree_add_subtree(locator_tree, tvb, offset, 24, ett_rtps_locator,4957 NULL((void*)0), label);4958 proto_tree_add_item_ret_uint(locator_item_tree, hf_rtps_locator_kind, tvb, offset, 4, encoding, &kind);4959 switch (kind) {4960 case LOCATOR_KIND_UDPV4(1):4961 case LOCATOR_KIND_TUDPV4(0x01001001): {4962 proto_tree_add_item(locator_item_tree, hf_rtps_locator_ipv4, tvb, offset + 16, 4,4963 ENC_BIG_ENDIAN0x00000000);4964 channel_address = tvb_ip_to_str(pinfo->pool, tvb, offset + 16)tvb_address_to_str(pinfo->pool, tvb, AT_IPv4, offset + 16);4965 break;4966 }4967 case LOCATOR_KIND_UDPV6(2): {4968 proto_tree_add_item(locator_tree, hf_rtps_locator_ipv6, tvb, offset + 4, 16, ENC_NA0x00000000);4969 channel_address = tvb_ip6_to_str(pinfo->pool, tvb, offset + 4)tvb_address_to_str(pinfo->pool, tvb, AT_IPv6, offset + 4);4970 proto_item_append_text(tree, " (%s, %s)",4971 val_to_str(kind, rtps_locator_kind_vals, "%02x"),4972 tvb_ip6_to_str(pinfo->pool, tvb, offset + 4)tvb_address_to_str(pinfo->pool, tvb, AT_IPv6, offset + 4));4973 break;4974 }4975 /* Default case, Multichannel locators only should be present in UDPv4 and UDPv6 transports4976 * Unknown address format.4977 * */4978 default:4979 offset += 24;4980 continue;4981 break;4982 }4983 ti = proto_tree_add_item_ret_uint(locator_item_tree, hf_rtps_locator_port, tvb, offset + 20, 4, encoding, &port);4984 if (port == 0)4985 expert_add_info(pinfo, ti, &ei_rtps_locator_port);4986 proto_item_append_text(tree, " (%s, %s:%u)",4987 val_to_str(kind, rtps_locator_kind_vals, "%02x"),4988 channel_address, port);4989 offset += 24;4990 }4991 }4992 return offset;4993}4994 4995/* ------------------------------------------------------------------------- */4996/* Insert in the protocol tree the next 4 bytes interpreted as IPV4Address_t4997 */4998static void rtps_util_add_ipv4_address_t(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, gint offset,4999 const guint encoding, int hf_item) {5000 5001 proto_item *ti;5002 5003 ti = proto_tree_add_item(tree, hf_item, tvb, offset, 4, encoding);5004 if (tvb_get_ntohl(tvb, offset) == IPADDRESS_INVALID(0))5005 expert_add_info(pinfo, ti, &ei_rtps_ip_invalid);5006}5007 5008 5009 5010/* ------------------------------------------------------------------------- */5011/* Insert in the protocol tree the next 8 bytes interpreted as LocatorUDPv45012 *5013 * LocatorUDPv4 is a struct defined as:5014 * struct {5015 * unsigned long address;5016 * unsigned long port;5017 * } LocatorUDPv4_t;5018 *5019 */5020static void rtps_util_add_locator_udp_v4(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,5021 gint offset, const guint8 *label, const guint encoding) {5022 5023 proto_item *ti;5024 proto_tree *locator_tree;5025 guint32 port;5026 5027 locator_tree = proto_tree_add_subtree(tree, tvb, offset, 8, ett_rtps_locator_udp_v4, NULL((void*)0), label);5028 5029 rtps_util_add_ipv4_address_t(locator_tree, pinfo, tvb, offset,5030 encoding, hf_rtps_locator_udp_v4);5031 5032 ti = proto_tree_add_item_ret_uint(locator_tree, hf_rtps_locator_udp_v4_port, tvb, offset, 4, encoding, &port);5033 if (port == PORT_INVALID(0))5034 expert_add_info(pinfo, ti, &ei_rtps_port_invalid);5035}5036 5037/* ------------------------------------------------------------------------- */5038/* Insert in the protocol tree the next 8 bytes interpreted as GuidPrefix5039 * If tree is specified, it fills up the protocol tree item:5040 * - hf_rtps_guid_prefix5041 * - hf_rtps_host_id5042 * - hf_rtps_app_id5043 * - hf_rtps_app_id_instance_id5044 * - hf_rtps_app_id_app_kind5045 */5046static void rtps_util_add_guid_prefix_v1(proto_tree *tree, tvbuff_t *tvb, gint offset,5047 int hf_prefix, int hf_host_id, int hf_app_id, int hf_app_id_instance_id,5048 int hf_app_id_app_kind, const guint8 *label) {5049 guint64 prefix;5050 guint32 host_id, app_id, instance_id;5051 guint8 app_kind;5052 proto_item *ti;5053 proto_tree *guid_tree, *appid_tree;5054 const guint8 *safe_label = (label == NULL((void*)0)) ? (const guint8 *)"guidPrefix" : label;5055 5056 /* Read values from TVB */5057 prefix = tvb_get_ntoh64(tvb, offset);5058 host_id = tvb_get_ntohl(tvb, offset);5059 app_id = tvb_get_ntohl(tvb, offset + 4);5060 instance_id = (app_id >> 8);5061 app_kind = (app_id & 0xff);5062 5063 if (tree != NULL((void*)0)) {5064 ti = proto_tree_add_uint64_format(tree, hf_prefix, tvb, offset, 8, prefix,5065 "%s=%08x %08x { hostId=%08x, appId=%08x (%s: %06x) }",5066 safe_label, host_id, app_id, host_id, app_id,5067 val_to_str(app_kind, app_kind_vals, "%02x"),5068 instance_id);5069 5070 guid_tree = proto_item_add_subtree(ti, ett_rtps_guid_prefix);5071 5072 /* Host Id */5073 proto_tree_add_item(guid_tree, hf_host_id, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000);5074 5075 /* AppId (root of the app_id sub-tree) */5076 ti = proto_tree_add_item(guid_tree, hf_app_id, tvb, offset+4, 4, ENC_BIG_ENDIAN0x00000000);5077 appid_tree = proto_item_add_subtree(ti, ett_rtps_app_id);5078 5079 /* InstanceId */5080 proto_tree_add_item(appid_tree, hf_app_id_instance_id, tvb, offset+4, 3, ENC_BIG_ENDIAN0x00000000);5081 /* AppKind */5082 proto_tree_add_item(appid_tree, hf_app_id_app_kind, tvb, offset+7, 1, ENC_BIG_ENDIAN0x00000000);5083 }5084}5085 5086/* ------------------------------------------------------------------------- */5087/* Insert in the protocol tree the next 12 bytes interpreted as GuidPrefix5088 * If tree is specified, it fills up the protocol tree item:5089 * - hf_rtps_guid_prefix5090 * - hf_rtps_host_id5091 * - hf_rtps_app_id5092 * - hf_rtps_counter5093 */5094static void rtps_util_add_guid_prefix_v2(proto_tree *tree, tvbuff_t *tvb, gint offset,5095 int hf_prefix, int hf_host_id, int hf_app_id,5096 int hf_instance_id, int hf_prefix_extra) {5097 if (tree) {5098 proto_item *ti;5099 proto_tree *guid_tree;5100 5101 /* The text node (root of the guid prefix sub-tree) */5102 ti = proto_tree_add_item(tree, hf_prefix, tvb, offset, 12, ENC_NA0x00000000);5103 guid_tree = proto_item_add_subtree(ti, ett_rtps_guid_prefix);5104 5105 /* Optional filter that can be guidPrefix.src or guidPrefix.dst */5106 if (hf_prefix_extra != 0) {5107 ti = proto_tree_add_item(tree, hf_prefix_extra, tvb, offset, 12, ENC_NA0x00000000);5108 proto_item_set_hidden(ti);5109 }5110 5111 /* Host Id */5112 proto_tree_add_item(guid_tree, hf_host_id, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000);5113 5114 /* App Id */5115 proto_tree_add_item(guid_tree, hf_app_id, tvb, offset+4, 4, ENC_BIG_ENDIAN0x00000000);5116 5117 /* Counter */5118 proto_tree_add_item(guid_tree, hf_instance_id, tvb, offset+8, 4, ENC_BIG_ENDIAN0x00000000);5119 }5120}5121/* ------------------------------------------------------------------------- */5122 /* Insert the entityId from the next 4 bytes. Since there are more than5123 * one entityId, we need to specify also the IDs of the entityId (and its5124 * sub-components), as well as the label identifying it.5125 * Returns true if the entityKind is one of the NDDS built-in entities.5126 */5127static gboolean rtps_util_add_entity_id(proto_tree *tree, tvbuff_t *tvb, gint offset,5128 int hf_item, int hf_item_entity_key, int hf_item_entity_kind,5129 int subtree_entity_id, const char *label, guint32 *entity_id_out) {5130 guint32 entity_id = tvb_get_ntohl(tvb, offset);5131 guint32 entity_key = (entity_id >> 8);5132 guint8 entity_kind = (entity_id & 0xff);5133 const char *str_predef = try_val_to_str(entity_id, entity_id_vals);5134 5135 if (entity_id_out != NULL((void*)0)) {5136 *entity_id_out = entity_id;5137 }5138 5139 if (tree != NULL((void*)0)) {5140 proto_tree *entity_tree;5141 proto_item *ti;5142 5143 if (str_predef == NULL((void*)0)) {5144 /* entityId is not a predefined value, format it */5145 ti = proto_tree_add_uint_format(tree, hf_item, tvb, offset, 4, entity_id,5146 "%s: 0x%08x (%s: 0x%06x)",5147 label, entity_id,5148 val_to_str(entity_kind, entity_kind_vals, "unknown kind (%02x)"),5149 entity_key);5150 } else {5151 /* entityId is a predefined value */5152 ti = proto_tree_add_uint_format(tree, hf_item, tvb, offset, 4, entity_id,5153 "%s: %s (0x%08x)", label, str_predef, entity_id);5154 }5155 5156 entity_tree = proto_item_add_subtree(ti, subtree_entity_id);5157 5158 proto_tree_add_item(entity_tree, hf_item_entity_key, tvb, offset, 3, ENC_BIG_ENDIAN0x00000000);5159 proto_tree_add_item(entity_tree, hf_item_entity_kind, tvb, offset+3, 1, ENC_BIG_ENDIAN0x00000000);5160 }5161 5162 /* is a built-in entity if the bit M and R (5 and 6) of the entityKind are set */5163 /* return ((entity_kind & 0xc0) == 0xc0); */5164 return ( ((entity_kind & 0xc0) == 0xc0) ||5165 entity_id == ENTITYID_RTI_BUILTIN_SERVICE_REQUEST_WRITER(0x00020082) ||5166 entity_id == ENTITYID_RTI_BUILTIN_SERVICE_REQUEST_READER(0x00020087) ||5167 entity_id == ENTITYID_RTI_BUILTIN_LOCATOR_PING_WRITER(0x00020182) ||5168 entity_id == ENTITYID_RTI_BUILTIN_LOCATOR_PING_READER(0x00020187));5169}5170 5171/* ------------------------------------------------------------------------- */5172 /* Insert the entityId from the next 4 bytes as a generic one (not connected5173 * to any protocol field). It simply insert the content as a simple text entry5174 * and returns in the passed buffer only the value (without the label).5175 */5176static void rtps_util_add_generic_entity_id(proto_tree *tree, tvbuff_t *tvb, gint offset, const char *label,5177 int hf_item, int hf_item_entity_key, int hf_item_entity_kind,5178 int subtree_entity_id) {5179 guint32 entity_id = tvb_get_ntohl(tvb, offset);5180 guint32 entity_key = (entity_id >> 8);5181 guint8 entity_kind = (entity_id & 0xff);5182 const char *str_predef = try_val_to_str(entity_id, entity_id_vals);5183 proto_item *ti;5184 proto_tree *entity_tree;5185 5186 if (str_predef == NULL((void*)0)) {5187 /* entityId is not a predefined value, format it */5188 ti = proto_tree_add_uint_format(tree, hf_item, tvb, offset, 4, entity_id,5189 "%s: 0x%08x (%s: 0x%06x)", label, entity_id,5190 val_to_str(entity_kind, entity_kind_vals, "unknown kind (%02x)"),5191 entity_key);5192 } else {5193 /* entityId is a predefined value */5194 ti = proto_tree_add_uint_format_value(tree, hf_item, tvb, offset, 4, entity_id,5195 "%s: %s (0x%08x)", label, str_predef, entity_id);5196 }5197 5198 entity_tree = proto_item_add_subtree(ti, subtree_entity_id);5199 5200 proto_tree_add_item(entity_tree, hf_item_entity_key, tvb, offset, 3, ENC_BIG_ENDIAN0x00000000);5201 proto_tree_add_item(entity_tree, hf_item_entity_kind, tvb, offset+3, 1, ENC_BIG_ENDIAN0x00000000);5202 5203}5204 5205/* ------------------------------------------------------------------------- */5206 /* Interpret the next 12 octets as a generic GUID and insert it in the protocol5207 * tree as simple text (no reference fields are set).5208 * It is mostly used in situation where is not required to perform search for5209 * this kind of GUID (i.e. like in some DATA parameter lists).5210 */5211static void rtps_util_add_generic_guid_v1(proto_tree *tree, tvbuff_t *tvb, gint offset,5212 int hf_guid, int hf_host_id, int hf_app_id, int hf_app_id_instance_id,5213 int hf_app_id_app_kind, int hf_entity, int hf_entity_key,5214 int hf_entity_kind) {5215 5216 guint64 prefix;5217 guint32 host_id, app_id, entity_id;5218 proto_item *ti;5219 proto_tree *guid_tree, *appid_tree, *entity_tree;5220 5221 /* Read typed data */5222 prefix = tvb_get_ntoh64(tvb, offset);5223 host_id = tvb_get_ntohl(tvb, offset);5224 app_id = tvb_get_ntohl(tvb, offset + 4);5225 entity_id = tvb_get_ntohl(tvb, offset + 8);5226 5227 ti = proto_tree_add_uint64_format_value(tree, hf_guid, tvb, offset, 8, prefix, "%08x %08x %08x",5228 host_id, app_id, entity_id);5229 5230 guid_tree = proto_item_add_subtree(ti, ett_rtps_generic_guid);5231 5232 /* Host Id */5233 proto_tree_add_item(guid_tree, hf_host_id, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000);5234 5235 /* AppId (root of the app_id sub-tree) */5236 ti = proto_tree_add_item(guid_tree, hf_app_id, tvb, offset+4, 4, ENC_BIG_ENDIAN0x00000000);5237 appid_tree = proto_item_add_subtree(ti, ett_rtps_app_id);5238 5239 /* InstanceId */5240 proto_tree_add_item(appid_tree, hf_app_id_instance_id, tvb, offset+4, 3, ENC_BIG_ENDIAN0x00000000);5241 /* AppKind */5242 proto_tree_add_item(appid_tree, hf_app_id_app_kind, tvb, offset+7, 1, ENC_BIG_ENDIAN0x00000000);5243 5244 /* Entity (root of the app_id sub-tree) */5245 ti = proto_tree_add_item(guid_tree, hf_entity, tvb, offset+8, 4, ENC_BIG_ENDIAN0x00000000);5246 entity_tree = proto_item_add_subtree(ti, ett_rtps_entity);5247 5248 proto_tree_add_item(entity_tree, hf_entity_key, tvb, offset+8, 3, ENC_BIG_ENDIAN0x00000000);5249 proto_tree_add_item(entity_tree, hf_entity_kind, tvb, offset+11, 1, ENC_BIG_ENDIAN0x00000000);5250}5251 5252/* ------------------------------------------------------------------------- */5253/* Insert in the protocol tree the next data interpreted as a String5254 * Returns the new offset (after reading the string)5255 * XXX - should check that string length field makes sense, possibly by5256 * comparing to a passed-in container length (cf. #19359)5257 */5258static gint rtps_util_add_string(proto_tree *tree, tvbuff_t *tvb, gint offset,5259 int hf_item, const guint encoding) {5260 guint32 size;5261 5262 proto_tree_add_item_ret_uint(tree, hf_rtps_string_length, tvb, offset, 4, encoding, &size);5263 proto_tree_add_item(tree, hf_item, tvb, offset+4, size, ENC_ASCII0x00000000);5264 5265 /* NDDS align strings at 4-bytes word. So:5266 * string_length: 4 -> buffer_length = 4;5267 * string_length: 5 -> buffer_length = 8;5268 * string_length: 6 -> buffer_length = 8;5269 * string_length: 7 -> buffer_length = 8;5270 * string_length: 8 -> buffer_length = 8;5271 * ...5272 */5273 return offset + 4 + ((size + 3) & 0xfffffffc);5274}5275 5276static gint rtps_util_add_data_tags(proto_tree *rtps_parameter_tree, tvbuff_t *tvb,5277 gint offset, const guint encoding, int param_length) {5278 5279 /* 0...2...........7...............15.............23...............315280 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+5281 * | Sequence Size |5282 * +ITEM 0---------+---------------+---------------+---------------+5283 * | Name String Bytes |5284 * +---------------+---------------+---------------+---------------+5285 * | Value String Bytes |5286 * +---------------+---------------+---------------+---------------+5287 * ....5288 * +ITEM N---------+---------------+---------------+---------------+5289 * | Name String Bytes |5290 * +---------------+---------------+---------------+---------------+5291 * | Value String Bytes |5292 * +---------------+---------------+---------------+---------------+5293 */5294 5295 proto_tree *tags_seq_tree = NULL((void*)0);5296 proto_tree *tag_tree = NULL((void*)0);5297 guint32 seq_sum_elements, i;5298 5299 seq_sum_elements = tvb_get_guint32(tvb, offset, encoding);5300 offset += 4;5301 5302 tags_seq_tree = proto_tree_add_subtree_format(rtps_parameter_tree, tvb, offset - 4, param_length,5303 ett_rtps_data_tag_seq, NULL((void*)0), "Tags (size = %u)", seq_sum_elements);5304 5305 for (i = 0; i < seq_sum_elements; ++i) {5306 guint32 initial_offset = offset;5307 tag_tree = proto_tree_add_subtree_format(tags_seq_tree, tvb, offset, -1, ett_rtps_data_tag_item,5308 NULL((void*)0), "Tag [%u]", i);5309 offset = rtps_util_add_string(tag_tree, tvb, offset, hf_rtps_data_tag_name, encoding);5310 offset = rtps_util_add_string(tag_tree, tvb, offset, hf_rtps_data_tag_value, encoding);5311 proto_item_set_len(tag_tree, offset - initial_offset);5312 }5313 return offset;5314}5315 5316 5317 5318/* ------------------------------------------------------------------------- */5319 /* Interpret the next 16 octets as a generic GUID and insert it in the protocol5320 * tree as simple text (no reference fields are set).5321 * It is mostly used in situation where is not required to perform search for5322 * this kind of GUID (i.e. like in some DATA parameter lists).5323 */5324static void rtps_util_add_generic_guid_v2(proto_tree *tree, tvbuff_t *tvb, gint offset,5325 int hf_guid, int hf_host_id, int hf_app_id, int hf_instance_id,5326 int hf_entity, int hf_entity_key, int hf_entity_kind, proto_tree *print_tree) {5327 5328 guint32 host_id, app_id, entity_id, instance_id;5329 proto_item *ti;5330 proto_tree *guid_tree, *entity_tree;5331 5332 /* Read typed data */5333 host_id = tvb_get_ntohl(tvb, offset);5334 app_id = tvb_get_ntohl(tvb, offset + 4);5335 instance_id = tvb_get_ntohl(tvb, offset + 8);5336 entity_id = tvb_get_ntohl(tvb, offset + 12);5337 5338 ti = proto_tree_add_bytes_format_value(tree, hf_guid, tvb, offset, 16, NULL((void*)0), "%08x %08x %08x %08x",5339 host_id, app_id, instance_id, entity_id);5340 5341 /* If the method is called with a valid print_tree pointer, we add the info to the tree.5342 * This improves usability a lot since the user doesn't have to click a lot to debug. */5343 proto_item_append_text(print_tree, "%08x %08x %08x %08x",5344 host_id, app_id, instance_id, entity_id);5345 5346 guid_tree = proto_item_add_subtree(ti, ett_rtps_generic_guid);5347 5348 /* Host Id */5349 proto_tree_add_item(guid_tree, hf_host_id, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000);5350 5351 /* App Id */5352 proto_tree_add_item(guid_tree, hf_app_id, tvb, offset+4, 4, ENC_BIG_ENDIAN0x00000000);5353 5354 /* Instance Id */5355 proto_tree_add_item(guid_tree, hf_instance_id, tvb, offset+8, 4, ENC_BIG_ENDIAN0x00000000);5356 5357 /* Entity (root of the app_id sub-tree) */5358 ti = proto_tree_add_item(guid_tree, hf_entity, tvb, offset+12, 4, ENC_BIG_ENDIAN0x00000000);5359 entity_tree = proto_item_add_subtree(ti, ett_rtps_entity);5360 5361 proto_tree_add_item(entity_tree, hf_entity_key, tvb, offset+12, 3, ENC_BIG_ENDIAN0x00000000);5362 proto_tree_add_item(entity_tree, hf_entity_kind, tvb, offset+15, 1, ENC_BIG_ENDIAN0x00000000);5363}5364 5365 5366/* ------------------------------------------------------------------------- */5367/* Insert in the protocol tree the next 8 bytes interpreted as sequence5368 * number.5369 */5370static guint64 rtps_util_add_seq_number(proto_tree *tree,5371 tvbuff_t *tvb,5372 gint offset,5373 const guint encoding,5374 const char *label) {5375 guint64 hi = (guint64)tvb_get_guint32(tvb, offset, encoding);5376 guint64 lo = (guint64)tvb_get_guint32(tvb, offset+4, encoding);5377 guint64 all = (hi << 32) | lo;5378 5379 proto_tree_add_int64_format(tree, hf_rtps_sm_seq_number, tvb, offset, 8,5380 all, "%s: %" PRIu64"l" "u", label, all);5381 5382 return all;5383}5384 5385 5386/* ------------------------------------------------------------------------- */5387/* Vendor specific: RTI5388 * Insert in the protocol tree the next 8 bytes interpreted as TransportInfo5389 */5390static void rtps_util_add_transport_info(proto_tree *tree,5391 tvbuff_t *tvb,5392 gint offset,5393 const guint encoding,5394 int transport_index)5395 {5396 gint32 classId = tvb_get_guint32(tvb, offset, encoding);5397 5398 if (tree) {5399 proto_tree *xport_info_tree;5400 5401 xport_info_tree = proto_tree_add_subtree_format(tree, tvb, offset, 8, ett_rtps_transport_info, NULL((void*)0),5402 "transportInfo %d: %s", transport_index, val_to_str_const(classId, ndds_transport_class_id_vals, "unknown"));5403 5404 proto_tree_add_item(xport_info_tree, hf_rtps_transportInfo_classId, tvb,5405 offset, 4, encoding);5406 proto_tree_add_item(xport_info_tree, hf_rtps_transportInfo_messageSizeMax, tvb,5407 offset+4, 4, encoding);5408 }5409}5410 5411/* ------------------------------------------------------------------------- */5412/* Insert in the protocol tree the next 8 bytes interpreted as an RTPS time_t,5413 * which is like an NTP time stamp, except that it uses the UNIX epoch,5414 * rather than the NTP epoch, as the time base. Doesn't check for TIME_ZERO,5415 * TIME_INVALID, or TIME_INFINITE, and doesn't show the seconds and5416 * fraction field separately.5417 */5418static void rtps_util_add_timestamp(proto_tree *tree,5419 tvbuff_t *tvb,5420 gint offset,5421 const guint encoding,5422 int hf_time) {5423 5424 proto_tree_add_item(tree, hf_time, tvb, offset, 8,5425 ENC_TIME_RTPS0x00000008|encoding);5426 5427}5428 5429/* ------------------------------------------------------------------------- */5430/* Insert in the protocol tree the next 8 bytes interpreted as an RTPS time_t.5431 * Checks for special values except for TIME_INVALID, and shows the5432 * seconds and fraction as separate fields.5433 */5434static void rtps_util_add_timestamp_sec_and_fraction(proto_tree *tree,5435 tvbuff_t *tvb,5436 gint offset,5437 const guint encoding,5438 int hf_time _U___attribute__((unused))) {5439 5440 gchar tempBuffer[MAX_TIMESTAMP_SIZE(128)];5441 gdouble absolute;5442 gint32 sec;5443 guint32 frac;5444 5445 if (tree) {5446 proto_tree *time_tree;5447 5448 sec = tvb_get_guint32(tvb, offset, encoding);5449 frac = tvb_get_guint32(tvb, offset+4, encoding);5450 5451 if ((sec == 0x7fffffff) && (frac == 0xffffffff)) {5452 (void) g_strlcpy(tempBuffer, "INFINITE", MAX_TIMESTAMP_SIZE(128));5453 } else if ((sec == 0) && (frac == 0)) {5454 (void) g_strlcpy(tempBuffer, "0 sec", MAX_TIMESTAMP_SIZE(128));5455 } else {5456 absolute = (gdouble)sec + (gdouble)frac / ((gdouble)(0x80000000) * 2.0);5457 snprintf(tempBuffer, MAX_TIMESTAMP_SIZE(128),5458 "%f sec (%ds + 0x%08x)", absolute, sec, frac);5459 }5460 5461 time_tree = proto_tree_add_subtree_format(tree, tvb, offset, 8,5462 ett_rtps_timestamp, NULL((void*)0), "%s: %s", "lease_duration", tempBuffer);5463 5464 proto_tree_add_item(time_tree, hf_rtps_param_timestamp_sec, tvb, offset, 4, encoding);5465 proto_tree_add_item(time_tree, hf_rtps_param_timestamp_fraction, tvb, offset+4, 4, encoding);5466 }5467}5468 5469/* ------------------------------------------------------------------------- */5470/* Insert in the protocol tree the next data interpreted as a port (unsigned5471 * 32-bit integer)5472 */5473static void rtps_util_add_port(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,5474 gint offset, const guint encoding, int hf_item) {5475 proto_item *ti;5476 guint32 port;5477 5478 ti = proto_tree_add_item_ret_uint(tree, hf_item, tvb, offset, 4, encoding, &port);5479 if (port == PORT_INVALID(0))5480 expert_add_info(pinfo, ti, &ei_rtps_port_invalid);5481}5482 5483 5484/* ------------------------------------------------------------------------- */5485/* Insert in the protocol tree the next bytes interpreted as5486 * DurabilityServiceQosPolicy5487 */5488static void rtps_util_add_durability_service_qos(proto_tree *tree,5489 tvbuff_t *tvb,5490 gint offset,5491 const guint encoding) {5492 proto_tree *subtree;5493 5494 subtree = proto_tree_add_subtree(tree, tvb, offset, 28, ett_rtps_durability_service, NULL((void*)0), "PID_DURABILITY_SERVICE");5495 5496 rtps_util_add_timestamp_sec_and_fraction(subtree, tvb, offset, encoding, hf_rtps_durability_service_cleanup_delay);5497 proto_tree_add_item(subtree, hf_rtps_durability_service_history_kind, tvb, offset+8, 4, encoding);5498 proto_tree_add_item(subtree, hf_rtps_durability_service_history_depth, tvb, offset+12, 4, encoding);5499 proto_tree_add_item(subtree, hf_rtps_durability_service_max_samples, tvb, offset+16, 4, encoding);5500 proto_tree_add_item(subtree, hf_rtps_durability_service_max_instances, tvb, offset+20, 4, encoding);5501 proto_tree_add_item(subtree, hf_rtps_durability_service_max_samples_per_instances, tvb, offset+24, 4, encoding);5502}5503 5504/* ------------------------------------------------------------------------- */5505/* Insert in the protocol tree the next bytes interpreted as Liveliness5506 * QoS Policy structure.5507 */5508static void rtps_util_add_liveliness_qos(proto_tree *tree, tvbuff_t *tvb, gint offset, const guint encoding) {5509 5510 proto_tree *subtree;5511 5512 subtree = proto_tree_add_subtree(tree, tvb, offset, 12, ett_rtps_liveliness, NULL((void*)0), "PID_LIVELINESS");5513 5514 proto_tree_add_item(subtree, hf_rtps_liveliness_kind, tvb, offset, 4, encoding);5515 rtps_util_add_timestamp_sec_and_fraction(subtree, tvb, offset+4, encoding, hf_rtps_liveliness_lease_duration);5516}5517 5518/* ------------------------------------------------------------------------- */5519/* Insert in the protocol tree the next bytes interpreted as Liveliness5520 * QoS Policy structure.5521 */5522static void rtps_util_add_product_version(proto_tree *tree, tvbuff_t *tvb, gint offset, gint vendor_id) {5523 5524 proto_tree *subtree;5525 guint8 major, minor, release, revision;5526 gint release_offset;5527 gint revision_offset;5528 5529 release_offset = 2;5530 revision_offset = 3;5531 major = tvb_get_guint8(tvb, offset);5532 minor = tvb_get_guint8(tvb, offset+1);5533 release = tvb_get_guint8(tvb, offset+2);5534 revision = tvb_get_guint8(tvb, offset+3);5535 5536 if (vendor_id == RTPS_VENDOR_RTI_DDS(0x0101)) {5537 if (major < 5 && revision == 0) {5538 subtree = proto_tree_add_subtree_format(tree, tvb, offset, 4, ett_rtps_product_version, NULL((void*)0),5539 "Product version: %d.%d%s", major, minor, format_char(wmem_packet_scope(), release));5540 } else if (major < 5 && revision > 0) {5541 subtree = proto_tree_add_subtree_format(tree, tvb, offset, 4, ett_rtps_product_version, NULL((void*)0),5542 "Product version: %d.%d%s rev%d", major, minor, format_char(wmem_packet_scope(), release), revision);5543 } else {5544 subtree = proto_tree_add_subtree_format(tree, tvb, offset, 4, ett_rtps_product_version, NULL((void*)0),5545 "Product version: %d.%d.%d.%d", major, minor, release, revision);5546 }5547 } else if (vendor_id == RTPS_VENDOR_RTI_DDS_MICRO(0x010A)) {5548 /* In Micro < 3.0.0 release and revision numbers are switched */5549 if (major < 3) {5550 revision = revision ^ release;5551 release = revision ^ release;5552 revision = revision ^ release;5553 5554 revision_offset = revision_offset ^ release_offset;5555 release_offset = revision_offset ^ release_offset;5556 revision_offset = revision_offset ^ release_offset;5557 }5558 if (revision != 0) {5559 subtree = proto_tree_add_subtree_format(tree, tvb, offset, 4, ett_rtps_product_version, NULL((void*)0),5560 "Product version: %d.%d.%d.%d", major, minor, release, revision);5561 } else {5562 subtree = proto_tree_add_subtree_format(tree, tvb, offset, 4, ett_rtps_product_version, NULL((void*)0),5563 "Product version: %d.%d.%d", major, minor, release);5564 }5565 } else {5566 return;5567 }5568 5569 proto_tree_add_item(subtree, hf_rtps_param_product_version_major,5570 tvb, offset, 1, ENC_NA0x00000000);5571 proto_tree_add_item(subtree, hf_rtps_param_product_version_minor,5572 tvb, offset+1, 1, ENC_NA0x00000000);5573 /* If major revision is smaller than 5, release interpreted as char */5574 if (vendor_id == RTPS_VENDOR_RTI_DDS(0x0101) && major < 5) {5575 proto_tree_add_item(subtree, hf_rtps_param_product_version_release_as_char,5576 tvb, offset + release_offset, 1, ENC_ASCII0x00000000);5577 } else {5578 proto_tree_add_item(subtree, hf_rtps_param_product_version_release,5579 tvb, offset + release_offset, 1, ENC_NA0x00000000);5580 }5581 proto_tree_add_item(subtree, hf_rtps_param_product_version_revision,5582 tvb, offset + revision_offset, 1, ENC_NA0x00000000);5583}5584 5585/* ------------------------------------------------------------------------- */5586/* Insert in the protocol tree the next bytes interpreted as Sequence of5587 * Strings.5588 * The formatted buffer is: "string1", "string2", "string3", ...5589 * Returns the new updated offset5590 */5591static gint rtps_util_add_seq_string(proto_tree *tree, tvbuff_t *tvb, gint offset,5592 const guint encoding, int hf_numstring,5593 int hf_string, const char *label) {5594 guint32 size;5595 gint32 i, num_strings;5596 const char *retVal;5597 proto_tree *string_tree;5598 gint start;5599 5600 proto_tree_add_item_ret_int(tree, hf_numstring, tvb, offset, 4, encoding, &num_strings);5601 offset += 4;5602 5603 if (num_strings == 0) {5604 return offset;5605 }5606 5607 start = offset;5608 /* Create the string node with a fake string, the replace it later */5609 string_tree = proto_tree_add_subtree(tree, tvb, offset, -1, ett_rtps_seq_string, NULL((void*)0), label);5610 5611 for (i = 0; i < num_strings; ++i) {5612 size = tvb_get_guint32(tvb, offset, encoding);5613 5614 retVal = (const char* )tvb_get_string_enc(wmem_packet_scope(), tvb, offset+4, size, ENC_ASCII0x00000000);5615 5616 proto_tree_add_string_format(string_tree, hf_string, tvb, offset, size+4, retVal,5617 "%s[%d]: %s", label, i, retVal);5618 5619 offset += (4 + ((size + 3) & 0xfffffffc));5620 }5621 5622 proto_item_set_len(string_tree, offset - start);5623 return offset;5624}5625 5626/* ------------------------------------------------------------------------- */5627/* Insert in the protocol tree the next bytes interpreted as Sequence of5628 * longs.5629 * The formatted buffer is: val1, val2, val3, ...5630 * Returns the new updated offset5631 */5632static gint rtps_util_add_seq_ulong(proto_tree *tree, tvbuff_t *tvb, gint offset, int hf_item,5633 const guint encoding, int param_length _U___attribute__((unused)), const char *label) {5634 guint32 num_elem;5635 guint32 i;5636 proto_tree *string_tree;5637 5638 num_elem = tvb_get_guint32(tvb, offset, encoding);5639 offset += 4;5640 5641 /* Create the string node with an empty string, the replace it later */5642 string_tree = proto_tree_add_subtree_format(tree, tvb, offset, num_elem*4,5643 ett_rtps_seq_ulong, NULL((void*)0), "%s (%d elements)", label, num_elem);5644 5645 for (i = 0; i < num_elem; ++i) {5646 proto_tree_add_item(string_tree, hf_item, tvb, offset, 4, encoding);5647 offset += 4;5648 }5649 5650 return offset;5651}5652 5653/* ------------------------------------------------------------------------- */5654static const char *rtps_util_typecode_id_to_string(guint32 typecode_id) {5655 switch(typecode_id) {5656 case RTI_CDR_TK_ENUM: return "enum";5657 case RTI_CDR_TK_UNION: return "union";5658 case RTI_CDR_TK_STRUCT: return "struct";5659 case RTI_CDR_TK_LONG: return "long";5660 case RTI_CDR_TK_SHORT: return "short";5661 case RTI_CDR_TK_USHORT: return "unsigned short";5662 case RTI_CDR_TK_ULONG: return "unsigned long";5663 case RTI_CDR_TK_FLOAT: return "float";5664 case RTI_CDR_TK_DOUBLE: return "double";5665 case RTI_CDR_TK_BOOLEAN: return "boolean";5666 case RTI_CDR_TK_CHAR: return "char";5667 case RTI_CDR_TK_OCTET: return "octet";5668 case RTI_CDR_TK_LONGLONG: return "longlong";5669 case RTI_CDR_TK_ULONGLONG: return "unsigned long long";5670 case RTI_CDR_TK_LONGDOUBLE: return "long double";5671 case RTI_CDR_TK_WCHAR: return "wchar";5672 case RTI_CDR_TK_WSTRING: return "wstring";5673 case RTI_CDR_TK_STRING: return "string";5674 case RTI_CDR_TK_SEQUENCE: return "sequence";5675 case RTI_CDR_TK_ARRAY: return "array";5676 case RTI_CDR_TK_ALIAS: return "alias";5677 case RTI_CDR_TK_VALUE: return "valuetype";5678 5679 case RTI_CDR_TK_NULL:5680 default:5681 return "<unknown type>";5682 }5683}5684 5685/* ------------------------------------------------------------------------- */5686/* Insert in the protocol tree the next bytes interpreted as typecode info5687 * Returns the number of bytes parsed5688 */5689// NOLINTNEXTLINE(misc-no-recursion)5690static gint rtps_util_add_typecode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint offset, const guint encoding,5691 int indent_level, int is_pointer, guint16 bitfield, int is_key, const gint offset_begin,5692 char *name,5693 int seq_max_len, /* -1 = not a sequence field */5694 guint32 *arr_dimension, /* if !NULL: array of 10 int */5695 int ndds_40_hack) {5696 const gint original_offset = offset;5697 guint32 tk_id;5698 guint16 tk_size;5699 unsigned int i;5700 char *indent_string;5701 gint retVal;5702 char type_name[40];5703 5704 /* Structure of the typecode data:5705 * Offset | Size | Field | Notes5706 * ----------|-------|------------------------------|---------------------5707 * ? | ? | pad? |5708 * 0 | 4 | RTI_CDR_TK_XXXXX | 4 bytes aligned5709 * 4 | 2 | length the struct |5710 */5711 5712 /* Calc indent string */5713 indent_string = (char *)wmem_alloc(wmem_epan_scope(), (indent_level*2)+1);5714 memset(indent_string, ' ', (indent_level*2)+1);5715 indent_string[indent_level*2] = '\0';5716 5717 /* Gets TK ID */5718 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);5719 tk_id = tvb_get_guint32(tvb, offset, encoding);5720 offset += 4;5721 5722 /* Gets TK size */5723 tk_size = tvb_get_guint16(tvb, offset, encoding);5724 offset += 2;5725 5726 retVal = tk_size + 6; /* 6 = 4 (typecode ID) + 2 (size) */5727 5728 /* The first bit of typecode is set to 1, clear it */5729 tk_id &= 0x7fffffff;5730 5731 /* HACK: NDDS 4.0 and NDDS 4.1 has different typecode ID list.5732 * The ID listed in the RTI_CDR_TK_XXXXX are the one from NDDS 4.15733 * In order to correctly dissect NDDS 4.0 packets containing typecode5734 * information, we check if the ID of the element at level zero is a5735 * struct or union. If not, it means we are dissecting a ndds 4.0 packet5736 * (and we can decrement the ID to match the correct values).5737 */5738 if (indent_level == 0) {5739 if (tk_id == RTI_CDR_TK_OCTET) {5740 ndds_40_hack = 1;5741 }5742 }5743 if (ndds_40_hack) {5744 ++tk_id;5745 }5746 5747 (void) g_strlcpy(type_name, rtps_util_typecode_id_to_string(tk_id), sizeof(type_name));5748 5749 /* Structure of the typecode data:5750 *5751 * <type_code_header> ::=5752 * <kind>5753 * <type_code_length>5754 *5755 * <kind> ::= long (0=TK_NULL, 1=TK_SHORT...)5756 * <type_code_length> ::= unsugned short5757 *5758 */5759 switch(tk_id) {5760 5761 /* Structure of the typecode data:5762 *5763 * <union_type_code> ::=5764 * <type_code_header>5765 * <name>5766 * <default_index>5767 * <discriminator_type_code>5768 * <member_count>5769 * <union_member>+5770 * <union_member> ::= <member_length><name><union_member_detail>5771 * <member_length> ::= unsigned short5772 * <name> ::= <string>5773 * <string> ::= <length>char+<eol>5774 * <length> ::= unsigned long5775 * <eol> ::= (char)05776 *5777 * <union_member_detail> ::= <is_pointer>5778 * <labels_count>5779 * <label>+5780 * <type_code>5781 * <labels_count> ::= unsigned long5782 * <label> ::= long5783 *5784 */5785 case RTI_CDR_TK_UNION: {5786 guint32 struct_name_len;5787 guint8 *struct_name;5788 const char *discriminator_name; /* for unions */5789 char *discriminator_enum_name = NULL((void*)0); /* for unions with enum discriminator */5790 /*guint32 defaultIdx;*/ /* Currently is ignored */5791 guint32 disc_id; /* Used temporarily to populate 'discriminator_name' */5792 guint16 disc_size; /* Currently is ignored */5793 guint32 disc_offset_begin, num_members, member_name_len;5794 guint16 member_length;5795 guint8 *member_name = NULL((void*)0);5796 guint32 next_offset, field_offset_begin, member_label_count, discriminator_enum_name_length;5797 gint32 member_label;5798 guint j;5799 5800 /* - - - - - - - Union name - - - - - - - */5801 /* Pad-align */5802 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);5803 5804 /* Get structure name length */5805 struct_name_len = tvb_get_guint32(tvb, offset, encoding);5806 offset += 4;5807 struct_name = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, struct_name_len, ENC_ASCII0x00000000);5808 offset = check_offset_addition(offset, struct_name_len, tree, NULL((void*)0), tvb);5809 5810 /* - - - - - - - Default index - - - - - - - */5811 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);5812 /*defaultIdx = NEXT_guint32(tvb, offset, encoding);*/5813 offset += 4;5814 5815 /* - - - - - - - Discriminator type code - - - - - - - */5816 /* We don't recursively dissect everything, instead we just read the type */5817 disc_id = tvb_get_guint32(tvb, offset, encoding);5818 offset += 4;5819 5820 disc_size = tvb_get_guint16(tvb, offset, encoding);5821 offset += 2;5822 disc_offset_begin = offset;5823 disc_id &= 0x7fffffff;5824 discriminator_name = rtps_util_typecode_id_to_string(disc_id);5825 if (disc_id == RTI_CDR_TK_ENUM) {5826 /* Enums has also a name that we should print */5827 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);5828 discriminator_enum_name_length = tvb_get_guint32(tvb, offset, encoding);5829 discriminator_enum_name = tvb_get_string_enc(wmem_packet_scope(), tvb, offset+4, discriminator_enum_name_length, ENC_ASCII0x00000000);5830 }5831 offset = disc_offset_begin + disc_size;5832#if 05833 field_offset_begin = offset;5834 increment_dissection_depth(pinfo);5835 offset += rtps_util_add_typecode(5836 tree,5837 tvb,5838 pinfo,5839 offset,5840 encoding,5841 indent_level+1,5842 0,5843 0,5844 0,5845 field_offset_begin,5846 member_name,5847 -1,5848 NULL((void*)0),5849 ndds_40_hack);5850 decrement_dissection_depth(pinfo);5851#endif5852 5853 /* Add the entry of the union in the tree */5854 proto_tree_add_string_format(tree, hf_rtps_union, tvb, original_offset, retVal, struct_name, "%sunion %s (%s%s%s) {",5855 indent_string, struct_name, discriminator_name,5856 (discriminator_enum_name ? " " : ""),5857 (discriminator_enum_name ? discriminator_enum_name : ""));5858 5859 if (seq_max_len != -1) {5860 /* We're dissecting a sequence of struct, bypass the seq definition */5861 snprintf(type_name, 40, "%s", struct_name);5862 break;5863 }5864 5865 /* - - - - - - - Number of members - - - - - - - */5866 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);5867 num_members = tvb_get_guint32(tvb, offset, encoding);5868 offset += 4;5869 5870 /* - - - - - - - <union_member>+ - - - - - - - */5871 next_offset = offset;5872 5873 for (i = 0; i < num_members; ++i) {5874 guint8 member_is_pointer;5875 /* Safety: this theoretically should be the same already */5876 field_offset_begin = offset = next_offset;5877 5878 SHORT_ALIGN(offset)(offset = (offset+1)&0xfffffffe);5879 5880 /* member's length */5881 member_length = tvb_get_guint16(tvb, offset, encoding);5882 offset += 2;5883 next_offset = offset + member_length;5884 5885 /* Name length */5886 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);5887 member_name_len = tvb_get_guint32(tvb, offset, encoding);5888 offset += 4;5889 5890 /* Name */5891 member_name = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, member_name_len, ENC_ASCII0x00000000);5892 offset = check_offset_addition(offset, member_name_len, tree, NULL((void*)0), tvb);5893 5894 /* is Pointer ? */5895 member_is_pointer = tvb_get_guint8(tvb, offset);5896 offset++;5897 5898 /* Label count */5899 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);5900 member_label_count = tvb_get_guint32(tvb, offset, encoding);5901 offset += 4;5902 5903 for (j = 0; j < member_label_count; ++j) {5904 proto_item* case_item;5905 /* Label count */5906 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);5907 member_label = tvb_get_guint32(tvb, offset, encoding);5908 offset += 4;5909 5910 /* Add the entry of the union in the tree */5911 case_item = proto_tree_add_uint_format(tree, hf_rtps_union_case, tvb, field_offset_begin, 1, member_label,5912 "%s case %d:", indent_string, member_label);5913 proto_item_set_len(case_item, retVal);5914 }5915 5916 increment_dissection_depth(pinfo);5917 offset += rtps_util_add_typecode(tree, tvb, pinfo, offset, encoding,5918 indent_level+2, member_is_pointer, 0, 0, field_offset_begin,5919 member_name, -1, NULL((void*)0), ndds_40_hack);5920 decrement_dissection_depth(pinfo);5921 }5922 /* Finally prints the name of the struct (if provided) */5923 (void) g_strlcpy(type_name, "}", sizeof(type_name));5924 break;5925 5926 } /* end of case UNION */5927 5928 5929 case RTI_CDR_TK_ENUM:5930 case RTI_CDR_TK_STRUCT: {5931 /* Structure of the typecode data:5932 *5933 * <union_type_code> ::=5934 * <type_code_header>5935 * <name>5936 * <default_index>5937 * <discriminator_type_code>5938 * <member_count>5939 * <member>+5940 *5941 * <struct_type_code> ::=5942 * <type_code_header>5943 * <name>5944 * <member_count>5945 * <member>+5946 *5947 * <name> ::= <string>5948 * <string> ::= <length>char+<eol>5949 * <length> ::= unsigned long5950 * <eol> ::= (char)05951 * <member_count> ::= unsigned long5952 *5953 * STRUCT / UNION:5954 * Foreach member {5955 * - A2: 2: member length5956 * - A4: 4: member name length5957 * - n: member name5958 * - 1: isPointer?5959 * - A2 2: bitfield bits (-1=none)5960 * - 1: isKey?5961 * - A4 4: Typecode ID5962 * - A2 2: length5963 * }5964 *5965 * ENUM:5966 * Foreach member {5967 * - A2: 2: member length5968 * - A4: 4: member name length5969 * - n: member name5970 * - A4: 4: ordinal number5971 *5972 * -> ----------------------------------------------------- <-5973 * -> The alignment pad bytes belong to the FOLLOWING field <-5974 * -> A4 = 4 bytes alignment, A2 = 2 bytes alignment <-5975 * -> ----------------------------------------------------- <-5976 */5977 gint8 *struct_name;5978 guint32 struct_name_len, num_members;5979 guint32 next_offset;5980 const char *typecode_name;5981 5982 /* Pad-align */5983 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);5984 5985 /* Get structure name length */5986 struct_name_len = tvb_get_guint32(tvb, offset, encoding);5987 offset += 4;5988 5989 /* struct name */5990 struct_name = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, struct_name_len, ENC_ASCII0x00000000);5991 offset = check_offset_addition(offset, struct_name_len, tree, NULL((void*)0), tvb);5992 5993 5994 if (tk_id == RTI_CDR_TK_ENUM) {5995 typecode_name = "enum";5996 } else if (tk_id == RTI_CDR_TK_VALUE_PARAM) {5997 /* guint16 type_modifier; */5998 /* guint32 baseTypeCodeKind; */5999 guint32 baseTypeCodeLength;6000 6001 /* Need to read the type modifier and the base type code */6002 typecode_name = "<sparse type>";6003 SHORT_ALIGN(offset)(offset = (offset+1)&0xfffffffe);6004 /* type_modifier = */ tvb_get_guint16(tvb, offset, encoding);6005 offset += 2;6006 6007 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);6008 /* baseTypeCodeKind = */ tvb_get_guint32(tvb, offset, encoding);6009 offset += 4;6010 6011 baseTypeCodeLength = tvb_get_guint32(tvb, offset, encoding);6012 offset += 4;6013 offset = check_offset_addition(offset, baseTypeCodeLength, tree, NULL((void*)0), tvb);6014 } else {6015 typecode_name = "struct";6016 }6017 6018 if (seq_max_len != -1) {6019 /* We're dissecting a sequence of struct, bypass the seq definition */6020 snprintf(type_name, 40, "%s", struct_name);6021 break;6022 }6023 /* Prints it */6024 proto_tree_add_string_format(tree, hf_rtps_struct, tvb, original_offset, retVal, struct_name,6025 "%s%s %s {", indent_string, typecode_name, struct_name);6026 6027 /* PAD align */6028 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);6029 6030 /* number of members */6031 num_members = tvb_get_guint32(tvb, offset, encoding);6032 offset += 4;6033 6034 next_offset = offset;6035 for (i = 0; i < num_members; ++i) {6036 guint8 *member_name;6037 guint32 member_name_len;6038 guint16 member_length;6039 guint32 field_offset_begin;6040 6041 /* Safety: this theoretically should be the same already */6042 field_offset_begin = offset = next_offset;6043 6044 SHORT_ALIGN(offset)(offset = (offset+1)&0xfffffffe);6045 6046 /* member's length */6047 member_length = tvb_get_guint16(tvb, offset, encoding);6048 offset += 2;6049 next_offset = offset + member_length;6050 6051 /* Name length */6052 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);6053 member_name_len = tvb_get_guint32(tvb, offset, encoding);6054 offset += 4;6055 6056 /* Name */6057 member_name = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, member_name_len, ENC_ASCII0x00000000);6058 offset += member_name_len;6059 6060 if (tk_id == RTI_CDR_TK_ENUM) {6061 /* ordinal number */6062 guint32 ordinal_number;6063 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);6064 ordinal_number = tvb_get_guint32(tvb, offset, encoding);6065 offset += 4;6066 6067 proto_tree_add_string_format(tree, hf_rtps_member_name, tvb, field_offset_begin, (offset-field_offset_begin), member_name,6068 "%s %s = %d;", indent_string, member_name, ordinal_number);6069 } else {6070 /* Structs */6071 guint16 member_bitfield;6072 guint8 member_is_pointer;6073 guint8 member_is_key;6074 6075 /* is Pointer ? */6076 member_is_pointer = tvb_get_guint8(tvb, offset);6077 offset++;6078 6079 /* Bitfield */6080 SHORT_ALIGN(offset)(offset = (offset+1)&0xfffffffe);6081 member_bitfield = tvb_get_guint16(tvb, offset, encoding);6082 offset += 2; /* pad will be added by typecode dissector */6083 6084 /* is Key ? */6085 member_is_key = tvb_get_guint8(tvb, offset);6086 offset++;6087 6088 increment_dissection_depth(pinfo);6089 offset += rtps_util_add_typecode(tree, tvb, pinfo, offset, encoding,6090 indent_level+1, member_is_pointer, member_bitfield, member_is_key,6091 field_offset_begin, member_name, -1, NULL((void*)0), ndds_40_hack);6092 decrement_dissection_depth(pinfo);6093 }6094 }6095 /* Finally prints the name of the struct (if provided) */6096 (void) g_strlcpy(type_name, "}", sizeof(type_name));6097 break;6098 }6099 6100 case RTI_CDR_TK_WSTRING:6101 case RTI_CDR_TK_STRING: {6102 /* Structure of the typecode data:6103 * Offset | Size | Field | Notes6104 * ----------|-------|------------------------------|---------------------6105 * 6 | 2 | pad |6106 * 8 | 4 | String length | 4-bytes aligned6107 */6108 guint32 string_length;6109 6110 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);6111 string_length = tvb_get_guint32(tvb, offset, encoding);6112 offset += 4;6113 snprintf(type_name, 40, "%s<%d>",6114 (tk_id == RTI_CDR_TK_STRING) ? "string" : "wstring",6115 string_length);6116 break;6117 }6118 6119 case RTI_CDR_TK_SEQUENCE: {6120 /* Structure of the typecode data:6121 *6122 * - A4: 4: Sequence max length6123 * - the sequence typecode6124 */6125 guint32 seq_max_len2;6126 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);6127 seq_max_len2 = tvb_get_guint32(tvb, offset, encoding);6128 offset += 4;6129 6130 /* Recursive decode seq typecode */6131 /*offset += */rtps_util_add_typecode(tree, tvb, pinfo, offset, encoding, indent_level,6132 is_pointer, bitfield, is_key, offset_begin, name,6133 seq_max_len2, NULL((void*)0), ndds_40_hack);6134 /* Differently from the other typecodes, the line has been already printed */6135 return retVal;6136 }6137 6138 case RTI_CDR_TK_ARRAY: {6139 /* Structure of the typecode data:6140 *6141 * - A4: 4: number of dimensions6142 * - A4: 4: dim16143 * - <A4: 4: dim2>6144 * - ...6145 * - the array typecode6146 */6147 guint32 size[MAX_ARRAY_DIMENSION10]; /* Max dimensions */6148 guint32 dim_max;6149 6150 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);6151 dim_max = tvb_get_guint32(tvb, offset, encoding);6152 offset += 4;6153 6154 if (dim_max > MAX_ARRAY_DIMENSION10) {6155 /* We don't have a tree item to add expert info to... */6156 dim_max = MAX_ARRAY_DIMENSION10;6157 }6158 6159 for (i = 0; i < MAX_ARRAY_DIMENSION10; ++i) size[i] = 0;6160 for (i = 0; i < dim_max; ++i) {6161 size[i] = tvb_get_guint32(tvb, offset, encoding);6162 offset += 4;6163 }6164 6165 /* Recursive decode seq typecode */6166 increment_dissection_depth(pinfo);6167 /*offset += */rtps_util_add_typecode(tree, tvb, pinfo, offset, encoding,6168 indent_level, is_pointer, bitfield, is_key, offset_begin,6169 name, -1, size, ndds_40_hack);6170 decrement_dissection_depth(pinfo);6171 /* Differently from the other typecodes, the line has been already printed */6172 return retVal;6173 }6174 6175 case RTI_CDR_TK_ALIAS: {6176 /* Structure of the typecode data:6177 *6178 * - A4: 4: alias name size6179 * - A4: 4: alias name6180 * - A4: 4: the alias typecode6181 */6182 guint32 alias_name_length;6183 guint8 *alias_name;6184 6185 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);6186 alias_name_length = tvb_get_guint32(tvb, offset, encoding);6187 offset += 4;6188 alias_name = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, alias_name_length, ENC_ASCII0x00000000);6189 offset = check_offset_addition(offset, alias_name_length, tree, NULL((void*)0), tvb);6190 (void) g_strlcpy(type_name, alias_name, sizeof(type_name));6191 break;6192 }6193 6194 6195 /*6196 * VALUETYPES:6197 * - A4: 4: name length6198 * - n: name6199 * - A2: type modifier6200 * - A4: base type code6201 * - A4: number of members6202 * Foreach member: (it's just like a struct)6203 *6204 */6205 case RTI_CDR_TK_VALUE_PARAM:6206 case RTI_CDR_TK_VALUE: {6207 /* Not fully dissected for now */6208 /* Pad-align */6209 guint32 value_name_len;6210 gint8 *value_name;6211 const char *type_id_name = "valuetype";6212 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);6213 6214 /* Get structure name length */6215 value_name_len = tvb_get_guint32(tvb, offset, encoding);6216 offset += 4;6217 6218 /* value name */6219 value_name = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, value_name_len, ENC_ASCII0x00000000);6220 offset = check_offset_addition(offset, value_name_len, tree, NULL((void*)0), tvb);6221 6222 if (tk_id == RTI_CDR_TK_VALUE_PARAM) {6223 type_id_name = "valueparam";6224 }6225 snprintf(type_name, sizeof(type_name), "%s '%s'", type_id_name, value_name);6226 break;6227 }6228 } /* switch(tk_id) */6229 6230 /* Sequence print */6231 if (seq_max_len != -1) {6232 proto_tree_add_string_format(tree, hf_rtps_sequence, tvb, offset_begin, (offset-offset_begin), type_name,6233 "%ssequence<%s, %d> %s%s;%s", indent_string, type_name, seq_max_len,6234 is_pointer ? "*" : "",6235 name ? name : "",6236 is_key ? KEY_COMMENT(" //@key") : "");6237 return retVal;6238 }6239 6240 /* Array print */6241 if (arr_dimension != NULL((void*)0)) {6242 /* Printing an array */6243 wmem_strbuf_t *dim_str = wmem_strbuf_create(wmem_packet_scope())wmem_strbuf_new(wmem_packet_scope(), "");6244 for (i = 0; i < MAX_ARRAY_DIMENSION10; ++i) {6245 if (arr_dimension[i] != 0) {6246 wmem_strbuf_append_printf(dim_str, "[%d]", arr_dimension[i]);6247 } else {6248 break;6249 }6250 }6251 proto_tree_add_string_format(tree, hf_rtps_array, tvb, offset_begin, (offset-offset_begin), type_name,6252 "%s%s %s%s;%s", indent_string, type_name, name ? name : "",6253 wmem_strbuf_get_str(dim_str), is_key ? KEY_COMMENT(" //@key") : "");6254 return retVal;6255 }6256 6257 /* Bitfield print */6258 if (bitfield != 0xffff && name != NULL((void*)0) && is_pointer == 0) {6259 proto_tree_add_string_format(tree, hf_rtps_bitfield, tvb, offset_begin, (offset-offset_begin), type_name,6260 "%s%s %s:%d;%s", indent_string, type_name, name,6261 bitfield, is_key ? KEY_COMMENT(" //@key") : "");6262 return retVal;6263 }6264 6265 /* Everything else */6266 proto_tree_add_string_format(tree, hf_rtps_datatype, tvb, offset_begin, (offset-offset_begin), type_name,6267 "%s%s%s%s%s;%s", indent_string, type_name,6268 name ? " " : "",6269 is_pointer ? "*" : "",6270 name ? name : "",6271 is_key ? KEY_COMMENT(" //@key") : "");6272 return retVal;6273}6274 6275static gint rtps_util_add_type_id(proto_tree *tree,6276 tvbuff_t * tvb, gint offset, const guint encoding,6277 gint zero, int hf_base, proto_item * append_info_item,6278 guint64 * type_id) {6279 proto_item * ti;6280 guint16 short_number;6281 guint64 longlong_number;6282 int hf_type;6283 short_number = tvb_get_guint16(tvb, offset, encoding);6284 ti = proto_tree_add_item(tree, hf_rtps_type_object_type_id_disc, tvb, offset, 2, encoding);6285 proto_item_set_hidden(ti);6286 6287 /* Here we choose the proper hf item to use */6288 if (hf_base != -1) {6289 if (short_number <= 13)6290 hf_type = hf_rtps_type_object_base_primitive_type_id;6291 else6292 hf_type = hf_rtps_type_object_base_type;6293 } else {6294 if (short_number <= 13)6295 hf_type = hf_rtps_type_object_primitive_type_id;6296 else6297 hf_type = hf_rtps_type_object_type_id;6298 }6299 6300 offset += 2;6301 if (short_number <= 13) {6302 proto_tree_add_item(tree, hf_type, tvb, offset, 2, encoding);6303 if (append_info_item) {6304 proto_item_append_text(append_info_item, "(%s)",6305 val_to_str(short_number, type_object_kind, "(0x%016x)"));6306 }6307 offset += 2;6308 } else {6309 ALIGN_ZERO(offset, 8, zero)(offset -= zero, offset = (((offset) + ((8) - 1)) & ~((8)
- 1)), offset += zero)
;6310 longlong_number = tvb_get_guint64(tvb, offset, encoding);6311 proto_tree_add_item(tree, hf_type, tvb, offset, 8, encoding);6312 if (append_info_item) {6313 proto_item_append_text(append_info_item, "(0x%016" PRIx64"l" "x" ")", longlong_number);6314 }6315 offset += 8;6316 }6317 6318 if (short_number <= 13) {6319 if (type_id) {6320 *type_id = short_number;6321 }6322 } else {6323 if (type_id) {6324 *type_id = longlong_number;6325 }6326 }6327 return offset;6328}6329 6330static gint rtps_util_add_type_annotation_usage(proto_tree *tree,6331 tvbuff_t * tvb, gint offset, const guint encoding, gint zero) {6332 guint32 long_number, i;6333 guint16 short_number;6334 offset = rtps_util_add_type_id(tree, tvb, offset, encoding, zero, -1, NULL((void*)0), NULL((void*)0));6335 long_number = tvb_get_guint32(tvb, offset, encoding);6336 offset += 4;6337 for (i = 0; i < long_number; i++) {6338 proto_tree_add_item(tree, hf_rtps_type_object_member_id, tvb, offset, 4, encoding);6339 offset += 4;6340 short_number = tvb_get_guint16(tvb, offset, encoding);6341 proto_tree_add_item(tree, hf_rtps_type_object_annotation_value_d, tvb, offset, 2, encoding);6342 offset += 2;6343 /* There may be more additions in the future */6344 switch (short_number) {6345 case 4: /* UINT_16 */6346 proto_tree_add_item(tree, hf_rtps_type_object_annotation_value_16, tvb, offset, 2, encoding);6347 offset += 2;6348 break;6349 default:6350 break;6351 }6352 6353 }6354 return offset;6355}6356 6357static gint rtps_util_add_type_library_type(proto_tree *tree,6358 tvbuff_t * tvb, gint offset, const guint encoding, dissection_info *info) {6359 proto_tree * annotation_tree;6360 guint32 member_id = 0, member_length = 0, long_number, i;6361 gint offset_tmp;6362 guint16 short_number;6363 gchar * name = NULL((void*)0);6364 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);6365 offset_tmp = offset;6366 6367 /* dissect property */6368 short_number = tvb_get_guint16(tvb, offset_tmp, encoding);6369 proto_tree_add_bitmask_value(tree, tvb, offset_tmp, hf_rtps_type_object_flags,6370 ett_rtps_flags, TYPE_FLAG_FLAGS, short_number);6371 if (info) {6372 if (short_number & 0x02)6373 info->extensibility = EXTENSIBILITY_MUTABLE;6374 else if (short_number & 0x01)6375 info->extensibility = EXTENSIBILITY_FINAL;6376 else6377 info->extensibility = EXTENSIBILITY_EXTENSIBLE;6378 }6379 offset_tmp += 2;6380 if (info)6381 offset_tmp = rtps_util_add_type_id(tree, tvb, offset_tmp, encoding, offset, -1, tree, &(info->type_id));6382 else6383 offset_tmp = rtps_util_add_type_id(tree, tvb, offset_tmp, encoding, offset, -1, tree, NULL((void*)0));6384 rtps_util_add_string(tree, tvb, offset_tmp, hf_rtps_type_object_type_property_name,6385 encoding);6386 long_number = tvb_get_guint32(tvb, offset_tmp, encoding);6387 name = tvb_get_string_enc(wmem_packet_scope(), tvb, offset_tmp+4, long_number, ENC_ASCII0x00000000);6388 if (info)6389 (void) g_strlcpy(info->member_name, name, sizeof(info->member_name));6390 6391 proto_item_append_text(tree, " %s", name);6392 offset = check_offset_addition(offset, member_length, tree, NULL((void*)0), tvb);6393 6394 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);6395 offset_tmp = offset;6396 6397 /* dissect annotation_seq */6398 long_number = tvb_get_guint32(tvb, offset_tmp, encoding);6399 annotation_tree = proto_tree_add_subtree_format(tree, tvb, offset_tmp, member_length,6400 ett_rtps_type_annotation_usage_list, NULL((void*)0), "Annotation Usage Member List (%d elements)",6401 long_number);6402 offset_tmp += 4;6403 for (i = 0; i < long_number ; i++) {6404 offset_tmp = rtps_util_add_type_annotation_usage(annotation_tree, tvb, offset_tmp,6405 encoding, offset);6406 }6407 offset = check_offset_addition(offset, member_length, tree, NULL((void*)0), tvb);6408 6409 return offset;6410}6411 6412static void rtps_util_add_type_element_enumeration(proto_tree *tree,6413 tvbuff_t * tvb, gint offset, const guint encoding, dissection_info * info) {6414 proto_tree * enumerated_constant;6415 guint32 member_id = 0, member_length = 0;6416 guint32 long_number, i;6417 gint enum_size, offset_tmp;6418 6419 offset = rtps_util_add_type_library_type(tree, tvb, offset, encoding, info);6420 6421 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);6422 /* dissect Bound */6423 proto_tree_add_item(tree, hf_rtps_type_object_bound, tvb, offset, 4, encoding);6424 offset = check_offset_addition(offset, member_length, tree, NULL((void*)0), tvb);6425 6426 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);6427 /* dissect constant seq */6428 offset_tmp = offset;6429 long_number = tvb_get_guint32(tvb, offset_tmp, encoding);6430 offset_tmp += 4;6431 for (i = 0; i < long_number; i++) {6432 gchar * name = NULL((void*)0);6433 guint32 size, value;6434 enum_size = offset_tmp;6435 size = tvb_get_guint32(tvb, offset_tmp + 4, encoding);6436 name = tvb_get_string_enc(wmem_packet_scope(), tvb, offset_tmp + 8, size, ENC_ASCII0x00000000);6437 value = tvb_get_guint32(tvb, offset_tmp, encoding);6438 enumerated_constant = proto_tree_add_subtree_format(tree, tvb, offset_tmp, 0,6439 ett_rtps_type_enum_constant, NULL((void*)0), "%s (%u)", name, value);6440 proto_tree_add_item(enumerated_constant, hf_rtps_type_object_enum_constant_value, tvb, offset_tmp, 4, encoding);6441 offset_tmp += 4;6442 offset_tmp = rtps_util_add_string(enumerated_constant, tvb, offset_tmp, hf_rtps_type_object_enum_constant_name, encoding);6443 proto_item_set_len(enumerated_constant, offset_tmp - enum_size);6444 }6445 6446 info->num_elements = 0;6447}6448 6449static void rtps_util_add_type_element_sequence(proto_tree *tree,6450 tvbuff_t * tvb, gint offset, const guint encoding, dissection_info * info) {6451 guint32 member_id = 0, member_length = 0;6452 gint zero_alignment;6453 offset = rtps_util_add_type_library_type(tree, tvb, offset, encoding, info);6454 6455 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);6456 zero_alignment = offset;6457 rtps_util_add_type_id(tree, tvb, offset, encoding, zero_alignment, -1 , NULL((void*)0), &(info->base_type_id));6458 offset = check_offset_addition(offset, member_length, tree, NULL((void*)0), tvb);6459 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);6460 proto_tree_add_item(tree, hf_rtps_type_object_element_shared, tvb, offset, 1, encoding);6461 offset = check_offset_addition(offset, member_length, tree, NULL((void*)0), tvb);6462 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);6463 /* dissect Bound */6464 proto_tree_add_item(tree, hf_rtps_type_object_bound, tvb, offset, 4, encoding);6465 if (info)6466 info->bound = tvb_get_gint32(tvb, offset, encoding);6467}6468 6469static void rtps_util_add_type_element_string(proto_tree *tree,6470 tvbuff_t * tvb, gint offset, const guint encoding, dissection_info * info _U___attribute__((unused))) {6471 guint32 member_id = 0, member_length = 0;6472 gint zero_alignment;6473 offset = rtps_util_add_type_library_type(tree, tvb, offset, encoding, info);6474 6475 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);6476 zero_alignment = offset;6477 rtps_util_add_type_id(tree, tvb, offset, encoding, zero_alignment, -1, NULL((void*)0), NULL((void*)0));6478 offset = check_offset_addition(offset, member_length, tree, NULL((void*)0), tvb);6479 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);6480 proto_tree_add_item(tree, hf_rtps_type_object_element_shared, tvb, offset, 1, encoding);6481 offset = check_offset_addition(offset, member_length, tree, NULL((void*)0), tvb);6482 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);6483 /* dissect Bound */6484 proto_tree_add_item(tree, hf_rtps_type_object_bound, tvb, offset, 4, encoding);6485 offset = check_offset_addition(offset, member_length, tree, NULL((void*)0), tvb);6486}6487 6488static void rtps_util_add_type_element_array(proto_tree *tree,6489 tvbuff_t * tvb, gint offset, const guint encoding, dissection_info * info _U___attribute__((unused))) {6490 proto_tree * bound_tree;6491 guint32 member_id = 0, member_length = 0;6492 guint32 long_number, i;6493 gint zero_alignment, offset_tmp;6494 offset = rtps_util_add_type_library_type(tree, tvb, offset, encoding, info);6495 6496 /* Dissect Collection Type */6497 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);6498 zero_alignment = offset;6499 rtps_util_add_type_id(tree, tvb, offset, encoding, zero_alignment, -1, NULL((void*)0), &(info->base_type_id));6500 offset = check_offset_addition(offset, member_length, tree, NULL((void*)0), tvb);6501 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);6502 proto_tree_add_item(tree, hf_rtps_type_object_element_shared, tvb, offset, 1, encoding);6503 offset = check_offset_addition(offset, member_length, tree, NULL((void*)0), tvb);6504 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);6505 6506 /* dissect Bound sequence */6507 6508 offset_tmp = offset;6509 long_number = tvb_get_guint32(tvb, offset_tmp, encoding);6510 bound_tree = proto_tree_add_subtree_format(tree, tvb, offset_tmp, member_length,6511 ett_rtps_type_bound_list, NULL((void*)0), "Bounds (%d elements)",6512 long_number);6513 offset_tmp += 4;6514 for (i = 0; i < long_number ; i++) {6515 proto_tree_add_item(bound_tree, hf_rtps_type_object_bound, tvb, offset_tmp, 4, encoding);6516 if (info) info->bound = tvb_get_gint32(tvb, offset_tmp, encoding);6517 if (info) info->num_elements = tvb_get_gint32(tvb, offset_tmp, encoding);6518 6519 offset_tmp += 4;6520 }6521}6522 6523static void rtps_util_add_type_element_alias(proto_tree *tree,6524 tvbuff_t * tvb, gint offset, const guint encoding, dissection_info * info) {6525 guint32 member_id = 0, member_length = 0;6526 offset = rtps_util_add_type_library_type(tree, tvb, offset, encoding, info);6527 6528 /* dissect base_type */6529 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);6530 rtps_util_add_type_id(tree, tvb, offset, encoding, offset, hf_rtps_type_object_base_type, NULL((void*)0), &(info->base_type_id));6531}6532 6533static gint rtps_util_add_type_member(proto_tree *tree,6534 tvbuff_t * tvb, gint offset, const guint encoding,6535 dissection_info * info, dissection_element * member_object) {6536 proto_tree * member_property, *annotation_tree;6537 guint32 member_id = 0, member_length = 0;6538 guint32 long_number, i;6539 guint16 short_number;6540 guint64 member_type_id;6541 gint offset_tmp;6542 gchar * name = NULL((void*)0);6543 6544 member_property = proto_tree_add_subtree(tree, tvb, offset, 0,6545 ett_rtps_type_element, NULL((void*)0), "Member Property");6546 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);6547 offset_tmp = offset;6548 short_number = tvb_get_guint16(tvb, offset_tmp, encoding);6549 proto_tree_add_bitmask_value(member_property, tvb, offset_tmp, hf_rtps_type_object_flags,6550 ett_rtps_flags, MEMBER_FLAGS, short_number);6551 if (member_object) member_object->flags = short_number;6552 offset_tmp += 2;6553 ALIGN_ZERO(offset_tmp, 4, offset)(offset_tmp -= offset, offset_tmp = (((offset_tmp) + ((4) - 1
)) & ~((4) - 1)), offset_tmp += offset)
;6554 proto_tree_add_item(member_property, hf_rtps_type_object_member_id, tvb, offset_tmp, 4, encoding);6555 member_id = tvb_get_guint32(tvb, offset_tmp, encoding);6556 offset_tmp += 4;6557 offset_tmp = rtps_util_add_type_id(member_property, tvb, offset_tmp, encoding,6558 offset, -1, tree, &member_type_id);6559 rtps_util_add_string(member_property, tvb, offset_tmp, hf_rtps_type_object_name, encoding);6560 long_number = tvb_get_guint32(tvb, offset_tmp, encoding);6561 name = tvb_get_string_enc(wmem_packet_scope(), tvb, offset_tmp+4, long_number, ENC_ASCII0x00000000);6562 proto_item_append_text(tree, " %s (ID: %d)", name, member_id);6563 if (member_object) {6564 member_object->member_id = member_id;6565 (void) g_strlcpy(member_object->member_name, name, sizeof(member_object->member_name));6566 member_object->type_id = member_type_id;6567 }6568 if (info && info->extensibility == EXTENSIBILITY_MUTABLE) {6569 mutable_member_mapping * mutable_mapping = NULL((void*)0);6570 mutable_mapping = wmem_new(wmem_file_scope(), mutable_member_mapping)((mutable_member_mapping*)wmem_alloc((wmem_file_scope()), sizeof
(mutable_member_mapping)))
;6571 (void) g_strlcpy(mutable_mapping->member_name, name, sizeof(mutable_mapping->member_name));6572 mutable_mapping->struct_type_id = info->type_id;6573 mutable_mapping->member_type_id = member_type_id;6574 mutable_mapping->member_id = member_id;6575 mutable_mapping->key = (mutable_mapping->struct_type_id + mutable_mapping->struct_type_id * mutable_mapping->member_id);6576 proto_item_append_text(tree, "(Inserted 0x%016" PRIx64"l" "x" " from 0x%016" PRIx64"l" "x" ")", mutable_mapping->key, mutable_mapping->struct_type_id);6577 wmem_map_insert(mutable_member_mappings, &(mutable_mapping->key), (void *) mutable_mapping);6578 6579 }6580 6581 offset = check_offset_addition(offset, member_length, tree, NULL((void*)0), tvb);6582 6583 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);6584 offset_tmp = offset;6585 long_number = tvb_get_guint32(tvb, offset_tmp, encoding);6586 annotation_tree = proto_tree_add_subtree_format(tree, tvb, offset_tmp, member_length,6587 ett_rtps_type_annotation_usage_list, NULL((void*)0), "Annotation Usage Member List (%d elements)",6588 long_number);6589 offset_tmp += 4;6590 for (i = 0; i < long_number ; i++) {6591 offset_tmp = rtps_util_add_type_annotation_usage(annotation_tree, tvb, offset_tmp,6592 encoding, offset);6593 }6594 offset = check_offset_addition(offset, member_length, tree, NULL((void*)0), tvb);6595 6596 long_number = tvb_get_guint32(tvb, offset, encoding);6597 if ((long_number & PID_LIST_END(0x3f02)) == PID_LIST_END(0x3f02)) {6598 offset += 4;6599 }6600 6601 return offset;6602}6603 6604static gint rtps_util_add_type_union_member(proto_tree *tree,6605 tvbuff_t * tvb, gint offset, const guint encoding, guint64 union_type_id,6606 gboolean is_discriminator, dissection_info * info _U___attribute__((unused))) {6607 proto_tree * labels;6608 gint long_number, i;6609 gint offset_tmp;6610 guint32 member_id = 0, member_length = 0;6611 dissection_element object;6612 offset = rtps_util_add_type_member(tree, tvb, offset, encoding, NULL((void*)0), &object); //&(info->elements[i])6613 6614 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);6615 offset_tmp = offset;6616 6617 long_number = tvb_get_guint32(tvb, offset_tmp, encoding);6618 6619 labels = proto_tree_add_subtree_format(tree, tvb, offset_tmp, member_length,6620 ett_rtps_type_enum_constant, NULL((void*)0), "Labels (%u elements)", long_number);6621 offset_tmp += 4;6622 if ((object.flags & 8) == 8) {6623 union_member_mapping * mapping = NULL((void*)0);6624 6625 mapping = wmem_new(wmem_file_scope(), union_member_mapping)((union_member_mapping*)wmem_alloc((wmem_file_scope()), sizeof
(union_member_mapping)))
;6626 (void) g_strlcpy(mapping->member_name, object.member_name, sizeof(mapping->member_name));6627 mapping->member_type_id = object.type_id;6628 mapping->discriminator = HASHMAP_DISCRIMINATOR_CONSTANT(-2);6629 mapping->union_type_id = union_type_id + mapping->discriminator;6630 6631 wmem_map_insert(union_member_mappings, &(mapping->union_type_id), (void *) mapping);6632 proto_item_append_text(labels, " Added mapping for discriminator (0x%016" PRIx64"l" "x" ") name = %s",6633 mapping->union_type_id, mapping->member_name);6634 }6635 if (is_discriminator) {6636 union_member_mapping * mapping = NULL((void*)0);6637 6638 mapping = wmem_new(wmem_file_scope(), union_member_mapping)((union_member_mapping*)wmem_alloc((wmem_file_scope()), sizeof
(union_member_mapping)))
;6639 (void) g_strlcpy(mapping->member_name, object.member_name, sizeof(mapping->member_name));6640 mapping->member_type_id = object.type_id;6641 mapping->discriminator = -1;6642 mapping->union_type_id = union_type_id + mapping->discriminator;6643 6644 wmem_map_insert(union_member_mappings, &(mapping->union_type_id), (void *) mapping);6645 proto_item_append_text(labels, " Added mapping for discriminator (0x%016" PRIx64"l" "x" ") name = %s",6646 mapping->union_type_id, mapping->member_name);6647 }6648 for (i = 0; i < long_number; i++) {6649 proto_item * ti;6650 union_member_mapping * mapping = NULL((void*)0);6651 guint32 discriminator_case;6652 6653 mapping = wmem_new(wmem_file_scope(), union_member_mapping)((union_member_mapping*)wmem_alloc((wmem_file_scope()), sizeof
(union_member_mapping)))
;6654 6655 discriminator_case = tvb_get_guint32(tvb, offset_tmp, encoding);6656 ti = proto_tree_add_item(labels, hf_rtps_type_object_union_label, tvb, offset_tmp, 4, encoding);6657 offset_tmp += 4;6658 6659 (void) g_strlcpy(mapping->member_name, object.member_name, sizeof(mapping->member_name));6660 mapping->member_type_id = object.type_id;6661 mapping->discriminator = discriminator_case;6662 mapping->union_type_id = union_type_id + discriminator_case;6663 6664 wmem_map_insert(union_member_mappings, &(mapping->union_type_id), (void *) mapping);6665 proto_item_append_text(ti, " Added mapping for discriminator (0x%016" PRIx64"l" "x" ") name = %s",6666 mapping->union_type_id, mapping->member_name);6667 }6668 6669 offset = check_offset_addition(offset, member_length, tree, NULL((void*)0), tvb);6670 long_number = tvb_get_guint32(tvb, offset_tmp, encoding);6671 6672 if ((long_number & PID_LIST_END(0x3f02)) == PID_LIST_END(0x3f02)) {6673 offset += 4;6674 }6675 6676 return offset;6677}6678 6679static void rtps_util_add_type_element_union(proto_tree *tree,6680 tvbuff_t * tvb, gint offset, const guint encoding, dissection_info * info) {6681 proto_tree * members;6682 guint32 member_id = 0, member_length = 0;6683 guint32 long_number, i;6684 gint offset_tmp;6685 offset = rtps_util_add_type_library_type(tree, tvb, offset, encoding, info);6686 6687 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);6688 offset_tmp = offset;6689 6690 long_number = tvb_get_guint32(tvb, offset_tmp, encoding);6691 members = proto_tree_add_subtree(tree, tvb, offset_tmp, -1,6692 ett_rtps_type_enum_constant, NULL((void*)0), "Members");6693 6694 offset_tmp += 4;6695 6696 for (i = 0; i < long_number; i++) {6697 proto_tree * member = NULL((void*)0);6698 gint offset_member = offset_tmp;6699 member = proto_tree_add_subtree(members, tvb, offset_tmp, 0,6700 ett_rtps_type_enum_constant, NULL((void*)0), "Member");6701 offset_tmp = rtps_util_add_type_union_member(member, tvb, offset_tmp, encoding,6702 info->type_id, (i == 0), info);6703 proto_item_set_len(member, offset_tmp - offset_member);6704 }6705 6706 long_number = tvb_get_guint32(tvb, offset_tmp, encoding);6707 if ((long_number & PID_LIST_END(0x3f02)) == PID_LIST_END(0x3f02)) {6708 offset_tmp += 4;6709 }6710 proto_item_set_len(members, offset_tmp - offset);6711}6712 6713static void rtps_util_add_type_element_struct(proto_tree *tree,6714 tvbuff_t * tvb, gint offset, const guint encoding, dissection_info * info) {6715 proto_tree * member;6716 guint32 member_id = 0, member_length = 0;6717 guint32 long_number, i;6718 gint offset_tmp, member_size;6719 wmem_array_t *elements = NULL((void*)0);6720 dissection_element zero_element = {0};6721 6722 offset = rtps_util_add_type_library_type(tree, tvb, offset, encoding, info);6723 6724 /* dissect base_type */6725 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);6726 offset = rtps_util_add_type_id(tree, tvb, offset, encoding, offset, hf_rtps_type_object_base_type, NULL((void*)0), &(info->base_type_id));6727 6728 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);6729 /* dissect seq_member*/6730 6731 offset_tmp = offset;6732 long_number = tvb_get_guint32(tvb, offset_tmp, encoding);6733 6734 offset_tmp += 4;6735 6736 if (info) {6737 elements = wmem_array_sized_new(wmem_file_scope(), sizeof(dissection_element), MIN(long_number, DISSECTION_INFO_MAX_ELEMENTS_DEFAULT_VALUE)(((long_number) < ((100))) ? (long_number) : ((100))));6738 }6739 for (i = 0; i < long_number; i++) {6740 member_size = offset_tmp;6741 member = proto_tree_add_subtree(tree, tvb, offset_tmp, 0,6742 ett_rtps_type_enum_constant, NULL((void*)0), "");6743 if (info && elements) {6744 wmem_array_append_one(elements, zero_element)wmem_array_append((elements), &(zero_element), 1);6745 offset_tmp = rtps_util_add_type_member(member, tvb, offset_tmp, encoding, info, wmem_array_index(elements, i));6746 } else {6747 offset_tmp = rtps_util_add_type_member(member, tvb, offset_tmp, encoding, NULL((void*)0), NULL((void*)0));6748 }6749 proto_item_set_len(member, offset_tmp - member_size);6750 }6751 if (info) {6752 info->num_elements = wmem_array_get_count(elements);6753 info->elements = wmem_array_finalize(elements);6754 }6755}6756 6757static void rtps_util_add_type_library(proto_tree *tree, packet_info * pinfo,6758 tvbuff_t * tvb, gint offset, const guint encoding, guint32 size);6759 6760// NOLINTNEXTLINE(misc-no-recursion)6761static void rtps_util_add_type_element_module(proto_tree *tree, packet_info * pinfo,6762 tvbuff_t * tvb, gint offset, const guint encoding) {6763 guint32 long_number;6764 gchar * name = NULL((void*)0);6765 long_number = tvb_get_guint32(tvb, offset, encoding);6766 name = tvb_get_string_enc(wmem_packet_scope(), tvb, offset+4, long_number, ENC_ASCII0x00000000);6767 proto_item_set_text(tree, "module %s", name);6768 offset = rtps_util_add_string(tree, tvb, offset, hf_rtps_type_object_element_module_name, encoding);6769 rtps_util_add_type_library(tree, pinfo, tvb, offset, encoding, -1);6770}6771 6772// NOLINTNEXTLINE(misc-no-recursion)6773static gint rtps_util_add_type_library_element(proto_tree *tree, packet_info * pinfo,6774 tvbuff_t * tvb, gint offset, const guint encoding) {6775 proto_tree * element_tree;6776 guint32 long_number;6777 guint32 member_id = 0, member_length = 0;6778 gint initial_offset = offset;6779 dissection_info * info;6780 gboolean add_info = TRUE(!(0));6781 6782 info = wmem_new(wmem_file_scope(), dissection_info)((dissection_info*)wmem_alloc((wmem_file_scope()), sizeof(dissection_info
)))
;6783 info->elements = NULL((void*)0);6784 6785 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);6786 long_number = tvb_get_guint32(tvb, offset, encoding);6787 info->member_kind = long_number;6788 6789 element_tree = proto_tree_add_subtree(tree, tvb, offset, 0,6790 ett_rtps_type_element, NULL((void*)0), "");6791 offset = check_offset_addition(offset, member_length, tree, pinfo, tvb);6792 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);6793 proto_item_set_len(element_tree, member_length + offset - initial_offset);6794 switch (long_number) {6795 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_ENUMERATION_TYPE: /*ENUMERATION */6796 rtps_util_add_type_element_enumeration(element_tree, tvb, offset, encoding, info);6797 break;6798 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_ALIAS_TYPE: /* ALIAS */6799 rtps_util_add_type_element_alias(element_tree, tvb, offset, encoding, info);6800 break;6801 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_ARRAY_TYPE: /* ARRAY */6802 rtps_util_add_type_element_array(element_tree, tvb, offset, encoding, info);6803 break;6804 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_SEQUENCE_TYPE: /* SEQUENCE */6805 rtps_util_add_type_element_sequence(element_tree, tvb, offset, encoding, info);6806 break;6807 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_STRING_TYPE: /* STRING : COLLECTION */6808 rtps_util_add_type_element_string(element_tree, tvb, offset, encoding, info);6809 break;6810 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_UNION_TYPE:6811 rtps_util_add_type_element_union(element_tree, tvb, offset, encoding, info);6812 break;6813 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_STRUCTURE_TYPE: /* STRUCT */6814 rtps_util_add_type_element_struct(element_tree, tvb, offset, encoding, info);6815 break;6816 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_MODULE:6817 /* This does *not* fill in the info structure, so do *not* add it. */6818 add_info = FALSE(0);6819 rtps_util_add_type_element_module(element_tree, pinfo, tvb, offset, encoding);6820 break;6821 default:6822 /* We have *not* filled in the info structure, so do *not* add it. */6823 add_info = FALSE(0);6824 proto_item_append_text(element_tree, "Kind: %u", long_number);6825 proto_tree_add_item(element_tree, hf_rtps_type_object_element_raw, tvb, offset,6826 member_length, encoding);6827 break;6828 }6829 offset = check_offset_addition(offset, member_length, tree, NULL((void*)0), tvb);6830 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);6831 long_number = tvb_get_guint32(tvb, offset, encoding);6832 if ((long_number & PID_LIST_END(0x3f02)) != PID_LIST_END(0x3f02)) {6833 expert_add_info_format(pinfo, element_tree, &ei_rtps_parameter_value_invalid,6834 "Now it should be PID_LIST_END and it is not"); \6835 }6836 offset += 4;6837 proto_item_set_len(element_tree, offset - initial_offset);6838 6839 if (add_info) {6840 wmem_map_insert(dissection_infos, &(info->type_id), (void *) info);6841 }6842 6843 return offset;6844}6845 6846// NOLINTNEXTLINE(misc-no-recursion)6847static void rtps_util_add_type_library(proto_tree *tree, packet_info * pinfo,6848 tvbuff_t * tvb, gint offset, const guint encoding, guint32 size) {6849 proto_tree * library_tree;6850 guint32 long_number, i;6851 long_number = tvb_get_guint32(tvb, offset, encoding);6852 library_tree = proto_tree_add_subtree_format(tree, tvb, offset, size,6853 ett_rtps_type_library, NULL((void*)0), "Type Library (%d elements)", long_number);6854 offset += 4;6855 increment_dissection_depth(pinfo);6856 for (i = 0; i < long_number; i++) {6857 offset = rtps_util_add_type_library_element(library_tree, pinfo, tvb,6858 offset, encoding);6859 }6860 decrement_dissection_depth(pinfo);6861}6862 6863static void rtps_util_add_typeobject(proto_tree *tree, packet_info * pinfo,6864 tvbuff_t * tvb, gint offset, const guint encoding, guint32 size,6865 type_mapping * type_mapping_object ) {6866 proto_tree * typeobject_tree;6867 gint offset_tmp = 0;6868 guint32 member_id = 0, member_length = 0;6869 guint32 long_number;6870 guint64 type_id;6871 6872 typeobject_tree = proto_tree_add_subtree(tree, tvb, offset, size,6873 ett_rtps_type_object, NULL((void*)0), "Type Object");6874 /* --- This is the standard parameterized serialization --- */6875 /* TypeLibrary */6876 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);6877 offset_tmp = offset;6878 /* Dissect the member */6879 rtps_util_add_type_library(typeobject_tree, pinfo, tvb, offset_tmp, encoding, member_length);6880 offset = check_offset_addition(offset, member_length, tree, pinfo, tvb);6881 /* End TypeLibrary */6882 6883 /* _TypeId */6884 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);6885 offset_tmp = offset;6886 /* Dissect the member. In this case, the typeid is an union with a short6887 * as a discriminator*/6888 rtps_util_add_type_id(typeobject_tree, tvb, offset_tmp, encoding, offset, -1, NULL((void*)0), &type_id);6889 if (type_mapping_object) type_mapping_object->type_id = type_id;6890 offset = check_offset_addition(offset, member_length, tree, pinfo, tvb);6891 /* End _TypeId */6892 6893 long_number = tvb_get_guint32(tvb, offset, encoding);6894 if ((long_number & PID_LIST_END(0x3f02)) != PID_LIST_END(0x3f02)) {6895 expert_add_info_format(pinfo, typeobject_tree, &ei_rtps_parameter_value_invalid,6896 "This should be PID_LIST_END and it is not"); \6897 }6898 6899}6900 6901#if defined (HAVE_ZLIB1) || defined (HAVE_ZLIBNG)6902static void rtps_add_zlib_compressed_typeobject(proto_tree *tree, packet_info * pinfo,6903 tvbuff_t * tvb, gint offset, const guint encoding, guint compressed_size,6904 guint decompressed_size, type_mapping * type_mapping_object) {6905 6906 tvbuff_t *decompressed_data_child_tvb;6907 tvbuff_t *compressed_type_object_subset;6908 proto_tree *decompressed_type_object_subtree;6909 6910 compressed_type_object_subset = tvb_new_subset_length(tvb, offset, decompressed_size);6911 decompressed_data_child_tvb = tvb_child_uncompress_zlib(tvb, compressed_type_object_subset, 0, compressed_size);6912 if (decompressed_data_child_tvb) {6913 decompressed_type_object_subtree = proto_tree_add_subtree(tree, decompressed_data_child_tvb,6914 0, 0, ett_rtps_decompressed_type_object, NULL((void*)0), "[Uncompressed type object]");6915 rtps_util_add_typeobject(decompressed_type_object_subtree, pinfo,6916 decompressed_data_child_tvb, 0, encoding, decompressed_size, type_mapping_object);6917 }6918 else {6919 proto_tree_add_subtree(tree, compressed_type_object_subset,6920 0, 0, ett_rtps_decompressed_type_object, NULL((void*)0), "[Failed to decompress type object]");6921 }6922}6923#else6924static void rtps_add_zlib_compressed_typeobject(proto_tree *tree _U___attribute__((unused)), packet_info * pinfo _U___attribute__((unused)),6925 tvbuff_t * tvb _U___attribute__((unused)), gint offset _U___attribute__((unused)), const guint encoding _U___attribute__((unused)), guint compressed_size _U___attribute__((unused)),6926 guint decompressed_size _U___attribute__((unused)), type_mapping * type_mapping_object _U___attribute__((unused)))6927{6928}6929#endif6930 6931/* ------------------------------------------------------------------------- */6932/* Insert in the protocol tree the next bytes interpreted as Sequence of6933 * Octets.6934 * The formatted buffer is: [ 0x01, 0x02, 0x03, 0x04, ...]6935 * The maximum number of elements displayed is 10, after that a '...' is6936 * inserted.6937 */6938static gint rtps_util_add_seq_octets(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,6939 gint offset, const guint encoding, int param_length, int hf_id) {6940 guint32 seq_length;6941 proto_item *ti;6942 6943 ti = proto_tree_add_item_ret_uint(tree, hf_rtps_sequence_size, tvb, offset, 4, encoding, &seq_length);6944 6945 offset += 4;6946 /* param length -1 means not specified */6947 if (param_length != -1 && param_length < 4 + (int)seq_length) {6948 expert_add_info_format(pinfo, ti, &ei_rtps_parameter_value_invalid, "ERROR: Parameter value too small");6949 return offset + seq_length;6950 }6951 6952 if (seq_length) {6953 proto_tree_add_item(tree, hf_id, tvb, offset, seq_length, ENC_NA0x00000000);6954 }6955 6956 return offset + seq_length;6957}6958 6959static gint rtps_util_add_data_holder(proto_tree *tree, tvbuff_t * tvb, packet_info * pinfo,6960 gint offset, const guint encoding, gint seq_index, gint alignment_zero) {6961 proto_tree * data_holder_tree, * properties_tree, * property_tree;6962 proto_item * tii, * ti, * data_holder;6963 guint32 seq_size, i;6964 gint offset_tmp, data_holder_begin;6965 6966 data_holder_tree = proto_tree_add_subtree_format(tree, tvb, offset,6967 -1, ett_rtps_data_holder, &data_holder, "Data Holder [%d]", seq_index);6968 data_holder_begin = offset;6969 offset = rtps_util_add_string(data_holder_tree, tvb, offset,6970 hf_rtps_pgm_data_holder_class_id, encoding);6971 LONG_ALIGN_ZERO(offset, alignment_zero)(offset -= alignment_zero, (offset = (offset+3)&0xfffffffc
), offset += alignment_zero)
;6972 6973 offset_tmp = offset;6974 properties_tree = proto_tree_add_subtree_format(data_holder_tree, tvb, offset,6975 -1, ett_rtps_data_holder_properties, &tii, "String Properties");6976 seq_size = tvb_get_guint32(tvb, offset, encoding);6977 offset += 4;6978 for(i = 0; i < seq_size; i++) {6979 gint local_offset = offset;6980 property_tree = proto_tree_add_subtree_format(properties_tree, tvb, offset,6981 -1, ett_rtps_property_tree, &ti, "Property [%d]", i);6982 offset = rtps_util_add_string(property_tree, tvb, offset,6983 hf_rtps_property_name, encoding);6984 offset = rtps_util_add_string(property_tree, tvb, offset,6985 hf_rtps_property_value, encoding);6986 proto_item_set_len(ti, offset - local_offset);6987 }6988 proto_item_set_len(tii, offset - offset_tmp);6989 6990 offset_tmp = offset;6991 properties_tree = proto_tree_add_subtree_format(data_holder_tree, tvb, offset,6992 -1, ett_rtps_data_holder_properties, &tii, "Binary Properties");6993 seq_size = tvb_get_guint32(tvb, offset, encoding);6994 offset += 4;6995 for(i = 0; i < seq_size; i++) {6996 gint local_offset = offset;6997 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);6998 property_tree = proto_tree_add_subtree_format(properties_tree, tvb, offset,6999 -1, ett_rtps_property_tree, &ti, "Property [%d]", i);7000 offset = rtps_util_add_string(property_tree, tvb, offset,7001 hf_rtps_property_name, encoding);7002 offset = rtps_util_add_seq_octets(property_tree, pinfo, tvb, offset,7003 encoding, -1, hf_rtps_param_user_data);7004 proto_item_set_len(ti, offset - local_offset);7005 }7006 proto_item_set_len(tii, offset - offset_tmp);7007 proto_item_set_len(data_holder, offset - offset_tmp);7008 7009 proto_item_set_len(data_holder, offset - data_holder_begin);7010 return offset;7011}7012 7013static gint rtps_util_add_data_holder_seq(proto_tree *tree, tvbuff_t * tvb,7014 packet_info * pinfo, gint offset, const guint encoding, gint alignment_zero) {7015 proto_tree * data_holder_seq_tree;7016 proto_item * ti;7017 guint32 seq_length;7018 guint32 i;7019 7020 data_holder_seq_tree = proto_tree_add_subtree(tree, tvb, offset,7021 -1, ett_rtps_data_holder_seq, &ti, "Data Holder Sequence");7022 seq_length = tvb_get_guint32(tvb, offset, encoding);7023 offset += 4;7024 for(i = 0; i < seq_length; i++) {7025 offset = rtps_util_add_data_holder(data_holder_seq_tree, tvb, pinfo, offset,7026 encoding, i, alignment_zero);7027 }7028 return offset;7029}7030 7031/* ------------------------------------------------------------------------- */7032/* Insert in the protocol tree the next bytes interpreted as a Bitmap7033 * struct {7034 * SequenceNumber_t bitmapBase;7035 * sequence<long, 8> bitmap;7036 * } SequenceNumberSet;7037 *7038 * Returns the new offset after reading the bitmap.7039 */7040static int rtps_util_add_bitmap(proto_tree *tree,7041 tvbuff_t *tvb,7042 gint offset,7043 const guint encoding,7044 const char *label,7045 gboolean show_analysis) {7046 gint32 num_bits;7047 guint32 data;7048 wmem_strbuf_t *temp_buff = wmem_strbuf_create(wmem_packet_scope())wmem_strbuf_new(wmem_packet_scope(), "");7049 wmem_strbuf_t *analysis_buff = wmem_strbuf_create(wmem_packet_scope())wmem_strbuf_new(wmem_packet_scope(), "");7050 gint i, j, idx;7051 gchar *last_one;7052 proto_item *ti = NULL((void*)0), *ti_tree = NULL((void*)0);7053 proto_tree *bitmap_tree;7054 const gint original_offset = offset;7055 guint32 datamask;7056 guint64 first_seq_number;7057 gboolean first_nack = TRUE(!(0));7058 7059 bitmap_tree = proto_tree_add_subtree(tree, tvb, original_offset, offset-original_offset,7060 ett_rtps_bitmap, &ti_tree, label);7061 7062 /* Bitmap base sequence number */7063 first_seq_number = rtps_util_add_seq_number(bitmap_tree, tvb, offset, encoding, "bitmapBase");7064 offset += 8;7065 7066 /* Reads the bitmap size */7067 proto_tree_add_item_ret_uint(bitmap_tree, hf_rtps_bitmap_num_bits, tvb, offset, 4, encoding, &num_bits);7068 offset += 4;7069 /* bitmap base 0 means that this is a preemptive ACKNACK */7070 if (first_seq_number == 0 && show_analysis) {7071 ti = proto_tree_add_uint_format(bitmap_tree, hf_rtps_acknack_analysis, tvb, 0, 0,7072 1, "Acknack Analysis: Preemptive ACKNACK");7073 proto_item_set_generated(ti);7074 }7075 7076 if (first_seq_number > 0 && num_bits == 0 && show_analysis) {7077 ti = proto_tree_add_uint_format(bitmap_tree, hf_rtps_acknack_analysis, tvb, 0, 0,7078 2, "Acknack Analysis: Expecting sample %" PRIu64"l" "u", first_seq_number);7079 proto_item_set_generated(ti);7080 }7081 7082 if (num_bits > 0 && show_analysis) {7083 ti = proto_tree_add_uint_format(bitmap_tree, hf_rtps_acknack_analysis, tvb, 0, 0,7084 3, "Acknack Analysis: Lost samples");7085 proto_item_set_generated(ti);7086 }7087 7088 /* Reads the bits (and format the print buffer) */7089 idx = 0;7090 for (i = 0; i < num_bits; i += 32) {7091 data = tvb_get_guint32(tvb, offset, encoding);7092 offset += 4;7093 for (j = 0; j < 32; ++j) {7094 datamask = (1U << (31-j));7095 wmem_strbuf_append_c(temp_buff, ((data & datamask) == datamask) ? '1':'0');7096 if ((data & datamask) == datamask) {7097 proto_item_append_text(ti,7098 first_nack ? " %" PRIu64"l" "u" : ", %" PRIu64"l" "u",7099 first_seq_number + idx);7100 first_nack = FALSE(0);7101 }7102 ++idx;7103 if ((idx >= num_bits) || (wmem_strbuf_get_len(temp_buff) >= (ITEM_LABEL_LENGTH240 - 1))) {7104 break;7105 }7106 }7107 }7108 7109 /* removes all the ending '0' */7110 last_one = strrchr(wmem_strbuf_get_str(temp_buff), '1');7111 if (last_one) {7112 wmem_strbuf_truncate(temp_buff, (gsize) (last_one - wmem_strbuf_get_str(temp_buff)) + 1);7113 }7114 7115 if (wmem_strbuf_get_len(temp_buff) > 0) {7116 proto_tree_add_bytes_format_value(bitmap_tree, hf_rtps_bitmap, tvb,7117 original_offset + 12, offset - original_offset - 12,7118 NULL((void*)0), "%s", wmem_strbuf_get_str(temp_buff));7119 }7120 7121 proto_item_set_len(ti_tree, offset-original_offset);7122 7123 /* Add analysis of the information */7124 if (num_bits > 0 && show_analysis) {7125 proto_item_append_text(ti, "%s in range [%" PRIu64"l" "u" ",%" PRIu64"l" "u" "]",7126 wmem_strbuf_get_str(analysis_buff), first_seq_number, first_seq_number + num_bits - 1);7127 }7128 7129 return offset;7130}7131 7132/* ------------------------------------------------------------------------- */7133/* Insert in the protocol tree the next bytes interpreted as a FragmentNumberSet7134 * typedef unsigned long FragmentNumber_t;7135 * struct {7136 * FragmentNumber_t bitmapBase;7137 * sequence<FragmentNumber_t> bitmap;7138 * } FragmentNumberSet;7139 *7140 * Returns the new offset after reading the bitmap.7141 */7142static int rtps_util_add_fragment_number_set(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,7143 gint offset, const guint encoding, const char *label, gint section_size) {7144 guint64 base;7145 gint32 num_bits;7146 guint32 data;7147 wmem_strbuf_t *temp_buff = wmem_strbuf_create(wmem_packet_scope())wmem_strbuf_new(wmem_packet_scope(), "");7148 gchar *last_one;7149 int i, j, idx;7150 proto_item *ti;7151 proto_tree *bitmap_tree;7152 const gint original_offset = offset;7153 guint32 datamask;7154 gint expected_size;7155 gint base_size;7156 7157 bitmap_tree = proto_tree_add_subtree(tree, tvb, original_offset, offset-original_offset, ett_rtps_bitmap, &ti, label);7158 7159 /* RTI DDS 4.2d was sending the FragmentNumber_t as a 64-bit long integer7160 * instead of 32-bit long.7161 * Attempt to decode this section as 32-bit, then check if the size of the7162 * message match what is here. If not re-decode it as 64-bit.7163 */7164 num_bits = tvb_get_guint32(tvb, offset+4, encoding);7165 expected_size = ((num_bits + 31) / 32) * 4 + 8;7166 if (expected_size == section_size) {7167 base = (guint64)tvb_get_guint32(tvb, offset, encoding);7168 base_size = 4;7169 offset += 8;7170 } else {7171 /* Attempt to use 64-bit for base */7172 num_bits = tvb_get_guint32(tvb, offset+8, encoding);7173 /* num_bits/8 must be aligned to the 4-byte word */7174 expected_size = (((num_bits / 8) + 3) / 4) * 4 + 12;7175 if (expected_size == section_size) {7176 guint64 hi = (guint64)tvb_get_guint32(tvb, offset, encoding);7177 guint64 lo = (guint64)tvb_get_guint32(tvb, offset+4, encoding);7178 base = (hi << 32) | lo;7179 base_size = 8;7180 offset += 12;7181 } else {7182 /* size don't match, packet error */7183 expert_add_info_format(pinfo, ti, &ei_rtps_parameter_value_invalid, "Illegal size for fragment number set");7184 return -1;7185 }7186 }7187 7188 /* Reads the bits (and format the print buffer) */7189 idx = 0;7190 for (i = 0; i < num_bits; i += 32) {7191 data = tvb_get_guint32(tvb, offset, encoding);7192 offset += 4;7193 for (j = 0; j < 32; ++j) {7194 datamask = (1U << (31-j));7195 wmem_strbuf_append_c(temp_buff, ((data & datamask) == datamask) ? '1':'0');7196 ++idx;7197 if ((idx >= num_bits) || (wmem_strbuf_get_len(temp_buff) >= (ITEM_LABEL_LENGTH240 - 1))) {7198 break;7199 }7200 }7201 }7202 7203 /* removes all the ending '0' */7204 last_one = strrchr(wmem_strbuf_get_str(temp_buff), '1');7205 if (last_one) {7206 wmem_strbuf_truncate(temp_buff, (gsize) (last_one - wmem_strbuf_get_str(temp_buff)));7207 }7208 7209 if (base_size == 8) {7210 proto_tree_add_uint64(bitmap_tree, hf_rtps_fragment_number_base64, tvb, original_offset, 8,7211 base);7212 } else {7213 proto_tree_add_item(bitmap_tree, hf_rtps_fragment_number_base, tvb, original_offset, base_size, encoding);7214 }7215 proto_tree_add_uint(bitmap_tree, hf_rtps_fragment_number_num_bits, tvb, original_offset + base_size, 4, num_bits);7216 7217 if (wmem_strbuf_get_len(temp_buff) > 0) {7218 proto_tree_add_bytes_format_value(bitmap_tree, hf_rtps_bitmap, tvb, original_offset + base_size + 4, offset - original_offset - base_size - 4,7219 NULL((void*)0), "%s", wmem_strbuf_get_str(temp_buff));7220 }7221 7222 proto_item_set_len(ti, offset-original_offset);7223 return offset;7224}7225 7226static void rtps_util_insert_type_mapping_in_registry(packet_info *pinfo, type_mapping *type_mapping_object) {7227 if (type_mapping_object) {7228 if ((type_mapping_object->fields_visited & TOPIC_INFO_ALL_SET(0x07)) == TOPIC_INFO_ALL_SET(0x07) &&7229 type_mapping_object->guid.fields_present == GUID_HAS_ALL0x0000000F &&7230 !wmem_map_lookup(registry, &(type_mapping_object->guid))) {7231 if (((type_mapping_object->guid.entity_id & 0x02) == 0x02) || ((type_mapping_object->guid.entity_id & 0x04) == 0x04)){7232 /* If it is an application defined writer matches 0x02. Matches 0x04 if it is an application defined reader */7233 type_mapping_object->dcps_publication_frame_number = pinfo->num;7234 wmem_map_insert(registry, &(type_mapping_object->guid), type_mapping_object);7235 }7236 }7237 }7238}7239 7240static void rtps_util_store_type_mapping(packet_info *pinfo _U___attribute__((unused)), tvbuff_t *tvb, gint offset,7241 type_mapping * type_mapping_object, const gchar * value,7242 gint topic_info_add_id) {7243 if (enable_topic_info && type_mapping_object) {7244 switch (topic_info_add_id) {7245 case TOPIC_INFO_ADD_GUID(0x01): {7246 type_mapping_object->guid.host_id = tvb_get_ntohl(tvb, offset);7247 type_mapping_object->guid.app_id = tvb_get_ntohl(tvb, offset+4);7248 type_mapping_object->guid.instance_id = tvb_get_ntohl(tvb, offset+8);7249 type_mapping_object->guid.entity_id = tvb_get_ntohl(tvb, offset+12);7250 type_mapping_object->guid.fields_present |=7251 GUID_HAS_HOST_ID0x00000001|GUID_HAS_APP_ID0x00000002|GUID_HAS_INSTANCE_ID0x00000004|GUID_HAS_ENTITY_ID0x00000008;7252 type_mapping_object->fields_visited =7253 type_mapping_object->fields_visited | TOPIC_INFO_ADD_GUID(0x01);7254 break;7255 }7256 case TOPIC_INFO_ADD_TOPIC_NAME(0x04): {7257 rtps_strlcpy(type_mapping_object->topic_name, value, MAX_TOPIC_AND_TYPE_LENGTH256);7258 type_mapping_object->fields_visited =7259 type_mapping_object->fields_visited | TOPIC_INFO_ADD_TOPIC_NAME(0x04);7260 break;7261 }7262 case TOPIC_INFO_ADD_TYPE_NAME(0x02): {7263 rtps_strlcpy(type_mapping_object->type_name, value, MAX_TOPIC_AND_TYPE_LENGTH256);7264 type_mapping_object->fields_visited =7265 type_mapping_object->fields_visited | TOPIC_INFO_ADD_TYPE_NAME(0x02);7266 break;7267 }7268 7269 default:7270 break;7271 }7272 }7273}7274 7275static guint hash_by_participant_guid(gconstpointer key) {7276 const endpoint_guid* guid = (const endpoint_guid*)key;7277 gint vals[] = { guid->host_id, guid->app_id, guid->instance_id };7278 GBytes* gbytes = g_bytes_new(vals, sizeof(vals));7279 guint hash = g_bytes_hash(gbytes);7280 g_bytes_unref(gbytes);7281 return hash;7282}7283 7284static guint hash_by_guid(gconstpointer key) {7285 const endpoint_guid * guid = (const endpoint_guid *) key;7286 DISSECTOR_ASSERT(guid->fields_present & GUID_HAS_APP_ID)((void) ((guid->fields_present & 0x00000002) ? (void)0
: (proto_report_dissector_bug("%s:%u: failed assertion \"%s\""
, "epan/dissectors/packet-rtps.c", 7286, "guid->fields_present & 0x00000002"
))))
;7287 return g_int_hash(&(guid->app_id));7288}7289 7290static gboolean compare_by_guid(gconstpointer guid_a, gconstpointer guid_b) {7291 return memcmp(guid_a, guid_b, sizeof(endpoint_guid)) == 0;7292}7293 7294static gboolean compare_by_participant_guid(gconstpointer guid_a, gconstpointer guid_b) {7295 const endpoint_guid* a = (const endpoint_guid*)guid_a;7296 const endpoint_guid* b = (const endpoint_guid*)guid_b;7297 return ((a->host_id == b->host_id) && (a->app_id == b->app_id) && (a->instance_id == b->instance_id));7298}7299 7300static guint get_domain_id_from_tcp_discovered_participants(wmem_map_t *map, endpoint_guid* key) {7301 participant_info *p_info = (participant_info*)wmem_map_lookup(map, (void*)key);7302 return (p_info != NULL((void*)0)) ? p_info->domainId: RTPS_UNKNOWN_DOMAIN_ID_VAL-1;7303}7304 7305static guint coherent_set_key_hash_by_key(gconstpointer key) {7306 return wmem_strong_hash((const guint8 *)key, sizeof(coherent_set_key));7307}7308 7309static gboolean compare_by_coherent_set_key(gconstpointer key_a, gconstpointer key_b) {7310 return memcmp(key_a, key_b, sizeof(coherent_set_key)) == 0;7311}7312 7313static type_mapping * rtps_util_get_topic_info(endpoint_guid * guid) {7314 /* At this point, we know the boolean enable_topic_info is true */7315 type_mapping * result = NULL((void*)0);7316 if (guid) {7317 guint entity_id_low = 0xFF & guid->entity_id;7318 /* If the entity guid low is ENTITYID_NORMAL_META_GROUP_READER or ENTITYID_NORMAL_META_GROUP_WRITER then7319 * is a builtin endpoint that uses the type InstaneStateResponseData. The type_mapping for this type is not7320 * available through discovery. It is defined by code in7321 * initialize_instance_state_data_response_dissection_info function.7322 */7323 if (entity_id_low == ENTITYID_NORMAL_META_GROUP_READER(0x8d) || entity_id_low == ENTITYID_NORMAL_META_GROUP_WRITER(0x8c)) {7324 result = &builtin_types_dissection_data.type_mappings.instance_state_data_response_type_mapping;7325 }7326 else if (guid->fields_present == GUID_HAS_ALL0x0000000F)7327 result = (type_mapping *)wmem_map_lookup(registry, guid);7328 }7329 return result;7330}7331 7332static void rtps_util_format_typename(gchar * type_name, gchar ** output) {7333 gchar ** tokens;7334 gchar * result_caps;7335 /* The standard specifies that the max size of a type name7336 can be 255 bytes */7337 tokens = wmem_strsplit(wmem_packet_scope(), type_name, "::", 255);7338 result_caps = wmem_strjoinv(wmem_packet_scope(), "_", tokens);7339 *output = wmem_ascii_strdown(wmem_packet_scope(), result_caps, -1);7340 7341}7342 7343/* Adds the topic topic information to the tree and the topic name to the info column.7344 * Topic name will be added to the info column only if the topic information is stored7345 * in the "registry map".7346 * This is used when the packet doesn't contain the topic information (PID_TOPIC_INFORMATION)7347 */7348static const char* rtps_util_add_topic_info(proto_tree *tree, packet_info* pinfo, tvbuff_t *tvb,7349 gint offset, endpoint_guid * guid) {7350 const char* topic_name = NULL((void*)0);7351 if (enable_topic_info) {7352 proto_tree * topic_info_tree;7353 proto_item * ti;7354 gboolean is_builtin_type = FALSE(0);7355 type_mapping * type_mapping_object = rtps_util_get_topic_info(guid);7356 /* If it is a builtin type mapping then the information is not taken from discovery data */7357 is_builtin_type = (type_mapping_object == &builtin_types_dissection_data.type_mappings.instance_state_data_response_type_mapping);7358 if (type_mapping_object != NULL((void*)0)) {7359 const gchar* topic_information_text = (!is_builtin_type) ?7360 "[Topic Information (from Discovery)]" :7361 "[Topic Information (BuiltIn type)]";7362 topic_name = type_mapping_object->topic_name;7363 if (topic_name != NULL((void*)0)) {7364 submessage_col_info* current_submessage_col_info = NULL((void*)0);7365 7366 topic_info_tree = proto_tree_add_subtree(tree, tvb, offset, 0,7367 ett_rtps_topic_info, NULL((void*)0), topic_information_text);7368 ti = proto_tree_add_string(topic_info_tree, hf_rtps_param_type_name, tvb, offset, 0,7369 type_mapping_object->type_name);7370 proto_item_set_generated(ti);7371 if (!is_builtin_type) {7372 ti = proto_tree_add_string(topic_info_tree, hf_rtps_param_topic_name, tvb, offset, 0,7373 topic_name);7374 proto_item_set_generated(ti);7375 ti = proto_tree_add_uint(topic_info_tree, hf_rtps_dcps_publication_data_frame_number,7376 tvb, 0, 0, type_mapping_object->dcps_publication_frame_number);7377 }7378 proto_item_set_generated(ti);7379 current_submessage_col_info = (submessage_col_info*)p_get_proto_data(pinfo->pool, pinfo, proto_rtps, RTPS_CURRENT_SUBMESSAGE_COL_DATA_KEY3);7380 if (current_submessage_col_info != NULL((void*)0) && current_submessage_col_info->topic_name == NULL((void*)0)) {7381 current_submessage_col_info->topic_name = wmem_strdup(pinfo->pool, topic_name);7382 }7383 }7384 }7385 }7386 return topic_name;7387}7388 7389/* Uncompress data and returns it uncompressed on a new tvb.7390 *7391 * @param[in] tree a chunk of data in the tvb and return a new tvb with the uncompressed data7392 * @param[in] tvb7393 * @param[in] offset offset at the beginning of the compressed data.7394 * @param[in] size in bytes from the initial offset to the end of the serialized data7395 * @param[in] compressed_size size in bytes of the compressed chunk in the tvb.7396 * @param[out] True if it tries to uncompress the data. In environment where Zlib is not available this will be false. This is used for7397 * distinguis when the data is not decompressed because Zlib is not available (not warning) and cases where it is but fails (warning).7398 *7399 * @return The uncompressed data on a new TVB if everything goes fine. Otherwise NULL7400 */7401static7402tvbuff_t *rtps_util_get_uncompressed_tvb_zlib(7403 tvbuff_t *tvb _U___attribute__((unused)),7404 const gint offset _U___attribute__((unused)),7405 const guint compressed_size _U___attribute__((unused)),7406 gboolean *tried_to_decompress) {7407 tvbuff_t *uncompressed_tvb = NULL((void*)0);7408#if defined(HAVE_ZLIB1) || defined(HAVE_ZLIBNG)7409 /* If ZLIB is available always try to decompress. */7410 *tried_to_decompress = TRUE(!(0));7411 uncompressed_tvb = tvb_new_subset_length_caplen(tvb, offset, compressed_size, -1);7412 uncompressed_tvb = tvb_child_uncompress_zlib(uncompressed_tvb, uncompressed_tvb, 0, compressed_size);7413#else7414 *tried_to_decompress = FALSE(0);7415#endif7416 return uncompressed_tvb;7417}7418 7419/*7420 * 0...2...........8...............167421 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+7422 * | X X X X X X X X X X X | C C C P P |7423 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+7424 * X = Unused options bits7425 * C = Compression bits7426 * P = Padding bits7427 * C = 0b111 would be extended compression options which would come in as an7428 * additional header before the payload.7429 * C = 0b000 to indicate no compression7430*/7431 7432/* Dissects the encapsultaion options7433*7434* @param[in] tree7435* @param[in] packet info.7436* @param[in] tvb7437* @param[in] offset at the beginning of the encapsulation options.7438* @param[out] encapsulation_options_out If not null it will contain the encapsulation options7439* @param[out] compression_option_out If not null it will contain the compression option7440* @param[out] padding_bytes_out If not null it will contain the padding bytes7441* @param[out] extended_header_bits_out If not null it will contain the extended header bits7442* @return the offset after the encapsulation options7443* @note All output parameters are optional.7444*/7445static7446gint rtps_util_dissect_encapsulation_options(7447 proto_tree *tree,7448 tvbuff_t *tvb,7449 gint offset,7450 gint16 *encapsulation_options_out,7451 guint8 *compression_options_out,7452 guint8 *padding_bytes_out,7453 guint8 *extended_header_bits_out) {7454 guint8 compression_options = 0;7455 proto_tree *compression_options_subtree = NULL((void*)0);7456 gint16 encapsulation_options = 0;7457 guint8 padding_bytes = 0;7458 guint8 extended_header_bits = 0;7459 7460 /* Encapsulation length (or option). Always big endian. */7461 encapsulation_options = tvb_get_gint16(tvb, offset, ENC_BIG_ENDIAN0x00000000);7462 if (encapsulation_options != 0) {7463 compression_options_subtree = proto_tree_add_subtree_format(7464 tree,7465 tvb,7466 offset,7467 2,7468 ett_rtps_data_encapsulation_options,7469 NULL((void*)0),7470 "Encapsulation options (0x%02x)",7471 encapsulation_options);7472 /* If compression options ENCAPSULATION_OPTIONS_COMPRESSION_EXTENDED_HEADER_VALUE bits are set, the7473 header contains an extra field */7474 extended_header_bits = (encapsulation_options7475 & ENCAPSULATION_OPTIONS_COMPRESSION_EXTENDED_HEADER_VALUE(0x1C));7476 GET_ENCAPSULATION_COMPRESSION_OPTIONS(encapsulation_options, compression_options)(compression_options = (((encapsulation_options) & ((0x1C
))) >> 2))
;7477 padding_bytes = (encapsulation_options & ENCAPSULATION_OPTIONS_COMPRESSION_PADDING_BYTES_MASK(0x3));7478 proto_tree_add_int(7479 compression_options_subtree,7480 hf_rtps_encapsulation_options_compression_plugin_class_id,7481 tvb,7482 offset + 1,7483 1,7484 compression_options);7485 proto_tree_add_int(7486 compression_options_subtree,7487 hf_rtps_padding_bytes,7488 tvb,7489 offset + 1,7490 1,7491 padding_bytes);7492 offset += 2;7493 padding_bytes = encapsulation_options & ENCAPSULATION_OPTIONS_COMPRESSION_PADDING_BYTES_MASK(0x3);7494 } else {7495 /* Encapsulation length (or option). Always big endian. */7496 proto_tree_add_item(7497 tree,7498 hf_rtps_param_serialize_encap_len,7499 tvb,7500 offset,7501 2,7502 ENC_BIG_ENDIAN0x00000000);7503 offset += 2;7504 }7505 /* Set the optional outputs */7506 if (encapsulation_options_out != NULL((void*)0)) {7507 *encapsulation_options_out = encapsulation_options;7508 }7509 if (compression_options_out != NULL((void*)0)) {7510 *compression_options_out = compression_options;7511 }7512 if (padding_bytes_out != NULL((void*)0)) {7513 *padding_bytes_out = padding_bytes;7514 }7515 if (extended_header_bits_out != NULL((void*)0)) {7516 *extended_header_bits_out = extended_header_bits;7517 }7518 return offset;7519}7520 7521static gboolean rtps_util_try_dissector(proto_tree *tree,7522 packet_info *pinfo, tvbuff_t *tvb, gint offset, endpoint_guid * guid,7523 rtps_dissector_data * data, guint encoding, guint encoding_version, gboolean try_dissection_from_type_object) {7524 7525 7526 if (enable_topic_info) {7527 type_mapping * type_mapping_object = rtps_util_get_topic_info(guid);7528 if (type_mapping_object != NULL((void*)0)) {7529 gchar * dissector_name = NULL((void*)0);7530 tvbuff_t *next_tvb;7531 dissection_info* info = NULL((void*)0);7532 7533 if (try_dissection_from_type_object && enable_user_data_dissection) {7534 info = lookup_dissection_info_in_custom_and_builtin_types(type_mapping_object->type_id);7535 if (info != NULL((void*)0)) {7536 proto_item_append_text(tree, " (TypeId: 0x%016" PRIx64"l" "x" ")", info->type_id);7537 return dissect_user_defined(tree, tvb, pinfo, offset, encoding, encoding_version, info,7538 info->type_id, info->member_name, EXTENSIBILITY_INVALID, offset,7539 0 /* flags */, 0 /* member_id */, TRUE(!(0)));7540 }7541 }7542 /* This part tries to dissect the content using a dissector */7543 next_tvb = tvb_new_subset_remaining(tvb, offset);7544 7545 rtps_util_format_typename(type_mapping_object->type_name, &dissector_name);7546 return dissector_try_string(rtps_type_name_table, dissector_name,7547 next_tvb, pinfo, tree, data);7548 }7549 }7550 /* Return false so the content is dissected by the codepath following this one */7551 return FALSE(0);7552}7553 7554static gint rtps_util_add_rti_topic_query_service_request(proto_tree * tree, packet_info *pinfo,7555 tvbuff_t * tvb, gint offset, guint encoding) {7556 /*7557 struct TopicQuerySelection {7558 string filter_class_name; //@Optional 07559 string filter_expression; // 17560 sequence<string> filter_parameters;7561 }; //@top-level false7562 //@Extensibility MUTABLE_EXTENSIBILITY7563 7564 struct TopicQueryData {7565 TopicQuerySelection topic_query_selection;7566 SequenceNumber_t sync_sequence_number;7567 string topic_name;7568 GUID_t original_related_reader_guid;7569 }; //@top-level false7570 //@Extensibility MUTABLE_EXTENSIBILITY7571 */7572 proto_tree * topic_query_tree, * topic_query_selection_tree, *topic_query_filter_params_tree;7573 proto_item * ti;7574 guint16 encapsulation_id, encapsulation_opt;7575 guint32 param_id, param_length, param_length_2, num_filter_params;7576 gint alignment_zero, tmp_offset;7577 guint32 i;7578 gchar* topic_name = NULL((void*)0);7579 gint topic_name_len = 0;7580 topic_query_tree = proto_tree_add_subtree(tree, tvb, offset,7581 0 /* To be defined */, ett_rtps_topic_query_tree, &ti, "Topic Query Data");7582 7583 /* Encapsulation Id */7584 encapsulation_id = tvb_get_ntohs(tvb, offset); /* Always big endian */7585 proto_tree_add_uint(topic_query_tree, hf_rtps_encapsulation_id,7586 tvb, offset, 2, encapsulation_id);7587 offset += 2;7588 encoding = get_encapsulation_endianness(encapsulation_id);7589 /* Encapsulation length (or option) */7590 encapsulation_opt = tvb_get_ntohs(tvb, offset); /* Always big endian */7591 proto_tree_add_uint(topic_query_tree, hf_rtps_encapsulation_options, tvb,7592 offset, 2, encapsulation_opt);7593 offset += 2;7594 alignment_zero = offset;7595 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &param_id, &param_length);7596 tmp_offset = offset;7597 {7598 /* TopicQuerySelection */7599 topic_query_selection_tree = proto_tree_add_subtree(topic_query_tree, tvb, tmp_offset,7600 0 /* To be defined */, ett_rtps_topic_query_selection_tree, &ti, "Topic Query Selection");7601 7602 SHORT_ALIGN_ZERO(tmp_offset,alignment_zero)(tmp_offset -= alignment_zero, (tmp_offset = (tmp_offset+1)&
0xfffffffe), tmp_offset += alignment_zero)
;7603 rtps_util_dissect_parameter_header(tvb, &tmp_offset, encoding, &param_id, &param_length_2);7604 if (param_id == 0) { /* Optional string filter_class_name */7605 LONG_ALIGN_ZERO(tmp_offset, alignment_zero)(tmp_offset -= alignment_zero, (tmp_offset = (tmp_offset+3)&
0xfffffffc), tmp_offset += alignment_zero)
;7606 rtps_util_add_string(topic_query_selection_tree, tvb, tmp_offset,7607 hf_rtps_topic_query_selection_filter_class_name, encoding);7608 }7609 tmp_offset += param_length_2;7610 7611 SHORT_ALIGN_ZERO(tmp_offset,alignment_zero)(tmp_offset -= alignment_zero, (tmp_offset = (tmp_offset+1)&
0xfffffffe), tmp_offset += alignment_zero)
;7612 rtps_util_dissect_parameter_header(tvb, &tmp_offset, encoding, &param_id, &param_length_2);7613 7614 LONG_ALIGN_ZERO(tmp_offset, alignment_zero)(tmp_offset -= alignment_zero, (tmp_offset = (tmp_offset+3)&
0xfffffffc), tmp_offset += alignment_zero)
;7615 tmp_offset = rtps_util_add_string(topic_query_selection_tree, tvb, tmp_offset,7616 hf_rtps_topic_query_selection_filter_expression, encoding);7617 7618 SHORT_ALIGN_ZERO(tmp_offset,alignment_zero)(tmp_offset -= alignment_zero, (tmp_offset = (tmp_offset+1)&
0xfffffffe), tmp_offset += alignment_zero)
;7619 rtps_util_dissect_parameter_header(tvb, &tmp_offset, encoding, &param_id, &param_length_2);7620 7621 num_filter_params = tvb_get_guint32(tvb, tmp_offset, encoding);7622 proto_tree_add_item(topic_query_selection_tree, hf_rtps_topic_query_selection_num_parameters,7623 tvb, tmp_offset, 4, encoding);7624 topic_query_filter_params_tree = proto_tree_add_subtree_format(topic_query_selection_tree, tvb,7625 tmp_offset + 4, 0 /* To be defined */, ett_rtps_topic_query_filter_params_tree, &ti,7626 "Filter Parameters (size = %u)", num_filter_params);7627 tmp_offset += 4;7628 7629 for (i = 0; i < num_filter_params; ++i) {7630 guint32 string_size;7631 gchar * retVal;7632 LONG_ALIGN_ZERO(tmp_offset, alignment_zero)(tmp_offset -= alignment_zero, (tmp_offset = (tmp_offset+3)&
0xfffffffc), tmp_offset += alignment_zero)
;7633 string_size = tvb_get_guint32(tvb, tmp_offset, encoding);7634 retVal = tvb_get_string_enc(wmem_packet_scope(), tvb, tmp_offset+4, string_size, ENC_ASCII0x00000000);7635 7636 proto_tree_add_string_format(topic_query_filter_params_tree,7637 hf_rtps_topic_query_selection_filter_parameter, tvb,7638 tmp_offset, string_size+4, retVal, "%s[%d]: %s", "Filter Parameter", i, retVal);7639 7640 tmp_offset += (4 + string_size);7641 }7642 SHORT_ALIGN_ZERO(tmp_offset, alignment_zero)(tmp_offset -= alignment_zero, (tmp_offset = (tmp_offset+1)&
0xfffffffe), tmp_offset += alignment_zero)
;7643 tmp_offset += 4;7644 proto_tree_add_item(topic_query_selection_tree, hf_rtps_topic_query_selection_kind,7645 tvb, tmp_offset, 4, encoding);7646 }7647 offset = check_offset_addition(offset, param_length, tree, NULL((void*)0), tvb);7648 SHORT_ALIGN_ZERO(offset,alignment_zero)(offset -= alignment_zero, (offset = (offset+1)&0xfffffffe
), offset += alignment_zero)
;7649 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &param_id, &param_length);7650 7651 rtps_util_add_seq_number(topic_query_tree, tvb, offset, encoding, "Sync Sequence Number");7652 offset = check_offset_addition(offset, param_length, tree, NULL((void*)0), tvb);7653 7654 SHORT_ALIGN_ZERO(offset,alignment_zero)(offset -= alignment_zero, (offset = (offset+1)&0xfffffffe
), offset += alignment_zero)
;7655 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &param_id, &param_length);7656 7657 LONG_ALIGN_ZERO(offset, alignment_zero)(offset -= alignment_zero, (offset = (offset+3)&0xfffffffc
), offset += alignment_zero)
;7658 topic_name_len = tvb_get_guint32(tvb, offset, encoding);7659 topic_name = tvb_get_string_enc(wmem_packet_scope(), tvb, offset + 4, topic_name_len, ENC_ASCII0x00000000);7660 proto_tree_add_string(topic_query_tree, hf_rtps_topic_query_topic_name, tvb, offset, topic_name_len + 4, topic_name);7661 if (topic_name != NULL((void*)0)) {7662 submessage_col_info* current_submessage_col_info = NULL((void*)0);7663 current_submessage_col_info = (submessage_col_info*)p_get_proto_data(pinfo->pool, pinfo, proto_rtps, RTPS_CURRENT_SUBMESSAGE_COL_DATA_KEY3);7664 if (current_submessage_col_info != NULL((void*)0) && current_submessage_col_info->topic_name == NULL((void*)0)) {7665 current_submessage_col_info->topic_name = wmem_strdup(pinfo->pool, topic_name);7666 }7667 }7668 7669 7670 offset = check_offset_addition(offset, param_length, tree, NULL((void*)0), tvb);7671 7672 SHORT_ALIGN_ZERO(offset,alignment_zero)(offset -= alignment_zero, (offset = (offset+1)&0xfffffffe
), offset += alignment_zero)
;7673 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &param_id, &param_length);7674 7675 rtps_util_add_generic_guid_v2(topic_query_tree, tvb, offset,7676 hf_rtps_topic_query_original_related_reader_guid,7677 hf_rtps_param_host_id, hf_rtps_param_app_id, hf_rtps_param_instance_id,7678 hf_rtps_param_entity, hf_rtps_param_entity_key, hf_rtps_param_entity_kind,7679 NULL((void*)0));7680 7681 offset = check_offset_addition(offset, param_length, tree, NULL((void*)0), tvb);7682 return offset;7683}7684 7685static gint rtps_util_add_rti_locator_reachability_service_request(proto_tree * tree,7686 packet_info *pinfo, tvbuff_t * tvb, gint offset, guint encoding) {7687 proto_tree * locator_reachability_tree, * locator_seq_tree;7688 proto_item * ti;7689 guint16 encapsulation_id, encapsulation_opt;7690 guint32 param_id, param_length, seq_length, i;7691 locator_reachability_tree = proto_tree_add_subtree(tree, tvb, offset,7692 0 /* To be defined */, ett_rtps_locator_reachability_tree, &ti, "Locator Reachability Data");7693 /* Encapsulation Id */7694 encapsulation_id = tvb_get_ntohs(tvb, offset); /* Always big endian */7695 proto_tree_add_uint(locator_reachability_tree, hf_rtps_encapsulation_id,7696 tvb, offset, 2, encapsulation_id);7697 offset += 2;7698 encoding = get_encapsulation_endianness(encapsulation_id);7699 /* Encapsulation length (or option) */7700 encapsulation_opt = tvb_get_ntohs(tvb, offset); /* Always big endian */7701 proto_tree_add_uint(locator_reachability_tree, hf_rtps_encapsulation_options, tvb,7702 offset, 2, encapsulation_opt);7703 offset += 2;7704 7705 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &param_id, &param_length);7706 7707 seq_length = tvb_get_guint32(tvb, offset, encoding);7708 locator_seq_tree = proto_tree_add_subtree_format(locator_reachability_tree, tvb, offset,7709 param_length, ett_rtps_locator_list_tree, &ti, "Locator List [Size = %u]", seq_length);7710 offset += 4;7711 for(i = 0; i < seq_length; i++) {7712 rtps_util_add_locator_t(locator_seq_tree, pinfo, tvb, offset, encoding, "Locator");7713 offset += 24;7714 }7715 return offset;7716}7717 7718static gint rtps_util_add_instance_state_request_data(proto_tree* tree, tvbuff_t* tvb,7719 gint offset, const guint encoding) {7720 proto_tree* instance_state_request_tree = NULL((void*)0);7721 proto_item* ti = NULL((void*)0);7722 /* The sum of all fields */7723 const guint instance_state_request_data_len = 8 + GUID_SIZE(16) + (4 * 3);7724 instance_state_request_tree = proto_tree_add_subtree(7725 tree,7726 tvb,7727 offset,7728 instance_state_request_data_len,7729 ett_rtps_instance_transition_data,7730 &ti,7731 "Instance State Request Data");7732 rtps_util_add_seq_number(instance_state_request_tree, tvb, offset, encoding, "seqNumber");7733 offset += 8;7734 rtps_util_add_generic_guid_v2(instance_state_request_tree, tvb, offset, hf_rtps_pgm_dst_endpoint_guid,7735 hf_rtps_param_host_id, hf_rtps_param_app_id, hf_rtps_param_instance_id,7736 hf_rtps_param_entity, hf_rtps_param_entity_key, hf_rtps_param_entity_kind,7737 NULL((void*)0));7738 offset += GUID_SIZE(16);7739 proto_tree_add_item(instance_state_request_tree, hf_rtps_writer_group_oid, tvb, offset, 4, encoding);7740 offset += 4;7741 proto_tree_add_item(instance_state_request_tree, hf_rtps_reader_group_oid, tvb, offset, 4, encoding);7742 offset += 4;7743 proto_tree_add_item(instance_state_request_tree, hf_rtps_writer_session_id, tvb, offset, 4, encoding);7744 offset += 4;7745 return offset;7746}7747 7748static gint rtps_util_add_rti_service_request(proto_tree * tree, packet_info *pinfo, tvbuff_t * tvb,7749 gint offset, const guint encoding, guint32 service_id) {7750 guint32 *service_id_copy = wmem_alloc(pinfo->pool, sizeof(guint32));7751 *service_id_copy = service_id;7752 /* This is used in append_status_info for adding the column info */7753 p_add_proto_data(pinfo->pool, pinfo, proto_rtps, RTPS_SERVICE_REQUEST_ID_PROTODATA_KEY1, (gpointer)service_id_copy);7754 switch (service_id) {7755 case RTI_SERVICE_REQUEST_ID_TOPIC_QUERY1:7756 offset = rtps_util_add_rti_topic_query_service_request(tree, pinfo, tvb, offset + 4,7757 encoding);7758 break;7759 case RTI_SERVICE_REQUEST_ID_LOCATOR_REACHABILITY2:7760 offset = rtps_util_add_rti_locator_reachability_service_request(tree, pinfo, tvb, offset + 4,7761 encoding);7762 break;7763 case RTI_SERVICE_REQUEST_ID_UNKNOWN0: {7764 guint32 seq_length;7765 seq_length = tvb_get_guint32(tvb, offset, encoding);7766 proto_tree_add_item(tree, hf_rtps_srm_request_body,7767 tvb, offset + 4, seq_length, ENC_NA0x00000000);7768 offset = check_offset_addition(offset, seq_length, tree, NULL((void*)0), tvb);7769 offset = check_offset_addition(offset, 4, tree, NULL((void*)0), tvb);7770 break;7771 }7772 case RTI_SERVICE_REQUEST_ID_INSTANCE_STATE3: {7773 /* First four after the sequence size are not needed */7774 offset += 8;7775 offset = rtps_util_add_instance_state_request_data(tree, tvb, offset, encoding);7776 break;7777 }7778 }7779 return offset;7780}7781 7782/* *********************************************************************** */7783/* * Parameter Sequence dissector * */7784/* *********************************************************************** */7785/*7786 * It returns the new offset representing the point where the parameter7787 * sequence terminates.7788 * In case of protocol error, it returns 0 (cannot determine the end of7789 * the sequence, the caller should be responsible to find the end of the7790 * section if possible or pass the error back and abort dissecting the7791 * current packet).7792 * If no error occurred, the returned value is ALWAYS > than the offset passed.7793 */7794#define ENSURE_LENGTH(size) \7795 if (param_length < size) { \7796 expert_add_info_format(pinfo, param_len_item, &ei_rtps_parameter_value_invalid, "ERROR: parameter value too small (must be at least %d octets)", size); \7797 break; \7798 }7799 7800static gboolean dissect_parameter_sequence_rti_dds(proto_tree *rtps_parameter_tree, packet_info *pinfo, tvbuff_t *tvb,7801 proto_item *parameter_item, proto_item * param_len_item, gint offset,7802 const guint encoding, int param_length, guint16 parameter, type_mapping * type_mapping_object,7803 gboolean is_inline_qos, guint vendor_id) {7804 7805 switch(parameter) {7806 7807 case PID_DATA_TAGS(0x1003):7808 ENSURE_LENGTH(4);7809 rtps_util_add_data_tags(rtps_parameter_tree, tvb, offset, encoding, param_length);7810 break;7811 7812 case PID_SAMPLE_SIGNATURE(0x8019):7813 ENSURE_LENGTH(16);7814 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_sample_signature_epoch, tvb,7815 offset, 8, encoding);7816 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_sample_signature_nonce, tvb,7817 offset+8, 4, encoding);7818 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_sample_signature_length, tvb,7819 offset+12, 4, encoding);7820 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_sample_signature_signature, tvb,7821 offset+16, param_length-16, ENC_NA0x00000000);7822 break;7823 7824 case PID_ENABLE_AUTHENTICATION(0x0078):7825 ENSURE_LENGTH(4);7826 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_enable_authentication, tvb,7827 offset, 4, ENC_NA0x00000000);7828 break;7829 7830 case PID_BUILTIN_ENDPOINT_QOS(0x0077):7831 ENSURE_LENGTH(1);7832 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_builtin_endpoint_qos, tvb,7833 offset, 1, ENC_NA0x00000000);7834 break;7835 7836 case PID_ENDPOINT_SECURITY_INFO(0x1004): {7837 guint32 flags;7838 ENSURE_LENGTH(8);7839 flags = tvb_get_guint32(tvb, offset, encoding);7840 proto_tree_add_bitmask_value(rtps_parameter_tree, tvb, offset,7841 hf_rtps_param_endpoint_security_attributes_mask, ett_rtps_flags,7842 ENDPOINT_SECURITY_INFO_FLAGS, flags);7843 flags = tvb_get_guint32(tvb, offset, encoding);7844 proto_tree_add_bitmask_value(rtps_parameter_tree, tvb, offset,7845 hf_rtps_param_plugin_endpoint_security_attributes_mask, ett_rtps_flags,7846 PLUGIN_ENDPOINT_SECURITY_INFO_FLAGS, flags);7847 break;7848 }7849 7850 case PID_PARTICIPANT_SECURITY_INFO(0x1005): {7851 guint32 flags;7852 ENSURE_LENGTH(8);7853 flags = tvb_get_guint32(tvb, offset, encoding);7854 proto_tree_add_bitmask_value(rtps_parameter_tree, tvb, offset,7855 hf_rtps_param_participant_security_attributes_mask, ett_rtps_flags,7856 PARTICIPANT_SECURITY_INFO_FLAGS, flags);7857 offset += 4;7858 flags = tvb_get_guint32(tvb, offset, encoding);7859 proto_tree_add_bitmask_value(rtps_parameter_tree, tvb, offset,7860 hf_rtps_param_plugin_participant_security_attributes_mask, ett_rtps_flags,7861 PLUGIN_PARTICIPANT_SECURITY_INFO_FLAGS, flags);7862 break;7863 }7864 7865 case PID_VENDOR_BUILTIN_ENDPOINT_SET(0x8017): {7866 guint32 flags;7867 ENSURE_LENGTH(4);7868 flags = tvb_get_guint32(tvb, offset, encoding);7869 proto_tree_add_bitmask_value(rtps_parameter_tree, tvb, offset,7870 hf_rtps_param_vendor_builtin_endpoint_set_flags, ett_rtps_flags,7871 VENDOR_BUILTIN_ENDPOINT_FLAGS, flags);7872 break;7873 }7874 /* 0...2...........7...............15.............23...............317875 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+7876 * | Unsigned long classId |7877 * +---------------+---------------+---------------+---------------+7878 * | Unsigned long uncompressedSerializedLength |7879 * +---------------+---------------+---------------+---------------+7880 * | byteSeq compressedSerializedTypeObject |7881 * +---------------+---------------+---------------+---------------+7882 * classId:7883 * value(0) RTI_OSAPI_COMPRESSION_CLASS_ID_NONE7884 * value(1) RTI_OSAPI_COMPRESSION_CLASS_ID_ZLIB7885 * value(2) RTI_OSAPI_COMPRESSION_CLASS_ID_BZIP27886 * value(-1) RTI_OSAPI_COMPRESSION_CLASS_ID_AUTO7887 */7888 case PID_TYPE_OBJECT_LB(0x8021): {7889 guint compressed_size;7890 guint decompressed_size;7891 guint compression_plugin_class;7892 tvbuff_t *compressed_type_object_subset;7893 7894 ENSURE_LENGTH(8);7895 proto_tree_add_item(rtps_parameter_tree, hf_rtps_compression_plugin_class_id, tvb, offset, 4, encoding);7896 proto_tree_add_item(rtps_parameter_tree, hf_rtps_uncompressed_serialized_length, tvb, offset + 4, 4, encoding);7897 7898 compression_plugin_class = tvb_get_guint32(tvb, offset, encoding);7899 decompressed_size = tvb_get_guint32(tvb, offset + 4, encoding);7900 /* Get the number of bytes (elements) in the sequence */7901 compressed_size = tvb_get_guint32(tvb, offset + 8, encoding);7902 7903 switch(compression_plugin_class) {7904 case RTI_OSAPI_COMPRESSION_CLASS_ID_ZLIB(1): {7905 /* + 12 Because First 4 bytes of the sequence are the number of elements in the sequence */7906 proto_tree_add_item(rtps_parameter_tree, hf_rtps_compressed_serialized_type_object, tvb, offset + 12, param_length - 8, encoding);7907 compressed_type_object_subset = tvb_new_subset_length(tvb, offset + 12, decompressed_size);7908 rtps_add_zlib_compressed_typeobject(rtps_parameter_tree, pinfo, compressed_type_object_subset,7909 0, encoding, compressed_size, decompressed_size, type_mapping_object);7910 break;7911 }7912 case RTI_OSAPI_COMPRESSION_CLASS_ID_NONE(0): {7913 compressed_type_object_subset = tvb_new_subset_length(tvb, offset + 12, decompressed_size);7914 rtps_util_add_typeobject(rtps_parameter_tree, pinfo,7915 compressed_type_object_subset, 0, encoding, decompressed_size, type_mapping_object);7916 break;7917 }7918 default: {7919 /* + 12 Because First 4 bytes of the sequence are the number of elements in the sequence */7920 proto_tree_add_item(rtps_parameter_tree, hf_rtps_compressed_serialized_type_object, tvb, offset + 12, param_length - 8, encoding);7921 }7922 }7923 break;7924 }7925 7926 case PID_ENDPOINT_SECURITY_ATTRIBUTES(0x8018): {7927 guint32 flags;7928 ENSURE_LENGTH(4);7929 flags = tvb_get_guint32(tvb, offset, encoding);7930 proto_tree_add_bitmask_value(rtps_parameter_tree, tvb, offset,7931 hf_rtps_param_endpoint_security_attributes, ett_rtps_flags,7932 ENDPOINT_SECURITY_ATTRIBUTES, flags);7933 break;7934 }7935 7936 case PID_TOPIC_QUERY_PUBLICATION(0x8014): {7937 ENSURE_LENGTH(8);7938 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_topic_query_publication_enable,7939 tvb, offset, 1, encoding);7940 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_topic_query_publication_sessions,7941 tvb, offset+4, 4, encoding);7942 break;7943 }7944 7945 case PID_ENDPOINT_PROPERTY_CHANGE_EPOCH(0x8015): {7946 ENSURE_LENGTH(8);7947 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_endpoint_property_change_epoch,7948 tvb, offset, 8, encoding);7949 break;7950 }7951 7952 case PID_TOPIC_QUERY_GUID(0x8013):7953 if (is_inline_qos) {7954 ENSURE_LENGTH(16);7955 rtps_util_add_generic_guid_v2(rtps_parameter_tree, tvb, offset,7956 hf_rtps_endpoint_guid, hf_rtps_param_host_id, hf_rtps_param_app_id,7957 hf_rtps_param_instance_id, hf_rtps_param_entity, hf_rtps_param_entity_key,7958 hf_rtps_param_entity_kind, NULL((void*)0));7959 }7960 break;7961 7962 case PID_REACHABILITY_LEASE_DURATION(0x8016):7963 ENSURE_LENGTH(8);7964 rtps_util_add_timestamp_sec_and_fraction(rtps_parameter_tree, tvb, offset, encoding,7965 hf_rtps_participant_lease_duration);7966 break;7967 7968 case PID_RELATED_SOURCE_GUID(0x8012): {7969 ENSURE_LENGTH(16);7970 /* PID_RELATED_SOURCE_GUID */7971 rtps_util_add_generic_guid_v2(rtps_parameter_tree, tvb, offset,7972 hf_rtps_endpoint_guid, hf_rtps_param_host_id, hf_rtps_param_app_id,7973 hf_rtps_param_instance_id, hf_rtps_param_entity, hf_rtps_param_entity_key,7974 hf_rtps_param_entity_kind, NULL((void*)0));7975 break;7976 }7977 /* 0...2...........7...............15.............23...............317978 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+7979 * | PID_TRANSPORT_INFO_LIST | length |7980 * +---------------+---------------+---------------+---------------+7981 * | unsigned long Seq.Length |7982 * +---------------+---------------+---------------+---------------+7983 * | ... |7984 * | TransportInfo 1 |7985 * | ... |7986 * +---------------+---------------+---------------+---------------+7987 * | ... |7988 * | TransportInfo 2 |7989 * | ... |7990 * +---------------+---------------+---------------+---------------+7991 * | ... |7992 * | TransportInfo n |7993 * | ... |7994 * +---------------+---------------+---------------+---------------+7995 *7996 * IDL:7997 * struct TRANSPORT_INFO {7998 * long classid;7999 * long messageSizeMax;8000 * };8001 *8002 * struct TRANSPORT_INFO_LIST {8003 * Sequence<TRANSPORT_INFO> TransportInfoList;8004 * };8005 *8006 */8007 /* PID_RELATED_READER_GUID and PID_TRANSPORT_INFO_LIST have the same value */8008 case PID_TRANSPORT_INFO_LIST(0x8010): {8009 if (is_inline_qos) {8010 ENSURE_LENGTH(16);8011 /* PID_RELATED_READER_GUID */8012 rtps_util_add_generic_guid_v2(rtps_parameter_tree, tvb, offset,8013 hf_rtps_endpoint_guid, hf_rtps_param_host_id, hf_rtps_param_app_id,8014 hf_rtps_param_instance_id, hf_rtps_param_entity, hf_rtps_param_entity_key,8015 hf_rtps_param_entity_kind, NULL((void*)0));8016 } else {8017 ENSURE_LENGTH(4);8018 {8019 int i;8020 guint32 temp_offset;8021 guint32 seq_size = tvb_get_guint32(tvb, offset, encoding);8022 if (seq_size > 0) {8023 temp_offset = offset+4; /* move to first transportInfo */8024 i = 1;8025 while(seq_size-- > 0) {8026 rtps_util_add_transport_info(rtps_parameter_tree, tvb, temp_offset, encoding, i);8027 temp_offset += 8;8028 ++i;8029 }8030 }8031 }8032 }8033 break;8034 }8035 8036 /* PID_DIRECT_COMMUNICATION and PID_SOURCE_GUID have the same value */8037 case PID_DIRECT_COMMUNICATION(0x8011): {8038 if (is_inline_qos) {8039 ENSURE_LENGTH(16);8040 /* PID_SOURCE_GUID */8041 rtps_util_add_generic_guid_v2(rtps_parameter_tree, tvb, offset,8042 hf_rtps_endpoint_guid, hf_rtps_param_host_id, hf_rtps_param_app_id,8043 hf_rtps_param_instance_id, hf_rtps_param_entity, hf_rtps_param_entity_key,8044 hf_rtps_param_entity_kind, NULL((void*)0));8045 } else {8046 proto_tree_add_item(rtps_parameter_tree, hf_rtps_direct_communication, tvb, offset, 1, ENC_NA0x00000000 );8047 }8048 break;8049 }8050 8051 /* Product Version Version 5.3.1 and earlier8052 * 0...2...........7...............15.............23...............318053 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+8054 * | PID_TYPE_CONSISTENCY_KIND | length |8055 * +---------------+---------------+---------------+---------------+8056 * | unsigned short value Kind | = = u n u s e d = = = = = = |8057 * +---------------+---------------+---------------+---------------+8058 *8059 * Product Version 5.3.3 and later8060 * 0...2...........7...............15.............23...............318061 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+8062 * | PID_TYPE_CONSISTENCY_KIND | length |8063 * +---------------+---------------+---------------+---------------+8064 * | unsigned short value Kind | Boolean ISeqB | Boolean IStrB |8065 * +---------------+---------------+---------------+---------------+8066 * | Boolean IMemN | Boolean PTypW | Boolean FtypV | Boolean IEnLN |8067 * +---------------+---------------+---------------+---------------+8068 * ISeqB = Ignore Sequence Names8069 * IStrB = Ignore String names8070 * IMemN = Ignore Member Names8071 * PTypW = Prevent Type Widening8072 * FtypV = Force Type Validation8073 * IEnLN = Ignore Enum Literal Names8074 */8075 case PID_TYPE_CONSISTENCY(0x0074): {8076 if (param_length !=4 && param_length !=8) {8077 expert_add_info_format(pinfo, rtps_parameter_tree,8078 &ei_rtps_pid_type_csonsistency_invalid_size,8079 "PID_TYPE_CONSISTENCY invalid size. It has a size of %d bytes. Expected %d or %d bytes.",8080 param_length, 4, 8);8081 break;8082 }8083 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_type_consistency_kind, tvb, offset, 2, encoding);8084 /* Parameter size can be used as a discriminator between product versions. */8085 if (param_length == 8) {8086 offset += 2;8087 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_ignore_sequence_bounds,8088 tvb, offset, 1, encoding);8089 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_ignore_string_bounds,8090 tvb, offset + 1, 1, encoding);8091 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_ignore_member_names,8092 tvb, offset + 2, 1, encoding);8093 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_prevent_type_widening,8094 tvb, offset + 3, 1, encoding);8095 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_force_type_validation,8096 tvb, offset + 4, 1, encoding);8097 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_ignore_enum_literal_names,8098 tvb, offset + 5, 1, encoding);8099 }8100 break;8101 }8102 8103 /* ==================================================================8104 * Here are all the deprecated items.8105 */8106 8107 /* 0...2...........7...............15.............23...............318108 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+8109 * | PID_PRODUCT_VERSION | length |8110 * +---------------+---------------+---------------+---------------+8111 * | uint8 major | uint8 minor | uint8 release |uint8 revision |8112 * +---------------+---------------+---------------+---------------+8113 */8114 case PID_PRODUCT_VERSION(0x8000): {8115 ENSURE_LENGTH(4);8116 rtps_util_add_product_version(rtps_parameter_tree, tvb, offset, vendor_id);8117 break;8118 }8119 8120 /* 0...2...........7...............15.............23...............318121 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+8122 * | PID_PLUGIN_PROMISCUITY_KIND | length |8123 * +---------------+---------------+---------------+---------------+8124 * | short value | |8125 * +---------------+---------------+---------------+---------------+8126 */8127 case PID_PLUGIN_PROMISCUITY_KIND(0x8001): {8128 ENSURE_LENGTH(4);8129 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_plugin_promiscuity_kind, tvb, offset, 4, encoding);8130 break;8131 }8132 /* 0...2...........7...............15.............23...............318133 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+8134 * | PID_ENTITY_VIRTUAL_GUID | length |8135 * +---------------+---------------+---------------+---------------+8136 * | |8137 * +- -+8138 * | octet[12] guidPrefix |8139 * +- -+8140 * | |8141 * +---------------+---------------+---------------+---------------+8142 * | octet[4] entityId |8143 * +---------------+---------------+---------------+---------------+8144 */8145 8146 case PID_ENTITY_VIRTUAL_GUID(0x8002): {8147 ENSURE_LENGTH(16);8148 rtps_util_add_guid_prefix_v2(rtps_parameter_tree, tvb, offset,8149 hf_rtps_sm_guid_prefix, hf_rtps_sm_host_id, hf_rtps_sm_app_id,8150 hf_rtps_sm_instance_id, 0);8151 rtps_util_add_entity_id(rtps_parameter_tree, tvb, offset+12,8152 hf_rtps_sm_entity_id, hf_rtps_sm_entity_id_key, hf_rtps_sm_entity_id_kind,8153 ett_rtps_entity, "virtualGUIDSuffix", NULL((void*)0));8154 break;8155 }8156 8157 8158 /* 0...2...........7...............15.............23...............318159 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+8160 * | PID_SERVICE_KIND | length |8161 * +---------------+---------------+---------------+---------------+8162 * | long value |8163 * +---------------+---------------+---------------+---------------+8164 */8165 case PID_SERVICE_KIND(0x8003): {8166 ENSURE_LENGTH(4);8167 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_service_kind, tvb, offset, 4, encoding);8168 break;8169 }8170 8171 8172 case PID_ROLE_NAME(0x800a): {8173 rtps_util_add_string(rtps_parameter_tree, tvb, offset, hf_rtps_param_role_name, encoding);8174 break;8175 }8176 8177 8178 case PID_ACK_KIND(0x800b): {8179 ENSURE_LENGTH(4);8180 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_acknowledgment_kind, tvb, offset, 4, encoding);8181 break;8182 }8183 8184 /* 0...2...........7...............15.............23...............318185 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+8186 * | PID_PEER_HOST_EPOCH | length |8187 * +---------------+---------------+---------------+---------------+8188 * | unsigned long epoch |8189 * +---------------+---------------+---------------+---------------+8190 */8191 case PID_PEER_HOST_EPOCH(0x800e): {8192 ENSURE_LENGTH(4);8193 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_peer_host_epoch, tvb, offset, 4, encoding);8194 break;8195 }8196 8197 /* 0...2...........7...............15.............23...............318198 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+8199 * | PID_DOMAIN_ID|PID_RTI_DOMAIN_ID| length |8200 * +---------------+---------------+---------------+---------------+8201 * | long domain_id |8202 * +---------------+---------------+---------------+---------------+8203 */8204 8205 case PID_RTI_DOMAIN_ID(0x800f):8206 case PID_DOMAIN_ID(0x000f): {8207 if (is_inline_qos) { /* PID_RELATED_ORIGINAL_WRITER_INFO */8208 ENSURE_LENGTH(16);8209 rtps_util_add_guid_prefix_v2(rtps_parameter_tree, tvb, offset, hf_rtps_sm_guid_prefix,8210 hf_rtps_sm_host_id, hf_rtps_sm_app_id, hf_rtps_sm_instance_id, 0);8211 rtps_util_add_entity_id(rtps_parameter_tree, tvb, offset+12, hf_rtps_sm_entity_id,8212 hf_rtps_sm_entity_id_key, hf_rtps_sm_entity_id_kind, ett_rtps_entity,8213 "virtualGUIDSuffix", NULL((void*)0));8214 /* Sequence number */8215 rtps_util_add_seq_number(rtps_parameter_tree, tvb, offset+16,8216 encoding, "virtualSeqNumber");8217 } else {8218 ENSURE_LENGTH(4);8219 proto_tree_add_item(rtps_parameter_tree, hf_rtps_domain_id, tvb, offset, 4, encoding);8220 8221 /* Each packet stores its participant guid in the private table. This is done in dissect_rtps */8222 endpoint_guid *participant_guid = (endpoint_guid*)p_get_proto_data(pinfo->pool, pinfo, proto_rtps, RTPS_TCPMAP_DOMAIN_ID_PROTODATA_KEY0);8223 if (participant_guid != NULL((void*)0)) {8224 /* Since this information is fixed there is no need to update in a second pass */8225 if (!wmem_map_contains(discovered_participants_domain_ids, participant_guid)) {8226 gint domainId = tvb_get_gint32(tvb, offset, encoding);8227 participant_info *p_info = (participant_info*)wmem_new(wmem_file_scope(), participant_info)((participant_info*)wmem_alloc((wmem_file_scope()), sizeof(participant_info
)))
;8228 p_info->domainId = domainId;8229 endpoint_guid *participant_guid_copy = (endpoint_guid*)wmem_memdup(wmem_file_scope(),8230 participant_guid, sizeof(endpoint_guid));8231 wmem_map_insert(discovered_participants_domain_ids,8232 (const void*)participant_guid_copy, (void*)p_info);8233 }8234 }8235 }8236 break;8237 }8238 8239 /* 0...2...........7...............15.............23...............318240 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+8241 * | PID_DOMAIN_TAG | length |8242 * +---------------+---------------+---------------+---------------+8243 * | long domain_tag.Length |8244 * +---------------+---------------+---------------+---------------+8245 * | string domain_tag |8246 * | ... |8247 * +---------------+---------------+---------------+---------------+8248 */8249 case PID_DOMAIN_TAG(0x4014): {8250 ENSURE_LENGTH(4);8251 rtps_util_add_string(rtps_parameter_tree, tvb, offset, hf_rtps_domain_tag, encoding);8252 break;8253 }8254 8255 case PID_EXTENDED(0x3f01): {8256 ENSURE_LENGTH(8);8257 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_extended_parameter, tvb, offset, 4, encoding);8258 offset += 4;8259 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_extended_pid_length, tvb, offset, 4, encoding);8260 break;8261 }8262 8263 case PID_TYPE_OBJECT(0x0072): {8264 rtps_util_add_typeobject(rtps_parameter_tree, pinfo, tvb,8265 offset, encoding, param_length, type_mapping_object);8266 break;8267 }8268 8269 /* 0...2...........7...............15.............23...............318270 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+8271 * | PID_TYPECODE_RTPS2 | length |8272 * +---------------+---------------+---------------+---------------+8273 * | |8274 * + Type code description +8275 * | |8276 * +---------------+---------------+---------------+---------------+8277 */8278 case PID_TYPECODE(0x47):8279 case PID_TYPECODE_RTPS2(0x8004): {8280 rtps_util_add_typecode(rtps_parameter_tree,8281 tvb,8282 pinfo,8283 offset,8284 encoding,8285 0, /* indent level */8286 0, /* isPointer */8287 -1, /* bitfield */8288 0, /* isKey */8289 offset,8290 NULL((void*)0), /* name */8291 -1, /* not a seq field */8292 NULL((void*)0), /* not an array */8293 0); /* ndds 4.0 hack: init to false */8294 break;8295 }8296 8297 /* 0...2...........7...............15.............23...............318298 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+8299 * | PID_DISABLE_POSITIVE_ACKS | length |8300 * +---------------+---------------+---------------+---------------+8301 * | boolean value | = = = = = = = = u n u s e d = = = = = = = = |8302 * +---------------+---------------+---------------+---------------+8303 */8304 case PID_DISABLE_POSITIVE_ACKS(0x8005): {8305 ENSURE_LENGTH(1);8306 proto_tree_add_item(rtps_parameter_tree, hf_rtps_disable_positive_ack, tvb, offset, 1, ENC_NA0x00000000 );8307 break;8308 }8309 8310 /* 0...2...........7...............15.............23...............318311 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+8312 * | PID_EXPECTS_VIRTUAL_HB | length |8313 * +---------------+---------------+---------------+---------------+8314 * | boolean value | = = = = = = = = u n u s e d = = = = = = = = |8315 * +---------------+---------------+---------------+---------------+8316 */8317 case PID_EXPECTS_VIRTUAL_HB(0x8009): {8318 ENSURE_LENGTH(1);8319 proto_tree_add_item(rtps_parameter_tree, hf_rtps_expects_virtual_heartbeat, tvb, offset, 1, ENC_NA0x00000000 );8320 break;8321 }8322 8323 /* 0...2...........7...............15.............23...............318324 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+8325 * | PID_LOCATOR_FILTER_LIST | length |8326 * +---------------+---------------+---------------+---------------+8327 * | unsigned long number_of_channels |8328 * +---------------+---------------+---------------+---------------+8329 * | |8330 * ~ String filter_name ~8331 * | |8332 * +---------------+---------------+---------------+---------------+8333 * | |8334 * ~ LocatorList ~ <----------+8335 * | | Repeat |8336 * +---------------+---------------+---------------+---------------+ For each|8337 * | | Channel |8338 * ~ String filter_expression ~ |8339 * | | |8340 * +---------------+---------------+---------------+---------------+ <----------+8341 */8342 case PID_LOCATOR_FILTER_LIST(0x8006): {8343 gint32 number_of_channels, ch;8344 proto_tree *channel_tree;8345 proto_item *ti_channel;8346 char temp_buff[20];8347 gint old_offset;8348 guint32 off = offset;8349 8350 ENSURE_LENGTH(4);8351 proto_tree_add_item_ret_int(rtps_parameter_tree, hf_rtps_locator_filter_list_num_channels, tvb, off, 4, encoding, &number_of_channels );8352 proto_item_append_text(parameter_item, " (%d channels)", number_of_channels );8353 off += 4;8354 8355 if (number_of_channels == 0) {8356 /* Do not dissect the rest */8357 break;8358 }8359 8360 /* filter name */8361 off = rtps_util_add_string(rtps_parameter_tree, tvb, off, hf_rtps_locator_filter_list_filter_name, encoding);8362 8363 /* Foreach channel... */8364 for (ch = 0; ch < number_of_channels; ++ch) {8365 snprintf(temp_buff, 20, "Channel[%u]", ch);8366 old_offset = off;8367 channel_tree = proto_tree_add_subtree_format(rtps_parameter_tree, tvb, off, 0, ett_rtps_locator_filter_channel, &ti_channel, "Channel[%u]", ch);8368 8369 off = rtps_util_add_multichannel_locator_list(channel_tree, pinfo, tvb, off, temp_buff, encoding);8370 /* Filter expression */8371 off = rtps_util_add_string(rtps_parameter_tree, tvb, off, hf_rtps_locator_filter_list_filter_exp, encoding);8372 8373 /* Now we know the length of the channel data, set the length */8374 proto_item_set_len(ti_channel, (off - old_offset));8375 } /* End of for each channel */8376 break;8377 }/* End of case PID_LOCATOR_FILTER_LIST */8378 8379 /* 0...2...........7...............15.............23...............318380 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+8381 * | PID_UNICAST_LOCATOR_EX | 0x8007 |8382 * +---------------+---------------+---------------+---------------+8383 * | long kind |8384 * +---------------+---------------+---------------+---------------+8385 * | long port |8386 * +---------------+---------------+---------------+---------------+8387 * | ipv6addr[0] | ipv6addr[1] | ipv6addr[2] | ipv6addr[3] |8388 * +---------------+---------------+---------------+---------------+8389 * | ipv6addr[4] | ipv6addr[5] | ipv6addr[6] | ipv6addr[7] |8390 * +---------------+---------------+---------------+---------------+8391 * | ipv6addr[8] | ipv6addr[9] | ipv6addr[10] | ipv6addr[11] |8392 * +---------------+---------------+---------------+---------------+8393 * | ipv6addr[12] | ipv6addr[13] | ipv6addr[14] | ipv6addr[15] |8394 * +---------------+---------------+---------------+---------------+8395 * | Locator Sequence Length |8396 * +---------------+---------------+---------------+---------------+8397 * | Locator 1 | Locator 2 |8398 * +---------------+---------------+---------------+---------------+8399 */8400 case PID_UNICAST_LOCATOR_EX(0x8007): {8401 ENSURE_LENGTH(28);8402 rtps_util_add_locator_ex_t(rtps_parameter_tree, pinfo, tvb, offset, encoding, param_length);8403 break;8404 }8405 8406 case PID_ENDPOINT_SECURITY_SYMMETRIC_CIPHER_ALGO(0x1013): {8407 ENSURE_LENGTH(4);8408 proto_tree_add_bitmask(8409 rtps_parameter_tree,8410 tvb,8411 offset,8412 hf_rtps_param_participant_security_symmetric_cipher_algorithms_builtin_endpoints_required_mask,8413 ett_rtps_flags,8414 SECURITY_SIMMETRIC_CIPHER_MASK_FLAGS,8415 encoding);8416 8417 break;8418 }8419 8420 case PID_PARTICIPANT_SECURITY_SYMMETRIC_CIPHER_ALGO(0x1012): {8421 ENSURE_LENGTH(12);8422 proto_tree_add_bitmask(8423 rtps_parameter_tree,8424 tvb,8425 offset,8426 hf_rtps_param_participant_security_symmetric_cipher_algorithms_supported_mask,8427 ett_rtps_flags,8428 SECURITY_SIMMETRIC_CIPHER_MASK_FLAGS,8429 encoding);8430 offset += 4;8431 proto_tree_add_bitmask(8432 rtps_parameter_tree,8433 tvb,8434 offset,8435 hf_rtps_param_participant_security_symmetric_cipher_algorithms_builtin_endpoints_required_mask,8436 ett_rtps_flags,8437 SECURITY_SIMMETRIC_CIPHER_MASK_FLAGS,8438 encoding);8439 offset += 4;8440 proto_tree_add_bitmask(8441 rtps_parameter_tree,8442 tvb,8443 offset,8444 hf_rtps_param_participant_security_symmetric_cipher_algorithms_builtin_endpoints_key_exchange_used_bit,8445 ett_rtps_flags,8446 SECURITY_SIMMETRIC_CIPHER_MASK_FLAGS,8447 encoding);8448 break;8449 }8450 8451 case PID_PARTICIPANT_SECURITY_KEY_ESTABLISHMENT_ALGO(0x1011): {8452 ENSURE_LENGTH(8);8453 proto_tree *sub_tree = proto_tree_add_subtree(rtps_parameter_tree, tvb, offset, 4,8454 ett_rtps_crypto_algorithm_requirements, NULL((void*)0), "Shared Secret");8455 dissect_crypto_algorithm_requirements(sub_tree, tvb, offset,8456 encoding, SECURITY_KEY_ESTABLISHMENT_MASK_FLAGS);8457 break;8458 }8459 8460 case PID_PARTICIPANT_SECURITY_DIGITAL_SIGNATURE_ALGO(0x1010): {8461 ENSURE_LENGTH(16);8462 proto_tree *sub_tree = proto_tree_add_subtree(rtps_parameter_tree, tvb, offset, 4,8463 ett_rtps_crypto_algorithm_requirements, NULL((void*)0), "Trust Chain");8464 offset = dissect_crypto_algorithm_requirements(sub_tree, tvb, offset,8465 encoding, SECURITY_DIGITAL_SIGNATURE_MASK_FLAGS);8466 sub_tree = proto_tree_add_subtree(rtps_parameter_tree, tvb, offset, 4,8467 ett_rtps_crypto_algorithm_requirements, NULL((void*)0), "Message Authentication");8468 dissect_crypto_algorithm_requirements(sub_tree, tvb, offset,8469 encoding, SECURITY_DIGITAL_SIGNATURE_MASK_FLAGS);8470 break;8471 }8472 8473 default: {8474 return FALSE(0);8475 }8476 }/* End of switch for parameters for vendor RTI */8477 return TRUE(!(0));8478}8479 8480static gboolean dissect_parameter_sequence_toc(proto_tree *rtps_parameter_tree, packet_info *pinfo _U___attribute__((unused)),8481 tvbuff_t *tvb, proto_item *parameter_item _U___attribute__((unused)), proto_item *param_len_item _U___attribute__((unused)), gint offset,8482 const guint encoding, int param_length _U___attribute__((unused)),8483 guint16 parameter) {8484 8485 switch(parameter) {8486 8487 /* 0...2...........7...............15.............23...............318488 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+8489 * | PID_TYPECODE_RTPS2 | length |8490 * +---------------+---------------+---------------+---------------+8491 * | |8492 * + Type code description +8493 * | |8494 * +---------------+---------------+---------------+---------------+8495 */8496 case PID_TYPECODE_RTPS2(0x8004): {8497 rtps_util_add_typecode(rtps_parameter_tree,8498 tvb,8499 pinfo,8500 offset,8501 encoding,8502 0, /* indent level */8503 0, /* isPointer */8504 -1, /* bitfield */8505 0, /* isKey */8506 offset,8507 NULL((void*)0), /* name */8508 0, /* not a seq field */8509 NULL((void*)0), /* not an array */8510 0); /* ndds 4.0 hack: init to false */8511 break;8512 }8513 8514 default:8515 return FALSE(0);8516 }8517 return TRUE(!(0));8518}8519 8520static gboolean dissect_parameter_sequence_adl(proto_tree *rtps_parameter_tree _U___attribute__((unused)), packet_info *pinfo _U___attribute__((unused)),8521 tvbuff_t *tvb _U___attribute__((unused)), proto_item *parameter_item _U___attribute__((unused)), proto_item *param_len_item _U___attribute__((unused)), gint offset _U___attribute__((unused)),8522 const guint encoding _U___attribute__((unused)), int param_length _U___attribute__((unused)),8523 guint16 parameter) {8524 8525 switch(parameter) {8526 8527 case PID_ADLINK_WRITER_INFO(0x8001): {8528 break;8529 }8530 case PID_ADLINK_READER_DATA_LIFECYCLE(0x8002): {8531 break;8532 }8533 case PID_ADLINK_WRITER_DATA_LIFECYCLE(0x8003): {8534 break;8535 }8536 case PID_ADLINK_ENDPOINT_GUID(0x8004): {8537 break;8538 }8539 case PID_ADLINK_SYNCHRONOUS_ENDPOINT(0x8005): {8540 break;8541 }8542 case PID_ADLINK_RELAXED_QOS_MATCHING(0x8006): {8543 break;8544 }8545 case PID_ADLINK_PARTICIPANT_VERSION_INFO(0x8007): {8546 break;8547 }8548 case PID_ADLINK_NODE_NAME(0x8008): {8549 break;8550 }8551 case PID_ADLINK_EXEC_NAME(0x8009): {8552 break;8553 }8554 case PID_ADLINK_PROCESS_ID(0x800a): {8555 break;8556 }8557 case PID_ADLINK_SERVICE_TYPE(0x800b): {8558 break;8559 }8560 case PID_ADLINK_ENTITY_FACTORY(0x800c): {8561 break;8562 }8563 case PID_ADLINK_WATCHDOG_SCHEDULING(0x800d): {8564 break;8565 }8566 case PID_ADLINK_LISTENER_SCHEDULING(0x800e): {8567 break;8568 }8569 case PID_ADLINK_SUBSCRIPTION_KEYS(0x800f): {8570 break;8571 }8572 case PID_ADLINK_READER_LIFESPAN(0x8010): {8573 break;8574 }8575 case PID_ADLINK_SHARE(0x8011): {8576 break;8577 }8578 case PID_ADLINK_TYPE_DESCRIPTION(0x8012): {8579 break;8580 }8581 case PID_ADLINK_LAN_ID(0x8013): {8582 break;8583 }8584 case PID_ADLINK_ENDPOINT_GID(0x8014): {8585 break;8586 }8587 case PID_ADLINK_GROUP_GID(0x8015): {8588 break;8589 }8590 case PID_ADLINK_EOTINFO(0x8016): {8591 break;8592 }8593 case PID_ADLINK_PART_CERT_NAME(0x8017): {8594 break;8595 }8596 case PID_ADLINK_LAN_CERT_NAME(0x8018): {8597 break;8598 }8599 default:8600 return FALSE(0);8601 }8602 return TRUE(!(0));8603}8604 8605 8606static gboolean dissect_parameter_sequence_v1(proto_tree *rtps_parameter_tree, packet_info *pinfo, tvbuff_t *tvb,8607 proto_item *parameter_item, proto_item * param_len_item, gint offset,8608 const guint encoding, int size, int param_length,8609 guint16 parameter, guint16 version, type_mapping * type_mapping_object,8610 coherent_set_entity_info *coherent_set_entity_info_object) {8611 8612 proto_tree *subtree;8613 8614 switch(parameter) {8615 8616 /* 0...2...........7...............15.............23...............318617 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+8618 * | PID_PARTICIPANT_LEASE_DURATION| 0x0008 |8619 * +---------------+---------------+---------------+---------------+8620 * | long NtpTime.seconds |8621 * +---------------+---------------+---------------+---------------+8622 * | unsigned long NtpTime.fraction |8623 * +---------------+---------------+---------------+---------------+8624 */8625 case PID_PARTICIPANT_LEASE_DURATION(0x02):8626 ENSURE_LENGTH(8);8627 rtps_util_add_timestamp_sec_and_fraction(rtps_parameter_tree, tvb, offset, encoding,8628 hf_rtps_participant_lease_duration);8629 break;8630 8631 8632 /* 0...2...........7...............15.............23...............318633 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+8634 * | PID_TIME_BASED_FILTER | 0x0008 |8635 * +---------------+---------------+---------------+---------------+8636 * | long NtpTime.seconds |8637 * +---------------+---------------+---------------+---------------+8638 * | unsigned long NtpTime.fraction |8639 * +---------------+---------------+---------------+---------------+8640 */8641 case PID_TIME_BASED_FILTER(0x04):8642 ENSURE_LENGTH(8);8643 rtps_util_add_timestamp_sec_and_fraction(rtps_parameter_tree, tvb, offset, encoding,8644 hf_rtps_time_based_filter_minimum_separation);8645 break;8646 8647 /* 0...2...........7...............15.............23...............318648 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+8649 * | PID_TOPIC_NAME | length |8650 * +---------------+---------------+---------------+---------------+8651 * | unsigned long String.length |8652 * +---------------+---------------+---------------+---------------+8653 * | str[0] | str[1] | str[2] | str[3] |8654 * +---------------+---------------+---------------+---------------+8655 * | ... |8656 * +---------------+---------------+---------------+---------------+8657 */8658 case PID_TOPIC_NAME(0x05): {8659 const gchar * retVal = NULL((void*)0);8660 guint32 str_size = tvb_get_guint32(tvb, offset, encoding);8661 8662 retVal = (gchar*)tvb_get_string_enc(wmem_packet_scope(), tvb, offset+4, str_size, ENC_ASCII0x00000000);8663 rtps_util_add_string(rtps_parameter_tree, tvb, offset, hf_rtps_param_topic_name, encoding);8664 /* If topic information is enabled we have to store the topic name for showing after the DATA(r|w)8665 * in the infor column. This information is used in append_status_info function.8666 */8667 if (retVal != NULL((void*)0) && enable_topic_info) {8668 submessage_col_info* current_submessage_col_info = NULL((void*)0);8669 8670 rtps_util_store_type_mapping(pinfo, tvb, offset, type_mapping_object, retVal, TOPIC_INFO_ADD_TOPIC_NAME(0x04));8671 /* retVal has packet scope lifetime, enough for adding to the DATA(r|w) column information */8672 current_submessage_col_info = (submessage_col_info*)p_get_proto_data(pinfo->pool, pinfo, proto_rtps, RTPS_CURRENT_SUBMESSAGE_COL_DATA_KEY3);8673 if (current_submessage_col_info != NULL((void*)0) && current_submessage_col_info->topic_name == NULL((void*)0)) {8674 current_submessage_col_info->topic_name = retVal;8675 }8676 }8677 break;8678 }8679 8680 /* 0...2...........7...............15.............23...............318681 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+8682 * | PID_OWNERSHIP_STRENGTH | 0x0004 |8683 * +---------------+---------------+---------------+---------------+8684 * | long strength |8685 * +---------------+---------------+---------------+---------------+8686 */8687 case PID_OWNERSHIP_STRENGTH(0x06):8688 ENSURE_LENGTH(4);8689 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_strength, tvb, offset, 4, encoding);8690 break;8691 8692 /* 0...2...........7...............15.............23...............318693 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+8694 * | PID_TYPE_NAME | length |8695 * +---------------+---------------+---------------+---------------+8696 * | unsigned long String.length |8697 * +---------------+---------------+---------------+---------------+8698 * | str[0] | str[1] | str[2] | str[3] |8699 * +---------------+---------------+---------------+---------------+8700 * | ... |8701 * +---------------+---------------+---------------+---------------+8702 */8703 case PID_TYPE_NAME(0x07): {8704 const gchar * retVal = NULL((void*)0);8705 guint32 str_size = tvb_get_guint32(tvb, offset, encoding);8706 8707 retVal = (gchar*) tvb_get_string_enc(wmem_packet_scope(), tvb, offset+4, str_size, ENC_ASCII0x00000000);8708 8709 rtps_util_store_type_mapping(pinfo, tvb, offset, type_mapping_object,8710 retVal, TOPIC_INFO_ADD_TYPE_NAME(0x02));8711 8712 rtps_util_add_string(rtps_parameter_tree, tvb, offset, hf_rtps_param_type_name, encoding);8713 break;8714 }8715 8716 /* 0...2...........7...............15.............23...............318717 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+8718 * | PID_XXXXXXXXXXX | 0x0004 |8719 * +---------------+---------------+---------------+---------------+8720 * | long port |8721 * +---------------+---------------+---------------+---------------+8722 */8723 case PID_METATRAFFIC_MULTICAST_PORT(0x46):8724 case PID_METATRAFFIC_UNICAST_PORT(0x0d):8725 case PID_DEFAULT_UNICAST_PORT(0x0e):8726 ENSURE_LENGTH(4);8727 rtps_util_add_port(rtps_parameter_tree, pinfo, tvb, offset, encoding, hf_rtps_param_port);8728 break;8729 8730 /* 0...2...........7...............15.............23...............318731 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+8732 * | PID_EXPECTS_INLINE_QOS | 0x0004 |8733 * +---------------+---------------+---------------+---------------+8734 * | boolean | N O T U S E D |8735 * +---------------+---------------+---------------+---------------+8736 */8737 case PID_EXPECTS_INLINE_QOS(0x43):8738 ENSURE_LENGTH(1);8739 proto_tree_add_item(rtps_parameter_tree, hf_rtps_expects_inline_qos, tvb, offset, 1, ENC_NA0x00000000 );8740 break;8741 8742 /* 0...2...........7...............15.............23...............318743 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+8744 * | PID_XXXXXXXXXXX | length |8745 * +---------------+---------------+---------------+---------------+8746 * | unsigned long ip_address |8747 * +---------------+---------------+---------------+---------------+8748 */8749 case PID_METATRAFFIC_MULTICAST_IPADDRESS(0x0b):8750 case PID_DEFAULT_UNICAST_IPADDRESS(0x0c):8751 case PID_MULTICAST_IPADDRESS(0x11):8752 case PID_METATRAFFIC_UNICAST_IPADDRESS(0x45):8753 rtps_util_add_ipv4_address_t(rtps_parameter_tree, pinfo, tvb, offset,8754 encoding, hf_param_ip_address);8755 break;8756 8757 /* 0...2...........7...............15.............23...............318758 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+8759 * | PID_PROTOCOL_VERSION | 0x0004 |8760 * +---------------+---------------+---------------+---------------+8761 * | uint8 major | uint8 minor | N O T U S E D |8762 * +---------------+---------------+---------------+---------------+8763 */8764 case PID_PROTOCOL_VERSION(0x15):8765 ENSURE_LENGTH(2);8766 rtps_util_add_protocol_version(rtps_parameter_tree, tvb, offset);8767 break;8768 8769 /* 0...2...........7...............15.............23...............318770 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+8771 * | PID_VENDOR_ID | 0x0004 |8772 * +---------------+---------------+---------------+---------------+8773 * | uint8 major | uint8 minor | N O T U S E D |8774 * +---------------+---------------+---------------+---------------+8775 */8776 case PID_VENDOR_ID(0x16):8777 ENSURE_LENGTH(2);8778 rtps_util_add_vendor_id(rtps_parameter_tree, tvb, offset);8779 break;8780 8781 /* 0...2...........7...............15.............23...............318782 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+8783 * | PID_RELIABILITY | 0x0004 |8784 * +---------------+---------------+---------------+---------------+8785 * | unsigned long kind |8786 * +---------------+---------------+---------------+---------------+8787 */8788 case PID_RELIABILITY_OFFERED(0x19): /* Deprecated */8789 case PID_RELIABILITY(0x1a):8790 ENSURE_LENGTH(4);8791 proto_tree_add_item(rtps_parameter_tree, hf_rtps_reliability_kind, tvb, offset, 4, encoding);8792 /* Older version of the protocol (and for PID_RELIABILITY_OFFERED)8793 * this parameter was carrying also a NtpTime called8794 * 'maxBlockingTime'.8795 */8796 if (size == 12) {8797 rtps_util_add_timestamp(rtps_parameter_tree, tvb, offset + 4,8798 encoding, hf_rtps_reliability_max_blocking_time);8799 }8800 break;8801 8802 /* 0...2...........7...............15.............23...............318803 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+8804 * | PID_LIVELINESS | 0x000c |8805 * +---------------+---------------+---------------+---------------+8806 * | unsigned long kind |8807 * +---------------+---------------+---------------+---------------+8808 * | long NtpTime.seconds |8809 * +---------------+---------------+---------------+---------------+8810 * | unsigned long NtpTime.fraction |8811 * +---------------+---------------+---------------+---------------+8812 * NDDS 3.1 sends only 'kind' on the wire.8813 *8814 */8815 case PID_LIVELINESS_OFFERED(0x1c): /* Deprecated */8816 case PID_LIVELINESS(0x1b):8817 ENSURE_LENGTH(12);8818 rtps_util_add_liveliness_qos(rtps_parameter_tree, tvb, offset, encoding);8819 break;8820 8821 /* 0...2...........7...............15.............23...............318822 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+8823 * | PID_DURABILITY | 0x0004 |8824 * +---------------+---------------+---------------+---------------+8825 * | unsigned long kind |8826 * +---------------+---------------+---------------+---------------+8827 */8828 case PID_DURABILITY(0x1d):8829 ENSURE_LENGTH(4);8830 proto_tree_add_item(rtps_parameter_tree, hf_rtps_durability, tvb, offset, 4, encoding);8831 break;8832 8833 /* 0...2...........7...............15.............23...............318834 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+8835 * | PID_DURABILITY_SERVICE | 0x0004 |8836 * +---------------+---------------+---------------+---------------+8837 * | long NtpTime.seconds |8838 * +---------------+---------------+---------------+---------------+8839 * | unsigned long NtpTime.fraction |8840 * +---------------+---------------+---------------+---------------+8841 * | unsigned long kind |8842 * +---------------+---------------+---------------+---------------+8843 * | long history_depth |8844 * +---------------+---------------+---------------+---------------+8845 * | long max_samples |8846 * +---------------+---------------+---------------+---------------+8847 * | long max_instances |8848 * +---------------+---------------+---------------+---------------+8849 * | long max_samples_per_instance |8850 * +---------------+---------------+---------------+---------------+8851 */8852 case PID_DURABILITY_SERVICE(0x1e):8853 ENSURE_LENGTH(28);8854 rtps_util_add_durability_service_qos(rtps_parameter_tree, tvb, offset, encoding);8855 break;8856 8857 /* 0...2...........7...............15.............23...............318858 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+8859 * | PID_OWNERSHIP | 0x0004 |8860 * +---------------+---------------+---------------+---------------+8861 * | unsigned long kind |8862 * +---------------+---------------+---------------+---------------+8863 */8864 case PID_OWNERSHIP_OFFERED(0x20): /* Deprecated */8865 case PID_OWNERSHIP(0x1f):8866 ENSURE_LENGTH(4);8867 proto_tree_add_item(rtps_parameter_tree, hf_rtps_ownership, tvb, offset, 4, encoding);8868 break;8869 8870 /* 0...2...........7...............15.............23...............318871 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+8872 * | PID_PRESENTATION | 0x0008 |8873 * +---------------+---------------+---------------+---------------+8874 * | unsigned long kind |8875 * +---------------+---------------+---------------+---------------+8876 * | boolean | boolean | N O T U S E D |8877 * +---------------+---------------+---------------+---------------+8878 */8879 case PID_PRESENTATION_OFFERED(0x22): /* Deprecated */8880 case PID_PRESENTATION(0x21):8881 ENSURE_LENGTH(6);8882 proto_tree_add_item(rtps_parameter_tree, hf_rtps_presentation_access_scope, tvb, offset, 4, encoding);8883 proto_tree_add_item(rtps_parameter_tree, hf_rtps_presentation_coherent_access, tvb, offset+4, 1, ENC_NA0x00000000 );8884 proto_tree_add_item(rtps_parameter_tree, hf_rtps_presentation_ordered_access, tvb, offset+5, 1, ENC_NA0x00000000 );8885 break;8886 8887 /* 0...2...........7...............15.............23...............318888 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+8889 * | PID_DEADLINE | 0x0008 |8890 * +---------------+---------------+---------------+---------------+8891 * | long NtpTime.seconds |8892 * +---------------+---------------+---------------+---------------+8893 * | unsigned long NtpTime.fraction |8894 * +---------------+---------------+---------------+---------------+8895 */8896 case PID_DEADLINE_OFFERED(0x24): /* Deprecated */8897 case PID_DEADLINE(0x23):8898 ENSURE_LENGTH(8);8899 rtps_util_add_timestamp_sec_and_fraction(rtps_parameter_tree, tvb, offset, encoding, hf_rtps_deadline_period);8900 break;8901 8902 /* 0...2...........7...............15.............23...............318903 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+8904 * | PID_DESTINATION_ORDER | 0x0004 |8905 * +---------------+---------------+---------------+---------------+8906 * | unsigned long kind |8907 * +---------------+---------------+---------------+---------------+8908 */8909 case PID_DESTINATION_ORDER_OFFERED(0x26): /* Deprecated */8910 case PID_DESTINATION_ORDER(0x25):8911 ENSURE_LENGTH(4);8912 proto_tree_add_item(rtps_parameter_tree, hf_rtps_destination_order, tvb, offset, 4, encoding);8913 break;8914 8915 /* 0...2...........7...............15.............23...............318916 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+8917 * | PID_LATENCY_BUDGET | 0x0008 |8918 * +---------------+---------------+---------------+---------------+8919 * | long NtpTime.seconds |8920 * +---------------+---------------+---------------+---------------+8921 * | unsigned long NtpTime.fraction |8922 * +---------------+---------------+---------------+---------------+8923 */8924 case PID_LATENCY_BUDGET_OFFERED(0x28):8925 case PID_LATENCY_BUDGET(0x27):8926 ENSURE_LENGTH(8);8927 rtps_util_add_timestamp_sec_and_fraction(rtps_parameter_tree, tvb, offset,8928 encoding, hf_rtps_latency_budget_duration);8929 break;8930 8931 /* 0...2...........7...............15.............23...............318932 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+8933 * | PID_PARTITION | length |8934 * +---------------+---------------+---------------+---------------+8935 * | unsigned long sequence_size |8936 * +---------------+---------------+---------------+---------------+8937 * | unsigned long string[0].size |8938 * +---------------+---------------+---------------+---------------+8939 * | string[0][0] | string[0][1] | string[0][2] | string[0][3] |8940 * +---------------+---------------+---------------+---------------+8941 * | ... |8942 * +---------------+---------------+---------------+---------------+8943 * The value is a sequence of strings.8944 */8945 case PID_PARTITION_OFFERED(0x2a): /* Deprecated */8946 case PID_PARTITION(0x29):8947 ENSURE_LENGTH(4);8948 rtps_util_add_seq_string(rtps_parameter_tree, tvb, offset, encoding,8949 hf_rtps_param_partition_num, hf_rtps_param_partition, "name");8950 break;8951 8952 /* 0...2...........7...............15.............23...............318953 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+8954 * | PID_LIFESPAN | 0x0008 |8955 * +---------------+---------------+---------------+---------------+8956 * | long NtpTime.seconds |8957 * +---------------+---------------+---------------+---------------+8958 * | unsigned long NtpTime.fraction |8959 * +---------------+---------------+---------------+---------------+8960 */8961 case PID_LIFESPAN(0x2b):8962 ENSURE_LENGTH(8);8963 rtps_util_add_timestamp_sec_and_fraction(rtps_parameter_tree, tvb, offset, encoding,8964 hf_rtps_lifespan_duration);8965 break;8966 8967 /* 0...2...........7...............15.............23...............318968 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+8969 * | PID_USER_DATA | length |8970 * +---------------+---------------+---------------+---------------+8971 * | unsigned long sequence_size |8972 * +---------------+---------------+---------------+---------------+8973 * | octet[0] | octet[1] | octet[2] | octet[3] |8974 * +---------------+---------------+---------------+---------------+8975 * | ... |8976 * +---------------+---------------+---------------+---------------+8977 */8978 case PID_USER_DATA(0x2c):8979 ENSURE_LENGTH(4);8980 rtps_util_add_seq_octets(rtps_parameter_tree, pinfo, tvb, offset,8981 encoding, param_length, hf_rtps_param_user_data);8982 break;8983 8984 /* 0...2...........7...............15.............23...............318985 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+8986 * | PID_GROUP_DATA | length |8987 * +---------------+---------------+---------------+---------------+8988 * | unsigned long sequence_size |8989 * +---------------+---------------+---------------+---------------+8990 * | octet[0] | octet[1] | octet[2 ] | octet[3] |8991 * +---------------+---------------+---------------+---------------+8992 * | ... |8993 * +---------------+---------------+---------------+---------------+8994 */8995 case PID_GROUP_DATA(0x2d):8996 ENSURE_LENGTH(4);8997 rtps_util_add_seq_octets(rtps_parameter_tree, pinfo, tvb, offset,8998 encoding, param_length, hf_rtps_param_group_data);8999 break;9000 9001 /* 0...2...........7...............15.............23...............319002 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+9003 * | PID_TOPIC_DATA | length |9004 * +---------------+---------------+---------------+---------------+9005 * | unsigned long sequence_size |9006 * +---------------+---------------+---------------+---------------+9007 * | octet[0] | octet[1] | octet[2] | octet[3] |9008 * +---------------+---------------+---------------+---------------+9009 * | ... |9010 * +---------------+---------------+---------------+---------------+9011 */9012 case PID_TOPIC_DATA(0x2e):9013 ENSURE_LENGTH(4);9014 rtps_util_add_seq_octets(rtps_parameter_tree, pinfo, tvb, offset,9015 encoding, param_length, hf_rtps_param_topic_data);9016 break;9017 9018 /* 0...2...........7...............15.............23...............319019 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+9020 * | PID_UNICAST_LOCATOR | 0x0018 |9021 * +---------------+---------------+---------------+---------------+9022 * | long kind |9023 * +---------------+---------------+---------------+---------------+9024 * | long port |9025 * +---------------+---------------+---------------+---------------+9026 * | ipv6addr[0] | ipv6addr[1] | ipv6addr[2] | ipv6addr[3] |9027 * +---------------+---------------+---------------+---------------+9028 * | ipv6addr[4] | ipv6addr[5] | ipv6addr[6] | ipv6addr[7] |9029 * +---------------+---------------+---------------+---------------+9030 * | ipv6addr[8] | ipv6addr[9] | ipv6addr[10] | ipv6addr[11] |9031 * +---------------+---------------+---------------+---------------+9032 * | ipv6addr[12] | ipv6addr[13] | ipv6addr[14] | ipv6addr[15] |9033 * +---------------+---------------+---------------+---------------+9034 */9035 case PID_UNICAST_LOCATOR(0x2f):9036 ENSURE_LENGTH(24);9037 rtps_util_add_locator_t(rtps_parameter_tree, pinfo, tvb,9038 offset, encoding, "locator");9039 break;9040 9041 /* 0...2...........7...............15.............23...............319042 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+9043 * | PID_MULTICAST_LOCATOR | 0x0018 |9044 * +---------------+---------------+---------------+---------------+9045 * | long kind |9046 * +---------------+---------------+---------------+---------------+9047 * | long port |9048 * +---------------+---------------+---------------+---------------+9049 * | ipv6addr[0] | ipv6addr[1] | ipv6addr[2] | ipv6addr[3] |9050 * +---------------+---------------+---------------+---------------+9051 * | ipv6addr[4] | ipv6addr[5] | ipv6addr[6] | ipv6addr[7] |9052 * +---------------+---------------+---------------+---------------+9053 * | ipv6addr[8] | ipv6addr[9] | ipv6addr[10] | ipv6addr[11] |9054 * +---------------+---------------+---------------+---------------+9055 * | ipv6addr[12] | ipv6addr[13] | ipv6addr[14] | ipv6addr[15] |9056 * +---------------+---------------+---------------+---------------+9057 */9058 case PID_MULTICAST_LOCATOR(0x30):9059 ENSURE_LENGTH(24);9060 rtps_util_add_locator_t(rtps_parameter_tree, pinfo, tvb,9061 offset, encoding, "locator");9062 break;9063 9064 /* 0...2...........7...............15.............23...............319065 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+9066 * | PID_DEFAULT_UNICAST_LOCATOR | 0x0018 |9067 * +---------------+---------------+---------------+---------------+9068 * | long kind |9069 * +---------------+---------------+---------------+---------------+9070 * | long port |9071 * +---------------+---------------+---------------+---------------+9072 * | ipv6addr[0] | ipv6addr[1] | ipv6addr[2] | ipv6addr[3] |9073 * +---------------+---------------+---------------+---------------+9074 * | ipv6addr[4] | ipv6addr[5] | ipv6addr[6] | ipv6addr[7] |9075 * +---------------+---------------+---------------+---------------+9076 * | ipv6addr[8] | ipv6addr[9] | ipv6addr[10] | ipv6addr[11] |9077 * +---------------+---------------+---------------+---------------+9078 * | ipv6addr[12] | ipv6addr[13] | ipv6addr[14] | ipv6addr[15] |9079 * +---------------+---------------+---------------+---------------+9080 */9081 case PID_DEFAULT_UNICAST_LOCATOR(0x31):9082 ENSURE_LENGTH(24);9083 rtps_util_add_locator_t(rtps_parameter_tree, pinfo, tvb, offset,9084 encoding, "locator");9085 break;9086 9087 /* 0...2...........7...............15.............23...............319088 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+9089 * | PID_METATRAFFIC_UNICAST_LOC...| 0x0018 |9090 * +---------------+---------------+---------------+---------------+9091 * | long kind |9092 * +---------------+---------------+---------------+---------------+9093 * | long port |9094 * +---------------+---------------+---------------+---------------+9095 * | ipv6addr[0] | ipv6addr[1] | ipv6addr[2] | ipv6addr[3] |9096 * +---------------+---------------+---------------+---------------+9097 * | ipv6addr[4] | ipv6addr[5] | ipv6addr[6] | ipv6addr[7] |9098 * +---------------+---------------+---------------+---------------+9099 * | ipv6addr[8] | ipv6addr[9] | ipv6addr[10] | ipv6addr[11] |9100 * +---------------+---------------+---------------+---------------+9101 * | ipv6addr[12] | ipv6addr[13] | ipv6addr[14] | ipv6addr[15] |9102 * +---------------+---------------+---------------+---------------+9103 */9104 case PID_METATRAFFIC_UNICAST_LOCATOR(0x32):9105 ENSURE_LENGTH(24);9106 rtps_util_add_locator_t(rtps_parameter_tree, pinfo, tvb, offset,9107 encoding, "locator");9108 break;9109 9110 /* 0...2...........7...............15.............23...............319111 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+9112 * | PID_METATRAFFIC_MULTICAST_L...| 0x0018 |9113 * +---------------+---------------+---------------+---------------+9114 * | long kind |9115 * +---------------+---------------+---------------+---------------+9116 * | long port |9117 * +---------------+---------------+---------------+---------------+9118 * | ipv6addr[0] | ipv6addr[1] | ipv6addr[2] | ipv6addr[3] |9119 * +---------------+---------------+---------------+---------------+9120 * | ipv6addr[4] | ipv6addr[5] | ipv6addr[6] | ipv6addr[7] |9121 * +---------------+---------------+---------------+---------------+9122 * | ipv6addr[8] | ipv6addr[9] | ipv6addr[10] | ipv6addr[11] |9123 * +---------------+---------------+---------------+---------------+9124 * | ipv6addr[12] | ipv6addr[13] | ipv6addr[14] | ipv6addr[15] |9125 * +---------------+---------------+---------------+---------------+9126 */9127 case PID_METATRAFFIC_MULTICAST_LOCATOR(0x33):9128 ENSURE_LENGTH(24);9129 rtps_util_add_locator_t(rtps_parameter_tree, pinfo, tvb,9130 offset, encoding, "locator");9131 break;9132 9133 /* 0...2...........7...............15.............23...............319134 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+9135 * | PID_PARTICIPANT_MANUAL_LIVE...| 0x0004 |9136 * +---------------+---------------+---------------+---------------+9137 * | long livelinessEpoch |9138 * +---------------+---------------+---------------+---------------+9139 */9140 case PID_PARTICIPANT_BUILTIN_ENDPOINTS(0x44):9141 ENSURE_LENGTH(4);9142 proto_tree_add_item(rtps_parameter_tree, hf_rtps_participant_builtin_endpoints, tvb, offset, 4, encoding);9143 break;9144 9145 case PID_PARTICIPANT_MANUAL_LIVELINESS_COUNT(0x34):9146 ENSURE_LENGTH(4);9147 proto_tree_add_item(rtps_parameter_tree, hf_rtps_participant_manual_liveliness_count, tvb, offset, 4, encoding);9148 break;9149 9150 /* 0...2...........7...............15.............23...............319151 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+9152 * | PID_HISTORY | 0x0004 |9153 * +---------------+---------------+---------------+---------------+9154 * | long kind |9155 * +---------------+---------------+---------------+---------------+9156 * | long depth |9157 * +---------------+---------------+---------------+---------------+9158 */9159 case PID_HISTORY(0x40):9160 ENSURE_LENGTH(8);9161 proto_tree_add_item(rtps_parameter_tree, hf_rtps_history_kind, tvb, offset, 4, encoding);9162 proto_tree_add_item(rtps_parameter_tree, hf_rtps_history_depth, tvb, offset+4, 4, encoding);9163 break;9164 9165 /* 0...2...........7...............15.............23...............319166 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+9167 * | PID_RESOURCE_LIMIT | 0x0004 |9168 * +---------------+---------------+---------------+---------------+9169 * | long max_samples |9170 * +---------------+---------------+---------------+---------------+9171 * | long max_instances |9172 * +---------------+---------------+---------------+---------------+9173 * | long max_samples_per_instances |9174 * +---------------+---------------+---------------+---------------+9175 */9176 case PID_RESOURCE_LIMIT(0x41):9177 ENSURE_LENGTH(12);9178 subtree = proto_tree_add_subtree(rtps_parameter_tree, tvb, offset, 12, ett_rtps_resource_limit, NULL((void*)0), "Resource Limit");9179 proto_tree_add_item(subtree, hf_rtps_resource_limit_max_samples, tvb, offset, 4, encoding);9180 proto_tree_add_item(subtree, hf_rtps_resource_limit_max_instances, tvb, offset+4, 4, encoding);9181 proto_tree_add_item(subtree, hf_rtps_resource_limit_max_samples_per_instances, tvb, offset+8, 4, encoding);9182 break;9183 9184 /* 0...2...........7...............15.............23...............319185 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+9186 * | PID_CONTENT_FILTER_PROPERTY | length |9187 * +---------------+---------------+---------------+---------------+9188 * | unsigned long String1.length |9189 * +---------------+---------------+---------------+---------------+9190 * | str1[0] | str1[1] | str1[2] | str1[3] |9191 * +---------------+---------------+---------------+---------------+9192 * | ... |9193 * +---------------+---------------+---------------+---------------+9194 * | unsigned long String2.length |9195 * +---------------+---------------+---------------+---------------+9196 * | str2[0] | str2[1] | str2[2] | str2[3] |9197 * +---------------+---------------+---------------+---------------+9198 * | ... |9199 * +---------------+---------------+---------------+---------------+9200 * | unsigned long String3.length |9201 * +---------------+---------------+---------------+---------------+9202 * | str3[0] | str3[1] | str3[2] | str3[3] |9203 * +---------------+---------------+---------------+---------------+9204 * | ... |9205 * +---------------+---------------+---------------+---------------+9206 * | unsigned long String4.length |9207 * +---------------+---------------+---------------+---------------+9208 * | str4[0] | str4[1] | str4[2] | str4[3] |9209 * +---------------+---------------+---------------+---------------+9210 * | ... |9211 * +---------------+---------------+---------------+---------------+9212 * | ... |9213 * | Filter Parameters |9214 * | ... |9215 * +---------------+---------------+---------------+---------------+9216 *9217 * String1: ContentFilterTopicName9218 * String2: RelatedTopicName9219 * String3: FilterClassName9220 * String4: FilterExpression9221 * ExpressionParameters: sequence of Strings9222 *9223 * Note: those strings starts all to a word-aligned (4 bytes) offset9224 */9225 case PID_CONTENT_FILTER_PROPERTY(0x35): {9226 guint32 temp_offset = offset;9227 ENSURE_LENGTH(20);9228 temp_offset = rtps_util_add_string(rtps_parameter_tree, tvb, temp_offset,9229 hf_rtps_param_content_filter_topic_name, encoding);9230 temp_offset = rtps_util_add_string(rtps_parameter_tree, tvb, temp_offset,9231 hf_rtps_param_related_topic_name, encoding);9232 temp_offset = rtps_util_add_string(rtps_parameter_tree, tvb, temp_offset,9233 hf_rtps_param_filter_class_name, encoding);9234 temp_offset = rtps_util_add_string(rtps_parameter_tree, tvb, temp_offset,9235 hf_rtps_param_filter_expression, encoding);9236 /*temp_offset = */rtps_util_add_seq_string(rtps_parameter_tree, tvb, temp_offset,9237 encoding, hf_rtps_param_expression_parameters_num,9238 hf_rtps_param_expression_parameters, "expressionParameters");9239 break;9240 }9241 9242 /* 0...2...........7...............15.............23...............319243 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+9244 * | PID_PROPERTY_LIST | length |9245 * +---------------+---------------+---------------+---------------+9246 * | unsigned long Seq.Length |9247 * +---------------+---------------+---------------+---------------+9248 * | ... |9249 * | Property 1 |9250 * | ... |9251 * +---------------+---------------+---------------+---------------+9252 * | ... |9253 * | Property 2 |9254 * | ... |9255 * +---------------+---------------+---------------+---------------+9256 * | ... |9257 * | Property n |9258 * | ... |9259 * +---------------+---------------+---------------+---------------+9260 *9261 * IDL:9262 * struct PROPERTY {9263 * String Name;9264 * String Value;9265 * };9266 *9267 * struct PROPERTY_LIST {9268 * Sequence<PROPERTY> PropertyList;9269 * };9270 *9271 */9272 case PID_PROPERTY_LIST(0x0059):9273 case PID_PROPERTY_LIST_OLD(0x36):9274 ENSURE_LENGTH(4);9275 {9276 guint32 temp_offset, prop_size;9277 const guint8 *propName, *propValue;9278 proto_item *list_item, *item;9279 proto_tree *property_list_tree, *property_tree;9280 guint32 seq_size = tvb_get_guint32(tvb, offset, encoding);9281 int start_offset = offset, str_length;9282 9283 proto_item_append_text( parameter_item, " (%d properties)", seq_size );9284 if (seq_size > 0) {9285 property_list_tree = proto_tree_add_subtree(rtps_parameter_tree, tvb, offset, -1, ett_rtps_property_list, &list_item, "Property List");9286 9287 temp_offset = offset+4;9288 while(seq_size-- > 0) {9289 prop_size = tvb_get_guint32(tvb, temp_offset, encoding);9290 propName = tvb_get_string_enc(wmem_packet_scope(), tvb, temp_offset+4, prop_size, ENC_ASCII0x00000000);9291 9292 /* NDDS align strings at 4-bytes word. */9293 str_length = (4 + ((prop_size + 3) & 0xfffffffc));9294 item = proto_tree_add_string(property_list_tree, hf_rtps_property_name, tvb, temp_offset, str_length, propName);9295 property_tree = proto_item_add_subtree(item, ett_rtps_property);9296 temp_offset += str_length;9297 9298 prop_size = tvb_get_guint32(tvb, temp_offset, encoding);9299 propValue = tvb_get_string_enc(wmem_packet_scope(), tvb, temp_offset+4, prop_size, ENC_ASCII0x00000000);9300 9301 /* NDDS align strings at 4-bytes word. */9302 str_length = (4 + ((prop_size + 3) & 0xfffffffc));9303 proto_tree_add_string(property_tree, hf_rtps_property_value, tvb, temp_offset, str_length, propValue);9304 temp_offset += str_length;9305 }9306 9307 proto_item_set_len(list_item, temp_offset-start_offset);9308 }9309 }9310 break;9311 9312 /* 0...2...........7...............15.............23...............319313 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+9314 * | PID_FILTER_SIGNATURE | length |9315 * +---------------+---------------+---------------+---------------+9316 * | ... |9317 * +---------------+---------------+---------------+---------------+9318 *9319 * IDL:9320 * struct CONTENT_FILTER_SIGNATURE {9321 * sequence<long> filterBitmap;9322 * sequence<FILTER_SIGNATURE, 4> filterSignature;9323 * }9324 *9325 * where:9326 * struct FILTER_SIGNATURE {9327 * long filterSignature[4];9328 * }9329 */9330 case PID_FILTER_SIGNATURE(0x55): {9331 guint32 temp_offset;9332 guint32 prev_offset;9333 guint32 fs_elem;9334 guint32 fs[4];9335 ENSURE_LENGTH(8);9336 9337 /* Dissect filter bitmap */9338 temp_offset = rtps_util_add_seq_ulong(rtps_parameter_tree, tvb, offset,9339 hf_rtps_filter_bitmap, encoding, param_length, "filterBitmap");9340 9341 /* Dissect sequence of FILTER_SIGNATURE */9342 fs_elem = tvb_get_guint32(tvb, temp_offset, encoding);9343 temp_offset += 4;9344 while (fs_elem-- > 0) {9345 prev_offset = temp_offset;9346 /* Dissect the next FILTER_SIGNATURE object */9347 fs[0] = tvb_get_guint32(tvb, temp_offset, encoding);9348 temp_offset += 4;9349 fs[1] = tvb_get_guint32(tvb, temp_offset, encoding);9350 temp_offset += 4;9351 fs[2] = tvb_get_guint32(tvb, temp_offset, encoding);9352 temp_offset += 4;9353 fs[3] = tvb_get_guint32(tvb, temp_offset, encoding);9354 temp_offset += 4;9355 proto_tree_add_bytes_format_value(rtps_parameter_tree, hf_rtps_filter_signature, tvb, prev_offset, temp_offset - prev_offset, NULL((void*)0), "%08x %08x %08x %08x",9356 fs[0], fs[1], fs[2], fs[3]);9357 }9358 9359 break;9360 }9361 9362 9363 /* 0...2...........7...............15.............23...............319364 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+9365 * | PID_COHERENT_SET | length |9366 * +---------------+---------------+---------------+---------------+9367 * | |9368 * + SequenceNumber seqNumber +9369 * | |9370 * +---------------+---------------+---------------+---------------+9371 */9372 case PID_COHERENT_SET(0x56): {9373 guint64 coherent_seq_number;9374 9375 ENSURE_LENGTH(8);9376 coherent_seq_number = rtps_util_add_seq_number(rtps_parameter_tree, tvb, offset,9377 encoding, "sequenceNumber");9378 if (coherent_set_entity_info_object && rtps_parameter_tree) {9379 rtps_util_add_coherent_set_general_cases_case(rtps_parameter_tree,9380 tvb, coherent_seq_number, coherent_set_entity_info_object);9381 }9382 break;9383 }9384 /* 0...2...........7...............15.............23...............319385 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+9386 * | PID_TYPECODE | length |9387 * +---------------+---------------+---------------+---------------+9388 * | |9389 * + Type code description +9390 * | |9391 * +---------------+---------------+---------------+---------------+9392 */9393 case PID_TYPECODE(0x47):9394 rtps_util_add_typecode(rtps_parameter_tree, tvb, pinfo, offset, encoding,9395 0, /* indent level */9396 0, /* isPointer */9397 -1, /* bitfield */9398 0, /* isKey */9399 offset,9400 NULL((void*)0), /* name */9401 -1, /* not a seq field */9402 NULL((void*)0), /* not an array */9403 0); /* ndds 4.0 hack: init to false */9404 break;9405 9406 /* 0...2...........7...............15.............23...............319407 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+9408 * | PID_PARTICIPANT_GUID | 0x000c |9409 * +---------------+---------------+---------------+---------------+9410 * | guid[0] | guid[1] | guid[2] | guid[3] |9411 * +---------------+---------------+---------------+---------------+9412 * | guid[4] | guid[5] | guid[6] | guid[7] |9413 * +---------------+---------------+---------------+---------------+9414 * | guid[8] | guid[9] | guid[10] | guid[11] |9415 * +---------------+---------------+---------------+---------------+9416 */9417 case PID_PARTICIPANT_GUID(0x50):9418 if (version < 0x0200) {9419 ENSURE_LENGTH(12);9420 rtps_util_add_generic_guid_v1(rtps_parameter_tree, tvb, offset,9421 hf_rtps_participant_guid_v1, hf_rtps_param_host_id, hf_rtps_param_app_id,9422 hf_rtps_param_instance_id_v1, hf_rtps_param_app_kind,9423 hf_rtps_param_entity, hf_rtps_param_entity_key, hf_rtps_param_entity_kind);9424 } else {9425 ENSURE_LENGTH(16);9426 rtps_util_add_generic_guid_v2(rtps_parameter_tree, tvb, offset,9427 hf_rtps_participant_guid, hf_rtps_param_host_id, hf_rtps_param_app_id,9428 hf_rtps_param_instance_id, hf_rtps_param_entity, hf_rtps_param_entity_key,9429 hf_rtps_param_entity_kind, NULL((void*)0));9430 }9431 break;9432 9433 /* 0...2...........7...............15.............23...............319434 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+9435 * | PID_PARTICIPANT_ENTITY_ID | 0x0004 |9436 * +---------------+---------------+---------------+---------------+9437 * | entity[0] | entity[1] | entity[2] | entity[3] |9438 * +---------------+---------------+---------------+---------------+9439 */9440 case PID_PARTICIPANT_ENTITY_ID(0x51):9441 ENSURE_LENGTH(4);9442 rtps_util_add_generic_entity_id(rtps_parameter_tree, tvb, offset, "Participant entity ID",9443 hf_rtps_param_entity, hf_rtps_param_entity_key,9444 hf_rtps_param_entity_kind, ett_rtps_entity);9445 9446 break;9447 9448 /* 0...2...........7...............15.............23...............319449 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+9450 * | PID_GROUP_GUID | 0x000c |9451 * +---------------+---------------+---------------+---------------+9452 * | guid[0] | guid[1] | guid[2] | guid[3] |9453 * +---------------+---------------+---------------+---------------+9454 * | guid[4] | guid[5] | guid[6] | guid[7] |9455 * +---------------+---------------+---------------+---------------+9456 * | guid[8] | guid[9] | guid[10] | guid[11] |9457 * +---------------+---------------+---------------+---------------+9458 */9459 case PID_GROUP_GUID(0x52):9460 if (version < 0x0200) {9461 ENSURE_LENGTH(12);9462 rtps_util_add_generic_guid_v1(rtps_parameter_tree, tvb, offset,9463 hf_rtps_group_guid_v1, hf_rtps_param_host_id, hf_rtps_param_app_id,9464 hf_rtps_param_instance_id_v1, hf_rtps_param_app_kind,9465 hf_rtps_param_entity, hf_rtps_param_entity_key, hf_rtps_param_entity_kind);9466 } else {9467 ENSURE_LENGTH(16);9468 rtps_util_add_generic_guid_v2(rtps_parameter_tree, tvb, offset,9469 hf_rtps_group_guid, hf_rtps_param_host_id, hf_rtps_param_app_id,9470 hf_rtps_param_instance_id, hf_rtps_param_entity, hf_rtps_param_entity_key,9471 hf_rtps_param_entity_kind, NULL((void*)0));9472 }9473 break;9474 9475 /* 0...2...........7...............15.............23...............319476 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+9477 * | PID_GROUP_ENTITY_ID | 0x0004 |9478 * +---------------+---------------+---------------+---------------+9479 * | entity[0] | entity[1] | entity[2] | entity[3] |9480 * +---------------+---------------+---------------+---------------+9481 */9482 case PID_GROUP_ENTITY_ID(0x53):9483 ENSURE_LENGTH(4);9484 rtps_util_add_generic_entity_id(rtps_parameter_tree, tvb, offset, "Group entity ID",9485 hf_rtps_param_entity, hf_rtps_param_entity_key,9486 hf_rtps_param_entity_kind, ett_rtps_entity);9487 break;9488 9489 /* ==================================================================9490 * Here are all the deprecated items.9491 */9492 9493 case PID_PERSISTENCE(0x03):9494 ENSURE_LENGTH(8);9495 rtps_util_add_timestamp_sec_and_fraction(rtps_parameter_tree, tvb, offset, encoding,9496 hf_rtps_persistence);9497 break;9498 9499 case PID_TYPE_CHECKSUM(0x08):9500 ENSURE_LENGTH(4);9501 proto_tree_add_checksum(rtps_parameter_tree, tvb, offset, hf_rtps_type_checksum, -1, NULL((void*)0), pinfo, 0, encoding, PROTO_CHECKSUM_NO_FLAGS0x00);9502 break;9503 9504 case PID_EXPECTS_ACK(0x10):9505 ENSURE_LENGTH(1);9506 proto_tree_add_item(rtps_parameter_tree, hf_rtps_expects_ack, tvb, offset, 1, ENC_NA0x00000000 );9507 break;9508 9509 case PID_MANAGER_KEY(0x12): {9510 int i = 0;9511 guint32 manager_key;9512 9513 subtree = proto_tree_add_subtree(rtps_parameter_tree, tvb, offset, param_length, ett_rtps_manager_key, NULL((void*)0), "Manager Keys");9514 9515 while (param_length >= 4) {9516 manager_key = tvb_get_guint32(tvb, offset, encoding);9517 proto_tree_add_uint_format(subtree, hf_rtps_manager_key, tvb, offset, 4,9518 manager_key, "Key[%d]: 0x%X", i, manager_key);9519 9520 ++i;9521 offset +=4;9522 param_length -= 4; /* decrement count */9523 }9524 break;9525 }9526 9527 case PID_RECV_QUEUE_SIZE(0x18):9528 case PID_SEND_QUEUE_SIZE(0x13):9529 ENSURE_LENGTH(4);9530 proto_tree_add_item(rtps_parameter_tree, hf_rtps_queue_size, tvb, offset, 4, encoding);9531 break;9532 9533 case PID_VARGAPPS_SEQUENCE_NUMBER_LAST(0x17):9534 ENSURE_LENGTH(4);9535 rtps_util_add_seq_number(rtps_parameter_tree, tvb, offset, encoding, "sequenceNumberLast");9536 break;9537 9538 case PID_SENTINEL(0x01):9539 /* PID_SENTINEL should ignore any value of parameter length */9540 break;9541 9542 /* This is the default branch when we don't have enough information9543 * on how to decode the parameter. It can be used also for known9544 * parameters.9545 */9546 /* 0...2...........7...............15.............23...............319547 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+9548 * | <pid_id> | 0x0000 |9549 * +---------------+---------------+---------------+---------------+9550 */9551 case PID_TYPE2_NAME(0x09):9552 case PID_TYPE2_CHECKSUM(0x0a):9553 case PID_RELIABILITY_ENABLED(0x14):9554 expert_add_info(pinfo, parameter_item, &ei_rtps_parameter_not_decoded);9555 /* Fall Through */9556 case PID_PAD(0x00):9557 if (param_length > 0) {9558 proto_tree_add_item(rtps_parameter_tree, hf_rtps_parameter_data, tvb,9559 offset, param_length, ENC_NA0x00000000);9560 }9561 break;9562 9563 default:9564 return FALSE(0);9565 }9566 9567 return TRUE(!(0));9568}9569 9570static gboolean dissect_parameter_sequence_v2(proto_tree *rtps_parameter_tree, packet_info *pinfo, tvbuff_t *tvb,9571 proto_item *parameter_item _U___attribute__((unused)), proto_item *param_len_item,9572 gint offset, const guint encoding, int param_length,9573 guint16 parameter, guint32 *pStatusInfo, guint16 vendor_id _U___attribute__((unused)),9574 type_mapping * type_mapping_object,9575 coherent_set_entity_info *coherent_set_entity_info_object _U___attribute__((unused))) {9576 proto_item *ti;9577 9578 switch(parameter) {9579 /* 0...2...........7...............15.............23...............319580 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+9581 * | PID_STATUS_INFO | 0x0004 |9582 * +---------------+---------------+---------------+---------------+9583 * | long statusInfo |9584 * +---------------+---------------+---------------+---------------+9585 */9586 case PID_STATUS_INFO(0x0071): {9587 gboolean* is_data_session_intermediate = NULL((void*)0);9588 ENSURE_LENGTH(4);9589 /* PID_STATUS_INFO is always coded in network byte order (big endian) */9590 proto_tree_add_bitmask(rtps_parameter_tree, tvb, offset,9591 hf_rtps_param_status_info_flags, ett_rtps_flags,9592 STATUS_INFO_FLAGS, ENC_BIG_ENDIAN0x00000000);9593 if (pStatusInfo != NULL((void*)0)) {9594 *pStatusInfo = tvb_get_ntohl(tvb, offset);9595 }9596 is_data_session_intermediate = (gboolean*)p_get_proto_data(pinfo->pool, pinfo, proto_rtps, RTPS_DATA_SESSION_FINAL_PROTODATA_KEY2);9597 if (is_data_session_intermediate != NULL((void*)0)) {9598 *is_data_session_intermediate = TRUE(!(0));9599 }9600 break;9601 }9602 9603 /* 0...2...........7...............15.............23...............319604 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+9605 * | PID_DIRECTED_WRITE | 0x0010 |9606 * +---------------+---------------+---------------+---------------+9607 * | |9608 * +- -+9609 * | octet[12] guidPrefix |9610 * +- -+9611 * | |9612 * +---------------+---------------+---------------+---------------+9613 * | octet[4] entityId |9614 * +---------------+---------------+---------------+---------------+9615 */9616 case PID_DIRECTED_WRITE(0x0057): {9617 ENSURE_LENGTH(16);9618 rtps_util_add_guid_prefix_v2(rtps_parameter_tree, tvb, offset, hf_rtps_sm_guid_prefix,9619 hf_rtps_sm_host_id, hf_rtps_sm_app_id, hf_rtps_sm_instance_id, 0);9620 rtps_util_add_entity_id(rtps_parameter_tree, tvb, offset+12, hf_rtps_sm_entity_id,9621 hf_rtps_sm_entity_id_key, hf_rtps_sm_entity_id_kind, ett_rtps_entity,9622 "guidSuffix", NULL((void*)0));9623 break;9624 }9625 9626 9627 /* 0...2...........7...............15.............23...............319628 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+9629 * | PID_KEY_HASH | xxxx |9630 * +---------------+---------------+---------------+---------------+9631 * | |9632 * +- -+9633 * | octet[xxxx] guid |9634 * +- -+9635 * | |9636 * +---------------+---------------+---------------+---------------+9637 * Differently from the other GUID, the KEY_HASH parameter may have9638 * variable length in the future.9639 * As consequence, no interpretation is performed here (and no check9640 * for size).9641 */9642 case PID_KEY_HASH(0x0070): {9643 guint8 guidPart;9644 int i;9645 ti = proto_tree_add_bytes_format(rtps_parameter_tree, hf_rtps_guid, tvb, offset, param_length, NULL((void*)0), "guid: ");9646 for (i = 0; i < param_length; ++i) {9647 guidPart = tvb_get_guint8(tvb, offset+i);9648 proto_item_append_text(ti, "%02x", guidPart);9649 if (( ((i+1) % 4) == 0 ) && (i != param_length-1) )9650 proto_item_append_text(ti, ":");9651 }9652 break;9653 }9654 9655 /* 0...2...........7...............15.............23...............319656 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+9657 * | PID_TRANSPORT_PRIORITY | 0x0004 |9658 * +---------------+---------------+---------------+---------------+9659 * | unsigned long value |9660 * +---------------+---------------+---------------+---------------+9661 */9662 case PID_TRANSPORT_PRIORITY(0x0049):9663 ENSURE_LENGTH(4);9664 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_transport_priority, tvb, offset, 4, encoding);9665 break;9666 9667 /* 0...2...........7...............15.............23...............319668 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+9669 * | PID_CONTENT_FILTER_INFO | length |9670 * +---------------+---------------+---------------+---------------+9671 * | ... |9672 * +---------------+---------------+---------------+---------------+9673 *9674 * IDL:9675 * struct CONTENT_FILTER_SIGNATURE {9676 * sequence<long> filterBitmap;9677 * sequence<FILTER_SIGNATURE, 4> filterSignature;9678 * }9679 *9680 * where:9681 * struct FILTER_SIGNATURE {9682 * long filterSignature[4];9683 * }9684 */9685 case PID_CONTENT_FILTER_INFO(0x0055): {9686 guint32 temp_offset;9687 guint32 prev_offset;9688 guint32 fs_elem;9689 guint32 fs[4];9690 ENSURE_LENGTH(8);9691 9692 /* Dissect filter bitmap */9693 temp_offset = rtps_util_add_seq_ulong(rtps_parameter_tree, tvb, offset,9694 hf_rtps_filter_bitmap, encoding, param_length, "filterBitmap");9695 9696 /* Dissect sequence of FILTER_SIGNATURE */9697 fs_elem = tvb_get_guint32(tvb, temp_offset, encoding);9698 temp_offset += 4;9699 while (fs_elem-- > 0) {9700 prev_offset = temp_offset;9701 /* Dissect the next FILTER_SIGNATURE object */9702 fs[0] = tvb_get_guint32(tvb, temp_offset, encoding);9703 temp_offset += 4;9704 fs[1] = tvb_get_guint32(tvb, temp_offset, encoding);9705 temp_offset += 4;9706 fs[2] = tvb_get_guint32(tvb, temp_offset, encoding);9707 temp_offset += 4;9708 fs[3] = tvb_get_guint32(tvb, temp_offset, encoding);9709 temp_offset += 4;9710 proto_tree_add_bytes_format_value(rtps_parameter_tree, hf_rtps_filter_signature, tvb, prev_offset, temp_offset - prev_offset, NULL((void*)0), "%08x %08x %08x %08x",9711 fs[0], fs[1], fs[2], fs[3]);9712 }9713 9714 break;9715 }9716 9717 /* 0...2...........7...............15.............23...............319718 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+9719 * | PID_BUILTIN_ENDPOINT_SET | length |9720 * +---------------+---------------+---------------+---------------+9721 * | long value |9722 * +---------------+---------------+---------------+---------------+9723 */9724 case PID_BUILTIN_ENDPOINT_SET(0x0058): {9725 guint32 flags;9726 ENSURE_LENGTH(4);9727 flags = tvb_get_guint32(tvb, offset, encoding);9728 proto_tree_add_bitmask_value(rtps_parameter_tree, tvb, offset,9729 hf_rtps_param_builtin_endpoint_set_flags, ett_rtps_flags,9730 BUILTIN_ENDPOINT_FLAGS, flags);9731 break;9732 }9733 /* 0...2...........7...............15.............23...............319734 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+9735 * | PID_TYPE_MAX_SIZE_SERIALIZED | length |9736 * +---------------+---------------+---------------+---------------+9737 * | long value |9738 * +---------------+---------------+---------------+---------------+9739 */9740 case PID_TYPE_MAX_SIZE_SERIALIZED(0x0060):9741 ENSURE_LENGTH(4);9742 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_type_max_size_serialized, tvb, offset, 4, encoding);9743 break;9744 9745 9746 9747 /* 0...2...........7...............15.............23...............319748 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+9749 * | PID_ORIGINAL_WRITER_INFO | length |9750 * +---------------+---------------+---------------+---------------+9751 * | |9752 * +- -+9753 * | octet[12] guidPrefix |9754 * +- -+9755 * | |9756 * +---------------+---------------+---------------+---------------+9757 * | octet[4] entityId |9758 * +---------------+---------------+---------------+---------------+9759 * | |9760 * + SequenceNumber writerSeqNum +9761 * | |9762 * +---------------+---------------+---------------+---------------+9763 */9764 case PID_ORIGINAL_WRITER_INFO(0x0061):9765 ENSURE_LENGTH(16);9766 rtps_util_add_guid_prefix_v2(rtps_parameter_tree, tvb, offset, hf_rtps_sm_guid_prefix,9767 hf_rtps_sm_host_id, hf_rtps_sm_app_id, hf_rtps_sm_instance_id, 0);9768 rtps_util_add_entity_id(rtps_parameter_tree, tvb, offset+12, hf_rtps_sm_entity_id,9769 hf_rtps_sm_entity_id_key, hf_rtps_sm_entity_id_kind, ett_rtps_entity,9770 "virtualGUIDSuffix", NULL((void*)0));9771 9772 /* Sequence number */9773 rtps_util_add_seq_number(rtps_parameter_tree, tvb, offset+16,9774 encoding, "virtualSeqNumber");9775 break;9776 9777 /* 0...2...........7...............15.............23...............319778 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+9779 * | PID_ENTITY_NAME | length |9780 * +---------------+---------------+---------------+---------------+9781 * | unsigned long String.length |9782 * +---------------+---------------+---------------+---------------+9783 * | str[0] | str[1] | str[2] | str[3] |9784 * +---------------+---------------+---------------+---------------+9785 * | ... |9786 * +---------------+---------------+---------------+---------------+9787 */9788 case PID_ENTITY_NAME(0x0062):9789 rtps_util_add_string(rtps_parameter_tree, tvb, offset, hf_rtps_param_entity_name, encoding);9790 break;9791 9792 /* 0...2...........7...............15.............23...............319793 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+9794 * | PID_ENDPOINT_GUID | 0x0010 |9795 * +---------------+---------------+---------------+---------------+9796 * | guid[0] | guid[1] | guid[2] | guid[3] |9797 * +---------------+---------------+---------------+---------------+9798 * | guid[4] | guid[5] | guid[6] | guid[7] |9799 * +---------------+---------------+---------------+---------------+9800 * | guid[8] | guid[9] | guid[10] | guid[11] |9801 * +---------------+---------------+---------------+---------------+9802 * | guid[12] | guid[13] | guid[14] | guid[15] |9803 * +---------------+---------------+---------------+---------------+9804 */9805 case PID_ENDPOINT_GUID(0x005a):9806 ENSURE_LENGTH(16);9807 rtps_util_store_type_mapping(pinfo, tvb, offset, type_mapping_object,9808 NULL((void*)0), TOPIC_INFO_ADD_GUID(0x01));9809 rtps_util_add_generic_guid_v2(rtps_parameter_tree, tvb, offset,9810 hf_rtps_endpoint_guid, hf_rtps_param_host_id, hf_rtps_param_app_id,9811 hf_rtps_param_instance_id, hf_rtps_param_entity, hf_rtps_param_entity_key,9812 hf_rtps_param_entity_kind, NULL((void*)0));9813 break;9814 9815 9816 /* 0...2...........7...............15.............23...............319817 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+9818 * | PID_DATA_REPRESENTATION | length |9819 * +---------------+---------------+---------------+---------------+9820 * | uint32 SequenceSize |9821 * +---------------+---------------+---------------+---------------+9822 * | int16 DataRepresentationId[0] | int16 DataRepresentationId[1] |9823 * +---------------+-------------------------------+---------------+9824 * | ... | int16 DataRepresentationId[N] |9825 * +---------------+---------------+---------------+---------------+9826 * | uint32_t Compression_id (Optional) |9827 * +---------------+---------------+---------------+---------------+9828 * compression_iD flags:9829 * ZLIB: 0001b9830 * BZIP: 0010b9831 * LZ4: 0100b9832 */9833 9834 case PID_DATA_REPRESENTATION(0x0073): {9835 proto_tree *data_representation_seq_subtree;9836 proto_item *item;9837 guint value;9838 guint item_offset;9839 guint seq_size;9840 guint counter = 0;9841 guint initial_offset = offset;9842 guint compression_id_offset = 0;9843 9844 seq_size = tvb_get_guint32(tvb, offset, encoding);9845 data_representation_seq_subtree = proto_tree_add_subtree_format(rtps_parameter_tree, tvb, offset,9846 param_length, ett_rtps_data_representation, &item, "Data Representation Sequence[%d]", seq_size);9847 item_offset = offset + 4;9848 for (; counter < seq_size; ++counter) {9849 value = tvb_get_guint16(tvb, item_offset, encoding);9850 proto_tree_add_uint_format(data_representation_seq_subtree, hf_rtps_param_data_representation,9851 tvb, item_offset, 2, value, "[%d]: %s (0x%X)", counter,9852 val_to_str(value, data_representation_kind_vals, "Unknown data representation value: %u"),9853 value);9854 item_offset += 2;9855 }9856 compression_id_offset = item_offset;9857 ALIGN_ME(compression_id_offset, 4)compression_id_offset = (((compression_id_offset) + ((4) - 1)
) & ~((4) - 1))
;9858 if (compression_id_offset - initial_offset >= 4) {9859 proto_tree_add_bitmask(9860 rtps_parameter_tree,9861 tvb,9862 compression_id_offset,9863 hf_rtps_param_compression_id_mask,9864 ett_rtps_flags,9865 COMPRESSION_ID_MASK_FLAGS,9866 encoding);9867 }9868 break;9869 }9870 /* This parameter PID serializes a sequence number like the existing PID_COHERENT_SET */9871 /* 0...2...........7...............15.............23...............319872 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+9873 * | PID_GROUP_COHERENT_SET | length |9874 * +---------------+---------------+---------------+---------------+9875 * | |9876 * + SequenceNumber seqNumber +9877 * | |9878 * +---------------+---------------+---------------+---------------+9879 */9880 case PID_GROUP_COHERENT_SET(0x0063): {9881 guint64 hi = (guint64)tvb_get_guint32(tvb, offset, encoding);9882 guint64 lo = (guint64)tvb_get_guint32(tvb, offset + 4, encoding);9883 guint64 all = (hi << 32) | lo;9884 9885 proto_tree_add_uint64(9886 rtps_parameter_tree,9887 hf_rtps_param_group_coherent_set,9888 tvb, offset,9889 sizeof(guint64),9890 all);9891 break;9892 }9893 /* This parameter serializes a sequence number like the existing PID_COHERENT_SET9894 * and only applies to an end coherent set sample.9895 */9896 /* 0...2...........7...............15.............23...............319897 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+9898 * | PID_END_GROUP_COHERENT_SET | length |9899 * +---------------+---------------+---------------+---------------+9900 * | |9901 * + SequenceNumber seqNumber +9902 * | |9903 * +---------------+---------------+---------------+---------------+9904 */9905 case PID_END_GROUP_COHERENT_SET(0x8023): {9906 guint64 hi = (guint64)tvb_get_guint32(tvb, offset, encoding);9907 guint64 lo = (guint64)tvb_get_guint32(tvb, offset + 4, encoding);9908 guint64 all = (hi << 32) | lo;9909 9910 proto_tree_add_uint64(9911 rtps_parameter_tree,9912 hf_rtps_param_end_group_coherent_set,9913 tvb, offset,9914 sizeof(guint64),9915 all);9916 break;9917 }9918 /* This parameter serializes a SN like the existing PID_COHERENT_SET and9919 * only applies to an end coherent set sample.9920 * Since there are different ways to finish a coherent set it is necessary9921 * to store information about the available coherent sets. this PID requires9922 * set the corrresponding coherence set as "is_set".9923 */9924 /* 0...2...........7...............15.............23...............319925 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+9926 * | PID_END_COHERENT_SET | length |9927 * +---------------+---------------+---------------+---------------+9928 * | |9929 * + SequenceNumber seqNumber +9930 * | |9931 * +---------------+---------------+---------------+---------------+9932 */9933 case PID_END_COHERENT_SET(0x8022): {9934 9935 coherent_set_key coherent_set_info_key;9936 guint64 coherent_seq_number = 0;9937 coherent_set_entity_info *register_entry = NULL((void*)0);9938 coherent_set_info *coherent_set_info_entry;9939 9940 coherent_seq_number = rtps_util_add_seq_number(9941 rtps_parameter_tree,9942 tvb,9943 offset,9944 encoding,9945 "coherenceSetSequenceNumber");9946 ti = proto_tree_add_uint64(9947 rtps_parameter_tree,9948 hf_rtps_coherent_set_end,9949 tvb,9950 0,9951 0,9952 coherent_seq_number);9953 proto_item_set_generated(ti);9954 /* Need to finish the stored coherence set */9955 if (coherent_set_entity_info_object != NULL((void*)0)) {9956 register_entry = (coherent_set_entity_info*)wmem_map_lookup(9957 coherent_set_tracking.entities_using_map,9958 &coherent_set_entity_info_object->guid);9959 if (register_entry) {9960 register_entry->coherent_set_seq_number = coherent_seq_number;9961 memset(&coherent_set_info_key, 0, sizeof(coherent_set_info_key));9962 coherent_set_info_key.guid = register_entry->guid;9963 coherent_set_info_key.coherent_set_seq_number = register_entry->coherent_set_seq_number;9964 coherent_set_info_entry = (coherent_set_info*)wmem_map_lookup(9965 coherent_set_tracking.coherent_set_registry_map,9966 &coherent_set_info_key);9967 if (coherent_set_info_entry) {9968 /* The coherence set is completely set up */9969 coherent_set_info_entry->is_set = TRUE(!(0));9970 /* Updating by last time the writer_seq_number */9971 coherent_set_info_entry->writer_seq_number = coherent_set_entity_info_object->writer_seq_number;9972 }9973 }9974 }9975 break;9976 }9977 /* This parameter serializes a long (4-byte integer) and only applies to an end coherent set sample */9978 /* 0...2...........7...............15.............23...............319979 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+9980 * | MIG..._SET_SAMPLE_COUNT | length |9981 * +---------------+---------------+---------------+---------------+9982 * + sampleCount +9983 * +---------------+---------------+---------------+---------------+9984 */9985 case MIG_RTPS_PID_END_COHERENT_SET_SAMPLE_COUNT(0x8024): {9986 guint32 sample_count = tvb_get_guint32(tvb, offset, encoding);9987 9988 proto_tree_add_uint(9989 rtps_parameter_tree,9990 hf_rtps_param_mig_end_coherent_set_sample_count,9991 tvb, offset,9992 sizeof(guint32),9993 sample_count);9994 break;9995 }9996 9997 /* 0...2...........7...............15.............23...............319998 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+9999 * | PID_DEFAULT_MULTICAST_LOCATOR | 0x0018 |10000 * +---------------+---------------+---------------+---------------+10001 * | long kind |10002 * +---------------+---------------+---------------+---------------+10003 * | long port |10004 * +---------------+---------------+---------------+---------------+10005 * | ipv6addr[0] | ipv6addr[1] | ipv6addr[2] | ipv6addr[3] |10006 * +---------------+---------------+---------------+---------------+10007 * | ipv6addr[4] | ipv6addr[5] | ipv6addr[6] | ipv6addr[7] |10008 * +---------------+---------------+---------------+---------------+10009 * | ipv6addr[8] | ipv6addr[9] | ipv6addr[10] | ipv6addr[11] |10010 * +---------------+---------------+---------------+---------------+10011 * | ipv6addr[12] | ipv6addr[13] | ipv6addr[14] | ipv6addr[15] |10012 * +---------------+---------------+---------------+---------------+10013 */10014 case PID_DEFAULT_MULTICAST_LOCATOR(0x0048): {10015 ENSURE_LENGTH(24);10016 rtps_util_add_locator_t(rtps_parameter_tree, pinfo, tvb, offset, encoding, "locator");10017 break;10018 }10019 10020 default:10021 return FALSE(0);10022 } /* End of switch(parameter) */10023 10024 return TRUE(!(0));10025}10026#undef ENSURE_LENGTH10027 10028static gint dissect_parameter_sequence(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,10029 gint offset, const guint encoding, guint size, const char *label,10030 guint16 version, guint32 *pStatusInfo, guint16 vendor_id,10031 gboolean is_inline_qos, coherent_set_entity_info *coherent_set_entity_info_object) {10032 10033 proto_item *ti, *param_item, *param_len_item = NULL((void*)0);10034 proto_tree *rtps_parameter_sequence_tree, *rtps_parameter_tree;10035 guint32 parameter, param_length, param_length_length = 2;10036 gint original_offset = offset, initial_offset = offset;10037 type_mapping * type_mapping_object = NULL((void*)0);10038 const gchar * param_name = NULL((void*)0);10039 if (!pinfo->fd->visited) {10040 /*10041 * At minimum, type_mapping_object->fields_visited must be10042 * initialized to 0, because we haven't visited any fields10043 * yet. The routines that visit fields just set individual10044 * bits in type_mapping_object->fields_visited; they don't10045 * initialize it.10046 */10047 type_mapping_object = wmem_new(wmem_file_scope(), type_mapping)((type_mapping*)wmem_alloc((wmem_file_scope()), sizeof(type_mapping
)))
;10048 type_mapping_object->fields_visited = 0;10049 type_mapping_object->guid.fields_present = 0;10050 }10051 10052 rtps_parameter_sequence_tree = proto_tree_add_subtree_format(tree, tvb, offset, size,10053 ett_rtps_parameter_sequence, &ti, "%s:", label);10054 10055 /* Loop through all the parameters defined until PID_SENTINEL is found */10056 for (;;) {10057 size -= offset - original_offset;10058 if (size < 4) {10059 expert_add_info_format(pinfo, (param_len_item == NULL((void*)0)) ? ti : param_len_item,10060 &ei_rtps_parameter_value_invalid, "ERROR: not enough bytes to read the next parameter");10061 return offset + size;10062 }10063 original_offset = offset;10064 10065 /* Reads parameter and create the sub tree. At this point we don't know10066 * the final string that will identify the node or its length. It will10067 * be set later...10068 */10069 parameter = tvb_get_guint16(tvb, offset, encoding);10070 param_length = tvb_get_guint16(tvb, offset+2, encoding);10071 if ((parameter & PID_EXTENDED(0x3f01)) == PID_EXTENDED(0x3f01)) {10072 offset += 4;10073 /* get extended member id and length */10074 parameter = tvb_get_guint32(tvb, offset, encoding);10075 param_length = tvb_get_guint32(tvb, offset+4, encoding);10076 param_length_length = 4;10077 }10078 if (version < 0x0200) {10079 rtps_parameter_tree = proto_tree_add_subtree(rtps_parameter_sequence_tree, tvb, offset, -1,10080 ett_rtps_parameter, &param_item, val_to_str(parameter, parameter_id_vals, "Unknown (0x%04x)"));10081 10082 proto_tree_add_uint(rtps_parameter_tree, hf_rtps_parameter_id, tvb, offset, 2, parameter);10083 } else {10084 gboolean goto_default = TRUE(!(0));10085 switch(vendor_id) {10086 case RTPS_VENDOR_RTI_DDS(0x0101):10087 case RTPS_VENDOR_RTI_DDS_MICRO(0x010A): {10088 if (is_inline_qos) {10089 param_name = try_val_to_str(parameter, parameter_id_inline_qos_rti);10090 if (param_name != NULL((void*)0)) {10091 rtps_parameter_tree = proto_tree_add_subtree(rtps_parameter_sequence_tree, tvb, offset, -1,10092 ett_rtps_parameter, &param_item, val_to_str(parameter, parameter_id_inline_qos_rti, "Unknown (0x%04x)"));10093 proto_tree_add_uint(rtps_parameter_tree, hf_rtps_parameter_id_inline_rti, tvb, offset,10094 param_length_length, parameter);10095 goto_default = FALSE(0);10096 }10097 } else {10098 param_name = try_val_to_str(parameter, parameter_id_rti_vals);10099 if (param_name != NULL((void*)0)) {10100 rtps_parameter_tree = proto_tree_add_subtree(rtps_parameter_sequence_tree, tvb, offset, -1,10101 ett_rtps_parameter, &param_item, val_to_str(parameter, parameter_id_rti_vals, "Unknown (0x%04x)"));10102 proto_tree_add_uint(rtps_parameter_tree, hf_rtps_parameter_id_rti, tvb, offset,10103 param_length_length, parameter);10104 goto_default = FALSE(0);10105 }10106 }10107 break;10108 }10109 case RTPS_VENDOR_TOC(0x0106): {10110 param_name = try_val_to_str(parameter, parameter_id_toc_vals);10111 if (param_name != NULL((void*)0)) {10112 rtps_parameter_tree = proto_tree_add_subtree(rtps_parameter_sequence_tree, tvb, offset, -1,10113 ett_rtps_parameter, &param_item, val_to_str(parameter, parameter_id_toc_vals, "Unknown (0x%04x)"));10114 10115 proto_tree_add_uint(rtps_parameter_tree, hf_rtps_parameter_id_toc, tvb, offset,10116 param_length_length, parameter);10117 goto_default = FALSE(0);10118 }10119 break;10120 }10121 case RTPS_VENDOR_ADL_DDS(0x0102): {10122 param_name = try_val_to_str(parameter, parameter_id_adl_vals);10123 if (param_name != NULL((void*)0)) {10124 rtps_parameter_tree = proto_tree_add_subtree(rtps_parameter_sequence_tree, tvb, offset, -1,10125 ett_rtps_parameter, &param_item, val_to_str(parameter, parameter_id_adl_vals, "Unknown (0x%04x)"));10126 10127 proto_tree_add_uint(rtps_parameter_tree, hf_rtps_parameter_id_adl, tvb, offset,10128 param_length_length, parameter);10129 goto_default = FALSE(0);10130 }10131 break;10132 }10133 }10134 if (goto_default) {10135 rtps_parameter_tree = proto_tree_add_subtree(rtps_parameter_sequence_tree, tvb, offset, -1,10136 ett_rtps_parameter, &param_item, val_to_str(parameter, parameter_id_v2_vals, "Unknown (0x%04x)"));10137 proto_tree_add_uint(rtps_parameter_tree, hf_rtps_parameter_id_v2, tvb, offset,10138 param_length_length, parameter);10139 }10140 10141 }10142 /* after param_id */10143 offset += param_length_length;10144 10145 if (parameter == PID_SENTINEL(0x01)) {10146 /* PID_SENTINEL closes the parameter list, (length is ignored) */10147 proto_item_set_len(param_item, 4);10148 offset += 2;10149 proto_item_set_len(rtps_parameter_sequence_tree, offset - initial_offset);10150 return offset;10151 }10152 10153 /* parameter length */10154 param_len_item = proto_tree_add_item(rtps_parameter_tree, hf_rtps_parameter_length,10155 tvb, offset, param_length_length, encoding);10156 offset += param_length_length;10157 10158 /* Make sure we have enough bytes for the param value */10159 if ((size-4 < param_length) &&10160 (parameter != PID_SENTINEL(0x01))) {10161 expert_add_info_format(pinfo, param_len_item, &ei_rtps_parameter_value_invalid, "Not enough bytes to read the parameter value");10162 return offset + size;10163 }10164 10165 /* Sets the end of this item (now we know it!) */10166 proto_item_set_len(param_item, param_length+2*param_length_length);10167 10168 /* This way, we can include vendor specific dissections without modifying the main ones */10169 10170 if (!dissect_parameter_sequence_v1(rtps_parameter_tree, pinfo, tvb, param_item, param_len_item,10171 offset, encoding, size, param_length, parameter, version, type_mapping_object, coherent_set_entity_info_object)) {10172 if ((version < 0x0200) ||10173 !dissect_parameter_sequence_v2(rtps_parameter_tree, pinfo, tvb, param_item, param_len_item,10174 offset, encoding, param_length, parameter,10175 pStatusInfo, vendor_id, type_mapping_object, coherent_set_entity_info_object)) {10176 if (param_length > 0) {10177 proto_tree_add_item(rtps_parameter_tree, hf_rtps_parameter_data, tvb,10178 offset, param_length, ENC_NA0x00000000);10179 }10180 }10181 }10182 10183 switch (vendor_id) {10184 case RTPS_VENDOR_RTI_DDS(0x0101):10185 case RTPS_VENDOR_RTI_DDS_MICRO(0x010A): {10186 dissect_parameter_sequence_rti_dds(rtps_parameter_tree, pinfo, tvb,10187 param_item, param_len_item, offset, encoding, param_length, parameter, type_mapping_object, is_inline_qos, vendor_id);10188 break;10189 }10190 case RTPS_VENDOR_TOC(0x0106): {10191 dissect_parameter_sequence_toc(rtps_parameter_tree, pinfo, tvb,10192 param_item, param_len_item, offset, encoding, param_length, parameter);10193 break;10194 }10195 case RTPS_VENDOR_ADL_DDS(0x0102): {10196 dissect_parameter_sequence_adl(rtps_parameter_tree, pinfo, tvb,10197 param_item, param_len_item, offset, encoding, param_length, parameter);10198 break;10199 }10200 default:10201 break;10202 }10203 10204 rtps_util_insert_type_mapping_in_registry(pinfo, type_mapping_object);10205 offset += param_length;10206 }10207 return offset;10208}10209 10210static gboolean rtps_is_ping(tvbuff_t *tvb, packet_info *pinfo, gint offset)10211{10212 gboolean is_ping = FALSE(0);10213 10214 if (!tvb_strneql(tvb, offset, "NDDSPING", 8))10215 is_ping = TRUE(!(0));10216 10217 if (is_ping)10218 col_set_str(pinfo->cinfo, COL_INFO, "PING");10219 10220 return is_ping;10221}10222 10223/* *********************************************************************** */10224/* * A P P_ A C K_ C O N F * */10225/* *********************************************************************** */10226static void dissect_APP_ACK_CONF(tvbuff_t *tvb,10227 packet_info *pinfo _U___attribute__((unused)),10228 gint offset,10229 guint8 flags,10230 const guint encoding,10231 int octets_to_next_header,10232 proto_tree *tree,10233 proto_item *item,10234 endpoint_guid * guid)10235 {10236 /*10237 * 0...2...........7...............15.............23...............3110238 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+10239 * | APP_ACK_CONF |X|X|X|X|X|X|X|E| octetsToNextHeader |10240 * +---------------+---------------+---------------+---------------+10241 * | EntityId readerEntityId |10242 * +---------------+---------------+---------------+---------------+10243 * | EntityId writerEntityId |10244 * +---------------+---------------+---------------+---------------+10245 * + unsigned long virtualWriterCount +10246 * +---------------+---------------+---------------+---------------+10247 * | GuidPrefix virtualWriterGuidPrefix |10248 * +---------------+---------------+---------------+---------------+10249 * EntityId virtualWriterObjectId10250 *10251 * (after last interval) unsigned long virtualWriterEpoch10252 *10253 */10254 gint original_offset; /* Offset to the readerEntityId */10255 gint32 virtual_writer_count;10256 guint32 wid;10257 proto_item *octet_item;10258 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, APP_ACK_CONF_FLAGS, flags);10259 10260 octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb, offset + 2, 2, encoding);10261 offset += 4;10262 original_offset = offset;10263 10264 if (octets_to_next_header < 20) {10265 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", 20);10266 return;10267 }10268 10269 /* readerEntityId */10270 rtps_util_add_entity_id(tree,10271 tvb,10272 offset,10273 hf_rtps_sm_rdentity_id,10274 hf_rtps_sm_rdentity_id_key,10275 hf_rtps_sm_rdentity_id_kind,10276 ett_rtps_rdentity,10277 "readerEntityId",10278 NULL((void*)0));10279 offset += 4;10280 10281 /* writerEntityId */10282 rtps_util_add_entity_id(tree,10283 tvb,10284 offset,10285 hf_rtps_sm_wrentity_id,10286 hf_rtps_sm_wrentity_id_key,10287 hf_rtps_sm_wrentity_id_kind,10288 ett_rtps_wrentity,10289 "writerEntityId",10290 &wid);10291 offset += 4;10292 guid->entity_id = wid;10293 guid->fields_present |= GUID_HAS_ENTITY_ID0x00000008;10294 rtps_util_add_topic_info(tree, pinfo, tvb, offset, guid);10295 10296 /* virtualWriterCount */10297 proto_tree_add_item_ret_uint(tree, hf_rtps_param_app_ack_conf_virtual_writer_count, tvb, offset, 4,10298 encoding, &virtual_writer_count);10299 offset += 4;10300 10301 {10302 /* Deserialize Virtual Writers */10303 proto_tree *sil_tree_writer_list;10304 proto_tree *sil_tree_writer;10305 10306 gint32 current_writer_index = 0;10307 10308 /** Writer list **/10309 10310 sil_tree_writer_list = proto_tree_add_subtree_format(tree, tvb, offset, -1,10311 ett_rtps_app_ack_virtual_writer_list, NULL((void*)0), "Virtual Writer List");10312 10313 current_writer_index = 0;10314 10315 while (current_writer_index < virtual_writer_count) {10316 sil_tree_writer = proto_tree_add_subtree_format(sil_tree_writer_list, tvb, offset, -1,10317 ett_rtps_app_ack_virtual_writer, NULL((void*)0), "virtualWriter[%d]", current_writer_index);10318 10319 /* Virtual Writer Guid */10320 rtps_util_add_guid_prefix_v2(sil_tree_writer, tvb, offset,10321 hf_rtps_sm_guid_prefix, hf_rtps_sm_host_id, hf_rtps_sm_app_id,10322 hf_rtps_sm_instance_id, 0);10323 10324 rtps_util_add_entity_id(sil_tree_writer, tvb, offset+12,10325 hf_rtps_sm_entity_id, hf_rtps_sm_entity_id_key, hf_rtps_sm_entity_id_kind,10326 ett_rtps_entity, "virtualGUIDSuffix", NULL((void*)0));10327 10328 offset += 16;10329 10330 /* Counter */10331 proto_tree_add_item(tree, hf_rtps_param_app_ack_conf_count, tvb, offset, 4, encoding);10332 offset += 4;10333 10334 current_writer_index++;10335 10336 } /* virtual_writer_count */10337 }10338 10339 10340 if (offset < original_offset + octets_to_next_header)10341 {10342 /* In this case there must be something wrong in the bitmap: there10343 * are some extra bytes that we don't know how to decode10344 */10345 expert_add_info_format(pinfo, item, &ei_rtps_extra_bytes, "Don't know how to decode those extra bytes: %d", octets_to_next_header - offset);10346 }10347 else if (offset > original_offset + octets_to_next_header)10348 {10349 /* Decoding the bitmap went over the end of this submessage.10350 * Enter an item in the protocol tree that spans over the entire10351 * submessage.10352 */10353 expert_add_info(pinfo, item, &ei_rtps_missing_bytes);10354 }10355}10356 10357static void dissect_parameterized_serialized_data(proto_tree *tree, tvbuff_t *tvb,10358 gint offset_input, int size, const guint encoding)10359{10360 guint32 member_id, member_length;10361 proto_item * ti;10362 proto_tree * data_tree, * member_tree;10363 gint offset = offset_input;10364 gint deserialized_size = 0;10365 data_tree = proto_tree_add_subtree_format(tree, tvb, offset, -1,10366 ett_rtps_serialized_data, &ti, "serializedData");10367 while (deserialized_size < size) {10368 ALIGN_ZERO(offset, 2, offset_input)(offset -= offset_input, offset = (((offset) + ((2) - 1)) &
~((2) - 1)), offset += offset_input)
;10369 member_id = tvb_get_guint16(tvb, offset, encoding);10370 member_length = tvb_get_guint16(tvb, offset+2, encoding);10371 10372 if ((member_id & PID_EXTENDED(0x3f01)) == PID_EXTENDED(0x3f01)) {10373 member_id = tvb_get_guint32(tvb, offset+4, encoding);10374 member_length = tvb_get_guint32(tvb, offset+8, encoding);10375 member_tree = proto_tree_add_subtree_format(data_tree, tvb, offset, member_length + 12,10376 ett_rtps_data_member, NULL((void*)0), "Member (id = %u, len = %u)", member_id, member_length);10377 proto_tree_add_item(member_tree, hf_rtps_pl_cdr_member_id_ext, tvb, offset+4, 4, encoding);10378 proto_tree_add_item(member_tree, hf_rtps_pl_cdr_member_length_ext, tvb, offset+8, 4, encoding);10379 offset += 12;10380 deserialized_size += 12;10381 } else if ((member_id & PID_LIST_END(0x3f02)) == PID_LIST_END(0x3f02)){10382 /* If this is the end of the list, don't add a tree.10383 * If we add more logic here in the future, take into account that10384 * offset is incremented by 4 */10385 deserialized_size += 4;10386 break;10387 } else {10388 member_tree = proto_tree_add_subtree_format(data_tree, tvb, offset, member_length + 4,10389 ett_rtps_data_member, NULL((void*)0), "Member (id = %u, len = %u)", member_id, member_length);10390 proto_tree_add_item(member_tree, hf_rtps_pl_cdr_member_id, tvb, offset, 2, encoding);10391 proto_tree_add_item(member_tree, hf_rtps_pl_cdr_member_length, tvb, offset+2, 2, encoding);10392 offset += 4;10393 deserialized_size += 4;10394 }10395 10396 proto_tree_add_item(member_tree, hf_rtps_pl_cdr_member, tvb, offset,10397 member_length, encoding);10398 offset = check_offset_addition(offset, member_length, tree, NULL((void*)0), tvb);10399 deserialized_size += member_length;10400 }10401 proto_item_set_len(ti, deserialized_size);10402}10403 10404/************************************************************************ */10405/* Encapsulated data * */10406/* ********************************************************************** */10407/*10408 * Note: the encapsulation header is ALWAYS big endian, then the encapsulation10409 * type specified the type of endianness of the payload.10410 * 0...2...........8...............16..............24..............3210411 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+10412 *| representation_identifier | X X X X X X X X X X X | C C C P P |10413 *+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+10414 *~ ~10415 * ~... Bytes of data representation using a format that ... ~10416 * ~... depends on the RepresentationIdentifier and options ... ~10417 * ~ ~10418 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+10419 *10420 * X = Unused options bits10421 * C = Compression bits10422 * P = Padding bits10423 *10424 * If compressed:10425 * 0...2...........8...............16..............24..............3210426 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+10427 * | representation_identifier | X X X X X X X X X X X | C C C P P |10428 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+10429 * ~ Uncompressed Length ~10430 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+10431 * ~ *Extended Compression Options ~10432 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+10433 * ~ Compressed User Data ... ~10434 * ~ ~10435 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+10436 *10437 * C = 0b111 would be extended compression options which would come in as an10438 * additional header before the payload.10439 * C = 0b000 to indicate no compression10440 *10441 * This options field would be used for future enhancements.For example,10442 * could be used to define a custom compressor plugin for matching purposes.10443 */10444 10445 /* Dissects the encapsultaion header and uncompress the serialized10446 * data if is is compressed and it is compressed in using Zlib.10447 *10448 * @param[in] tree10449 * @param[in] packet info.10450 * @param[in] tvb10451 * @param[in] offset offset at the beginning of the encapsulation id.10452 * @param[in] size in bytes from the initial offset to the end of the serialized data10453 * @param[in] uncompress_if_compressed true for uncompressing if the data should be uncompressed.10454 * @param[out] encapsulation_id_out If not null it will contain the encapsultaion_id10455 * @param[out] compression_option_out If not null it will contain the compression option10456 * @param[out] padding_bytes_out If not null it will contain the padding bytes10457 * @param[out] extended_compression_options_out If not null it will contain the extended compression options10458 * @param[out] extended_header_bits_out If not null it will contain the extended header bits10459 * @param[out] is_compressed_out If not null it will indicate if the serielized data is compressed10460 * @param[out] uncompressed_ok_out If not null it will indicate if the serizlized data has been successfully uncompressed10461 * @param[out] uncompressed_tvb_out If not null it will contain the uncompressed tvb pointer. If the seriaized data is not uncompressed it will return NULL.10462 * @param[out] compressed_data_tree_out If not null it will contain the subtree of the uncompressed data.10463 *10464 * @return the offset after the at the beginining of the serialized data10465 * @note All output parameters are optional.10466 */10467static10468gint rtps_prepare_encapsulated_data(10469 proto_tree *tree,10470 packet_info *pinfo,10471 tvbuff_t *tvb,10472 gint offset,10473 int size,10474 gboolean uncompress_if_compressed,10475 guint16 *encapsulation_id_out,10476 guint8 *compression_option_out,10477 guint8 *padding_bytes_out,10478 guint32 *extended_compression_options_out,10479 guint8 *extended_header_bits_out,10480 gboolean *is_compressed_out,10481 gboolean *uncompressed_ok_out,10482 tvbuff_t **uncompressed_tvb_out,10483 proto_tree **compressed_data_tree_out) {10484 gint initial_offset = offset;10485 gint16 encapsulation_options = 0;10486 guint32 compressed_size = 0;10487 guint32 uncompressed_size = 0;10488 guint16 encapsulation_id = 0;10489 guint8 compression_option = 0;10490 guint8 padding_bytes = 0;10491 guint32 extended_compression_options = 0;10492 guint8 extended_header_bits = 0;10493 gboolean is_compressed = 0;10494 gboolean uncompressed_ok = 0;10495 tvbuff_t *uncompressed_tvb = NULL((void*)0);10496 10497 /* This logic applies to data that is not a fragment (-1) or is the first fragment */10498 /* Encapsulation ID */10499 encapsulation_id = tvb_get_ntohs(tvb, offset); /* Always big endian */10500 proto_tree_add_uint(tree,10501 hf_rtps_param_serialize_encap_kind, tvb, offset, 2, encapsulation_id);10502 offset += 2;10503 10504 offset = rtps_util_dissect_encapsulation_options(10505 tree,10506 tvb,10507 offset,10508 &encapsulation_options,10509 &compression_option,10510 &padding_bytes,10511 &extended_header_bits);10512 /* If compressed on a supported format we have to uncompress it on a new tvb10513 * and reset the offset */10514 is_compressed = (encapsulation_options & ENCAPSULATION_OPTIONS_COMPRESSION_BYTES_MASK(0x1C)) != 0;10515 if (is_compressed) {10516 uncompressed_size = tvb_get_gint32(tvb, offset, ENC_BIG_ENDIAN0x00000000);10517 proto_tree_add_item(10518 tree,10519 hf_rtps_uncompressed_serialized_length,10520 tvb,10521 offset,10522 4,10523 ENC_BIG_ENDIAN0x00000000);10524 offset += 4;10525 /* Get the compression extended options if required */10526 if (extended_header_bits == ENCAPSULATION_OPTIONS_COMPRESSION_EXTENDED_HEADER_VALUE(0x1C)) {10527 extended_compression_options = tvb_get_gint32(tvb, offset, ENC_BIG_ENDIAN0x00000000);10528 proto_tree_add_item(10529 tree,10530 hf_rtps_encapsulation_extended_compression_options,10531 tvb,10532 offset,10533 4,10534 ENC_BIG_ENDIAN0x00000000);10535 offset += 4;10536 }10537 /* Get the compressed size. Padding bytes are the padding at the end of the compressed data */10538 compressed_size = size - (offset - initial_offset) - padding_bytes;10539 }10540 10541 /* Only decompress if it is compressed with ZLIB */10542 if (uncompress_if_compressed && (compression_option == RTI_OSAPI_COMPRESSION_CLASS_ID_ZLIB(1))) {10543 gboolean tried_to_uncompress = FALSE(0);10544 proto_item *uncompressed_data_item = NULL((void*)0);10545 10546 /* Try to uncompress the data */10547 uncompressed_tvb = rtps_util_get_uncompressed_tvb_zlib(10548 tvb,10549 offset,10550 compressed_size,10551 &tried_to_uncompress);10552 /* The uncompressed data size must be the same as it is in the "Uncompressed Length" field */10553 uncompressed_ok = (uncompressed_tvb != NULL((void*)0)10554 && (uncompressed_size == (guint32)tvb_reported_length(uncompressed_tvb)));10555 10556 /* If uncompression went well we have a new tvb that holds the uncompressed data */10557 if (tried_to_uncompress) {10558 tvbuff_t *child_tvb = NULL((void*)0);10559 gint child_size = 0;10560 gint child_offset = 0;10561 10562 /* If the tvb is not uncompressed we add use the ovb, offset and size10563 * of the original tvb */10564 if (uncompressed_tvb != NULL((void*)0)) {10565 child_tvb = uncompressed_tvb;10566 child_size = -1;10567 child_offset = 0;10568 } else {10569 child_tvb = tvb;10570 child_size = compressed_size;10571 child_offset = offset;10572 }10573 /* Uncompressed sample hangs from a different subtree */10574 *compressed_data_tree_out = proto_tree_add_subtree(10575 tree,10576 child_tvb,10577 child_offset,10578 child_size,10579 ett_rtps_decompressed_serialized_data,10580 &uncompressed_data_item,10581 "[Decompressed data]");10582 /* If we tried to decompress we need to add hf_rtps_uncompression_ok set to true or false*/10583 if (!(uncompressed_ok)) {10584 expert_add_info_format(10585 pinfo,10586 uncompressed_data_item,10587 &ei_rtps_uncompression_error,10588 "Error: unable to uncompress payload");10589 }10590 }10591 }10592 10593 /* Set the optional output parameters */10594 if (encapsulation_id_out != NULL((void*)0)) {10595 *encapsulation_id_out = encapsulation_id;10596 }10597 if (compression_option_out != NULL((void*)0)) {10598 *compression_option_out = compression_option;10599 }10600 if (padding_bytes_out != NULL((void*)0)) {10601 *padding_bytes_out = padding_bytes;10602 }10603 if (extended_compression_options_out != NULL((void*)0)) {10604 *extended_compression_options_out = extended_compression_options;10605 }10606 if (extended_header_bits_out != NULL((void*)0)) {10607 *extended_header_bits_out = extended_header_bits;10608 }10609 if (is_compressed_out != NULL((void*)0)) {10610 *is_compressed_out = is_compressed;10611 }10612 if (uncompressed_ok_out != NULL((void*)0)) {10613 *uncompressed_ok_out = uncompressed_ok;10614 }10615 if (uncompressed_tvb_out != NULL((void*)0)) {10616 *uncompressed_tvb_out = uncompressed_tvb;10617 }10618 return offset;10619}10620 10621 10622 10623/* *********************************************************************** */10624/* * Serialized data dissector * */10625/* *********************************************************************** */10626/* Note: the encapsulation header is ALWAYS big endian, then the encapsulation10627 * type specified the type of endianness of the payload.10628 *10629 * Fragmentation : Options only appear on first fragment10630 * Serieaized data might be compressed or uncompressed. Depending on that the10631 * header contains more elements. This is indicated in the encapsulation10632 * options where:10633 *10634 * X = Unused options bits10635 * C = Compression bits10636 * P = Padding bits10637 *10638 * 0...2...........8...............16..............24..............3210639 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+10640 * | representation_identifier |X X X X X X X X X X X|C C C P P|10641 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+10642 * ~ ~10643 * ~ ... Bytes of data representation using a format that ... ~10644 * ~ ... depends on the RepresentationIdentifier and options ... ~10645 * ~ ~10646 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+10647 *10648 * If compressed:10649 *10650 * 0...2...........8...............16..............24..............3210651 * + -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+10652 * | representation_identifier | X X X X X X X X X X X | C C C P P |10653 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+10654 * ~ Uncompressed Length ~10655 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+10656 * ~ *Extended Compression Options ~10657 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+10658 * ~ Compressed User Data ... ~10659 * ~ ~10660 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+10661 *10662 * C = 0b111 would be extended compression options which would come in as an10663 * additional header before the payload.10664 * C = 0b000 to indicate no compression10665 *10666 * *This options field would be used for future enhancements.For example,10667 * could be used to define a custom compressor plugin for matching purposes.10668 *10669 */10670 10671static void dissect_serialized_data(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, gint offset,10672 int size, const char *label, guint16 vendor_id, gboolean is_discovery_data,10673 endpoint_guid * guid, gint32 frag_number /* -1 if no fragmentation */) {10674 proto_item *ti;10675 proto_tree *rtps_parameter_sequence_tree;10676 guint16 encapsulation_id;10677 gboolean try_dissection_from_type_object = FALSE(0);10678 guint encapsulation_encoding = ENC_BIG_ENDIAN0x00000000;10679 rtps_dissector_data * data = wmem_new(wmem_packet_scope(), rtps_dissector_data)((rtps_dissector_data*)wmem_alloc((wmem_packet_scope()), sizeof
(rtps_dissector_data)))
;10680 tvbuff_t *data_holder_tvb = tvb;10681 tvbuff_t *compressed_tvb = NULL((void*)0);10682 proto_tree *dissected_data_holder_tree = NULL((void*)0);10683 gboolean is_compressed = FALSE(0);10684 gboolean uncompressed_ok = FALSE(0);10685 proto_tree *compressed_subtree = NULL((void*)0);10686 10687 data->encapsulation_id = 0;10688 data->position_in_batch = -1;10689 /* Creates the sub-tree */10690 rtps_parameter_sequence_tree = proto_tree_add_subtree(tree, tvb, offset, size,10691 ett_rtps_serialized_data, &ti, label);10692 10693 /* We store thisa value for using later */10694 dissected_data_holder_tree = rtps_parameter_sequence_tree;10695 10696 if (frag_number > 1) {10697 /* if the data is a fragment and not the first fragment, simply dissect the10698 content as raw bytes */10699 proto_tree_add_item(rtps_parameter_sequence_tree, hf_rtps_issue_data, tvb,10700 offset, size, ENC_NA0x00000000);10701 } else {10702 /* Dissects the encapsulation header options and uncompress the tvb if it is10703 * compressed and can be uncompressed */10704 offset = rtps_prepare_encapsulated_data(10705 rtps_parameter_sequence_tree,10706 pinfo,10707 tvb,10708 offset,10709 size,10710 TRUE(!(0)),10711 &encapsulation_id,10712 NULL((void*)0),10713 NULL((void*)0),10714 NULL((void*)0),10715 NULL((void*)0),10716 &is_compressed,10717 &uncompressed_ok,10718 &compressed_tvb,10719 &compressed_subtree);10720 data->encapsulation_id = encapsulation_id;10721 if (is_compressed && uncompressed_ok) {10722 data_holder_tvb = compressed_tvb;10723 offset = 0;10724 dissected_data_holder_tree = compressed_subtree;10725 }10726 10727 /* Sets the correct values for encapsulation_encoding */10728 encapsulation_encoding = get_encapsulation_endianness(encapsulation_id);10729 10730 if (encapsulation_id == ENCAPSULATION_CDR_LE(0x0001) ||10731 encapsulation_id == ENCAPSULATION_CDR_BE(0x0000) ||10732 encapsulation_id == ENCAPSULATION_CDR2_LE(0x0007) ||10733 encapsulation_id == ENCAPSULATION_CDR2_BE(0x0006) ||10734 encapsulation_id == ENCAPSULATION_PL_CDR_LE(0x0003) ||10735 encapsulation_id == ENCAPSULATION_PL_CDR_BE(0x0002)) {10736 try_dissection_from_type_object = TRUE(!(0));10737 }10738 10739 /* In case it is compressed only try to dissect the type object if it is correctly uncompressed */10740 try_dissection_from_type_object = try_dissection_from_type_object10741 && ((is_compressed == uncompressed_ok));10742 10743 /* At this point:10744 * - uncompressed_tvb contains the uncompressed tvb or the packet tvb10745 * - compressed_data_tree points to the tree of the uncompressed data10746 * or the rtps_parameter_sequence_tree.10747 * - offset points to 0 of the uncompressed tvb or the offseet of the packet10748 * tvb if it is not decompressed.10749 * Only try to dissect the user data if it is not compressed or it is compressed and correctly uncompressed */10750 if (is_compressed == uncompressed_ok) {10751 if (rtps_util_try_dissector(dissected_data_holder_tree,10752 pinfo, data_holder_tvb, offset, guid, data, encapsulation_encoding,10753 get_encapsulation_version(encapsulation_id), try_dissection_from_type_object)) {10754 return;10755 }10756 /* The payload */10757 size -= 4;10758 switch (encapsulation_id) {10759 /* CDR_LE and CDR_BE data should be dissected like this if it is a fragment or10760 if it is not */10761 case ENCAPSULATION_CDR_LE(0x0001):10762 case ENCAPSULATION_CDR_BE(0x0000):10763 proto_tree_add_item(dissected_data_holder_tree, hf_rtps_issue_data, data_holder_tvb,10764 offset, size, ENC_NA0x00000000);10765 break;10766 10767 case ENCAPSULATION_PL_CDR_LE(0x0003):10768 case ENCAPSULATION_PL_CDR_BE(0x0002):10769 if (is_discovery_data) {10770 dissect_parameter_sequence(dissected_data_holder_tree, pinfo, data_holder_tvb, offset,10771 encapsulation_encoding, size, "serializedData", 0x0200, NULL((void*)0), vendor_id, FALSE(0), NULL((void*)0));10772 }10773 else if (frag_number != NOT_A_FRAGMENT(-1)) {10774 /* fragments should be dissected as raw bytes (not parameterized) */10775 proto_tree_add_item(dissected_data_holder_tree, hf_rtps_issue_data, data_holder_tvb,10776 offset, size, ENC_NA0x00000000);10777 break;10778 }10779 else {10780 /* Instead of showing a warning like before, we now dissect the data as10781 * (id - length - value) members */10782 dissect_parameterized_serialized_data(dissected_data_holder_tree,10783 data_holder_tvb, offset, size, encapsulation_encoding);10784 }10785 break;10786 10787 default:10788 proto_tree_add_item(dissected_data_holder_tree, hf_rtps_data_serialize_data, tvb,10789 offset, size, ENC_NA0x00000000);10790 }10791 }10792 }10793}10794 10795/* *********************************************************************** */10796/* * A P P_ A C K * */10797/* *********************************************************************** */10798static void dissect_APP_ACK(tvbuff_t *tvb,10799 packet_info *pinfo,10800 gint offset,10801 guint8 flags,10802 const guint encoding,10803 int octets_to_next_header,10804 proto_tree *tree,10805 proto_item *item,10806 endpoint_guid * guid)10807 {10808 /*10809 * 0...2...........7...............15.............23...............3110810 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+10811 * | APP_ACK |X|X|X|X|X|X|X|E| octetsToNextHeader |10812 * +---------------+---------------+---------------+---------------+10813 * | EntityId readerEntityId |10814 * +---------------+---------------+---------------+---------------+10815 * | EntityId writerEntityId |10816 * +---------------+---------------+---------------+---------------+10817 * + unsigned long virtualWriterCount +10818 * +---------------+---------------+---------------+---------------+10819 * | GuidPrefix virtualWriterGuidPrefix |10820 * +---------------+---------------+---------------+---------------+10821 * EntityId virtualWriterObjectId10822 * unsigned short intervalCount | unsigned short bytesToNextVirtualWriter10823 *10824 * SequenceNumber intervalFirstSn10825 * SequenceNumber intervalLastSn10826 * unsigned short intervalFlags | unsigned short payloadLength10827 *10828 * (after last interval) unsigned long virtualWriterEpoch10829 *10830 */10831 gint original_offset; /* Offset to the readerEntityId */10832 gint32 virtual_writer_count;10833 guint32 wid; /* Writer EntityID */10834 proto_item *octet_item;10835 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, APP_ACK_FLAGS, flags);10836 10837 octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb,10838 offset + 2, 2, encoding);10839 10840 if (octets_to_next_header < 56) {10841 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", 56);10842 return;10843 }10844 10845 offset += 4;10846 original_offset = offset;10847 10848 /* readerEntityId */10849 rtps_util_add_entity_id(tree,10850 tvb,10851 offset,10852 hf_rtps_sm_rdentity_id,10853 hf_rtps_sm_rdentity_id_key,10854 hf_rtps_sm_rdentity_id_kind,10855 ett_rtps_rdentity,10856 "readerEntityId",10857 &wid);10858 offset += 4;10859 guid->entity_id = wid;10860 rtps_util_add_topic_info(tree, pinfo, tvb, offset, guid);10861 10862 /* writerEntityId */10863 rtps_util_add_entity_id(tree,10864 tvb,10865 offset,10866 hf_rtps_sm_wrentity_id,10867 hf_rtps_sm_wrentity_id_key,10868 hf_rtps_sm_wrentity_id_kind,10869 ett_rtps_wrentity,10870 "writerEntityId",10871 &wid);10872 offset += 4;10873 10874 /* virtualWriterCount */10875 proto_tree_add_item_ret_int(tree, hf_rtps_param_app_ack_virtual_writer_count, tvb, offset, 4, encoding, &virtual_writer_count);10876 offset += 4;10877 10878 10879 {10880 /* Deserialize Virtual Writers */10881 proto_tree *sil_tree_writer_list;10882 10883 gint32 current_writer_index;10884 gint32 current_interval_count;10885 /* guint16 interval_flags = 0; */10886 /* guint32 current_virtual_guid_index = 0;*/10887 10888 /** Writer list **/10889 sil_tree_writer_list = proto_tree_add_subtree_format(tree, tvb, offset, -1,10890 ett_rtps_app_ack_virtual_writer_list, NULL((void*)0), "Virtual Writer List");10891 10892 current_writer_index = 0;10893 10894 while (current_writer_index < virtual_writer_count) {10895 proto_tree *sil_tree_writer;10896 proto_tree *sil_tree_interval_list;10897 gint32 interval_count;10898 10899 sil_tree_writer = proto_tree_add_subtree_format(sil_tree_writer_list, tvb, offset, -1,10900 ett_rtps_app_ack_virtual_writer, NULL((void*)0), "virtualWriter[%d]", current_writer_index);10901 10902 /* Virtual Writer Guid */10903#if 010904 rtps_util_add_generic_guid(sil_tree_writer,10905 tvb,10906 offset,10907 "virtualGUID",10908 buffer,10909 MAX_GUID_SIZE(160));10910#endif10911 offset += 16;10912 10913 10914 /* Interval count */10915 proto_tree_add_item_ret_int(sil_tree_writer, hf_rtps_param_app_ack_interval_count,10916 tvb, offset, 2, encoding, &interval_count);10917 offset += 2;10918 10919 /* bytes to next virtual writer */10920 proto_tree_add_item(sil_tree_writer, hf_rtps_param_app_ack_octets_to_next_virtual_writer,10921 tvb, offset, 2, encoding);10922 offset += 2;10923 10924 /* Interval list */10925 sil_tree_interval_list = proto_tree_add_subtree_format(sil_tree_writer, tvb, offset, -1,10926 ett_rtps_app_ack_virtual_writer_interval_list, NULL((void*)0), "Interval List");10927 10928 current_interval_count = 0;10929 while (current_interval_count < interval_count) {10930 proto_tree *sil_tree_interval;10931 gint32 interval_payload_length;10932 10933 sil_tree_interval = proto_tree_add_subtree_format(sil_tree_interval_list, tvb, offset, -1,10934 ett_rtps_app_ack_virtual_writer_interval, NULL((void*)0), "Interval[%d]", current_interval_count);10935 10936 /* firstVirtualSN */10937 rtps_util_add_seq_number(sil_tree_interval,10938 tvb,10939 offset,10940 encoding,10941 "firstVirtualSN");10942 offset += 8;10943 10944 /* lastVirtualSN */10945 rtps_util_add_seq_number(sil_tree_interval,10946 tvb,10947 offset,10948 encoding,10949 "lastVirtualSN");10950 offset += 8;10951 10952 /* interval flags */10953 proto_tree_add_item(sil_tree_interval, hf_rtps_param_app_ack_interval_flags,10954 tvb, offset, 2, encoding);10955 offset += 2;10956 10957 /* interval payload length */10958 proto_tree_add_item_ret_int(sil_tree_interval, hf_rtps_param_app_ack_interval_payload_length,10959 tvb, offset, 2, encoding, &interval_payload_length);10960 offset += 2;10961 10962 if (interval_payload_length > 0) {10963 proto_tree_add_item(sil_tree_interval, hf_rtps_serialized_data, tvb, offset,10964 interval_payload_length, ENC_NA0x00000000);10965 offset += ((interval_payload_length + 3) & 0xfffffffc);10966 }10967 10968 ++current_interval_count;10969 10970 } /* interval list */10971 10972 /* Count */10973 proto_tree_add_item(tree, hf_rtps_param_app_ack_count, tvb, offset, 4, encoding);10974 offset += 4;10975 10976 current_writer_index++;10977 10978 } /* virtual_writer_count */10979 }10980 10981 10982 if (offset < original_offset + octets_to_next_header)10983 {10984 /* In this case there must be something wrong in the bitmap: there10985 * are some extra bytes that we don't know how to decode10986 */10987 expert_add_info_format(pinfo, item, &ei_rtps_extra_bytes, "Don't know how to decode those extra bytes: %d", octets_to_next_header - offset);10988 }10989 else if (offset > original_offset + octets_to_next_header)10990 {10991 /* Decoding the bitmap went over the end of this submessage.10992 * Enter an item in the protocol tree that spans over the entire10993 * submessage.10994 */10995 expert_add_info(pinfo, item, &ei_rtps_missing_bytes);10996 }10997}10998 10999/* *********************************************************************** */11000/* * P A D * */11001/* *********************************************************************** */11002static void dissect_PAD(tvbuff_t *tvb,11003 packet_info *pinfo,11004 gint offset,11005 guint8 flags,11006 const guint encoding,11007 int octets_to_next_header,11008 proto_tree *tree) {11009 /* 0...2...........7...............15.............23...............3111010 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+11011 * | PAD |X|X|X|X|X|X|X|E| octetsToNextHeader |11012 * +---------------+---------------+---------------+---------------+11013 */11014 proto_item *item;11015 11016 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, PAD_FLAGS, flags);11017 11018 item = proto_tree_add_item(tree,11019 hf_rtps_sm_octets_to_next_header,11020 tvb,11021 offset + 2,11022 2,11023 encoding);11024 if (octets_to_next_header != 0) {11025 expert_add_info(pinfo, item, &ei_rtps_sm_octets_to_next_header_not_zero);11026 }11027}11028 11029 11030 11031 11032 11033/* *********************************************************************** */11034/* * D A T A * */11035/* *********************************************************************** */11036static void dissect_DATA_v1(tvbuff_t *tvb, packet_info *pinfo, gint offset, guint8 flags,11037 const guint encoding, int octets_to_next_header, proto_tree *tree) {11038 /* RTPS 1.0/1.1:11039 * 0...2...........7...............15.............23...............3111040 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+11041 * | DATA |X|X|X|U|H|A|P|E| octetsToNextHeader |11042 * +---------------+---------------+---------------+---------------+11043 * | ObjectId readerObjectId |11044 * +---------------+---------------+---------------+---------------+11045 * | ObjectId writerObjectId |11046 * +---------------+---------------+---------------+---------------+11047 * | HostId hostId (iff H==1) |11048 * +---------------+---------------+---------------+---------------+11049 * | AppId appId (iff H==1) |11050 * +---------------+---------------+---------------+---------------+11051 * | ObjectId objectId |11052 * +---------------+---------------+---------------+---------------+11053 * | |11054 * + SequenceNumber writerSeqNumber +11055 * | |11056 * +---------------+---------------+---------------+---------------+11057 * | |11058 * ~ ParameterSequence parameters [only if P==1] ~11059 * | |11060 * +---------------+---------------+---------------+---------------+11061 * Note: on RTPS 1.0, flag U is not present11062 *11063 * RTPS 1.2:11064 * 0...2...........7...............15.............23...............3111065 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+11066 * | DATA |X|X|U|Q|H|A|D|E| octetsToNextHeader |11067 * +---------------+---------------+---------------+---------------+11068 * | EntityId readerEntityId |11069 * +---------------+---------------+---------------+---------------+11070 * | EntityId writerEntityId |11071 * +---------------+---------------+---------------+---------------+11072 * | |11073 * + KeyHashPrefix keyHashPrefix [only if H==1] +11074 * | |11075 * +---------------+---------------+---------------+---------------+11076 * | KeyHashSuffix keyHashSuffix |11077 * +---------------+---------------+---------------+---------------+11078 * | |11079 * + SequenceNumber writerSeqNum +11080 * | |11081 * +---------------+---------------+---------------+---------------+11082 * | |11083 * ~ ParameterList inlineQos [only if Q==1] ~11084 * | |11085 * +---------------+---------------+---------------+---------------+11086 * | |11087 * ~ SerializedData serializedData [only if D==1] ~11088 * | |11089 * +---------------+---------------+---------------+---------------+11090 * Notes:11091 * - inlineQos is NEW11092 * - serializedData is equivalent to the old 'parameters'11093 */11094 int min_len;11095 gboolean is_builtin_entity = FALSE(0); /* true=entityId.entityKind = built-in */11096 gint old_offset = offset;11097 guint32 wid; /* Writer EntityID */11098 proto_item *octet_item;11099 11100 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, DATA_FLAGSv1, flags);11101 11102 octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb,11103 offset + 2, 2, encoding);11104 11105 /* Calculates the minimum length for this submessage */11106 min_len = 20;11107 if ((flags & FLAG_DATA_H(0x08)) != 0) min_len += 8;11108 if ((flags & FLAG_DATA_Q(0x10)) != 0) min_len += 4;11109 if ((flags & FLAG_DATA_D(0x02)) != 0) min_len += 4;11110 11111 if (octets_to_next_header < min_len) {11112 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", min_len);11113 return;11114 }11115 11116 offset += 4;11117 11118 /* readerEntityId */11119 is_builtin_entity |= rtps_util_add_entity_id(tree, tvb, offset,11120 hf_rtps_sm_rdentity_id, hf_rtps_sm_rdentity_id_key, hf_rtps_sm_rdentity_id_kind,11121 ett_rtps_rdentity, "readerEntityId", NULL((void*)0));11122 offset += 4;11123 11124 /* writerEntityId */11125 is_builtin_entity |= rtps_util_add_entity_id(tree, tvb, offset,11126 hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key, hf_rtps_sm_wrentity_id_kind,11127 ett_rtps_wrentity, "writerEntityId", &wid);11128 offset += 4;11129 11130 /* Checks for predefined declarations11131 *11132 * writerEntityId value | A flag | Extra11133 * -------------------------------------------|--------|-------------11134 * ENTITYID_BUILTIN_SUBSCRIPTIONS_WRITER | 1 | r+11135 * ENTITYID_BUILTIN_SUBSCRIPTIONS_WRITER | 0 | r-11136 * ENTITYID_BUILTIN_PUBLICATIONS_WRITER | 1 | w+11137 * ENTITYID_BUILTIN_PUBLICATIONS_WRITER | 0 | w-11138 * ENTITYID_BUILTIN_PARTICIPANT_WRITER | 1 | p+11139 * ENTITYID_BUILTIN_PARTICIPANT_WRITER | 0 | p- (*)11140 * ENTITYID_BUILTIN_TOPIC_WRITER | 1 | t+ (*)11141 * ENTITYID_BUILTIN_TOPIC_WRITER | 0 | t- (*)11142 *11143 * Note (*): Currently NDDS does not publish those values11144 */11145 if (wid == ENTITYID_BUILTIN_PUBLICATIONS_WRITER(0x000003c2) && (flags & FLAG_DATA_A(0x04)) != 0) {11146 col_append_str(pinfo->cinfo, COL_INFO, SM_EXTRA_WPLUS);11147 } else if (wid == ENTITYID_BUILTIN_PUBLICATIONS_WRITER(0x000003c2) && (flags & FLAG_DATA_A(0x04)) == 0) {11148 col_append_str(pinfo->cinfo, COL_INFO, SM_EXTRA_WMINUS);11149 } else if (wid == ENTITYID_BUILTIN_SUBSCRIPTIONS_WRITER(0x000004c2) && (flags & FLAG_DATA_A(0x04)) != 0) {11150 col_append_str(pinfo->cinfo, COL_INFO, SM_EXTRA_RPLUS);11151 } else if (wid == ENTITYID_BUILTIN_SUBSCRIPTIONS_WRITER(0x000004c2) && (flags & FLAG_DATA_A(0x04)) == 0) {11152 col_append_str(pinfo->cinfo, COL_INFO, SM_EXTRA_RMINUS);11153 } else if (wid == ENTITYID_BUILTIN_PARTICIPANT_WRITER(0x000100c2) && (flags & FLAG_DATA_A(0x04)) != 0) {11154 col_append_str(pinfo->cinfo, COL_INFO, SM_EXTRA_PPLUS);11155 } else if (wid == ENTITYID_BUILTIN_PARTICIPANT_WRITER(0x000100c2) && (flags & FLAG_DATA_A(0x04)) == 0) {11156 col_append_str(pinfo->cinfo, COL_INFO, SM_EXTRA_PMINUS);11157 } else if (wid == ENTITYID_BUILTIN_TOPIC_WRITER(0x000002c2) && (flags & FLAG_DATA_A(0x04)) != 0) {11158 col_append_str(pinfo->cinfo, COL_INFO, SM_EXTRA_TPLUS);11159 } else if (wid == ENTITYID_BUILTIN_TOPIC_WRITER(0x000002c2) && (flags & FLAG_DATA_A(0x04)) == 0) {11160 col_append_str(pinfo->cinfo, COL_INFO, SM_EXTRA_TMINUS);11161 }11162 11163 /* If flag H is defined, read the HostId and AppId fields */11164 if ((flags & FLAG_DATA_H(0x08)) != 0) {11165 rtps_util_add_guid_prefix_v1(tree, tvb, offset,11166 hf_rtps_sm_guid_prefix_v1, hf_rtps_sm_host_id, hf_rtps_sm_app_id,11167 hf_rtps_sm_instance_id_v1, hf_rtps_sm_app_kind,11168 "keyHashPrefix");11169 11170 offset += 8;11171 } else {11172 /* Flag H not set, use hostId, appId from the packet header */11173 }11174 11175 /* Complete the GUID by reading the Object ID */11176 rtps_util_add_entity_id(tree, tvb, offset, hf_rtps_sm_entity_id, hf_rtps_sm_entity_id_key,11177 hf_rtps_sm_entity_id_kind, ett_rtps_entity, "keyHashSuffix", NULL((void*)0));11178 offset += 4;11179 11180 /* Sequence number */11181 rtps_util_add_seq_number(tree, tvb, offset, encoding, "writerSeqNumber");11182 offset += 8;11183 11184 /* InlineQos */11185 if ((flags & FLAG_DATA_Q(0x10)) != 0) {11186 gboolean is_inline_qos = TRUE(!(0));11187 offset = dissect_parameter_sequence(tree, pinfo, tvb, offset,11188 encoding, octets_to_next_header, "inlineQos",11189 0x0102, NULL((void*)0), 0, is_inline_qos, NULL((void*)0));11190 }11191 11192 /* SerializedData */11193 if ((flags & FLAG_DATA_D(0x02)) != 0) {11194 if (is_builtin_entity) {11195 dissect_parameter_sequence(tree, pinfo, tvb, offset,11196 encoding, octets_to_next_header, "serializedData",11197 0x0102, NULL((void*)0), 0, FALSE(0), NULL((void*)0));11198 } else {11199 proto_tree_add_item(tree, hf_rtps_issue_data, tvb, offset,11200 octets_to_next_header - (offset - old_offset) + 4,11201 ENC_NA0x00000000);11202 }11203 }11204}11205 11206static void dissect_DATA_v2(tvbuff_t *tvb, packet_info *pinfo, gint offset, guint8 flags,11207 const guint encoding, int octets_to_next_header, proto_tree *tree,11208 guint16 vendor_id, endpoint_guid *guid) {11209 /*11210 *11211 * 0...2...........7...............15.............23...............3111212 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+11213 * | DATA |X|X|X|I|H|D|Q|E| octetsToNextHeader |11214 * +---------------+---------------+---------------+---------------+11215 * | EntityId readerEntityId |11216 * +---------------+---------------+---------------+---------------+11217 * | EntityId writerEntityId |11218 * +---------------+---------------+---------------+---------------+11219 * | |11220 * + SequenceNumber writerSeqNum +11221 * | |11222 * +---------------+---------------+---------------+---------------+11223 * | |11224 * + +11225 * | KeyHashPrefix keyHashPrefix [only if H==1] |11226 * + +11227 * | |11228 * +---------------+---------------+---------------+---------------+11229 * | KeyHashSuffix keyHashSuffix |11230 * +---------------+---------------+---------------+---------------+11231 * | StatusInfo statusInfo [only if I==1] |11232 * +---------------+---------------+---------------+---------------+11233 * | |11234 * ~ ParameterList inlineQos [only if Q==1] ~11235 * | |11236 * +---------------+---------------+---------------+---------------+11237 * | |11238 * ~ SerializedData serializedData [only if D==1] ~11239 * | |11240 * +---------------+---------------+---------------+---------------+11241 */11242 int min_len;11243 gint old_offset = offset;11244 guint32 wid; /* Writer EntityID */11245 guint32 status_info = 0xffffffff;11246 proto_item *octet_item;11247 gboolean from_builtin_writer;11248 11249 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, DATA_FLAGSv2, flags);11250 11251 octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb,11252 offset + 2, 2, encoding);11253 11254 /* Calculates the minimum length for this submessage */11255 min_len = 20;11256 if ((flags & FLAG_DATA_Q_v2(0x02)) != 0) min_len += 4;11257 if ((flags & FLAG_DATA_D_v2(0x04)) != 0) min_len += 4;11258 if ((flags & FLAG_DATA_H(0x08)) != 0) min_len += 12;11259 11260 if (octets_to_next_header < min_len) {11261 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", min_len);11262 return;11263 }11264 11265 offset += 4;11266 11267 11268 /* readerEntityId */11269 rtps_util_add_entity_id(tree, tvb, offset, hf_rtps_sm_rdentity_id, hf_rtps_sm_rdentity_id_key,11270 hf_rtps_sm_rdentity_id_kind, ett_rtps_rdentity, "readerEntityId", NULL((void*)0));11271 offset += 4;11272 11273 /* writerEntityId */11274 rtps_util_add_entity_id(tree, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key,11275 hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", &wid);11276 offset += 4;11277 guid->entity_id = wid;11278 guid->fields_present |= GUID_HAS_ENTITY_ID0x00000008;11279 rtps_util_add_topic_info(tree, pinfo, tvb, offset, guid);11280 11281 /* Sequence number */11282 rtps_util_add_seq_number(tree, tvb, offset, encoding, "writerSeqNumber");11283 offset += 8;11284 11285 /* If flag H is defined, read the GUID Prefix */11286 if ((flags & FLAG_DATA_H(0x08)) != 0) {11287 rtps_util_add_guid_prefix_v2(tree, tvb, offset, hf_rtps_sm_guid_prefix, hf_rtps_sm_host_id,11288 hf_rtps_sm_app_id, hf_rtps_sm_instance_id, 0);11289 11290 offset += 12;11291 } else {11292 /* Flag H not set, use hostId, appId from the packet header */11293 }11294 11295 /* Complete the GUID by reading the Object ID */11296 rtps_util_add_entity_id(tree, tvb, offset, hf_rtps_sm_entity_id, hf_rtps_sm_entity_id_key,11297 hf_rtps_sm_entity_id_kind, ett_rtps_entity, "keyHashSuffix", NULL((void*)0));11298 offset += 4;11299 11300 if ((flags & FLAG_DATA_I(0x10)) != 0) {11301 proto_tree_add_item(tree, hf_rtps_data_status_info, tvb, offset, 4, encoding);11302 offset += 4;11303 }11304 11305 /* InlineQos */11306 if ((flags & FLAG_DATA_Q_v2(0x02)) != 0) {11307 gboolean is_inline_qos = TRUE(!(0));11308 offset = dissect_parameter_sequence(tree, pinfo, tvb, offset, encoding,11309 octets_to_next_header - (offset - old_offset) + 4,11310 "inlineQos", 0x0200, NULL((void*)0), vendor_id, is_inline_qos, NULL((void*)0));11311 }11312 11313 /* SerializedData */11314 if ((flags & FLAG_DATA_D_v2(0x04)) != 0) {11315 from_builtin_writer = (((wid & ENTITYKIND_BUILTIN_WRITER_WITH_KEY(0xc2)) == ENTITYKIND_BUILTIN_WRITER_WITH_KEY(0xc2))11316 || ((wid & ENTITYKIND_BUILTIN_WRITER_NO_KEY(0xc3)) == ENTITYKIND_BUILTIN_WRITER_NO_KEY(0xc3))11317 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_BOOTSTRAP_WRITER(0x00010082))11318 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_WRITER(0x00010182)))11319 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_WRITER(0xff010182))11320 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_READER(0xff010187)) ? TRUE(!(0)) : FALSE(0);11321 dissect_serialized_data(tree, pinfo, tvb, offset,11322 octets_to_next_header - (offset - old_offset) + 4,11323 "serializedData", vendor_id, from_builtin_writer, guid, NOT_A_FRAGMENT(-1));11324 }11325 generate_status_info(pinfo, wid, status_info);11326}11327 11328 11329static void dissect_HEADER_EXTENSION(tvbuff_t* tvb, packet_info* pinfo, gint offset, guint8 flags,11330 const guint encoding, proto_tree* tree, int octets_to_next_header, guint16 vendor_id) {11331 /*11332 * 0...2...........7...............15.............23...............3111333 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+11334 * | DATA_HE |P|C|C|W|U|T|L|E| octetsToNextHeader |11335 * +---------------+---------------+---------------+---------------+11336 * | MessageLength messageLength (Only if L == 1 ) |11337 * +---------------+---------------+---------------+---------------+11338 * | |11339 * + TimeStamp rtpsSendTimestamp (Only if T == 1 ) +11340 * | |11341 * +---------------+---------------+---------------+---------------+11342 * | UExtension4 uExtension (Only if U == 1 ) |11343 * +---------------+---------------+---------------+---------------+11344 * | |11345 * + WExtension8 wExtension8 (Only if W == 1 ) +11346 * | |11347 * +---------------+---------------+---------------+---------------+11348 * | |11349 * + Checksum messageChecksum (Only if CC != 00 ) +11350 * | |11351 * +---------------+---------------+---------------+---------------+11352 * | |11353 * + ParameterList parameters (Only if P != 0 ) +11354 * | |11355 * +---------------+---------------+---------------+---------------+11356 * C1,C2 == 01 -> 4 bytes checksum11357 * C1,C2 == 10 -> 8 bytes checksum11358 * C1,C2 == 11 -> 16 bytes checksum11359 */11360#define RTPS_HE_ENDIANESS_FLAG(0x01) (0x01)11361#define RTPS_HE_MESSAGE_LENGTH_FLAG(0x02) (0x02)11362#define RTPS_HE_TIMESTAMP_FLAG(0x04) (0x04)11363#define RTPS_HE_UEXTENSION_FLAG(0x08) (0x08)11364#define RTPS_HE_WEXTENSION_FLAG(0x10) (0x10)11365#define RTPS_HE_CHECKSUM_2_FLAG(0x20) (0x20)11366#define RTPS_HE_CHECKSUM_1_FLAG(0x40) (0x40)11367#define RTPS_HE_PARAMETERS_FLAG(0x80) (0x80)11368 11369#define RTPS_HE_CHECKSUM_CRC32(0x20) RTPS_HE_CHECKSUM_2_FLAG(0x20)11370#define RTPS_HE_CHECKSUM_CRC64(0x40) RTPS_HE_CHECKSUM_1_FLAG(0x40)11371#define RTPS_HE_CHECKSUM_MD5((0x40) | (0x20)) (RTPS_HE_CHECKSUM_1_FLAG(0x40) | RTPS_HE_CHECKSUM_2_FLAG(0x20))11372 11373 guint8 checksum_type = 0;11374 gint initial_offset = offset;11375 guint checksum_flags = PROTO_CHECKSUM_NO_FLAGS0x00;11376 gboolean is_crc_supported = true1;11377 /*Checksum can be CRC32, CRC64 and MD5 */11378 union _calculated_checksum {11379 uint8_t md5[RTPS_CHECKSUM_MAX_LEN16];11380 uint32_t crc32c;11381 uint64_t crc64;11382 } calculated_checksum, he_checksum;11383 11384 ++offset;11385 proto_tree_add_bitmask_value(11386 tree,11387 tvb,11388 offset,11389 hf_rtps_header_extension_flags,11390 ett_rtps_flags,11391 HEADER_EXTENSION_MASK_FLAGS,11392 flags);11393 ++offset;11394 proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb, offset, 2, encoding);11395 offset += 2;11396 if ((flags & RTPS_HE_MESSAGE_LENGTH_FLAG(0x02)) == RTPS_HE_MESSAGE_LENGTH_FLAG(0x02)) {

32

Assuming the condition is false

33

Taking false branch

11397 proto_tree_add_item(tree, hf_rtps_message_length, tvb, offset, 4, encoding);11398 offset += 4;11399 }11400 if ((flags & RTPS_HE_TIMESTAMP_FLAG(0x04)) == RTPS_HE_TIMESTAMP_FLAG(0x04)) {

34

Assuming the condition is false

35

Taking false branch

11401 rtps_util_add_timestamp(tree,11402 tvb, offset,11403 encoding,11404 hf_rtps_timestamp);11405 offset += 8;11406 }11407 if ((flags & RTPS_HE_UEXTENSION_FLAG(0x08)) == RTPS_HE_UEXTENSION_FLAG(0x08)) {

36

Assuming the condition is false

37

Taking false branch

11408 proto_tree_add_item(tree, hf_rtps_uextension, tvb, offset, 4, encoding);11409 offset += 4;11410 }11411 if ((flags & RTPS_HE_WEXTENSION_FLAG(0x10)) == RTPS_HE_WEXTENSION_FLAG(0x10)) {

38

Assuming the condition is false

39

Taking false branch

11412 proto_tree_add_item(tree, hf_rtps_wextension, tvb, offset, 8, encoding);11413 offset += 8;11414 }11415 checksum_type = (flags & (RTPS_HE_CHECKSUM_2_FLAG(0x20) | RTPS_HE_CHECKSUM_1_FLAG(0x40)));11416 if (checksum_type != 0) {

40

Assuming 'checksum_type' is not equal to 0

11417 gint checksum_len = 0;11418 11419 /* Adds the CRC of the RTPS message */11420 switch (checksum_type) {

42

Control jumps to 'case 32:' at line 11422

11421 /* 32-bit checksum */11422 case RTPS_HE_CHECKSUM_CRC32(0x20):11423 checksum_len = 4;11424 break;11425 11426 /* 64-bit checksum */11427 case RTPS_HE_CHECKSUM_CRC64(0x40):11428 checksum_len = 8;11429 is_crc_supported = false0;11430 break;11431 11432 /* 128-bit checksum */11433 case RTPS_HE_CHECKSUM_MD5((0x40) | (0x20)):11434 checksum_len = 16;11435 break;11436 default:11437 break;11438 }11439 11440 /* If the check CRC feature is enabled */11441 if (enable_rtps_crc_check && is_crc_supported) {

43

Assuming 'enable_rtps_crc_check' is false

11442 char* tvb_zero_checksum = NULL((void*)0);11443 rtps_tvb_field *rtps_root = NULL((void*)0);11444 11445 checksum_flags = PROTO_CHECKSUM_VERIFY0x01;11446 rtps_root = (rtps_tvb_field*)p_get_proto_data(pinfo->pool, pinfo, proto_rtps, RTPS_ROOT_MESSAGE_KEY4);11447 if (rtps_root != NULL((void*)0)) {11448 /* The checksum in the wire is the checksum of the RTPS message with the11449 * checksum field set to 0. To calculate the checksum of the RTPS message11450 * we need to set those bytes to 0 in a separate buffer.11451 */11452 tvb_zero_checksum = wmem_alloc0_array(wmem_packet_scope(), char, rtps_root->tvb_len)((char*)wmem_alloc0((wmem_packet_scope()), (((((rtps_root->
tvb_len)) <= 0) || ((size_t)sizeof(char) > (9223372036854775807L
/ (size_t)((rtps_root->tvb_len))))) ? 0 : (sizeof(char) *
((rtps_root->tvb_len))))))
;11453 tvb_memcpy(11454 rtps_root->tvb,11455 tvb_zero_checksum,11456 rtps_root->tvb_offset,11457 rtps_root->tvb_len);11458 11459 /* Set checksum bytes to 0 */11460 memset(tvb_zero_checksum + offset, 0, checksum_len);11461 switch (checksum_type) {11462 case RTPS_HE_CHECKSUM_CRC32(0x20):11463 /* Checksum is always big endian */11464 he_checksum.crc32c = tvb_get_guint32(tvb, offset, ENC_BIG_ENDIAN0x00000000);11465 calculated_checksum.crc32c = crc32c_calculate_no_swap(11466 tvb_zero_checksum,11467 rtps_root->tvb_len,11468 CRC32C_PRELOAD0xffffffff);11469 calculated_checksum.crc32c ^= CRC32C_PRELOAD0xffffffff;11470 break;11471 11472 case RTPS_HE_CHECKSUM_CRC64(0x40):11473 /* CRC64 is not supported yet */11474 break;11475 11476 case RTPS_HE_CHECKSUM_MD5((0x40) | (0x20)):11477 tvb_memcpy(11478 tvb,11479 &he_checksum.md5,11480 offset,11481 checksum_len);11482 gcry_md_hash_buffer(11483 GCRY_MD_MD5,11484 calculated_checksum.md5,11485 tvb_zero_checksum,11486 rtps_root->tvb_len);11487 break;11488 11489 default:11490 break;11491 }11492 }11493 }11494 switch (checksum_type) {

44

Control jumps to 'case 32:' at line 11495

11495 case RTPS_HE_CHECKSUM_CRC32(0x20):11496 proto_tree_add_checksum(

45

8th function call argument is an uninitialized value
11497 tree,11498 tvb,11499 offset,11500 hf_rtps_header_extension_checksum_crc32c,11501 -1,11502 &ei_rtps_checksum_check_error,11503 pinfo,11504 calculated_checksum.crc32c,11505 ENC_BIG_ENDIAN0x00000000,11506 checksum_flags);11507 break;11508 case RTPS_HE_CHECKSUM_MD5((0x40) | (0x20)):11509 proto_tree_add_checksum_bytes(11510 tree,11511 tvb,11512 offset,11513 hf_rtps_header_extension_checksum_md5,11514 -1,11515 &ei_rtps_checksum_check_error,11516 pinfo,11517 calculated_checksum.md5,11518 checksum_len,11519 checksum_flags);11520 break;11521 11522 case RTPS_HE_CHECKSUM_CRC64(0x40):11523 default:11524 break;11525 }11526 offset += checksum_len;11527 }11528 if ((flags & RTPS_HE_PARAMETERS_FLAG(0x80)) == RTPS_HE_PARAMETERS_FLAG(0x80)) {11529 guint parameter_endianess = ((flags & RTPS_HE_ENDIANESS_FLAG(0x01)) == RTPS_HE_ENDIANESS_FLAG(0x01))11530 ? ENC_LITTLE_ENDIAN0x8000000011531 : ENC_BIG_ENDIAN0x00000000;11532 dissect_parameter_sequence(tree, pinfo, tvb, offset, parameter_endianess,11533 octets_to_next_header - (offset - initial_offset),11534 "Parameters", 0x0200, NULL((void*)0), vendor_id, FALSE(0), NULL((void*)0));11535 }11536}11537 11538static void dissect_DATA_FRAG(tvbuff_t *tvb, packet_info *pinfo, gint offset, guint8 flags,11539 const guint encoding, int octets_to_next_header, proto_tree *tree,11540 guint16 vendor_id, endpoint_guid *guid) {11541 /*11542 * 0...2...........7...............15.............23...............3111543 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+11544 * | DATA_FRAG |X|X|X|X|X|H|Q|E| octetsToNextHeader |11545 * +---------------+---------------+---------------+---------------+11546 * | EntityId readerEntityId |11547 * +---------------+---------------+---------------+---------------+11548 * | EntityId writerEntityId |11549 * +---------------+---------------+---------------+---------------+11550 * | |11551 * + SequenceNumber writerSeqNum +11552 * | |11553 * +---------------+---------------+---------------+---------------+11554 * | |11555 * + +11556 * | KeyHashPrefix keyHashPrefix [only if H==1] |11557 * + +11558 * | |11559 * +---------------+---------------+---------------+---------------+11560 * | KeyHashSuffix keyHashSuffix |11561 * +---------------+---------------+---------------+---------------+11562 * | FragmentNumber fragmentStartingNum |11563 * +---------------+---------------+---------------+---------------+11564 * | ushort fragmentsInSubmessage | ushort fragmentSize |11565 * +---------------+---------------+---------------+---------------+11566 * | unsigned long sampleSize |11567 * +---------------+---------------+---------------+---------------+11568 * | |11569 * ~ ParameterList inlineQos [only if Q==1] ~11570 * | |11571 * +---------------+---------------+---------------+---------------+11572 * | |11573 * ~ SerializedData serializedData ~11574 * | |11575 * +---------------+---------------+---------------+---------------+11576 */11577 11578 int min_len;11579 gint old_offset = offset;11580 guint32 frag_number = 0;11581 proto_item *octet_item;11582 guint32 wid;11583 gboolean from_builtin_writer;11584 11585 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, DATA_FRAG_FLAGS, flags);11586 11587 octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb,11588 offset + 2, 2, encoding);11589 11590 /* Calculates the minimum length for this submessage */11591 min_len = 32;11592 if ((flags & FLAG_DATA_FRAG_Q(0x02)) != 0) min_len += 4;11593 if ((flags & FLAG_DATA_FRAG_H(0x04)) != 0) min_len += 12;11594 11595 if (octets_to_next_header < min_len) {11596 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", min_len);11597 return;11598 }11599 11600 offset += 4;11601 11602 /* readerEntityId */11603 rtps_util_add_entity_id(tree, tvb, offset, hf_rtps_sm_rdentity_id, hf_rtps_sm_rdentity_id_key,11604 hf_rtps_sm_rdentity_id_kind, ett_rtps_rdentity, "readerEntityId", NULL((void*)0));11605 offset += 4;11606 11607 /* writerEntityId */11608 rtps_util_add_entity_id(tree, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key,11609 hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", &wid);11610 offset += 4;11611 guid->entity_id = wid;11612 guid->fields_present |= GUID_HAS_ENTITY_ID0x00000008;11613 rtps_util_add_topic_info(tree, pinfo, tvb, offset, guid);11614 11615 /* Sequence number */11616 rtps_util_add_seq_number(tree, tvb, offset, encoding, "writerSeqNumber");11617 offset += 8;11618 11619 /* If flag H is defined, read the GUID Prefix */11620 if ((flags & FLAG_DATA_H(0x08)) != 0) {11621 rtps_util_add_guid_prefix_v2(tree, tvb, offset, hf_rtps_sm_guid_prefix,11622 hf_rtps_sm_host_id, hf_rtps_sm_app_id, hf_rtps_sm_instance_id, 0);11623 offset += 12;11624 } else {11625 /* Flag H not set, use hostId, appId from the packet header */11626 }11627 11628 /* Complete the GUID by reading the Object ID */11629 rtps_util_add_entity_id(tree, tvb, offset, hf_rtps_sm_entity_id, hf_rtps_sm_entity_id_key,11630 hf_rtps_sm_entity_id_kind, ett_rtps_entity, "keyHashSuffix", NULL((void*)0));11631 offset += 4;11632 11633 11634 /* Fragment number */11635 proto_tree_add_item_ret_uint(tree, hf_rtps_data_frag_number, tvb, offset, 4, encoding, &frag_number);11636 offset += 4;11637 11638 /* Fragments in submessage */11639 proto_tree_add_item(tree, hf_rtps_data_frag_num_fragments, tvb, offset, 2, encoding);11640 offset += 2;11641 11642 /* Fragment size */11643 proto_tree_add_item(tree, hf_rtps_data_frag_size, tvb, offset, 2, encoding);11644 offset += 2;11645 11646 /* sampleSize */11647 proto_tree_add_item(tree, hf_rtps_data_frag_sample_size, tvb, offset, 4, encoding);11648 offset += 4;11649 11650 /* InlineQos */11651 if ((flags & FLAG_DATA_Q_v2(0x02)) != 0) {11652 gboolean is_inline_qos = TRUE(!(0));11653 offset = dissect_parameter_sequence(tree, pinfo, tvb, offset, encoding,11654 octets_to_next_header - (offset - old_offset) + 4,11655 "inlineQos", 0x0200, NULL((void*)0), vendor_id, is_inline_qos, NULL((void*)0));11656 }11657 11658 /* SerializedData */11659 if ((flags & FLAG_DATA_D_v2(0x04)) != 0) {11660 from_builtin_writer = (((wid & ENTITYKIND_BUILTIN_WRITER_WITH_KEY(0xc2)) == ENTITYKIND_BUILTIN_WRITER_WITH_KEY(0xc2))11661 || ((wid & ENTITYKIND_BUILTIN_WRITER_NO_KEY(0xc3)) == ENTITYKIND_BUILTIN_WRITER_NO_KEY(0xc3))11662 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_BOOTSTRAP_WRITER(0x00010082))11663 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_WRITER(0x00010182)))11664 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_WRITER(0xff010182))11665 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_READER(0xff010187)) ? TRUE(!(0)) : FALSE(0);11666 dissect_serialized_data(tree, pinfo, tvb, offset,11667 octets_to_next_header - (offset - old_offset) + 4,11668 "serializedData", vendor_id, from_builtin_writer, NULL((void*)0), (gint32)frag_number);11669 }11670}11671 11672 11673/* *********************************************************************** */11674/* * N O K E Y _ D A T A * */11675/* *********************************************************************** */11676static void dissect_NOKEY_DATA(tvbuff_t *tvb, packet_info *pinfo, gint offset, guint8 flags,11677 const guint encoding, int octets_to_next_header, proto_tree *tree,11678 guint16 version, guint16 vendor_id) {11679 /* RTPS 1.0/1.1:11680 * 0...2...........7...............15.............23...............3111681 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+11682 * | ISSUE |X|X|X|X|X|X|P|E| octetsToNextHeader |11683 * +---------------+---------------+---------------+---------------+11684 * | ObjectId readerObjectId |11685 * +---------------+---------------+---------------+---------------+11686 * | ObjectId writerObjectId |11687 * +---------------+---------------+---------------+---------------+11688 * | |11689 * + SequenceNumber writerSeqNumber +11690 * | |11691 * +---------------+---------------+---------------+---------------+11692 * | |11693 * ~ ParameterSequence parameters [only if P==1] ~11694 * | |11695 * +---------------+---------------+---------------+---------------+11696 * | |11697 * ~ UserData issueData ~11698 * | |11699 * +---------------+---------------+---------------+---------------+11700 *11701 * RTPS 1.2:11702 * 0...2...........7...............15.............23...............3111703 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+11704 * | NOKEY_DATA |X|X|X|X|X|D|Q|E| octetsToNextHeader |11705 * +---------------+---------------+---------------+---------------+11706 * | EntityId readerEntityId |11707 * +---------------+---------------+---------------+---------------+11708 * | EntityId writerEntityId |11709 * +---------------+---------------+---------------+---------------+11710 * | |11711 * + SequenceNumber writerSeqNum +11712 * | |11713 * +---------------+---------------+---------------+---------------+11714 * | |11715 * ~ ParameterList inlineQos [only if Q==1] ~11716 * | |11717 * +---------------+---------------+---------------+---------------+11718 * | |11719 * ~ SerializedData serializedData [only if D==0] ~11720 * | |11721 * +---------------+---------------+---------------+---------------+11722 *11723 * RTPS 2.0:11724 * 0...2...........7...............15.............23...............3111725 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+11726 * | NOKEY_DATA |X|X|X|X|X|D|Q|E| octetsToNextHeader |11727 * +---------------+---------------+---------------+---------------+11728 * | EntityId readerEntityId |11729 * +---------------+---------------+---------------+---------------+11730 * | EntityId writerEntityId |11731 * +---------------+---------------+---------------+---------------+11732 * | |11733 * + SequenceNumber writerSeqNum +11734 * | |11735 * +---------------+---------------+---------------+---------------+11736 * | |11737 * ~ ParameterList inlineQos [only if Q==1] ~11738 * | |11739 * +---------------+---------------+---------------+---------------+11740 * | |11741 * ~ SerializedData serializedData [only if D==1] ~11742 * | |11743 * +---------------+---------------+---------------+---------------+11744 * Notes:11745 * - inlineQos is equivalent to the old 'parameters'11746 * - serializedData is equivalent to the old 'issueData'11747 */11748 11749 int min_len;11750 guint32 wid; /* Writer EntityID */11751 gboolean from_builtin_writer;11752 gint old_offset = offset;11753 proto_item *octet_item;11754 11755 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, NOKEY_DATA_FLAGS, flags);11756 11757 octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb,11758 offset + 2, 2, encoding);11759 11760 /* Calculates the minimum length for this submessage */11761 min_len = 16;11762 if ((flags & FLAG_NOKEY_DATA_Q(0x02)) != 0) min_len += 4;11763 11764 if (octets_to_next_header < min_len) {11765 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", min_len);11766 return;11767 }11768 11769 offset += 4;11770 11771 /* readerEntityId */11772 rtps_util_add_entity_id(tree, tvb, offset, hf_rtps_sm_rdentity_id, hf_rtps_sm_rdentity_id_key,11773 hf_rtps_sm_rdentity_id_kind, ett_rtps_rdentity, "readerEntityId", NULL((void*)0));11774 offset += 4;11775 11776 /* writerEntityId */11777 rtps_util_add_entity_id(tree, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key,11778 hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", &wid);11779 offset += 4;11780 11781 /* Sequence number */11782 rtps_util_add_seq_number(tree, tvb, offset, encoding, "writerSeqNumber");11783 offset += 8;11784 11785 /* Parameters */11786 if ((flags & FLAG_NOKEY_DATA_Q(0x02)) != 0) {11787 gboolean is_inline_qos = TRUE(!(0));11788 offset = dissect_parameter_sequence(tree, pinfo, tvb, offset,11789 encoding, octets_to_next_header, "inlineQos",11790 version, NULL((void*)0), vendor_id, is_inline_qos, NULL((void*)0));11791 11792 }11793 11794 /* Issue Data */11795 if ((version < 0x0200) && (flags & FLAG_NOKEY_DATA_D(0x04)) == 0) {11796 proto_tree_add_item(tree, hf_rtps_issue_data, tvb, offset,11797 octets_to_next_header - (offset - old_offset) + 4,11798 ENC_NA0x00000000);11799 }11800 11801 if ((version >= 0x0200) && (flags & FLAG_DATA_D_v2(0x04)) != 0) {11802 from_builtin_writer = (((wid & ENTITYKIND_BUILTIN_WRITER_WITH_KEY(0xc2)) == ENTITYKIND_BUILTIN_WRITER_WITH_KEY(0xc2))11803 || ((wid & ENTITYKIND_BUILTIN_WRITER_NO_KEY(0xc3)) == ENTITYKIND_BUILTIN_WRITER_NO_KEY(0xc3))11804 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_BOOTSTRAP_WRITER(0x00010082))11805 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_WRITER(0x00010182)))11806 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_WRITER(0xff010182))11807 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_READER(0xff010187)) ? TRUE(!(0)) : FALSE(0);11808 dissect_serialized_data(tree, pinfo, tvb, offset,11809 octets_to_next_header - (offset - old_offset) + 4,11810 "serializedData", vendor_id, from_builtin_writer, NULL((void*)0), NOT_A_FRAGMENT(-1));11811 }11812 11813}11814 11815/* *********************************************************************** */11816/* * N O K E Y _ D A T A _ F R A G * */11817/* *********************************************************************** */11818static void dissect_NOKEY_DATA_FRAG(tvbuff_t *tvb, packet_info *pinfo, gint offset,11819 guint8 flags, const guint encoding, int octets_to_next_header, proto_tree *tree,11820 guint16 vendor_id) {11821 /*11822 * 0...2...........7...............15.............23...............3111823 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+11824 * |NOKEY_DATA_FRAG|X|X|X|X|X|X|Q|E| octetsToNextHeader |11825 * +---------------+---------------+---------------+---------------+11826 * | EntityId readerEntityId |11827 * +---------------+---------------+---------------+---------------+11828 * | EntityId writerEntityId |11829 * +---------------+---------------+---------------+---------------+11830 * | |11831 * + SequenceNumber writerSeqNum +11832 * | |11833 * +---------------+---------------+---------------+---------------+11834 * | FragmentNumber fragmentStartingNum |11835 * +---------------+---------------+---------------+---------------+11836 * | ushort fragmentsInSubmessage | ushort fragmentSize |11837 * +---------------+---------------+---------------+---------------+11838 * | unsigned long sampleSize |11839 * +---------------+---------------+---------------+---------------+11840 * | |11841 * ~ ParameterList inlineQos [only if Q==1] ~11842 * | |11843 * +---------------+---------------+---------------+---------------+11844 * | |11845 * ~ SerializedData serializedData ~11846 * | |11847 * +---------------+---------------+---------------+---------------+11848 */11849 11850 int min_len;11851 guint32 wid; /* Writer EntityID */11852 gboolean from_builtin_writer;11853 gint old_offset = offset;11854 guint32 frag_number = 0;11855 proto_item *octet_item;11856 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, NOKEY_DATA_FRAG_FLAGS, flags);11857 11858 octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb,11859 offset + 2, 2, encoding);11860 11861 /* Calculates the minimum length for this submessage */11862 min_len = 28;11863 if ((flags & FLAG_NOKEY_DATA_Q(0x02)) != 0) min_len += 4;11864 11865 if (octets_to_next_header < min_len) {11866 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", min_len);11867 return;11868 }11869 11870 offset += 4;11871 11872 /* readerEntityId */11873 rtps_util_add_entity_id(tree, tvb, offset, hf_rtps_sm_rdentity_id, hf_rtps_sm_rdentity_id_key,11874 hf_rtps_sm_rdentity_id_kind, ett_rtps_rdentity, "readerEntityId", NULL((void*)0));11875 offset += 4;11876 11877 /* writerEntityId */11878 rtps_util_add_entity_id(tree, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key,11879 hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", &wid);11880 offset += 4;11881 11882 /* Sequence number */11883 rtps_util_add_seq_number(tree, tvb, offset, encoding, "writerSeqNumber");11884 offset += 8;11885 11886 /* Fragment number */11887 proto_tree_add_item_ret_uint(tree, hf_rtps_nokey_data_frag_number, tvb,11888 offset, 4, encoding, &frag_number);11889 offset += 4;11890 11891 /* Fragments in submessage */11892 proto_tree_add_item(tree, hf_rtps_nokey_data_frag_num_fragments, tvb,11893 offset, 2, encoding);11894 offset += 2;11895 11896 /* Fragment size */11897 proto_tree_add_item(tree, hf_rtps_nokey_data_frag_size, tvb,11898 offset, 2, encoding);11899 offset += 2;11900 11901 /* InlineQos */11902 if ((flags & FLAG_DATA_Q_v2(0x02)) != 0) {11903 gboolean is_inline_qos = TRUE(!(0));11904 offset = dissect_parameter_sequence(tree, pinfo, tvb, offset, encoding,11905 octets_to_next_header - (offset - old_offset) + 4,11906 "inlineQos", 0x0200, NULL((void*)0), vendor_id, is_inline_qos, NULL((void*)0));11907 }11908 11909 /* SerializedData */11910 if ((flags & FLAG_DATA_D_v2(0x04)) != 0) {11911 from_builtin_writer = (((wid & ENTITYKIND_BUILTIN_WRITER_WITH_KEY(0xc2)) == ENTITYKIND_BUILTIN_WRITER_WITH_KEY(0xc2))11912 || ((wid & ENTITYKIND_BUILTIN_WRITER_NO_KEY(0xc3)) == ENTITYKIND_BUILTIN_WRITER_NO_KEY(0xc3))11913 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_BOOTSTRAP_WRITER(0x00010082))11914 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_WRITER(0x00010182)))11915 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_WRITER(0xff010182))11916 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_READER(0xff010187)) ? TRUE(!(0)) : FALSE(0);11917 dissect_serialized_data(tree, pinfo, tvb,offset,11918 octets_to_next_header - (offset - old_offset) + 4,11919 "serializedData", vendor_id, from_builtin_writer, NULL((void*)0), (gint32)frag_number);11920 }11921}11922 11923static void dissect_PING(tvbuff_t* tvb, gint offset, const guint encoding, int octets_to_next_header, proto_tree* tree) {11924 proto_tree_add_item(tree, hf_rtps_ping,tvb, offset, octets_to_next_header, encoding);11925}11926 11927/* *********************************************************************** */11928/* * A C K N A C K * */11929/* *********************************************************************** */11930static void dissect_ACKNACK(tvbuff_t *tvb, packet_info *pinfo, gint offset, guint8 flags,11931 const guint encoding, int octets_to_next_header, proto_tree *tree,11932 proto_item *item, endpoint_guid *guid) {11933 /* RTPS 1.0/1.1:11934 * 0...2...........7...............15.............23...............3111935 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+11936 * | ACK |X|X|X|X|X|X|F|E| octetsToNextHeader |11937 * +---------------+---------------+---------------+---------------+11938 * | ObjectId readerObjectId |11939 * +---------------+---------------+---------------+---------------+11940 * | ObjectId writerObjectId |11941 * +---------------+---------------+---------------+---------------+11942 * | |11943 * + Bitmap bitmap +11944 * | |11945 * +---------------+---------------+---------------+---------------+11946 * | Counter count |11947 * +---------------+---------------+---------------+---------------+11948 *11949 * RTPS 1.2/2.0:11950 * 0...2...........7...............15.............23...............3111951 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+11952 * | ACKNACK |X|X|X|X|X|X|F|E| octetsToNextHeader |11953 * +---------------+---------------+---------------+---------------+11954 * | EntityId readerEntityId |11955 * +---------------+---------------+---------------+---------------+11956 * | EntityId writerEntityId |11957 * +---------------+---------------+---------------+---------------+11958 * | |11959 * + SequenceNumberSet readerSNState +11960 * | |11961 * +---------------+---------------+---------------+---------------+11962 * | Counter count |11963 * +---------------+---------------+---------------+---------------+11964 */11965 gint original_offset; /* Offset to the readerEntityId */11966 proto_item *octet_item;11967 guint32 wid;11968 11969 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, ACKNACK_FLAGS, flags);11970 octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb, offset + 2, 2, encoding);11971 if (octets_to_next_header < 20) {11972 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= 20)");11973 return;11974 }11975 11976 offset += 4;11977 original_offset = offset;11978 11979 /* readerEntityId */11980 rtps_util_add_entity_id(tree, tvb, offset, hf_rtps_sm_rdentity_id, hf_rtps_sm_rdentity_id_key,11981 hf_rtps_sm_rdentity_id_kind, ett_rtps_rdentity, "readerEntityId", NULL((void*)0));11982 offset += 4;11983 11984 /* writerEntityId */11985 rtps_util_add_entity_id(tree, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key,11986 hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", &wid);11987 offset += 4;11988 guid->entity_id = wid;11989 guid->fields_present |= GUID_HAS_ENTITY_ID0x00000008;11990 rtps_util_add_topic_info(tree, pinfo, tvb, offset, guid);11991 11992 /* Bitmap */11993 offset = rtps_util_add_bitmap(tree, tvb, offset, encoding, "readerSNState", TRUE(!(0)));11994 11995 /* RTPS 1.0 didn't have count: make sure we don't decode it wrong11996 * in this case11997 */11998 if (offset + 4 == original_offset + octets_to_next_header) {11999 /* Count is present */12000 proto_tree_add_item(tree, hf_rtps_acknack_count, tvb, offset, 4, encoding);12001 } else if (offset < original_offset + octets_to_next_header) {12002 /* In this case there must be something wrong in the bitmap: there12003 * are some extra bytes that we don't know how to decode12004 */12005 expert_add_info_format(pinfo, item, &ei_rtps_extra_bytes, "Don't know how to decode those extra bytes: %d", octets_to_next_header - offset);12006 } else if (offset > original_offset + octets_to_next_header) {12007 /* Decoding the bitmap went over the end of this submessage.12008 * Enter an item in the protocol tree that spans over the entire12009 * submessage.12010 */12011 expert_add_info(pinfo, item, &ei_rtps_missing_bytes);12012 }12013 12014}12015 12016/* *********************************************************************** */12017/* * N A C K _ F R A G * */12018/* *********************************************************************** */12019static void dissect_NACK_FRAG(tvbuff_t *tvb, packet_info *pinfo, gint offset, guint8 flags,12020 const guint encoding, int octets_to_next_header, proto_tree *tree) {12021 /*12022 * 0...2...........7...............15.............23...............3112023 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+12024 * | NACK_FRAG |X|X|X|X|X|X|X|E| octetsToNextHeader |12025 * +---------------+---------------+---------------+---------------+12026 * | EntityId readerEntityId |12027 * +---------------+---------------+---------------+---------------+12028 * | EntityId writerEntityId |12029 * +---------------+---------------+---------------+---------------+12030 * | |12031 * + SequenceNumberSet writerSN +12032 * | |12033 * +---------------+---------------+---------------+---------------+12034 * | |12035 * ~ FragmentNumberSet fragmentNumberState +12036 * | |12037 * +---------------+---------------+---------------+---------------+12038 * | Counter count |12039 * +---------------+---------------+---------------+---------------+12040 */12041 proto_item *octet_item;12042 12043 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, NACK_FRAG_FLAGS, flags);12044 12045 octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb,12046 offset + 2, 2, encoding);12047 12048 if (octets_to_next_header < 24) {12049 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= 24)");12050 return;12051 }12052 12053 offset += 4;12054 12055 /* readerEntityId */12056 rtps_util_add_entity_id(tree, tvb, offset, hf_rtps_sm_rdentity_id, hf_rtps_sm_rdentity_id_key,12057 hf_rtps_sm_rdentity_id_kind, ett_rtps_rdentity, "readerEntityId", NULL((void*)0));12058 offset += 4;12059 12060 /* writerEntityId */12061 rtps_util_add_entity_id(tree, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key,12062 hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", NULL((void*)0));12063 offset += 4;12064 12065 /* Writer sequence number */12066 rtps_util_add_seq_number(tree, tvb, offset, encoding, "writerSN");12067 offset += 8;12068 12069 /* FragmentNumberSet */12070 offset = rtps_util_add_fragment_number_set(tree, pinfo, tvb, offset, encoding,12071 "fragmentNumberState", octets_to_next_header - 20);12072 12073 if (offset == -1) {12074 return;12075 }12076 /* Count */12077 proto_tree_add_item(tree, hf_rtps_nack_frag_count, tvb, offset, 4, encoding);12078}12079 12080/* *********************************************************************** */12081/* * H E A R T B E A T * */12082/* *********************************************************************** */12083static void dissect_HEARTBEAT(tvbuff_t *tvb, packet_info *pinfo, gint offset, guint8 flags,12084 const guint encoding, int octets_to_next_header, proto_tree *tree,12085 guint16 version, endpoint_guid *guid) {12086 /* RTPS 1.0/1.1:12087 * 0...2...........7...............15.............23...............3112088 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+12089 * | HEARTBEAT |X|X|X|X|X|L|F|E| octetsToNextHeader |12090 * +---------------+---------------+---------------+---------------+12091 * | ObjectId readerObjectId |12092 * +---------------+---------------+---------------+---------------+12093 * | ObjectId writerObjectId |12094 * +---------------+---------------+---------------+---------------+12095 * | |12096 * + SequenceNumber firstAvailableSeqNumber +12097 * | |12098 * +---------------+---------------+---------------+---------------+12099 * | |12100 * + SequenceNumber lastSeqNumber +12101 * | |12102 * +---------------+---------------+---------------+---------------+12103 * | long counter |12104 * +---------------+---------------+---------------+---------------+12105 *12106 * Notes:12107 * - on RTPS 1.0, counter is not present12108 * - on RTPS 1.0, L flag is not present12109 *12110 * RTPS 1.2/2.0:12111 * 0...2...........7...............15.............23...............3112112 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+12113 * | HEARTBEAT |X|X|X|X|X|X|F|E| octetsToNextHeader |12114 * +---------------+---------------+---------------+---------------+12115 * | EntityId readerEntityId |12116 * +---------------+---------------+---------------+---------------+12117 * | EntityId writerEntityId |12118 * +---------------+---------------+---------------+---------------+12119 * | |12120 * + SequenceNumber firstAvailableSeqNumber +12121 * | |12122 * +---------------+---------------+---------------+---------------+12123 * | |12124 * + SequenceNumber lastSeqNumber +12125 * | |12126 * +---------------+---------------+---------------+---------------+12127 * | Counter count |12128 * +---------------+---------------+---------------+---------------+12129 */12130 proto_item *octet_item;12131 guint32 wid;12132 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, HEARTBEAT_FLAGS, flags);12133 12134 octet_item = proto_tree_add_item(tree,12135 hf_rtps_sm_octets_to_next_header,12136 tvb,12137 offset + 2,12138 2,12139 encoding);12140 12141 if ((octets_to_next_header < 24) && (version <= 0x0101)) {12142 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= 24)");12143 return;12144 }12145 else if (octets_to_next_header < 28) {12146 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= 28)");12147 return;12148 }12149 12150 offset += 4;12151 12152 /* readerEntityId */12153 rtps_util_add_entity_id(tree, tvb, offset, hf_rtps_sm_rdentity_id, hf_rtps_sm_rdentity_id_key,12154 hf_rtps_sm_rdentity_id_kind, ett_rtps_rdentity, "readerEntityId", NULL((void*)0));12155 offset += 4;12156 12157 /* writerEntityId */12158 rtps_util_add_entity_id(tree, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key,12159 hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", &wid);12160 offset += 4;12161 guid->entity_id = wid;12162 guid->fields_present |= GUID_HAS_ENTITY_ID0x00000008;12163 rtps_util_add_topic_info(tree, pinfo, tvb, offset, guid);12164 12165 /* First available Sequence Number */12166 rtps_util_add_seq_number(tree, tvb, offset, encoding, "firstAvailableSeqNumber");12167 offset += 8;12168 12169 /* Last Sequence Number */12170 rtps_util_add_seq_number(tree, tvb, offset, encoding, "lastSeqNumber");12171 offset += 8;12172 12173 /* Counter: it was not present in RTPS 1.0 */12174 if (version >= 0x0101) {12175 proto_tree_add_item(tree, hf_rtps_heartbeat_count, tvb, offset, 4, encoding);12176 }12177}12178 12179/* *********************************************************************** */12180/* * H E A R T B E A T _ B A T C H * */12181/* *********************************************************************** */12182static void dissect_HEARTBEAT_BATCH(tvbuff_t *tvb, packet_info *pinfo, gint offset,12183 guint8 flags, const guint encoding, int octets_to_next_header,12184 proto_tree *tree, endpoint_guid *guid) {12185 /*12186 * 0...2...........7...............15.............23...............3112187 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+12188 * |HEARTBEAT_BATCH|X|X|X|X|X|L|F|E| octetsToNextHeader |12189 * +---------------+---------------+---------------+---------------+12190 * | EntityId readerId |12191 * +---------------+---------------+---------------+---------------+12192 * | EntityId writerId |12193 * +---------------+---------------+---------------+---------------+12194 * | |12195 * + SequenceNumber firstBatchSN +12196 * | |12197 * +---------------+---------------+---------------+---------------+12198 * | |12199 * + SequenceNumber lastBatchSN +12200 * | |12201 * +---------------+---------------+---------------+---------------+12202 * | |12203 * + SequenceNumber firstSN +12204 * | |12205 * +---------------+---------------+---------------+---------------+12206 * | |12207 * + SequenceNumber lastSN +12208 * | |12209 * +---------------+---------------+---------------+---------------+12210 * | Count count |12211 * +---------------+---------------+---------------+---------------+12212 */12213 proto_item *octet_item;12214 guint32 wid;12215 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, HEARTBEAT_BATCH_FLAGS, flags);12216 12217 octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb,12218 offset + 2, 2, encoding);12219 12220 if (octets_to_next_header < 36) {12221 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= 36)");12222 return;12223 }12224 12225 /* Skip decoding the entire packet if (tree == NULL) */12226 if (tree == NULL((void*)0)) {12227 return;12228 }12229 12230 offset += 4;12231 12232 /* readerEntityId */12233 rtps_util_add_entity_id(tree, tvb, offset, hf_rtps_sm_rdentity_id, hf_rtps_sm_rdentity_id_key,12234 hf_rtps_sm_rdentity_id_kind, ett_rtps_rdentity, "readerEntityId", NULL((void*)0));12235 offset += 4;12236 12237 /* writerEntityId */12238 rtps_util_add_entity_id(tree, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key,12239 hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", &wid);12240 offset += 4;12241 guid->entity_id = wid;12242 guid->fields_present |= GUID_HAS_ENTITY_ID0x00000008;12243 rtps_util_add_topic_info(tree, pinfo, tvb, offset, guid);12244 12245 /* First available Batch Sequence Number */12246 rtps_util_add_seq_number(tree, tvb, offset, encoding, "firstBatchSN");12247 offset += 8;12248 12249 /* Last Batch Sequence Number */12250 rtps_util_add_seq_number(tree, tvb, offset, encoding, "lastBatchSN");12251 offset += 8;12252 12253 /* First available Sequence Number */12254 rtps_util_add_seq_number(tree, tvb, offset, encoding, "firstSeqNumber");12255 offset += 8;12256 12257 /* Last Sequence Number */12258 rtps_util_add_seq_number(tree, tvb, offset, encoding, "lastSeqNumber");12259 offset += 8;12260 12261 /* Counter */12262 proto_tree_add_item(tree, hf_rtps_heartbeat_batch_count, tvb, offset, 4, encoding);12263}12264 12265/* *********************************************************************** */12266/* * H E A R T B E A T _ V I R T U A L * */12267/* *********************************************************************** */12268 12269static void dissect_HEARTBEAT_VIRTUAL(tvbuff_t *tvb, packet_info *pinfo _U___attribute__((unused)), gint offset,12270 guint8 flags, const guint encoding, int octets_to_next_header, proto_tree *tree,12271 guint16 vendor_id _U___attribute__((unused)), endpoint_guid *guid) {12272 12273 /*12274 * VIRTUAL_HB:12275 *12276 * 0...2...........7...............15.............23...............3112277 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+12278 * | VIRTUAL_HB |X|X|X|X|N|W|V|E| octetsToNextHeader |12279 * +---------------+---------------+---------------+---------------+12280 * | EntityId readerId |12281 * +---------------+---------------+---------------+---------------+12282 * | EntityId writerId |12283 * +---------------+---------------+---------------+---------------+12284 * | Guid_t virtualGUID (V=0 & N=0) |12285 * + +12286 * | |12287 * + +12288 * | |12289 * + +12290 * | |12291 * +---------------+---------------+---------------+---------------+12292 * | unsigned long numWriters (W=1) |12293 * +---------------+---------------+---------------+---------------+12294 * | |12295 * ~ WriterVirtualHBList writerVirtualHBList ~12296 * | |12297 * +---------------+---------------+---------------+---------------+12298 * | unsigned long count |12299 * +---------------+---------------+---------------+---------------+12300 12301 * WRITER_VIRTUAL_HB:12302 *12303 * 0...2...........7...............15.............23...............3112304 * +---------------+---------------+---------------+---------------+12305 * | EntityId writerId (W=1) |12306 * +---------------+---------------+---------------+---------------+12307 * | unsigned long numVirtualGUIDs (N=0) |12308 * +---------------+---------------+---------------+---------------+12309 * | |12310 * ~ VirtualGUIDHBList virtualGUIDHBList ~12311 * | |12312 * +---------------+---------------+---------------+---------------+12313 *12314 * VIRTUAL_GUID_HB:12315 *12316 * 0...2...........7...............15.............23...............3112317 * +---------------+---------------+---------------+---------------+12318 * | Guid_t virtualGUID (V=1) |12319 * + +12320 * | |12321 * + +12322 * | |12323 * + +12324 * | |12325 * +---------------+---------------+---------------+---------------+12326 * | |12327 * + SequenceNumber firstVirtualSN +12328 * | |12329 * +---------------+---------------+---------------+---------------+12330 * | |12331 * + SequenceNumber lastVirtualSN +12332 * | |12333 * +---------------+---------------+---------------+---------------+12334 * | |12335 * + SequenceNumber firstRTPSSN +12336 * | |12337 * +---------------+---------------+---------------+---------------+12338 * | |12339 * + SequenceNumber lastRTPSSN +12340 * | |12341 * +---------------+---------------+---------------+---------------+12342 */12343 12344 guint32 num_writers, num_virtual_guids, wid;12345 gint writer_id_offset, virtual_guid_offset = 0, old_offset;12346 proto_item *octet_item, *ti;12347 12348 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, HEARTBEAT_VIRTUAL_FLAGS, flags);12349 12350 octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb,12351 offset + 2, 2, encoding);12352 12353 if (octets_to_next_header < 12) {12354 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", 12);12355 return;12356 }12357 offset += 4;12358 12359 /* readerEntityId */12360 rtps_util_add_entity_id(tree,12361 tvb,12362 offset,12363 hf_rtps_sm_rdentity_id,12364 hf_rtps_sm_rdentity_id_key,12365 hf_rtps_sm_rdentity_id_kind,12366 ett_rtps_rdentity,12367 "readerEntityId",12368 NULL((void*)0));12369 offset += 4;12370 12371 /* writerEntityId */12372 rtps_util_add_entity_id(tree,12373 tvb,12374 offset,12375 hf_rtps_sm_wrentity_id,12376 hf_rtps_sm_wrentity_id_key,12377 hf_rtps_sm_wrentity_id_kind,12378 ett_rtps_wrentity,12379 "writerEntityId",12380 &wid);12381 writer_id_offset = offset;12382 offset += 4;12383 guid->entity_id = wid;12384 guid->fields_present |= GUID_HAS_ENTITY_ID0x00000008;12385 rtps_util_add_topic_info(tree, pinfo, tvb, offset, guid);12386 12387 /* virtualGUID */12388 if (!(flags & FLAG_VIRTUAL_HEARTBEAT_V(0x02)) && !(flags & FLAG_VIRTUAL_HEARTBEAT_N(0x08))) {12389 /*rtps_util_add_generic_guid(tree,12390 tvb,12391 offset,12392 "virtualGUID",12393 buffer,12394 MAX_GUID_SIZE);*/12395 virtual_guid_offset = offset;12396 offset += 16;12397 }12398 12399 /* num_writers */12400 ti = proto_tree_add_item(tree, hf_rtps_virtual_heartbeat_num_writers, tvb,12401 offset, 4, encoding);12402 if (flags & FLAG_VIRTUAL_HEARTBEAT_W(0x04)) {12403 num_writers = tvb_get_guint32(tvb, offset, encoding);12404 offset += 4;12405 } else {12406 proto_item_set_text(ti, "numWriters: 1");12407 num_writers = 1;12408 }12409 12410 {12411 /* Deserialize Writers */12412 proto_tree *sil_tree_writer_list;12413 guint32 current_writer_index;12414 12415 /** Writer list **/12416 sil_tree_writer_list = proto_tree_add_subtree_format(tree, tvb, offset, -1,12417 ett_rtps_writer_heartbeat_virtual_list, NULL((void*)0), "Writer List");12418 12419 current_writer_index = 0;12420 12421 while (current_writer_index < num_writers) {12422 proto_tree *sil_tree_writer;12423 sil_tree_writer = proto_tree_add_subtree_format(sil_tree_writer_list, tvb, offset, -1,12424 ett_rtps_writer_heartbeat_virtual, NULL((void*)0), "writer[%d]", current_writer_index);12425 12426 if (num_writers == 1) {12427 old_offset = offset;12428 offset = writer_id_offset;12429 }12430 12431 rtps_util_add_entity_id(sil_tree_writer,12432 tvb,12433 offset,12434 hf_rtps_sm_wrentity_id,12435 hf_rtps_sm_wrentity_id_key,12436 hf_rtps_sm_wrentity_id_kind,12437 ett_rtps_wrentity,12438 "writerEntityId",12439 NULL((void*)0));12440 12441 if (num_writers == 1) {12442 offset = old_offset;12443 } else {12444 offset += 4;12445 }12446 12447 if (!(flags & FLAG_VIRTUAL_HEARTBEAT_N(0x08))) {12448 proto_tree_add_item(sil_tree_writer, hf_rtps_virtual_heartbeat_num_virtual_guids, tvb,12449 offset, 4, encoding);12450 num_virtual_guids = tvb_get_guint32(tvb, offset, encoding);12451 offset += 4;12452 } else {12453 num_virtual_guids = 0;12454 }12455 12456 /** Virtual GUID list **/12457 if (num_virtual_guids != 0) {12458 proto_tree *sil_tree_virtual_guid_list;12459 guint32 current_virtual_guid_index;12460 12461 sil_tree_virtual_guid_list = proto_tree_add_subtree_format(sil_tree_writer, tvb, offset, -1,12462 ett_rtps_virtual_guid_heartbeat_virtual_list, NULL((void*)0), "Virtual GUID List");12463 12464 current_virtual_guid_index = 0;12465 12466 while (current_virtual_guid_index < num_virtual_guids) {12467 proto_tree *sil_tree_virtual_guid;12468 sil_tree_virtual_guid = proto_tree_add_subtree_format(sil_tree_virtual_guid_list, tvb, offset, -1,12469 ett_rtps_virtual_guid_heartbeat_virtual, NULL((void*)0), "virtualGUID[%d]", current_virtual_guid_index);12470 12471 if (!(flags & FLAG_VIRTUAL_HEARTBEAT_V(0x02))) {12472 old_offset = offset;12473 offset = virtual_guid_offset;12474 }12475 12476 /*rtps_util_add_generic_guid_v2(sil_tree_virtual_guid,12477 tvb,12478 offset,12479 "virtualGUID",12480 buffer,12481 MAX_GUID_SIZE);*/12482 12483 if (!(flags & FLAG_VIRTUAL_HEARTBEAT_V(0x02))) {12484 offset = old_offset;12485 } else {12486 offset += 16;12487 }12488 12489 /* firstVirtualSN */12490 rtps_util_add_seq_number(sil_tree_virtual_guid,12491 tvb,12492 offset,12493 encoding,12494 "firstVirtualSN");12495 offset += 8;12496 12497 /* lastVirtualSN */12498 rtps_util_add_seq_number(sil_tree_virtual_guid,12499 tvb,12500 offset,12501 encoding,12502 "lastVirtualSN");12503 offset += 8;12504 12505 /* firstRTPSSN */12506 rtps_util_add_seq_number(sil_tree_virtual_guid,12507 tvb,12508 offset,12509 encoding,12510 "firstRTPSSN");12511 offset += 8;12512 12513 /* lastRTPSSN */12514 rtps_util_add_seq_number(sil_tree_virtual_guid,12515 tvb,12516 offset,12517 encoding,12518 "lastRTPSSN");12519 offset += 8;12520 12521 current_virtual_guid_index++;12522 }12523 }12524 12525 current_writer_index++;12526 }12527 }12528 12529 /* Count */12530 proto_tree_add_item(tree, hf_rtps_virtual_heartbeat_count, tvb, offset, 4, encoding);12531 }12532 12533 12534/* *********************************************************************** */12535/* * H E A R T B E A T _ F R A G * */12536/* *********************************************************************** */12537static void dissect_HEARTBEAT_FRAG(tvbuff_t *tvb, packet_info *pinfo, gint offset, guint8 flags,12538 const guint encoding, int octets_to_next_header, proto_tree *tree, endpoint_guid *guid) {12539 /*12540 * 0...2...........7...............15.............23...............3112541 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+12542 * |HEARTBEAT_FRAG |X|X|X|X|X|X|X|E| octetsToNextHeader |12543 * +---------------+---------------+---------------+---------------+12544 * | EntityId readerEntityId |12545 * +---------------+---------------+---------------+---------------+12546 * | EntityId writerEntityId |12547 * +---------------+---------------+---------------+---------------+12548 * | |12549 * + SequenceNumber writerSeqNumber +12550 * | |12551 * +---------------+---------------+---------------+---------------+12552 * | FragmentNumber lastFragmentNum |12553 * +---------------+---------------+---------------+---------------+12554 * | Counter count |12555 * +---------------+---------------+---------------+---------------+12556 */12557 proto_item *octet_item;12558 guint32 wid;12559 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, HEARTBEAT_FRAG_FLAGS, flags);12560 12561 octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb,12562 offset + 2, 2, encoding);12563 12564 if (octets_to_next_header < 24) {12565 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= 24)");12566 return;12567 }12568 12569 /* Skip decoding the entire packet if (tree == NULL) */12570 if (tree == NULL((void*)0)) {12571 return;12572 }12573 12574 offset += 4;12575 12576 /* readerEntityId */12577 rtps_util_add_entity_id(tree, tvb, offset, hf_rtps_sm_rdentity_id, hf_rtps_sm_rdentity_id_key,12578 hf_rtps_sm_rdentity_id_kind, ett_rtps_rdentity, "readerEntityId", NULL((void*)0));12579 offset += 4;12580 12581 /* writerEntityId */12582 rtps_util_add_entity_id(tree, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key,12583 hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", &wid);12584 offset += 4;12585 guid->entity_id = wid;12586 guid->fields_present |= GUID_HAS_ENTITY_ID0x00000008;12587 rtps_util_add_topic_info(tree, pinfo, tvb, offset, guid);12588 12589 /* First available Sequence Number */12590 rtps_util_add_seq_number(tree, tvb, offset, encoding, "writerSeqNumber");12591 offset += 8;12592 12593 /* Fragment number */12594 proto_tree_add_item(tree, hf_rtps_heartbeat_frag_number, tvb, offset, 4, encoding);12595 offset += 4;12596 12597 /* Counter */12598 proto_tree_add_item(tree, hf_rtps_heartbeat_frag_count, tvb, offset, 4, encoding);12599}12600 12601/* *********************************************************************** */12602/* * R T P S _ D A T A * */12603/* * A N D * */12604/* * R T P S _ D A T A _ S E S S I O N * */12605/* *********************************************************************** */12606static void dissect_RTPS_DATA(tvbuff_t *tvb, packet_info *pinfo, gint offset, guint8 flags,12607 guint encoding, int octets_to_next_header, proto_tree *tree,12608 guint16 vendor_id, gboolean is_session, endpoint_guid *guid) {12609 /*12610 *12611 * 0...2...........7...............15.............23...............3112612 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+12613 * | RTPS_DATA |X|X|X|X|K|D|Q|E| octetsToNextHeader |12614 * +---------------+---------------+---------------+---------------+12615 * | Flags extraFlags | octetsToInlineQos |12616 * +---------------+---------------+---------------+---------------+12617 * | EntityId readerEntityId |12618 * +---------------+---------------+---------------+---------------+12619 * | EntityId writerEntityId |12620 * +---------------+---------------+---------------+---------------+12621 * | |12622 * + SequenceNumber writerSeqNum +12623 * | |12624 * +---------------+---------------+---------------+---------------+12625 * | |12626 * ~ ParameterList inlineQos [only if Q==1] ~12627 * | |12628 * +---------------+---------------+---------------+---------------+12629 * | |12630 * ~ SerializedData serializedData [only if D==1 || K==1] ~12631 * | |12632 * +---------------+---------------+---------------+---------------+12633 *12634 * 0...2...........7...............15.............23...............3112635 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+12636 * |RTPS_DATA_SESSI|X|X|X|X|K|D|Q|E| octetsToNextHeader |12637 * +---------------+---------------+---------------+---------------+12638 * | Flags extraFlags | octetsToInlineQos |12639 * +---------------+---------------+---------------+---------------+12640 * | EntityId readerEntityId |12641 * +---------------+---------------+---------------+---------------+12642 * | EntityId writerEntityId |12643 * +---------------+---------------+---------------+---------------+12644 * | |12645 * + SequenceNumber writerSessionSeqNum +12646 * | |12647 * +---------------+---------------+---------------+---------------+12648 * | |12649 * + SequenceNumber writerVirtualSeqNum +12650 * | |12651 * +---------------+---------------+---------------+---------------+12652 * | |12653 * ~ ParameterList inlineQos [only if Q==1] ~12654 * | |12655 * +---------------+---------------+---------------+---------------+12656 * | |12657 * ~ SerializedData serializedData [only if D==1 || K==1] ~12658 * | |12659 * +---------------+---------------+---------------+---------------+12660 */12661 int min_len;12662 gint old_offset = offset;12663 guint32 writer_wid; /* Writer EntityID */12664 guint32 reader_wid = 0;12665 guint32 status_info = 0xffffffff;12666 gboolean from_builtin_writer;12667 proto_item *octet_item;12668 coherent_set_entity_info coherent_set_entity_info_object = {0};12669 12670 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, RTPS_DATA_FLAGS, flags);12671 12672 octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb,12673 offset + 2, 2, encoding);12674 12675 /* Calculates the minimum length for this submessage */12676 min_len = 20;12677 if (is_session) {12678 min_len += 8;12679 gboolean* is_data_session_final = wmem_alloc(pinfo->pool, sizeof(gboolean));12680 *is_data_session_final = FALSE(0);12681 p_add_proto_data(pinfo->pool, pinfo, proto_rtps, RTPS_DATA_SESSION_FINAL_PROTODATA_KEY2, is_data_session_final);12682 }12683 if ((flags & FLAG_RTPS_DATA_Q(0x02)) != 0) min_len += 4;12684 if ((flags & FLAG_RTPS_DATA_D(0x04)) != 0) min_len += 4;12685 if ((flags & FLAG_RTPS_DATA_K(0x08)) != 0) min_len += 4;12686 12687 if (octets_to_next_header < min_len) {12688 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", min_len);12689 return;12690 }12691 12692 offset += 4;12693 12694 /* extraFlags */12695 proto_tree_add_item(tree, hf_rtps_extra_flags, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);12696 offset += 2;12697 12698 /* octetsToInlineQos */12699 proto_tree_add_item(tree, hf_rtps_octets_to_inline_qos, tvb, offset, 2, encoding);12700 offset += 2;12701 12702 /* readerEntityId */12703 rtps_util_add_entity_id(tree, tvb, offset, hf_rtps_sm_rdentity_id, hf_rtps_sm_rdentity_id_key,12704 hf_rtps_sm_rdentity_id_kind, ett_rtps_rdentity, "readerEntityId", &reader_wid);12705 offset += 4;12706 12707 /* writerEntityId */12708 rtps_util_add_entity_id(tree, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key,12709 hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", &writer_wid);12710 offset += 4;12711 guid->entity_id = writer_wid;12712 guid->fields_present |= GUID_HAS_ENTITY_ID0x00000008;12713 rtps_util_add_topic_info(tree, pinfo, tvb, offset, guid);12714 12715 /* Sequence number */12716 if (is_session) {12717 rtps_util_add_seq_number(tree, tvb, offset, encoding, "writerSessionSeqNumber");12718 offset += 8;12719 12720 rtps_util_add_seq_number(tree, tvb, offset, encoding, "writerVirtualSeqNumber");12721 offset += 8;12722 } else {12723 coherent_set_entity_info_object.writer_seq_number = rtps_util_add_seq_number(tree, tvb, offset,12724 encoding, "writerSeqNumber");12725 coherent_set_entity_info_object.guid = *guid;12726 offset += 8;12727 }12728 12729 /* InlineQos */12730 if ((flags & FLAG_RTPS_DATA_Q(0x02)) != 0) {12731 gboolean is_inline_qos = TRUE(!(0));12732 offset = dissect_parameter_sequence(tree, pinfo, tvb, offset, encoding,12733 octets_to_next_header - (offset - old_offset) + 4,12734 "inlineQos", 0x0200, &status_info, vendor_id, is_inline_qos, &coherent_set_entity_info_object);12735 }12736 12737 /* SerializedData */12738 if (((flags & FLAG_RTPS_DATA_D(0x04)) != 0) || ((flags & FLAG_RTPS_DATA_K(0x08)) != 0)) {12739 if (writer_wid == ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_WRITER(0x000200c2)) {12740 /* Dissect the serialized data as ParticipantMessageData:12741 * struct ParticipantMessageData {12742 * KeyHashPrefix_t participantGuidPrefix;12743 * KeyHashSuffix_t kind;12744 * sequence<octet> data;12745 * }12746 */12747 proto_tree *rtps_pm_tree;12748 proto_tree *guid_tree;12749 guint32 kind;12750 guint32 encapsulation_id, encapsulation_len;12751 proto_item *ti;12752 rtps_pm_tree = proto_tree_add_subtree(tree, tvb, offset,12753 octets_to_next_header - (offset - old_offset) + 4,12754 ett_rtps_part_message_data, &ti, "ParticipantMessageData");12755 12756 /* Encapsulation ID */12757 proto_tree_add_item_ret_uint(rtps_pm_tree, hf_rtps_param_serialize_encap_kind, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &encapsulation_id);12758 offset += 2;12759 12760 encoding = get_encapsulation_endianness(encapsulation_id);12761 12762 /* Encapsulation length (or option) */12763 proto_tree_add_item_ret_uint(rtps_pm_tree, hf_rtps_param_serialize_encap_len, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &encapsulation_len);12764 offset += 2;12765 12766 guid_tree = proto_item_add_subtree(ti, ett_rtps_part_message_data);12767 12768 rtps_util_add_guid_prefix_v2(guid_tree, tvb, offset, hf_rtps_sm_guid_prefix, hf_rtps_sm_host_id,12769 hf_rtps_sm_app_id, hf_rtps_sm_instance_id, 0);12770 offset += 12;12771 12772 /* Kind */12773 proto_tree_add_item_ret_uint(guid_tree, hf_rtps_encapsulation_kind, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000, &kind);12774 offset += 4;12775 12776 rtps_util_add_seq_octets(rtps_pm_tree, pinfo, tvb, offset, encoding,12777 octets_to_next_header - (offset - old_offset) + 4, hf_rtps_data_serialize_data);12778 12779 } else if (writer_wid == ENTITYID_P2P_BUILTIN_PARTICIPANT_STATELESS_WRITER(0x000201c3) || writer_wid == ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_WRITER(0xff0202c3)) {12780 /* PGM stands for Participant Generic Message */12781 proto_tree * rtps_pgm_tree, * guid_tree, * message_identity_tree;12782 proto_item *ti;12783 guint32 encapsulation_id, encapsulation_opt;12784 gint32 alignment_zero;12785 guint64 sequence_number;12786 12787 ti = proto_tree_add_boolean_format(tree, hf_rtps_pgm, tvb, offset,12788 octets_to_next_header - (offset - old_offset) + 4, TRUE(!(0)), "Participant Generic Message");12789 rtps_pgm_tree = proto_item_add_subtree(ti, ett_rtps_pgm_data);12790 12791 proto_tree_add_item_ret_uint(rtps_pgm_tree, hf_rtps_param_serialize_encap_kind,12792 tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &encapsulation_id);12793 encoding = get_encapsulation_endianness(encapsulation_id);12794 12795 offset += 2;12796 proto_tree_add_item_ret_uint(rtps_pgm_tree, hf_rtps_param_serialize_encap_len,12797 tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &encapsulation_opt);12798 12799 offset += 2;12800 alignment_zero = offset;12801 /* Message Identity */12802 message_identity_tree = proto_tree_add_subtree(rtps_pgm_tree, tvb, offset,12803 24 , ett_rtps_message_identity, &ti, "Message Identity");12804 12805 guid_tree = proto_item_add_subtree(ti, ett_rtps_message_identity);12806 proto_item_append_text(guid_tree, " (");12807 rtps_util_add_generic_guid_v2(guid_tree, tvb, offset,12808 hf_rtps_message_identity_source_guid, hf_rtps_param_host_id, hf_rtps_param_app_id,12809 hf_rtps_param_instance_id, hf_rtps_param_entity, hf_rtps_param_entity_key,12810 hf_rtps_param_entity_kind, guid_tree);12811 offset += 16;12812 12813 proto_tree_add_item(message_identity_tree, hf_rtps_sm_seq_number, tvb, offset, 8, encoding);12814 12815 /* This snippet shows the sequence number in the parent tree */12816 sequence_number = tvb_get_guint64(tvb, offset, encoding);12817 proto_item_append_text(guid_tree, ", sn: %" PRIu64"l" "u" ")",12818 sequence_number);12819 offset += 8;12820 12821 /* Related Message Identity */12822 message_identity_tree = proto_tree_add_subtree(rtps_pgm_tree, tvb, offset,12823 24 , ett_rtps_related_message_identity, &ti, "Related Message Identity");12824 12825 guid_tree = proto_item_add_subtree(ti, ett_rtps_related_message_identity);12826 proto_item_append_text(guid_tree, " (");12827 rtps_util_add_generic_guid_v2(guid_tree, tvb, offset,12828 hf_rtps_message_identity_source_guid, hf_rtps_param_host_id, hf_rtps_param_app_id,12829 hf_rtps_param_instance_id, hf_rtps_param_entity, hf_rtps_param_entity_key,12830 hf_rtps_param_entity_kind, guid_tree);12831 offset += 16;12832 12833 proto_tree_add_item(message_identity_tree, hf_rtps_sm_seq_number, tvb,12834 offset, 8, encoding);12835 12836 /* This snippet shows the sequence number in the parent tree */12837 sequence_number = tvb_get_guint64(tvb, offset, encoding);12838 proto_item_append_text(guid_tree, ", sn: %" PRIu64"l" "u" ")",12839 sequence_number);12840 offset += 8;12841 12842 guid_tree = proto_item_add_subtree(rtps_pgm_tree, ett_rtps_pgm_data);12843 rtps_util_add_generic_guid_v2(guid_tree, tvb, offset,12844 hf_rtps_pgm_dst_participant_guid, hf_rtps_param_host_id, hf_rtps_param_app_id,12845 hf_rtps_param_instance_id, hf_rtps_param_entity, hf_rtps_param_entity_key,12846 hf_rtps_param_entity_kind, NULL((void*)0));12847 offset += 16;12848 12849 guid_tree = proto_item_add_subtree(rtps_pgm_tree, ett_rtps_pgm_data);12850 rtps_util_add_generic_guid_v2(guid_tree, tvb, offset,12851 hf_rtps_pgm_dst_endpoint_guid, hf_rtps_param_host_id, hf_rtps_param_app_id,12852 hf_rtps_param_instance_id, hf_rtps_param_entity, hf_rtps_param_entity_key,12853 hf_rtps_param_entity_kind, NULL((void*)0));12854 offset += 16;12855 12856 guid_tree = proto_item_add_subtree(rtps_pgm_tree, ett_rtps_pgm_data);12857 rtps_util_add_generic_guid_v2(guid_tree, tvb, offset,12858 hf_rtps_pgm_src_endpoint_guid, hf_rtps_param_host_id, hf_rtps_param_app_id,12859 hf_rtps_param_instance_id, hf_rtps_param_entity, hf_rtps_param_entity_key,12860 hf_rtps_param_entity_kind, NULL((void*)0));12861 offset += 16;12862 12863 offset = rtps_util_add_string(rtps_pgm_tree, tvb, offset, hf_rtps_pgm_message_class_id, encoding);12864 12865 rtps_util_add_data_holder_seq(rtps_pgm_tree, tvb, pinfo, offset,12866 encoding, alignment_zero);12867 } else if (writer_wid == ENTITYID_RTI_BUILTIN_LOCATOR_PING_WRITER(0x00020182)) {12868 proto_tree * locator_ping_tree, *guid_tree;12869 proto_item *ti;12870 guint32 encapsulation_id, encapsulation_opt;12871 12872 locator_ping_tree = proto_tree_add_subtree(tree, tvb, offset,12873 octets_to_next_header - (offset - old_offset) + 4,12874 ett_rtps_locator_ping_tree, &ti, "Locator Ping Message");12875 12876 /* Encapsulation Id */12877 proto_tree_add_item_ret_uint(locator_ping_tree, hf_rtps_encapsulation_id,12878 tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &encapsulation_id);12879 offset += 2;12880 encoding = get_encapsulation_endianness(encapsulation_id);12881 12882 /* Encapsulation length (or option) */12883 proto_tree_add_item_ret_uint(locator_ping_tree, hf_rtps_encapsulation_options,12884 tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &encapsulation_opt);12885 offset += 2;12886 12887 guid_tree = proto_item_add_subtree(ti, ett_rtps_generic_guid);12888 rtps_util_add_generic_guid_v2(guid_tree, tvb, offset,12889 hf_rtps_source_participant_guid, hf_rtps_param_host_id, hf_rtps_param_app_id,12890 hf_rtps_param_instance_id, hf_rtps_param_entity, hf_rtps_param_entity_key,12891 hf_rtps_param_entity_kind, NULL((void*)0));12892 offset += 16;12893 rtps_util_add_locator_t(locator_ping_tree, pinfo, tvb, offset, encoding,12894 "Destination Locator");12895 12896 } else if (writer_wid == ENTITYID_RTI_BUILTIN_SERVICE_REQUEST_WRITER(0x00020082)) {12897 /*12898 struct ServiceRequest {12899 long service_id; //@key12900 GUID_t instance_id; //@key12901 sequence<octet> request_body;12902 }; //@Extensibility EXTENSIBLE_EXTENSIBILITY12903 */12904 proto_tree * service_request_tree, * guid_tree;12905 proto_item *ti;12906 guint32 encapsulation_id, encapsulation_opt;12907 gint32 service_id;12908 12909 ti = proto_tree_add_boolean_format(tree, hf_rtps_srm, tvb, offset,12910 octets_to_next_header - (offset - old_offset) + 4,12911 TRUE(!(0)), "Service Request Message");12912 service_request_tree = proto_item_add_subtree(ti, ett_rtps_service_request_tree);12913 12914 /* Encapsulation Id */12915 proto_tree_add_item_ret_uint(service_request_tree, hf_rtps_encapsulation_id,12916 tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &encapsulation_id);12917 offset += 2;12918 encoding = get_encapsulation_endianness(encapsulation_id);12919 /* Encapsulation length (or option) */12920 proto_tree_add_item_ret_uint(service_request_tree, hf_rtps_encapsulation_options, tvb,12921 offset, 2, ENC_BIG_ENDIAN0x00000000, &encapsulation_opt);12922 offset += 2;12923 12924 proto_tree_add_item_ret_int(service_request_tree, hf_rtps_srm_service_id, tvb,12925 offset, 4, encoding, &service_id);12926 offset += 4;12927 guid_tree = proto_item_add_subtree(ti, ett_rtps_generic_guid);12928 rtps_util_add_generic_guid_v2(guid_tree, tvb, offset,12929 hf_rtps_srm_instance_id, hf_rtps_param_host_id, hf_rtps_param_app_id,12930 hf_rtps_param_instance_id, hf_rtps_param_entity, hf_rtps_param_entity_key,12931 hf_rtps_param_entity_kind, NULL((void*)0));12932 offset += 16;12933 rtps_util_add_rti_service_request(service_request_tree, pinfo, tvb, offset,12934 encoding, service_id);12935 12936 } else {12937 const char *label;12938 if (((flags & FLAG_RTPS_DATA_D(0x04)) != 0) || ((flags & FLAG_RTPS_DATA_K(0x08)) == 0)) {12939 label = "serializedData";12940 } else if (((flags & FLAG_RTPS_DATA_D(0x04)) == 0) || ((flags & FLAG_RTPS_DATA_K(0x08)) != 0)) {12941 label = "serializedKey";12942 } else {12943 /* D==1 && K==1 */12944 label = "<invalid or unknown data type>";12945 }12946 12947 from_builtin_writer = (((writer_wid & ENTITYKIND_BUILTIN_WRITER_WITH_KEY(0xc2)) == ENTITYKIND_BUILTIN_WRITER_WITH_KEY(0xc2))12948 || ((writer_wid & ENTITYKIND_BUILTIN_WRITER_NO_KEY(0xc3)) == ENTITYKIND_BUILTIN_WRITER_NO_KEY(0xc3))12949 || (writer_wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_BOOTSTRAP_WRITER(0x00010082))12950 || (writer_wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_WRITER(0x00010182)))12951 || (writer_wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_WRITER(0xff010182))12952 || (writer_wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_READER(0xff010187)) ? TRUE(!(0)) : FALSE(0);12953 /* At the end still dissect the rest of the bytes as raw data */12954 dissect_serialized_data(tree, pinfo, tvb, offset,12955 octets_to_next_header - (offset - old_offset) + 4,12956 label, vendor_id, from_builtin_writer, guid, NOT_A_FRAGMENT(-1));12957 }12958 }12959 rtps_util_detect_coherent_set_end_empty_data_case(&coherent_set_entity_info_object);12960 generate_status_info(pinfo, writer_wid, status_info);12961}12962 12963static void dissect_RTPS_DATA_SESSION(tvbuff_t* tvb, packet_info* pinfo, gint offset, guint8 flags,12964 guint encoding, int octets_to_next_header, proto_tree* tree,12965 guint16 vendor_id, endpoint_guid* guid) {12966 gboolean is_data_session_intermediate = FALSE(0);12967 proto_item* ti = NULL((void*)0);12968 12969 p_set_proto_data(pinfo->pool, pinfo, proto_rtps, RTPS_DATA_SESSION_FINAL_PROTODATA_KEY2, &is_data_session_intermediate);12970 dissect_RTPS_DATA(tvb, pinfo, offset, flags, encoding, octets_to_next_header,12971 tree, vendor_id, TRUE(!(0)), guid);12972 ti = proto_tree_add_boolean(tree, hf_rtps_data_session_intermediate, tvb, offset, 0, is_data_session_intermediate);12973 proto_item_set_generated(ti);12974}12975 12976/* *********************************************************************** */12977/* * R T P S _ D A T A _ F R A G _ [SESSION] * */12978/* *********************************************************************** */12979static void dissect_RTPS_DATA_FRAG_kind(tvbuff_t *tvb, packet_info *pinfo, gint offset, guint8 flags,12980 const guint encoding, int octets_to_next_header, proto_tree *tree,12981 guint16 vendor_id, gboolean is_session, endpoint_guid *guid) {12982 /*12983 * There are two kinds of DATA_FRAG, RTPS_DATA_FRAG and RTPS_DATA_FRAG_SESSION12984 * the only difference is that RTPS_DATA_FRAG_SESSION has an extra sequence number after12985 * writerSeqNum.12986 *12987 * RTPS_DATA_FRAG:12988 * 0...2...........7...............15.............23...............3112989 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+12990 * |RTPS_DATA_FRAG |X|X|X|X|X|K|Q|E| octetsToNextHeader |12991 * +---------------+---------------+---------------+---------------+12992 * | Flags extraFlags | octetsToInlineQos |12993 * +---------------+---------------+---------------+---------------+12994 * | EntityId readerEntityId |12995 * +---------------+---------------+---------------+---------------+12996 * | EntityId writerEntityId |12997 * +---------------+---------------+---------------+---------------+12998 * | |12999 * + SequenceNumber writerSeqNum +13000 * | |13001 * +---------------+---------------+---------------+---------------+13002 * | FragmentNumber fragmentStartingNum |13003 * +---------------+---------------+---------------+---------------+13004 * | ushort fragmentsInSubmessage | ushort fragmentSize |13005 * +---------------+---------------+---------------+---------------+13006 * | unsigned long sampleSize |13007 * +---------------+---------------+---------------+---------------+13008 * | |13009 * ~ ParameterList inlineQos [only if Q==1] ~13010 * | |13011 * +---------------+---------------+---------------+---------------+13012 * | |13013 * ~ SerializedData serializedData ~13014 * | |13015 * +---------------+---------------+---------------+---------------+13016 *13017 *13018 * RTPS_DATA_FRAG_SESSION:13019 * 0...2...........7...............15.............23...............3113020 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+13021 * |RTPS.._SESSION |X|X|X|X|X|K|Q|E| octetsToNextHeader |13022 * +---------------+---------------+---------------+---------------+13023 * | Flags extraFlags | octetsToInlineQos |13024 * +---------------+---------------+---------------+---------------+13025 * | EntityId readerEntityId |13026 * +---------------+---------------+---------------+---------------+13027 * | EntityId writerEntityId |13028 * +---------------+---------------+---------------+---------------+13029 * | |13030 * + SequenceNumber writerSeqNum +13031 * | |13032 * +---------------+---------------+---------------+---------------+13033 * | |13034 * + SequenceNumber virtualSeqNum +13035 * | |13036 * +---------------+---------------+---------------+---------------+13037 * | FragmentNumber fragmentStartingNum |13038 * +---------------+---------------+---------------+---------------+13039 * | ushort fragmentsInSubmessage | ushort fragmentSize |13040 * +---------------+---------------+---------------+---------------+13041 * | unsigned long sampleSize |13042 * +---------------+---------------+---------------+---------------+13043 * | |13044 * ~ ParameterList inlineQos [only if Q==1] ~13045 * | |13046 * +---------------+---------------+---------------+---------------+13047 * | |13048 * ~ SerializedData serializedData ~13049 * | |13050 * +---------------+---------------+---------------+---------------+13051 13052 13053 */13054 int min_len;13055 gint old_offset = offset;13056 guint64 sample_seq_number = 0;13057 guint32 frag_number = 0, frag_size = 0, sample_size = 0, num_frags = 0;13058 guint32 wid; /* Writer EntityID */13059 gboolean from_builtin_writer;13060 guint32 status_info = 0xffffffff;13061 proto_item *octet_item;13062 coherent_set_entity_info coherent_set_entity_info_object = {0};13063 13064 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, RTPS_DATA_FRAG_FLAGS, flags);13065 13066 octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb,13067 offset + 2, 2, encoding);13068 13069 /* Calculates the minimum length for this submessage13070 * RTPS_DATA_FRAG_SESSION len = RTPS_DATA_FRAG len + 8 (extra virtualSequenceNum field).13071 */13072 min_len = (is_session)13073 ? 4413074 : 36;13075 if ((flags & FLAG_RTPS_DATA_FRAG_Q(0x02)) != 0) min_len += 4;13076 13077 if (octets_to_next_header < min_len) {13078 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", min_len);13079 return;13080 }13081 13082 offset += 4;13083 13084 /* extraFlags */13085 proto_tree_add_item(tree, hf_rtps_extra_flags, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);13086 offset += 2;13087 13088 /* octetsToInlineQos */13089 proto_tree_add_item(tree, hf_rtps_octets_to_inline_qos, tvb, offset, 2, encoding);13090 offset += 2;13091 13092 /* readerEntityId */13093 rtps_util_add_entity_id(tree, tvb, offset, hf_rtps_sm_rdentity_id, hf_rtps_sm_rdentity_id_key,13094 hf_rtps_sm_rdentity_id_kind, ett_rtps_rdentity, "readerEntityId", NULL((void*)0));13095 offset += 4;13096 13097 /* writerEntityId */13098 rtps_util_add_entity_id(tree, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key,13099 hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", &wid);13100 offset += 4;13101 guid->entity_id = wid;13102 guid->fields_present |= GUID_HAS_ENTITY_ID0x00000008;13103 rtps_util_add_topic_info(tree, pinfo, tvb, offset, guid);13104 13105 13106 /* Sequence number */13107 coherent_set_entity_info_object.writer_seq_number = rtps_util_add_seq_number(tree, tvb, offset,13108 encoding, "writerSeqNumber");13109 coherent_set_entity_info_object.guid = *guid;13110 offset += 8;13111 13112 /* virtual Sequence Number (Only in RTPS_DATA_FRAG_SESSION)*/13113 if (is_session) {13114 rtps_util_add_seq_number(tree, tvb, offset, encoding, "virtualSeqNumber");13115 offset += 8;13116 }13117 /* Fragment number */13118 proto_tree_add_item_ret_uint(tree, hf_rtps_data_frag_number, tvb, offset, 4, encoding, &frag_number);13119 offset += 4;13120 13121 /* Fragments in submessage */13122 proto_tree_add_item_ret_uint(tree, hf_rtps_data_frag_num_fragments, tvb, offset, 2, encoding, &num_frags);13123 offset += 2;13124 13125 /* Fragment size */13126 proto_tree_add_item_ret_uint(tree, hf_rtps_data_frag_size, tvb, offset, 2, encoding, &frag_size);13127 offset += 2;13128 13129 /* sampleSize */13130 proto_tree_add_item_ret_uint(tree, hf_rtps_data_frag_sample_size, tvb, offset, 4, encoding, &sample_size);13131 offset += 4;13132 13133 /* InlineQos */13134 if ((flags & FLAG_RTPS_DATA_FRAG_Q(0x02)) != 0) {13135 gboolean is_inline_qos = TRUE(!(0));13136 offset = dissect_parameter_sequence(tree, pinfo, tvb, offset, encoding,13137 octets_to_next_header - (offset - old_offset) + 4,13138 "inlineQos", 0x0200, &status_info, vendor_id, is_inline_qos, &coherent_set_entity_info_object);13139 }13140 13141 /* SerializedData */13142 {13143 char label[20];13144 snprintf(label, 9, "fragment");13145 if ((flags & FLAG_RTPS_DATA_FRAG_K(0x04)) != 0) {13146 snprintf(label, 14, "serializedKey");13147 }13148 from_builtin_writer = (((wid & ENTITYKIND_BUILTIN_WRITER_WITH_KEY(0xc2)) == ENTITYKIND_BUILTIN_WRITER_WITH_KEY(0xc2))13149 || ((wid & ENTITYKIND_BUILTIN_WRITER_NO_KEY(0xc3)) == ENTITYKIND_BUILTIN_WRITER_NO_KEY(0xc3))13150 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_BOOTSTRAP_WRITER(0x00010082))13151 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_WRITER(0x00010182)))13152 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_WRITER(0xff010182))13153 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_READER(0xff010187)) ? TRUE(!(0)) : FALSE(0);13154 13155 guint32 frag_index_in_submessage = 0, this_frag_number = 0, this_frag_size = 0, fragment_offset = 0;13156 gboolean more_fragments = FALSE(0);13157 if (enable_rtps_reassembly) {13158 tvbuff_t* new_tvb = NULL((void*)0);13159 fragment_head *frag_msg = NULL((void*)0);13160 while(frag_index_in_submessage < num_frags) {13161 this_frag_number = frag_number + frag_index_in_submessage;13162 more_fragments = (this_frag_number * frag_size < sample_size);13163 this_frag_size = more_fragments ? frag_size : (sample_size - ((this_frag_number - 1) * frag_size));13164 fragment_offset = this_frag_number == 1 ? 0 : (((this_frag_number - 1) * frag_size));13165 pinfo->fragmented = TRUE(!(0));13166 frag_msg = fragment_add_check(&rtps_reassembly_table,13167 tvb, offset, pinfo,13168 (guint32)sample_seq_number, /* ID for fragments belonging together */13169 (void *)guid, /* make sure only fragments from the same writer are considered for reassembly */13170 fragment_offset, /* fragment offset */13171 this_frag_size, /* fragment length */13172 more_fragments); /* More fragments? */13173 13174 new_tvb = process_reassembled_data(tvb, offset + (frag_index_in_submessage * frag_size), pinfo,13175 "Reassembled sample", frag_msg, &rtps_frag_items,13176 NULL((void*)0), tree);13177 13178 if (frag_index_in_submessage == 0) {13179 generate_status_info(pinfo, wid, status_info);13180 if (frag_msg) { /* Reassembled */13181 col_append_fstr(pinfo->cinfo, COL_INFO, " [Reassembled]");13182 } else { /* Not last packet of reassembled Short Message */13183 col_append_fstr(pinfo->cinfo, COL_INFO," [RTPS fragment]");13184 }13185 }13186 13187 if (new_tvb) {13188 snprintf(label, 19, "reassembled sample");13189 dissect_serialized_data(tree, pinfo, new_tvb, 0,13190 sample_size, label, vendor_id, from_builtin_writer, guid, NOT_A_FRAGMENT(-1));13191 break;13192 } else {13193 snprintf(label, 15, "fragment [%d]", frag_index_in_submessage);13194 dissect_serialized_data(tree, pinfo, tvb, offset + (frag_index_in_submessage * frag_size),13195 this_frag_size, label, vendor_id, from_builtin_writer, NULL((void*)0), this_frag_number);13196 }13197 frag_index_in_submessage++;13198 }13199 } else {13200 while (frag_index_in_submessage < num_frags) {13201 this_frag_number = frag_number + frag_index_in_submessage;13202 more_fragments = (this_frag_number * frag_size < sample_size);13203 this_frag_size = more_fragments ? frag_size : (sample_size - ((this_frag_number - 1) * frag_size));13204 fragment_offset = frag_index_in_submessage * frag_size;13205 snprintf(label, 20, "fragment [%d]", frag_index_in_submessage);13206 dissect_serialized_data(tree, pinfo, tvb, offset + fragment_offset,13207 this_frag_size, label, vendor_id, from_builtin_writer, NULL((void*)0), this_frag_number);13208 frag_index_in_submessage++;13209 }13210 generate_status_info(pinfo, wid, status_info);13211 }13212 }13213 rtps_util_detect_coherent_set_end_empty_data_case(&coherent_set_entity_info_object);13214}13215 13216/* *********************************************************************** */13217/* * R T P S _ D A T A _ B A T C H * */13218/* *********************************************************************** */13219static void dissect_RTPS_DATA_BATCH(tvbuff_t *tvb, packet_info *pinfo, gint offset,13220 guint8 flags, const guint encoding, int octets_to_next_header,13221 proto_tree *tree, guint16 vendor_id, endpoint_guid *guid) {13222 /*13223 *13224 * 0...2...........7...............15.............23...............3113225 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+13226 * |RTPS_DATA_BATCH|X|X|X|X|X|X|Q|E| octetsToNextHeader |13227 * +---------------+---------------+---------------+---------------+13228 * | Flags extraFlags | octetsToInlineQos |13229 * +---------------+---------------+---------------+---------------+13230 * | EntityId readerId |13231 * +---------------+---------------+---------------+---------------+13232 * | EntityId writerId |13233 * +---------------+---------------+---------------+---------------+13234 * | |13235 * + SequenceNumber batchSN +13236 * | |13237 * +---------------+---------------+---------------+---------------+13238 * | |13239 * + SequenceNumber firstSampleSN +13240 * | |13241 * +---------------+---------------+---------------+---------------+13242 * | SequenceNumberOffset offsetToLastSampleSN |13243 * +---------------+---------------+---------------+---------------+13244 * | unsigned long batchSampleCount |13245 * +---------------+---------------+---------------+---------------+13246 * | |13247 * ~ ParameterList batchInlineQos [only if Q==1] ~13248 * | |13249 * +---------------+---------------+---------------+---------------+13250 * | unsigned long octetsToSLEncapsulationId |13251 * +---------------+---------------+---------------+---------------+13252 * | |13253 * ~ SampleInfoList sampleInfoList ~13254 * | |13255 * +---------------+---------------+---------------+---------------+13256 * | SampleListEncapsulationId | |13257 * +---------------+---------------+---------------+---------------+13258 * | |13259 * ~ SampleList sampleList ~13260 * | |13261 * +---------------+---------------+---------------+---------------+13262 *13263 *13264 * SampleInfo:13265 * 0...............8..............16..............24..............3213266 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+13267 * |X|X|X|X|X|X|X|X|X|X|K|I|D|O|Q|T| octetsToInlineQoS |13268 * +---------------+---------------+---------------+---------------+13269 * | unsigned long serializedDataLength |13270 * +---------------+---------------+---------------+---------------+13271 * | |13272 * + Timestamp timestamp [only if T==1] +13273 * | |13274 * +---------------+---------------+---------------+---------------+13275 * | SequenceNumberOffset offsetSN [only if O==1] |13276 * +---------------+---------------+---------------+---------------+13277 * | |13278 * ~ ParameterList sampleInlineQos [only if Q==1] ~13279 * | |13280 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+13281 *13282 *13283 * Sample:13284 * 0...............8..............16..............24..............3213285 * +---------------+---------------+---------------+---------------+13286 * | |13287 * ~ SerializedData serializedData [sampleInfo D==1 || K==1] ~13288 * | |13289 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+13290 */13291 13292 int min_len;13293 gint old_offset = offset;13294 guint32 wid; /* Writer EntityID */13295 guint32 status_info = 0xffffffff;13296 gint32 octetsToSLEncapsulationId;13297 gint32 sampleListOffset;13298 guint16 encapsulation_id;13299 gboolean try_dissection_from_type_object = FALSE(0);13300 guint16 *sample_info_flags = NULL((void*)0);13301 guint32 *sample_info_length = NULL((void*)0);13302 gint32 sample_info_count = 0,13303 sample_info_max = rtps_max_batch_samples_dissected;13304 proto_item *octet_item;13305 rtps_dissector_data * data = NULL((void*)0);13306 gboolean is_compressed = FALSE(0);13307 gboolean uncompressed_ok = FALSE(0);13308 proto_tree *compressed_subtree = NULL((void*)0);13309 tvbuff_t *data_holder_tvb = tvb;13310 tvbuff_t *compressed_tvb = NULL((void*)0);13311 proto_tree *dissected_data_holder_tree = tree;13312 13313 13314 data = wmem_new(wmem_packet_scope(), rtps_dissector_data)((rtps_dissector_data*)wmem_alloc((wmem_packet_scope()), sizeof
(rtps_dissector_data)))
;13315 data->encapsulation_id = 0;13316 13317 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, RTPS_DATA_BATCH_FLAGS, flags);13318 13319 octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb,13320 offset + 2, 2, encoding);13321 13322 /* Calculates the minimum length for this submessage */13323 min_len = 44;13324 if ((flags & FLAG_RTPS_DATA_BATCH_Q(0x02)) != 0) min_len += 4;13325 13326 if (octets_to_next_header < min_len) {13327 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", min_len);13328 return;13329 }13330 13331 offset += 4;13332 13333 /* extraFlags */13334 proto_tree_add_item(tree, hf_rtps_extra_flags, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);13335 offset += 2;13336 13337 /* octetsToInlineQos */13338 proto_tree_add_item(tree, hf_rtps_octets_to_inline_qos, tvb, offset, 2, encoding);13339 offset += 2;13340 13341 13342 /* readerEntityId */13343 rtps_util_add_entity_id(tree, tvb, offset, hf_rtps_sm_rdentity_id, hf_rtps_sm_rdentity_id_key,13344 hf_rtps_sm_rdentity_id_kind, ett_rtps_rdentity, "readerEntityId", NULL((void*)0));13345 offset += 4;13346 13347 /* writerEntityId */13348 rtps_util_add_entity_id(tree, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key,13349 hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", &wid);13350 offset += 4;13351 guid->entity_id = wid;13352 guid->fields_present |= GUID_HAS_ENTITY_ID0x00000008;13353 rtps_util_add_topic_info(tree, pinfo, tvb, offset, guid);13354 13355 13356 /* Batch sequence number */13357 rtps_util_add_seq_number(tree, tvb, offset, encoding, "batchSeqNumber");13358 offset += 8;13359 13360 /* First sample sequence number */13361 rtps_util_add_seq_number(tree, tvb, offset, encoding, "firstSampleSeqNumber");13362 offset += 8;13363 13364 /* offsetToLastSampleSN */13365 proto_tree_add_item(tree, hf_rtps_data_batch_offset_to_last_sample_sn, tvb, offset, 4, encoding);13366 offset += 4;13367 13368 /* batchSampleCount */13369 proto_tree_add_item(tree, hf_rtps_data_batch_sample_count, tvb, offset, 4, encoding);13370 offset += 4;13371 13372 /* Parameter list (if Q==1) */13373 /* InlineQos */13374 if ((flags & FLAG_RTPS_DATA_BATCH_Q(0x02)) != 0) {13375 offset = dissect_parameter_sequence(tree, pinfo, tvb, offset, encoding,13376 octets_to_next_header - (offset - old_offset) + 4,13377 "batchInlineQos", 0x0200, &status_info, vendor_id, FALSE(0), NULL((void*)0));13378 }13379 13380 /* octetsToSLEncapsulationId */13381 proto_tree_add_item_ret_uint(tree, hf_rtps_data_batch_octets_to_sl_encap_id, tvb,13382 offset, 4, encoding, &octetsToSLEncapsulationId);13383 offset += 4;13384 sampleListOffset = offset + octetsToSLEncapsulationId;13385 13386 13387 /* Sample info list */13388 {13389 proto_item *ti, *list_item;13390 proto_tree *sil_tree;13391 sample_info_count = 0;13392 13393 sil_tree = proto_tree_add_subtree(tree, tvb, offset, octetsToSLEncapsulationId,13394 ett_rtps_sample_info_list, &list_item, "Sample Info List");13395 13396 /* Allocate sample_info_flags and sample_info_length13397 * to store a copy of the flags for each sample info */13398 if (rtps_max_batch_samples_dissected == 0) {13399 sample_info_max = 1024; /* Max size of sampleInfo shown */13400 }13401 sample_info_flags = (guint16 *)wmem_alloc(wmem_packet_scope(), sizeof(guint16) *sample_info_max);13402 sample_info_length = (guint32 *)wmem_alloc(wmem_packet_scope(), sizeof(guint32) *sample_info_max);13403 13404 /* Sample Info List: start decoding the sample info list until the offset13405 * is greater or equal than 'sampleListOffset' */13406 while (offset < sampleListOffset) {13407 guint16 flags2;13408 /*guint16 octetsToInlineQos;*/13409 gint min_length;13410 proto_tree *si_tree;13411 gint offset_begin_sampleinfo = offset;13412 13413 if (rtps_max_batch_samples_dissected > 0 && (guint)sample_info_count >= rtps_max_batch_samples_dissected) {13414 expert_add_info(pinfo, list_item, &ei_rtps_more_samples_available);13415 offset = sampleListOffset;13416 break;13417 }13418 13419 si_tree = proto_tree_add_subtree_format(sil_tree, tvb, offset, -1, ett_rtps_sample_info, &ti, "sampleInfo[%d]", sample_info_count);13420 13421 flags2 = tvb_get_ntohs(tvb, offset); /* Flags are always big endian */13422 sample_info_flags[sample_info_count] = flags2;13423 proto_tree_add_bitmask_value(si_tree, tvb, offset, hf_rtps_sm_flags2, ett_rtps_flags, RTPS_SAMPLE_INFO_FLAGS16, flags2);13424 offset += 2;13425 proto_tree_add_item(si_tree, hf_rtps_data_batch_octets_to_inline_qos, tvb,13426 offset, 2, encoding);13427 offset += 2;13428 13429 min_length = 4;13430 if ((flags2 & FLAG_SAMPLE_INFO_T(0x01)) != 0) min_len += 8;13431 if ((flags2 & FLAG_SAMPLE_INFO_Q(0x02)) != 0) min_len += 4;13432 if ((flags2 & FLAG_SAMPLE_INFO_O(0x04)) != 0) min_len += 4;13433 13434 /* Ensure there are enough bytes to decode */13435 if (sampleListOffset - offset < min_length) {13436 expert_add_info_format(pinfo, ti, &ei_rtps_parameter_value_invalid, "Error: not enough bytes to dissect sample info");13437 return;13438 }13439 13440 /* Serialized data length */13441 proto_tree_add_item_ret_uint(si_tree, hf_rtps_data_batch_serialized_data_length, tvb,13442 offset, 4, encoding, &sample_info_length[sample_info_count]);13443 offset += 4;13444 13445 /* Timestamp [only if T==1] */13446 if ((flags2 & FLAG_SAMPLE_INFO_T(0x01)) != 0) {13447 rtps_util_add_timestamp(si_tree, tvb, offset, encoding, hf_rtps_data_batch_timestamp);13448 offset += 8;13449 }13450 13451 /* Offset SN [only if O==1] */13452 if ((flags2 & FLAG_SAMPLE_INFO_O(0x04)) != 0) {13453 proto_tree_add_item(si_tree, hf_rtps_data_batch_offset_sn, tvb, offset, 4, encoding);13454 offset += 4;13455 }13456 13457 /* Parameter list [only if Q==1] */13458 if ((flags2 & FLAG_SAMPLE_INFO_Q(0x02)) != 0) {13459 offset = dissect_parameter_sequence(si_tree, pinfo, tvb, offset, encoding,13460 octets_to_next_header - (offset - old_offset) + 4,13461 "sampleInlineQos", 0x0200, &status_info, vendor_id, FALSE(0), NULL((void*)0));13462 }13463 proto_item_set_len(ti, offset - offset_begin_sampleinfo);13464 sample_info_count++;13465 } /* while (offset < sampleListOffset) */13466 }13467 13468 /* Dissects the encapsulated data heder and uncompress the tvb if it is compressed and13469 it can be uncompressed */13470 offset = rtps_prepare_encapsulated_data(13471 tree,13472 pinfo,13473 tvb,13474 offset,13475 tvb_reported_length(tvb) - offset,13476 TRUE(!(0)),13477 &encapsulation_id,13478 NULL((void*)0),13479 NULL((void*)0),13480 NULL((void*)0),13481 NULL((void*)0),13482 &is_compressed,13483 &uncompressed_ok,13484 &compressed_tvb,13485 &compressed_subtree);13486 data->encapsulation_id = encapsulation_id;13487 if (is_compressed && uncompressed_ok) {13488 data_holder_tvb = compressed_tvb;13489 offset = 0;13490 dissected_data_holder_tree = compressed_subtree;13491 octets_to_next_header = tvb_reported_length(data_holder_tvb);13492 old_offset = 0;13493 }13494 13495 /* If it is compressed but not uncompressed don't try to dissect */13496 if (is_compressed == uncompressed_ok) {13497 /* Now the list of serialized data:13498 * Serialized data is allocated one after another one.13499 * We need to use the data previously stored in the sampleInfo to detect the13500 * kind and size.13501 * - sample_info_flags -> Array of guint16 holding the flags for this sample info13502 * - sample_info_length -> Array of guint32 with the size of this sample info13503 * - sample_info_count -> size of the above arrays13504 * This section will NEVER dissect more than 'sample_info_count'.13505 * Note, if there are not enough bytes in the buffer, don't dissect it (this13506 * can happen for example when a DISPOSE message is sent, there are sample13507 * info records, but the payload size is zero for all of them)13508 */13509 if ((octets_to_next_header - (offset - old_offset) > 0)) {13510 proto_item *ti;13511 proto_tree *sil_tree;13512 gint count = 0;13513 13514 sil_tree = proto_tree_add_subtree(13515 dissected_data_holder_tree,13516 data_holder_tvb,13517 offset,13518 -1,13519 ett_rtps_sample_batch_list,13520 &ti,13521 "Serialized Sample List");13522 for (count = 0; count < sample_info_count; ++count) {13523 /* Ensure there are enough bytes in the buffer to dissect the next sample */13524 if (octets_to_next_header - (offset - old_offset) + 4 < (gint)sample_info_length[count]) {13525 expert_add_info_format(pinfo, ti, &ei_rtps_parameter_value_invalid, "Error: not enough bytes to dissect sample");13526 return;13527 }13528 /* We have enough bytes to dissect the next sample, so we update the rtps_dissector_data13529 * "position in the batch" value and dissect the sample13530 */13531 data->position_in_batch = count;13532 if (encapsulation_id == ENCAPSULATION_CDR_LE(0x0001) ||13533 encapsulation_id == ENCAPSULATION_CDR_BE(0x0000) ||13534 encapsulation_id == ENCAPSULATION_CDR2_LE(0x0007) ||13535 encapsulation_id == ENCAPSULATION_CDR2_BE(0x0006) ||13536 encapsulation_id == ENCAPSULATION_PL_CDR_LE(0x0003) ||13537 encapsulation_id == ENCAPSULATION_PL_CDR_BE(0x0002)) {13538 try_dissection_from_type_object = TRUE(!(0));13539 }13540 if ((sample_info_flags[count] & FLAG_SAMPLE_INFO_K(0x20)) != 0) {13541 proto_tree_add_bytes_format(sil_tree, hf_rtps_serialized_key,13542 data_holder_tvb, offset, sample_info_length[count], NULL((void*)0), "serializedKey[%d]", count);13543 } else {13544 if (!rtps_util_try_dissector(13545 sil_tree, pinfo, data_holder_tvb, offset, guid, data, get_encapsulation_endianness(encapsulation_id), get_encapsulation_version(encapsulation_id), try_dissection_from_type_object)) {13546 proto_tree_add_bytes_format(sil_tree, hf_rtps_serialized_data,13547 data_holder_tvb, offset, sample_info_length[count], NULL((void*)0), "serializedData[%d]", count);13548 }13549 }13550 offset += sample_info_length[count];13551 }13552 }13553 }13554 generate_status_info(pinfo, wid, status_info);13555}13556 13557/* *********************************************************************** */13558/* * G A P * */13559/* *********************************************************************** */13560static void dissect_GAP(tvbuff_t *tvb, packet_info *pinfo, gint offset,13561 guint8 flags, const guint encoding, int octets_to_next_header,13562 proto_tree *tree, endpoint_guid *guid) {13563 /* RTPS 1.0/1.1:13564 * 0...2...........7...............15.............23...............3113565 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+13566 * | GAP |X|X|X|X|X|X|X|E| octetsToNextHeader |13567 * +---------------+---------------+---------------+---------------+13568 * | ObjectId readerObjectId |13569 * +---------------+---------------+---------------+---------------+13570 * | ObjectId writerObjectId |13571 * +---------------+---------------+---------------+---------------+13572 * | |13573 * + SequenceNumber firstSeqNumber +13574 * | |13575 * +---------------+---------------+---------------+---------------+13576 * | |13577 * + Bitmap bitmap +13578 * | |13579 * +---------------+---------------+---------------+---------------+13580 *13581 * RTPS 1.2/2.013582 * 0...2...........7...............15.............23...............3113583 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+13584 * | GAP |X|X|X|X|X|X|F|E| octetsToNextHeader |13585 * +---------------+---------------+---------------+---------------+13586 * | EntityId readerEntityId |13587 * +---------------+---------------+---------------+---------------+13588 * | EntityId writerEntityId |13589 * +---------------+---------------+---------------+---------------+13590 * | |13591 * + SequenceNumber gapStart +13592 * | |13593 * +---------------+---------------+---------------+---------------+13594 * | |13595 * ~ SequenceNumberSet gapList ~13596 * | |13597 * +---------------+---------------+---------------+---------------+13598 */13599 proto_item *octet_item;13600 guint32 wid;13601 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, GAP_FLAGS, flags);13602 13603 octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb,13604 offset + 2, 2, encoding);13605 13606 if (octets_to_next_header < 24) {13607 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= 24)");13608 return;13609 }13610 13611 offset += 4;13612 13613 /* readerEntityId */13614 rtps_util_add_entity_id(tree, tvb, offset,13615 hf_rtps_sm_rdentity_id, hf_rtps_sm_rdentity_id_key, hf_rtps_sm_rdentity_id_kind,13616 ett_rtps_rdentity, "readerEntityId", NULL((void*)0));13617 offset += 4;13618 13619 /* writerEntityId */13620 rtps_util_add_entity_id(tree, tvb, offset,13621 hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key, hf_rtps_sm_wrentity_id_kind,13622 ett_rtps_wrentity, "writerEntityId", &wid);13623 offset += 4;13624 guid->entity_id = wid;13625 guid->fields_present |= GUID_HAS_ENTITY_ID0x00000008;13626 rtps_util_add_topic_info(tree, pinfo, tvb, offset, guid);13627 13628 13629 /* First Sequence Number */13630 rtps_util_add_seq_number(tree, tvb, offset, encoding, "gapStart");13631 offset += 8;13632 13633 /* Bitmap */13634 rtps_util_add_bitmap(tree, tvb, offset, encoding, "gapList", FALSE(0));13635}13636 13637 13638/* *********************************************************************** */13639/* * I N F O _ T S * */13640/* *********************************************************************** */13641static void dissect_INFO_TS(tvbuff_t *tvb, packet_info *pinfo, gint offset, guint8 flags,13642 const guint encoding, int octets_to_next_header, proto_tree *tree) {13643 /* RTPS 1.0/1.1:13644 * 0...2...........7...............15.............23...............3113645 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+13646 * | INFO_TS |X|X|X|X|X|X|I|E| octetsToNextHeader |13647 * +---------------+---------------+---------------+---------------+13648 * | |13649 * + NtpTime ntpTimestamp [only if I==0] +13650 * | |13651 * +---------------+---------------+---------------+---------------+13652 *13653 * RTPS 1.2/2.0:13654 * 0...2...........7...............15.............23...............3113655 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+13656 * | INFO_TS |X|X|X|X|X|X|T|E| octetsToNextHeader |13657 * +---------------+---------------+---------------+---------------+13658 * | |13659 * + Timestamp timestamp [only if T==1] +13660 * | |13661 * +---------------+---------------+---------------+---------------+13662 */13663 13664 int min_len;13665 proto_item *octet_item;13666 13667 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, INFO_TS_FLAGS, flags);13668 13669 octet_item = proto_tree_add_item(tree,13670 hf_rtps_sm_octets_to_next_header,13671 tvb,13672 offset + 2,13673 2,13674 encoding);13675 13676 min_len = 0;13677 if ((flags & FLAG_INFO_TS_T(0x02)) == 0) min_len += 8;13678 13679 if (octets_to_next_header != min_len) {13680 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be == %u)", min_len);13681 return;13682 }13683 13684 offset += 4;13685 13686 if ((flags & FLAG_INFO_TS_T(0x02)) == 0) {13687 rtps_util_add_timestamp(tree,13688 tvb,13689 offset,13690 encoding,13691 hf_rtps_info_ts_timestamp);13692 }13693}13694 13695 13696/* *********************************************************************** */13697/* * I N F O _ S R C * */13698/* *********************************************************************** */13699static void dissect_INFO_SRC(tvbuff_t *tvb, packet_info *pinfo, gint offset, guint8 flags,13700 const guint encoding, int octets_to_next_header, proto_tree *tree, guint16 rtps_version) {13701 /* RTPS 1.0/1.1:13702 * 0...2...........7...............15.............23...............3113703 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+13704 * | INFO_SRC |X|X|X|X|X|X|X|E| octetsToNextHeader |13705 * +---------------+---------------+---------------+---------------+13706 * | IPAddress appIpAddress |13707 * +---------------+---------------+---------------+---------------+13708 * | ProtocolVersion version | VendorId vendor |13709 * +---------------+---------------+---------------+---------------+13710 * | HostId hostId |13711 * +---------------+---------------+---------------+---------------+13712 * | AppId appId |13713 * +---------------+---------------+---------------+---------------+13714 *13715 * RTPS 1.2/2.0:13716 * 0...2...........7...............15.............23...............3113717 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+13718 * | INFO_SRC |X|X|X|X|X|X|X|E| octetsToNextHeader |13719 * +---------------+---------------+---------------+---------------+13720 * | long unused |13721 * +---------------+---------------+---------------+---------------+13722 * | ProtocolVersion version | VendorId vendor |13723 * +---------------+---------------+---------------+---------------+13724 * | |13725 * + GuidPrefix guidPrefix +13726 * | |13727 * +---------------+---------------+---------------+---------------+13728 */13729 proto_item *octet_item;13730 guint16 version;13731 13732 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, INFO_SRC_FLAGS, flags);13733 13734 octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb,13735 offset + 2, 2, encoding);13736 13737 if (rtps_version < 0x0200) {13738 if (octets_to_next_header != 16) {13739 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be == 16)");13740 return;13741 }13742 } else {13743 if (octets_to_next_header != 20) {13744 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be == 20)");13745 return;13746 }13747 }13748 13749 offset += 4;13750 13751 /* Use version field to determine what to display */13752 version = tvb_get_ntohs(tvb, offset+4);13753 if (version < 0x102) {13754 proto_tree_add_item(tree, hf_rtps_info_src_ip, tvb, offset, 4, encoding);13755 } else {13756 proto_tree_add_item(tree, hf_rtps_info_src_unused, tvb, offset, 4, encoding);13757 }13758 13759 offset += 4;13760 13761 rtps_util_add_protocol_version(tree, tvb, offset);13762 offset += 2;13763 13764 /* Vendor ID */13765 rtps_util_add_vendor_id(tree, tvb, offset);13766 offset += 2;13767 13768 if (rtps_version < 0x0200) {13769 rtps_util_add_guid_prefix_v1(tree, tvb, offset,13770 hf_rtps_sm_guid_prefix_v1, hf_rtps_sm_host_id, hf_rtps_sm_app_id,13771 hf_rtps_sm_instance_id_v1, hf_rtps_sm_app_kind,13772 NULL((void*)0)); /* Use default 'guidPrefix' */13773 } else {13774 rtps_util_add_guid_prefix_v2(tree, tvb, offset, hf_rtps_guid_prefix_src,13775 hf_rtps_host_id, hf_rtps_app_id, hf_rtps_sm_instance_id, hf_rtps_guid_prefix);13776 }13777}13778 13779 13780/* *********************************************************************** */13781/* * I N F O _ R E P L Y _ I P 4 * */13782/* *********************************************************************** */13783static void dissect_INFO_REPLY_IP4(tvbuff_t *tvb, packet_info *pinfo, gint offset, guint8 flags,13784 const guint encoding, int octets_to_next_header, proto_tree *tree) {13785 /* RTPS 1.0/1.1:13786 * 0...2...........7...............15.............23...............3113787 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+13788 * | INFO_REPLY |X|X|X|X|X|X|M|E| octetsToNextHeader |13789 * +---------------+---------------+---------------+---------------+13790 * | IPAddress unicastReplyIpAddress |13791 * +---------------+---------------+---------------+---------------+13792 * | Port unicastReplyPort |13793 * +---------------+---------------+---------------+---------------+13794 * | IPAddress multicastReplyIpAddress [ only if M==1 ] |13795 * +---------------+---------------+---------------+---------------+13796 * | Port multicastReplyPort [ only if M==1 ] |13797 * +---------------+---------------+---------------+---------------+13798 *13799 * RTPS 1.2/2.0:13800 * 0...2...........7...............15.............23...............3113801 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+13802 * |INFO_REPLY_IP4 |X|X|X|X|X|X|M|E| octetsToNextHeader |13803 * +---------------+---------------+---------------+---------------+13804 * | |13805 * + LocatorUDPv4 unicastReplyLocator +13806 * | |13807 * +---------------+---------------+---------------+---------------+13808 * | |13809 * + LocatorUDPv4 multicastReplyLocator [only if M==1] +13810 * | |13811 * +---------------+---------------+---------------+---------------+13812 */13813 int min_len;13814 proto_item *octet_item;13815 13816 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, INFO_REPLY_IP4_FLAGS, flags);13817 13818 octet_item = proto_tree_add_item(tree,13819 hf_rtps_sm_octets_to_next_header,13820 tvb,13821 offset + 2,13822 2,13823 encoding);13824 13825 min_len = 8;13826 if ((flags & FLAG_INFO_REPLY_IP4_M(0x02)) != 0) min_len += 8;13827 13828 if (octets_to_next_header != min_len) {13829 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be == %u)", min_len);13830 return;13831 }13832 13833 offset += 4;13834 13835 13836 /* unicastReplyLocator */13837 rtps_util_add_locator_udp_v4(tree, pinfo, tvb, offset,13838 "unicastReplyLocator", encoding);13839 13840 offset += 8;13841 13842 /* multicastReplyLocator */13843 if ((flags & FLAG_INFO_REPLY_IP4_M(0x02)) != 0) {13844 rtps_util_add_locator_udp_v4(tree, pinfo, tvb, offset,13845 "multicastReplyLocator", encoding);13846 /*offset += 8;*/13847 }13848}13849 13850/* *********************************************************************** */13851/* * I N F O _ D S T * */13852/* *********************************************************************** */13853static void dissect_INFO_DST(tvbuff_t *tvb, packet_info *pinfo, gint offset, guint8 flags,13854 const guint encoding, int octets_to_next_header, proto_tree *tree,13855 guint16 version, endpoint_guid *dst_guid) {13856 /* RTPS 1.0/1.1:13857 * 0...2...........7...............15.............23...............3113858 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+13859 * | INFO_DST |X|X|X|X|X|X|X|E| octetsToNextHeader |13860 * +---------------+---------------+---------------+---------------+13861 * | HostId hostId |13862 * +---------------+---------------+---------------+---------------+13863 * | AppId appId |13864 * +---------------+---------------+---------------+---------------+13865 *13866 * RTPS 1.2/2.0:13867 * 0...2...........7...............15.............23...............3113868 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+13869 * | INFO_DST |X|X|X|X|X|X|X|E| octetsToNextHeader |13870 * +---------------+---------------+---------------+---------------+13871 * | |13872 * + GuidPrefix guidPrefix +13873 * | |13874 * +---------------+---------------+---------------+---------------+13875 */13876 proto_item *octet_item;13877 13878 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, INFO_DST_FLAGS, flags);13879 13880 octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb,13881 offset + 2, 2, encoding);13882 13883 if (version < 0x0200) {13884 if (octets_to_next_header != 8) {13885 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be == 8)");13886 return;13887 }13888 } else {13889 if (octets_to_next_header != 12) {13890 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be == 12)");13891 return;13892 }13893 }13894 13895 offset += 4;13896 13897 if (version < 0x0200) {13898 rtps_util_add_guid_prefix_v1(tree, tvb, offset,13899 hf_rtps_sm_guid_prefix_v1, hf_rtps_sm_host_id, hf_rtps_sm_app_id,13900 hf_rtps_sm_instance_id_v1, hf_rtps_sm_app_kind,13901 NULL((void*)0));13902 } else {13903 rtps_util_add_guid_prefix_v2(tree, tvb, offset, hf_rtps_guid_prefix_dst,13904 hf_rtps_host_id, hf_rtps_app_id, hf_rtps_sm_instance_id, hf_rtps_guid_prefix);13905 13906 dst_guid->host_id = tvb_get_ntohl(tvb, offset);13907 dst_guid->app_id = tvb_get_ntohl(tvb, offset + 4);13908 dst_guid->instance_id = tvb_get_ntohl(tvb, offset + 8);13909 dst_guid->fields_present |= GUID_HAS_HOST_ID0x00000001|GUID_HAS_APP_ID0x00000002|GUID_HAS_INSTANCE_ID0x00000004;13910 }13911}13912 13913/* *********************************************************************** */13914/* * I N F O _ R E P L Y * */13915/* *********************************************************************** */13916static void dissect_INFO_REPLY(tvbuff_t *tvb, packet_info *pinfo, gint offset, guint8 flags,13917 const guint encoding, int octets_to_next_header, proto_tree *tree) {13918 /* RTPS 1.0/1.1:13919 * INFO_REPLY is *NOT* the same thing as the old INFO_REPLY.13920 *13921 * RTPS 1.2/2.0:13922 * 0...2...........7...............15.............23...............3113923 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+13924 * | INFO_REPLY |X|X|X|X|X|X|M|E| octetsToNextHeader |13925 * +---------------+---------------+---------------+---------------+13926 * | |13927 * ~ LocatorList unicastReplyLocatorList ~13928 * | |13929 * +---------------+---------------+---------------+---------------+13930 * | |13931 * ~ LocatorList multicastReplyLocatorList [only if M==1] ~13932 * | |13933 * +---------------+---------------+---------------+---------------+13934 */13935 13936 int min_len;13937 proto_item *octet_item;13938 13939 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, INFO_REPLY_FLAGS, flags);13940 13941 octet_item = proto_tree_add_item(tree,13942 hf_rtps_sm_octets_to_next_header,13943 tvb,13944 offset + 2,13945 2,13946 encoding);13947 13948 min_len = 4;13949 if ((flags & FLAG_INFO_REPLY_M(0x02)) != 0) min_len += 4;13950 13951 if (octets_to_next_header < min_len) {13952 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", min_len);13953 return;13954 }13955 13956 offset += 4;13957 13958 /* unicastReplyLocatorList */13959 offset = rtps_util_add_locator_list(tree, pinfo, tvb, offset, "unicastReplyLocatorList", encoding);13960 13961 /* multicastReplyLocatorList */13962 if ((flags & FLAG_INFO_REPLY_M(0x02)) != 0) {13963 /*offset = */rtps_util_add_locator_list(tree, pinfo, tvb, offset, "multicastReplyLocatorList", encoding);13964 }13965}13966 13967/* *********************************************************************** */13968/* * RTI CRC * */13969/* *********************************************************************** */13970static void dissect_RTI_CRC(tvbuff_t *tvb, packet_info *pinfo, gint offset, guint8 flags,13971 const guint encoding, gint octets_to_next_header,proto_tree *tree) {13972 /*13973 * 0...2...........7...............15.............23...............3113974 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+13975 * | RTI_CRC |X|X|X|X|X|X|X|E| octetsToNextHeader |13976 * +---------------+---------------+---------------+---------------+13977 * | RTPS Message length (without the 20 bytes header) |13978 * +---------------+---------------+---------------+---------------+13979 * | CRC32 |13980 * +---------------+---------------+---------------+---------------+13981 Total 12 bytes */13982 proto_item *octet_item;13983 13984 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, RTI_CRC_FLAGS, flags);13985 13986 octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb,13987 offset + 2, 2, encoding);13988 13989 if (octets_to_next_header != 8) {13990 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be == 8)");13991 return;13992 }13993 13994 offset += 4;13995 proto_tree_add_item(tree, hf_rtps_sm_rti_crc_number, tvb, offset, 4, encoding);13996 13997 offset += 4;13998 proto_tree_add_item(tree, hf_rtps_sm_rti_crc_result, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000);13999}14000 14001/**14002 * @brief Do a forward search for the begining of the tags section in the14003 * SRTPS POSTFIX/SEC POSTFIX submessage.14004 */14005static gint rtps_util_look_for_secure_tag(14006 tvbuff_t *tvb,14007 gint offset)14008{14009 gint submessage_offset = offset;14010 guint8 submessage_id = 0;14011 gint tvb_remaining_len = tvb_reported_length_remaining(tvb, offset);14012 gint submessage_len = 0;14013 14014 while (tvb_remaining_len > 4) {14015 submessage_id = tvb_get_guint8(tvb, submessage_offset);14016 submessage_len = tvb_get_guint16(14017 tvb,14018 submessage_offset + 2,14019 ENC_LITTLE_ENDIAN0x80000000);14020 tvb_remaining_len -= submessage_len;14021 if (submessage_id == SUBMESSAGE_SRTPS_POSTFIX(0x34)14022 || submessage_id == SUBMESSAGE_SEC_POSTFIX(0x32)) {14023 return submessage_offset + 4;14024 }14025 submessage_offset += submessage_len;14026 tvb_remaining_len -= submessage_len;14027 }14028 return -1;14029}14030 14031// NOLINTNEXTLINE(misc-no-recursion)14032static void dissect_SECURE(14033 tvbuff_t *tvb,14034 packet_info *pinfo _U___attribute__((unused)),14035 gint offset,14036 guint8 flags,14037 const guint encoding _U___attribute__((unused)),14038 int octets_to_next_header,14039 proto_tree *tree,14040 guint16 vendor_id _U___attribute__((unused)),14041 endpoint_guid *guid,14042 bool_Bool dissecting_encrypted_submessage)14043{14044 /* *********************************************************************** */14045 /* * SECURE SUBMESSAGE * */14046 /* *********************************************************************** */14047 /* 0...2...........7...............15.............23...............3114048 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+14049 * | SECURE SUBMSG |X|X|X|X|X|X|S|E| octetsToNextHeader |14050 * +---------------+---------------+---------------+---------------+14051 * | long transformationKind |14052 * +---------------+---------------+---------------+---------------+14053 * | |14054 * + octet transformationId[8] +14055 * | |14056 * +---------------+---------------+---------------+---------------+14057 * | |14058 * + octet secure_data[] +14059 * | |14060 * +---------------+---------------+---------------+---------------+14061 */14062 proto_tree * payload_tree;14063 guint local_encoding;14064 gint secure_body_len = 0;14065 rtps_current_packet_decryption_info_t *decryption_info;14066 gint initial_offset = offset;14067 14068 proto_tree_add_bitmask_value(14069 tree,14070 tvb,14071 offset + 1,14072 hf_rtps_sm_flags,14073 ett_rtps_flags,14074 SECURE_FLAGS,14075 flags);14076 local_encoding = ((flags & FLAG_E(0x01)) != 0) ? ENC_LITTLE_ENDIAN0x80000000 : ENC_BIG_ENDIAN0x00000000;14077 14078 proto_tree_add_item(14079 tree,14080 hf_rtps_sm_octets_to_next_header,14081 tvb,14082 offset + 2,14083 2,14084 local_encoding);14085 offset += 4;14086 14087 payload_tree = proto_tree_add_subtree_format(14088 tree,14089 tvb,14090 offset,14091 octets_to_next_header,14092 ett_rtps_secure_payload_tree,14093 NULL((void*)0),14094 "Secured payload");14095 14096 proto_tree_add_item(14097 payload_tree,14098 hf_rtps_secure_secure_data_length,14099 tvb,14100 offset,14101 4,14102 ENC_BIG_ENDIAN0x00000000);14103 offset += 4;14104 14105 secure_body_len = octets_to_next_header - 4;14106 proto_tree_add_item(14107 payload_tree,14108 hf_rtps_secure_secure_data,14109 tvb,14110 offset,14111 octets_to_next_header - 4,14112 local_encoding);14113 14114 decryption_info = (rtps_current_packet_decryption_info_t *)14115 p_get_proto_data(14116 pinfo->pool,14117 pinfo,14118 proto_rtps,14119 RTPS_DECRYPTION_INFO_KEY5);14120 14121 if (!enable_rtps_psk_decryption14122 || decryption_info == NULL((void*)0)14123 || !decryption_info->try_psk_decryption) {14124 return;14125 }14126 14127 if (dissecting_encrypted_submessage) {14128 /*14129 * This should never happen.14130 * If an RTPS message is encrypted with a pre-shared key, then the dissector14131 * will use this function to decrypt the SEC_BODY submessage and attempt to14132 * dissect it by calling dissect_rtps_submessages. The14133 * dissecting_encrypted_submessage parameter makes sure that the recursion14134 * is not infinite. However, this is not really possible because pre-shared14135 * key encryption takes only place at the RTPS message level; there14136 * shouldn't be another pre-shared key encoded SEC_BODY submessage at this14137 * point. Clang complains about the recursion because it doesn't have the14138 * information about the RTPS protocol. We ignore the warning with the14139 * NOLINTNEXTLINE suppression (misc-no-recursion argument) above each14140 * affected function.14141 */14142 return;14143 }14144 14145 for (guint entry_idx = 0; entry_idx < rtps_psk_options.size; entry_idx++) {14146 guint8 *decrypted_data = NULL((void*)0);14147 guint8 session_key[RTPS_HMAC_256_BUFFER_SIZE_BYTES32];14148 guint8 *tag = NULL((void*)0);14149 gint tag_offset = 0;14150 gcry_error_t error = GPG_ERR_NO_ERROR;14151 /* Iterate all entries in the PSK table of the RTPS protocol options */14152 rtps_psk_options_entry_t *entry = &rtps_psk_options.entries[entry_idx];14153 /* Check if each field is equal or the ignore options are enabled */14154 gboolean host_id_mismatch = !entry->host_id.ignore14155 && entry->host_id.value != decryption_info->guid_prefix.host_id;14156 gboolean host_app_mismatch = !entry->app_id.ignore14157 && entry->app_id.value != decryption_info->guid_prefix.app_id;14158 gboolean host_instance_mismatch = !entry->instance_id.ignore14159 && entry->instance_id.value != decryption_info->guid_prefix.instance_id;14160 gboolean psk_index_mismatch = !entry->passphrase_id.ignore14161 && entry->passphrase_id.value != decryption_info->psk_index;14162 14163 /*14164 * We proceed to decryption only if host, app and instance ids are equals14165 * (or ignored).14166 */14167 if (host_id_mismatch14168 || host_app_mismatch14169 || host_instance_mismatch14170 || psk_index_mismatch) {14171 continue;14172 }14173 14174 /*14175 * When decrypting with PSKs there is only one tag in the SRTPS POSTFIX/SEC14176 * POSTFIX submessage. The offset is the one until the next submessage.14177 * The 4 constant is the sum of submessage_id(1 byte)14178 * + flags (1 byte) + octects to the next submessage(2 bytes)14179 */14180 tag_offset = rtps_util_look_for_secure_tag(14181 tvb,14182 initial_offset + octets_to_next_header + 4);14183 if (tag_offset > 0) {14184 tag = tvb_memdup(14185 wmem_packet_scope(),14186 tvb,14187 tag_offset,14188 SECURE_TAG_COMMON_AND_SPECIFIC_MAC_LENGTH16);14189 }14190 14191 /* Decrypt the payload */14192 decrypted_data = rtps_decrypt_secure_payload(14193 tvb,14194 pinfo,14195 offset,14196 (size_t) secure_body_len,14197 entry->passphrase_secret,14198 decryption_info->init_vector,14199 decryption_info->algorithm,14200 decryption_info->transformation_key,14201 decryption_info->session_id,14202 tag,14203 session_key,14204 &error,14205 wmem_packet_scope());14206 error = gpg_err_code(error);14207 if (error == GPG_ERR_NO_ERROR) {14208 tvbuff_t *decrypted_tvb = NULL((void*)0);14209 /*14210 * Each byte becomes two hexadecimal characters.14211 * We also add one for the NUL terminator, which we will add manually14212 * because bytes_to_hexstr does not add it.14213 */14214 char session_key_hexadecimal_representation[14215 RTPS_HMAC_256_BUFFER_SIZE_BYTES32 * 2 + 1];14216 char *session_key_nul_terminator_ptr = NULL((void*)0);14217 rtps_guid_prefix_t guid_backup = decryption_info->guid_prefix;14218 14219 /* Add the decrypted payload as a generated tvb */14220 decrypted_tvb = tvb_new_real_data(14221 decrypted_data,14222 (guint) secure_body_len,14223 secure_body_len);14224 tvb_set_child_real_data_tvbuff(tvb, decrypted_tvb);14225 session_key_nul_terminator_ptr = bytes_to_hexstr(14226 session_key_hexadecimal_representation,14227 session_key,14228 RTPS_HMAC_256_BUFFER_SIZE_BYTES32);14229 *session_key_nul_terminator_ptr = '\0';14230 14231 proto_tree* decrypted_subtree = NULL((void*)0);14232 decrypted_subtree = proto_tree_add_subtree_format(14233 payload_tree,14234 decrypted_tvb,14235 offset,14236 secure_body_len,14237 ett_rtps_decrypted_payload,14238 NULL((void*)0),14239 "Decrypted Payload (Passphrase Secret: \"%s\", "14240 "Passphrase ID: %d Session Key: %s)",14241 entry->passphrase_secret,14242 entry->passphrase_id.value,14243 session_key_hexadecimal_representation);14244 add_new_data_source(pinfo, decrypted_tvb, "Decrypted Data");14245 proto_item_set_generated(decrypted_subtree);14246 14247 /*14248 * Reset the content of the decryption info except the guid. This way we14249 * avoid interefering in possible decription inside the secure payload.14250 */14251 rtps_current_packet_decryption_info_reset(decryption_info);14252 decryption_info->guid_prefix = guid_backup;14253 14254 dissect_rtps_submessages(14255 decrypted_tvb,14256 0,14257 pinfo,14258 decrypted_subtree,14259 0x0200,14260 vendor_id,14261 guid,14262 true1 /* dissecting_encrypted_submessage. */);14263 break;14264 } else if (error == GPG_ERR_CHECKSUM) {14265 /* Wrong PSK */14266 proto_tree_add_expert_format(14267 payload_tree,14268 pinfo,14269 &ei_rtps_invalid_psk,14270 tvb,14271 offset,14272 octets_to_next_header,14273 "Bad %s tag check. " \14274 "Possibly wrong passphrase secret (\"%s\") or malformed packet",14275 val_to_str(14276 decryption_info->algorithm,14277 secure_transformation_kind,14278 "Unknown algorithm"),14279 entry->passphrase_secret);14280 break;14281 } else {14282 /* General error. Displaying GCRY error output */14283 proto_tree_add_expert_format(14284 payload_tree,14285 pinfo,14286 &ei_rtps_invalid_psk,14287 tvb,14288 offset,14289 octets_to_next_header,14290 "Unable to decrypt content with passphrase secret (\"%s\"). %s: %s",14291 entry->passphrase_secret,14292 gcry_strsource(error),14293 gcry_strerror(error));14294 break;14295 }14296 }14297}14298 14299static void dissect_SECURE_PREFIX(tvbuff_t *tvb, packet_info *pinfo _U___attribute__((unused)), gint offset,14300 guint8 flags, const guint encoding, int octets_to_next_header,14301 proto_tree *tree, guint16 vendor_id _U___attribute__((unused))) {14302 /*14303 * MIG_RTPS_SECURE_RTPS_PREFIX and MIG_RTPS_SECURE_PREFIX share same serialization:14304 * 0...2...........8...............16.............24...............3214305 * +---------------+---------------+---------------+---------------+14306 * | 0x33 / 0x31 |X|X|X|X|X|X|X|E| octetsToNextHeader |14307 * +---------------+---------------+---------------+---------------+14308 * | |14309 * + SecureDataHeader sec_data_header +14310 * | |14311 * +---------------+---------------+---------------+---------------+14312 *14313 * where SecureDataHeader is:14314 *14315 * SecureDataHeader: TransformationIdentifier (kind + key) + plugin_sec_header14316 * 0...2...........8...............16.............24...............3214317 * +---------------+---------------+---------------+---------------+14318 * | Revision_id |tran...on_kind |14319 * +---------------+---------------+---------------+---------------+14320 * | |14321 * + octet transformation_key_id[4] +14322 * | |14323 * +---------------+---------------+---------------+---------------+14324 * | sesion_id |14325 * +---------------+---------------+---------------+---------------+14326 * | init_vector_suffix[8] |14327 * +---------------+---------------+---------------+---------------+14328 */14329 proto_tree * sec_data_header_tree;14330 int flags_offset = offset + 1;14331 int session_id_offset = 0;14332 int transformation_key_offset = 0;14333 int algorithm_offset = 0;14334 int init_vector_offset = 0;14335 int psk_index_offset_three_bytes = 0;14336 int psk_index_offset_fourth_byte = 0;14337 guint32 psk_index = 0;14338 proto_item *passphrase_id_item = NULL((void*)0);14339 guint flags_byte = 0;14340 gboolean is_psk_protected = FALSE(0);14341 proto_item *transformation_kind_item = NULL((void*)0);14342 14343 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags,14344 ett_rtps_flags, SECURE_PREFIX_FLAGS, flags);14345 14346 flags_byte = tvb_get_guint8(tvb, flags_offset);14347 is_psk_protected = (flags_byte & 0x04) != 0;14348 proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb, offset + 2,14349 2, encoding);14350 offset += 4;14351 14352 sec_data_header_tree = proto_tree_add_subtree_format(tree, tvb, offset, octets_to_next_header,14353 ett_rtps_secure_dataheader_tree, NULL((void*)0), "Secure Data Header");14354 14355 /* Transformation Kind field used to be 4 bytes. Now it is splitted:14356 * - 3 bytes: Transformation Key Revision14357 * - 1 byte: Transformation Kind14358 * A single byte is enough for Transformation Kind since it only has five possible values (0-4).14359 */14360 psk_index_offset_three_bytes = offset;14361 proto_tree_add_item(sec_data_header_tree, hf_rtps_secure_dataheader_transformation_key_revision_id, tvb,14362 offset, 3, ENC_BIG_ENDIAN0x00000000);14363 offset += 3;14364 14365 algorithm_offset = offset;14366 proto_tree_add_item(sec_data_header_tree, hf_rtps_secure_dataheader_transformation_kind, tvb,14367 offset, 1, ENC_BIG_ENDIAN0x00000000);14368 14369 offset += 1;14370 transformation_key_offset = offset;14371 proto_tree_add_item(sec_data_header_tree, hf_rtps_secure_dataheader_transformation_key_id, tvb,14372 offset, 4, ENC_NA0x00000000);14373 14374 offset += 3;14375 if (is_psk_protected) {14376 proto_tree *transformation_kind_tree;14377 /* PSK index is the last byte of the transformation kind */14378 psk_index_offset_fourth_byte = offset;14379 transformation_kind_tree = proto_item_add_subtree(14380 transformation_kind_item,14381 ett_rtps_secure_transformation_kind);14382 proto_tree_add_item(14383 transformation_kind_tree,14384 hf_rtps_secure_dataheader_passphrase_key_id,14385 tvb,14386 psk_index_offset_fourth_byte,14387 1,14388 ENC_NA0x00000000);14389 }14390 offset += 1;14391 session_id_offset = offset;14392 proto_tree_add_item(sec_data_header_tree, hf_rtps_secure_dataheader_session_id, tvb,14393 offset, 4, ENC_BIG_ENDIAN0x00000000);14394 offset += 4;14395 14396 init_vector_offset = session_id_offset;14397 proto_tree_add_item(sec_data_header_tree, hf_rtps_secure_dataheader_init_vector_suffix, tvb,14398 offset, octets_to_next_header-12, ENC_NA0x00000000);14399 14400 if (is_psk_protected) {14401 guint8 *psk_index_bytes = (guint8*) &psk_index;14402 tvb_memcpy(tvb, &psk_index_bytes[1], psk_index_offset_three_bytes, 3);14403 tvb_memcpy(tvb, psk_index_bytes, psk_index_offset_fourth_byte, 1);14404 passphrase_id_item = proto_tree_add_uint(14405 sec_data_header_tree,14406 hf_rtps_secure_dataheader_passphrase_id,14407 tvb,14408 0,14409 0,14410 psk_index);14411 proto_item_set_generated(passphrase_id_item);14412 }14413 14414 /*14415 * If PSK decryption is enabled, then store the session id, init vector and14416 * transformation key for using them later during the session key generation.14417 */14418 if (is_psk_protected && enable_rtps_psk_decryption) {14419 rtps_current_packet_decryption_info_t *decryption_info =14420 (rtps_current_packet_decryption_info_t *) p_get_proto_data(14421 pinfo->pool,14422 pinfo,14423 proto_rtps,14424 RTPS_DECRYPTION_INFO_KEY5);14425 if (decryption_info == NULL((void*)0)) {14426 return;14427 }14428 14429 decryption_info->try_psk_decryption = true1;14430 decryption_info->algorithm = tvb_get_guint8(tvb, algorithm_offset);14431 14432 /* Copy the bytes as they are. Without considering the endianness */14433 tvb_memcpy(14434 tvb,14435 &decryption_info->session_id,14436 session_id_offset,14437 sizeof(guint32));14438 tvb_memcpy(14439 tvb,14440 &decryption_info->init_vector,14441 init_vector_offset,14442 RTPS_SECURITY_INIT_VECTOR_LEN12);14443 tvb_memcpy(14444 tvb,14445 &decryption_info->transformation_key,14446 transformation_key_offset,14447 sizeof(guint32));14448 14449 /*14450 * PSK index is the composition of the three bytes of the transformation key14451 * revision Id and the byte of the transformation id.14452 */14453 decryption_info->psk_index = psk_index;14454 }14455}14456 14457static void dissect_SECURE_POSTFIX(14458 tvbuff_t *tvb,14459 packet_info *pinfo _U___attribute__((unused)),14460 gint offset,14461 guint8 flags,14462 const guint encoding,14463 int octets_to_next_header,14464 proto_tree *tree,14465 guint16 vendor_id _U___attribute__((unused)))14466{14467 /*14468 * MIG_RTPS_SECURE_RTPS_POSTFIX and MIG_RTPS_SECURE_POSTFIX share the same14469 * serialization:14470 * 0...2...........8...............16.............24...............3214471 * +---------------+---------------+---------------+---------------+14472 * | 0x34 / 0x32 |X|X|X|X|X|X|X|E| octetsToNextHeader |14473 * +---------------+---------------+---------------+---------------+14474 * | |14475 * + SecureDataTag sec_data_tag +14476 * | |14477 * +---------------+---------------+---------------+---------------+14478 *14479 * where SecureDataTag is:14480 * 0...2...........8...............16.............24...............3214481 * +---------------+---------------+---------------+---------------+14482 * | |14483 * ~ octet plugin_sec_tag[] ~14484 * | |14485 * +---------------+---------------+---------------+---------------+14486 *14487 * and plugin_sec_tag is:14488 * 0...2...........8...............16.............24...............3214489 * +---------------+---------------+---------------+---------------+14490 * ~ octet[16] plugin_sec_tag.common_mac ~14491 * +---------------+---------------+---------------+---------------+14492 * + plugin_sec_tag.receiver_specific_macs: |14493 * | long plugin_sec_tag.receiver_specific_macs.length = N |14494 * +---------------+---------------+---------------+---------------+14495 * | octet[4] receiver_specific_macs[0].receiver_mac_key_id |14496 * | octet[16] receiver_specific_macs[0].receiver_mac |14497 * +---------------+---------------+---------------+---------------+14498 * | . . . |14499 * +---------------+---------------+---------------+---------------+14500 * | octet[4] receiver_specific_macs[N-1].receiver_mac_key_id |14501 * | octet[16] receiver_specific_macs[N-1].receiver_mac |14502 * +---------------+---------------+---------------+---------------+14503 */14504 gint specific_macs_num = 0;14505 14506 ++offset;14507 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags,14508 ett_rtps_flags, SECURE_POSTFIX_FLAGS, flags);14509 14510 ++offset;14511 proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb, offset,14512 2, encoding);14513 offset += 2;14514 proto_tree_add_item(14515 tree,14516 hf_rtps_secure_datatag_plugin_sec_tag_common_mac,14517 tvb,14518 offset,14519 SECURE_TAG_COMMON_AND_SPECIFIC_MAC_LENGTH16,14520 encoding);14521 offset += SECURE_TAG_COMMON_AND_SPECIFIC_MAC_LENGTH16;14522 /*14523 * The receiver-specific mac length is encoded in big endian (regardless of14524 * the submessage flags), as per the Security specification.14525 */14526 proto_tree_add_item(14527 tree,14528 hf_rtps_secure_datatag_plugin_specific_macs_len,14529 tvb,14530 offset,14531 4,14532 ENC_BIG_ENDIAN0x00000000);14533 specific_macs_num = tvb_get_gint32(tvb, offset, ENC_BIG_ENDIAN0x00000000);14534 offset += 4;14535 14536 /* Dissect specific macs */14537 if (specific_macs_num > 0) {14538 gint RECEIVER_SPECIFIC_MAC_KEY_LENGTH = 4; /* bytes. */14539 gint secure_tags_list_member_size =14540 RECEIVER_SPECIFIC_MAC_KEY_LENGTH + SECURE_TAG_COMMON_AND_SPECIFIC_MAC_LENGTH16;14541 14542 proto_tree *sec_data_tag_tree = NULL((void*)0);14543 sec_data_tag_tree = proto_tree_add_subtree_format(14544 tree,14545 tvb,14546 offset,14547 octets_to_next_header,14548 ett_rtps_secure_dataheader_tree,14549 NULL((void*)0),14550 "Receiver Specific Macs");14551 for (gint tag_counter = 0; tag_counter < specific_macs_num; tag_counter++) {14552 proto_tree *tag_tree = NULL((void*)0);14553 gint tag_offset = tag_counter * secure_tags_list_member_size;14554 14555 tag_tree = proto_tree_add_subtree_format(14556 sec_data_tag_tree,14557 tvb,14558 offset + tag_offset,14559 secure_tags_list_member_size,14560 ett_rtps_secure_postfix_tag_list_item,14561 NULL((void*)0),14562 "Receiver Specific Mac[%d]",14563 tag_counter);14564 proto_tree_add_item(14565 tag_tree,14566 hf_rtps_secure_datatag_plugin_sec_tag,14567 tvb,14568 offset + tag_offset,14569 SECURE_TAG_COMMON_AND_SPECIFIC_MAC_LENGTH16,14570 encoding);14571 proto_tree_add_item(14572 tag_tree,14573 hf_rtps_secure_datatag_plugin_sec_tag_key,14574 tvb,14575 offset + tag_offset + SECURE_TAG_COMMON_AND_SPECIFIC_MAC_LENGTH16,14576 RECEIVER_SPECIFIC_MAC_KEY_LENGTH,14577 encoding);14578 }14579 }14580}14581/*14582 * 0...2...........7...............15.............23...............3114583 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+14584 * | BINDING_PING |X|X|X|X|X|B|L|E| octetsToNextHeader |14585 * +---------------+---------------+---------------+---------------+14586 * | DDS_UnsignedLong rtps_port |14587 * +---------------+---------------+---------------+---------------+14588 * | |14589 * + DDS_Octet address[12][If L = 0] +14590 * | |14591 * + +14592 * | |14593 * +---------------+---------------+---------------+---------------+14594 * | |14595 * + DDS_Octet address[16][If L = 1] +14596 * | |14597 * + +14598 * | |14599 * + +14600 * | |14601 * +---------------+---------------+---------------+---------------+14602 *14603 */14604static void dissect_UDP_WAN_BINDING_PING(tvbuff_t *tvb, packet_info *pinfo _U___attribute__((unused)), gint offset,14605 guint8 flags, const guint encoding, int octets_to_next_header _U___attribute__((unused)),14606 proto_tree *tree, guint16 vendor_id _U___attribute__((unused))) {14607 14608 const guint flags_offset = offset + 1;14609 const guint next_header_offset = flags_offset + 1;14610 const guint port_offset = next_header_offset + 2;14611 const guint address_offset = port_offset + 4;14612 14613 proto_tree_add_bitmask_value(tree, tvb, flags_offset, hf_rtps_udpv4_wan_binding_ping_flags,14614 ett_rtps_flags, UDPV4_WAN_BINDING_PING_FLAGS, flags);14615 proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb, next_header_offset,14616 2, encoding);14617 proto_tree_add_item(tree, hf_rtps_udpv4_wan_binding_ping_port, tvb, port_offset,14618 4, encoding);14619 /*14620 * Address[12] [If L=0] is the only one we currently support, and it maps to:14621 * DDS_Octet UUID[9] + 3 bytes of padding.14622 */14623 if (flags & FLAG_UDPV4_WAN_BINDING_PING_FLAG_L(0x02)) {14624 proto_tree_add_item(14625 tree,14626 hf_rtps_long_address,14627 tvb,14628 address_offset,14629 LONG_ADDRESS_SIZE(16),14630 encoding);14631 } else {14632 proto_tree_add_item(14633 tree,14634 hf_rtps_uuid,14635 tvb,14636 address_offset,14637 UUID_SIZE(9),14638 encoding);14639 }14640}14641 14642// NOLINTNEXTLINE(misc-no-recursion)14643static gboolean dissect_rtps_submessage_v2(14644 tvbuff_t *tvb,14645 packet_info *pinfo,14646 gint offset,14647 guint8 flags,14648 const guint encoding,14649 guint8 submessageId,14650 guint16 vendor_id,14651 gint octets_to_next_header,14652 proto_tree *rtps_submessage_tree,14653 proto_item *submessage_item,14654 endpoint_guid *guid,14655 endpoint_guid *dst_guid,14656 bool_Bool dissecting_encrypted_submessage)14657{14658 switch (submessageId)

30

Control jumps to 'case 0:' at line 14660

14659 {14660 case SUBMESSAGE_HEADER_EXTENSION(0x0):14661 dissect_HEADER_EXTENSION(tvb, pinfo, offset, flags, encoding, rtps_submessage_tree, octets_to_next_header, vendor_id);

31

Calling 'dissect_HEADER_EXTENSION'

14662 break;14663 case SUBMESSAGE_DATA_FRAG(0x10):14664 dissect_DATA_FRAG(tvb, pinfo, offset, flags, encoding,14665 octets_to_next_header, rtps_submessage_tree, vendor_id, guid);14666 break;14667 14668 case SUBMESSAGE_NOKEY_DATA_FRAG(0x11):14669 dissect_NOKEY_DATA_FRAG(tvb, pinfo, offset, flags, encoding, octets_to_next_header, rtps_submessage_tree, vendor_id);14670 break;14671 14672 case SUBMESSAGE_NACK_FRAG(0x12):14673 dissect_NACK_FRAG(tvb, pinfo, offset, flags, encoding, octets_to_next_header, rtps_submessage_tree);14674 break;14675 14676 case SUBMESSAGE_ACKNACK_SESSION(0x1a):14677 case SUBMESSAGE_ACKNACK_BATCH(0x17):14678 dissect_ACKNACK(tvb, pinfo, offset, flags, encoding,14679 octets_to_next_header, rtps_submessage_tree, submessage_item, dst_guid);14680 break;14681 14682 case SUBMESSAGE_APP_ACK(0x1c):14683 dissect_APP_ACK(tvb, pinfo, offset, flags, encoding, octets_to_next_header, rtps_submessage_tree, submessage_item, guid);14684 break;14685 14686 case SUBMESSAGE_APP_ACK_CONF(0x1d):14687 dissect_APP_ACK_CONF(tvb, pinfo, offset, flags, encoding, octets_to_next_header, rtps_submessage_tree, submessage_item, guid);14688 break;14689 14690 case SUBMESSAGE_HEARTBEAT_SESSION(0x1b):14691 case SUBMESSAGE_HEARTBEAT_BATCH(0x19):14692 dissect_HEARTBEAT_BATCH(tvb, pinfo, offset, flags, encoding,14693 octets_to_next_header, rtps_submessage_tree, guid);14694 break;14695 14696 case SUBMESSAGE_HEARTBEAT_FRAG(0x13):14697 dissect_HEARTBEAT_FRAG(tvb, pinfo, offset, flags, encoding,14698 octets_to_next_header, rtps_submessage_tree, guid);14699 break;14700 14701 case SUBMESSAGE_HEARTBEAT_VIRTUAL(0x1e):14702 dissect_HEARTBEAT_VIRTUAL(tvb, pinfo, offset, flags, encoding,14703 octets_to_next_header, rtps_submessage_tree, vendor_id, guid);14704 break;14705 14706 case SUBMESSAGE_RTPS_DATA_SESSION(0x14): {14707 dissect_RTPS_DATA_SESSION(tvb, pinfo, offset, flags, encoding, octets_to_next_header,14708 rtps_submessage_tree, vendor_id, guid);14709 break;14710 }14711 case SUBMESSAGE_RTPS_DATA(0x15):14712 dissect_RTPS_DATA(tvb, pinfo, offset, flags, encoding, octets_to_next_header,14713 rtps_submessage_tree, vendor_id, FALSE(0), guid);14714 14715 break;14716 14717 case SUBMESSAGE_RTI_DATA_FRAG_SESSION(0x81):14718 case SUBMESSAGE_RTPS_DATA_FRAG(0x16):14719 dissect_RTPS_DATA_FRAG_kind(tvb, pinfo, offset, flags, encoding, octets_to_next_header,14720 rtps_submessage_tree, vendor_id, (submessageId == SUBMESSAGE_RTI_DATA_FRAG_SESSION(0x81)), guid);14721 break;14722 14723 case SUBMESSAGE_RTPS_DATA_BATCH(0x18):14724 dissect_RTPS_DATA_BATCH(tvb, pinfo, offset, flags, encoding, octets_to_next_header,14725 rtps_submessage_tree, vendor_id, guid);14726 break;14727 14728 case SUBMESSAGE_RTI_CRC(0x80):14729 if (vendor_id == RTPS_VENDOR_RTI_DDS(0x0101)) {14730 dissect_RTI_CRC(tvb, pinfo, offset, flags, encoding, octets_to_next_header,14731 rtps_submessage_tree);14732 }14733 break;14734 case SUBMESSAGE_SEC_BODY(0x30):14735 dissect_SECURE(14736 tvb,14737 pinfo,14738 offset,14739 flags,14740 encoding,14741 octets_to_next_header,14742 rtps_submessage_tree,14743 vendor_id,14744 guid,14745 dissecting_encrypted_submessage);14746 break;14747 case SUBMESSAGE_SEC_PREFIX(0x31):14748 case SUBMESSAGE_SRTPS_PREFIX(0x33):14749 dissect_SECURE_PREFIX(tvb, pinfo, offset, flags, encoding, octets_to_next_header,14750 rtps_submessage_tree, vendor_id);14751 break;14752 case SUBMESSAGE_SEC_POSTFIX(0x32):14753 case SUBMESSAGE_SRTPS_POSTFIX(0x34):14754 dissect_SECURE_POSTFIX(tvb, pinfo, offset, flags, encoding, octets_to_next_header,14755 rtps_submessage_tree, vendor_id);14756 break;14757 case SUBMESSAGE_RTI_UDP_WAN_BINDING_PING(0x82):14758 dissect_UDP_WAN_BINDING_PING(tvb, pinfo, offset, flags, encoding, octets_to_next_header,14759 rtps_submessage_tree, vendor_id);14760 break;14761 14762 default:14763 return FALSE(0);14764 }14765 14766 return TRUE(!(0));14767}14768 14769static gboolean dissect_rtps_submessage_v1(tvbuff_t *tvb, packet_info *pinfo, gint offset, guint8 flags, const guint encoding,14770 guint8 submessageId, guint16 version, guint16 vendor_id, gint octets_to_next_header,14771 proto_tree *rtps_submessage_tree, proto_item *submessage_item,14772 endpoint_guid * guid, endpoint_guid * dst_guid)14773{14774 switch (submessageId)14775 {14776 case SUBMESSAGE_PAD(0x01):14777 dissect_PAD(tvb, pinfo, offset, flags, encoding, octets_to_next_header, rtps_submessage_tree);14778 break;14779 14780 case SUBMESSAGE_DATA(0x02):14781 if (version < 0x0200) {14782 dissect_DATA_v1(tvb, pinfo, offset, flags, encoding,14783 octets_to_next_header, rtps_submessage_tree);14784 } else {14785 dissect_DATA_v2(tvb, pinfo, offset, flags, encoding,14786 octets_to_next_header, rtps_submessage_tree, vendor_id, guid);14787 }14788 break;14789 14790 case SUBMESSAGE_NOKEY_DATA(0x03):14791 dissect_NOKEY_DATA(tvb, pinfo, offset, flags, encoding, octets_to_next_header, rtps_submessage_tree,14792 version, vendor_id);14793 break;14794 14795 case SUBMESSAGE_ACKNACK(0x06):14796 dissect_ACKNACK(tvb, pinfo, offset, flags, encoding,14797 octets_to_next_header, rtps_submessage_tree, submessage_item, dst_guid);14798 break;14799 14800 case SUBMESSAGE_HEARTBEAT(0x07):14801 dissect_HEARTBEAT(tvb, pinfo, offset, flags, encoding,14802 octets_to_next_header, rtps_submessage_tree, version, guid);14803 break;14804 14805 case SUBMESSAGE_GAP(0x08):14806 dissect_GAP(tvb, pinfo, offset, flags, encoding,14807 octets_to_next_header, rtps_submessage_tree, guid);14808 break;14809 14810 case SUBMESSAGE_INFO_TS(0x09):14811 dissect_INFO_TS(tvb, pinfo, offset, flags, encoding, octets_to_next_header, rtps_submessage_tree);14812 break;14813 14814 case SUBMESSAGE_INFO_SRC(0x0c):14815 dissect_INFO_SRC(tvb, pinfo, offset, flags, encoding, octets_to_next_header, rtps_submessage_tree, version);14816 break;14817 14818 case SUBMESSAGE_INFO_REPLY_IP4(0x0d):14819 dissect_INFO_REPLY_IP4(tvb, pinfo, offset, flags, encoding, octets_to_next_header, rtps_submessage_tree);14820 break;14821 14822 case SUBMESSAGE_INFO_DST(0x0e):14823 dissect_INFO_DST(tvb, pinfo, offset, flags, encoding,14824 octets_to_next_header, rtps_submessage_tree, version, dst_guid);14825 break;14826 14827 case SUBMESSAGE_INFO_REPLY(0x0f):14828 dissect_INFO_REPLY(tvb, pinfo, offset, flags, encoding, octets_to_next_header, rtps_submessage_tree);14829 break;14830 14831 default:14832 return FALSE(0);14833 }14834 14835 return TRUE(!(0));14836}14837 14838/***************************************************************************/14839/* The main packet dissector function14840 */14841static gboolean dissect_rtps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint offset)14842{14843 proto_item *ti;14844 proto_tree *rtps_tree;14845 guint8 majorRev;14846 guint16 version, vendor_id;14847 gboolean is_ping;14848 endpoint_guid guid = {0};14849 endpoint_guid *guid_copy;14850 guint32 magic_number;14851 gchar domain_id_str[RTPS_UNKNOWN_DOMAIN_ID_STR_LENsizeof("Unknown")] = RTPS_UNKNOWN_DOMAIN_ID_STR"Unknown";14852 gboolean is_domain_id_calculated = FALSE(0);14853 const char* not_accuracy_str = "";14854 gint length_remaining = 0;14855 rtps_tvb_field rtps_root;14856 14857 /* Check 'RTPS' signature:14858 * A header is invalid if it has less than 16 octets14859 */14860 length_remaining = tvb_reported_length_remaining(tvb, offset);14861 if (length_remaining < 16)

2

Assuming 'length_remaining' is >= 16

3

Taking false branch

14862 return FALSE(0);14863 14864 magic_number = tvb_get_ntohl(tvb, offset);14865 if (magic_number != RTPX_MAGIC_NUMBER0x52545058 &&

4

Assuming 'magic_number' is equal to RTPX_MAGIC_NUMBER

14866 magic_number != RTPS_MAGIC_NUMBER0x52545053) {14867 return FALSE(0);14868 }14869 /* Distinguish between RTPS 1.x and 2.x here */14870 majorRev = tvb_get_guint8(tvb,offset+4);14871 if ((majorRev != 1) && (majorRev != 2))

5

Assuming 'majorRev' is equal to 1

14872 return FALSE(0);14873 14874 /* Save the beginning of the RTPS message */14875 rtps_root.tvb = tvb;14876 rtps_root.tvb_offset = offset;14877 rtps_root.tvb_len = tvb_reported_length_remaining(tvb, offset);14878 p_set_proto_data(pinfo->pool, pinfo, proto_rtps, RTPS_ROOT_MESSAGE_KEY4, (gpointer*)&rtps_root);14879 col_set_str(pinfo->cinfo, COL_PROTOCOL, "RTPS");14880 col_clear(pinfo->cinfo, COL_INFO);14881 14882 /* create display subtree for the protocol */14883 ti = proto_tree_add_item(tree, proto_rtps, tvb, 0, -1, ENC_NA0x00000000);14884 rtps_tree = proto_item_add_subtree(ti, ett_rtps);14885 14886 /* magic */14887 proto_tree_add_item(rtps_tree, hf_rtps_magic, tvb, 0, 4, ENC_NA0x00000000 | ENC_ASCII0x00000000);14888 14889 /* Protocol Version */14890 version = rtps_util_add_protocol_version(rtps_tree, tvb, offset+4);14891 14892 /* Vendor Id */14893 vendor_id = rtps_util_add_vendor_id(rtps_tree, tvb, offset+6);14894 14895 is_ping = rtps_is_ping(tvb, pinfo, offset+8);14896 14897 if (is_ping

5.1

'is_ping' is 0
) {

6

Taking false branch

14898 dissect_PING(tvb, offset + 8, ENC_BIG_ENDIAN0x00000000, length_remaining - 8, rtps_tree);14899 } else {14900 if (version < 0x0200)

7

Assuming 'version' is >= 512

8

Taking false branch

14901 rtps_util_add_guid_prefix_v1(rtps_tree, tvb, offset+8,14902 hf_rtps_guid_prefix_v1, hf_rtps_host_id, hf_rtps_app_id,14903 hf_rtps_app_id_instance_id, hf_rtps_app_id_app_kind, NULL((void*)0));14904 else14905 rtps_util_add_guid_prefix_v2(rtps_tree, tvb, offset+8, hf_rtps_guid_prefix_src,14906 hf_rtps_host_id, hf_rtps_app_id, hf_rtps_sm_instance_id, hf_rtps_guid_prefix);14907 14908 guid.host_id = tvb_get_ntohl(tvb, offset+8);14909 guid.app_id = tvb_get_ntohl(tvb, offset+12);14910 guid.instance_id = tvb_get_ntohl(tvb, offset+16);14911 14912 /*14913 * If decription is enabled, store the guid prefix to be used later in the14914 * dissect_SECURE and dissect_SECURE_PREFIX functions.14915 */14916 if (enable_rtps_psk_decryption) {

9

Assuming 'enable_rtps_psk_decryption' is false

10

Taking false branch

14917 rtps_current_packet_decryption_info_t *decryption_info = wmem_alloc(14918 wmem_packet_scope(),14919 sizeof(rtps_current_packet_decryption_info_t));14920 if (decryption_info == NULL((void*)0)) {14921 return FALSE(0);14922 }14923 14924 rtps_current_packet_decryption_info_reset(decryption_info);14925 decryption_info->guid_prefix.host_id = guid.host_id;14926 decryption_info->guid_prefix.app_id = guid.app_id;14927 decryption_info->guid_prefix.instance_id = guid.instance_id;14928 14929 p_set_proto_data(14930 pinfo->pool,14931 pinfo,14932 proto_rtps,14933 RTPS_DECRYPTION_INFO_KEY5,14934 (gpointer*) decryption_info);14935 }14936 14937 guid.fields_present = GUID_HAS_HOST_ID0x00000001|GUID_HAS_APP_ID0x00000002|GUID_HAS_INSTANCE_ID0x00000004;14938 /* If the packet uses TCP we need top store the participant GUID to get the domainId later14939 * For that operation the member fields_present is not required and is not affected by14940 * its changes.14941 */14942 guid_copy = (endpoint_guid*)wmem_memdup(pinfo->pool,14943 (const void*)&guid, sizeof(endpoint_guid));14944 p_add_proto_data(pinfo->pool, pinfo, proto_rtps,14945 RTPS_TCPMAP_DOMAIN_ID_PROTODATA_KEY0, (gpointer)guid_copy);14946#ifdef RTI_BUILD14947 pinfo->guid_prefix_host = tvb_get_ntohl(tvb, offset + 8);14948 pinfo->guid_prefix_app = tvb_get_ntohl(tvb, offset + 12);14949 pinfo->guid_prefix_count = tvb_get_ntohl(tvb, offset + 16);14950 pinfo->guid_rtps2 = 1;14951#endif14952 }14953 /* Extract the domain id and participant index */14954 {14955 int domain_id, doffset, participant_idx = 0, nature;14956 proto_tree *mapping_tree;14957 /* For a complete description of these rules, see RTPS documentation14958 14959 RTPS 1.2 mapping:14960 domain_id = ((pinfo->destport - PORT_BASE)/10) % 100;14961 participant_idx = (pinfo->destport - PORT_BASE) / 1000;14962 nature = (pinfo->destport % 10);14963 14964 For Unicast, the port mapping formula is:14965 metatraffic_unicast_port = port_base +14966 (domain_id_gain * domain_id) +14967 (participant_id_gain * participant_id) +14968 builtin_unicast_port_offset14969 For Multicast, the port mapping is:14970 metatraffic_multicast_port = port_base +14971 (domain_id_gain * domain_id) +14972 builtin_multicast_port_offset14973 14974 Where the constants are:14975 port_base = 740014976 domain_id_gain = 25014977 participant_id_gain = 214978 builtin_multicast_port_offset = 014979 builtin_unicast_port_offset = 1014980 user_multicast_port_offset = 114981 user_unicast_port_offset = 1114982 14983 14984 To obtain the individual components from the port number, the reverse formulas are:14985 domain_id = (port - port_base) / 250 (valid both multicast / unicast)14986 Doffset = (port - port_Base - (domain_id * 250));14987 participant_idx = (Doffset - 10) / 2;14988 14989 */14990 if (version

10.1

'version' is >= 512
< 0x0200) {

11

Taking false branch

14991 /* If using TCP domainId cannot deduced from the port. It must be taken from the participant14992 * discovery packets or Unknown.14993 */14994 domain_id = get_domain_id_from_tcp_discovered_participants(discovered_participants_domain_ids, &guid);14995 if (pinfo->ptype != PT_TCP && domain_id == RTPS_UNKNOWN_DOMAIN_ID_VAL-1) {14996 domain_id = ((pinfo->destport - PORT_BASE(7400)) / 10) % 100;14997 is_domain_id_calculated = TRUE(!(0));14998 }14999 participant_idx = (pinfo->destport - PORT_BASE(7400)) / 1000;15000 nature = (pinfo->destport % 10);15001 } else {15002 domain_id = get_domain_id_from_tcp_discovered_participants(discovered_participants_domain_ids, &guid);15003 if (pinfo->ptype != PT_TCP && pinfo->destport > PORT_BASE(7400) && domain_id == RTPS_UNKNOWN_DOMAIN_ID_VAL-1) {

12

Assuming field 'ptype' is equal to PT_TCP

15004 domain_id = (pinfo->destport - PORT_BASE(7400)) / DOMAIN_GAIN(250);15005 is_domain_id_calculated = TRUE(!(0));15006 }15007 doffset = (pinfo->destport - PORT_BASE(7400) - domain_id * DOMAIN_GAIN(250));15008 if (doffset == 0) {

13

Assuming 'doffset' is not equal to 0

14

Taking false branch

15009 nature = PORT_METATRAFFIC_MULTICAST(2);15010 }15011 else if (doffset == 1) {

15

Assuming 'doffset' is not equal to 1

16

Taking false branch

15012 nature = PORT_USERTRAFFIC_MULTICAST(1);15013 }15014 else {15015 participant_idx = (doffset - 10) / 2;15016 if ((doffset - 10) % 2 == 0) {

17

Assuming the condition is false

18

Taking false branch

15017 nature = PORT_METATRAFFIC_UNICAST(0);15018 }15019 else {15020 nature = PORT_USERTRAFFIC_UNICAST(3);15021 }15022 }15023 if (domain_id

18.1

'domain_id' is <= 232
> 232 || domain_id

18.2

'domain_id' is < 0
< 0) {

19

Taking true branch

15024 domain_id = RTPS_UNKNOWN_DOMAIN_ID_VAL-1;15025 }15026 }15027 /* Used string for the domain participant to show Unknown if the domainId is not known when using TCP*/15028 if (domain_id != RTPS_UNKNOWN_DOMAIN_ID_VAL-1) {15029 snprintf(domain_id_str, RTPS_UNKNOWN_DOMAIN_ID_STR_LENsizeof("Unknown"),15030 "%"PRId32"d", domain_id);15031 if (is_domain_id_calculated) {15032 not_accuracy_str = " (Based on calculated domainId. Might not be accurate)";15033 }15034 }15035 if ((nature

19.1

'nature' is not equal to PORT_METATRAFFIC_UNICAST
== PORT_METATRAFFIC_UNICAST(0)) || (nature

19.2

'nature' is equal to PORT_USERTRAFFIC_UNICAST
== PORT_USERTRAFFIC_UNICAST(3)) ||15036 (version < 0x0200)) {15037 mapping_tree = proto_tree_add_subtree_format(rtps_tree, tvb, 0, 0,15038 ett_rtps_default_mapping, NULL((void*)0), "Default port mapping%s: domainId=%s, "15039 "participantIdx=%d, nature=%s",15040 not_accuracy_str,15041 domain_id_str,15042 participant_idx,15043 val_to_str(nature, nature_type_vals, "%02x"));15044 } else {15045 mapping_tree = proto_tree_add_subtree_format(rtps_tree, tvb, 0, 0,15046 ett_rtps_default_mapping, NULL((void*)0), "Default port mapping%s: %s, domainId=%s",15047 not_accuracy_str,15048 val_to_str(nature, nature_type_vals, "%02x"),15049 domain_id_str);15050 }15051 15052 ti = proto_tree_add_uint(mapping_tree, hf_rtps_domain_id, tvb, 0, 0, domain_id);15053 proto_item_set_generated(ti);15054 if ((nature

19.3

'nature' is not equal to PORT_METATRAFFIC_UNICAST
== PORT_METATRAFFIC_UNICAST(0)) || (nature

19.4

'nature' is equal to PORT_USERTRAFFIC_UNICAST
== PORT_USERTRAFFIC_UNICAST(3)) ||15055 (version < 0x0200)) {15056 ti = proto_tree_add_uint(mapping_tree, hf_rtps_participant_idx, tvb, 0, 0, participant_idx);15057 proto_item_set_generated(ti);15058 }15059 ti = proto_tree_add_uint(mapping_tree, hf_rtps_nature_type, tvb, 0, 0, nature);15060 proto_item_set_generated(ti);15061 }15062 15063 /* offset behind RTPS's Header (need to be set in case tree=NULL)*/15064 offset += ((version

19.5

'version' is >= 512
< 0x0200) ? 16 : 20);

20

'?' condition is false

15065 15066 dissect_rtps_submessages(

21

Calling 'dissect_rtps_submessages'

15067 tvb,15068 offset,15069 pinfo,15070 rtps_tree,15071 version,15072 vendor_id,15073 &guid,15074 false0 /* dissecting_encrypted_submessage. */);15075 15076 /* If TCP there's an extra OOB byte at the end of the message */15077 /* TODO: What to do with it? */15078 return TRUE(!(0));15079 15080} /* dissect_rtps(...) */15081 15082static15083void append_submessage_col_info(packet_info* pinfo, submessage_col_info* current_submessage_col_info) {15084 gboolean* is_data_session_intermediate = NULL((void*)0);15085 15086 /* Status info column: (r),(p[U])...*/15087 if (current_submessage_col_info->status_info != NULL((void*)0)) {15088 col_append_str(pinfo->cinfo, COL_INFO, current_submessage_col_info->status_info);15089 }15090 /* DATA_SESSION last package */15091 is_data_session_intermediate = (gboolean*)p_get_proto_data(pinfo->pool, pinfo, proto_rtps, RTPS_DATA_SESSION_FINAL_PROTODATA_KEY2);15092 if (is_data_session_intermediate != NULL((void*)0) && !*is_data_session_intermediate) {15093 current_submessage_col_info->data_session_kind = "(Last)";15094 col_append_str(pinfo->cinfo, COL_INFO, current_submessage_col_info->data_session_kind);15095 }15096 /* Topic name */15097 if (current_submessage_col_info->topic_name != NULL((void*)0)) {15098 col_append_sep_str(pinfo->cinfo, COL_INFO, " -> ", current_submessage_col_info->topic_name);15099 }15100}15101 15102// NOLINTNEXTLINE(misc-no-recursion)15103void dissect_rtps_submessages(15104 tvbuff_t *tvb,15105 int offset,15106 packet_info *pinfo,15107 proto_tree *rtps_tree,15108 guint16 version,15109 guint16 vendor_id,15110 endpoint_guid *guid,15111 bool_Bool dissecting_encrypted_submessage)15112{15113 guint8 submessageId, flags;15114 int sub_hf;15115 const value_string *sub_vals;15116 proto_item *ti;15117 proto_tree *rtps_submessage_tree;15118 guint encoding;15119 gint next_submsg, octets_to_next_header;15120 endpoint_guid dst_guid;15121 submessage_col_info current_submessage_col_info = {NULL((void*)0), NULL((void*)0), NULL((void*)0)};15122 15123 /* No fields have been set in GUID yet. */15124 dst_guid.fields_present = 0;15125 while (tvb_reported_length_remaining(tvb, offset) > 0) {

22

Assuming the condition is true

23

Loop condition is true. Entering loop body

15126 submessageId = tvb_get_guint8(tvb, offset);15127 15128 if (version

23.1

'version' is >= 512
< 0x0200) {15129 sub_hf = hf_rtps_sm_id;15130 sub_vals = submessage_id_vals;15131 } else {15132 if ((submessageId & 0x80) && (vendor_id == RTPS_VENDOR_RTI_DDS(0x0101))) {

24

Assuming the condition is false

15133 sub_hf = hf_rtps_sm_idv2;15134 sub_vals = submessage_id_rti;15135 } else {15136 sub_hf = hf_rtps_sm_idv2;15137 sub_vals = submessage_id_valsv2;15138 }15139 }15140 15141 col_append_sep_str(pinfo->cinfo, COL_INFO, ", ", val_to_str(submessageId, sub_vals, "Unknown[%02x]"));15142 15143 /* Creates the subtree 'Submessage: XXXX' */15144 if (submessageId & 0x80) {

25

Taking false branch

15145 if (vendor_id == RTPS_VENDOR_RTI_DDS(0x0101)) {15146 ti = proto_tree_add_uint_format_value(rtps_tree, sub_hf, tvb, offset, 1, submessageId, "%s",15147 val_to_str(submessageId, submessage_id_rti, "Vendor-specific (0x%02x)"));15148 } else {15149 ti = proto_tree_add_uint_format_value(rtps_tree, sub_hf, tvb, offset, 1,15150 submessageId, "Vendor-specific (0x%02x)", submessageId);15151 }15152 } else {15153 ti = proto_tree_add_uint(rtps_tree, sub_hf, tvb, offset, 1, submessageId);15154 }15155 15156 rtps_submessage_tree = proto_item_add_subtree(ti, ett_rtps_submessage);15157 15158 /* Gets the flags */15159 flags = tvb_get_guint8(tvb, offset + 1);15160 15161 /* Gets the E (Little endian) flag */15162 encoding = ((flags & FLAG_E(0x01)) != 0) ? ENC_LITTLE_ENDIAN0x80000000 : ENC_BIG_ENDIAN0x00000000;

26

Assuming the condition is false

27

'?' condition is false

15163 15164 /* Octets-to-next-header */15165 octets_to_next_header = tvb_get_guint16(tvb, offset + 2, encoding);15166 if ((octets_to_next_header == 0) && (version >= 0x0200)

28

Assuming 'octets_to_next_header' is not equal to 0

15167 && (submessageId != SUBMESSAGE_PAD(0x01)) && (submessageId != SUBMESSAGE_INFO_TS(0x09))) {15168 octets_to_next_header = tvb_reported_length_remaining(tvb, offset + 4);15169 }15170 next_submsg = offset + octets_to_next_header + 4;15171 15172 /* Set length of this item */15173 proto_item_set_len(ti, octets_to_next_header + 4);15174 15175 /* Now decode each single submessage15176 * The offset passed to the dissectors points to the start of the15177 * submessage (at the ID byte).15178 */15179 p_set_proto_data(pinfo->pool, pinfo, proto_rtps, RTPS_CURRENT_SUBMESSAGE_COL_DATA_KEY3, (gpointer*)&current_submessage_col_info);15180 if (!dissect_rtps_submessage_v1(tvb, pinfo, offset, flags, encoding,15181 submessageId, version, vendor_id,15182 octets_to_next_header, rtps_submessage_tree,15183 ti, guid, &dst_guid)) {15184 if ((version

28.1

'version' is >= 512
< 0x0200) ||15185 !dissect_rtps_submessage_v2(

29

Calling 'dissect_rtps_submessage_v2'

15186 tvb,15187 pinfo,15188 offset,15189 flags,15190 encoding,15191 submessageId,15192 vendor_id,15193 octets_to_next_header,15194 rtps_submessage_tree,15195 ti,15196 guid,15197 &dst_guid,15198 dissecting_encrypted_submessage)) {15199 proto_tree_add_uint(rtps_submessage_tree, hf_rtps_sm_flags,15200 tvb, offset + 1, 1, flags);15201 proto_tree_add_uint(rtps_submessage_tree,15202 hf_rtps_sm_octets_to_next_header,15203 tvb, offset + 2, 2, octets_to_next_header);15204 }15205 }15206 append_submessage_col_info(pinfo, &current_submessage_col_info);15207 /* Reset the col info for the next submessage */15208 current_submessage_col_info.data_session_kind = NULL((void*)0);15209 current_submessage_col_info.status_info = NULL((void*)0);15210 current_submessage_col_info.topic_name = NULL((void*)0);15211 /* next submessage's offset */15212 offset = next_submsg;15213 }15214}15215 15216static gboolean dissect_rtps_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U___attribute__((unused)))15217{15218 gint offset = 0;15219 15220 return dissect_rtps(tvb, pinfo, tree, offset);15221}15222 15223static gboolean dissect_rtps_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U___attribute__((unused)))15224{15225 /* In RTPS over TCP the first 4 bytes are the packet length15226 * as 32-bit unsigned int coded as BIG ENDIAN15227 * guint32 tcp_len = tvb_get_ntohl(tvb, offset);15228 */15229 gint offset = 4;15230 15231 return dissect_rtps(tvb, pinfo, tree, offset);15232}15233 15234static gboolean dissect_rtps_rtitcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U___attribute__((unused)))15235{15236 gint offset = 0;15237 15238 return dissect_rtps(tvb, pinfo, tree, offset);15239}15240 15241static int dissect_simple_rtps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U___attribute__((unused)))15242{15243 gint offset = 0;15244 15245 if (dissect_rtps(tvb, pinfo, tree, offset) == FALSE(0))

1

Calling 'dissect_rtps'

15246 return 0;15247 15248 return tvb_captured_length(tvb);15249}15250 15251/*15252 * Type InstanceStateDataresponse is sent as user user data but there is no discovery data for it.15253 * So it is necessary to add it manually so Wireshark can dissect it15254 */15255static void initialize_instance_state_data_response_dissection_info(builtin_types_dissection_data_t *_builtin_types_dissection_data) {15256 guint32 element = 0;15257 const guint64 InstanceStateDataResponse_type_id = 0x9d6d4c879b0e6aa9;15258 const guint64 sequence_100_InstanceTransitionData_type_id = 0x2dac07d5577caaf6;15259 const guint64 guid_t_type_id = 0x36d940c4ed806097;15260 const guint64 value_type_id = 0x974064b1120169ed;15261 const guint64 instancetransitiondata_type_id = 0xceb6f5e405f4bde7;15262 const guint64 KeyHashValue_type_id = 0x48725f37453310ed;15263 const guint64 SerializedKey_type_id = 0x3fd77a8ff43c7e55;15264 const guint64 payload_type_id = 0x0d0ecc8d34a5c3ab;15265 const guint64 ntptime_t_type_id = 0x842c59af7e962a4c;15266 const guint64 sequencenumber_t_type_id = 0xb933efe30d85453b;15267 /*15268 * @appendable @nested15269 * struct GUID_t {15270 * octet value[16];15271 * };15272 * @appendable @nested15273 * struct SequenceNumber_t {15274 * long high;15275 * unsigned long low;15276 * };15277 *15278 * @final @nested15279 * struct NtpTime_t {15280 * int32 sec;15281 * uint32 frac;15282 * };15283 * @final @nested15284 * struct SerializedKey {15285 * sequence<octet> payload;15286 * };15287 * typedef octet KeyHashValue[16];15288 *15289 * struct InstanceTransitionData {15290 * @optional KeyHashValue key_hash;15291 * @optional SerializedKey serialized_key;15292 * NtpTime_t last_update_timestamp;15293 * SequenceNumber_t transition_sequence_number;15294 * };15295 */15296 15297 /* All dissection_infos are added to the "dissection_infos" map */15298 15299 /* value */15300 g_strlcpy(_builtin_types_dissection_data->dissection_infos.value_dissection_info.member_name, "value", MAX_TOPIC_AND_TYPE_LENGTH256);15301 _builtin_types_dissection_data->dissection_infos.value_dissection_info.num_elements = VALUE_NUM_ELEMENTS16;15302 _builtin_types_dissection_data->dissection_infos.value_dissection_info.bound = VALUE_NUM_ELEMENTS16;15303 _builtin_types_dissection_data->dissection_infos.value_dissection_info.member_kind = RTI_CDR_TYPE_OBJECT_TYPE_KIND_ARRAY_TYPE;15304 _builtin_types_dissection_data->dissection_infos.value_dissection_info.base_type_id = RTI_CDR_TYPE_OBJECT_TYPE_KIND_BYTE_TYPE;15305 _builtin_types_dissection_data->dissection_infos.value_dissection_info.type_id = value_type_id;15306 _builtin_types_dissection_data->dissection_infos.value_dissection_info.bound = VALUE_NUM_ELEMENTS16;15307 _builtin_types_dissection_data->dissection_infos.value_dissection_info.elements = wmem_alloc_array(wmem_epan_scope(), dissection_element, GUID_T_NUM_ELEMENTS)((dissection_element*)wmem_alloc((wmem_epan_scope()), (((((1)
) <= 0) || ((size_t)sizeof(dissection_element) > (9223372036854775807L
/ (size_t)((1))))) ? 0 : (sizeof(dissection_element) * ((1))
))))
;15308 wmem_map_insert(15309 builtin_dissection_infos,15310 &(_builtin_types_dissection_data->dissection_infos.value_dissection_info.type_id),15311 (void*)&(_builtin_types_dissection_data->dissection_infos.value_dissection_info));15312 15313 /* GUID_t */15314 g_strlcpy(_builtin_types_dissection_data->dissection_infos.guid_t_dissection_info.member_name, "GUID_t", MAX_TOPIC_AND_TYPE_LENGTH256);15315 _builtin_types_dissection_data->dissection_infos.guid_t_dissection_info.num_elements = GUID_T_NUM_ELEMENTS1;15316 _builtin_types_dissection_data->dissection_infos.guid_t_dissection_info.member_kind = RTI_CDR_TYPE_OBJECT_TYPE_KIND_STRUCTURE_TYPE;15317 _builtin_types_dissection_data->dissection_infos.guid_t_dissection_info.type_id = guid_t_type_id;15318 _builtin_types_dissection_data->dissection_infos.guid_t_dissection_info.elements = wmem_alloc_array(wmem_epan_scope(), dissection_element, GUID_T_NUM_ELEMENTS)((dissection_element*)wmem_alloc((wmem_epan_scope()), (((((1)
) <= 0) || ((size_t)sizeof(dissection_element) > (9223372036854775807L
/ (size_t)((1))))) ? 0 : (sizeof(dissection_element) * ((1))
))))
;15319 /* octet value[16] */15320 _builtin_types_dissection_data->dissection_infos.guid_t_dissection_info.elements[0].flags = 0;15321 _builtin_types_dissection_data->dissection_infos.guid_t_dissection_info.elements[0].member_id = 0;15322 _builtin_types_dissection_data->dissection_infos.guid_t_dissection_info.elements[0].type_id = value_type_id;15323 g_strlcpy(_builtin_types_dissection_data->dissection_infos.guid_t_dissection_info.elements[0].member_name, "value", MAX_TOPIC_AND_TYPE_LENGTH256);15324 wmem_map_insert(15325 builtin_dissection_infos,15326 &(_builtin_types_dissection_data->dissection_infos.guid_t_dissection_info.type_id),15327 (void*)&(_builtin_types_dissection_data->dissection_infos.guid_t_dissection_info));15328 15329 /* Payload */15330 g_strlcpy(_builtin_types_dissection_data->dissection_infos.payload_dissection_info.member_name, "payload", MAX_TOPIC_AND_TYPE_LENGTH256);15331 _builtin_types_dissection_data->dissection_infos.payload_dissection_info.member_kind = RTI_CDR_TYPE_OBJECT_TYPE_KIND_SEQUENCE_TYPE;15332 _builtin_types_dissection_data->dissection_infos.payload_dissection_info.base_type_id = RTI_CDR_TYPE_OBJECT_TYPE_KIND_BYTE_TYPE;15333 _builtin_types_dissection_data->dissection_infos.payload_dissection_info.type_id = payload_type_id;15334 _builtin_types_dissection_data->dissection_infos.payload_dissection_info.bound = -1;15335 _builtin_types_dissection_data->dissection_infos.payload_dissection_info.elements = wmem_alloc_array(wmem_epan_scope(), dissection_element, GUID_T_NUM_ELEMENTS)((dissection_element*)wmem_alloc((wmem_epan_scope()), (((((1)
) <= 0) || ((size_t)sizeof(dissection_element) > (9223372036854775807L
/ (size_t)((1))))) ? 0 : (sizeof(dissection_element) * ((1))
))))
;15336 wmem_map_insert(15337 builtin_dissection_infos,15338 &(_builtin_types_dissection_data->dissection_infos.payload_dissection_info.type_id),15339 (void*)&(_builtin_types_dissection_data->dissection_infos.payload_dissection_info));15340 15341 /* KeyHashValue */15342 g_strlcpy(_builtin_types_dissection_data->dissection_infos.key_hash_value_dissection_info.member_name, "KeyHashValue", MAX_TOPIC_AND_TYPE_LENGTH256);15343 _builtin_types_dissection_data->dissection_infos.key_hash_value_dissection_info.num_elements = KEY_HAS_VALUE_NUM_ELEMENTS16;15344 _builtin_types_dissection_data->dissection_infos.key_hash_value_dissection_info.bound = KEY_HAS_VALUE_NUM_ELEMENTS16;15345 _builtin_types_dissection_data->dissection_infos.key_hash_value_dissection_info.member_kind = RTI_CDR_TYPE_OBJECT_TYPE_KIND_ARRAY_TYPE;15346 _builtin_types_dissection_data->dissection_infos.key_hash_value_dissection_info.base_type_id = RTI_CDR_TYPE_OBJECT_TYPE_KIND_BYTE_TYPE;15347 _builtin_types_dissection_data->dissection_infos.key_hash_value_dissection_info.type_id = KeyHashValue_type_id;15348 _builtin_types_dissection_data->dissection_infos.key_hash_value_dissection_info.bound = KEY_HAS_VALUE_NUM_ELEMENTS16;15349 _builtin_types_dissection_data->dissection_infos.key_hash_value_dissection_info.elements = wmem_alloc_array(wmem_epan_scope(), dissection_element, GUID_T_NUM_ELEMENTS)((dissection_element*)wmem_alloc((wmem_epan_scope()), (((((1)
) <= 0) || ((size_t)sizeof(dissection_element) > (9223372036854775807L
/ (size_t)((1))))) ? 0 : (sizeof(dissection_element) * ((1))
))))
;15350 wmem_map_insert(15351 builtin_dissection_infos,15352 &(_builtin_types_dissection_data->dissection_infos.key_hash_value_dissection_info.type_id),15353 (void*)&(_builtin_types_dissection_data->dissection_infos.key_hash_value_dissection_info));15354 15355 /* SerializedKey */15356 g_strlcpy(_builtin_types_dissection_data->dissection_infos.serialized_key_dissection_info.member_name, "SerializedKey", MAX_TOPIC_AND_TYPE_LENGTH256);15357 _builtin_types_dissection_data->dissection_infos.serialized_key_dissection_info.num_elements = GUID_T_NUM_ELEMENTS1;15358 _builtin_types_dissection_data->dissection_infos.serialized_key_dissection_info.member_kind = RTI_CDR_TYPE_OBJECT_TYPE_KIND_STRUCTURE_TYPE;15359 _builtin_types_dissection_data->dissection_infos.serialized_key_dissection_info.type_id = SerializedKey_type_id;15360 _builtin_types_dissection_data->dissection_infos.serialized_key_dissection_info.elements = wmem_alloc_array(wmem_epan_scope(), dissection_element, GUID_T_NUM_ELEMENTS)((dissection_element*)wmem_alloc((wmem_epan_scope()), (((((1)
) <= 0) || ((size_t)sizeof(dissection_element) > (9223372036854775807L
/ (size_t)((1))))) ? 0 : (sizeof(dissection_element) * ((1))
))))
;15361 /* sequence<octet> payload */15362 _builtin_types_dissection_data->dissection_infos.serialized_key_dissection_info.elements[0].flags = 0;15363 _builtin_types_dissection_data->dissection_infos.serialized_key_dissection_info.elements[0].member_id = 0;15364 _builtin_types_dissection_data->dissection_infos.serialized_key_dissection_info.elements[0].type_id = payload_type_id;15365 g_strlcpy(_builtin_types_dissection_data->dissection_infos.serialized_key_dissection_info.elements[0].member_name, "payload", MAX_TOPIC_AND_TYPE_LENGTH256);15366 wmem_map_insert(15367 builtin_dissection_infos,15368 &(_builtin_types_dissection_data->dissection_infos.serialized_key_dissection_info.type_id),15369 (void*)&(_builtin_types_dissection_data->dissection_infos.serialized_key_dissection_info));15370 15371 /* NtpTime_t */15372 g_strlcpy(_builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info.member_name, "NtpTime_t", MAX_TOPIC_AND_TYPE_LENGTH256);15373 _builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info.num_elements = NTPTIME_T_NUM_ELEMENTS2;15374 _builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info.member_kind = RTI_CDR_TYPE_OBJECT_TYPE_KIND_STRUCTURE_TYPE;15375 _builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info.type_id = ntptime_t_type_id;15376 _builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info.elements = wmem_alloc_array(wmem_epan_scope(), dissection_element, NTPTIME_T_NUM_ELEMENTS)((dissection_element*)wmem_alloc((wmem_epan_scope()), (((((2)
) <= 0) || ((size_t)sizeof(dissection_element) > (9223372036854775807L
/ (size_t)((2))))) ? 0 : (sizeof(dissection_element) * ((2))
))))
;15377 /* int32 sec */15378 _builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info.elements[0].flags = 0;15379 _builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info.elements[0].member_id = 0;15380 _builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info.elements[0].type_id = RTI_CDR_TYPE_OBJECT_TYPE_KIND_INT_32_TYPE;15381 g_strlcpy(_builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info.elements[0].member_name, "sec", MAX_TOPIC_AND_TYPE_LENGTH256);15382 /* uint32 frac */15383 _builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info.elements[1].flags = 0;15384 _builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info.elements[1].member_id = 1;15385 _builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info.elements[1].type_id = RTI_CDR_TYPE_OBJECT_TYPE_KIND_INT_32_TYPE;15386 g_strlcpy(_builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info.elements[1].member_name, "frac", MAX_TOPIC_AND_TYPE_LENGTH256);15387 wmem_map_insert(15388 builtin_dissection_infos,15389 &(_builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info.type_id),15390 (void*)&(_builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info));15391 15392 /* SequenceNumber_t */15393 g_strlcpy(_builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info.member_name, "SequenceNumber_t", MAX_TOPIC_AND_TYPE_LENGTH256);15394 _builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info.num_elements = SEQUENCE_NUMBER_T_NUM_ELEMENTS2;15395 _builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info.member_kind = RTI_CDR_TYPE_OBJECT_TYPE_KIND_STRUCTURE_TYPE;15396 _builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info.type_id = sequencenumber_t_type_id;15397 _builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info.elements = wmem_alloc_array(wmem_epan_scope(), dissection_element, SEQUENCE_NUMBER_T_NUM_ELEMENTS)((dissection_element*)wmem_alloc((wmem_epan_scope()), (((((2)
) <= 0) || ((size_t)sizeof(dissection_element) > (9223372036854775807L
/ (size_t)((2))))) ? 0 : (sizeof(dissection_element) * ((2))
))))
;15398 _builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info.elements[0].flags = 0;15399 _builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info.elements[0].member_id = 0;15400 _builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info.elements[0].type_id = RTI_CDR_TYPE_OBJECT_TYPE_KIND_INT_32_TYPE;15401 g_strlcpy(_builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info.elements[0].member_name, "high", MAX_TOPIC_AND_TYPE_LENGTH256);15402 _builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info.elements[1].flags = 0;15403 _builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info.elements[1].member_id = 1;15404 _builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info.elements[1].type_id = RTI_CDR_TYPE_OBJECT_TYPE_KIND_UINT_32_TYPE;15405 g_strlcpy(_builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info.elements[1].member_name, "low", MAX_TOPIC_AND_TYPE_LENGTH256);15406 wmem_map_insert(15407 builtin_dissection_infos,15408 &(_builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info.type_id),15409 (void*)&(_builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info));15410 15411 /* Instance transition Data */15412 g_strlcpy(_builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.member_name, "InstanceTransitionData", MAX_TOPIC_AND_TYPE_LENGTH256);15413 _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.num_elements = INSTANCE_TRANSITION_DATA_NUM_ELEMENTS4;15414 _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.member_kind = RTI_CDR_TYPE_OBJECT_TYPE_KIND_STRUCTURE_TYPE;15415 _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.type_id = instancetransitiondata_type_id;15416 _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements = wmem_alloc_array(wmem_epan_scope(), dissection_element, INSTANCE_TRANSITION_DATA_NUM_ELEMENTS)((dissection_element*)wmem_alloc((wmem_epan_scope()), (((((4)
) <= 0) || ((size_t)sizeof(dissection_element) > (9223372036854775807L
/ (size_t)((4))))) ? 0 : (sizeof(dissection_element) * ((4))
))))
;15417 wmem_map_insert(15418 builtin_dissection_infos,15419 &(_builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.type_id),15420 (void*)&(_builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info));15421 15422 for (element = 0; element < _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.num_elements; ++element) {15423 switch (element) {15424 case 0:15425 /* @optional KeyHashValue key_hash */15426 _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].flags = MEMBER_OPTIONAL(2);15427 _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].member_id = element;15428 _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].type_id = KeyHashValue_type_id;15429 g_strlcpy(_builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].member_name, "key_hash", MAX_TOPIC_AND_TYPE_LENGTH256);15430 break;15431 case 1:15432 /* @optional SerializedKey serialized_key */15433 _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].flags = MEMBER_OPTIONAL(2);15434 _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].member_id = element;15435 _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].type_id = SerializedKey_type_id;15436 g_strlcpy(_builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].member_name, "serialized_key", MAX_TOPIC_AND_TYPE_LENGTH256);15437 break;15438 case 2:15439 /* NtpTime_t last_update_timestamp */15440 _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].flags = 0;15441 _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].member_id = element;15442 _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].type_id = ntptime_t_type_id;15443 g_strlcpy(_builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].member_name, "last_update_timestamp", MAX_TOPIC_AND_TYPE_LENGTH256);15444 break;15445 case 3:15446 /* SequenceNumber_t transition_sequence_number */15447 _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].flags = 0;15448 _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].member_id = element;15449 _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].type_id = sequencenumber_t_type_id;15450 g_strlcpy(_builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].member_name, "transition_sequence_number", MAX_TOPIC_AND_TYPE_LENGTH256);15451 break;15452 }15453 }15454 15455 /* InstanceStateDataResponse15456 * struct InstanceStateDataResponse {15457 * @optional sequence<InstanceTransitionData> alive_instances;15458 * @optional sequence<InstanceTransitionData> disposed_instances;15459 * @optional sequence<InstanceTransitionData> unregistered_instances;15460 * GUID_t writer_guid;15461 * GUID_t reader_guid;15462 * uint32 reader_group_oid;15463 * boolean complete_snapshot;15464 * };15465 */15466 15467 /* This type mapping is not available in the "registry" map. It is used in the function15468 * rtps_util_get_topic_info when the endopint GUID determines that the type is InstanceStateDataResponse15469 */15470 _builtin_types_dissection_data->type_mappings.instance_state_data_response_type_mapping.type_id = InstanceStateDataResponse_type_id;15471 _builtin_types_dissection_data->type_mappings.instance_state_data_response_type_mapping.guid.entity_id = ENTITYID_NORMAL_META_GROUP_READER(0x8d);15472 _builtin_types_dissection_data->type_mappings.instance_state_data_response_type_mapping.guid.fields_present = GUID_HAS_ALL0x0000000F;15473 _builtin_types_dissection_data->type_mappings.instance_state_data_response_type_mapping.fields_visited = TOPIC_INFO_ALL_SET(0x07);15474 g_strlcpy(_builtin_types_dissection_data->type_mappings.instance_state_data_response_type_mapping.topic_name, "InstanceStateDataResponse", MAX_TOPIC_AND_TYPE_LENGTH256);15475 g_strlcpy(_builtin_types_dissection_data->type_mappings.instance_state_data_response_type_mapping.type_name, "InstanceStateDataResponse", MAX_TOPIC_AND_TYPE_LENGTH256);15476 15477 g_strlcpy(_builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.member_name, "InstanceStateDataResponse", MAX_TOPIC_AND_TYPE_LENGTH256);15478 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.num_elements = INSTANCE_STATE_DATA_RESPONSE_NUM_ELEMENTS7;15479 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.bound = INSTANCE_STATE_DATA_RESPONSE_NUM_ELEMENTS7;15480 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.member_kind = RTI_CDR_TYPE_OBJECT_TYPE_KIND_STRUCTURE_TYPE;15481 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements = wmem_alloc_array(wmem_epan_scope(), dissection_element, INSTANCE_STATE_DATA_RESPONSE_NUM_ELEMENTS)((dissection_element*)wmem_alloc((wmem_epan_scope()), (((((7)
) <= 0) || ((size_t)sizeof(dissection_element) > (9223372036854775807L
/ (size_t)((7))))) ? 0 : (sizeof(dissection_element) * ((7))
))))
;15482 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.base_type_id = 0;15483 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.type_id = InstanceStateDataResponse_type_id;15484 wmem_map_insert(15485 builtin_dissection_infos,15486 &(_builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.type_id),15487 (void*)&(_builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info));15488 15489 /* sequence_100_InstanceTransitionData */15490 g_strlcpy(_builtin_types_dissection_data->dissection_infos.alive_instances_dissection_info.member_name, "sequence_100_InstanceTransitionData", MAX_TOPIC_AND_TYPE_LENGTH256);15491 _builtin_types_dissection_data->dissection_infos.alive_instances_dissection_info.num_elements = INSTANCE_STATE_DATA_RESPONSE_NUM_ELEMENTS7;15492 _builtin_types_dissection_data->dissection_infos.alive_instances_dissection_info.bound = SEQUENCE_100_IINSTANCE_TRANSITION_DATA_BOUND100;15493 _builtin_types_dissection_data->dissection_infos.alive_instances_dissection_info.member_kind = RTI_CDR_TYPE_OBJECT_TYPE_KIND_SEQUENCE_TYPE;15494 _builtin_types_dissection_data->dissection_infos.alive_instances_dissection_info.base_type_id = instancetransitiondata_type_id;15495 _builtin_types_dissection_data->dissection_infos.alive_instances_dissection_info.type_id = sequence_100_InstanceTransitionData_type_id;15496 wmem_map_insert(15497 builtin_dissection_infos,15498 &(_builtin_types_dissection_data->dissection_infos.alive_instances_dissection_info.type_id),15499 (void*)&(_builtin_types_dissection_data->dissection_infos.alive_instances_dissection_info));15500 15501 /* @optional sequence<InstanceTransitionData> alive_instances */15502 for (element = 0; element < _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.num_elements; ++element) {15503 switch (element) {15504 case 0:15505 /* @optional sequence<InstanceTransitionData> alive_instances */15506 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].flags = MEMBER_OPTIONAL(2);15507 g_strlcpy(_builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].member_name, "alive_instances", MAX_MEMBER_NAME(256));15508 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].type_id = sequence_100_InstanceTransitionData_type_id;15509 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].member_id = element;15510 break;15511 case 1:15512 /* @optional sequence<InstanceTransitionData> disposed_instances */15513 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].flags = MEMBER_OPTIONAL(2);15514 g_strlcpy(_builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].member_name, "disposed_instances", MAX_MEMBER_NAME(256));15515 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].type_id = sequence_100_InstanceTransitionData_type_id;15516 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].member_id = element;15517 break;15518 case 2:15519 /* @optional sequence<InstanceTransitionData> unregistered_instances */15520 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].flags = MEMBER_OPTIONAL(2);15521 g_strlcpy(_builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].member_name, "unregistered_instances", MAX_MEMBER_NAME(256));15522 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].type_id = sequence_100_InstanceTransitionData_type_id;15523 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].member_id = element;15524 break;15525 case 3:15526 /* GUID_t writer_guid */15527 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].flags = 0;15528 g_strlcpy(_builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].member_name, "writer_gid", MAX_MEMBER_NAME(256));15529 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].type_id = guid_t_type_id;15530 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].member_id = element;15531 break;15532 case 4:15533 /* GUID_t reader_guid */15534 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].flags = 0;15535 g_strlcpy(_builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].member_name, "reader_gid", MAX_MEMBER_NAME(256));15536 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].type_id = guid_t_type_id;15537 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].member_id = element;15538 break;15539 case 5:15540 /* uint32 reader_group_oid */15541 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].flags = 0;15542 g_strlcpy(_builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].member_name, "reader_group_oid", MAX_MEMBER_NAME(256));15543 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].type_id = RTI_CDR_TYPE_OBJECT_TYPE_KIND_UINT_32_TYPE;15544 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].member_id = element;15545 break;15546 case 6:15547 /* boolean complete_snapshot */15548 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].flags = 0;15549 g_strlcpy(_builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].member_name, "complete_snapshot", MAX_MEMBER_NAME(256));15550 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].type_id = RTI_CDR_TYPE_OBJECT_TYPE_KIND_BOOLEAN_TYPE;15551 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].member_id = element;15552 break;15553 }15554 }15555}15556 15557void proto_register_rtps(void) {15558 15559 static hf_register_info hf[] = {15560 { &hf_rtps_ping, {15561 "Ping String",15562 "rtps.ping_str",15563 FT_STRING,15564 BASE_NONE,15565 NULL((void*)0),15566 0,15567 "RTPS Ping String",15568 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }15569 },15570 { &hf_rtps_magic, {15571 "Magic",15572 "rtps.magic",15573 FT_STRING,15574 BASE_NONE,15575 NULL((void*)0),15576 0,15577 "RTPS magic",15578 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }15579 },15580 /* Protocol Version (composed as major.minor) -------------------------- */15581 { &hf_rtps_protocol_version, {15582 "version",15583 "rtps.version",15584 FT_UINT16,15585 BASE_HEX,15586 NULL((void*)0),15587 0,15588 "RTPS protocol version number",15589 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }15590 },15591 { &hf_rtps_protocol_version_major, {15592 "major",15593 "rtps.version.major",15594 FT_INT8,15595 BASE_DEC,15596 NULL((void*)0),15597 0,15598 "RTPS major protocol version number",15599 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }15600 },15601 { &hf_rtps_protocol_version_minor, {15602 "minor",15603 "rtps.version.minor",15604 FT_INT8,15605 BASE_DEC,15606 NULL((void*)0),15607 0,15608 "RTPS minor protocol version number",15609 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }15610 },15611 15612 /* Domain Participant and Participant Index ---------------------------- */15613 { &hf_rtps_domain_id, {15614 "domain_id",15615 "rtps.domain_id",15616 FT_UINT32,15617 BASE_DEC,15618 NULL((void*)0),15619 0,15620 "Domain ID",15621 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }15622 },15623 15624 { &hf_rtps_domain_tag, {15625 "domain_tag",15626 "rtps.domain_tag",15627 FT_STRINGZ,15628 BASE_NONE,15629 NULL((void*)0),15630 0,15631 "Domain Tag ID",15632 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }15633 },15634 15635 { &hf_rtps_participant_idx, {15636 "participant_idx",15637 "rtps.participant_idx",15638 FT_UINT32,15639 BASE_DEC,15640 NULL((void*)0),15641 0,15642 "Participant index",15643 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }15644 },15645 { &hf_rtps_nature_type, {15646 "traffic_nature",15647 "rtps.traffic_nature",15648 FT_UINT32,15649 BASE_DEC,15650 VALS(nature_type_vals)((0 ? (const struct _value_string*)0 : ((nature_type_vals)))),15651 0,15652 "Nature of the traffic (meta/user-traffic uni/multi-cast)",15653 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }15654 },15655 15656 /* Vendor ID ----------------------------------------------------------- */15657 { &hf_rtps_vendor_id, {15658 "vendorId",15659 "rtps.vendorId",15660 FT_UINT16,15661 BASE_HEX,15662 NULL((void*)0),15663 0,15664 "Unique identifier of the DDS vendor that generated this packet",15665 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }15666 },15667 15668 /* Guid Prefix for the Packet ------------------------------------------ */15669 { &hf_rtps_guid_prefix_v1,15670 { "guidPrefix", "rtps.guidPrefix_v1",15671 FT_UINT64, BASE_HEX, NULL((void*)0), 0,15672 "GuidPrefix of the RTPS packet", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }15673 },15674 15675 { &hf_rtps_guid_prefix,15676 { "guidPrefix", "rtps.guidPrefix",15677 FT_BYTES, BASE_NONE, NULL((void*)0), 0,15678 "a generic guidPrefix that is transmitted inside the submessage (this is NOT the guidPrefix described in the packet header)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }15679 },15680 15681 { &hf_rtps_guid_prefix_src,15682 { "guidPrefix", "rtps.guidPrefix.src",15683 FT_BYTES, BASE_NONE, NULL((void*)0), 0,15684 "the guidPrefix of the entity sending the sample", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }15685 },15686 15687 { &hf_rtps_guid_prefix_dst,15688 { "guidPrefix", "rtps.guidPrefix.dst",15689 FT_BYTES, BASE_NONE, NULL((void*)0), 0,15690 "the guidPrefix of the entity receiving the sample", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }15691 },15692 15693 /* Host ID ------------------------------------------------------------- */15694 { &hf_rtps_host_id, { /* HIDDEN */15695 "hostId",15696 "rtps.hostId",15697 FT_UINT32,15698 BASE_HEX,15699 NULL((void*)0),15700 0,15701 "Sub-component 'hostId' of the GuidPrefix of the RTPS packet",15702 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }15703 },15704 15705 /* AppID (composed as instanceId, appKind) ----------------------------- */15706 { &hf_rtps_app_id, {15707 "appId",15708 "rtps.appId",15709 FT_UINT32,15710 BASE_HEX,15711 NULL((void*)0),15712 0,15713 "Sub-component 'appId' of the GuidPrefix of the RTPS packet",15714 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }15715 },15716 { &hf_rtps_app_id_instance_id, {15717 "appId.instanceId",15718 "rtps.appId.instanceId",15719 FT_UINT24,15720 BASE_HEX,15721 NULL((void*)0),15722 0,15723 "'instanceId' field of the 'AppId' structure",15724 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }15725 },15726 { &hf_rtps_app_id_app_kind, {15727 "appid.appKind",15728 "rtps.appId.appKind",15729 FT_UINT8,15730 BASE_HEX,15731 VALS(app_kind_vals)((0 ? (const struct _value_string*)0 : ((app_kind_vals)))),15732 0,15733 "'appKind' field of the 'AppId' structure",15734 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }15735 },15736 15737 15738 15739 /* Submessage ID ------------------------------------------------------- */15740 { &hf_rtps_sm_id, {15741 "submessageId",15742 "rtps.sm.id",15743 FT_UINT8,15744 BASE_HEX,15745 VALS(submessage_id_vals)((0 ? (const struct _value_string*)0 : ((submessage_id_vals))
))
,15746 0,15747 "defines the type of submessage",15748 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }15749 },15750 15751 { &hf_rtps_sm_idv2, {15752 "submessageId",15753 "rtps.sm.id",15754 FT_UINT8,15755 BASE_HEX,15756 VALS(submessage_id_valsv2)((0 ? (const struct _value_string*)0 : ((submessage_id_valsv2
))))
,15757 0,15758 "defines the type of submessage",15759 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }15760 },15761 15762 /* Submessage flags ---------------------------------------------------- */15763 { &hf_rtps_sm_flags, {15764 "Flags",15765 "rtps.sm.flags",15766 FT_UINT8,15767 BASE_HEX,15768 NULL((void*)0),15769 0,15770 "bitmask representing the flags associated with a submessage",15771 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }15772 },15773 { &hf_rtps_sm_flags2, {15774 "Flags",15775 "rtps.sm.flags",15776 FT_UINT16,15777 BASE_HEX,15778 NULL((void*)0),15779 0,15780 "bitmask representing the flags associated with a submessage",15781 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }15782 },15783 15784 /* octets to next header ---------------------------------------------- */15785 { &hf_rtps_sm_octets_to_next_header, {15786 "octetsToNextHeader",15787 "rtps.sm.octetsToNextHeader",15788 FT_UINT16,15789 BASE_DEC,15790 NULL((void*)0),15791 0,15792 "Size of the submessage payload",15793 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }15794 },15795 15796 /* GUID as {GuidPrefix, EntityId} ------------------------------------ */15797 { &hf_rtps_sm_guid_prefix_v1, {15798 "guidPrefix",15799 "rtps.sm.guidPrefix_v1",15800 FT_UINT64,15801 BASE_HEX,15802 NULL((void*)0),15803 0,15804 "a generic guidPrefix that is transmitted inside the submessage (this is NOT the guidPrefix described in the packet header)",15805 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }15806 },15807 15808 { &hf_rtps_sm_guid_prefix, {15809 "guidPrefix",15810 "rtps.sm.guidPrefix",15811 FT_BYTES,15812 BASE_NONE,15813 NULL((void*)0),15814 0,15815 "a generic guidPrefix that is transmitted inside the submessage (this is NOT the guidPrefix described in the packet header)",15816 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }15817 },15818 15819 { &hf_rtps_sm_host_id, {15820 "host_id",15821 "rtps.sm.guidPrefix.hostId",15822 FT_UINT32,15823 BASE_HEX,15824 NULL((void*)0),15825 0,15826 "The hostId component of the rtps.sm.guidPrefix",15827 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }15828 },15829 15830 { &hf_rtps_sm_app_id, {15831 "appId",15832 "rtps.sm.guidPrefix.appId",15833 FT_UINT32,15834 BASE_HEX,15835 NULL((void*)0),15836 0,15837 "AppId component of the rtps.sm.guidPrefix",15838 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }15839 },15840 { &hf_rtps_sm_instance_id_v1, {15841 "instanceId",15842 "rtps.sm.guidPrefix.appId.instanceId",15843 FT_UINT24,15844 BASE_HEX,15845 NULL((void*)0),15846 0,15847 "instanceId component of the AppId of the rtps.sm.guidPrefix",15848 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }15849 },15850 { &hf_rtps_sm_app_kind, {15851 "appKind",15852 "rtps.sm.guidPrefix.appId.appKind",15853 FT_UINT8,15854 BASE_HEX,15855 NULL((void*)0),15856 0,15857 "appKind component of the AppId of the rtps.sm.guidPrefix",15858 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }15859 },15860 { &hf_rtps_sm_instance_id, {15861 "instanceId",15862 "rtps.sm.guidPrefix.instanceId",15863 FT_UINT32,15864 BASE_HEX,15865 NULL((void*)0),15866 0,15867 "instanceId component of the rtps.sm.guidPrefix",15868 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }15869 },15870 15871 /* Entity ID (composed as entityKey, entityKind) ----------------------- */15872 { &hf_rtps_sm_entity_id, {15873 "entityId",15874 "rtps.sm.entityId",15875 FT_UINT32,15876 BASE_HEX,15877 VALS(entity_id_vals)((0 ? (const struct _value_string*)0 : ((entity_id_vals)))),15878 0,15879 "Object entity ID as it appears in a DATA submessage (keyHashSuffix)",15880 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }15881 },15882 { &hf_rtps_sm_entity_id_key, {15883 "entityKey",15884 "rtps.sm.entityId.entityKey",15885 FT_UINT24,15886 BASE_HEX,15887 NULL((void*)0),15888 0,15889 "'entityKey' field of the object entity ID",15890 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }15891 },15892 { &hf_rtps_sm_entity_id_kind, {15893 "entityKind",15894 "rtps.sm.entityId.entityKind",15895 FT_UINT8,15896 BASE_HEX,15897 VALS(entity_kind_vals)((0 ? (const struct _value_string*)0 : ((entity_kind_vals)))),15898 0,15899 "'entityKind' field of the object entity ID",15900 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }15901 },15902 15903 { &hf_rtps_sm_rdentity_id, {15904 "readerEntityId",15905 "rtps.sm.rdEntityId",15906 FT_UINT32,15907 BASE_HEX,15908 VALS(entity_id_vals)((0 ? (const struct _value_string*)0 : ((entity_id_vals)))),15909 0,15910 "Reader entity ID as it appears in a submessage",15911 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }15912 },15913 { &hf_rtps_sm_rdentity_id_key, {15914 "readerEntityKey",15915 "rtps.sm.rdEntityId.entityKey",15916 FT_UINT24,15917 BASE_HEX,15918 NULL((void*)0),15919 0,15920 "'entityKey' field of the reader entity ID",15921 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }15922 },15923 { &hf_rtps_sm_rdentity_id_kind, {15924 "readerEntityKind",15925 "rtps.sm.rdEntityId.entityKind",15926 FT_UINT8,15927 BASE_HEX,15928 VALS(entity_kind_vals)((0 ? (const struct _value_string*)0 : ((entity_kind_vals)))),15929 0,15930 "'entityKind' field of the reader entity ID",15931 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }15932 },15933 15934 { &hf_rtps_sm_wrentity_id, {15935 "writerEntityId",15936 "rtps.sm.wrEntityId",15937 FT_UINT32,15938 BASE_HEX,15939 VALS(entity_id_vals)((0 ? (const struct _value_string*)0 : ((entity_id_vals)))),15940 0,15941 "Writer entity ID as it appears in a submessage",15942 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }15943 },15944 { &hf_rtps_sm_wrentity_id_key, {15945 "writerEntityKey",15946 "rtps.sm.wrEntityId.entityKey",15947 FT_UINT24,15948 BASE_HEX,15949 NULL((void*)0),15950 0,15951 "'entityKey' field of the writer entity ID",15952 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }15953 },15954 { &hf_rtps_sm_wrentity_id_kind, {15955 "writerEntityKind",15956 "rtps.sm.wrEntityId.entityKind",15957 FT_UINT8,15958 BASE_HEX,15959 VALS(entity_kind_vals)((0 ? (const struct _value_string*)0 : ((entity_kind_vals)))),15960 0,15961 "'entityKind' field of the writer entity ID",15962 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }15963 },15964 15965 15966 15967 /* Sequence number ----------------------------------------------------- */15968 { &hf_rtps_sm_seq_number, {15969 "writerSeqNumber",15970 "rtps.sm.seqNumber",15971 FT_INT64,15972 BASE_DEC,15973 NULL((void*)0),15974 0,15975 "Writer sequence number",15976 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }15977 },15978 15979 { &hf_rtps_info_src_ip, {15980 "appIpAddress",15981 "rtps.info_src.ip",15982 FT_IPv4,15983 BASE_NONE,15984 NULL((void*)0),15985 0,15986 NULL((void*)0),15987 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }15988 },15989 15990 { &hf_rtps_info_src_unused, {15991 "Unused",15992 "rtps.info_src.unused",15993 FT_UINT32,15994 BASE_HEX,15995 NULL((void*)0),15996 0,15997 NULL((void*)0),15998 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }15999 },16000 16001 /* Parameter Id -------------------------------------------------------- */16002 { &hf_rtps_parameter_id, {16003 "parameterId",16004 "rtps.param.id",16005 FT_UINT16,16006 BASE_HEX,16007 VALS(parameter_id_vals)((0 ? (const struct _value_string*)0 : ((parameter_id_vals)))
)
,16008 0,16009 "Parameter Id",16010 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16011 },16012 16013 { &hf_rtps_parameter_id_v2, {16014 "parameterId",16015 "rtps.param.id",16016 FT_UINT16,16017 BASE_HEX,16018 VALS(parameter_id_v2_vals)((0 ? (const struct _value_string*)0 : ((parameter_id_v2_vals
))))
,16019 0,16020 "Parameter Id",16021 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16022 },16023 16024 { &hf_rtps_parameter_id_inline_rti, {16025 "Parameter Id", "rtps.param.id", FT_UINT16,16026 BASE_HEX, VALS(parameter_id_inline_qos_rti)((0 ? (const struct _value_string*)0 : ((parameter_id_inline_qos_rti
))))
, 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16027 },16028 16029 { &hf_rtps_parameter_id_toc, {16030 "parameterId",16031 "rtps.param.id",16032 FT_UINT16,16033 BASE_HEX,16034 VALS(parameter_id_toc_vals)((0 ? (const struct _value_string*)0 : ((parameter_id_toc_vals
))))
,16035 0,16036 "Parameter Id",16037 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16038 },16039 16040 { &hf_rtps_parameter_id_rti, {16041 "parameterId",16042 "rtps.param.id",16043 FT_UINT16,16044 BASE_HEX,16045 VALS(parameter_id_rti_vals)((0 ? (const struct _value_string*)0 : ((parameter_id_rti_vals
))))
,16046 0,16047 "Parameter Id",16048 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16049 },16050 16051 { &hf_rtps_parameter_id_adl, {16052 "parameterId",16053 "rtps.param.id",16054 FT_UINT16,16055 BASE_HEX,16056 VALS(parameter_id_adl_vals)((0 ? (const struct _value_string*)0 : ((parameter_id_adl_vals
))))
,16057 0,16058 "Parameter Id",16059 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16060 },16061 16062 /* Parameter Length ---------------------------------------------------- */16063 { &hf_rtps_parameter_length, {16064 "parameterLength",16065 "rtps.param.length",16066 FT_UINT16,16067 BASE_DEC,16068 NULL((void*)0),16069 0,16070 "Parameter Length",16071 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16072 },16073 16074 /* String Length ---------------------------------------------------- */16075 { &hf_rtps_string_length, {16076 "String length",16077 "rtps.param.string.length",16078 FT_UINT32,16079 BASE_DEC,16080 NULL((void*)0),16081 0,16082 NULL((void*)0),16083 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16084 },16085 16086 /* Parameter / Topic --------------------------------------------------- */16087 { &hf_rtps_param_topic_name, {16088 "topic",16089 "rtps.param.topicName",16090 FT_STRINGZ,16091 BASE_NONE,16092 NULL((void*)0),16093 0,16094 "String representing the value value of a PID_TOPIC parameter",16095 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16096 },16097 16098 /* Parameter / Strength ------------------------------------------------ */16099 { &hf_rtps_param_strength, {16100 "strength",16101 "rtps.param.strength",16102 FT_INT32,16103 BASE_DEC,16104 NULL((void*)0),16105 0,16106 "Decimal value representing the value of a PID_OWNERSHIP_STRENGTH parameter",16107 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16108 },16109 16110 /* Parameter / Type Name ----------------------------------------------- */16111 { &hf_rtps_param_type_name, {16112 "typeName",16113 "rtps.param.typeName",16114 FT_STRINGZ,16115 BASE_NONE,16116 NULL((void*)0),16117 0,16118 "String representing the value of a PID_TYPE_NAME parameter",16119 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16120 },16121 16122 /* Parameter / User Data ----------------------------------------------- */16123 { &hf_rtps_param_user_data, {16124 "userData",16125 "rtps.param.userData",16126 FT_BYTES,16127 BASE_NONE,16128 NULL((void*)0),16129 0,16130 "The user data sent in a PID_USER_DATA parameter",16131 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16132 },16133 16134 /* Parameter / Group Data ---------------------------------------------- */16135 { &hf_rtps_param_group_data, {16136 "groupData",16137 "rtps.param.groupData",16138 FT_BYTES,16139 BASE_NONE,16140 NULL((void*)0),16141 0,16142 "The user data sent in a PID_GROUP_DATA parameter",16143 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16144 },16145 16146 { &hf_rtps_transportInfo_classId, {16147 "classID",16148 "rtps.transportInfo.classID",16149 FT_INT32,16150 BASE_DEC,16151 NULL((void*)0),16152 0,16153 "Class ID of transport",16154 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16155 },16156 16157 { &hf_rtps_transportInfo_messageSizeMax, {16158 "messageSizeMax",16159 "rtps.transportInfo.messageSizeMax",16160 FT_INT32,16161 BASE_DEC,16162 NULL((void*)0),16163 0,16164 "Maximum message size of transport",16165 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16166 },16167 { &hf_rtps_coherent_set_start, {16168 "Coherent set start",16169 "rtps.coherent_set.start",16170 FT_UINT64,16171 BASE_DEC,16172 NULL((void*)0),16173 0,16174 "Start of a coherent set",16175 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16176 },16177 16178 { &hf_rtps_coherent_set_end, {16179 "End of coherent set sequence",16180 "rtps.coherent_set.end",16181 FT_UINT64,16182 BASE_DEC,16183 NULL((void*)0),16184 0,16185 "End of a coherent set",16186 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16187 },16188 16189 /* Parameter / Topic Data ---------------------------------------------- */16190 { &hf_rtps_param_topic_data, {16191 "topicData",16192 "rtps.param.topicData",16193 FT_BYTES,16194 BASE_NONE,16195 NULL((void*)0),16196 0,16197 "The user data sent in a PID_TOPIC_DATA parameter",16198 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16199 },16200 16201 16202 /* Parameter / Content Filter Name ------------------------------------- */16203 { &hf_rtps_param_content_filter_topic_name, {16204 "contentFilterTopicName",16205 "rtps.param.contentFilterTopicName",16206 FT_STRINGZ,16207 BASE_NONE,16208 NULL((void*)0),16209 0,16210 "Value of the content filter topic name as sent in a PID_CONTENT_FILTER_PROPERTY parameter",16211 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16212 },16213 { &hf_rtps_param_related_topic_name, {16214 "relatedTopicName",16215 "rtps.param.relatedTopicName",16216 FT_STRINGZ,16217 BASE_NONE,16218 NULL((void*)0),16219 0,16220 "Value of the related topic name as sent in a PID_CONTENT_FILTER_PROPERTY parameter",16221 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16222 },16223 { &hf_rtps_param_filter_class_name, {16224 "filterClassName",16225 "rtps.param.filterClassName",16226 FT_STRINGZ,16227 BASE_NONE,16228 NULL((void*)0),16229 0,16230 "Value of the filter class name as sent in a PID_CONTENT_FILTER_PROPERTY parameter",16231 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16232 },16233 16234 { &hf_rtps_durability_service_cleanup_delay,16235 { "Service Cleanup Delay", "rtps.durability.service_cleanup_delay",16236 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL((void*)0), 0,16237 "Time using the RTPS time_t standard format", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16238 },16239 16240 { &hf_rtps_liveliness_lease_duration,16241 { "Lease Duration", "rtps.liveliness.lease_duration",16242 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL((void*)0), 0,16243 "Time using the RTPS time_t standard format", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16244 },16245 16246 { &hf_rtps_participant_lease_duration,16247 { "Duration", "rtps.participant_lease_duration",16248 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL((void*)0), 0,16249 "Time using the RTPS time_t standard format", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16250 },16251 16252 { &hf_rtps_time_based_filter_minimum_separation,16253 { "Minimum Separation", "rtps.time_based_filter.minimum_separation",16254 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL((void*)0), 0,16255 "Time using the RTPS time_t standard format", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16256 },16257 16258 { &hf_rtps_reliability_max_blocking_time,16259 { "Max Blocking Time", "rtps.reliability.max_blocking_time",16260 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL((void*)0), 0,16261 "Time using the RTPS time_t standard format", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16262 },16263 16264 { &hf_rtps_deadline_period,16265 { "Period", "rtps.deadline_period",16266 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL((void*)0), 0,16267 "Time using the RTPS time_t standard format", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16268 },16269 16270 { &hf_rtps_latency_budget_duration,16271 { "Duration", "rtps.latency_budget.duration",16272 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL((void*)0), 0,16273 "Time using the RTPS time_t standard format", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16274 },16275 16276 { &hf_rtps_lifespan_duration,16277 { "Duration", "rtps.lifespan",16278 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL((void*)0), 0,16279 "Time using the RTPS time_t standard format", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16280 },16281 16282 { &hf_rtps_persistence,16283 { "Persistence", "rtps.persistence",16284 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL((void*)0), 0,16285 "Time using the RTPS time_t standard format", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16286 },16287 16288 { &hf_rtps_info_ts_timestamp,16289 { "Timestamp", "rtps.info_ts.timestamp",16290 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL((void*)0), 0,16291 "Time using the RTPS time_t standard format", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16292 },16293 16294 { &hf_rtps_timestamp,16295 { "Timestamp", "rtps.timestamp",16296 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL((void*)0), 0,16297 "Time using the RTPS time_t standard format", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16298 },16299 16300 { &hf_rtps_locator_kind,16301 { "Kind", "rtps.locator.kind",16302 FT_UINT32, BASE_HEX, VALS(rtps_locator_kind_vals)((0 ? (const struct _value_string*)0 : ((rtps_locator_kind_vals
))))
, 0,16303 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16304 },16305 16306 { &hf_rtps_locator_port,16307 { "Port", "rtps.locator.port",16308 FT_UINT32, BASE_DEC, NULL((void*)0), 0,16309 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16310 },16311#if 016312 { &hf_rtps_logical_port,16313 { "RTPS Logical Port", "rtps.locator.port",16314 FT_INT32, BASE_DEC, NULL((void*)0), 0,16315 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16316 },16317#endif16318 { &hf_rtps_locator_public_address_port,16319 { "Public Address Port", "rtps.locator.public_address_port",16320 FT_INT32, BASE_DEC, NULL((void*)0), 0,16321 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16322 },16323 16324 { &hf_rtps_locator_ipv4,16325 { "Address", "rtps.locator.ipv4",16326 FT_IPv4, BASE_NONE, NULL((void*)0), 0,16327 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16328 },16329 16330 { &hf_rtps_locator_ipv6,16331 { "Address", "rtps.locator.ipv6",16332 FT_IPv6, BASE_NONE, NULL((void*)0), 0,16333 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16334 },16335 16336 { &hf_rtps_participant_builtin_endpoints,16337 { "BuiltIn Endpoint", "rtps.participant_builtin_endpoints",16338 FT_UINT32, BASE_HEX, NULL((void*)0), 0,16339 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16340 },16341 16342 { &hf_rtps_participant_manual_liveliness_count,16343 { "Manual Liveliness Count", "rtps.participant_manual_liveliness_count",16344 FT_UINT32, BASE_HEX, NULL((void*)0), 0,16345 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16346 },16347 16348 { &hf_rtps_history_depth,16349 { "Depth", "rtps.history_depth",16350 FT_INT32, BASE_DEC, NULL((void*)0), 0,16351 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16352 },16353 16354 { &hf_rtps_resource_limit_max_samples,16355 { "Max Samples", "rtps.resource_limit.max_samples",16356 FT_INT32, BASE_DEC, NULL((void*)0), 0,16357 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16358 },16359 16360 { &hf_rtps_resource_limit_max_instances,16361 { "Max Instances", "rtps.resource_limit.max_instances",16362 FT_INT32, BASE_DEC, NULL((void*)0), 0,16363 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16364 },16365 16366 { &hf_rtps_resource_limit_max_samples_per_instances,16367 { "Max Samples Per Instance", "rtps.resource_limit.max_samples_per_instance",16368 FT_INT32, BASE_DEC, NULL((void*)0), 0,16369 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16370 },16371 16372 { &hf_rtps_filter_bitmap,16373 { "Filter Bitmap", "rtps.filter_bitmap",16374 FT_UINT32, BASE_HEX, NULL((void*)0), 0,16375 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16376 },16377 16378 { &hf_rtps_type_checksum,16379 { "Checksum", "rtps.type_checksum",16380 FT_UINT32, BASE_HEX, NULL((void*)0), 0,16381 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16382 },16383 16384 { &hf_rtps_queue_size,16385 { "queueSize", "rtps.queue_size",16386 FT_UINT32, BASE_HEX, NULL((void*)0), 0,16387 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16388 },16389 16390 { &hf_rtps_acknack_count,16391 { "Count", "rtps.acknack.count",16392 FT_INT32, BASE_DEC, NULL((void*)0), 0,16393 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16394 },16395 16396 { &hf_rtps_param_app_ack_virtual_writer_count,16397 { "virtualWriterCount", "rtps.app_ack.virtual_writer_count",16398 FT_INT32, BASE_DEC, NULL((void*)0), 0,16399 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16400 },16401 16402 { &hf_rtps_param_app_ack_count,16403 { "count", "rtps.app_ack.count",16404 FT_INT32, BASE_DEC, NULL((void*)0), 0,16405 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16406 },16407 16408 { &hf_rtps_param_app_ack_conf_virtual_writer_count,16409 { "virtualWriterCount", "rtps.app_ack_conf.virtual_writer_count",16410 FT_UINT32, BASE_DEC, NULL((void*)0), 0,16411 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16412 },16413 16414 { &hf_rtps_param_app_ack_conf_count,16415 { "count", "rtps.app_ack_conf.count",16416 FT_INT32, BASE_DEC, NULL((void*)0), 0,16417 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16418 },16419 16420 { &hf_rtps_param_app_ack_interval_payload_length,16421 { "intervalPayloadLength", "rtps.app_ack.interval_payload_length",16422 FT_INT16, BASE_DEC, NULL((void*)0), 0,16423 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16424 },16425 16426 { &hf_rtps_param_app_ack_interval_flags,16427 { "intervalFlags", "rtps.app_ack.interval_flags",16428 FT_INT16, BASE_DEC, NULL((void*)0), 0,16429 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16430 },16431 16432 { &hf_rtps_param_app_ack_interval_count,16433 { "intervalCount", "rtps.app_ack.interval_count",16434 FT_INT16, BASE_DEC, NULL((void*)0), 0,16435 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16436 },16437 16438 { &hf_rtps_param_app_ack_octets_to_next_virtual_writer,16439 { "octetsToNextVirtualWriter", "rtps.app_ack.octets_to_next_virtual_writer",16440 FT_INT16, BASE_DEC, NULL((void*)0), 0,16441 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16442 },16443 16444 { &hf_rtps_durability_service_history_kind,16445 { "History Kind", "rtps.durability_service.history_kind",16446 FT_UINT32, BASE_HEX, VALS(history_qos_vals)((0 ? (const struct _value_string*)0 : ((history_qos_vals)))), 0,16447 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16448 },16449 16450 { &hf_rtps_durability_service_history_depth,16451 { "History Depth", "rtps.durability_service.history_depth",16452 FT_INT32, BASE_DEC, NULL((void*)0), 0,16453 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16454 },16455 16456 { &hf_rtps_durability_service_max_samples,16457 { "Max Samples", "rtps.durability_service.max_samples",16458 FT_INT32, BASE_DEC, NULL((void*)0), 0,16459 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16460 },16461 16462 { &hf_rtps_durability_service_max_instances,16463 { "Max Instances", "rtps.durability_service.max_instances",16464 FT_INT32, BASE_DEC, NULL((void*)0), 0,16465 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16466 },16467 16468 { &hf_rtps_durability_service_max_samples_per_instances,16469 { "Max Samples Per Instance", "rtps.durability_service.max_samples_per_instance",16470 FT_INT32, BASE_DEC, NULL((void*)0), 0,16471 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16472 },16473 16474 { &hf_rtps_liveliness_kind,16475 { "Kind", "rtps.liveliness.kind",16476 FT_UINT32, BASE_HEX, VALS(liveliness_qos_vals)((0 ? (const struct _value_string*)0 : ((liveliness_qos_vals)
)))
, 0,16477 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16478 },16479 16480 { &hf_rtps_manager_key,16481 { "Key", "rtps.manager_key",16482 FT_UINT32, BASE_HEX, NULL((void*)0), 0,16483 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16484 },16485 16486 { &hf_rtps_locator_udp_v4,16487 { "Address", "rtps.locator_udp_v4.ip",16488 FT_IPv4, BASE_NONE, NULL((void*)0), 0,16489 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16490 },16491 16492 { &hf_rtps_locator_udp_v4_port,16493 { "Port", "rtps.locator_udp_v4.port",16494 FT_UINT32, BASE_HEX, NULL((void*)0), 0,16495 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16496 },16497 16498 { &hf_param_ip_address,16499 { "Address", "rtps.param.ip_address",16500 FT_IPv4, BASE_NONE, NULL((void*)0), 0,16501 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16502 },16503 16504 { &hf_rtps_param_port,16505 { "Port", "rtps.param.port",16506 FT_UINT32, BASE_HEX, NULL((void*)0), 0,16507 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16508 },16509 16510 { &hf_rtps_expects_inline_qos,16511 { "Inline QoS", "rtps.expects_inline_qos",16512 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0,16513 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16514 },16515 16516 { &hf_rtps_presentation_coherent_access,16517 { "Coherent Access", "rtps.presentation.coherent_access",16518 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0,16519 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16520 },16521 16522 { &hf_rtps_presentation_ordered_access,16523 { "Ordered Access", "rtps.presentation.ordered_access",16524 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0,16525 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16526 },16527 16528 { &hf_rtps_direct_communication,16529 { "Direct Communication", "rtps.direct_communication",16530 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0,16531 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16532 },16533 16534 { &hf_rtps_expects_ack,16535 { "expectsAck", "rtps.expects_ack",16536 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0,16537 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16538 },16539 16540 { &hf_rtps_expects_virtual_heartbeat,16541 { "expectsVirtualHB", "rtps.expects_virtual_heartbeat",16542 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0,16543 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16544 },16545 16546 { &hf_rtps_reliability_kind,16547 { "Kind", "rtps.reliability_kind",16548 FT_UINT32, BASE_HEX, VALS(reliability_qos_vals)((0 ? (const struct _value_string*)0 : ((reliability_qos_vals
))))
, 0,16549 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16550 },16551 16552 { &hf_rtps_durability,16553 { "Durability", "rtps.durability",16554 FT_UINT32, BASE_HEX, VALS(durability_qos_vals)((0 ? (const struct _value_string*)0 : ((durability_qos_vals)
)))
, 0,16555 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16556 },16557 16558 { &hf_rtps_ownership,16559 { "Kind", "rtps.ownership",16560 FT_UINT32, BASE_HEX, VALS(ownership_qos_vals)((0 ? (const struct _value_string*)0 : ((ownership_qos_vals))
))
, 0,16561 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16562 },16563 16564 { &hf_rtps_presentation_access_scope,16565 { "Access Scope", "rtps.presentation.access_scope",16566 FT_UINT32, BASE_HEX, VALS(presentation_qos_vals)((0 ? (const struct _value_string*)0 : ((presentation_qos_vals
))))
, 0,16567 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16568 },16569 16570 { &hf_rtps_destination_order,16571 { "Kind", "rtps.destination_order",16572 FT_UINT32, BASE_HEX, VALS(destination_order_qos_vals)((0 ? (const struct _value_string*)0 : ((destination_order_qos_vals
))))
, 0,16573 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16574 },16575 16576 { &hf_rtps_history_kind,16577 { "Kind", "rtps.history.kind",16578 FT_UINT32, BASE_HEX, VALS(history_qos_vals)((0 ? (const struct _value_string*)0 : ((history_qos_vals)))), 0,16579 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16580 },16581 16582 { &hf_rtps_data_status_info,16583 { "statusInfo", "rtps.data.status_info",16584 FT_UINT32, BASE_HEX, NULL((void*)0), 0,16585 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16586 },16587 16588 { &hf_rtps_param_serialize_encap_kind,16589 { "encapsulation kind", "rtps.param.serialize.encap_kind",16590 FT_UINT16, BASE_HEX, VALS(encapsulation_id_vals)((0 ? (const struct _value_string*)0 : ((encapsulation_id_vals
))))
, 0,16591 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16592 },16593 16594 { &hf_rtps_param_serialize_encap_len,16595 { "encapsulation options", "rtps.param.serialize.encap_len",16596 FT_UINT16, BASE_HEX, NULL((void*)0), 0,16597 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16598 },16599 16600 /* Parameter / NtpTime ------------------------------------------------- */16601 { &hf_rtps_param_timestamp_sec, {16602 "seconds", "rtps.param.ntpTime.sec",16603 FT_INT32, BASE_DEC, NULL((void*)0), 0,16604 "The 'second' component of an RTPS time_t",16605 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16606 },16607 16608 { &hf_rtps_param_timestamp_fraction, {16609 "fraction", "rtps.param.ntpTime.fraction",16610 FT_UINT32, BASE_DEC, NULL((void*)0), 0,16611 "The 'fraction' component of an RTPS time_t",16612 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16613 },16614 16615 { &hf_rtps_param_transport_priority,16616 { "Value", "rtps.param.transport_priority",16617 FT_UINT32, BASE_DEC, NULL((void*)0), 0,16618 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16619 },16620 16621 { &hf_rtps_param_type_max_size_serialized,16622 { "Value", "rtps.param.type_max_size_serialized",16623 FT_UINT32, BASE_DEC, NULL((void*)0), 0,16624 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16625 },16626 16627 { &hf_rtps_param_peer_host_epoch,16628 { "Peer Host Epoch", "rtps.param.peer_host_epoch",16629 FT_UINT32, BASE_DEC, NULL((void*)0), 0,16630 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16631 },16632 16633 { &hf_rtps_param_endpoint_property_change_epoch,16634 { "Endpoint Property Change Epoch", "rtps.param.endpoint_property_change_epoch",16635 FT_INT64, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16636 },16637 16638 { &hf_rtps_param_entity_name,16639 { "entityName", "rtps.param.entityName",16640 FT_STRINGZ, BASE_NONE, NULL((void*)0), 0,16641 "String representing the name of the entity addressed by the submessage",16642 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16643 },16644 16645 { &hf_rtps_param_role_name,16646 { "roleName", "rtps.param.roleName",16647 FT_STRINGZ, BASE_NONE, NULL((void*)0), 0,16648 "String representing the role name of the entity addressed by the submessage",16649 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16650 },16651 16652 { &hf_rtps_disable_positive_ack,16653 { "disablePositiveAcks", "rtps.disable_positive_ack",16654 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0,16655 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16656 },16657 16658 { &hf_rtps_participant_guid_v1,16659 { "Participant GUID", "rtps.param.participant_guid_v1",16660 FT_UINT64, BASE_HEX, NULL((void*)0), 0,16661 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16662 },16663 16664 { &hf_rtps_participant_guid,16665 { "Participant GUID", "rtps.param.participant_guid",16666 FT_BYTES, BASE_NONE, NULL((void*)0), 0,16667 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16668 },16669 16670 { &hf_rtps_group_guid_v1,16671 { "Group GUID", "rtps.param.group_guid_v1",16672 FT_UINT64, BASE_HEX, NULL((void*)0), 0,16673 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16674 },16675 16676 { &hf_rtps_group_guid,16677 { "Group GUID", "rtps.param.group_guid",16678 FT_BYTES, BASE_NONE, NULL((void*)0), 0,16679 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16680 },16681 16682 { &hf_rtps_endpoint_guid,16683 { "Endpoint GUID", "rtps.param.endpoint_guid",16684 FT_BYTES, BASE_NONE, NULL((void*)0), 0,16685 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16686 },16687 16688 { &hf_rtps_param_host_id,16689 { "hostId", "rtps.param.guid.hostId",16690 FT_UINT32, BASE_HEX, NULL((void*)0), 0,16691 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16692 },16693 16694 { &hf_rtps_param_app_id,16695 { "appId", "rtps.param.guid.appId",16696 FT_UINT32, BASE_HEX, NULL((void*)0), 0,16697 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16698 },16699 16700 { &hf_rtps_param_instance_id_v1,16701 { "instanceId", "rtps.param.guid.instanceId",16702 FT_UINT24, BASE_HEX, NULL((void*)0), 0,16703 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16704 },16705 16706 { &hf_rtps_param_instance_id,16707 { "instanceId", "rtps.param.guid.instanceId",16708 FT_UINT32, BASE_HEX, NULL((void*)0), 0,16709 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16710 },16711 16712 { &hf_rtps_param_app_kind,16713 { "instanceId", "rtps.param.guid.appKind",16714 FT_UINT8, BASE_HEX, NULL((void*)0), 0,16715 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16716 },16717 16718 { &hf_rtps_param_entity,16719 { "entityId", "rtps.param.guid.entityId",16720 FT_UINT32, BASE_HEX, VALS(entity_id_vals)((0 ? (const struct _value_string*)0 : ((entity_id_vals)))), 0,16721 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16722 },16723 16724 { &hf_rtps_param_entity_key,16725 { "entityKey", "rtps.param.guid.entityKey",16726 FT_UINT24, BASE_HEX, NULL((void*)0), 0,16727 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16728 },16729 16730 { &hf_rtps_param_entity_kind,16731 { "entityKind", "rtps.param.guid.entityKind",16732 FT_UINT8, BASE_HEX, VALS(entity_kind_vals)((0 ? (const struct _value_string*)0 : ((entity_kind_vals)))), 0,16733 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16734 },16735 16736 { &hf_rtps_param_extended_pid_length,16737 { "Extended Length", "rtps.param.extended_pid_length",16738 FT_UINT32, BASE_HEX, NULL((void*)0), 0,16739 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16740 },16741 16742 { &hf_rtps_param_extended_parameter,16743 { "Extended Parameter", "rtps.param.extended_parameter",16744 FT_UINT32, BASE_HEX, NULL((void*)0), 0,16745 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16746 },16747 16748 { &hf_rtps_data_frag_number,16749 { "fragmentStartingNum", "rtps.data_frag.number",16750 FT_UINT32, BASE_DEC, NULL((void*)0), 0,16751 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16752 },16753 16754 { &hf_rtps_data_frag_sample_size,16755 { "sampleSize", "rtps.data_frag.sample_size",16756 FT_UINT32, BASE_DEC, NULL((void*)0), 0,16757 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16758 },16759 16760 { &hf_rtps_data_frag_num_fragments,16761 { "fragmentsInSubmessage", "rtps.data_frag.num_fragments",16762 FT_UINT16, BASE_DEC, NULL((void*)0), 0,16763 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16764 },16765 16766 { &hf_rtps_data_frag_size,16767 { "fragmentSize", "rtps.data_frag.size",16768 FT_UINT16, BASE_DEC, NULL((void*)0), 0,16769 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16770 },16771 16772 { &hf_rtps_nokey_data_frag_number,16773 { "fragmentStartingNum", "rtps.nokey_data_frag.number",16774 FT_UINT32, BASE_DEC, NULL((void*)0), 0,16775 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16776 },16777 16778 { &hf_rtps_nokey_data_frag_num_fragments,16779 { "fragmentsInSubmessage", "rtps.nokey_data_frag.num_fragments",16780 FT_UINT16, BASE_DEC, NULL((void*)0), 0,16781 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16782 },16783 16784 { &hf_rtps_nokey_data_frag_size,16785 { "fragmentSize", "rtps.nokey_data_frag.size",16786 FT_UINT16, BASE_DEC, NULL((void*)0), 0,16787 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16788 },16789 16790 { &hf_rtps_nack_frag_count,16791 { "Count", "rtps.nack_frag.count",16792 FT_INT32, BASE_DEC, NULL((void*)0), 0,16793 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16794 },16795 16796 { &hf_rtps_heartbeat_frag_number,16797 { "lastFragmentNum", "rtps.heartbeat_frag.number",16798 FT_UINT32, BASE_DEC, NULL((void*)0), 0,16799 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16800 },16801 16802 { &hf_rtps_heartbeat_frag_count,16803 { "Count", "rtps.heartbeat_frag.count",16804 FT_UINT32, BASE_DEC, NULL((void*)0), 0,16805 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16806 },16807 16808 { &hf_rtps_heartbeat_batch_count,16809 { "Count", "rtps.heartbeat_batch.count",16810 FT_UINT32, BASE_DEC, NULL((void*)0), 0,16811 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16812 },16813 16814 { &hf_rtps_virtual_heartbeat_count,16815 { "Count", "rtps.virtual_heartbeat.count",16816 FT_UINT32, BASE_DEC, NULL((void*)0), 0,16817 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16818 },16819 16820 { &hf_rtps_virtual_heartbeat_num_virtual_guids,16821 { "numVirtualGUIDs", "rtps.virtual_heartbeat.num_virtual_guids",16822 FT_UINT32, BASE_DEC, NULL((void*)0), 0,16823 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16824 },16825 16826 { &hf_rtps_virtual_heartbeat_num_writers,16827 { "numWriters", "rtps.virtual_heartbeat.num_writers",16828 FT_UINT32, BASE_DEC, NULL((void*)0), 0,16829 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16830 },16831 16832 { &hf_rtps_data_serialize_data, {16833 "serializedData", "rtps.data.serialize_data",16834 FT_BYTES, BASE_NONE, NULL((void*)0), 0,16835 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16836 },16837 16838 { &hf_rtps_parameter_data, {16839 "parameterData", "rtps.parameter_data",16840 FT_BYTES, BASE_NONE, NULL((void*)0), 0,16841 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16842 },16843 16844 { &hf_rtps_data_batch_timestamp,16845 { "Timestamp", "rtps.data_batch.timestamp",16846 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL((void*)0), 0,16847 "Time using the RTPS time_t standard format", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16848 },16849 16850 { &hf_rtps_data_batch_offset_to_last_sample_sn,16851 { "offsetToLastSampleSN", "rtps.data_batch.offset_to_last_sample_sn",16852 FT_UINT32, BASE_DEC, NULL((void*)0), 0,16853 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16854 },16855 16856 { &hf_rtps_data_batch_sample_count,16857 { "batchSampleCount", "rtps.data_batch.sample_count",16858 FT_UINT32, BASE_DEC, NULL((void*)0), 0,16859 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16860 },16861 16862 { &hf_rtps_data_batch_offset_sn,16863 { "offsetSN", "rtps.data_batch.offset_sn",16864 FT_UINT32, BASE_DEC, NULL((void*)0), 0,16865 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16866 },16867 16868 { &hf_rtps_data_batch_octets_to_sl_encap_id,16869 { "octetsToSLEncapsulationId", "rtps.data_batch.octets_to_sl_encap_id",16870 FT_UINT32, BASE_DEC, NULL((void*)0), 0,16871 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16872 },16873 16874 { &hf_rtps_data_batch_serialized_data_length,16875 { "serializedDataLength", "rtps.data_batch.serialized_data_length",16876 FT_UINT32, BASE_DEC, NULL((void*)0), 0,16877 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16878 },16879 16880 { &hf_rtps_data_batch_octets_to_inline_qos,16881 { "octetsToInlineQos", "rtps.data_batch.octets_to_inline_qos",16882 FT_UINT16, BASE_DEC, NULL((void*)0), 0,16883 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16884 },16885 16886 { &hf_rtps_fragment_number_base64,16887 { "bitmapBase", "rtps.fragment_number.base64",16888 FT_UINT64, BASE_DEC, NULL((void*)0), 0,16889 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16890 },16891 16892 { &hf_rtps_fragment_number_base,16893 { "bitmapBase", "rtps.fragment_number.base32",16894 FT_UINT32, BASE_DEC, NULL((void*)0), 0,16895 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16896 },16897 16898 { &hf_rtps_fragment_number_num_bits,16899 { "numBits", "rtps.fragment_number.num_bits",16900 FT_UINT32, BASE_DEC, NULL((void*)0), 0,16901 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16902 },16903 16904 { &hf_rtps_bitmap_num_bits,16905 { "numBits", "rtps.bitmap.num_bits",16906 FT_UINT32, BASE_DEC, NULL((void*)0), 0,16907 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16908 },16909 16910 { &hf_rtps_acknack_analysis,16911 { "Acknack Analysis", "rtps.sm.acknack_analysis",16912 FT_UINT32, BASE_DEC, NULL((void*)0), 0,16913 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16914 },16915 16916 { &hf_rtps_param_partition_num,16917 { "Number of partition names", "rtps.param.partition_num",16918 FT_INT32, BASE_DEC, NULL((void*)0), 0,16919 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16920 },16921 16922 { &hf_rtps_param_expression_parameters_num,16923 { "Number of expression params", "rtps.param.expression_parameters_num",16924 FT_INT32, BASE_DEC, NULL((void*)0), 0,16925 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16926 },16927 16928 { &hf_rtps_param_partition,16929 { "name", "rtps.param.partition",16930 FT_STRING, BASE_NONE, NULL((void*)0), 0,16931 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16932 },16933 16934 { &hf_rtps_param_filter_expression,16935 { "filterExpression", "rtps.param.filter_expression",16936 FT_STRING, BASE_NONE, NULL((void*)0), 0,16937 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16938 },16939 16940 { &hf_rtps_param_expression_parameters,16941 { "expressionParameters", "rtps.param.expression_parameters",16942 FT_STRING, BASE_NONE, NULL((void*)0), 0,16943 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16944 },16945 16946 { &hf_rtps_locator_filter_list_num_channels,16947 { "numberOfChannels", "rtps.param.locator_filter_list.num_channels",16948 FT_INT32, BASE_DEC, NULL((void*)0), 0,16949 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16950 },16951 16952 { &hf_rtps_locator_filter_list_filter_name,16953 { "filterName", "rtps.param.locator_filter_list.filter_name",16954 FT_STRING, BASE_NONE, NULL((void*)0), 0,16955 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16956 },16957 16958 { &hf_rtps_locator_filter_list_filter_exp,16959 { "filterExpression", "rtps.param.locator_filter_list.filter_exp",16960 FT_STRING, BASE_NONE, NULL((void*)0), 0,16961 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16962 },16963 16964 { &hf_rtps_extra_flags,16965 { "Extra flags", "rtps.extra_flags",16966 FT_UINT16, BASE_HEX, NULL((void*)0), 0xFFFF,16967 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16968 },16969 16970 { &hf_rtps_param_builtin_endpoint_set_flags,16971 { "Flags", "rtps.param.builtin_endpoint_set",16972 FT_UINT32, BASE_HEX, NULL((void*)0), 0,16973 "bitmask representing the flags in PID_BUILTIN_ENDPOINT_SET",16974 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16975 },16976 16977 { &hf_rtps_param_vendor_builtin_endpoint_set_flags,16978 { "Flags", "rtps.param.vendor_builtin_endpoint_set",16979 FT_UINT32, BASE_HEX, NULL((void*)0), 0,16980 "bitmask representing the flags in PID_VENDOR_BUILTIN_ENDPOINT_SET",16981 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16982 },16983 16984 { &hf_rtps_param_endpoint_security_attributes,16985 { "Flags", "rtps.param.endpoint_security_attributes",16986 FT_UINT32, BASE_HEX, NULL((void*)0), 0,16987 "bitmask representing the flags in PID_ENDPOINT_SECURITY_ATTRIBUTES",16988 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16989 },16990 16991 { &hf_rtps_param_plugin_promiscuity_kind, {16992 "promiscuityKind", "rtps.param.plugin_promiscuity_kind",16993 FT_UINT32, BASE_HEX, VALS(plugin_promiscuity_kind_vals)((0 ? (const struct _value_string*)0 : ((plugin_promiscuity_kind_vals
))))
, 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16994 },16995 16996 { &hf_rtps_param_service_kind, {16997 "serviceKind", "rtps.param.service_kind",16998 FT_UINT32, BASE_HEX, VALS(service_kind_vals)((0 ? (const struct _value_string*)0 : ((service_kind_vals)))
)
, 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }16999 },17000 17001 { &hf_rtps_param_data_representation,{17002 "Data Representation Kind", "rtps.param.data_representation",17003 FT_UINT16, BASE_DEC, VALS(data_representation_kind_vals)((0 ? (const struct _value_string*)0 : ((data_representation_kind_vals
))))
, 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17004 },17005 17006 { &hf_rtps_param_type_consistency_kind, {17007 "Type Consistency Kind", "rtps.param.type_consistency_kind",17008 FT_UINT16, BASE_HEX, VALS(type_consistency_kind_vals)((0 ? (const struct _value_string*)0 : ((type_consistency_kind_vals
))))
, 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17009 },17010 17011 { &hf_rtps_param_ignore_sequence_bounds, {17012 "Ignore Sequence Bounds", "rtps.param.ignore_sequence_bounds",17013 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17014 },17015 17016 { &hf_rtps_param_ignore_string_bounds, {17017 "Ignore String Bounds", "rtps.param.ignore_string_bounds",17018 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17019 },17020 17021 { &hf_rtps_param_ignore_member_names, {17022 "Ignore Member Names", "rtps.param.ignore_member_names",17023 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17024 },17025 17026 { &hf_rtps_param_prevent_type_widening, {17027 "Prevent Type Widening", "rtps.param.prevent_type_widening",17028 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17029 },17030 17031 { &hf_rtps_param_force_type_validation, {17032 "Force Type Validation", "rtps.param.force_type_validation",17033 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17034 },17035 17036 { &hf_rtps_param_ignore_enum_literal_names, {17037 "Ignore Enum Literal Names", "rtps.param.ignore_enum_literal_names",17038 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17039 },17040 17041 { &hf_rtps_param_acknowledgment_kind, {17042 "Acknowledgment Kind", "rtps.param.acknowledgment_kind",17043 FT_UINT32, BASE_HEX, VALS(acknowledgement_kind_vals)((0 ? (const struct _value_string*)0 : ((acknowledgement_kind_vals
))))
, 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17044 },17045 17046 /* Finally the raw issue data ------------------------------------------ */17047 { &hf_rtps_issue_data, {17048 "serializedData", "rtps.issueData",17049 FT_BYTES, BASE_NONE, NULL((void*)0), 0, "The user data transferred in a ISSUE submessage", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17050 },17051 17052 { &hf_rtps_param_product_version_major, {17053 "Major", "rtps.param.product_version.major",17054 FT_UINT8, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17055 },17056 17057 { &hf_rtps_param_product_version_minor, {17058 "Minor", "rtps.param.product_version.minor",17059 FT_UINT8, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17060 },17061 17062 { &hf_rtps_param_product_version_release, {17063 "Release", "rtps.param.product_version.release",17064 FT_UINT8, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17065 },17066 17067 { &hf_rtps_param_product_version_release_as_char, {17068 "Release", "rtps.param.product_version.release_string",17069 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17070 },17071 17072 { &hf_rtps_param_product_version_revision, {17073 "Revision", "rtps.param.product_version.revision",17074 FT_UINT8, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17075 },17076 17077 { &hf_rtps_encapsulation_id, {17078 "encapsulation id", "rtps.encapsulation_id",17079 FT_UINT16, BASE_HEX, VALS(encapsulation_id_vals)((0 ? (const struct _value_string*)0 : ((encapsulation_id_vals
))))
, 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17080 },17081 17082 { &hf_rtps_encapsulation_kind, {17083 "kind", "rtps.encapsulation_kind",17084 FT_UINT32, BASE_HEX, VALS(participant_message_data_kind)((0 ? (const struct _value_string*)0 : ((participant_message_data_kind
))))
, 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17085 },17086 17087 { &hf_rtps_octets_to_inline_qos, {17088 "Octets to inline QoS", "rtps.octets_to_inline_qos",17089 FT_UINT16, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17090 },17091 17092 { &hf_rtps_filter_signature, {17093 "filterSignature", "rtps.filter_signature",17094 FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17095 },17096 17097 { &hf_rtps_bitmap, {17098 "bitmap", "rtps.bitmap",17099 FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17100 },17101 17102 { &hf_rtps_property_name, {17103 "Property Name", "rtps.property_name",17104 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17105 },17106 17107 { &hf_rtps_property_value, {17108 "Value", "rtps.property_value",17109 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17110 },17111 17112 { &hf_rtps_union, {17113 "union", "rtps.union",17114 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17115 },17116 17117 { &hf_rtps_union_case, {17118 "case", "rtps.union_case",17119 FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17120 },17121 17122 { &hf_rtps_struct, {17123 "struct", "rtps.struct",17124 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17125 },17126 17127 { &hf_rtps_member_name, {17128 "member_name", "rtps.member_name",17129 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17130 },17131 17132 { &hf_rtps_sequence, {17133 "sequence", "rtps.sequence",17134 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17135 },17136 17137 { &hf_rtps_array, {17138 "array", "rtps.array",17139 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17140 },17141 17142 { &hf_rtps_bitfield, {17143 "bitfield", "rtps.bitfield",17144 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17145 },17146 17147 { &hf_rtps_datatype, {17148 "datatype", "rtps.datatype",17149 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17150 },17151 17152 { &hf_rtps_sequence_size, {17153 "sequenceSize", "rtps.sequence_size",17154 FT_UINT32, BASE_DEC|BASE_UNIT_STRING0x00001000, &units_octet_octets, 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17155 },17156 17157 { &hf_rtps_guid, {17158 "guid", "rtps.guid",17159 FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17160 },17161 17162 { &hf_rtps_heartbeat_count, {17163 "count", "rtps.heartbeat_count",17164 FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17165 },17166 17167 { &hf_rtps_encapsulation_options, {17168 "Encapsulation options", "rtps.encapsulation_options",17169 FT_UINT16, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17170 },17171 17172 { &hf_rtps_serialized_key, {17173 "serializedKey", "rtps.serialized_key",17174 FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17175 },17176 17177 { &hf_rtps_serialized_data, {17178 "serializedData", "rtps.serialized_data",17179 FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17180 },17181 17182 { &hf_rtps_sm_rti_crc_number, {17183 "RTPS Message Length", "rtps.sm.rti_crc.message_length",17184 FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17185 },17186 17187 { &hf_rtps_sm_rti_crc_result, {17188 "CRC", "rtps.sm.rti_crc",17189 FT_UINT32, BASE_HEX, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17190 },17191 { &hf_rtps_message_length, {17192 "RTPS Message Length", "rtps.message_length",17193 FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17194 },17195 17196 /* Flag bits */17197 { &hf_rtps_flag_reserved80, {17198 "Reserved", "rtps.flag.reserved",17199 FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x80, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17200 },17201 { &hf_rtps_flag_reserved40, {17202 "Reserved", "rtps.flag.reserved",17203 FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x40, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17204 },17205 { &hf_rtps_flag_reserved20, {17206 "Reserved", "rtps.flag.reserved",17207 FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x20, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17208 },17209 { &hf_rtps_flag_reserved10, {17210 "Reserved", "rtps.flag.reserved",17211 FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x10, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17212 },17213 { &hf_rtps_flag_reserved08, {17214 "Reserved", "rtps.flag.reserved",17215 FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x08, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17216 },17217 { &hf_rtps_flag_reserved04, {17218 "Reserved", "rtps.flag.reserved",17219 FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x04, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17220 },17221 { &hf_rtps_flag_reserved02, {17222 "Reserved", "rtps.flag.reserved",17223 FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x02, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17224 },17225 { &hf_rtps_flag_reserved8000, {17226 "Reserved", "rtps.flag.reserved",17227 FT_BOOLEAN, 16, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x8000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17228 },17229 { &hf_rtps_flag_reserved4000, {17230 "Reserved", "rtps.flag.reserved",17231 FT_BOOLEAN, 16, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x4000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17232 },17233 { &hf_rtps_flag_reserved2000, {17234 "Reserved", "rtps.flag.reserved",17235 FT_BOOLEAN, 16, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x2000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17236 },17237 { &hf_rtps_flag_reserved1000, {17238 "Reserved", "rtps.flag.reserved",17239 FT_BOOLEAN, 16, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x1000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17240 },17241 { &hf_rtps_flag_reserved0800, {17242 "Reserved", "rtps.flag.reserved",17243 FT_BOOLEAN, 16, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x0800, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17244 },17245 { &hf_rtps_flag_reserved0400, {17246 "Reserved", "rtps.flag.reserved",17247 FT_BOOLEAN, 16, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x0400, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17248 },17249 { &hf_rtps_flag_reserved0200, {17250 "Reserved", "rtps.flag.reserved",17251 FT_BOOLEAN, 16, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x0200, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17252 },17253 { &hf_rtps_flag_reserved0100, {17254 "Reserved", "rtps.flag.reserved",17255 FT_BOOLEAN, 16, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x0100, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17256 },17257 { &hf_rtps_flag_reserved0080, {17258 "Reserved", "rtps.flag.reserved",17259 FT_BOOLEAN, 16, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x0080, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17260 },17261 { &hf_rtps_flag_reserved0040, {17262 "Reserved", "rtps.flag.reserved",17263 FT_BOOLEAN, 16, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x0040, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17264 },17265 { &hf_rtps_flag_builtin_endpoint_set_reserved, {17266 "Reserved", "rtps.flag.reserved",17267 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x0000F000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17268 },17269 { &hf_rtps_flag_unregister, {17270 "Unregister flag", "rtps.flag.unregister",17271 FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x20, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17272 },17273 { &hf_rtps_flag_inline_qos_v1, {17274 "Inline QoS", "rtps.flag.inline_qos",17275 FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x10, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17276 },17277 { &hf_rtps_flag_hash_key, {17278 "Hash key flag", "rtps.flag.hash_key",17279 FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x08, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17280 },17281 { &hf_rtps_flag_hash_key_rti, {17282 "Hash key flag", "rtps.flag.hash_key",17283 FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x04, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17284 },17285 { &hf_rtps_flag_alive, {17286 "Alive flag", "rtps.flag.alive",17287 FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x04, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17288 },17289 { &hf_rtps_flag_data_present_v1, {17290 "Data present", "rtps.flag.data_present",17291 FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x02, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17292 },17293 { &hf_rtps_flag_multisubmessage, {17294 "Multi-submessage", "rtps.flag.multisubmessage",17295 FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x02, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17296 },17297 { &hf_rtps_flag_endianness, {17298 "Endianness", "rtps.flag.endianness",17299 FT_BOOLEAN, 8, TFS(&tfs_little_big_endianness)((0 ? (const struct true_false_string*)0 : ((&tfs_little_big_endianness
))))
, 0x01, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17300 },17301 { &hf_rtps_flag_additional_authenticated_data, {17302 "Additional Authenticated Data", "rtps.flag.additional_authenticated_data",17303 FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x02, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17304 },17305 { &hf_rtps_flag_protected_with_psk, {17306 "Message protected with PSK", "rtps.flag.message_protected_with_psk",17307 FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x04, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17308 },17309 { &hf_rtps_flag_vendor_specific_content, {17310 "Vendor-Specific Content", "rtps.flag.vendor_specific_content",17311 FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x80, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17312 },17313 { &hf_rtps_flag_inline_qos_v2, {17314 "Inline QoS", "rtps.flag.inline_qos",17315 FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x02, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17316 },17317 { &hf_rtps_flag_data_present_v2, {17318 "Data present", "rtps.flag.data_present",17319 FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x04, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17320 },17321 { &hf_rtps_flag_status_info, {17322 "Status info flag", "rtps.flag.status_info",17323 FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x10, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17324 },17325 { &hf_rtps_flag_final, {17326 "Final flag", "rtps.flag.final",17327 FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x02, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17328 },17329 { &hf_rtps_flag_liveliness, {17330 "Liveliness flag", "rtps.flag.liveliness",17331 FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x04, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17332 },17333 { &hf_rtps_flag_multicast, {17334 "Multicast flag", "rtps.flag.multicast",17335 FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x02, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17336 },17337 { &hf_rtps_flag_data_serialized_key, {17338 "Serialized Key", "rtps.flag.data.serialized_key",17339 FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x08, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17340 },17341 { &hf_rtps_flag_data_frag_serialized_key, {17342 "Serialized Key", "rtps.flag.data_frag.serialized_key",17343 FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x04, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17344 },17345 { &hf_rtps_flag_timestamp, {17346 "Timestamp flag", "rtps.flag.timestamp",17347 FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x02, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17348 },17349 { &hf_rtps_flag_no_virtual_guids, {17350 "No virtual GUIDs flag", "rtps.flag.no_virtual_guids",17351 FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x08, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17352 },17353 { &hf_rtps_flag_multiple_writers, {17354 "Multiple writers flag", "rtps.flag.multiple_writers",17355 FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x04, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17356 },17357 { &hf_rtps_flag_multiple_virtual_guids, {17358 "Multiple virtual GUIDs flag", "rtps.flag.multiple_virtual_guids",17359 FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x02, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17360 },17361 { &hf_rtps_flag_serialize_key16, {17362 "Serialized Key", "rtps.flag.serialize_key",17363 FT_BOOLEAN, 16, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x0020, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17364 },17365 { &hf_rtps_flag_invalid_sample, {17366 "Invalid sample", "rtps.flag.invalid_sample",17367 FT_BOOLEAN, 16, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x0010, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17368 },17369 { &hf_rtps_flag_data_present16, {17370 "Data present", "rtps.flag.data_present",17371 FT_BOOLEAN, 16, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x0008, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17372 },17373 { &hf_rtps_flag_offsetsn_present, {17374 "OffsetSN present", "rtps.flag.offsetsn_present",17375 FT_BOOLEAN, 16, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x0004, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17376 },17377 { &hf_rtps_flag_inline_qos16_v2, {17378 "Inline QoS", "rtps.flag.inline_qos",17379 FT_BOOLEAN, 16, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x0002, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17380 },17381 { &hf_rtps_flag_timestamp_present, {17382 "Timestamp present", "rtps.flag.timestamp_present",17383 FT_BOOLEAN, 16, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x0001, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17384 },17385 { &hf_rtps_param_status_info_flags,17386 { "Flags", "rtps.param.status_info",17387 FT_UINT32, BASE_HEX, NULL((void*)0), 0, "bitmask representing the flags in PID_STATUS_INFO", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17388 },17389 { &hf_rtps_header_extension_flags,17390 { "Flags", "rtps.header_extension_flags",17391 FT_UINT8, BASE_HEX, NULL((void*)0), 0, "bitmask representing header extension flags", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17392 },17393 { &hf_rtps_flag_header_extension_parameters, {17394 "Header Extension Parameter List Present", "rtps.flag.header_extension.parameter_list",17395 FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, RTPS_HE_PARAMETERS_FLAG(0x80), NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17396 },17397 { &hf_rtps_flag_header_extension_checksum2, {17398 "Header Extension Message Checksum 2", "rtps.flag.header_extension.message_checksum2",17399 FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, RTPS_HE_CHECKSUM_2_FLAG(0x20), NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17400 },17401 { &hf_rtps_flag_header_extension_checksum1, {17402 "Header Extension Message Checksum 1", "rtps.flag.header_extension.message_checksum1",17403 FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, RTPS_HE_CHECKSUM_1_FLAG(0x40), NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17404 },17405 { &hf_rtps_flag_header_extension_wextension, {17406 "Header Extension W Extension Present", "rtps.flag.header_extension.wextension",17407 FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, RTPS_HE_WEXTENSION_FLAG(0x10), NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17408 },17409 { &hf_rtps_flag_header_extension_uextension, {17410 "Header Extension U Extension Present", "rtps.flag.header_extension.uextension",17411 FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, RTPS_HE_UEXTENSION_FLAG(0x08), NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17412 },17413 { &hf_rtps_flag_header_extension_timestamp, {17414 "Header Extension Timestamp Present", "rtps.flag.header_extension.timestamp",17415 FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, RTPS_HE_TIMESTAMP_FLAG(0x04), NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17416 },17417 { &hf_rtps_flag_header_extension_message_length, {17418 "Header Extension Message Length", "rtps.flag.header_extension.message_length",17419 FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, RTPS_HE_MESSAGE_LENGTH_FLAG(0x02), NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17420 },17421 { &hf_rtps_header_extension_checksum_crc32c, {17422 "Header Extension Checksum CRC-32C", "rtps.header_extension.checksum_crc32c",17423 FT_UINT32, BASE_HEX, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17424 },17425 { &hf_rtps_header_extension_checksum_crc64, {17426 "Header Extension Checksum CRC64", "rtps.header_extension.checksum_crc64",17427 FT_UINT64, BASE_HEX, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17428 },17429 { &hf_rtps_header_extension_checksum_md5, {17430 "Header Extension Checksum MD5", "rtps.header_extension.checksum_md5",17431 FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17432 },17433 { &hf_rtps_uextension, {17434 "Header Extension uExtension", "rtps.uextension",17435 FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17436 },17437 { &hf_rtps_wextension, {17438 "Header Extension wExtension", "rtps.wextension",17439 FT_UINT64, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17440 },17441 { &hf_rtps_flag_unregistered, {17442 "Unregistered", "rtps.flag.unregistered",17443 FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x02, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17444 },17445 { &hf_rtps_flag_disposed, {17446 "Disposed", "rtps.flag.undisposed",17447 FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x01, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17448 },17449 { &hf_rtps_flag_participant_announcer, {17450 "Participant Announcer", "rtps.flag.participant_announcer",17451 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00000001, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17452 },17453 { &hf_rtps_flag_participant_detector, {17454 "Participant Detector", "rtps.flag.participant_detector",17455 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00000002, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17456 },17457 { &hf_rtps_flag_publication_announcer, {17458 "Publication Announcer", "rtps.flag.publication_announcer",17459 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00000004, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17460 },17461 { &hf_rtps_flag_publication_detector, {17462 "Publication Detector", "rtps.flag.publication_detector",17463 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00000008, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17464 },17465 { &hf_rtps_flag_subscription_announcer, {17466 "Subscription Announcer", "rtps.flag.subscription_announcer",17467 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00000010, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17468 },17469 { &hf_rtps_flag_subscription_detector, {17470 "Subscription Detector", "rtps.flag.subscription_detector",17471 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00000020, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17472 },17473 { &hf_rtps_flag_participant_proxy_announcer, {17474 "Participant Proxy Announcer", "rtps.flag.participant_proxy_announcer",17475 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00000040, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17476 },17477 { &hf_rtps_flag_participant_proxy_detector, {17478 "Participant Proxy Detector", "rtps.flag.participant_proxy_detector",17479 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00000080, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17480 },17481 { &hf_rtps_flag_participant_state_announcer, {17482 "Participant State Announcer", "rtps.flag.participant_state_announcer",17483 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00000100, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17484 },17485 { &hf_rtps_flag_participant_state_detector, {17486 "Participant State Detector", "rtps.flag.participant_state_detector",17487 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00000200, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17488 },17489 { &hf_rtps_flag_participant_message_datawriter, {17490 "Participant Message DataWriter", "rtps.flag.participant_message_datawriter",17491 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00000400, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17492 },17493 { &hf_rtps_flag_participant_message_datareader, {17494 "Participant Message DataReader", "rtps.flag.participant_message_datareader",17495 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00000800, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17496 },17497 { &hf_rtps_flag_secure_publication_writer, {17498 "Secure Publication Writer", "rtps.flag.secure_publication_writer",17499 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00010000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17500 },17501 { &hf_rtps_flag_secure_publication_reader, {17502 "Secure Publication Reader", "rtps.flag.secure_publication_reader",17503 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00020000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17504 },17505 { &hf_rtps_flag_secure_subscription_writer, {17506 "Secure Subscription Writer", "rtps.flag.secure_subscription_writer",17507 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00040000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17508 },17509 { &hf_rtps_flag_secure_subscription_reader, {17510 "Secure Subscription Reader", "rtps.flag.secure_subscription_reader",17511 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00080000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17512 },17513 { &hf_rtps_flag_secure_participant_message_writer, {17514 "Secure Participant Message Writer", "rtps.flag.secure_participant_message_writer",17515 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00100000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17516 },17517 { &hf_rtps_flag_secure_participant_message_reader, {17518 "Secure Participant Message Reader", "rtps.flag.secure_participant_message_reader",17519 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00200000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17520 },17521 { &hf_rtps_flag_participant_stateless_message_writer, {17522 "Participant Stateless Message Writer", "rtps.flag.participant_stateless_message_writer",17523 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00400000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17524 },17525 { &hf_rtps_flag_participant_stateless_message_reader, {17526 "Participant Stateless Message Reader", "rtps.flag.participant_stateless_message_reader",17527 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00800000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17528 },17529 { &hf_rtps_flag_secure_participant_volatile_message_writer,{17530 "Secure Participant Volatile Message Writer", "rtps.flag.secure_participant_volatile_message_writer",17531 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x01000000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17532 },17533 { &hf_rtps_flag_secure_participant_volatile_message_reader,{17534 "Secure Participant Volatile Message Reader", "rtps.flag.secure_participant_volatile_message_reader",17535 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x02000000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17536 },17537 { &hf_rtps_flag_participant_secure_writer,{17538 "Participant Secure Writer", "rtps.flag.participant_secure_writer",17539 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x04000000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17540 },17541 { &hf_rtps_flag_participant_secure_reader,{17542 "Participant Secure Reader", "rtps.flag.participant_secure_reader",17543 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x08000000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17544 },17545 { &hf_rtps_type_object_type_id_disc,17546 { "TypeId (_d)", "rtps.type_object.type_id.discr",17547 FT_INT16, BASE_DEC, 0x0, 0,17548 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17549 },17550 { &hf_rtps_type_object_primitive_type_id,17551 { "Type Id", "rtps.type_object.primitive_type_id",17552 FT_UINT16, BASE_HEX, VALS(type_object_kind)((0 ? (const struct _value_string*)0 : ((type_object_kind)))), 0,17553 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17554 },17555 { &hf_rtps_type_object_base_primitive_type_id,17556 { "Base Id", "rtps.type_object.base_primitive_type_id",17557 FT_UINT16, BASE_HEX, VALS(type_object_kind)((0 ? (const struct _value_string*)0 : ((type_object_kind)))), 0,17558 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17559 },17560 { &hf_rtps_type_object_type_id,17561 { "Type Id", "rtps.type_object.type_id",17562 FT_UINT64, BASE_HEX, 0x0, 0,17563 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17564 },17565 { &hf_rtps_type_object_base_type,17566 { "Base Type Id", "rtps.type_object.base_type_id",17567 FT_UINT64, BASE_HEX, 0x0, 0,17568 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17569 },17570 { &hf_rtps_type_object_element_raw, {17571 "Type Element Content", "rtps.type_object.element",17572 FT_BYTES, BASE_NONE, NULL((void*)0), 0,17573 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17574 },17575 { &hf_rtps_type_object_type_property_name,17576 { "Name", "rtps.type_object.property.name",17577 FT_STRING, BASE_NONE, 0x0, 0,17578 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17579 },17580 { &hf_rtps_type_object_member_id,17581 { "Member Id", "rtps.type_object.annotation.member_id",17582 FT_UINT32, BASE_DEC, 0x0, 0,17583 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17584 },17585 { &hf_rtps_type_object_name,17586 { "Name", "rtps.type_object.member.name",17587 FT_STRING, BASE_NONE, 0x0, 0,17588 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17589 },17590 { &hf_rtps_type_object_annotation_value_d,17591 { "Annotation Member (_d)", "rtps.type_object.annotation.value_d",17592 FT_UINT16, BASE_DEC, 0x0, 0,17593 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17594 },17595 { &hf_rtps_type_object_annotation_value_16,17596 { "16 bits type", "rtps.type_object.annotation.value",17597 FT_UINT16, BASE_DEC, 0x0, 0,17598 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17599 },17600 { &hf_rtps_type_object_union_label,17601 { "Label", "rtps.type_object.union.label",17602 FT_UINT32, BASE_DEC, 0x0, 0,17603 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17604 },17605 { &hf_rtps_type_object_bound,17606 { "Bound", "rtps.type_object.bound",17607 FT_UINT32, BASE_DEC, 0x0, 0,17608 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17609 },17610 { &hf_rtps_type_object_enum_constant_name,17611 { "Enum name", "rtps.type_object.enum.name",17612 FT_STRING, BASE_NONE, 0x0, 0,17613 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17614 },17615 { &hf_rtps_type_object_enum_constant_value,17616 { "Enum value", "rtps.type_object.enum.value",17617 FT_INT32, BASE_DEC, 0x0, 0,17618 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17619 },17620 { &hf_rtps_type_object_element_shared,17621 { "Element shared", "rtps.type_object.shared",17622 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0,17623 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17624 },17625 { &hf_rtps_flag_typeflag_final, {17626 "FINAL", "rtps.flag.typeflags.final",17627 FT_BOOLEAN, 16, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x0001, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17628 },17629 { &hf_rtps_flag_typeflag_mutable, {17630 "MUTABLE", "rtps.flag.typeflags.mutable",17631 FT_BOOLEAN, 16, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x0002, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17632 },17633 { &hf_rtps_flag_typeflag_nested, {17634 "NESTED", "rtps.flag.typeflags.nested",17635 FT_BOOLEAN, 16, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x0004, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17636 },17637 { &hf_rtps_type_object_flags, {17638 "Flags", "rtps.flag.typeflags",17639 FT_UINT16, BASE_HEX, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17640 },17641 { &hf_rtps_flag_memberflag_key, {17642 "Key", "rtps.flag.typeflags.key",17643 FT_BOOLEAN, 16, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x0001, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17644 },17645 { &hf_rtps_flag_memberflag_optional, {17646 "Optional", "rtps.flag.typeflags.optional",17647 FT_BOOLEAN, 16, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x0002, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17648 },17649 { &hf_rtps_flag_memberflag_shareable, {17650 "Shareable", "rtps.flag.typeflags.shareable",17651 FT_BOOLEAN, 16, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x0004, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17652 },17653 { &hf_rtps_flag_memberflag_union_default, {17654 "Union default", "rtps.flag.typeflags.union_default",17655 FT_BOOLEAN, 16, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x0008, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17656 },17657 { &hf_rtps_type_object_element_module_name,17658 { "Module name", "rtps.type_object.module_name",17659 FT_STRINGZ, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17660 },17661 { &hf_rtps_flag_service_request_writer, {17662 "Service Request Writer", "rtps.flag.service_request_writer",17663 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00000001, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17664 },17665 { &hf_rtps_flag_service_request_reader, {17666 "Service Request Reader", "rtps.flag.service_request_reader",17667 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00000002, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17668 },17669 { &hf_rtps_flag_locator_ping_writer, {17670 "Locator Ping Writer", "rtps.flag.locator_ping_writer",17671 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00000004, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17672 },17673 { &hf_rtps_flag_locator_ping_reader, {17674 "Locator Ping Reader", "rtps.flag.locator_ping_reader",17675 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00000008, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17676 },17677 { &hf_rtps_flag_secure_service_request_writer, {17678 "Secure Service Request Writer", "rtps.flag.secure_service_request_writer",17679 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00000010, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17680 },17681 { &hf_rtps_flag_secure_service_request_reader, {17682 "Secure Service Request Reader", "rtps.flag.secure_service_request_reader",17683 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00000020, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17684 },17685 { &hf_rtps_flag_security_access_protected, {17686 "Access Protected", "rtps.flag.security.access_protected",17687 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00000001, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17688 },17689 { &hf_rtps_flag_security_discovery_protected, {17690 "Discovery Protected", "rtps.flag.security.discovery_protected",17691 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00000002, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17692 },17693 { &hf_rtps_flag_security_submessage_protected, {17694 "Submessage Protected", "rtps.flag.security.submessage_protected",17695 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00000004, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17696 },17697 { &hf_rtps_flag_security_payload_protected, {17698 "Payload Protected", "rtps.flag.security.payload_protected",17699 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00000008, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17700 },17701 { &hf_rtps_flag_endpoint_security_attribute_flag_is_read_protected,{17702 "Read Protected", "rtps.flag.security.info.read_protected",17703 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00000001, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17704 },17705 { &hf_rtps_flag_endpoint_security_attribute_flag_is_write_protected,{17706 "Write Protected", "rtps.flag.security.info.write_protected",17707 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00000002, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17708 },17709 { &hf_rtps_flag_endpoint_security_attribute_flag_is_discovery_protected,{17710 "Discovery Protected", "rtps.flag.security.info.discovery_protected",17711 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00000004, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17712 },17713 { &hf_rtps_flag_endpoint_security_attribute_flag_is_submessage_protected,{17714 "Submessage Protected", "rtps.flag.security.info.submessage_protected",17715 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00000008, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17716 },17717 { &hf_rtps_flag_endpoint_security_attribute_flag_is_payload_protected,{17718 "Payload Protected", "rtps.flag.security.info.payload_protected",17719 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00000010, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17720 },17721 { &hf_rtps_flag_endpoint_security_attribute_flag_is_key_protected,{17722 "Key Protected", "rtps.flag.security.info.key_protected",17723 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00000020, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17724 },17725 { &hf_rtps_flag_endpoint_security_attribute_flag_is_liveliness_protected,{17726 "Liveliness Protected", "rtps.flag.security.info.liveliness_protected",17727 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00000040, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17728 },17729 { &hf_rtps_flag_endpoint_security_attribute_flag_is_valid,{17730 "Mask Valid", "rtps.flag.security.info.valid",17731 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x80000000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17732 },17733 { &hf_rtps_param_endpoint_security_attributes_mask,{17734 "EndpointSecurityAttributesMask", "rtps.param.endpoint_security_attributes",17735 FT_UINT32, BASE_HEX, NULL((void*)0), 0,17736 "Bitmask representing the EndpointSecurityAttributes flags in PID_ENDPOINT_SECURITY_INFO",17737 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17738 },17739 { &hf_rtps_param_participant_security_symmetric_cipher_algorithms_builtin_endpoints_required_mask, {17740 "Builtin Endpoints Required Mask", "rtps.param.participant_security_symmetric_cipher_algorithms.builtin_endpoints_used_bit",17741 FT_UINT32, BASE_HEX, NULL((void*)0), 0,17742 "Bitmask representing the Symmetric Cipher algorithm the builtin endpoints use",17743 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17744 },17745 { &hf_rtps_param_participant_security_symmetric_cipher_algorithms_builtin_endpoints_key_exchange_used_bit, {17746 "Key Exchange Builtin Endpoints Required Mask", "rtps.param.participant_security_symmetric_cipher_algorithms.builtin_endpoints_key_exchange_required_mask",17747 FT_UINT32, BASE_HEX, NULL((void*)0), 0,17748 "Bitmask representing the Symmetric Cipher algorithm the key exchange builtin endpoints require",17749 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17750 },17751 { &hf_rtps_param_participant_security_symmetric_cipher_algorithms_supported_mask, {17752 "Supported Mask", "rtps.param.security_symmetric_cipher_algorithms.supported_mask",17753 FT_UINT32, BASE_HEX, 0, 0, "Bitmask representing supported Symmetric Cipher algorithms",17754HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17755 },17756 { &hf_rtps_param_compression_id_mask, {17757 "Compression Id Mask", "rtps.param.compression_id_mask",17758 FT_UINT32, BASE_HEX, 0, 0, "Bitmask representing compression id.", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17759 },17760 { &hf_rtps_flag_compression_id_zlib, {17761 "ZLIB", "rtps.flag.compression_id_zlib",17762 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, RTI_OSAPI_COMPRESSION_CLASS_ID_ZLIB(1), NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17763 },17764 { &hf_rtps_flag_compression_id_bzip2, {17765 "BZIP2", "rtps.flag.compression_id_bzip2",17766 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, RTI_OSAPI_COMPRESSION_CLASS_ID_BZIP2(2), NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17767 },17768 { &hf_rtps_flag_compression_id_lz4, {17769 "LZ4", "rtps.flag.compression_id_lz4",17770 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, RTI_OSAPI_COMPRESSION_CLASS_ID_LZ4(4), NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17771 },17772 { &hf_rtps_flag_security_symmetric_cipher_mask_aes128_gcm, {17773 "AES128 GCM", "rtps.flag.security_symmetric_cipher_mask.aes128_gcm",17774 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, SECURITY_SYMMETRIC_CIPHER_BIT_AES128_GCM0x00000001, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17775 },17776 { &hf_rtps_flag_security_symmetric_cipher_mask_aes256_gcm, {17777 "AES256 GCM", "rtps.flag.security_symmetric_cipher_mask.aes256_gcm",17778 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, SECURITY_SYMMETRIC_CIPHER_BIT_AES256_GCM0x00000002, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17779 },17780 { &hf_rtps_flag_security_symmetric_cipher_mask_custom_algorithm, {17781 "Custom Algorithm", "rtps.flag.security_symmetric_cipher_mask.custom_algorithm",17782 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, SECURITY_SYMMETRIC_CIPHER_BIT_CUSTOM_ALGORITHM0x40000000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17783 },17784 { &hf_rtps_flag_security_key_establishment_mask_dhe_modp2048256, {17785 "DHE_MODP2048256", "rtps.flag.security_key_establishment_mask.dhe_modp2048256",17786 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, SECURITY_KEY_ESTABLISHMENT_BIT_DHE_MODP20482560x00000001, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17787 },17788 { &hf_rtps_flag_security_key_establishment_mask_ecdheceum_p256, {17789 "ECDHECEUM_P256", "rtps.flag.security_key_establishment_mask.ecdheceum_p256",17790 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, SECURITY_KEY_ESTABLISHMENT_BIT_ECDHECEUM_P2560x00000002, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17791 },17792 { &hf_rtps_flag_security_key_establishment_mask_ecdheceum_p384, {17793 "ECDHECEUM_P384", "rtps.flag.security_key_establishment_mask.ecdheceum_p384",17794 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, SECURITY_KEY_ESTABLISHMENT_BIT_ECDHECEUM_P3840x00000004, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17795 },17796 { &hf_rtps_flag_security_key_establishment_mask_custom_algorithm, {17797 "Custom Algorithm", "rtps.flag.security_key_establishment_mask.custom_algorithm",17798 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, SECURITY_KEY_ESTABLISHMENT_BIT_CUSTOM_ALGORITHM0x40000000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17799 },17800 { &hf_rtps_flag_security_algorithm_compatibility_mode, {17801 "Compatibility Mode", "rtps.flag.security_algorithm_compatibility_mode",17802 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, SECURITY_ALGORITHM_BIT_COMPATIBILITY_MODE0x80000000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17803 },17804 { &hf_rtps_flag_plugin_endpoint_security_attribute_flag_is_payload_encrypted, {17805 "Submessage Encrypted", "rtps.flag.security.info.plugin_submessage_encrypted",17806 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00000001, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17807 },17808 { &hf_rtps_param_crypto_algorithm_requirements_trust_chain, {17809 "Supported", "rtps.param.crypto_algorithm_requirements.supported",17810 FT_UINT32, BASE_HEX, 0, 0, "Bitmask representing the trust chain", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17811 },17812 { &hf_rtps_param_crypto_algorithm_requirements_message_auth, {17813 "Required", "rtps.param.crypto_algorithm_requirements.required",17814 FT_UINT32, BASE_HEX, 0, 0, "Bitmask representing the message authentication", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17815 },17816 { &hf_rtps_flag_security_digital_signature_mask_rsassapssmgf1sha256_2048_sha256, {17817 "RSASSAPSSMGF1SHA256_2048_SHA256", "rtps.flag.security_digital_signature_mask.rsassapssmgf1sha256_2048_sha256",17818 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, SECURITY_DIGITAL_SIGNATURE_BIT_RSASSAPSSMGF1SHA256_2048_SHA2560x00000001, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17819 },17820 { &hf_rtps_flag_security_digital_signature_mask_rsassapkcs1v15_2048_sha256, {17821 "RSASSAPKCS1V15_2048_SHA256", "rtps.flag.security_digital_signature_mask.rsassapkcs1v15_2048_sha256",17822 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, SECURITY_DIGITAL_SIGNATURE_BIT_RSASSAPKCS1V15_2048_SHA2560x00000002, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17823 },17824 { &hf_rtps_flag_security_digital_signature_mask_ecdsa_p256_sha256, {17825 "ECDSA_P256_SHA256", "rtps.flag.security_digital_signature_mask.ecdsa_p256_sha256",17826 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, SECURITY_DIGITAL_SIGNATURE_BIT_ECDSA_P256_SHA2560x00000004, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17827 },17828 { &hf_rtps_flag_security_digital_signature_mask_ecdsa_p384_sha384, {17829 "ECDSA_P384_SHA384", "rtps.flag.security_digital_signature_mask.ecdsa_p384_sha384",17830 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, SECURITY_DIGITAL_SIGNATURE_BIT_ECDSA_P384_SHA3840x00000008, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17831 },17832 { &hf_rtps_flag_security_digital_signature_mask_custom_algorithm, {17833 "Custom Algorithm", "rtps.flag.security_digital_signature_mask.custom_algorithm",17834 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, SECURITY_DIGITAL_SIGNATURE_BIT_CUSTOM_ALGORITHM0x40000000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17835 },17836 { &hf_rtps_flag_plugin_endpoint_security_attribute_flag_is_key_encrypted,{17837 "Payload Encrypted", "rtps.flag.security.info.plugin_payload_encrypted",17838 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00000002, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17839 },17840 { &hf_rtps_flag_plugin_endpoint_security_attribute_flag_is_liveliness_encrypted,{17841 "Submessage Origin Encrypted", "rtps.flag.security.info.plugin_liveliness_encrypted",17842 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00000004, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17843 },17844 { &hf_rtps_flag_plugin_endpoint_security_attribute_flag_is_valid,{17845 "Mask Valid", "rtps.flag.security.info.plugin_valid",17846 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x80000000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17847 },17848 { &hf_rtps_param_plugin_endpoint_security_attributes_mask,{17849 "PluginEndpointSecurityAttributesMask (valid dissection if using the Specification Builtin Plugins)",17850 "rtps.param.plugin_endpoint_security_attributes",17851 FT_UINT32, BASE_HEX, NULL((void*)0), 0,17852 "bitmask representing the PluginEndpointSecurityAttributes flags in PID_ENDPOINT_SECURITY_INFO",17853 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17854 },17855 { &hf_rtps_flag_participant_security_attribute_flag_is_rtps_protected,{17856 "RTPS Protected", "rtps.flag.security.info.participant_rtps_protected",17857 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00000001, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17858 },17859 { &hf_rtps_flag_participant_security_attribute_flag_is_discovery_protected,{17860 "Discovery Protected", "rtps.flag.security.info.participant_discovery_protected",17861 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00000002, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17862 },17863 { &hf_rtps_flag_participant_security_attribute_flag_is_liveliness_protected,{17864 "Liveliness Protected", "rtps.flag.security.info.participant_liveliness_protected",17865 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00000004, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17866 },17867 { &hf_rtps_flag_participant_security_attribute_flag_key_revisions_enabled,{17868 "Key Revisions Enabled", "rtps.flag.security.info.key_revisions_enabled",17869 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00000008, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17870 },17871 { &hf_rtps_flag_participant_security_attribute_flag_key_psk_protected,{17872 "RTPS Pre-Shared Key Protected", "rtps.flag.security.info.participant_psk_protected",17873 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00000010, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17874 },17875 { &hf_rtps_flag_participant_security_attribute_flag_is_valid,{17876 "Mask Valid", "rtps.flag.security.info.participant_mask_valid",17877 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x80000000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17878 },17879 { &hf_rtps_param_participant_security_attributes_mask,{17880 "ParticipantSecurityAttributesMask",17881 "rtps.param.participant_security_attributes",17882 FT_UINT32, BASE_HEX, NULL((void*)0), 0,17883 "bitmask representing the ParticipantSecurityAttributes flags in PID_PARTICIPANT_SECURITY_INFO",17884 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17885 },17886 { &hf_rtps_flag_plugin_participant_security_attribute_flag_is_rtps_encrypted,{17887 "RTPS Encrypted", "rtps.flag.security.info.plugin_participant_rtps_encrypted",17888 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00000001, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17889 },17890 { &hf_rtps_flag_plugin_participant_security_attribute_flag_is_discovery_encrypted,{17891 "Discovery Encrypted", "rtps.flag.security.info.plugin_participant_discovery_encrypted",17892 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00000002, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17893 },17894 { &hf_rtps_flag_plugin_participant_security_attribute_flag_is_liveliness_encrypted,{17895 "Liveliness Encrypted", "rtps.flag.security.info.plugin_participant_liveliness_encrypted",17896 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00000004, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17897 },17898 { &hf_rtps_flag_plugin_participant_security_attribute_flag_is_rtps_origin_encrypted,{17899 "RTPS Origin Encrypted", "rtps.flag.security.info.plugin_participant_rtps_origin_encrypted",17900 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00000008, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17901 },17902 { &hf_rtps_flag_plugin_participant_security_attribute_flag_is_discovery_origin_encrypted,{17903 "Discovery Origin Encrypted", "rtps.flag.security.info.plugin_participant_discovery_origin_encrypted",17904 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00000010, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17905 },17906 { &hf_rtps_flag_plugin_participant_security_attribute_flag_is_liveliness_origin_encrypted,{17907 "Liveliness Origin Encrypted", "rtps.flag.security.info.plugin_participant_liveliness_origin_encrypted",17908 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00000020, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17909 },17910 { &hf_rtps_flag_plugin_participant_security_attribute_flag_is_psk_encrypted,{17911 "RTPS Pre-Shared Key Encrypted", "rtps.flag.security.info.plugin_participant_psk_encrypted",17912 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00000040, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17913 },17914 { &hf_rtps_flag_plugin_participant_security_attribute_flag_is_valid,{17915 "Mask Valid", "rtps.flag.security.info.plugin_participant_mask_valid",17916 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x80000000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17917 },17918 { &hf_rtps_param_plugin_participant_security_attributes_mask,{17919 "PluginParticipantSecurityAttributesMask (valid dissection if using the Specification Builtin Plugins)",17920 "rtps.param.plugin_participant_security_attributes",17921 FT_UINT32, BASE_HEX, NULL((void*)0), 0,17922 "bitmask representing the PluginParticipantSecurityAttributes flags in PID_PARTICIPANT_SECURITY_INFO",17923 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17924 },17925 { &hf_rtps_param_enable_authentication,17926 { "Authentication enabled", "rtps.secure.enable_authentication",17927 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17928 },17929 { &hf_rtps_param_builtin_endpoint_qos,17930 { "Built-in Endpoint QoS", "rtps.param.builtin_endpoint_qos",17931 FT_UINT32, BASE_HEX, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17932 },17933 { &hf_rtps_param_sample_signature_epoch,17934 { "Epoch", "rtps.sample_signature.epoch",17935 FT_UINT64, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17936 },17937 { &hf_rtps_param_sample_signature_nonce,17938 { "Nonce", "rtps.sample_signature.nonce",17939 FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17940 },17941 { &hf_rtps_param_sample_signature_length,17942 {"Signature Length", "rtps.sample_signature.signature_length",17943 FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17944 },17945 { &hf_rtps_param_sample_signature_signature,17946 { "Signature", "rtps.sample_signature.signature",17947 FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17948 },17949 { &hf_rtps_secure_dataheader_transformation_kind, {17950 "Transformation Kind", "rtps.secure.data_header.transformation_kind",17951 FT_INT8, BASE_DEC, VALS(secure_transformation_kind)((0 ? (const struct _value_string*)0 : ((secure_transformation_kind
))))
, 0,17952 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17953 },17954 { &hf_rtps_secure_dataheader_transformation_key_revision_id, {17955 "Transformation Key Revision Id", "rtps.secure.data_header.transformation_key_revision_id",17956 FT_INT24, BASE_DEC, NULL((void*)0), 0,17957 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17958 },17959 { &hf_rtps_secure_dataheader_transformation_key_id, {17960 "Transformation Key Id", "rtps.secure.data_header.transformation_key",17961 FT_BYTES, BASE_NONE, NULL((void*)0), 0,17962 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17963 },17964 { &hf_rtps_secure_dataheader_passphrase_id, {17965 "Passphrase Id", "rtps.secure.data_header.passphrase_id",17966 FT_UINT32, BASE_DEC, NULL((void*)0), 0,17967 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17968 },17969 { &hf_rtps_secure_dataheader_passphrase_key_id, {17970 "Passphrase Key Id", "rtps.secure.data_header.passphrase_key_id",17971 FT_UINT8, BASE_HEX, NULL((void*)0), 0,17972 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17973 },17974 { &hf_rtps_secure_dataheader_init_vector_suffix, {17975 "Plugin Secure Header", "rtps.secure.data_header.init_vector_suffix",17976 FT_BYTES, BASE_NONE, NULL((void*)0), 0,17977 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17978 },17979 { &hf_rtps_secure_dataheader_session_id, {17980 "Session Id", "rtps.secure.data_header.session_id",17981 FT_UINT32, BASE_HEX, NULL((void*)0), 0,17982 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17983 },17984 { &hf_rtps_secure_datatag_plugin_sec_tag, {17985 "Receiver-Specific Mac",17986 "rtps.secure.data_tag.receiver_specific_mac",17987 FT_BYTES, BASE_NONE, NULL((void*)0), 0,17988 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17989 },17990 { &hf_rtps_secure_datatag_plugin_sec_tag_key, {17991 "Receiver-Specific Mac Key Id",17992 "rtps.secure.data_tag.receiver_specific_macs_key_id",17993 FT_BYTES, BASE_NONE, NULL((void*)0), 0,17994 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }17995 },17996 { &hf_rtps_secure_datatag_plugin_sec_tag_common_mac, {17997 "Plugin Secure Tag Common Mac", "rtps.secure.data_tag.common_mac",17998 FT_BYTES, BASE_NONE, NULL((void*)0), 0,17999 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18000 },18001 { &hf_rtps_secure_datatag_plugin_specific_macs_len, {18002 "Plugin Secure Tag Receiver-Specific Macs Length", "rtps.secure.data_tag.specific_macs_len",18003 FT_UINT32, BASE_DEC, NULL((void*)0), 0,18004 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18005 },18006 { &hf_rtps_srm_service_id,18007 { "Service Id", "rtps.srm.service_id",18008 FT_INT32, BASE_DEC, VALS(service_request_kind)((0 ? (const struct _value_string*)0 : ((service_request_kind
))))
, 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18009 },18010 { &hf_rtps_srm_request_body, {18011 "Request Body", "rtps.srm.request_body",18012 FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18013 },18014 { &hf_rtps_srm_instance_id, {18015 "Instance Id", "rtps.srm.instance_id",18016 FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18017 },18018 { &hf_rtps_topic_query_selection_filter_class_name,18019 { "Class Name", "rtps.srm.topic_query.class_name",18020 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18021 },18022 { &hf_rtps_topic_query_selection_filter_expression,18023 { "Filter Expression", "rtps.srm.topic_query.filter_expression",18024 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18025 },18026 { &hf_rtps_topic_query_selection_filter_parameter,18027 { "Filter Parameter", "rtps.srm.topic_query.filter_parameter",18028 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18029 },18030 { &hf_rtps_topic_query_selection_num_parameters,18031 { "Number of Filter Parameters", "rtps.srm.topic_query.num_filter_parameters",18032 FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18033 },18034 { &hf_rtps_topic_query_topic_name,18035 { "Topic Name", "rtps.srm.topic_query.topic_name",18036 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18037 },18038 { &hf_rtps_topic_query_original_related_reader_guid,18039 { "Original Related Reader GUID", "rtps.srm.topic_query.original_related_reader_guid",18040 FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18041 },18042 { &hf_rtps_topic_query_selection_kind,18043 { "Topic Query Selection Kind", "rtps.srm.topic_query.kind",18044 FT_UINT32, BASE_DEC, VALS(topic_query_selection_kind)((0 ? (const struct _value_string*)0 : ((topic_query_selection_kind
))))
, 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18045 },18046 { &hf_rtps_data_session_intermediate,18047 { "Data Session Intermediate Packet", "rtps.data_session.intermediate",18048 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x00, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18049 },18050 { &hf_rtps_secure_secure_data_length,18051 { "Secure Data Length", "rtps.secure.secure_data_length",18052 FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18053 },18054 { &hf_rtps_secure_secure_data,18055 { "Secure Data", "rtps.secure.secure_data",18056 FT_BYTES, BASE_NONE, NULL((void*)0), 0, "The user data transferred in a secure payload", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18057 },18058 { &hf_rtps_secure_session_key,18059 { "[Session Key]", "rtps.secure.session_key",18060 FT_BYTES, BASE_NONE, NULL((void*)0), 0, "The user data transferred in a secure payload", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18061 },18062 { &hf_rtps_pgm, {18063 "Participant Generic Message", "rtps.pgm",18064 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18065 },18066 { &hf_rtps_srm, {18067 "Service Request Message", "rtps.srm",18068 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18069 },18070 { &hf_rtps_pgm_dst_participant_guid,18071 { "Destination Participant GUID", "rtps.pgm.dst_participant_guid",18072 FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18073 },18074 { &hf_rtps_source_participant_guid,18075 { "Source Participant GUID", "rtps.pgm.source_participant_guid",18076 FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18077 },18078 { &hf_rtps_pgm_dst_endpoint_guid,18079 { "Destination Endpoint GUID", "rtps.pgm.dst_endpoint_guid",18080 FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18081 },18082 { &hf_rtps_pgm_src_endpoint_guid,18083 { "Source Endpoint GUID", "rtps.pgm.src_endpoint_guid",18084 FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18085 },18086 { &hf_rtps_message_identity_source_guid,18087 { "Source GUID", "rtps.pgm.message_identity.source_guid",18088 FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18089 },18090 { &hf_rtps_pgm_message_class_id,18091 { "Message class id", "rtps.pgm.data_holder.message_class_id",18092 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18093 },18094 { &hf_rtps_pgm_data_holder_class_id,18095 { "Class Id", "rtps.pgm.data_holder.class_id",18096 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18097 },18098#if 018099 { &hf_rtps_pgm_data_holder_stringseq_size,18100 { "Size", "rtps.pgm.data_holder.string_seq_size",18101 FT_INT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18102 },18103 { &hf_rtps_pgm_data_holder_stringseq_name,18104 { "Name", "rtps.pgm.data_holder.string_seq_name",18105 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18106 },18107 { &hf_rtps_pgm_data_holder_long_long,18108 { "Long long", "rtps.pgm.data_holder.long_long",18109 FT_INT64, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18110 },18111#endif18112 { &hf_rtps_param_topic_query_publication_enable,18113 { "Enable", "rtps.param.topic_query_publication_enable",18114 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18115 },18116 { &hf_rtps_param_topic_query_publication_sessions,18117 { "Number of sessions", "rtps.param.topic_query_publication_sessions",18118 FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18119 },18120 { &hf_rtps_pl_cdr_member,18121 { "Member value", "rtps.data.value",18122 FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18123 },18124 { &hf_rtps_pl_cdr_member_id,18125 { "Member ID", "rtps.data.member_id",18126 FT_UINT16, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18127 },18128 { &hf_rtps_pl_cdr_member_length,18129 { "Member length", "rtps.data.member_length",18130 FT_UINT16, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18131 },18132 { &hf_rtps_pl_cdr_member_id_ext,18133 { "Member ID", "rtps.data.member_id",18134 FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18135 },18136 { &hf_rtps_pl_cdr_member_length_ext,18137 { "Member length", "rtps.data.member_length",18138 FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18139 },18140 { &hf_rtps_dcps_publication_data_frame_number,{18141 "DCPSPublicationData In", "rtps.dcps_publication_data_frame_number",18142 FT_FRAMENUM, BASE_NONE, NULL((void*)0), 0x0,18143 "This is a submessage sent by the DataWriter described in the DCPSPublicationData found in this frame", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18144 },18145 { &hf_rtps_data_tag_name,18146 { "Name", "rtps.param.data_tag.name",18147 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18148 },18149 { &hf_rtps_data_tag_value,18150 { "Value", "rtps.param.data_tag.value",18151 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18152 },18153 { &hf_rtps_fragments,18154 { "Message fragments", "rtps.fragments",18155 FT_NONE, BASE_NONE, NULL((void*)0), 0x00, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18156 },18157 { &hf_rtps_fragment,18158 { "Message fragment", "rtps.fragment",18159 FT_FRAMENUM, BASE_NONE, NULL((void*)0), 0x00, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18160 },18161 { &hf_rtps_fragment_overlap,18162 { "Message fragment overlap", "rtps.fragment.overlap",18163 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x00, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18164 },18165 { &hf_rtps_fragment_overlap_conflict,18166 { "Message fragment overlapping with conflicting data", "rtps.fragment.overlap.conflicts",18167 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x00, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18168 },18169 { &hf_rtps_fragment_multiple_tails,18170 { "Message has multiple tail fragments", "rtps.fragment.multiple_tails",18171 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x00, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18172 },18173 { &hf_rtps_fragment_too_long_fragment,18174 { "Message fragment too long", "rtps.fragment.too_long_fragment",18175 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x00, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18176 },18177 { &hf_rtps_fragment_error,18178 { "Message defragmentation error", "rtps.fragment.error",18179 FT_FRAMENUM, BASE_NONE, NULL((void*)0), 0x00, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18180 },18181 { &hf_rtps_fragment_count,18182 { "Message fragment count", "rtps.fragment.count",18183 FT_UINT32, BASE_DEC, NULL((void*)0), 0x00, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18184 },18185 { &hf_rtps_reassembled_in,18186 { "Reassembled in", "rtps.reassembled.in",18187 FT_FRAMENUM, BASE_NONE, NULL((void*)0), 0x00, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18188 },18189 { &hf_rtps_reassembled_length,18190 { "Reassembled length", "rtps.reassembled.length",18191 FT_UINT32, BASE_DEC, NULL((void*)0), 0x00, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18192 },18193 { &hf_rtps_reassembled_data,18194 { "Reassembled RTPS data", "rtps.reassembled.data", FT_BYTES, BASE_NONE,18195 NULL((void*)0), 0x0, "The reassembled payload", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18196 },18197 { &hf_rtps_compression_plugin_class_id,18198 { "Compression class Id", "rtps.param.compression_class_id", FT_UINT32, BASE_DEC,18199 VALS(class_id_enum_names)((0 ? (const struct _value_string*)0 : ((class_id_enum_names)
)))
, 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18200 },18201 { &hf_rtps_encapsulation_options_compression_plugin_class_id,18202 { "Compression class Id", "rtps.param.plugin.compression_class_id", FT_INT8, BASE_DEC,18203 VALS(class_id_enum_names)((0 ? (const struct _value_string*)0 : ((class_id_enum_names)
)))
, 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18204 },18205 { &hf_rtps_padding_bytes,18206 { "Padding bytes", "rtps.padding_bytes", FT_INT8, BASE_DEC,18207 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18208 },18209 { &hf_rtps_uncompressed_serialized_length,18210 { "Uncompressed serialized length", "rtps.param.uncompressed_serialized_length", FT_UINT32, BASE_DEC,18211 NULL((void*)0), 0x0, "The reassembled payload", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18212 },18213 18214 { &hf_rtps_encapsulation_extended_compression_options,18215 { "Uncompressed serialized length", "rtps.extended_compression_options", FT_UINT32, BASE_DEC,18216 NULL((void*)0), 0x0, "Extended compression options", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18217 },18218 { &hf_rtps_compressed_serialized_type_object,18219 { "Compressed serialized type object", "rtps.param.compressed_serialized_typeobject", FT_BYTES, BASE_NONE,18220 NULL((void*)0), 0x0, "The reassembled payload", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18221 },18222 18223 { &hf_rtps_dissection_boolean,18224 {"BOOLEAN", "rtps.dissection.boolean",18225 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18226 },18227 18228 { &hf_rtps_dissection_byte,18229 {"BYTE", "rtps.dissection.byte",18230 FT_UINT8, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18231 },18232 18233 { &hf_rtps_dissection_int16,18234 {"INT16", "rtps.dissection.int16",18235 FT_INT16, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18236 },18237 18238 { &hf_rtps_dissection_uint16,18239 {"UINT16", "rtps.dissection.uint16",18240 FT_UINT16, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18241 },18242 18243 { &hf_rtps_dissection_int32,18244 {"INT32", "rtps.dissection.int32",18245 FT_INT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18246 },18247 18248 { &hf_rtps_dissection_uint32,18249 {"UINT32", "rtps.dissection.uint32",18250 FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18251 },18252 18253 { &hf_rtps_dissection_int64,18254 {"INT64", "rtps.dissection.int64",18255 FT_INT64, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18256 },18257 18258 { &hf_rtps_dissection_uint64,18259 {"UINT64", "rtps.dissection.uint64",18260 FT_UINT64, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18261 },18262 18263 { &hf_rtps_dissection_float,18264 {"FLOAT", "rtps.dissection.float",18265 FT_FLOAT, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18266 },18267 18268 { &hf_rtps_dissection_double,18269 {"DOUBLE", "rtps.dissection.double",18270 FT_DOUBLE, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18271 },18272 18273 { &hf_rtps_dissection_int128,18274 {"INT128", "rtps.dissection.int128",18275 FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18276 },18277 18278 { &hf_rtps_dissection_string,18279 { "STRING", "rtps.dissection.string",18280 FT_STRINGZ, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18281 },18282 { &hf_rtps_flag_udpv4_wan_locator_u, {18283 "UUID Locator", "rtps.flag.udpv4_wan_locator.u",18284 FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x01, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18285 },18286 { &hf_rtps_flag_udpv4_wan_locator_p, {18287 "Public Locator", "rtps.flag.udpv4_wan_locator.p",18288 FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x02, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18289 },18290 { &hf_rtps_flag_udpv4_wan_locator_b, {18291 "Bidirectional Locator", "rtps.flag.udpv4_wan_locator.b",18292 FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x04, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18293 },18294 { &hf_rtps_flag_udpv4_wan_locator_r, {18295 "Relay Locator", "rtps.flag.udpv4_wan_locator.r",18296 FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x08, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18297 },18298 { &hf_rtps_udpv4_wan_locator_flags, {18299 "Flags", "rtps.flag.udpv4_wan_locator",18300 FT_UINT8, BASE_HEX, NULL((void*)0), 0, "Bitmask representing the flags UDPv4 WAN locator", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18301 },18302 { &hf_rtps_uuid,{18303 "UUID", "rtps.uuid",18304 FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18305 },18306 { &hf_rtps_udpv4_wan_locator_public_ip, {18307 "Public IP", "rtps.udpv4_wan_locator.public_ip",18308 FT_IPv4, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18309 },18310 { &hf_rtps_udpv4_wan_locator_public_port, {18311 "Public port", "rtps.udpv4_wan_locator.public_port",18312 FT_UINT16, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18313 },18314 { &hf_rtps_udpv4_wan_locator_local_ip,{18315 "Local IP", "rtps.udpv4_wan_locator.local_ip",18316 FT_IPv4, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18317 },18318 { &hf_rtps_udpv4_wan_locator_local_port,{18319 "Local port", "rtps.udpv4_wan_locator.local_port",18320 FT_UINT16, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18321 },18322 { &hf_rtps_flag_udpv4_wan_binding_ping_e, {18323 "Endianness", "rtps.flag.udpv4_wan_binding_ping.e",18324 FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x01, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18325 },18326 { &hf_rtps_flag_udpv4_wan_binding_ping_l, {18327 "Long address", "rtps.flag.udpv4_wan_binding_ping.l",18328 FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x02, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18329 },18330 { &hf_rtps_flag_udpv4_wan_binding_ping_b,{18331 "Bidirectional", "rtps.flag.udpv4_wan_binding_ping.b",18332 FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x04, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18333 },18334 { &hf_rtps_udpv4_wan_binding_ping_flags, {18335 "Flags", "rtps.flag.udpv4_wan_binding_ping",18336 FT_UINT8, BASE_HEX, NULL((void*)0), 0, "Bitmask representing the flags UDPv4 WAN binding ping", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18337 },18338 { &hf_rtps_udpv4_wan_binding_ping_port, {18339 "RTPS port", "rtps.flag.udpv4_wan_binding_rtps_port",18340 FT_UINT32, BASE_DEC, NULL((void*)0), 0, "UDPv4 WAN binding ping RTPS port", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18341 },18342 { &hf_rtps_long_address, {18343 "Long address", "rtps.long_address", FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18344 },18345 { &hf_rtps_param_group_coherent_set, {18346 "Group coherent set sequence number", "rtps.param.group_coherent_set",18347 FT_UINT64, BASE_DEC, NULL((void*)0), 0, "Decimal value representing the value of PID_GROUP_COHERENT_SET parameter", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18348 },18349 { &hf_rtps_param_end_group_coherent_set, {18350 "End group coherent set sequence number", "rtps.param.end_group_coherent_set",18351 FT_UINT64, BASE_DEC, NULL((void*)0), 0, "Decimal value representing the value of PID_END_GROUP_COHERENT_SET parameter", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18352 },18353 { &hf_rtps_param_mig_end_coherent_set_sample_count, {18354 "Ended coherent set sample count", "rtps.param.mig_end_coherent_set_sample_count",18355 FT_UINT32, BASE_DEC, NULL((void*)0), 0, "Decimal value representing the value of MIG_RTPS_PID_END_COHERENT_SET_SAMPLE_COUNT parameter", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18356 },18357 { &hf_rtps_flag_cloud_discovery_service_announcer,{18358 "Cloud Discovery Service Announcer", "rtps.flag.cloud_discovery_service_announcer",18359 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00000040, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18360 },18361 { &hf_rtps_writer_group_oid, {18362 "Writer Group OID", "rtps.writer_group_oid",18363 FT_UINT32, BASE_DEC, NULL((void*)0), 0, "Decimal representing the writer group OID", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18364 },18365 { &hf_rtps_reader_group_oid, {18366 "Reader Group OID", "rtps.reader_group_oid",18367 FT_UINT32, BASE_DEC, NULL((void*)0), 0, "Decimal representing the reader group OID", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18368 },18369 { &hf_rtps_writer_session_id,{18370 "Writer Session ID", "rtps.writer_session_id",18371 FT_UINT32, BASE_DEC, NULL((void*)0), 0, "Decimal representing the writer session ID", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18372 },18373 { &hf_rtps_flag_participant_config_writer,{18374 "Participant Config Writer", "rtps.flag.participant_config_writer",18375 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, VENDOR_BUILTIN_ENDPOINT_SET_FLAG_PARTICIPANT_CONFIG_WRITER(0x00000001U << 7), NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18376 },18377 { &hf_rtps_flag_participant_config_reader,{18378 "Participant Config Reader", "rtps.flag.participant_config_reader",18379 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, VENDOR_BUILTIN_ENDPOINT_SET_FLAG_PARTICIPANT_CONFIG_READER(0x00000001U << 8), NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18380 },18381 { &hf_rtps_flag_participant_config_secure_writer,{18382 "Participant Config Secure Writer", "rtps.flag.participant_config_secure_writer",18383 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, VENDOR_BUILTIN_ENDPOINT_SET_FLAG_PARTICIPANT_CONFIG_SECURE_WRITER(0x00000001U << 9), NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18384 },18385 { &hf_rtps_flag_participant_config_secure_reader,{18386 "Participant Config Secure Reader", "rtps.flag.participant_config_secure_reader",18387 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, VENDOR_BUILTIN_ENDPOINT_SET_FLAG_PARTICIPANT_CONFIG_SECURE_READER(0x00000001U << 10), NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18388 },18389 { &hf_rtps_flag_participant_bootstrap_writer,{18390 "Participant Bootstrap Writer", "rtps.flag.participant_bootstrap_writer",18391 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, VENDOR_BUILTIN_ENDPOINT_SET_FLAG_PARTICIPANT_BOOTSTRAP_WRITER(0x00000001U << 17), NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18392 },18393 { &hf_rtps_flag_participant_bootstrap_reader,{18394 "Participant Bootstrap Reader", "rtps.flag.participant_bootstrap_reader",18395 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, VENDOR_BUILTIN_ENDPOINT_SET_FLAG_PARTICIPANT_BOOTSTRAP_READER(0x00000001U << 18), NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18396 },18397 { &hf_rtps_flag_monitoring_periodic_writer,{18398 "Monitoring Periodic Writer", "rtps.flag.monitoring_periodic_writer",18399 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, VENDOR_BUILTIN_ENDPOINT_SET_FLAG_MONITORING_PERIODIC_WRITER(0x00000001U << 11), NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18400 },18401 { &hf_rtps_flag_monitoring_periodic_reader,{18402 "Monitoring Periodic Reader", "rtps.flag.monitoring_periodic_reader",18403 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, VENDOR_BUILTIN_ENDPOINT_SET_FLAG_MONITORING_PERIODIC_READER(0x00000001U << 12), NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18404 },18405 { &hf_rtps_flag_monitoring_event_writer,{18406 "Monitoring Event Writer", "rtps.flag.monitoring_event_writer",18407 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, VENDOR_BUILTIN_ENDPOINT_SET_FLAG_MONITORING_EVENT_WRITER(0x00000001U << 13), NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18408 },18409 { &hf_rtps_flag_monitoring_event_reader,{18410 "Monitoring Event Reader", "rtps.flag.monitoring_event_reader",18411 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, VENDOR_BUILTIN_ENDPOINT_SET_FLAG_MONITORING_EVENT_READER(0x00000001U << 14), NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18412 },18413 { &hf_rtps_flag_monitoring_logging_writer,{18414 "Monitoring Logging Writer", "rtps.flag.monitoring_logging_writer",18415 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, VENDOR_BUILTIN_ENDPOINT_SET_FLAG_MONITORING_LOGGING_WRITER(0x00000001U << 15), NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18416 },18417 { &hf_rtps_flag_monitoring_logging_reader,{18418 "Monitoring Logging Reader", "rtps.flag.monitoring_logging_reader",18419 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, VENDOR_BUILTIN_ENDPOINT_SET_FLAG_MONITORING_LOGGING_READER(0x00000001U << 16), NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }18420 }18421 };18422 18423 static gint *ett[] = {18424 &ett_rtps,18425 &ett_rtps_default_mapping,18426 &ett_rtps_proto_version,18427 &ett_rtps_product_version,18428 &ett_rtps_submessage,18429 &ett_rtps_parameter_sequence,18430 &ett_rtps_parameter,18431 &ett_rtps_flags,18432 &ett_rtps_entity,18433 &ett_rtps_generic_guid,18434 &ett_rtps_rdentity,18435 &ett_rtps_wrentity,18436 &ett_rtps_guid_prefix,18437 &ett_rtps_app_id,18438 &ett_rtps_locator_udp_v4,18439 &ett_rtps_locator,18440 &ett_rtps_locator_list,18441 &ett_rtps_timestamp,18442 &ett_rtps_bitmap,18443 &ett_rtps_seq_string,18444 &ett_rtps_seq_ulong,18445 &ett_rtps_resource_limit,18446 &ett_rtps_durability_service,18447 &ett_rtps_liveliness,18448 &ett_rtps_manager_key,18449 &ett_rtps_serialized_data,18450 &ett_rtps_locator_filter_channel,18451 &ett_rtps_part_message_data,18452 &ett_rtps_sample_info_list,18453 &ett_rtps_sample_info,18454 &ett_rtps_sample_batch_list,18455 &ett_rtps_locator_filter_locator,18456 &ett_rtps_writer_heartbeat_virtual_list,18457 &ett_rtps_writer_heartbeat_virtual,18458 &ett_rtps_virtual_guid_heartbeat_virtual_list,18459 &ett_rtps_virtual_guid_heartbeat_virtual,18460 &ett_rtps_app_ack_virtual_writer_list,18461 &ett_rtps_app_ack_virtual_writer,18462 &ett_rtps_app_ack_virtual_writer_interval_list,18463 &ett_rtps_app_ack_virtual_writer_interval,18464 &ett_rtps_transport_info,18465 &ett_rtps_property_list,18466 &ett_rtps_property,18467 &ett_rtps_topic_info,18468 &ett_rtps_topic_info_dw_qos,18469 &ett_rtps_type_object,18470 &ett_rtps_type_library,18471 &ett_rtps_type_element,18472 &ett_rtps_type_annotation_usage_list,18473 &ett_rtps_type_enum_constant,18474 &ett_rtps_type_bound_list,18475 &ett_rtps_secure_payload_tree,18476 &ett_rtps_secure_dataheader_tree,18477 &ett_rtps_secure_transformation_kind,18478 &ett_rtps_pgm_data,18479 &ett_rtps_message_identity,18480 &ett_rtps_related_message_identity,18481 &ett_rtps_data_holder_seq,18482 &ett_rtps_data_holder,18483 &ett_rtps_data_holder_properties,18484 &ett_rtps_property_tree,18485 &ett_rtps_param_header_tree,18486 &ett_rtps_custom_dissection_info,18487 &ett_rtps_service_request_tree,18488 &ett_rtps_locator_ping_tree,18489 &ett_rtps_locator_reachability_tree,18490 &ett_rtps_locator_list_tree,18491 &ett_rtps_topic_query_tree,18492 &ett_rtps_topic_query_selection_tree,18493 &ett_rtps_topic_query_filter_params_tree,18494 &ett_rtps_data_member,18495 &ett_rtps_data_tag_seq,18496 &ett_rtps_data_tag_item,18497 &ett_rtps_fragment,18498 &ett_rtps_fragments,18499 &ett_rtps_data_representation,18500 &ett_rtps_decompressed_type_object,18501 &ett_rtps_dissection_tree,18502 &ett_rtps_info_remaining_items,18503 &ett_rtps_data_encapsulation_options,18504 &ett_rtps_decompressed_serialized_data,18505 &ett_rtps_instance_transition_data,18506 &ett_rtps_crypto_algorithm_requirements,18507 &ett_rtps_decrypted_payload,18508 &ett_rtps_secure_postfix_tag_list_item18509 };18510 18511 static ei_register_info ei[] = {18512 { &ei_rtps_sm_octets_to_next_header_error, { "rtps.sm.octetsToNextHeader.error", PI_PROTOCOL0x09000000, PI_WARN0x00600000, "(Error: bad length)", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},18513 { &ei_rtps_locator_port, { "rtps.locator.port.invalid", PI_PROTOCOL0x09000000, PI_WARN0x00600000, "Invalid Port", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},18514 { &ei_rtps_ip_invalid, { "rtps.ip_invalid", PI_PROTOCOL0x09000000, PI_WARN0x00600000, "IPADDRESS_INVALID_STRING", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},18515 { &ei_rtps_port_invalid, { "rtps.port_invalid", PI_PROTOCOL0x09000000, PI_WARN0x00600000, "PORT_INVALID_STRING", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},18516 { &ei_rtps_parameter_value_invalid, { "rtps.parameter_value_too_small", PI_PROTOCOL0x09000000, PI_WARN0x00600000, "ERROR: Parameter value too small", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},18517 { &ei_rtps_parameter_not_decoded, { "rtps.parameter_not_decoded", PI_PROTOCOL0x09000000, PI_WARN0x00600000, "[DEPRECATED] - Parameter not decoded", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},18518 { &ei_rtps_sm_octets_to_next_header_not_zero, { "rtps.sm.octetsToNextHeader.not_zero", PI_PROTOCOL0x09000000, PI_WARN0x00600000, "Should be ZERO", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},18519 { &ei_rtps_extra_bytes, { "rtps.extra_bytes", PI_MALFORMED0x07000000, PI_ERROR0x00800000, "Don't know how to decode those extra bytes: %d", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},18520 { &ei_rtps_missing_bytes, { "rtps.missing_bytes", PI_MALFORMED0x07000000, PI_ERROR0x00800000, "Not enough bytes to decode", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},18521 { &ei_rtps_more_samples_available, { "rtps.more_samples_available", PI_PROTOCOL0x09000000, PI_NOTE0x00400000, "More samples available. Configure this limit from preferences dialog", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},18522 { &ei_rtps_pid_type_csonsistency_invalid_size, { "rtps.pid_type_consistency_invalid_size", PI_MALFORMED0x07000000, PI_ERROR0x00800000, "PID_TYPE_CONSISTENCY invalid size. Has a size of %d bytes. Expected %d or %d bytes.", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},18523 { &ei_rtps_uncompression_error, { "rtps.uncompression_error", PI_PROTOCOL0x09000000, PI_WARN0x00600000, "Unable to uncompress the compressed payload.", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},18524 { &ei_rtps_value_too_large, { "rtps.value_too_large", PI_MALFORMED0x07000000, PI_ERROR0x00800000, "Length value goes past the end of the packet", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},18525 { &ei_rtps_checksum_check_error, { "rtps.checksum_error", PI_CHECKSUM0x01000000, PI_ERROR0x00800000, "Error: Unexpected checksum", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}},18526 { &ei_rtps_invalid_psk, { "rtps.psk_decryption_error", PI_UNDECODED0x05000000, PI_ERROR0x00800000, "Unable to decrypt content using PSK", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE
, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void
*)0)}}
}}18527 };18528 18529 module_t *rtps_module;18530 expert_module_t *expert_rtps;18531 uat_t * rtps_psk_uat;18532 18533 proto_rtps = proto_register_protocol("Real-Time Publish-Subscribe Wire Protocol", "RTPS", "rtps");18534 proto_register_field_array(proto_rtps, hf, array_length(hf)(sizeof (hf) / sizeof (hf)[0]));18535 proto_register_subtree_array(ett, array_length(ett)(sizeof (ett) / sizeof (ett)[0]));18536 expert_rtps = expert_register_protocol(proto_rtps);18537 expert_register_field_array(expert_rtps, ei, array_length(ei)(sizeof (ei) / sizeof (ei)[0]));18538 18539 /* Registers the control in the preference panel */18540 rtps_module = prefs_register_protocol(proto_rtps, NULL((void*)0));18541 prefs_register_uint_preference(18542 rtps_module,18543 "max_batch_samples_dissected",18544 "Max samples dissected for DATA_BATCH",18545 "Specifies the maximum number of samples dissected in a DATA_BATCH "18546 "submessage. Increasing this value may affect performance if the "18547 "trace has a lot of big batched samples.",18548 10,18549 &rtps_max_batch_samples_dissected);18550 18551 prefs_register_bool_preference(18552 rtps_module,18553 "enable_max_dissection_info_elements",18554 "Limit the number of elements dissected in structs",18555 "Enabling this option may affect performance if the trace has messages "18556 "with large Data Types.",18557 &enable_max_data_type_elements);18558 18559 prefs_register_uint_preference(18560 rtps_module,18561 "max_dissection_info_elements",18562 "Max Dissection info elements shown in structs",18563 "Specifies the maximum number of Data Type elements dissected. "18564 "Increasing this value may affect performance if the trace has "18565 "messages with large Data Types.",18566 10,18567 &rtps_max_data_type_elements);18568 18569 prefs_register_bool_preference(18570 rtps_module,18571 "enable_max_dissection_array_elements",18572 "Limit the number of elements dissected in arrays or sequences",18573 "Disabling this option may affect performance if the trace has messages "18574 "with large arrays or sequences.",18575 &enable_max_array_data_type_elements);18576 18577 prefs_register_uint_preference(18578 rtps_module,18579 "max_dissection_array_elements",18580 "Max Dissection elements shown in arrays or sequences",18581 "Specifies the maximum number of Data Type elements dissected in arrays or sequences. "18582 "Increasing this value may affect "18583 "performance if the trace has messages with large Data Types.",18584 10,18585 &rtps_max_array_data_type_elements);18586 18587 prefs_register_bool_preference(18588 rtps_module,18589 "enable_topic_info",18590 "Enable Topic Information",18591 "Shows the Topic Name and Type Name of the samples. "18592 "Note: this can considerably increase the dissection time.",18593 &enable_topic_info);18594 18595 prefs_register_bool_preference(18596 rtps_module,18597 "enable_user_data_dissection",18598 "Enable User Data Dissection (based on Type Object)",18599 "Dissects the user data if the Type Object is propagated in Discovery.",18600 &enable_user_data_dissection);18601 18602 prefs_register_bool_preference(18603 rtps_module,18604 "enable_rtps_reassembly",18605 "Enable RTPS Reassembly",18606 "Enables the reassembly of DATA_FRAG submessages.",18607 &enable_rtps_reassembly);18608 18609 prefs_register_bool_preference(18610 rtps_module,18611 "enable_rtps_checksum_check",18612 "Enable RTPS Checksum check (Only CRC-32C and MD5 supported)",18613 "Detects the RTPS packets with invalid checksums (Only CRC-32C and MD5 "18614 "supported)",18615 &enable_rtps_crc_check);18616 18617 prefs_register_bool_preference(18618 rtps_module,18619 "enable_rtps_psk_decryption",18620 "Enable RTPS PSK decryption",18621 "Decode RTPS messages protected with a pre-shared key",18622 &enable_rtps_psk_decryption);18623 18624 rtps_psk_uat = uat_new(18625 "RTPS GUID-PSK",18626 sizeof(rtps_psk_options_entry_t),18627 "RTPS PSK Keys",18628 TRUE(!(0)),18629 &rtps_psk_options.entries,18630 &rtps_psk_options.size,18631 0x00000001,18632 NULL((void*)0),18633 rtps_psk_options_copy_entry,18634 rtps_psk_options_update_entry,18635 rtps_psk_options_free_entry,18636 NULL((void*)0),18637 NULL((void*)0),18638 rtps_psk_table_field_array);18639 18640 prefs_register_uat_preference(18641 rtps_module,18642 "psk_keys",18643 "Pre-shared keys",18644 "List of pre-shared keys that will be used to decode RTPS messages if"18645 " the previous option is enabled",18646 rtps_psk_uat);18647 18648 rtps_type_name_table = register_dissector_table("rtps.type_name", "RTPS Type Name",18649 proto_rtps, FT_STRING, STRING_CASE_SENSITIVE0);18650 18651 registry = wmem_map_new_autoreset(wmem_epan_scope(), wmem_file_scope(), hash_by_guid, compare_by_guid);18652 dissection_infos = wmem_map_new_autoreset(wmem_epan_scope(), wmem_file_scope(), g_int64_hash, g_int64_equal);18653 union_member_mappings = wmem_map_new_autoreset(wmem_epan_scope(), wmem_file_scope(), g_int64_hash, g_int64_equal);18654 mutable_member_mappings = wmem_map_new_autoreset(wmem_epan_scope(), wmem_file_scope(), g_int64_hash, g_int64_equal);18655 coherent_set_tracking.entities_using_map = wmem_map_new_autoreset(wmem_epan_scope(), wmem_file_scope(), hash_by_guid, compare_by_guid);18656 coherent_set_tracking.coherent_set_registry_map = wmem_map_new_autoreset(wmem_epan_scope(), wmem_file_scope(), coherent_set_key_hash_by_key, compare_by_coherent_set_key);18657 builtin_dissection_infos = wmem_map_new_autoreset(wmem_epan_scope(), wmem_epan_scope(), g_int64_hash, g_int64_equal);18658 18659 coherent_set_tracking.entities_using_map = wmem_map_new_autoreset(wmem_epan_scope(), wmem_file_scope(), hash_by_guid, compare_by_guid);18660 discovered_participants_domain_ids = wmem_map_new_autoreset(wmem_epan_scope(), wmem_file_scope(), hash_by_participant_guid, compare_by_participant_guid);18661 /* In order to get this dissector from other dissectors */18662 register_dissector("rtps", dissect_simple_rtps, proto_rtps);18663 18664 initialize_instance_state_data_response_dissection_info(&builtin_types_dissection_data);18665 18666 reassembly_table_register(&rtps_reassembly_table,18667 &addresses_reassembly_table_functions);18668}18669 18670void proto_reg_handoff_rtps(void) {18671 heur_dissector_add("rtitcp", dissect_rtps_rtitcp, "RTPS over RTITCP", "rtps_rtitcp", proto_rtps, HEURISTIC_ENABLE);18672 heur_dissector_add("udp", dissect_rtps_udp, "RTPS over UDP", "rtps_udp", proto_rtps, HEURISTIC_ENABLE);18673 heur_dissector_add("tcp", dissect_rtps_tcp, "RTPS over TCP", "rtps_tcp", proto_rtps, HEURISTIC_ENABLE);18674}18675 18676/*18677 * Editor modelines18678 *18679 * Local Variables:18680 * c-basic-offset: 218681 * tab-width: 818682 * indent-tabs-mode: nil18683 * End:18684 *18685 * ex: set shiftwidth=2 tabstop=8 expandtab:18686 * :indentSize=2:tabSize=8:noTabs=true:18687 */
/builds/wireshark/wireshark/epan/dissectors/packet-rtps.c (2024)
Top Articles
Latest Posts
Article information

Author: Jamar Nader

Last Updated:

Views: 5982

Rating: 4.4 / 5 (75 voted)

Reviews: 82% of readers found this page helpful

Author information

Name: Jamar Nader

Birthday: 1995-02-28

Address: Apt. 536 6162 Reichel Greens, Port Zackaryside, CT 22682-9804

Phone: +9958384818317

Job: IT Representative

Hobby: Scrapbooking, Hiking, Hunting, Kite flying, Blacksmithing, Video gaming, Foraging

Introduction: My name is Jamar Nader, I am a fine, shiny, colorful, bright, nice, perfect, curious person who loves writing and wants to share my knowledge and understanding with you.