Bug Summary

File:epan/dissectors/packet-rtps.c
Warning:line 14239, column 11
Access to field 'additional_authenticated_data' results in a dereference of a null pointer (loaded from variable 'decryption_info')

Annotated Source Code

Press '?' to see keyboard shortcuts

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 -fno-delete-null-pointer-checks -mframe-pointer=all -relaxed-aliasing -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 -fdebug-compilation-dir=/builds/wireshark/wireshark/build -fcoverage-compilation-dir=/builds/wireshark/wireshark/build -resource-dir /usr/lib/llvm-20/lib/clang/20 -isystem /usr/include/glib-2.0 -isystem /usr/lib/x86_64-linux-gnu/glib-2.0/include -isystem /builds/wireshark/wireshark/epan/dissectors -isystem /builds/wireshark/wireshark/build/epan/dissectors -isystem /usr/include/mit-krb5 -isystem /usr/include/libxml2 -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 -D _GLIBCXX_ASSERTIONS -internal-isystem /usr/lib/llvm-20/lib/clang/20/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../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-format-truncation -Wno-format-nonliteral -Wno-pointer-sign -std=gnu11 -ferror-limit 19 -fvisibility=hidden -fwrapv -fwrapv-pointer -fstrict-flex-arrays=3 -stack-protector 2 -fstack-clash-protection -fcf-protection=full -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -fexceptions -fcolor-diagnostics -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /builds/wireshark/wireshark/sbout/2025-09-13-101102-3933-1 -x c /builds/wireshark/wireshark/epan/dissectors/packet-rtps.c
1/* packet-rtps.c
2 * ~~~~~~~~~~~~~
3 *
4 * Routines for Real-Time Publish-Subscribe Protocol (RTPS) dissection
5 *
6 * (c) 2005-2014 Copyright, Real-Time Innovations, Inc.
7 * Real-Time Innovations, Inc.
8 * 232 East Java Drive
9 * Sunnyvale, CA 94089
10 *
11 * Copyright 2003, LUKAS POKORNY <[email protected]>
12 * PETR SMOLIK <[email protected]>
13 * ZDENEK SEBEK <[email protected]>
14 *
15 * Czech Technical University in Prague
16 * Faculty of Electrical Engineering <www.fel.cvut.cz>
17 * Department of Control Engineering <dce.felk.cvut.cz>
18 *
19 * Wireshark - Network traffic analyzer
20 * By Gerald Combs <[email protected]>
21 * Copyright 1998 Gerald Combs
22 *
23 * SPDX-License-Identifier: GPL-2.0-or-later
24 *
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 wire
30 * 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-07
37 *
38 * NDDS and RTPS information: http://www.rti.com/resources.html
39 *
40 * Vendor ID listing can be found at:
41 * https://www.dds-foundation.org/dds-rtps-vendor-and-product-ids/
42 */
43
44#define WS_LOG_DOMAIN"packet-rtps" "packet-rtps"
45
46#include "config.h"
47#include <wireshark.h>
48
49#include <epan/packet.h>
50#include <epan/expert.h>
51#include <epan/prefs.h>
52#include "packet-rtps.h"
53#include <epan/addr_resolv.h>
54#include <epan/exceptions.h>
55#include <epan/proto_data.h>
56#include <epan/reassemble.h>
57#include <epan/tfs.h>
58#include <epan/unit_strings.h>
59
60#include <wsutil/array.h>
61#if defined(HAVE_ZLIB1) && !defined(HAVE_ZLIBNG)
62#define ZLIB_CONST
63#define ZLIB_PREFIX(x)x x
64#include <zlib.h>
65typedef z_stream zlib_stream;
66#endif /* HAVE_ZLIB */
67
68#ifdef HAVE_ZLIBNG
69#define ZLIB_PREFIX(x)x zng_ ## x
70#include <zlib-ng.h>
71typedef zng_stream zlib_stream;
72#endif /* HAVE_ZLIBNG */
73
74#include <epan/crc32-tvb.h>
75#include <wsutil/crc32.h>
76#include <wsutil/str_util.h>
77#include <gcrypt.h>
78#include <uat.h>
79
80void proto_register_rtps(void);
81void proto_reg_handoff_rtps(void);
82
83#define MAX_GUID_PREFIX_SIZE(128) (128)
84#define MAX_GUID_SIZE(160) (160)
85#define GUID_SIZE(16) (16)
86#define MAX_VENDOR_ID_SIZE(128) (128)
87#define MAX_PARAM_SIZE(256) (256)
88#define MAX_TIMESTAMP_SIZE(128) (128)
89
90#define LONG_ALIGN(x)(x = (x+3)&0xfffffffc) (x = (x+3)&0xfffffffc)
91#define SHORT_ALIGN(x)(x = (x+1)&0xfffffffe) (x = (x+1)&0xfffffffe)
92#define MAX_ARRAY_DIMENSION10 10
93#define ALIGN_ME(offset, alignment)offset = (((offset) + ((alignment) - 1)) & ~((alignment) -
1))
\
94 offset = (((offset) + ((alignment) - 1)) & ~((alignment) - 1))
95#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)
96
97#define KEY_COMMENT(" //@key") (" //@key")
98
99#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)
100#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)
101
102#define DISSECTION_INFO_MAX_ELEMENTS_DEFAULT_VALUE(100) (100)
103#define DISSECTION_INFO_ARRAY_MAX_ELEMENTS_DEFAULT_VALUE(100) (100)
104#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."
105#define MAX_MEMBER_NAME(256) (256)
106#define HASHMAP_DISCRIMINATOR_CONSTANT(-2) (-2)
107#define UUID_SIZE(9) (9)
108#define LONG_ADDRESS_SIZE(16) (16)
109
110#define INSTANCE_STATE_DATA_RESPONSE_NUM_ELEMENTS7 7
111#define SEQUENCE_100_IINSTANCE_TRANSITION_DATA_BOUND100 100
112#define INSTANCE_TRANSITION_DATA_NUM_ELEMENTS4 4
113#define GUID_T_NUM_ELEMENTS1 1
114#define VALUE_NUM_ELEMENTS16 16
115#define KEY_HAS_VALUE_NUM_ELEMENTS16 16
116#define NTPTIME_T_NUM_ELEMENTS2 2
117#define SEQUENCE_NUMBER_T_NUM_ELEMENTS2 2
118#define SECURE_TAG_COMMON_AND_SPECIFIC_MAC_LENGTH16 16 /* bytes. */
119
120typedef struct _union_member_mapping {
121 uint64_t union_type_id;
122 uint64_t member_type_id;
123 int32_t discriminator;
124 char member_name[MAX_MEMBER_NAME(256)];
125} union_member_mapping;
126
127typedef struct _mutable_member_mapping {
128 int64_t key;
129 uint64_t struct_type_id;
130 uint64_t member_type_id;
131 uint32_t member_id;
132 char member_name[MAX_MEMBER_NAME(256)];
133} mutable_member_mapping;
134
135typedef struct _dissection_element {
136 uint64_t type_id;
137 uint16_t flags;
138 uint32_t member_id;
139 char member_name[MAX_MEMBER_NAME(256)];
140} dissection_element;
141
142typedef enum {
143 EXTENSIBILITY_INVALID = 1,
144 EXTENSIBILITY_FINAL,
145 EXTENSIBILITY_EXTENSIBLE,
146 EXTENSIBILITY_MUTABLE
147} RTICdrTypeObjectExtensibility;
148
149typedef struct _dissection_info {
150 uint64_t type_id;
151 int member_kind;
152 uint64_t base_type_id;
153 uint32_t member_length;
154 char member_name[MAX_MEMBER_NAME(256)];
155
156 RTICdrTypeObjectExtensibility extensibility;
157
158 int32_t bound;
159 uint32_t num_elements;
160 dissection_element* elements;
161
162} dissection_info;
163
164
165typedef struct _submessage_col_info {
166 const char* status_info;
167 const char* topic_name;
168 const char* data_session_kind;
169} submessage_col_info;
170
171typedef enum {
172 RTI_CDR_TK_NULL = 0,
173 RTI_CDR_TK_SHORT,
174 RTI_CDR_TK_LONG,
175 RTI_CDR_TK_USHORT,
176 RTI_CDR_TK_ULONG,
177 RTI_CDR_TK_FLOAT,
178 RTI_CDR_TK_DOUBLE,
179 RTI_CDR_TK_BOOLEAN,
180 RTI_CDR_TK_CHAR,
181 RTI_CDR_TK_OCTET,
182 RTI_CDR_TK_STRUCT,
183 RTI_CDR_TK_UNION,
184 RTI_CDR_TK_ENUM,
185 RTI_CDR_TK_STRING,
186 RTI_CDR_TK_SEQUENCE,
187 RTI_CDR_TK_ARRAY,
188 RTI_CDR_TK_ALIAS,
189 RTI_CDR_TK_LONGLONG,
190 RTI_CDR_TK_ULONGLONG,
191 RTI_CDR_TK_LONGDOUBLE,
192 RTI_CDR_TK_WCHAR,
193 RTI_CDR_TK_WSTRING,
194 RTI_CDR_TK_VALUE,
195 RTI_CDR_TK_VALUE_PARAM
196} RTICdrTCKind;
197
198typedef enum {
199 RTI_CDR_TYPE_OBJECT_TYPE_KIND_NO_TYPE=0,
200 RTI_CDR_TYPE_OBJECT_TYPE_KIND_BOOLEAN_TYPE=1,
201 RTI_CDR_TYPE_OBJECT_TYPE_KIND_BYTE_TYPE=2,
202 RTI_CDR_TYPE_OBJECT_TYPE_KIND_INT_16_TYPE=3,
203 RTI_CDR_TYPE_OBJECT_TYPE_KIND_UINT_16_TYPE=4,
204 RTI_CDR_TYPE_OBJECT_TYPE_KIND_INT_32_TYPE=5,
205 RTI_CDR_TYPE_OBJECT_TYPE_KIND_UINT_32_TYPE=6,
206 RTI_CDR_TYPE_OBJECT_TYPE_KIND_INT_64_TYPE=7,
207 RTI_CDR_TYPE_OBJECT_TYPE_KIND_UINT_64_TYPE=8,
208 RTI_CDR_TYPE_OBJECT_TYPE_KIND_FLOAT_32_TYPE=9,
209 RTI_CDR_TYPE_OBJECT_TYPE_KIND_FLOAT_64_TYPE=10,
210 RTI_CDR_TYPE_OBJECT_TYPE_KIND_FLOAT_128_TYPE=11,
211 RTI_CDR_TYPE_OBJECT_TYPE_KIND_CHAR_8_TYPE=12,
212 RTI_CDR_TYPE_OBJECT_TYPE_KIND_CHAR_32_TYPE=13,
213 RTI_CDR_TYPE_OBJECT_TYPE_KIND_ENUMERATION_TYPE=14,
214 RTI_CDR_TYPE_OBJECT_TYPE_KIND_BITSET_TYPE=15,
215 RTI_CDR_TYPE_OBJECT_TYPE_KIND_ALIAS_TYPE=16,
216 RTI_CDR_TYPE_OBJECT_TYPE_KIND_ARRAY_TYPE=17,
217 RTI_CDR_TYPE_OBJECT_TYPE_KIND_SEQUENCE_TYPE=18,
218 RTI_CDR_TYPE_OBJECT_TYPE_KIND_STRING_TYPE=19,
219 RTI_CDR_TYPE_OBJECT_TYPE_KIND_MAP_TYPE=20,
220 RTI_CDR_TYPE_OBJECT_TYPE_KIND_UNION_TYPE=21,
221 RTI_CDR_TYPE_OBJECT_TYPE_KIND_STRUCTURE_TYPE=22,
222 RTI_CDR_TYPE_OBJECT_TYPE_KIND_ANNOTATION_TYPE=23,
223 RTI_CDR_TYPE_OBJECT_TYPE_KIND_MODULE=24
224} RTICdrTypeObjectTypeKind;
225
226typedef struct _rtps_dissector_data {
227 uint16_t encapsulation_id;
228 /* Represents the position of a sample within a batch. Since the
229 position can be 0, we use -1 as not valid (not a batch) */
230 int position_in_batch;
231} rtps_dissector_data;
232
233typedef struct _rtps_tvb_field {
234 tvbuff_t *tvb;
235 int tvb_offset;
236 int tvb_len;
237} rtps_tvb_field;
238
239static const value_string type_object_kind [] = {
240 { RTI_CDR_TYPE_OBJECT_TYPE_KIND_NO_TYPE, "NO_TYPE" },
241 { RTI_CDR_TYPE_OBJECT_TYPE_KIND_BOOLEAN_TYPE, "BOOLEAN_TYPE" },
242 { RTI_CDR_TYPE_OBJECT_TYPE_KIND_BYTE_TYPE, "BYTE_TYPE" },
243 { RTI_CDR_TYPE_OBJECT_TYPE_KIND_INT_16_TYPE, "INT_16_TYPE" },
244 { RTI_CDR_TYPE_OBJECT_TYPE_KIND_UINT_16_TYPE, "UINT_16_TYPE" },
245 { RTI_CDR_TYPE_OBJECT_TYPE_KIND_INT_32_TYPE, "INT_32_TYPE" },
246 { RTI_CDR_TYPE_OBJECT_TYPE_KIND_UINT_32_TYPE, "UINT_32_TYPE" },
247 { RTI_CDR_TYPE_OBJECT_TYPE_KIND_INT_64_TYPE, "INT_64_TYPE" },
248 { RTI_CDR_TYPE_OBJECT_TYPE_KIND_UINT_64_TYPE, "UINT_64_TYPE" },
249 { RTI_CDR_TYPE_OBJECT_TYPE_KIND_FLOAT_32_TYPE, "FLOAT_32_TYPE" },
250 { RTI_CDR_TYPE_OBJECT_TYPE_KIND_FLOAT_64_TYPE, "FLOAT_64_TYPE" },
251 { RTI_CDR_TYPE_OBJECT_TYPE_KIND_FLOAT_128_TYPE, "FLOAT_128_TYPE" },
252 { RTI_CDR_TYPE_OBJECT_TYPE_KIND_CHAR_8_TYPE, "CHAR_8_TYPE" },
253 { RTI_CDR_TYPE_OBJECT_TYPE_KIND_CHAR_32_TYPE, "CHAR_32_TYPE" },
254 { RTI_CDR_TYPE_OBJECT_TYPE_KIND_ENUMERATION_TYPE, "ENUMERATION_TYPE" },
255 { RTI_CDR_TYPE_OBJECT_TYPE_KIND_BITSET_TYPE, "BITSET_TYPE" },
256 { RTI_CDR_TYPE_OBJECT_TYPE_KIND_ALIAS_TYPE, "ALIAS_TYPE" },
257 { RTI_CDR_TYPE_OBJECT_TYPE_KIND_ARRAY_TYPE, "ARRAY_TYPE" },
258 { RTI_CDR_TYPE_OBJECT_TYPE_KIND_SEQUENCE_TYPE, "SEQUENCE_TYPE" },
259 { RTI_CDR_TYPE_OBJECT_TYPE_KIND_STRING_TYPE, "STRING_TYPE" },
260 { RTI_CDR_TYPE_OBJECT_TYPE_KIND_MAP_TYPE, "MAP_TYPE" },
261 { RTI_CDR_TYPE_OBJECT_TYPE_KIND_UNION_TYPE, "UNION_TYPE" },
262 { RTI_CDR_TYPE_OBJECT_TYPE_KIND_STRUCTURE_TYPE, "STRUCTURE_TYPE" },
263 { RTI_CDR_TYPE_OBJECT_TYPE_KIND_ANNOTATION_TYPE, "ANNOTATION_TYPE" },
264 { 0, NULL((void*)0) }
265};
266
267/*
268 * TypeKind and TypeIdentifier values from the OMG 'Extensible and Dynamic Topic
269 * Types for DDS' (DDS-XTypes) specification version 1.3, Annex B.
270 *
271 * EK_*: Equivalence Kind values, defining which equivalence relation is used
272 * TK_*: Type Kind values, categorizing the fundamental nature of types (e.g.,
273 * primitive, structure, collection).
274 * TI_*: Type Identifier Kind values, indicating specific formats or
275 * characteristics of type identifiers, mostly for collections.
276 */
277#define EK_MINIMAL(0xF1) (0xF1)
278#define EK_COMPLETE(0xF2) (0xF2)
279#define EK_BOTH(0xF3) (0xF3)
280#define TK_NONE(0x00) (0x00)
281#define TK_BOOLEAN(0x01) (0x01)
282#define TK_BYTE(0x02) (0x02)
283#define TK_INT16(0x03) (0x03)
284#define TK_INT32(0x04) (0x04)
285#define TK_INT64(0x05) (0x05)
286#define TK_UINT16(0x06) (0x06)
287#define TK_UINT32(0x07) (0x07)
288#define TK_UINT64(0x08) (0x08)
289#define TK_FLOAT32(0x09) (0x09)
290#define TK_FLOAT64(0x0A) (0x0A)
291#define TK_FLOAT128(0x0B) (0x0B)
292#define TK_INT8(0x0C) (0x0C)
293#define TK_UINT8(0x0D) (0x0D)
294#define TK_CHAR8(0x10) (0x10)
295#define TK_CHAR16(0x11) (0x11)
296#define TK_STRING8(0x20) (0x20)
297#define TK_STRING16(0x21) (0x21)
298#define TK_ALIAS(0x30) (0x30)
299#define TK_ENUM(0x40) (0x40)
300#define TK_BITMASK(0x41) (0x41)
301#define TK_ANNOTATION(0x50) (0x50)
302#define TK_STRUCTURE(0x51) (0x51)
303#define TK_UNION(0x52) (0x52)
304#define TK_BITSET(0x53) (0x53)
305#define TK_SEQUENCE(0x60) (0x60)
306#define TK_ARRAY(0x61) (0x61)
307#define TK_MAP(0x62) (0x62)
308#define TI_STRING8_SMALL(0x70) (0x70)
309#define TI_STRING8_LARGE(0x71) (0x71)
310#define TI_STRING16_SMALL(0x72) (0x72)
311#define TI_STRING16_LARGE(0x73) (0x73)
312#define TI_PLAIN_SEQUENCE_SMALL(0x80) (0x80)
313#define TI_PLAIN_SEQUENCE_LARGE(0x81) (0x81)
314#define TI_PLAIN_ARRAY_SMALL(0x90) (0x90)
315#define TI_PLAIN_ARRAY_LARGE(0x91) (0x91)
316#define TI_PLAIN_MAP_SMALL(0xA0) (0xA0)
317#define TI_PLAIN_MAP_LARGE(0xA1) (0xA1)
318#define TI_STRONGLY_CONNECTED_COMPONENT(0xB0) (0xB0)
319
320/*
321 * Maps numeric identifiers to their symbolic names for DDS-XTypes type identifiers
322 * These values correspond to the TypeKind and TypeIdentifier definitions in the OMG
323 * "Extensible and Dynamic Topic Types for DDS" specification (DDS-XTypes).
324 * The array includes mappings for primitive types (TK_*), string types,
325 * constructed/named types, enumerated types, structured types, collection types,
326 * extended type identifiers (TI_*), and equivalence kinds (EK_*).
327 */
328static const value_string type_id_discriminator_vals[] = {
329 /* TypeKinds (primitive types) */
330 { TK_NONE(0x00), "TK_NONE" },
331 { TK_BOOLEAN(0x01), "TK_BOOLEAN" },
332 { TK_BYTE(0x02), "TK_BYTE" },
333 { TK_INT16(0x03), "TK_INT16" },
334 { TK_INT32(0x04), "TK_INT32" },
335 { TK_INT64(0x05), "TK_INT64" },
336 { TK_UINT16(0x06), "TK_UINT16" },
337 { TK_UINT32(0x07), "TK_UINT32" },
338 { TK_UINT64(0x08), "TK_UINT64" },
339 { TK_FLOAT32(0x09), "TK_FLOAT32" },
340 { TK_FLOAT64(0x0A), "TK_FLOAT64" },
341 { TK_FLOAT128(0x0B), "TK_FLOAT128" },
342 { TK_INT8(0x0C), "TK_INT8" },
343 { TK_UINT8(0x0D), "TK_UINT8" },
344 { TK_CHAR8(0x10), "TK_CHAR8" },
345 { TK_CHAR16(0x11), "TK_CHAR16" },
346
347 /* String TKs */
348 { TK_STRING8(0x20), "TK_STRING8" },
349 { TK_STRING16(0x21), "TK_STRING16" },
350
351 /* Constructed/Named types */
352 { TK_ALIAS(0x30), "TK_ALIAS" },
353
354 /* Enumerated TKs */
355 { TK_ENUM(0x40), "TK_ENUM" },
356 { TK_BITMASK(0x41), "TK_BITMASK" },
357
358 /* Structured TKs */
359 { TK_ANNOTATION(0x50), "TK_ANNOTATION" },
360 { TK_STRUCTURE(0x51), "TK_STRUCTURE" },
361 { TK_UNION(0x52), "TK_UNION" },
362 { TK_BITSET(0x53), "TK_BITSET" },
363
364 /* Collection TKs */
365 { TK_SEQUENCE(0x60), "TK_SEQUENCE" },
366 { TK_ARRAY(0x61), "TK_ARRAY" },
367 { TK_MAP(0x62), "TK_MAP" },
368
369 /* Extra TypeIdentifiers */
370 { TI_STRING8_SMALL(0x70), "TI_STRING8_SMALL" },
371 { TI_STRING8_LARGE(0x71), "TI_STRING8_LARGE" },
372 { TI_STRING16_SMALL(0x72), "TI_STRING16_SMALL" },
373 { TI_STRING16_LARGE(0x73), "TI_STRING16_LARGE" },
374
375 { TI_PLAIN_SEQUENCE_SMALL(0x80), "TI_PLAIN_SEQUENCE_SMALL" },
376 { TI_PLAIN_SEQUENCE_LARGE(0x81), "TI_PLAIN_SEQUENCE_LARGE" },
377
378 { TI_PLAIN_ARRAY_SMALL(0x90), "TI_PLAIN_ARRAY_SMALL" },
379 { TI_PLAIN_ARRAY_LARGE(0x91), "TI_PLAIN_ARRAY_LARGE" },
380
381 { TI_PLAIN_MAP_SMALL(0xA0), "TI_PLAIN_MAP_SMALL" },
382 { TI_PLAIN_MAP_LARGE(0xA1), "TI_PLAIN_MAP_LARGE" },
383
384 { TI_STRONGLY_CONNECTED_COMPONENT(0xB0), "TI_STRONGLY_CONNECTED_COMPONENT" },
385
386 /* Equivalence Kinds */
387 { EK_MINIMAL(0xF1), "EK_MINIMAL" },
388 { EK_COMPLETE(0xF2), "EK_COMPLETE" },
389 { EK_BOTH(0xF3), "EK_BOTH" },
390 {0, NULL((void*)0)}
391};
392
393/*
394 * Remote exception codes used by the DDS-XTypes type lookup service.
395 * These values indicate the error conditions that can occur during
396 * remote type lookup operations between DDS participants,
397 * as defined in the OMG "Extensible and Dynamic Topic Types for DDS"
398 * specification.
399 */
400static const value_string remote_exception_code_vals[] = {
401 { 0, "REMOTE_EX_OK" },
402 { 1, "REMOTE_EX_UNSUPPORTED" },
403 { 2, "REMOTE_EX_INVALID_ARGUMENT" },
404 { 3, "REMOTE_EX_OUT_OF_RESOURCES" },
405 { 4, "REMOTE_EX_UNKNOWN_OPERATION" },
406 { 5, "REMOTE_EX_UNKNOWN_EXCEPTION" },
407 { 0, NULL((void*)0)}
408};
409
410static const value_string try_construct_vals[] = {
411 { 0, "INVALID" },
412 { 1, "DISCARD" },
413 { 2, "USE_DEFAULT" },
414 { 3, "TRIM" },
415 {0, NULL((void*)0)}
416};
417
418/*
419 * Type lookup service discriminator values used in the DDS-XTypes specification
420 * These hexadecimal constants are hash values derived from string identifiers
421 * using the @hashid annotation in the IDL definition. They identify different
422 * operations and data fields in the type lookup mechanism of the RTPS protocol,
423 * which enables dynamic discovery of data types between DDS participants. Each
424 * value serves as a discriminator in the type lookup request/reply messages.
425 */
426#define GET_TYPES(0x018252d3) (0x018252d3)
427#define GET_TYPE_DEPENDENCIES(0x05aafb31) (0x05aafb31)
428static const value_string type_lookup_discriminator_vals[] = {
429 { GET_TYPES(0x018252d3), "GET_TYPES" },
430 { GET_TYPE_DEPENDENCIES(0x05aafb31), "GET_TYPE_DEPENDENCIES" },
431 { 0, NULL((void*)0) }
432};
433
434static wmem_map_t * dissection_infos;
435static wmem_map_t * builtin_dissection_infos;
436static wmem_map_t * union_member_mappings;
437static wmem_map_t * mutable_member_mappings;
438
439/***************************************************************************/
440/* Preferences */
441/***************************************************************************/
442static unsigned rtps_max_batch_samples_dissected = 16;
443static unsigned rtps_max_data_type_elements = DISSECTION_INFO_MAX_ELEMENTS_DEFAULT_VALUE(100);
444static unsigned rtps_max_array_data_type_elements = DISSECTION_INFO_ARRAY_MAX_ELEMENTS_DEFAULT_VALUE(100);
445static bool_Bool enable_topic_info = true1;
446static bool_Bool enable_debug_info = false0;
447static bool_Bool enable_rtps_reassembly = false0;
448static bool_Bool enable_user_data_dissection = false0;
449static bool_Bool enable_max_array_data_type_elements = true1;
450static bool_Bool enable_max_data_type_elements = true1;
451static bool_Bool enable_rtps_crc_check = false0;
452static bool_Bool enable_rtps_psk_decryption = false0;
453static dissector_table_t rtps_type_name_table;
454
455/***************************************************************************/
456/* Variable definitions */
457/***************************************************************************/
458#define RTPS_MAGIC_NUMBER0x52545053 0x52545053 /* RTPS */
459#define RTPX_MAGIC_NUMBER0x52545058 0x52545058 /* RTPX */
460#define RTPS_SEQUENCENUMBER_UNKNOWN0xffffffff00000000 0xffffffff00000000 /* {-1,0} as uint64 */
461
462#define RTPS_TOPIC_QUERY_SELECTION_KIND_HISTORY_SNAPSHOT0 0
463#define RTPS_TOPIC_QUERY_SELECTION_KIND_CONTINUOUS1 1
464
465/* Traffic type */
466#define PORT_BASE(7400) (7400)
467#define DOMAIN_GAIN(250) (250)
468#define PORT_METATRAFFIC_UNICAST(0) (0)
469#define PORT_USERTRAFFIC_MULTICAST(1) (1)
470#define PORT_METATRAFFIC_MULTICAST(2) (2)
471#define PORT_USERTRAFFIC_UNICAST(3) (3)
472
473/* Flags defined in the 'flag' bitmask of a submessage */
474#define FLAG_E(0x01) (0x01) /* Common to all the submessages */
475#define FLAG_DATA_D(0x02) (0x02)
476#define FLAG_DATA_D_v2(0x04) (0x04)
477#define FLAG_DATA_A(0x04) (0x04)
478#define FLAG_DATA_H(0x08) (0x08)
479#define FLAG_DATA_Q(0x10) (0x10)
480#define FLAG_DATA_Q_v2(0x02) (0x02)
481#define FLAG_DATA_FRAG_Q(0x02) (0x02)
482#define FLAG_DATA_FRAG_H(0x04) (0x04)
483#define FLAG_DATA_I(0x10) (0x10)
484#define FLAG_DATA_U(0x20) (0x20)
485#define FLAG_NOKEY_DATA_Q(0x02) (0x02)
486#define FLAG_NOKEY_DATA_D(0x04) (0x04)
487#define FLAG_ACKNACK_F(0x02) (0x02)
488#define FLAG_HEARTBEAT_F(0x02) (0x02)
489#define FLAG_GAP_F(0x02) (0x02)
490#define FLAG_INFO_TS_T(0x02) (0x02)
491#define FLAG_INFO_REPLY_IP4_M(0x02) (0x02)
492#define FLAG_INFO_REPLY_M(0x02) (0x02)
493#define FLAG_RTPS_DATA_Q(0x02) (0x02)
494#define FLAG_RTPS_DATA_D(0x04) (0x04)
495#define FLAG_RTPS_DATA_K(0x08) (0x08)
496#define FLAG_RTPS_DATA_FRAG_Q(0x02) (0x02)
497#define FLAG_RTPS_DATA_FRAG_K(0x04) (0x04)
498#define FLAG_RTPS_DATA_BATCH_Q(0x02) (0x02)
499#define FLAG_SAMPLE_INFO_T(0x01) (0x01)
500#define FLAG_SAMPLE_INFO_Q(0x02) (0x02)
501#define FLAG_SAMPLE_INFO_O(0x04) (0x04)
502#define FLAG_SAMPLE_INFO_D(0x08) (0x08)
503#define FLAG_SAMPLE_INFO_I(0x10) (0x10)
504#define FLAG_SAMPLE_INFO_K(0x20) (0x20)
505
506#define FLAG_VIRTUAL_HEARTBEAT_V(0x02) (0x02)
507#define FLAG_VIRTUAL_HEARTBEAT_W(0x04) (0x04)
508#define FLAG_VIRTUAL_HEARTBEAT_N(0x08) (0x08)
509
510/* UDPv4 WAN Transport locator flags */
511#define FLAG_UDPV4_WAN_LOCATOR_U(0x01) (0x01)
512#define FLAG_UDPV4_WAN_LOCATOR_P(0x02) (0x02)
513#define FLAG_UDPV4_WAN_LOCATOR_B(0x04) (0x04)
514#define FLAG_UDPV4_WAN_LOCATOR_R(0x08) (0x08)
515
516/* UDP WAN BINDING_PING submessage flags */
517#define FLAG_UDPV4_WAN_BINDING_PING_FLAG_E(0x01) (0x01)
518#define FLAG_UDPV4_WAN_BINDING_PING_FLAG_L(0x02) (0x02)
519#define FLAG_UDPV4_WAN_BINDING_PING_FLAG_B(0x04) (0x04)
520
521
522/* The following PIDs are defined since RTPS 1.0 */
523#define PID_PAD(0x00) (0x00)
524#define PID_SENTINEL(0x01) (0x01)
525#define PID_PARTICIPANT_LEASE_DURATION(0x02) (0x02)
526#define PID_TIME_BASED_FILTER(0x04) (0x04)
527#define PID_TOPIC_NAME(0x05) (0x05)
528#define PID_OWNERSHIP_STRENGTH(0x06) (0x06)
529#define PID_TYPE_NAME(0x07) (0x07)
530#define PID_METATRAFFIC_MULTICAST_IPADDRESS(0x0b) (0x0b)
531#define PID_DEFAULT_UNICAST_IPADDRESS(0x0c) (0x0c)
532#define PID_METATRAFFIC_UNICAST_PORT(0x0d) (0x0d)
533#define PID_DEFAULT_UNICAST_PORT(0x0e) (0x0e)
534#define PID_MULTICAST_IPADDRESS(0x11) (0x11)
535#define PID_PROTOCOL_VERSION(0x15) (0x15)
536#define PID_VENDOR_ID(0x16) (0x16)
537#define PID_RELIABILITY(0x1a) (0x1a)
538#define PID_LIVELINESS(0x1b) (0x1b)
539#define PID_DURABILITY(0x1d) (0x1d)
540#define PID_DURABILITY_SERVICE(0x1e) (0x1e)
541#define PID_OWNERSHIP(0x1f) (0x1f)
542#define PID_PRESENTATION(0x21) (0x21)
543#define PID_DEADLINE(0x23) (0x23)
544#define PID_DESTINATION_ORDER(0x25) (0x25)
545#define PID_LATENCY_BUDGET(0x27) (0x27)
546#define PID_PARTITION(0x29) (0x29)
547#define PID_LIFESPAN(0x2b) (0x2b)
548#define PID_USER_DATA(0x2c) (0x2c)
549#define PID_GROUP_DATA(0x2d) (0x2d)
550#define PID_TOPIC_DATA(0x2e) (0x2e)
551#define PID_UNICAST_LOCATOR(0x2f) (0x2f)
552#define PID_MULTICAST_LOCATOR(0x30) (0x30)
553#define PID_DEFAULT_UNICAST_LOCATOR(0x31) (0x31)
554#define PID_METATRAFFIC_UNICAST_LOCATOR(0x32) (0x32)
555#define PID_METATRAFFIC_MULTICAST_LOCATOR(0x33) (0x33)
556#define PID_PARTICIPANT_MANUAL_LIVELINESS_COUNT(0x34) (0x34)
557#define PID_CONTENT_FILTER_PROPERTY(0x35) (0x35)
558#define PID_PROPERTY_LIST_OLD(0x36) (0x36) /* For compatibility between 4.2d and 4.2e */
559#define PID_HISTORY(0x40) (0x40)
560#define PID_RESOURCE_LIMIT(0x41) (0x41)
561#define PID_EXPECTS_INLINE_QOS(0x43) (0x43)
562#define PID_PARTICIPANT_BUILTIN_ENDPOINTS(0x44) (0x44)
563#define PID_METATRAFFIC_UNICAST_IPADDRESS(0x45) (0x45)
564#define PID_METATRAFFIC_MULTICAST_PORT(0x46) (0x46)
565#define PID_TYPECODE(0x47) (0x47)
566#define PID_PARTICIPANT_GUID(0x50) (0x50)
567#define PID_PARTICIPANT_ENTITY_ID(0x51) (0x51)
568#define PID_GROUP_GUID(0x52) (0x52)
569#define PID_GROUP_ENTITY_ID(0x53) (0x53)
570#define PID_FILTER_SIGNATURE(0x55) (0x55)
571#define PID_COHERENT_SET(0x56) (0x56)
572#define PID_GROUP_COHERENT_SET(0x0063) (0x0063)
573#define PID_END_COHERENT_SET(0x8022) (0x8022)
574#define PID_END_GROUP_COHERENT_SET(0x8023) (0x8023)
575#define MIG_RTPS_PID_END_COHERENT_SET_SAMPLE_COUNT(0x8024) (0x8024)
576
577/* The following QoS are deprecated */
578#define PID_PERSISTENCE(0x03) (0x03)
579#define PID_TYPE_CHECKSUM(0x08) (0x08)
580#define PID_TYPE2_NAME(0x09) (0x09)
581#define PID_TYPE2_CHECKSUM(0x0a) (0x0a)
582#define PID_EXPECTS_ACK(0x10) (0x10)
583#define PID_MANAGER_KEY(0x12) (0x12)
584#define PID_SEND_QUEUE_SIZE(0x13) (0x13)
585#define PID_RELIABILITY_ENABLED(0x14) (0x14)
586#define PID_RECV_QUEUE_SIZE(0x18) (0x18)
587#define PID_VARGAPPS_SEQUENCE_NUMBER_LAST(0x17) (0x17)
588#define PID_RELIABILITY_OFFERED(0x19) (0x19)
589#define PID_LIVELINESS_OFFERED(0x1c) (0x1c)
590#define PID_OWNERSHIP_OFFERED(0x20) (0x20)
591#define PID_PRESENTATION_OFFERED(0x22) (0x22)
592#define PID_DEADLINE_OFFERED(0x24) (0x24)
593#define PID_DESTINATION_ORDER_OFFERED(0x26) (0x26)
594#define PID_LATENCY_BUDGET_OFFERED(0x28) (0x28)
595#define PID_PARTITION_OFFERED(0x2a) (0x2a)
596
597/* The following PIDs are defined since RTPS 2.0 */
598#define PID_DEFAULT_MULTICAST_LOCATOR(0x0048) (0x0048)
599#define PID_TRANSPORT_PRIORITY(0x0049) (0x0049)
600#define PID_CONTENT_FILTER_INFO(0x0055) (0x0055)
601#define PID_DIRECTED_WRITE(0x0057) (0x0057)
602#define PID_BUILTIN_ENDPOINT_SET(0x0058) (0x0058)
603#define PID_PROPERTY_LIST(0x0059) (0x0059) /* RTI DDS 4.2e and newer */
604#define PID_ENDPOINT_GUID(0x005a) (0x005a)
605#define PID_TYPE_MAX_SIZE_SERIALIZED(0x0060) (0x0060)
606#define PID_ORIGINAL_WRITER_INFO(0x0061) (0x0061)
607#define PID_ENTITY_NAME(0x0062) (0x0062)
608#define PID_KEY_HASH(0x0070) (0x0070)
609#define PID_STATUS_INFO(0x0071) (0x0071)
610#define PID_TYPE_OBJECT(0x0072) (0x0072)
611#define PID_DATA_REPRESENTATION(0x0073) (0x0073)
612#define PID_TYPE_CONSISTENCY(0x0074) (0x0074)
613#define PID_TYPE_INFORMATION(0x0075) (0x0075) /* XTypes 1.2 and newer */
614#define PID_BASE_TYPE_NAME(0x0076) (0x0076)
615#define PID_BUILTIN_ENDPOINT_QOS(0x0077) (0x0077)
616#define PID_ENABLE_AUTHENTICATION(0x0078) (0x0078)
617#define PID_RELATED_ENTITY_GUID(0x0081) (0x0081)
618#define PID_RELATED_ORIGINAL_WRITER_INFO(0x0083) (0x0083)/* inline QoS */
619#define PID_DOMAIN_ID(0x000f) (0x000f)
620#define PID_DOMAIN_TAG(0x4014) (0x4014)
621
622/* Vendor-specific: RTI */
623#define PID_PRODUCT_VERSION(0x8000) (0x8000)
624#define PID_PLUGIN_PROMISCUITY_KIND(0x8001) (0x8001)
625#define PID_ENTITY_VIRTUAL_GUID(0x8002) (0x8002)
626#define PID_SERVICE_KIND(0x8003) (0x8003)
627#define PID_TYPECODE_RTPS2(0x8004) (0x8004) /* Was: 0x47 in RTPS 1.2 */
628#define PID_DISABLE_POSITIVE_ACKS(0x8005) (0x8005)
629#define PID_LOCATOR_FILTER_LIST(0x8006) (0x8006)
630#define PID_EXPECTS_VIRTUAL_HB(0x8009) (0x8009)
631#define PID_ROLE_NAME(0x800a) (0x800a)
632#define PID_ACK_KIND(0x800b) (0x800b)
633#define PID_PEER_HOST_EPOCH(0x800e) (0x800e)
634#define PID_RELATED_ORIGINAL_WRITER_INFO_LEGACY(0x800f) (0x800f)/* inline QoS */
635#define PID_RTI_DOMAIN_ID(0x800f) (0x800f)
636#define PID_RELATED_READER_GUID(0x8010) (0x8010)/* inline QoS */
637#define PID_TRANSPORT_INFO_LIST(0x8010) (0x8010)
638#define PID_SOURCE_GUID(0x8011) (0x8011)/* inline QoS */
639#define PID_DIRECT_COMMUNICATION(0x8011) (0x8011)
640#define PID_RELATED_SOURCE_GUID(0x8012) (0x8012)/* inline QoS */
641#define PID_TOPIC_QUERY_GUID(0x8013) (0x8013)/* inline QoS */
642#define PID_TOPIC_QUERY_PUBLICATION(0x8014) (0x8014)
643#define PID_ENDPOINT_PROPERTY_CHANGE_EPOCH(0x8015) (0x8015)
644#define PID_REACHABILITY_LEASE_DURATION(0x8016) (0x8016)
645#define PID_VENDOR_BUILTIN_ENDPOINT_SET(0x8017) (0x8017)
646#define PID_ENDPOINT_SECURITY_ATTRIBUTES(0x8018) (0x8018)
647#define PID_SAMPLE_SIGNATURE(0x8019) (0x8019)/* inline QoS */
648#define PID_EXTENDED(0x3f01) (0x3f01)
649#define PID_LIST_END(0x3f02) (0x3f02)
650#define PID_UNICAST_LOCATOR_EX(0x8007) (0x8007)
651#define PID_TOPIC_NAME_ALIASES(0x8028) (0x8028)
652#define PID_TYPE_NAME_ALIASES(0x8029) (0x8029)
653
654#define PID_IDENTITY_TOKEN(0x1001) (0x1001)
655#define PID_PERMISSIONS_TOKEN(0x1002) (0x1002)
656#define PID_DATA_TAGS(0x1003) (0x1003)
657#define PID_ENDPOINT_SECURITY_INFO(0x1004) (0x1004)
658#define PID_PARTICIPANT_SECURITY_INFO(0x1005) (0x1005)
659#define PID_IDENTITY_STATUS_TOKEN(0x1006) (0x1006)
660#define PID_AVAILABLE_BUILTIN_ENDPOINTS_EXT(0x1007) (0x1007)
661#define PID_PARTICIPANT_SECURITY_DIGITAL_SIGNATURE_ALGO(0x1010) (0x1010)
662#define PID_PARTICIPANT_SECURITY_KEY_ESTABLISHMENT_ALGO(0x1011) (0x1011)
663#define PID_PARTICIPANT_SECURITY_SYMMETRIC_CIPHER_ALGO(0x1012) (0x1012)
664#define PID_ENDPOINT_SECURITY_SYMMETRIC_CIPHER_ALGO(0x1013) (0x1013)
665
666#define PID_TYPE_OBJECT_LB(0x8021) (0x8021)
667
668/* Vendor-specific: ADLink */
669#define PID_ADLINK_WRITER_INFO(0x8001) (0x8001)
670#define PID_ADLINK_READER_DATA_LIFECYCLE(0x8002) (0x8002)
671#define PID_ADLINK_WRITER_DATA_LIFECYCLE(0x8003) (0x8003)
672#define PID_ADLINK_ENDPOINT_GUID(0x8004) (0x8004)
673#define PID_ADLINK_SYNCHRONOUS_ENDPOINT(0x8005) (0x8005)
674#define PID_ADLINK_RELAXED_QOS_MATCHING(0x8006) (0x8006)
675#define PID_ADLINK_PARTICIPANT_VERSION_INFO(0x8007) (0x8007)
676#define PID_ADLINK_NODE_NAME(0x8008) (0x8008)
677#define PID_ADLINK_EXEC_NAME(0x8009) (0x8009)
678#define PID_ADLINK_PROCESS_ID(0x800a) (0x800a)
679#define PID_ADLINK_SERVICE_TYPE(0x800b) (0x800b)
680#define PID_ADLINK_ENTITY_FACTORY(0x800c) (0x800c)
681#define PID_ADLINK_WATCHDOG_SCHEDULING(0x800d) (0x800d)
682#define PID_ADLINK_LISTENER_SCHEDULING(0x800e) (0x800e)
683#define PID_ADLINK_SUBSCRIPTION_KEYS(0x800f) (0x800f)
684#define PID_ADLINK_READER_LIFESPAN(0x8010) (0x8010)
685#define PID_ADLINK_SHARE(0x8011) (0x8011)
686#define PID_ADLINK_TYPE_DESCRIPTION(0x8012) (0x8012)
687#define PID_ADLINK_LAN_ID(0x8013) (0x8013)
688#define PID_ADLINK_ENDPOINT_GID(0x8014) (0x8014)
689#define PID_ADLINK_GROUP_GID(0x8015) (0x8015)
690#define PID_ADLINK_EOTINFO(0x8016) (0x8016)
691#define PID_ADLINK_PART_CERT_NAME(0x8017) (0x8017)
692#define PID_ADLINK_LAN_CERT_NAME(0x8018) (0x8018)
693
694/* appId.appKind possible values */
695#define APPKIND_UNKNOWN(0x00) (0x00)
696#define APPKIND_MANAGED_APPLICATION(0x01) (0x01)
697#define APPKIND_MANAGER(0x02) (0x02)
698
699#define RTI_SERVICE_REQUEST_ID_UNKNOWN0 0
700#define RTI_SERVICE_REQUEST_ID_TOPIC_QUERY1 1
701#define RTI_SERVICE_REQUEST_ID_LOCATOR_REACHABILITY2 2
702#define RTI_SERVICE_REQUEST_ID_INSTANCE_STATE3 3
703
704/* Predefined EntityId */
705#define ENTITYID_UNKNOWN(0x00000000) (0x00000000)
706#define ENTITYID_PARTICIPANT(0x000001c1) (0x000001c1)
707#define ENTITYID_BUILTIN_TOPIC_WRITER(0x000002c2) (0x000002c2)
708#define ENTITYID_BUILTIN_TOPIC_READER(0x000002c7) (0x000002c7)
709#define ENTITYID_BUILTIN_PUBLICATIONS_WRITER(0x000003c2) (0x000003c2)
710#define ENTITYID_BUILTIN_PUBLICATIONS_READER(0x000003c7) (0x000003c7)
711#define ENTITYID_BUILTIN_SUBSCRIPTIONS_WRITER(0x000004c2) (0x000004c2)
712#define ENTITYID_BUILTIN_SUBSCRIPTIONS_READER(0x000004c7) (0x000004c7)
713#define ENTITYID_BUILTIN_PARTICIPANT_WRITER(0x000100c2) (0x000100c2)
714#define ENTITYID_BUILTIN_PARTICIPANT_READER(0x000100c7) (0x000100c7)
715#define ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_WRITER(0x000200c2) (0x000200c2)
716#define ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_READER(0x000200c7) (0x000200c7)
717#define ENTITYID_TL_SVC_REQ_WRITER(0x000300c3) (0x000300c3)
718#define ENTITYID_TL_SVC_REQ_READER(0x000300c4) (0x000300c4)
719#define ENTITYID_TL_SVC_REPLY_WRITER(0x000301c3) (0x000301c3)
720#define ENTITYID_TL_SVC_REPLY_READER(0x000301c4) (0x000301c4)
721#define ENTITYID_TL_SVC_REQ_SECURE_WRITER(0xff0300c3) (0xff0300c3)
722#define ENTITYID_TL_SVC_REQ_SECURE_READER(0xff0300c4) (0xff0300c4)
723#define ENTITYID_TL_SVC_REPLY_SECURE_WRITER(0xff0301c3) (0xff0301c3)
724#define ENTITYID_TL_SVC_REPLY_SECURE_READER(0xff0301c4) (0xff0301c4)
725#define ENTITYID_RTI_BUILTIN_PARTICIPANT_BOOTSTRAP_WRITER(0x00010082) (0x00010082)
726#define ENTITYID_RTI_BUILTIN_PARTICIPANT_BOOTSTRAP_READER(0x00010087) (0x00010087)
727#define ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_WRITER(0x00010182) (0x00010182)
728#define ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_READER(0x00010187) (0x00010187)
729#define ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_WRITER(0xff010182) (0xff010182)
730#define ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_READER(0xff010187) (0xff010187)
731
732
733#define ENTITYID_RESERVED_META_CST_GROUP_WRITER(0xcb) (0xcb)
734#define ENTITYID_RESERVED_META_GROUP_WRITER(0xcc) (0xcc)
735#define ENTITYID_RESERVED_META_GROUP_READER(0xcd) (0xcd)
736#define ENTITYID_RESERVED_META_CST_GROUP_READER(0xce) (0xce)
737#define ENTITYID_OBJECT_NORMAL_META_WRITER_GROUP(0x88) (0x88)
738#define ENTITYID_OBJECT_NORMAL_META_READER_GROUP(0x89) (0x89)
739#define ENTITYID_OBJECT_NORMAL_META_TOPIC(0x8a) (0x8a)
740#define ENTITYID_NORMAL_META_CST_GROUP_WRITER(0x8b) (0x8b)
741#define ENTITYID_NORMAL_META_GROUP_WRITER(0x8c) (0x8c)
742#define ENTITYID_NORMAL_META_GROUP_READER(0x8d) (0x8d)
743#define ENTITYID_NORMAL_META_CST_GROUP_READER(0x8e) (0x8e)
744#define ENTITYID_RESERVED_USER_CST_GROUP_WRITER(0x4b) (0x4b)
745#define ENTITYID_RESERVED_USER_GROUP_WRITER(0x4c) (0x4c)
746#define ENTITYID_RESERVED_USER_GROUP_READER(0x4d) (0x4d)
747#define ENTITYID_RESERVED_USER_CST_GROUP_READER(0x4e) (0x4e)
748#define ENTITYID_NORMAL_USER_CST_GROUP_WRITER(0x0b) (0x0b)
749#define ENTITYID_NORMAL_USER_GROUP_WRITER(0x0c) (0x0c)
750#define ENTITYID_NORMAL_USER_GROUP_READER(0x0d) (0x0d)
751#define ENTITYID_NORMAL_USER_CST_GROUP_READER(0x0e) (0x0e)
752
753
754/* Secure DDS */
755#define ENTITYID_P2P_BUILTIN_PARTICIPANT_STATELESS_WRITER(0x000201c3) (0x000201c3)
756#define ENTITYID_P2P_BUILTIN_PARTICIPANT_STATELESS_READER(0x000201c4) (0x000201c4)
757#define ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_WRITER(0xff0003c2) (0xff0003c2)
758#define ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_READER(0xff0003c7) (0xff0003c7)
759#define ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_WRITER(0xff0004c2) (0xff0004c2)
760#define ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_READER(0xff0004c7) (0xff0004c7)
761#define ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_SECURE_WRITER(0xff0200c2) (0xff0200c2)
762#define ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_SECURE_READER(0xff0200c7) (0xff0200c7)
763#define ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_WRITER(0xff0202c3) (0xff0202c3)
764#define ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_READER(0xff0202c4) (0xff0202c4)
765#define ENTITYID_SPDP_RELIABLE_BUILTIN_PARTICIPANT_SECURE_WRITER(0xff0101c2) (0xff0101c2)
766#define ENTITYID_SPDP_RELIABLE_BUILTIN_PARTICIPANT_SECURE_READER(0xff0101c7) (0xff0101c7)
767
768/* Vendor-specific: RTI */
769#define ENTITYID_RTI_BUILTIN_SERVICE_REQUEST_WRITER(0x00020082) (0x00020082)
770#define ENTITYID_RTI_BUILTIN_SERVICE_REQUEST_READER(0x00020087) (0x00020087)
771#define ENTITYID_RTI_BUILTIN_LOCATOR_PING_WRITER(0x00020182) (0x00020182)
772#define ENTITYID_RTI_BUILTIN_LOCATOR_PING_READER(0x00020187) (0x00020187)
773
774/* Deprecated EntityId */
775#define ENTITYID_APPLICATIONS_WRITER(0x000001c2) (0x000001c2)
776#define ENTITYID_APPLICATIONS_READER(0x000001c7) (0x000001c7)
777#define ENTITYID_CLIENTS_WRITER(0x000005c2) (0x000005c2)
778#define ENTITYID_CLIENTS_READER(0x000005c7) (0x000005c7)
779#define ENTITYID_SERVICES_WRITER(0x000006c2) (0x000006c2)
780#define ENTITYID_SERVICES_READER(0x000006c7) (0x000006c7)
781#define ENTITYID_MANAGERS_WRITER(0x000007c2) (0x000007c2)
782#define ENTITYID_MANAGERS_READER(0x000007c7) (0x000007c7)
783#define ENTITYID_APPLICATION_SELF(0x000008c1) (0x000008c1)
784#define ENTITYID_APPLICATION_SELF_WRITER(0x000008c2) (0x000008c2)
785#define ENTITYID_APPLICATION_SELF_READER(0x000008c7) (0x000008c7)
786
787/* Predefined Entity Kind */
788#define ENTITYKIND_APPDEF_UNKNOWN(0x00) (0x00)
789#define ENTITYKIND_APPDEF_PARTICIPANT(0x01) (0x01)
790#define ENTITYKIND_APPDEF_WRITER_WITH_KEY(0x02) (0x02)
791#define ENTITYKIND_APPDEF_WRITER_NO_KEY(0x03) (0x03)
792#define ENTITYKIND_APPDEF_READER_NO_KEY(0x04) (0x04)
793#define ENTITYKIND_APPDEF_READER_WITH_KEY(0x07) (0x07)
794#define ENTITYKIND_BUILTIN_PARTICIPANT(0xc1) (0xc1)
795#define ENTITYKIND_BUILTIN_WRITER_WITH_KEY(0xc2) (0xc2)
796#define ENTITYKIND_BUILTIN_WRITER_NO_KEY(0xc3) (0xc3)
797#define ENTITYKIND_BUILTIN_READER_NO_KEY(0xc4) (0xc4)
798#define ENTITYKIND_BUILTIN_READER_WITH_KEY(0xc7) (0xc7)
799
800/* vendor specific RTI */
801#define ENTITYKIND_RTI_BUILTIN_WRITER_WITH_KEY(0x82) (0x82)
802#define ENTITYKIND_RTI_BUILTIN_WRITER_NO_KEY(0x83) (0x83)
803#define ENTITYKIND_RTI_BUILTIN_READER_NO_KEY(0x84) (0x84)
804#define ENTITYKIND_RTI_BUILTIN_READER_WITH_KEY(0x87) (0x87)
805
806/* Submessage Type */
807#define SUBMESSAGE_HEADER_EXTENSION(0x0) (0x0)
808#define SUBMESSAGE_PAD(0x01) (0x01)
809#define SUBMESSAGE_DATA(0x02) (0x02)
810#define SUBMESSAGE_NOKEY_DATA(0x03) (0x03)
811#define SUBMESSAGE_ACKNACK(0x06) (0x06)
812#define SUBMESSAGE_HEARTBEAT(0x07) (0x07)
813#define SUBMESSAGE_GAP(0x08) (0x08)
814#define SUBMESSAGE_INFO_TS(0x09) (0x09)
815#define SUBMESSAGE_INFO_SRC(0x0c) (0x0c)
816#define SUBMESSAGE_INFO_REPLY_IP4(0x0d) (0x0d)
817#define SUBMESSAGE_INFO_DST(0x0e) (0x0e)
818#define SUBMESSAGE_INFO_REPLY(0x0f) (0x0f)
819
820#define SUBMESSAGE_DATA_FRAG(0x10) (0x10) /* RTPS 2.0 Only */
821#define SUBMESSAGE_NOKEY_DATA_FRAG(0x11) (0x11) /* RTPS 2.0 Only */
822#define SUBMESSAGE_NACK_FRAG(0x12) (0x12) /* RTPS 2.0 Only */
823#define SUBMESSAGE_HEARTBEAT_FRAG(0x13) (0x13) /* RTPS 2.0 Only */
824
825#define SUBMESSAGE_RTPS_DATA_SESSION(0x14) (0x14) /* RTPS 2.1 only */
826#define SUBMESSAGE_RTPS_DATA(0x15) (0x15) /* RTPS 2.1 only */
827#define SUBMESSAGE_RTPS_DATA_FRAG(0x16) (0x16) /* RTPS 2.1 only */
828#define SUBMESSAGE_ACKNACK_BATCH(0x17) (0x17) /* RTPS 2.1 only */
829#define SUBMESSAGE_RTPS_DATA_BATCH(0x18) (0x18) /* RTPS 2.1 Only */
830#define SUBMESSAGE_HEARTBEAT_BATCH(0x19) (0x19) /* RTPS 2.1 only */
831#define SUBMESSAGE_ACKNACK_SESSION(0x1a) (0x1a) /* RTPS 2.1 only */
832#define SUBMESSAGE_HEARTBEAT_SESSION(0x1b) (0x1b) /* RTPS 2.1 only */
833#define SUBMESSAGE_APP_ACK(0x1c) (0x1c)
834#define SUBMESSAGE_APP_ACK_CONF(0x1d) (0x1d)
835#define SUBMESSAGE_HEARTBEAT_VIRTUAL(0x1e) (0x1e)
836#define SUBMESSAGE_SEC_BODY(0x30) (0x30)
837#define SUBMESSAGE_SEC_PREFIX(0x31) (0x31)
838#define SUBMESSAGE_SEC_POSTFIX(0x32) (0x32)
839#define SUBMESSAGE_SRTPS_PREFIX(0x33) (0x33)
840#define SUBMESSAGE_SRTPS_POSTFIX(0x34) (0x34)
841#define SUBMESSAGE_RTI_CRC(0x80) (0x80)
842#define SUBMESSAGE_RTI_DATA_FRAG_SESSION(0x81) (0x81) /* Vendor Specific */
843#define SUBMESSAGE_RTI_UDP_WAN_BINDING_PING(0x82) (0x82)
844
845
846/* An invalid IP Address:
847 * Make sure the _STRING macro is bigger than a normal IP
848 */
849#define IPADDRESS_INVALID(0) (0)
850#define IPADDRESS_INVALID_STRING"ADDRESS_INVALID" "ADDRESS_INVALID"
851
852/* Identifies the value of an invalid port number:
853 * Make sure the _STRING macro is bigger than a normal port
854 */
855#define PORT_INVALID(0) (0)
856#define PORT_INVALID_STRING"PORT_INVALID" "PORT_INVALID"
857
858/* Protocol Vendor Information (uint16_t) as per July 2020 */
859#define RTPS_VENDOR_UNKNOWN(0x0000) (0x0000)
860#define RTPS_VENDOR_UNKNOWN_STRING"VENDOR_ID_UNKNOWN (0x0000)" "VENDOR_ID_UNKNOWN (0x0000)"
861#define RTPS_VENDOR_RTI_DDS(0x0101) (0x0101)
862#define RTPS_VENDOR_RTI_DDS_STRING"Real-Time Innovations, Inc. - Connext DDS" "Real-Time Innovations, Inc. - Connext DDS"
863#define RTPS_VENDOR_ADL_DDS(0x0102) (0x0102)
864#define RTPS_VENDOR_ADL_DDS_STRING"ADLink Ltd. - OpenSplice DDS" "ADLink Ltd. - OpenSplice DDS"
865#define RTPS_VENDOR_OCI(0x0103) (0x0103)
866#define RTPS_VENDOR_OCI_STRING"Object Computing, Inc. (OCI) - OpenDDS" "Object Computing, Inc. (OCI) - OpenDDS"
867#define RTPS_VENDOR_MILSOFT(0x0104) (0x0104)
868#define RTPS_VENDOR_MILSOFT_STRING"MilSoft" "MilSoft"
869#define RTPS_VENDOR_KONGSBERG(0x0105) (0x0105)
870#define RTPS_VENDOR_KONGSBERG_STRING"Kongsberg - InterCOM DDS" "Kongsberg - InterCOM DDS"
871#define RTPS_VENDOR_TOC(0x0106) (0x0106)
872#define RTPS_VENDOR_TOC_STRING"TwinOaks Computing, Inc. - CoreDX DDS" "TwinOaks Computing, Inc. - CoreDX DDS"
873#define RTPS_VENDOR_LAKOTA_TSI(0x0107) (0x0107)
874#define RTPS_VENDOR_LAKOTA_TSI_STRING"Lakota Technical Solutions, Inc." "Lakota Technical Solutions, Inc."
875#define RTPS_VENDOR_ICOUP(0x0108) (0x0108)
876#define RTPS_VENDOR_ICOUP_STRING"ICOUP Consulting" "ICOUP Consulting"
877#define RTPS_VENDOR_ETRI(0x0109) (0x0109)
878#define RTPS_VENDOR_ETRI_STRING"Electronics and Telecommunication Research Institute (ETRI) - Diamond DDS" "Electronics and Telecommunication Research Institute (ETRI) - Diamond DDS"
879#define RTPS_VENDOR_RTI_DDS_MICRO(0x010A) (0x010A)
880#define RTPS_VENDOR_RTI_DDS_MICRO_STRING"Real-Time Innovations, Inc. (RTI) - Connext DDS Micro" "Real-Time Innovations, Inc. (RTI) - Connext DDS Micro"
881#define RTPS_VENDOR_ADL_CAFE(0x010B) (0x010B)
882#define RTPS_VENDOR_ADL_CAFE_STRING"ADLink Ltd. - Vortex Cafe" "ADLink Ltd. - Vortex Cafe"
883#define RTPS_VENDOR_PT(0x010C) (0x010C)
884#define RTPS_VENDOR_PT_STRING"PrismTech" "PrismTech"
885#define RTPS_VENDOR_ADL_LITE(0x010D) (0x010D)
886#define RTPS_VENDOR_ADL_LITE_STRING"ADLink Ltd. - Vortex Lite" "ADLink Ltd. - Vortex Lite"
887#define RTPS_VENDOR_TECHNICOLOR(0x010E) (0x010E)
888#define RTPS_VENDOR_TECHNICOLOR_STRING"Technicolor Inc. - Qeo" "Technicolor Inc. - Qeo"
889#define RTPS_VENDOR_EPROSIMA(0x010F) (0x010F)
890#define RTPS_VENDOR_EPROSIMA_STRING"eProsima - Fast-RTPS" "eProsima - Fast-RTPS"
891#define RTPS_VENDOR_ECLIPSE(0x0110) (0x0110)
892#define RTPS_VENDOR_ECLIPSE_STRING"Eclipse Foundation - Cyclone DDS" "Eclipse Foundation - Cyclone DDS"
893#define RTPS_VENDOR_GURUM(0x0111) (0x0111)
894#define RTPS_VENDOR_GURUM_STRING"GurumNetworks Ltd. - GurumDDS" "GurumNetworks Ltd. - GurumDDS"
895#define RTPS_VENDOR_RUST(0x0112) (0x0112)
896#define RTPS_VENDOR_RUST_STRING"Atostek - RustDDS" "Atostek - RustDDS"
897#define RTPS_VENDOR_ZRDDS(0x0113) (0x0113)
898#define RTPS_VENDOR_ZRDDS_STRING"Nanjing Zhenrong Software Technology Co. - ZRDDS" "Nanjing Zhenrong Software Technology Co. - ZRDDS"
899#define RTPS_VENDOR_DUST(0x0114) (0x0114)
900#define RTPS_VENDOR_DUST_STRING"S2E Software Systems B.V. - Dust DDS" "S2E Software Systems B.V. - Dust DDS"
901
902
903/* Data encapsulation */
904#define ENCAPSULATION_CDR_BE(0x0000) (0x0000)
905#define ENCAPSULATION_CDR_LE(0x0001) (0x0001)
906#define ENCAPSULATION_PL_CDR_BE(0x0002) (0x0002)
907#define ENCAPSULATION_PL_CDR_LE(0x0003) (0x0003)
908#define ENCAPSULATION_CDR2_BE(0x0006) (0x0006)
909#define ENCAPSULATION_CDR2_LE(0x0007) (0x0007)
910#define ENCAPSULATION_D_CDR2_BE(0x0008) (0x0008)
911#define ENCAPSULATION_D_CDR2_LE(0x0009) (0x0009)
912#define ENCAPSULATION_PL_CDR2_BE(0x000a) (0x000a)
913#define ENCAPSULATION_PL_CDR2_LE(0x000b) (0x000b)
914#define ENCAPSULATION_SHMEM_REF_PLAIN(0xC000) (0xC000)
915#define ENCAPSULATION_SHMEM_REF_FLAT_DATA(0xC001) (0xC001)
916
917/* Data encapsulation options */
918#define ENCAPSULATION_OPTIONS_COMPRESSION_BYTES_MASK(0x1C) (0x1C)
919#define GET_ENCAPSULATION_COMPRESSION_OPTIONS(encapsulation_options_in, compression_options_out)(compression_options_out = (((encapsulation_options_in) &
((0x1C))) >> 2))
\
920 (compression_options_out = (((encapsulation_options_in) & (ENCAPSULATION_OPTIONS_COMPRESSION_BYTES_MASK(0x1C))) >> 2))
921#define ENCAPSULATION_OPTIONS_COMPRESSION_EXTENDED_HEADER_VALUE(0x1C) ENCAPSULATION_OPTIONS_COMPRESSION_BYTES_MASK(0x1C)
922#define ENCAPSULATION_OPTIONS_COMPRESSION_PADDING_BYTES_MASK(0x3) (0x3)
923
924
925/* Parameter Liveliness */
926#define LIVELINESS_AUTOMATIC(0) (0)
927#define LIVELINESS_BY_PARTICIPANT(1) (1)
928#define LIVELINESS_BY_TOPIC(2) (2)
929
930/* Parameter Durability */
931#define DURABILITY_VOLATILE(0) (0)
932#define DURABILITY_TRANSIENT_LOCAL(1) (1)
933#define DURABILITY_TRANSIENT(2) (2)
934#define DURABILITY_PERSISTENT(3) (3)
935
936/* Parameter Ownership */
937#define OWNERSHIP_SHARED(0) (0)
938#define OWNERSHIP_EXCLUSIVE(1) (1)
939
940/* Parameter Presentation */
941#define PRESENTATION_INSTANCE(0) (0)
942#define PRESENTATION_TOPIC(1) (1)
943#define PRESENTATION_GROUP(2) (2)
944
945#define LOCATOR_KIND_INVALID(-1) (-1)
946#define LOCATOR_KIND_RESERVED(0) (0)
947#define LOCATOR_KIND_UDPV4(1) (1)
948#define LOCATOR_KIND_UDPV6(2) (2)
949/* Vendor specific - rti */
950#define LOCATOR_KIND_DTLS(6) (6)
951#define LOCATOR_KIND_TCPV4_LAN(8) (8)
952#define LOCATOR_KIND_TCPV4_WAN(9) (9)
953#define LOCATOR_KIND_TLSV4_LAN(10) (10)
954#define LOCATOR_KIND_TLSV4_WAN(11) (11)
955#define LOCATOR_KIND_SHMEM(0x01000000) (0x01000000)
956#define LOCATOR_KIND_TUDPV4(0x01001001) (0x01001001)
957#define LOCATOR_KIND_UDPV4_WAN(0x01000001) (0x01000001)
958
959/* History Kind */
960#define HISTORY_KIND_KEEP_LAST(0) (0)
961#define HISTORY_KIND_KEEP_ALL(1) (1)
962
963/* Reliability Values */
964#define RELIABILITY_BEST_EFFORT(1) (1)
965#define RELIABILITY_RELIABLE(2) (2)
966
967/* Destination Order */
968#define BY_RECEPTION_TIMESTAMP(0) (0)
969#define BY_SOURCE_TIMESTAMP(1) (1)
970
971/* Member flags */
972#define MEMBER_IS_KEY(1) (1)
973#define MEMBER_OPTIONAL(2) (2)
974#define MEMBER_SHAREABLE(4) (4)
975#define MEMBER_UNION_DEFAULT(8) (8)
976/* Participant message data kind */
977#define PARTICIPANT_MESSAGE_DATA_KIND_UNKNOWN(0x00000000) (0x00000000)
978#define PARTICIPANT_MESSAGE_DATA_KIND_AUTOMATIC_LIVELINESS_UPDATE(0x00000001) (0x00000001)
979#define PARTICIPANT_MESSAGE_DATA_KIND_MANUAL_LIVELINESS_UPDATE(0x00000002) (0x00000002)
980
981/* Type Consistency Kinds */
982#define DISALLOW_TYPE_COERCION(0) (0)
983#define ALLOW_TYPE_COERCION(1) (1)
984
985/* Ack kind */
986#define PROTOCOL_ACKNOWLEDGMENT(0) (0)
987#define APPLICATION_AUTO_ACKNOWLEDGMENT(1) (1)
988#define APPLICATION_ORDERED_ACKNOWLEDGMENT(2) (2)
989#define APPLICATION_EXPLICIT_ACKNOWLEDGMENT(3) (3)
990
991#define CRYPTO_TRANSFORMATION_KIND_NONE(0) (0)
992#define CRYPTO_TRANSFORMATION_KIND_AES128_GMAC(1) (1)
993#define CRYPTO_TRANSFORMATION_KIND_AES128_GCM(2) (2)
994#define CRYPTO_TRANSFORMATION_KIND_AES256_GMAC(3) (3)
995#define CRYPTO_TRANSFORMATION_KIND_AES256_GCM(4) (4)
996
997/* Vendor specific algorithm bits are the upper 16 bits of 32-bit value */
998#define BITMASK_VENDOR_SPECIFIC_ALGORITHM010x00010000 0x00010000
999#define BITMASK_VENDOR_SPECIFIC_ALGORITHM020x00020000 0x00020000
1000#define BITMASK_VENDOR_SPECIFIC_ALGORITHM030x00040000 0x00040000
1001#define BITMASK_VENDOR_SPECIFIC_ALGORITHM040x00080000 0x00080000
1002#define BITMASK_VENDOR_SPECIFIC_ALGORITHM050x00100000 0x00100000
1003#define BITMASK_VENDOR_SPECIFIC_ALGORITHM060x00200000 0x00200000
1004#define BITMASK_VENDOR_SPECIFIC_ALGORITHM070x00400000 0x00400000
1005#define BITMASK_VENDOR_SPECIFIC_ALGORITHM080x00800000 0x00800000
1006#define BITMASK_VENDOR_SPECIFIC_ALGORITHM090x01000000 0x01000000
1007#define BITMASK_VENDOR_SPECIFIC_ALGORITHM100x02000000 0x02000000
1008#define BITMASK_VENDOR_SPECIFIC_ALGORITHM110x04000000 0x04000000
1009#define BITMASK_VENDOR_SPECIFIC_ALGORITHM120x08000000 0x08000000
1010#define BITMASK_VENDOR_SPECIFIC_ALGORITHM130x10000000 0x10000000
1011#define BITMASK_VENDOR_SPECIFIC_ALGORITHM140x20000000 0x20000000
1012#define BITMASK_VENDOR_SPECIFIC_ALGORITHM150x40000000 0x40000000
1013#define BITMASK_VENDOR_SPECIFIC_ALGORITHM160x80000000 0x80000000
1014
1015
1016#define SECURITY_SYMMETRIC_CIPHER_BIT_AES128_GCM0x00000001 0x00000001
1017#define SECURITY_SYMMETRIC_CIPHER_BIT_AES256_GCM0x00000002 0x00000002
1018#define SECURITY_SYMMETRIC_CIPHER_BIT_VENDOR_RTI_AES192_GCM0x40000000 0x40000000
1019#define SECURITY_SYMMETRIC_CIPHER_ALGORITHM_INFO_SUPPORTED_MASK_DEFAULT0x00000003 0x00000003
1020#define SECURITY_SYMMETRIC_CIPHER_ALGORITHM_INFO_BUILTIN_ENDPOINTS_REQUIRED_MASK_DEFAULT0x00000002 0x00000002
1021#define SECURITY_SYMMETRIC_CIPHER_ALGORITHM_INFO_BUILTIN_ENDPOINTS_KEY_EXCHANGE_REQUIRED_MASK_DEFAULT0x00000002 0x00000002
1022#define SECURITY_SYMMETRIC_CIPHER_ALGORITHM_INFO_USER_ENDPOINTS_DEFAULT_REQUIRED_MASK_DEFAULT0x00000002 0x00000002
1023
1024#define SECURITY_DIGITAL_SIGNATURE_BIT_RSASSAPSSMGF1SHA256_2048_SHA2560x00000001 0x00000001
1025#define SECURITY_DIGITAL_SIGNATURE_BIT_RSASSAPKCS1V15_2048_SHA2560x00000002 0x00000002
1026#define SECURITY_DIGITAL_SIGNATURE_BIT_ECDSA_P256_SHA2560x00000004 0x00000004
1027#define SECURITY_DIGITAL_SIGNATURE_BIT_ECDSA_P384_SHA3840x00000008 0x00000008
1028#define SECURITY_DIGITAL_SIGNATURE_BIT_VENDOR_RTI_EDDSA_ED25519_SHA5120x00010000 0x00010000
1029#define SECURITY_DIGITAL_SIGNATURE_BIT_VENDOR_RTI_EDDSA_ED448_SHAKE2560x00020000 0x00020000
1030#define SECURITY_DIGITAL_SIGNATURE_ALGORITHM_INFO_TRUST_CHAIN_SUPPORTED_MASK_DEFAULT0x00000007 0x00000007
1031#define SECURITY_DIGITAL_SIGNATURE_ALGORITHM_INFO_TRUST_CHAIN_REQUIRED_MASK_DEFAULT0x00000004 0x00000004
1032#define SECURITY_DIGITAL_SIGNATURE_ALGORITHM_INFO_MESSAGE_AUTH_SUPPORTED_MASK_DEFAULT0x00000005 0x00000005
1033#define SECURITY_DIGITAL_SIGNATURE_ALGORITHM_INFO_MESSAGE_AUTH_REQUIRED_MASK_DEFAULT0x00000004 0x00000004
1034
1035#define SECURITY_KEY_ESTABLISHMENT_BIT_DHE_MODP20482560x00000001 0x00000001
1036#define SECURITY_KEY_ESTABLISHMENT_BIT_ECDHECEUM_P2560x00000002 0x00000002
1037#define SECURITY_KEY_ESTABLISHMENT_BIT_ECDHECEUM_P3840x00000004 0x00000004
1038#define SECURITY_KEY_ESTABLISHMENT_BIT_VENDOR_RTI_ECDHECEUM_X255190x00010000 0x00010000
1039#define SECURITY_KEY_ESTABLISHMENT_BIT_VENDOR_RTI_ECDHECEUM_X4480x00020000 0x00020000
1040#define SECURITY_KEY_ESTABLISHMENT_ALGORITHM_INFO_SUPPORTED_MASK_DEFAULT0x00000003 0x00000003
1041#define SECURITY_KEY_ESTABLISHMENT_ALGORITHM_INFO_REQUIRED_MASK_DEFAULT0x00000002 0x00000002
1042
1043#define SECURITY_ALGORITHM_BIT_COMPATIBILITY_MODE0x80000000 0x80000000
1044
1045#define TOPIC_INFO_ADD_GUID(0x01) (0x01)
1046#define TOPIC_INFO_ADD_TYPE_NAME(0x02) (0x02)
1047#define TOPIC_INFO_ADD_TOPIC_NAME(0x04) (0x04)
1048#define TOPIC_INFO_ALL_SET(0x07) (0x07)
1049
1050#define NOT_A_FRAGMENT(-1) (-1)
1051
1052/* */
1053#define RTI_OSAPI_COMPRESSION_CLASS_ID_NONE(0) (0)
1054#define RTI_OSAPI_COMPRESSION_CLASS_ID_ZLIB(1) (1)
1055#define RTI_OSAPI_COMPRESSION_CLASS_ID_BZIP2(2) (2)
1056#define RTI_OSAPI_COMPRESSION_CLASS_ID_LZ4(4) (4)
1057#define RTI_OSAPI_COMPRESSION_CLASS_ID_AUTO((4294967295U)) (UINT32_MAX(4294967295U))
1058
1059/* VENDOR_BUILTIN_ENDPOINT_SET FLAGS */
1060#define VENDOR_BUILTIN_ENDPOINT_SET_FLAG_PARTICIPANT_CONFIG_WRITER0x00000080 0x00000080
1061#define VENDOR_BUILTIN_ENDPOINT_SET_FLAG_PARTICIPANT_CONFIG_READER0x00000100 0x00000100
1062#define VENDOR_BUILTIN_ENDPOINT_SET_FLAG_PARTICIPANT_CONFIG_SECURE_WRITER0x00000200 0x00000200
1063#define VENDOR_BUILTIN_ENDPOINT_SET_FLAG_PARTICIPANT_CONFIG_SECURE_READER0x00000400 0x00000400
1064#define VENDOR_BUILTIN_ENDPOINT_SET_FLAG_MONITORING_PERIODIC_WRITER0x00000800 0x00000800
1065#define VENDOR_BUILTIN_ENDPOINT_SET_FLAG_MONITORING_PERIODIC_READER0x00001000 0x00001000
1066#define VENDOR_BUILTIN_ENDPOINT_SET_FLAG_MONITORING_EVENT_WRITER0x00002000 0x00002000
1067#define VENDOR_BUILTIN_ENDPOINT_SET_FLAG_MONITORING_EVENT_READER0x00004000 0x00004000
1068#define VENDOR_BUILTIN_ENDPOINT_SET_FLAG_MONITORING_LOGGING_WRITER0x00008000 0x00008000
1069#define VENDOR_BUILTIN_ENDPOINT_SET_FLAG_MONITORING_LOGGING_READER0x00010000 0x00010000
1070#define VENDOR_BUILTIN_ENDPOINT_SET_FLAG_PARTICIPANT_BOOTSTRAP_WRITER0x00020000 0x00020000
1071#define VENDOR_BUILTIN_ENDPOINT_SET_FLAG_PARTICIPANT_BOOTSTRAP_READER0x00040000 0x00040000
1072
1073static int hf_rtps_dissection_boolean;
1074static int hf_rtps_dissection_int8;
1075static int hf_rtps_dissection_byte;
1076static int hf_rtps_dissection_int16;
1077static int hf_rtps_dissection_uint16;
1078static int hf_rtps_dissection_int32;
1079static int hf_rtps_dissection_uint32;
1080static int hf_rtps_dissection_int64;
1081static int hf_rtps_dissection_uint64;
1082static int hf_rtps_dissection_float;
1083static int hf_rtps_dissection_double;
1084static int hf_rtps_dissection_int128;
1085static int hf_rtps_dissection_string;
1086
1087static const char *const SM_EXTRA_RPLUS = "(r+)";
1088static const char *const SM_EXTRA_RMINUS = "(r-)";
1089static const char *const SM_EXTRA_WPLUS = "(w+)";
1090static const char *const SM_EXTRA_WMINUS = "(w-)";
1091static const char *const SM_EXTRA_PPLUS = "(p+)";
1092static const char *const SM_EXTRA_PMINUS = "(p-)";
1093static const char *const SM_EXTRA_TPLUS = "(t+)";
1094static const char *const SM_EXTRA_TMINUS = "(t-)";
1095
1096/***************************************************************************/
1097/* Protocol Fields Identifiers */
1098static int proto_rtps;
1099static int hf_rtps_magic;
1100static int hf_rtps_ping;
1101static int hf_rtps_protocol_version;
1102static int hf_rtps_protocol_version_major;
1103static int hf_rtps_protocol_version_minor;
1104static int hf_rtps_vendor_id;
1105
1106static int hf_rtps_domain_id;
1107static int hf_rtps_domain_tag;
1108static int hf_rtps_participant_idx;
1109static int hf_rtps_nature_type;
1110
1111static int hf_rtps_guid_prefix_v1;
1112static int hf_rtps_guid_prefix;
1113static int hf_rtps_guid_prefix_src;
1114static int hf_rtps_guid_prefix_dst;
1115static int hf_rtps_host_id;
1116static int hf_rtps_app_id;
1117static int hf_rtps_app_id_instance_id;
1118static int hf_rtps_app_id_app_kind;
1119
1120static int hf_rtps_sm_id;
1121static int hf_rtps_sm_idv2;
1122static int hf_rtps_sm_flags;
1123static int hf_rtps_sm_flags2;
1124static int hf_rtps_sm_octets_to_next_header;
1125static int hf_rtps_sm_guid_prefix_v1;
1126static int hf_rtps_sm_guid_prefix;
1127static int hf_rtps_sm_host_id;
1128static int hf_rtps_sm_app_id;
1129static int hf_rtps_sm_instance_id_v1;
1130static int hf_rtps_sm_app_kind;
1131static int hf_rtps_sm_instance_id;
1132static int hf_rtps_sm_entity_id;
1133static int hf_rtps_sm_entity_id_key;
1134static int hf_rtps_sm_entity_id_kind;
1135static int hf_rtps_sm_rdentity_id;
1136static int hf_rtps_sm_rdentity_id_key;
1137static int hf_rtps_sm_rdentity_id_kind;
1138static int hf_rtps_sm_wrentity_id;
1139static int hf_rtps_sm_wrentity_id_key;
1140static int hf_rtps_sm_wrentity_id_kind;
1141static int hf_rtps_sm_seq_number;
1142
1143static int hf_rtps_info_src_ip;
1144static int hf_rtps_info_src_unused;
1145
1146static int hf_rtps_parameter_id;
1147static int hf_rtps_parameter_id_v2;
1148static int hf_rtps_parameter_id_inline_rti;
1149static int hf_rtps_parameter_id_toc;
1150static int hf_rtps_parameter_id_rti;
1151static int hf_rtps_parameter_id_adl;
1152static int hf_rtps_parameter_length;
1153static int hf_rtps_string_length;
1154static int hf_rtps_coherent_set_start;
1155static int hf_rtps_coherent_set_end;
1156static int hf_rtps_param_topic_name;
1157static int hf_rtps_param_strength;
1158static int hf_rtps_param_type_name;
1159static int hf_rtps_param_user_data;
1160static int hf_rtps_param_group_data;
1161static int hf_rtps_param_topic_data;
1162static int hf_rtps_param_content_filter_topic_name;
1163static int hf_rtps_param_related_topic_name;
1164static int hf_rtps_param_filter_class_name;
1165static int hf_rtps_issue_data;
1166static int hf_rtps_durability_service_cleanup_delay;
1167static int hf_rtps_liveliness_lease_duration;
1168static int hf_rtps_participant_lease_duration;
1169static int hf_rtps_time_based_filter_minimum_separation;
1170static int hf_rtps_reliability_max_blocking_time;
1171static int hf_rtps_deadline_period;
1172static int hf_rtps_latency_budget_duration;
1173static int hf_rtps_lifespan_duration;
1174static int hf_rtps_persistence;
1175static int hf_rtps_info_ts_timestamp;
1176static int hf_rtps_timestamp;
1177static int hf_rtps_locator_kind;
1178static int hf_rtps_locator_port;
1179/* static int hf_rtps_logical_port; */
1180static int hf_rtps_locator_public_address_port;
1181static int hf_rtps_locator_ipv4;
1182static int hf_rtps_locator_ipv6;
1183static int hf_rtps_participant_builtin_endpoints;
1184static int hf_rtps_participant_manual_liveliness_count;
1185static int hf_rtps_history_depth;
1186static int hf_rtps_resource_limit_max_samples;
1187static int hf_rtps_resource_limit_max_instances;
1188static int hf_rtps_resource_limit_max_samples_per_instances;
1189static int hf_rtps_filter_bitmap;
1190static int hf_rtps_type_checksum;
1191static int hf_rtps_queue_size;
1192static int hf_rtps_acknack_count;
1193static int hf_rtps_durability_service_history_kind;
1194static int hf_rtps_durability_service_history_depth;
1195static int hf_rtps_durability_service_max_samples;
1196static int hf_rtps_durability_service_max_instances;
1197static int hf_rtps_durability_service_max_samples_per_instances;
1198static int hf_rtps_liveliness_kind;
1199static int hf_rtps_manager_key;
1200static int hf_rtps_locator_udp_v4;
1201static int hf_rtps_locator_udp_v4_port;
1202static int hf_param_ip_address;
1203static int hf_rtps_param_port;
1204static int hf_rtps_expects_inline_qos;
1205static int hf_rtps_presentation_coherent_access;
1206static int hf_rtps_presentation_ordered_access;
1207static int hf_rtps_expects_ack;
1208static int hf_rtps_reliability_kind;
1209static int hf_rtps_durability;
1210static int hf_rtps_ownership;
1211static int hf_rtps_presentation_access_scope;
1212static int hf_rtps_destination_order;
1213static int hf_rtps_history_kind;
1214static int hf_rtps_data_status_info;
1215static int hf_rtps_param_serialize_encap_kind;
1216static int hf_rtps_param_serialize_encap_len;
1217static int hf_rtps_param_transport_priority;
1218static int hf_rtps_param_type_max_size_serialized;
1219static int hf_rtps_param_entity_name;
1220static int hf_rtps_param_role_name;
1221static int hf_rtps_disable_positive_ack;
1222static int hf_rtps_participant_guid_v1;
1223static int hf_rtps_participant_guid;
1224static int hf_rtps_group_guid_v1;
1225static int hf_rtps_group_guid;
1226static int hf_rtps_endpoint_guid;
1227static int hf_rtps_param_host_id;
1228static int hf_rtps_param_app_id;
1229static int hf_rtps_param_instance_id;
1230static int hf_rtps_param_instance_id_v1;
1231static int hf_rtps_param_app_kind;
1232static int hf_rtps_param_entity;
1233static int hf_rtps_param_entity_key;
1234static int hf_rtps_param_entity_kind;
1235static int hf_rtps_data_frag_number;
1236static int hf_rtps_data_frag_num_fragments;
1237static int hf_rtps_data_frag_size;
1238static int hf_rtps_data_frag_sample_size;
1239static int hf_rtps_nokey_data_frag_number;
1240static int hf_rtps_nokey_data_frag_num_fragments;
1241static int hf_rtps_nokey_data_frag_size;
1242static int hf_rtps_nack_frag_count;
1243static int hf_rtps_heartbeat_frag_number;
1244static int hf_rtps_heartbeat_frag_count;
1245static int hf_rtps_heartbeat_batch_count;
1246static int hf_rtps_data_serialize_data;
1247static int hf_rtps_data_batch_timestamp;
1248static int hf_rtps_data_batch_offset_to_last_sample_sn;
1249static int hf_rtps_data_batch_sample_count;
1250static int hf_rtps_data_batch_offset_sn;
1251static int hf_rtps_data_batch_octets_to_sl_encap_id;
1252static int hf_rtps_data_batch_serialized_data_length;
1253static int hf_rtps_data_batch_octets_to_inline_qos;
1254static int hf_rtps_fragment_number_base64;
1255static int hf_rtps_fragment_number_base;
1256static int hf_rtps_fragment_number_num_bits;
1257static int hf_rtps_bitmap_num_bits;
1258static int hf_rtps_param_partition_num;
1259static int hf_rtps_param_partition;
1260static int hf_rtps_param_topic_alias_num;
1261static int hf_rtps_param_topic_alias;
1262static int hf_rtps_param_type_alias_num;
1263static int hf_rtps_param_type_alias;
1264static int hf_rtps_param_filter_expression;
1265static int hf_rtps_param_expression_parameters_num;
1266static int hf_rtps_param_expression_parameters;
1267static int hf_rtps_locator_filter_list_num_channels;
1268static int hf_rtps_locator_filter_list_filter_name;
1269static int hf_rtps_locator_filter_list_filter_exp;
1270static int hf_rtps_extra_flags;
1271static int hf_rtps_param_builtin_endpoint_set_flags;
1272static int hf_rtps_param_builtin_endpoint_ext_set_flags;
1273static int hf_rtps_param_vendor_builtin_endpoint_set_flags;
1274static int hf_rtps_param_endpoint_security_attributes;
1275static int hf_rtps_param_plugin_promiscuity_kind;
1276static int hf_rtps_param_service_kind;
1277
1278static int hf_rtps_param_sample_signature_epoch;
1279static int hf_rtps_param_sample_signature_nonce;
1280static int hf_rtps_param_sample_signature_length;
1281static int hf_rtps_param_sample_signature_signature;
1282static int hf_rtps_secure_secure_data_length;
1283static int hf_rtps_secure_secure_data;
1284static int hf_rtps_param_enable_authentication;
1285static int hf_rtps_param_builtin_endpoint_qos;
1286static int hf_rtps_secure_dataheader_transformation_kind;
1287static int hf_rtps_secure_dataheader_transformation_key_revision_id;
1288static int hf_rtps_secure_dataheader_transformation_key_id;
1289static int hf_rtps_secure_dataheader_passphrase_id;
1290static int hf_rtps_secure_dataheader_passphrase_key_id;
1291static int hf_rtps_secure_dataheader_init_vector_suffix;
1292static int hf_rtps_secure_dataheader_session_id;
1293static int hf_rtps_secure_datatag_plugin_sec_tag;
1294static int hf_rtps_secure_datatag_plugin_sec_tag_key;
1295static int hf_rtps_secure_datatag_plugin_sec_tag_common_mac;
1296static int hf_rtps_secure_datatag_plugin_specific_macs_len;
1297static int hf_rtps_pgm;
1298static int hf_rtps_pgm_dst_participant_guid;
1299static int hf_rtps_pgm_dst_endpoint_guid;
1300static int hf_rtps_pgm_src_endpoint_guid;
1301static int hf_rtps_source_participant_guid;
1302static int hf_rtps_message_identity_source_guid;
1303static int hf_rtps_pgm_message_class_id;
1304static int hf_rtps_pgm_data_holder_class_id;
1305static int hf_rtps_secure_session_key;
1306/* static int hf_rtps_pgm_data_holder_stringseq_size; */
1307/* static int hf_rtps_pgm_data_holder_stringseq_name; */
1308/* static int hf_rtps_pgm_data_holder_long_long; */
1309
1310static int hf_rtps_param_timestamp_sec;
1311static int hf_rtps_param_timestamp_fraction;
1312static int hf_rtps_transportInfo_classId;
1313static int hf_rtps_transportInfo_messageSizeMax;
1314static int hf_rtps_param_app_ack_count;
1315static int hf_rtps_param_app_ack_virtual_writer_count;
1316static int hf_rtps_param_app_ack_conf_virtual_writer_count;
1317static int hf_rtps_param_app_ack_conf_count;
1318static int hf_rtps_param_app_ack_interval_payload_length;
1319static int hf_rtps_param_app_ack_interval_flags;
1320static int hf_rtps_param_app_ack_interval_count;
1321static int hf_rtps_param_app_ack_octets_to_next_virtual_writer;
1322static int hf_rtps_expects_virtual_heartbeat;
1323static int hf_rtps_direct_communication;
1324static int hf_rtps_param_peer_host_epoch;
1325static int hf_rtps_param_endpoint_property_change_epoch;
1326static int hf_rtps_virtual_heartbeat_count;
1327static int hf_rtps_virtual_heartbeat_num_virtual_guids;
1328static int hf_rtps_virtual_heartbeat_num_writers;
1329static int hf_rtps_param_extended_parameter;
1330static int hf_rtps_param_extended_pid_length;
1331static int hf_rtps_param_type_consistency_kind;
1332static int hf_rtps_param_data_representation;
1333static int hf_rtps_param_ignore_sequence_bounds;
1334static int hf_rtps_param_ignore_string_bounds;
1335static int hf_rtps_param_ignore_member_names;
1336static int hf_rtps_param_prevent_type_widening;
1337static int hf_rtps_param_force_type_validation;
1338static int hf_rtps_param_ignore_enum_literal_names;
1339static int hf_rtps_parameter_data;
1340static int hf_rtps_param_product_version_major;
1341static int hf_rtps_param_product_version_minor;
1342static int hf_rtps_param_product_version_release;
1343static int hf_rtps_param_product_version_release_as_char;
1344static int hf_rtps_param_product_version_revision;
1345static int hf_rtps_param_acknowledgment_kind;
1346static int hf_rtps_param_topic_query_publication_enable;
1347static int hf_rtps_param_topic_query_publication_sessions;
1348
1349static int hf_rtps_srm;
1350static int hf_rtps_srm_service_id;
1351static int hf_rtps_srm_request_body;
1352static int hf_rtps_srm_instance_id;
1353static int hf_rtps_topic_query_selection_filter_class_name;
1354static int hf_rtps_topic_query_selection_filter_expression;
1355static int hf_rtps_topic_query_selection_num_parameters;
1356static int hf_rtps_topic_query_selection_filter_parameter;
1357static int hf_rtps_topic_query_topic_name;
1358static int hf_rtps_topic_query_original_related_reader_guid;
1359
1360static int hf_rtps_encapsulation_id;
1361static int hf_rtps_encapsulation_kind;
1362static int hf_rtps_octets_to_inline_qos;
1363static int hf_rtps_filter_signature;
1364static int hf_rtps_bitmap;
1365static int hf_rtps_acknack_analysis;
1366static int hf_rtps_property_name;
1367static int hf_rtps_property_value;
1368static int hf_rtps_union;
1369static int hf_rtps_union_case;
1370static int hf_rtps_struct;
1371static int hf_rtps_member_name;
1372static int hf_rtps_sequence;
1373static int hf_rtps_array;
1374static int hf_rtps_bitfield;
1375static int hf_rtps_datatype;
1376static int hf_rtps_sequence_size;
1377static int hf_rtps_guid;
1378static int hf_rtps_heartbeat_count;
1379static int hf_rtps_encapsulation_options;
1380static int hf_rtps_serialized_key;
1381static int hf_rtps_serialized_data;
1382static int hf_rtps_base_type_id_discriminator;
1383static int hf_rtps_instance_name;
1384static int hf_rtps_remote_exception_code;
1385static int hf_rtps_type_bound;
1386static int hf_rtps_type_deps_count;
1387static int hf_rtps_type_deps_result;
1388static int hf_rtps_type_element_flags;
1389static int hf_rtps_type_equiv_kind;
1390static int hf_rtps_type_extended;
1391static int hf_rtps_type_hash;
1392static int hf_rtps_type_id_discriminator;
1393static int hf_rtps_type_id_w_size;
1394static int hf_rtps_type_kind_discriminator;
1395static int hf_rtps_type_lookup_deps_seq;
1396static int hf_rtps_type_lookup_discriminator;
1397static int hf_rtps_type_object_serialized_size;
1398static int hf_rtps_type_object_v2;
1399static int hf_rtps_type_object_v2_ann_builtin;
1400static int hf_rtps_type_object_v2_enum_bit_bound;
1401static int hf_rtps_type_object_v2_enum_literal_value;
1402static int hf_rtps_type_object_v2_has_ann_builtin;
1403static int hf_rtps_type_object_v2_has_ann_custom;
1404static int hf_rtps_type_object_v2_member_flag_is_default;
1405static int hf_rtps_type_object_v2_member_flag_is_external;
1406static int hf_rtps_type_object_v2_member_flag_is_key;
1407static int hf_rtps_type_object_v2_member_flag_is_must_understand;
1408static int hf_rtps_type_object_v2_member_flag_is_optional;
1409static int hf_rtps_type_object_v2_member_flag_try_construct;
1410static int hf_rtps_type_object_v2_member_flags;
1411static int hf_rtps_type_object_v2_member_id;
1412static int hf_rtps_type_object_v2_member_name;
1413static int hf_rtps_type_object_v2_member_name_hash;
1414static int hf_rtps_type_object_v2_type_flag_is_appendable;
1415static int hf_rtps_type_object_v2_type_flag_is_autoid_hash;
1416static int hf_rtps_type_object_v2_type_flag_is_final;
1417static int hf_rtps_type_object_v2_type_flag_is_mutable;
1418static int hf_rtps_type_object_v2_type_flag_is_nested;
1419static int hf_rtps_type_object_v2_type_flags;
1420static int hf_rtps_type_object_v2_type_name;
1421static int hf_rtps_type_object_v2_union_label;
1422static int hf_rtps_type_object_v2_unit_name;
1423static int hf_rtps_type_object_v2_hash_id;
1424static int hf_rtps_xcdr2_delimited_header;
1425static int hf_rtps_xcdr2_enhanced_mutable_header;
1426static int hf_rtps_xcdr2_length_code;
1427static int hf_rtps_xcdr2_member_id;
1428static int hf_rtps_xcdr2_must_understand;
1429static int hf_rtps_xcdr2_nextint;
1430static int hf_rtps_type_object_type_id_disc;
1431static int hf_rtps_type_object_type_id;
1432static int hf_rtps_type_object_primitive_type_id;
1433static int hf_rtps_type_object_base_type;
1434static int hf_rtps_type_object_base_primitive_type_id;
1435static int hf_rtps_type_object_element_raw;
1436static int hf_rtps_type_object_type_property_name;
1437static int hf_rtps_type_object_flags;
1438static int hf_rtps_type_object_member_id;
1439static int hf_rtps_type_object_annotation_value_d;
1440static int hf_rtps_type_object_annotation_value_16;
1441static int hf_rtps_type_object_union_label;
1442static int hf_rtps_type_object_bound;
1443static int hf_rtps_type_object_enum_constant_name;
1444static int hf_rtps_type_object_enum_constant_value;
1445static int hf_rtps_type_object_element_shared;
1446static int hf_rtps_type_object_name;
1447static int hf_rtps_type_object_element_module_name;
1448static int hf_rtps_uncompressed_serialized_length;
1449static int hf_rtps_compression_plugin_class_id;
1450static int hf_rtps_compressed_serialized_type_object;
1451static int hf_rtps_pl_cdr_member;
1452static int hf_rtps_pl_cdr_member_id;
1453static int hf_rtps_pl_cdr_member_length;
1454static int hf_rtps_pl_cdr_member_id_ext;
1455static int hf_rtps_pl_cdr_member_length_ext;
1456static int hf_rtps_dcps_publication_data_frame_number;
1457static int hf_rtps_udpv4_wan_locator_flags;
1458static int hf_rtps_uuid;
1459static int hf_rtps_udpv4_wan_locator_public_ip;
1460static int hf_rtps_udpv4_wan_locator_public_port;
1461static int hf_rtps_udpv4_wan_locator_local_ip;
1462static int hf_rtps_udpv4_wan_locator_local_port;
1463static int hf_rtps_udpv4_wan_binding_ping_port;
1464static int hf_rtps_udpv4_wan_binding_ping_flags;
1465static int hf_rtps_long_address;
1466static int hf_rtps_param_group_coherent_set;
1467static int hf_rtps_param_end_group_coherent_set;
1468static int hf_rtps_param_mig_end_coherent_set_sample_count;
1469static int hf_rtps_encapsulation_options_compression_plugin_class_id;
1470static int hf_rtps_padding_bytes;
1471static int hf_rtps_topic_query_selection_kind;
1472static int hf_rtps_data_session_intermediate;
1473
1474/* Flag bits */
1475static int hf_rtps_flag_reserved80;
1476static int hf_rtps_flag_reserved40;
1477static int hf_rtps_flag_reserved20;
1478static int hf_rtps_flag_reserved10;
1479static int hf_rtps_flag_reserved08;
1480static int hf_rtps_flag_reserved04;
1481static int hf_rtps_flag_reserved02;
1482static int hf_rtps_flag_reserved8000;
1483static int hf_rtps_flag_reserved4000;
1484static int hf_rtps_flag_reserved2000;
1485static int hf_rtps_flag_reserved1000;
1486static int hf_rtps_flag_reserved0800;
1487static int hf_rtps_flag_reserved0400;
1488static int hf_rtps_flag_reserved0200;
1489static int hf_rtps_flag_reserved0100;
1490static int hf_rtps_flag_reserved0080;
1491static int hf_rtps_flag_reserved0040;
1492
1493static int hf_rtps_flag_builtin_endpoint_set_reserved;
1494static int hf_rtps_flag_unregister;
1495static int hf_rtps_flag_inline_qos_v1;
1496static int hf_rtps_flag_hash_key;
1497static int hf_rtps_flag_alive;
1498static int hf_rtps_flag_data_present_v1;
1499static int hf_rtps_flag_multisubmessage;
1500static int hf_rtps_flag_endianness;
1501static int hf_rtps_flag_additional_authenticated_data;
1502static int hf_rtps_flag_protected_with_psk;
1503static int hf_rtps_flag_vendor_specific_content;
1504static int hf_rtps_flag_status_info;
1505static int hf_rtps_flag_data_present_v2;
1506static int hf_rtps_flag_inline_qos_v2;
1507static int hf_rtps_flag_final;
1508static int hf_rtps_flag_hash_key_rti;
1509static int hf_rtps_flag_liveliness;
1510static int hf_rtps_flag_multicast;
1511static int hf_rtps_flag_data_serialized_key;
1512static int hf_rtps_flag_data_frag_serialized_key;
1513static int hf_rtps_flag_timestamp;
1514static int hf_rtps_flag_no_virtual_guids;
1515static int hf_rtps_flag_multiple_writers;
1516static int hf_rtps_flag_multiple_virtual_guids;
1517static int hf_rtps_flag_serialize_key16;
1518static int hf_rtps_flag_invalid_sample;
1519static int hf_rtps_flag_data_present16;
1520static int hf_rtps_flag_offsetsn_present;
1521static int hf_rtps_flag_inline_qos16_v2;
1522static int hf_rtps_flag_timestamp_present;
1523static int hf_rtps_flag_unregistered;
1524static int hf_rtps_flag_disposed;
1525static int hf_rtps_param_status_info_flags;
1526
1527static int hf_rtps_flag_participant_announcer;
1528static int hf_rtps_flag_participant_detector;
1529static int hf_rtps_flag_publication_announcer;
1530static int hf_rtps_flag_publication_detector;
1531static int hf_rtps_flag_subscription_announcer;
1532static int hf_rtps_flag_subscription_detector;
1533static int hf_rtps_flag_participant_proxy_announcer;
1534static int hf_rtps_flag_participant_proxy_detector;
1535static int hf_rtps_flag_participant_state_announcer;
1536static int hf_rtps_flag_participant_state_detector;
1537static int hf_rtps_flag_participant_message_datawriter;
1538static int hf_rtps_flag_participant_message_datareader;
1539static int hf_rtps_flag_typelookup_request_datawriter;
1540static int hf_rtps_flag_typelookup_request_datareader;
1541static int hf_rtps_flag_typelookup_reply_datawriter;
1542static int hf_rtps_flag_typelookup_reply_datareader;
1543static int hf_rtps_flag_typelookup_request_secure_datawriter;
1544static int hf_rtps_flag_typelookup_request_secure_datareader;
1545static int hf_rtps_flag_typelookup_reply_secure_datawriter;
1546static int hf_rtps_flag_typelookup_reply_secure_datareader;
1547static int hf_rtps_flag_secure_publication_writer;
1548static int hf_rtps_flag_secure_publication_reader;
1549static int hf_rtps_flag_secure_subscription_writer;
1550static int hf_rtps_flag_secure_subscription_reader;
1551static int hf_rtps_flag_secure_participant_message_writer;
1552static int hf_rtps_flag_secure_participant_message_reader;
1553static int hf_rtps_flag_participant_stateless_message_writer;
1554static int hf_rtps_flag_participant_stateless_message_reader;
1555static int hf_rtps_flag_secure_participant_volatile_message_writer;
1556static int hf_rtps_flag_secure_participant_volatile_message_reader;
1557static int hf_rtps_flag_participant_secure_writer;
1558static int hf_rtps_flag_participant_secure_reader;
1559static int hf_rtps_flag_typeflag_final;
1560static int hf_rtps_flag_typeflag_mutable;
1561static int hf_rtps_flag_typeflag_nested;
1562static int hf_rtps_flag_memberflag_key;
1563static int hf_rtps_flag_memberflag_optional;
1564static int hf_rtps_flag_memberflag_shareable;
1565static int hf_rtps_flag_memberflag_union_default;
1566static int hf_rtps_flag_service_request_writer;
1567static int hf_rtps_flag_service_request_reader;
1568static int hf_rtps_flag_locator_ping_writer;
1569static int hf_rtps_flag_locator_ping_reader;
1570static int hf_rtps_flag_secure_service_request_writer;
1571static int hf_rtps_flag_cloud_discovery_service_announcer;
1572static int hf_rtps_flag_participant_config_writer;
1573static int hf_rtps_flag_participant_config_reader;
1574static int hf_rtps_flag_participant_config_secure_writer;
1575static int hf_rtps_flag_participant_config_secure_reader;
1576static int hf_rtps_flag_participant_bootstrap_writer;
1577static int hf_rtps_flag_participant_bootstrap_reader;
1578static int hf_rtps_flag_monitoring_periodic_writer;
1579static int hf_rtps_flag_monitoring_periodic_reader;
1580static int hf_rtps_flag_monitoring_event_writer;
1581static int hf_rtps_flag_monitoring_event_reader;
1582static int hf_rtps_flag_monitoring_logging_writer;
1583static int hf_rtps_flag_monitoring_logging_reader;
1584static int hf_rtps_flag_secure_service_request_reader;
1585static int hf_rtps_flag_security_access_protected;
1586static int hf_rtps_flag_security_discovery_protected;
1587static int hf_rtps_flag_security_submessage_protected;
1588static int hf_rtps_param_participant_security_symmetric_cipher_algorithms_builtin_endpoints_required_mask;
1589static int hf_rtps_param_participant_security_symmetric_cipher_algorithms_builtin_endpoints_key_exchange_used_bit;
1590static int hf_rtps_param_participant_security_symmetric_cipher_algorithms_supported_mask;
1591static int hf_rtps_param_participant_security_symmetric_cipher_algorithms_user_endpoints_default_required_mask;
1592static int hf_rtps_flag_security_supported;
1593static int hf_rtps_flag_security_required;
1594static int hf_rtps_flag_security_symmetric_cipher_mask_aes128_gcm;
1595static int hf_rtps_flag_security_symmetric_cipher_mask_aes256_gcm;
1596static int hf_rtps_flag_security_symmetric_cipher_mask_vendor_rti_aes192_gcm;
1597static int hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm01;
1598static int hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm02;
1599static int hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm03;
1600static int hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm04;
1601static int hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm05;
1602static int hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm06;
1603static int hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm07;
1604static int hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm08;
1605static int hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm09;
1606static int hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm10;
1607static int hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm11;
1608static int hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm12;
1609static int hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm13;
1610static int hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm14;
1611static int hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm15;
1612static int hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm16;
1613static int hf_rtps_param_compression_id_mask;
1614static int hf_rtps_flag_compression_id_zlib;
1615static int hf_rtps_flag_compression_id_bzip2;
1616static int hf_rtps_flag_compression_id_lz4;
1617static int hf_rtps_param_crypto_algorithm_requirements_trust_chain;
1618static int hf_rtps_param_crypto_algorithm_requirements_message_auth;
1619static int hf_rtps_flag_security_digital_signature_mask_rsassapssmgf1sha256_2048_sha256;
1620static int hf_rtps_flag_security_digital_signature_mask_rsassapkcs1v15_2048_sha256;
1621static int hf_rtps_flag_security_digital_signature_mask_ecdsa_p256_sha256;
1622static int hf_rtps_flag_security_digital_signature_mask_ecdsa_p384_sha384;
1623static int hf_rtps_flag_security_digital_signature_mask_ecdsa_ed25519_sha512;
1624static int hf_rtps_flag_security_digital_signature_mask_ecdsa_ed448_shake256;
1625static int hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm01;
1626static int hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm02;
1627static int hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm03;
1628static int hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm04;
1629static int hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm05;
1630static int hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm06;
1631static int hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm07;
1632static int hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm08;
1633static int hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm09;
1634static int hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm10;
1635static int hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm11;
1636static int hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm12;
1637static int hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm13;
1638static int hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm14;
1639static int hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm15;
1640static int hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm16;
1641static int hf_rtps_flag_security_key_establishment_mask_dhe_modp2048256;
1642static int hf_rtps_flag_security_key_establishment_mask_ecdheceum_p256;
1643static int hf_rtps_flag_security_key_establishment_mask_ecdheceum_p384;
1644static int hf_rtps_flag_security_key_establishment_mask_ecdheceum_x25519;
1645static int hf_rtps_flag_security_key_establishment_mask_ecdheceum_x448;
1646static int hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm01;
1647static int hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm02;
1648static int hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm03;
1649static int hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm04;
1650static int hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm05;
1651static int hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm06;
1652static int hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm07;
1653static int hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm08;
1654static int hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm09;
1655static int hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm10;
1656static int hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm11;
1657static int hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm12;
1658static int hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm13;
1659static int hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm14;
1660static int hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm15;
1661static int hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm16;
1662static int hf_rtps_flag_security_algorithm_compatibility_mode;
1663static int hf_rtps_flag_security_payload_protected;
1664static int hf_rtps_flag_endpoint_security_attribute_flag_is_read_protected;
1665static int hf_rtps_flag_endpoint_security_attribute_flag_is_write_protected;
1666static int hf_rtps_flag_endpoint_security_attribute_flag_is_discovery_protected;
1667static int hf_rtps_flag_endpoint_security_attribute_flag_is_submessage_protected;
1668static int hf_rtps_flag_endpoint_security_attribute_flag_is_payload_protected;
1669static int hf_rtps_flag_endpoint_security_attribute_flag_is_key_protected;
1670static int hf_rtps_flag_endpoint_security_attribute_flag_is_liveliness_protected;
1671static int hf_rtps_flag_endpoint_security_attribute_flag_is_valid;
1672static int hf_rtps_param_endpoint_security_attributes_mask;
1673static int hf_rtps_flag_plugin_endpoint_security_attribute_flag_is_payload_encrypted;
1674static int hf_rtps_flag_plugin_endpoint_security_attribute_flag_is_key_encrypted;
1675static int hf_rtps_flag_plugin_endpoint_security_attribute_flag_is_liveliness_encrypted;
1676static int hf_rtps_flag_plugin_endpoint_security_attribute_flag_is_valid;
1677static int hf_rtps_param_plugin_endpoint_security_attributes_mask;
1678static int hf_rtps_flag_participant_security_attribute_flag_key_psk_protected;
1679static int hf_rtps_flag_participant_security_attribute_flag_is_rtps_protected;
1680static int hf_rtps_flag_participant_security_attribute_flag_is_discovery_protected;
1681static int hf_rtps_flag_participant_security_attribute_flag_is_liveliness_protected;
1682static int hf_rtps_flag_participant_security_attribute_flag_key_revisions_enabled;
1683static int hf_rtps_flag_participant_security_attribute_flag_is_valid;
1684static int hf_rtps_param_participant_security_attributes_mask;
1685static int hf_rtps_flag_plugin_participant_security_attribute_flag_is_psk_encrypted;
1686static int hf_rtps_flag_plugin_participant_security_attribute_flag_is_rtps_encrypted;
1687static int hf_rtps_flag_plugin_participant_security_attribute_flag_is_discovery_encrypted;
1688static int hf_rtps_flag_plugin_participant_security_attribute_flag_is_liveliness_encrypted;
1689static int hf_rtps_flag_plugin_participant_security_attribute_flag_is_rtps_origin_encrypted;
1690static int hf_rtps_flag_plugin_participant_security_attribute_flag_is_discovery_origin_encrypted;
1691static int hf_rtps_flag_plugin_participant_security_attribute_flag_is_liveliness_origin_encrypted;
1692static int hf_rtps_flag_plugin_participant_security_attribute_flag_is_valid;
1693static int hf_rtps_param_plugin_participant_security_attributes_mask;
1694static int hf_rtps_sm_rti_crc_number;
1695static int hf_rtps_sm_rti_crc_result;
1696static int hf_rtps_data_tag_name;
1697static int hf_rtps_data_tag_value;
1698static int hf_rtps_flag_udpv4_wan_locator_u;
1699static int hf_rtps_flag_udpv4_wan_locator_p;
1700static int hf_rtps_flag_udpv4_wan_locator_b;
1701static int hf_rtps_flag_udpv4_wan_locator_r;
1702static int hf_rtps_flag_udpv4_wan_binding_ping_e;
1703static int hf_rtps_flag_udpv4_wan_binding_ping_l;
1704static int hf_rtps_flag_udpv4_wan_binding_ping_b;
1705static int hf_rtps_header_extension_flags;
1706static int hf_rtps_flag_header_extension_message_length;
1707static int hf_rtps_flag_header_extension_uextension;
1708static int hf_rtps_flag_header_extension_wextension;
1709static int hf_rtps_flag_header_extension_checksum1;
1710static int hf_rtps_flag_header_extension_checksum2;
1711static int hf_rtps_flag_header_extension_parameters;
1712static int hf_rtps_flag_header_extension_timestamp;
1713
1714static int hf_rtps_fragments;
1715static int hf_rtps_fragment;
1716static int hf_rtps_fragment_overlap;
1717static int hf_rtps_fragment_overlap_conflict;
1718static int hf_rtps_fragment_multiple_tails;
1719static int hf_rtps_fragment_too_long_fragment;
1720static int hf_rtps_fragment_error;
1721static int hf_rtps_fragment_count;
1722static int hf_rtps_reassembled_in;
1723static int hf_rtps_reassembled_length;
1724static int hf_rtps_reassembled_data;
1725static int hf_rtps_encapsulation_extended_compression_options;
1726static int hf_rtps_message_length;
1727static int hf_rtps_header_extension_checksum_crc32c;
1728static int hf_rtps_header_extension_checksum_crc64;
1729static int hf_rtps_header_extension_checksum_md5;
1730static int hf_rtps_uextension;
1731static int hf_rtps_wextension;
1732static int hf_rtps_writer_group_oid;
1733static int hf_rtps_reader_group_oid;
1734static int hf_rtps_writer_session_id;
1735
1736/* Subtree identifiers */
1737static int ett_rtps_dissection_tree;
1738static int ett_rtps;
1739static int ett_rtps_default_mapping;
1740static int ett_rtps_proto_version;
1741static int ett_rtps_submessage;
1742static int ett_rtps_parameter_sequence;
1743static int ett_rtps_parameter;
1744static int ett_rtps_flags;
1745static int ett_rtps_entity;
1746static int ett_rtps_generic_guid;
1747static int ett_rtps_rdentity;
1748static int ett_rtps_wrentity;
1749static int ett_rtps_guid_prefix;
1750static int ett_rtps_app_id;
1751static int ett_rtps_locator_udp_v4;
1752static int ett_rtps_locator;
1753static int ett_rtps_locator_list;
1754static int ett_rtps_timestamp;
1755static int ett_rtps_bitmap;
1756static int ett_rtps_seq_string;
1757static int ett_rtps_seq_ulong;
1758static int ett_rtps_resource_limit;
1759static int ett_rtps_durability_service;
1760static int ett_rtps_liveliness;
1761static int ett_rtps_manager_key;
1762static int ett_rtps_serialized_data;
1763static int ett_rtps_locator_filter_channel;
1764static int ett_rtps_part_message_data;
1765static int ett_rtps_sample_info_list;
1766static int ett_rtps_sample_info;
1767static int ett_rtps_sample_batch_list;
1768static int ett_rtps_locator_filter_locator;
1769static int ett_rtps_writer_heartbeat_virtual_list;
1770static int ett_rtps_writer_heartbeat_virtual;
1771static int ett_rtps_virtual_guid_heartbeat_virtual_list;
1772static int ett_rtps_virtual_guid_heartbeat_virtual;
1773static int ett_rtps_app_ack_virtual_writer_interval_list;
1774static int ett_rtps_app_ack_virtual_writer_interval;
1775static int ett_rtps_transport_info;
1776static int ett_rtps_app_ack_virtual_writer_list;
1777static int ett_rtps_app_ack_virtual_writer;
1778static int ett_rtps_product_version;
1779static int ett_rtps_property_list;
1780static int ett_rtps_property;
1781static int ett_rtps_topic_info;
1782static int ett_rtps_topic_info_dw_qos;
1783static int ett_rtps_type_bound_seq;
1784static int ett_rtps_type_dep;
1785static int ett_rtps_type_id;
1786static int ett_rtps_type_object_v2;
1787static int ett_rtps_type_object_v2_complete_type_detail;
1788static int ett_rtps_type_object_v2_alias;
1789static int ett_rtps_type_object_v2_alias_body;
1790static int ett_rtps_type_object_v2_struct;
1791static int ett_rtps_type_object_v2_struct_header;
1792static int ett_rtps_type_object_v2_member_seq;
1793static int ett_rtps_type_object_v2_member;
1794static int ett_rtps_type_object_v2_union;
1795static int ett_rtps_type_object_v2_union_header;
1796static int ett_rtps_type_object_v2_union_discriminator;
1797static int ett_rtps_type_object_v2_union_label_seq;
1798static int ett_rtps_type_object_v2_enum;
1799static int ett_rtps_type_object_v2_enum_header;
1800static int ett_rtps_type_object_v2_enum_literal;
1801static int ett_rtps_type_deps_seq;
1802static int ett_rtps_type_id_w_deps;
1803static int ett_rtps_type_id_w_size;
1804static int ett_rtps_type_information;
1805static int ett_rtps_type_lookup_request;
1806static int ett_rtps_type_lookup_reply;
1807static int ett_rtps_type_lookup_request_id;
1808static int ett_rtps_type_lookup_request_header;
1809static int ett_rtps_type_lookup_request_data;
1810static int ett_rtps_type_lookup_reply_header;
1811static int ett_rtps_type_lookup_reply_data;
1812static int ett_rtps_type_lookup_deps_seq;
1813static int ett_rtps_instance_name;
1814static int ett_rtps_type_information_minimal;
1815static int ett_rtps_type_information_complete;
1816static int ett_rtps_type_object;
1817static int ett_rtps_type_library;
1818static int ett_rtps_type_element;
1819static int ett_rtps_type_annotation_usage_list;
1820static int ett_rtps_type_enum_constant;
1821static int ett_rtps_type_bound_list;
1822static int ett_rtps_secure_payload_tree;
1823static int ett_rtps_secure_dataheader_tree;
1824static int ett_rtps_secure_transformation_kind;
1825static int ett_rtps_pgm_data;
1826static int ett_rtps_message_identity;
1827static int ett_rtps_related_message_identity;
1828static int ett_rtps_data_holder_seq;
1829static int ett_rtps_data_holder;
1830static int ett_rtps_data_holder_properties;
1831static int ett_rtps_property_tree;
1832static int ett_rtps_param_header_tree;
1833static int ett_rtps_service_request_tree;
1834static int ett_rtps_locator_ping_tree;
1835static int ett_rtps_locator_reachability_tree;
1836static int ett_rtps_custom_dissection_info;
1837static int ett_rtps_locator_list_tree;
1838static int ett_rtps_topic_query_tree;
1839static int ett_rtps_topic_query_selection_tree;
1840static int ett_rtps_topic_query_filter_params_tree;
1841static int ett_rtps_data_member;
1842static int ett_rtps_data_tag_seq;
1843static int ett_rtps_data_tag_item;
1844static int ett_rtps_fragment;
1845static int ett_rtps_fragments;
1846static int ett_rtps_data_representation;
1847static int ett_rtps_decompressed_type_object;
1848static int ett_rtps_info_remaining_items;
1849static int ett_rtps_data_encapsulation_options;
1850static int ett_rtps_decompressed_serialized_data;
1851static int ett_rtps_instance_transition_data;
1852static int ett_rtps_crypto_algorithm_requirements;
1853static int ett_rtps_decrypted_payload;
1854static int ett_rtps_secure_postfix_tag_list_item;
1855
1856static expert_field ei_rtps_sm_octets_to_next_header_error;
1857static expert_field ei_rtps_checksum_check_error;
1858static expert_field ei_rtps_port_invalid;
1859static expert_field ei_rtps_ip_invalid;
1860static expert_field ei_rtps_parameter_value_invalid;
1861static expert_field ei_rtps_extra_bytes;
1862static expert_field ei_rtps_missing_bytes;
1863static expert_field ei_rtps_locator_port;
1864static expert_field ei_rtps_more_samples_available;
1865static expert_field ei_rtps_parameter_not_decoded;
1866static expert_field ei_rtps_sm_octets_to_next_header_not_zero;
1867static expert_field ei_rtps_pid_type_csonsistency_invalid_size;
1868static expert_field ei_rtps_uncompression_error;
1869static expert_field ei_rtps_value_too_large;
1870static expert_field ei_rtps_invalid_psk;
1871static expert_field ei_rtps_invalid_fragment_size;
1872
1873/***************************************************************************/
1874/* Value-to-String Tables */
1875static const value_string vendor_vals[] = {
1876 { RTPS_VENDOR_UNKNOWN(0x0000), RTPS_VENDOR_UNKNOWN_STRING"VENDOR_ID_UNKNOWN (0x0000)"},
1877 { RTPS_VENDOR_RTI_DDS(0x0101), RTPS_VENDOR_RTI_DDS_STRING"Real-Time Innovations, Inc. - Connext DDS"},
1878 { RTPS_VENDOR_ADL_DDS(0x0102), RTPS_VENDOR_ADL_DDS_STRING"ADLink Ltd. - OpenSplice DDS"},
1879 { RTPS_VENDOR_OCI(0x0103), RTPS_VENDOR_OCI_STRING"Object Computing, Inc. (OCI) - OpenDDS"},
1880 { RTPS_VENDOR_MILSOFT(0x0104), RTPS_VENDOR_MILSOFT_STRING"MilSoft"},
1881 { RTPS_VENDOR_KONGSBERG(0x0105), RTPS_VENDOR_KONGSBERG_STRING"Kongsberg - InterCOM DDS"},
1882 { RTPS_VENDOR_TOC(0x0106), RTPS_VENDOR_TOC_STRING"TwinOaks Computing, Inc. - CoreDX DDS"},
1883 { RTPS_VENDOR_LAKOTA_TSI(0x0107), RTPS_VENDOR_LAKOTA_TSI_STRING"Lakota Technical Solutions, Inc."},
1884 { RTPS_VENDOR_ICOUP(0x0108), RTPS_VENDOR_ICOUP_STRING"ICOUP Consulting"},
1885 { RTPS_VENDOR_ETRI(0x0109), RTPS_VENDOR_ETRI_STRING"Electronics and Telecommunication Research Institute (ETRI) - Diamond DDS"},
1886 { RTPS_VENDOR_RTI_DDS_MICRO(0x010A), RTPS_VENDOR_RTI_DDS_MICRO_STRING"Real-Time Innovations, Inc. (RTI) - Connext DDS Micro"},
1887 { RTPS_VENDOR_ADL_CAFE(0x010B), RTPS_VENDOR_ADL_CAFE_STRING"ADLink Ltd. - Vortex Cafe"},
1888 { RTPS_VENDOR_PT(0x010C), RTPS_VENDOR_PT_STRING"PrismTech"},
1889 { RTPS_VENDOR_ADL_LITE(0x010D), RTPS_VENDOR_ADL_LITE_STRING"ADLink Ltd. - Vortex Lite"},
1890 { RTPS_VENDOR_TECHNICOLOR(0x010E), RTPS_VENDOR_TECHNICOLOR_STRING"Technicolor Inc. - Qeo"},
1891 { RTPS_VENDOR_EPROSIMA(0x010F), RTPS_VENDOR_EPROSIMA_STRING"eProsima - Fast-RTPS"},
1892 { RTPS_VENDOR_ECLIPSE(0x0110), RTPS_VENDOR_ECLIPSE_STRING"Eclipse Foundation - Cyclone DDS"},
1893 { RTPS_VENDOR_GURUM(0x0111), RTPS_VENDOR_GURUM_STRING"GurumNetworks Ltd. - GurumDDS"},
1894 { RTPS_VENDOR_RUST(0x0112), RTPS_VENDOR_RUST_STRING"Atostek - RustDDS"},
1895 { RTPS_VENDOR_ZRDDS(0x0113), RTPS_VENDOR_ZRDDS_STRING"Nanjing Zhenrong Software Technology Co. - ZRDDS"},
1896 { RTPS_VENDOR_DUST(0x0114), RTPS_VENDOR_DUST_STRING"S2E Software Systems B.V. - Dust DDS"},
1897 { 0, NULL((void*)0) }
1898};
1899
1900static const value_string entity_id_vals[] = {
1901 { ENTITYID_UNKNOWN(0x00000000), "ENTITYID_UNKNOWN" },
1902 { ENTITYID_PARTICIPANT(0x000001c1), "ENTITYID_PARTICIPANT" },
1903 { ENTITYID_BUILTIN_TOPIC_WRITER(0x000002c2), "ENTITYID_BUILTIN_TOPIC_WRITER" },
1904 { ENTITYID_BUILTIN_TOPIC_READER(0x000002c7), "ENTITYID_BUILTIN_TOPIC_READER" },
1905 { ENTITYID_BUILTIN_PUBLICATIONS_WRITER(0x000003c2), "ENTITYID_BUILTIN_PUBLICATIONS_WRITER" },
1906 { ENTITYID_BUILTIN_PUBLICATIONS_READER(0x000003c7), "ENTITYID_BUILTIN_PUBLICATIONS_READER" },
1907 { ENTITYID_BUILTIN_SUBSCRIPTIONS_WRITER(0x000004c2), "ENTITYID_BUILTIN_SUBSCRIPTIONS_WRITER" },
1908 { ENTITYID_BUILTIN_SUBSCRIPTIONS_READER(0x000004c7), "ENTITYID_BUILTIN_SUBSCRIPTIONS_READER" },
1909 { ENTITYID_BUILTIN_PARTICIPANT_WRITER(0x000100c2), "ENTITYID_BUILTIN_PARTICIPANT_WRITER" },
1910 { ENTITYID_BUILTIN_PARTICIPANT_READER(0x000100c7), "ENTITYID_BUILTIN_PARTICIPANT_READER" },
1911 { ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_WRITER(0x000200c2), "ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_WRITER" },
1912 { ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_READER(0x000200c7), "ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_READER" },
1913 { ENTITYID_TL_SVC_REQ_WRITER(0x000300c3), "ENTITYID_TL_SVC_REQ_WRITER" },
1914 { ENTITYID_TL_SVC_REQ_READER(0x000300c4), "ENTITYID_TL_SVC_REQ_READER" },
1915 { ENTITYID_TL_SVC_REPLY_WRITER(0x000301c3), "ENTITYID_TL_SVC_REPLY_WRITER" },
1916 { ENTITYID_TL_SVC_REPLY_READER(0x000301c4), "ENTITYID_TL_SVC_REPLY_READER" },
1917 { ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_WRITER(0xff0003c2), "ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_WRITER" },
1918 { ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_READER(0xff0003c7), "ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_READER" },
1919 { ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_WRITER(0xff0004c2), "ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_WRITER" },
1920 { ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_READER(0xff0004c7), "ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_READER" },
1921 { ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_SECURE_WRITER(0xff0200c2), "ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_SECURE_WRITER" },
1922 { ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_SECURE_READER(0xff0200c7), "ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_SECURE_READER" },
1923 { ENTITYID_P2P_BUILTIN_PARTICIPANT_STATELESS_WRITER(0x000201c3), "ENTITYID_P2P_BUILTIN_PARTICIPANT_STATELESS_WRITER" },
1924 { ENTITYID_P2P_BUILTIN_PARTICIPANT_STATELESS_READER(0x000201c4), "ENTITYID_P2P_BUILTIN_PARTICIPANT_STATELESS_READER" },
1925 { ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_WRITER(0xff0202c3), "ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_WRITER" },
1926 { ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_READER(0xff0202c4), "ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_READER" },
1927 { ENTITYID_SPDP_RELIABLE_BUILTIN_PARTICIPANT_SECURE_WRITER(0xff0101c2), "ENTITYID_SPDP_RELIABLE_BUILTIN_PARTICIPANT_SECURE_WRITER"},
1928 { ENTITYID_SPDP_RELIABLE_BUILTIN_PARTICIPANT_SECURE_READER(0xff0101c7), "ENTITYID_SPDP_RELIABLE_BUILTIN_PARTICIPANT_SECURE_READER"},
1929
1930 /* vendor specific - RTI */
1931 { ENTITYID_RTI_BUILTIN_LOCATOR_PING_WRITER(0x00020182), "ENTITYID_RTI_BUILTIN_LOCATOR_PING_WRITER" },
1932 { ENTITYID_RTI_BUILTIN_LOCATOR_PING_READER(0x00020187), "ENTITYID_RTI_BUILTIN_LOCATOR_PING_READER" },
1933 { ENTITYID_RTI_BUILTIN_SERVICE_REQUEST_WRITER(0x00020082), "ENTITYID_RTI_BUILTIN_SERVICE_REQUEST_WRITER" },
1934 { ENTITYID_RTI_BUILTIN_SERVICE_REQUEST_READER(0x00020087), "ENTITYID_RTI_BUILTIN_SERVICE_REQUEST_READER" },
1935 { ENTITYID_RTI_BUILTIN_PARTICIPANT_BOOTSTRAP_WRITER(0x00010082), "ENTITYID_RTI_BUILTIN_PARTICIPANT_BOOTSTRAP_WRITER" },
1936 { ENTITYID_RTI_BUILTIN_PARTICIPANT_BOOTSTRAP_READER(0x00010087), "ENTITYID_RTI_BUILTIN_PARTICIPANT_BOOTSTRAP_READER" },
1937 { ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_WRITER(0x00010182), "ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_WRITER" },
1938 { ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_READER(0x00010187), "ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_READER" },
1939 { ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_WRITER(0xff010182), "ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_WRITER"},
1940 { ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_READER(0xff010187), "ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_READER"},
1941
1942 /* Deprecated Items */
1943 { ENTITYID_APPLICATIONS_WRITER(0x000001c2), "writerApplications [DEPRECATED]" },
1944 { ENTITYID_APPLICATIONS_READER(0x000001c7), "readerApplications [DEPRECATED]" },
1945 { ENTITYID_CLIENTS_WRITER(0x000005c2), "writerClients [DEPRECATED]" },
1946 { ENTITYID_CLIENTS_READER(0x000005c7), "readerClients [DEPRECATED]" },
1947 { ENTITYID_SERVICES_WRITER(0x000006c2), "writerServices [DEPRECATED]" },
1948 { ENTITYID_SERVICES_READER(0x000006c7), "readerServices [DEPRECATED]" },
1949 { ENTITYID_MANAGERS_WRITER(0x000007c2), "writerManagers [DEPRECATED]" },
1950 { ENTITYID_MANAGERS_READER(0x000007c7), "readerManagers [DEPRECATED]" },
1951 { ENTITYID_APPLICATION_SELF(0x000008c1), "applicationSelf [DEPRECATED]" },
1952 { ENTITYID_APPLICATION_SELF_WRITER(0x000008c2), "writerApplicationSelf [DEPRECATED]" },
1953 { ENTITYID_APPLICATION_SELF_READER(0x000008c7), "readerApplicationSelf [DEPRECATED]" },
1954 { 0, NULL((void*)0) }
1955};
1956
1957static const value_string entity_kind_vals [] = {
1958 { ENTITYKIND_APPDEF_UNKNOWN(0x00), "Application-defined unknown kind" },
1959 { ENTITYKIND_APPDEF_PARTICIPANT(0x01), "Application-defined participant" },
1960 { ENTITYKIND_APPDEF_WRITER_WITH_KEY(0x02), "Application-defined writer (with key)" },
1961 { ENTITYKIND_APPDEF_WRITER_NO_KEY(0x03), "Application-defined writer (no key)" },
1962 { ENTITYKIND_APPDEF_READER_WITH_KEY(0x07), "Application-defined reader (with key)" },
1963 { ENTITYKIND_APPDEF_READER_NO_KEY(0x04), "Application-defined reader (no key)" },
1964 { ENTITYKIND_BUILTIN_PARTICIPANT(0xc1), "Built-in participant" },
1965 { ENTITYKIND_BUILTIN_WRITER_WITH_KEY(0xc2), "Built-in writer (with key)" },
1966 { ENTITYKIND_BUILTIN_WRITER_NO_KEY(0xc3), "Built-in writer (no key)" },
1967 { ENTITYKIND_BUILTIN_READER_WITH_KEY(0xc7), "Built-in reader (with key)" },
1968 { ENTITYKIND_BUILTIN_READER_NO_KEY(0xc4), "Built-in reader (no key)" },
1969 { ENTITYKIND_RTI_BUILTIN_WRITER_WITH_KEY(0x82), "RTI Built-in writer (with key)" },
1970 { ENTITYKIND_RTI_BUILTIN_WRITER_NO_KEY(0x83), "RTI Built-in writer (no key)" },
1971 { ENTITYKIND_RTI_BUILTIN_READER_WITH_KEY(0x87), "RTI Built-in reader (with key)" },
1972 { ENTITYKIND_RTI_BUILTIN_READER_NO_KEY(0x84), "RTI Built-in reader (no key)" },
1973 { ENTITYID_OBJECT_NORMAL_META_WRITER_GROUP(0x88), "Object normal meta writer group" },
1974 { ENTITYID_OBJECT_NORMAL_META_READER_GROUP(0x89), "Object normal meta reader group" },
1975 { ENTITYID_OBJECT_NORMAL_META_TOPIC(0x8a), "Object normal meta topic" },
1976
1977 { ENTITYID_RESERVED_META_CST_GROUP_WRITER(0xcb), "Reserved meta CST group writer" },
1978 { ENTITYID_RESERVED_META_GROUP_WRITER(0xcc), "Reserved meta group writer" },
1979 { ENTITYID_RESERVED_META_GROUP_READER(0xcd), "Reserved meta group reader" },
1980 { ENTITYID_RESERVED_META_CST_GROUP_READER(0xce), "Reserved meta CST group reader" },
1981 { ENTITYID_NORMAL_META_CST_GROUP_WRITER(0x8b), "Normal meta CST group writer" },
1982 { ENTITYID_NORMAL_META_GROUP_WRITER(0x8c), "Normal meta group writer" },
1983 { ENTITYID_NORMAL_META_GROUP_READER(0x8d), "Normal meta group reader" },
1984 { ENTITYID_NORMAL_META_CST_GROUP_READER(0x8e), "Normal meta CST group reader" },
1985 { ENTITYID_RESERVED_USER_CST_GROUP_WRITER(0x4b), "Reserved user CST group writer" },
1986 { ENTITYID_RESERVED_USER_GROUP_WRITER(0x4c), "Reserved user group writer" },
1987 { ENTITYID_RESERVED_USER_GROUP_READER(0x4d), "Reserved user group reader" },
1988 { ENTITYID_RESERVED_USER_CST_GROUP_READER(0x4e), "Reserved user CST group reader" },
1989 { ENTITYID_NORMAL_USER_CST_GROUP_WRITER(0x0b), "Normal user CST group writer" },
1990 { ENTITYID_NORMAL_USER_GROUP_WRITER(0x0c), "Normal user writer" },
1991 { ENTITYID_NORMAL_USER_GROUP_READER(0x0d), "Normal user reader" },
1992 { ENTITYID_NORMAL_USER_CST_GROUP_READER(0x0e), "Normal user CST group reader" },
1993 { 0, NULL((void*)0) }
1994};
1995
1996
1997static const value_string nature_type_vals[] = {
1998 { PORT_METATRAFFIC_UNICAST(0), "UNICAST_METATRAFFIC"},
1999 { PORT_METATRAFFIC_MULTICAST(2), "MULTICAST_METATRAFFIC"},
2000 { PORT_USERTRAFFIC_UNICAST(3), "UNICAST_USERTRAFFIC"},
2001 { PORT_USERTRAFFIC_MULTICAST(1), "MULTICAST_USERTRAFFIC"},
2002 { 0, NULL((void*)0) }
2003};
2004
2005
2006static const value_string app_kind_vals[] = {
2007 { APPKIND_UNKNOWN(0x00), "APPKIND_UNKNOWN" },
2008 { APPKIND_MANAGED_APPLICATION(0x01), "ManagedApplication" },
2009 { APPKIND_MANAGER(0x02), "Manager" },
2010 { 0, NULL((void*)0) }
2011};
2012
2013static const value_string rtps_locator_kind_vals[] = {
2014 { LOCATOR_KIND_UDPV4(1), "LOCATOR_KIND_UDPV4" },
2015 { LOCATOR_KIND_UDPV6(2), "LOCATOR_KIND_UDPV6" },
2016 { LOCATOR_KIND_INVALID(-1), "LOCATOR_KIND_INVALID" },
2017 { LOCATOR_KIND_DTLS(6), "LOCATOR_KIND_DTLS" },
2018 { LOCATOR_KIND_TCPV4_LAN(8), "LOCATOR_KIND_TCPV4_LAN" },
2019 { LOCATOR_KIND_TCPV4_WAN(9), "LOCATOR_KIND_TCPV4_WAN" },
2020 { LOCATOR_KIND_TLSV4_LAN(10), "LOCATOR_KIND_TLSV4_LAN" },
2021 { LOCATOR_KIND_TLSV4_WAN(11), "LOCATOR_KIND_TLSV4_WAN" },
2022 { LOCATOR_KIND_SHMEM(0x01000000), "LOCATOR_KIND_SHMEM" },
2023 { LOCATOR_KIND_TUDPV4(0x01001001), "LOCATOR_KIND_TUDPV4" },
2024 { LOCATOR_KIND_RESERVED(0), "LOCATOR_KIND_RESERVED" },
2025 { LOCATOR_KIND_UDPV4_WAN(0x01000001), "LOCATOR_KIND_UDPV4_WAN" },
2026 { 0, NULL((void*)0) }
2027};
2028
2029static const value_string submessage_id_vals[] = {
2030 { SUBMESSAGE_PAD(0x01), "PAD" },
2031 { SUBMESSAGE_DATA(0x02), "DATA" },
2032 { SUBMESSAGE_NOKEY_DATA(0x03), "NOKEY_DATA" },
2033 { SUBMESSAGE_ACKNACK(0x06), "ACKNACK" },
2034 { SUBMESSAGE_HEARTBEAT(0x07), "HEARTBEAT" },
2035 { SUBMESSAGE_GAP(0x08), "GAP" },
2036 { SUBMESSAGE_INFO_TS(0x09), "INFO_TS" },
2037 { SUBMESSAGE_INFO_SRC(0x0c), "INFO_SRC" },
2038 { SUBMESSAGE_INFO_REPLY_IP4(0x0d), "INFO_REPLY_IP4" },
2039 { SUBMESSAGE_INFO_DST(0x0e), "INFO_DST" },
2040 { SUBMESSAGE_INFO_REPLY(0x0f), "INFO_REPLY" },
2041 { 0, NULL((void*)0) }
2042};
2043
2044static const value_string submessage_id_valsv2[] = {
2045 { SUBMESSAGE_HEADER_EXTENSION(0x0), "HEADER_EXTENSION" },
2046 { SUBMESSAGE_PAD(0x01), "PAD" },
2047 { SUBMESSAGE_RTPS_DATA(0x15), "DATA" },
2048 { SUBMESSAGE_RTPS_DATA_FRAG(0x16), "DATA_FRAG" },
2049 { SUBMESSAGE_RTI_DATA_FRAG_SESSION(0x81), "DATA_FRAG_SESSION" },
2050 { SUBMESSAGE_RTPS_DATA_BATCH(0x18), "DATA_BATCH" },
2051 { SUBMESSAGE_ACKNACK(0x06), "ACKNACK" },
2052 { SUBMESSAGE_HEARTBEAT(0x07), "HEARTBEAT" },
2053 { SUBMESSAGE_GAP(0x08), "GAP" },
2054 { SUBMESSAGE_INFO_TS(0x09), "INFO_TS" },
2055 { SUBMESSAGE_INFO_SRC(0x0c), "INFO_SRC" },
2056 { SUBMESSAGE_INFO_REPLY_IP4(0x0d), "INFO_REPLY_IP4" },
2057 { SUBMESSAGE_INFO_DST(0x0e), "INFO_DST" },
2058 { SUBMESSAGE_INFO_REPLY(0x0f), "INFO_REPLY" },
2059 { SUBMESSAGE_NACK_FRAG(0x12), "NACK_FRAG" },
2060 { SUBMESSAGE_HEARTBEAT_FRAG(0x13), "HEARTBEAT_FRAG" },
2061 { SUBMESSAGE_ACKNACK_BATCH(0x17), "ACKNACK_BATCH" },
2062 { SUBMESSAGE_HEARTBEAT_BATCH(0x19), "HEARTBEAT_BATCH" },
2063 { SUBMESSAGE_ACKNACK_SESSION(0x1a), "ACKNACK_SESSION" },
2064 { SUBMESSAGE_HEARTBEAT_SESSION(0x1b), "HEARTBEAT_SESSION" },
2065 { SUBMESSAGE_RTPS_DATA_SESSION(0x14), "DATA_SESSION" },
2066 { SUBMESSAGE_APP_ACK(0x1c), "APP_ACK" },
2067 { SUBMESSAGE_APP_ACK_CONF(0x1d), "APP_ACK_CONF" },
2068 { SUBMESSAGE_HEARTBEAT_VIRTUAL(0x1e), "HEARTBEAT_VIRTUAL" },
2069 { SUBMESSAGE_SEC_BODY(0x30), "SEC_BODY" },
2070 { SUBMESSAGE_SEC_PREFIX(0x31), "SEC_PREFIX" },
2071 { SUBMESSAGE_SEC_POSTFIX(0x32), "SEC_POSTFIX" },
2072 { SUBMESSAGE_SRTPS_PREFIX(0x33), "SRTPS_PREFIX" },
2073 { SUBMESSAGE_SRTPS_POSTFIX(0x34), "SRTPS_POSTFIX" },
2074 /* Deprecated submessages */
2075 { SUBMESSAGE_DATA(0x02), "DATA_deprecated" },
2076 { SUBMESSAGE_NOKEY_DATA(0x03), "NOKEY_DATA_deprecated" },
2077 { SUBMESSAGE_DATA_FRAG(0x10), "DATA_FRAG_deprecated" },
2078 { SUBMESSAGE_NOKEY_DATA_FRAG(0x11), "NOKEY_DATA_FRAG_deprecated" },
2079 { 0, NULL((void*)0) }
2080};
2081
2082static const value_string submessage_id_rti[] = {
2083 { SUBMESSAGE_RTI_CRC(0x80), "RTI_CRC" },
2084 { SUBMESSAGE_RTI_UDP_WAN_BINDING_PING(0x82), "RTI_BINDING_PING" },
2085 { SUBMESSAGE_RTI_DATA_FRAG_SESSION(0x81), "DATA_FRAG_SESSION" },
2086 { 0, NULL((void*)0) }
2087};
2088
2089#if 0
2090static const value_string typecode_kind_vals[] = {
2091 { RTI_CDR_TK_NULL, "(unknown)" },
2092 { RTI_CDR_TK_SHORT, "short" },
2093 { RTI_CDR_TK_LONG, "long" },
2094 { RTI_CDR_TK_USHORT, "unsigned short" },
2095 { RTI_CDR_TK_ULONG, "unsigned long" },
2096 { RTI_CDR_TK_FLOAT, "float" },
2097 { RTI_CDR_TK_DOUBLE, "double" },
2098 { RTI_CDR_TK_BOOLEAN, "boolean" },
2099 { RTI_CDR_TK_CHAR, "char" },
2100 { RTI_CDR_TK_OCTET, "octet" },
2101 { RTI_CDR_TK_STRUCT, "struct" },
2102 { RTI_CDR_TK_UNION, "union" },
2103 { RTI_CDR_TK_ENUM, "enum" },
2104 { RTI_CDR_TK_STRING, "string" },
2105 { RTI_CDR_TK_SEQUENCE, "sequence" },
2106 { RTI_CDR_TK_ARRAY, "array" },
2107 { RTI_CDR_TK_ALIAS, "alias" },
2108 { RTI_CDR_TK_LONGLONG, "long long" },
2109 { RTI_CDR_TK_ULONGLONG, "unsigned long long" },
2110 { RTI_CDR_TK_LONGDOUBLE, "long double" },
2111 { RTI_CDR_TK_WCHAR, "wchar" },
2112 { RTI_CDR_TK_WSTRING, "wstring" },
2113 { 0, NULL((void*)0) }
2114};
2115#endif
2116
2117static const value_string parameter_id_vals[] = {
2118 { PID_PAD(0x00), "PID_PAD" },
2119 { PID_SENTINEL(0x01), "PID_SENTINEL" },
2120 { PID_USER_DATA(0x2c), "PID_USER_DATA" },
2121 { PID_TOPIC_NAME(0x05), "PID_TOPIC_NAME" },
2122 { PID_TYPE_NAME(0x07), "PID_TYPE_NAME" },
2123 { PID_GROUP_DATA(0x2d), "PID_GROUP_DATA" },
2124 { PID_DEADLINE(0x23), "PID_DEADLINE" },
2125 { PID_DEADLINE_OFFERED(0x24), "PID_DEADLINE_OFFERED [deprecated]" },
2126 { PID_PARTICIPANT_LEASE_DURATION(0x02), "PID_PARTICIPANT_LEASE_DURATION" },
2127 { PID_PERSISTENCE(0x03), "PID_PERSISTENCE" },
2128 { PID_TIME_BASED_FILTER(0x04), "PID_TIME_BASED_FILTER" },
2129 { PID_OWNERSHIP_STRENGTH(0x06), "PID_OWNERSHIP_STRENGTH" },
2130 { PID_TYPE_CHECKSUM(0x08), "PID_TYPE_CHECKSUM [deprecated]" },
2131 { PID_TYPE2_NAME(0x09), "PID_TYPE2_NAME [deprecated]" },
2132 { PID_TYPE2_CHECKSUM(0x0a), "PID_TYPE2_CHECKSUM [deprecated]" },
2133 { PID_METATRAFFIC_MULTICAST_IPADDRESS(0x0b),"PID_METATRAFFIC_MULTICAST_IPADDRESS"},
2134 { PID_DEFAULT_UNICAST_IPADDRESS(0x0c), "PID_DEFAULT_UNICAST_IPADDRESS" },
2135 { PID_METATRAFFIC_UNICAST_PORT(0x0d), "PID_METATRAFFIC_UNICAST_PORT" },
2136 { PID_DEFAULT_UNICAST_PORT(0x0e), "PID_DEFAULT_UNICAST_PORT" },
2137 { PID_EXPECTS_ACK(0x10), "PID_EXPECTS_ACK" },
2138 { PID_MULTICAST_IPADDRESS(0x11), "PID_MULTICAST_IPADDRESS" },
2139 { PID_MANAGER_KEY(0x12), "PID_MANAGER_KEY [deprecated]" },
2140 { PID_SEND_QUEUE_SIZE(0x13), "PID_SEND_QUEUE_SIZE" },
2141 { PID_RELIABILITY_ENABLED(0x14), "PID_RELIABILITY_ENABLED" },
2142 { PID_PROTOCOL_VERSION(0x15), "PID_PROTOCOL_VERSION" },
2143 { PID_VENDOR_ID(0x16), "PID_VENDOR_ID" },
2144 { PID_VARGAPPS_SEQUENCE_NUMBER_LAST(0x17), "PID_VARGAPPS_SEQUENCE_NUMBER_LAST [deprecated]" },
2145 { PID_RECV_QUEUE_SIZE(0x18), "PID_RECV_QUEUE_SIZE [deprecated]" },
2146 { PID_RELIABILITY_OFFERED(0x19), "PID_RELIABILITY_OFFERED [deprecated]" },
2147 { PID_RELIABILITY(0x1a), "PID_RELIABILITY" },
2148 { PID_LIVELINESS(0x1b), "PID_LIVELINESS" },
2149 { PID_LIVELINESS_OFFERED(0x1c), "PID_LIVELINESS_OFFERED [deprecated]" },
2150 { PID_DURABILITY(0x1d), "PID_DURABILITY" },
2151 { PID_DURABILITY_SERVICE(0x1e), "PID_DURABILITY_SERVICE" },
2152 { PID_PRESENTATION_OFFERED(0x22), "PID_PRESENTATION_OFFERED [deprecated]" },
2153 { PID_OWNERSHIP(0x1f), "PID_OWNERSHIP" },
2154 { PID_OWNERSHIP_OFFERED(0x20), "PID_OWNERSHIP_OFFERED [deprecated]" },
2155 { PID_PRESENTATION(0x21), "PID_PRESENTATION" },
2156 { PID_DESTINATION_ORDER(0x25), "PID_DESTINATION_ORDER" },
2157 { PID_DESTINATION_ORDER_OFFERED(0x26), "PID_DESTINATION_ORDER_OFFERED [deprecated]" },
2158 { PID_LATENCY_BUDGET(0x27), "PID_LATENCY_BUDGET" },
2159 { PID_LATENCY_BUDGET_OFFERED(0x28), "PID_LATENCY_BUDGET_OFFERED [deprecated]" },
2160 { PID_PARTITION(0x29), "PID_PARTITION" },
2161 { PID_PARTITION_OFFERED(0x2a), "PID_PARTITION_OFFERED [deprecated]" },
2162 { PID_LIFESPAN(0x2b), "PID_LIFESPAN" },
2163 { PID_TOPIC_DATA(0x2e), "PID_TOPIC_DATA" },
2164 { PID_UNICAST_LOCATOR(0x2f), "PID_UNICAST_LOCATOR" },
2165 { PID_MULTICAST_LOCATOR(0x30), "PID_MULTICAST_LOCATOR" },
2166 { PID_DEFAULT_UNICAST_LOCATOR(0x31), "PID_DEFAULT_UNICAST_LOCATOR" },
2167 { PID_METATRAFFIC_UNICAST_LOCATOR(0x32), "PID_METATRAFFIC_UNICAST_LOCATOR" },
2168 { PID_METATRAFFIC_MULTICAST_LOCATOR(0x33), "PID_METATRAFFIC_MULTICAST_LOCATOR" },
2169 { PID_PARTICIPANT_MANUAL_LIVELINESS_COUNT(0x34), "PID_PARTICIPANT_MANUAL_LIVELINESS_COUNT" },
2170 { PID_HISTORY(0x40), "PID_HISTORY" },
2171 { PID_RESOURCE_LIMIT(0x41), "PID_RESOURCE_LIMIT" },
2172 { PID_METATRAFFIC_MULTICAST_PORT(0x46), "PID_METATRAFFIC_MULTICAST_PORT" },
2173 { PID_EXPECTS_INLINE_QOS(0x43), "PID_EXPECTS_INLINE_QOS" },
2174 { PID_METATRAFFIC_UNICAST_IPADDRESS(0x45), "PID_METATRAFFIC_UNICAST_IPADDRESS" },
2175 { PID_PARTICIPANT_BUILTIN_ENDPOINTS(0x44), "PID_PARTICIPANT_BUILTIN_ENDPOINTS" },
2176 { PID_CONTENT_FILTER_PROPERTY(0x35), "PID_CONTENT_FILTER_PROPERTY" },
2177 { PID_PROPERTY_LIST_OLD(0x36), "PID_PROPERTY_LIST" },
2178 { PID_FILTER_SIGNATURE(0x55), "PID_FILTER_SIGNATURE" },
2179 { PID_COHERENT_SET(0x56), "PID_COHERENT_SET" },
2180 { PID_TYPECODE(0x47), "PID_TYPECODE" },
2181 { PID_PARTICIPANT_GUID(0x50), "PID_PARTICIPANT_GUID" },
2182 { PID_PARTICIPANT_ENTITY_ID(0x51), "PID_PARTICIPANT_ENTITY_ID" },
2183 { PID_GROUP_GUID(0x52), "PID_GROUP_GUID" },
2184 { PID_GROUP_ENTITY_ID(0x53), "PID_GROUP_ENTITY_ID" },
2185 { 0, NULL((void*)0) }
2186};
2187
2188static const value_string parameter_id_inline_qos_rti[] = {
2189 { PID_RELATED_ORIGINAL_WRITER_INFO(0x0083), "PID_RELATED_ORIGINAL_WRITER_INFO" },
2190 { PID_RELATED_ORIGINAL_WRITER_INFO_LEGACY(0x800f), "PID_RELATED_ORIGINAL_WRITER_INFO_LEGACY" },
2191 { PID_RELATED_SOURCE_GUID(0x8012), "PID_RELATED_SOURCE_GUID" },
2192 { PID_RELATED_READER_GUID(0x8010), "PID_RELATED_READER_GUID" },
2193 { PID_SOURCE_GUID(0x8011), "PID_SOURCE_GUID" },
2194 { PID_TOPIC_QUERY_GUID(0x8013), "PID_TOPIC_QUERY_GUID" },
2195 { PID_SAMPLE_SIGNATURE(0x8019), "PID_SAMPLE_SIGNATURE" },
2196 { 0, NULL((void*)0) }
2197};
2198
2199static const value_string parameter_id_v2_vals[] = {
2200 { PID_PAD(0x00), "PID_PAD" },
2201 { PID_SENTINEL(0x01), "PID_SENTINEL" },
2202 { PID_PARTICIPANT_LEASE_DURATION(0x02), "PID_PARTICIPANT_LEASE_DURATION" },
2203 { PID_TIME_BASED_FILTER(0x04), "PID_TIME_BASED_FILTER" },
2204 { PID_TOPIC_NAME(0x05), "PID_TOPIC_NAME" },
2205 { PID_OWNERSHIP_STRENGTH(0x06), "PID_OWNERSHIP_STRENGTH" },
2206 { PID_TYPE_NAME(0x07), "PID_TYPE_NAME" },
2207 { PID_METATRAFFIC_MULTICAST_IPADDRESS(0x0b),"PID_METATRAFFIC_MULTICAST_IPADDRESS"},
2208 { PID_DEFAULT_UNICAST_IPADDRESS(0x0c), "PID_DEFAULT_UNICAST_IPADDRESS" },
2209 { PID_METATRAFFIC_UNICAST_PORT(0x0d), "PID_METATRAFFIC_UNICAST_PORT" },
2210 { PID_DEFAULT_UNICAST_PORT(0x0e), "PID_DEFAULT_UNICAST_PORT" },
2211 { PID_MULTICAST_IPADDRESS(0x11), "PID_MULTICAST_IPADDRESS" },
2212 { PID_PROTOCOL_VERSION(0x15), "PID_PROTOCOL_VERSION" },
2213 { PID_VENDOR_ID(0x16), "PID_VENDOR_ID" },
2214 { PID_RELIABILITY(0x1a), "PID_RELIABILITY" },
2215 { PID_LIVELINESS(0x1b), "PID_LIVELINESS" },
2216 { PID_DURABILITY(0x1d), "PID_DURABILITY" },
2217 { PID_DURABILITY_SERVICE(0x1e), "PID_DURABILITY_SERVICE" },
2218 { PID_OWNERSHIP(0x1f), "PID_OWNERSHIP" },
2219 { PID_PRESENTATION(0x21), "PID_PRESENTATION" },
2220 { PID_DEADLINE(0x23), "PID_DEADLINE" },
2221 { PID_DESTINATION_ORDER(0x25), "PID_DESTINATION_ORDER" },
2222 { PID_LATENCY_BUDGET(0x27), "PID_LATENCY_BUDGET" },
2223 { PID_PARTITION(0x29), "PID_PARTITION" },
2224 { PID_LIFESPAN(0x2b), "PID_LIFESPAN" },
2225 { PID_USER_DATA(0x2c), "PID_USER_DATA" },
2226 { PID_GROUP_DATA(0x2d), "PID_GROUP_DATA" },
2227 { PID_TOPIC_DATA(0x2e), "PID_TOPIC_DATA" },
2228 { PID_UNICAST_LOCATOR(0x2f), "PID_UNICAST_LOCATOR" },
2229 { PID_MULTICAST_LOCATOR(0x30), "PID_MULTICAST_LOCATOR" },
2230 { PID_DEFAULT_UNICAST_LOCATOR(0x31), "PID_DEFAULT_UNICAST_LOCATOR" },
2231 { PID_METATRAFFIC_UNICAST_LOCATOR(0x32), "PID_METATRAFFIC_UNICAST_LOCATOR" },
2232 { PID_METATRAFFIC_MULTICAST_LOCATOR(0x33), "PID_METATRAFFIC_MULTICAST_LOCATOR" },
2233 { PID_PARTICIPANT_MANUAL_LIVELINESS_COUNT(0x34), "PID_PARTICIPANT_MANUAL_LIVELINESS_COUNT" },
2234 { PID_CONTENT_FILTER_PROPERTY(0x35), "PID_CONTENT_FILTER_PROPERTY" },
2235 { PID_PROPERTY_LIST(0x0059), "PID_PROPERTY_LIST" },
2236 { PID_HISTORY(0x40), "PID_HISTORY" },
2237 { PID_RESOURCE_LIMIT(0x41), "PID_RESOURCE_LIMIT" },
2238 { PID_EXPECTS_INLINE_QOS(0x43), "PID_EXPECTS_INLINE_QOS" },
2239 { PID_PARTICIPANT_BUILTIN_ENDPOINTS(0x44), "PID_PARTICIPANT_BUILTIN_ENDPOINTS" },
2240 { PID_METATRAFFIC_UNICAST_IPADDRESS(0x45), "PID_METATRAFFIC_UNICAST_IPADDRESS" },
2241 { PID_METATRAFFIC_MULTICAST_PORT(0x46), "PID_METATRAFFIC_MULTICAST_PORT" },
2242 { PID_DEFAULT_MULTICAST_LOCATOR(0x0048), "PID_DEFAULT_MULTICAST_LOCATOR" },
2243 { PID_TRANSPORT_PRIORITY(0x0049), "PID_TRANSPORT_PRIORITY" },
2244 { PID_PARTICIPANT_GUID(0x50), "PID_PARTICIPANT_GUID" },
2245 { PID_PARTICIPANT_ENTITY_ID(0x51), "PID_PARTICIPANT_ENTITY_ID" },
2246 { PID_GROUP_GUID(0x52), "PID_GROUP_GUID" },
2247 { PID_GROUP_ENTITY_ID(0x53), "PID_GROUP_ENTITY_ID" },
2248 { PID_CONTENT_FILTER_INFO(0x0055), "PID_CONTENT_FILTER_INFO" },
2249 { PID_COHERENT_SET(0x56), "PID_COHERENT_SET" },
2250 { PID_DIRECTED_WRITE(0x0057), "PID_DIRECTED_WRITE" },
2251 { PID_BUILTIN_ENDPOINT_SET(0x0058), "PID_BUILTIN_ENDPOINT_SET" },
2252 { PID_PROPERTY_LIST_OLD(0x36), "PID_PROPERTY_LIST" },
2253 { PID_ENDPOINT_GUID(0x005a), "PID_ENDPOINT_GUID" },
2254 { PID_TYPE_MAX_SIZE_SERIALIZED(0x0060), "PID_TYPE_MAX_SIZE_SERIALIZED" },
2255 { PID_ORIGINAL_WRITER_INFO(0x0061), "PID_ORIGINAL_WRITER_INFO" },
2256 { PID_ENTITY_NAME(0x0062), "PID_ENTITY_NAME" },
2257 { PID_KEY_HASH(0x0070), "PID_KEY_HASH" },
2258 { PID_STATUS_INFO(0x0071), "PID_STATUS_INFO" },
2259 { PID_DATA_REPRESENTATION(0x0073), "PID_DATA_REPRESENTATION" },
2260 { PID_TYPE_CONSISTENCY(0x0074), "PID_TYPE_CONSISTENCY" },
2261 { PID_BUILTIN_ENDPOINT_QOS(0x0077), "PID_BUILTIN_ENDPOINT_QOS" },
2262 { PID_ENABLE_AUTHENTICATION(0x0078), "PID_ENABLE_AUTHENTICATION" },
2263 { PID_RELATED_ENTITY_GUID(0x0081), "PID_RELATED_ENTITY_GUID" },
2264 { PID_IDENTITY_TOKEN(0x1001), "PID_IDENTITY_TOKEN" },
2265 { PID_PERMISSIONS_TOKEN(0x1002), "PID_PERMISSIONS_TOKEN" },
2266 { PID_DATA_TAGS(0x1003), "PID_DATA_TAGS" },
2267 { PID_ENDPOINT_SECURITY_INFO(0x1004), "PID_ENDPOINT_SECURITY_INFO" },
2268 { PID_PARTICIPANT_SECURITY_INFO(0x1005), "PID_PARTICIPANT_SECURITY_INFO" },
2269 { PID_PARTICIPANT_SECURITY_DIGITAL_SIGNATURE_ALGO(0x1010), "PID_PARTICIPANT_SECURITY_DIGITAL_SIGNATURE_ALGO" },
2270 { PID_PARTICIPANT_SECURITY_KEY_ESTABLISHMENT_ALGO(0x1011), "PID_PARTICIPANT_SECURITY_KEY_ESTABLISHMENT_ALGO" },
2271 { PID_PARTICIPANT_SECURITY_SYMMETRIC_CIPHER_ALGO(0x1012), "PID_PARTICIPANT_SECURITY_SYMMETRIC_CIPHER_ALGO" },
2272 { PID_ENDPOINT_SECURITY_SYMMETRIC_CIPHER_ALGO(0x1013), "PID_ENDPOINT_SECURITY_SYMMETRIC_CIPHER_ALGO" },
2273 { PID_IDENTITY_STATUS_TOKEN(0x1006), "PID_IDENTITY_STATUS_TOKEN"},
2274 { PID_AVAILABLE_BUILTIN_ENDPOINTS_EXT(0x1007), "PID_AVAILABLE_BUILTIN_ENDPOINTS_EXT"},
2275 { PID_DOMAIN_ID(0x000f), "PID_DOMAIN_ID" },
2276 { PID_DOMAIN_TAG(0x4014), "PID_DOMAIN_TAG" },
2277 { PID_GROUP_COHERENT_SET(0x0063), "PID_GROUP_COHERENT_SET" },
2278 { PID_END_COHERENT_SET(0x8022), "PID_END_COHERENT_SET" },
2279 { PID_END_GROUP_COHERENT_SET(0x8023), "PID_END_GROUP_COHERENT_SET" },
2280 { MIG_RTPS_PID_END_COHERENT_SET_SAMPLE_COUNT(0x8024), "MIG_RTPS_PID_END_COHERENT_SET_SAMPLE_COUNT" },
2281 { PID_TYPE_INFORMATION(0x0075), "PID_TYPE_INFORMATION" },
2282
2283 /* The following PID are deprecated */
2284 { PID_DEADLINE_OFFERED(0x24), "PID_DEADLINE_OFFERED [deprecated]" },
2285 { PID_PERSISTENCE(0x03), "PID_PERSISTENCE [deprecated]" },
2286 { PID_TYPE_CHECKSUM(0x08), "PID_TYPE_CHECKSUM [deprecated]" },
2287 { PID_TYPE2_NAME(0x09), "PID_TYPE2_NAME [deprecated]" },
2288 { PID_TYPE2_CHECKSUM(0x0a), "PID_TYPE2_CHECKSUM [deprecated]" },
2289 { PID_EXPECTS_ACK(0x10), "PID_EXPECTS_ACK [deprecated]" },
2290 { PID_MANAGER_KEY(0x12), "PID_MANAGER_KEY [deprecated]" },
2291 { PID_SEND_QUEUE_SIZE(0x13), "PID_SEND_QUEUE_SIZE [deprecated]" },
2292 { PID_RELIABILITY_ENABLED(0x14), "PID_RELIABILITY_ENABLED [deprecated]" },
2293 { PID_VARGAPPS_SEQUENCE_NUMBER_LAST(0x17), "PID_VARGAPPS_SEQUENCE_NUMBER_LAST [deprecated]" },
2294 { PID_RECV_QUEUE_SIZE(0x18), "PID_RECV_QUEUE_SIZE [deprecated]" },
2295 { PID_RELIABILITY_OFFERED(0x19), "PID_RELIABILITY_OFFERED [deprecated]" },
2296 { PID_LIVELINESS_OFFERED(0x1c), "PID_LIVELINESS_OFFERED [deprecated]" },
2297 { PID_PRESENTATION_OFFERED(0x22), "PID_PRESENTATION_OFFERED [deprecated]" },
2298 { PID_OWNERSHIP_OFFERED(0x20), "PID_OWNERSHIP_OFFERED [deprecated]" },
2299 { PID_DESTINATION_ORDER_OFFERED(0x26), "PID_DESTINATION_ORDER_OFFERED [deprecated]" },
2300 { PID_LATENCY_BUDGET_OFFERED(0x28), "PID_LATENCY_BUDGET_OFFERED [deprecated]" },
2301 { PID_PARTITION_OFFERED(0x2a), "PID_PARTITION_OFFERED [deprecated]" },
2302 { PID_EXTENDED(0x3f01), "PID_EXTENDED" },
2303 { 0, NULL((void*)0) }
2304};
2305
2306static const value_string parameter_id_rti_vals[] = {
2307 /* Vendor specific: RTI */
2308 { PID_PRODUCT_VERSION(0x8000), "PID_PRODUCT_VERSION" },
2309 { PID_PLUGIN_PROMISCUITY_KIND(0x8001), "PID_PLUGIN_PROMISCUITY_KIND" },
2310 { PID_ENTITY_VIRTUAL_GUID(0x8002), "PID_ENTITY_VIRTUAL_GUID" },
2311 { PID_SERVICE_KIND(0x8003), "PID_SERVICE_KIND" },
2312 { PID_TYPECODE_RTPS2(0x8004), "PID_TYPECODE" },
2313 { PID_DISABLE_POSITIVE_ACKS(0x8005), "PID_DISABLE_POSITIVE_ACKS" },
2314 { PID_LOCATOR_FILTER_LIST(0x8006), "PID_LOCATOR_FILTER_LIST" },
2315 { PID_ROLE_NAME(0x800a), "PID_ROLE_NAME"},
2316 { PID_ACK_KIND(0x800b), "PID_ACK_KIND" },
2317 { PID_PEER_HOST_EPOCH(0x800e), "PID_PEER_HOST_EPOCH" },
2318 { PID_TRANSPORT_INFO_LIST(0x8010), "PID_TRANSPORT_INFO_LIST" },
2319 { PID_DIRECT_COMMUNICATION(0x8011), "PID_DIRECT_COMMUNICATION" },
2320 { PID_TYPE_OBJECT(0x0072), "PID_TYPE_OBJECT" },
2321 { PID_EXPECTS_VIRTUAL_HB(0x8009), "PID_EXPECTS_VIRTUAL_HB" },
2322 { PID_RTI_DOMAIN_ID(0x800f), "PID_RTI_DOMAIN_ID" },
2323 { PID_TOPIC_QUERY_PUBLICATION(0x8014), "PID_TOPIC_QUERY_PUBLICATION" },
2324 { PID_ENDPOINT_PROPERTY_CHANGE_EPOCH(0x8015), "PID_ENDPOINT_PROPERTY_CHANGE_EPOCH" },
2325 { PID_REACHABILITY_LEASE_DURATION(0x8016), "PID_REACHABILITY_LEASE_DURATION" },
2326 { PID_VENDOR_BUILTIN_ENDPOINT_SET(0x8017), "PID_VENDOR_BUILTIN_ENDPOINT_SET" },
2327 { PID_ENDPOINT_SECURITY_ATTRIBUTES(0x8018), "PID_ENDPOINT_SECURITY_ATTRIBUTES" },
2328 { PID_TYPE_OBJECT_LB(0x8021), "PID_TYPE_OBJECT_LB" },
2329 { PID_UNICAST_LOCATOR_EX(0x8007), "PID_UNICAST_LOCATOR_EX"},
2330 { PID_TOPIC_NAME_ALIASES(0x8028), "PID_TOPIC_NAME_ALIASES" },
2331 { PID_TYPE_NAME_ALIASES(0x8029), "PID_TYPE_NAME_ALIASES" },
2332 { 0, NULL((void*)0) }
2333};
2334static const value_string parameter_id_toc_vals[] = {
2335 /* Vendor specific: Twin Oaks Computing */
2336 { PID_TYPECODE_RTPS2(0x8004), "PID_TYPECODE_RTPS2" },
2337 { 0, NULL((void*)0) }
2338};
2339
2340static const value_string parameter_id_adl_vals[] = {
2341 /* Vendor specific: ADLink Ltd. */
2342 { PID_ADLINK_WRITER_INFO(0x8001), "PID_ADLINK_WRITER_INFO" },
2343 { PID_ADLINK_READER_DATA_LIFECYCLE(0x8002), "PID_ADLINK_READER_DATA_LIFECYCLE" },
2344 { PID_ADLINK_WRITER_DATA_LIFECYCLE(0x8003), "PID_ADLINK_WRITER_DATA_LIFECYCLE" },
2345 { PID_ADLINK_ENDPOINT_GUID(0x8004), "PID_ADLINK_ENDPOINT_GUID" },
2346 { PID_ADLINK_SYNCHRONOUS_ENDPOINT(0x8005), "PID_ADLINK_SYNCHRONOUS_ENDPOINT" },
2347 { PID_ADLINK_RELAXED_QOS_MATCHING(0x8006), "PID_ADLINK_RELAXED_QOS_MATCHING" },
2348 { PID_ADLINK_PARTICIPANT_VERSION_INFO(0x8007), "PID_ADLINK_PARTICIPANT_VERSION_INFO" },
2349 { PID_ADLINK_NODE_NAME(0x8008), "PID_ADLINK_NODE_NAME" },
2350 { PID_ADLINK_EXEC_NAME(0x8009), "PID_ADLINK_EXEC_NAME" },
2351 { PID_ADLINK_PROCESS_ID(0x800a), "PID_ADLINK_PROCESS_ID" },
2352 { PID_ADLINK_SERVICE_TYPE(0x800b), "PID_ADLINK_SERVICE_TYPE" },
2353 { PID_ADLINK_ENTITY_FACTORY(0x800c), "PID_ADLINK_ENTITY_FACTORY" },
2354 { PID_ADLINK_WATCHDOG_SCHEDULING(0x800d), "PID_ADLINK_WATCHDOG_SCHEDULING" },
2355 { PID_ADLINK_LISTENER_SCHEDULING(0x800e), "PID_ADLINK_LISTENER_SCHEDULING" },
2356 { PID_ADLINK_SUBSCRIPTION_KEYS(0x800f), "PID_ADLINK_SUBSCRIPTION_KEYS" },
2357 { PID_ADLINK_READER_LIFESPAN(0x8010), "PID_ADLINK_READER_LIFESPAN" },
2358 { PID_ADLINK_SHARE(0x8011), "PID_ADLINK_SHARE" },
2359 { PID_ADLINK_TYPE_DESCRIPTION(0x8012), "PID_ADLINK_TYPE_DESCRIPTION" },
2360 { PID_ADLINK_LAN_ID(0x8013), "PID_ADLINK_LAN_ID" },
2361 { PID_ADLINK_ENDPOINT_GID(0x8014), "PID_ADLINK_ENDPOINT_GID" },
2362 { PID_ADLINK_GROUP_GID(0x8015), "PID_ADLINK_GROUP_GID" },
2363 { PID_ADLINK_EOTINFO(0x8016), "PID_ADLINK_EOTINFO" },
2364 { PID_ADLINK_PART_CERT_NAME(0x8017), "PID_ADLINK_PART_CERT_NAME" },
2365 { PID_ADLINK_LAN_CERT_NAME(0x8018), "PID_ADLINK_LAN_CERT_NAME" },
2366 { 0, NULL((void*)0) }
2367};
2368
2369static const value_string liveliness_qos_vals[] = {
2370 { LIVELINESS_AUTOMATIC(0), "AUTOMATIC_LIVELINESS_QOS" },
2371 { LIVELINESS_BY_PARTICIPANT(1), "MANUAL_BY_PARTICIPANT_LIVELINESS_QOS" },
2372 { LIVELINESS_BY_TOPIC(2), "MANUAL_BY_TOPIC_LIVELINESS_QOS" },
2373 { 0, NULL((void*)0) }
2374};
2375
2376static const value_string durability_qos_vals[] = {
2377 { DURABILITY_VOLATILE(0), "VOLATILE_DURABILITY_QOS" },
2378 { DURABILITY_TRANSIENT_LOCAL(1), "TRANSIENT_LOCAL_DURABILITY_QOS" },
2379 { DURABILITY_TRANSIENT(2), "TRANSIENT_DURABILITY_QOS" },
2380 { DURABILITY_PERSISTENT(3), "PERSISTENT_DURABILITY_QOS" },
2381 { 0, NULL((void*)0) }
2382};
2383
2384static const value_string ownership_qos_vals[] = {
2385 { OWNERSHIP_SHARED(0), "SHARED_OWNERSHIP_QOS" },
2386 { OWNERSHIP_EXCLUSIVE(1), "EXCLUSIVE_OWNERSHIP_QOS" },
2387 { 0, NULL((void*)0) }
2388};
2389
2390static const value_string presentation_qos_vals[] = {
2391 { PRESENTATION_INSTANCE(0), "INSTANCE_PRESENTATION_QOS" },
2392 { PRESENTATION_TOPIC(1), "TOPIC_PRESENTATION_QOS" },
2393 { PRESENTATION_GROUP(2), "GROUP_PRESENTATION_QOS" },
2394 { 0, NULL((void*)0) }
2395};
2396
2397static const value_string history_qos_vals[] = {
2398 { HISTORY_KIND_KEEP_LAST(0), "KEEP_LAST_HISTORY_QOS" },
2399 { HISTORY_KIND_KEEP_ALL(1), "KEEP_ALL_HISTORY_QOS" },
2400 { 0, NULL((void*)0) }
2401};
2402
2403static const value_string reliability_qos_vals[] = {
2404 { RELIABILITY_BEST_EFFORT(1), "BEST_EFFORT_RELIABILITY_QOS" },
2405 { RELIABILITY_RELIABLE(2), "RELIABLE_RELIABILITY_QOS" },
2406 { 0, NULL((void*)0) }
2407};
2408
2409static const value_string destination_order_qos_vals[] = {
2410 { BY_RECEPTION_TIMESTAMP(0), "BY_RECEPTION_TIMESTAMP_DESTINATIONORDER_QOS" },
2411 { BY_SOURCE_TIMESTAMP(1), "BY_SOURCE_TIMESTAMP_DESTINATIONORDER_QOS" },
2412 { 0, NULL((void*)0) }
2413};
2414
2415static const value_string encapsulation_id_vals[] = {
2416 { ENCAPSULATION_CDR_BE(0x0000), "CDR_BE" },
2417 { ENCAPSULATION_CDR_LE(0x0001), "CDR_LE" },
2418 { ENCAPSULATION_PL_CDR_BE(0x0002), "PL_CDR_BE" },
2419 { ENCAPSULATION_PL_CDR_LE(0x0003), "PL_CDR_LE" },
2420 { ENCAPSULATION_CDR2_BE(0x0006), "CDR2_BE" },
2421 { ENCAPSULATION_CDR2_LE(0x0007), "CDR2_LE" },
2422 { ENCAPSULATION_D_CDR2_BE(0x0008), "D_CDR2_BE" },
2423 { ENCAPSULATION_D_CDR2_LE(0x0009), "D_CDR2_LE" },
2424 { ENCAPSULATION_PL_CDR2_BE(0x000a), "PL_CDR2_BE" },
2425 { ENCAPSULATION_PL_CDR2_LE(0x000b), "PL_CDR2_LE" },
2426 { ENCAPSULATION_SHMEM_REF_PLAIN(0xC000), "SHMEM_REF_PLAIN" },
2427 { ENCAPSULATION_SHMEM_REF_FLAT_DATA(0xC001), "SHMEM_REF_FLAT_DATA" },
2428 { 0, NULL((void*)0) }
2429};
2430
2431static const value_string data_representation_kind_vals[] = {
2432 { 0, "XCDR_DATA_REPRESENTATION" },
2433 { 1, "XML_DATA_REPRESENTATION" },
2434 { 2, "XCDR2_DATA_REPRESENTATION" },
2435 { 0, NULL((void*)0) }
2436};
2437
2438static const value_string plugin_promiscuity_kind_vals[] = {
2439 { 0x0001, "MATCHING_REMOTE_ENTITIES_PROMISCUITY" },
2440 { 0xffff, "ALL_REMOTE_ENTITIES_PROMISCUITY" },
2441 { 0, NULL((void*)0) }
2442};
2443
2444static const value_string service_kind_vals[] = {
2445 { 0x00000000, "NO_SERVICE_QOS" },
2446 { 0x00000001, "PERSISTENCE_SERVICE_QOS" },
2447 { 0, NULL((void*)0) }
2448};
2449
2450static const value_string secure_transformation_kind[] = {
2451 { CRYPTO_TRANSFORMATION_KIND_NONE(0), "NONE" },
2452 { CRYPTO_TRANSFORMATION_KIND_AES128_GMAC(1), "AES128_GMAC" },
2453 { CRYPTO_TRANSFORMATION_KIND_AES128_GCM(2), "AES128_GCM" },
2454 { CRYPTO_TRANSFORMATION_KIND_AES256_GMAC(3), "AES256_GMAC" },
2455 { CRYPTO_TRANSFORMATION_KIND_AES256_GCM(4), "AES256_GCM" },
2456 { 0, NULL((void*)0) }
2457};
2458
2459static const value_string participant_message_data_kind [] = {
2460 { PARTICIPANT_MESSAGE_DATA_KIND_UNKNOWN(0x00000000), "PARTICIPANT_MESSAGE_DATA_KIND_UNKNOWN" },
2461 { PARTICIPANT_MESSAGE_DATA_KIND_AUTOMATIC_LIVELINESS_UPDATE(0x00000001), "PARTICIPANT_MESSAGE_DATA_KIND_AUTOMATIC_LIVELINESS_UPDATE" },
2462 { PARTICIPANT_MESSAGE_DATA_KIND_MANUAL_LIVELINESS_UPDATE(0x00000002), "PARTICIPANT_MESSAGE_DATA_KIND_MANUAL_LIVELINESS_UPDATE" },
2463 { 0, NULL((void*)0) }
2464};
2465
2466/* Vendor specific: RTI */
2467static const value_string type_consistency_kind_vals[] = {
2468 { DISALLOW_TYPE_COERCION(0), "DISALLOW_TYPE_COERCION" },
2469 { ALLOW_TYPE_COERCION(1), "ALLOW_TYPE_COERCION" },
2470 { 0, NULL((void*)0) }
2471};
2472
2473static const value_string service_request_kind[] = {
2474 { RTI_SERVICE_REQUEST_ID_UNKNOWN0, "RTI_SERVICE_REQUEST_ID_UNKNOWN" },
2475 { RTI_SERVICE_REQUEST_ID_TOPIC_QUERY1, "RTI_SERVICE_REQUEST_ID_TOPIC_QUERY" },
2476 { RTI_SERVICE_REQUEST_ID_INSTANCE_STATE3, "RTI_SERVICE_REQUEST_ID_INSTANCE_STATE" },
2477 { 0, NULL((void*)0) }
2478};
2479/* Vendor specific: RTI */
2480static const value_string acknowledgement_kind_vals[] = {
2481 { PROTOCOL_ACKNOWLEDGMENT(0), "PROTOCOL_ACKNOWLEDGMENT" },
2482 { APPLICATION_AUTO_ACKNOWLEDGMENT(1), "APPLICATION_AUTO_ACKNOWLEDGMENT" },
2483 { APPLICATION_ORDERED_ACKNOWLEDGMENT(2), "APPLICATION_ORDERED_ACKNOWLEDGMENT" },
2484 { APPLICATION_EXPLICIT_ACKNOWLEDGMENT(3), "APPLICATION_EXPLICIT_ACKNOWLEDGMENT" },
2485 { 0, NULL((void*)0) }
2486};
2487
2488static int* const TYPE_FLAG_FLAGS[] = {
2489 &hf_rtps_flag_typeflag_nested, /* Bit 2 */
2490 &hf_rtps_flag_typeflag_mutable, /* Bit 1 */
2491 &hf_rtps_flag_typeflag_final, /* Bit 0 */
2492 NULL((void*)0)
2493};
2494
2495static int* const MEMBER_FLAGS[] = {
2496 &hf_rtps_flag_memberflag_union_default, /* Bit 3 */
2497 &hf_rtps_flag_memberflag_shareable, /* Bit 2 */
2498 &hf_rtps_flag_memberflag_optional, /* Bit 1 */
2499 &hf_rtps_flag_memberflag_key, /* Bit 0 */
2500 NULL((void*)0)
2501};
2502
2503static int* const UDPV4_WAN_LOCATOR_FLAGS[] = {
2504 &hf_rtps_flag_reserved80, /* Bit 7 */
2505 &hf_rtps_flag_reserved40, /* Bit 6 */
2506 &hf_rtps_flag_reserved20, /* Bit 5 */
2507 &hf_rtps_flag_reserved10, /* Bit 4 */
2508 &hf_rtps_flag_udpv4_wan_locator_r, /* Bit 3 */
2509 &hf_rtps_flag_udpv4_wan_locator_b, /* Bit 2 */
2510 &hf_rtps_flag_udpv4_wan_locator_p, /* Bit 1 */
2511 &hf_rtps_flag_udpv4_wan_locator_u, /* Bit 0 */
2512 NULL((void*)0)
2513};
2514
2515static int* const UDPV4_WAN_BINDING_PING_FLAGS[] = {
2516 &hf_rtps_flag_reserved80, /* Bit 7 */
2517 &hf_rtps_flag_reserved40, /* Bit 6 */
2518 &hf_rtps_flag_reserved20, /* Bit 5 */
2519 &hf_rtps_flag_reserved10, /* Bit 4 */
2520 &hf_rtps_flag_reserved08, /* Bit 3 */
2521 &hf_rtps_flag_udpv4_wan_binding_ping_b, /* Bit 2 */
2522 &hf_rtps_flag_udpv4_wan_binding_ping_l, /* Bit 1 */
2523 &hf_rtps_flag_udpv4_wan_binding_ping_e, /* Bit 0 */
2524 NULL((void*)0)
2525};
2526
2527/* Vendor specific: RTI */
2528static const value_string ndds_transport_class_id_vals[] = {
2529 { NDDS_TRANSPORT_CLASSID_ANY(0), "ANY" },
2530 { NDDS_TRANSPORT_CLASSID_UDPv4(1), "UDPv4" },
2531 { NDDS_TRANSPORT_CLASSID_SHMEM(0x01000000), "SHMEM" },
2532 { NDDS_TRANSPORT_CLASSID_INTRA(3), "INTRA" },
2533 { NDDS_TRANSPORT_CLASSID_UDPv6(2), "UDPv6" },
2534 { NDDS_TRANSPORT_CLASSID_DTLS(6), "DTLS" },
2535 { NDDS_TRANSPORT_CLASSID_WAN(7), "WAN" },
2536 { NDDS_TRANSPORT_CLASSID_TCPV4_LAN(8), "TCPv4_LAN" },
2537 { NDDS_TRANSPORT_CLASSID_TCPV4_WAN(9), "TCPv4_WAN" },
2538 { NDDS_TRANSPORT_CLASSID_TLSV4_LAN(10), "TLSv4_LAN" },
2539 { NDDS_TRANSPORT_CLASSID_TLSV4_WAN(11), "TLSv4_WAN" },
2540 { NDDS_TRANSPORT_CLASSID_PCIE(12), "PCIE" },
2541 { NDDS_TRANSPORT_CLASSID_ITP(13), "ITP" },
2542 { NDDS_TRANSPORT_CLASSID_UDPv4_WAN(0x01000001), "UDPv4_WAN" },
2543 { 0, NULL((void*)0) }
2544};
2545
2546static const value_string class_id_enum_names[] = {
2547 { RTI_OSAPI_COMPRESSION_CLASS_ID_NONE(0), "NONE" },
2548 { RTI_OSAPI_COMPRESSION_CLASS_ID_ZLIB(1), "ZLIB" },
2549 { RTI_OSAPI_COMPRESSION_CLASS_ID_BZIP2(2), "BZIP2" },
2550 { RTI_OSAPI_COMPRESSION_CLASS_ID_AUTO((4294967295U)), "AUTO"},
2551 { 0, NULL((void*)0)}
2552};
2553
2554static const value_string topic_query_selection_kind[] = {
2555 { RTPS_TOPIC_QUERY_SELECTION_KIND_HISTORY_SNAPSHOT0, "HISTORY_SNAPSHOT" },
2556 { RTPS_TOPIC_QUERY_SELECTION_KIND_CONTINUOUS1, "CONTINUOUS" },
2557 { 0, NULL((void*)0)}
2558};
2559
2560static int* const PAD_FLAGS[] = {
2561 &hf_rtps_flag_reserved80, /* Bit 7 */
2562 &hf_rtps_flag_reserved40, /* Bit 6 */
2563 &hf_rtps_flag_reserved20, /* Bit 5 */
2564 &hf_rtps_flag_reserved10, /* Bit 4 */
2565 &hf_rtps_flag_reserved08, /* Bit 3 */
2566 &hf_rtps_flag_reserved04, /* Bit 2 */
2567 &hf_rtps_flag_reserved02, /* Bit 1 */
2568 &hf_rtps_flag_endianness, /* Bit 0 */
2569 NULL((void*)0)
2570};
2571
2572static int* const DATA_FLAGSv1[] = {
2573 &hf_rtps_flag_reserved80, /* Bit 7 */
2574 &hf_rtps_flag_reserved40, /* Bit 6 */
2575 &hf_rtps_flag_unregister, /* Bit 5 */
2576 &hf_rtps_flag_inline_qos_v1, /* Bit 4 */
2577 &hf_rtps_flag_hash_key, /* Bit 3 */
2578 &hf_rtps_flag_alive, /* Bit 2 */
2579 &hf_rtps_flag_data_present_v1, /* Bit 1 */
2580 &hf_rtps_flag_endianness, /* Bit 0 */
2581 NULL((void*)0)
2582};
2583
2584static int* const DATA_FLAGSv2[] = {
2585 &hf_rtps_flag_reserved80, /* Bit 7 */
2586 &hf_rtps_flag_reserved40, /* Bit 6 */
2587 &hf_rtps_flag_reserved20, /* Bit 5 */
2588 &hf_rtps_flag_status_info, /* Bit 4 */
2589 &hf_rtps_flag_hash_key, /* Bit 3 */
2590 &hf_rtps_flag_data_present_v2, /* Bit 2 */
2591 &hf_rtps_flag_inline_qos_v2, /* Bit 1 */
2592 &hf_rtps_flag_endianness, /* Bit 0 */
2593 NULL((void*)0)
2594};
2595
2596static int* const NOKEY_DATA_FRAG_FLAGS[] = {
2597 &hf_rtps_flag_reserved80, /* Bit 7 */
2598 &hf_rtps_flag_reserved40, /* Bit 6 */
2599 &hf_rtps_flag_reserved20, /* Bit 5 */
2600 &hf_rtps_flag_reserved10, /* Bit 4 */
2601 &hf_rtps_flag_reserved08, /* Bit 3 */
2602 &hf_rtps_flag_reserved04, /* Bit 2 */
2603 &hf_rtps_flag_inline_qos_v2, /* Bit 1 */
2604 &hf_rtps_flag_endianness, /* Bit 0 */
2605 NULL((void*)0)
2606};
2607
2608static int* const NOKEY_DATA_FLAGS[] = {
2609 &hf_rtps_flag_reserved80, /* Bit 7 */
2610 &hf_rtps_flag_reserved40, /* Bit 6 */
2611 &hf_rtps_flag_reserved20, /* Bit 5 */
2612 &hf_rtps_flag_reserved10, /* Bit 4 */
2613 &hf_rtps_flag_reserved08, /* Bit 3 */
2614 &hf_rtps_flag_reserved04, /* Bit 2 */
2615 &hf_rtps_flag_inline_qos_v2, /* Bit 1 */
2616 &hf_rtps_flag_endianness, /* Bit 0 */
2617 NULL((void*)0)
2618};
2619
2620static int* const ACKNACK_FLAGS[] = {
2621 &hf_rtps_flag_reserved80, /* Bit 7 */
2622 &hf_rtps_flag_reserved40, /* Bit 6 */
2623 &hf_rtps_flag_reserved20, /* Bit 5 */
2624 &hf_rtps_flag_reserved10, /* Bit 4 */
2625 &hf_rtps_flag_reserved08, /* Bit 3 */
2626 &hf_rtps_flag_reserved04, /* Bit 2 */
2627 &hf_rtps_flag_final, /* Bit 1 */
2628 &hf_rtps_flag_endianness, /* Bit 0 */
2629 NULL((void*)0)
2630};
2631
2632static int* const NACK_FRAG_FLAGS[] = {
2633 &hf_rtps_flag_reserved80, /* Bit 7 */
2634 &hf_rtps_flag_reserved40, /* Bit 6 */
2635 &hf_rtps_flag_reserved20, /* Bit 5 */
2636 &hf_rtps_flag_reserved10, /* Bit 4 */
2637 &hf_rtps_flag_reserved08, /* Bit 3 */
2638 &hf_rtps_flag_reserved04, /* Bit 2 */
2639 &hf_rtps_flag_reserved02, /* Bit 1 */
2640 &hf_rtps_flag_endianness, /* Bit 0 */
2641 NULL((void*)0)
2642};
2643
2644static int* const GAP_FLAGS[] = {
2645 &hf_rtps_flag_reserved80, /* Bit 7 */
2646 &hf_rtps_flag_reserved40, /* Bit 6 */
2647 &hf_rtps_flag_reserved20, /* Bit 5 */
2648 &hf_rtps_flag_reserved10, /* Bit 4 */
2649 &hf_rtps_flag_reserved08, /* Bit 3 */
2650 &hf_rtps_flag_reserved04, /* Bit 2 */
2651 &hf_rtps_flag_reserved02, /* Bit 1 */
2652 &hf_rtps_flag_endianness, /* Bit 0 */
2653 NULL((void*)0)
2654};
2655
2656static int* const HEARTBEAT_FLAGS[] = {
2657 &hf_rtps_flag_reserved80, /* Bit 7 */
2658 &hf_rtps_flag_reserved40, /* Bit 6 */
2659 &hf_rtps_flag_reserved20, /* Bit 5 */
2660 &hf_rtps_flag_reserved10, /* Bit 4 */
2661 &hf_rtps_flag_reserved08, /* Bit 3 */
2662 &hf_rtps_flag_liveliness, /* Bit 2 */
2663 &hf_rtps_flag_final, /* Bit 1 */
2664 &hf_rtps_flag_endianness, /* Bit 0 */
2665 NULL((void*)0)
2666};
2667
2668static int* const HEARTBEAT_BATCH_FLAGS[] = {
2669 &hf_rtps_flag_reserved80, /* Bit 7 */
2670 &hf_rtps_flag_reserved40, /* Bit 6 */
2671 &hf_rtps_flag_reserved20, /* Bit 5 */
2672 &hf_rtps_flag_reserved10, /* Bit 4 */
2673 &hf_rtps_flag_reserved08, /* Bit 3 */
2674 &hf_rtps_flag_liveliness, /* Bit 2 */
2675 &hf_rtps_flag_final, /* Bit 1 */
2676 &hf_rtps_flag_endianness, /* Bit 0 */
2677 NULL((void*)0)
2678};
2679
2680static int* const HEARTBEAT_FRAG_FLAGS[] = {
2681 &hf_rtps_flag_reserved80, /* Bit 7 */
2682 &hf_rtps_flag_reserved40, /* Bit 6 */
2683 &hf_rtps_flag_reserved20, /* Bit 5 */
2684 &hf_rtps_flag_reserved10, /* Bit 4 */
2685 &hf_rtps_flag_reserved08, /* Bit 3 */
2686 &hf_rtps_flag_reserved04, /* Bit 2 */
2687 &hf_rtps_flag_reserved02, /* Bit 1 */
2688 &hf_rtps_flag_endianness, /* Bit 0 */
2689 NULL((void*)0)
2690};
2691
2692static int* const RTPS_DATA_FLAGS[] = {
2693 &hf_rtps_flag_reserved80, /* Bit 7 */
2694 &hf_rtps_flag_reserved40, /* Bit 6 */
2695 &hf_rtps_flag_reserved20, /* Bit 5 */
2696 &hf_rtps_flag_reserved10, /* Bit 4 */
2697 &hf_rtps_flag_data_serialized_key, /* Bit 3 */
2698 &hf_rtps_flag_data_present_v2, /* Bit 2 */
2699 &hf_rtps_flag_inline_qos_v2, /* Bit 1 */
2700 &hf_rtps_flag_endianness, /* Bit 0 */
2701 NULL((void*)0)
2702};
2703
2704static int* const RTPS_DATA_FRAG_FLAGS[] = {
2705 &hf_rtps_flag_reserved80, /* Bit 7 */
2706 &hf_rtps_flag_reserved40, /* Bit 6 */
2707 &hf_rtps_flag_reserved20, /* Bit 5 */
2708 &hf_rtps_flag_reserved10, /* Bit 4 */
2709 &hf_rtps_flag_reserved08, /* Bit 3 */
2710 &hf_rtps_flag_data_frag_serialized_key, /* Bit 2 */
2711 &hf_rtps_flag_inline_qos_v2, /* Bit 1 */
2712 &hf_rtps_flag_endianness, /* Bit 0 */
2713 NULL((void*)0)
2714};
2715
2716static int* const RTPS_DATA_BATCH_FLAGS[] = {
2717 &hf_rtps_flag_reserved80, /* Bit 7 */
2718 &hf_rtps_flag_reserved40, /* Bit 6 */
2719 &hf_rtps_flag_reserved20, /* Bit 5 */
2720 &hf_rtps_flag_reserved10, /* Bit 4 */
2721 &hf_rtps_flag_reserved08, /* Bit 3 */
2722 &hf_rtps_flag_reserved04, /* Bit 2 */
2723 &hf_rtps_flag_inline_qos_v2, /* Bit 1 */
2724 &hf_rtps_flag_endianness, /* Bit 0 */
2725 NULL((void*)0)
2726};
2727
2728static int* const RTPS_SAMPLE_INFO_FLAGS16[] = {
2729 &hf_rtps_flag_reserved8000, /* Bit 15 */
2730 &hf_rtps_flag_reserved4000, /* Bit 14 */
2731 &hf_rtps_flag_reserved2000, /* Bit 13 */
2732 &hf_rtps_flag_reserved1000, /* Bit 12 */
2733 &hf_rtps_flag_reserved0800, /* Bit 11 */
2734 &hf_rtps_flag_reserved0400, /* Bit 10 */
2735 &hf_rtps_flag_reserved0200, /* Bit 9 */
2736 &hf_rtps_flag_reserved0100, /* Bit 8 */
2737 &hf_rtps_flag_reserved0080, /* Bit 7 */
2738 &hf_rtps_flag_reserved0040, /* Bit 6 */
2739 &hf_rtps_flag_serialize_key16, /* Bit 5 */
2740 &hf_rtps_flag_invalid_sample, /* Bit 4 */
2741 &hf_rtps_flag_data_present16, /* Bit 3 */
2742 &hf_rtps_flag_offsetsn_present, /* Bit 2 */
2743 &hf_rtps_flag_inline_qos16_v2, /* Bit 1 */
2744 &hf_rtps_flag_timestamp_present, /* Bit 0 */
2745 NULL((void*)0)
2746};
2747
2748static int* const INFO_TS_FLAGS[] = {
2749 &hf_rtps_flag_reserved80, /* Bit 7 */
2750 &hf_rtps_flag_reserved40, /* Bit 6 */
2751 &hf_rtps_flag_reserved20, /* Bit 5 */
2752 &hf_rtps_flag_reserved10, /* Bit 4 */
2753 &hf_rtps_flag_reserved08, /* Bit 3 */
2754 &hf_rtps_flag_reserved04, /* Bit 2 */
2755 &hf_rtps_flag_timestamp, /* Bit 1 */
2756 &hf_rtps_flag_endianness, /* Bit 0 */
2757 NULL((void*)0)
2758};
2759
2760static int* const INFO_SRC_FLAGS[] = {
2761 &hf_rtps_flag_reserved80, /* Bit 7 */
2762 &hf_rtps_flag_reserved40, /* Bit 6 */
2763 &hf_rtps_flag_reserved20, /* Bit 5 */
2764 &hf_rtps_flag_reserved10, /* Bit 4 */
2765 &hf_rtps_flag_reserved08, /* Bit 3 */
2766 &hf_rtps_flag_reserved04, /* Bit 2 */
2767 &hf_rtps_flag_reserved02, /* Bit 1 */
2768 &hf_rtps_flag_endianness, /* Bit 0 */
2769 NULL((void*)0)
2770};
2771
2772static int* const INFO_REPLY_IP4_FLAGS[] = {
2773 &hf_rtps_flag_reserved80, /* Bit 7 */
2774 &hf_rtps_flag_reserved40, /* Bit 6 */
2775 &hf_rtps_flag_reserved20, /* Bit 5 */
2776 &hf_rtps_flag_reserved10, /* Bit 4 */
2777 &hf_rtps_flag_reserved08, /* Bit 3 */
2778 &hf_rtps_flag_reserved04, /* Bit 2 */
2779 &hf_rtps_flag_multicast, /* Bit 1 */
2780 &hf_rtps_flag_endianness, /* Bit 0 */
2781 NULL((void*)0)
2782};
2783
2784static int* const INFO_DST_FLAGS[] = {
2785 &hf_rtps_flag_reserved80, /* Bit 7 */
2786 &hf_rtps_flag_reserved40, /* Bit 6 */
2787 &hf_rtps_flag_reserved20, /* Bit 5 */
2788 &hf_rtps_flag_reserved10, /* Bit 4 */
2789 &hf_rtps_flag_reserved08, /* Bit 3 */
2790 &hf_rtps_flag_reserved04, /* Bit 2 */
2791 &hf_rtps_flag_reserved02, /* Bit 1 */
2792 &hf_rtps_flag_endianness, /* Bit 0 */
2793 NULL((void*)0)
2794};
2795
2796static int* const INFO_REPLY_FLAGS[] = {
2797 &hf_rtps_flag_reserved80, /* Bit 7 */
2798 &hf_rtps_flag_reserved40, /* Bit 6 */
2799 &hf_rtps_flag_reserved20, /* Bit 5 */
2800 &hf_rtps_flag_reserved10, /* Bit 4 */
2801 &hf_rtps_flag_reserved08, /* Bit 3 */
2802 &hf_rtps_flag_reserved04, /* Bit 2 */
2803 &hf_rtps_flag_multicast, /* Bit 1 */
2804 &hf_rtps_flag_endianness, /* Bit 0 */
2805 NULL((void*)0)
2806};
2807
2808static int* const RTI_CRC_FLAGS[] = {
2809 &hf_rtps_flag_reserved80, /* Bit 7 */
2810 &hf_rtps_flag_reserved40, /* Bit 6 */
2811 &hf_rtps_flag_reserved20, /* Bit 5 */
2812 &hf_rtps_flag_reserved10, /* Bit 4 */
2813 &hf_rtps_flag_reserved08, /* Bit 3 */
2814 &hf_rtps_flag_reserved04, /* Bit 2 */
2815 &hf_rtps_flag_reserved02, /* Bit 1 */
2816 &hf_rtps_flag_endianness, /* Bit 0 */
2817 NULL((void*)0)
2818};
2819/* It is a 4 bytes field but with these 8 bits is enough */
2820static int* const STATUS_INFO_FLAGS[] = {
2821 &hf_rtps_flag_reserved80, /* Bit 7 */
2822 &hf_rtps_flag_reserved40, /* Bit 6 */
2823 &hf_rtps_flag_reserved20, /* Bit 5 */
2824 &hf_rtps_flag_reserved10, /* Bit 4 */
2825 &hf_rtps_flag_reserved08, /* Bit 3 */
2826 &hf_rtps_flag_reserved04, /* Bit 2 */
2827 &hf_rtps_flag_unregistered, /* Bit 1 */
2828 &hf_rtps_flag_disposed, /* Bit 0 */
2829 NULL((void*)0)
2830};
2831
2832static int* const TYPE_FLAGS_V2[] = {
2833 &hf_rtps_type_object_v2_type_flag_is_autoid_hash, /* Bit 4 */
2834 &hf_rtps_type_object_v2_type_flag_is_nested, /* Bit 3 */
2835 &hf_rtps_type_object_v2_type_flag_is_mutable, /* Bit 2 */
2836 &hf_rtps_type_object_v2_type_flag_is_appendable, /* Bit 1 */
2837 &hf_rtps_type_object_v2_type_flag_is_final, /* Bit 0 */
2838 NULL((void*)0)
2839};
2840
2841static int* const MEMBER_FLAGS_V2[] = {
2842 &hf_rtps_type_object_v2_member_flag_is_default, /* Bit 6 */
2843 &hf_rtps_type_object_v2_member_flag_is_key, /* Bit 5 */
2844 &hf_rtps_type_object_v2_member_flag_is_must_understand, /* Bit 4 */
2845 &hf_rtps_type_object_v2_member_flag_is_optional, /* Bit 3 */
2846 &hf_rtps_type_object_v2_member_flag_is_external, /* Bit 2 */
2847 &hf_rtps_type_object_v2_member_flag_try_construct, /* Bits 01 */
2848 NULL((void*)0)
2849};
2850
2851static int* const EMHEADER[] = {
2852 &hf_rtps_xcdr2_must_understand, /* Bit 31 */
2853 &hf_rtps_xcdr2_length_code, /* Bits 28-30 */
2854 &hf_rtps_xcdr2_member_id, /* Bits 0-27 */
2855 NULL((void*)0)
2856};
2857
2858static int* const BUILTIN_ENDPOINT_EXT_FLAGS[] = {
2859 &hf_rtps_flag_typelookup_reply_secure_datareader, /* Bit 3 */
2860 &hf_rtps_flag_typelookup_reply_secure_datawriter, /* Bit 2 */
2861 &hf_rtps_flag_typelookup_request_secure_datareader, /* Bit 1 */
2862 &hf_rtps_flag_typelookup_request_secure_datawriter, /* Bit 0 */
2863 NULL((void*)0)
2864};
2865
2866static int* const BUILTIN_ENDPOINT_FLAGS[] = {
2867 &hf_rtps_flag_participant_secure_reader, /* Bit 27 */
2868 &hf_rtps_flag_participant_secure_writer, /* Bit 26 */
2869 &hf_rtps_flag_secure_participant_volatile_message_reader, /* Bit 25 */
2870 &hf_rtps_flag_secure_participant_volatile_message_writer, /* Bit 24 */
2871 &hf_rtps_flag_participant_stateless_message_reader, /* Bit 23 */
2872 &hf_rtps_flag_participant_stateless_message_writer, /* Bit 22 */
2873 &hf_rtps_flag_secure_participant_message_reader, /* Bit 21 */
2874 &hf_rtps_flag_secure_participant_message_writer, /* Bit 20 */
2875 &hf_rtps_flag_secure_subscription_reader, /* Bit 19 */
2876 &hf_rtps_flag_secure_subscription_writer, /* Bit 18 */
2877 &hf_rtps_flag_secure_publication_reader, /* Bit 17 */
2878 &hf_rtps_flag_secure_publication_writer, /* Bit 16 */
2879 &hf_rtps_flag_typelookup_reply_datareader, /* Bit 15 */
2880 &hf_rtps_flag_typelookup_reply_datawriter, /* Bit 14 */
2881 &hf_rtps_flag_typelookup_request_datareader, /* Bit 13 */
2882 &hf_rtps_flag_typelookup_request_datawriter, /* Bit 12 */
2883 &hf_rtps_flag_participant_message_datareader, /* Bit 11 */
2884 &hf_rtps_flag_participant_message_datawriter, /* Bit 10 */
2885 &hf_rtps_flag_participant_state_detector, /* Bit 9 */
2886 &hf_rtps_flag_participant_state_announcer, /* Bit 8 */
2887 &hf_rtps_flag_participant_proxy_detector, /* Bit 7 */
2888 &hf_rtps_flag_participant_proxy_announcer, /* Bit 6 */
2889 &hf_rtps_flag_subscription_detector, /* Bit 5 */
2890 &hf_rtps_flag_subscription_announcer, /* Bit 4 */
2891 &hf_rtps_flag_publication_detector, /* Bit 3 */
2892 &hf_rtps_flag_publication_announcer, /* Bit 2 */
2893 &hf_rtps_flag_participant_detector, /* Bit 1 */
2894 &hf_rtps_flag_participant_announcer, /* Bit 0 */
2895 NULL((void*)0)
2896};
2897
2898static int* const SECURE_FLAGS[] = {
2899 &hf_rtps_flag_reserved80, /* Bit 7 */
2900 &hf_rtps_flag_reserved40, /* Bit 6 */
2901 &hf_rtps_flag_reserved20, /* Bit 5 */
2902 &hf_rtps_flag_reserved10, /* Bit 4 */
2903 &hf_rtps_flag_reserved08, /* Bit 3 */
2904 &hf_rtps_flag_reserved04, /* Bit 2 */
2905 &hf_rtps_flag_multisubmessage, /* Bit 1 */
2906 &hf_rtps_flag_endianness, /* Bit 0 */
2907 NULL((void*)0)
2908};
2909
2910static int* const SECURE_PREFIX_FLAGS[] = {
2911 &hf_rtps_flag_vendor_specific_content, /* Bit 7 */
2912 &hf_rtps_flag_reserved40, /* Bit 6 */
2913 &hf_rtps_flag_reserved20, /* Bit 5 */
2914 &hf_rtps_flag_reserved10, /* Bit 4 */
2915 &hf_rtps_flag_reserved08, /* Bit 3 */
2916 &hf_rtps_flag_protected_with_psk, /* Bit 2 */
2917 &hf_rtps_flag_additional_authenticated_data, /* Bit 1 */
2918 &hf_rtps_flag_endianness, /* Bit 0 */
2919 NULL((void*)0)
2920};
2921
2922static int* const SECURE_POSTFIX_FLAGS[] = {
2923 &hf_rtps_flag_reserved80, /* Bit 7 */
2924 &hf_rtps_flag_reserved40, /* Bit 6 */
2925 &hf_rtps_flag_reserved20, /* Bit 5 */
2926 &hf_rtps_flag_reserved10, /* Bit 4 */
2927 &hf_rtps_flag_reserved08, /* Bit 3 */
2928 &hf_rtps_flag_reserved04, /* Bit 2 */
2929 &hf_rtps_flag_reserved02, /* Bit 1 */
2930 &hf_rtps_flag_endianness, /* Bit 0 */
2931 NULL((void*)0)
2932};
2933
2934static int* const ENDPOINT_SECURITY_INFO_FLAGS[] = {
2935 &hf_rtps_flag_endpoint_security_attribute_flag_is_valid, /* Bit 31 */
2936 &hf_rtps_flag_endpoint_security_attribute_flag_is_liveliness_protected, /* Bit 6 */
2937 &hf_rtps_flag_endpoint_security_attribute_flag_is_key_protected, /* Bit 5 */
2938 &hf_rtps_flag_endpoint_security_attribute_flag_is_payload_protected, /* Bit 4 */
2939 &hf_rtps_flag_endpoint_security_attribute_flag_is_submessage_protected, /* Bit 3 */
2940 &hf_rtps_flag_endpoint_security_attribute_flag_is_discovery_protected, /* Bit 2 */
2941 &hf_rtps_flag_endpoint_security_attribute_flag_is_write_protected, /* Bit 1 */
2942 &hf_rtps_flag_endpoint_security_attribute_flag_is_read_protected, /* Bit 0 */
2943 NULL((void*)0)
2944};
2945
2946static int* const PLUGIN_ENDPOINT_SECURITY_INFO_FLAGS[] = {
2947 &hf_rtps_flag_plugin_endpoint_security_attribute_flag_is_valid, /* Bit 31 */
2948 &hf_rtps_flag_participant_security_attribute_flag_key_psk_protected, /* Bit 4 */
2949 &hf_rtps_flag_plugin_endpoint_security_attribute_flag_is_liveliness_encrypted, /* Bit 2 */
2950 &hf_rtps_flag_plugin_endpoint_security_attribute_flag_is_key_encrypted, /* Bit 1 */
2951 &hf_rtps_flag_plugin_endpoint_security_attribute_flag_is_payload_encrypted, /* Bit 0 */
2952 NULL((void*)0)
2953};
2954static int* const PARTICIPANT_SECURITY_INFO_FLAGS[] = {
2955 &hf_rtps_flag_participant_security_attribute_flag_is_valid, /* Bit 31 */
2956 &hf_rtps_flag_plugin_participant_security_attribute_flag_is_psk_encrypted, /* Bit 6 */
2957 &hf_rtps_flag_participant_security_attribute_flag_key_revisions_enabled, /* Bit 3 */
2958 &hf_rtps_flag_participant_security_attribute_flag_is_liveliness_protected, /* Bit 2 */
2959 &hf_rtps_flag_participant_security_attribute_flag_is_discovery_protected, /* Bit 1 */
2960 &hf_rtps_flag_participant_security_attribute_flag_is_rtps_protected, /* Bit 0 */
2961 NULL((void*)0)
2962};
2963
2964static int* const PLUGIN_PARTICIPANT_SECURITY_INFO_FLAGS[] = {
2965 &hf_rtps_flag_plugin_participant_security_attribute_flag_is_valid, /* Bit 31 */
2966 &hf_rtps_flag_plugin_participant_security_attribute_flag_is_liveliness_origin_encrypted, /* Bit 5 */
2967 &hf_rtps_flag_plugin_participant_security_attribute_flag_is_discovery_origin_encrypted, /* Bit 4 */
2968 &hf_rtps_flag_plugin_participant_security_attribute_flag_is_rtps_origin_encrypted, /* Bit 3 */
2969 &hf_rtps_flag_plugin_participant_security_attribute_flag_is_liveliness_encrypted, /* Bit 2 */
2970 &hf_rtps_flag_plugin_participant_security_attribute_flag_is_discovery_encrypted, /* Bit 1 */
2971 &hf_rtps_flag_plugin_participant_security_attribute_flag_is_rtps_encrypted, /* Bit 0 */
2972 NULL((void*)0)
2973};
2974
2975/* Vendor specific: RTI */
2976static int* const APP_ACK_FLAGS[] = {
2977 &hf_rtps_flag_reserved80, /* Bit 7 */
2978 &hf_rtps_flag_reserved40, /* Bit 6 */
2979 &hf_rtps_flag_reserved20, /* Bit 5 */
2980 &hf_rtps_flag_reserved10, /* Bit 4 */
2981 &hf_rtps_flag_reserved08, /* Bit 3 */
2982 &hf_rtps_flag_reserved04, /* Bit 2 */
2983 &hf_rtps_flag_reserved02, /* Bit 1 */
2984 &hf_rtps_flag_endianness, /* Bit 0 */
2985 NULL((void*)0)
2986};
2987/* Vendor specific: RTI */
2988static int* const APP_ACK_CONF_FLAGS[] = {
2989 &hf_rtps_flag_reserved80, /* Bit 7 */
2990 &hf_rtps_flag_reserved40, /* Bit 6 */
2991 &hf_rtps_flag_reserved20, /* Bit 5 */
2992 &hf_rtps_flag_reserved10, /* Bit 4 */
2993 &hf_rtps_flag_reserved08, /* Bit 3 */
2994 &hf_rtps_flag_reserved04, /* Bit 2 */
2995 &hf_rtps_flag_reserved02, /* Bit 1 */
2996 &hf_rtps_flag_endianness, /* Bit 0 */
2997 NULL((void*)0)
2998};
2999/* Vendor specific: RTI */
3000static int* const HEARTBEAT_VIRTUAL_FLAGS[] = {
3001 &hf_rtps_flag_reserved80, /* Bit 7 */
3002 &hf_rtps_flag_reserved40, /* Bit 6 */
3003 &hf_rtps_flag_reserved20, /* Bit 5 */
3004 &hf_rtps_flag_reserved10, /* Bit 4 */
3005 &hf_rtps_flag_no_virtual_guids, /* Bit 3 */
3006 &hf_rtps_flag_multiple_writers, /* Bit 2 */
3007 &hf_rtps_flag_multiple_virtual_guids, /* Bit 1 */
3008 &hf_rtps_flag_endianness, /* Bit 0 */
3009 NULL((void*)0)
3010};
3011/* Vendor specific: RTI */
3012static int* const DATA_FRAG_FLAGS[] = {
3013 &hf_rtps_flag_reserved80, /* Bit 7 */
3014 &hf_rtps_flag_reserved40, /* Bit 6 */
3015 &hf_rtps_flag_reserved20, /* Bit 5 */
3016 &hf_rtps_flag_reserved10, /* Bit 4 */
3017 &hf_rtps_flag_reserved08, /* Bit 3 */
3018 &hf_rtps_flag_hash_key_rti, /* Bit 2 */
3019 &hf_rtps_flag_inline_qos_v2, /* Bit 1 */
3020 &hf_rtps_flag_endianness, /* Bit 0 */
3021 NULL((void*)0)
3022};
3023#if 0
3024/* Vendor specific: RTI */
3025static int* const NACK_FLAGS[] = {
3026 &hf_rtps_flag_reserved80, /* Bit 7 */
3027 &hf_rtps_flag_reserved40, /* Bit 6 */
3028 &hf_rtps_flag_reserved20, /* Bit 5 */
3029 &hf_rtps_flag_reserved10, /* Bit 4 */
3030 &hf_rtps_flag_reserved08, /* Bit 3 */
3031 &hf_rtps_flag_reserved04, /* Bit 2 */
3032 &hf_rtps_flag_final, /* Bit 1 */
3033 &hf_rtps_flag_endianness, /* Bit 0 */
3034 NULL((void*)0)
3035};
3036#endif
3037
3038static int* const VENDOR_BUILTIN_ENDPOINT_FLAGS[] = {
3039 &hf_rtps_flag_participant_bootstrap_reader, /* Bit 18 */
3040 &hf_rtps_flag_participant_bootstrap_writer, /* Bit 17 */
3041 &hf_rtps_flag_monitoring_logging_reader, /* Bit 16 */
3042 &hf_rtps_flag_monitoring_logging_writer, /* Bit 15 */
3043 &hf_rtps_flag_monitoring_event_reader, /* Bit 14 */
3044 &hf_rtps_flag_monitoring_event_writer, /* Bit 13 */
3045 &hf_rtps_flag_monitoring_periodic_reader, /* Bit 12 */
3046 &hf_rtps_flag_monitoring_periodic_writer, /* Bit 11 */
3047 &hf_rtps_flag_participant_config_secure_reader, /* Bit 10 */
3048 &hf_rtps_flag_participant_config_secure_writer, /* Bit 9 */
3049 &hf_rtps_flag_participant_config_reader, /* Bit 8 */
3050 &hf_rtps_flag_participant_config_writer, /* Bit 7 */
3051 &hf_rtps_flag_cloud_discovery_service_announcer, /* Bit 6 */
3052 &hf_rtps_flag_secure_service_request_reader, /* Bit 5 */
3053 &hf_rtps_flag_secure_service_request_writer, /* Bit 4 */
3054 &hf_rtps_flag_locator_ping_reader, /* Bit 3 */
3055 &hf_rtps_flag_locator_ping_writer, /* Bit 2 */
3056 &hf_rtps_flag_service_request_reader, /* Bit 1 */
3057 &hf_rtps_flag_service_request_writer, /* Bit 0 */
3058 NULL((void*)0)
3059};
3060
3061static int* const ENDPOINT_SECURITY_ATTRIBUTES[] = {
3062 &hf_rtps_flag_security_payload_protected, /* Bit 3 */
3063 &hf_rtps_flag_security_submessage_protected, /* Bit 2 */
3064 &hf_rtps_flag_security_discovery_protected, /* Bit 1 */
3065 &hf_rtps_flag_security_access_protected, /* Bit 0 */
3066 NULL((void*)0)
3067};
3068
3069
3070static int* const RTI_SECURITY_SIMMETRIC_CIPHER_MASK_FLAGS[] = {
3071 &hf_rtps_flag_security_algorithm_compatibility_mode,
3072 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm01,
3073 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm02,
3074 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm03,
3075 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm04,
3076 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm05,
3077 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm06,
3078 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm07,
3079 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm08,
3080 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm09,
3081 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm10,
3082 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm11,
3083 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm12,
3084 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm13,
3085 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm14,
3086 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_rti_aes192_gcm,
3087 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm16,
3088 &hf_rtps_flag_security_symmetric_cipher_mask_aes256_gcm,
3089 &hf_rtps_flag_security_symmetric_cipher_mask_aes128_gcm,
3090 NULL((void*)0)
3091};
3092
3093static int* const SECURITY_SIMMETRIC_CIPHER_MASK_FLAGS[] = {
3094 &hf_rtps_flag_security_algorithm_compatibility_mode,
3095 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm01,
3096 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm02,
3097 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm03,
3098 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm04,
3099 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm05,
3100 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm06,
3101 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm07,
3102 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm08,
3103 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm09,
3104 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm10,
3105 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm11,
3106 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm12,
3107 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm13,
3108 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm14,
3109 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm15,
3110 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm16,
3111 &hf_rtps_flag_security_symmetric_cipher_mask_aes256_gcm,
3112 &hf_rtps_flag_security_symmetric_cipher_mask_aes128_gcm,
3113 NULL((void*)0)
3114};
3115
3116static int* const COMPRESSION_ID_MASK_FLAGS[] = {
3117 &hf_rtps_flag_compression_id_lz4,
3118 &hf_rtps_flag_compression_id_bzip2,
3119 &hf_rtps_flag_compression_id_zlib,
3120 NULL((void*)0)
3121};
3122
3123static int* const RTI_SECURITY_KEY_ESTABLISHMENT_MASK_FLAGS[] = {
3124 &hf_rtps_flag_security_algorithm_compatibility_mode,
3125 &hf_rtps_flag_security_key_establishment_mask_ecdheceum_x25519,
3126 &hf_rtps_flag_security_key_establishment_mask_ecdheceum_x448,
3127 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm03,
3128 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm04,
3129 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm05,
3130 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm06,
3131 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm07,
3132 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm08,
3133 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm09,
3134 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm10,
3135 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm11,
3136 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm12,
3137 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm13,
3138 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm14,
3139 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm15,
3140 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm16,
3141 &hf_rtps_flag_security_key_establishment_mask_ecdheceum_p384,
3142 &hf_rtps_flag_security_key_establishment_mask_ecdheceum_p256,
3143 &hf_rtps_flag_security_key_establishment_mask_dhe_modp2048256,
3144 NULL((void*)0)
3145};
3146
3147static int* const SECURITY_KEY_ESTABLISHMENT_MASK_FLAGS[] = {
3148 &hf_rtps_flag_security_algorithm_compatibility_mode,
3149 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm01,
3150 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm02,
3151 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm03,
3152 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm04,
3153 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm05,
3154 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm06,
3155 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm07,
3156 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm08,
3157 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm09,
3158 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm10,
3159 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm11,
3160 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm12,
3161 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm13,
3162 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm14,
3163 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm15,
3164 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm16,
3165 &hf_rtps_flag_security_key_establishment_mask_ecdheceum_p384,
3166 &hf_rtps_flag_security_key_establishment_mask_ecdheceum_p256,
3167 &hf_rtps_flag_security_key_establishment_mask_dhe_modp2048256,
3168 NULL((void*)0)
3169};
3170
3171static int* const RTI_SECURITY_DIGITAL_SIGNATURE_MASK_FLAGS[] = {
3172 &hf_rtps_flag_security_algorithm_compatibility_mode,
3173 &hf_rtps_flag_security_digital_signature_mask_ecdsa_ed25519_sha512,
3174 &hf_rtps_flag_security_digital_signature_mask_ecdsa_ed448_shake256,
3175 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm03,
3176 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm04,
3177 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm05,
3178 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm06,
3179 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm07,
3180 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm08,
3181 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm09,
3182 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm10,
3183 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm11,
3184 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm12,
3185 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm13,
3186 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm14,
3187 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm15,
3188 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm16,
3189 &hf_rtps_flag_security_digital_signature_mask_ecdsa_p384_sha384,
3190 &hf_rtps_flag_security_digital_signature_mask_ecdsa_p256_sha256,
3191 &hf_rtps_flag_security_digital_signature_mask_rsassapkcs1v15_2048_sha256,
3192 &hf_rtps_flag_security_digital_signature_mask_rsassapssmgf1sha256_2048_sha256,
3193 NULL((void*)0)
3194};
3195
3196static int* const SECURITY_DIGITAL_SIGNATURE_MASK_FLAGS[] = {
3197 &hf_rtps_flag_security_algorithm_compatibility_mode,
3198 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm01,
3199 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm02,
3200 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm03,
3201 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm04,
3202 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm05,
3203 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm06,
3204 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm07,
3205 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm08,
3206 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm09,
3207 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm10,
3208 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm11,
3209 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm12,
3210 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm13,
3211 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm14,
3212 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm15,
3213 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm16,
3214 &hf_rtps_flag_security_digital_signature_mask_ecdsa_p384_sha384,
3215 &hf_rtps_flag_security_digital_signature_mask_ecdsa_p256_sha256,
3216 &hf_rtps_flag_security_digital_signature_mask_rsassapkcs1v15_2048_sha256,
3217 &hf_rtps_flag_security_digital_signature_mask_rsassapssmgf1sha256_2048_sha256,
3218 NULL((void*)0)
3219};
3220
3221static int* const HEADER_EXTENSION_MASK_FLAGS[] = {
3222 &hf_rtps_flag_header_extension_parameters, /* Bit 7 */
3223 &hf_rtps_flag_header_extension_checksum1, /* Bit 6 */
3224 &hf_rtps_flag_header_extension_checksum2, /* Bit 5 */
3225 &hf_rtps_flag_header_extension_wextension, /* Bit 4 */
3226 &hf_rtps_flag_header_extension_uextension, /* Bit 3 */
3227 &hf_rtps_flag_header_extension_timestamp, /* Bit 2 */
3228 &hf_rtps_flag_header_extension_message_length, /* Bit 1 */
3229 &hf_rtps_flag_endianness, /* Bit 0 */
3230 NULL((void*)0)
3231};
3232
3233/**TCP get DomainId feature constants**/
3234#define RTPS_UNKNOWN_DOMAIN_ID_VAL-1 -1
3235#define RTPS_UNKNOWN_DOMAIN_ID_STR"Unknown" "Unknown"
3236#define RTPS_UNKNOWN_DOMAIN_ID_STR_LENsizeof("Unknown") sizeof(RTPS_UNKNOWN_DOMAIN_ID_STR"Unknown")
3237#define RTPS_TCPMAP_DOMAIN_ID_KEY_STR"ParticipantGuid" "ParticipantGuid"
3238#define RTPS_TCPMAP_DOMAIN_ID_PROTODATA_KEY0 0
3239
3240/* Keys for mapping stuff in pinfo */
3241#define RTPS_SERVICE_REQUEST_ID_PROTODATA_KEY1 1
3242#define RTPS_DATA_SESSION_FINAL_PROTODATA_KEY2 2
3243#define RTPS_CURRENT_SUBMESSAGE_COL_DATA_KEY3 3
3244#define RTPS_ROOT_MESSAGE_KEY4 4
3245#define RTPS_DECRYPTION_INFO_KEY5 5
3246
3247#define RTPS_CHECKSUM_MAX_LEN16 16
3248
3249/* End of TCP get DomainId feature constants */
3250
3251typedef struct _participant_info {
3252 int domainId;
3253} participant_info;
3254
3255typedef struct _datawriter_qos {
3256 uint32_t reliability_kind;
3257 uint32_t durability_kind;
3258 uint32_t ownership_kind;
3259} datawriter_qos;
3260
3261#define MAX_TOPIC_AND_TYPE_LENGTH256 256
3262typedef struct _type_mapping {
3263 endpoint_guid guid;
3264 char type_name[MAX_TOPIC_AND_TYPE_LENGTH256];
3265 char topic_name[MAX_TOPIC_AND_TYPE_LENGTH256];
3266 int fields_visited;
3267 datawriter_qos dw_qos;
3268 uint32_t dcps_publication_frame_number;
3269 uint64_t type_id;
3270} type_mapping;
3271
3272/* Links a coherent set with an specific writer. Useful to detect if an empty packet is the end of a coherent set */
3273typedef struct _coherent_set_entity_info {
3274 endpoint_guid guid;
3275 uint64_t writer_seq_number;
3276 uint64_t coherent_set_seq_number;
3277 uint64_t expected_coherent_set_end_writers_seq_number;
3278} coherent_set_entity_info;
3279
3280typedef struct _coherent_set_key {
3281 endpoint_guid guid;
3282 uint64_t coherent_set_seq_number;
3283} coherent_set_key;
3284
3285/* Holds information about the coherent set */
3286typedef struct _coherent_set_info {
3287 coherent_set_key *key;
3288 uint64_t writer_seq_number;
3289 bool_Bool is_set;
3290} coherent_set_info;
3291
3292/* Links a writer_seq_number with a coherent set. Useful when coherent set ends with parameter empty packet*/
3293typedef struct _coherent_set_end {
3294 uint64_t writer_seq_number;
3295 coherent_set_key coherent_set_id;
3296} coherent_set_end;
3297
3298typedef struct _coherent_set_track {
3299 wmem_map_t *entities_using_map;
3300 wmem_map_t *coherent_set_registry_map;
3301} coherent_set_track;
3302
3303static coherent_set_track coherent_set_tracking;
3304static wmem_map_t * registry;
3305static reassembly_table rtps_reassembly_table;
3306static wmem_map_t *discovered_participants_domain_ids;
3307
3308
3309typedef struct {
3310 type_mapping instance_state_data_response_type_mapping;
3311} builtin_types_type_mappings;
3312
3313typedef struct {
3314 dissection_info instance_state_data_response_dissection_info;
3315 dissection_info alive_instances_dissection_info;
3316 dissection_info disposed_instances_dissection_info;
3317 dissection_info unregistered_instances_dissection_info;
3318 dissection_info guid_t_dissection_info;
3319 dissection_info value_dissection_info;
3320 dissection_info instance_transition_data_dissection_info;
3321 dissection_info key_hash_value_dissection_info;
3322 dissection_info array_16_byte_dissection_info;
3323 dissection_info ntptime_t_dissection_info;
3324 dissection_info sequence_number_t_dissection_info;
3325 dissection_info serialized_key_dissection_info;
3326 dissection_info payload_dissection_info;
3327} builtin_types_dissection_infos;
3328
3329
3330/* Dissection info of types that are sent as user data but doesn't publish discovery data */
3331typedef struct {
3332 builtin_types_type_mappings type_mappings;
3333 builtin_types_dissection_infos dissection_infos;
3334} builtin_types_dissection_data_t;
3335
3336static builtin_types_dissection_data_t builtin_types_dissection_data;
3337
3338/*
3339static type_mapping instance_state_data_response_type_mapping;
3340static dissection_info instance_state_data_response_dissection_info;
3341static dissection_info alive_instances_dissection_info;
3342static dissection_info disposed_instances_dissection_info;
3343static dissection_info unregistered_instances_dissection_info;
3344static dissection_info writer_guid_dissection_info;
3345static dissection_info reader_guid_dissection_info;
3346static dissection_info value_dissection_info;
3347*/
3348
3349static const fragment_items rtps_frag_items = {
3350 &ett_rtps_fragment,
3351 &ett_rtps_fragments,
3352 &hf_rtps_fragments,
3353 &hf_rtps_fragment,
3354 &hf_rtps_fragment_overlap,
3355 &hf_rtps_fragment_overlap_conflict,
3356 &hf_rtps_fragment_multiple_tails,
3357 &hf_rtps_fragment_too_long_fragment,
3358 &hf_rtps_fragment_error,
3359 &hf_rtps_fragment_count,
3360 &hf_rtps_reassembled_in,
3361 &hf_rtps_reassembled_length,
3362 &hf_rtps_reassembled_data,
3363 "RTPS fragments"
3364};
3365
3366/******************************************************************************/
3367/* PRE-SHARED KEY DECODING FUNCTIONALITY */
3368/******************************************************************************/
3369#define RTPS_HMAC_256_BUFFER_SIZE_BYTES32 32
3370
3371typedef struct {
3372 uint32_t host_id;
3373 uint32_t app_id;
3374 uint32_t instance_id;
3375} rtps_guid_prefix_t;
3376
3377typedef enum {
3378 CRYPTO_ALGORITHM_NONE = CRYPTO_TRANSFORMATION_KIND_NONE(0),
3379 CRYPTO_ALGORITHM_AES128_GMAC = CRYPTO_TRANSFORMATION_KIND_AES128_GMAC(1),
3380 CRYPTO_ALGORITHM_AES128_GCM = CRYPTO_TRANSFORMATION_KIND_AES128_GCM(2),
3381 CRYPTO_ALGORITHM_AES256_GMAC = CRYPTO_TRANSFORMATION_KIND_AES256_GMAC(3),
3382 CRYPTO_ALGORITHM_AES256_GCM = CRYPTO_TRANSFORMATION_KIND_AES256_GCM(4)
3383} rtps_encryption_algorithm_t;
3384
3385#define RTPS_SECURITY_INIT_VECTOR_LEN12 12
3386typedef struct {
3387 rtps_guid_prefix_t guid_prefix;
3388 bool_Bool try_psk_decryption;
3389 bool_Bool is_aad_enabled;
3390 uint32_t session_id;
3391 uint32_t transformation_key;
3392 rtps_encryption_algorithm_t algorithm;
3393 uint8_t init_vector[RTPS_SECURITY_INIT_VECTOR_LEN12];
3394 uint8_t *additional_authenticated_data;
3395 /* True if using Header Extension. */
3396 bool_Bool additional_authenticated_data_allocated;
3397 size_t aad_length;
3398 uint32_t psk_index;
3399} rtps_current_packet_decryption_info_t;
3400
3401typedef struct {
3402 uint32_t value;
3403 bool_Bool ignore;
3404} rtps_psk_options_entry_uint32_string_t;
3405
3406typedef struct {
3407 char *passphrase_secret;
3408
3409 char *passphrase_id_in;
3410 rtps_psk_options_entry_uint32_string_t passphrase_id;
3411
3412 char *host_id_in;
3413 rtps_psk_options_entry_uint32_string_t host_id;
3414
3415 char *app_id_in;
3416 rtps_psk_options_entry_uint32_string_t app_id;
3417
3418 char *instance_id_in;
3419 rtps_psk_options_entry_uint32_string_t instance_id;
3420
3421} rtps_psk_options_entry_t;
3422
3423/* PSK table options in RTPS protocol options */
3424typedef struct {
3425 rtps_psk_options_entry_t *entries;
3426 unsigned size;
3427} rtps_psk_options_t;
3428
3429static rtps_psk_options_t rtps_psk_options = { NULL((void*)0), 0 };
3430
3431/*
3432 * The table presented to the user has five columns: psk_index_str, psk,
3433 * host_id, app_id, and instance_id. Decoding of the RTPS message using the
3434 * pre-shared key will only take place if there is a match in the host_id,
3435 * app_id, instance_id, and psk_index. These fields do not require a match if
3436 * the user leaves them empty or containing only the '*' wildcard character
3437 * (note that the the psk secret passphrase must always match). Ignoring all the
3438 * previuos fields will result in an attempt to decode the RTPS message
3439 * regardless of the GUID or the PSK index.
3440 */
3441UAT_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_inline ((((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_inline (""); *out_len = 0; } }
3442 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_inline ((((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_inline (""); *out_len = 0; } }
3443 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_inline ((((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_inline (""); *out_len = 0; } }
3444UAT_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_inline ((((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_inline (""); *out_len = 0; } }
3445 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_inline ((((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_inline (""); *out_len = 0; } }
3446 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_inline ((((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_inline (""); *out_len = 0; } }
3447UAT_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_inline ((((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_inline (
""); *out_len = 0; } }
3448 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_inline ((((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_inline (
""); *out_len = 0; } }
3449 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_inline ((((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_inline (
""); *out_len = 0; } }
3450UAT_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_inline ((((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_inline (
""); *out_len = 0; } }
3451 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_inline ((((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_inline (
""); *out_len = 0; } }
3452 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_inline ((((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_inline (
""); *out_len = 0; } }
3453UAT_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_inline ((((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_inline
(""); *out_len = 0; } }
3454 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_inline ((((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_inline
(""); *out_len = 0; } }
3455 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_inline ((((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_inline
(""); *out_len = 0; } }
3456
3457static uat_field_t rtps_psk_table_field_array[] = {
3458 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)}
3459 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)}
3460 "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)}
3461 "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)}
3462 "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)}
,
3463 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)}
3464 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)}
3465 "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)}
3466 "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)}
,
3467 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)}
3468 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)}
3469 "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)}
3470 "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)}
3471 "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)}
,
3472 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)}
3473 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)}
3474 "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)}
3475 "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)}
3476 "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)}
,
3477 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)}
3478 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)}
3479 "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)}
3480 "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)}
3481 "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)}
,
3482 UAT_END_FIELDS{((void*)0),((void*)0),PT_TXTMOD_NONE,{0,0,0},{0,0,0},0,0,((void
*)0)}
3483};
3484
3485static void *rtps_psk_options_copy_entry(
3486 void *destination,
3487 const void *source,
3488 size_t length _U___attribute__((unused)))
3489{
3490 const rtps_psk_options_entry_t *src = source;
3491 rtps_psk_options_entry_t *dest = destination;
3492
3493 dest->passphrase_secret = g_strdup(src->passphrase_secret)g_strdup_inline (src->passphrase_secret);
3494
3495 dest->passphrase_id = src->passphrase_id;
3496 dest->passphrase_id_in = g_strdup(src->passphrase_id_in)g_strdup_inline (src->passphrase_id_in);
3497
3498 dest->host_id = src->host_id;
3499 dest->host_id_in = g_strdup(src->host_id_in)g_strdup_inline (src->host_id_in);
3500
3501 dest->app_id = src->app_id;
3502 dest->app_id_in = g_strdup(src->app_id_in)g_strdup_inline (src->app_id_in);
3503
3504 dest->instance_id = src->instance_id;
3505 dest->instance_id_in = g_strdup(src->instance_id_in)g_strdup_inline (src->instance_id_in);
3506
3507 return dest;
3508}
3509
3510static void rtps_psk_options_free_entry(void *record)
3511{
3512 rtps_psk_options_entry_t *entry = record;
3513
3514 g_free(entry->passphrase_secret);
3515 entry->passphrase_secret = NULL((void*)0);
3516
3517 g_free(entry->passphrase_id_in);
3518 entry->passphrase_id_in = NULL((void*)0);
3519
3520 g_free(entry->host_id_in);
3521 entry->host_id_in = NULL((void*)0);
3522
3523 g_free(entry->app_id_in);
3524 entry->app_id_in = NULL((void*)0);
3525
3526 g_free(entry->instance_id_in);
3527 entry->instance_id_in = NULL((void*)0);
3528 return;
3529}
3530
3531static bool_Bool rtps_psk_options_entry_uint32_string_validate(
3532 char **error_string,
3533 rtps_psk_options_entry_uint32_string_t *out,
3534 char *in,
3535 const char *field_name)
3536{
3537 if (in == NULL((void*)0) || strlen(in) == 0 || in[0] == '*') {
3538 out->ignore = true1;
3539 } else {
3540 if (!ws_strtou32(in, NULL((void*)0), &out->value)) {
3541 *error_string = g_strdup_printf(
3542 "The '%s' field must be either the '*' wildcard character, or a "
3543 "valid integer.",
3544 field_name);
3545 return false0;
3546 }
3547 }
3548 return true1;
3549}
3550
3551static bool_Bool rtps_psk_options_update_entry(void *record, char **error_string)
3552{
3553 size_t PASSPHRASE_MAX_LENGTH = 512; /* fixed by specification. */
3554 rtps_psk_options_entry_t *entry = record;
3555 size_t passphrase_length = 0;
3556
3557 /* Validation of the Passphrase Id. */
3558 if (!rtps_psk_options_entry_uint32_string_validate(
3559 error_string,
3560 &entry->passphrase_id,
3561 entry->passphrase_id_in,
3562 "Passphrase Id")) {
3563 return false0;
3564 }
3565
3566 /* Validation of the Passphrase Secret. */
3567 if (entry->passphrase_secret == NULL((void*)0)) {
3568 *error_string = g_strdup("The 'Passphrase Secret' field can't be empty")g_strdup_inline ("The 'Passphrase Secret' field can't be empty"
)
;
3569 return false0;
3570 }
3571 g_strstrip(entry->passphrase_secret)g_strchomp (g_strchug (entry->passphrase_secret));
3572
3573 passphrase_length = strlen(entry->passphrase_secret);
3574 if (passphrase_length == 0) {
3575 *error_string = g_strdup("The 'Passphrase Secret' field can't be empty")g_strdup_inline ("The 'Passphrase Secret' field can't be empty"
)
;
3576 return false0;
3577 }
3578 if (passphrase_length > (PASSPHRASE_MAX_LENGTH - 1)) {
3579 *error_string = g_strdup_printf(
3580 "The 'Passphrase Secret' field has %zu characters length. "
3581 "It cannot be larger than %zu characters.",
3582 passphrase_length,
3583 PASSPHRASE_MAX_LENGTH - 1); /* last byte is for null character. */
3584 return false0;
3585 }
3586
3587 /* Validation of the Host Id. */
3588 if (!rtps_psk_options_entry_uint32_string_validate(
3589 error_string,
3590 &entry->host_id,
3591 entry->host_id_in,
3592 "Host Id")) {
3593 return false0;
3594 }
3595
3596 /* Validation of the App Id. */
3597 if (!rtps_psk_options_entry_uint32_string_validate(
3598 error_string,
3599 &entry->app_id,
3600 entry->app_id_in,
3601 "App Id")) {
3602 return false0;
3603 }
3604
3605 /* Validation of the Instance Id. */
3606 if (!rtps_psk_options_entry_uint32_string_validate(
3607 error_string,
3608 &entry->instance_id,
3609 entry->instance_id_in,
3610 "Instance Id")) {
3611 return false0;
3612 }
3613
3614 return true1;
3615}
3616/* End of PSK table options */
3617
3618static void rtps_current_packet_decryption_info_reset(
3619 rtps_current_packet_decryption_info_t *info)
3620{
3621 rtps_guid_prefix_t guid_prefix_zero = {0, 0, 0};
3622
3623 info->guid_prefix = guid_prefix_zero;
3624 info->try_psk_decryption = false0;
3625 info->is_aad_enabled = false0;
3626 info->session_id = 0;
3627 info->transformation_key = 0;
3628 info->algorithm = CRYPTO_ALGORITHM_NONE;
3629 memset(info->init_vector, 0, RTPS_SECURITY_INIT_VECTOR_LEN12);
3630 if (info->additional_authenticated_data_allocated
3631 && info->additional_authenticated_data != NULL((void*)0)) {
3632 g_free(info->additional_authenticated_data);
3633 }
3634 info->additional_authenticated_data = NULL((void*)0);
3635 info->additional_authenticated_data_allocated = false0;
3636 info->aad_length = 0;
3637 info->psk_index = 0;
3638 return;
3639}
3640
3641/* ----------------------- PSK Session Key Generation ---------------------- */
3642/*
3643 * The session key is calculated as follows:
3644 * HMAC-SHA256(
3645 * master_sender_key,
3646 * "SessionKey" | master_sender_salt | session_id)
3647 *
3648 * This is implemented in rtps_psk_generate_session_key.
3649 *
3650 * Each component of the above formula can be obtained as follows:
3651 *
3652 * - master_sender_key and master_sender_salt 32 bytes element computed from:
3653 * HMAC-SHA256(prk_key, <derivation_suffix> | 0x01)
3654 *
3655 * - prk_key: Implemented in rtps_psk_generate_prk_key.
3656 * HMAC-SHA256(public_salt_for_master_key, preshared_secret_key)
3657 *
3658 * - public_salt_for_master_key (256 bits): Implemented in
3659 * rtps_generate_public_salt.
3660 * concatenate(
3661 * <prk_prefix> (64 bits),
3662 * <sender_key_id> (32 bits),
3663 * RTPS header (160 bits))
3664 * - preshared_secret_key: Secret key given by the user in the
3665 * dialog.
3666 *
3667 * Where <derivation_suffix> is equal to "master sender key derivation" for
3668 * the master_sender_key and "master salt derivation" for the
3669 * master_sender_salt.
3670 *
3671 * Where <prk_prefix> is equal to "PSK-SKEY" for the master_sender_key and
3672 * "PSK-SALT" for the master_sender_salt.
3673 *
3674 * Where <sender_key_id> is sent in the transformation_key_id field of the
3675 * crypto header (only when the message is encoded using PSK).
3676 *
3677 * This is implemented in rtps_psk_generate_master_sender.
3678 *
3679 * - session_id: We can read the session_id from the crypto header of the
3680 * SRTPS_PREFIX submessage.
3681 * Note: The session_id is a counter starting at zero and increased by one
3682 * every time we have encoded a specific number of messages.
3683 */
3684static bool_Bool rtps_psk_generate_master_sender(
3685 uint8_t *output,
3686 bool_Bool is_salt,
3687 const char* preshared_secret_key,
3688 uint32_t sender_key_id,
3689 tvbuff_t *rtps_header_tvb,
3690 int rtps_header_tvb_offset);
3691
3692static gcry_error_t rtps_util_generate_hmac_sha256(
3693 void *output,
3694 const void *key,
3695 size_t key_length,
3696 const void *data,
3697 size_t datalen);
3698
3699/**
3700 * @brief Generate the session key that will be used to decrypt PSK-encoded RTPS
3701 * messages. It requires the pre-shared secret key known and given by the user,
3702 * the RTPS header, and two fields (sender key id and session id) sent on the
3703 * wire.
3704 */
3705static bool_Bool rtps_psk_generate_session_key(
3706 uint8_t *session_key, /* output. */
3707 size_t *session_key_length, /* output. */
3708 packet_info *pinfo,
3709 const char *preshared_secret_key,
3710 uint32_t sender_key_id,
3711 uint32_t session_id,
3712 rtps_encryption_algorithm_t algorithm)
3713{
3714 const char *sessionKeyString = "SessionKey";
3715 rtps_tvb_field* rtps_root = NULL((void*)0);
3716 uint8_t sender_key[RTPS_HMAC_256_BUFFER_SIZE_BYTES32];
3717 /*
3718 * Must be big enough to fit the sessionKeyString, the master sender key and
3719 * the session id.
3720 */
3721 uint8_t input[50];
3722 size_t offset = 0;
3723
3724 if (algorithm == CRYPTO_ALGORITHM_AES256_GCM
3725 || algorithm == CRYPTO_ALGORITHM_AES256_GMAC) {
3726 *session_key_length = RTPS_HMAC_256_BUFFER_SIZE_BYTES32;
3727 } else {
3728 /* 128 bits for AES128. */
3729 *session_key_length = RTPS_HMAC_256_BUFFER_SIZE_BYTES32 / 2;
3730 }
3731
3732 rtps_root = (rtps_tvb_field*) p_get_proto_data(
3733 pinfo->pool,
3734 pinfo,
3735 proto_rtps,
3736 RTPS_ROOT_MESSAGE_KEY4);
3737 if (rtps_root == NULL((void*)0) || session_key == NULL((void*)0)) {
3738 return false0;
3739 }
3740
3741 memcpy(input, sessionKeyString, strlen(sessionKeyString));
3742 offset += strlen(sessionKeyString);
3743
3744 if (!rtps_psk_generate_master_sender(
3745 input + offset,
3746 true1, /* is_salt. */
3747 preshared_secret_key,
3748 sender_key_id,
3749 rtps_root->tvb,
3750 rtps_root->tvb_offset)) {
3751 return false0;
3752 }
3753 offset += *session_key_length;
3754
3755 memcpy(
3756 input + offset,
3757 &session_id,
3758 sizeof(uint32_t));
3759 offset += sizeof(uint32_t);
3760
3761 if (!rtps_psk_generate_master_sender(
3762 sender_key,
3763 false0, /* is_salt. */
3764 preshared_secret_key,
3765 sender_key_id,
3766 rtps_root->tvb,
3767 rtps_root->tvb_offset)) {
3768 return false0;
3769 }
3770
3771 return rtps_util_generate_hmac_sha256(
3772 session_key,
3773 sender_key,
3774 *session_key_length,
3775 input,
3776 offset) == GPG_ERR_NO_ERROR;
3777}
3778
3779static bool_Bool rtps_psk_generate_prk_key(
3780 uint8_t *output,
3781 const char *prefix,
3782 const char *preshared_secret_key,
3783 uint32_t sender_key_id,
3784 tvbuff_t *rtps_header_tvb,
3785 int rtps_header_tvb_offset);
3786
3787/**
3788 * @brief Generate the master sender key or master sender salt (depending on the
3789 * is_salt parameter) that will be used to derive the session key.
3790 */
3791static bool_Bool rtps_psk_generate_master_sender(
3792 uint8_t *output,
3793 bool_Bool is_salt,
3794 const char* preshared_secret_key,
3795 uint32_t sender_key_id,
3796 tvbuff_t *rtps_header_tvb,
3797 int rtps_header_tvb_offset)
3798{
3799 const char *prk_prefix = is_salt ? "PSK-SALT" : "PSK-SKEY";
3800 const char *suffix = is_salt ?
3801 "master salt derivation" :
3802 "master sender key derivation";
3803 uint8_t prk_key[RTPS_HMAC_256_BUFFER_SIZE_BYTES32];
3804 /* Must be big enough to fit the largest suffix and the 0x1 constant byte. */
3805 uint8_t input[50];
3806
3807 if (!rtps_psk_generate_prk_key(
3808 prk_key,
3809 prk_prefix,
3810 preshared_secret_key,
3811 sender_key_id,
3812 rtps_header_tvb,
3813 rtps_header_tvb_offset)) {
3814 return false0;
3815 }
3816
3817 memcpy(input, suffix, strlen(suffix));
3818 input[strlen(suffix)] = 0x1; /* Fixed value. */
3819
3820 return rtps_util_generate_hmac_sha256(
3821 output,
3822 prk_key,
3823 RTPS_HMAC_256_BUFFER_SIZE_BYTES32,
3824 input,
3825 strlen(suffix) + 1) == GPG_ERR_NO_ERROR;
3826}
3827
3828static void rtps_generate_public_salt(
3829 uint8_t *output,
3830 const char *prefix,
3831 uint32_t sender_key_id,
3832 tvbuff_t *rtps_header_tvb,
3833 int rtps_header_tvb_offset);
3834
3835/**
3836 * @brief Compute the Pseudo-Random Key; an intermediate step to get the
3837 * master sender. This function computes:
3838 * HMAC-SHA256(
3839 * concatenate(prefix, sender_key_id. rtps_header),
3840 * preshared_secret_key)
3841 */
3842static bool_Bool rtps_psk_generate_prk_key(
3843 uint8_t *output,
3844 const char *prefix,
3845 const char *preshared_secret_key,
3846 uint32_t sender_key_id,
3847 tvbuff_t *rtps_header_tvb,
3848 int rtps_header_tvb_offset)
3849{
3850 gcry_error_t error = GPG_ERR_NO_ERROR;
3851 uint8_t public_salt[RTPS_HMAC_256_BUFFER_SIZE_BYTES32];
3852
3853 rtps_generate_public_salt(
3854 public_salt,
3855 prefix,
3856 sender_key_id,
3857 rtps_header_tvb,
3858 rtps_header_tvb_offset);
3859
3860 error = rtps_util_generate_hmac_sha256(
3861 output,
3862 public_salt,
3863 RTPS_HMAC_256_BUFFER_SIZE_BYTES32,
3864 preshared_secret_key,
3865 strlen(preshared_secret_key));
3866 return error == GPG_ERR_NO_ERROR;
3867}
3868
3869/**
3870 * @brief Generates the public salt that can be used to derive the prk_key
3871 * and prk_salt Pseudo-Random Keys.
3872 *
3873 * It does the concatenation of:
3874 * concatenate(
3875 * <8-byte prefix>,
3876 * <4-byte sender's key id>,
3877 * <20-byte RTPS header>)
3878 * So output must be a 32-byte buffer (i.e. RTPS_HMAC_256_BUFFER_SIZE_BYTES).
3879 */
3880static void rtps_generate_public_salt(
3881 uint8_t *output,
3882 const char *prefix,
3883 uint32_t sender_key_id,
3884 tvbuff_t *rtps_header_tvb,
3885 int rtps_header_tvb_offset)
3886{
3887 size_t offset = 0;
3888
3889 /* Copy the 8-byte prefix. */
3890 memcpy(output, prefix, strlen(prefix));
3891 offset += strlen(prefix);
3892
3893 /* Copy the 4-byte sender's key id. */
3894 memcpy(output + offset, &sender_key_id, sizeof(uint32_t));
3895 offset += sizeof(uint32_t);
3896
3897 /* Copy the 20-byte RTPS header. */
3898 tvb_memcpy(
3899 rtps_header_tvb,
3900 output + offset,
3901 rtps_header_tvb_offset,
3902 20); /* RTPS HEADER SIZE. */
3903
3904 return;
3905}
3906
3907/**
3908 * @brief Compute the HMAC-SHA256 of the data using the key.
3909 * This function is required to derive the PSK session key.
3910 */
3911static gcry_error_t rtps_util_generate_hmac_sha256(
3912 void *output,
3913 const void *key,
3914 size_t key_length,
3915 const void *data,
3916 size_t datalen)
3917{
3918 gcry_mac_hd_t hmac;
3919 gcry_error_t error = GPG_ERR_NO_ERROR;
3920 size_t OUTPUT_SIZE = RTPS_HMAC_256_BUFFER_SIZE_BYTES32;
3921
3922 error = gcry_mac_open(&hmac, GCRY_MAC_HMAC_SHA256, 0, NULL((void*)0));
3923 if (error != GPG_ERR_NO_ERROR) {
3924 gcry_mac_close(hmac);
3925 return error;
3926 }
3927
3928 error = gcry_mac_setkey(hmac, key, key_length);
3929 if (error != GPG_ERR_NO_ERROR) {
3930 gcry_mac_close(hmac);
3931 return error;
3932 }
3933
3934 error = gcry_mac_write(hmac, data, datalen);
3935 if (error != GPG_ERR_NO_ERROR) {
3936 gcry_mac_close(hmac);
3937 return error;
3938 }
3939
3940 error = gcry_mac_read(hmac, output, &OUTPUT_SIZE);
3941 if (error != GPG_ERR_NO_ERROR) {
3942 gcry_mac_close(hmac);
3943 ws_warning("Failure: %s/%s",do { if (1) { ws_log_full("packet-rtps", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 3945, __func__, "Failure: %s/%s", gcry_strsource (error), gcry_strerror
(error)); } } while (0)
3944 gcry_strsource (error),do { if (1) { ws_log_full("packet-rtps", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 3945, __func__, "Failure: %s/%s", gcry_strsource (error), gcry_strerror
(error)); } } while (0)
3945 gcry_strerror (error))do { if (1) { ws_log_full("packet-rtps", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 3945, __func__, "Failure: %s/%s", gcry_strsource (error), gcry_strerror
(error)); } } while (0)
;
3946 return error;
3947 }
3948
3949 gcry_mac_close(hmac);
3950 return error;
3951}
3952/* ------------------------------------------------------------------------- */
3953
3954/**
3955 * @brief Translate between the RTPS and gcrypt types.
3956 */
3957static int rtps_encryption_algorithm_to_gcry_enum(
3958 rtps_encryption_algorithm_t rtps_enum_in,
3959 int *gcry_cipher_mode_out)
3960{
3961 if (gcry_cipher_mode_out == NULL((void*)0)) {
3962 return -1;
3963 }
3964 switch(rtps_enum_in) {
3965 case CRYPTO_ALGORITHM_AES128_GMAC:
3966 *gcry_cipher_mode_out = GCRY_CIPHER_MODE_CCM;
3967 return GCRY_CIPHER_AES128GCRY_CIPHER_AES;
3968 case CRYPTO_ALGORITHM_AES128_GCM:
3969 *gcry_cipher_mode_out = GCRY_CIPHER_MODE_GCM;
3970 return GCRY_CIPHER_AES128GCRY_CIPHER_AES;
3971 case CRYPTO_ALGORITHM_AES256_GMAC:
3972 *gcry_cipher_mode_out = GCRY_CIPHER_MODE_CCM;
3973 return GCRY_CIPHER_AES256;
3974 case CRYPTO_ALGORITHM_AES256_GCM:
3975 *gcry_cipher_mode_out = GCRY_CIPHER_MODE_GCM;
3976 return GCRY_CIPHER_AES256;
3977 case CRYPTO_ALGORITHM_NONE:
3978 default:
3979 *gcry_cipher_mode_out = GCRY_CIPHER_MODE_NONE;
3980 return GCRY_CIPHER_NONE;
3981 }
3982}
3983
3984static gcry_error_t rtps_util_decrypt_data(
3985 uint8_t *encrypted_data,
3986 size_t encrypted_data_size,
3987 uint8_t *key,
3988 size_t key_length,
3989 uint8_t *init_vector,
3990 uint8_t *tag,
3991 const uint8_t *aad,
3992 size_t aad_length,
3993 rtps_encryption_algorithm_t algorithm)
3994{
3995 gcry_error_t err = GPG_ERR_NO_ERROR;
3996 gcry_cipher_hd_t cipher_hd;
3997 int encryption_algo;
3998 int encryption_mode = 0;
3999
4000 encryption_algo = rtps_encryption_algorithm_to_gcry_enum(
4001 algorithm,
4002 &encryption_mode);
4003
4004 err = gcry_cipher_open(
4005 &cipher_hd,
4006 encryption_algo,
4007 encryption_mode,
4008 0);
4009 if (err != GPG_ERR_NO_ERROR) {
4010 ws_warning(do { if (1) { ws_log_full("packet-rtps", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 4013, __func__, "GCRY: cipher open %s/%s\n", gcry_strsource
(err), gcry_strerror(err)); } } while (0)
4011 "GCRY: cipher open %s/%s\n",do { if (1) { ws_log_full("packet-rtps", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 4013, __func__, "GCRY: cipher open %s/%s\n", gcry_strsource
(err), gcry_strerror(err)); } } while (0)
4012 gcry_strsource(err),do { if (1) { ws_log_full("packet-rtps", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 4013, __func__, "GCRY: cipher open %s/%s\n", gcry_strsource
(err), gcry_strerror(err)); } } while (0)
4013 gcry_strerror(err))do { if (1) { ws_log_full("packet-rtps", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 4013, __func__, "GCRY: cipher open %s/%s\n", gcry_strsource
(err), gcry_strerror(err)); } } while (0)
;
4014 return err;
4015 }
4016
4017 err = gcry_cipher_setkey(cipher_hd, key, key_length);
4018 if (err != GPG_ERR_NO_ERROR) {
4019 ws_warning(do { if (1) { ws_log_full("packet-rtps", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 4022, __func__, "GCRY: setkey %s/%s\n", gcry_strsource(err)
, gcry_strerror(err)); } } while (0)
4020 "GCRY: setkey %s/%s\n",do { if (1) { ws_log_full("packet-rtps", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 4022, __func__, "GCRY: setkey %s/%s\n", gcry_strsource(err)
, gcry_strerror(err)); } } while (0)
4021 gcry_strsource(err),do { if (1) { ws_log_full("packet-rtps", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 4022, __func__, "GCRY: setkey %s/%s\n", gcry_strsource(err)
, gcry_strerror(err)); } } while (0)
4022 gcry_strerror(err))do { if (1) { ws_log_full("packet-rtps", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 4022, __func__, "GCRY: setkey %s/%s\n", gcry_strsource(err)
, gcry_strerror(err)); } } while (0)
;
4023 gcry_cipher_close(cipher_hd);
4024 return err;
4025 }
4026
4027 if (init_vector != NULL((void*)0)) {
4028 err = gcry_cipher_setiv(
4029 cipher_hd,
4030 init_vector,
4031 RTPS_SECURITY_INIT_VECTOR_LEN12);
4032 if (err != GPG_ERR_NO_ERROR) {
4033 ws_warning(do { if (1) { ws_log_full("packet-rtps", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 4036, __func__, "GCRY: setiv %s/%s\n", gcry_strsource(err),
gcry_strerror(err)); } } while (0)
4034 "GCRY: setiv %s/%s\n",do { if (1) { ws_log_full("packet-rtps", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 4036, __func__, "GCRY: setiv %s/%s\n", gcry_strsource(err),
gcry_strerror(err)); } } while (0)
4035 gcry_strsource(err),do { if (1) { ws_log_full("packet-rtps", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 4036, __func__, "GCRY: setiv %s/%s\n", gcry_strsource(err),
gcry_strerror(err)); } } while (0)
4036 gcry_strerror(err))do { if (1) { ws_log_full("packet-rtps", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 4036, __func__, "GCRY: setiv %s/%s\n", gcry_strsource(err),
gcry_strerror(err)); } } while (0)
;
4037 gcry_cipher_close(cipher_hd);
4038 return err;
4039 }
4040 }
4041
4042 if (aad != NULL((void*)0)) {
4043 err = gcry_cipher_authenticate(cipher_hd, aad, aad_length);
4044 if (err != GPG_ERR_NO_ERROR) {
4045 ws_warning(do { if (1) { ws_log_full("packet-rtps", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 4048, __func__, "GCRY: authenticate %s/%s\n", gcry_strsource
(err), gcry_strerror(err)); } } while (0)
4046 "GCRY: authenticate %s/%s\n",do { if (1) { ws_log_full("packet-rtps", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 4048, __func__, "GCRY: authenticate %s/%s\n", gcry_strsource
(err), gcry_strerror(err)); } } while (0)
4047 gcry_strsource(err),do { if (1) { ws_log_full("packet-rtps", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 4048, __func__, "GCRY: authenticate %s/%s\n", gcry_strsource
(err), gcry_strerror(err)); } } while (0)
4048 gcry_strerror(err))do { if (1) { ws_log_full("packet-rtps", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 4048, __func__, "GCRY: authenticate %s/%s\n", gcry_strsource
(err), gcry_strerror(err)); } } while (0)
;
4049 gcry_cipher_close(cipher_hd);
4050 return err;
4051 }
4052 }
4053
4054 err = gcry_cipher_decrypt(
4055 cipher_hd,
4056 encrypted_data,
4057 encrypted_data_size,
4058 NULL((void*)0),
4059 0);
4060 if (err != GPG_ERR_NO_ERROR) {
4061 ws_warning(do { if (1) { ws_log_full("packet-rtps", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 4064, __func__, "GCRY: decrypt %s/%s\n", gcry_strsource(err
), gcry_strerror(err)); } } while (0)
4062 "GCRY: decrypt %s/%s\n",do { if (1) { ws_log_full("packet-rtps", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 4064, __func__, "GCRY: decrypt %s/%s\n", gcry_strsource(err
), gcry_strerror(err)); } } while (0)
4063 gcry_strsource(err),do { if (1) { ws_log_full("packet-rtps", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 4064, __func__, "GCRY: decrypt %s/%s\n", gcry_strsource(err
), gcry_strerror(err)); } } while (0)
4064 gcry_strerror(err))do { if (1) { ws_log_full("packet-rtps", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 4064, __func__, "GCRY: decrypt %s/%s\n", gcry_strsource(err
), gcry_strerror(err)); } } while (0)
;
4065 gcry_cipher_close(cipher_hd);
4066 return err;
4067 }
4068
4069 if (tag != NULL((void*)0)) {
4070 err = gcry_cipher_checktag(cipher_hd, tag, SECURE_TAG_COMMON_AND_SPECIFIC_MAC_LENGTH16);
4071 if (err != GPG_ERR_NO_ERROR) {
4072 ws_warning(do { if (1) { ws_log_full("packet-rtps", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 4075, __func__, "GCRY: Decryption (checktag) failed: %s/%s\n"
, gcry_strsource(err), gcry_strerror(err)); } } while (0)
4073 "GCRY: Decryption (checktag) failed: %s/%s\n",do { if (1) { ws_log_full("packet-rtps", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 4075, __func__, "GCRY: Decryption (checktag) failed: %s/%s\n"
, gcry_strsource(err), gcry_strerror(err)); } } while (0)
4074 gcry_strsource(err),do { if (1) { ws_log_full("packet-rtps", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 4075, __func__, "GCRY: Decryption (checktag) failed: %s/%s\n"
, gcry_strsource(err), gcry_strerror(err)); } } while (0)
4075 gcry_strerror(err))do { if (1) { ws_log_full("packet-rtps", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 4075, __func__, "GCRY: Decryption (checktag) failed: %s/%s\n"
, gcry_strsource(err), gcry_strerror(err)); } } while (0)
;
4076 }
4077 }
4078
4079 gcry_cipher_close(cipher_hd);
4080 return err;
4081}
4082
4083/**
4084 * @brief Generates the session key and uses it to decrypt the secure payload.
4085 * The decrypted payload is stored in an allocated buffer using the allocator
4086 * passed as parameter.
4087 */
4088static uint8_t *rtps_decrypt_secure_payload(
4089 uint8_t *session_key, /* output. */
4090 size_t *session_key_length, /* output. */
4091 tvbuff_t *tvb,
4092 packet_info *pinfo,
4093 int offset,
4094 size_t secure_payload_len,
4095 uint8_t *preshared_secret_key,
4096 rtps_current_packet_decryption_info_t *decryption_info,
4097 uint8_t *tag,
4098 gcry_error_t* error,
4099 wmem_allocator_t *allocator)
4100{
4101 uint8_t *secure_body_ptr;
4102 uint8_t *aad = decryption_info->is_aad_enabled ?
4103 decryption_info->additional_authenticated_data :
4104 NULL((void*)0);
4105
4106 if (!rtps_psk_generate_session_key(
4107 session_key, /* output. */
4108 session_key_length, /* output. */
4109 pinfo,
4110 preshared_secret_key,
4111 decryption_info->transformation_key,
4112 decryption_info->session_id,
4113 decryption_info->algorithm)) {
4114 return NULL((void*)0);
4115 }
4116
4117 secure_body_ptr = wmem_alloc0(allocator, secure_payload_len);
4118 if (secure_body_ptr == NULL((void*)0)) {
4119 return NULL((void*)0);
4120 }
4121
4122 tvb_memcpy(tvb, secure_body_ptr, offset, secure_payload_len);
4123
4124 *error = rtps_util_decrypt_data(
4125 secure_body_ptr,
4126 secure_payload_len,
4127 session_key,
4128 *session_key_length,
4129 decryption_info->init_vector,
4130 tag,
4131 aad,
4132 decryption_info->aad_length,
4133 decryption_info->algorithm);
4134
4135 /*
4136 * Free the allocated memory if the decryption goes wrong or if the content is
4137 * not healthy.
4138 */
4139 if (*error != GPG_ERR_NO_ERROR) {
4140 wmem_free(allocator, secure_body_ptr);
4141 secure_body_ptr = NULL((void*)0);
4142 }
4143 return secure_body_ptr;
4144}
4145/******************************************************************************/
4146
4147static const true_false_string tfs_little_big_endianness = { "Little-Endian", "Big-Endian" };
4148
4149/* #19359 - ensure strings we copy aren't truncated halfway through a Unicode codepoint */
4150static void rtps_strlcpy(char *dest, const char *src, size_t dest_size)
4151{
4152 /* Reserving the last character in case ws_utf8_truncate overwrites it */
4153 (void) g_strlcpy(dest, src, dest_size);
4154 ws_utf8_truncate(dest, strlen(dest));
4155}
4156
4157static int check_offset_addition(int offset, uint32_t value, proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb)
4158{
4159 int new_offset = offset + (int)value;
4160 if (new_offset < offset) {
4161 proto_tree_add_expert_format(tree, pinfo, &ei_rtps_value_too_large, tvb, 0, 0, "Offset value too large: %u", value);
4162 THROW(ReportedBoundsError)except_throw(1, (3), ((void*)0));
4163 }
4164 return new_offset;
4165}
4166
4167static void rtps_util_dissect_parameter_header(tvbuff_t * tvb, int * offset,
4168 const unsigned encoding, uint32_t * member_id, uint32_t * member_length)
4169{
4170 *member_id = tvb_get_uint16(tvb, *offset, encoding);
4171 *offset += 2;
4172 *member_length = tvb_get_uint16(tvb, *offset, encoding);
4173 *offset += 2;
4174
4175 if ((*member_id & PID_EXTENDED(0x3f01)) == PID_EXTENDED(0x3f01)) {
4176 /* get extended member id and length */
4177 *member_id = tvb_get_uint32(tvb, *offset, encoding);
4178 *offset += 4;
4179 *member_length = tvb_get_uint32(tvb, *offset, encoding);
4180 *offset += 4;
4181 }
4182}
4183
4184/**
4185 * @brief Dissect a crypto algorithm bitmask. If the length is 0, a default
4186 * value is used.
4187 */
4188static proto_item *dissect_crypto_algo_bitmask(proto_tree *parent_tree, tvbuff_t *tvb, unsigned *offset,
4189 uint32_t *algo_length, const int hf_hdr, const int ett, int * const *fields,
4190 const unsigned encoding, const char *algo_name, const int algo_default_value, const char *algo_default_value_string)
4191{
4192 proto_item *item = NULL((void*)0);
4193 if (*algo_length > 0) {
4194 item = proto_tree_add_bitmask(parent_tree, tvb, *offset, hf_hdr, ett, fields, encoding);
4195 *offset += 4;
4196 *algo_length -= 4;
4197 } else {
4198 item = proto_tree_add_string_format(parent_tree, hf_rtps_flag_security_supported,
4199 tvb, 0, 0, algo_name, "[%s (default value): 0x%08x, %s]",
4200 algo_name, algo_default_value, algo_default_value_string);
4201 }
4202 return item;
4203}
4204
4205static int dissect_crypto_algorithm_requirements(proto_tree *tree, tvbuff_t* tvb,
4206 int offset, uint32_t *algo_length, int encoding, int* const *flags,
4207 const int default_supported_mask, const char *default_supported_mask_string,
4208 const int default_required_mask, const char *default_required_mask_string)
4209{
4210
4211 dissect_crypto_algo_bitmask(tree, tvb, &offset, algo_length,
4212 hf_rtps_param_crypto_algorithm_requirements_trust_chain,
4213 ett_rtps_flags, flags, encoding, "Supported",
4214 default_supported_mask, default_supported_mask_string);
4215
4216 dissect_crypto_algo_bitmask(tree, tvb, &offset, algo_length,
4217 hf_rtps_param_crypto_algorithm_requirements_message_auth,
4218 ett_rtps_flags, flags, encoding, "Required",
4219 default_required_mask, default_required_mask_string);
4220
4221 return offset;
4222}
4223
4224static int dissect_mutable_member(proto_tree *tree , tvbuff_t * tvb, packet_info *pinfo, int offset, unsigned encoding, unsigned encoding_version,
4225 dissection_info * info, bool_Bool * is_end, bool_Bool show);
4226
4227static int get_native_type_cdr_length(uint64_t member_kind) {
4228 unsigned length = 0;
4229
4230 switch (member_kind) {
4231 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_BOOLEAN_TYPE: {
4232 length = 1;
4233 break;
4234 }
4235 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_CHAR_8_TYPE:
4236 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_BYTE_TYPE: {
4237 length = 1;
4238 break;
4239 }
4240 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_INT_16_TYPE: {
4241 length = 2;
4242 break;
4243 }
4244 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_UINT_16_TYPE: {
4245 length = 2;
4246 break;
4247 }
4248 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_ENUMERATION_TYPE:
4249 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_INT_32_TYPE: {
4250 length = 4;
4251 break;
4252 }
4253 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_UINT_32_TYPE: {
4254 length = 4;
4255 break;
4256 }
4257 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_INT_64_TYPE: {
4258 length = 8;
4259 break;
4260 }
4261 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_UINT_64_TYPE: {
4262 length = 8;
4263 break;
4264 }
4265 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_FLOAT_32_TYPE: {
4266 length = 4;
4267 break;
4268 }
4269 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_FLOAT_64_TYPE: {
4270 length = 8;
4271 break;
4272 }
4273 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_FLOAT_128_TYPE: {
4274 length = 16;
4275 break;
4276 }
4277 default: {
4278 /* XXX We should probably add expert info, but make sure our offset advances for now. */
4279 length = 1;
4280 break;
4281 }
4282 }
4283 return length;
4284}
4285
4286static int get_native_type_cdr_alignment(uint64_t member_kind, int encapsulation_version) {
4287 unsigned align = 0;
4288
4289 switch (member_kind) {
4290 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_BOOLEAN_TYPE: {
4291 align = 1;
4292 break;
4293 }
4294 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_CHAR_8_TYPE:
4295 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_BYTE_TYPE: {
4296 align = 1;
4297 break;
4298 }
4299 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_INT_16_TYPE: {
4300 align = 2;
4301 break;
4302 }
4303 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_UINT_16_TYPE: {
4304 align = 2;
4305 break;
4306 }
4307 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_ENUMERATION_TYPE:
4308 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_INT_32_TYPE: {
4309 align = 4;
4310 break;
4311 }
4312 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_UINT_32_TYPE: {
4313 align = 4;
4314 break;
4315 }
4316 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_INT_64_TYPE: {
4317 align = (encapsulation_version == 1) ? 8 : 4;
4318 break;
4319 }
4320 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_UINT_64_TYPE: {
4321 align = (encapsulation_version == 1) ? 8 : 4;
4322 break;
4323 }
4324 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_FLOAT_32_TYPE: {
4325 align = 4;
4326 break;
4327 }
4328 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_FLOAT_64_TYPE: {
4329 align = (encapsulation_version == 1) ? 8 : 4;
4330 break;
4331 }
4332 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_FLOAT_128_TYPE: {
4333 align = (encapsulation_version == 1) ? 8 : 4;
4334 break;
4335 }
4336 default: {
4337 align = 1;
4338 break;
4339 }
4340 }
4341 return align;
4342}
4343
4344static int get_encapsulation_endianness(int encapsulation_id)
4345{
4346 return (encapsulation_id == ENCAPSULATION_CDR_LE(0x0001) ||
4347 encapsulation_id == ENCAPSULATION_PL_CDR_LE(0x0003) ||
4348 encapsulation_id == ENCAPSULATION_CDR2_LE(0x0007) ||
4349 encapsulation_id == ENCAPSULATION_D_CDR2_LE(0x0009) ||
4350 encapsulation_id == ENCAPSULATION_PL_CDR2_LE(0x000b)) ? ENC_LITTLE_ENDIAN0x80000000 : ENC_BIG_ENDIAN0x00000000;
4351}
4352
4353static int get_encapsulation_version(int encapsulation_id)
4354{
4355 return (encapsulation_id == ENCAPSULATION_CDR2_LE(0x0007) ||
4356 encapsulation_id == ENCAPSULATION_D_CDR2_LE(0x0009) ||
4357 encapsulation_id == ENCAPSULATION_PL_CDR2_LE(0x000b)) ? 2 : 1;
4358}
4359
4360
4361static dissection_info* lookup_dissection_info_in_custom_and_builtin_types(uint64_t type_id) {
4362 dissection_info* info = NULL((void*)0);
4363 if (dissection_infos != NULL((void*)0)) {
4364 info = (dissection_info*)wmem_map_lookup(dissection_infos, &(type_id));
4365 if (info == NULL((void*)0) && builtin_dissection_infos != NULL((void*)0)) {
4366 info = (dissection_info*)wmem_map_lookup(builtin_dissection_infos, &(type_id));
4367 }
4368 }
4369 return info;
4370}
4371
4372/* this is a recursive function. _info may or may not be NULL depending on the use iteration */
4373// NOLINTNEXTLINE(misc-no-recursion)
4374static int dissect_user_defined(proto_tree *tree, tvbuff_t * tvb, packet_info *pinfo, int offset, unsigned encoding, unsigned encoding_version,
4375 dissection_info * _info, uint64_t type_id, char * name,
4376 RTICdrTypeObjectExtensibility extensibility, int offset_zero,
4377 uint16_t flags, uint32_t element_member_id, bool_Bool show) {
4378
4379 uint64_t member_kind;
4380 dissection_info * info = NULL((void*)0);
4381 uint32_t member_id;
4382 uint32_t member_length = 0;
4383
4384 if (_info) { /* first call enters here */
4385 info = _info;
4386 member_kind = info->member_kind;
4387 } else {
4388 info = lookup_dissection_info_in_custom_and_builtin_types(type_id);
4389 if (info != NULL((void*)0)) {
4390 member_kind = info->member_kind;
4391 } else {
4392 member_kind = type_id;
4393 }
4394 }
4395 if ((flags & MEMBER_OPTIONAL(2)) != 0) {
4396 int offset_before = offset;
4397 /* Parameter header is at minimum 4 bytes */
4398 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)
4399 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)
4400 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)
4401 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)
;
4402 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);
4403 if (info
4404 && (flags & MEMBER_OPTIONAL(2)) == MEMBER_OPTIONAL(2)
4405 && element_member_id != 0
4406 && member_id != element_member_id) {
4407 offset = offset_before;
4408 return offset;
4409 }
4410 if (member_length == 0) {
4411 return offset;
4412 }
4413 }
4414 if (extensibility == EXTENSIBILITY_MUTABLE) {
4415 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);
4416 offset_zero = offset;
4417 if ((member_id & PID_LIST_END(0x3f02)) == PID_LIST_END(0x3f02)){
4418 /* If this is the end of the list, don't add a tree.
4419 * If we add more logic here in the future, take into account that
4420 * offset is incremented by 4 */
4421 offset += 0;
4422 return offset;
4423 }
4424 if (member_length == 0){
4425 return offset;
4426 }
4427 }
4428 //proto_item_append_text(tree, "(Before Switch 0x%016" PRIx64 ")", type_id);
4429
4430 increment_dissection_depth(pinfo);
4431 switch (member_kind) {
4432 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_BOOLEAN_TYPE: {
4433 int length = get_native_type_cdr_length(member_kind);
4434 if (show) {
4435 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
)
;
4436 int16_t value = tvb_get_int8(tvb, offset);
4437 proto_tree_add_boolean_format(tree, hf_rtps_dissection_boolean, tvb, offset, length, value,
4438 "%s: %d", name, value);
4439 }
4440 offset += length;
4441 break;
4442 }
4443 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_CHAR_8_TYPE:
4444 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_BYTE_TYPE: {
4445 int length = get_native_type_cdr_length(member_kind);
4446 if (show) {
4447 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
)
;
4448 int16_t value = tvb_get_int8(tvb, offset);
4449 proto_tree_add_uint_format(tree, hf_rtps_dissection_byte, tvb, offset, length, value,
4450 "%s: %d", name, value);
4451 }
4452 offset += length;
4453 break;
4454 }
4455 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_INT_16_TYPE: {
4456 int length = get_native_type_cdr_length(member_kind);
4457 if (show) {
4458 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
)
;
4459 int16_t value = tvb_get_int16(tvb, offset, encoding);
4460 proto_tree_add_int_format(tree, hf_rtps_dissection_int16, tvb, offset, length, value,
4461 "%s: %d", name, value);
4462 }
4463 offset += length;
4464 break;
4465 }
4466 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_UINT_16_TYPE: {
4467 int length = get_native_type_cdr_length(member_kind);
4468 if (show) {
4469 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
)
;
4470 uint16_t value = tvb_get_uint16(tvb, offset, encoding);
4471 proto_tree_add_uint_format(tree, hf_rtps_dissection_uint16, tvb, offset, length, value,
4472 "%s: %u", name, value);
4473 }
4474 offset += length;
4475 break;
4476 }
4477 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_ENUMERATION_TYPE:
4478 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_INT_32_TYPE: {
4479 int length = get_native_type_cdr_length(member_kind);
4480 if (show) {
4481 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
)
;
4482 int value = tvb_get_int32(tvb, offset, encoding);
4483 proto_tree_add_int_format(tree, hf_rtps_dissection_int32, tvb, offset, length, value,
4484 "%s: %d", name, value);
4485 }
4486 offset += length;
4487 break;
4488 }
4489 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_UINT_32_TYPE: {
4490 int length = get_native_type_cdr_length(member_kind);
4491 if (show) {
4492 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
)
;
4493 unsigned value = tvb_get_uint32(tvb, offset, encoding);
4494 proto_tree_add_uint_format(tree, hf_rtps_dissection_uint32, tvb, offset, length, value,
4495 "%s: %u", name, value);
4496 }
4497 offset += length;
4498 break;
4499 }
4500 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_INT_64_TYPE: {
4501 int length = get_native_type_cdr_length(member_kind);
4502 if (show) {
4503 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
)
;
4504 int64_t value = tvb_get_int64(tvb, offset, encoding);
4505 proto_tree_add_int64_format(tree, hf_rtps_dissection_int64, tvb, offset, length, value,
4506 "%s: %"PRId64"l" "d", name, value);
4507 }
4508 offset += length;
4509 break;
4510 }
4511 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_UINT_64_TYPE: {
4512 int length = get_native_type_cdr_length(member_kind);
4513 if (show) {
4514 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
)
;
4515 uint64_t value = tvb_get_uint64(tvb, offset, encoding);
4516 proto_tree_add_uint64_format(tree, hf_rtps_dissection_uint64, tvb, offset, length, value,
4517 "%s: %"PRIu64"l" "u", name, value);
4518 }
4519 offset += length;
4520 break;
4521 }
4522 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_FLOAT_32_TYPE: {
4523 int length = get_native_type_cdr_length(member_kind);
4524 if (show) {
4525 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
)
;
4526 float value = tvb_get_ieee_float(tvb, offset, encoding);
4527 proto_tree_add_float_format(tree, hf_rtps_dissection_float, tvb, offset, length, value,
4528 "%s: %.6f", name, value);
4529 }
4530 offset += length;
4531 break;
4532 }
4533 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_FLOAT_64_TYPE: {
4534 int length = get_native_type_cdr_length(member_kind);
4535 if (show) {
4536 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
)
;
4537 double value = tvb_get_ieee_double(tvb, offset, encoding);
4538 proto_tree_add_double_format(tree, hf_rtps_dissection_double, tvb, offset, length, value,
4539 "%s: %.6f", name, value);
4540 }
4541 offset += length;
4542 break;
4543 }
4544 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_FLOAT_128_TYPE: {
4545 int length = get_native_type_cdr_length(member_kind);
4546 if (show) {
4547 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
)
;
4548 proto_tree_add_item(tree, hf_rtps_dissection_int128, tvb, offset, length, encoding);
4549 }
4550 offset += length;
4551 break;
4552 }
4553 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_ARRAY_TYPE: {
4554 unsigned i;
4555 unsigned num_elements;
4556 proto_tree * aux_tree = NULL((void*)0);
4557 int base_offset = offset;
4558 bool_Bool show_current_element = true1;
4559 int array_kind_length = 0;
4560 unsigned bound = 0;
4561 int first_skipped_element_offset = 0;
4562
4563 if (info != NULL((void*)0)) {
4564 bound = (unsigned)info->bound;
4565
4566 /* In case this array is not shown and is a native type. We get the sze length for calculating
4567 * the whole array length */
4568 array_kind_length = get_native_type_cdr_length(info->base_type_id);
4569 }
4570 /* Do not add any information to the tree if it is not shown */
4571 if (show) {
4572 aux_tree = proto_tree_add_subtree(tree, tvb, offset, -1, ett_rtps_dissection_tree,
4573 NULL((void*)0), name);
4574 } else if (array_kind_length != -1) {
4575 /* Total length of the array. Nothing else to do here. */
4576 offset += bound * array_kind_length;
4577 break;
4578 }
4579
4580 /* Get the maximum number of elements to be shown */
4581 num_elements = (enable_max_array_data_type_elements)
4582 ? MIN(bound, rtps_max_array_data_type_elements)(((bound) < (rtps_max_array_data_type_elements)) ? (bound)
: (rtps_max_array_data_type_elements))
4583 : bound;
4584 for (i = 0; i < bound; i++) {
4585 char temp_buff[MAX_MEMBER_NAME(256)];
4586
4587 if (show && i < num_elements) {
4588 /* No need to copy if it will not be shown */
4589 snprintf(temp_buff, MAX_MEMBER_NAME(256), "%s[%u]", name, i);
4590 show_current_element = true1;
4591 } else {
4592 if (show_current_element) {
4593 show_current_element = false0;
4594 /* Updated only once */
4595 first_skipped_element_offset = offset;
4596 }
4597 /* If this array has elements that won't be shown and is an array of native type
4598 * we can calculate the total offset and break the loop */
4599 if (array_kind_length != -1) {
4600 offset += (bound - i) * array_kind_length;
4601 break;
4602 }
4603 }
4604 offset = dissect_user_defined(aux_tree, tvb, pinfo, offset, encoding, encoding_version, NULL((void*)0),
4605 info->base_type_id, temp_buff, EXTENSIBILITY_INVALID, offset_zero, 0, 0, show_current_element);
4606 }
4607
4608 /* If reached the limit and there are remaining elements we need to show the message and
4609 * assign the length of the ramining elements to this */
4610 if (enable_max_array_data_type_elements && show && !show_current_element) {
4611 proto_tree_add_subtree_format(
4612 aux_tree,
4613 tvb,
4614 /* Start at the first item not shown */
4615 first_skipped_element_offset,
4616 offset - first_skipped_element_offset,
4617 ett_rtps_info_remaining_items,
4618 NULL((void*)0),
4619 DISSECTION_INFO_REMAINING_ELEMENTS_STR_d"... %d items(s) remaining. The number of items shown is configurable through RTPS properties under Preferences/Protocols.",
4620 bound - num_elements);
4621 }
4622 proto_item_set_len(aux_tree, offset - base_offset);
4623 break;
4624 }
4625 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_SEQUENCE_TYPE: {
4626 unsigned i;
4627 unsigned num_elements;
4628 proto_tree * aux_tree = NULL((void*)0);
4629 int base_offset = offset;
4630 bool_Bool show_current_element = true1;
4631 int length = 4;
4632 int sequence_kind_length = 0;
4633 int first_skipped_element_offset = 0;
4634
4635 ALIGN_ZERO(offset, length, offset_zero)(offset -= offset_zero, offset = (((offset) + ((length) - 1))
& ~((length) - 1)), offset += offset_zero)
;
4636 unsigned seq_size = tvb_get_uint32(tvb, offset, encoding);
4637
4638 /* In case this sequence is not shown and is a native type. We get the sze length for calculating
4639 * the whole seuqnece length */
4640 if (info != NULL((void*)0)) {
4641 sequence_kind_length = get_native_type_cdr_length(info->base_type_id);
4642 }
4643 if (show) {
4644 aux_tree = proto_tree_add_subtree_format(tree, tvb, offset, -1, ett_rtps_dissection_tree,
4645 NULL((void*)0), "%s (%u elements)", name, seq_size);
4646 /* If it is a native type we can calculate the sequence length and finish. */
4647 } else if (sequence_kind_length != -1) {
4648 /* Number of elements integer size + number of elements * size of the native type */
4649 offset += 4 + seq_size * sequence_kind_length;
4650 break;
4651 }
4652 offset += 4;
4653
4654 num_elements = (enable_max_array_data_type_elements)
4655 ? 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))
4656 : seq_size;
4657 for (i = 0; i < seq_size; i++) {
4658 char temp_buff[MAX_MEMBER_NAME(256)];
4659 if (show && i < num_elements) {
4660 /* No need to copy if it will not be shown */
4661 snprintf(temp_buff, MAX_MEMBER_NAME(256), "%s[%u]", name, i);
4662 show_current_element = true1;
4663 } else {
4664 if (show_current_element) {
4665 show_current_element = false0;
4666 /* Updated only once */
4667 first_skipped_element_offset = offset;
4668 }
4669 /* If this array has elements that won't be shown and is an array of native type
4670 * we can calculate the total offset and break the loop */
4671 if (sequence_kind_length != -1) {
4672 offset += (seq_size - i) * sequence_kind_length;
4673 break;
4674 }
4675 }
4676 if (info != NULL((void*)0) && info->base_type_id > 0)
4677 offset = dissect_user_defined(aux_tree, tvb, pinfo, offset, encoding, encoding_version, NULL((void*)0),
4678 info->base_type_id, temp_buff, EXTENSIBILITY_INVALID, offset_zero, 0, 0, show_current_element);
4679 }
4680 /* If reached the limit and there are remaining elements we need to show the message and
4681 * assign the length of the ramining elements to this */
4682 if (enable_max_array_data_type_elements && show && !show_current_element) {
4683 proto_tree_add_subtree_format(
4684 aux_tree,
4685 tvb,
4686 /* Start at the first item not shown */
4687 first_skipped_element_offset,
4688 offset - first_skipped_element_offset,
4689 ett_rtps_info_remaining_items,
4690 NULL((void*)0),
4691 DISSECTION_INFO_REMAINING_ELEMENTS_STR_d"... %d items(s) remaining. The number of items shown is configurable through RTPS properties under Preferences/Protocols.",
4692 seq_size - num_elements);
4693 }
4694 proto_item_set_len(aux_tree, offset - base_offset);
4695 break;
4696 }
4697 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_STRING_TYPE: {
4698 char * string_value = NULL((void*)0);
4699 int length = 4;
4700
4701 ALIGN_ZERO(offset, length, offset_zero)(offset -= offset_zero, offset = (((offset) + ((length) - 1))
& ~((length) - 1)), offset += offset_zero)
;
4702 unsigned string_size = tvb_get_uint32(tvb, offset, encoding);
4703 offset += 4;
4704 //proto_item_append_text(tree, "(String length: %u)", string_size);
4705 if (show) {
4706 string_value = tvb_get_string_enc(pinfo->pool, tvb, offset, string_size, ENC_ASCII0x00000000);
4707 proto_tree_add_string_format(tree, hf_rtps_dissection_string, tvb, offset, string_size,
4708 string_value, "%s: %s", name, string_value);
4709 }
4710 offset += string_size;
4711 break;
4712 }
4713 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_ALIAS_TYPE: {
4714 uint64_t base_type_id = 0;
4715 if (info != NULL((void*)0)) {
4716 base_type_id = info->base_type_id;
4717 }
4718 offset = dissect_user_defined(tree, tvb, pinfo, offset, encoding, encoding_version, NULL((void*)0),
4719 base_type_id, name, EXTENSIBILITY_INVALID, offset_zero, 0, 0, show);
4720 break;
4721 }
4722 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_UNION_TYPE: {
4723 uint64_t key = type_id - 1;
4724 union_member_mapping * result = (union_member_mapping *)wmem_map_lookup(union_member_mappings, &(key));
4725
4726 if (result != NULL((void*)0)) {
4727 int value = tvb_get_int32(tvb, offset, encoding);
4728 offset += 4;
4729 key = type_id + value;
4730 result = (union_member_mapping *)wmem_map_lookup(union_member_mappings, &(key));
4731 if (result != NULL((void*)0)) {
4732 if (show) {
4733 proto_item_append_text(tree, " (discriminator = %d, type_id = 0x%016" PRIx64"l" "x" ")",
4734 value, result->member_type_id);
4735 }
4736 offset = dissect_user_defined(tree, tvb, pinfo, offset, encoding, encoding_version, NULL((void*)0),
4737 result->member_type_id, result->member_name, EXTENSIBILITY_INVALID, offset, 0, 0, show);
4738 } else {
4739 /* the hashmap uses the type_id to index the objects. subtracting -2 here to lookup the discriminator
4740 related to the type_id that identifies an union */
4741 key = type_id + HASHMAP_DISCRIMINATOR_CONSTANT(-2);
4742 result = (union_member_mapping *)wmem_map_lookup(union_member_mappings, &(key));
4743 if (result != NULL((void*)0)) {
4744 if (show) {
4745 proto_item_append_text(tree, " (discriminator = %d, type_id = 0x%016" PRIx64"l" "x" ")",
4746 value, result->member_type_id);
4747 }
4748 offset = dissect_user_defined(tree, tvb, pinfo, offset, encoding, encoding_version, NULL((void*)0),
4749 result->member_type_id, result->member_name, EXTENSIBILITY_INVALID, offset, 0, 0, show);
4750 }
4751 }
4752 } else {
4753 if (show) {
4754 proto_item_append_text(tree, "(NULL 0x%016" PRIx64"l" "x" ")", type_id);
4755 }
4756 }
4757 break;
4758 }
4759 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_STRUCTURE_TYPE: {
4760 unsigned i;
4761 proto_tree * aux_tree = NULL((void*)0);
4762 unsigned shown_elements = 0;
4763 bool_Bool show_current_element = true1;
4764 unsigned num_elements = 0;
4765 int first_skipped_element_offset = 0;
4766
4767 if (info != NULL((void*)0)) {
4768 if (show) {
4769 aux_tree = proto_tree_add_subtree(tree, tvb, offset, -1, ett_rtps_dissection_tree,
4770 NULL((void*)0), name);
4771 }
4772 if (info->extensibility == EXTENSIBILITY_MUTABLE) {
4773 bool_Bool is_end = false0;
4774 /* Don't know beforehand the number of elements. Need to count them */
4775 while (!is_end) {
4776 if (!(show && shown_elements < rtps_max_data_type_elements) && show_current_element) {
4777 show_current_element = false0;
4778 /* Updated only once */
4779 first_skipped_element_offset = offset;
4780 }
4781 offset = dissect_mutable_member(aux_tree, tvb, pinfo, offset, encoding, encoding_version, info, &is_end, show_current_element);
4782 ++num_elements;
4783 if (show_current_element) {
4784 ++shown_elements;
4785 }
4786 }
4787 }
4788 else {
4789 if (info->base_type_id > 0) {
4790 if (show) {
4791 proto_item_append_text(tree, "(BaseId: 0x%016" PRIx64"l" "x" ")", info->base_type_id);
4792 }
4793 offset = dissect_user_defined(aux_tree, tvb, pinfo, offset, encoding, encoding_version, NULL((void*)0),
4794 info->base_type_id, info->member_name, EXTENSIBILITY_INVALID,
4795 offset, 0, 0, show);
4796 }
4797
4798 /* Get the maximum number of elements to be shown depending if enable_max_data_type_elements is enabled */
4799 shown_elements = (enable_max_data_type_elements)
4800 ? 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))
4801 : info->num_elements;
4802 for (i = 0; i < info->num_elements; i++) {
4803 if (info->elements[i].type_id > 0) {
4804 /* A member is shown if the parent cluster is shown and the position is in the
4805 * range of maximum number of elements shown */
4806 if (!(show && i < shown_elements) && show_current_element) {
4807 show_current_element = false0;
4808 /* Updated only once */
4809 first_skipped_element_offset = offset;
4810 }
4811 /* If a member is not shown all it children will inherit the "show_current_element" value */
4812 offset = dissect_user_defined(aux_tree, tvb, pinfo, offset, encoding, encoding_version, NULL((void*)0),
4813 info->elements[i].type_id, info->elements[i].member_name, info->extensibility,
4814 offset_zero, info->elements[i].flags, info->elements[i].member_id, show_current_element);
4815 }
4816 }
4817 num_elements = info->num_elements;
4818 }
4819 /* If reached the limit and there are remaining elements we need to show the message and
4820 * assign the length of the ramining elements to this */
4821 if (enable_max_array_data_type_elements && show && !show_current_element) {
4822 proto_tree_add_subtree_format(
4823 aux_tree,
4824 tvb,
4825 first_skipped_element_offset,
4826 offset - first_skipped_element_offset,
4827 ett_rtps_info_remaining_items,
4828 NULL((void*)0),
4829 DISSECTION_INFO_REMAINING_ELEMENTS_STR_d"... %d items(s) remaining. The number of items shown is configurable through RTPS properties under Preferences/Protocols.",
4830 num_elements - shown_elements);
4831 }
4832 }
4833 break;
4834 }
4835 default:{
4836 /* undefined behavior. this should not happen. the following line helps to debug if it happened */
4837 if (show) {
4838 proto_item_append_text(tree, "(unknown 0x%016" PRIx64"l" "x" ")", member_kind);
4839 }
4840 break;
4841 }
4842 }
4843 decrement_dissection_depth(pinfo);
4844
4845 if (extensibility == EXTENSIBILITY_MUTABLE) {
4846 offset_zero += member_length;
4847 return offset_zero;
4848 } else {
4849 return offset;
4850 }
4851}
4852
4853// NOLINTNEXTLINE(misc-no-recursion)
4854static int dissect_mutable_member(proto_tree *tree , tvbuff_t * tvb, packet_info *pinfo, int offset, unsigned encoding, unsigned encoding_version,
4855 dissection_info * info, bool_Bool * is_end, bool_Bool show) {
4856
4857 proto_tree * member;
4858 uint32_t member_id, member_length;
4859 mutable_member_mapping * mapping;
4860 int64_t key;
4861
4862 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);
4863 if ((member_id & PID_LIST_END(0x3f02)) == PID_LIST_END(0x3f02)){
4864 /* If this is the end of the list, don't add a tree.
4865 * If we add more logic here in the future, take into account that
4866 * offset is incremented by 4 */
4867 offset += 0;
4868 *is_end = true1;
4869 return offset;
4870 }
4871 if (member_length == 0){
4872 return offset;
4873 }
4874 member = proto_tree_add_subtree_format(tree, tvb, offset, member_length, ett_rtps_dissection_tree,
4875 NULL((void*)0), "ID: %d, Length: %d", member_id, member_length);
4876
4877 {
4878 if (info->base_type_id > 0) {
4879 key = (info->base_type_id + info->base_type_id * member_id);
4880 mapping = (mutable_member_mapping *) wmem_map_lookup(mutable_member_mappings, &(key));
4881 if (mapping) { /* the library knows how to dissect this */
4882 proto_item_append_text(member, "(base found 0x%016" PRIx64"l" "x" ")", key);
4883 dissect_user_defined(tree, tvb, pinfo, offset, encoding, encoding_version, NULL((void*)0), mapping->member_type_id,
4884 mapping->member_name, EXTENSIBILITY_INVALID, offset, 0, mapping->member_id, show);
4885 proto_item_set_hidden(member);
4886 return check_offset_addition(offset, member_length, tree, NULL((void*)0), tvb);
4887 } else
4888 proto_item_append_text(member, "(base not found 0x%016" PRIx64"l" "x" " from 0x%016" PRIx64"l" "x" ")",
4889 key, info->base_type_id);
4890 }
4891 }
4892
4893 key = (info->type_id + info->type_id * member_id);
4894 mapping = (mutable_member_mapping *) wmem_map_lookup(mutable_member_mappings, &(key));
4895 if (mapping) { /* the library knows how to dissect this */
4896 proto_item_append_text(member, "(found 0x%016" PRIx64"l" "x" ")", key);
4897 dissect_user_defined(tree, tvb, pinfo, offset, encoding, encoding_version, NULL((void*)0), mapping->member_type_id,
4898 mapping->member_name, EXTENSIBILITY_INVALID, offset, 0, mapping->member_id, show);
4899
4900 } else
4901 proto_item_append_text(member, "(not found 0x%016" PRIx64"l" "x" " from 0x%016" PRIx64"l" "x" ")",
4902 key, info->type_id);
4903 proto_item_set_hidden(member);
4904 return check_offset_addition(offset, member_length, tree, NULL((void*)0), tvb);
4905}
4906
4907
4908/* *********************************************************************** */
4909/* Appends extra formatting for those submessages that have a status info
4910 */
4911static void generate_status_info(packet_info *pinfo,
4912 uint32_t writer_id,
4913 uint32_t status_info) {
4914
4915 /* Defines the extra information associated to the writer involved in
4916 * this communication
4917 *
4918 * Format: [?Ptwrpm]\(u?d?\)
4919 *
4920 * First letter table:
4921 *
4922 * writerEntityId value | Letter
4923 * ----------------------------------------------------------+--------
4924 * ENTITYID_UNKNOWN | ?
4925 * ENTITYID_PARTICIPANT | P
4926 * ENTITYID_SEDP_BUILTIN_TOPIC_WRITER | t
4927 * ENTITYID_SEDP_BUILTIN_PUBLICATIONS_WRITER | w
4928 * ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_WRITER | r
4929 * ENTITYID_SPDP_BUILTIN_PARTICIPANT_WRITER | p
4930 * ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_WRITER | m
4931 * ENTITYID_P2P_BUILTIN_PARTICIPANT_STATELESS_WRITER | s
4932 * ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_WRITER | V
4933 * ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_SECURE_WRITER | M
4934 * ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_WRITER | W
4935 * ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_WRITER | R
4936 * ENTITYID_RTI_BUILTIN_PARTICIPANT_BOOTSTRAP_WRITER | Pc
4937 * ENTITYID_RTI_BUILTIN_PARTICIPANT_BOOTSTRAP_READER | Pc
4938 * ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_WRITER | Pb
4939 * ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_READER | Pb
4940 * ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_WRITER | sPc
4941 * ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_READER | sPc
4942
4943
4944 * The letter is followed by:
4945 * status_info &1 | status_info & 2 | Text
4946 * ---------------+-----------------------+--------------
4947 * status_info not defined in inlineQos | [?]
4948 * 0 | 0 | [__]
4949 * 0 | 1 | [u_]
4950 * 1 | 0 | [_d]
4951 * 1 | 1 | [ud]
4952 */
4953 /* 0123456 */
4954 char * writerId = NULL((void*)0);
4955 char * disposeFlag = NULL((void*)0);
4956 char * unregisterFlag = NULL((void*)0);
4957
4958 wmem_strbuf_t *buffer = wmem_strbuf_create(pinfo->pool)wmem_strbuf_new(pinfo->pool, "");
4959 submessage_col_info* current_submessage_col_info = NULL((void*)0);
4960
4961 current_submessage_col_info = (submessage_col_info*)p_get_proto_data(pinfo->pool, pinfo, proto_rtps, RTPS_CURRENT_SUBMESSAGE_COL_DATA_KEY3);
4962 switch(writer_id) {
4963 case ENTITYID_PARTICIPANT(0x000001c1):
4964 case ENTITYID_SPDP_RELIABLE_BUILTIN_PARTICIPANT_SECURE_WRITER(0xff0101c2):
4965 writerId = "P";
4966 break;
4967 case ENTITYID_BUILTIN_TOPIC_WRITER(0x000002c2):
4968 writerId = "t";
4969 break;
4970 case ENTITYID_BUILTIN_PUBLICATIONS_WRITER(0x000003c2):
4971 writerId = "w";
4972 break;
4973 case ENTITYID_BUILTIN_SUBSCRIPTIONS_WRITER(0x000004c2):
4974 writerId = "r";
4975 break;
4976 case ENTITYID_BUILTIN_PARTICIPANT_WRITER(0x000100c2):
4977 writerId = "p";
4978 break;
4979 case ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_WRITER(0x000200c2):
4980 writerId = "m";
4981 break;
4982 case ENTITYID_P2P_BUILTIN_PARTICIPANT_STATELESS_WRITER(0x000201c3):
4983 writerId = "s";
4984 break;
4985 case ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_WRITER(0xff0202c3):
4986 writerId = "V";
4987 break;
4988 case ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_SECURE_WRITER(0xff0200c2):
4989 writerId = "M";
4990 break;
4991 case ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_WRITER(0xff0003c2):
4992 writerId = "W";
4993 break;
4994 case ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_WRITER(0xff0004c2):
4995 writerId = "R";
4996 break;
4997 case ENTITYID_RTI_BUILTIN_PARTICIPANT_BOOTSTRAP_WRITER(0x00010082):
4998 case ENTITYID_RTI_BUILTIN_PARTICIPANT_BOOTSTRAP_READER(0x00010087):
4999 writerId = "Pb";
5000 break;
5001 case ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_WRITER(0x00010182):
5002 case ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_READER(0x00010187):
5003 writerId = "Pc";
5004 break;
5005 case ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_WRITER(0xff010182):
5006 case ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_READER(0xff010187):
5007 writerId = "sPc";
5008 break;
5009 case ENTITYID_TL_SVC_REQ_WRITER(0x000300c3):
5010 case ENTITYID_TL_SVC_REQ_READER(0x000300c4):
5011 writerId = "trq";
5012 break;
5013 case ENTITYID_TL_SVC_REPLY_WRITER(0x000301c3):
5014 case ENTITYID_TL_SVC_REPLY_READER(0x000301c4):
5015 writerId = "trp";
5016 break;
5017 case ENTITYID_RTI_BUILTIN_SERVICE_REQUEST_WRITER(0x00020082):
5018 case ENTITYID_RTI_BUILTIN_SERVICE_REQUEST_READER(0x00020087): {
5019 /* This is added to proto_rtps in rtps_util_add_rti_service_request* */
5020 uint32_t* service_id = (uint32_t*)p_get_proto_data(pinfo->pool, pinfo, proto_rtps, RTPS_SERVICE_REQUEST_ID_PROTODATA_KEY1);
5021 if (service_id != NULL((void*)0) && *service_id == RTI_SERVICE_REQUEST_ID_TOPIC_QUERY1) {
5022 writerId = "tq";
5023 }
5024 break;
5025 }
5026 default:
5027 /* Unknown writer ID, don't format anything */
5028 break;
5029 }
5030
5031 switch(status_info) {
5032 case 0: unregisterFlag = "_"; disposeFlag = "_"; break;
5033 case 1: unregisterFlag = "_"; disposeFlag = "D"; break;
5034 case 2: unregisterFlag = "U"; disposeFlag = "_"; break;
5035 case 3: unregisterFlag = "U"; disposeFlag = "D"; break;
5036 default: /* Unknown status info, omit it */
5037 break;
5038 }
5039
5040 if (writerId != NULL((void*)0) || unregisterFlag != NULL((void*)0) ||
5041 disposeFlag != NULL((void*)0) ) {
5042 wmem_strbuf_append(buffer, "(");
5043 if (writerId != NULL((void*)0)) {
5044 wmem_strbuf_append(buffer, writerId);
5045 }
5046 if (unregisterFlag != NULL((void*)0) || disposeFlag != NULL((void*)0)) {
5047 wmem_strbuf_append(buffer, "[");
5048 wmem_strbuf_append(buffer, unregisterFlag);
5049 wmem_strbuf_append(buffer, disposeFlag);
5050 wmem_strbuf_append(buffer, "]");
5051 }
5052 wmem_strbuf_append(buffer, ")");
5053 current_submessage_col_info->status_info = wmem_strbuf_get_str(buffer);
5054 }
5055}
5056
5057/* *********************************************************************** */
5058
5059/*
5060 * Coherent set starts if seqNumber == writerSeqNumber
5061 *
5062 * Coherent sets end in three different ways:
5063 * - A new coherence set starts with the consecutive writerSeqNumber of the last coherent set packet.
5064 * -seqNumber == RTPS_SEQUENCENUMBER_UNKNOWN
5065 * - A DATA packet sent with the consecutive writerSeqNumber of the last coherent set packet.
5066 * - PID_END_COHERENT_SET received. That condition is not handled here. Check PID_END_COHERENT_SET dissection.
5067 * 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_kind
5068 */
5069static void rtps_util_add_coherent_set_general_cases_case(
5070 proto_tree *tree,
5071 tvbuff_t *tvb,
5072 uint64_t coherent_seq_number,
5073 coherent_set_entity_info *coherent_set_entity_info_object) {
5074
5075 coherent_set_entity_info *register_entry;
5076 proto_tree *marked_item_tree;
5077 coherent_set_info *coherent_set_info_entry;
5078 coherent_set_key coherent_set_info_key;
5079
5080 coherent_set_entity_info_object->coherent_set_seq_number = coherent_seq_number;
5081 register_entry = (coherent_set_entity_info*)wmem_map_lookup(coherent_set_tracking.entities_using_map,
5082 &coherent_set_entity_info_object->guid);
5083 if (!register_entry) {
5084 register_entry = (coherent_set_entity_info*)wmem_memdup(wmem_file_scope(), coherent_set_entity_info_object, sizeof(coherent_set_entity_info));
5085 wmem_map_insert(
5086 coherent_set_tracking.entities_using_map,
5087 &register_entry->guid,
5088 register_entry);
5089 }
5090
5091 /* The hash and compare functions treat the key as a sequence of bytes */
5092 memset(&coherent_set_info_key, 0, sizeof(coherent_set_info_key));
5093 coherent_set_info_key.guid = coherent_set_entity_info_object->guid;
5094 coherent_set_info_key.coherent_set_seq_number = coherent_seq_number;
5095 coherent_set_info_entry = (coherent_set_info*)wmem_map_lookup(coherent_set_tracking.coherent_set_registry_map,
5096 &coherent_set_info_key);
5097 if (!coherent_set_info_entry) {
5098 coherent_set_info_entry = wmem_new0(wmem_file_scope(), coherent_set_info)((coherent_set_info*)wmem_alloc0((wmem_file_scope()), sizeof(
coherent_set_info)))
;
5099 coherent_set_info_entry->key = (coherent_set_key*)wmem_memdup(wmem_file_scope(), &coherent_set_info_key, sizeof(coherent_set_key));
5100 coherent_set_info_entry->is_set = false0;
5101 wmem_map_insert(
5102 coherent_set_tracking.coherent_set_registry_map,
5103 coherent_set_info_entry->key,
5104 coherent_set_info_entry);
5105 }
5106
5107 if (coherent_set_info_entry->writer_seq_number < coherent_set_entity_info_object->writer_seq_number) {
5108 coherent_set_info_entry->writer_seq_number = coherent_set_entity_info_object->writer_seq_number;
5109 }
5110 /* Start */
5111 if (coherent_set_entity_info_object->coherent_set_seq_number == coherent_set_entity_info_object->writer_seq_number) {
5112 marked_item_tree = proto_tree_add_uint64(tree, hf_rtps_coherent_set_start,
5113 tvb, 0, 0, coherent_seq_number);
5114 proto_item_set_generated(marked_item_tree);
5115
5116 /* End case: Start of a new coherent set */
5117 if (coherent_set_entity_info_object->coherent_set_seq_number > register_entry->coherent_set_seq_number &&
5118 coherent_set_entity_info_object->writer_seq_number - 1 == register_entry->writer_seq_number) {
5119 coherent_set_info *previous_entry;
5120
5121 marked_item_tree = proto_tree_add_uint64(tree, hf_rtps_coherent_set_end,
5122 tvb, 0, 0, register_entry->coherent_set_seq_number);
5123 proto_item_set_generated(marked_item_tree);
5124 coherent_set_info_key.coherent_set_seq_number = register_entry->writer_seq_number;
5125 coherent_set_info_key.guid = register_entry->guid;
5126 previous_entry = (coherent_set_info*)wmem_map_lookup(coherent_set_tracking.coherent_set_registry_map, &coherent_set_info_key);
5127 if (previous_entry) {
5128 previous_entry->is_set = true1;
5129 }
5130 }
5131 }
5132
5133 if (!coherent_set_info_entry->is_set) {
5134
5135 coherent_set_info_key.coherent_set_seq_number = coherent_seq_number - 1;
5136
5137 /* End case: Sequence unknown received */
5138
5139 if (coherent_set_entity_info_object->coherent_set_seq_number == RTPS_SEQUENCENUMBER_UNKNOWN0xffffffff00000000) {
5140 register_entry->coherent_set_seq_number = coherent_set_entity_info_object->coherent_set_seq_number;
5141 marked_item_tree = proto_tree_add_uint64(tree, hf_rtps_coherent_set_end,
5142 tvb, 0, 0, coherent_set_info_entry->key->coherent_set_seq_number);
5143 proto_item_set_generated(marked_item_tree);
5144 coherent_set_info_entry->is_set = true1;
5145 }
5146 } else if (coherent_set_info_entry->writer_seq_number == coherent_set_entity_info_object->writer_seq_number) {
5147 proto_tree *ti;
5148
5149 ti = proto_tree_add_uint64(tree, hf_rtps_coherent_set_end,
5150 tvb, 0, 0, coherent_set_info_entry->key->coherent_set_seq_number);
5151 proto_item_set_generated(ti);
5152 }
5153 /* Update the entity */
5154 coherent_set_entity_info_object->expected_coherent_set_end_writers_seq_number = coherent_set_entity_info_object->writer_seq_number + 1;
5155 *register_entry = *coherent_set_entity_info_object;
5156}
5157
5158/*
5159 * Handles the coherent set termination case where the coherent set finishes by sending a DATA or DATA_FRAG with no parameters.
5160 * For the other cases, check rtps_util_add_coherent_set_general_cases_case.
5161 * this function must be called at the end of dissect_RTPS_DATA and dissect_RTPS_DATA_FRAG_kind
5162 */
5163static void rtps_util_detect_coherent_set_end_empty_data_case(
5164
5165 coherent_set_entity_info *coherent_set_entity_info_object) {
5166 coherent_set_entity_info *coherent_set_entry = NULL((void*)0);
5167
5168 coherent_set_entry = (coherent_set_entity_info*) wmem_map_lookup(coherent_set_tracking.entities_using_map, &coherent_set_entity_info_object->guid);
5169 if (coherent_set_entry) {
5170 coherent_set_info *coherent_set_info_entry;
5171 coherent_set_key key;
5172
5173 /* The hash and compare functions treat the key as a sequence of bytes. */
5174 memset(&key, 0, sizeof(key));
5175 key.guid = coherent_set_entity_info_object->guid;
5176 key.coherent_set_seq_number = coherent_set_entry->coherent_set_seq_number;
5177
5178 coherent_set_info_entry = (coherent_set_info*)wmem_map_lookup(coherent_set_tracking.coherent_set_registry_map, &key);
5179 if (coherent_set_info_entry
5180 && (coherent_set_entry->expected_coherent_set_end_writers_seq_number == coherent_set_entity_info_object->writer_seq_number)
5181 && !coherent_set_info_entry->is_set) {
5182 coherent_set_info_entry->is_set = true1;
5183 coherent_set_info_entry->writer_seq_number = coherent_set_entry->expected_coherent_set_end_writers_seq_number - 1;
5184 }
5185 }
5186}
5187
5188static uint16_t rtps_util_add_protocol_version(proto_tree *tree, /* Can NOT be NULL */
5189 tvbuff_t *tvb,
5190 int offset) {
5191 proto_item *ti;
5192 proto_tree *version_tree;
5193 uint16_t version;
5194
5195 version = tvb_get_ntohs(tvb, offset);
5196
5197 ti = proto_tree_add_uint_format(tree, hf_rtps_protocol_version, tvb, offset, 2,
5198 version, "Protocol version: %d.%d",
5199 tvb_get_uint8(tvb, offset), tvb_get_uint8(tvb, offset+1));
5200 version_tree = proto_item_add_subtree(ti, ett_rtps_proto_version);
5201
5202 proto_tree_add_item(version_tree, hf_rtps_protocol_version_major, tvb, offset, 1, ENC_NA0x00000000);
5203 proto_tree_add_item(version_tree, hf_rtps_protocol_version_minor, tvb, offset+1, 1, ENC_NA0x00000000);
5204
5205 return version;
5206}
5207
5208
5209/* ------------------------------------------------------------------------- */
5210/* Interpret the next bytes as vendor ID. If proto_tree and field ID is
5211 * provided, it can also set.
5212 */
5213static uint16_t rtps_util_add_vendor_id(proto_tree *tree,
5214 tvbuff_t *tvb,
5215 int offset) {
5216 uint8_t major, minor;
5217 uint16_t vendor_id;
5218
5219 major = tvb_get_uint8(tvb, offset);
5220 minor = tvb_get_uint8(tvb, offset+1);
5221 vendor_id = tvb_get_ntohs(tvb, offset);
5222
5223 proto_tree_add_uint_format_value(tree, hf_rtps_vendor_id, tvb, offset, 2, vendor_id,
5224 "%02d.%02d (%s)", major, minor,
5225 val_to_str_const(vendor_id, vendor_vals, "Unknown"));
5226
5227 return vendor_id;
5228}
5229
5230
5231
5232/* ------------------------------------------------------------------------- */
5233/* Insert in the protocol tree the next 8 bytes interpreted as Locator_t
5234 *
5235 * Locator_t is a struct defined as:
5236 * struct {
5237 * long kind; // kind of locator
5238 * unsigned long port;
5239 * octet[16] address;
5240 * } Locator_t;
5241 */
5242static int rtps_util_add_locator_t(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, int offset,
5243 const unsigned encoding, const char *label) {
5244
5245 proto_tree *ti;
5246 proto_tree *locator_tree;
5247 uint32_t kind;
5248 uint32_t port;
5249 const int parameter_size = 24;
5250
5251 locator_tree = proto_tree_add_subtree(tree, tvb, offset, parameter_size, ett_rtps_locator,
5252 NULL((void*)0), label);
5253
5254 proto_tree_add_item_ret_uint(locator_tree, hf_rtps_locator_kind, tvb, offset, 4, encoding, &kind);
5255 switch (kind) {
5256 case LOCATOR_KIND_UDPV4(1):
5257 case LOCATOR_KIND_TUDPV4(0x01001001): {
5258 ti = proto_tree_add_item_ret_uint(
5259 locator_tree,
5260 hf_rtps_locator_port,
5261 tvb,
5262 offset + 4,
5263 4,
5264 encoding,
5265 &port);
5266
5267 if (port == 0)
5268 expert_add_info(pinfo, ti, &ei_rtps_locator_port);
5269 proto_item_append_text(tree, " (%s, %s:%u)",
5270 val_to_str(pinfo->pool, kind, rtps_locator_kind_vals, "%02x"),
5271 tvb_ip_to_str(pinfo->pool, tvb, offset + 20)tvb_address_to_str(pinfo->pool, tvb, AT_IPv4, offset + 20), port);
5272 proto_tree_add_item(locator_tree, hf_rtps_locator_ipv4, tvb, offset + 20, 4, ENC_BIG_ENDIAN0x00000000);
5273 break;
5274 }
5275 case LOCATOR_KIND_TCPV4_LAN(8):
5276 case LOCATOR_KIND_TCPV4_WAN(9):
5277 case LOCATOR_KIND_TLSV4_LAN(10):
5278 case LOCATOR_KIND_TLSV4_WAN(11): {
5279 uint16_t ip_kind;
5280 ti = proto_tree_add_item_ret_uint(
5281 locator_tree,
5282 hf_rtps_locator_port,
5283 tvb,
5284 offset + 4,
5285 4,
5286 encoding,
5287 &port);
5288 if (port == 0)
5289 expert_add_info(pinfo, ti, &ei_rtps_locator_port);
5290 ip_kind = tvb_get_uint16(tvb, offset+16, encoding);
5291 if (ip_kind == 0xFFFF) { /* IPv4 format */
5292 uint16_t public_address_port = tvb_get_uint16(tvb, offset + 18, ENC_BIG_ENDIAN0x00000000);
5293 proto_tree_add_item(locator_tree, hf_rtps_locator_public_address_port,
5294 tvb, offset+18, 2, ENC_BIG_ENDIAN0x00000000);
5295 proto_tree_add_item(locator_tree, hf_rtps_locator_ipv4, tvb, offset+20,
5296 4, ENC_BIG_ENDIAN0x00000000);
5297 proto_item_append_text(tree, " (%s, %s:%d, Logical Port = %u)",
5298 val_to_str(pinfo->pool, kind, rtps_locator_kind_vals, "%02x"),
5299 tvb_ip_to_str(pinfo->pool, tvb, offset + 20)tvb_address_to_str(pinfo->pool, tvb, AT_IPv4, offset + 20), public_address_port, port);
5300 } else { /* IPv6 format */
5301 proto_tree_add_item(locator_tree, hf_rtps_locator_ipv6, tvb, offset+8,
5302 16, ENC_NA0x00000000);
5303 proto_item_append_text(tree, " (%s, %s, Logical Port = %u)",
5304 val_to_str(pinfo->pool, kind, rtps_locator_kind_vals, "%02x"),
5305 tvb_ip6_to_str(pinfo->pool, tvb, offset + 8)tvb_address_to_str(pinfo->pool, tvb, AT_IPv6, offset + 8), port);
5306 }
5307 break;
5308 }
5309 case LOCATOR_KIND_SHMEM(0x01000000): {
5310 uint32_t hostId;
5311 ti = proto_tree_add_item_ret_uint(
5312 locator_tree,
5313 hf_rtps_locator_port,
5314 tvb,
5315 offset + 4,
5316 4,
5317 encoding,
5318 &port);
5319 proto_tree_add_item_ret_uint(locator_tree, hf_rtps_param_host_id, tvb, offset+10, 4, ENC_BIG_ENDIAN0x00000000, &hostId);
5320 if (port == 0)
5321 expert_add_info(pinfo, ti, &ei_rtps_locator_port);
5322 proto_item_append_text(tree, " (%s, HostId = 0x%08x, Port = %u)",
5323 val_to_str(pinfo->pool, kind, rtps_locator_kind_vals, "%02x"),
5324 hostId, port);
5325 break;
5326 }
5327 case LOCATOR_KIND_UDPV6(2): {
5328 ti = proto_tree_add_item_ret_uint(
5329 locator_tree,
5330 hf_rtps_locator_port,
5331 tvb,
5332 offset + 4,
5333 4,
5334 encoding,
5335 &port);
5336 if (port == 0)
5337 expert_add_info(pinfo, ti, &ei_rtps_locator_port);
5338 proto_tree_add_item(locator_tree, hf_rtps_locator_ipv6, tvb, offset+8, 16, ENC_NA0x00000000);
5339 proto_item_append_text(tree, " (%s, %s:%u)",
5340 val_to_str(pinfo->pool, kind, rtps_locator_kind_vals, "%02x"),
5341 tvb_ip6_to_str(pinfo->pool, tvb, offset + 8)tvb_address_to_str(pinfo->pool, tvb, AT_IPv6, offset + 8), port);
5342 break;
5343 }
5344 case LOCATOR_KIND_DTLS(6): {
5345 proto_tree_add_item_ret_uint(
5346 locator_tree,
5347 hf_rtps_locator_port,
5348 tvb,
5349 offset + 4,
5350 4,
5351 encoding,
5352 &port);
5353 proto_tree_add_item(locator_tree, hf_rtps_locator_ipv6, tvb, offset+8, 16, ENC_NA0x00000000);
5354 proto_item_append_text(tree, " (%s, %s:%u)",
5355 val_to_str(pinfo->pool, kind, rtps_locator_kind_vals, "%02x"),
5356 tvb_ip6_to_str(pinfo->pool, tvb, offset + 8)tvb_address_to_str(pinfo->pool, tvb, AT_IPv6, offset + 8), port);
5357 break;
5358 }
5359 /*
5360 * +-------+-------+-------+-------+
5361 * | Flags | |
5362 * +-------+ +
5363 * | DDS_Octet UUID[9] |
5364 * + +-------+-------+
5365 * | | public_port |
5366 * +-------+-------+-------+-------+
5367 * | DDS_Octet public_ip_address[4]|
5368 * +-------+-------+-------+-------+
5369 */
5370 case LOCATOR_KIND_UDPV4_WAN(0x01000001): {
5371 uint8_t flags = 0;
5372 ws_in4_addr locator_ip = 0;
5373 const uint32_t uuid_size = 9;
5374 const uint32_t locator_port_size = 4;
5375 const uint32_t locator_port_offset = offset + 4;
5376 const uint32_t flags_offset = locator_port_offset + locator_port_size;
5377 const uint32_t uuid_offset = flags_offset + 1;
5378 const uint32_t port_offset = uuid_offset + uuid_size;
5379 const uint32_t ip_offset = port_offset + 2;
5380 int hf_port = 0;
5381 int hf_ip = 0;
5382 char* ip_str = NULL((void*)0);
5383 uint32_t public_port = 0;
5384 bool_Bool is_public = false0;
5385
5386 ti = proto_tree_add_item_ret_uint(
5387 locator_tree,
5388 hf_rtps_locator_port,
5389 tvb,
5390 locator_port_offset,
5391 locator_port_size,
5392 encoding,
5393 &port);
5394 flags = tvb_get_int8(tvb, flags_offset);
5395 proto_tree_add_bitmask_value(
5396 locator_tree,
5397 tvb,
5398 flags_offset,
5399 hf_rtps_udpv4_wan_locator_flags,
5400 ett_rtps_flags,
5401 UDPV4_WAN_LOCATOR_FLAGS,
5402 (uint64_t)flags);
5403
5404 /* UUID */
5405 proto_tree_add_item(locator_tree, hf_rtps_uuid, tvb, uuid_offset, UUID_SIZE(9), encoding);
5406
5407 /*
5408 * The P flag indicates that the locator contains a globally public IP address
5409 * and public port where a transport instance can be reached. public_ip_address
5410 * contains the public IP address and public_port contains the public UDP port.
5411 * Locators with the P flag set are called PUBLIC locators.
5412 */
5413 is_public = ((flags & FLAG_UDPV4_WAN_LOCATOR_P(0x02)) != 0);
5414 if (is_public) {
5415 hf_ip = hf_rtps_udpv4_wan_locator_public_ip;
5416 hf_port = hf_rtps_udpv4_wan_locator_public_port;
5417 } else {
5418 hf_ip = hf_rtps_udpv4_wan_locator_local_ip;
5419 hf_port = hf_rtps_udpv4_wan_locator_local_port;
5420 }
5421
5422 /* Port & IP */
5423 ip_str = tvb_ip_to_str(pinfo->pool, tvb, ip_offset)tvb_address_to_str(pinfo->pool, tvb, AT_IPv4, ip_offset);
5424 locator_ip = tvb_get_ipv4(tvb, ip_offset);
5425 if (locator_ip != 0) {
5426 proto_tree_add_item_ret_uint(
5427 locator_tree,
5428 hf_port,
5429 tvb,
5430 port_offset,
5431 2,
5432 ENC_NA0x00000000,
5433 &public_port);
5434 proto_tree_add_ipv4(
5435 locator_tree,
5436 hf_ip,
5437 tvb,
5438 ip_offset,
5439 4,
5440 locator_ip);
5441 }
5442 if (port == 0)
5443 expert_add_info(pinfo, ti, &ei_rtps_locator_port);
5444 if (ip_str != NULL((void*)0) && locator_ip != 0) {
5445 if (is_public) {
5446 proto_item_append_text(tree, " (%s, public: %s:%u, rtps port:%u)",
5447 val_to_str(pinfo->pool, kind, rtps_locator_kind_vals, "%02x"),
5448 ip_str, public_port, port);
5449 } else {
5450 proto_item_append_text(tree, " (%s, local: %s:%u)",
5451 val_to_str(pinfo->pool, kind, rtps_locator_kind_vals, "%02x"),
5452 ip_str, port);
5453 }
5454 }
5455 }
5456 /* Default case, we already have the locator kind so don't do anything */
5457 default:
5458 break;
5459 }
5460 return offset + parameter_size;
5461}
5462
5463/* ------------------------------------------------------------------------- */
5464/* Insert in the protocol tree the next bytes interpreted as Sequence of
5465 * unsigned shorts.
5466 * The formatted buffer is: val1, val2, val3, ...
5467 * Returns the new updated offset
5468 */
5469static int rtps_util_add_seq_short(proto_tree *tree, tvbuff_t *tvb, int offset, int hf_item,
5470 const unsigned encoding, int param_length _U___attribute__((unused)), const char *label) {
5471 uint32_t num_elem;
5472 uint32_t i;
5473 proto_tree *string_tree;
5474
5475 num_elem = tvb_get_uint32(tvb, offset, encoding);
5476 offset += 4;
5477
5478 /* Create the string node with an empty string, the replace it later */
5479 string_tree = proto_tree_add_subtree_format(tree, tvb, offset, num_elem * 4,
5480 ett_rtps_seq_ulong, NULL((void*)0), "%s (%d elements)", label, num_elem);
5481
5482 for (i = 0; i < num_elem; ++i) {
5483 proto_tree_add_item(string_tree, hf_item, tvb, offset, 2, encoding);
5484 offset += 2;
5485 }
5486
5487 return offset;
5488}
5489
5490static int rtps_util_add_locator_ex_t(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, int offset,
5491 const unsigned encoding, int param_length) {
5492 int locator_offset = 0;
5493
5494 locator_offset = rtps_util_add_locator_t(tree, pinfo, tvb,
5495 offset, encoding, "locator");
5496 offset += rtps_util_add_seq_short(tree, tvb, locator_offset, hf_rtps_encapsulation_id,
5497 encoding, param_length - (locator_offset - offset), "encapsulations");
5498 return offset;
5499}
5500
5501/* ------------------------------------------------------------------------- */
5502/* Insert in the protocol tree the next bytes interpreted as a list of
5503 * Locators:
5504 * - unsigned long numLocators
5505 * - locator 1
5506 * - locator 2
5507 * - ...
5508 * - locator n
5509 * Returns the new offset after parsing the locator list
5510 */
5511static int rtps_util_add_locator_list(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
5512 int offset, const uint8_t *label, const unsigned encoding) {
5513
5514 proto_tree *locator_tree;
5515 uint32_t num_locators;
5516
5517 num_locators = tvb_get_uint32(tvb, offset, encoding);
5518
5519 locator_tree = proto_tree_add_subtree_format(tree, tvb, offset, 4,
5520 ett_rtps_locator_udp_v4, NULL((void*)0), "%s: %d Locators", label, num_locators);
5521 offset += 4;
5522 if (num_locators > 0) {
5523 uint32_t i;
5524 char temp_buff[20];
5525
5526 for (i = 0; i < num_locators; ++i) {
5527 snprintf(temp_buff, 20, "Locator[%d]", i);
5528 rtps_util_add_locator_t(locator_tree, pinfo, tvb, offset,
5529 encoding, temp_buff);
5530 offset += 24;
5531 }
5532 }
5533 return offset;
5534}
5535
5536/* ------------------------------------------------------------------------- */
5537/* Insert in the protocol tree the next bytes interpreted as a list of
5538* multichannel Locators:
5539* - unsigned long numLocators
5540* - locator 1
5541* - locator 2
5542* - ...
5543* - locator n
5544* Returns the new offset after parsing the locator list
5545*/
5546static int rtps_util_add_multichannel_locator_list(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
5547 int offset, const uint8_t *label, const unsigned encoding) {
5548
5549 proto_tree *locator_tree;
5550 uint32_t num_locators;
5551
5552 num_locators = tvb_get_uint32(tvb, offset, encoding);
5553 locator_tree = proto_tree_add_subtree_format(tree, tvb, offset, 4,
5554 ett_rtps_locator_udp_v4, NULL((void*)0), "%s: %d Locators", label, num_locators);
5555
5556 offset += 4;
5557 if (num_locators > 0) {
5558 uint32_t i;
5559 for (i = 0; i < num_locators; ++i) {
5560 proto_tree *ti, *locator_item_tree;
5561 uint32_t kind;
5562 uint32_t port;
5563 char *channel_address;
5564 locator_item_tree = proto_tree_add_subtree(locator_tree, tvb, offset, 24, ett_rtps_locator,
5565 NULL((void*)0), label);
5566 proto_tree_add_item_ret_uint(locator_item_tree, hf_rtps_locator_kind, tvb, offset, 4, encoding, &kind);
5567 switch (kind) {
5568 case LOCATOR_KIND_UDPV4(1):
5569 case LOCATOR_KIND_TUDPV4(0x01001001): {
5570 proto_tree_add_item(locator_item_tree, hf_rtps_locator_ipv4, tvb, offset + 16, 4,
5571 ENC_BIG_ENDIAN0x00000000);
5572 channel_address = tvb_ip_to_str(pinfo->pool, tvb, offset + 16)tvb_address_to_str(pinfo->pool, tvb, AT_IPv4, offset + 16);
5573 break;
5574 }
5575 case LOCATOR_KIND_UDPV6(2): {
5576 proto_tree_add_item(locator_tree, hf_rtps_locator_ipv6, tvb, offset + 4, 16, ENC_NA0x00000000);
5577 channel_address = tvb_ip6_to_str(pinfo->pool, tvb, offset + 4)tvb_address_to_str(pinfo->pool, tvb, AT_IPv6, offset + 4);
5578 proto_item_append_text(tree, " (%s, %s)",
5579 val_to_str(pinfo->pool, kind, rtps_locator_kind_vals, "%02x"),
5580 tvb_ip6_to_str(pinfo->pool, tvb, offset + 4)tvb_address_to_str(pinfo->pool, tvb, AT_IPv6, offset + 4));
5581 break;
5582 }
5583 /* Default case, Multichannel locators only should be present in UDPv4 and UDPv6 transports
5584 * Unknown address format.
5585 * */
5586 default:
5587 offset += 24;
5588 continue;
5589 break;
5590 }
5591 ti = proto_tree_add_item_ret_uint(locator_item_tree, hf_rtps_locator_port, tvb, offset + 20, 4, encoding, &port);
5592 if (port == 0)
5593 expert_add_info(pinfo, ti, &ei_rtps_locator_port);
5594 proto_item_append_text(tree, " (%s, %s:%u)",
5595 val_to_str(pinfo->pool, kind, rtps_locator_kind_vals, "%02x"),
5596 channel_address, port);
5597 offset += 24;
5598 }
5599 }
5600 return offset;
5601}
5602
5603/* ------------------------------------------------------------------------- */
5604/* Insert in the protocol tree the next 4 bytes interpreted as IPV4Address_t
5605 */
5606static void rtps_util_add_ipv4_address_t(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, int offset,
5607 const unsigned encoding, int hf_item) {
5608
5609 proto_item *ti;
5610
5611 ti = proto_tree_add_item(tree, hf_item, tvb, offset, 4, encoding);
5612 if (tvb_get_ntohl(tvb, offset) == IPADDRESS_INVALID(0))
5613 expert_add_info(pinfo, ti, &ei_rtps_ip_invalid);
5614}
5615
5616
5617
5618/* ------------------------------------------------------------------------- */
5619/* Insert in the protocol tree the next 8 bytes interpreted as LocatorUDPv4
5620 *
5621 * LocatorUDPv4 is a struct defined as:
5622 * struct {
5623 * unsigned long address;
5624 * unsigned long port;
5625 * } LocatorUDPv4_t;
5626 *
5627 */
5628static void rtps_util_add_locator_udp_v4(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
5629 int offset, const uint8_t *label, const unsigned encoding) {
5630
5631 proto_item *ti;
5632 proto_tree *locator_tree;
5633 uint32_t port;
5634
5635 locator_tree = proto_tree_add_subtree(tree, tvb, offset, 8, ett_rtps_locator_udp_v4, NULL((void*)0), label);
5636
5637 rtps_util_add_ipv4_address_t(locator_tree, pinfo, tvb, offset,
5638 encoding, hf_rtps_locator_udp_v4);
5639
5640 ti = proto_tree_add_item_ret_uint(locator_tree, hf_rtps_locator_udp_v4_port, tvb, offset, 4, encoding, &port);
5641 if (port == PORT_INVALID(0))
5642 expert_add_info(pinfo, ti, &ei_rtps_port_invalid);
5643}
5644
5645/* ------------------------------------------------------------------------- */
5646/* Insert in the protocol tree the next 8 bytes interpreted as GuidPrefix
5647 * If tree is specified, it fills up the protocol tree item:
5648 * - hf_rtps_guid_prefix
5649 * - hf_rtps_host_id
5650 * - hf_rtps_app_id
5651 * - hf_rtps_app_id_instance_id
5652 * - hf_rtps_app_id_app_kind
5653 */
5654static void rtps_util_add_guid_prefix_v1(proto_tree *tree, packet_info* pinfo, tvbuff_t *tvb, int offset,
5655 int hf_prefix, int hf_host_id, int hf_app_id, int hf_app_id_instance_id,
5656 int hf_app_id_app_kind, const uint8_t *label) {
5657 uint64_t prefix;
5658 uint32_t host_id, app_id, instance_id;
5659 uint8_t app_kind;
5660 proto_item *ti;
5661 proto_tree *guid_tree, *appid_tree;
5662 const uint8_t *safe_label = (label == NULL((void*)0)) ? (const uint8_t *)"guidPrefix" : label;
5663
5664 /* Read values from TVB */
5665 prefix = tvb_get_ntoh64(tvb, offset);
5666 host_id = tvb_get_ntohl(tvb, offset);
5667 app_id = tvb_get_ntohl(tvb, offset + 4);
5668 instance_id = (app_id >> 8);
5669 app_kind = (app_id & 0xff);
5670
5671 if (tree != NULL((void*)0)) {
5672 ti = proto_tree_add_uint64_format(tree, hf_prefix, tvb, offset, 8, prefix,
5673 "%s=%08x %08x { hostId=%08x, appId=%08x (%s: %06x) }",
5674 safe_label, host_id, app_id, host_id, app_id,
5675 val_to_str(pinfo->pool, app_kind, app_kind_vals, "%02x"),
5676 instance_id);
5677
5678 guid_tree = proto_item_add_subtree(ti, ett_rtps_guid_prefix);
5679
5680 /* Host Id */
5681 proto_tree_add_item(guid_tree, hf_host_id, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000);
5682
5683 /* AppId (root of the app_id sub-tree) */
5684 ti = proto_tree_add_item(guid_tree, hf_app_id, tvb, offset+4, 4, ENC_BIG_ENDIAN0x00000000);
5685 appid_tree = proto_item_add_subtree(ti, ett_rtps_app_id);
5686
5687 /* InstanceId */
5688 proto_tree_add_item(appid_tree, hf_app_id_instance_id, tvb, offset+4, 3, ENC_BIG_ENDIAN0x00000000);
5689 /* AppKind */
5690 proto_tree_add_item(appid_tree, hf_app_id_app_kind, tvb, offset+7, 1, ENC_BIG_ENDIAN0x00000000);
5691 }
5692}
5693
5694/* ------------------------------------------------------------------------- */
5695/* Insert in the protocol tree the next 12 bytes interpreted as GuidPrefix
5696 * If tree is specified, it fills up the protocol tree item:
5697 * - hf_rtps_guid_prefix
5698 * - hf_rtps_host_id
5699 * - hf_rtps_app_id
5700 * - hf_rtps_counter
5701 */
5702static void rtps_util_add_guid_prefix_v2(proto_tree *tree, tvbuff_t *tvb, int offset,
5703 int hf_prefix, int hf_host_id, int hf_app_id,
5704 int hf_instance_id, int hf_prefix_extra) {
5705 /*
5706 * 0...2...........7...............15.............23...............31
5707 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
5708 * | host id |
5709 * +---------------+---------------+---------------+---------------+
5710 * | app id |
5711 * +---------------+---------------+---------------+---------------+
5712 * | instance id |
5713 * +---------------+---------------+---------------+---------------+
5714 */
5715 if (tree) {
5716 proto_item *ti;
5717 proto_tree *guid_tree;
5718
5719 /* The text node (root of the guid prefix sub-tree) */
5720 ti = proto_tree_add_item(tree, hf_prefix, tvb, offset, 12, ENC_NA0x00000000);
5721 guid_tree = proto_item_add_subtree(ti, ett_rtps_guid_prefix);
5722
5723 /* Optional filter that can be guidPrefix.src or guidPrefix.dst */
5724 if (hf_prefix_extra != 0) {
5725 ti = proto_tree_add_item(tree, hf_prefix_extra, tvb, offset, 12, ENC_NA0x00000000);
5726 proto_item_set_hidden(ti);
5727 }
5728
5729 /* Host Id */
5730 proto_tree_add_item(guid_tree, hf_host_id, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000);
5731
5732 /* App Id */
5733 proto_tree_add_item(guid_tree, hf_app_id, tvb, offset+4, 4, ENC_BIG_ENDIAN0x00000000);
5734
5735 /* Counter */
5736 proto_tree_add_item(guid_tree, hf_instance_id, tvb, offset+8, 4, ENC_BIG_ENDIAN0x00000000);
5737 }
5738}
5739/* ------------------------------------------------------------------------- */
5740 /* Insert the entityId from the next 4 bytes. Since there are more than
5741 * one entityId, we need to specify also the IDs of the entityId (and its
5742 * sub-components), as well as the label identifying it.
5743 * Returns true if the entityKind is one of the NDDS built-in entities.
5744 */
5745static bool_Bool rtps_util_add_entity_id(proto_tree *tree, packet_info* pinfo, tvbuff_t *tvb, int offset,
5746 int hf_item, int hf_item_entity_key, int hf_item_entity_kind,
5747 int subtree_entity_id, const char *label, uint32_t *entity_id_out) {
5748 uint32_t entity_id = tvb_get_ntohl(tvb, offset);
5749 uint32_t entity_key = (entity_id >> 8);
5750 uint8_t entity_kind = (entity_id & 0xff);
5751 const char *str_predef = try_val_to_str(entity_id, entity_id_vals);
5752
5753 if (entity_id_out != NULL((void*)0)) {
5754 *entity_id_out = entity_id;
5755 }
5756
5757 if (tree != NULL((void*)0)) {
5758 proto_tree *entity_tree;
5759 proto_item *ti;
5760
5761 if (str_predef == NULL((void*)0)) {
5762 /* entityId is not a predefined value, format it */
5763 ti = proto_tree_add_uint_format(tree, hf_item, tvb, offset, 4, entity_id,
5764 "%s: 0x%08x (%s: 0x%06x)",
5765 label, entity_id,
5766 val_to_str(pinfo->pool, entity_kind, entity_kind_vals, "unknown kind (%02x)"),
5767 entity_key);
5768 } else {
5769 /* entityId is a predefined value */
5770 ti = proto_tree_add_uint_format(tree, hf_item, tvb, offset, 4, entity_id,
5771 "%s: %s (0x%08x)", label, str_predef, entity_id);
5772 }
5773
5774 entity_tree = proto_item_add_subtree(ti, subtree_entity_id);
5775
5776 proto_tree_add_item(entity_tree, hf_item_entity_key, tvb, offset, 3, ENC_BIG_ENDIAN0x00000000);
5777 proto_tree_add_item(entity_tree, hf_item_entity_kind, tvb, offset+3, 1, ENC_BIG_ENDIAN0x00000000);
5778 }
5779
5780 /* is a built-in entity if the bit M and R (5 and 6) of the entityKind are set */
5781 /* return ((entity_kind & 0xc0) == 0xc0); */
5782 return ( ((entity_kind & 0xc0) == 0xc0) ||
5783 entity_id == ENTITYID_RTI_BUILTIN_SERVICE_REQUEST_WRITER(0x00020082) ||
5784 entity_id == ENTITYID_RTI_BUILTIN_SERVICE_REQUEST_READER(0x00020087) ||
5785 entity_id == ENTITYID_RTI_BUILTIN_LOCATOR_PING_WRITER(0x00020182) ||
5786 entity_id == ENTITYID_RTI_BUILTIN_LOCATOR_PING_READER(0x00020187));
5787}
5788
5789/* ------------------------------------------------------------------------- */
5790 /* Insert the entityId from the next 4 bytes as a generic one (not connected
5791 * to any protocol field). It simply insert the content as a simple text entry
5792 * and returns in the passed buffer only the value (without the label).
5793 */
5794static void rtps_util_add_generic_entity_id(proto_tree *tree, packet_info* pinfo, tvbuff_t *tvb, int offset, const char *label,
5795 int hf_item, int hf_item_entity_key, int hf_item_entity_kind,
5796 int subtree_entity_id) {
5797 uint32_t entity_id = tvb_get_ntohl(tvb, offset);
5798 uint32_t entity_key = (entity_id >> 8);
5799 uint8_t entity_kind = (entity_id & 0xff);
5800 const char *str_predef = try_val_to_str(entity_id, entity_id_vals);
5801 proto_item *ti;
5802 proto_tree *entity_tree;
5803
5804 if (str_predef == NULL((void*)0)) {
5805 /* entityId is not a predefined value, format it */
5806 ti = proto_tree_add_uint_format(tree, hf_item, tvb, offset, 4, entity_id,
5807 "%s: 0x%08x (%s: 0x%06x)", label, entity_id,
5808 val_to_str(pinfo->pool, entity_kind, entity_kind_vals, "unknown kind (%02x)"),
5809 entity_key);
5810 } else {
5811 /* entityId is a predefined value */
5812 ti = proto_tree_add_uint_format_value(tree, hf_item, tvb, offset, 4, entity_id,
5813 "%s: %s (0x%08x)", label, str_predef, entity_id);
5814 }
5815
5816 entity_tree = proto_item_add_subtree(ti, subtree_entity_id);
5817
5818 proto_tree_add_item(entity_tree, hf_item_entity_key, tvb, offset, 3, ENC_BIG_ENDIAN0x00000000);
5819 proto_tree_add_item(entity_tree, hf_item_entity_kind, tvb, offset+3, 1, ENC_BIG_ENDIAN0x00000000);
5820
5821}
5822
5823/* ------------------------------------------------------------------------- */
5824 /* Interpret the next 12 octets as a generic GUID and insert it in the protocol
5825 * tree as simple text (no reference fields are set).
5826 * It is mostly used in situation where is not required to perform search for
5827 * this kind of GUID (i.e. like in some DATA parameter lists).
5828 */
5829static void rtps_util_add_generic_guid_v1(proto_tree *tree, tvbuff_t *tvb, int offset,
5830 int hf_guid, int hf_host_id, int hf_app_id, int hf_app_id_instance_id,
5831 int hf_app_id_app_kind, int hf_entity, int hf_entity_key,
5832 int hf_entity_kind) {
5833
5834 uint64_t prefix;
5835 uint32_t host_id, app_id, entity_id;
5836 proto_item *ti;
5837 proto_tree *guid_tree, *appid_tree, *entity_tree;
5838
5839 /* Read typed data */
5840 prefix = tvb_get_ntoh64(tvb, offset);
5841 host_id = tvb_get_ntohl(tvb, offset);
5842 app_id = tvb_get_ntohl(tvb, offset + 4);
5843 entity_id = tvb_get_ntohl(tvb, offset + 8);
5844
5845 ti = proto_tree_add_uint64_format_value(tree, hf_guid, tvb, offset, 8, prefix, "%08x %08x %08x",
5846 host_id, app_id, entity_id);
5847
5848 guid_tree = proto_item_add_subtree(ti, ett_rtps_generic_guid);
5849
5850 /* Host Id */
5851 proto_tree_add_item(guid_tree, hf_host_id, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000);
5852
5853 /* AppId (root of the app_id sub-tree) */
5854 ti = proto_tree_add_item(guid_tree, hf_app_id, tvb, offset+4, 4, ENC_BIG_ENDIAN0x00000000);
5855 appid_tree = proto_item_add_subtree(ti, ett_rtps_app_id);
5856
5857 /* InstanceId */
5858 proto_tree_add_item(appid_tree, hf_app_id_instance_id, tvb, offset+4, 3, ENC_BIG_ENDIAN0x00000000);
5859 /* AppKind */
5860 proto_tree_add_item(appid_tree, hf_app_id_app_kind, tvb, offset+7, 1, ENC_BIG_ENDIAN0x00000000);
5861
5862 /* Entity (root of the app_id sub-tree) */
5863 ti = proto_tree_add_item(guid_tree, hf_entity, tvb, offset+8, 4, ENC_BIG_ENDIAN0x00000000);
5864 entity_tree = proto_item_add_subtree(ti, ett_rtps_entity);
5865
5866 proto_tree_add_item(entity_tree, hf_entity_key, tvb, offset+8, 3, ENC_BIG_ENDIAN0x00000000);
5867 proto_tree_add_item(entity_tree, hf_entity_kind, tvb, offset+11, 1, ENC_BIG_ENDIAN0x00000000);
5868}
5869
5870/* ------------------------------------------------------------------------- */
5871/* Insert in the protocol tree the next data interpreted as a String
5872 * Returns the new offset (after reading the string)
5873 * XXX - should check that string length field makes sense, possibly by
5874 * comparing to a passed-in container length (cf. #19359)
5875 */
5876static int rtps_util_add_string(proto_tree *tree, tvbuff_t *tvb, int offset,
5877 int hf_item, const unsigned encoding) {
5878 uint32_t size;
5879
5880 proto_tree_add_item_ret_uint(tree, hf_rtps_string_length, tvb, offset, 4, encoding, &size);
5881 proto_tree_add_item(tree, hf_item, tvb, offset+4, size, ENC_ASCII0x00000000);
5882
5883 /* NDDS align strings at 4-bytes word. So:
5884 * string_length: 4 -> buffer_length = 4;
5885 * string_length: 5 -> buffer_length = 8;
5886 * string_length: 6 -> buffer_length = 8;
5887 * string_length: 7 -> buffer_length = 8;
5888 * string_length: 8 -> buffer_length = 8;
5889 * ...
5890 */
5891 return offset + 4 + ((size + 3) & 0xfffffffc);
5892}
5893
5894/*
5895 * Insert in the protocol tree the next data interpreted as a String
5896 * Returns the new offset (after reading the string, without adding alignment)
5897 */
5898static int rtps_util_add_string_no_align(proto_tree* tree, tvbuff_t* tvb,
5899 int offset, int hf_item, const unsigned encoding)
5900{
5901 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
5902 uint32_t size = tvb_get_uint32(tvb, offset, encoding);
5903
5904 if (enable_debug_info)
5905 {
5906 proto_tree_add_item(tree, hf_rtps_string_length, tvb, offset,
5907 4, encoding);
5908 }
5909 offset += 4;
5910
5911 proto_tree_add_item(tree, hf_item, tvb, offset, size, ENC_ASCII0x00000000);
5912 return offset + size;
5913}
5914
5915static int rtps_util_add_data_tags(proto_tree *rtps_parameter_tree, tvbuff_t *tvb,
5916 int offset, const unsigned encoding, int param_length) {
5917
5918 /* 0...2...........7...............15.............23...............31
5919 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
5920 * | Sequence Size |
5921 * +ITEM 0---------+---------------+---------------+---------------+
5922 * | Name String Bytes |
5923 * +---------------+---------------+---------------+---------------+
5924 * | Value String Bytes |
5925 * +---------------+---------------+---------------+---------------+
5926 * ....
5927 * +ITEM N---------+---------------+---------------+---------------+
5928 * | Name String Bytes |
5929 * +---------------+---------------+---------------+---------------+
5930 * | Value String Bytes |
5931 * +---------------+---------------+---------------+---------------+
5932 */
5933
5934 proto_tree *tags_seq_tree = NULL((void*)0);
5935 proto_tree *tag_tree = NULL((void*)0);
5936 uint32_t seq_sum_elements, i;
5937
5938 seq_sum_elements = tvb_get_uint32(tvb, offset, encoding);
5939 offset += 4;
5940
5941 tags_seq_tree = proto_tree_add_subtree_format(rtps_parameter_tree, tvb, offset - 4, param_length,
5942 ett_rtps_data_tag_seq, NULL((void*)0), "Tags (size = %u)", seq_sum_elements);
5943
5944 for (i = 0; i < seq_sum_elements; ++i) {
5945 uint32_t initial_offset = offset;
5946 tag_tree = proto_tree_add_subtree_format(tags_seq_tree, tvb, offset, -1, ett_rtps_data_tag_item,
5947 NULL((void*)0), "Tag [%u]", i);
5948 offset = rtps_util_add_string(tag_tree, tvb, offset, hf_rtps_data_tag_name, encoding);
5949 offset = rtps_util_add_string(tag_tree, tvb, offset, hf_rtps_data_tag_value, encoding);
5950 proto_item_set_len(tag_tree, offset - initial_offset);
5951 }
5952 return offset;
5953}
5954
5955
5956
5957/* ------------------------------------------------------------------------- */
5958 /* Interpret the next 16 octets as a generic GUID and insert it in the protocol
5959 * tree as simple text (no reference fields are set).
5960 * It is mostly used in situation where is not required to perform search for
5961 * this kind of GUID (i.e. like in some DATA parameter lists).
5962 */
5963static void rtps_util_add_generic_guid_v2(proto_tree *tree, tvbuff_t *tvb, int offset,
5964 int hf_guid, int hf_host_id, int hf_app_id, int hf_instance_id,
5965 int hf_entity, int hf_entity_key, int hf_entity_kind, proto_tree *print_tree) {
5966
5967 uint32_t host_id, app_id, entity_id, instance_id;
5968 proto_item *ti;
5969 proto_tree *guid_tree, *entity_tree;
5970
5971 /* Read typed data */
5972 host_id = tvb_get_ntohl(tvb, offset);
5973 app_id = tvb_get_ntohl(tvb, offset + 4);
5974 instance_id = tvb_get_ntohl(tvb, offset + 8);
5975 entity_id = tvb_get_ntohl(tvb, offset + 12);
5976
5977 ti = proto_tree_add_bytes_format_value(tree, hf_guid, tvb, offset, 16, NULL((void*)0), "%08x %08x %08x %08x",
5978 host_id, app_id, instance_id, entity_id);
5979
5980 /* If the method is called with a valid print_tree pointer, we add the info to the tree.
5981 * This improves usability a lot since the user doesn't have to click a lot to debug. */
5982 proto_item_append_text(print_tree, "%08x %08x %08x %08x",
5983 host_id, app_id, instance_id, entity_id);
5984
5985 guid_tree = proto_item_add_subtree(ti, ett_rtps_generic_guid);
5986
5987 /* Host Id */
5988 proto_tree_add_item(guid_tree, hf_host_id, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000);
5989
5990 /* App Id */
5991 proto_tree_add_item(guid_tree, hf_app_id, tvb, offset+4, 4, ENC_BIG_ENDIAN0x00000000);
5992
5993 /* Instance Id */
5994 proto_tree_add_item(guid_tree, hf_instance_id, tvb, offset+8, 4, ENC_BIG_ENDIAN0x00000000);
5995
5996 /* Entity (root of the app_id sub-tree) */
5997 ti = proto_tree_add_item(guid_tree, hf_entity, tvb, offset+12, 4, ENC_BIG_ENDIAN0x00000000);
5998 entity_tree = proto_item_add_subtree(ti, ett_rtps_entity);
5999
6000 proto_tree_add_item(entity_tree, hf_entity_key, tvb, offset+12, 3, ENC_BIG_ENDIAN0x00000000);
6001 proto_tree_add_item(entity_tree, hf_entity_kind, tvb, offset+15, 1, ENC_BIG_ENDIAN0x00000000);
6002}
6003
6004
6005/* ------------------------------------------------------------------------- */
6006/* Insert in the protocol tree the next 8 bytes interpreted as sequence
6007 * number.
6008 */
6009static uint64_t rtps_util_add_seq_number(proto_tree *tree,
6010 tvbuff_t *tvb,
6011 int offset,
6012 const unsigned encoding,
6013 const char *label) {
6014 uint64_t hi = (uint64_t)tvb_get_uint32(tvb, offset, encoding);
6015 uint64_t lo = (uint64_t)tvb_get_uint32(tvb, offset+4, encoding);
6016 uint64_t all = (hi << 32) | lo;
6017
6018 proto_tree_add_int64_format(tree, hf_rtps_sm_seq_number, tvb, offset, 8,
6019 all, "%s: %" PRIu64"l" "u", label, all);
6020
6021 return all;
6022}
6023
6024
6025/* ------------------------------------------------------------------------- */
6026/* Vendor specific: RTI
6027 * Insert in the protocol tree the next 8 bytes interpreted as TransportInfo
6028 */
6029static void rtps_util_add_transport_info(proto_tree *tree,
6030 tvbuff_t *tvb,
6031 int offset,
6032 const unsigned encoding,
6033 int transport_index)
6034 {
6035 int32_t classId = tvb_get_uint32(tvb, offset, encoding);
6036
6037 if (tree) {
6038 proto_tree *xport_info_tree;
6039
6040 xport_info_tree = proto_tree_add_subtree_format(tree, tvb, offset, 8, ett_rtps_transport_info, NULL((void*)0),
6041 "transportInfo %d: %s", transport_index, val_to_str_const(classId, ndds_transport_class_id_vals, "unknown"));
6042
6043 proto_tree_add_item(xport_info_tree, hf_rtps_transportInfo_classId, tvb,
6044 offset, 4, encoding);
6045 proto_tree_add_item(xport_info_tree, hf_rtps_transportInfo_messageSizeMax, tvb,
6046 offset+4, 4, encoding);
6047 }
6048}
6049
6050/* ------------------------------------------------------------------------- */
6051/* Insert in the protocol tree the next 8 bytes interpreted as an RTPS time_t,
6052 * which is like an NTP time stamp, except that it uses the UNIX epoch,
6053 * rather than the NTP epoch, as the time base. Doesn't check for TIME_ZERO,
6054 * TIME_INVALID, or TIME_INFINITE, and doesn't show the seconds and
6055 * fraction field separately.
6056 */
6057static void rtps_util_add_timestamp(proto_tree *tree,
6058 tvbuff_t *tvb,
6059 int offset,
6060 const unsigned encoding,
6061 int hf_time) {
6062
6063 proto_tree_add_item(tree, hf_time, tvb, offset, 8,
6064 ENC_TIME_RTPS0x00000008|encoding);
6065
6066}
6067
6068/* ------------------------------------------------------------------------- */
6069/* Insert in the protocol tree the next 8 bytes interpreted as an RTPS time_t.
6070 * Checks for special values except for TIME_INVALID, and shows the
6071 * seconds and fraction as separate fields.
6072 */
6073static void rtps_util_add_timestamp_sec_and_fraction(proto_tree *tree,
6074 tvbuff_t *tvb,
6075 int offset,
6076 const unsigned encoding,
6077 int hf_time _U___attribute__((unused))) {
6078
6079 char tempBuffer[MAX_TIMESTAMP_SIZE(128)];
6080 double absolute;
6081 int32_t sec;
6082 uint32_t frac;
6083
6084 if (tree) {
6085 proto_tree *time_tree;
6086
6087 sec = tvb_get_uint32(tvb, offset, encoding);
6088 frac = tvb_get_uint32(tvb, offset+4, encoding);
6089
6090 if ((sec == 0x7fffffff) && (frac == 0xffffffff)) {
6091 (void) g_strlcpy(tempBuffer, "INFINITE", MAX_TIMESTAMP_SIZE(128));
6092 } else if ((sec == 0) && (frac == 0)) {
6093 (void) g_strlcpy(tempBuffer, "0 sec", MAX_TIMESTAMP_SIZE(128));
6094 } else {
6095 absolute = (double)sec + (double)frac / ((double)(0x80000000) * 2.0);
6096 snprintf(tempBuffer, MAX_TIMESTAMP_SIZE(128),
6097 "%f sec (%ds + 0x%08x)", absolute, sec, frac);
6098 }
6099
6100 time_tree = proto_tree_add_subtree_format(tree, tvb, offset, 8,
6101 ett_rtps_timestamp, NULL((void*)0), "%s: %s", "lease_duration", tempBuffer);
6102
6103 proto_tree_add_item(time_tree, hf_rtps_param_timestamp_sec, tvb, offset, 4, encoding);
6104 proto_tree_add_item(time_tree, hf_rtps_param_timestamp_fraction, tvb, offset+4, 4, encoding);
6105 }
6106}
6107
6108/* ------------------------------------------------------------------------- */
6109/* Insert in the protocol tree the next data interpreted as a port (unsigned
6110 * 32-bit integer)
6111 */
6112static void rtps_util_add_port(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
6113 int offset, const unsigned encoding, int hf_item) {
6114 proto_item *ti;
6115 uint32_t port;
6116
6117 ti = proto_tree_add_item_ret_uint(tree, hf_item, tvb, offset, 4, encoding, &port);
6118 if (port == PORT_INVALID(0))
6119 expert_add_info(pinfo, ti, &ei_rtps_port_invalid);
6120}
6121
6122
6123/* ------------------------------------------------------------------------- */
6124/* Insert in the protocol tree the next bytes interpreted as
6125 * DurabilityServiceQosPolicy
6126 */
6127static void rtps_util_add_durability_service_qos(proto_tree *tree,
6128 tvbuff_t *tvb,
6129 int offset,
6130 const unsigned encoding) {
6131 proto_tree *subtree;
6132
6133 subtree = proto_tree_add_subtree(tree, tvb, offset, 28, ett_rtps_durability_service, NULL((void*)0), "PID_DURABILITY_SERVICE");
6134
6135 rtps_util_add_timestamp_sec_and_fraction(subtree, tvb, offset, encoding, hf_rtps_durability_service_cleanup_delay);
6136 proto_tree_add_item(subtree, hf_rtps_durability_service_history_kind, tvb, offset+8, 4, encoding);
6137 proto_tree_add_item(subtree, hf_rtps_durability_service_history_depth, tvb, offset+12, 4, encoding);
6138 proto_tree_add_item(subtree, hf_rtps_durability_service_max_samples, tvb, offset+16, 4, encoding);
6139 proto_tree_add_item(subtree, hf_rtps_durability_service_max_instances, tvb, offset+20, 4, encoding);
6140 proto_tree_add_item(subtree, hf_rtps_durability_service_max_samples_per_instances, tvb, offset+24, 4, encoding);
6141}
6142
6143/* ------------------------------------------------------------------------- */
6144/* Insert in the protocol tree the next bytes interpreted as Liveliness
6145 * QoS Policy structure.
6146 */
6147static void rtps_util_add_liveliness_qos(proto_tree *tree, tvbuff_t *tvb, int offset, const unsigned encoding) {
6148
6149 proto_tree *subtree;
6150
6151 subtree = proto_tree_add_subtree(tree, tvb, offset, 12, ett_rtps_liveliness, NULL((void*)0), "PID_LIVELINESS");
6152
6153 proto_tree_add_item(subtree, hf_rtps_liveliness_kind, tvb, offset, 4, encoding);
6154 rtps_util_add_timestamp_sec_and_fraction(subtree, tvb, offset+4, encoding, hf_rtps_liveliness_lease_duration);
6155}
6156
6157/* ------------------------------------------------------------------------- */
6158/* Insert in the protocol tree the next bytes interpreted as Liveliness
6159 * QoS Policy structure.
6160 */
6161static void rtps_util_add_product_version(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, int offset, int vendor_id) {
6162
6163 proto_tree *subtree;
6164 uint8_t major, minor, release, revision;
6165 int release_offset;
6166 int revision_offset;
6167
6168 release_offset = 2;
6169 revision_offset = 3;
6170 major = tvb_get_uint8(tvb, offset);
6171 minor = tvb_get_uint8(tvb, offset+1);
6172 release = tvb_get_uint8(tvb, offset+2);
6173 revision = tvb_get_uint8(tvb, offset+3);
6174
6175 if (vendor_id == RTPS_VENDOR_RTI_DDS(0x0101)) {
6176 if (major < 5 && revision == 0) {
6177 subtree = proto_tree_add_subtree_format(tree, tvb, offset, 4, ett_rtps_product_version, NULL((void*)0),
6178 "Product version: %d.%d%s", major, minor, format_char(pinfo->pool, release));
6179 } else if (major < 5 && revision > 0) {
6180 subtree = proto_tree_add_subtree_format(tree, tvb, offset, 4, ett_rtps_product_version, NULL((void*)0),
6181 "Product version: %d.%d%s rev%d", major, minor, format_char(pinfo->pool, release), revision);
6182 } else {
6183 subtree = proto_tree_add_subtree_format(tree, tvb, offset, 4, ett_rtps_product_version, NULL((void*)0),
6184 "Product version: %d.%d.%d.%d", major, minor, release, revision);
6185 }
6186 } else if (vendor_id == RTPS_VENDOR_RTI_DDS_MICRO(0x010A)) {
6187 /* In Micro < 3.0.0 release and revision numbers are switched */
6188 if (major < 3) {
6189 revision = revision ^ release;
6190 release = revision ^ release;
6191 revision = revision ^ release;
6192
6193 revision_offset = revision_offset ^ release_offset;
6194 release_offset = revision_offset ^ release_offset;
6195 revision_offset = revision_offset ^ release_offset;
6196 }
6197 if (revision != 0) {
6198 subtree = proto_tree_add_subtree_format(tree, tvb, offset, 4, ett_rtps_product_version, NULL((void*)0),
6199 "Product version: %d.%d.%d.%d", major, minor, release, revision);
6200 } else {
6201 subtree = proto_tree_add_subtree_format(tree, tvb, offset, 4, ett_rtps_product_version, NULL((void*)0),
6202 "Product version: %d.%d.%d", major, minor, release);
6203 }
6204 } else {
6205 return;
6206 }
6207
6208 proto_tree_add_item(subtree, hf_rtps_param_product_version_major,
6209 tvb, offset, 1, ENC_NA0x00000000);
6210 proto_tree_add_item(subtree, hf_rtps_param_product_version_minor,
6211 tvb, offset+1, 1, ENC_NA0x00000000);
6212 /* If major revision is smaller than 5, release interpreted as char */
6213 if (vendor_id == RTPS_VENDOR_RTI_DDS(0x0101) && major < 5) {
6214 proto_tree_add_item(subtree, hf_rtps_param_product_version_release_as_char,
6215 tvb, offset + release_offset, 1, ENC_ASCII0x00000000);
6216 } else {
6217 proto_tree_add_item(subtree, hf_rtps_param_product_version_release,
6218 tvb, offset + release_offset, 1, ENC_NA0x00000000);
6219 }
6220 proto_tree_add_item(subtree, hf_rtps_param_product_version_revision,
6221 tvb, offset + revision_offset, 1, ENC_NA0x00000000);
6222}
6223
6224/* ------------------------------------------------------------------------- */
6225/* Insert in the protocol tree the next bytes interpreted as Sequence of
6226 * Strings.
6227 * The formatted buffer is: "string1", "string2", "string3", ...
6228 * Returns the new updated offset
6229 */
6230static int rtps_util_add_seq_string(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, int offset,
6231 const unsigned encoding, int hf_numstring,
6232 int hf_string, const char *label) {
6233 uint32_t size;
6234 int32_t i, num_strings;
6235 const char *retVal;
6236 proto_tree *string_tree;
6237 int start;
6238
6239 proto_tree_add_item_ret_int(tree, hf_numstring, tvb, offset, 4, encoding, &num_strings);
6240 offset += 4;
6241
6242 if (num_strings == 0) {
6243 return offset;
6244 }
6245
6246 start = offset;
6247 /* Create the string node with a fake string, the replace it later */
6248 string_tree = proto_tree_add_subtree(tree, tvb, offset, -1, ett_rtps_seq_string, NULL((void*)0), label);
6249
6250 for (i = 0; i < num_strings; ++i) {
6251 size = tvb_get_uint32(tvb, offset, encoding);
6252
6253 retVal = (const char* )tvb_get_string_enc(pinfo->pool, tvb, offset+4, size, ENC_ASCII0x00000000);
6254
6255 proto_tree_add_string_format(string_tree, hf_string, tvb, offset, size+4, retVal,
6256 "%s[%d]: %s", label, i, retVal);
6257
6258 offset += (4 + ((size + 3) & 0xfffffffc));
6259 }
6260
6261 proto_item_set_len(string_tree, offset - start);
6262 return offset;
6263}
6264
6265/* ------------------------------------------------------------------------- */
6266/* Insert in the protocol tree the next bytes interpreted as Sequence of
6267 * longs.
6268 * The formatted buffer is: val1, val2, val3, ...
6269 * Returns the new updated offset
6270 */
6271static int rtps_util_add_seq_ulong(proto_tree *tree, tvbuff_t *tvb, int offset, int hf_item,
6272 const unsigned encoding, int param_length _U___attribute__((unused)), const char *label) {
6273 uint32_t num_elem;
6274 uint32_t i;
6275 proto_tree *string_tree;
6276
6277 num_elem = tvb_get_uint32(tvb, offset, encoding);
6278 offset += 4;
6279
6280 /* Create the string node with an empty string, the replace it later */
6281 string_tree = proto_tree_add_subtree_format(tree, tvb, offset, num_elem*4,
6282 ett_rtps_seq_ulong, NULL((void*)0), "%s (%d elements)", label, num_elem);
6283
6284 for (i = 0; i < num_elem; ++i) {
6285 proto_tree_add_item(string_tree, hf_item, tvb, offset, 4, encoding);
6286 offset += 4;
6287 }
6288
6289 return offset;
6290}
6291
6292/* ------------------------------------------------------------------------- */
6293static const char *rtps_util_typecode_id_to_string(uint32_t typecode_id) {
6294 switch(typecode_id) {
6295 case RTI_CDR_TK_ENUM: return "enum";
6296 case RTI_CDR_TK_UNION: return "union";
6297 case RTI_CDR_TK_STRUCT: return "struct";
6298 case RTI_CDR_TK_LONG: return "long";
6299 case RTI_CDR_TK_SHORT: return "short";
6300 case RTI_CDR_TK_USHORT: return "unsigned short";
6301 case RTI_CDR_TK_ULONG: return "unsigned long";
6302 case RTI_CDR_TK_FLOAT: return "float";
6303 case RTI_CDR_TK_DOUBLE: return "double";
6304 case RTI_CDR_TK_BOOLEAN: return "boolean";
6305 case RTI_CDR_TK_CHAR: return "char";
6306 case RTI_CDR_TK_OCTET: return "octet";
6307 case RTI_CDR_TK_LONGLONG: return "longlong";
6308 case RTI_CDR_TK_ULONGLONG: return "unsigned long long";
6309 case RTI_CDR_TK_LONGDOUBLE: return "long double";
6310 case RTI_CDR_TK_WCHAR: return "wchar";
6311 case RTI_CDR_TK_WSTRING: return "wstring";
6312 case RTI_CDR_TK_STRING: return "string";
6313 case RTI_CDR_TK_SEQUENCE: return "sequence";
6314 case RTI_CDR_TK_ARRAY: return "array";
6315 case RTI_CDR_TK_ALIAS: return "alias";
6316 case RTI_CDR_TK_VALUE: return "valuetype";
6317
6318 case RTI_CDR_TK_NULL:
6319 default:
6320 return "<unknown type>";
6321 }
6322}
6323
6324/* ------------------------------------------------------------------------- */
6325/* Insert in the protocol tree the next bytes interpreted as typecode info
6326 * Returns the number of bytes parsed
6327 */
6328// NOLINTNEXTLINE(misc-no-recursion)
6329static int rtps_util_add_typecode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset, const unsigned encoding,
6330 int indent_level, int is_pointer, uint16_t bitfield, int is_key, const int offset_begin,
6331 char *name,
6332 int seq_max_len, /* -1 = not a sequence field */
6333 uint32_t *arr_dimension, /* if !NULL: array of 10 int */
6334 int ndds_40_hack) {
6335 const int original_offset = offset;
6336 uint32_t tk_id;
6337 uint16_t tk_size;
6338 unsigned int i;
6339 char *indent_string;
6340 int retVal;
6341 char type_name[40];
6342
6343 /* Structure of the typecode data:
6344 * Offset | Size | Field | Notes
6345 * ----------|-------|------------------------------|---------------------
6346 * ? | ? | pad? |
6347 * 0 | 4 | RTI_CDR_TK_XXXXX | 4 bytes aligned
6348 * 4 | 2 | length the struct |
6349 */
6350
6351 /* Calc indent string */
6352 indent_string = (char *)wmem_alloc(wmem_epan_scope(), (indent_level*2)+1);
6353 memset(indent_string, ' ', (indent_level*2)+1);
6354 indent_string[indent_level*2] = '\0';
6355
6356 /* Gets TK ID */
6357 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
6358 tk_id = tvb_get_uint32(tvb, offset, encoding);
6359 offset += 4;
6360
6361 /* Gets TK size */
6362 tk_size = tvb_get_uint16(tvb, offset, encoding);
6363 offset += 2;
6364
6365 retVal = tk_size + 6; /* 6 = 4 (typecode ID) + 2 (size) */
6366
6367 /* The first bit of typecode is set to 1, clear it */
6368 tk_id &= 0x7fffffff;
6369
6370 /* HACK: NDDS 4.0 and NDDS 4.1 has different typecode ID list.
6371 * The ID listed in the RTI_CDR_TK_XXXXX are the one from NDDS 4.1
6372 * In order to correctly dissect NDDS 4.0 packets containing typecode
6373 * information, we check if the ID of the element at level zero is a
6374 * struct or union. If not, it means we are dissecting a ndds 4.0 packet
6375 * (and we can decrement the ID to match the correct values).
6376 */
6377 if (indent_level == 0) {
6378 if (tk_id == RTI_CDR_TK_OCTET) {
6379 ndds_40_hack = 1;
6380 }
6381 }
6382 if (ndds_40_hack) {
6383 ++tk_id;
6384 }
6385
6386 (void) g_strlcpy(type_name, rtps_util_typecode_id_to_string(tk_id), sizeof(type_name));
6387
6388 /* Structure of the typecode data:
6389 *
6390 * <type_code_header> ::=
6391 * <kind>
6392 * <type_code_length>
6393 *
6394 * <kind> ::= long (0=TK_NULL, 1=TK_SHORT...)
6395 * <type_code_length> ::= unsugned short
6396 *
6397 */
6398 switch(tk_id) {
6399
6400 /* Structure of the typecode data:
6401 *
6402 * <union_type_code> ::=
6403 * <type_code_header>
6404 * <name>
6405 * <default_index>
6406 * <discriminator_type_code>
6407 * <member_count>
6408 * <union_member>+
6409 * <union_member> ::= <member_length><name><union_member_detail>
6410 * <member_length> ::= unsigned short
6411 * <name> ::= <string>
6412 * <string> ::= <length>char+<eol>
6413 * <length> ::= unsigned long
6414 * <eol> ::= (char)0
6415 *
6416 * <union_member_detail> ::= <is_pointer>
6417 * <labels_count>
6418 * <label>+
6419 * <type_code>
6420 * <labels_count> ::= unsigned long
6421 * <label> ::= long
6422 *
6423 */
6424 case RTI_CDR_TK_UNION: {
6425 uint32_t struct_name_len;
6426 uint8_t *struct_name;
6427 const char *discriminator_name; /* for unions */
6428 char *discriminator_enum_name = NULL((void*)0); /* for unions with enum discriminator */
6429 /*uint32_t defaultIdx;*/ /* Currently is ignored */
6430 uint32_t disc_id; /* Used temporarily to populate 'discriminator_name' */
6431 uint16_t disc_size; /* Currently is ignored */
6432 uint32_t disc_offset_begin, num_members, member_name_len;
6433 uint16_t member_length;
6434 uint8_t *member_name = NULL((void*)0);
6435 uint32_t next_offset, field_offset_begin, member_label_count, discriminator_enum_name_length;
6436 int32_t member_label;
6437 unsigned j;
6438
6439 /* - - - - - - - Union name - - - - - - - */
6440 /* Pad-align */
6441 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
6442
6443 /* Get structure name length */
6444 struct_name_len = tvb_get_uint32(tvb, offset, encoding);
6445 offset += 4;
6446 struct_name = tvb_get_string_enc(pinfo->pool, tvb, offset, struct_name_len, ENC_ASCII0x00000000);
6447 offset = check_offset_addition(offset, struct_name_len, tree, NULL((void*)0), tvb);
6448
6449 /* - - - - - - - Default index - - - - - - - */
6450 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
6451 /*defaultIdx = NEXT_uint32(tvb, offset, encoding);*/
6452 offset += 4;
6453
6454 /* - - - - - - - Discriminator type code - - - - - - - */
6455 /* We don't recursively dissect everything, instead we just read the type */
6456 disc_id = tvb_get_uint32(tvb, offset, encoding);
6457 offset += 4;
6458
6459 disc_size = tvb_get_uint16(tvb, offset, encoding);
6460 offset += 2;
6461 disc_offset_begin = offset;
6462 disc_id &= 0x7fffffff;
6463 discriminator_name = rtps_util_typecode_id_to_string(disc_id);
6464 if (disc_id == RTI_CDR_TK_ENUM) {
6465 /* Enums has also a name that we should print */
6466 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
6467 discriminator_enum_name_length = tvb_get_uint32(tvb, offset, encoding);
6468 discriminator_enum_name = tvb_get_string_enc(pinfo->pool, tvb, offset+4, discriminator_enum_name_length, ENC_ASCII0x00000000);
6469 }
6470 offset = disc_offset_begin + disc_size;
6471#if 0
6472 field_offset_begin = offset;
6473 increment_dissection_depth(pinfo);
6474 offset += rtps_util_add_typecode(
6475 tree,
6476 tvb,
6477 pinfo,
6478 offset,
6479 encoding,
6480 indent_level+1,
6481 0,
6482 0,
6483 0,
6484 field_offset_begin,
6485 member_name,
6486 -1,
6487 NULL((void*)0),
6488 ndds_40_hack);
6489 decrement_dissection_depth(pinfo);
6490#endif
6491
6492 /* Add the entry of the union in the tree */
6493 proto_tree_add_string_format(tree, hf_rtps_union, tvb, original_offset, retVal, struct_name, "%sunion %s (%s%s%s) {",
6494 indent_string, struct_name, discriminator_name,
6495 (discriminator_enum_name ? " " : ""),
6496 (discriminator_enum_name ? discriminator_enum_name : ""));
6497
6498 if (seq_max_len != -1) {
6499 /* We're dissecting a sequence of struct, bypass the seq definition */
6500 snprintf(type_name, 40, "%s", struct_name);
6501 break;
6502 }
6503
6504 /* - - - - - - - Number of members - - - - - - - */
6505 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
6506 num_members = tvb_get_uint32(tvb, offset, encoding);
6507 offset += 4;
6508
6509 /* - - - - - - - <union_member>+ - - - - - - - */
6510 next_offset = offset;
6511
6512 for (i = 0; i < num_members; ++i) {
6513 uint8_t member_is_pointer;
6514 /* Safety: this theoretically should be the same already */
6515 field_offset_begin = offset = next_offset;
6516
6517 SHORT_ALIGN(offset)(offset = (offset+1)&0xfffffffe);
6518
6519 /* member's length */
6520 member_length = tvb_get_uint16(tvb, offset, encoding);
6521 offset += 2;
6522 next_offset = offset + member_length;
6523
6524 /* Name length */
6525 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
6526 member_name_len = tvb_get_uint32(tvb, offset, encoding);
6527 offset += 4;
6528
6529 /* Name */
6530 member_name = tvb_get_string_enc(pinfo->pool, tvb, offset, member_name_len, ENC_ASCII0x00000000);
6531 offset = check_offset_addition(offset, member_name_len, tree, NULL((void*)0), tvb);
6532
6533 /* is Pointer ? */
6534 member_is_pointer = tvb_get_uint8(tvb, offset);
6535 offset++;
6536
6537 /* Label count */
6538 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
6539 member_label_count = tvb_get_uint32(tvb, offset, encoding);
6540 offset += 4;
6541
6542 for (j = 0; j < member_label_count; ++j) {
6543 proto_item* case_item;
6544 /* Label count */
6545 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
6546 member_label = tvb_get_uint32(tvb, offset, encoding);
6547 offset += 4;
6548
6549 /* Add the entry of the union in the tree */
6550 case_item = proto_tree_add_uint_format(tree, hf_rtps_union_case, tvb, field_offset_begin, 1, member_label,
6551 "%s case %d:", indent_string, member_label);
6552 proto_item_set_len(case_item, retVal);
6553 }
6554
6555 increment_dissection_depth(pinfo);
6556 offset += rtps_util_add_typecode(tree, tvb, pinfo, offset, encoding,
6557 indent_level+2, member_is_pointer, 0, 0, field_offset_begin,
6558 member_name, -1, NULL((void*)0), ndds_40_hack);
6559 decrement_dissection_depth(pinfo);
6560 }
6561 /* Finally prints the name of the struct (if provided) */
6562 (void) g_strlcpy(type_name, "}", sizeof(type_name));
6563 break;
6564
6565 } /* end of case UNION */
6566
6567
6568 case RTI_CDR_TK_ENUM:
6569 case RTI_CDR_TK_STRUCT: {
6570 /* Structure of the typecode data:
6571 *
6572 * <union_type_code> ::=
6573 * <type_code_header>
6574 * <name>
6575 * <default_index>
6576 * <discriminator_type_code>
6577 * <member_count>
6578 * <member>+
6579 *
6580 * <struct_type_code> ::=
6581 * <type_code_header>
6582 * <name>
6583 * <member_count>
6584 * <member>+
6585 *
6586 * <name> ::= <string>
6587 * <string> ::= <length>char+<eol>
6588 * <length> ::= unsigned long
6589 * <eol> ::= (char)0
6590 * <member_count> ::= unsigned long
6591 *
6592 * STRUCT / UNION:
6593 * Foreach member {
6594 * - A2: 2: member length
6595 * - A4: 4: member name length
6596 * - n: member name
6597 * - 1: isPointer?
6598 * - A2 2: bitfield bits (-1=none)
6599 * - 1: isKey?
6600 * - A4 4: Typecode ID
6601 * - A2 2: length
6602 * }
6603 *
6604 * ENUM:
6605 * Foreach member {
6606 * - A2: 2: member length
6607 * - A4: 4: member name length
6608 * - n: member name
6609 * - A4: 4: ordinal number
6610 *
6611 * -> ----------------------------------------------------- <-
6612 * -> The alignment pad bytes belong to the FOLLOWING field <-
6613 * -> A4 = 4 bytes alignment, A2 = 2 bytes alignment <-
6614 * -> ----------------------------------------------------- <-
6615 */
6616 int8_t *struct_name;
6617 uint32_t struct_name_len, num_members;
6618 uint32_t next_offset;
6619 const char *typecode_name;
6620
6621 /* Pad-align */
6622 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
6623
6624 /* Get structure name length */
6625 struct_name_len = tvb_get_uint32(tvb, offset, encoding);
6626 offset += 4;
6627
6628 /* struct name */
6629 struct_name = tvb_get_string_enc(pinfo->pool, tvb, offset, struct_name_len, ENC_ASCII0x00000000);
6630 offset = check_offset_addition(offset, struct_name_len, tree, NULL((void*)0), tvb);
6631
6632
6633 if (tk_id == RTI_CDR_TK_ENUM) {
6634 typecode_name = "enum";
6635 } else if (tk_id == RTI_CDR_TK_VALUE_PARAM) {
6636 /* uint16_t type_modifier; */
6637 /* uint32_t baseTypeCodeKind; */
6638 uint32_t baseTypeCodeLength;
6639
6640 /* Need to read the type modifier and the base type code */
6641 typecode_name = "<sparse type>";
6642 SHORT_ALIGN(offset)(offset = (offset+1)&0xfffffffe);
6643 /* type_modifier = */ tvb_get_uint16(tvb, offset, encoding);
6644 offset += 2;
6645
6646 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
6647 /* baseTypeCodeKind = */ tvb_get_uint32(tvb, offset, encoding);
6648 offset += 4;
6649
6650 baseTypeCodeLength = tvb_get_uint32(tvb, offset, encoding);
6651 offset += 4;
6652 offset = check_offset_addition(offset, baseTypeCodeLength, tree, NULL((void*)0), tvb);
6653 } else {
6654 typecode_name = "struct";
6655 }
6656
6657 if (seq_max_len != -1) {
6658 /* We're dissecting a sequence of struct, bypass the seq definition */
6659 snprintf(type_name, 40, "%s", struct_name);
6660 break;
6661 }
6662 /* Prints it */
6663 proto_tree_add_string_format(tree, hf_rtps_struct, tvb, original_offset, retVal, struct_name,
6664 "%s%s %s {", indent_string, typecode_name, struct_name);
6665
6666 /* PAD align */
6667 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
6668
6669 /* number of members */
6670 num_members = tvb_get_uint32(tvb, offset, encoding);
6671 offset += 4;
6672
6673 next_offset = offset;
6674 for (i = 0; i < num_members; ++i) {
6675 uint8_t *member_name;
6676 uint32_t member_name_len;
6677 uint16_t member_length;
6678 uint32_t field_offset_begin;
6679
6680 /* Safety: this theoretically should be the same already */
6681 field_offset_begin = offset = next_offset;
6682
6683 SHORT_ALIGN(offset)(offset = (offset+1)&0xfffffffe);
6684
6685 /* member's length */
6686 member_length = tvb_get_uint16(tvb, offset, encoding);
6687 offset += 2;
6688 next_offset = offset + member_length;
6689
6690 /* Name length */
6691 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
6692 member_name_len = tvb_get_uint32(tvb, offset, encoding);
6693 offset += 4;
6694
6695 /* Name */
6696 member_name = tvb_get_string_enc(pinfo->pool, tvb, offset, member_name_len, ENC_ASCII0x00000000);
6697 offset += member_name_len;
6698
6699 if (tk_id == RTI_CDR_TK_ENUM) {
6700 /* ordinal number */
6701 uint32_t ordinal_number;
6702 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
6703 ordinal_number = tvb_get_uint32(tvb, offset, encoding);
6704 offset += 4;
6705
6706 proto_tree_add_string_format(tree, hf_rtps_member_name, tvb, field_offset_begin, (offset-field_offset_begin), member_name,
6707 "%s %s = %d;", indent_string, member_name, ordinal_number);
6708 } else {
6709 /* Structs */
6710 uint16_t member_bitfield;
6711 uint8_t member_is_pointer;
6712 uint8_t member_is_key;
6713
6714 /* is Pointer ? */
6715 member_is_pointer = tvb_get_uint8(tvb, offset);
6716 offset++;
6717
6718 /* Bitfield */
6719 SHORT_ALIGN(offset)(offset = (offset+1)&0xfffffffe);
6720 member_bitfield = tvb_get_uint16(tvb, offset, encoding);
6721 offset += 2; /* pad will be added by typecode dissector */
6722
6723 /* is Key ? */
6724 member_is_key = tvb_get_uint8(tvb, offset);
6725 offset++;
6726
6727 increment_dissection_depth(pinfo);
6728 offset += rtps_util_add_typecode(tree, tvb, pinfo, offset, encoding,
6729 indent_level+1, member_is_pointer, member_bitfield, member_is_key,
6730 field_offset_begin, member_name, -1, NULL((void*)0), ndds_40_hack);
6731 decrement_dissection_depth(pinfo);
6732 }
6733 }
6734 /* Finally prints the name of the struct (if provided) */
6735 (void) g_strlcpy(type_name, "}", sizeof(type_name));
6736 break;
6737 }
6738
6739 case RTI_CDR_TK_WSTRING:
6740 case RTI_CDR_TK_STRING: {
6741 /* Structure of the typecode data:
6742 * Offset | Size | Field | Notes
6743 * ----------|-------|------------------------------|---------------------
6744 * 6 | 2 | pad |
6745 * 8 | 4 | String length | 4-bytes aligned
6746 */
6747 uint32_t string_length;
6748
6749 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
6750 string_length = tvb_get_uint32(tvb, offset, encoding);
6751 offset += 4;
6752 snprintf(type_name, 40, "%s<%d>",
6753 (tk_id == RTI_CDR_TK_STRING) ? "string" : "wstring",
6754 string_length);
6755 break;
6756 }
6757
6758 case RTI_CDR_TK_SEQUENCE: {
6759 /* Structure of the typecode data:
6760 *
6761 * - A4: 4: Sequence max length
6762 * - the sequence typecode
6763 */
6764 uint32_t seq_max_len2;
6765 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
6766 seq_max_len2 = tvb_get_uint32(tvb, offset, encoding);
6767 offset += 4;
6768
6769 /* Recursive decode seq typecode */
6770 /*offset += */rtps_util_add_typecode(tree, tvb, pinfo, offset, encoding, indent_level,
6771 is_pointer, bitfield, is_key, offset_begin, name,
6772 seq_max_len2, NULL((void*)0), ndds_40_hack);
6773 /* Differently from the other typecodes, the line has been already printed */
6774 return retVal;
6775 }
6776
6777 case RTI_CDR_TK_ARRAY: {
6778 /* Structure of the typecode data:
6779 *
6780 * - A4: 4: number of dimensions
6781 * - A4: 4: dim1
6782 * - <A4: 4: dim2>
6783 * - ...
6784 * - the array typecode
6785 */
6786 uint32_t size[MAX_ARRAY_DIMENSION10]; /* Max dimensions */
6787 uint32_t dim_max;
6788
6789 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
6790 dim_max = tvb_get_uint32(tvb, offset, encoding);
6791 offset += 4;
6792
6793 if (dim_max > MAX_ARRAY_DIMENSION10) {
6794 /* We don't have a tree item to add expert info to... */
6795 dim_max = MAX_ARRAY_DIMENSION10;
6796 }
6797
6798 for (i = 0; i < MAX_ARRAY_DIMENSION10; ++i) size[i] = 0;
6799 for (i = 0; i < dim_max; ++i) {
6800 size[i] = tvb_get_uint32(tvb, offset, encoding);
6801 offset += 4;
6802 }
6803
6804 /* Recursive decode seq typecode */
6805 increment_dissection_depth(pinfo);
6806 /*offset += */rtps_util_add_typecode(tree, tvb, pinfo, offset, encoding,
6807 indent_level, is_pointer, bitfield, is_key, offset_begin,
6808 name, -1, size, ndds_40_hack);
6809 decrement_dissection_depth(pinfo);
6810 /* Differently from the other typecodes, the line has been already printed */
6811 return retVal;
6812 }
6813
6814 case RTI_CDR_TK_ALIAS: {
6815 /* Structure of the typecode data:
6816 *
6817 * - A4: 4: alias name size
6818 * - A4: 4: alias name
6819 * - A4: 4: the alias typecode
6820 */
6821 uint32_t alias_name_length;
6822 uint8_t *alias_name;
6823
6824 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
6825 alias_name_length = tvb_get_uint32(tvb, offset, encoding);
6826 offset += 4;
6827 alias_name = tvb_get_string_enc(pinfo->pool, tvb, offset, alias_name_length, ENC_ASCII0x00000000);
6828 offset = check_offset_addition(offset, alias_name_length, tree, NULL((void*)0), tvb);
6829 (void) g_strlcpy(type_name, alias_name, sizeof(type_name));
6830 break;
6831 }
6832
6833
6834 /*
6835 * VALUETYPES:
6836 * - A4: 4: name length
6837 * - n: name
6838 * - A2: type modifier
6839 * - A4: base type code
6840 * - A4: number of members
6841 * Foreach member: (it's just like a struct)
6842 *
6843 */
6844 case RTI_CDR_TK_VALUE_PARAM:
6845 case RTI_CDR_TK_VALUE: {
6846 /* Not fully dissected for now */
6847 /* Pad-align */
6848 uint32_t value_name_len;
6849 int8_t *value_name;
6850 const char *type_id_name = "valuetype";
6851 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
6852
6853 /* Get structure name length */
6854 value_name_len = tvb_get_uint32(tvb, offset, encoding);
6855 offset += 4;
6856
6857 /* value name */
6858 value_name = tvb_get_string_enc(pinfo->pool, tvb, offset, value_name_len, ENC_ASCII0x00000000);
6859 offset = check_offset_addition(offset, value_name_len, tree, NULL((void*)0), tvb);
6860
6861 if (tk_id == RTI_CDR_TK_VALUE_PARAM) {
6862 type_id_name = "valueparam";
6863 }
6864 snprintf(type_name, sizeof(type_name), "%s '%s'", type_id_name, value_name);
6865 break;
6866 }
6867 } /* switch(tk_id) */
6868
6869 /* Sequence print */
6870 if (seq_max_len != -1) {
6871 proto_tree_add_string_format(tree, hf_rtps_sequence, tvb, offset_begin, (offset-offset_begin), type_name,
6872 "%ssequence<%s, %d> %s%s;%s", indent_string, type_name, seq_max_len,
6873 is_pointer ? "*" : "",
6874 name ? name : "",
6875 is_key ? KEY_COMMENT(" //@key") : "");
6876 return retVal;
6877 }
6878
6879 /* Array print */
6880 if (arr_dimension != NULL((void*)0)) {
6881 /* Printing an array */
6882 wmem_strbuf_t *dim_str = wmem_strbuf_create(pinfo->pool)wmem_strbuf_new(pinfo->pool, "");
6883 for (i = 0; i < MAX_ARRAY_DIMENSION10; ++i) {
6884 if (arr_dimension[i] != 0) {
6885 wmem_strbuf_append_printf(dim_str, "[%d]", arr_dimension[i]);
6886 } else {
6887 break;
6888 }
6889 }
6890 proto_tree_add_string_format(tree, hf_rtps_array, tvb, offset_begin, (offset-offset_begin), type_name,
6891 "%s%s %s%s;%s", indent_string, type_name, name ? name : "",
6892 wmem_strbuf_get_str(dim_str), is_key ? KEY_COMMENT(" //@key") : "");
6893 return retVal;
6894 }
6895
6896 /* Bitfield print */
6897 if (bitfield != 0xffff && name != NULL((void*)0) && is_pointer == 0) {
6898 proto_tree_add_string_format(tree, hf_rtps_bitfield, tvb, offset_begin, (offset-offset_begin), type_name,
6899 "%s%s %s:%d;%s", indent_string, type_name, name,
6900 bitfield, is_key ? KEY_COMMENT(" //@key") : "");
6901 return retVal;
6902 }
6903
6904 /* Everything else */
6905 proto_tree_add_string_format(tree, hf_rtps_datatype, tvb, offset_begin, (offset-offset_begin), type_name,
6906 "%s%s%s%s%s;%s", indent_string, type_name,
6907 name ? " " : "",
6908 is_pointer ? "*" : "",
6909 name ? name : "",
6910 is_key ? KEY_COMMENT(" //@key") : "");
6911 return retVal;
6912}
6913
6914static int rtps_util_add_type_id(proto_tree *tree, packet_info* pinfo,
6915 tvbuff_t * tvb, int offset, const unsigned encoding,
6916 int zero, int hf_base, proto_item * append_info_item,
6917 uint64_t * type_id) {
6918 proto_item * ti;
6919 uint16_t short_number;
6920 uint64_t longlong_number;
6921 int hf_type;
6922 short_number = tvb_get_uint16(tvb, offset, encoding);
6923 ti = proto_tree_add_item(tree, hf_rtps_type_object_type_id_disc, tvb, offset, 2, encoding);
6924 proto_item_set_hidden(ti);
6925
6926 /* Here we choose the proper hf item to use */
6927 if (hf_base != -1) {
6928 if (short_number <= 13)
6929 hf_type = hf_rtps_type_object_base_primitive_type_id;
6930 else
6931 hf_type = hf_rtps_type_object_base_type;
6932 } else {
6933 if (short_number <= 13)
6934 hf_type = hf_rtps_type_object_primitive_type_id;
6935 else
6936 hf_type = hf_rtps_type_object_type_id;
6937 }
6938
6939 offset += 2;
6940 if (short_number <= 13) {
6941 proto_tree_add_item(tree, hf_type, tvb, offset, 2, encoding);
6942 if (append_info_item) {
6943 proto_item_append_text(append_info_item, "(%s)",
6944 val_to_str(pinfo->pool, short_number, type_object_kind, "(0x%016x)"));
6945 }
6946 offset += 2;
6947 } else {
6948 ALIGN_ZERO(offset, 8, zero)(offset -= zero, offset = (((offset) + ((8) - 1)) & ~((8)
- 1)), offset += zero)
;
6949 longlong_number = tvb_get_uint64(tvb, offset, encoding);
6950 proto_tree_add_item(tree, hf_type, tvb, offset, 8, encoding);
6951 if (append_info_item) {
6952 proto_item_append_text(append_info_item, "(0x%016" PRIx64"l" "x" ")", longlong_number);
6953 }
6954 offset += 8;
6955 }
6956
6957 if (short_number <= 13) {
6958 if (type_id) {
6959 *type_id = short_number;
6960 }
6961 } else {
6962 if (type_id) {
6963 *type_id = longlong_number;
6964 }
6965 }
6966 return offset;
6967}
6968
6969static int rtps_util_add_type_annotation_usage(proto_tree *tree,
6970 tvbuff_t * tvb, packet_info* pinfo, int offset, const unsigned encoding, int zero) {
6971 uint32_t long_number, i;
6972 uint16_t short_number;
6973 offset = rtps_util_add_type_id(tree, pinfo, tvb, offset, encoding, zero, -1, NULL((void*)0), NULL((void*)0));
6974 long_number = tvb_get_uint32(tvb, offset, encoding);
6975 offset += 4;
6976 for (i = 0; i < long_number; i++) {
6977 proto_tree_add_item(tree, hf_rtps_type_object_member_id, tvb, offset, 4, encoding);
6978 offset += 4;
6979 short_number = tvb_get_uint16(tvb, offset, encoding);
6980 proto_tree_add_item(tree, hf_rtps_type_object_annotation_value_d, tvb, offset, 2, encoding);
6981 offset += 2;
6982 /* There may be more additions in the future */
6983 switch (short_number) {
6984 case 4: /* UINT_16 */
6985 proto_tree_add_item(tree, hf_rtps_type_object_annotation_value_16, tvb, offset, 2, encoding);
6986 offset += 2;
6987 break;
6988 default:
6989 break;
6990 }
6991
6992 }
6993 return offset;
6994}
6995
6996static int rtps_util_add_type_library_type(proto_tree *tree, packet_info* pinfo,
6997 tvbuff_t * tvb, int offset, const unsigned encoding, dissection_info *info) {
6998 proto_tree * annotation_tree;
6999 uint32_t member_id = 0, member_length = 0, long_number, i;
7000 int offset_tmp;
7001 uint16_t short_number;
7002 char * name = NULL((void*)0);
7003 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);
7004 offset_tmp = offset;
7005
7006 /* dissect property */
7007 short_number = tvb_get_uint16(tvb, offset_tmp, encoding);
7008 proto_tree_add_bitmask_value(tree, tvb, offset_tmp, hf_rtps_type_object_flags,
7009 ett_rtps_flags, TYPE_FLAG_FLAGS, short_number);
7010 if (info) {
7011 if (short_number & 0x02)
7012 info->extensibility = EXTENSIBILITY_MUTABLE;
7013 else if (short_number & 0x01)
7014 info->extensibility = EXTENSIBILITY_FINAL;
7015 else
7016 info->extensibility = EXTENSIBILITY_EXTENSIBLE;
7017 }
7018 offset_tmp += 2;
7019 if (info)
7020 offset_tmp = rtps_util_add_type_id(tree, pinfo, tvb, offset_tmp, encoding, offset, -1, tree, &(info->type_id));
7021 else
7022 offset_tmp = rtps_util_add_type_id(tree, pinfo, tvb, offset_tmp, encoding, offset, -1, tree, NULL((void*)0));
7023 rtps_util_add_string(tree, tvb, offset_tmp, hf_rtps_type_object_type_property_name,
7024 encoding);
7025 long_number = tvb_get_uint32(tvb, offset_tmp, encoding);
7026 name = tvb_get_string_enc(pinfo->pool, tvb, offset_tmp + 4, long_number, ENC_ASCII0x00000000);
7027 if (info)
7028 (void) g_strlcpy(info->member_name, name, sizeof(info->member_name));
7029
7030 proto_item_append_text(tree, " %s", name);
7031 offset = check_offset_addition(offset, member_length, tree, NULL((void*)0), tvb);
7032
7033 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);
7034 offset_tmp = offset;
7035
7036 /* dissect annotation_seq */
7037 long_number = tvb_get_uint32(tvb, offset_tmp, encoding);
7038 annotation_tree = proto_tree_add_subtree_format(tree, tvb, offset_tmp, member_length,
7039 ett_rtps_type_annotation_usage_list, NULL((void*)0), "Annotation Usage Member List (%d elements)",
7040 long_number);
7041 offset_tmp += 4;
7042 for (i = 0; i < long_number ; i++) {
7043 offset_tmp = rtps_util_add_type_annotation_usage(annotation_tree, tvb, pinfo, offset_tmp,
7044 encoding, offset);
7045 }
7046 offset = check_offset_addition(offset, member_length, tree, NULL((void*)0), tvb);
7047
7048 return offset;
7049}
7050
7051static void rtps_util_add_type_element_enumeration(proto_tree *tree, packet_info* pinfo,
7052 tvbuff_t * tvb, int offset, const unsigned encoding, dissection_info * info) {
7053 proto_tree * enumerated_constant;
7054 uint32_t member_id = 0, member_length = 0;
7055 uint32_t long_number, i;
7056 int enum_size, offset_tmp;
7057
7058 offset = rtps_util_add_type_library_type(tree, pinfo, tvb, offset, encoding, info);
7059
7060 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);
7061 /* dissect Bound */
7062 proto_tree_add_item(tree, hf_rtps_type_object_bound, tvb, offset, 4, encoding);
7063 offset = check_offset_addition(offset, member_length, tree, NULL((void*)0), tvb);
7064
7065 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);
7066 /* dissect constant seq */
7067 offset_tmp = offset;
7068 long_number = tvb_get_uint32(tvb, offset_tmp, encoding);
7069 offset_tmp += 4;
7070 for (i = 0; i < long_number; i++) {
7071 char * name = NULL((void*)0);
7072 uint32_t size, value;
7073 enum_size = offset_tmp;
7074 size = tvb_get_uint32(tvb, offset_tmp + 4, encoding);
7075 name = tvb_get_string_enc(pinfo->pool, tvb, offset_tmp + 8, size, ENC_ASCII0x00000000);
7076 value = tvb_get_uint32(tvb, offset_tmp, encoding);
7077 enumerated_constant = proto_tree_add_subtree_format(tree, tvb, offset_tmp, 0,
7078 ett_rtps_type_enum_constant, NULL((void*)0), "%s (%u)", name, value);
7079 proto_tree_add_item(enumerated_constant, hf_rtps_type_object_enum_constant_value, tvb, offset_tmp, 4, encoding);
7080 offset_tmp += 4;
7081 offset_tmp = rtps_util_add_string(enumerated_constant, tvb, offset_tmp, hf_rtps_type_object_enum_constant_name, encoding);
7082 proto_item_set_len(enumerated_constant, offset_tmp - enum_size);
7083 }
7084
7085 info->num_elements = 0;
7086}
7087
7088static void rtps_util_add_type_element_sequence(proto_tree* tree, packet_info* pinfo,
7089 tvbuff_t * tvb, int offset, const unsigned encoding, dissection_info * info) {
7090 uint32_t member_id = 0, member_length = 0;
7091 int zero_alignment;
7092 offset = rtps_util_add_type_library_type(tree, pinfo, tvb, offset, encoding, info);
7093
7094 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);
7095 zero_alignment = offset;
7096 rtps_util_add_type_id(tree, pinfo, tvb, offset, encoding, zero_alignment, -1 , NULL((void*)0), &(info->base_type_id));
7097 offset = check_offset_addition(offset, member_length, tree, NULL((void*)0), tvb);
7098 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);
7099 proto_tree_add_item(tree, hf_rtps_type_object_element_shared, tvb, offset, 1, encoding);
7100 offset = check_offset_addition(offset, member_length, tree, NULL((void*)0), tvb);
7101 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);
7102 /* dissect Bound */
7103 proto_tree_add_item(tree, hf_rtps_type_object_bound, tvb, offset, 4, encoding);
7104 if (info)
7105 info->bound = tvb_get_int32(tvb, offset, encoding);
7106}
7107
7108static void rtps_util_add_type_element_string(proto_tree* tree, packet_info* pinfo,
7109 tvbuff_t * tvb, int offset, const unsigned encoding, dissection_info * info _U___attribute__((unused))) {
7110 uint32_t member_id = 0, member_length = 0;
7111 int zero_alignment;
7112 offset = rtps_util_add_type_library_type(tree, pinfo, tvb, offset, encoding, info);
7113
7114 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);
7115 zero_alignment = offset;
7116 rtps_util_add_type_id(tree, pinfo, tvb, offset, encoding, zero_alignment, -1, NULL((void*)0), NULL((void*)0));
7117 offset = check_offset_addition(offset, member_length, tree, NULL((void*)0), tvb);
7118 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);
7119 proto_tree_add_item(tree, hf_rtps_type_object_element_shared, tvb, offset, 1, encoding);
7120 offset = check_offset_addition(offset, member_length, tree, NULL((void*)0), tvb);
7121 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);
7122 /* dissect Bound */
7123 proto_tree_add_item(tree, hf_rtps_type_object_bound, tvb, offset, 4, encoding);
7124 offset = check_offset_addition(offset, member_length, tree, NULL((void*)0), tvb);
7125}
7126
7127static void rtps_util_add_type_element_array(proto_tree* tree, packet_info* pinfo,
7128 tvbuff_t * tvb, int offset, const unsigned encoding, dissection_info * info _U___attribute__((unused))) {
7129 proto_tree * bound_tree;
7130 uint32_t member_id = 0, member_length = 0;
7131 uint32_t long_number, i;
7132 int zero_alignment, offset_tmp;
7133 offset = rtps_util_add_type_library_type(tree, pinfo, tvb, offset, encoding, info);
7134
7135 /* Dissect Collection Type */
7136 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);
7137 zero_alignment = offset;
7138 rtps_util_add_type_id(tree, pinfo, tvb, offset, encoding, zero_alignment, -1, NULL((void*)0), &(info->base_type_id));
7139 offset = check_offset_addition(offset, member_length, tree, NULL((void*)0), tvb);
7140 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);
7141 proto_tree_add_item(tree, hf_rtps_type_object_element_shared, tvb, offset, 1, encoding);
7142 offset = check_offset_addition(offset, member_length, tree, NULL((void*)0), tvb);
7143 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);
7144
7145 /* dissect Bound sequence */
7146
7147 offset_tmp = offset;
7148 long_number = tvb_get_uint32(tvb, offset_tmp, encoding);
7149 bound_tree = proto_tree_add_subtree_format(tree, tvb, offset_tmp, member_length,
7150 ett_rtps_type_bound_list, NULL((void*)0), "Bounds (%d elements)",
7151 long_number);
7152 offset_tmp += 4;
7153 for (i = 0; i < long_number ; i++) {
7154 proto_tree_add_item(bound_tree, hf_rtps_type_object_bound, tvb, offset_tmp, 4, encoding);
7155 if (info) info->bound = tvb_get_int32(tvb, offset_tmp, encoding);
7156 if (info) info->num_elements = tvb_get_int32(tvb, offset_tmp, encoding);
7157
7158 offset_tmp += 4;
7159 }
7160}
7161
7162static void rtps_util_add_type_element_alias(proto_tree* tree, packet_info* pinfo,
7163 tvbuff_t * tvb, int offset, const unsigned encoding, dissection_info * info) {
7164 uint32_t member_id = 0, member_length = 0;
7165 offset = rtps_util_add_type_library_type(tree, pinfo, tvb, offset, encoding, info);
7166
7167 /* dissect base_type */
7168 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);
7169 rtps_util_add_type_id(tree, pinfo, tvb, offset, encoding, offset, hf_rtps_type_object_base_type, NULL((void*)0), &(info->base_type_id));
7170}
7171
7172static int rtps_util_add_type_member(proto_tree* tree, packet_info* pinfo,
7173 tvbuff_t * tvb, int offset, const unsigned encoding,
7174 dissection_info * info, dissection_element * member_object) {
7175 proto_tree * member_property, *annotation_tree;
7176 uint32_t member_id = 0, member_length = 0;
7177 uint32_t long_number, i;
7178 uint16_t short_number;
7179 uint64_t member_type_id;
7180 int offset_tmp;
7181 char * name = NULL((void*)0);
7182
7183 member_property = proto_tree_add_subtree(tree, tvb, offset, 0,
7184 ett_rtps_type_element, NULL((void*)0), "Member Property");
7185 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);
7186 offset_tmp = offset;
7187 short_number = tvb_get_uint16(tvb, offset_tmp, encoding);
7188 proto_tree_add_bitmask_value(member_property, tvb, offset_tmp, hf_rtps_type_object_flags,
7189 ett_rtps_flags, MEMBER_FLAGS, short_number);
7190 if (member_object) member_object->flags = short_number;
7191 offset_tmp += 2;
7192 ALIGN_ZERO(offset_tmp, 4, offset)(offset_tmp -= offset, offset_tmp = (((offset_tmp) + ((4) - 1
)) & ~((4) - 1)), offset_tmp += offset)
;
7193 proto_tree_add_item(member_property, hf_rtps_type_object_member_id, tvb, offset_tmp, 4, encoding);
7194 member_id = tvb_get_uint32(tvb, offset_tmp, encoding);
7195 offset_tmp += 4;
7196 offset_tmp = rtps_util_add_type_id(member_property, pinfo, tvb, offset_tmp, encoding,
7197 offset, -1, tree, &member_type_id);
7198 rtps_util_add_string(member_property, tvb, offset_tmp, hf_rtps_type_object_name, encoding);
7199 long_number = tvb_get_uint32(tvb, offset_tmp, encoding);
7200 name = tvb_get_string_enc(pinfo->pool, tvb, offset_tmp+4, long_number, ENC_ASCII0x00000000);
7201 proto_item_append_text(tree, " %s (ID: %d)", name, member_id);
7202 if (member_object) {
7203 member_object->member_id = member_id;
7204 (void) g_strlcpy(member_object->member_name, name, sizeof(member_object->member_name));
7205 member_object->type_id = member_type_id;
7206 }
7207 if (info && info->extensibility == EXTENSIBILITY_MUTABLE) {
7208 mutable_member_mapping * mutable_mapping = NULL((void*)0);
7209 mutable_mapping = wmem_new(wmem_file_scope(), mutable_member_mapping)((mutable_member_mapping*)wmem_alloc((wmem_file_scope()), sizeof
(mutable_member_mapping)))
;
7210 (void) g_strlcpy(mutable_mapping->member_name, name, sizeof(mutable_mapping->member_name));
7211 mutable_mapping->struct_type_id = info->type_id;
7212 mutable_mapping->member_type_id = member_type_id;
7213 mutable_mapping->member_id = member_id;
7214 mutable_mapping->key = (mutable_mapping->struct_type_id + mutable_mapping->struct_type_id * mutable_mapping->member_id);
7215 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);
7216 wmem_map_insert(mutable_member_mappings, &(mutable_mapping->key), (void *) mutable_mapping);
7217
7218 }
7219
7220 offset = check_offset_addition(offset, member_length, tree, NULL((void*)0), tvb);
7221
7222 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);
7223 offset_tmp = offset;
7224 long_number = tvb_get_uint32(tvb, offset_tmp, encoding);
7225 annotation_tree = proto_tree_add_subtree_format(tree, tvb, offset_tmp, member_length,
7226 ett_rtps_type_annotation_usage_list, NULL((void*)0), "Annotation Usage Member List (%d elements)",
7227 long_number);
7228 offset_tmp += 4;
7229 for (i = 0; i < long_number ; i++) {
7230 offset_tmp = rtps_util_add_type_annotation_usage(annotation_tree, tvb, pinfo, offset_tmp,
7231 encoding, offset);
7232 }
7233 offset = check_offset_addition(offset, member_length, tree, NULL((void*)0), tvb);
7234
7235 long_number = tvb_get_uint32(tvb, offset, encoding);
7236 if ((long_number & PID_LIST_END(0x3f02)) == PID_LIST_END(0x3f02)) {
7237 offset += 4;
7238 }
7239
7240 return offset;
7241}
7242
7243static int rtps_util_add_type_union_member(proto_tree* tree, packet_info* pinfo,
7244 tvbuff_t * tvb, int offset, const unsigned encoding, uint64_t union_type_id,
7245 bool_Bool is_discriminator, dissection_info * info _U___attribute__((unused))) {
7246 proto_tree * labels;
7247 int long_number, i;
7248 int offset_tmp;
7249 uint32_t member_id = 0, member_length = 0;
7250 dissection_element object;
7251 offset = rtps_util_add_type_member(tree, pinfo, tvb, offset, encoding, NULL((void*)0), &object); //&(info->elements[i])
7252
7253 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);
7254 offset_tmp = offset;
7255
7256 long_number = tvb_get_uint32(tvb, offset_tmp, encoding);
7257
7258 labels = proto_tree_add_subtree_format(tree, tvb, offset_tmp, member_length,
7259 ett_rtps_type_enum_constant, NULL((void*)0), "Labels (%u elements)", long_number);
7260 offset_tmp += 4;
7261 if ((object.flags & 8) == 8) {
7262 union_member_mapping * mapping = NULL((void*)0);
7263
7264 mapping = wmem_new(wmem_file_scope(), union_member_mapping)((union_member_mapping*)wmem_alloc((wmem_file_scope()), sizeof
(union_member_mapping)))
;
7265 (void) g_strlcpy(mapping->member_name, object.member_name, sizeof(mapping->member_name));
7266 mapping->member_type_id = object.type_id;
7267 mapping->discriminator = HASHMAP_DISCRIMINATOR_CONSTANT(-2);
7268 mapping->union_type_id = union_type_id + mapping->discriminator;
7269
7270 wmem_map_insert(union_member_mappings, &(mapping->union_type_id), (void *) mapping);
7271 proto_item_append_text(labels, " Added mapping for discriminator (0x%016" PRIx64"l" "x" ") name = %s",
7272 mapping->union_type_id, mapping->member_name);
7273 }
7274 if (is_discriminator) {
7275 union_member_mapping * mapping = NULL((void*)0);
7276
7277 mapping = wmem_new(wmem_file_scope(), union_member_mapping)((union_member_mapping*)wmem_alloc((wmem_file_scope()), sizeof
(union_member_mapping)))
;
7278 (void) g_strlcpy(mapping->member_name, object.member_name, sizeof(mapping->member_name));
7279 mapping->member_type_id = object.type_id;
7280 mapping->discriminator = -1;
7281 mapping->union_type_id = union_type_id + mapping->discriminator;
7282
7283 wmem_map_insert(union_member_mappings, &(mapping->union_type_id), (void *) mapping);
7284 proto_item_append_text(labels, " Added mapping for discriminator (0x%016" PRIx64"l" "x" ") name = %s",
7285 mapping->union_type_id, mapping->member_name);
7286 }
7287 for (i = 0; i < long_number; i++) {
7288 proto_item * ti;
7289 union_member_mapping * mapping = NULL((void*)0);
7290 uint32_t discriminator_case;
7291
7292 mapping = wmem_new(wmem_file_scope(), union_member_mapping)((union_member_mapping*)wmem_alloc((wmem_file_scope()), sizeof
(union_member_mapping)))
;
7293
7294 discriminator_case = tvb_get_uint32(tvb, offset_tmp, encoding);
7295 ti = proto_tree_add_item(labels, hf_rtps_type_object_union_label, tvb, offset_tmp, 4, encoding);
7296 offset_tmp += 4;
7297
7298 (void) g_strlcpy(mapping->member_name, object.member_name, sizeof(mapping->member_name));
7299 mapping->member_type_id = object.type_id;
7300 mapping->discriminator = discriminator_case;
7301 mapping->union_type_id = union_type_id + discriminator_case;
7302
7303 wmem_map_insert(union_member_mappings, &(mapping->union_type_id), (void *) mapping);
7304 proto_item_append_text(ti, " Added mapping for discriminator (0x%016" PRIx64"l" "x" ") name = %s",
7305 mapping->union_type_id, mapping->member_name);
7306 }
7307
7308 offset = check_offset_addition(offset, member_length, tree, NULL((void*)0), tvb);
7309 long_number = tvb_get_uint32(tvb, offset_tmp, encoding);
7310
7311 if ((long_number & PID_LIST_END(0x3f02)) == PID_LIST_END(0x3f02)) {
7312 offset += 4;
7313 }
7314
7315 return offset;
7316}
7317
7318static void rtps_util_add_type_element_union(proto_tree* tree, packet_info* pinfo,
7319 tvbuff_t * tvb, int offset, const unsigned encoding, dissection_info * info) {
7320 proto_tree * members;
7321 uint32_t member_id = 0, member_length = 0;
7322 uint32_t long_number, i;
7323 int offset_tmp;
7324 offset = rtps_util_add_type_library_type(tree, pinfo, tvb, offset, encoding, info);
7325
7326 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);
7327 offset_tmp = offset;
7328
7329 long_number = tvb_get_uint32(tvb, offset_tmp, encoding);
7330 members = proto_tree_add_subtree(tree, tvb, offset_tmp, -1,
7331 ett_rtps_type_enum_constant, NULL((void*)0), "Members");
7332
7333 offset_tmp += 4;
7334
7335 for (i = 0; i < long_number; i++) {
7336 proto_tree * member = NULL((void*)0);
7337 int offset_member = offset_tmp;
7338 member = proto_tree_add_subtree(members, tvb, offset_tmp, 0,
7339 ett_rtps_type_enum_constant, NULL((void*)0), "Member");
7340 offset_tmp = rtps_util_add_type_union_member(member, pinfo, tvb, offset_tmp, encoding,
7341 info->type_id, (i == 0), info);
7342 proto_item_set_len(member, offset_tmp - offset_member);
7343 }
7344
7345 long_number = tvb_get_uint32(tvb, offset_tmp, encoding);
7346 if ((long_number & PID_LIST_END(0x3f02)) == PID_LIST_END(0x3f02)) {
7347 offset_tmp += 4;
7348 }
7349 proto_item_set_len(members, offset_tmp - offset);
7350}
7351
7352static void rtps_util_add_type_element_struct(proto_tree* tree, packet_info* pinfo,
7353 tvbuff_t * tvb, int offset, const unsigned encoding, dissection_info * info) {
7354 proto_tree * member;
7355 uint32_t member_id = 0, member_length = 0;
7356 uint32_t long_number, i;
7357 int offset_tmp, member_size;
7358 wmem_array_t *elements = NULL((void*)0);
7359 dissection_element zero_element = {0};
7360
7361 offset = rtps_util_add_type_library_type(tree, pinfo, tvb, offset, encoding, info);
7362
7363 /* dissect base_type */
7364 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);
7365 offset = rtps_util_add_type_id(tree, pinfo, tvb, offset, encoding, offset, hf_rtps_type_object_base_type, NULL((void*)0), &(info->base_type_id));
7366
7367 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);
7368 /* dissect seq_member*/
7369
7370 offset_tmp = offset;
7371 long_number = tvb_get_uint32(tvb, offset_tmp, encoding);
7372
7373 offset_tmp += 4;
7374
7375 if (info) {
7376 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))));
7377 }
7378 for (i = 0; i < long_number; i++) {
7379 member_size = offset_tmp;
7380 member = proto_tree_add_subtree(tree, tvb, offset_tmp, 0,
7381 ett_rtps_type_enum_constant, NULL((void*)0), "");
7382 if (info && elements) {
7383 wmem_array_append_one(elements, zero_element)wmem_array_append((elements), &(zero_element), 1);
7384 offset_tmp = rtps_util_add_type_member(member, pinfo, tvb, offset_tmp, encoding, info, wmem_array_index(elements, i));
7385 } else {
7386 offset_tmp = rtps_util_add_type_member(member, pinfo, tvb, offset_tmp, encoding, NULL((void*)0), NULL((void*)0));
7387 }
7388 proto_item_set_len(member, offset_tmp - member_size);
7389 }
7390 if (info) {
7391 info->num_elements = wmem_array_get_count(elements);
7392 info->elements = wmem_array_finalize(elements);
7393 }
7394}
7395
7396static void rtps_util_add_type_library(proto_tree *tree, packet_info * pinfo,
7397 tvbuff_t * tvb, int offset, const unsigned encoding, uint32_t size);
7398
7399// NOLINTNEXTLINE(misc-no-recursion)
7400static void rtps_util_add_type_element_module(proto_tree *tree, packet_info * pinfo,
7401 tvbuff_t * tvb, int offset, const unsigned encoding) {
7402 uint32_t long_number;
7403 char * name = NULL((void*)0);
7404 long_number = tvb_get_uint32(tvb, offset, encoding);
7405 name = tvb_get_string_enc(pinfo->pool, tvb, offset+4, long_number, ENC_ASCII0x00000000);
7406 proto_item_set_text(tree, "module %s", name);
7407 offset = rtps_util_add_string(tree, tvb, offset, hf_rtps_type_object_element_module_name, encoding);
7408 rtps_util_add_type_library(tree, pinfo, tvb, offset, encoding, -1);
7409}
7410
7411// NOLINTNEXTLINE(misc-no-recursion)
7412static int rtps_util_add_type_library_element(proto_tree *tree, packet_info * pinfo,
7413 tvbuff_t * tvb, int offset, const unsigned encoding) {
7414 proto_tree * element_tree;
7415 uint32_t long_number;
7416 uint32_t member_id = 0, member_length = 0;
7417 int initial_offset = offset;
7418 dissection_info * info;
7419 bool_Bool add_info = true1;
7420
7421 info = wmem_new(wmem_file_scope(), dissection_info)((dissection_info*)wmem_alloc((wmem_file_scope()), sizeof(dissection_info
)))
;
7422 info->elements = NULL((void*)0);
7423
7424 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);
7425 long_number = tvb_get_uint32(tvb, offset, encoding);
7426 info->member_kind = long_number;
7427
7428 element_tree = proto_tree_add_subtree(tree, tvb, offset, 0,
7429 ett_rtps_type_element, NULL((void*)0), "");
7430 offset = check_offset_addition(offset, member_length, tree, pinfo, tvb);
7431 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);
7432 proto_item_set_len(element_tree, member_length + offset - initial_offset);
7433 switch (long_number) {
7434 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_ENUMERATION_TYPE: /*ENUMERATION */
7435 rtps_util_add_type_element_enumeration(element_tree, pinfo, tvb, offset, encoding, info);
7436 break;
7437 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_ALIAS_TYPE: /* ALIAS */
7438 rtps_util_add_type_element_alias(element_tree, pinfo, tvb, offset, encoding, info);
7439 break;
7440 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_ARRAY_TYPE: /* ARRAY */
7441 rtps_util_add_type_element_array(element_tree, pinfo, tvb, offset, encoding, info);
7442 break;
7443 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_SEQUENCE_TYPE: /* SEQUENCE */
7444 rtps_util_add_type_element_sequence(element_tree, pinfo, tvb, offset, encoding, info);
7445 break;
7446 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_STRING_TYPE: /* STRING : COLLECTION */
7447 rtps_util_add_type_element_string(element_tree, pinfo, tvb, offset, encoding, info);
7448 break;
7449 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_UNION_TYPE:
7450 rtps_util_add_type_element_union(element_tree, pinfo, tvb, offset, encoding, info);
7451 break;
7452 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_STRUCTURE_TYPE: /* STRUCT */
7453 rtps_util_add_type_element_struct(element_tree, pinfo, tvb, offset, encoding, info);
7454 break;
7455 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_MODULE:
7456 /* This does *not* fill in the info structure, so do *not* add it. */
7457 add_info = false0;
7458 rtps_util_add_type_element_module(element_tree, pinfo, tvb, offset, encoding);
7459 break;
7460 default:
7461 /* We have *not* filled in the info structure, so do *not* add it. */
7462 add_info = false0;
7463 proto_item_append_text(element_tree, "Kind: %u", long_number);
7464 proto_tree_add_item(element_tree, hf_rtps_type_object_element_raw, tvb, offset,
7465 member_length, encoding);
7466 break;
7467 }
7468 offset = check_offset_addition(offset, member_length, tree, NULL((void*)0), tvb);
7469 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
7470 long_number = tvb_get_uint32(tvb, offset, encoding);
7471 if ((long_number & PID_LIST_END(0x3f02)) != PID_LIST_END(0x3f02)) {
7472 expert_add_info_format(pinfo, element_tree, &ei_rtps_parameter_value_invalid,
7473 "Now it should be PID_LIST_END and it is not"); \
7474 }
7475 offset += 4;
7476 proto_item_set_len(element_tree, offset - initial_offset);
7477
7478 if (add_info) {
7479 wmem_map_insert(dissection_infos, &(info->type_id), (void *) info);
7480 }
7481
7482 return offset;
7483}
7484
7485// NOLINTNEXTLINE(misc-no-recursion)
7486static void rtps_util_add_type_library(proto_tree *tree, packet_info * pinfo,
7487 tvbuff_t * tvb, int offset, const unsigned encoding, uint32_t size) {
7488 proto_tree * library_tree;
7489 uint32_t long_number, i;
7490 long_number = tvb_get_uint32(tvb, offset, encoding);
7491 library_tree = proto_tree_add_subtree_format(tree, tvb, offset, size,
7492 ett_rtps_type_library, NULL((void*)0), "Type Library (%d elements)", long_number);
7493 offset += 4;
7494 increment_dissection_depth(pinfo);
7495 for (i = 0; i < long_number; i++) {
7496 offset = rtps_util_add_type_library_element(library_tree, pinfo, tvb,
7497 offset, encoding);
7498 }
7499 decrement_dissection_depth(pinfo);
7500}
7501
7502static void rtps_util_add_typeobject(proto_tree *tree, packet_info * pinfo,
7503 tvbuff_t * tvb, int offset, const unsigned encoding, uint32_t size,
7504 type_mapping * type_mapping_object ) {
7505 proto_tree * typeobject_tree;
7506 int offset_tmp = 0;
7507 uint32_t member_id = 0, member_length = 0;
7508 uint32_t long_number;
7509 uint64_t type_id;
7510
7511 typeobject_tree = proto_tree_add_subtree(tree, tvb, offset, size,
7512 ett_rtps_type_object, NULL((void*)0), "Type Object");
7513 /* --- This is the standard parameterized serialization --- */
7514 /* TypeLibrary */
7515 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);
7516 offset_tmp = offset;
7517 /* Dissect the member */
7518 rtps_util_add_type_library(typeobject_tree, pinfo, tvb, offset_tmp, encoding, member_length);
7519 offset = check_offset_addition(offset, member_length, tree, pinfo, tvb);
7520 /* End TypeLibrary */
7521
7522 /* _TypeId */
7523 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);
7524 offset_tmp = offset;
7525 /* Dissect the member. In this case, the typeid is an union with a short
7526 * as a discriminator*/
7527 rtps_util_add_type_id(typeobject_tree, pinfo, tvb, offset_tmp, encoding, offset, -1, NULL((void*)0), &type_id);
7528 if (type_mapping_object) type_mapping_object->type_id = type_id;
7529 offset = check_offset_addition(offset, member_length, tree, pinfo, tvb);
7530 /* End _TypeId */
7531
7532 long_number = tvb_get_uint32(tvb, offset, encoding);
7533 if ((long_number & PID_LIST_END(0x3f02)) != PID_LIST_END(0x3f02)) {
7534 expert_add_info_format(pinfo, typeobject_tree, &ei_rtps_parameter_value_invalid,
7535 "This should be PID_LIST_END and it is not"); \
7536 }
7537
7538}
7539
7540/**
7541 * @brief Add an XCDR2 delimited header to the protocol tree:
7542 * Format used in XCDR2 extensible types where a 32-bit length prefix
7543 * indicates the size of the following data structure.
7544 *
7545 * @param tree Protocol tree where the header will be added
7546 * @param tvb The buffer containing the data
7547 * @param offset Current offset in the buffer
7548 * @return The new offset after the delimited header
7549 */
7550static int rtps_util_add_xcdr2_delimited_header(proto_tree* tree, tvbuff_t* tvb,
7551 int offset)
7552{
7553 /*
7554 * 0...2...........7...............15.............23...............31
7555 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
7556 * | delimited header |
7557 * +---------------+---------------+---------------+---------------+
7558 */
7559
7560 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
7561
7562 if (enable_debug_info)
7563 {
7564 proto_tree_add_item(tree, hf_rtps_xcdr2_delimited_header, tvb, offset, 4,
7565 ENC_LITTLE_ENDIAN0x80000000);
7566 }
7567 return offset + 4;
7568}
7569
7570/**
7571 * @brief Dissect an XCDR2 enhanced mutable header (EMHEADER)
7572 *
7573 * This function handles the dissection of an XCDR2 enhanced mutable header
7574 * following the OMG XTypes 1.3 specification. It processes the header fields,
7575 * including the EMHeader value, must understand flag, length code, and member ID.
7576 * For length codes greater than 3, it also processes the NEXTINT field which
7577 * contains additional information.
7578 *
7579 * @param tree Protocol tree to add the enhanced mutable header elements to
7580 * @param tvb The tv buffer containing packet data
7581 * @param offset The current offset in the tvb
7582 * @return The new offset after parsing the enhanced mutable header
7583 */
7584static int rtps_util_add_xcdr2_enhanced_mutable_header(proto_tree* tree,
7585 tvbuff_t* tvb, int offset)
7586{
7587 /*
7588 * 0...2...........7...............15.............23...............31
7589 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
7590 * | member ID |LC |M|
7591 * +---------------+---------------+---------------+---------------+
7592 * | NEXTINT |
7593 * +---------------+---------------+---------------+---------------+
7594 * M = Must Understand bit
7595 * LC = Length Code (3 bits)
7596 */
7597
7598 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
7599 const uint32_t header = tvb_get_uint32(tvb, offset, ENC_LITTLE_ENDIAN0x80000000);
7600
7601 if (enable_debug_info)
7602 {
7603 proto_tree_add_bitmask(tree, tvb, offset,
7604 hf_rtps_xcdr2_enhanced_mutable_header, ett_rtps_flags,
7605 EMHEADER, ENC_LITTLE_ENDIAN0x80000000);
7606 }
7607
7608 offset += 4;
7609
7610 /*
7611 * LC 0..3: no NEXTINT; LC 4..7: NEXTINT follows; LC 4 adds an extra 32-bit
7612 * length; for LC 5..7 the NEXTINT value is reused as the payload’s leading length.
7613 */
7614 const uint32_t length_code = (header & 0x70000000) >> 28;
7615 if (length_code <= 3)
7616 {
7617 return offset;
7618 }
7619
7620 if (enable_debug_info)
7621 {
7622 /* NEXTINT */
7623 proto_tree_add_item(tree, hf_rtps_xcdr2_nextint, tvb, offset, 4,
7624 ENC_LITTLE_ENDIAN0x80000000);
7625 }
7626 offset += 4;
7627
7628 if (length_code == 4)
7629 {
7630 /* LC == 4 has an additional 32-bit length after NEXTINT */
7631 if (enable_debug_info)
7632 {
7633 const uint32_t len4 = tvb_get_uint32(tvb, offset, ENC_LITTLE_ENDIAN0x80000000);
7634 proto_tree_add_uint_format_value(tree, hf_rtps_xcdr2_nextint, tvb, offset, 4,
7635 len4, "length (LC=4): %u", len4);
7636 }
7637 offset += 4;
7638 }
7639
7640 return offset;
7641}
7642
7643/**
7644 * @brief Add TypeIdentifier to the protocol tree per XTypes v1.3
7645 *
7646 * @details The TypeIdentifier is one of the core structures of the XTypes specification,
7647 * used to identify and reference types. It can identify primitive types like
7648 * int32, or more complex types like structures, arrays, etc.
7649 *
7650 * This function parses the type identifier discriminator and its associated data,
7651 * recursively processing nested type identifiers when present.
7652 *
7653 * @param tree The protocol tree where this element will be added
7654 * @param pinfo Packet info
7655 * @param tvb The buffer containing the data
7656 * @param offset The current offset in the buffer
7657 * @param isBaseType TRUE if this is a base type identifier (for structures)
7658 * @return The new offset after the type identifier has been processed
7659 */
7660// Recursion is required for parsing nested TypeIdentifiers in RTPS.
7661// NOLINTNEXTLINE(misc-no-recursion)
7662static int rtps_util_add_type_id_v2(proto_tree *tree, packet_info *pinfo,
7663 tvbuff_t *tvb, int offset, bool_Bool isBaseType)
7664{
7665 /* Create subtree for TypeIdentifier */
7666 proto_item* ti_item;
7667 proto_tree* ti_tree = proto_tree_add_subtree(tree, tvb, offset, -1,
7668 ett_rtps_type_id, &ti_item, isBaseType ? "Base Type Id" : "Type Id");
7669 const int initial_offset = offset;
7670
7671 /* Read the discriminator (first octet) */
7672 const uint8_t type_kind_discriminator = tvb_get_uint8(tvb, offset);
7673 proto_tree_add_item(ti_tree,
7674 isBaseType
7675 ? hf_rtps_base_type_id_discriminator
7676 : hf_rtps_type_id_discriminator, tvb, offset, 1, ENC_NA0x00000000);
7677 offset++;
7678
7679 /* Handle the different TypeIdentifier cases based on discriminator */
7680 switch (type_kind_discriminator)
7681 {
7682 /* Primitive types - no additional data */
7683 case TK_NONE(0x00):
7684 case TK_BOOLEAN(0x01):
7685 case TK_BYTE(0x02):
7686 case TK_INT8(0x0C):
7687 case TK_INT16(0x03):
7688 case TK_INT32(0x04):
7689 case TK_INT64(0x05):
7690 case TK_UINT8(0x0D):
7691 case TK_UINT16(0x06):
7692 case TK_UINT32(0x07):
7693 case TK_UINT64(0x08):
7694 case TK_FLOAT32(0x09):
7695 case TK_FLOAT64(0x0A):
7696 case TK_FLOAT128(0x0B):
7697 case TK_CHAR8(0x10):
7698 case TK_CHAR16(0x11):
7699 /* These cases have no additional data */
7700 break;
7701
7702 /* String types with small bounds */
7703 case TI_STRING8_SMALL(0x70):
7704 case TI_STRING16_SMALL(0x72):
7705 /* StringSTypeDefn: SBound (1 byte) */
7706 proto_tree_add_item(ti_tree, hf_rtps_type_bound, tvb, offset, 1,
7707 ENC_LITTLE_ENDIAN0x80000000);
7708 offset += 1;
7709 break;
7710
7711 /* String types with large bounds */
7712 case TI_STRING8_LARGE(0x71):
7713 case TI_STRING16_LARGE(0x73):
7714 /* StringLTypeDefn: LBound (4 bytes) */
7715 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
7716 proto_tree_add_item(ti_tree, hf_rtps_type_bound, tvb, offset, 4,
7717 ENC_LITTLE_ENDIAN0x80000000);
7718 offset += 4;
7719 break;
7720
7721 /* Sequence types with small bounds */
7722 case TI_PLAIN_SEQUENCE_SMALL(0x80):
7723 /* PlainSequenceSElemDefn */
7724 /* PlainCollectionHeader */
7725 proto_tree_add_item(ti_tree, hf_rtps_type_equiv_kind, tvb, offset, 1,
7726 ENC_LITTLE_ENDIAN0x80000000);
7727 offset += 1;
7728 proto_tree_add_item(ti_tree, hf_rtps_type_element_flags, tvb, offset, 2,
7729 ENC_LITTLE_ENDIAN0x80000000);
7730 offset += 2;
7731
7732 /* SBound (1 byte) */
7733 proto_tree_add_item(ti_tree, hf_rtps_type_bound, tvb, offset, 1,
7734 ENC_LITTLE_ENDIAN0x80000000);
7735 offset += 1;
7736
7737 /* element_identifier (recursive TypeIdentifier) */
7738 offset = rtps_util_add_type_id_v2(ti_tree, pinfo, tvb, offset, false0);
7739 break;
7740
7741 /* Sequence types with large bounds */
7742 case TI_PLAIN_SEQUENCE_LARGE(0x81):
7743 /* Similar to small sequence but with LBound (4 bytes) */
7744 /* PlainCollectionHeader */
7745 proto_tree_add_item(ti_tree, hf_rtps_type_equiv_kind, tvb, offset, 1,
7746 ENC_LITTLE_ENDIAN0x80000000);
7747 offset += 1;
7748 proto_tree_add_item(ti_tree, hf_rtps_type_element_flags, tvb, offset, 2,
7749 ENC_LITTLE_ENDIAN0x80000000);
7750 offset += 2;
7751
7752 /* LBound (4 bytes) */
7753 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
7754 proto_tree_add_item(ti_tree, hf_rtps_type_bound, tvb, offset, 4,
7755 ENC_LITTLE_ENDIAN0x80000000);
7756 offset += 4;
7757
7758 /* element_identifier (recursive TypeIdentifier) */
7759 offset = rtps_util_add_type_id_v2(ti_tree, pinfo, tvb, offset, false0);
7760 break;
7761
7762 /* Array types with small bounds */
7763 case TI_PLAIN_ARRAY_SMALL(0x90):
7764 /* PlainArraySElemDefn */
7765 /* PlainCollectionHeader */
7766 proto_tree_add_item(ti_tree, hf_rtps_type_equiv_kind, tvb, offset, 1,
7767 ENC_LITTLE_ENDIAN0x80000000);
7768 offset += 1;
7769 proto_tree_add_item(ti_tree, hf_rtps_type_element_flags, tvb, offset, 2,
7770 ENC_LITTLE_ENDIAN0x80000000);
7771 offset += 2;
7772 /* array_bound_seq (sequence of SBound, 1 byte each) */
7773 {
7774 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
7775 const uint32_t bound_seq_len = tvb_get_uint32(tvb, offset, ENC_LITTLE_ENDIAN0x80000000);
7776 proto_tree* arr_tree = proto_tree_add_subtree_format(ti_tree, tvb, offset,
7777 4 + bound_seq_len, ett_rtps_type_bound_seq, NULL((void*)0), "Array Bounds [%u]",
7778 bound_seq_len);
7779 offset += 4;
7780
7781 for (uint32_t i = 0; i < bound_seq_len; i++)
7782 {
7783 uint32_t bound;
7784 proto_item* bound_it = proto_tree_add_item_ret_uint(arr_tree,
7785 hf_rtps_type_bound, tvb, offset, 1, ENC_LITTLE_ENDIAN0x80000000, &bound);
7786 proto_item_set_text(bound_it, "Bound [%u]: %u", i, bound);
7787 offset += 1;
7788 }
7789 }
7790
7791 /* element_identifier (recursive TypeIdentifier) */
7792 offset = rtps_util_add_type_id_v2(ti_tree, pinfo, tvb, offset, false0);
7793 break;
7794
7795 /* Array types with large bounds */
7796 case TI_PLAIN_ARRAY_LARGE(0x91):
7797 /* Similar to small array but with LBound sequence */
7798 /* PlainCollectionHeader */
7799 proto_tree_add_item(ti_tree, hf_rtps_type_equiv_kind, tvb, offset, 1,
7800 ENC_LITTLE_ENDIAN0x80000000);
7801 offset += 1;
7802 proto_tree_add_item(ti_tree, hf_rtps_type_element_flags, tvb, offset, 2,
7803 ENC_LITTLE_ENDIAN0x80000000);
7804 offset += 2;
7805
7806 /* array_bound_seq (sequence of LBound, 4 bytes each) */
7807 {
7808 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
7809 const uint32_t bound_seq_len = tvb_get_uint32(tvb, offset, ENC_LITTLE_ENDIAN0x80000000);
7810 proto_tree* arr_tree = proto_tree_add_subtree_format(ti_tree, tvb, offset,
7811 4 + (bound_seq_len * 4), ett_rtps_type_bound_seq, NULL((void*)0), "Array Bounds [%u]",
7812 bound_seq_len);
7813 offset += 4;
7814
7815 for (uint32_t i = 0; i < bound_seq_len; i++)
7816 {
7817 uint32_t bound;
7818 proto_item* bound_it = proto_tree_add_item_ret_uint(arr_tree,
7819 hf_rtps_type_bound, tvb, offset, 4, ENC_LITTLE_ENDIAN0x80000000, &bound);
7820 proto_item_set_text(bound_it, "Bound [%u]: %u", i, bound);
7821 offset += 4;
7822 }
7823 }
7824
7825 /* element_identifier (recursive TypeIdentifier) */
7826 offset = rtps_util_add_type_id_v2(ti_tree, pinfo, tvb, offset, false0);
7827 break;
7828
7829 /* Map types */
7830 case TI_PLAIN_MAP_SMALL(0xA0):
7831 /* PlainMapSTypeDefn */
7832 /* PlainCollectionHeader header */
7833 proto_tree_add_item(ti_tree, hf_rtps_type_equiv_kind, tvb, offset, 1,
7834 ENC_NA0x00000000);
7835 offset += 1;
7836 proto_tree_add_item(ti_tree, hf_rtps_type_element_flags, tvb, offset, 2,
7837 ENC_LITTLE_ENDIAN0x80000000);
7838 offset += 2;
7839
7840 /* SBound (1 byte) */
7841 proto_tree_add_item(ti_tree, hf_rtps_type_bound, tvb, offset, 1,
7842 ENC_LITTLE_ENDIAN0x80000000);
7843 offset += 1;
7844
7845 /* element_identifier (recursive TypeIdentifier) */
7846 offset = rtps_util_add_type_id_v2(ti_tree, pinfo, tvb, offset, false0);
7847
7848 /* key_flags */
7849 SHORT_ALIGN(offset)(offset = (offset+1)&0xfffffffe);
7850 proto_tree_add_item(ti_tree, hf_rtps_type_element_flags, tvb, offset, 2,
7851 ENC_LITTLE_ENDIAN0x80000000);
7852 offset += 2;
7853
7854 /* key_identifier (recursive TypeIdentifier) */
7855 offset = rtps_util_add_type_id_v2(ti_tree, pinfo, tvb, offset, false0);
7856 break;
7857
7858 case TI_PLAIN_MAP_LARGE(0xA1):
7859 /* PlainMapLTypeDefn */
7860 /* PlainCollectionHeader */
7861 proto_tree_add_item(ti_tree, hf_rtps_type_equiv_kind, tvb, offset, 1,
7862 ENC_NA0x00000000);
7863 offset += 1;
7864 proto_tree_add_item(ti_tree, hf_rtps_type_element_flags, tvb, offset, 2,
7865 ENC_LITTLE_ENDIAN0x80000000);
7866 offset += 2;
7867
7868 /* LBound (4 bytes) */
7869 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
7870 proto_tree_add_item(ti_tree, hf_rtps_type_bound, tvb, offset, 4,
7871 ENC_LITTLE_ENDIAN0x80000000);
7872 offset += 4;
7873
7874 /* Read element_identifier (recursive TypeIdentifier) */
7875 offset = rtps_util_add_type_id_v2(ti_tree, pinfo, tvb, offset, false0);
7876
7877 /* key_flags */
7878 proto_tree_add_item(ti_tree, hf_rtps_type_element_flags, tvb, offset, 2,
7879 ENC_LITTLE_ENDIAN0x80000000);
7880 offset += 2;
7881
7882 /* key_identifier (recursive TypeIdentifier) */
7883 offset = rtps_util_add_type_id_v2(ti_tree, pinfo, tvb, offset, false0);
7884 break;
7885 /* Strongly connected component (for cyclic dependencies) */
7886 case TI_STRONGLY_CONNECTED_COMPONENT(0xB0):
7887 /* not supported */
7888 /* Parse TypeObjectHashId, etc. */
7889 break;
7890
7891 /* Hash-based type identification */
7892 case EK_COMPLETE(0xF2):
7893 case EK_MINIMAL(0xF1):
7894 /* EquivalenceHash is 14 bytes */
7895 proto_tree_add_item(ti_tree, hf_rtps_type_hash, tvb, offset, 14, ENC_NA0x00000000);
7896 offset += 14;
7897 break;
7898
7899 /* Extended type definition (future use) */
7900 default:
7901 /* ExtendedTypeDefn - currently just a placeholder */
7902 proto_tree_add_item(ti_tree, hf_rtps_type_extended, tvb, offset,
7903 0, ENC_NA0x00000000);
7904 break;
7905 }
7906
7907 proto_item_set_len(ti_item, offset - initial_offset);
7908 return offset;
7909}
7910
7911/**
7912 * @brief Dissect a CompleteTypeDetail structure
7913 *
7914 * The CompleteTypeDetail structure contains:
7915 * - Annotation built-in flags
7916 * - Annotation custom flags
7917 * - Type name
7918 *
7919 * @note Currently assumes that optional annotations are not present.
7920 *
7921 * @param tree Protocol tree to add the detail info
7922 * @param tvb Buffer containing the packet data
7923 * @param offset Current offset in the buffer
7924 * @return New offset after reading the CompleteTypeDetail
7925 */
7926static int rtps_util_add_complete_type_detail(proto_tree* tree, tvbuff_t* tvb,
7927 int offset)
7928{
7929 /*
7930 * 0...2...........7...............15.............23...............31
7931 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
7932 * |has builtin ann|has custom ann | padding |
7933 * +---------------+---------------+---------------+---------------+
7934 * | string length |
7935 * +---------------+---------------+---------------+---------------+
7936 * | type name (length + 1 bytes) ... |
7937 * +---------------+---------------+---------------+---------------+
7938 *
7939 * assumes that optional annotations are not present
7940 *
7941 * IDL
7942 * @extensibility(FINAL) @nested @no_sequence
7943 * struct CompleteTypeDetail {
7944 * @optional AppliedBuiltinTypeAnnotations ann_builtin;
7945 * @optional AppliedAnnotationSeq ann_custom;
7946 * QualifiedTypeName type_name;
7947 * };
7948 */
7949
7950 /* Create subtree for the alias type */
7951 proto_item* complete_type_ti;
7952 proto_tree* complete_type_tree = proto_tree_add_subtree(
7953 tree, tvb, offset, -1, ett_rtps_type_object_v2_complete_type_detail,
7954 &complete_type_ti, "Complete Type Detail");
7955 const int initial_offset = offset;
7956
7957 /* Extract and store annotation built-in flags */
7958 proto_tree_add_item(complete_type_tree,
7959 hf_rtps_type_object_v2_has_ann_builtin, tvb, offset, 1, ENC_LITTLE_ENDIAN0x80000000);
7960 offset++;
7961
7962 /* Extract and store annotation custom flags */
7963 proto_tree_add_item(complete_type_tree, hf_rtps_type_object_v2_has_ann_custom,
7964 tvb, offset, 1, ENC_LITTLE_ENDIAN0x80000000);
7965 offset++;
7966
7967 /* Type name */
7968 offset = rtps_util_add_string_no_align(complete_type_tree, tvb, offset,
7969 hf_rtps_type_object_v2_type_name, ENC_LITTLE_ENDIAN0x80000000);
7970
7971 proto_item_set_len(complete_type_ti, offset - initial_offset);
7972 return offset;
7973}
7974
7975/**
7976 * @brief Dissect an CompleteAliasType or MinimalAliasType type within a TypeObjectV2
7977 *
7978 * @details This function handles the dissection of an ALIAS type from a TypeObjectV2
7979 * following the OMG XTypes 1.3 specification. It processes alias_flags,
7980 * header information (when applicable in COMPLETE mode), and the alias body
7981 * which contains the related type information.
7982 *
7983 * @param tree Protocol tree to add the alias elements to
7984 * @param pinfo Packet info for the current packet
7985 * @param tvb The tv buffer containing packet data
7986 * @param offset The current offset in the tvb
7987 * @param typeobject_discriminator The discriminator (EK_COMPLETE or EK_MINIMAL)
7988 * of the TypeObjectV2 of which this alias is a member.
7989 * @return The new offset after parsing the alias type
7990 */
7991static int rtps_util_add_type_object_v2_alias(proto_tree *tree,
7992 packet_info *pinfo, tvbuff_t *tvb, int offset,
7993 uint8_t typeobject_discriminator)
7994{
7995 /* Create Alias subtree */
7996 proto_item* alias_ti;
7997 proto_tree* alias_tree = proto_tree_add_subtree(tree, tvb, offset, -1,
7998 ett_rtps_type_object_v2_alias, &alias_ti, "Alias Type");
7999 const int initial_offset = offset;
8000
8001 /* AliasTypeFlag alias_flags */
8002 proto_tree_add_bitmask(alias_tree, tvb, offset,
8003 hf_rtps_type_object_v2_type_flags, ett_rtps_flags,
8004 TYPE_FLAGS_V2, ENC_LITTLE_ENDIAN0x80000000);
8005 offset += 2;
8006
8007 /* Delimited header for CompleteAliasHeader/MinimalAliasHeader */
8008 offset = rtps_util_add_xcdr2_delimited_header(alias_tree, tvb, offset);
8009
8010 /* CompleteAliasHeader header (MinimalAliasHeader is empty) */
8011 if (typeobject_discriminator == EK_COMPLETE(0xF2))
8012 {
8013 /* CompleteTypeDetail detail */
8014 offset = rtps_util_add_complete_type_detail(alias_tree, tvb, offset);
8015 }
8016
8017 /* CompleteAliasBody body */
8018 /* CommonAliasBody common */
8019 proto_item* body_ti;
8020 proto_tree* body_tree = proto_tree_add_subtree(alias_tree, tvb, offset, -1,
8021 ett_rtps_type_object_v2_alias_body, &body_ti, "Alias Body");
8022 const int initial_body_offset = offset;
8023
8024 /* Delimited header for CompleteAliasBody/MinimalAliasBody */
8025 offset = rtps_util_add_xcdr2_delimited_header(body_tree, tvb, offset);
8026
8027 /* AliasMemberFlag related_flags */
8028 proto_tree_add_bitmask(body_tree, tvb, offset,
8029 hf_rtps_type_object_v2_member_flags, ett_rtps_flags,
8030 MEMBER_FLAGS_V2, ENC_LITTLE_ENDIAN0x80000000);
8031 offset += 2;
8032
8033 /* TypeIdentifier related_type */
8034 offset = rtps_util_add_type_id_v2(body_tree, pinfo, tvb, offset, false0);
8035
8036 if (typeobject_discriminator == EK_COMPLETE(0xF2))
8037 {
8038 /* annotation built-in flags */
8039 proto_tree_add_item(body_tree, hf_rtps_type_object_v2_has_ann_builtin, tvb,
8040 offset, 1, ENC_NA0x00000000);
8041 offset++;
8042
8043 /* annotation custom flags */
8044 proto_tree_add_item(body_tree, hf_rtps_type_object_v2_has_ann_custom, tvb,
8045 offset, 1, ENC_NA0x00000000);
8046 offset++;
8047 }
8048
8049 proto_item_set_len(body_ti, offset - initial_body_offset);
8050
8051 proto_item_set_len(alias_ti, offset - initial_offset);
8052 return offset;
8053}
8054
8055/* Helper function to dissect an AnnotationParameterValue */
8056static int rtps_util_dissect_annotation_parameter_value(
8057 proto_tree* tree,
8058 tvbuff_t* tvb,
8059 int offset,
8060 const char* label_prefix)
8061{
8062 const uint8_t typekind_discriminator = tvb_get_uint8(tvb, offset);
8063 offset++;
8064
8065 switch (typekind_discriminator)
8066 {
8067 case TK_BOOLEAN(0x01):
8068 {
8069 const uint8_t boolean_value = tvb_get_uint8(tvb, offset);
8070 proto_tree_add_boolean_format_value(tree, hf_rtps_dissection_boolean,
8071 tvb, offset, sizeof(uint8_t), boolean_value, "%s: %u", label_prefix,
8072 boolean_value);
8073 offset += sizeof(uint8_t);
8074 break;
8075 }
8076 case TK_INT8(0x0C):
8077 {
8078 const int8_t int8_value = tvb_get_int8(tvb, offset);
8079 proto_tree_add_int_format(tree, hf_rtps_dissection_int8,
8080 tvb, offset, sizeof(int8_t), int8_value, "%s: %d", label_prefix,
8081 int8_value);
8082 offset += sizeof(int8_t);
8083 break;
8084 }
8085 case TK_BYTE(0x02):
8086 case TK_UINT8(0x0D):
8087 {
8088 const uint8_t uint8_value = tvb_get_uint8(tvb, offset);
8089 proto_tree_add_uint_format(tree, hf_rtps_dissection_byte,
8090 tvb, offset, sizeof(uint8_t), uint8_value, "%s: %u", label_prefix,
8091 uint8_value);
8092 offset += sizeof(uint8_t);
8093 break;
8094 }
8095 case TK_INT16(0x03):
8096 {
8097 SHORT_ALIGN(offset)(offset = (offset+1)&0xfffffffe);
8098 const int16_t int16_value = tvb_get_int16(tvb, offset, ENC_LITTLE_ENDIAN0x80000000);
8099 proto_tree_add_int_format(tree, hf_rtps_dissection_int16,
8100 tvb, offset, sizeof(int16_t), int16_value, "%s: %d", label_prefix,
8101 int16_value);
8102 offset += sizeof(int16_t);
8103 break;
8104 }
8105 case TK_UINT16(0x06):
8106 {
8107 SHORT_ALIGN(offset)(offset = (offset+1)&0xfffffffe);
8108 const uint16_t uint16_value = tvb_get_uint16(tvb, offset,
8109 ENC_LITTLE_ENDIAN0x80000000);
8110 proto_tree_add_uint_format(tree, hf_rtps_dissection_uint16,
8111 tvb, offset, sizeof(uint16_t), uint16_value, "%s: %u", label_prefix,
8112 uint16_value);
8113 offset += sizeof(uint16_t);
8114 break;
8115 }
8116 case TK_INT32(0x04):
8117 {
8118 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
8119 const int32_t int32_value = tvb_get_int32(tvb, offset, ENC_LITTLE_ENDIAN0x80000000);
8120 proto_tree_add_int_format(tree, hf_rtps_dissection_int32,
8121 tvb, offset, sizeof(int32_t), int32_value, "%s: %d", label_prefix,
8122 int32_value);
8123 offset += sizeof(int32_t);
8124 break;
8125 }
8126 case TK_UINT32(0x07):
8127 {
8128 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
8129 const uint32_t uint32_value = tvb_get_uint32(tvb, offset,
8130 ENC_LITTLE_ENDIAN0x80000000);
8131 proto_tree_add_uint_format(tree, hf_rtps_dissection_uint32,
8132 tvb, offset, sizeof(uint32_t), uint32_value, "%s: %u", label_prefix,
8133 uint32_value);
8134 offset += sizeof(uint32_t);
8135 break;
8136 }
8137 case TK_INT64(0x05):
8138 {
8139 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
8140 const int64_t int64_value = tvb_get_int64(tvb, offset, ENC_LITTLE_ENDIAN0x80000000);
8141 proto_tree_add_int64_format(tree, hf_rtps_dissection_int64,
8142 tvb, offset, sizeof(int64_t), int64_value, "%s: %" G_GINT64_FORMAT"li", label_prefix,
8143 int64_value);
8144 offset += sizeof(int64_t);
8145 break;
8146 }
8147 case TK_UINT64(0x08):
8148 {
8149 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
8150 const uint64_t uint64_value = tvb_get_uint64(tvb, offset,
8151 ENC_LITTLE_ENDIAN0x80000000);
8152 proto_tree_add_uint64_format(tree, hf_rtps_dissection_uint64,
8153 tvb, offset, sizeof(uint64_t), uint64_value, "%s: %" G_GUINT64_FORMAT"lu", label_prefix,
8154 uint64_value);
8155 offset += sizeof(uint64_t);
8156 break;
8157 }
8158 case TK_FLOAT32(0x09):
8159 {
8160 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
8161 const float float32_value = tvb_get_ieee_float(tvb, offset,
8162 ENC_LITTLE_ENDIAN0x80000000);
8163 proto_tree_add_float_format(tree, hf_rtps_dissection_float,
8164 tvb, offset, sizeof(float), float32_value, "%s: %f", label_prefix,
8165 float32_value);
8166 offset += sizeof(float);
8167 break;
8168 }
8169 case TK_FLOAT64(0x0A):
8170 {
8171 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
8172 const double float64_value = tvb_get_ieee_double(tvb, offset,
8173 ENC_LITTLE_ENDIAN0x80000000);
8174 proto_tree_add_double_format(tree, hf_rtps_dissection_double,
8175 tvb, offset, sizeof(double), float64_value, "%s: %f", label_prefix,
8176 float64_value);
8177 offset += sizeof(double);
8178 break;
8179 }
8180 default:
8181 proto_tree_add_item(tree, hf_rtps_type_extended, tvb, offset, 0, ENC_NA0x00000000);
8182 break;
8183 }
8184
8185 return offset;
8186}
8187
8188/* Helper function to dissect optional AnnotationParameterValue */
8189static int rtps_util_dissect_optional_annotation_parameter_value(
8190 proto_tree* tree,
8191 tvbuff_t* tvb,
8192 int offset,
8193 const char* label_prefix)
8194{
8195 uint8_t has_optional_value = tvb_get_uint8(tvb, offset);
8196 offset++;
8197
8198 if (has_optional_value)
8199 {
8200 offset = rtps_util_dissect_annotation_parameter_value(tree, tvb, offset,
8201 label_prefix);
8202 }
8203
8204 return offset;
8205}
8206
8207/* Helper function to dissect optional string */
8208static int rtps_util_dissect_optional_string(
8209 proto_tree* tree,
8210 tvbuff_t* tvb,
8211 int offset,
8212 int hf_field)
8213{
8214 uint8_t has_optional_value = tvb_get_uint8(tvb, offset);
8215 offset++;
8216
8217 if (has_optional_value)
8218 {
8219 offset = rtps_util_add_string_no_align(tree, tvb, offset, hf_field,
8220 ENC_LITTLE_ENDIAN0x80000000);
8221 }
8222
8223 return offset;
8224}
8225
8226/* Main function to dissect AppliedBuiltinMemberAnnotations */
8227static int rtps_util_dissect_applied_builtin_member_annotations(
8228 proto_tree* member_item_tree,
8229 tvbuff_t* tvb,
8230 int offset)
8231{
8232 /* dheader is not optional */
8233 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
8234
8235 /*
8236 * Peek object size before consuming the header (assumed LE here; consider
8237 * using encapsulation endianness)
8238 */
8239 const uint32_t objectSize = tvb_get_uint32(tvb, offset, ENC_LITTLE_ENDIAN0x80000000);
8240
8241 /*
8242 * Consume the XCDR2 delimited header, which should also account for the size
8243 * in the buffer
8244 */
8245 offset = rtps_util_add_xcdr2_delimited_header(member_item_tree, tvb, offset);
8246
8247 /* Store initial offset for object size calculation after dheader */
8248 const int initial_offset = offset;
8249 const int64_t end_of_object = (int64_t)initial_offset + (int64_t)objectSize;
8250
8251 /* Optional unit string */
8252 offset = rtps_util_dissect_optional_string(member_item_tree, tvb, offset,
8253 hf_rtps_type_object_v2_unit_name);
8254
8255 /* Optional min AnnotationParameterValue */
8256 offset = rtps_util_dissect_optional_annotation_parameter_value(
8257 member_item_tree, tvb, offset, "Min");
8258
8259 /* Optional max AnnotationParameterValue */
8260 offset = rtps_util_dissect_optional_annotation_parameter_value(
8261 member_item_tree, tvb, offset, "Max");
8262
8263 /* Optional hash_id string */
8264 offset = rtps_util_dissect_optional_string(member_item_tree, tvb, offset,
8265 hf_rtps_type_object_v2_hash_id);
8266
8267 /* If we have not yet read all the object, there must be a default parameter */
8268 if ((int64_t)offset < end_of_object)
8269 {
8270 /* Optional default AnnotationParameterValue, RTI extension */
8271 offset = rtps_util_dissect_optional_annotation_parameter_value(
8272 member_item_tree, tvb, offset, "Default");
8273 }
8274
8275 return offset;
8276}
8277
8278/**
8279 * @brief Adds a CompleteMemberDetail or MinimalMemberDetail to the protocol tree.
8280 *
8281 * This function handles the dissection of either a CompleteMemberDetail or
8282 * MinimalMemberDetail, depending on the typeobject discriminator.
8283 *
8284 * @param member_item_tree The proto_tree to add items to.
8285 * @param tvb The tv buffer containing packet data
8286 * @param offset The current offset in the buffer.
8287 * @param typeobject_discriminator The discriminator (EK_COMPLETE or EK_MINIMAL).
8288 * @return The new offset after adding the member detail.
8289 */
8290static int rtps_util_add_member_detail(proto_tree* member_item_tree,
8291 tvbuff_t* tvb, int offset, int typeobject_discriminator)
8292{
8293 if (typeobject_discriminator == EK_COMPLETE(0xF2))
8294 {
8295 /*
8296 * 0...2...........7...............15.............23...............31
8297 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
8298 * | string length |
8299 * +---------------+---------------+---------------+---------------+
8300 * | member name (length + 1 bytes) ... |
8301 * +---------------+---------------+---------------+---------------+
8302 * |end of member name (no padding)|has builtin ann|has custom ann |
8303 * +---------------+---------------+---------------+---------------+
8304 *
8305 * this diagram does not show optional annotations are could be present
8306 *
8307 * IDL
8308 * @extensibility(FINAL) @nested @no_sequence
8309 * struct CompleteMemberDetail {
8310 * MemberName name;
8311 * @optional AppliedBuiltinMemberAnnotations ann_builtin;
8312 * @optional AppliedAnnotationSeq ann_custom;
8313 * };
8314 */
8315
8316 /* CompleteMemberDetail */
8317 /* name */
8318 offset = rtps_util_add_string_no_align(member_item_tree, tvb, offset,
8319 hf_rtps_type_object_v2_member_name, ENC_LITTLE_ENDIAN0x80000000);
8320
8321 /* is there a built-in annotation? */
8322 uint8_t has_optional_value = tvb_get_uint8(tvb, offset);
8323 proto_tree_add_item(member_item_tree,
8324 hf_rtps_type_object_v2_has_ann_builtin, tvb,
8325 offset, 1, ENC_NA0x00000000);
8326 offset++;
8327
8328 if (has_optional_value)
8329 {
8330 /* there is a built-in annotation */
8331 offset = rtps_util_dissect_applied_builtin_member_annotations(
8332 member_item_tree, tvb, offset);
8333 }
8334
8335 /* is there a custom AppliedAnnotationSeq? */
8336 has_optional_value = tvb_get_uint8(tvb, offset);
8337 proto_tree_add_item(member_item_tree, hf_rtps_type_object_v2_has_ann_custom,
8338 tvb,
8339 offset, 1, ENC_NA0x00000000);
8340 offset++;
8341
8342 if (has_optional_value)
8343 {
8344 /* there is a custom AppliedAnnotationSeq */
8345 offset = rtps_util_add_xcdr2_delimited_header(member_item_tree, tvb, offset);
8346 }
8347 }
8348 else
8349 {
8350 /*
8351 * 0...2...........7...............15.............23...............31
8352 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
8353 * | name hash (4 bytes) | |
8354 * +---------------+---------------+---------------+---------------+
8355 *
8356 * IDL
8357 * @extensibility(FINAL) @nested @no_sequence
8358 * struct MinimalMemberDetail {
8359 * NameHash name_hash;
8360 * };
8361 */
8362
8363 /* MinimalMemberDetail */
8364 /* name_hash */
8365 proto_tree_add_item(member_item_tree,
8366 hf_rtps_type_object_v2_member_name_hash, tvb, offset, 4,
8367 ENC_LITTLE_ENDIAN0x80000000);
8368 offset += 4;
8369 }
8370 return offset;
8371}
8372
8373/**
8374 * @brief Dissect a CompleteStructType or MinimalStructType within a TypeObjectV2
8375 *
8376 * This function handles the dissection of a STRUCT type from a TypeObjectV2
8377 * following the OMG XTypes 1.3 specification. It processes struct_flags,
8378 * header information, base_type, CompleteTypeDetail (when applicable),
8379 * and the member sequence.
8380 *
8381 * @param tree Protocol tree to add the structure elements to
8382 * @param pinfo Packet info for the current packet
8383 * @param tvb The tv buffer containing packet data
8384 * @param offset The current offset in the tvb
8385 * @param typeobject_discriminator The discriminator (EK_COMPLETE or EK_MINIMAL)
8386 * @return The new offset after parsing the structure
8387 */
8388static int rtps_util_add_type_object_v2_struct(proto_tree *tree,
8389 packet_info *pinfo, tvbuff_t *tvb, int offset,
8390 uint8_t typeobject_discriminator)
8391{
8392 /* Create Structure subtree */
8393 proto_item* structure_ti;
8394 proto_tree* structure_tree = proto_tree_add_subtree(tree, tvb, offset, -1,
8395 ett_rtps_type_object_v2_struct, &structure_ti, "Struct Type");
8396 const int initial_offset = offset;
8397
8398 /* StructTypeFlag struct_flags */
8399 proto_tree_add_bitmask(structure_tree, tvb, offset,
8400 hf_rtps_type_object_v2_type_flags, ett_rtps_flags,
8401 TYPE_FLAGS_V2, ENC_LITTLE_ENDIAN0x80000000);
8402 offset += 2;
8403
8404 /* Delimited header for CompleteStructHeader/MinimalStructHeader */
8405 offset = rtps_util_add_xcdr2_delimited_header(structure_tree, tvb, offset);
8406
8407 /* CompleteStructHeader/MinimalStructHeader header */
8408 proto_item* header_ti;
8409 proto_tree* header_tree = proto_tree_add_subtree(structure_tree, tvb, offset, -1,
8410 ett_rtps_type_object_v2_struct_header, &header_ti, "Struct Header");
8411 const int initial_header_offset = offset;
8412
8413 /* TypeIdentifier base_type */
8414 offset = rtps_util_add_type_id_v2(header_tree, pinfo, tvb, offset, true1);
8415
8416 if (typeobject_discriminator == EK_COMPLETE(0xF2))
8417 {
8418 /* CompleteTypeDetail detail */
8419 offset = rtps_util_add_complete_type_detail(header_tree, tvb, offset);
8420 }
8421 proto_item_set_len(header_ti, offset - initial_header_offset);
8422
8423 /* Member sequence */
8424
8425 /* Delimited header for CompleteStructMemberSeq/MinimalStructMemberSeq */
8426 offset = rtps_util_add_xcdr2_delimited_header(structure_tree, tvb, offset);
8427
8428 /* CompleteStructMemberSeq/MinimalStructMemberSeq member_seq */
8429 const uint32_t member_seq_len = tvb_get_uint32(tvb, offset, ENC_LITTLE_ENDIAN0x80000000);
8430 offset += 4;
8431
8432 if (member_seq_len > 0)
8433 {
8434 proto_item* member_seq_item;
8435 proto_tree* member_seq_tree = proto_tree_add_subtree_format(structure_tree,
8436 tvb, offset, -1, ett_rtps_type_object_v2_member_seq, &member_seq_item,
8437 "Members [%u]", member_seq_len);
8438 const int initial_member_seq_item_offset = offset;
8439
8440 for (uint32_t i = 0; i < member_seq_len; i++)
8441 {
8442 /* For each member */
8443 proto_item* member_item_ti;
8444 proto_tree* member_item_tree = proto_tree_add_subtree_format(
8445 member_seq_tree, tvb, offset, -1, ett_rtps_type_object_v2_member,
8446 &member_item_ti, "Member [%u]", i);
8447 const int initial_member_item_offset = offset;
8448
8449 /* Delimited header */
8450 offset =
8451 rtps_util_add_xcdr2_delimited_header(member_item_tree, tvb, offset);
8452
8453 /* Common part */
8454 /* member_id */
8455 proto_tree_add_item(member_item_tree, hf_rtps_type_object_v2_member_id, tvb,
8456 offset, 4, ENC_LITTLE_ENDIAN0x80000000);
8457 offset += 4;
8458
8459 /* StructMemberFlag member_flags */
8460 proto_tree_add_bitmask(member_item_tree, tvb, offset,
8461 hf_rtps_type_object_v2_member_flags, ett_rtps_flags,
8462 MEMBER_FLAGS_V2, ENC_LITTLE_ENDIAN0x80000000);
8463 offset += 2;
8464
8465 /* member_type_id */
8466 const uint8_t discriminator = tvb_get_uint8(tvb, offset);
8467 offset = rtps_util_add_type_id_v2(member_item_tree, pinfo, tvb, offset,
8468 false0);
8469
8470 /*
8471 * iterate through type_id_discriminator_vals to find a string
8472 * corresponding to the discriminator
8473 */
8474 const char* lbl_str = "Unknown";
8475 for (size_t j = 0; j < array_length(type_id_discriminator_vals)(sizeof (type_id_discriminator_vals) / sizeof (type_id_discriminator_vals
)[0])
; j++)
8476 {
8477 if (type_id_discriminator_vals[j].value == discriminator)
8478 {
8479 lbl_str = type_id_discriminator_vals[j].strptr;
8480 break;
8481 }
8482 }
8483 proto_item_set_text(member_item_ti, "Member [%u] (%s)", i, lbl_str);
8484
8485 /* member detail */
8486 offset = rtps_util_add_member_detail(member_item_tree, tvb, offset, typeobject_discriminator);
8487
8488 proto_item_set_len(member_item_ti, offset - initial_member_item_offset);
8489 }
8490 proto_item_set_len(member_seq_item, offset - initial_member_seq_item_offset);
8491 }
8492
8493 proto_item_set_len(structure_ti, offset - initial_offset);
8494 return offset;
8495}
8496
8497/**
8498 * @brief Dissect a CompleteUnionType within a TypeObjectV2
8499 *
8500 * @details This function handles the dissection of a UNION type from a TypeObjectV2
8501 * following the OMG XTypes 1.3 specification. It processes union_flags,
8502 * header information (with CompleteTypeDetail when in COMPLETE mode),
8503 * the discriminator member, and the union member sequence which includes
8504 * case labels for each member.
8505 *
8506 * @param tree Protocol tree to add the union elements to
8507 * @param pinfo Packet info for the current packet
8508 * @param tvb The tv buffer containing packet data
8509 * @param offset The current offset in the tvb
8510 * @param typeobject_discriminator The discriminator (EK_COMPLETE or EK_MINIMAL)
8511 * @return The new offset after parsing the union
8512 */
8513static int rtps_util_add_type_object_v2_union(proto_tree* tree,
8514 packet_info* pinfo, tvbuff_t* tvb, int offset,
8515 uint8_t typeobject_discriminator)
8516{
8517
8518 /* Create Union subtree */
8519 proto_item* union_ti;
8520 proto_tree* union_tree = proto_tree_add_subtree(tree, tvb, offset, -1,
8521 ett_rtps_type_object_v2_union, &union_ti, "Union Type");
8522 const int initial_offset = offset;
8523
8524 /* UnionTypeFlag union_flags */
8525 proto_tree_add_bitmask(union_tree, tvb, offset,
8526 hf_rtps_type_object_v2_type_flags, ett_rtps_flags,
8527 TYPE_FLAGS_V2, ENC_LITTLE_ENDIAN0x80000000);
8528 offset += 2;
8529
8530 /* Delimited header for CompleteUnionHeader/MinimalUnionHeader */
8531 offset = rtps_util_add_xcdr2_delimited_header(union_tree, tvb, offset);
8532
8533 /* CompleteUnionHeader/MinimalUnionHeader header */
8534 if (typeobject_discriminator == EK_COMPLETE(0xF2))
8535 {
8536 proto_item* header_ti;
8537 proto_tree* header_tree = proto_tree_add_subtree(union_tree, tvb, offset, -1,
8538 ett_rtps_type_object_v2_union_header, &header_ti, "Union Header");
8539 const int initial_header_offset = offset;
8540
8541 /* CompleteTypeDetail detail */
8542 offset = rtps_util_add_complete_type_detail(header_tree, tvb, offset);
8543 proto_item_set_len(header_ti, offset - initial_header_offset);
8544 }
8545
8546 /* Delimited header for CompleteDiscriminatorMember/MinimalDiscriminatorMember */
8547 offset = rtps_util_add_xcdr2_delimited_header(union_tree, tvb, offset);
8548
8549 /* CompleteDiscriminatorMember/MinimalDiscriminatorMember discriminator */
8550 proto_item* discriminator_ti;
8551 proto_tree* discriminator_tree = proto_tree_add_subtree(union_tree,
8552 tvb, offset, -1, ett_rtps_type_object_v2_union_discriminator,
8553 &discriminator_ti, "Union Discriminator");
8554 const int initial_discriminator_offset = offset;
8555
8556 /* CommonDiscriminatorMember common */
8557 /* UnionDiscriminatorFlag member_flags */
8558 proto_tree_add_bitmask(discriminator_tree, tvb, offset,
8559 hf_rtps_type_object_v2_member_flags, ett_rtps_flags,
8560 MEMBER_FLAGS_V2, ENC_LITTLE_ENDIAN0x80000000);
8561 offset += 2;
8562
8563 /* TypeIdentifier type_id */
8564 offset = rtps_util_add_type_id_v2(discriminator_tree, pinfo, tvb, offset,
8565 false0);
8566
8567 if (typeobject_discriminator == EK_COMPLETE(0xF2))
8568 {
8569 /* annotation built-in flags */
8570 proto_tree_add_item(discriminator_tree,
8571 hf_rtps_type_object_v2_has_ann_builtin, tvb, offset, 1,
8572 ENC_LITTLE_ENDIAN0x80000000);
8573 offset++;
8574
8575 /* annotation custom flags */
8576 proto_tree_add_item(discriminator_tree,
8577 hf_rtps_type_object_v2_has_ann_custom, tvb, offset, 1, ENC_LITTLE_ENDIAN0x80000000);
8578 offset++;
8579 }
8580 proto_item_set_len(discriminator_ti, offset - initial_discriminator_offset);
8581
8582 /* Delimited header for CompleteUnionMemberSeq/MinimalUnionMemberSeq */
8583 offset = rtps_util_add_xcdr2_delimited_header(union_tree, tvb, offset);
8584
8585 /* CompleteUnionMemberSeq/MinimalUnionMemberSeq member_seq */
8586 const uint32_t member_seq_len = tvb_get_uint32(tvb, offset, ENC_LITTLE_ENDIAN0x80000000);
8587 offset += 4;
8588
8589 if (member_seq_len > 0)
8590 {
8591 proto_item* member_seq_ti;
8592 proto_tree* member_seq_tree = proto_tree_add_subtree_format(union_tree, tvb,
8593 offset, -1, ett_rtps_type_object_v2_member_seq, &member_seq_ti,
8594 "Members [%u]", member_seq_len);
8595 const int initial_member_seq_offset = offset;
8596
8597 for (uint32_t i = 0; i < member_seq_len; i++)
8598 {
8599 /* For each CompleteUnionMember/MinimalUnionMember */
8600 proto_item* member_item_ti;
8601 proto_tree* member_item_tree = proto_tree_add_subtree_format(
8602 member_seq_tree, tvb, offset, -1, ett_rtps_type_object_v2_member,
8603 &member_item_ti, "Member [%u]", i);
8604 const int initial_member_item_offset = offset;
8605
8606 /* Delimited header for CompleteUnionMember/MinimalUnionMember */
8607 offset =
8608 rtps_util_add_xcdr2_delimited_header(member_item_tree, tvb, offset);
8609
8610 /* CommonUnionMember common */
8611
8612 /* MemberId member_id */
8613 proto_tree_add_item(member_item_tree, hf_rtps_type_object_v2_member_id, tvb,
8614 offset, 4, ENC_LITTLE_ENDIAN0x80000000);
8615 offset += 4;
8616
8617 /* UnionMemberFlag member_flags */
8618 proto_tree_add_bitmask(member_item_tree, tvb, offset,
8619 hf_rtps_type_object_v2_member_flags, ett_rtps_flags,
8620 MEMBER_FLAGS_V2, ENC_LITTLE_ENDIAN0x80000000);
8621 offset += 2;
8622
8623 /* TypeIdentifier type_id */
8624
8625 const uint8_t type_kind_discriminator = tvb_get_uint8(tvb, offset);
8626 offset = rtps_util_add_type_id_v2(member_item_tree, pinfo, tvb, offset,
8627 false0);
8628
8629 /* iterate through type_id_discriminator_vals to find a string corresponding to the discriminator */
8630 const char* lbl_str = NULL((void*)0);
8631 for (size_t j = 0; j < array_length(type_id_discriminator_vals)(sizeof (type_id_discriminator_vals) / sizeof (type_id_discriminator_vals
)[0])
; j++)
8632 {
8633 if (type_id_discriminator_vals[j].value == type_kind_discriminator)
8634 {
8635 lbl_str = type_id_discriminator_vals[j].strptr;
8636 break;
8637 }
8638 }
8639 if (lbl_str == NULL((void*)0))
8640 {
8641 lbl_str = "Unknown";
8642 }
8643 proto_item_set_text(member_item_ti, "Member [%u] (%s)", i, lbl_str);
8644
8645 /* UnionCaseLabelSeq label_seq sequence<long> */
8646 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
8647 const uint32_t union_label_seq_len = tvb_get_uint32(tvb, offset, ENC_LITTLE_ENDIAN0x80000000);
8648 offset += 4;
8649
8650 if (union_label_seq_len > 0)
8651 {
8652 proto_item* label_item;
8653 proto_tree* label_tree = proto_tree_add_subtree_format(member_item_tree,
8654 tvb, offset, -1, ett_rtps_type_object_v2_union_label_seq, &label_item,
8655 "Labels [%u]", union_label_seq_len);
8656 const int initial_label_item_offset = offset;
8657
8658 for (uint32_t j = 0; j < union_label_seq_len; j++)
8659 {
8660 /* For each case label */
8661 proto_tree_add_item(label_tree, hf_rtps_type_object_v2_union_label, tvb,
8662 offset, 4, ENC_LITTLE_ENDIAN0x80000000);
8663 offset += 4;
8664 }
8665 proto_item_set_len(label_item, offset - initial_label_item_offset);
8666 }
8667
8668 /* Member detail */
8669 offset = rtps_util_add_member_detail(member_item_tree, tvb, offset,
8670 typeobject_discriminator);
8671
8672 proto_item_set_len(member_item_ti, offset - initial_member_item_offset);
8673 }
8674 proto_item_set_len(member_seq_ti, offset - initial_member_seq_offset);
8675 }
8676
8677 proto_item_set_len(union_ti, offset - initial_offset);
8678 return offset;
8679}
8680
8681/**
8682 * @brief Dissect a CompleteEnumeratedType or MinimalEnumeratedType within a TypeObjectV2
8683 *
8684 * @details This function handles the dissection of an ENUM type from a TypeObjectV2
8685 * following the OMG XTypes 1.3 specification. It processes enum_flags,
8686 * header information including bit_bound (and type name when in COMPLETE mode),
8687 * and enumeration literals with their values, flags, and names/name_hashes.
8688 *
8689 * @param tree Protocol tree to add the enum elements to
8690 * @param tvb The tv buffer containing packet data
8691 * @param offset The current offset in the tvb
8692 * @param typeobject_discriminator The discriminator (EK_COMPLETE or EK_MINIMAL)
8693 * @return The new offset after parsing the enum type
8694 */
8695static int rtps_util_add_type_object_v2_enum(proto_tree *tree, tvbuff_t *tvb,
8696 int offset, uint8_t typeobject_discriminator)
8697{
8698 /* Create Enumeration subtree */
8699 proto_item* enum_ti;
8700 proto_tree* enum_tree = proto_tree_add_subtree(tree, tvb, offset, -1,
8701 ett_rtps_type_object_v2_enum, &enum_ti, "Enum Type");
8702 const int initial_offset = offset;
8703
8704 /* EnumTypeFlag enum_flags */
8705 proto_tree_add_bitmask_value(enum_tree, tvb, offset,
8706 hf_rtps_type_object_v2_type_flags, ett_rtps_flags,
8707 TYPE_FLAGS_V2, ENC_LITTLE_ENDIAN0x80000000);
8708 offset += 2;
8709
8710 /* Delimited header for CompleteEnumeratedHeader/MinimalEnumeratedHeader */
8711 offset = rtps_util_add_xcdr2_delimited_header(enum_tree, tvb, offset);
8712
8713 /* CompleteEnumeratedHeader/MinimalEnumeratedHeader header */
8714 proto_item* enum_header_ti;
8715 proto_tree* enum_header_tree = proto_tree_add_subtree(enum_tree, tvb,
8716 offset, -1, ett_rtps_type_object_v2_enum_header, &enum_header_ti,
8717 "Enum Header");
8718 const int initial_enum_header_offset = offset;
8719
8720 /* CommonEnumeratedHeader common */
8721 /* BitBound bit_bound */
8722 proto_tree_add_item(enum_header_tree,
8723 hf_rtps_type_object_v2_enum_bit_bound, tvb, offset,
8724 2, ENC_LITTLE_ENDIAN0x80000000);
8725 offset += 2;
8726
8727 if (typeobject_discriminator == EK_COMPLETE(0xF2))
8728 {
8729 /* CompleteTypeDetail detail */
8730 offset = rtps_util_add_complete_type_detail(enum_header_tree, tvb, offset);
8731 }
8732 proto_item_set_len(enum_header_ti, offset - initial_enum_header_offset);
8733
8734 /* Delimited header for CompleteEnumeratedLiteralSeq/MinimalEnumeratedLiteralSeq */
8735 offset = rtps_util_add_xcdr2_delimited_header(enum_tree, tvb, offset);
8736
8737 /* CompleteEnumeratedLiteralSeq/MinimalEnumeratedLiteralSeq literal_seq */
8738 const uint32_t literal_seq_len = tvb_get_uint32(tvb, offset, ENC_LITTLE_ENDIAN0x80000000);
8739 offset += 4;
8740 if (literal_seq_len > 0)
8741 {
8742 proto_item* literal_seq_ti;
8743 proto_tree* literal_seq_tree = proto_tree_add_subtree_format(enum_tree, tvb,
8744 offset, -1, ett_rtps_type_deps_seq, &literal_seq_ti,
8745 "Enum Literals [%u]", literal_seq_len);
8746 const int initial_literal_seq_offset = offset;
8747
8748 /* Process each literal in the sequence */
8749 for (uint32_t i = 0; i < literal_seq_len; i++)
8750 {
8751 proto_item* literal_ti;
8752 proto_tree* literal_tree = proto_tree_add_subtree_format(literal_seq_tree,
8753 tvb, offset, 0, ett_rtps_type_object_v2_enum_literal, &literal_ti,
8754 "Enum Literal [%u]", i);
8755 const int initial_literal_offset = offset;
8756
8757 /* CompleteEnumeratedLiteral/MinimalEnumeratedLiteral */
8758 /* Delimited header for CompleteEnumeratedLiteral/MinimalEnumeratedLiteral */
8759 offset = rtps_util_add_xcdr2_delimited_header(literal_tree, tvb, offset);
8760
8761 /* Delimited header for CommonEnumeratedLiteral */
8762 offset = rtps_util_add_xcdr2_delimited_header(literal_tree, tvb, offset);
8763
8764 /* CommonEnumeratedLiteral common */
8765 /* long value */
8766 proto_tree_add_item(literal_tree, hf_rtps_type_object_v2_enum_literal_value,
8767 tvb, offset, 4, ENC_LITTLE_ENDIAN0x80000000);
8768 offset += 4;
8769
8770 /* EnumeratedLiteralFlag flags */
8771 proto_tree_add_bitmask(literal_tree, tvb, offset,
8772 hf_rtps_type_object_v2_member_flags, ett_rtps_flags,
8773 MEMBER_FLAGS_V2, ENC_LITTLE_ENDIAN0x80000000);
8774 offset += 2;
8775
8776 /* member detail */
8777 offset = rtps_util_add_member_detail(literal_tree, tvb, offset, typeobject_discriminator);
8778
8779 proto_item_set_len(literal_ti, offset - initial_literal_offset);
8780 }
8781 proto_item_set_len(literal_seq_ti, offset - initial_literal_seq_offset);
8782 }
8783
8784 proto_item_set_len(enum_ti, offset - initial_offset);
8785 return offset;
8786}
8787
8788
8789
8790/**
8791 * @brief Dissect a TypeObjectV2 structure
8792 *
8793 * @details This function handles the dissection of a TypeObjectV2 structure following
8794 * the OMG XTypes 1.3 specification. It reads the equivalence kind discriminator
8795 * (COMPLETE or MINIMAL) and the type kind discriminator, then dispatches to the
8796 * appropriate type-specific handler based on the type kind (alias, structure,
8797 * union, sequence, array, enum, etc.).
8798 *
8799 * @param tree Protocol tree to add the TypeObjectV2 elements to
8800 * @param pinfo Packet info for the current packet
8801 * @param tvb The tv buffer containing packet data
8802 * @param offset The current offset in the tvb
8803 * @param label Pointer to a text label describing the Type
8804 * @return The new offset after parsing the TypeObjectV2
8805 */
8806static int rtps_util_add_type_object_v2(proto_tree *tree, packet_info *pinfo,
8807 tvbuff_t *tvb, int offset, const char** label)
8808{
8809 const int initial_offset = offset;
8810
8811 /* Create subtree for TypeObjectV2 */
8812 proto_item* ti = proto_tree_add_item(tree, hf_rtps_type_object_v2, tvb,
8813 offset, 0, ENC_NA0x00000000);
8814 proto_tree* to_tree = proto_item_add_subtree(ti, ett_rtps_type_object_v2);
8815
8816 /* Read the discriminator (first octet) */
8817 uint8_t typeobject_discriminator = tvb_get_uint8(tvb, offset);
8818 proto_tree_add_item(to_tree, hf_rtps_type_id_discriminator, tvb, offset, 1,
8819 ENC_NA0x00000000);
8820 offset++;
8821
8822 const uint8_t typekind_discriminator = tvb_get_uint8(tvb, offset);
8823 if (label != NULL((void*)0))
8824 {
8825 *label = "Unknown";
8826 for (size_t j = 0; j < array_length(type_id_discriminator_vals)(sizeof (type_id_discriminator_vals) / sizeof (type_id_discriminator_vals
)[0])
; j++)
8827 {
8828 if (type_id_discriminator_vals[j].value == typekind_discriminator)
8829 {
8830 *label = type_id_discriminator_vals[j].strptr;
8831 break;
8832 }
8833 }
8834 }
8835
8836 proto_tree_add_item(to_tree, hf_rtps_type_kind_discriminator, tvb, offset, 1,
8837 ENC_NA0x00000000);
8838 offset++;
8839
8840 /* Handle the different TypeIdentifier cases based on discriminator */
8841 switch (typekind_discriminator)
8842 {
8843 case TK_ALIAS(0x30):
8844 offset = rtps_util_add_type_object_v2_alias(to_tree, pinfo, tvb, offset,
8845 typeobject_discriminator);
8846 break;
8847 case TK_STRUCTURE(0x51):
8848 offset = rtps_util_add_type_object_v2_struct(
8849 to_tree, pinfo, tvb, offset, typeobject_discriminator);
8850 break;
8851 case TK_UNION(0x52):
8852 offset = rtps_util_add_type_object_v2_union(to_tree, pinfo, tvb, offset,
8853 typeobject_discriminator);
8854 break;
8855 case TK_ENUM(0x40):
8856 offset = rtps_util_add_type_object_v2_enum(to_tree, tvb, offset,
8857 typeobject_discriminator);
8858 break;
8859 /* Extended type definition (future use) */
8860 default:
8861 /* ExtendedTypeDefn - currently just a placeholder */
8862 proto_tree_add_item(to_tree, hf_rtps_type_extended, tvb, offset,
8863 0, ENC_NA0x00000000);
8864 break;
8865 }
8866
8867 proto_item_set_len(ti, offset - initial_offset);
8868 return offset;
8869}
8870
8871/**
8872 * @brief Dissect a TypeIdentifierWithSize structure
8873 *
8874 * @details This function handles the dissection of a TypeIdentifierWithSize structure
8875 * following the OMG XTypes 1.3 specification. It processes the type_id field
8876 * by calling rtps_util_add_type_id_v2(), and then reads the
8877 * typeobject_serialized_size field which indicates the serialized size of
8878 * the associated TypeObject.
8879 *
8880 * @param tree Protocol tree to add the TypeIdentifierWithSize elements to
8881 * @param pinfo Packet info for the current packet
8882 * @param tvb The tv buffer containing packet data
8883 * @param offset The current offset in the tvb
8884 * @return The new offset after parsing the TypeIdentifierWithSize
8885 */
8886static int rtps_util_add_type_id_w_size(proto_tree* tree, packet_info* pinfo,
8887 tvbuff_t* tvb, int offset)
8888{
8889 const int initial_offset = offset;
8890
8891 offset = rtps_util_add_xcdr2_delimited_header(tree, tvb, offset);
8892
8893 /* TypeIdentifier type_id */
8894 offset = rtps_util_add_type_id_v2(tree, pinfo, tvb, offset, false0);
8895
8896 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
8897
8898 /* unsigned long typeobject_serialized_size */
8899 proto_tree_add_item(tree, hf_rtps_type_object_serialized_size, tvb, offset, 4,
8900 ENC_LITTLE_ENDIAN0x80000000);
8901 offset += 4;
8902
8903 proto_item_set_len(tree, offset - initial_offset);
8904 return offset;
8905}
8906
8907/**
8908 * @brief Dissect a TypeIdentifierWithDependencies structure
8909 *
8910 * This function handles the dissection of a TypeIdentifierWithDependencies structure
8911 * following the OMG XTypes 1.3 specification. It processes the typeid_with_size field
8912 * by calling rtps_util_add_type_id_w_size(), followed by a dependent_typeid_count,
8913 * and a sequence of TypeIdentifierWithSize objects representing dependent type IDs.
8914 *
8915 * @param tree Protocol tree to add the TypeIdentifierWithDependencies elements to
8916 * @param pinfo Packet info for the current packet
8917 * @param tvb The tv buffer containing packet data
8918 * @param offset The current offset in the tvb
8919 * @return The new offset after parsing the TypeIdentifierWithDependencies
8920 */
8921static int rtps_util_add_type_id_w_dependencies(proto_tree* tree,
8922 packet_info* pinfo,
8923 tvbuff_t* tvb, int offset)
8924{
8925 proto_item* ti;
8926 proto_tree* typeid_deps_tree = proto_tree_add_subtree(tree, tvb, offset, -1,
8927 ett_rtps_type_id_w_deps, &ti, "Type Id With Dependencies");
8928 const int initial_offset = offset;
8929
8930 /* TypeIdentifierWithSize typeid_with_size */
8931 proto_tree* typeid_size_tree = proto_tree_add_subtree(typeid_deps_tree, tvb,
8932 offset, -1, ett_rtps_type_id_w_size, NULL((void*)0), "Type Id With Size");
8933
8934 offset = rtps_util_add_type_id_w_size(typeid_size_tree, pinfo, tvb, offset);
8935
8936 /* long dependent_typeid_count */
8937 proto_tree_add_item(typeid_deps_tree, hf_rtps_type_deps_count, tvb, offset, 4,
8938 ENC_LITTLE_ENDIAN0x80000000);
8939 offset += 4;
8940
8941 /* long dependent_typeids sequence length */
8942
8943 /* Delimited header */
8944 offset = rtps_util_add_xcdr2_delimited_header(typeid_deps_tree, tvb, offset);
8945
8946 const uint32_t dependent_typeid_seq_len = tvb_get_uint32(tvb, offset,
8947 ENC_LITTLE_ENDIAN0x80000000);
8948 offset += 4;
8949
8950 /* sequence<TypeIdentifierWithSize> dependent_typeids */
8951 if (dependent_typeid_seq_len > 0)
8952 {
8953 proto_tree* deps_seq_tree = proto_tree_add_subtree_format(
8954 typeid_deps_tree, tvb, offset, -1, ett_rtps_type_deps_seq, NULL((void*)0),
8955 "Dependent Type IDs [%u]", dependent_typeid_seq_len);
8956
8957 for (uint32_t i = 0; i < dependent_typeid_seq_len; i++)
8958 {
8959 proto_item* dep_item;
8960 proto_tree* dep_tree = proto_tree_add_subtree_format(deps_seq_tree, tvb,
8961 offset, -1, ett_rtps_type_dep, &dep_item, "Dependent Type ID [%u]", i);
8962 const int initial_dep_offset = offset;
8963 offset = rtps_util_add_type_id_w_size(dep_tree, pinfo, tvb, offset);
8964 proto_item_set_len(dep_item, offset - initial_dep_offset);
8965 }
8966 }
8967
8968 proto_item_set_len(ti, offset - initial_offset);
8969 return offset;
8970}
8971
8972/**
8973 * @brief Dissect a TypeIdentifierWithDependencies structure with XCDR2 headers
8974 *
8975 * This function handles the dissection of a TypeIdentifierWithDependencies structure
8976 * with XCDR2 serialization headers following the OMG XTypes 1.3 specification.
8977 * It processes the XCDR2 enhanced mutable header, and then calls
8978 * rtps_util_add_type_id_w_dependencies() to process the
8979 * TypeIdentifierWithDependencies data itself.
8980 *
8981 * @param tree Protocol tree to add the delimited TypeIdentifierWithDependencies elements to
8982 * @param pinfo Packet info for the current packet
8983 * @param tvb The tv buffer containing packet data
8984 * @param offset The current offset in the tvb
8985 * @return The new offset after parsing the delimited TypeIdentifierWithDependencies
8986 */
8987static int rtps_util_add_delimited_type_id_w_dependencies(proto_tree* tree,
8988 packet_info* pinfo, tvbuff_t* tvb, int offset)
8989{
8990 /* Enhanced Mutable Header */
8991 offset = rtps_util_add_xcdr2_enhanced_mutable_header(tree, tvb, offset);
8992
8993 /* Process the TypeIdentifierWithDependencies */
8994 offset = rtps_util_add_type_id_w_dependencies(tree, pinfo, tvb, offset);
8995
8996 return offset;
8997}
8998
8999/**
9000 * @brief Dissect a TypeInformation structure
9001 *
9002 * @details This function handles the dissection of a TypeInformation structure
9003 * following the OMG XTypes 1.3 specification. It processes a full TypeInformation
9004 * structure with both minimal and complete TypeIdentifierWithDependencies fields.
9005 * TypeInformation appears in the builtin DDS topics PublicationBuiltinTopicData
9006 * and SubscriptionBuiltinTopicData.
9007 *
9008 * @param tree Protocol tree to add the TypeInformation elements to
9009 * @param pinfo Packet info for the current packet
9010 * @param tvb The tv buffer containing packet data
9011 * @param offset The current offset in the tvb
9012 */
9013static void rtps_util_add_typeinformation(proto_tree* tree, packet_info* pinfo,
9014 tvbuff_t* tvb, int offset)
9015{
9016 /*
9017 * IDL
9018 * @extensibility(MUTABLE) @nested
9019 * struct TypeInformation {
9020 * @id(0x1001) TypeIdentifierWithDependencies minimal;
9021 * @id(0x1002) TypeIdentifierWithDependencies complete;
9022 * };
9023 */
9024
9025
9026 proto_item* typeinfo_item;
9027 proto_tree* typeinfo_tree = proto_tree_add_subtree(tree, tvb, offset,
9028 -1, ett_rtps_type_information, &typeinfo_item, "Type Information");
9029 const int initial_offset = offset;
9030
9031 /* Delimited header */
9032 offset = rtps_util_add_xcdr2_delimited_header(typeinfo_tree, tvb, offset);
9033
9034 /* TypeInformation has two fields: minimal and complete */
9035
9036 /* Minimal TypeIdentifierWithDependencies */
9037 proto_tree* minimal_tree = proto_tree_add_subtree(typeinfo_tree, tvb, offset,
9038 -1, ett_rtps_type_information_minimal, NULL((void*)0), "Minimal");
9039
9040 offset = rtps_util_add_delimited_type_id_w_dependencies(minimal_tree, pinfo,
9041 tvb, offset);
9042
9043 /* Complete TypeIdentifierWithDependencies */
9044 proto_tree* complete_tree = proto_tree_add_subtree(typeinfo_tree, tvb, offset,
9045 -1, ett_rtps_type_information_complete, NULL((void*)0), "Complete");
9046
9047 offset = rtps_util_add_delimited_type_id_w_dependencies(complete_tree, pinfo,
9048 tvb, offset);
9049
9050 proto_item_set_len(typeinfo_item, offset - initial_offset);
9051}
9052
9053/**
9054 * @brief Dissect the GET_DEPENDENCIES reply data
9055 *
9056 * This function handles the dissection of the GET_DEPENDENCIES reply data
9057 * following the OMG XTypes 1.3 specification. It processes a structure containing
9058 * a return code, followed by a sequence of TypeIdentifierWithSize objects
9059 * representing dependent type IDs, and a continuation point for future use.
9060 * Each field is preceded by XCDR2 delimited headers for proper alignment and parsing.
9061 *
9062 * @param tree Protocol tree to add the GET_DEPENDENCIES reply data elements to
9063 * @param pinfo Packet info for the current packet
9064 * @param tvb The tv buffer containing packet data
9065 * @param offset The current offset in the tvb
9066 * @return The new offset after parsing the GET_DEPENDENCIES reply data
9067 */
9068static int rtps_util_dissect_get_type_dependencies_out(proto_tree* tree,
9069 packet_info* pinfo, tvbuff_t* tvb, int offset)
9070{
9071 /* Delimited header */
9072 offset = rtps_util_add_xcdr2_delimited_header(tree, tvb, offset);
9073
9074 /* reply header - discriminator - always 0 - DDS_RETCODE_OK*/
9075 uint32_t type_lookup_result_discriminator = tvb_get_uint32(tvb, offset,
9076 ENC_LITTLE_ENDIAN0x80000000);
9077 proto_tree_add_uint(tree, hf_rtps_type_deps_result, tvb, offset, 4,
9078 type_lookup_result_discriminator);
9079 offset += 4;
9080
9081 /* (mutable) TypeLookup_getTypeDependencies_Out */
9082
9083 /* Delimited header */
9084 offset = rtps_util_add_xcdr2_delimited_header(tree, tvb, offset);
9085
9086 /* Enhanced Mutable Header for dependent_typeids */
9087 offset = rtps_util_add_xcdr2_enhanced_mutable_header(
9088 tree, tvb, offset);
9089
9090 uint32_t dependent_typeids_seq_len = tvb_get_uint32(tvb, offset,
9091 ENC_LITTLE_ENDIAN0x80000000);
9092 offset += 4;
9093
9094 /* sequence<TypeIdentifierWithSize> dependent_typeids */
9095 if (dependent_typeids_seq_len > 0)
9096 {
9097 proto_item* dep_seq_item;
9098 proto_tree* deps_seq_tree = proto_tree_add_subtree_format(tree, tvb, offset,
9099 -1, ett_rtps_type_lookup_deps_seq, &dep_seq_item,
9100 "Dependent Type IDs [%u]",
9101 dependent_typeids_seq_len);
9102 const int initial_sequence_offset = offset;
9103
9104 for (uint32_t i = 0; i < dependent_typeids_seq_len; i++)
9105 {
9106 proto_item* dep_item;
9107 proto_tree* dep_tree = proto_tree_add_subtree_format(deps_seq_tree, tvb,
9108 offset, -1, ett_rtps_type_dep, &dep_item, "Dependent Type ID [%u]", i);
9109 const int initial_dep_offset = offset;
9110
9111 offset = rtps_util_add_type_id_w_size(dep_tree, pinfo, tvb, offset);
9112 proto_item_set_len(dep_item, offset - initial_dep_offset);
9113 }
9114 proto_item_set_len(dep_seq_item, offset - initial_sequence_offset);
9115 }
9116
9117 /* Enhanced Mutable Header for continuation_point */
9118 offset = rtps_util_add_xcdr2_enhanced_mutable_header(tree, tvb, offset);
9119 return offset;
9120}
9121
9122/**
9123 * @brief Dissect a TypeLookup Reply structure for GET_TYPES
9124 *
9125 * @details This function handles the dissection of a TypeLookup Reply structure
9126 * specifically for the GET_TYPES operation. It processes the reply data containing
9127 * a sequence of TypeIdentifierTypeObjectPair objects that map type identifiers to
9128 * their corresponding type objects, as well as mappings from complete to minimal types.
9129 * Each section is preceded by XCDR2 delimited or enhanced mutable headers for proper
9130 * alignment and parsing.
9131 *
9132 * @param tree Protocol tree to add the GET_TYPES reply elements to
9133 * @param pinfo Packet info for the current packet
9134 * @param tvb The tv buffer containing packet data
9135 * @param offset The current offset in the tvb
9136 * @return The new offset after parsing the GET_TYPES reply
9137 */
9138static int rtps_util_dissect_get_types_out(proto_tree* tree, packet_info* pinfo,
9139 tvbuff_t* tvb, int offset)
9140{
9141 /* Delimited header */
9142 offset = rtps_util_add_xcdr2_delimited_header(tree, tvb, offset);
9143
9144 /* reply header - discriminator - always 0 */
9145 const uint32_t type_lookup_result_discriminator = tvb_get_uint32(tvb, offset,
9146 ENC_LITTLE_ENDIAN0x80000000);
9147 proto_tree_add_uint(tree, hf_rtps_type_deps_result, tvb, offset, 4,
9148 type_lookup_result_discriminator);
9149 offset += 4;
9150
9151 /* (mutable) TypeLookup_getTypes_Out result */
9152
9153 /* Delimited header */
9154 offset = rtps_util_add_xcdr2_delimited_header(tree, tvb, offset);
9155
9156 /* Enhanced Mutable Header for types */
9157 offset = rtps_util_add_xcdr2_enhanced_mutable_header(tree, tvb, offset);
9158
9159 /* sequence<TypeIdentifierTypeObjectPair> types */
9160 const uint32_t ti_to_pair_seq_len = tvb_get_uint32(tvb, offset,
9161 ENC_LITTLE_ENDIAN0x80000000);
9162 offset += 4;
9163
9164 if (ti_to_pair_seq_len == 0)
9165 {
9166 /* Enhanced Mutable Header for continuation_point */
9167 offset = rtps_util_add_xcdr2_enhanced_mutable_header(tree, tvb, offset);
9168 return offset;
9169 }
9170
9171 proto_item* deps_seq_item;
9172 proto_tree* deps_seq_tree = proto_tree_add_subtree_format(
9173 tree, tvb, offset, -1, ett_rtps_type_deps_seq,
9174 &deps_seq_item, "Dependent Type IDs [%u]", ti_to_pair_seq_len);
9175 const int initial_deps_seq_offset = offset;
9176
9177 for (uint32_t i = 0; i < ti_to_pair_seq_len; i++)
9178 {
9179 proto_item* dep_item;
9180 proto_tree* dep_tree = proto_tree_add_subtree_format(deps_seq_tree, tvb,
9181 offset, -1, ett_rtps_type_dep, &dep_item, "Dependent Type ID [%u]", i);
9182 const int initial_dep_offset = offset;
9183
9184 /* TypeIdentifier */
9185 offset = rtps_util_add_type_id_v2(dep_tree, pinfo, tvb, offset, false0);
9186
9187 /* Delimited header */
9188 offset = rtps_util_add_xcdr2_delimited_header(dep_tree, tvb, offset);
9189
9190 /* (appendable) TypeObject */
9191 const char* label = "Unknown";
9192 offset = rtps_util_add_type_object_v2(dep_tree, pinfo, tvb, offset, &label);
9193 proto_item_set_text(dep_item, "Dependent Type ID [%d] (%s)", i, label);
9194
9195 proto_item_set_len(dep_item, offset - initial_dep_offset);
9196 }
9197
9198 proto_item_set_len(deps_seq_item, offset - initial_deps_seq_offset);
9199
9200 /* Enhanced Mutable Header for complete_to_minimal */
9201 offset = rtps_util_add_xcdr2_enhanced_mutable_header(tree, tvb, offset);
9202
9203 const uint32_t complete_minimal_seq_len = tvb_get_uint32(tvb, offset,
9204 ENC_LITTLE_ENDIAN0x80000000);
9205 offset += 4;
9206
9207 /* sequence<TypeIdentifierPair> complete_to_minimal */
9208 if (complete_minimal_seq_len > 0)
9209 {
9210 proto_tree* complete_to_minimal_seq_tree = proto_tree_add_subtree_format(
9211 tree, tvb, offset, -1, ett_rtps_type_deps_seq, NULL((void*)0),
9212 "Complete to Minimal Type IDs [%u]", complete_minimal_seq_len);
9213
9214 /* TypeIdentifierPair */
9215 for (uint32_t i = 0; i < complete_minimal_seq_len; i++)
9216 {
9217 proto_tree* dep_tree = proto_tree_add_subtree_format(
9218 complete_to_minimal_seq_tree, tvb, offset, -1, ett_rtps_type_dep, NULL((void*)0),
9219 "Mapping %d", i);
9220 offset = rtps_util_add_type_id_v2(dep_tree, pinfo, tvb, offset, false0);
9221 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
9222 offset += 4;
9223 offset = rtps_util_add_type_id_v2(dep_tree, pinfo, tvb, offset, false0);
9224 }
9225 }
9226
9227 return offset;
9228}
9229
9230/**
9231 * @brief Add a type lookup request ID to the protocol tree
9232 *
9233 * @details This function adds the type lookup request ID to the protocol tree.
9234 * The request ID consists of a GUID (16 bytes) followed by a sequence number
9235 * (8 bytes).
9236 *
9237 * @param tree Protocol tree to add the request ID elements to
9238 * @param tvb The tv buffer containing packet data
9239 * @param offset The current offset in the tvb
9240 * @return The new offset after parsing the request ID
9241 */
9242static int rtps_util_add_type_lookup_request_id(proto_tree* tree, packet_info* pinfo, tvbuff_t* tvb,
9243 int offset, uint16_t encapsulation_id)
9244{
9245 /*
9246 * 0...2...........7...............15.............23...............31
9247 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
9248 * | host id |
9249 * +---------------+---------------+---------------+---------------+
9250 * | app id |
9251 * +---------------+---------------+---------------+---------------+
9252 * | instance id |
9253 * +---------------+---------------+---------------+---------------+
9254 * | entity id |
9255 * +---------------+---------------+---------------+---------------+
9256 * | sequence number |
9257 * | |
9258 * +---------------+---------------+---------------+---------------+
9259 */
9260 /* request id - guid */
9261 rtps_util_add_guid_prefix_v2(tree, tvb, offset,
9262 hf_rtps_sm_guid_prefix, hf_rtps_sm_host_id, hf_rtps_sm_app_id,
9263 hf_rtps_sm_instance_id, 0);
9264 offset += 12;
9265 rtps_util_add_entity_id(tree, pinfo, tvb, offset,
9266 hf_rtps_sm_entity_id, hf_rtps_sm_entity_id_key, hf_rtps_sm_entity_id_kind,
9267 ett_rtps_entity, "TypeLookup Writer", NULL((void*)0));
9268 offset += 4;
9269
9270 if (encapsulation_id == ENCAPSULATION_D_CDR2_LE(0x0009))
9271 {
9272 /*
9273 * since sequence number is appendable, there will be a dheader if we are
9274 * using delimited CDR2
9275 */
9276 offset = rtps_util_add_xcdr2_delimited_header(tree, tvb, offset);
9277 }
9278 /* request id - sequence number */
9279 rtps_util_add_seq_number(tree, tvb, offset, ENC_LITTLE_ENDIAN0x80000000,
9280 "sequenceNumber");
9281 offset += 8;
9282
9283 return offset;
9284}
9285
9286/**
9287 * @brief Dissect a TypeLookup Reply structure
9288 *
9289 * @details This function handles the dissection of a TypeLookup Reply structure
9290 * following the OMG XTypes 1.3 specification. It processes a complete TypeLookup reply
9291 * structure that consists of a reply header containing a related request ID and
9292 * remote exception code, followed by reply data. Depending on the reply type,
9293 * the data contains either a sequence of TypeIdentifierTypeObjectPair objects with
9294 * mappings from complete to minimal types (for GET_TYPES), or a sequence of
9295 * TypeIdentifierWithSize objects with a continuation point (for GET_DEPENDENCIES).
9296 * Each section is preceded by XCDR2 delimited headers for proper alignment and parsing.
9297 *
9298 * @param tree Protocol tree to add the TypeLookup Reply elements to
9299 * @param pinfo Packet info for the current packet
9300 * @param tvb The tv buffer containing packet data
9301 * @param offset The current offset in the tvb
9302 */
9303static void rtps_util_dissect_type_lookup_reply(proto_tree* tree,
9304 packet_info* pinfo, tvbuff_t* tvb, int offset, uint16_t encapsulation_id)
9305{
9306 proto_item* type_lookup_reply_item;
9307 proto_tree* type_lookup_reply_tree = proto_tree_add_subtree(tree, tvb,
9308 offset, -1, ett_rtps_type_lookup_reply,
9309 &type_lookup_reply_item, "Type Lookup Reply");
9310 const int initial_offset = offset;
9311
9312 /* reply header */
9313 proto_item* type_lookup_reply_header_item;
9314 proto_tree* type_lookup_reply_header_tree = proto_tree_add_subtree(
9315 type_lookup_reply_tree, tvb, offset, -1, ett_rtps_type_lookup_reply_header,
9316 &type_lookup_reply_header_item, "Reply Header");
9317
9318 /* reply header - request id */
9319 proto_item* type_lookup_request_id_item;
9320 proto_tree* type_lookup_request_id_tree = proto_tree_add_subtree(
9321 type_lookup_reply_header_tree, tvb, offset, -1, ett_rtps_type_lookup_request_id,
9322 &type_lookup_request_id_item, "Related Request ID");
9323 offset = rtps_util_add_type_lookup_request_id(type_lookup_request_id_tree, pinfo, tvb, offset, encapsulation_id);
9324 proto_item_set_len(type_lookup_request_id_item, offset - initial_offset);
9325
9326 /* reply header - remote exception code */
9327 proto_tree_add_item(type_lookup_reply_header_tree,
9328 hf_rtps_remote_exception_code, tvb, offset, 4, ENC_LITTLE_ENDIAN0x80000000);
9329 offset += 4;
9330
9331 /* end of reply header */
9332 proto_item_set_len(type_lookup_reply_header_item, offset - initial_offset);
9333
9334 /* reply data */
9335 proto_item* type_lookup_reply_data_item;
9336 proto_tree* type_lookup_reply_data_tree = proto_tree_add_subtree(
9337 type_lookup_reply_tree, tvb, offset, -1, ett_rtps_type_lookup_reply_data,
9338 &type_lookup_reply_data_item, "Reply Data");
9339 const int initial_reply_data_offset = offset;
9340
9341 /* Delimited header */
9342 offset = rtps_util_add_xcdr2_delimited_header(type_lookup_reply_data_tree, tvb, offset);
9343
9344 /* reply header - reply type GET_TYPES or GET_TYPE_DEPENDENCIES */
9345 const uint32_t reply_discriminator = tvb_get_uint32(tvb, offset, ENC_LITTLE_ENDIAN0x80000000);
9346 proto_tree_add_item(type_lookup_reply_data_tree,
9347 hf_rtps_type_lookup_discriminator, tvb, offset, 4, ENC_LITTLE_ENDIAN0x80000000);
9348 offset += 4;
9349
9350 if (reply_discriminator == GET_TYPE_DEPENDENCIES(0x05aafb31))
9351 {
9352 /* rtps_util_dissect_get_type_dependencies_out() would go here */
9353 proto_item_set_text(type_lookup_reply_data_item,
9354 "TypeLookup Reply Data: GET_DEPENDENCIES");
9355 offset = rtps_util_dissect_get_type_dependencies_out(
9356 type_lookup_reply_data_tree, pinfo, tvb, offset);
9357 }
9358 else
9359 {
9360 /* GET_TYPES */
9361 proto_item_set_text(type_lookup_reply_data_item,
9362 "TypeLookup Reply Data: GET_TYPES");
9363 offset = rtps_util_dissect_get_types_out(type_lookup_reply_data_tree, pinfo,
9364 tvb, offset);
9365 }
9366
9367 proto_item_set_len(type_lookup_reply_data_item,
9368 offset - initial_reply_data_offset);
9369 proto_item_set_len(type_lookup_reply_item, offset - initial_offset);
9370}
9371
9372/**
9373 * @brief Dissect a TypeLookup Request structure
9374 *
9375 * @details This function handles the dissection of a TypeLookup Request structure
9376 * following the OMG XTypes 1.3 * specification. It processes the request header
9377 * that contains a GUID, sequence number, and instance name, followed by request
9378 * data that varies based on the requested operation type (GET_TYPES or
9379 * GET_DEPENDENCIES). For GET_TYPES, it dissects a sequence of TypeIdentifiers
9380 * to look up; for GET_DEPENDENCIES, it additionally processes a continuation
9381 * point after the sequence of TypeIdentifiers. Each section is preceded by XCDR2
9382 * delimited headers for proper alignment and parsing.
9383 *
9384 * @param tree Protocol tree to add the TypeLookup Request elements to
9385 * @param pinfo Packet info for the current packet
9386 * @param tvb The tv buffer containing packet data
9387 * @param offset The current offset in the tvb
9388 */
9389static void rtps_util_dissect_type_lookup_request(proto_tree* tree,
9390 packet_info* pinfo, tvbuff_t* tvb, int offset, uint16_t encapsulation_id)
9391{
9392 proto_item* type_lookup_request_item;
9393 proto_tree* type_lookup_request_tree = proto_tree_add_subtree(tree,
9394 tvb, offset, -1, ett_rtps_type_lookup_request, &type_lookup_request_item,
9395 "Type Lookup Request");
9396 const int initial_offset = offset;
9397
9398 /* request header */
9399 proto_item* type_lookup_request_header_item;
9400 proto_tree* type_lookup_request_header_tree = proto_tree_add_subtree(
9401 type_lookup_request_tree, tvb, offset, -1,
9402 ett_rtps_type_lookup_request_header,
9403 &type_lookup_request_header_item, "Request Header");
9404
9405 /* request header - request id */
9406 proto_item* type_lookup_request_id_item;
9407 proto_tree* type_lookup_request_id_tree = proto_tree_add_subtree(
9408 type_lookup_request_header_tree, tvb, offset, -1,
9409 ett_rtps_type_lookup_request_id, &type_lookup_request_id_item,
9410 "Request ID");
9411 offset = rtps_util_add_type_lookup_request_id(type_lookup_request_id_tree, pinfo, tvb, offset, encapsulation_id);
9412 proto_item_set_len(type_lookup_request_id_item, offset - initial_offset);
9413
9414 /* request header - instance name */
9415 offset = rtps_util_add_string_no_align(type_lookup_request_header_tree, tvb,
9416 offset, hf_rtps_instance_name, ENC_LITTLE_ENDIAN0x80000000);
9417 proto_item_set_len(type_lookup_request_header_item, offset - initial_offset);
9418
9419 /* TypeLookup request data */
9420 proto_item* type_lookup_request_data_item;
9421 proto_tree* type_lookup_request_data_tree = proto_tree_add_subtree(
9422 type_lookup_request_tree, tvb, offset, -1,
9423 ett_rtps_type_lookup_request_data, &type_lookup_request_data_item,
9424 "Request Data");
9425 const int initial_data_offset = offset;
9426
9427 /* Delimited header */
9428 offset = rtps_util_add_xcdr2_delimited_header(type_lookup_request_data_tree,
9429 tvb, offset);
9430
9431 /* request_type discriminator - GET_TYPES or GET_TYPE_DEPENDENCIES */
9432 const uint32_t request_type_discriminator = tvb_get_uint32(tvb, offset,
9433 ENC_LITTLE_ENDIAN0x80000000);
9434 proto_tree_add_item(type_lookup_request_data_tree,
9435 hf_rtps_type_lookup_discriminator, tvb, offset, 4, ENC_LITTLE_ENDIAN0x80000000);
9436 offset += 4;
9437
9438 /*
9439 * (mutable) TypeLookup_getTypes_In or TypeLookup_getDependencies_In
9440 * both start with sequence<TypeIdentifier> type_ids */
9441
9442 /* Delimited header */
9443 offset = rtps_util_add_xcdr2_delimited_header(type_lookup_request_data_tree,
9444 tvb, offset);
9445
9446 /* Enhanced Mutable Header for type_ids */
9447 offset = rtps_util_add_xcdr2_enhanced_mutable_header(
9448 type_lookup_request_data_tree, tvb, offset);
9449
9450 /* long type_ids sequence length */
9451 const uint32_t requested_typeid_seq_len = tvb_get_uint32(tvb, offset,
9452 ENC_LITTLE_ENDIAN0x80000000);
9453 offset += 4;
9454
9455 /* sequence<TypeIdentifier> type_ids */
9456 if (requested_typeid_seq_len > 0) {
9457 proto_item* req_seq_item;
9458 proto_tree* req_seq_tree = proto_tree_add_subtree_format(
9459 type_lookup_request_data_tree, tvb, offset, -1,
9460 ett_rtps_type_lookup_deps_seq, &req_seq_item, "Requested Type IDs [%u]",
9461 requested_typeid_seq_len);
9462 const int initial_req_seq_offset = offset;
9463
9464 for (uint32_t i = 0; i < requested_typeid_seq_len; i++)
9465 {
9466 proto_item* req_item;
9467 proto_tree* req_tree = proto_tree_add_subtree_format(req_seq_tree, tvb,
9468 offset, -1, ett_rtps_type_dep, &req_item, "Requested Type ID [%u]", i);
9469 const int initial_req_offset = offset;
9470 offset = rtps_util_add_type_id_v2(req_tree, pinfo, tvb, offset, false0);
9471 proto_item_set_len(req_item, offset - initial_req_offset);
9472 }
9473
9474 proto_item_set_len(req_seq_item, offset - initial_req_seq_offset);
9475 }
9476
9477 /* Is this a GET_TYPE_DEPENDENCIES request? */
9478 if (request_type_discriminator == GET_TYPE_DEPENDENCIES(0x05aafb31))
9479 {
9480 proto_item_set_text(type_lookup_request_data_item,
9481 "TypeLookup Request Data: GET_DEPENDENCIES");
9482 /*
9483 * GET_TYPE_DEPENDENCIES has a continuation_point, GET_TYPES does not,
9484 * that is the only difference between the two.
9485 */
9486 /* Enhanced Mutable Header for continuation_point */
9487 offset = rtps_util_add_xcdr2_enhanced_mutable_header(
9488 type_lookup_request_data_tree, tvb, offset);
9489 }
9490 else
9491 {
9492 proto_item_set_text(type_lookup_request_data_item,
9493 "TypeLookup Request Data: GET_TYPES");
9494 }
9495
9496 proto_item_set_len(type_lookup_request_data_item,
9497 offset - initial_data_offset);
9498 proto_item_set_len(type_lookup_request_item, offset - initial_offset);
9499}
9500
9501#if defined (HAVE_ZLIB1) || defined (HAVE_ZLIBNG)
9502static void rtps_add_zlib_compressed_typeobject(proto_tree *tree, packet_info * pinfo,
9503 tvbuff_t * tvb, int offset, const unsigned encoding, unsigned compressed_size,
9504 unsigned decompressed_size, type_mapping * type_mapping_object) {
9505
9506 tvbuff_t *decompressed_data_child_tvb;
9507 tvbuff_t *compressed_type_object_subset;
9508 proto_tree *decompressed_type_object_subtree;
9509
9510 compressed_type_object_subset = tvb_new_subset_length(tvb, offset, decompressed_size);
9511 decompressed_data_child_tvb = tvb_child_uncompress_zlib(tvb, compressed_type_object_subset, 0, compressed_size);
9512 if (decompressed_data_child_tvb) {
9513 decompressed_type_object_subtree = proto_tree_add_subtree(tree, decompressed_data_child_tvb,
9514 0, 0, ett_rtps_decompressed_type_object, NULL((void*)0), "[Uncompressed type object]");
9515 rtps_util_add_typeobject(decompressed_type_object_subtree, pinfo,
9516 decompressed_data_child_tvb, 0, encoding, decompressed_size, type_mapping_object);
9517 }
9518 else {
9519 proto_tree_add_subtree(tree, compressed_type_object_subset,
9520 0, 0, ett_rtps_decompressed_type_object, NULL((void*)0), "[Failed to decompress type object]");
9521 }
9522}
9523#else
9524static void rtps_add_zlib_compressed_typeobject(proto_tree *tree _U___attribute__((unused)), packet_info * pinfo _U___attribute__((unused)),
9525 tvbuff_t * tvb _U___attribute__((unused)), int offset _U___attribute__((unused)), const unsigned encoding _U___attribute__((unused)), unsigned compressed_size _U___attribute__((unused)),
9526 unsigned decompressed_size _U___attribute__((unused)), type_mapping * type_mapping_object _U___attribute__((unused)))
9527{
9528}
9529#endif
9530
9531/* ------------------------------------------------------------------------- */
9532/* Insert in the protocol tree the next bytes interpreted as Sequence of
9533 * Octets.
9534 * The formatted buffer is: [ 0x01, 0x02, 0x03, 0x04, ...]
9535 * The maximum number of elements displayed is 10, after that a '...' is
9536 * inserted.
9537 */
9538static int rtps_util_add_seq_octets(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
9539 int offset, const unsigned encoding, int param_length, int hf_id) {
9540 uint32_t seq_length;
9541 proto_item *ti;
9542
9543 ti = proto_tree_add_item_ret_uint(tree, hf_rtps_sequence_size, tvb, offset, 4, encoding, &seq_length);
9544
9545 offset += 4;
9546 /* param length -1 means not specified */
9547 if (param_length != -1 && param_length < 4 + (int)seq_length) {
9548 expert_add_info_format(pinfo, ti, &ei_rtps_parameter_value_invalid, "ERROR: Parameter value too small");
9549 return offset + seq_length;
9550 }
9551
9552 if (seq_length) {
9553 proto_tree_add_item(tree, hf_id, tvb, offset, seq_length, ENC_NA0x00000000);
9554 }
9555
9556 return offset + seq_length;
9557}
9558
9559static int rtps_util_add_data_holder(proto_tree *tree, tvbuff_t * tvb, packet_info * pinfo,
9560 int offset, const unsigned encoding, int seq_index, int alignment_zero) {
9561 proto_tree * data_holder_tree, * properties_tree, * property_tree;
9562 proto_item * tii, * ti, * data_holder;
9563 uint32_t seq_size, i;
9564 int offset_tmp, data_holder_begin;
9565
9566 data_holder_tree = proto_tree_add_subtree_format(tree, tvb, offset,
9567 -1, ett_rtps_data_holder, &data_holder, "Data Holder [%d]", seq_index);
9568 data_holder_begin = offset;
9569 offset = rtps_util_add_string(data_holder_tree, tvb, offset,
9570 hf_rtps_pgm_data_holder_class_id, encoding);
9571 LONG_ALIGN_ZERO(offset, alignment_zero)(offset -= alignment_zero, (offset = (offset+3)&0xfffffffc
), offset += alignment_zero)
;
9572
9573 offset_tmp = offset;
9574 properties_tree = proto_tree_add_subtree_format(data_holder_tree, tvb, offset,
9575 -1, ett_rtps_data_holder_properties, &tii, "String Properties");
9576 seq_size = tvb_get_uint32(tvb, offset, encoding);
9577 offset += 4;
9578 for(i = 0; i < seq_size; i++) {
9579 int local_offset = offset;
9580 property_tree = proto_tree_add_subtree_format(properties_tree, tvb, offset,
9581 -1, ett_rtps_property_tree, &ti, "Property [%d]", i);
9582 offset = rtps_util_add_string(property_tree, tvb, offset,
9583 hf_rtps_property_name, encoding);
9584 offset = rtps_util_add_string(property_tree, tvb, offset,
9585 hf_rtps_property_value, encoding);
9586 proto_item_set_len(ti, offset - local_offset);
9587 }
9588 proto_item_set_len(tii, offset - offset_tmp);
9589
9590 offset_tmp = offset;
9591 properties_tree = proto_tree_add_subtree_format(data_holder_tree, tvb, offset,
9592 -1, ett_rtps_data_holder_properties, &tii, "Binary Properties");
9593 seq_size = tvb_get_uint32(tvb, offset, encoding);
9594 offset += 4;
9595 for(i = 0; i < seq_size; i++) {
9596 int local_offset = offset;
9597 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
9598 property_tree = proto_tree_add_subtree_format(properties_tree, tvb, offset,
9599 -1, ett_rtps_property_tree, &ti, "Property [%d]", i);
9600 offset = rtps_util_add_string(property_tree, tvb, offset,
9601 hf_rtps_property_name, encoding);
9602 offset = rtps_util_add_seq_octets(property_tree, pinfo, tvb, offset,
9603 encoding, -1, hf_rtps_param_user_data);
9604 proto_item_set_len(ti, offset - local_offset);
9605 }
9606 proto_item_set_len(tii, offset - offset_tmp);
9607 proto_item_set_len(data_holder, offset - offset_tmp);
9608
9609 proto_item_set_len(data_holder, offset - data_holder_begin);
9610 return offset;
9611}
9612
9613static int rtps_util_add_data_holder_seq(proto_tree *tree, tvbuff_t * tvb,
9614 packet_info * pinfo, int offset, const unsigned encoding, int alignment_zero) {
9615 proto_tree * data_holder_seq_tree;
9616 proto_item * ti;
9617 uint32_t seq_length;
9618 uint32_t i;
9619
9620 data_holder_seq_tree = proto_tree_add_subtree(tree, tvb, offset,
9621 -1, ett_rtps_data_holder_seq, &ti, "Data Holder Sequence");
9622 seq_length = tvb_get_uint32(tvb, offset, encoding);
9623 offset += 4;
9624 for(i = 0; i < seq_length; i++) {
9625 offset = rtps_util_add_data_holder(data_holder_seq_tree, tvb, pinfo, offset,
9626 encoding, i, alignment_zero);
9627 }
9628 return offset;
9629}
9630
9631/* ------------------------------------------------------------------------- */
9632/* Insert in the protocol tree the next bytes interpreted as a Bitmap
9633 * struct {
9634 * SequenceNumber_t bitmapBase;
9635 * sequence<long, 8> bitmap;
9636 * } SequenceNumberSet;
9637 *
9638 * Returns the new offset after reading the bitmap.
9639 */
9640static int rtps_util_add_bitmap(proto_tree *tree,
9641 packet_info *pinfo,
9642 tvbuff_t *tvb,
9643 int offset,
9644 const unsigned encoding,
9645 const char *label,
9646 bool_Bool show_analysis) {
9647 int32_t num_bits;
9648 uint32_t data;
9649 wmem_strbuf_t *temp_buff = wmem_strbuf_create(pinfo->pool)wmem_strbuf_new(pinfo->pool, "");
9650 wmem_strbuf_t *analysis_buff = wmem_strbuf_create(pinfo->pool)wmem_strbuf_new(pinfo->pool, "");
9651 int i, j, idx;
9652 char *last_one;
9653 proto_item *ti = NULL((void*)0), *ti_tree = NULL((void*)0);
9654 proto_tree *bitmap_tree;
9655 const int original_offset = offset;
9656 uint32_t datamask;
9657 uint64_t first_seq_number;
9658 bool_Bool first_nack = true1;
9659
9660 bitmap_tree = proto_tree_add_subtree(tree, tvb, original_offset, offset-original_offset,
9661 ett_rtps_bitmap, &ti_tree, label);
9662
9663 /* Bitmap base sequence number */
9664 first_seq_number = rtps_util_add_seq_number(bitmap_tree, tvb, offset, encoding, "bitmapBase");
9665 offset += 8;
9666
9667 /* Reads the bitmap size */
9668 proto_tree_add_item_ret_uint(bitmap_tree, hf_rtps_bitmap_num_bits, tvb, offset, 4, encoding, &num_bits);
9669 offset += 4;
9670 /* bitmap base 0 means that this is a preemptive ACKNACK */
9671 if (first_seq_number == 0 && show_analysis) {
9672 ti = proto_tree_add_uint_format(bitmap_tree, hf_rtps_acknack_analysis, tvb, 0, 0,
9673 1, "Acknack Analysis: Preemptive ACKNACK");
9674 proto_item_set_generated(ti);
9675 }
9676
9677 if (first_seq_number > 0 && num_bits == 0 && show_analysis) {
9678 ti = proto_tree_add_uint_format(bitmap_tree, hf_rtps_acknack_analysis, tvb, 0, 0,
9679 2, "Acknack Analysis: Expecting sample %" PRIu64"l" "u", first_seq_number);
9680 proto_item_set_generated(ti);
9681 }
9682
9683 if (num_bits > 0 && show_analysis) {
9684 ti = proto_tree_add_uint_format(bitmap_tree, hf_rtps_acknack_analysis, tvb, 0, 0,
9685 3, "Acknack Analysis: Lost samples");
9686 proto_item_set_generated(ti);
9687 }
9688
9689 /* Reads the bits (and format the print buffer) */
9690 idx = 0;
9691 for (i = 0; i < num_bits; i += 32) {
9692 data = tvb_get_uint32(tvb, offset, encoding);
9693 offset += 4;
9694 for (j = 0; j < 32; ++j) {
9695 datamask = (1U << (31-j));
9696 wmem_strbuf_append_c(temp_buff, ((data & datamask) == datamask) ? '1':'0');
9697 if ((data & datamask) == datamask) {
9698 proto_item_append_text(ti,
9699 first_nack ? " %" PRIu64"l" "u" : ", %" PRIu64"l" "u",
9700 first_seq_number + idx);
9701 first_nack = false0;
9702 }
9703 ++idx;
9704 if ((idx >= num_bits) || (wmem_strbuf_get_len(temp_buff) >= (ITEM_LABEL_LENGTH240 - 1))) {
9705 break;
9706 }
9707 }
9708 }
9709
9710 /* removes all the ending '0' */
9711 last_one = strrchr(wmem_strbuf_get_str(temp_buff), '1');
9712 if (last_one) {
9713 wmem_strbuf_truncate(temp_buff, (size_t) (last_one - wmem_strbuf_get_str(temp_buff)) + 1);
9714 }
9715
9716 if (wmem_strbuf_get_len(temp_buff) > 0) {
9717 proto_tree_add_bytes_format_value(bitmap_tree, hf_rtps_bitmap, tvb,
9718 original_offset + 12, offset - original_offset - 12,
9719 NULL((void*)0), "%s", wmem_strbuf_get_str(temp_buff));
9720 }
9721
9722 proto_item_set_len(ti_tree, offset-original_offset);
9723
9724 /* Add analysis of the information */
9725 if (num_bits > 0 && show_analysis) {
9726 proto_item_append_text(ti, "%s in range [%" PRIu64"l" "u" ",%" PRIu64"l" "u" "]",
9727 wmem_strbuf_get_str(analysis_buff), first_seq_number, first_seq_number + num_bits - 1);
9728 }
9729
9730 return offset;
9731}
9732
9733/* ------------------------------------------------------------------------- */
9734/* Insert in the protocol tree the next bytes interpreted as a FragmentNumberSet
9735 * typedef unsigned long FragmentNumber_t;
9736 * struct {
9737 * FragmentNumber_t bitmapBase;
9738 * sequence<FragmentNumber_t> bitmap;
9739 * } FragmentNumberSet;
9740 *
9741 * Returns the new offset after reading the bitmap.
9742 */
9743static int rtps_util_add_fragment_number_set(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
9744 int offset, const unsigned encoding, const char *label, int section_size) {
9745 uint64_t base;
9746 int32_t num_bits;
9747 uint32_t data;
9748 wmem_strbuf_t *temp_buff = wmem_strbuf_create(pinfo->pool)wmem_strbuf_new(pinfo->pool, "");
9749 char *last_one;
9750 int i, j, idx;
9751 proto_item *ti;
9752 proto_tree *bitmap_tree;
9753 const int original_offset = offset;
9754 uint32_t datamask;
9755 int expected_size;
9756 int base_size;
9757
9758 bitmap_tree = proto_tree_add_subtree(tree, tvb, original_offset, offset-original_offset, ett_rtps_bitmap, &ti, label);
9759
9760 /* RTI DDS 4.2d was sending the FragmentNumber_t as a 64-bit long integer
9761 * instead of 32-bit long.
9762 * Attempt to decode this section as 32-bit, then check if the size of the
9763 * message match what is here. If not re-decode it as 64-bit.
9764 */
9765 num_bits = tvb_get_uint32(tvb, offset+4, encoding);
9766 expected_size = ((num_bits + 31) / 32) * 4 + 8;
9767 if (expected_size == section_size) {
9768 base = (uint64_t)tvb_get_uint32(tvb, offset, encoding);
9769 base_size = 4;
9770 offset += 8;
9771 } else {
9772 /* Attempt to use 64-bit for base */
9773 num_bits = tvb_get_uint32(tvb, offset+8, encoding);
9774 /* num_bits/8 must be aligned to the 4-byte word */
9775 expected_size = (((num_bits / 8) + 3) / 4) * 4 + 12;
9776 if (expected_size == section_size) {
9777 uint64_t hi = (uint64_t)tvb_get_uint32(tvb, offset, encoding);
9778 uint64_t lo = (uint64_t)tvb_get_uint32(tvb, offset+4, encoding);
9779 base = (hi << 32) | lo;
9780 base_size = 8;
9781 offset += 12;
9782 } else {
9783 /* size don't match, packet error */
9784 expert_add_info_format(pinfo, ti, &ei_rtps_parameter_value_invalid, "Illegal size for fragment number set");
9785 return -1;
9786 }
9787 }
9788
9789 /* Reads the bits (and format the print buffer) */
9790 idx = 0;
9791 for (i = 0; i < num_bits; i += 32) {
9792 data = tvb_get_uint32(tvb, offset, encoding);
9793 offset += 4;
9794 for (j = 0; j < 32; ++j) {
9795 datamask = (1U << (31-j));
9796 wmem_strbuf_append_c(temp_buff, ((data & datamask) == datamask) ? '1':'0');
9797 ++idx;
9798 if ((idx >= num_bits) || (wmem_strbuf_get_len(temp_buff) >= (ITEM_LABEL_LENGTH240 - 1))) {
9799 break;
9800 }
9801 }
9802 }
9803
9804 /* removes all the ending '0' */
9805 last_one = strrchr(wmem_strbuf_get_str(temp_buff), '1');
9806 if (last_one) {
9807 wmem_strbuf_truncate(temp_buff, (size_t) (last_one - wmem_strbuf_get_str(temp_buff)));
9808 }
9809
9810 if (base_size == 8) {
9811 proto_tree_add_uint64(bitmap_tree, hf_rtps_fragment_number_base64, tvb, original_offset, 8,
9812 base);
9813 } else {
9814 proto_tree_add_item(bitmap_tree, hf_rtps_fragment_number_base, tvb, original_offset, base_size, encoding);
9815 }
9816 proto_tree_add_uint(bitmap_tree, hf_rtps_fragment_number_num_bits, tvb, original_offset + base_size, 4, num_bits);
9817
9818 if (wmem_strbuf_get_len(temp_buff) > 0) {
9819 proto_tree_add_bytes_format_value(bitmap_tree, hf_rtps_bitmap, tvb, original_offset + base_size + 4, offset - original_offset - base_size - 4,
9820 NULL((void*)0), "%s", wmem_strbuf_get_str(temp_buff));
9821 }
9822
9823 proto_item_set_len(ti, offset-original_offset);
9824 return offset;
9825}
9826
9827static void rtps_util_insert_type_mapping_in_registry(packet_info *pinfo, type_mapping *type_mapping_object) {
9828 if (type_mapping_object) {
9829 if ((type_mapping_object->fields_visited & TOPIC_INFO_ALL_SET(0x07)) == TOPIC_INFO_ALL_SET(0x07) &&
9830 type_mapping_object->guid.fields_present == GUID_HAS_ALL0x0000000F &&
9831 !wmem_map_lookup(registry, &(type_mapping_object->guid))) {
9832 if (((type_mapping_object->guid.entity_id & 0x02) == 0x02) || ((type_mapping_object->guid.entity_id & 0x04) == 0x04)){
9833 /* If it is an application defined writer matches 0x02. Matches 0x04 if it is an application defined reader */
9834 type_mapping_object->dcps_publication_frame_number = pinfo->num;
9835 wmem_map_insert(registry, &(type_mapping_object->guid), type_mapping_object);
9836 }
9837 }
9838 }
9839}
9840
9841static void rtps_util_store_type_mapping(packet_info *pinfo _U___attribute__((unused)), tvbuff_t *tvb, int offset,
9842 type_mapping * type_mapping_object, const char * value,
9843 int topic_info_add_id) {
9844 if (enable_topic_info && type_mapping_object) {
9845 switch (topic_info_add_id) {
9846 case TOPIC_INFO_ADD_GUID(0x01): {
9847 type_mapping_object->guid.host_id = tvb_get_ntohl(tvb, offset);
9848 type_mapping_object->guid.app_id = tvb_get_ntohl(tvb, offset+4);
9849 type_mapping_object->guid.instance_id = tvb_get_ntohl(tvb, offset+8);
9850 type_mapping_object->guid.entity_id = tvb_get_ntohl(tvb, offset+12);
9851 type_mapping_object->guid.fields_present |=
9852 GUID_HAS_HOST_ID0x00000001|GUID_HAS_APP_ID0x00000002|GUID_HAS_INSTANCE_ID0x00000004|GUID_HAS_ENTITY_ID0x00000008;
9853 type_mapping_object->fields_visited =
9854 type_mapping_object->fields_visited | TOPIC_INFO_ADD_GUID(0x01);
9855 break;
9856 }
9857 case TOPIC_INFO_ADD_TOPIC_NAME(0x04): {
9858 rtps_strlcpy(type_mapping_object->topic_name, value, MAX_TOPIC_AND_TYPE_LENGTH256);
9859 type_mapping_object->fields_visited =
9860 type_mapping_object->fields_visited | TOPIC_INFO_ADD_TOPIC_NAME(0x04);
9861 break;
9862 }
9863 case TOPIC_INFO_ADD_TYPE_NAME(0x02): {
9864 rtps_strlcpy(type_mapping_object->type_name, value, MAX_TOPIC_AND_TYPE_LENGTH256);
9865 type_mapping_object->fields_visited =
9866 type_mapping_object->fields_visited | TOPIC_INFO_ADD_TYPE_NAME(0x02);
9867 break;
9868 }
9869
9870 default:
9871 break;
9872 }
9873 }
9874}
9875
9876static unsigned hash_by_participant_guid(const void *key) {
9877 const endpoint_guid* guid = (const endpoint_guid*)key;
9878 int vals[] = { guid->host_id, guid->app_id, guid->instance_id };
9879 GBytes* gbytes = g_bytes_new(vals, sizeof(vals));
9880 unsigned hash = g_bytes_hash(gbytes);
9881 g_bytes_unref(gbytes);
9882 return hash;
9883}
9884
9885static unsigned hash_by_guid(const void *key) {
9886 const endpoint_guid * guid = (const endpoint_guid *) key;
9887 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", 9887, "guid->fields_present & 0x00000002"
))))
;
9888 return g_int_hash(&(guid->app_id));
9889}
9890
9891static gboolean compare_by_guid(const void *guid_a, const void *guid_b) {
9892 return memcmp(guid_a, guid_b, sizeof(endpoint_guid)) == 0;
9893}
9894
9895static gboolean compare_by_participant_guid(const void *guid_a, const void *guid_b) {
9896 const endpoint_guid* a = (const endpoint_guid*)guid_a;
9897 const endpoint_guid* b = (const endpoint_guid*)guid_b;
9898 return ((a->host_id == b->host_id) && (a->app_id == b->app_id) && (a->instance_id == b->instance_id));
9899}
9900
9901static unsigned get_domain_id_from_tcp_discovered_participants(wmem_map_t *map, endpoint_guid* key) {
9902 participant_info *p_info = (participant_info*)wmem_map_lookup(map, (void*)key);
9903 return (p_info != NULL((void*)0)) ? p_info->domainId: RTPS_UNKNOWN_DOMAIN_ID_VAL-1;
9904}
9905
9906static unsigned coherent_set_key_hash_by_key(const void *key) {
9907 return wmem_strong_hash((const uint8_t *)key, sizeof(coherent_set_key));
9908}
9909
9910static gboolean compare_by_coherent_set_key(const void *key_a, const void *key_b) {
9911 return memcmp(key_a, key_b, sizeof(coherent_set_key)) == 0;
9912}
9913
9914static type_mapping * rtps_util_get_topic_info(endpoint_guid * guid) {
9915 /* At this point, we know the boolean enable_topic_info is true */
9916 type_mapping * result = NULL((void*)0);
9917 if (guid) {
9918 unsigned entity_id_low = 0xFF & guid->entity_id;
9919 /* If the entity guid low is ENTITYID_NORMAL_META_GROUP_READER or ENTITYID_NORMAL_META_GROUP_WRITER then
9920 * is a builtin endpoint that uses the type InstaneStateResponseData. The type_mapping for this type is not
9921 * available through discovery. It is defined by code in
9922 * initialize_instance_state_data_response_dissection_info function.
9923 */
9924 if (entity_id_low == ENTITYID_NORMAL_META_GROUP_READER(0x8d) || entity_id_low == ENTITYID_NORMAL_META_GROUP_WRITER(0x8c)) {
9925 result = &builtin_types_dissection_data.type_mappings.instance_state_data_response_type_mapping;
9926 }
9927 else if (guid->fields_present == GUID_HAS_ALL0x0000000F)
9928 result = (type_mapping *)wmem_map_lookup(registry, guid);
9929 }
9930 return result;
9931}
9932
9933static void rtps_util_format_typename(wmem_allocator_t *scope, char * type_name, char ** output) {
9934 char ** tokens;
9935 char * result_caps;
9936 /* The standard specifies that the max size of a type name
9937 can be 255 bytes */
9938 tokens = wmem_strsplit(scope, type_name, "::", 255);
9939 result_caps = wmem_strjoinv(scope, "_", tokens);
9940 *output = wmem_ascii_strdown(scope, result_caps, -1);
9941
9942}
9943
9944/* Adds the topic topic information to the tree and the topic name to the info column.
9945 * Topic name will be added to the info column only if the topic information is stored
9946 * in the "registry map".
9947 * This is used when the packet doesn't contain the topic information (PID_TOPIC_INFORMATION)
9948 */
9949static const char* rtps_util_add_topic_info(proto_tree *tree, packet_info* pinfo, tvbuff_t *tvb,
9950 int offset, endpoint_guid * guid) {
9951 const char* topic_name = NULL((void*)0);
9952 if (enable_topic_info) {
9953 proto_tree * topic_info_tree;
9954 proto_item * ti;
9955 bool_Bool is_builtin_type = false0;
9956 type_mapping * type_mapping_object = rtps_util_get_topic_info(guid);
9957 /* If it is a builtin type mapping then the information is not taken from discovery data */
9958 is_builtin_type = (type_mapping_object == &builtin_types_dissection_data.type_mappings.instance_state_data_response_type_mapping);
9959 if (type_mapping_object != NULL((void*)0)) {
9960 const char* topic_information_text = (!is_builtin_type) ?
9961 "[Topic Information (from Discovery)]" :
9962 "[Topic Information (BuiltIn type)]";
9963 topic_name = type_mapping_object->topic_name;
9964 if (topic_name != NULL((void*)0)) {
9965 submessage_col_info* current_submessage_col_info = NULL((void*)0);
9966
9967 topic_info_tree = proto_tree_add_subtree(tree, tvb, offset, 0,
9968 ett_rtps_topic_info, NULL((void*)0), topic_information_text);
9969 ti = proto_tree_add_string(topic_info_tree, hf_rtps_param_type_name, tvb, offset, 0,
9970 type_mapping_object->type_name);
9971 proto_item_set_generated(ti);
9972 if (!is_builtin_type) {
9973 ti = proto_tree_add_string(topic_info_tree, hf_rtps_param_topic_name, tvb, offset, 0,
9974 topic_name);
9975 proto_item_set_generated(ti);
9976 ti = proto_tree_add_uint(topic_info_tree, hf_rtps_dcps_publication_data_frame_number,
9977 tvb, 0, 0, type_mapping_object->dcps_publication_frame_number);
9978 }
9979 proto_item_set_generated(ti);
9980 current_submessage_col_info = (submessage_col_info*)p_get_proto_data(pinfo->pool, pinfo, proto_rtps, RTPS_CURRENT_SUBMESSAGE_COL_DATA_KEY3);
9981 if (current_submessage_col_info != NULL((void*)0) && current_submessage_col_info->topic_name == NULL((void*)0)) {
9982 current_submessage_col_info->topic_name = wmem_strdup(pinfo->pool, topic_name);
9983 }
9984 }
9985 }
9986 }
9987 return topic_name;
9988}
9989
9990/* Uncompress data and returns it uncompressed on a new tvb.
9991 *
9992 * @param[in] tree a chunk of data in the tvb and return a new tvb with the uncompressed data
9993 * @param[in] tvb
9994 * @param[in] offset offset at the beginning of the compressed data.
9995 * @param[in] size in bytes from the initial offset to the end of the serialized data
9996 * @param[in] compressed_size size in bytes of the compressed chunk in the tvb.
9997 * @param[out] True if it tries to uncompress the data. In environment where Zlib is not available this will be false. This is used for
9998 * distinguis when the data is not decompressed because Zlib is not available (not warning) and cases where it is but fails (warning).
9999 *
10000 * @return The uncompressed data on a new TVB if everything goes fine. Otherwise NULL
10001 */
10002static
10003tvbuff_t *rtps_util_get_uncompressed_tvb_zlib(
10004 tvbuff_t *tvb _U___attribute__((unused)),
10005 const int offset _U___attribute__((unused)),
10006 const unsigned compressed_size _U___attribute__((unused)),
10007 bool_Bool *tried_to_decompress) {
10008 tvbuff_t *uncompressed_tvb = NULL((void*)0);
10009#if defined(HAVE_ZLIB1) || defined(HAVE_ZLIBNG)
10010 /* If ZLIB is available always try to decompress. */
10011 *tried_to_decompress = true1;
10012 uncompressed_tvb = tvb_new_subset_length_caplen(tvb, offset, compressed_size, -1);
10013 uncompressed_tvb = tvb_child_uncompress_zlib(uncompressed_tvb, uncompressed_tvb, 0, compressed_size);
10014#else
10015 *tried_to_decompress = false0;
10016#endif
10017 return uncompressed_tvb;
10018}
10019
10020/*
10021 * 0...2...........8...............16
10022 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
10023 * | X X X X X X X X X X X | C C C P P |
10024 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
10025 * X = Unused options bits
10026 * C = Compression bits
10027 * P = Padding bits
10028 * C = 0b111 would be extended compression options which would come in as an
10029 * additional header before the payload.
10030 * C = 0b000 to indicate no compression
10031*/
10032
10033/* Dissects the encapsultaion options
10034*
10035* @param[in] tree
10036* @param[in] packet info.
10037* @param[in] tvb
10038* @param[in] offset at the beginning of the encapsulation options.
10039* @param[out] encapsulation_options_out If not null it will contain the encapsulation options
10040* @param[out] compression_option_out If not null it will contain the compression option
10041* @param[out] padding_bytes_out If not null it will contain the padding bytes
10042* @param[out] extended_header_bits_out If not null it will contain the extended header bits
10043* @return the offset after the encapsulation options
10044* @note All output parameters are optional.
10045*/
10046static
10047int rtps_util_dissect_encapsulation_options(
10048 proto_tree *tree,
10049 tvbuff_t *tvb,
10050 int offset,
10051 int16_t *encapsulation_options_out,
10052 uint8_t *compression_options_out,
10053 uint8_t *padding_bytes_out,
10054 uint8_t *extended_header_bits_out) {
10055 uint8_t compression_options = 0;
10056 proto_tree *compression_options_subtree = NULL((void*)0);
10057 int16_t encapsulation_options = 0;
10058 uint8_t padding_bytes = 0;
10059 uint8_t extended_header_bits = 0;
10060
10061 /* Encapsulation length (or option). Always big endian. */
10062 encapsulation_options = tvb_get_int16(tvb, offset, ENC_BIG_ENDIAN0x00000000);
10063 if (encapsulation_options != 0) {
10064 compression_options_subtree = proto_tree_add_subtree_format(
10065 tree,
10066 tvb,
10067 offset,
10068 2,
10069 ett_rtps_data_encapsulation_options,
10070 NULL((void*)0),
10071 "Encapsulation options (0x%02x)",
10072 encapsulation_options);
10073 /* If compression options ENCAPSULATION_OPTIONS_COMPRESSION_EXTENDED_HEADER_VALUE bits are set, the
10074 header contains an extra field */
10075 extended_header_bits = (encapsulation_options
10076 & ENCAPSULATION_OPTIONS_COMPRESSION_EXTENDED_HEADER_VALUE(0x1C));
10077 GET_ENCAPSULATION_COMPRESSION_OPTIONS(encapsulation_options, compression_options)(compression_options = (((encapsulation_options) & ((0x1C
))) >> 2))
;
10078 padding_bytes = (encapsulation_options & ENCAPSULATION_OPTIONS_COMPRESSION_PADDING_BYTES_MASK(0x3));
10079 proto_tree_add_int(
10080 compression_options_subtree,
10081 hf_rtps_encapsulation_options_compression_plugin_class_id,
10082 tvb,
10083 offset + 1,
10084 1,
10085 compression_options);
10086 proto_tree_add_int(
10087 compression_options_subtree,
10088 hf_rtps_padding_bytes,
10089 tvb,
10090 offset + 1,
10091 1,
10092 padding_bytes);
10093 offset += 2;
10094 padding_bytes = encapsulation_options & ENCAPSULATION_OPTIONS_COMPRESSION_PADDING_BYTES_MASK(0x3);
10095 } else {
10096 /* Encapsulation length (or option). Always big endian. */
10097 proto_tree_add_item(
10098 tree,
10099 hf_rtps_param_serialize_encap_len,
10100 tvb,
10101 offset,
10102 2,
10103 ENC_BIG_ENDIAN0x00000000);
10104 offset += 2;
10105 }
10106 /* Set the optional outputs */
10107 if (encapsulation_options_out != NULL((void*)0)) {
10108 *encapsulation_options_out = encapsulation_options;
10109 }
10110 if (compression_options_out != NULL((void*)0)) {
10111 *compression_options_out = compression_options;
10112 }
10113 if (padding_bytes_out != NULL((void*)0)) {
10114 *padding_bytes_out = padding_bytes;
10115 }
10116 if (extended_header_bits_out != NULL((void*)0)) {
10117 *extended_header_bits_out = extended_header_bits;
10118 }
10119 return offset;
10120}
10121
10122static bool_Bool rtps_util_try_dissector(proto_tree *tree,
10123 packet_info *pinfo, tvbuff_t *tvb, int offset, endpoint_guid * guid,
10124 rtps_dissector_data * data, unsigned encoding, unsigned encoding_version, bool_Bool try_dissection_from_type_object) {
10125
10126
10127 if (enable_topic_info) {
10128 type_mapping * type_mapping_object = rtps_util_get_topic_info(guid);
10129 if (type_mapping_object != NULL((void*)0)) {
10130 char * dissector_name = NULL((void*)0);
10131 tvbuff_t *next_tvb;
10132 dissection_info* info = NULL((void*)0);
10133
10134 if (try_dissection_from_type_object && enable_user_data_dissection) {
10135 info = lookup_dissection_info_in_custom_and_builtin_types(type_mapping_object->type_id);
10136 if (info != NULL((void*)0)) {
10137 proto_item_append_text(tree, " (TypeId: 0x%016" PRIx64"l" "x" ")", info->type_id);
10138 return dissect_user_defined(tree, tvb, pinfo, offset, encoding, encoding_version, info,
10139 info->type_id, info->member_name, EXTENSIBILITY_INVALID, offset,
10140 0 /* flags */, 0 /* member_id */, true1);
10141 }
10142 }
10143 /* This part tries to dissect the content using a dissector */
10144 next_tvb = tvb_new_subset_remaining(tvb, offset);
10145
10146 rtps_util_format_typename(pinfo->pool, type_mapping_object->type_name, &dissector_name);
10147 return dissector_try_string_with_data(rtps_type_name_table, dissector_name,
10148 next_tvb, pinfo, tree, true1, data);
10149 }
10150 }
10151 /* Return false so the content is dissected by the codepath following this one */
10152 return false0;
10153}
10154
10155static int rtps_util_add_rti_topic_query_service_request(proto_tree * tree, packet_info *pinfo,
10156 tvbuff_t * tvb, int offset, unsigned encoding) {
10157 /*
10158 struct TopicQuerySelection {
10159 string filter_class_name; //@Optional 0
10160 string filter_expression; // 1
10161 sequence<string> filter_parameters;
10162 }; //@top-level false
10163 //@Extensibility MUTABLE_EXTENSIBILITY
10164
10165 struct TopicQueryData {
10166 TopicQuerySelection topic_query_selection;
10167 SequenceNumber_t sync_sequence_number;
10168 string topic_name;
10169 GUID_t original_related_reader_guid;
10170 }; //@top-level false
10171 //@Extensibility MUTABLE_EXTENSIBILITY
10172 */
10173 proto_tree * topic_query_tree, * topic_query_selection_tree, *topic_query_filter_params_tree;
10174 proto_item * ti;
10175 uint16_t encapsulation_id, encapsulation_opt;
10176 uint32_t param_id, param_length, param_length_2, num_filter_params;
10177 int alignment_zero, tmp_offset;
10178 uint32_t i;
10179 char* topic_name = NULL((void*)0);
10180 int topic_name_len = 0;
10181 topic_query_tree = proto_tree_add_subtree(tree, tvb, offset,
10182 0 /* To be defined */, ett_rtps_topic_query_tree, &ti, "Topic Query Data");
10183
10184 /* Encapsulation Id */
10185 encapsulation_id = tvb_get_ntohs(tvb, offset); /* Always big endian */
10186 proto_tree_add_uint(topic_query_tree, hf_rtps_encapsulation_id,
10187 tvb, offset, 2, encapsulation_id);
10188 offset += 2;
10189 encoding = get_encapsulation_endianness(encapsulation_id);
10190 /* Encapsulation length (or option) */
10191 encapsulation_opt = tvb_get_ntohs(tvb, offset); /* Always big endian */
10192 proto_tree_add_uint(topic_query_tree, hf_rtps_encapsulation_options, tvb,
10193 offset, 2, encapsulation_opt);
10194 offset += 2;
10195 alignment_zero = offset;
10196 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &param_id, &param_length);
10197 tmp_offset = offset;
10198 {
10199 /* TopicQuerySelection */
10200 topic_query_selection_tree = proto_tree_add_subtree(topic_query_tree, tvb, tmp_offset,
10201 0 /* To be defined */, ett_rtps_topic_query_selection_tree, &ti, "Topic Query Selection");
10202
10203 SHORT_ALIGN_ZERO(tmp_offset,alignment_zero)(tmp_offset -= alignment_zero, (tmp_offset = (tmp_offset+1)&
0xfffffffe), tmp_offset += alignment_zero)
;
10204 rtps_util_dissect_parameter_header(tvb, &tmp_offset, encoding, &param_id, &param_length_2);
10205 if (param_id == 0) { /* Optional string filter_class_name */
10206 LONG_ALIGN_ZERO(tmp_offset, alignment_zero)(tmp_offset -= alignment_zero, (tmp_offset = (tmp_offset+3)&
0xfffffffc), tmp_offset += alignment_zero)
;
10207 rtps_util_add_string(topic_query_selection_tree, tvb, tmp_offset,
10208 hf_rtps_topic_query_selection_filter_class_name, encoding);
10209 }
10210 tmp_offset += param_length_2;
10211
10212 SHORT_ALIGN_ZERO(tmp_offset,alignment_zero)(tmp_offset -= alignment_zero, (tmp_offset = (tmp_offset+1)&
0xfffffffe), tmp_offset += alignment_zero)
;
10213 rtps_util_dissect_parameter_header(tvb, &tmp_offset, encoding, &param_id, &param_length_2);
10214
10215 LONG_ALIGN_ZERO(tmp_offset, alignment_zero)(tmp_offset -= alignment_zero, (tmp_offset = (tmp_offset+3)&
0xfffffffc), tmp_offset += alignment_zero)
;
10216 tmp_offset = rtps_util_add_string(topic_query_selection_tree, tvb, tmp_offset,
10217 hf_rtps_topic_query_selection_filter_expression, encoding);
10218
10219 SHORT_ALIGN_ZERO(tmp_offset,alignment_zero)(tmp_offset -= alignment_zero, (tmp_offset = (tmp_offset+1)&
0xfffffffe), tmp_offset += alignment_zero)
;
10220 rtps_util_dissect_parameter_header(tvb, &tmp_offset, encoding, &param_id, &param_length_2);
10221
10222 num_filter_params = tvb_get_uint32(tvb, tmp_offset, encoding);
10223 proto_tree_add_item(topic_query_selection_tree, hf_rtps_topic_query_selection_num_parameters,
10224 tvb, tmp_offset, 4, encoding);
10225 topic_query_filter_params_tree = proto_tree_add_subtree_format(topic_query_selection_tree, tvb,
10226 tmp_offset + 4, 0 /* To be defined */, ett_rtps_topic_query_filter_params_tree, &ti,
10227 "Filter Parameters (size = %u)", num_filter_params);
10228 tmp_offset += 4;
10229
10230 for (i = 0; i < num_filter_params; ++i) {
10231 uint32_t string_size;
10232 char * retVal;
10233 LONG_ALIGN_ZERO(tmp_offset, alignment_zero)(tmp_offset -= alignment_zero, (tmp_offset = (tmp_offset+3)&
0xfffffffc), tmp_offset += alignment_zero)
;
10234 string_size = tvb_get_uint32(tvb, tmp_offset, encoding);
10235 retVal = tvb_get_string_enc(pinfo->pool, tvb, tmp_offset+4, string_size, ENC_ASCII0x00000000);
10236
10237 proto_tree_add_string_format(topic_query_filter_params_tree,
10238 hf_rtps_topic_query_selection_filter_parameter, tvb,
10239 tmp_offset, string_size+4, retVal, "%s[%d]: %s", "Filter Parameter", i, retVal);
10240
10241 tmp_offset += (4 + string_size);
10242 }
10243 SHORT_ALIGN_ZERO(tmp_offset, alignment_zero)(tmp_offset -= alignment_zero, (tmp_offset = (tmp_offset+1)&
0xfffffffe), tmp_offset += alignment_zero)
;
10244 tmp_offset += 4;
10245 proto_tree_add_item(topic_query_selection_tree, hf_rtps_topic_query_selection_kind,
10246 tvb, tmp_offset, 4, encoding);
10247 }
10248 offset = check_offset_addition(offset, param_length, tree, NULL((void*)0), tvb);
10249 SHORT_ALIGN_ZERO(offset,alignment_zero)(offset -= alignment_zero, (offset = (offset+1)&0xfffffffe
), offset += alignment_zero)
;
10250 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &param_id, &param_length);
10251
10252 rtps_util_add_seq_number(topic_query_tree, tvb, offset, encoding, "Sync Sequence Number");
10253 offset = check_offset_addition(offset, param_length, tree, NULL((void*)0), tvb);
10254
10255 SHORT_ALIGN_ZERO(offset,alignment_zero)(offset -= alignment_zero, (offset = (offset+1)&0xfffffffe
), offset += alignment_zero)
;
10256 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &param_id, &param_length);
10257
10258 LONG_ALIGN_ZERO(offset, alignment_zero)(offset -= alignment_zero, (offset = (offset+3)&0xfffffffc
), offset += alignment_zero)
;
10259 topic_name_len = tvb_get_uint32(tvb, offset, encoding);
10260 topic_name = tvb_get_string_enc(pinfo->pool, tvb, offset + 4, topic_name_len, ENC_ASCII0x00000000);
10261 proto_tree_add_string(topic_query_tree, hf_rtps_topic_query_topic_name, tvb, offset, topic_name_len + 4, topic_name);
10262 if (topic_name != NULL((void*)0)) {
10263 submessage_col_info* current_submessage_col_info = NULL((void*)0);
10264 current_submessage_col_info = (submessage_col_info*)p_get_proto_data(pinfo->pool, pinfo, proto_rtps, RTPS_CURRENT_SUBMESSAGE_COL_DATA_KEY3);
10265 if (current_submessage_col_info != NULL((void*)0) && current_submessage_col_info->topic_name == NULL((void*)0)) {
10266 current_submessage_col_info->topic_name = wmem_strdup(pinfo->pool, topic_name);
10267 }
10268 }
10269
10270
10271 offset = check_offset_addition(offset, param_length, tree, NULL((void*)0), tvb);
10272
10273 SHORT_ALIGN_ZERO(offset,alignment_zero)(offset -= alignment_zero, (offset = (offset+1)&0xfffffffe
), offset += alignment_zero)
;
10274 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &param_id, &param_length);
10275
10276 rtps_util_add_generic_guid_v2(topic_query_tree, tvb, offset,
10277 hf_rtps_topic_query_original_related_reader_guid,
10278 hf_rtps_param_host_id, hf_rtps_param_app_id, hf_rtps_param_instance_id,
10279 hf_rtps_param_entity, hf_rtps_param_entity_key, hf_rtps_param_entity_kind,
10280 NULL((void*)0));
10281
10282 offset = check_offset_addition(offset, param_length, tree, NULL((void*)0), tvb);
10283 return offset;
10284}
10285
10286static int rtps_util_add_rti_locator_reachability_service_request(proto_tree * tree,
10287 packet_info *pinfo, tvbuff_t * tvb, int offset, unsigned encoding) {
10288 proto_tree * locator_reachability_tree, * locator_seq_tree;
10289 proto_item * ti;
10290 uint16_t encapsulation_id, encapsulation_opt;
10291 uint32_t param_id, param_length, seq_length, i;
10292 locator_reachability_tree = proto_tree_add_subtree(tree, tvb, offset,
10293 0 /* To be defined */, ett_rtps_locator_reachability_tree, &ti, "Locator Reachability Data");
10294 /* Encapsulation Id */
10295 encapsulation_id = tvb_get_ntohs(tvb, offset); /* Always big endian */
10296 proto_tree_add_uint(locator_reachability_tree, hf_rtps_encapsulation_id,
10297 tvb, offset, 2, encapsulation_id);
10298 offset += 2;
10299 encoding = get_encapsulation_endianness(encapsulation_id);
10300 /* Encapsulation length (or option) */
10301 encapsulation_opt = tvb_get_ntohs(tvb, offset); /* Always big endian */
10302 proto_tree_add_uint(locator_reachability_tree, hf_rtps_encapsulation_options, tvb,
10303 offset, 2, encapsulation_opt);
10304 offset += 2;
10305
10306 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &param_id, &param_length);
10307
10308 seq_length = tvb_get_uint32(tvb, offset, encoding);
10309 locator_seq_tree = proto_tree_add_subtree_format(locator_reachability_tree, tvb, offset,
10310 param_length, ett_rtps_locator_list_tree, &ti, "Locator List [Size = %u]", seq_length);
10311 offset += 4;
10312 for(i = 0; i < seq_length; i++) {
10313 rtps_util_add_locator_t(locator_seq_tree, pinfo, tvb, offset, encoding, "Locator");
10314 offset += 24;
10315 }
10316 return offset;
10317}
10318
10319static int rtps_util_add_instance_state_request_data(proto_tree* tree, tvbuff_t* tvb,
10320 int offset, const unsigned encoding) {
10321 proto_tree* instance_state_request_tree = NULL((void*)0);
10322 proto_item* ti = NULL((void*)0);
10323 /* The sum of all fields */
10324 const unsigned instance_state_request_data_len = 8 + GUID_SIZE(16) + (4 * 3);
10325 instance_state_request_tree = proto_tree_add_subtree(
10326 tree,
10327 tvb,
10328 offset,
10329 instance_state_request_data_len,
10330 ett_rtps_instance_transition_data,
10331 &ti,
10332 "Instance State Request Data");
10333 rtps_util_add_seq_number(instance_state_request_tree, tvb, offset, encoding, "seqNumber");
10334 offset += 8;
10335 rtps_util_add_generic_guid_v2(instance_state_request_tree, tvb, offset, hf_rtps_pgm_dst_endpoint_guid,
10336 hf_rtps_param_host_id, hf_rtps_param_app_id, hf_rtps_param_instance_id,
10337 hf_rtps_param_entity, hf_rtps_param_entity_key, hf_rtps_param_entity_kind,
10338 NULL((void*)0));
10339 offset += GUID_SIZE(16);
10340 proto_tree_add_item(instance_state_request_tree, hf_rtps_writer_group_oid, tvb, offset, 4, encoding);
10341 offset += 4;
10342 proto_tree_add_item(instance_state_request_tree, hf_rtps_reader_group_oid, tvb, offset, 4, encoding);
10343 offset += 4;
10344 proto_tree_add_item(instance_state_request_tree, hf_rtps_writer_session_id, tvb, offset, 4, encoding);
10345 offset += 4;
10346 return offset;
10347}
10348
10349static int rtps_util_add_rti_service_request(proto_tree * tree, packet_info *pinfo, tvbuff_t * tvb,
10350 int offset, const unsigned encoding, uint32_t service_id) {
10351 uint32_t *service_id_copy = wmem_alloc(pinfo->pool, sizeof(uint32_t));
10352 *service_id_copy = service_id;
10353 /* This is used in append_status_info for adding the column info */
10354 p_add_proto_data(pinfo->pool, pinfo, proto_rtps, RTPS_SERVICE_REQUEST_ID_PROTODATA_KEY1, (void *)service_id_copy);
10355 switch (service_id) {
10356 case RTI_SERVICE_REQUEST_ID_TOPIC_QUERY1:
10357 offset = rtps_util_add_rti_topic_query_service_request(tree, pinfo, tvb, offset + 4,
10358 encoding);
10359 break;
10360 case RTI_SERVICE_REQUEST_ID_LOCATOR_REACHABILITY2:
10361 offset = rtps_util_add_rti_locator_reachability_service_request(tree, pinfo, tvb, offset + 4,
10362 encoding);
10363 break;
10364 case RTI_SERVICE_REQUEST_ID_UNKNOWN0: {
10365 uint32_t seq_length;
10366 seq_length = tvb_get_uint32(tvb, offset, encoding);
10367 proto_tree_add_item(tree, hf_rtps_srm_request_body,
10368 tvb, offset + 4, seq_length, ENC_NA0x00000000);
10369 offset = check_offset_addition(offset, seq_length, tree, NULL((void*)0), tvb);
10370 offset = check_offset_addition(offset, 4, tree, NULL((void*)0), tvb);
10371 break;
10372 }
10373 case RTI_SERVICE_REQUEST_ID_INSTANCE_STATE3: {
10374 /* First four after the sequence size are not needed */
10375 offset += 8;
10376 offset = rtps_util_add_instance_state_request_data(tree, tvb, offset, encoding);
10377 break;
10378 }
10379 }
10380 return offset;
10381}
10382
10383/* *********************************************************************** */
10384/* * Parameter Sequence dissector * */
10385/* *********************************************************************** */
10386/*
10387 * It returns the new offset representing the point where the parameter
10388 * sequence terminates.
10389 * In case of protocol error, it returns 0 (cannot determine the end of
10390 * the sequence, the caller should be responsible to find the end of the
10391 * section if possible or pass the error back and abort dissecting the
10392 * current packet).
10393 * If no error occurred, the returned value is ALWAYS > than the offset passed.
10394 */
10395#define ENSURE_LENGTH(size) \
10396 if (param_length < size) { \
10397 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); \
10398 break; \
10399 }
10400
10401static bool_Bool dissect_parameter_sequence_rti_dds(proto_tree *rtps_parameter_tree, packet_info *pinfo, tvbuff_t *tvb,
10402 proto_item *parameter_item, proto_item * param_len_item, int offset,
10403 const unsigned encoding, int param_length, uint16_t parameter, type_mapping * type_mapping_object,
10404 bool_Bool is_inline_qos, unsigned vendor_id) {
10405
10406 switch(parameter) {
10407
10408 case PID_DATA_TAGS(0x1003):
10409 ENSURE_LENGTH(4);
10410 rtps_util_add_data_tags(rtps_parameter_tree, tvb, offset, encoding, param_length);
10411 break;
10412
10413 case PID_SAMPLE_SIGNATURE(0x8019):
10414 ENSURE_LENGTH(16);
10415 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_sample_signature_epoch, tvb,
10416 offset, 8, encoding);
10417 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_sample_signature_nonce, tvb,
10418 offset+8, 4, encoding);
10419 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_sample_signature_length, tvb,
10420 offset+12, 4, encoding);
10421 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_sample_signature_signature, tvb,
10422 offset+16, param_length-16, ENC_NA0x00000000);
10423 break;
10424
10425 case PID_ENABLE_AUTHENTICATION(0x0078):
10426 ENSURE_LENGTH(4);
10427 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_enable_authentication, tvb,
10428 offset, 4, ENC_NA0x00000000);
10429 break;
10430
10431 case PID_RELATED_ENTITY_GUID(0x0081):
10432 ENSURE_LENGTH(16);
10433 rtps_util_add_guid_prefix_v2(
10434 rtps_parameter_tree,
10435 tvb,
10436 offset,
10437 hf_rtps_sm_guid_prefix,
10438 hf_rtps_sm_host_id,
10439 hf_rtps_sm_app_id,
10440 hf_rtps_sm_instance_id,
10441 0);
10442 rtps_util_add_entity_id(
10443 rtps_parameter_tree,
10444 pinfo, tvb,
10445 offset + 12,
10446 hf_rtps_sm_entity_id,
10447 hf_rtps_sm_entity_id_key,
10448 hf_rtps_sm_entity_id_kind,
10449 ett_rtps_entity,
10450 "Related entity instance id",
10451 NULL((void*)0));
10452 break;
10453
10454 case PID_BUILTIN_ENDPOINT_QOS(0x0077):
10455 ENSURE_LENGTH(1);
10456 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_builtin_endpoint_qos, tvb,
10457 offset, 1, encoding);
10458 break;
10459
10460 case PID_ENDPOINT_SECURITY_INFO(0x1004): {
10461 uint32_t flags;
10462 ENSURE_LENGTH(8);
10463 flags = tvb_get_uint32(tvb, offset, encoding);
10464 proto_tree_add_bitmask_value(rtps_parameter_tree, tvb, offset,
10465 hf_rtps_param_endpoint_security_attributes_mask, ett_rtps_flags,
10466 ENDPOINT_SECURITY_INFO_FLAGS, flags);
10467 flags = tvb_get_uint32(tvb, offset, encoding);
10468 proto_tree_add_bitmask_value(rtps_parameter_tree, tvb, offset,
10469 hf_rtps_param_plugin_endpoint_security_attributes_mask, ett_rtps_flags,
10470 PLUGIN_ENDPOINT_SECURITY_INFO_FLAGS, flags);
10471 break;
10472 }
10473
10474 case PID_PARTICIPANT_SECURITY_INFO(0x1005): {
10475 uint32_t flags;
10476 ENSURE_LENGTH(8);
10477 flags = tvb_get_uint32(tvb, offset, encoding);
10478 proto_tree_add_bitmask_value(rtps_parameter_tree, tvb, offset,
10479 hf_rtps_param_participant_security_attributes_mask, ett_rtps_flags,
10480 PARTICIPANT_SECURITY_INFO_FLAGS, flags);
10481 offset += 4;
10482 flags = tvb_get_uint32(tvb, offset, encoding);
10483 proto_tree_add_bitmask_value(rtps_parameter_tree, tvb, offset,
10484 hf_rtps_param_plugin_participant_security_attributes_mask, ett_rtps_flags,
10485 PLUGIN_PARTICIPANT_SECURITY_INFO_FLAGS, flags);
10486 break;
10487 }
10488
10489 case PID_VENDOR_BUILTIN_ENDPOINT_SET(0x8017): {
10490 uint32_t flags;
10491 ENSURE_LENGTH(4);
10492 flags = tvb_get_uint32(tvb, offset, encoding);
10493 proto_tree_add_bitmask_value(rtps_parameter_tree, tvb, offset,
10494 hf_rtps_param_vendor_builtin_endpoint_set_flags, ett_rtps_flags,
10495 VENDOR_BUILTIN_ENDPOINT_FLAGS, flags);
10496 break;
10497 }
10498 /* 0...2...........7...............15.............23...............31
10499 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
10500 * | Unsigned long classId |
10501 * +---------------+---------------+---------------+---------------+
10502 * | Unsigned long uncompressedSerializedLength |
10503 * +---------------+---------------+---------------+---------------+
10504 * | byteSeq compressedSerializedTypeObject |
10505 * +---------------+---------------+---------------+---------------+
10506 * classId:
10507 * value(0) RTI_OSAPI_COMPRESSION_CLASS_ID_NONE
10508 * value(1) RTI_OSAPI_COMPRESSION_CLASS_ID_ZLIB
10509 * value(2) RTI_OSAPI_COMPRESSION_CLASS_ID_BZIP2
10510 * value(-1) RTI_OSAPI_COMPRESSION_CLASS_ID_AUTO
10511 */
10512 case PID_TYPE_OBJECT_LB(0x8021): {
10513 unsigned compressed_size;
10514 unsigned decompressed_size;
10515 unsigned compression_plugin_class;
10516 tvbuff_t *compressed_type_object_subset;
10517
10518 ENSURE_LENGTH(8);
10519 proto_tree_add_item(rtps_parameter_tree, hf_rtps_compression_plugin_class_id, tvb, offset, 4, encoding);
10520 proto_tree_add_item(rtps_parameter_tree, hf_rtps_uncompressed_serialized_length, tvb, offset + 4, 4, encoding);
10521
10522 compression_plugin_class = tvb_get_uint32(tvb, offset, encoding);
10523 decompressed_size = tvb_get_uint32(tvb, offset + 4, encoding);
10524 /* Get the number of bytes (elements) in the sequence */
10525 compressed_size = tvb_get_uint32(tvb, offset + 8, encoding);
10526
10527 switch(compression_plugin_class) {
10528 case RTI_OSAPI_COMPRESSION_CLASS_ID_ZLIB(1): {
10529 /* + 12 Because First 4 bytes of the sequence are the number of elements in the sequence */
10530 proto_tree_add_item(rtps_parameter_tree, hf_rtps_compressed_serialized_type_object, tvb, offset + 12, param_length - 8, encoding);
10531 compressed_type_object_subset = tvb_new_subset_length(tvb, offset + 12, decompressed_size);
10532 rtps_add_zlib_compressed_typeobject(rtps_parameter_tree, pinfo, compressed_type_object_subset,
10533 0, encoding, compressed_size, decompressed_size, type_mapping_object);
10534 break;
10535 }
10536 case RTI_OSAPI_COMPRESSION_CLASS_ID_NONE(0): {
10537 compressed_type_object_subset = tvb_new_subset_length(tvb, offset + 12, decompressed_size);
10538 rtps_util_add_typeobject(rtps_parameter_tree, pinfo,
10539 compressed_type_object_subset, 0, encoding, decompressed_size, type_mapping_object);
10540 break;
10541 }
10542 default: {
10543 /* + 12 Because First 4 bytes of the sequence are the number of elements in the sequence */
10544 proto_tree_add_item(rtps_parameter_tree, hf_rtps_compressed_serialized_type_object, tvb, offset + 12, param_length - 8, encoding);
10545 }
10546 }
10547 break;
10548 }
10549
10550 case PID_ENDPOINT_SECURITY_ATTRIBUTES(0x8018): {
10551 uint32_t flags;
10552 ENSURE_LENGTH(4);
10553 flags = tvb_get_uint32(tvb, offset, encoding);
10554 proto_tree_add_bitmask_value(rtps_parameter_tree, tvb, offset,
10555 hf_rtps_param_endpoint_security_attributes, ett_rtps_flags,
10556 ENDPOINT_SECURITY_ATTRIBUTES, flags);
10557 break;
10558 }
10559
10560 case PID_TOPIC_QUERY_PUBLICATION(0x8014): {
10561 ENSURE_LENGTH(8);
10562 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_topic_query_publication_enable,
10563 tvb, offset, 1, encoding);
10564 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_topic_query_publication_sessions,
10565 tvb, offset+4, 4, encoding);
10566 break;
10567 }
10568
10569 case PID_ENDPOINT_PROPERTY_CHANGE_EPOCH(0x8015): {
10570 ENSURE_LENGTH(8);
10571 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_endpoint_property_change_epoch,
10572 tvb, offset, 8, encoding);
10573 break;
10574 }
10575
10576 case PID_TOPIC_QUERY_GUID(0x8013):
10577 if (is_inline_qos) {
10578 ENSURE_LENGTH(16);
10579 rtps_util_add_generic_guid_v2(rtps_parameter_tree, tvb, offset,
10580 hf_rtps_endpoint_guid, hf_rtps_param_host_id, hf_rtps_param_app_id,
10581 hf_rtps_param_instance_id, hf_rtps_param_entity, hf_rtps_param_entity_key,
10582 hf_rtps_param_entity_kind, NULL((void*)0));
10583 }
10584 break;
10585
10586 case PID_REACHABILITY_LEASE_DURATION(0x8016):
10587 ENSURE_LENGTH(8);
10588 rtps_util_add_timestamp_sec_and_fraction(rtps_parameter_tree, tvb, offset, encoding,
10589 hf_rtps_participant_lease_duration);
10590 break;
10591
10592 case PID_RELATED_SOURCE_GUID(0x8012): {
10593 ENSURE_LENGTH(16);
10594 /* PID_RELATED_SOURCE_GUID */
10595 rtps_util_add_generic_guid_v2(rtps_parameter_tree, tvb, offset,
10596 hf_rtps_endpoint_guid, hf_rtps_param_host_id, hf_rtps_param_app_id,
10597 hf_rtps_param_instance_id, hf_rtps_param_entity, hf_rtps_param_entity_key,
10598 hf_rtps_param_entity_kind, NULL((void*)0));
10599 break;
10600 }
10601 /* 0...2...........7...............15.............23...............31
10602 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
10603 * | PID_TRANSPORT_INFO_LIST | length |
10604 * +---------------+---------------+---------------+---------------+
10605 * | unsigned long Seq.Length |
10606 * +---------------+---------------+---------------+---------------+
10607 * | ... |
10608 * | TransportInfo 1 |
10609 * | ... |
10610 * +---------------+---------------+---------------+---------------+
10611 * | ... |
10612 * | TransportInfo 2 |
10613 * | ... |
10614 * +---------------+---------------+---------------+---------------+
10615 * | ... |
10616 * | TransportInfo n |
10617 * | ... |
10618 * +---------------+---------------+---------------+---------------+
10619 *
10620 * IDL:
10621 * struct TRANSPORT_INFO {
10622 * long classid;
10623 * long messageSizeMax;
10624 * };
10625 *
10626 * struct TRANSPORT_INFO_LIST {
10627 * Sequence<TRANSPORT_INFO> TransportInfoList;
10628 * };
10629 *
10630 */
10631 /* PID_RELATED_READER_GUID and PID_TRANSPORT_INFO_LIST have the same value */
10632 case PID_TRANSPORT_INFO_LIST(0x8010): {
10633 if (is_inline_qos) {
10634 ENSURE_LENGTH(16);
10635 /* PID_RELATED_READER_GUID */
10636 rtps_util_add_generic_guid_v2(rtps_parameter_tree, tvb, offset,
10637 hf_rtps_endpoint_guid, hf_rtps_param_host_id, hf_rtps_param_app_id,
10638 hf_rtps_param_instance_id, hf_rtps_param_entity, hf_rtps_param_entity_key,
10639 hf_rtps_param_entity_kind, NULL((void*)0));
10640 } else {
10641 ENSURE_LENGTH(4);
10642 {
10643 int i;
10644 uint32_t temp_offset;
10645 uint32_t seq_size = tvb_get_uint32(tvb, offset, encoding);
10646 if (seq_size > 0) {
10647 temp_offset = offset+4; /* move to first transportInfo */
10648 i = 1;
10649 while(seq_size-- > 0) {
10650 rtps_util_add_transport_info(rtps_parameter_tree, tvb, temp_offset, encoding, i);
10651 temp_offset += 8;
10652 ++i;
10653 }
10654 }
10655 }
10656 }
10657 break;
10658 }
10659
10660 /* PID_DIRECT_COMMUNICATION and PID_SOURCE_GUID have the same value */
10661 case PID_DIRECT_COMMUNICATION(0x8011): {
10662 if (is_inline_qos) {
10663 ENSURE_LENGTH(16);
10664 /* PID_SOURCE_GUID */
10665 rtps_util_add_generic_guid_v2(rtps_parameter_tree, tvb, offset,
10666 hf_rtps_endpoint_guid, hf_rtps_param_host_id, hf_rtps_param_app_id,
10667 hf_rtps_param_instance_id, hf_rtps_param_entity, hf_rtps_param_entity_key,
10668 hf_rtps_param_entity_kind, NULL((void*)0));
10669 } else {
10670 proto_tree_add_item(rtps_parameter_tree, hf_rtps_direct_communication, tvb, offset, 1, ENC_NA0x00000000 );
10671 }
10672 break;
10673 }
10674
10675 /* Product Version Version 5.3.1 and earlier
10676 * 0...2...........7...............15.............23...............31
10677 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
10678 * | PID_TYPE_CONSISTENCY_KIND | length |
10679 * +---------------+---------------+---------------+---------------+
10680 * | unsigned short value Kind | = = u n u s e d = = = = = = |
10681 * +---------------+---------------+---------------+---------------+
10682 *
10683 * Product Version 5.3.3 and later
10684 * 0...2...........7...............15.............23...............31
10685 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
10686 * | PID_TYPE_CONSISTENCY_KIND | length |
10687 * +---------------+---------------+---------------+---------------+
10688 * | unsigned short value Kind | Boolean ISeqB | Boolean IStrB |
10689 * +---------------+---------------+---------------+---------------+
10690 * | Boolean IMemN | Boolean PTypW | Boolean FtypV | Boolean IEnLN |
10691 * +---------------+---------------+---------------+---------------+
10692 * ISeqB = Ignore Sequence Names
10693 * IStrB = Ignore String names
10694 * IMemN = Ignore Member Names
10695 * PTypW = Prevent Type Widening
10696 * FtypV = Force Type Validation
10697 * IEnLN = Ignore Enum Literal Names
10698 */
10699 case PID_TYPE_CONSISTENCY(0x0074): {
10700 if (param_length !=4 && param_length !=8) {
10701 expert_add_info_format(pinfo, rtps_parameter_tree,
10702 &ei_rtps_pid_type_csonsistency_invalid_size,
10703 "PID_TYPE_CONSISTENCY invalid size. It has a size of %d bytes. Expected %d or %d bytes.",
10704 param_length, 4, 8);
10705 break;
10706 }
10707 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_type_consistency_kind, tvb, offset, 2, encoding);
10708 /* Parameter size can be used as a discriminator between product versions. */
10709 if (param_length == 8) {
10710 offset += 2;
10711 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_ignore_sequence_bounds,
10712 tvb, offset, 1, encoding);
10713 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_ignore_string_bounds,
10714 tvb, offset + 1, 1, encoding);
10715 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_ignore_member_names,
10716 tvb, offset + 2, 1, encoding);
10717 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_prevent_type_widening,
10718 tvb, offset + 3, 1, encoding);
10719 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_force_type_validation,
10720 tvb, offset + 4, 1, encoding);
10721 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_ignore_enum_literal_names,
10722 tvb, offset + 5, 1, encoding);
10723 }
10724 break;
10725 }
10726
10727 /* ==================================================================
10728 * Here are all the deprecated items.
10729 */
10730
10731 /* 0...2...........7...............15.............23...............31
10732 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
10733 * | PID_PRODUCT_VERSION | length |
10734 * +---------------+---------------+---------------+---------------+
10735 * | uint8 major | uint8 minor | uint8 release |uint8 revision |
10736 * +---------------+---------------+---------------+---------------+
10737 */
10738 case PID_PRODUCT_VERSION(0x8000): {
10739 ENSURE_LENGTH(4);
10740 rtps_util_add_product_version(rtps_parameter_tree, pinfo, tvb, offset, vendor_id);
10741 break;
10742 }
10743
10744 /* 0...2...........7...............15.............23...............31
10745 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
10746 * | PID_PLUGIN_PROMISCUITY_KIND | length |
10747 * +---------------+---------------+---------------+---------------+
10748 * | short value | |
10749 * +---------------+---------------+---------------+---------------+
10750 */
10751 case PID_PLUGIN_PROMISCUITY_KIND(0x8001): {
10752 ENSURE_LENGTH(4);
10753 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_plugin_promiscuity_kind, tvb, offset, 4, encoding);
10754 break;
10755 }
10756 /* 0...2...........7...............15.............23...............31
10757 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
10758 * | PID_ENTITY_VIRTUAL_GUID | length |
10759 * +---------------+---------------+---------------+---------------+
10760 * | |
10761 * +- -+
10762 * | octet[12] guidPrefix |
10763 * +- -+
10764 * | |
10765 * +---------------+---------------+---------------+---------------+
10766 * | octet[4] entityId |
10767 * +---------------+---------------+---------------+---------------+
10768 */
10769
10770 case PID_ENTITY_VIRTUAL_GUID(0x8002): {
10771 ENSURE_LENGTH(16);
10772 rtps_util_add_guid_prefix_v2(rtps_parameter_tree, tvb, offset,
10773 hf_rtps_sm_guid_prefix, hf_rtps_sm_host_id, hf_rtps_sm_app_id,
10774 hf_rtps_sm_instance_id, 0);
10775 rtps_util_add_entity_id(rtps_parameter_tree, pinfo, tvb, offset+12,
10776 hf_rtps_sm_entity_id, hf_rtps_sm_entity_id_key, hf_rtps_sm_entity_id_kind,
10777 ett_rtps_entity, "virtualGUIDSuffix", NULL((void*)0));
10778 break;
10779 }
10780
10781
10782 /* 0...2...........7...............15.............23...............31
10783 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
10784 * | PID_SERVICE_KIND | length |
10785 * +---------------+---------------+---------------+---------------+
10786 * | long value |
10787 * +---------------+---------------+---------------+---------------+
10788 */
10789 case PID_SERVICE_KIND(0x8003): {
10790 ENSURE_LENGTH(4);
10791 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_service_kind, tvb, offset, 4, encoding);
10792 break;
10793 }
10794
10795
10796 case PID_ROLE_NAME(0x800a): {
10797 rtps_util_add_string(rtps_parameter_tree, tvb, offset, hf_rtps_param_role_name, encoding);
10798 break;
10799 }
10800
10801
10802 case PID_ACK_KIND(0x800b): {
10803 ENSURE_LENGTH(4);
10804 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_acknowledgment_kind, tvb, offset, 4, encoding);
10805 break;
10806 }
10807
10808 /* 0...2...........7...............15.............23...............31
10809 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
10810 * | PID_PEER_HOST_EPOCH | length |
10811 * +---------------+---------------+---------------+---------------+
10812 * | unsigned long epoch |
10813 * +---------------+---------------+---------------+---------------+
10814 */
10815 case PID_PEER_HOST_EPOCH(0x800e): {
10816 ENSURE_LENGTH(4);
10817 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_peer_host_epoch, tvb, offset, 4, encoding);
10818 break;
10819 }
10820
10821 /* 0...2...........7...............15.............23...............31
10822 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
10823 * | PID_DOMAIN_ID|PID_RTI_DOMAIN_ID| length |
10824 * +---------------+---------------+---------------+---------------+
10825 * | long domain_id |
10826 * +---------------+---------------+---------------+---------------+
10827 */
10828
10829 case PID_RTI_DOMAIN_ID(0x800f):
10830 case PID_DOMAIN_ID(0x000f): {
10831 if (is_inline_qos) { /* PID_RELATED_ORIGINAL_WRITER_INFO_LEGACY */
10832 ENSURE_LENGTH(16);
10833 rtps_util_add_guid_prefix_v2(rtps_parameter_tree, tvb, offset, hf_rtps_sm_guid_prefix,
10834 hf_rtps_sm_host_id, hf_rtps_sm_app_id, hf_rtps_sm_instance_id, 0);
10835 rtps_util_add_entity_id(rtps_parameter_tree, pinfo, tvb, offset+12, hf_rtps_sm_entity_id,
10836 hf_rtps_sm_entity_id_key, hf_rtps_sm_entity_id_kind, ett_rtps_entity,
10837 "virtualGUIDSuffix", NULL((void*)0));
10838 /* Sequence number */
10839 rtps_util_add_seq_number(rtps_parameter_tree, tvb, offset+16,
10840 encoding, "virtualSeqNumber");
10841 } else {
10842 ENSURE_LENGTH(4);
10843 proto_tree_add_item(rtps_parameter_tree, hf_rtps_domain_id, tvb, offset, 4, encoding);
10844
10845 /* Each packet stores its participant guid in the private table. This is done in dissect_rtps */
10846 endpoint_guid *participant_guid = (endpoint_guid*)p_get_proto_data(pinfo->pool, pinfo, proto_rtps, RTPS_TCPMAP_DOMAIN_ID_PROTODATA_KEY0);
10847 if (participant_guid != NULL((void*)0)) {
10848 /* Since this information is fixed there is no need to update in a second pass */
10849 if (!wmem_map_contains(discovered_participants_domain_ids, participant_guid)) {
10850 int domainId = tvb_get_int32(tvb, offset, encoding);
10851 participant_info *p_info = (participant_info*)wmem_new(wmem_file_scope(), participant_info)((participant_info*)wmem_alloc((wmem_file_scope()), sizeof(participant_info
)))
;
10852 p_info->domainId = domainId;
10853 endpoint_guid *participant_guid_copy = (endpoint_guid*)wmem_memdup(wmem_file_scope(),
10854 participant_guid, sizeof(endpoint_guid));
10855 wmem_map_insert(discovered_participants_domain_ids,
10856 (const void*)participant_guid_copy, (void*)p_info);
10857 }
10858 }
10859 }
10860 break;
10861 }
10862
10863 case PID_RELATED_ORIGINAL_WRITER_INFO(0x0083): {
10864 if (is_inline_qos) { /* PID_RELATED_ORIGINAL_WRITER_INFO */
10865 ENSURE_LENGTH(16);
10866 rtps_util_add_guid_prefix_v2(
10867 rtps_parameter_tree,
10868 tvb,
10869 offset,
10870 hf_rtps_sm_guid_prefix,
10871 hf_rtps_sm_host_id,
10872 hf_rtps_sm_app_id,
10873 hf_rtps_sm_instance_id,
10874 0);
10875 rtps_util_add_entity_id(
10876 rtps_parameter_tree,
10877 pinfo, tvb,
10878 offset + 12,
10879 hf_rtps_sm_entity_id,
10880 hf_rtps_sm_entity_id_key,
10881 hf_rtps_sm_entity_id_kind,
10882 ett_rtps_entity,
10883 "virtualGUIDSuffix",
10884 NULL((void*)0));
10885 /* Sequence number */
10886 rtps_util_add_seq_number(
10887 rtps_parameter_tree,
10888 tvb,
10889 offset + 16,
10890 encoding,
10891 "virtualSeqNumber");
10892 }
10893 break;
10894 }
10895
10896 /* 0...2...........7...............15.............23...............31
10897 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
10898 * | PID_DOMAIN_TAG | length |
10899 * +---------------+---------------+---------------+---------------+
10900 * | long domain_tag.Length |
10901 * +---------------+---------------+---------------+---------------+
10902 * | string domain_tag |
10903 * | ... |
10904 * +---------------+---------------+---------------+---------------+
10905 */
10906 case PID_DOMAIN_TAG(0x4014): {
10907 ENSURE_LENGTH(4);
10908 rtps_util_add_string(rtps_parameter_tree, tvb, offset, hf_rtps_domain_tag, encoding);
10909 break;
10910 }
10911
10912 case PID_EXTENDED(0x3f01): {
10913 ENSURE_LENGTH(8);
10914 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_extended_parameter, tvb, offset, 4, encoding);
10915 offset += 4;
10916 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_extended_pid_length, tvb, offset, 4, encoding);
10917 break;
10918 }
10919
10920 case PID_TYPE_OBJECT(0x0072): {
10921 rtps_util_add_typeobject(rtps_parameter_tree, pinfo, tvb,
10922 offset, encoding, param_length, type_mapping_object);
10923 break;
10924 }
10925
10926 /* 0...2...........7...............15.............23...............31
10927 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
10928 * | PID_TYPECODE_RTPS2 | length |
10929 * +---------------+---------------+---------------+---------------+
10930 * | |
10931 * + Type code description +
10932 * | |
10933 * +---------------+---------------+---------------+---------------+
10934 */
10935 case PID_TYPECODE(0x47):
10936 case PID_TYPECODE_RTPS2(0x8004): {
10937 rtps_util_add_typecode(rtps_parameter_tree,
10938 tvb,
10939 pinfo,
10940 offset,
10941 encoding,
10942 0, /* indent level */
10943 0, /* isPointer */
10944 -1, /* bitfield */
10945 0, /* isKey */
10946 offset,
10947 NULL((void*)0), /* name */
10948 -1, /* not a seq field */
10949 NULL((void*)0), /* not an array */
10950 0); /* ndds 4.0 hack: init to false */
10951 break;
10952 }
10953
10954 /* 0...2...........7...............15.............23...............31
10955 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
10956 * | PID_DISABLE_POSITIVE_ACKS | length |
10957 * +---------------+---------------+---------------+---------------+
10958 * | boolean value | = = = = = = = = u n u s e d = = = = = = = = |
10959 * +---------------+---------------+---------------+---------------+
10960 */
10961 case PID_DISABLE_POSITIVE_ACKS(0x8005): {
10962 ENSURE_LENGTH(1);
10963 proto_tree_add_item(rtps_parameter_tree, hf_rtps_disable_positive_ack, tvb, offset, 1, ENC_NA0x00000000 );
10964 break;
10965 }
10966
10967 /* 0...2...........7...............15.............23...............31
10968 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
10969 * | PID_EXPECTS_VIRTUAL_HB | length |
10970 * +---------------+---------------+---------------+---------------+
10971 * | boolean value | = = = = = = = = u n u s e d = = = = = = = = |
10972 * +---------------+---------------+---------------+---------------+
10973 */
10974 case PID_EXPECTS_VIRTUAL_HB(0x8009): {
10975 ENSURE_LENGTH(1);
10976 proto_tree_add_item(rtps_parameter_tree, hf_rtps_expects_virtual_heartbeat, tvb, offset, 1, ENC_NA0x00000000 );
10977 break;
10978 }
10979
10980 /* 0...2...........7...............15.............23...............31
10981 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
10982 * | PID_LOCATOR_FILTER_LIST | length |
10983 * +---------------+---------------+---------------+---------------+
10984 * | unsigned long number_of_channels |
10985 * +---------------+---------------+---------------+---------------+
10986 * | |
10987 * ~ String filter_name ~
10988 * | |
10989 * +---------------+---------------+---------------+---------------+
10990 * | |
10991 * ~ LocatorList ~ <----------+
10992 * | | Repeat |
10993 * +---------------+---------------+---------------+---------------+ For each|
10994 * | | Channel |
10995 * ~ String filter_expression ~ |
10996 * | | |
10997 * +---------------+---------------+---------------+---------------+ <----------+
10998 */
10999 case PID_LOCATOR_FILTER_LIST(0x8006): {
11000 int32_t number_of_channels, ch;
11001 proto_tree *channel_tree;
11002 proto_item *ti_channel;
11003 char temp_buff[20];
11004 int old_offset;
11005 uint32_t off = offset;
11006
11007 ENSURE_LENGTH(4);
11008 proto_tree_add_item_ret_int(rtps_parameter_tree, hf_rtps_locator_filter_list_num_channels, tvb, off, 4, encoding, &number_of_channels );
11009 proto_item_append_text(parameter_item, " (%d channels)", number_of_channels );
11010 off += 4;
11011
11012 if (number_of_channels == 0) {
11013 /* Do not dissect the rest */
11014 break;
11015 }
11016
11017 /* filter name */
11018 off = rtps_util_add_string(rtps_parameter_tree, tvb, off, hf_rtps_locator_filter_list_filter_name, encoding);
11019
11020 /* Foreach channel... */
11021 for (ch = 0; ch < number_of_channels; ++ch) {
11022 snprintf(temp_buff, 20, "Channel[%u]", ch);
11023 old_offset = off;
11024 channel_tree = proto_tree_add_subtree_format(rtps_parameter_tree, tvb, off, 0, ett_rtps_locator_filter_channel, &ti_channel, "Channel[%u]", ch);
11025
11026 off = rtps_util_add_multichannel_locator_list(channel_tree, pinfo, tvb, off, temp_buff, encoding);
11027 /* Filter expression */
11028 off = rtps_util_add_string(rtps_parameter_tree, tvb, off, hf_rtps_locator_filter_list_filter_exp, encoding);
11029
11030 /* Now we know the length of the channel data, set the length */
11031 proto_item_set_len(ti_channel, (off - old_offset));
11032 } /* End of for each channel */
11033 break;
11034 }/* End of case PID_LOCATOR_FILTER_LIST */
11035
11036 /* 0...2...........7...............15.............23...............31
11037 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11038 * | PID_UNICAST_LOCATOR_EX | 0x8007 |
11039 * +---------------+---------------+---------------+---------------+
11040 * | long kind |
11041 * +---------------+---------------+---------------+---------------+
11042 * | long port |
11043 * +---------------+---------------+---------------+---------------+
11044 * | ipv6addr[0] | ipv6addr[1] | ipv6addr[2] | ipv6addr[3] |
11045 * +---------------+---------------+---------------+---------------+
11046 * | ipv6addr[4] | ipv6addr[5] | ipv6addr[6] | ipv6addr[7] |
11047 * +---------------+---------------+---------------+---------------+
11048 * | ipv6addr[8] | ipv6addr[9] | ipv6addr[10] | ipv6addr[11] |
11049 * +---------------+---------------+---------------+---------------+
11050 * | ipv6addr[12] | ipv6addr[13] | ipv6addr[14] | ipv6addr[15] |
11051 * +---------------+---------------+---------------+---------------+
11052 * | Locator Sequence Length |
11053 * +---------------+---------------+---------------+---------------+
11054 * | Locator 1 | Locator 2 |
11055 * +---------------+---------------+---------------+---------------+
11056 */
11057 case PID_UNICAST_LOCATOR_EX(0x8007): {
11058 ENSURE_LENGTH(28);
11059 rtps_util_add_locator_ex_t(rtps_parameter_tree, pinfo, tvb, offset, encoding, param_length);
11060 break;
11061 }
11062
11063 case PID_ENDPOINT_SECURITY_SYMMETRIC_CIPHER_ALGO(0x1013): {
11064 ENSURE_LENGTH(4);
11065 proto_tree_add_bitmask(
11066 rtps_parameter_tree,
11067 tvb,
11068 offset,
11069 hf_rtps_param_participant_security_symmetric_cipher_algorithms_builtin_endpoints_required_mask,
11070 ett_rtps_flags,
11071 (vendor_id == RTPS_VENDOR_RTI_DDS(0x0101))
11072 ? RTI_SECURITY_SIMMETRIC_CIPHER_MASK_FLAGS
11073 : SECURITY_SIMMETRIC_CIPHER_MASK_FLAGS,
11074 encoding);
11075
11076 break;
11077 }
11078
11079 case PID_PARTICIPANT_SECURITY_SYMMETRIC_CIPHER_ALGO(0x1012): {
11080 uint32_t algo_length = param_length;
11081 /*
11082 * Only the first field is always available, the remaining three might
11083 * be available in the capture or not. dissect_crypto_algo_bitmask
11084 * takes that into consideration and add the default values if the field
11085 * is not available in the capture.
11086 */
11087 dissect_crypto_algo_bitmask(
11088 rtps_parameter_tree,
11089 tvb,
11090 &offset,
11091 &algo_length,
11092 hf_rtps_param_participant_security_symmetric_cipher_algorithms_supported_mask,
11093 ett_rtps_flags,
11094 (vendor_id == RTPS_VENDOR_RTI_DDS(0x0101))
11095 ? RTI_SECURITY_SIMMETRIC_CIPHER_MASK_FLAGS
11096 : SECURITY_SIMMETRIC_CIPHER_MASK_FLAGS,
11097 encoding,
11098 "Supported Mask",
11099 SECURITY_KEY_ESTABLISHMENT_ALGORITHM_INFO_SUPPORTED_MASK_DEFAULT0x00000003,
11100 "AES128_GCM, AES256_GCM");
11101 dissect_crypto_algo_bitmask(
11102 rtps_parameter_tree,
11103 tvb,
11104 &offset,
11105 &algo_length,
11106 hf_rtps_param_participant_security_symmetric_cipher_algorithms_builtin_endpoints_required_mask,
11107 ett_rtps_flags,
11108 (vendor_id == RTPS_VENDOR_RTI_DDS(0x0101))
11109 ? RTI_SECURITY_SIMMETRIC_CIPHER_MASK_FLAGS
11110 : SECURITY_SIMMETRIC_CIPHER_MASK_FLAGS,
11111 encoding,
11112 "Builtin Endpoints Required Mask",
11113 SECURITY_KEY_ESTABLISHMENT_ALGORITHM_INFO_SUPPORTED_MASK_DEFAULT0x00000003,
11114 "AES256_GCM");
11115 dissect_crypto_algo_bitmask(
11116 rtps_parameter_tree,
11117 tvb,
11118 &offset,
11119 &algo_length,
11120 hf_rtps_param_participant_security_symmetric_cipher_algorithms_builtin_endpoints_key_exchange_used_bit,
11121 ett_rtps_flags,
11122 (vendor_id == RTPS_VENDOR_RTI_DDS(0x0101))
11123 ? RTI_SECURITY_SIMMETRIC_CIPHER_MASK_FLAGS
11124 : SECURITY_SIMMETRIC_CIPHER_MASK_FLAGS,
11125 encoding,
11126 "Key Exchange Builtin Endpoints Required Mask",
11127 SECURITY_KEY_ESTABLISHMENT_ALGORITHM_INFO_SUPPORTED_MASK_DEFAULT0x00000003,
11128 "AES256_GCM");
11129 dissect_crypto_algo_bitmask(
11130 rtps_parameter_tree,
11131 tvb,
11132 &offset,
11133 &algo_length,
11134 hf_rtps_param_participant_security_symmetric_cipher_algorithms_user_endpoints_default_required_mask,
11135 ett_rtps_flags,
11136 (vendor_id == RTPS_VENDOR_RTI_DDS(0x0101))
11137 ? RTI_SECURITY_SIMMETRIC_CIPHER_MASK_FLAGS
11138 : SECURITY_SIMMETRIC_CIPHER_MASK_FLAGS,
11139 encoding,
11140 "Key Endpoints Default Required Mask",
11141 SECURITY_KEY_ESTABLISHMENT_ALGORITHM_INFO_SUPPORTED_MASK_DEFAULT0x00000003,
11142 "AES256_GCM");
11143 break;
11144 }
11145
11146 case PID_PARTICIPANT_SECURITY_KEY_ESTABLISHMENT_ALGO(0x1011): {
11147 uint32_t algo_length = param_length;
11148 proto_tree *sub_tree = proto_tree_add_subtree(rtps_parameter_tree, tvb, offset, 4,
11149 ett_rtps_crypto_algorithm_requirements, NULL((void*)0), "Shared Secret");
11150 dissect_crypto_algorithm_requirements(sub_tree, tvb, offset, &algo_length, encoding,
11151 (vendor_id == RTPS_VENDOR_RTI_DDS(0x0101))
11152 ? RTI_SECURITY_KEY_ESTABLISHMENT_MASK_FLAGS
11153 : SECURITY_KEY_ESTABLISHMENT_MASK_FLAGS,
11154 SECURITY_KEY_ESTABLISHMENT_ALGORITHM_INFO_SUPPORTED_MASK_DEFAULT0x00000003,
11155 "DHE_MODP_2048_256, ECDHE_CEUM_P256",
11156 SECURITY_KEY_ESTABLISHMENT_ALGORITHM_INFO_REQUIRED_MASK_DEFAULT0x00000002,
11157 "ECDHE_CEUM_P256");
11158 break;
11159 }
11160
11161 case PID_PARTICIPANT_SECURITY_DIGITAL_SIGNATURE_ALGO(0x1010): {
11162 uint32_t algo_length = param_length;
11163 proto_tree *sub_tree = proto_tree_add_subtree(rtps_parameter_tree, tvb, offset, 4,
11164 ett_rtps_crypto_algorithm_requirements, NULL((void*)0), "Trust Chain");
11165 offset = dissect_crypto_algorithm_requirements( sub_tree, tvb, offset, &algo_length, encoding,
11166 (vendor_id == RTPS_VENDOR_RTI_DDS(0x0101))
11167 ? RTI_SECURITY_DIGITAL_SIGNATURE_MASK_FLAGS
11168 : SECURITY_DIGITAL_SIGNATURE_MASK_FLAGS,
11169 SECURITY_DIGITAL_SIGNATURE_ALGORITHM_INFO_TRUST_CHAIN_SUPPORTED_MASK_DEFAULT0x00000007,
11170 "RSASSA_PKCS1V15_2048_SHA256, RSASSA_PSS_MGF1SHA256_2048_SHA256, ECDSA_P256_SHA256",
11171 SECURITY_DIGITAL_SIGNATURE_ALGORITHM_INFO_TRUST_CHAIN_REQUIRED_MASK_DEFAULT0x00000004,
11172 "ECDSA_P256_SHA256");
11173 sub_tree = proto_tree_add_subtree(rtps_parameter_tree, tvb, offset,
11174 (algo_length > 0) ? 4 : 0, ett_rtps_crypto_algorithm_requirements, NULL((void*)0), "Message Authentication");
11175 dissect_crypto_algorithm_requirements( sub_tree, tvb, offset, &algo_length, encoding,
11176 (vendor_id == RTPS_VENDOR_RTI_DDS(0x0101))
11177 ? RTI_SECURITY_DIGITAL_SIGNATURE_MASK_FLAGS
11178 : SECURITY_DIGITAL_SIGNATURE_MASK_FLAGS,
11179 SECURITY_DIGITAL_SIGNATURE_ALGORITHM_INFO_MESSAGE_AUTH_SUPPORTED_MASK_DEFAULT0x00000005,
11180 "RSASSA_PSS_MGF1SHA256_2048_SHA256, ECDSA_P256_SHA256",
11181 SECURITY_DIGITAL_SIGNATURE_ALGORITHM_INFO_MESSAGE_AUTH_REQUIRED_MASK_DEFAULT0x00000004,
11182 "ECDSA_P256_SHA256");
11183 break;
11184 }
11185
11186 default: {
11187 return false0;
11188 }
11189 }/* End of switch for parameters for vendor RTI */
11190 return true1;
11191}
11192
11193static bool_Bool dissect_parameter_sequence_toc(proto_tree *rtps_parameter_tree, packet_info *pinfo _U___attribute__((unused)),
11194 tvbuff_t *tvb, proto_item *parameter_item _U___attribute__((unused)), proto_item *param_len_item _U___attribute__((unused)), int offset,
11195 const unsigned encoding, int param_length _U___attribute__((unused)),
11196 uint16_t parameter) {
11197
11198 switch(parameter) {
11199
11200 /* 0...2...........7...............15.............23...............31
11201 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11202 * | PID_TYPECODE_RTPS2 | length |
11203 * +---------------+---------------+---------------+---------------+
11204 * | |
11205 * + Type code description +
11206 * | |
11207 * +---------------+---------------+---------------+---------------+
11208 */
11209 case PID_TYPECODE_RTPS2(0x8004): {
11210 rtps_util_add_typecode(rtps_parameter_tree,
11211 tvb,
11212 pinfo,
11213 offset,
11214 encoding,
11215 0, /* indent level */
11216 0, /* isPointer */
11217 -1, /* bitfield */
11218 0, /* isKey */
11219 offset,
11220 NULL((void*)0), /* name */
11221 0, /* not a seq field */
11222 NULL((void*)0), /* not an array */
11223 0); /* ndds 4.0 hack: init to false */
11224 break;
11225 }
11226
11227 default:
11228 return false0;
11229 }
11230 return true1;
11231}
11232
11233static bool_Bool dissect_parameter_sequence_adl(proto_tree *rtps_parameter_tree _U___attribute__((unused)), packet_info *pinfo _U___attribute__((unused)),
11234 tvbuff_t *tvb _U___attribute__((unused)), proto_item *parameter_item _U___attribute__((unused)), proto_item *param_len_item _U___attribute__((unused)), int offset _U___attribute__((unused)),
11235 const unsigned encoding _U___attribute__((unused)), int param_length _U___attribute__((unused)),
11236 uint16_t parameter) {
11237
11238 switch(parameter) {
11239
11240 case PID_ADLINK_WRITER_INFO(0x8001): {
11241 break;
11242 }
11243 case PID_ADLINK_READER_DATA_LIFECYCLE(0x8002): {
11244 break;
11245 }
11246 case PID_ADLINK_WRITER_DATA_LIFECYCLE(0x8003): {
11247 break;
11248 }
11249 case PID_ADLINK_ENDPOINT_GUID(0x8004): {
11250 break;
11251 }
11252 case PID_ADLINK_SYNCHRONOUS_ENDPOINT(0x8005): {
11253 break;
11254 }
11255 case PID_ADLINK_RELAXED_QOS_MATCHING(0x8006): {
11256 break;
11257 }
11258 case PID_ADLINK_PARTICIPANT_VERSION_INFO(0x8007): {
11259 break;
11260 }
11261 case PID_ADLINK_NODE_NAME(0x8008): {
11262 break;
11263 }
11264 case PID_ADLINK_EXEC_NAME(0x8009): {
11265 break;
11266 }
11267 case PID_ADLINK_PROCESS_ID(0x800a): {
11268 break;
11269 }
11270 case PID_ADLINK_SERVICE_TYPE(0x800b): {
11271 break;
11272 }
11273 case PID_ADLINK_ENTITY_FACTORY(0x800c): {
11274 break;
11275 }
11276 case PID_ADLINK_WATCHDOG_SCHEDULING(0x800d): {
11277 break;
11278 }
11279 case PID_ADLINK_LISTENER_SCHEDULING(0x800e): {
11280 break;
11281 }
11282 case PID_ADLINK_SUBSCRIPTION_KEYS(0x800f): {
11283 break;
11284 }
11285 case PID_ADLINK_READER_LIFESPAN(0x8010): {
11286 break;
11287 }
11288 case PID_ADLINK_SHARE(0x8011): {
11289 break;
11290 }
11291 case PID_ADLINK_TYPE_DESCRIPTION(0x8012): {
11292 break;
11293 }
11294 case PID_ADLINK_LAN_ID(0x8013): {
11295 break;
11296 }
11297 case PID_ADLINK_ENDPOINT_GID(0x8014): {
11298 break;
11299 }
11300 case PID_ADLINK_GROUP_GID(0x8015): {
11301 break;
11302 }
11303 case PID_ADLINK_EOTINFO(0x8016): {
11304 break;
11305 }
11306 case PID_ADLINK_PART_CERT_NAME(0x8017): {
11307 break;
11308 }
11309 case PID_ADLINK_LAN_CERT_NAME(0x8018): {
11310 break;
11311 }
11312 default:
11313 return false0;
11314 }
11315 return true1;
11316}
11317
11318
11319static bool_Bool dissect_parameter_sequence_v1(proto_tree *rtps_parameter_tree, packet_info *pinfo, tvbuff_t *tvb,
11320 proto_item *parameter_item, proto_item * param_len_item, int offset,
11321 const unsigned encoding, int size, int param_length,
11322 uint16_t parameter, uint16_t version, type_mapping * type_mapping_object,
11323 coherent_set_entity_info *coherent_set_entity_info_object) {
11324
11325 proto_tree *subtree;
11326
11327 switch(parameter) {
11328
11329 /* 0...2...........7...............15.............23...............31
11330 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11331 * | PID_PARTICIPANT_LEASE_DURATION| 0x0008 |
11332 * +---------------+---------------+---------------+---------------+
11333 * | long NtpTime.seconds |
11334 * +---------------+---------------+---------------+---------------+
11335 * | unsigned long NtpTime.fraction |
11336 * +---------------+---------------+---------------+---------------+
11337 */
11338 case PID_PARTICIPANT_LEASE_DURATION(0x02):
11339 ENSURE_LENGTH(8);
11340 rtps_util_add_timestamp_sec_and_fraction(rtps_parameter_tree, tvb, offset, encoding,
11341 hf_rtps_participant_lease_duration);
11342 break;
11343
11344
11345 /* 0...2...........7...............15.............23...............31
11346 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11347 * | PID_TIME_BASED_FILTER | 0x0008 |
11348 * +---------------+---------------+---------------+---------------+
11349 * | long NtpTime.seconds |
11350 * +---------------+---------------+---------------+---------------+
11351 * | unsigned long NtpTime.fraction |
11352 * +---------------+---------------+---------------+---------------+
11353 */
11354 case PID_TIME_BASED_FILTER(0x04):
11355 ENSURE_LENGTH(8);
11356 rtps_util_add_timestamp_sec_and_fraction(rtps_parameter_tree, tvb, offset, encoding,
11357 hf_rtps_time_based_filter_minimum_separation);
11358 break;
11359
11360 /* 0...2...........7...............15.............23...............31
11361 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11362 * | PID_TOPIC_NAME | length |
11363 * +---------------+---------------+---------------+---------------+
11364 * | unsigned long String.length |
11365 * +---------------+---------------+---------------+---------------+
11366 * | str[0] | str[1] | str[2] | str[3] |
11367 * +---------------+---------------+---------------+---------------+
11368 * | ... |
11369 * +---------------+---------------+---------------+---------------+
11370 */
11371 case PID_TOPIC_NAME(0x05): {
11372 const char * retVal = NULL((void*)0);
11373 uint32_t str_size = tvb_get_uint32(tvb, offset, encoding);
11374
11375 retVal = (char*)tvb_get_string_enc(pinfo->pool, tvb, offset+4, str_size, ENC_ASCII0x00000000);
11376 rtps_util_add_string(rtps_parameter_tree, tvb, offset, hf_rtps_param_topic_name, encoding);
11377 /* If topic information is enabled we have to store the topic name for showing after the DATA(r|w)
11378 * in the infor column. This information is used in append_status_info function.
11379 */
11380 if (retVal != NULL((void*)0) && enable_topic_info) {
11381 submessage_col_info* current_submessage_col_info = NULL((void*)0);
11382
11383 rtps_util_store_type_mapping(pinfo, tvb, offset, type_mapping_object, retVal, TOPIC_INFO_ADD_TOPIC_NAME(0x04));
11384 /* retVal has packet scope lifetime, enough for adding to the DATA(r|w) column information */
11385 current_submessage_col_info = (submessage_col_info*)p_get_proto_data(pinfo->pool, pinfo, proto_rtps, RTPS_CURRENT_SUBMESSAGE_COL_DATA_KEY3);
11386 if (current_submessage_col_info != NULL((void*)0) && current_submessage_col_info->topic_name == NULL((void*)0)) {
11387 current_submessage_col_info->topic_name = retVal;
11388 }
11389 }
11390 break;
11391 }
11392
11393 /* 0...2...........7...............15.............23...............31
11394 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11395 * | PID_OWNERSHIP_STRENGTH | 0x0004 |
11396 * +---------------+---------------+---------------+---------------+
11397 * | long strength |
11398 * +---------------+---------------+---------------+---------------+
11399 */
11400 case PID_OWNERSHIP_STRENGTH(0x06):
11401 ENSURE_LENGTH(4);
11402 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_strength, tvb, offset, 4, encoding);
11403 break;
11404
11405 /* 0...2...........7...............15.............23...............31
11406 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11407 * | PID_TYPE_NAME | length |
11408 * +---------------+---------------+---------------+---------------+
11409 * | unsigned long String.length |
11410 * +---------------+---------------+---------------+---------------+
11411 * | str[0] | str[1] | str[2] | str[3] |
11412 * +---------------+---------------+---------------+---------------+
11413 * | ... |
11414 * +---------------+---------------+---------------+---------------+
11415 */
11416 case PID_TYPE_NAME(0x07): {
11417 const char * retVal = NULL((void*)0);
11418 uint32_t str_size = tvb_get_uint32(tvb, offset, encoding);
11419
11420 retVal = (char*) tvb_get_string_enc(pinfo->pool, tvb, offset+4, str_size, ENC_ASCII0x00000000);
11421
11422 rtps_util_store_type_mapping(pinfo, tvb, offset, type_mapping_object,
11423 retVal, TOPIC_INFO_ADD_TYPE_NAME(0x02));
11424
11425 rtps_util_add_string(rtps_parameter_tree, tvb, offset, hf_rtps_param_type_name, encoding);
11426 break;
11427 }
11428
11429 /* 0...2...........7...............15.............23...............31
11430 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11431 * | PID_XXXXXXXXXXX | 0x0004 |
11432 * +---------------+---------------+---------------+---------------+
11433 * | long port |
11434 * +---------------+---------------+---------------+---------------+
11435 */
11436 case PID_METATRAFFIC_MULTICAST_PORT(0x46):
11437 case PID_METATRAFFIC_UNICAST_PORT(0x0d):
11438 case PID_DEFAULT_UNICAST_PORT(0x0e):
11439 ENSURE_LENGTH(4);
11440 rtps_util_add_port(rtps_parameter_tree, pinfo, tvb, offset, encoding, hf_rtps_param_port);
11441 break;
11442
11443 /* 0...2...........7...............15.............23...............31
11444 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11445 * | PID_EXPECTS_INLINE_QOS | 0x0004 |
11446 * +---------------+---------------+---------------+---------------+
11447 * | boolean | N O T U S E D |
11448 * +---------------+---------------+---------------+---------------+
11449 */
11450 case PID_EXPECTS_INLINE_QOS(0x43):
11451 ENSURE_LENGTH(1);
11452 proto_tree_add_item(rtps_parameter_tree, hf_rtps_expects_inline_qos, tvb, offset, 1, ENC_NA0x00000000 );
11453 break;
11454
11455 /* 0...2...........7...............15.............23...............31
11456 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11457 * | PID_XXXXXXXXXXX | length |
11458 * +---------------+---------------+---------------+---------------+
11459 * | unsigned long ip_address |
11460 * +---------------+---------------+---------------+---------------+
11461 */
11462 case PID_METATRAFFIC_MULTICAST_IPADDRESS(0x0b):
11463 case PID_DEFAULT_UNICAST_IPADDRESS(0x0c):
11464 case PID_MULTICAST_IPADDRESS(0x11):
11465 case PID_METATRAFFIC_UNICAST_IPADDRESS(0x45):
11466 rtps_util_add_ipv4_address_t(rtps_parameter_tree, pinfo, tvb, offset,
11467 encoding, hf_param_ip_address);
11468 break;
11469
11470 /* 0...2...........7...............15.............23...............31
11471 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11472 * | PID_PROTOCOL_VERSION | 0x0004 |
11473 * +---------------+---------------+---------------+---------------+
11474 * | uint8 major | uint8 minor | N O T U S E D |
11475 * +---------------+---------------+---------------+---------------+
11476 */
11477 case PID_PROTOCOL_VERSION(0x15):
11478 ENSURE_LENGTH(2);
11479 rtps_util_add_protocol_version(rtps_parameter_tree, tvb, offset);
11480 break;
11481
11482 /* 0...2...........7...............15.............23...............31
11483 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11484 * | PID_VENDOR_ID | 0x0004 |
11485 * +---------------+---------------+---------------+---------------+
11486 * | uint8 major | uint8 minor | N O T U S E D |
11487 * +---------------+---------------+---------------+---------------+
11488 */
11489 case PID_VENDOR_ID(0x16):
11490 ENSURE_LENGTH(2);
11491 rtps_util_add_vendor_id(rtps_parameter_tree, tvb, offset);
11492 break;
11493
11494 /* 0...2...........7...............15.............23...............31
11495 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11496 * | PID_RELIABILITY | 0x0004 |
11497 * +---------------+---------------+---------------+---------------+
11498 * | unsigned long kind |
11499 * +---------------+---------------+---------------+---------------+
11500 */
11501 case PID_RELIABILITY_OFFERED(0x19): /* Deprecated */
11502 case PID_RELIABILITY(0x1a):
11503 ENSURE_LENGTH(4);
11504 proto_tree_add_item(rtps_parameter_tree, hf_rtps_reliability_kind, tvb, offset, 4, encoding);
11505 /* Older version of the protocol (and for PID_RELIABILITY_OFFERED)
11506 * this parameter was carrying also a NtpTime called
11507 * 'maxBlockingTime'.
11508 */
11509 if (size == 12) {
11510 rtps_util_add_timestamp(rtps_parameter_tree, tvb, offset + 4,
11511 encoding, hf_rtps_reliability_max_blocking_time);
11512 }
11513 break;
11514
11515 /* 0...2...........7...............15.............23...............31
11516 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11517 * | PID_LIVELINESS | 0x000c |
11518 * +---------------+---------------+---------------+---------------+
11519 * | unsigned long kind |
11520 * +---------------+---------------+---------------+---------------+
11521 * | long NtpTime.seconds |
11522 * +---------------+---------------+---------------+---------------+
11523 * | unsigned long NtpTime.fraction |
11524 * +---------------+---------------+---------------+---------------+
11525 * NDDS 3.1 sends only 'kind' on the wire.
11526 *
11527 */
11528 case PID_LIVELINESS_OFFERED(0x1c): /* Deprecated */
11529 case PID_LIVELINESS(0x1b):
11530 ENSURE_LENGTH(12);
11531 rtps_util_add_liveliness_qos(rtps_parameter_tree, tvb, offset, encoding);
11532 break;
11533
11534 /* 0...2...........7...............15.............23...............31
11535 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11536 * | PID_DURABILITY | 0x0004 |
11537 * +---------------+---------------+---------------+---------------+
11538 * | unsigned long kind |
11539 * +---------------+---------------+---------------+---------------+
11540 */
11541 case PID_DURABILITY(0x1d):
11542 ENSURE_LENGTH(4);
11543 proto_tree_add_item(rtps_parameter_tree, hf_rtps_durability, tvb, offset, 4, encoding);
11544 break;
11545
11546 /* 0...2...........7...............15.............23...............31
11547 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11548 * | PID_DURABILITY_SERVICE | 0x0004 |
11549 * +---------------+---------------+---------------+---------------+
11550 * | long NtpTime.seconds |
11551 * +---------------+---------------+---------------+---------------+
11552 * | unsigned long NtpTime.fraction |
11553 * +---------------+---------------+---------------+---------------+
11554 * | unsigned long kind |
11555 * +---------------+---------------+---------------+---------------+
11556 * | long history_depth |
11557 * +---------------+---------------+---------------+---------------+
11558 * | long max_samples |
11559 * +---------------+---------------+---------------+---------------+
11560 * | long max_instances |
11561 * +---------------+---------------+---------------+---------------+
11562 * | long max_samples_per_instance |
11563 * +---------------+---------------+---------------+---------------+
11564 */
11565 case PID_DURABILITY_SERVICE(0x1e):
11566 ENSURE_LENGTH(28);
11567 rtps_util_add_durability_service_qos(rtps_parameter_tree, tvb, offset, encoding);
11568 break;
11569
11570 /* 0...2...........7...............15.............23...............31
11571 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11572 * | PID_OWNERSHIP | 0x0004 |
11573 * +---------------+---------------+---------------+---------------+
11574 * | unsigned long kind |
11575 * +---------------+---------------+---------------+---------------+
11576 */
11577 case PID_OWNERSHIP_OFFERED(0x20): /* Deprecated */
11578 case PID_OWNERSHIP(0x1f):
11579 ENSURE_LENGTH(4);
11580 proto_tree_add_item(rtps_parameter_tree, hf_rtps_ownership, tvb, offset, 4, encoding);
11581 break;
11582
11583 /* 0...2...........7...............15.............23...............31
11584 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11585 * | PID_PRESENTATION | 0x0008 |
11586 * +---------------+---------------+---------------+---------------+
11587 * | unsigned long kind |
11588 * +---------------+---------------+---------------+---------------+
11589 * | boolean | boolean | N O T U S E D |
11590 * +---------------+---------------+---------------+---------------+
11591 */
11592 case PID_PRESENTATION_OFFERED(0x22): /* Deprecated */
11593 case PID_PRESENTATION(0x21):
11594 ENSURE_LENGTH(6);
11595 proto_tree_add_item(rtps_parameter_tree, hf_rtps_presentation_access_scope, tvb, offset, 4, encoding);
11596 proto_tree_add_item(rtps_parameter_tree, hf_rtps_presentation_coherent_access, tvb, offset+4, 1, ENC_NA0x00000000 );
11597 proto_tree_add_item(rtps_parameter_tree, hf_rtps_presentation_ordered_access, tvb, offset+5, 1, ENC_NA0x00000000 );
11598 break;
11599
11600 /* 0...2...........7...............15.............23...............31
11601 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11602 * | PID_DEADLINE | 0x0008 |
11603 * +---------------+---------------+---------------+---------------+
11604 * | long NtpTime.seconds |
11605 * +---------------+---------------+---------------+---------------+
11606 * | unsigned long NtpTime.fraction |
11607 * +---------------+---------------+---------------+---------------+
11608 */
11609 case PID_DEADLINE_OFFERED(0x24): /* Deprecated */
11610 case PID_DEADLINE(0x23):
11611 ENSURE_LENGTH(8);
11612 rtps_util_add_timestamp_sec_and_fraction(rtps_parameter_tree, tvb, offset, encoding, hf_rtps_deadline_period);
11613 break;
11614
11615 /* 0...2...........7...............15.............23...............31
11616 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11617 * | PID_DESTINATION_ORDER | 0x0004 |
11618 * +---------------+---------------+---------------+---------------+
11619 * | unsigned long kind |
11620 * +---------------+---------------+---------------+---------------+
11621 */
11622 case PID_DESTINATION_ORDER_OFFERED(0x26): /* Deprecated */
11623 case PID_DESTINATION_ORDER(0x25):
11624 ENSURE_LENGTH(4);
11625 proto_tree_add_item(rtps_parameter_tree, hf_rtps_destination_order, tvb, offset, 4, encoding);
11626 break;
11627
11628 /* 0...2...........7...............15.............23...............31
11629 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11630 * | PID_LATENCY_BUDGET | 0x0008 |
11631 * +---------------+---------------+---------------+---------------+
11632 * | long NtpTime.seconds |
11633 * +---------------+---------------+---------------+---------------+
11634 * | unsigned long NtpTime.fraction |
11635 * +---------------+---------------+---------------+---------------+
11636 */
11637 case PID_LATENCY_BUDGET_OFFERED(0x28):
11638 case PID_LATENCY_BUDGET(0x27):
11639 ENSURE_LENGTH(8);
11640 rtps_util_add_timestamp_sec_and_fraction(rtps_parameter_tree, tvb, offset,
11641 encoding, hf_rtps_latency_budget_duration);
11642 break;
11643
11644 /* 0...2...........7...............15.............23...............31
11645 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11646 * | PID_PARTITION | length |
11647 * +---------------+---------------+---------------+---------------+
11648 * | unsigned long sequence_size |
11649 * +---------------+---------------+---------------+---------------+
11650 * | unsigned long string[0].size |
11651 * +---------------+---------------+---------------+---------------+
11652 * | string[0][0] | string[0][1] | string[0][2] | string[0][3] |
11653 * +---------------+---------------+---------------+---------------+
11654 * | ... |
11655 * +---------------+---------------+---------------+---------------+
11656 * The value is a sequence of strings.
11657 */
11658 case PID_PARTITION_OFFERED(0x2a): /* Deprecated */
11659 case PID_PARTITION(0x29):
11660 ENSURE_LENGTH(4);
11661 rtps_util_add_seq_string(rtps_parameter_tree, pinfo, tvb, offset, encoding,
11662 hf_rtps_param_partition_num, hf_rtps_param_partition, "name");
11663 break;
11664 case PID_TOPIC_NAME_ALIASES(0x8028):
11665 ENSURE_LENGTH(4);
11666 rtps_util_add_seq_string(rtps_parameter_tree, pinfo, tvb, offset, encoding,
11667 hf_rtps_param_topic_alias_num, hf_rtps_param_topic_alias, "Topic alias");
11668 break;
11669 case PID_TYPE_NAME_ALIASES(0x8029):
11670 ENSURE_LENGTH(4);
11671 rtps_util_add_seq_string(rtps_parameter_tree, pinfo, tvb, offset, encoding,
11672 hf_rtps_param_type_alias_num, hf_rtps_param_type_alias, "Type alias");
11673 break;
11674 /* 0...2...........7...............15.............23...............31
11675 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11676 * | PID_LIFESPAN | 0x0008 |
11677 * +---------------+---------------+---------------+---------------+
11678 * | long NtpTime.seconds |
11679 * +---------------+---------------+---------------+---------------+
11680 * | unsigned long NtpTime.fraction |
11681 * +---------------+---------------+---------------+---------------+
11682 */
11683 case PID_LIFESPAN(0x2b):
11684 ENSURE_LENGTH(8);
11685 rtps_util_add_timestamp_sec_and_fraction(rtps_parameter_tree, tvb, offset, encoding,
11686 hf_rtps_lifespan_duration);
11687 break;
11688
11689 /* 0...2...........7...............15.............23...............31
11690 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11691 * | PID_USER_DATA | length |
11692 * +---------------+---------------+---------------+---------------+
11693 * | unsigned long sequence_size |
11694 * +---------------+---------------+---------------+---------------+
11695 * | octet[0] | octet[1] | octet[2] | octet[3] |
11696 * +---------------+---------------+---------------+---------------+
11697 * | ... |
11698 * +---------------+---------------+---------------+---------------+
11699 */
11700 case PID_USER_DATA(0x2c):
11701 ENSURE_LENGTH(4);
11702 rtps_util_add_seq_octets(rtps_parameter_tree, pinfo, tvb, offset,
11703 encoding, param_length, hf_rtps_param_user_data);
11704 break;
11705
11706 /* 0...2...........7...............15.............23...............31
11707 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11708 * | PID_GROUP_DATA | length |
11709 * +---------------+---------------+---------------+---------------+
11710 * | unsigned long sequence_size |
11711 * +---------------+---------------+---------------+---------------+
11712 * | octet[0] | octet[1] | octet[2 ] | octet[3] |
11713 * +---------------+---------------+---------------+---------------+
11714 * | ... |
11715 * +---------------+---------------+---------------+---------------+
11716 */
11717 case PID_GROUP_DATA(0x2d):
11718 ENSURE_LENGTH(4);
11719 rtps_util_add_seq_octets(rtps_parameter_tree, pinfo, tvb, offset,
11720 encoding, param_length, hf_rtps_param_group_data);
11721 break;
11722
11723 /* 0...2...........7...............15.............23...............31
11724 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11725 * | PID_TOPIC_DATA | length |
11726 * +---------------+---------------+---------------+---------------+
11727 * | unsigned long sequence_size |
11728 * +---------------+---------------+---------------+---------------+
11729 * | octet[0] | octet[1] | octet[2] | octet[3] |
11730 * +---------------+---------------+---------------+---------------+
11731 * | ... |
11732 * +---------------+---------------+---------------+---------------+
11733 */
11734 case PID_TOPIC_DATA(0x2e):
11735 ENSURE_LENGTH(4);
11736 rtps_util_add_seq_octets(rtps_parameter_tree, pinfo, tvb, offset,
11737 encoding, param_length, hf_rtps_param_topic_data);
11738 break;
11739
11740 /* 0...2...........7...............15.............23...............31
11741 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11742 * | PID_UNICAST_LOCATOR | 0x0018 |
11743 * +---------------+---------------+---------------+---------------+
11744 * | long kind |
11745 * +---------------+---------------+---------------+---------------+
11746 * | long port |
11747 * +---------------+---------------+---------------+---------------+
11748 * | ipv6addr[0] | ipv6addr[1] | ipv6addr[2] | ipv6addr[3] |
11749 * +---------------+---------------+---------------+---------------+
11750 * | ipv6addr[4] | ipv6addr[5] | ipv6addr[6] | ipv6addr[7] |
11751 * +---------------+---------------+---------------+---------------+
11752 * | ipv6addr[8] | ipv6addr[9] | ipv6addr[10] | ipv6addr[11] |
11753 * +---------------+---------------+---------------+---------------+
11754 * | ipv6addr[12] | ipv6addr[13] | ipv6addr[14] | ipv6addr[15] |
11755 * +---------------+---------------+---------------+---------------+
11756 */
11757 case PID_UNICAST_LOCATOR(0x2f):
11758 ENSURE_LENGTH(24);
11759 rtps_util_add_locator_t(rtps_parameter_tree, pinfo, tvb,
11760 offset, encoding, "locator");
11761 break;
11762
11763 /* 0...2...........7...............15.............23...............31
11764 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11765 * | PID_MULTICAST_LOCATOR | 0x0018 |
11766 * +---------------+---------------+---------------+---------------+
11767 * | long kind |
11768 * +---------------+---------------+---------------+---------------+
11769 * | long port |
11770 * +---------------+---------------+---------------+---------------+
11771 * | ipv6addr[0] | ipv6addr[1] | ipv6addr[2] | ipv6addr[3] |
11772 * +---------------+---------------+---------------+---------------+
11773 * | ipv6addr[4] | ipv6addr[5] | ipv6addr[6] | ipv6addr[7] |
11774 * +---------------+---------------+---------------+---------------+
11775 * | ipv6addr[8] | ipv6addr[9] | ipv6addr[10] | ipv6addr[11] |
11776 * +---------------+---------------+---------------+---------------+
11777 * | ipv6addr[12] | ipv6addr[13] | ipv6addr[14] | ipv6addr[15] |
11778 * +---------------+---------------+---------------+---------------+
11779 */
11780 case PID_MULTICAST_LOCATOR(0x30):
11781 ENSURE_LENGTH(24);
11782 rtps_util_add_locator_t(rtps_parameter_tree, pinfo, tvb,
11783 offset, encoding, "locator");
11784 break;
11785
11786 /* 0...2...........7...............15.............23...............31
11787 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11788 * | PID_DEFAULT_UNICAST_LOCATOR | 0x0018 |
11789 * +---------------+---------------+---------------+---------------+
11790 * | long kind |
11791 * +---------------+---------------+---------------+---------------+
11792 * | long port |
11793 * +---------------+---------------+---------------+---------------+
11794 * | ipv6addr[0] | ipv6addr[1] | ipv6addr[2] | ipv6addr[3] |
11795 * +---------------+---------------+---------------+---------------+
11796 * | ipv6addr[4] | ipv6addr[5] | ipv6addr[6] | ipv6addr[7] |
11797 * +---------------+---------------+---------------+---------------+
11798 * | ipv6addr[8] | ipv6addr[9] | ipv6addr[10] | ipv6addr[11] |
11799 * +---------------+---------------+---------------+---------------+
11800 * | ipv6addr[12] | ipv6addr[13] | ipv6addr[14] | ipv6addr[15] |
11801 * +---------------+---------------+---------------+---------------+
11802 */
11803 case PID_DEFAULT_UNICAST_LOCATOR(0x31):
11804 ENSURE_LENGTH(24);
11805 rtps_util_add_locator_t(rtps_parameter_tree, pinfo, tvb, offset,
11806 encoding, "locator");
11807 break;
11808
11809 /* 0...2...........7...............15.............23...............31
11810 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11811 * | PID_METATRAFFIC_UNICAST_LOC...| 0x0018 |
11812 * +---------------+---------------+---------------+---------------+
11813 * | long kind |
11814 * +---------------+---------------+---------------+---------------+
11815 * | long port |
11816 * +---------------+---------------+---------------+---------------+
11817 * | ipv6addr[0] | ipv6addr[1] | ipv6addr[2] | ipv6addr[3] |
11818 * +---------------+---------------+---------------+---------------+
11819 * | ipv6addr[4] | ipv6addr[5] | ipv6addr[6] | ipv6addr[7] |
11820 * +---------------+---------------+---------------+---------------+
11821 * | ipv6addr[8] | ipv6addr[9] | ipv6addr[10] | ipv6addr[11] |
11822 * +---------------+---------------+---------------+---------------+
11823 * | ipv6addr[12] | ipv6addr[13] | ipv6addr[14] | ipv6addr[15] |
11824 * +---------------+---------------+---------------+---------------+
11825 */
11826 case PID_METATRAFFIC_UNICAST_LOCATOR(0x32):
11827 ENSURE_LENGTH(24);
11828 rtps_util_add_locator_t(rtps_parameter_tree, pinfo, tvb, offset,
11829 encoding, "locator");
11830 break;
11831
11832 /* 0...2...........7...............15.............23...............31
11833 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11834 * | PID_METATRAFFIC_MULTICAST_L...| 0x0018 |
11835 * +---------------+---------------+---------------+---------------+
11836 * | long kind |
11837 * +---------------+---------------+---------------+---------------+
11838 * | long port |
11839 * +---------------+---------------+---------------+---------------+
11840 * | ipv6addr[0] | ipv6addr[1] | ipv6addr[2] | ipv6addr[3] |
11841 * +---------------+---------------+---------------+---------------+
11842 * | ipv6addr[4] | ipv6addr[5] | ipv6addr[6] | ipv6addr[7] |
11843 * +---------------+---------------+---------------+---------------+
11844 * | ipv6addr[8] | ipv6addr[9] | ipv6addr[10] | ipv6addr[11] |
11845 * +---------------+---------------+---------------+---------------+
11846 * | ipv6addr[12] | ipv6addr[13] | ipv6addr[14] | ipv6addr[15] |
11847 * +---------------+---------------+---------------+---------------+
11848 */
11849 case PID_METATRAFFIC_MULTICAST_LOCATOR(0x33):
11850 ENSURE_LENGTH(24);
11851 rtps_util_add_locator_t(rtps_parameter_tree, pinfo, tvb,
11852 offset, encoding, "locator");
11853 break;
11854
11855 /* 0...2...........7...............15.............23...............31
11856 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11857 * | PID_PARTICIPANT_MANUAL_LIVE...| 0x0004 |
11858 * +---------------+---------------+---------------+---------------+
11859 * | long livelinessEpoch |
11860 * +---------------+---------------+---------------+---------------+
11861 */
11862 case PID_PARTICIPANT_BUILTIN_ENDPOINTS(0x44):
11863 ENSURE_LENGTH(4);
11864 proto_tree_add_item(rtps_parameter_tree, hf_rtps_participant_builtin_endpoints, tvb, offset, 4, encoding);
11865 break;
11866
11867 case PID_PARTICIPANT_MANUAL_LIVELINESS_COUNT(0x34):
11868 ENSURE_LENGTH(4);
11869 proto_tree_add_item(rtps_parameter_tree, hf_rtps_participant_manual_liveliness_count, tvb, offset, 4, encoding);
11870 break;
11871
11872 /* 0...2...........7...............15.............23...............31
11873 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11874 * | PID_HISTORY | 0x0004 |
11875 * +---------------+---------------+---------------+---------------+
11876 * | long kind |
11877 * +---------------+---------------+---------------+---------------+
11878 * | long depth |
11879 * +---------------+---------------+---------------+---------------+
11880 */
11881 case PID_HISTORY(0x40):
11882 ENSURE_LENGTH(8);
11883 proto_tree_add_item(rtps_parameter_tree, hf_rtps_history_kind, tvb, offset, 4, encoding);
11884 proto_tree_add_item(rtps_parameter_tree, hf_rtps_history_depth, tvb, offset+4, 4, encoding);
11885 break;
11886
11887 /* 0...2...........7...............15.............23...............31
11888 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11889 * | PID_RESOURCE_LIMIT | 0x0004 |
11890 * +---------------+---------------+---------------+---------------+
11891 * | long max_samples |
11892 * +---------------+---------------+---------------+---------------+
11893 * | long max_instances |
11894 * +---------------+---------------+---------------+---------------+
11895 * | long max_samples_per_instances |
11896 * +---------------+---------------+---------------+---------------+
11897 */
11898 case PID_RESOURCE_LIMIT(0x41):
11899 ENSURE_LENGTH(12);
11900 subtree = proto_tree_add_subtree(rtps_parameter_tree, tvb, offset, 12, ett_rtps_resource_limit, NULL((void*)0), "Resource Limit");
11901 proto_tree_add_item(subtree, hf_rtps_resource_limit_max_samples, tvb, offset, 4, encoding);
11902 proto_tree_add_item(subtree, hf_rtps_resource_limit_max_instances, tvb, offset+4, 4, encoding);
11903 proto_tree_add_item(subtree, hf_rtps_resource_limit_max_samples_per_instances, tvb, offset+8, 4, encoding);
11904 break;
11905
11906 /* 0...2...........7...............15.............23...............31
11907 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11908 * | PID_CONTENT_FILTER_PROPERTY | length |
11909 * +---------------+---------------+---------------+---------------+
11910 * | unsigned long String1.length |
11911 * +---------------+---------------+---------------+---------------+
11912 * | str1[0] | str1[1] | str1[2] | str1[3] |
11913 * +---------------+---------------+---------------+---------------+
11914 * | ... |
11915 * +---------------+---------------+---------------+---------------+
11916 * | unsigned long String2.length |
11917 * +---------------+---------------+---------------+---------------+
11918 * | str2[0] | str2[1] | str2[2] | str2[3] |
11919 * +---------------+---------------+---------------+---------------+
11920 * | ... |
11921 * +---------------+---------------+---------------+---------------+
11922 * | unsigned long String3.length |
11923 * +---------------+---------------+---------------+---------------+
11924 * | str3[0] | str3[1] | str3[2] | str3[3] |
11925 * +---------------+---------------+---------------+---------------+
11926 * | ... |
11927 * +---------------+---------------+---------------+---------------+
11928 * | unsigned long String4.length |
11929 * +---------------+---------------+---------------+---------------+
11930 * | str4[0] | str4[1] | str4[2] | str4[3] |
11931 * +---------------+---------------+---------------+---------------+
11932 * | ... |
11933 * +---------------+---------------+---------------+---------------+
11934 * | ... |
11935 * | Filter Parameters |
11936 * | ... |
11937 * +---------------+---------------+---------------+---------------+
11938 *
11939 * String1: ContentFilterTopicName
11940 * String2: RelatedTopicName
11941 * String3: FilterClassName
11942 * String4: FilterExpression
11943 * ExpressionParameters: sequence of Strings
11944 *
11945 * Note: those strings starts all to a word-aligned (4 bytes) offset
11946 */
11947 case PID_CONTENT_FILTER_PROPERTY(0x35): {
11948 uint32_t temp_offset = offset;
11949 ENSURE_LENGTH(20);
11950 temp_offset = rtps_util_add_string(rtps_parameter_tree, tvb, temp_offset,
11951 hf_rtps_param_content_filter_topic_name, encoding);
11952 temp_offset = rtps_util_add_string(rtps_parameter_tree, tvb, temp_offset,
11953 hf_rtps_param_related_topic_name, encoding);
11954 temp_offset = rtps_util_add_string(rtps_parameter_tree, tvb, temp_offset,
11955 hf_rtps_param_filter_class_name, encoding);
11956 temp_offset = rtps_util_add_string(rtps_parameter_tree, tvb, temp_offset,
11957 hf_rtps_param_filter_expression, encoding);
11958 /*temp_offset = */rtps_util_add_seq_string(rtps_parameter_tree, pinfo, tvb, temp_offset,
11959 encoding, hf_rtps_param_expression_parameters_num,
11960 hf_rtps_param_expression_parameters, "expressionParameters");
11961 break;
11962 }
11963
11964 /* 0...2...........7...............15.............23...............31
11965 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11966 * | PID_PROPERTY_LIST | length |
11967 * +---------------+---------------+---------------+---------------+
11968 * | unsigned long Seq.Length |
11969 * +---------------+---------------+---------------+---------------+
11970 * | ... |
11971 * | Property 1 |
11972 * | ... |
11973 * +---------------+---------------+---------------+---------------+
11974 * | ... |
11975 * | Property 2 |
11976 * | ... |
11977 * +---------------+---------------+---------------+---------------+
11978 * | ... |
11979 * | Property n |
11980 * | ... |
11981 * +---------------+---------------+---------------+---------------+
11982 *
11983 * IDL:
11984 * struct PROPERTY {
11985 * String Name;
11986 * String Value;
11987 * };
11988 *
11989 * struct PROPERTY_LIST {
11990 * Sequence<PROPERTY> PropertyList;
11991 * };
11992 *
11993 */
11994 case PID_PROPERTY_LIST(0x0059):
11995 case PID_PROPERTY_LIST_OLD(0x36):
11996 ENSURE_LENGTH(4);
11997 {
11998 uint32_t temp_offset, prop_size;
11999 const uint8_t *propName, *propValue;
12000 proto_item *list_item, *item;
12001 proto_tree *property_list_tree, *property_tree;
12002 uint32_t seq_size = tvb_get_uint32(tvb, offset, encoding);
12003 int start_offset = offset, str_length;
12004
12005 proto_item_append_text( parameter_item, " (%d properties)", seq_size );
12006 if (seq_size > 0) {
12007 property_list_tree = proto_tree_add_subtree(rtps_parameter_tree, tvb, offset, -1, ett_rtps_property_list, &list_item, "Property List");
12008
12009 temp_offset = offset+4;
12010 while(seq_size-- > 0) {
12011 prop_size = tvb_get_uint32(tvb, temp_offset, encoding);
12012 propName = tvb_get_string_enc(pinfo->pool, tvb, temp_offset+4, prop_size, ENC_ASCII0x00000000);
12013
12014 /* NDDS align strings at 4-bytes word. */
12015 str_length = (4 + ((prop_size + 3) & 0xfffffffc));
12016 item = proto_tree_add_string(property_list_tree, hf_rtps_property_name, tvb, temp_offset, str_length, propName);
12017 property_tree = proto_item_add_subtree(item, ett_rtps_property);
12018 temp_offset += str_length;
12019
12020 prop_size = tvb_get_uint32(tvb, temp_offset, encoding);
12021 propValue = tvb_get_string_enc(pinfo->pool, tvb, temp_offset+4, prop_size, ENC_ASCII0x00000000);
12022
12023 /* NDDS align strings at 4-bytes word. */
12024 str_length = (4 + ((prop_size + 3) & 0xfffffffc));
12025 proto_tree_add_string(property_tree, hf_rtps_property_value, tvb, temp_offset, str_length, propValue);
12026 temp_offset += str_length;
12027 }
12028
12029 proto_item_set_len(list_item, temp_offset-start_offset);
12030 }
12031 }
12032 break;
12033
12034 /* 0...2...........7...............15.............23...............31
12035 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
12036 * | PID_FILTER_SIGNATURE | length |
12037 * +---------------+---------------+---------------+---------------+
12038 * | ... |
12039 * +---------------+---------------+---------------+---------------+
12040 *
12041 * IDL:
12042 * struct CONTENT_FILTER_SIGNATURE {
12043 * sequence<long> filterBitmap;
12044 * sequence<FILTER_SIGNATURE, 4> filterSignature;
12045 * }
12046 *
12047 * where:
12048 * struct FILTER_SIGNATURE {
12049 * long filterSignature[4];
12050 * }
12051 */
12052 case PID_FILTER_SIGNATURE(0x55): {
12053 uint32_t temp_offset;
12054 uint32_t prev_offset;
12055 uint32_t fs_elem;
12056 uint32_t fs[4];
12057 ENSURE_LENGTH(8);
12058
12059 /* Dissect filter bitmap */
12060 temp_offset = rtps_util_add_seq_ulong(rtps_parameter_tree, tvb, offset,
12061 hf_rtps_filter_bitmap, encoding, param_length, "filterBitmap");
12062
12063 /* Dissect sequence of FILTER_SIGNATURE */
12064 fs_elem = tvb_get_uint32(tvb, temp_offset, encoding);
12065 temp_offset += 4;
12066 while (fs_elem-- > 0) {
12067 prev_offset = temp_offset;
12068 /* Dissect the next FILTER_SIGNATURE object */
12069 fs[0] = tvb_get_uint32(tvb, temp_offset, encoding);
12070 temp_offset += 4;
12071 fs[1] = tvb_get_uint32(tvb, temp_offset, encoding);
12072 temp_offset += 4;
12073 fs[2] = tvb_get_uint32(tvb, temp_offset, encoding);
12074 temp_offset += 4;
12075 fs[3] = tvb_get_uint32(tvb, temp_offset, encoding);
12076 temp_offset += 4;
12077 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",
12078 fs[0], fs[1], fs[2], fs[3]);
12079 }
12080
12081 break;
12082 }
12083
12084
12085 /* 0...2...........7...............15.............23...............31
12086 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
12087 * | PID_COHERENT_SET | length |
12088 * +---------------+---------------+---------------+---------------+
12089 * | |
12090 * + SequenceNumber seqNumber +
12091 * | |
12092 * +---------------+---------------+---------------+---------------+
12093 */
12094 case PID_COHERENT_SET(0x56): {
12095 uint64_t coherent_seq_number;
12096
12097 ENSURE_LENGTH(8);
12098 coherent_seq_number = rtps_util_add_seq_number(rtps_parameter_tree, tvb, offset,
12099 encoding, "sequenceNumber");
12100 if (coherent_set_entity_info_object && rtps_parameter_tree) {
12101 rtps_util_add_coherent_set_general_cases_case(rtps_parameter_tree,
12102 tvb, coherent_seq_number, coherent_set_entity_info_object);
12103 }
12104 break;
12105 }
12106 /* 0...2...........7...............15.............23...............31
12107 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
12108 * | PID_TYPECODE | length |
12109 * +---------------+---------------+---------------+---------------+
12110 * | |
12111 * + Type code description +
12112 * | |
12113 * +---------------+---------------+---------------+---------------+
12114 */
12115 case PID_TYPECODE(0x47):
12116 rtps_util_add_typecode(rtps_parameter_tree, tvb, pinfo, offset, encoding,
12117 0, /* indent level */
12118 0, /* isPointer */
12119 -1, /* bitfield */
12120 0, /* isKey */
12121 offset,
12122 NULL((void*)0), /* name */
12123 -1, /* not a seq field */
12124 NULL((void*)0), /* not an array */
12125 0); /* ndds 4.0 hack: init to false */
12126 break;
12127
12128 /* 0...2...........7...............15.............23...............31
12129 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
12130 * | PID_PARTICIPANT_GUID | 0x000c |
12131 * +---------------+---------------+---------------+---------------+
12132 * | guid[0] | guid[1] | guid[2] | guid[3] |
12133 * +---------------+---------------+---------------+---------------+
12134 * | guid[4] | guid[5] | guid[6] | guid[7] |
12135 * +---------------+---------------+---------------+---------------+
12136 * | guid[8] | guid[9] | guid[10] | guid[11] |
12137 * +---------------+---------------+---------------+---------------+
12138 */
12139 case PID_PARTICIPANT_GUID(0x50):
12140 if (version < 0x0200) {
12141 ENSURE_LENGTH(12);
12142 rtps_util_add_generic_guid_v1(rtps_parameter_tree, tvb, offset,
12143 hf_rtps_participant_guid_v1, hf_rtps_param_host_id, hf_rtps_param_app_id,
12144 hf_rtps_param_instance_id_v1, hf_rtps_param_app_kind,
12145 hf_rtps_param_entity, hf_rtps_param_entity_key, hf_rtps_param_entity_kind);
12146 } else {
12147 ENSURE_LENGTH(16);
12148 rtps_util_add_generic_guid_v2(rtps_parameter_tree, tvb, offset,
12149 hf_rtps_participant_guid, hf_rtps_param_host_id, hf_rtps_param_app_id,
12150 hf_rtps_param_instance_id, hf_rtps_param_entity, hf_rtps_param_entity_key,
12151 hf_rtps_param_entity_kind, NULL((void*)0));
12152 }
12153 break;
12154
12155 /* 0...2...........7...............15.............23...............31
12156 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
12157 * | PID_PARTICIPANT_ENTITY_ID | 0x0004 |
12158 * +---------------+---------------+---------------+---------------+
12159 * | entity[0] | entity[1] | entity[2] | entity[3] |
12160 * +---------------+---------------+---------------+---------------+
12161 */
12162 case PID_PARTICIPANT_ENTITY_ID(0x51):
12163 ENSURE_LENGTH(4);
12164 rtps_util_add_generic_entity_id(rtps_parameter_tree, pinfo, tvb, offset, "Participant entity ID",
12165 hf_rtps_param_entity, hf_rtps_param_entity_key,
12166 hf_rtps_param_entity_kind, ett_rtps_entity);
12167
12168 break;
12169
12170 /* 0...2...........7...............15.............23...............31
12171 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
12172 * | PID_GROUP_GUID | 0x000c |
12173 * +---------------+---------------+---------------+---------------+
12174 * | guid[0] | guid[1] | guid[2] | guid[3] |
12175 * +---------------+---------------+---------------+---------------+
12176 * | guid[4] | guid[5] | guid[6] | guid[7] |
12177 * +---------------+---------------+---------------+---------------+
12178 * | guid[8] | guid[9] | guid[10] | guid[11] |
12179 * +---------------+---------------+---------------+---------------+
12180 */
12181 case PID_GROUP_GUID(0x52):
12182 if (version < 0x0200) {
12183 ENSURE_LENGTH(12);
12184 rtps_util_add_generic_guid_v1(rtps_parameter_tree, tvb, offset,
12185 hf_rtps_group_guid_v1, hf_rtps_param_host_id, hf_rtps_param_app_id,
12186 hf_rtps_param_instance_id_v1, hf_rtps_param_app_kind,
12187 hf_rtps_param_entity, hf_rtps_param_entity_key, hf_rtps_param_entity_kind);
12188 } else {
12189 ENSURE_LENGTH(16);
12190 rtps_util_add_generic_guid_v2(rtps_parameter_tree, tvb, offset,
12191 hf_rtps_group_guid, hf_rtps_param_host_id, hf_rtps_param_app_id,
12192 hf_rtps_param_instance_id, hf_rtps_param_entity, hf_rtps_param_entity_key,
12193 hf_rtps_param_entity_kind, NULL((void*)0));
12194 }
12195 break;
12196
12197 /* 0...2...........7...............15.............23...............31
12198 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
12199 * | PID_GROUP_ENTITY_ID | 0x0004 |
12200 * +---------------+---------------+---------------+---------------+
12201 * | entity[0] | entity[1] | entity[2] | entity[3] |
12202 * +---------------+---------------+---------------+---------------+
12203 */
12204 case PID_GROUP_ENTITY_ID(0x53):
12205 ENSURE_LENGTH(4);
12206 rtps_util_add_generic_entity_id(rtps_parameter_tree, pinfo, tvb, offset, "Group entity ID",
12207 hf_rtps_param_entity, hf_rtps_param_entity_key,
12208 hf_rtps_param_entity_kind, ett_rtps_entity);
12209 break;
12210
12211 /* ==================================================================
12212 * Here are all the deprecated items.
12213 */
12214
12215 case PID_PERSISTENCE(0x03):
12216 ENSURE_LENGTH(8);
12217 rtps_util_add_timestamp_sec_and_fraction(rtps_parameter_tree, tvb, offset, encoding,
12218 hf_rtps_persistence);
12219 break;
12220
12221 case PID_TYPE_CHECKSUM(0x08):
12222 ENSURE_LENGTH(4);
12223 proto_tree_add_checksum(rtps_parameter_tree, tvb, offset, hf_rtps_type_checksum, -1, NULL((void*)0), pinfo, 0, encoding, PROTO_CHECKSUM_NO_FLAGS0x00);
12224 break;
12225
12226 case PID_EXPECTS_ACK(0x10):
12227 ENSURE_LENGTH(1);
12228 proto_tree_add_item(rtps_parameter_tree, hf_rtps_expects_ack, tvb, offset, 1, ENC_NA0x00000000 );
12229 break;
12230
12231 case PID_MANAGER_KEY(0x12): {
12232 int i = 0;
12233 uint32_t manager_key;
12234
12235 subtree = proto_tree_add_subtree(rtps_parameter_tree, tvb, offset, param_length, ett_rtps_manager_key, NULL((void*)0), "Manager Keys");
12236
12237 while (param_length >= 4) {
12238 manager_key = tvb_get_uint32(tvb, offset, encoding);
12239 proto_tree_add_uint_format(subtree, hf_rtps_manager_key, tvb, offset, 4,
12240 manager_key, "Key[%d]: 0x%X", i, manager_key);
12241
12242 ++i;
12243 offset +=4;
12244 param_length -= 4; /* decrement count */
12245 }
12246 break;
12247 }
12248
12249 case PID_RECV_QUEUE_SIZE(0x18):
12250 case PID_SEND_QUEUE_SIZE(0x13):
12251 ENSURE_LENGTH(4);
12252 proto_tree_add_item(rtps_parameter_tree, hf_rtps_queue_size, tvb, offset, 4, encoding);
12253 break;
12254
12255 case PID_VARGAPPS_SEQUENCE_NUMBER_LAST(0x17):
12256 ENSURE_LENGTH(4);
12257 rtps_util_add_seq_number(rtps_parameter_tree, tvb, offset, encoding, "sequenceNumberLast");
12258 break;
12259
12260 case PID_SENTINEL(0x01):
12261 /* PID_SENTINEL should ignore any value of parameter length */
12262 break;
12263
12264 /* This is the default branch when we don't have enough information
12265 * on how to decode the parameter. It can be used also for known
12266 * parameters.
12267 */
12268 /* 0...2...........7...............15.............23...............31
12269 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
12270 * | <pid_id> | 0x0000 |
12271 * +---------------+---------------+---------------+---------------+
12272 */
12273 case PID_TYPE2_NAME(0x09):
12274 case PID_TYPE2_CHECKSUM(0x0a):
12275 case PID_RELIABILITY_ENABLED(0x14):
12276 expert_add_info(pinfo, parameter_item, &ei_rtps_parameter_not_decoded);
12277 /* Fall Through */
12278 case PID_PAD(0x00):
12279 if (param_length > 0) {
12280 proto_tree_add_item(rtps_parameter_tree, hf_rtps_parameter_data, tvb,
12281 offset, param_length, ENC_NA0x00000000);
12282 }
12283 break;
12284
12285 default:
12286 return false0;
12287 }
12288
12289 return true1;
12290}
12291
12292static bool_Bool dissect_parameter_sequence_v2(proto_tree *rtps_parameter_tree, packet_info *pinfo, tvbuff_t *tvb,
12293 proto_item *parameter_item _U___attribute__((unused)), proto_item *param_len_item,
12294 int offset, const unsigned encoding, int param_length,
12295 uint16_t parameter, uint32_t *pStatusInfo, uint16_t vendor_id _U___attribute__((unused)),
12296 type_mapping * type_mapping_object,
12297 coherent_set_entity_info *coherent_set_entity_info_object _U___attribute__((unused))) {
12298 proto_item *ti;
12299
12300 switch(parameter) {
12301 /* 0...2...........7...............15.............23...............31
12302 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
12303 * | PID_STATUS_INFO | 0x0004 |
12304 * +---------------+---------------+---------------+---------------+
12305 * | long statusInfo |
12306 * +---------------+---------------+---------------+---------------+
12307 */
12308 case PID_STATUS_INFO(0x0071): {
12309 bool_Bool* is_data_session_intermediate = NULL((void*)0);
12310 ENSURE_LENGTH(4);
12311 /* PID_STATUS_INFO is always coded in network byte order (big endian) */
12312 proto_tree_add_bitmask(rtps_parameter_tree, tvb, offset,
12313 hf_rtps_param_status_info_flags, ett_rtps_flags,
12314 STATUS_INFO_FLAGS, ENC_BIG_ENDIAN0x00000000);
12315 if (pStatusInfo != NULL((void*)0)) {
12316 *pStatusInfo = tvb_get_ntohl(tvb, offset);
12317 }
12318 is_data_session_intermediate = (bool_Bool*)p_get_proto_data(pinfo->pool, pinfo, proto_rtps, RTPS_DATA_SESSION_FINAL_PROTODATA_KEY2);
12319 if (is_data_session_intermediate != NULL((void*)0)) {
12320 *is_data_session_intermediate = true1;
12321 }
12322 break;
12323 }
12324
12325 /* 0...2...........7...............15.............23...............31
12326 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
12327 * | PID_DIRECTED_WRITE | 0x0010 |
12328 * +---------------+---------------+---------------+---------------+
12329 * | |
12330 * +- -+
12331 * | octet[12] guidPrefix |
12332 * +- -+
12333 * | |
12334 * +---------------+---------------+---------------+---------------+
12335 * | octet[4] entityId |
12336 * +---------------+---------------+---------------+---------------+
12337 */
12338 case PID_DIRECTED_WRITE(0x0057): {
12339 ENSURE_LENGTH(16);
12340 rtps_util_add_guid_prefix_v2(rtps_parameter_tree, tvb, offset, hf_rtps_sm_guid_prefix,
12341 hf_rtps_sm_host_id, hf_rtps_sm_app_id, hf_rtps_sm_instance_id, 0);
12342 rtps_util_add_entity_id(rtps_parameter_tree, pinfo, tvb, offset+12, hf_rtps_sm_entity_id,
12343 hf_rtps_sm_entity_id_key, hf_rtps_sm_entity_id_kind, ett_rtps_entity,
12344 "guidSuffix", NULL((void*)0));
12345 break;
12346 }
12347
12348
12349 /* 0...2...........7...............15.............23...............31
12350 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
12351 * | PID_KEY_HASH | xxxx |
12352 * +---------------+---------------+---------------+---------------+
12353 * | |
12354 * +- -+
12355 * | octet[xxxx] guid |
12356 * +- -+
12357 * | |
12358 * +---------------+---------------+---------------+---------------+
12359 * Differently from the other GUID, the KEY_HASH parameter may have
12360 * variable length in the future.
12361 * As consequence, no interpretation is performed here (and no check
12362 * for size).
12363 */
12364 case PID_KEY_HASH(0x0070): {
12365 uint8_t guidPart;
12366 int i;
12367 ti = proto_tree_add_bytes_format(rtps_parameter_tree, hf_rtps_guid, tvb, offset, param_length, NULL((void*)0), "guid: ");
12368 for (i = 0; i < param_length; ++i) {
12369 guidPart = tvb_get_uint8(tvb, offset+i);
12370 proto_item_append_text(ti, "%02x", guidPart);
12371 if (( ((i+1) % 4) == 0 ) && (i != param_length-1) )
12372 proto_item_append_text(ti, ":");
12373 }
12374 break;
12375 }
12376
12377 /* 0...2...........7...............15.............23...............31
12378 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
12379 * | PID_TRANSPORT_PRIORITY | 0x0004 |
12380 * +---------------+---------------+---------------+---------------+
12381 * | unsigned long value |
12382 * +---------------+---------------+---------------+---------------+
12383 */
12384 case PID_TRANSPORT_PRIORITY(0x0049):
12385 ENSURE_LENGTH(4);
12386 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_transport_priority, tvb, offset, 4, encoding);
12387 break;
12388
12389 /* 0...2...........7...............15.............23...............31
12390 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
12391 * | PID_CONTENT_FILTER_INFO | length |
12392 * +---------------+---------------+---------------+---------------+
12393 * | ... |
12394 * +---------------+---------------+---------------+---------------+
12395 *
12396 * IDL:
12397 * struct CONTENT_FILTER_SIGNATURE {
12398 * sequence<long> filterBitmap;
12399 * sequence<FILTER_SIGNATURE, 4> filterSignature;
12400 * }
12401 *
12402 * where:
12403 * struct FILTER_SIGNATURE {
12404 * long filterSignature[4];
12405 * }
12406 */
12407 case PID_CONTENT_FILTER_INFO(0x0055): {
12408 uint32_t temp_offset;
12409 uint32_t prev_offset;
12410 uint32_t fs_elem;
12411 uint32_t fs[4];
12412 ENSURE_LENGTH(8);
12413
12414 /* Dissect filter bitmap */
12415 temp_offset = rtps_util_add_seq_ulong(rtps_parameter_tree, tvb, offset,
12416 hf_rtps_filter_bitmap, encoding, param_length, "filterBitmap");
12417
12418 /* Dissect sequence of FILTER_SIGNATURE */
12419 fs_elem = tvb_get_uint32(tvb, temp_offset, encoding);
12420 temp_offset += 4;
12421 while (fs_elem-- > 0) {
12422 prev_offset = temp_offset;
12423 /* Dissect the next FILTER_SIGNATURE object */
12424 fs[0] = tvb_get_uint32(tvb, temp_offset, encoding);
12425 temp_offset += 4;
12426 fs[1] = tvb_get_uint32(tvb, temp_offset, encoding);
12427 temp_offset += 4;
12428 fs[2] = tvb_get_uint32(tvb, temp_offset, encoding);
12429 temp_offset += 4;
12430 fs[3] = tvb_get_uint32(tvb, temp_offset, encoding);
12431 temp_offset += 4;
12432 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",
12433 fs[0], fs[1], fs[2], fs[3]);
12434 }
12435
12436 break;
12437 }
12438
12439 /* 0...2...........7...............15.............23...............31
12440 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
12441 * | PID_BUILTIN_ENDPOINT_SET | length |
12442 * +---------------+---------------+---------------+---------------+
12443 * | long value |
12444 * +---------------+---------------+---------------+---------------+
12445 */
12446 case PID_BUILTIN_ENDPOINT_SET(0x0058): {
12447 uint32_t flags;
12448 ENSURE_LENGTH(4);
12449 flags = tvb_get_uint32(tvb, offset, encoding);
12450 proto_tree_add_bitmask_value(rtps_parameter_tree, tvb, offset,
12451 hf_rtps_param_builtin_endpoint_set_flags, ett_rtps_flags,
12452 BUILTIN_ENDPOINT_FLAGS, flags);
12453 break;
12454 }
12455
12456 /* 0...2...........7...............15.............23...............31
12457 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
12458 * | PID ... BUILTIN_ENDPOINTS_EXT | length |
12459 * +---------------+---------------+---------------+---------------+
12460 * |0|1|2|3| unused |
12461 * +---------------+---------------+---------------+---------------+
12462 * 0 = TypeLookup Service Request Secure Writer
12463 * 1 = TypeLookup Service Request Secure Reader
12464 * 2 = TypeLookup Service Reply Secure Writer
12465 * 3 = TypeLookup Service Reply Secure Reader
12466 */
12467 case PID_AVAILABLE_BUILTIN_ENDPOINTS_EXT(0x1007):
12468 {
12469 ENSURE_LENGTH(4);
12470 uint32_t flags = tvb_get_uint32(tvb, offset, encoding);
12471 proto_tree_add_bitmask_value(rtps_parameter_tree, tvb, offset,
12472 hf_rtps_param_builtin_endpoint_ext_set_flags, ett_rtps_flags,
12473 BUILTIN_ENDPOINT_EXT_FLAGS, flags);
12474 break;
12475 }
12476
12477 /* 0...2...........7...............15.............23...............31
12478 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
12479 * | PID_TYPE_MAX_SIZE_SERIALIZED | length |
12480 * +---------------+---------------+---------------+---------------+
12481 * | long value |
12482 * +---------------+---------------+---------------+---------------+
12483 */
12484 case PID_TYPE_MAX_SIZE_SERIALIZED(0x0060):
12485 ENSURE_LENGTH(4);
12486 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_type_max_size_serialized, tvb, offset, 4, encoding);
12487 break;
12488
12489
12490
12491 /* 0...2...........7...............15.............23...............31
12492 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
12493 * | PID_ORIGINAL_WRITER_INFO | length |
12494 * +---------------+---------------+---------------+---------------+
12495 * | |
12496 * +- -+
12497 * | octet[12] guidPrefix |
12498 * +- -+
12499 * | |
12500 * +---------------+---------------+---------------+---------------+
12501 * | octet[4] entityId |
12502 * +---------------+---------------+---------------+---------------+
12503 * | |
12504 * + SequenceNumber writerSeqNum +
12505 * | |
12506 * +---------------+---------------+---------------+---------------+
12507 */
12508 case PID_ORIGINAL_WRITER_INFO(0x0061):
12509 ENSURE_LENGTH(16);
12510 rtps_util_add_guid_prefix_v2(rtps_parameter_tree, tvb, offset, hf_rtps_sm_guid_prefix,
12511 hf_rtps_sm_host_id, hf_rtps_sm_app_id, hf_rtps_sm_instance_id, 0);
12512 rtps_util_add_entity_id(rtps_parameter_tree, pinfo, tvb, offset+12, hf_rtps_sm_entity_id,
12513 hf_rtps_sm_entity_id_key, hf_rtps_sm_entity_id_kind, ett_rtps_entity,
12514 "virtualGUIDSuffix", NULL((void*)0));
12515
12516 /* Sequence number */
12517 rtps_util_add_seq_number(rtps_parameter_tree, tvb, offset+16,
12518 encoding, "virtualSeqNumber");
12519 break;
12520
12521 /* 0...2...........7...............15.............23...............31
12522 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
12523 * | PID_ENTITY_NAME | length |
12524 * +---------------+---------------+---------------+---------------+
12525 * | unsigned long String.length |
12526 * +---------------+---------------+---------------+---------------+
12527 * | str[0] | str[1] | str[2] | str[3] |
12528 * +---------------+---------------+---------------+---------------+
12529 * | ... |
12530 * +---------------+---------------+---------------+---------------+
12531 */
12532 case PID_ENTITY_NAME(0x0062):
12533 rtps_util_add_string(rtps_parameter_tree, tvb, offset, hf_rtps_param_entity_name, encoding);
12534 break;
12535
12536 /* 0...2...........7...............15.............23...............31
12537 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
12538 * | PID_ENDPOINT_GUID | 0x0010 |
12539 * +---------------+---------------+---------------+---------------+
12540 * | guid[0] | guid[1] | guid[2] | guid[3] |
12541 * +---------------+---------------+---------------+---------------+
12542 * | guid[4] | guid[5] | guid[6] | guid[7] |
12543 * +---------------+---------------+---------------+---------------+
12544 * | guid[8] | guid[9] | guid[10] | guid[11] |
12545 * +---------------+---------------+---------------+---------------+
12546 * | guid[12] | guid[13] | guid[14] | guid[15] |
12547 * +---------------+---------------+---------------+---------------+
12548 */
12549 case PID_ENDPOINT_GUID(0x005a):
12550 ENSURE_LENGTH(16);
12551 rtps_util_store_type_mapping(pinfo, tvb, offset, type_mapping_object,
12552 NULL((void*)0), TOPIC_INFO_ADD_GUID(0x01));
12553 rtps_util_add_generic_guid_v2(rtps_parameter_tree, tvb, offset,
12554 hf_rtps_endpoint_guid, hf_rtps_param_host_id, hf_rtps_param_app_id,
12555 hf_rtps_param_instance_id, hf_rtps_param_entity, hf_rtps_param_entity_key,
12556 hf_rtps_param_entity_kind, NULL((void*)0));
12557 break;
12558
12559
12560 /* 0...2...........7...............15.............23...............31
12561 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
12562 * | PID_DATA_REPRESENTATION | length |
12563 * +---------------+---------------+---------------+---------------+
12564 * | uint32 SequenceSize |
12565 * +---------------+---------------+---------------+---------------+
12566 * | int16 DataRepresentationId[0] | int16 DataRepresentationId[1] |
12567 * +---------------+-------------------------------+---------------+
12568 * | ... | int16 DataRepresentationId[N] |
12569 * +---------------+---------------+---------------+---------------+
12570 * | uint32_t Compression_id (Optional) |
12571 * +---------------+---------------+---------------+---------------+
12572 * compression_iD flags:
12573 * ZLIB: 0001b
12574 * BZIP: 0010b
12575 * LZ4: 0100b
12576 */
12577
12578 case PID_DATA_REPRESENTATION(0x0073): {
12579 proto_tree *data_representation_seq_subtree;
12580 proto_item *item;
12581 unsigned value;
12582 unsigned item_offset;
12583 unsigned seq_size;
12584 unsigned counter = 0;
12585 unsigned initial_offset = offset;
12586 unsigned compression_id_offset = 0;
12587
12588 seq_size = tvb_get_uint32(tvb, offset, encoding);
12589 data_representation_seq_subtree = proto_tree_add_subtree_format(rtps_parameter_tree, tvb, offset,
12590 param_length, ett_rtps_data_representation, &item, "Data Representation Sequence[%d]", seq_size);
12591 item_offset = offset + 4;
12592 for (; counter < seq_size; ++counter) {
12593 value = tvb_get_uint16(tvb, item_offset, encoding);
12594 proto_tree_add_uint_format(data_representation_seq_subtree, hf_rtps_param_data_representation,
12595 tvb, item_offset, 2, value, "[%d]: %s (0x%X)", counter,
12596 val_to_str(pinfo->pool, value, data_representation_kind_vals, "Unknown data representation value: %u"),
12597 value);
12598 item_offset += 2;
12599 }
12600 compression_id_offset = item_offset;
12601 ALIGN_ME(compression_id_offset, 4)compression_id_offset = (((compression_id_offset) + ((4) - 1)
) & ~((4) - 1))
;
12602 if (compression_id_offset - initial_offset >= 4) {
12603 proto_tree_add_bitmask(
12604 rtps_parameter_tree,
12605 tvb,
12606 compression_id_offset,
12607 hf_rtps_param_compression_id_mask,
12608 ett_rtps_flags,
12609 COMPRESSION_ID_MASK_FLAGS,
12610 encoding);
12611 }
12612 break;
12613 }
12614 /* This parameter PID serializes a sequence number like the existing PID_COHERENT_SET */
12615 /* 0...2...........7...............15.............23...............31
12616 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
12617 * | PID_GROUP_COHERENT_SET | length |
12618 * +---------------+---------------+---------------+---------------+
12619 * | |
12620 * + SequenceNumber seqNumber +
12621 * | |
12622 * +---------------+---------------+---------------+---------------+
12623 */
12624 case PID_GROUP_COHERENT_SET(0x0063): {
12625 uint64_t hi = (uint64_t)tvb_get_uint32(tvb, offset, encoding);
12626 uint64_t lo = (uint64_t)tvb_get_uint32(tvb, offset + 4, encoding);
12627 uint64_t all = (hi << 32) | lo;
12628
12629 proto_tree_add_uint64(
12630 rtps_parameter_tree,
12631 hf_rtps_param_group_coherent_set,
12632 tvb, offset,
12633 sizeof(uint64_t),
12634 all);
12635 break;
12636 }
12637 /* This parameter serializes a sequence number like the existing PID_COHERENT_SET
12638 * and only applies to an end coherent set sample.
12639 */
12640 /* 0...2...........7...............15.............23...............31
12641 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
12642 * | PID_END_GROUP_COHERENT_SET | length |
12643 * +---------------+---------------+---------------+---------------+
12644 * | |
12645 * + SequenceNumber seqNumber +
12646 * | |
12647 * +---------------+---------------+---------------+---------------+
12648 */
12649 case PID_END_GROUP_COHERENT_SET(0x8023): {
12650 uint64_t hi = (uint64_t)tvb_get_uint32(tvb, offset, encoding);
12651 uint64_t lo = (uint64_t)tvb_get_uint32(tvb, offset + 4, encoding);
12652 uint64_t all = (hi << 32) | lo;
12653
12654 proto_tree_add_uint64(
12655 rtps_parameter_tree,
12656 hf_rtps_param_end_group_coherent_set,
12657 tvb, offset,
12658 sizeof(uint64_t),
12659 all);
12660 break;
12661 }
12662 /* This parameter serializes a SN like the existing PID_COHERENT_SET and
12663 * only applies to an end coherent set sample.
12664 * Since there are different ways to finish a coherent set it is necessary
12665 * to store information about the available coherent sets. this PID requires
12666 * set the corrresponding coherence set as "is_set".
12667 */
12668 /* 0...2...........7...............15.............23...............31
12669 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
12670 * | PID_END_COHERENT_SET | length |
12671 * +---------------+---------------+---------------+---------------+
12672 * | |
12673 * + SequenceNumber seqNumber +
12674 * | |
12675 * +---------------+---------------+---------------+---------------+
12676 */
12677 case PID_END_COHERENT_SET(0x8022): {
12678
12679 coherent_set_key coherent_set_info_key;
12680 uint64_t coherent_seq_number = 0;
12681 coherent_set_entity_info *register_entry = NULL((void*)0);
12682 coherent_set_info *coherent_set_info_entry;
12683
12684 coherent_seq_number = rtps_util_add_seq_number(
12685 rtps_parameter_tree,
12686 tvb,
12687 offset,
12688 encoding,
12689 "coherenceSetSequenceNumber");
12690 ti = proto_tree_add_uint64(
12691 rtps_parameter_tree,
12692 hf_rtps_coherent_set_end,
12693 tvb,
12694 0,
12695 0,
12696 coherent_seq_number);
12697 proto_item_set_generated(ti);
12698 /* Need to finish the stored coherence set */
12699 if (coherent_set_entity_info_object != NULL((void*)0)) {
12700 register_entry = (coherent_set_entity_info*)wmem_map_lookup(
12701 coherent_set_tracking.entities_using_map,
12702 &coherent_set_entity_info_object->guid);
12703 if (register_entry) {
12704 register_entry->coherent_set_seq_number = coherent_seq_number;
12705 memset(&coherent_set_info_key, 0, sizeof(coherent_set_info_key));
12706 coherent_set_info_key.guid = register_entry->guid;
12707 coherent_set_info_key.coherent_set_seq_number = register_entry->coherent_set_seq_number;
12708 coherent_set_info_entry = (coherent_set_info*)wmem_map_lookup(
12709 coherent_set_tracking.coherent_set_registry_map,
12710 &coherent_set_info_key);
12711 if (coherent_set_info_entry) {
12712 /* The coherence set is completely set up */
12713 coherent_set_info_entry->is_set = true1;
12714 /* Updating by last time the writer_seq_number */
12715 coherent_set_info_entry->writer_seq_number = coherent_set_entity_info_object->writer_seq_number;
12716 }
12717 }
12718 }
12719 break;
12720 }
12721 /* This parameter serializes a long (4-byte integer) and only applies to an end coherent set sample */
12722 /* 0...2...........7...............15.............23...............31
12723 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
12724 * | MIG..._SET_SAMPLE_COUNT | length |
12725 * +---------------+---------------+---------------+---------------+
12726 * + sampleCount +
12727 * +---------------+---------------+---------------+---------------+
12728 */
12729 case MIG_RTPS_PID_END_COHERENT_SET_SAMPLE_COUNT(0x8024): {
12730 uint32_t sample_count = tvb_get_uint32(tvb, offset, encoding);
12731
12732 proto_tree_add_uint(
12733 rtps_parameter_tree,
12734 hf_rtps_param_mig_end_coherent_set_sample_count,
12735 tvb, offset,
12736 sizeof(uint32_t),
12737 sample_count);
12738 break;
12739 }
12740
12741 /* 0...2...........7...............15.............23...............31
12742 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
12743 * | PID_DEFAULT_MULTICAST_LOCATOR | 0x0018 |
12744 * +---------------+---------------+---------------+---------------+
12745 * | long kind |
12746 * +---------------+---------------+---------------+---------------+
12747 * | long port |
12748 * +---------------+---------------+---------------+---------------+
12749 * | ipv6addr[0] | ipv6addr[1] | ipv6addr[2] | ipv6addr[3] |
12750 * +---------------+---------------+---------------+---------------+
12751 * | ipv6addr[4] | ipv6addr[5] | ipv6addr[6] | ipv6addr[7] |
12752 * +---------------+---------------+---------------+---------------+
12753 * | ipv6addr[8] | ipv6addr[9] | ipv6addr[10] | ipv6addr[11] |
12754 * +---------------+---------------+---------------+---------------+
12755 * | ipv6addr[12] | ipv6addr[13] | ipv6addr[14] | ipv6addr[15] |
12756 * +---------------+---------------+---------------+---------------+
12757 */
12758 case PID_DEFAULT_MULTICAST_LOCATOR(0x0048): {
12759 ENSURE_LENGTH(24);
12760 rtps_util_add_locator_t(rtps_parameter_tree, pinfo, tvb, offset, encoding, "locator");
12761 break;
12762 }
12763
12764 case PID_TYPE_INFORMATION(0x0075): {
12765 rtps_util_add_typeinformation(rtps_parameter_tree, pinfo, tvb, offset);
12766 break;
12767 }
12768
12769 default:
12770 return false0;
12771 } /* End of switch(parameter) */
12772
12773 return true1;
12774}
12775#undef ENSURE_LENGTH
12776
12777static int dissect_parameter_sequence(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
12778 int offset, const unsigned encoding, unsigned size, const char *label,
12779 uint16_t version, uint32_t *pStatusInfo, uint16_t vendor_id,
12780 bool_Bool is_inline_qos, coherent_set_entity_info *coherent_set_entity_info_object) {
12781
12782 proto_item *ti, *param_item, *param_len_item = NULL((void*)0);
12783 proto_tree *rtps_parameter_sequence_tree, *rtps_parameter_tree;
12784 uint32_t parameter, param_length, param_length_length = 2;
12785 int original_offset = offset, initial_offset = offset;
12786 type_mapping * type_mapping_object = NULL((void*)0);
12787 const char * param_name = NULL((void*)0);
12788 if (!pinfo->fd->visited) {
12789 /*
12790 * At minimum, type_mapping_object->fields_visited must be
12791 * initialized to 0, because we haven't visited any fields
12792 * yet. The routines that visit fields just set individual
12793 * bits in type_mapping_object->fields_visited; they don't
12794 * initialize it.
12795 */
12796 type_mapping_object = wmem_new(wmem_file_scope(), type_mapping)((type_mapping*)wmem_alloc((wmem_file_scope()), sizeof(type_mapping
)))
;
12797 type_mapping_object->fields_visited = 0;
12798 type_mapping_object->guid.fields_present = 0;
12799 }
12800
12801 rtps_parameter_sequence_tree = proto_tree_add_subtree_format(tree, tvb, offset, size,
12802 ett_rtps_parameter_sequence, &ti, "%s:", label);
12803
12804 /* Loop through all the parameters defined until PID_SENTINEL is found */
12805 for (;;) {
12806 size -= offset - original_offset;
12807 if (size < 4) {
12808 expert_add_info_format(pinfo, (param_len_item == NULL((void*)0)) ? ti : param_len_item,
12809 &ei_rtps_parameter_value_invalid, "ERROR: not enough bytes to read the next parameter");
12810 return offset + size;
12811 }
12812 original_offset = offset;
12813
12814 /* Reads parameter and create the sub tree. At this point we don't know
12815 * the final string that will identify the node or its length. It will
12816 * be set later...
12817 */
12818 parameter = tvb_get_uint16(tvb, offset, encoding);
12819 param_length = tvb_get_uint16(tvb, offset+2, encoding);
12820 if ((parameter & PID_EXTENDED(0x3f01)) == PID_EXTENDED(0x3f01)) {
12821 offset += 4;
12822 /* get extended member id and length */
12823 parameter = tvb_get_uint32(tvb, offset, encoding);
12824 param_length = tvb_get_uint32(tvb, offset+4, encoding);
12825 param_length_length = 4;
12826 }
12827 if (version < 0x0200) {
12828 rtps_parameter_tree = proto_tree_add_subtree(rtps_parameter_sequence_tree, tvb, offset, -1,
12829 ett_rtps_parameter, &param_item, val_to_str(pinfo->pool, parameter, parameter_id_vals, "Unknown (0x%04x)"));
12830
12831 proto_tree_add_uint(rtps_parameter_tree, hf_rtps_parameter_id, tvb, offset, 2, parameter);
12832 } else {
12833 bool_Bool goto_default = true1;
12834 switch(vendor_id) {
12835 case RTPS_VENDOR_RTI_DDS(0x0101):
12836 case RTPS_VENDOR_RTI_DDS_MICRO(0x010A): {
12837 if (is_inline_qos) {
12838 param_name = try_val_to_str(parameter, parameter_id_inline_qos_rti);
12839 if (param_name != NULL((void*)0)) {
12840 rtps_parameter_tree = proto_tree_add_subtree(rtps_parameter_sequence_tree, tvb, offset, -1,
12841 ett_rtps_parameter, &param_item, val_to_str(pinfo->pool, parameter, parameter_id_inline_qos_rti, "Unknown (0x%04x)"));
12842 proto_tree_add_uint(rtps_parameter_tree, hf_rtps_parameter_id_inline_rti, tvb, offset,
12843 param_length_length, parameter);
12844 goto_default = false0;
12845 }
12846 } else {
12847 param_name = try_val_to_str(parameter, parameter_id_rti_vals);
12848 if (param_name != NULL((void*)0)) {
12849 rtps_parameter_tree = proto_tree_add_subtree(rtps_parameter_sequence_tree, tvb, offset, -1,
12850 ett_rtps_parameter, &param_item, val_to_str(pinfo->pool, parameter, parameter_id_rti_vals, "Unknown (0x%04x)"));
12851 proto_tree_add_uint(rtps_parameter_tree, hf_rtps_parameter_id_rti, tvb, offset,
12852 param_length_length, parameter);
12853 goto_default = false0;
12854 }
12855 }
12856 break;
12857 }
12858 case RTPS_VENDOR_TOC(0x0106): {
12859 param_name = try_val_to_str(parameter, parameter_id_toc_vals);
12860 if (param_name != NULL((void*)0)) {
12861 rtps_parameter_tree = proto_tree_add_subtree(rtps_parameter_sequence_tree, tvb, offset, -1,
12862 ett_rtps_parameter, &param_item, val_to_str(pinfo->pool, parameter, parameter_id_toc_vals, "Unknown (0x%04x)"));
12863
12864 proto_tree_add_uint(rtps_parameter_tree, hf_rtps_parameter_id_toc, tvb, offset,
12865 param_length_length, parameter);
12866 goto_default = false0;
12867 }
12868 break;
12869 }
12870 case RTPS_VENDOR_ADL_DDS(0x0102): {
12871 param_name = try_val_to_str(parameter, parameter_id_adl_vals);
12872 if (param_name != NULL((void*)0)) {
12873 rtps_parameter_tree = proto_tree_add_subtree(rtps_parameter_sequence_tree, tvb, offset, -1,
12874 ett_rtps_parameter, &param_item, val_to_str(pinfo->pool, parameter, parameter_id_adl_vals, "Unknown (0x%04x)"));
12875
12876 proto_tree_add_uint(rtps_parameter_tree, hf_rtps_parameter_id_adl, tvb, offset,
12877 param_length_length, parameter);
12878 goto_default = false0;
12879 }
12880 break;
12881 }
12882 }
12883 if (goto_default) {
12884 rtps_parameter_tree = proto_tree_add_subtree(rtps_parameter_sequence_tree, tvb, offset, -1,
12885 ett_rtps_parameter, &param_item, val_to_str(pinfo->pool, parameter, parameter_id_v2_vals, "Unknown (0x%04x)"));
12886 proto_tree_add_uint(rtps_parameter_tree, hf_rtps_parameter_id_v2, tvb, offset,
12887 param_length_length, parameter);
12888 }
12889
12890 }
12891 /* after param_id */
12892 offset += param_length_length;
12893
12894 if (parameter == PID_SENTINEL(0x01)) {
12895 /* PID_SENTINEL closes the parameter list, (length is ignored) */
12896 proto_item_set_len(param_item, 4);
12897 offset += 2;
12898 proto_item_set_len(rtps_parameter_sequence_tree, offset - initial_offset);
12899 return offset;
12900 }
12901
12902 /* parameter length */
12903 param_len_item = proto_tree_add_item(rtps_parameter_tree, hf_rtps_parameter_length,
12904 tvb, offset, param_length_length, encoding);
12905 offset += param_length_length;
12906
12907 /* Make sure we have enough bytes for the param value */
12908 if ((size-4 < param_length) &&
12909 (parameter != PID_SENTINEL(0x01))) {
12910 expert_add_info_format(pinfo, param_len_item, &ei_rtps_parameter_value_invalid, "Not enough bytes to read the parameter value");
12911 return offset + size;
12912 }
12913
12914 /* Sets the end of this item (now we know it!) */
12915 proto_item_set_len(param_item, param_length+2*param_length_length);
12916
12917 /* This way, we can include vendor specific dissections without modifying the main ones */
12918
12919 if (!dissect_parameter_sequence_v1(rtps_parameter_tree, pinfo, tvb, param_item, param_len_item,
12920 offset, encoding, size, param_length, parameter, version, type_mapping_object, coherent_set_entity_info_object)) {
12921 if ((version < 0x0200) ||
12922 !dissect_parameter_sequence_v2(rtps_parameter_tree, pinfo, tvb, param_item, param_len_item,
12923 offset, encoding, param_length, parameter,
12924 pStatusInfo, vendor_id, type_mapping_object, coherent_set_entity_info_object)) {
12925 if (param_length > 0) {
12926 proto_tree_add_item(rtps_parameter_tree, hf_rtps_parameter_data, tvb,
12927 offset, param_length, ENC_NA0x00000000);
12928 }
12929 }
12930 }
12931
12932 switch (vendor_id) {
12933 case RTPS_VENDOR_RTI_DDS(0x0101):
12934 case RTPS_VENDOR_RTI_DDS_MICRO(0x010A): {
12935 dissect_parameter_sequence_rti_dds(rtps_parameter_tree, pinfo, tvb,
12936 param_item, param_len_item, offset, encoding, param_length, parameter, type_mapping_object, is_inline_qos, vendor_id);
12937 break;
12938 }
12939 case RTPS_VENDOR_TOC(0x0106): {
12940 dissect_parameter_sequence_toc(rtps_parameter_tree, pinfo, tvb,
12941 param_item, param_len_item, offset, encoding, param_length, parameter);
12942 break;
12943 }
12944 case RTPS_VENDOR_ADL_DDS(0x0102): {
12945 dissect_parameter_sequence_adl(rtps_parameter_tree, pinfo, tvb,
12946 param_item, param_len_item, offset, encoding, param_length, parameter);
12947 break;
12948 }
12949 default:
12950 break;
12951 }
12952
12953 rtps_util_insert_type_mapping_in_registry(pinfo, type_mapping_object);
12954 offset += param_length;
12955 }
12956 return offset;
12957}
12958
12959static bool_Bool rtps_is_ping(tvbuff_t *tvb, packet_info *pinfo, int offset)
12960{
12961 bool_Bool is_ping = false0;
12962
12963 if (!tvb_strneql(tvb, offset, "NDDSPING", 8))
12964 is_ping = true1;
12965
12966 if (is_ping)
12967 col_set_str(pinfo->cinfo, COL_INFO, "PING");
12968
12969 return is_ping;
12970}
12971
12972/* *********************************************************************** */
12973/* * A P P_ A C K_ C O N F * */
12974/* *********************************************************************** */
12975static void dissect_APP_ACK_CONF(tvbuff_t *tvb,
12976 packet_info *pinfo _U___attribute__((unused)),
12977 int offset,
12978 uint8_t flags,
12979 const unsigned encoding,
12980 int octets_to_next_header,
12981 proto_tree *tree,
12982 proto_item *item,
12983 endpoint_guid * guid)
12984 {
12985 /*
12986 * 0...2...........7...............15.............23...............31
12987 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
12988 * | APP_ACK_CONF |X|X|X|X|X|X|X|E| octetsToNextHeader |
12989 * +---------------+---------------+---------------+---------------+
12990 * | EntityId readerEntityId |
12991 * +---------------+---------------+---------------+---------------+
12992 * | EntityId writerEntityId |
12993 * +---------------+---------------+---------------+---------------+
12994 * + unsigned long virtualWriterCount +
12995 * +---------------+---------------+---------------+---------------+
12996 * | GuidPrefix virtualWriterGuidPrefix |
12997 * +---------------+---------------+---------------+---------------+
12998 * EntityId virtualWriterObjectId
12999 *
13000 * (after last interval) unsigned long virtualWriterEpoch
13001 *
13002 */
13003 int original_offset; /* Offset to the readerEntityId */
13004 int32_t virtual_writer_count;
13005 uint32_t wid;
13006 proto_item *octet_item;
13007 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, APP_ACK_CONF_FLAGS, flags);
13008
13009 octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb, offset + 2, 2, encoding);
13010 offset += 4;
13011 original_offset = offset;
13012
13013 if (octets_to_next_header < 20) {
13014 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", 20);
13015 return;
13016 }
13017
13018 /* readerEntityId */
13019 rtps_util_add_entity_id(tree,
13020 pinfo, tvb,
13021 offset,
13022 hf_rtps_sm_rdentity_id,
13023 hf_rtps_sm_rdentity_id_key,
13024 hf_rtps_sm_rdentity_id_kind,
13025 ett_rtps_rdentity,
13026 "readerEntityId",
13027 NULL((void*)0));
13028 offset += 4;
13029
13030 /* writerEntityId */
13031 rtps_util_add_entity_id(tree,
13032 pinfo, tvb,
13033 offset,
13034 hf_rtps_sm_wrentity_id,
13035 hf_rtps_sm_wrentity_id_key,
13036 hf_rtps_sm_wrentity_id_kind,
13037 ett_rtps_wrentity,
13038 "writerEntityId",
13039 &wid);
13040 offset += 4;
13041 guid->entity_id = wid;
13042 guid->fields_present |= GUID_HAS_ENTITY_ID0x00000008;
13043 rtps_util_add_topic_info(tree, pinfo, tvb, offset, guid);
13044
13045 /* virtualWriterCount */
13046 proto_tree_add_item_ret_uint(tree, hf_rtps_param_app_ack_conf_virtual_writer_count, tvb, offset, 4,
13047 encoding, &virtual_writer_count);
13048 offset += 4;
13049
13050 {
13051 /* Deserialize Virtual Writers */
13052 proto_tree *sil_tree_writer_list;
13053 proto_tree *sil_tree_writer;
13054
13055 int32_t current_writer_index = 0;
13056
13057 /** Writer list **/
13058
13059 sil_tree_writer_list = proto_tree_add_subtree_format(tree, tvb, offset, -1,
13060 ett_rtps_app_ack_virtual_writer_list, NULL((void*)0), "Virtual Writer List");
13061
13062 current_writer_index = 0;
13063
13064 while (current_writer_index < virtual_writer_count) {
13065 sil_tree_writer = proto_tree_add_subtree_format(sil_tree_writer_list, tvb, offset, -1,
13066 ett_rtps_app_ack_virtual_writer, NULL((void*)0), "virtualWriter[%d]", current_writer_index);
13067
13068 /* Virtual Writer Guid */
13069 rtps_util_add_guid_prefix_v2(sil_tree_writer, tvb, offset,
13070 hf_rtps_sm_guid_prefix, hf_rtps_sm_host_id, hf_rtps_sm_app_id,
13071 hf_rtps_sm_instance_id, 0);
13072
13073 rtps_util_add_entity_id(sil_tree_writer, pinfo, tvb, offset+12,
13074 hf_rtps_sm_entity_id, hf_rtps_sm_entity_id_key, hf_rtps_sm_entity_id_kind,
13075 ett_rtps_entity, "virtualGUIDSuffix", NULL((void*)0));
13076
13077 offset += 16;
13078
13079 /* Counter */
13080 proto_tree_add_item(tree, hf_rtps_param_app_ack_conf_count, tvb, offset, 4, encoding);
13081 offset += 4;
13082
13083 current_writer_index++;
13084
13085 } /* virtual_writer_count */
13086 }
13087
13088
13089 if (offset < original_offset + octets_to_next_header)
13090 {
13091 /* In this case there must be something wrong in the bitmap: there
13092 * are some extra bytes that we don't know how to decode
13093 */
13094 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);
13095 }
13096 else if (offset > original_offset + octets_to_next_header)
13097 {
13098 /* Decoding the bitmap went over the end of this submessage.
13099 * Enter an item in the protocol tree that spans over the entire
13100 * submessage.
13101 */
13102 expert_add_info(pinfo, item, &ei_rtps_missing_bytes);
13103 }
13104}
13105
13106static void dissect_parameterized_serialized_data(proto_tree *tree, tvbuff_t *tvb,
13107 int offset_input, int size, const unsigned encoding)
13108{
13109 proto_item* ti;
13110 proto_tree* member_tree;
13111 int offset = offset_input;
13112 int deserialized_size = 0;
13113 proto_tree* data_tree = proto_tree_add_subtree_format(tree, tvb, offset, -1,
13114 ett_rtps_serialized_data, &ti, "serializedData");
13115 while (deserialized_size < size) {
13116 /* PL_CDR/ParameterList style fields are 4-byte aligned relative to the
13117 * encapsulation start. */
13118 ALIGN_ZERO(offset, 4, offset_input)(offset -= offset_input, offset = (((offset) + ((4) - 1)) &
~((4) - 1)), offset += offset_input)
;
13119
13120 /* Read the 4-byte short header candidate */
13121 uint32_t member_id = tvb_get_uint16(tvb, offset, encoding);
13122 uint32_t member_length = tvb_get_uint16(tvb, offset + 2, encoding);
13123
13124 if ((member_id & PID_EXTENDED(0x3f01)) == PID_EXTENDED(0x3f01)) {
13125 /* Extended 12-byte header:
13126 * [0..1]: PID_EXTENDED
13127 * [2..3]: length of extended payload in bytes (should be 8 for [ext_id(4) + ext_len(4)])
13128 * [4..7]: extended member id (uint32)
13129 * [8..11]: extended member length (uint32)
13130 */
13131 member_id = tvb_get_uint32(tvb, offset+4, encoding);
13132 member_length = tvb_get_uint32(tvb, offset+8, encoding);
13133 member_tree = proto_tree_add_subtree_format(data_tree, tvb, offset, member_length + 12,
13134 ett_rtps_data_member, NULL((void*)0), "Member (id = %u, len = %u)", member_id, member_length);
13135 proto_tree_add_item(member_tree, hf_rtps_pl_cdr_member_id_ext, tvb, offset+4, 4, encoding);
13136 proto_tree_add_item(member_tree, hf_rtps_pl_cdr_member_length_ext, tvb, offset+8, 4, encoding);
13137 offset += 12;
13138 deserialized_size += 12;
13139 } else if ((member_id & PID_LIST_END(0x3f02)) == PID_LIST_END(0x3f02)){
13140 /* If this is the end of the list, don't add a tree.
13141 * If we add more logic here in the future, take into account that
13142 * offset is incremented by 4 */
13143 deserialized_size += 4;
13144 break;
13145 } else {
13146 member_tree = proto_tree_add_subtree_format(data_tree, tvb, offset, member_length + 4,
13147 ett_rtps_data_member, NULL((void*)0), "Member (id = %u, len = %u)", member_id, member_length);
13148 proto_tree_add_item(member_tree, hf_rtps_pl_cdr_member_id, tvb, offset, 2, encoding);
13149 proto_tree_add_item(member_tree, hf_rtps_pl_cdr_member_length, tvb, offset+2, 2, encoding);
13150 offset += 4;
13151 deserialized_size += 4;
13152 }
13153
13154 proto_tree_add_item(member_tree, hf_rtps_pl_cdr_member, tvb, offset,
13155 member_length, encoding);
13156 offset = check_offset_addition(offset, member_length, tree, NULL((void*)0), tvb);
13157 deserialized_size += member_length;
13158 }
13159 proto_item_set_len(ti, deserialized_size);
13160}
13161
13162/************************************************************************ */
13163/* Encapsulated data * */
13164/* ********************************************************************** */
13165/*
13166 * Note: the encapsulation header is ALWAYS big endian, then the encapsulation
13167 * type specified the type of endianness of the payload.
13168 * 0...2...........8...............16..............24..............32
13169 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
13170 *| representation_identifier | X X X X X X X X X X X | C C C P P |
13171 *+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
13172 *~ ~
13173 * ~... Bytes of data representation using a format that ... ~
13174 * ~... depends on the RepresentationIdentifier and options ... ~
13175 * ~ ~
13176 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
13177 *
13178 * X = Unused options bits
13179 * C = Compression bits
13180 * P = Padding bits
13181 *
13182 * If compressed:
13183 * 0...2...........8...............16..............24..............32
13184 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
13185 * | representation_identifier | X X X X X X X X X X X | C C C P P |
13186 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
13187 * ~ Uncompressed Length ~
13188 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
13189 * ~ *Extended Compression Options ~
13190 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
13191 * ~ Compressed User Data ... ~
13192 * ~ ~
13193 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
13194 *
13195 * C = 0b111 would be extended compression options which would come in as an
13196 * additional header before the payload.
13197 * C = 0b000 to indicate no compression
13198 *
13199 * This options field would be used for future enhancements.For example,
13200 * could be used to define a custom compressor plugin for matching purposes.
13201 */
13202
13203 /* Dissects the encapsultaion header and uncompress the serialized
13204 * data if is is compressed and it is compressed in using Zlib.
13205 *
13206 * @param[in] tree
13207 * @param[in] packet info.
13208 * @param[in] tvb
13209 * @param[in] offset offset at the beginning of the encapsulation id.
13210 * @param[in] size in bytes from the initial offset to the end of the serialized data
13211 * @param[in] uncompress_if_compressed true for uncompressing if the data should be uncompressed.
13212 * @param[out] encapsulation_id_out If not null it will contain the encapsultaion_id
13213 * @param[out] compression_option_out If not null it will contain the compression option
13214 * @param[out] padding_bytes_out If not null it will contain the padding bytes
13215 * @param[out] extended_compression_options_out If not null it will contain the extended compression options
13216 * @param[out] extended_header_bits_out If not null it will contain the extended header bits
13217 * @param[out] is_compressed_out If not null it will indicate if the serielized data is compressed
13218 * @param[out] uncompressed_ok_out If not null it will indicate if the serizlized data has been successfully uncompressed
13219 * @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.
13220 * @param[out] compressed_data_tree_out If not null it will contain the subtree of the uncompressed data.
13221 *
13222 * @return the offset after the at the beginining of the serialized data
13223 * @note All output parameters are optional.
13224 */
13225static
13226int rtps_prepare_encapsulated_data(
13227 proto_tree *tree,
13228 packet_info *pinfo,
13229 tvbuff_t *tvb,
13230 int offset,
13231 int size,
13232 bool_Bool uncompress_if_compressed,
13233 uint16_t *encapsulation_id_out,
13234 uint8_t *compression_option_out,
13235 uint8_t *padding_bytes_out,
13236 uint32_t *extended_compression_options_out,
13237 uint8_t *extended_header_bits_out,
13238 bool_Bool *is_compressed_out,
13239 bool_Bool *uncompressed_ok_out,
13240 tvbuff_t **uncompressed_tvb_out,
13241 proto_tree **compressed_data_tree_out) {
13242 int initial_offset = offset;
13243 int16_t encapsulation_options = 0;
13244 uint32_t compressed_size = 0;
13245 uint32_t uncompressed_size = 0;
13246 uint16_t encapsulation_id = 0;
13247 uint8_t compression_option = 0;
13248 uint8_t padding_bytes = 0;
13249 uint32_t extended_compression_options = 0;
13250 uint8_t extended_header_bits = 0;
13251 bool_Bool is_compressed = 0;
13252 bool_Bool uncompressed_ok = 0;
13253 tvbuff_t *uncompressed_tvb = NULL((void*)0);
13254
13255 /* This logic applies to data that is not a fragment (-1) or is the first fragment */
13256 /* Encapsulation ID */
13257 encapsulation_id = tvb_get_ntohs(tvb, offset); /* Always big endian */
13258 proto_tree_add_uint(tree,
13259 hf_rtps_param_serialize_encap_kind, tvb, offset, 2, encapsulation_id);
13260 offset += 2;
13261
13262 offset = rtps_util_dissect_encapsulation_options(
13263 tree,
13264 tvb,
13265 offset,
13266 &encapsulation_options,
13267 &compression_option,
13268 &padding_bytes,
13269 &extended_header_bits);
13270 /* If compressed on a supported format we have to uncompress it on a new tvb
13271 * and reset the offset */
13272 is_compressed = (encapsulation_options & ENCAPSULATION_OPTIONS_COMPRESSION_BYTES_MASK(0x1C)) != 0;
13273 if (is_compressed) {
13274 uncompressed_size = tvb_get_int32(tvb, offset, ENC_BIG_ENDIAN0x00000000);
13275 proto_tree_add_item(
13276 tree,
13277 hf_rtps_uncompressed_serialized_length,
13278 tvb,
13279 offset,
13280 4,
13281 ENC_BIG_ENDIAN0x00000000);
13282 offset += 4;
13283 /* Get the compression extended options if required */
13284 if (extended_header_bits == ENCAPSULATION_OPTIONS_COMPRESSION_EXTENDED_HEADER_VALUE(0x1C)) {
13285 extended_compression_options = tvb_get_int32(tvb, offset, ENC_BIG_ENDIAN0x00000000);
13286 proto_tree_add_item(
13287 tree,
13288 hf_rtps_encapsulation_extended_compression_options,
13289 tvb,
13290 offset,
13291 4,
13292 ENC_BIG_ENDIAN0x00000000);
13293 offset += 4;
13294 }
13295 /* Get the compressed size. Padding bytes are the padding at the end of the compressed data */
13296 compressed_size = size - (offset - initial_offset) - padding_bytes;
13297 }
13298
13299 /* Only decompress if it is compressed with ZLIB */
13300 if (uncompress_if_compressed && (compression_option == RTI_OSAPI_COMPRESSION_CLASS_ID_ZLIB(1))) {
13301 bool_Bool tried_to_uncompress = false0;
13302 proto_item *uncompressed_data_item = NULL((void*)0);
13303
13304 /* Try to uncompress the data */
13305 uncompressed_tvb = rtps_util_get_uncompressed_tvb_zlib(
13306 tvb,
13307 offset,
13308 compressed_size,
13309 &tried_to_uncompress);
13310 /* The uncompressed data size must be the same as it is in the "Uncompressed Length" field */
13311 uncompressed_ok = (uncompressed_tvb != NULL((void*)0)
13312 && (uncompressed_size == (uint32_t)tvb_reported_length(uncompressed_tvb)));
13313
13314 /* If uncompression went well we have a new tvb that holds the uncompressed data */
13315 if (tried_to_uncompress) {
13316 tvbuff_t *child_tvb = NULL((void*)0);
13317 int child_size = 0;
13318 int child_offset = 0;
13319
13320 /* If the tvb is not uncompressed we add use the ovb, offset and size
13321 * of the original tvb */
13322 if (uncompressed_tvb != NULL((void*)0)) {
13323 child_tvb = uncompressed_tvb;
13324 child_size = -1;
13325 child_offset = 0;
13326 } else {
13327 child_tvb = tvb;
13328 child_size = compressed_size;
13329 child_offset = offset;
13330 }
13331 /* Uncompressed sample hangs from a different subtree */
13332 *compressed_data_tree_out = proto_tree_add_subtree(
13333 tree,
13334 child_tvb,
13335 child_offset,
13336 child_size,
13337 ett_rtps_decompressed_serialized_data,
13338 &uncompressed_data_item,
13339 "[Decompressed data]");
13340 /* If we tried to decompress we need to add hf_rtps_uncompression_ok set to true or false*/
13341 if (!(uncompressed_ok)) {
13342 expert_add_info_format(
13343 pinfo,
13344 uncompressed_data_item,
13345 &ei_rtps_uncompression_error,
13346 "Error: unable to uncompress payload");
13347 }
13348 }
13349 }
13350
13351 /* Set the optional output parameters */
13352 if (encapsulation_id_out != NULL((void*)0)) {
13353 *encapsulation_id_out = encapsulation_id;
13354 }
13355 if (compression_option_out != NULL((void*)0)) {
13356 *compression_option_out = compression_option;
13357 }
13358 if (padding_bytes_out != NULL((void*)0)) {
13359 *padding_bytes_out = padding_bytes;
13360 }
13361 if (extended_compression_options_out != NULL((void*)0)) {
13362 *extended_compression_options_out = extended_compression_options;
13363 }
13364 if (extended_header_bits_out != NULL((void*)0)) {
13365 *extended_header_bits_out = extended_header_bits;
13366 }
13367 if (is_compressed_out != NULL((void*)0)) {
13368 *is_compressed_out = is_compressed;
13369 }
13370 if (uncompressed_ok_out != NULL((void*)0)) {
13371 *uncompressed_ok_out = uncompressed_ok;
13372 }
13373 if (uncompressed_tvb_out != NULL((void*)0)) {
13374 *uncompressed_tvb_out = uncompressed_tvb;
13375 }
13376 return offset;
13377}
13378
13379
13380
13381/* *********************************************************************** */
13382/* * Serialized data dissector * */
13383/* *********************************************************************** */
13384/* Note: the encapsulation header is ALWAYS big endian, then the encapsulation
13385 * type specified the type of endianness of the payload.
13386 *
13387 * Fragmentation : Options only appear on first fragment
13388 * Serieaized data might be compressed or uncompressed. Depending on that the
13389 * header contains more elements. This is indicated in the encapsulation
13390 * options where:
13391 *
13392 * X = Unused options bits
13393 * C = Compression bits
13394 * P = Padding bits
13395 *
13396 * 0...2...........8...............16..............24..............32
13397 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
13398 * | representation_identifier |X X X X X X X X X X X|C C C P P|
13399 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
13400 * ~ ~
13401 * ~ ... Bytes of data representation using a format that ... ~
13402 * ~ ... depends on the RepresentationIdentifier and options ... ~
13403 * ~ ~
13404 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
13405 *
13406 * If compressed:
13407 *
13408 * 0...2...........8...............16..............24..............32
13409 * + -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
13410 * | representation_identifier | X X X X X X X X X X X | C C C P P |
13411 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
13412 * ~ Uncompressed Length ~
13413 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
13414 * ~ *Extended Compression Options ~
13415 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
13416 * ~ Compressed User Data ... ~
13417 * ~ ~
13418 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
13419 *
13420 * C = 0b111 would be extended compression options which would come in as an
13421 * additional header before the payload.
13422 * C = 0b000 to indicate no compression
13423 *
13424 * *This options field would be used for future enhancements.For example,
13425 * could be used to define a custom compressor plugin for matching purposes.
13426 *
13427 */
13428
13429static void dissect_serialized_data(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, int offset,
13430 int size, const char *label, uint16_t vendor_id, bool_Bool is_discovery_data,
13431 endpoint_guid * guid, int32_t frag_number /* -1 if no fragmentation */) {
13432 proto_item *ti;
13433 proto_tree *rtps_parameter_sequence_tree;
13434 uint16_t encapsulation_id;
13435 bool_Bool try_dissection_from_type_object = false0;
13436 unsigned encapsulation_encoding = ENC_BIG_ENDIAN0x00000000;
13437 rtps_dissector_data * data = wmem_new(pinfo->pool, rtps_dissector_data)((rtps_dissector_data*)wmem_alloc((pinfo->pool), sizeof(rtps_dissector_data
)))
;
13438 tvbuff_t *data_holder_tvb = tvb;
13439 tvbuff_t *compressed_tvb = NULL((void*)0);
13440 proto_tree *dissected_data_holder_tree = NULL((void*)0);
13441 bool_Bool is_compressed = false0;
13442 bool_Bool uncompressed_ok = false0;
13443 proto_tree *compressed_subtree = NULL((void*)0);
13444
13445 data->encapsulation_id = 0;
13446 data->position_in_batch = -1;
13447 /* Creates the sub-tree */
13448 rtps_parameter_sequence_tree = proto_tree_add_subtree(tree, tvb, offset, size,
13449 ett_rtps_serialized_data, &ti, label);
13450
13451 /* We store this value for using later */
13452 dissected_data_holder_tree = rtps_parameter_sequence_tree;
13453
13454 if (frag_number > 1) {
13455 /* if the data is a fragment and not the first fragment, simply dissect the
13456 content as raw bytes */
13457 proto_tree_add_item(rtps_parameter_sequence_tree, hf_rtps_issue_data, tvb,
13458 offset, size, ENC_NA0x00000000);
13459 } else {
13460 /* Dissects the encapsulation header options and uncompress the tvb if it is
13461 * compressed and can be uncompressed */
13462 offset = rtps_prepare_encapsulated_data(
13463 rtps_parameter_sequence_tree,
13464 pinfo,
13465 tvb,
13466 offset,
13467 size,
13468 true1,
13469 &encapsulation_id,
13470 NULL((void*)0),
13471 NULL((void*)0),
13472 NULL((void*)0),
13473 NULL((void*)0),
13474 &is_compressed,
13475 &uncompressed_ok,
13476 &compressed_tvb,
13477 &compressed_subtree);
13478 data->encapsulation_id = encapsulation_id;
13479 if (is_compressed && uncompressed_ok) {
13480 data_holder_tvb = compressed_tvb;
13481 offset = 0;
13482 dissected_data_holder_tree = compressed_subtree;
13483 }
13484
13485 /* Sets the correct values for encapsulation_encoding */
13486 encapsulation_encoding = get_encapsulation_endianness(encapsulation_id);
13487
13488 if (encapsulation_id == ENCAPSULATION_CDR_LE(0x0001) ||
13489 encapsulation_id == ENCAPSULATION_CDR_BE(0x0000) ||
13490 encapsulation_id == ENCAPSULATION_CDR2_LE(0x0007) ||
13491 encapsulation_id == ENCAPSULATION_CDR2_BE(0x0006) ||
13492 encapsulation_id == ENCAPSULATION_PL_CDR_LE(0x0003) ||
13493 encapsulation_id == ENCAPSULATION_PL_CDR_BE(0x0002)) {
13494 try_dissection_from_type_object = true1;
13495 }
13496
13497 /* In case it is compressed only try to dissect the type object if it is correctly uncompressed */
13498 try_dissection_from_type_object = try_dissection_from_type_object
13499 && ((is_compressed == uncompressed_ok));
13500
13501 /* At this point:
13502 * - uncompressed_tvb contains the uncompressed tvb or the packet tvb
13503 * - compressed_data_tree points to the tree of the uncompressed data
13504 * or the rtps_parameter_sequence_tree.
13505 * - offset points to 0 of the uncompressed tvb or the offseet of the packet
13506 * tvb if it is not decompressed.
13507 * Only try to dissect the user data if it is not compressed or it is compressed and correctly uncompressed */
13508 if (is_compressed == uncompressed_ok) {
13509 if (rtps_util_try_dissector(dissected_data_holder_tree,
13510 pinfo, data_holder_tvb, offset, guid, data, encapsulation_encoding,
13511 get_encapsulation_version(encapsulation_id), try_dissection_from_type_object)) {
13512 return;
13513 }
13514 /* The payload */
13515 size -= 4;
13516 switch (encapsulation_id) {
13517 /* CDR_LE and CDR_BE data should be dissected like this if it is a fragment or
13518 if it is not */
13519 case ENCAPSULATION_CDR_LE(0x0001):
13520 case ENCAPSULATION_CDR_BE(0x0000):
13521 proto_tree_add_item(dissected_data_holder_tree, hf_rtps_issue_data, data_holder_tvb,
13522 offset, size, ENC_NA0x00000000);
13523 break;
13524
13525 case ENCAPSULATION_PL_CDR_LE(0x0003):
13526 case ENCAPSULATION_PL_CDR_BE(0x0002):
13527 if (is_discovery_data) {
13528 dissect_parameter_sequence(dissected_data_holder_tree, pinfo, data_holder_tvb, offset,
13529 encapsulation_encoding, size, "serializedData", 0x0200, NULL((void*)0), vendor_id, false0, NULL((void*)0));
13530 }
13531 else if (frag_number != NOT_A_FRAGMENT(-1)) {
13532 /* fragments should be dissected as raw bytes (not parameterized) */
13533 proto_tree_add_item(dissected_data_holder_tree, hf_rtps_issue_data, data_holder_tvb,
13534 offset, size, ENC_NA0x00000000);
13535 break;
13536 }
13537 else {
13538 /* Instead of showing a warning like before, we now dissect the data as
13539 * (id - length - value) members */
13540 dissect_parameterized_serialized_data(dissected_data_holder_tree,
13541 data_holder_tvb, offset, size, encapsulation_encoding);
13542 }
13543 break;
13544 case ENCAPSULATION_CDR2_LE(0x0007):
13545 if (guid != NULL((void*)0) && guid->entity_id == ENTITYID_TL_SVC_REQ_WRITER(0x000300c3)) {
13546 rtps_util_dissect_type_lookup_request(dissected_data_holder_tree,
13547 pinfo, tvb, offset, encapsulation_id);
13548 } else if (guid != NULL((void*)0) && guid->entity_id == ENTITYID_TL_SVC_REPLY_WRITER(0x000301c3)) {
13549 rtps_util_dissect_type_lookup_reply(dissected_data_holder_tree,
13550 pinfo, tvb, offset, encapsulation_id);
13551 } else {
13552 proto_tree_add_item(dissected_data_holder_tree,
13553 hf_rtps_data_serialize_data, tvb, offset, size, ENC_NA0x00000000);
13554 }
13555 break;
13556 case ENCAPSULATION_D_CDR2_LE(0x0009):
13557 if (guid != NULL((void*)0) && guid->entity_id == ENTITYID_TL_SVC_REQ_WRITER(0x000300c3)) {
13558 /*
13559 * since the request, request header, sample identity, and GUID
13560 * are appendable, there will be a dheader for each one if we are
13561 * using delimited CDR2
13562 */
13563 offset = rtps_util_add_xcdr2_delimited_header(dissected_data_holder_tree, tvb, offset);
13564 offset = rtps_util_add_xcdr2_delimited_header(dissected_data_holder_tree, tvb, offset);
13565 offset = rtps_util_add_xcdr2_delimited_header(dissected_data_holder_tree, tvb, offset);
13566 offset = rtps_util_add_xcdr2_delimited_header(dissected_data_holder_tree, tvb, offset);
13567 rtps_util_dissect_type_lookup_request(dissected_data_holder_tree,
13568 pinfo, tvb, offset, encapsulation_id);
13569 } else if (guid != NULL((void*)0) && guid->entity_id == ENTITYID_TL_SVC_REPLY_WRITER(0x000301c3)) {
13570 /*
13571 * since the reply, reply header, sample identity, and GUID
13572 * are appendable, there will be a dheader for each one if we are
13573 * using delimited CDR2
13574 */
13575 offset = rtps_util_add_xcdr2_delimited_header(dissected_data_holder_tree, tvb, offset);
13576 offset = rtps_util_add_xcdr2_delimited_header(dissected_data_holder_tree, tvb, offset);
13577 offset = rtps_util_add_xcdr2_delimited_header(dissected_data_holder_tree, tvb, offset);
13578 offset = rtps_util_add_xcdr2_delimited_header(dissected_data_holder_tree, tvb, offset);
13579 rtps_util_dissect_type_lookup_reply(dissected_data_holder_tree,
13580 pinfo, tvb, offset, encapsulation_id);
13581 } else {
13582 proto_tree_add_item(dissected_data_holder_tree,
13583 hf_rtps_data_serialize_data, tvb, offset, size, ENC_NA0x00000000);
13584 }
13585 break;
13586 default:
13587 proto_tree_add_item(dissected_data_holder_tree, hf_rtps_data_serialize_data, tvb,
13588 offset, size, ENC_NA0x00000000);
13589 }
13590 }
13591 }
13592}
13593
13594/* *********************************************************************** */
13595/* * A P P_ A C K * */
13596/* *********************************************************************** */
13597static void dissect_APP_ACK(tvbuff_t *tvb,
13598 packet_info *pinfo,
13599 int offset,
13600 uint8_t flags,
13601 const unsigned encoding,
13602 int octets_to_next_header,
13603 proto_tree *tree,
13604 proto_item *item,
13605 endpoint_guid * guid)
13606 {
13607 /*
13608 * 0...2...........7...............15.............23...............31
13609 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
13610 * | APP_ACK |X|X|X|X|X|X|X|E| octetsToNextHeader |
13611 * +---------------+---------------+---------------+---------------+
13612 * | EntityId readerEntityId |
13613 * +---------------+---------------+---------------+---------------+
13614 * | EntityId writerEntityId |
13615 * +---------------+---------------+---------------+---------------+
13616 * + unsigned long virtualWriterCount +
13617 * +---------------+---------------+---------------+---------------+
13618 * | GuidPrefix virtualWriterGuidPrefix |
13619 * +---------------+---------------+---------------+---------------+
13620 * EntityId virtualWriterObjectId
13621 * unsigned short intervalCount | unsigned short bytesToNextVirtualWriter
13622 *
13623 * SequenceNumber intervalFirstSn
13624 * SequenceNumber intervalLastSn
13625 * unsigned short intervalFlags | unsigned short payloadLength
13626 *
13627 * (after last interval) unsigned long virtualWriterEpoch
13628 *
13629 */
13630 int original_offset; /* Offset to the readerEntityId */
13631 int32_t virtual_writer_count;
13632 uint32_t wid; /* Writer EntityID */
13633 proto_item *octet_item;
13634 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, APP_ACK_FLAGS, flags);
13635
13636 octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb,
13637 offset + 2, 2, encoding);
13638
13639 if (octets_to_next_header < 56) {
13640 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", 56);
13641 return;
13642 }
13643
13644 offset += 4;
13645 original_offset = offset;
13646
13647 /* readerEntityId */
13648 rtps_util_add_entity_id(tree,
13649 pinfo, tvb,
13650 offset,
13651 hf_rtps_sm_rdentity_id,
13652 hf_rtps_sm_rdentity_id_key,
13653 hf_rtps_sm_rdentity_id_kind,
13654 ett_rtps_rdentity,
13655 "readerEntityId",
13656 &wid);
13657 offset += 4;
13658 guid->entity_id = wid;
13659 rtps_util_add_topic_info(tree, pinfo, tvb, offset, guid);
13660
13661 /* writerEntityId */
13662 rtps_util_add_entity_id(tree,
13663 pinfo, tvb,
13664 offset,
13665 hf_rtps_sm_wrentity_id,
13666 hf_rtps_sm_wrentity_id_key,
13667 hf_rtps_sm_wrentity_id_kind,
13668 ett_rtps_wrentity,
13669 "writerEntityId",
13670 &wid);
13671 offset += 4;
13672
13673 /* virtualWriterCount */
13674 proto_tree_add_item_ret_int(tree, hf_rtps_param_app_ack_virtual_writer_count, tvb, offset, 4, encoding, &virtual_writer_count);
13675 offset += 4;
13676
13677
13678 {
13679 /* Deserialize Virtual Writers */
13680 proto_tree *sil_tree_writer_list;
13681
13682 int32_t current_writer_index;
13683 int32_t current_interval_count;
13684 /* uint16_t interval_flags = 0; */
13685 /* uint32_t current_virtual_guid_index = 0;*/
13686
13687 /** Writer list **/
13688 sil_tree_writer_list = proto_tree_add_subtree_format(tree, tvb, offset, -1,
13689 ett_rtps_app_ack_virtual_writer_list, NULL((void*)0), "Virtual Writer List");
13690
13691 current_writer_index = 0;
13692
13693 while (current_writer_index < virtual_writer_count) {
13694 proto_tree *sil_tree_writer;
13695 proto_tree *sil_tree_interval_list;
13696 int32_t interval_count;
13697
13698 sil_tree_writer = proto_tree_add_subtree_format(sil_tree_writer_list, tvb, offset, -1,
13699 ett_rtps_app_ack_virtual_writer, NULL((void*)0), "virtualWriter[%d]", current_writer_index);
13700
13701 /* Virtual Writer Guid */
13702#if 0
13703 rtps_util_add_generic_guid(sil_tree_writer,
13704 tvb,
13705 offset,
13706 "virtualGUID",
13707 buffer,
13708 MAX_GUID_SIZE(160));
13709#endif
13710 offset += 16;
13711
13712
13713 /* Interval count */
13714 proto_tree_add_item_ret_int(sil_tree_writer, hf_rtps_param_app_ack_interval_count,
13715 tvb, offset, 2, encoding, &interval_count);
13716 offset += 2;
13717
13718 /* bytes to next virtual writer */
13719 proto_tree_add_item(sil_tree_writer, hf_rtps_param_app_ack_octets_to_next_virtual_writer,
13720 tvb, offset, 2, encoding);
13721 offset += 2;
13722
13723 /* Interval list */
13724 sil_tree_interval_list = proto_tree_add_subtree_format(sil_tree_writer, tvb, offset, -1,
13725 ett_rtps_app_ack_virtual_writer_interval_list, NULL((void*)0), "Interval List");
13726
13727 current_interval_count = 0;
13728 while (current_interval_count < interval_count) {
13729 proto_tree *sil_tree_interval;
13730 int32_t interval_payload_length;
13731
13732 sil_tree_interval = proto_tree_add_subtree_format(sil_tree_interval_list, tvb, offset, -1,
13733 ett_rtps_app_ack_virtual_writer_interval, NULL((void*)0), "Interval[%d]", current_interval_count);
13734
13735 /* firstVirtualSN */
13736 rtps_util_add_seq_number(sil_tree_interval,
13737 tvb,
13738 offset,
13739 encoding,
13740 "firstVirtualSN");
13741 offset += 8;
13742
13743 /* lastVirtualSN */
13744 rtps_util_add_seq_number(sil_tree_interval,
13745 tvb,
13746 offset,
13747 encoding,
13748 "lastVirtualSN");
13749 offset += 8;
13750
13751 /* interval flags */
13752 proto_tree_add_item(sil_tree_interval, hf_rtps_param_app_ack_interval_flags,
13753 tvb, offset, 2, encoding);
13754 offset += 2;
13755
13756 /* interval payload length */
13757 proto_tree_add_item_ret_int(sil_tree_interval, hf_rtps_param_app_ack_interval_payload_length,
13758 tvb, offset, 2, encoding, &interval_payload_length);
13759 offset += 2;
13760
13761 if (interval_payload_length > 0) {
13762 proto_tree_add_item(sil_tree_interval, hf_rtps_serialized_data, tvb, offset,
13763 interval_payload_length, ENC_NA0x00000000);
13764 offset += ((interval_payload_length + 3) & 0xfffffffc);
13765 }
13766
13767 ++current_interval_count;
13768
13769 } /* interval list */
13770
13771 /* Count */
13772 proto_tree_add_item(tree, hf_rtps_param_app_ack_count, tvb, offset, 4, encoding);
13773 offset += 4;
13774
13775 current_writer_index++;
13776
13777 } /* virtual_writer_count */
13778 }
13779
13780
13781 if (offset < original_offset + octets_to_next_header)
13782 {
13783 /* In this case there must be something wrong in the bitmap: there
13784 * are some extra bytes that we don't know how to decode
13785 */
13786 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);
13787 }
13788 else if (offset > original_offset + octets_to_next_header)
13789 {
13790 /* Decoding the bitmap went over the end of this submessage.
13791 * Enter an item in the protocol tree that spans over the entire
13792 * submessage.
13793 */
13794 expert_add_info(pinfo, item, &ei_rtps_missing_bytes);
13795 }
13796}
13797
13798/* *********************************************************************** */
13799/* * P A D * */
13800/* *********************************************************************** */
13801static void dissect_PAD(tvbuff_t *tvb,
13802 packet_info *pinfo,
13803 int offset,
13804 uint8_t flags,
13805 const unsigned encoding,
13806 int octets_to_next_header,
13807 proto_tree *tree) {
13808 /* 0...2...........7...............15.............23...............31
13809 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
13810 * | PAD |X|X|X|X|X|X|X|E| octetsToNextHeader |
13811 * +---------------+---------------+---------------+---------------+
13812 */
13813 proto_item *item;
13814
13815 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, PAD_FLAGS, flags);
13816
13817 item = proto_tree_add_item(tree,
13818 hf_rtps_sm_octets_to_next_header,
13819 tvb,
13820 offset + 2,
13821 2,
13822 encoding);
13823 if (octets_to_next_header != 0) {
13824 expert_add_info(pinfo, item, &ei_rtps_sm_octets_to_next_header_not_zero);
13825 }
13826}
13827
13828
13829
13830
13831
13832/* *********************************************************************** */
13833/* * D A T A * */
13834/* *********************************************************************** */
13835static void dissect_DATA_v1(tvbuff_t *tvb, packet_info *pinfo, int offset, uint8_t flags,
13836 const unsigned encoding, int octets_to_next_header, proto_tree *tree) {
13837 /* RTPS 1.0/1.1:
13838 * 0...2...........7...............15.............23...............31
13839 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
13840 * | DATA |X|X|X|U|H|A|P|E| octetsToNextHeader |
13841 * +---------------+---------------+---------------+---------------+
13842 * | ObjectId readerObjectId |
13843 * +---------------+---------------+---------------+---------------+
13844 * | ObjectId writerObjectId |
13845 * +---------------+---------------+---------------+---------------+
13846 * | HostId hostId (iff H==1) |
13847 * +---------------+---------------+---------------+---------------+
13848 * | AppId appId (iff H==1) |
13849 * +---------------+---------------+---------------+---------------+
13850 * | ObjectId objectId |
13851 * +---------------+---------------+---------------+---------------+
13852 * | |
13853 * + SequenceNumber writerSeqNumber +
13854 * | |
13855 * +---------------+---------------+---------------+---------------+
13856 * | |
13857 * ~ ParameterSequence parameters [only if P==1] ~
13858 * | |
13859 * +---------------+---------------+---------------+---------------+
13860 * Note: on RTPS 1.0, flag U is not present
13861 *
13862 * RTPS 1.2:
13863 * 0...2...........7...............15.............23...............31
13864 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
13865 * | DATA |X|X|U|Q|H|A|D|E| octetsToNextHeader |
13866 * +---------------+---------------+---------------+---------------+
13867 * | EntityId readerEntityId |
13868 * +---------------+---------------+---------------+---------------+
13869 * | EntityId writerEntityId |
13870 * +---------------+---------------+---------------+---------------+
13871 * | |
13872 * + KeyHashPrefix keyHashPrefix [only if H==1] +
13873 * | |
13874 * +---------------+---------------+---------------+---------------+
13875 * | KeyHashSuffix keyHashSuffix |
13876 * +---------------+---------------+---------------+---------------+
13877 * | |
13878 * + SequenceNumber writerSeqNum +
13879 * | |
13880 * +---------------+---------------+---------------+---------------+
13881 * | |
13882 * ~ ParameterList inlineQos [only if Q==1] ~
13883 * | |
13884 * +---------------+---------------+---------------+---------------+
13885 * | |
13886 * ~ SerializedData serializedData [only if D==1] ~
13887 * | |
13888 * +---------------+---------------+---------------+---------------+
13889 * Notes:
13890 * - inlineQos is NEW
13891 * - serializedData is equivalent to the old 'parameters'
13892 */
13893 int min_len;
13894 bool_Bool is_builtin_entity = false0; /* true=entityId.entityKind = built-in */
13895 int old_offset = offset;
13896 uint32_t wid; /* Writer EntityID */
13897 proto_item *octet_item;
13898
13899 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, DATA_FLAGSv1, flags);
13900
13901 octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb,
13902 offset + 2, 2, encoding);
13903
13904 /* Calculates the minimum length for this submessage */
13905 min_len = 20;
13906 if ((flags & FLAG_DATA_H(0x08)) != 0) min_len += 8;
13907 if ((flags & FLAG_DATA_Q(0x10)) != 0) min_len += 4;
13908 if ((flags & FLAG_DATA_D(0x02)) != 0) min_len += 4;
13909
13910 if (octets_to_next_header < min_len) {
13911 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", min_len);
13912 return;
13913 }
13914
13915 offset += 4;
13916
13917 /* readerEntityId */
13918 is_builtin_entity |= rtps_util_add_entity_id(tree, pinfo, tvb, offset,
13919 hf_rtps_sm_rdentity_id, hf_rtps_sm_rdentity_id_key, hf_rtps_sm_rdentity_id_kind,
13920 ett_rtps_rdentity, "readerEntityId", NULL((void*)0));
13921 offset += 4;
13922
13923 /* writerEntityId */
13924 is_builtin_entity |= rtps_util_add_entity_id(tree, pinfo, tvb, offset,
13925 hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key, hf_rtps_sm_wrentity_id_kind,
13926 ett_rtps_wrentity, "writerEntityId", &wid);
13927 offset += 4;
13928
13929 /* Checks for predefined declarations
13930 *
13931 * writerEntityId value | A flag | Extra
13932 * -------------------------------------------|--------|-------------
13933 * ENTITYID_BUILTIN_SUBSCRIPTIONS_WRITER | 1 | r+
13934 * ENTITYID_BUILTIN_SUBSCRIPTIONS_WRITER | 0 | r-
13935 * ENTITYID_BUILTIN_PUBLICATIONS_WRITER | 1 | w+
13936 * ENTITYID_BUILTIN_PUBLICATIONS_WRITER | 0 | w-
13937 * ENTITYID_BUILTIN_PARTICIPANT_WRITER | 1 | p+
13938 * ENTITYID_BUILTIN_PARTICIPANT_WRITER | 0 | p- (*)
13939 * ENTITYID_BUILTIN_TOPIC_WRITER | 1 | t+ (*)
13940 * ENTITYID_BUILTIN_TOPIC_WRITER | 0 | t- (*)
13941 *
13942 * Note (*): Currently NDDS does not publish those values
13943 */
13944 if (wid == ENTITYID_BUILTIN_PUBLICATIONS_WRITER(0x000003c2) && (flags & FLAG_DATA_A(0x04)) != 0) {
13945 col_append_str(pinfo->cinfo, COL_INFO, SM_EXTRA_WPLUS);
13946 } else if (wid == ENTITYID_BUILTIN_PUBLICATIONS_WRITER(0x000003c2) && (flags & FLAG_DATA_A(0x04)) == 0) {
13947 col_append_str(pinfo->cinfo, COL_INFO, SM_EXTRA_WMINUS);
13948 } else if (wid == ENTITYID_BUILTIN_SUBSCRIPTIONS_WRITER(0x000004c2) && (flags & FLAG_DATA_A(0x04)) != 0) {
13949 col_append_str(pinfo->cinfo, COL_INFO, SM_EXTRA_RPLUS);
13950 } else if (wid == ENTITYID_BUILTIN_SUBSCRIPTIONS_WRITER(0x000004c2) && (flags & FLAG_DATA_A(0x04)) == 0) {
13951 col_append_str(pinfo->cinfo, COL_INFO, SM_EXTRA_RMINUS);
13952 } else if (wid == ENTITYID_BUILTIN_PARTICIPANT_WRITER(0x000100c2) && (flags & FLAG_DATA_A(0x04)) != 0) {
13953 col_append_str(pinfo->cinfo, COL_INFO, SM_EXTRA_PPLUS);
13954 } else if (wid == ENTITYID_BUILTIN_PARTICIPANT_WRITER(0x000100c2) && (flags & FLAG_DATA_A(0x04)) == 0) {
13955 col_append_str(pinfo->cinfo, COL_INFO, SM_EXTRA_PMINUS);
13956 } else if (wid == ENTITYID_BUILTIN_TOPIC_WRITER(0x000002c2) && (flags & FLAG_DATA_A(0x04)) != 0) {
13957 col_append_str(pinfo->cinfo, COL_INFO, SM_EXTRA_TPLUS);
13958 } else if (wid == ENTITYID_BUILTIN_TOPIC_WRITER(0x000002c2) && (flags & FLAG_DATA_A(0x04)) == 0) {
13959 col_append_str(pinfo->cinfo, COL_INFO, SM_EXTRA_TMINUS);
13960 }
13961
13962 /* If flag H is defined, read the HostId and AppId fields */
13963 if ((flags & FLAG_DATA_H(0x08)) != 0) {
13964 rtps_util_add_guid_prefix_v1(tree, pinfo, tvb, offset,
13965 hf_rtps_sm_guid_prefix_v1, hf_rtps_sm_host_id, hf_rtps_sm_app_id,
13966 hf_rtps_sm_instance_id_v1, hf_rtps_sm_app_kind,
13967 "keyHashPrefix");
13968
13969 offset += 8;
13970 } else {
13971 /* Flag H not set, use hostId, appId from the packet header */
13972 }
13973
13974 /* Complete the GUID by reading the Object ID */
13975 rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_entity_id, hf_rtps_sm_entity_id_key,
13976 hf_rtps_sm_entity_id_kind, ett_rtps_entity, "keyHashSuffix", NULL((void*)0));
13977 offset += 4;
13978
13979 /* Sequence number */
13980 rtps_util_add_seq_number(tree, tvb, offset, encoding, "writerSeqNumber");
13981 offset += 8;
13982
13983 /* InlineQos */
13984 if ((flags & FLAG_DATA_Q(0x10)) != 0) {
13985 bool_Bool is_inline_qos = true1;
13986 offset = dissect_parameter_sequence(tree, pinfo, tvb, offset,
13987 encoding, octets_to_next_header, "inlineQos",
13988 0x0102, NULL((void*)0), 0, is_inline_qos, NULL((void*)0));
13989 }
13990
13991 /* SerializedData */
13992 if ((flags & FLAG_DATA_D(0x02)) != 0) {
13993 if (is_builtin_entity) {
13994 dissect_parameter_sequence(tree, pinfo, tvb, offset,
13995 encoding, octets_to_next_header, "serializedData",
13996 0x0102, NULL((void*)0), 0, false0, NULL((void*)0));
13997 } else {
13998 proto_tree_add_item(tree, hf_rtps_issue_data, tvb, offset,
13999 octets_to_next_header - (offset - old_offset) + 4,
14000 ENC_NA0x00000000);
14001 }
14002 }
14003}
14004
14005static void dissect_DATA_v2(tvbuff_t *tvb, packet_info *pinfo, int offset, uint8_t flags,
14006 const unsigned encoding, int octets_to_next_header, proto_tree *tree,
14007 uint16_t vendor_id, endpoint_guid *guid) {
14008 /*
14009 *
14010 * 0...2...........7...............15.............23...............31
14011 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
14012 * | DATA |X|X|X|I|H|D|Q|E| octetsToNextHeader |
14013 * +---------------+---------------+---------------+---------------+
14014 * | EntityId readerEntityId |
14015 * +---------------+---------------+---------------+---------------+
14016 * | EntityId writerEntityId |
14017 * +---------------+---------------+---------------+---------------+
14018 * | |
14019 * + SequenceNumber writerSeqNum +
14020 * | |
14021 * +---------------+---------------+---------------+---------------+
14022 * | |
14023 * + +
14024 * | KeyHashPrefix keyHashPrefix [only if H==1] |
14025 * + +
14026 * | |
14027 * +---------------+---------------+---------------+---------------+
14028 * | KeyHashSuffix keyHashSuffix |
14029 * +---------------+---------------+---------------+---------------+
14030 * | StatusInfo statusInfo [only if I==1] |
14031 * +---------------+---------------+---------------+---------------+
14032 * | |
14033 * ~ ParameterList inlineQos [only if Q==1] ~
14034 * | |
14035 * +---------------+---------------+---------------+---------------+
14036 * | |
14037 * ~ SerializedData serializedData [only if D==1] ~
14038 * | |
14039 * +---------------+---------------+---------------+---------------+
14040 */
14041 int min_len;
14042 int old_offset = offset;
14043 uint32_t wid; /* Writer EntityID */
14044 uint32_t status_info = 0xffffffff;
14045 proto_item *octet_item;
14046 bool_Bool from_builtin_writer;
14047
14048 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, DATA_FLAGSv2, flags);
14049
14050 octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb,
14051 offset + 2, 2, encoding);
14052
14053 /* Calculates the minimum length for this submessage */
14054 min_len = 20;
14055 if ((flags & FLAG_DATA_Q_v2(0x02)) != 0) min_len += 4;
14056 if ((flags & FLAG_DATA_D_v2(0x04)) != 0) min_len += 4;
14057 if ((flags & FLAG_DATA_H(0x08)) != 0) min_len += 12;
14058
14059 if (octets_to_next_header < min_len) {
14060 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", min_len);
14061 return;
14062 }
14063
14064 offset += 4;
14065
14066
14067 /* readerEntityId */
14068 rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_rdentity_id, hf_rtps_sm_rdentity_id_key,
14069 hf_rtps_sm_rdentity_id_kind, ett_rtps_rdentity, "readerEntityId", NULL((void*)0));
14070 offset += 4;
14071
14072 /* writerEntityId */
14073 rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key,
14074 hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", &wid);
14075 offset += 4;
14076 guid->entity_id = wid;
14077 guid->fields_present |= GUID_HAS_ENTITY_ID0x00000008;
14078 rtps_util_add_topic_info(tree, pinfo, tvb, offset, guid);
14079
14080 /* Sequence number */
14081 rtps_util_add_seq_number(tree, tvb, offset, encoding, "writerSeqNumber");
14082 offset += 8;
14083
14084 /* If flag H is defined, read the GUID Prefix */
14085 if ((flags & FLAG_DATA_H(0x08)) != 0) {
14086 rtps_util_add_guid_prefix_v2(tree, tvb, offset, hf_rtps_sm_guid_prefix, hf_rtps_sm_host_id,
14087 hf_rtps_sm_app_id, hf_rtps_sm_instance_id, 0);
14088
14089 offset += 12;
14090 } else {
14091 /* Flag H not set, use hostId, appId from the packet header */
14092 }
14093
14094 /* Complete the GUID by reading the Object ID */
14095 rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_entity_id, hf_rtps_sm_entity_id_key,
14096 hf_rtps_sm_entity_id_kind, ett_rtps_entity, "keyHashSuffix", NULL((void*)0));
14097 offset += 4;
14098
14099 if ((flags & FLAG_DATA_I(0x10)) != 0) {
14100 proto_tree_add_item(tree, hf_rtps_data_status_info, tvb, offset, 4, encoding);
14101 offset += 4;
14102 }
14103
14104 /* InlineQos */
14105 if ((flags & FLAG_DATA_Q_v2(0x02)) != 0) {
14106 bool_Bool is_inline_qos = true1;
14107 offset = dissect_parameter_sequence(tree, pinfo, tvb, offset, encoding,
14108 octets_to_next_header - (offset - old_offset) + 4,
14109 "inlineQos", 0x0200, NULL((void*)0), vendor_id, is_inline_qos, NULL((void*)0));
14110 }
14111
14112 /* SerializedData */
14113 if ((flags & FLAG_DATA_D_v2(0x04)) != 0) {
14114 from_builtin_writer = (((wid & ENTITYKIND_BUILTIN_WRITER_WITH_KEY(0xc2)) == ENTITYKIND_BUILTIN_WRITER_WITH_KEY(0xc2))
14115 || ((wid & ENTITYKIND_BUILTIN_WRITER_NO_KEY(0xc3)) == ENTITYKIND_BUILTIN_WRITER_NO_KEY(0xc3))
14116 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_BOOTSTRAP_WRITER(0x00010082))
14117 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_WRITER(0x00010182)))
14118 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_WRITER(0xff010182))
14119 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_READER(0xff010187)) ? true1 : false0;
14120 dissect_serialized_data(tree, pinfo, tvb, offset,
14121 octets_to_next_header - (offset - old_offset) + 4,
14122 "serializedData", vendor_id, from_builtin_writer, guid, NOT_A_FRAGMENT(-1));
14123 }
14124 generate_status_info(pinfo, wid, status_info);
14125}
14126
14127
14128static void dissect_HEADER_EXTENSION(tvbuff_t* tvb, packet_info* pinfo, int offset, uint8_t flags,
14129 const unsigned encoding, proto_tree* tree, int octets_to_next_header, uint16_t vendor_id) {
14130 /*
14131 * 0...2...........7...............15.............23...............31
14132 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
14133 * | DATA_HE |P|C|C|W|U|T|L|E| octetsToNextHeader |
14134 * +---------------+---------------+---------------+---------------+
14135 * | MessageLength messageLength (Only if L == 1 ) |
14136 * +---------------+---------------+---------------+---------------+
14137 * | |
14138 * + TimeStamp rtpsSendTimestamp (Only if T == 1 ) +
14139 * | |
14140 * +---------------+---------------+---------------+---------------+
14141 * | UExtension4 uExtension (Only if U == 1 ) |
14142 * +---------------+---------------+---------------+---------------+
14143 * | |
14144 * + WExtension8 wExtension8 (Only if W == 1 ) +
14145 * | |
14146 * +---------------+---------------+---------------+---------------+
14147 * | |
14148 * + Checksum messageChecksum (Only if CC != 00 ) +
14149 * | |
14150 * +---------------+---------------+---------------+---------------+
14151 * | |
14152 * + ParameterList parameters (Only if P != 0 ) +
14153 * | |
14154 * +---------------+---------------+---------------+---------------+
14155 * C1,C2 == 01 -> 4 bytes checksum
14156 * C1,C2 == 10 -> 8 bytes checksum
14157 * C1,C2 == 11 -> 16 bytes checksum
14158 */
14159#define RTPS_HE_ENDIANESS_FLAG(0x01) (0x01)
14160#define RTPS_HE_MESSAGE_LENGTH_FLAG(0x02) (0x02)
14161#define RTPS_HE_TIMESTAMP_FLAG(0x04) (0x04)
14162#define RTPS_HE_UEXTENSION_FLAG(0x08) (0x08)
14163#define RTPS_HE_WEXTENSION_FLAG(0x10) (0x10)
14164#define RTPS_HE_CHECKSUM_2_FLAG(0x20) (0x20)
14165#define RTPS_HE_CHECKSUM_1_FLAG(0x40) (0x40)
14166#define RTPS_HE_PARAMETERS_FLAG(0x80) (0x80)
14167
14168#define RTPS_HE_CHECKSUM_CRC32(0x20) RTPS_HE_CHECKSUM_2_FLAG(0x20)
14169#define RTPS_HE_CHECKSUM_CRC64(0x40) RTPS_HE_CHECKSUM_1_FLAG(0x40)
14170#define RTPS_HE_CHECKSUM_MD5((0x40) | (0x20)) (RTPS_HE_CHECKSUM_1_FLAG(0x40) | RTPS_HE_CHECKSUM_2_FLAG(0x20))
14171
14172 uint8_t checksum_type = 0;
14173 int initial_offset = offset;
14174 unsigned checksum_flags = PROTO_CHECKSUM_NO_FLAGS0x00;
14175 bool_Bool is_crc_supported = true1;
14176 /*Checksum can be CRC32, CRC64 and MD5 */
14177 union _calculated_checksum {
14178 uint8_t md5[RTPS_CHECKSUM_MAX_LEN16];
14179 uint32_t crc32c;
14180 uint64_t crc64;
14181 } calculated_checksum = {0}, he_checksum = {0};
14182 int16_t header_extension_length = 0;
14183 int offsetToHeaderExtensionData = 24;
14184 rtps_current_packet_decryption_info_t *decryption_info = NULL((void*)0);
32
'decryption_info' initialized to a null pointer value
14185
14186 ++offset;
14187 proto_tree_add_bitmask_value(
14188 tree,
14189 tvb,
14190 offset,
14191 hf_rtps_header_extension_flags,
14192 ett_rtps_flags,
14193 HEADER_EXTENSION_MASK_FLAGS,
14194 flags);
14195 ++offset;
14196 header_extension_length = tvb_get_int16(tvb, offset, encoding);
14197 proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb, offset, 2, encoding);
14198 offset += 2;
14199
14200 if (enable_rtps_psk_decryption) {
33
Assuming 'enable_rtps_psk_decryption' is false
34
Taking false branch
14201 /*
14202 * Let's update the additional authenticated data, so that it includes the
14203 * Header Extension.
14204 */
14205 const uint8_t *additional_authenticated_data;
14206 rtps_tvb_field *rtps_root = (rtps_tvb_field*)
14207 p_get_proto_data(
14208 pinfo->pool,
14209 pinfo, proto_rtps,
14210 RTPS_ROOT_MESSAGE_KEY4);
14211
14212 decryption_info = (rtps_current_packet_decryption_info_t *)
14213 p_get_proto_data(
14214 pinfo->pool, pinfo, proto_rtps, RTPS_DECRYPTION_INFO_KEY5);
14215
14216 decryption_info->aad_length =
14217 20 /* rtps header size. */
14218 + 4 /* header extension submessage id, flags, octetsToNextHeader */
14219 + header_extension_length;
14220
14221 additional_authenticated_data = tvb_get_ptr(
14222 rtps_root->tvb,
14223 rtps_root->tvb_offset,
14224 (int) decryption_info->aad_length);
14225
14226 /* Do a copy of the bytes, so that we can later zero the necessary parts. */
14227 decryption_info->additional_authenticated_data_allocated = true1;
14228 decryption_info->additional_authenticated_data = g_memdup2(
14229 additional_authenticated_data,
14230 decryption_info->aad_length);
14231 }
14232
14233 if ((flags & RTPS_HE_MESSAGE_LENGTH_FLAG(0x02)) == RTPS_HE_MESSAGE_LENGTH_FLAG(0x02)) {
35
Assuming the condition is true
36
Taking true branch
14234 proto_tree_add_item(tree, hf_rtps_message_length, tvb, offset, 4, encoding);
14235 offset += 4;
14236
14237 if (enable_rtps_psk_decryption) {
37
Assuming 'enable_rtps_psk_decryption' is true
38
Taking true branch
14238 memset(
14239 decryption_info->additional_authenticated_data
39
Access to field 'additional_authenticated_data' results in a dereference of a null pointer (loaded from variable 'decryption_info')
14240 + offsetToHeaderExtensionData,
14241 0,
14242 RTPS_HE_MESSAGE_LENGTH_FLAG(0x02));
14243 offsetToHeaderExtensionData += 4;
14244 }
14245 }
14246
14247 if ((flags & RTPS_HE_TIMESTAMP_FLAG(0x04)) == RTPS_HE_TIMESTAMP_FLAG(0x04)) {
14248 rtps_util_add_timestamp(tree,
14249 tvb, offset,
14250 encoding,
14251 hf_rtps_timestamp);
14252 offset += 8;
14253
14254 if (enable_rtps_psk_decryption) {
14255 /* No need to zero for AAD. */
14256 offsetToHeaderExtensionData += 8;
14257 }
14258 }
14259
14260 if ((flags & RTPS_HE_UEXTENSION_FLAG(0x08)) == RTPS_HE_UEXTENSION_FLAG(0x08)) {
14261 proto_tree_add_item(tree, hf_rtps_uextension, tvb, offset, 4, encoding);
14262 offset += 4;
14263
14264 if (enable_rtps_psk_decryption) {
14265 /* No need to zero for AAD. */
14266 offsetToHeaderExtensionData += 4;
14267 }
14268 }
14269
14270 if ((flags & RTPS_HE_WEXTENSION_FLAG(0x10)) == RTPS_HE_WEXTENSION_FLAG(0x10)) {
14271 proto_tree_add_item(tree, hf_rtps_wextension, tvb, offset, 8, encoding);
14272 offset += 8;
14273
14274 if (enable_rtps_psk_decryption) {
14275 /* No need to zero for AAD. */
14276 offsetToHeaderExtensionData += 8;
14277 }
14278 }
14279
14280 checksum_type = (flags & (RTPS_HE_CHECKSUM_2_FLAG(0x20) | RTPS_HE_CHECKSUM_1_FLAG(0x40)));
14281 if (checksum_type != 0) {
14282 int checksum_len = 0;
14283
14284 /* Adds the CRC of the RTPS message */
14285 switch (checksum_type) {
14286 /* 32-bit checksum */
14287 case RTPS_HE_CHECKSUM_CRC32(0x20):
14288 checksum_len = 4;
14289 break;
14290
14291 /* 64-bit checksum */
14292 case RTPS_HE_CHECKSUM_CRC64(0x40):
14293 checksum_len = 8;
14294 is_crc_supported = false0;
14295 break;
14296
14297 /* 128-bit checksum */
14298 case RTPS_HE_CHECKSUM_MD5((0x40) | (0x20)):
14299 checksum_len = 16;
14300 break;
14301 default:
14302 break;
14303 }
14304
14305 if (enable_rtps_psk_decryption && decryption_info != NULL((void*)0)) {
14306 memset(
14307 decryption_info->additional_authenticated_data
14308 + offsetToHeaderExtensionData,
14309 0,
14310 checksum_len);
14311 }
14312
14313 /* If the check CRC feature is enabled */
14314 if (enable_rtps_crc_check && is_crc_supported) {
14315 char* tvb_zero_checksum = NULL((void*)0);
14316 rtps_tvb_field *rtps_root = NULL((void*)0);
14317
14318 checksum_flags = PROTO_CHECKSUM_VERIFY0x01;
14319 rtps_root = (rtps_tvb_field*)p_get_proto_data(pinfo->pool, pinfo, proto_rtps, RTPS_ROOT_MESSAGE_KEY4);
14320 if (rtps_root != NULL((void*)0)) {
14321 /* The checksum in the wire is the checksum of the RTPS message with the
14322 * checksum field set to 0. To calculate the checksum of the RTPS message
14323 * we need to set those bytes to 0 in a separate buffer.
14324 */
14325 tvb_zero_checksum = wmem_alloc0_array(pinfo->pool, char, rtps_root->tvb_len)((char*)wmem_alloc0((pinfo->pool), (((((rtps_root->tvb_len
)) <= 0) || ((size_t)sizeof(char) > (9223372036854775807L
/ (size_t)((rtps_root->tvb_len))))) ? 0 : (sizeof(char) *
((rtps_root->tvb_len))))))
;
14326 tvb_memcpy(
14327 rtps_root->tvb,
14328 tvb_zero_checksum,
14329 rtps_root->tvb_offset,
14330 rtps_root->tvb_len);
14331
14332 /* Set checksum bytes to 0 */
14333 memset(tvb_zero_checksum + offset, 0, checksum_len);
14334 switch (checksum_type) {
14335 case RTPS_HE_CHECKSUM_CRC32(0x20):
14336 /* Checksum is always big endian */
14337 he_checksum.crc32c = tvb_get_uint32(tvb, offset, ENC_BIG_ENDIAN0x00000000);
14338 calculated_checksum.crc32c = crc32c_calculate_no_swap(
14339 tvb_zero_checksum,
14340 rtps_root->tvb_len,
14341 CRC32C_PRELOAD0xffffffff);
14342 calculated_checksum.crc32c ^= CRC32C_PRELOAD0xffffffff;
14343 break;
14344
14345 case RTPS_HE_CHECKSUM_CRC64(0x40):
14346 /* CRC64 is not supported yet */
14347 break;
14348
14349 case RTPS_HE_CHECKSUM_MD5((0x40) | (0x20)):
14350 tvb_memcpy(
14351 tvb,
14352 &he_checksum.md5,
14353 offset,
14354 checksum_len);
14355 gcry_md_hash_buffer(
14356 GCRY_MD_MD5,
14357 calculated_checksum.md5,
14358 tvb_zero_checksum,
14359 rtps_root->tvb_len);
14360 break;
14361
14362 default:
14363 break;
14364 }
14365 }
14366 }
14367 switch (checksum_type) {
14368 case RTPS_HE_CHECKSUM_CRC32(0x20):
14369 proto_tree_add_checksum(
14370 tree,
14371 tvb,
14372 offset,
14373 hf_rtps_header_extension_checksum_crc32c,
14374 -1,
14375 &ei_rtps_checksum_check_error,
14376 pinfo,
14377 calculated_checksum.crc32c,
14378 ENC_BIG_ENDIAN0x00000000,
14379 checksum_flags);
14380 break;
14381 case RTPS_HE_CHECKSUM_MD5((0x40) | (0x20)):
14382 proto_tree_add_checksum_bytes(
14383 tree,
14384 tvb,
14385 offset,
14386 hf_rtps_header_extension_checksum_md5,
14387 -1,
14388 &ei_rtps_checksum_check_error,
14389 pinfo,
14390 calculated_checksum.md5,
14391 checksum_len,
14392 checksum_flags);
14393 break;
14394
14395 case RTPS_HE_CHECKSUM_CRC64(0x40):
14396 default:
14397 break;
14398 }
14399 offset += checksum_len;
14400 }
14401 if ((flags & RTPS_HE_PARAMETERS_FLAG(0x80)) == RTPS_HE_PARAMETERS_FLAG(0x80)) {
14402 unsigned parameter_endianess = ((flags & RTPS_HE_ENDIANESS_FLAG(0x01)) == RTPS_HE_ENDIANESS_FLAG(0x01))
14403 ? ENC_LITTLE_ENDIAN0x80000000
14404 : ENC_BIG_ENDIAN0x00000000;
14405 dissect_parameter_sequence(tree, pinfo, tvb, offset, parameter_endianess,
14406 octets_to_next_header - (offset - initial_offset),
14407 "Parameters", 0x0200, NULL((void*)0), vendor_id, false0, NULL((void*)0));
14408 }
14409}
14410
14411static void dissect_DATA_FRAG(tvbuff_t *tvb, packet_info *pinfo, int offset, uint8_t flags,
14412 const unsigned encoding, int octets_to_next_header, proto_tree *tree,
14413 uint16_t vendor_id, endpoint_guid *guid) {
14414 /*
14415 * 0...2...........7...............15.............23...............31
14416 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
14417 * | DATA_FRAG |X|X|X|X|X|H|Q|E| octetsToNextHeader |
14418 * +---------------+---------------+---------------+---------------+
14419 * | EntityId readerEntityId |
14420 * +---------------+---------------+---------------+---------------+
14421 * | EntityId writerEntityId |
14422 * +---------------+---------------+---------------+---------------+
14423 * | |
14424 * + SequenceNumber writerSeqNum +
14425 * | |
14426 * +---------------+---------------+---------------+---------------+
14427 * | |
14428 * + +
14429 * | KeyHashPrefix keyHashPrefix [only if H==1] |
14430 * + +
14431 * | |
14432 * +---------------+---------------+---------------+---------------+
14433 * | KeyHashSuffix keyHashSuffix |
14434 * +---------------+---------------+---------------+---------------+
14435 * | FragmentNumber fragmentStartingNum |
14436 * +---------------+---------------+---------------+---------------+
14437 * | ushort fragmentsInSubmessage | ushort fragmentSize |
14438 * +---------------+---------------+---------------+---------------+
14439 * | unsigned long sampleSize |
14440 * +---------------+---------------+---------------+---------------+
14441 * | |
14442 * ~ ParameterList inlineQos [only if Q==1] ~
14443 * | |
14444 * +---------------+---------------+---------------+---------------+
14445 * | |
14446 * ~ SerializedData serializedData ~
14447 * | |
14448 * +---------------+---------------+---------------+---------------+
14449 */
14450
14451 int min_len;
14452 int old_offset = offset;
14453 uint32_t frag_number = 0;
14454 proto_item *octet_item;
14455 uint32_t wid;
14456 bool_Bool from_builtin_writer;
14457
14458 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, DATA_FRAG_FLAGS, flags);
14459
14460 octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb,
14461 offset + 2, 2, encoding);
14462
14463 /* Calculates the minimum length for this submessage */
14464 min_len = 32;
14465 if ((flags & FLAG_DATA_FRAG_Q(0x02)) != 0) min_len += 4;
14466 if ((flags & FLAG_DATA_FRAG_H(0x04)) != 0) min_len += 12;
14467
14468 if (octets_to_next_header < min_len) {
14469 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", min_len);
14470 return;
14471 }
14472
14473 offset += 4;
14474
14475 /* readerEntityId */
14476 rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_rdentity_id, hf_rtps_sm_rdentity_id_key,
14477 hf_rtps_sm_rdentity_id_kind, ett_rtps_rdentity, "readerEntityId", NULL((void*)0));
14478 offset += 4;
14479
14480 /* writerEntityId */
14481 rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key,
14482 hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", &wid);
14483 offset += 4;
14484 guid->entity_id = wid;
14485 guid->fields_present |= GUID_HAS_ENTITY_ID0x00000008;
14486 rtps_util_add_topic_info(tree, pinfo, tvb, offset, guid);
14487
14488 /* Sequence number */
14489 rtps_util_add_seq_number(tree, tvb, offset, encoding, "writerSeqNumber");
14490 offset += 8;
14491
14492 /* If flag H is defined, read the GUID Prefix */
14493 if ((flags & FLAG_DATA_H(0x08)) != 0) {
14494 rtps_util_add_guid_prefix_v2(tree, tvb, offset, hf_rtps_sm_guid_prefix,
14495 hf_rtps_sm_host_id, hf_rtps_sm_app_id, hf_rtps_sm_instance_id, 0);
14496 offset += 12;
14497 } else {
14498 /* Flag H not set, use hostId, appId from the packet header */
14499 }
14500
14501 /* Complete the GUID by reading the Object ID */
14502 rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_entity_id, hf_rtps_sm_entity_id_key,
14503 hf_rtps_sm_entity_id_kind, ett_rtps_entity, "keyHashSuffix", NULL((void*)0));
14504 offset += 4;
14505
14506
14507 /* Fragment number */
14508 proto_tree_add_item_ret_uint(tree, hf_rtps_data_frag_number, tvb, offset, 4, encoding, &frag_number);
14509 offset += 4;
14510
14511 /* Fragments in submessage */
14512 proto_tree_add_item(tree, hf_rtps_data_frag_num_fragments, tvb, offset, 2, encoding);
14513 offset += 2;
14514
14515 /* Fragment size */
14516 proto_tree_add_item(tree, hf_rtps_data_frag_size, tvb, offset, 2, encoding);
14517 offset += 2;
14518
14519 /* sampleSize */
14520 proto_tree_add_item(tree, hf_rtps_data_frag_sample_size, tvb, offset, 4, encoding);
14521 offset += 4;
14522
14523 /* InlineQos */
14524 if ((flags & FLAG_DATA_Q_v2(0x02)) != 0) {
14525 bool_Bool is_inline_qos = true1;
14526 offset = dissect_parameter_sequence(tree, pinfo, tvb, offset, encoding,
14527 octets_to_next_header - (offset - old_offset) + 4,
14528 "inlineQos", 0x0200, NULL((void*)0), vendor_id, is_inline_qos, NULL((void*)0));
14529 }
14530
14531 /* SerializedData */
14532 if ((flags & FLAG_DATA_D_v2(0x04)) != 0) {
14533 from_builtin_writer = (((wid & ENTITYKIND_BUILTIN_WRITER_WITH_KEY(0xc2)) == ENTITYKIND_BUILTIN_WRITER_WITH_KEY(0xc2))
14534 || ((wid & ENTITYKIND_BUILTIN_WRITER_NO_KEY(0xc3)) == ENTITYKIND_BUILTIN_WRITER_NO_KEY(0xc3))
14535 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_BOOTSTRAP_WRITER(0x00010082))
14536 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_WRITER(0x00010182)))
14537 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_WRITER(0xff010182))
14538 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_READER(0xff010187)) ? true1 : false0;
14539 dissect_serialized_data(tree, pinfo, tvb, offset,
14540 octets_to_next_header - (offset - old_offset) + 4,
14541 "serializedData", vendor_id, from_builtin_writer, NULL((void*)0), (int32_t)frag_number);
14542 }
14543}
14544
14545
14546/* *********************************************************************** */
14547/* * N O K E Y _ D A T A * */
14548/* *********************************************************************** */
14549static void dissect_NOKEY_DATA(tvbuff_t *tvb, packet_info *pinfo, int offset, uint8_t flags,
14550 const unsigned encoding, int octets_to_next_header, proto_tree *tree,
14551 uint16_t version, uint16_t vendor_id) {
14552 /* RTPS 1.0/1.1:
14553 * 0...2...........7...............15.............23...............31
14554 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
14555 * | ISSUE |X|X|X|X|X|X|P|E| octetsToNextHeader |
14556 * +---------------+---------------+---------------+---------------+
14557 * | ObjectId readerObjectId |
14558 * +---------------+---------------+---------------+---------------+
14559 * | ObjectId writerObjectId |
14560 * +---------------+---------------+---------------+---------------+
14561 * | |
14562 * + SequenceNumber writerSeqNumber +
14563 * | |
14564 * +---------------+---------------+---------------+---------------+
14565 * | |
14566 * ~ ParameterSequence parameters [only if P==1] ~
14567 * | |
14568 * +---------------+---------------+---------------+---------------+
14569 * | |
14570 * ~ UserData issueData ~
14571 * | |
14572 * +---------------+---------------+---------------+---------------+
14573 *
14574 * RTPS 1.2:
14575 * 0...2...........7...............15.............23...............31
14576 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
14577 * | NOKEY_DATA |X|X|X|X|X|D|Q|E| octetsToNextHeader |
14578 * +---------------+---------------+---------------+---------------+
14579 * | EntityId readerEntityId |
14580 * +---------------+---------------+---------------+---------------+
14581 * | EntityId writerEntityId |
14582 * +---------------+---------------+---------------+---------------+
14583 * | |
14584 * + SequenceNumber writerSeqNum +
14585 * | |
14586 * +---------------+---------------+---------------+---------------+
14587 * | |
14588 * ~ ParameterList inlineQos [only if Q==1] ~
14589 * | |
14590 * +---------------+---------------+---------------+---------------+
14591 * | |
14592 * ~ SerializedData serializedData [only if D==0] ~
14593 * | |
14594 * +---------------+---------------+---------------+---------------+
14595 *
14596 * RTPS 2.0:
14597 * 0...2...........7...............15.............23...............31
14598 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
14599 * | NOKEY_DATA |X|X|X|X|X|D|Q|E| octetsToNextHeader |
14600 * +---------------+---------------+---------------+---------------+
14601 * | EntityId readerEntityId |
14602 * +---------------+---------------+---------------+---------------+
14603 * | EntityId writerEntityId |
14604 * +---------------+---------------+---------------+---------------+
14605 * | |
14606 * + SequenceNumber writerSeqNum +
14607 * | |
14608 * +---------------+---------------+---------------+---------------+
14609 * | |
14610 * ~ ParameterList inlineQos [only if Q==1] ~
14611 * | |
14612 * +---------------+---------------+---------------+---------------+
14613 * | |
14614 * ~ SerializedData serializedData [only if D==1] ~
14615 * | |
14616 * +---------------+---------------+---------------+---------------+
14617 * Notes:
14618 * - inlineQos is equivalent to the old 'parameters'
14619 * - serializedData is equivalent to the old 'issueData'
14620 */
14621
14622 int min_len;
14623 uint32_t wid; /* Writer EntityID */
14624 bool_Bool from_builtin_writer;
14625 int old_offset = offset;
14626 proto_item *octet_item;
14627
14628 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, NOKEY_DATA_FLAGS, flags);
14629
14630 octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb,
14631 offset + 2, 2, encoding);
14632
14633 /* Calculates the minimum length for this submessage */
14634 min_len = 16;
14635 if ((flags & FLAG_NOKEY_DATA_Q(0x02)) != 0) min_len += 4;
14636
14637 if (octets_to_next_header < min_len) {
14638 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", min_len);
14639 return;
14640 }
14641
14642 offset += 4;
14643
14644 /* readerEntityId */
14645 rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_rdentity_id, hf_rtps_sm_rdentity_id_key,
14646 hf_rtps_sm_rdentity_id_kind, ett_rtps_rdentity, "readerEntityId", NULL((void*)0));
14647 offset += 4;
14648
14649 /* writerEntityId */
14650 rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key,
14651 hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", &wid);
14652 offset += 4;
14653
14654 /* Sequence number */
14655 rtps_util_add_seq_number(tree, tvb, offset, encoding, "writerSeqNumber");
14656 offset += 8;
14657
14658 /* Parameters */
14659 if ((flags & FLAG_NOKEY_DATA_Q(0x02)) != 0) {
14660 bool_Bool is_inline_qos = true1;
14661 offset = dissect_parameter_sequence(tree, pinfo, tvb, offset,
14662 encoding, octets_to_next_header, "inlineQos",
14663 version, NULL((void*)0), vendor_id, is_inline_qos, NULL((void*)0));
14664
14665 }
14666
14667 /* Issue Data */
14668 if ((version < 0x0200) && (flags & FLAG_NOKEY_DATA_D(0x04)) == 0) {
14669 proto_tree_add_item(tree, hf_rtps_issue_data, tvb, offset,
14670 octets_to_next_header - (offset - old_offset) + 4,
14671 ENC_NA0x00000000);
14672 }
14673
14674 if ((version >= 0x0200) && (flags & FLAG_DATA_D_v2(0x04)) != 0) {
14675 from_builtin_writer = (((wid & ENTITYKIND_BUILTIN_WRITER_WITH_KEY(0xc2)) == ENTITYKIND_BUILTIN_WRITER_WITH_KEY(0xc2))
14676 || ((wid & ENTITYKIND_BUILTIN_WRITER_NO_KEY(0xc3)) == ENTITYKIND_BUILTIN_WRITER_NO_KEY(0xc3))
14677 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_BOOTSTRAP_WRITER(0x00010082))
14678 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_WRITER(0x00010182)))
14679 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_WRITER(0xff010182))
14680 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_READER(0xff010187)) ? true1 : false0;
14681 dissect_serialized_data(tree, pinfo, tvb, offset,
14682 octets_to_next_header - (offset - old_offset) + 4,
14683 "serializedData", vendor_id, from_builtin_writer, NULL((void*)0), NOT_A_FRAGMENT(-1));
14684 }
14685
14686}
14687
14688/* *********************************************************************** */
14689/* * N O K E Y _ D A T A _ F R A G * */
14690/* *********************************************************************** */
14691static void dissect_NOKEY_DATA_FRAG(tvbuff_t *tvb, packet_info *pinfo, int offset,
14692 uint8_t flags, const unsigned encoding, int octets_to_next_header, proto_tree *tree,
14693 uint16_t vendor_id) {
14694 /*
14695 * 0...2...........7...............15.............23...............31
14696 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
14697 * |NOKEY_DATA_FRAG|X|X|X|X|X|X|Q|E| octetsToNextHeader |
14698 * +---------------+---------------+---------------+---------------+
14699 * | EntityId readerEntityId |
14700 * +---------------+---------------+---------------+---------------+
14701 * | EntityId writerEntityId |
14702 * +---------------+---------------+---------------+---------------+
14703 * | |
14704 * + SequenceNumber writerSeqNum +
14705 * | |
14706 * +---------------+---------------+---------------+---------------+
14707 * | FragmentNumber fragmentStartingNum |
14708 * +---------------+---------------+---------------+---------------+
14709 * | ushort fragmentsInSubmessage | ushort fragmentSize |
14710 * +---------------+---------------+---------------+---------------+
14711 * | unsigned long sampleSize |
14712 * +---------------+---------------+---------------+---------------+
14713 * | |
14714 * ~ ParameterList inlineQos [only if Q==1] ~
14715 * | |
14716 * +---------------+---------------+---------------+---------------+
14717 * | |
14718 * ~ SerializedData serializedData ~
14719 * | |
14720 * +---------------+---------------+---------------+---------------+
14721 */
14722
14723 int min_len;
14724 uint32_t wid; /* Writer EntityID */
14725 bool_Bool from_builtin_writer;
14726 int old_offset = offset;
14727 uint32_t frag_number = 0;
14728 proto_item *octet_item;
14729 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, NOKEY_DATA_FRAG_FLAGS, flags);
14730
14731 octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb,
14732 offset + 2, 2, encoding);
14733
14734 /* Calculates the minimum length for this submessage */
14735 min_len = 28;
14736 if ((flags & FLAG_NOKEY_DATA_Q(0x02)) != 0) min_len += 4;
14737
14738 if (octets_to_next_header < min_len) {
14739 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", min_len);
14740 return;
14741 }
14742
14743 offset += 4;
14744
14745 /* readerEntityId */
14746 rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_rdentity_id, hf_rtps_sm_rdentity_id_key,
14747 hf_rtps_sm_rdentity_id_kind, ett_rtps_rdentity, "readerEntityId", NULL((void*)0));
14748 offset += 4;
14749
14750 /* writerEntityId */
14751 rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key,
14752 hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", &wid);
14753 offset += 4;
14754
14755 /* Sequence number */
14756 rtps_util_add_seq_number(tree, tvb, offset, encoding, "writerSeqNumber");
14757 offset += 8;
14758
14759 /* Fragment number */
14760 proto_tree_add_item_ret_uint(tree, hf_rtps_nokey_data_frag_number, tvb,
14761 offset, 4, encoding, &frag_number);
14762 offset += 4;
14763
14764 /* Fragments in submessage */
14765 proto_tree_add_item(tree, hf_rtps_nokey_data_frag_num_fragments, tvb,
14766 offset, 2, encoding);
14767 offset += 2;
14768
14769 /* Fragment size */
14770 proto_tree_add_item(tree, hf_rtps_nokey_data_frag_size, tvb,
14771 offset, 2, encoding);
14772 offset += 2;
14773
14774 /* InlineQos */
14775 if ((flags & FLAG_DATA_Q_v2(0x02)) != 0) {
14776 bool_Bool is_inline_qos = true1;
14777 offset = dissect_parameter_sequence(tree, pinfo, tvb, offset, encoding,
14778 octets_to_next_header - (offset - old_offset) + 4,
14779 "inlineQos", 0x0200, NULL((void*)0), vendor_id, is_inline_qos, NULL((void*)0));
14780 }
14781
14782 /* SerializedData */
14783 if ((flags & FLAG_DATA_D_v2(0x04)) != 0) {
14784 from_builtin_writer = (((wid & ENTITYKIND_BUILTIN_WRITER_WITH_KEY(0xc2)) == ENTITYKIND_BUILTIN_WRITER_WITH_KEY(0xc2))
14785 || ((wid & ENTITYKIND_BUILTIN_WRITER_NO_KEY(0xc3)) == ENTITYKIND_BUILTIN_WRITER_NO_KEY(0xc3))
14786 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_BOOTSTRAP_WRITER(0x00010082))
14787 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_WRITER(0x00010182)))
14788 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_WRITER(0xff010182))
14789 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_READER(0xff010187)) ? true1 : false0;
14790 dissect_serialized_data(tree, pinfo, tvb,offset,
14791 octets_to_next_header - (offset - old_offset) + 4,
14792 "serializedData", vendor_id, from_builtin_writer, NULL((void*)0), (int32_t)frag_number);
14793 }
14794}
14795
14796static void dissect_PING(tvbuff_t* tvb, int offset, const unsigned encoding, int octets_to_next_header, proto_tree* tree) {
14797 proto_tree_add_item(tree, hf_rtps_ping,tvb, offset, octets_to_next_header, encoding);
14798}
14799
14800/* *********************************************************************** */
14801/* * A C K N A C K * */
14802/* *********************************************************************** */
14803static void dissect_ACKNACK(tvbuff_t *tvb, packet_info *pinfo, int offset, uint8_t flags,
14804 const unsigned encoding, int octets_to_next_header, proto_tree *tree,
14805 proto_item *item, endpoint_guid *guid) {
14806 /* RTPS 1.0/1.1:
14807 * 0...2...........7...............15.............23...............31
14808 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
14809 * | ACK |X|X|X|X|X|X|F|E| octetsToNextHeader |
14810 * +---------------+---------------+---------------+---------------+
14811 * | ObjectId readerObjectId |
14812 * +---------------+---------------+---------------+---------------+
14813 * | ObjectId writerObjectId |
14814 * +---------------+---------------+---------------+---------------+
14815 * | |
14816 * + Bitmap bitmap +
14817 * | |
14818 * +---------------+---------------+---------------+---------------+
14819 * | Counter count |
14820 * +---------------+---------------+---------------+---------------+
14821 *
14822 * RTPS 1.2/2.0:
14823 * 0...2...........7...............15.............23...............31
14824 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
14825 * | ACKNACK |X|X|X|X|X|X|F|E| octetsToNextHeader |
14826 * +---------------+---------------+---------------+---------------+
14827 * | EntityId readerEntityId |
14828 * +---------------+---------------+---------------+---------------+
14829 * | EntityId writerEntityId |
14830 * +---------------+---------------+---------------+---------------+
14831 * | |
14832 * + SequenceNumberSet readerSNState +
14833 * | |
14834 * +---------------+---------------+---------------+---------------+
14835 * | Counter count |
14836 * +---------------+---------------+---------------+---------------+
14837 */
14838 int original_offset; /* Offset to the readerEntityId */
14839 proto_item *octet_item;
14840 uint32_t wid;
14841
14842 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, ACKNACK_FLAGS, flags);
14843 octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb, offset + 2, 2, encoding);
14844 if (octets_to_next_header < 20) {
14845 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= 20)");
14846 return;
14847 }
14848
14849 offset += 4;
14850 original_offset = offset;
14851
14852 /* readerEntityId */
14853 rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_rdentity_id, hf_rtps_sm_rdentity_id_key,
14854 hf_rtps_sm_rdentity_id_kind, ett_rtps_rdentity, "readerEntityId", NULL((void*)0));
14855 offset += 4;
14856
14857 /* writerEntityId */
14858 rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key,
14859 hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", &wid);
14860 offset += 4;
14861 guid->entity_id = wid;
14862 guid->fields_present |= GUID_HAS_ENTITY_ID0x00000008;
14863 rtps_util_add_topic_info(tree, pinfo, tvb, offset, guid);
14864
14865 /* Bitmap */
14866 offset = rtps_util_add_bitmap(tree, pinfo, tvb, offset, encoding, "readerSNState", true1);
14867
14868 /* RTPS 1.0 didn't have count: make sure we don't decode it wrong
14869 * in this case
14870 */
14871 if (offset + 4 == original_offset + octets_to_next_header) {
14872 /* Count is present */
14873 proto_tree_add_item(tree, hf_rtps_acknack_count, tvb, offset, 4, encoding);
14874 } else if (offset < original_offset + octets_to_next_header) {
14875 /* In this case there must be something wrong in the bitmap: there
14876 * are some extra bytes that we don't know how to decode
14877 */
14878 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);
14879 } else if (offset > original_offset + octets_to_next_header) {
14880 /* Decoding the bitmap went over the end of this submessage.
14881 * Enter an item in the protocol tree that spans over the entire
14882 * submessage.
14883 */
14884 expert_add_info(pinfo, item, &ei_rtps_missing_bytes);
14885 }
14886
14887}
14888
14889/* *********************************************************************** */
14890/* * N A C K _ F R A G * */
14891/* *********************************************************************** */
14892static void dissect_NACK_FRAG(tvbuff_t *tvb, packet_info *pinfo, int offset, uint8_t flags,
14893 const unsigned encoding, int octets_to_next_header, proto_tree *tree) {
14894 /*
14895 * 0...2...........7...............15.............23...............31
14896 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
14897 * | NACK_FRAG |X|X|X|X|X|X|X|E| octetsToNextHeader |
14898 * +---------------+---------------+---------------+---------------+
14899 * | EntityId readerEntityId |
14900 * +---------------+---------------+---------------+---------------+
14901 * | EntityId writerEntityId |
14902 * +---------------+---------------+---------------+---------------+
14903 * | |
14904 * + SequenceNumberSet writerSN +
14905 * | |
14906 * +---------------+---------------+---------------+---------------+
14907 * | |
14908 * ~ FragmentNumberSet fragmentNumberState +
14909 * | |
14910 * +---------------+---------------+---------------+---------------+
14911 * | Counter count |
14912 * +---------------+---------------+---------------+---------------+
14913 */
14914 proto_item *octet_item;
14915
14916 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, NACK_FRAG_FLAGS, flags);
14917
14918 octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb,
14919 offset + 2, 2, encoding);
14920
14921 if (octets_to_next_header < 24) {
14922 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= 24)");
14923 return;
14924 }
14925
14926 offset += 4;
14927
14928 /* readerEntityId */
14929 rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_rdentity_id, hf_rtps_sm_rdentity_id_key,
14930 hf_rtps_sm_rdentity_id_kind, ett_rtps_rdentity, "readerEntityId", NULL((void*)0));
14931 offset += 4;
14932
14933 /* writerEntityId */
14934 rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key,
14935 hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", NULL((void*)0));
14936 offset += 4;
14937
14938 /* Writer sequence number */
14939 rtps_util_add_seq_number(tree, tvb, offset, encoding, "writerSN");
14940 offset += 8;
14941
14942 /* FragmentNumberSet */
14943 offset = rtps_util_add_fragment_number_set(tree, pinfo, tvb, offset, encoding,
14944 "fragmentNumberState", octets_to_next_header - 20);
14945
14946 if (offset == -1) {
14947 return;
14948 }
14949 /* Count */
14950 proto_tree_add_item(tree, hf_rtps_nack_frag_count, tvb, offset, 4, encoding);
14951}
14952
14953/* *********************************************************************** */
14954/* * H E A R T B E A T * */
14955/* *********************************************************************** */
14956static void dissect_HEARTBEAT(tvbuff_t *tvb, packet_info *pinfo, int offset, uint8_t flags,
14957 const unsigned encoding, int octets_to_next_header, proto_tree *tree,
14958 uint16_t version, endpoint_guid *guid) {
14959 /* RTPS 1.0/1.1:
14960 * 0...2...........7...............15.............23...............31
14961 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
14962 * | HEARTBEAT |X|X|X|X|X|L|F|E| octetsToNextHeader |
14963 * +---------------+---------------+---------------+---------------+
14964 * | ObjectId readerObjectId |
14965 * +---------------+---------------+---------------+---------------+
14966 * | ObjectId writerObjectId |
14967 * +---------------+---------------+---------------+---------------+
14968 * | |
14969 * + SequenceNumber firstAvailableSeqNumber +
14970 * | |
14971 * +---------------+---------------+---------------+---------------+
14972 * | |
14973 * + SequenceNumber lastSeqNumber +
14974 * | |
14975 * +---------------+---------------+---------------+---------------+
14976 * | long counter |
14977 * +---------------+---------------+---------------+---------------+
14978 *
14979 * Notes:
14980 * - on RTPS 1.0, counter is not present
14981 * - on RTPS 1.0, L flag is not present
14982 *
14983 * RTPS 1.2/2.0:
14984 * 0...2...........7...............15.............23...............31
14985 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
14986 * | HEARTBEAT |X|X|X|X|X|X|F|E| octetsToNextHeader |
14987 * +---------------+---------------+---------------+---------------+
14988 * | EntityId readerEntityId |
14989 * +---------------+---------------+---------------+---------------+
14990 * | EntityId writerEntityId |
14991 * +---------------+---------------+---------------+---------------+
14992 * | |
14993 * + SequenceNumber firstAvailableSeqNumber +
14994 * | |
14995 * +---------------+---------------+---------------+---------------+
14996 * | |
14997 * + SequenceNumber lastSeqNumber +
14998 * | |
14999 * +---------------+---------------+---------------+---------------+
15000 * | Counter count |
15001 * +---------------+---------------+---------------+---------------+
15002 */
15003 proto_item *octet_item;
15004 uint32_t wid;
15005 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, HEARTBEAT_FLAGS, flags);
15006
15007 octet_item = proto_tree_add_item(tree,
15008 hf_rtps_sm_octets_to_next_header,
15009 tvb,
15010 offset + 2,
15011 2,
15012 encoding);
15013
15014 if ((octets_to_next_header < 24) && (version <= 0x0101)) {
15015 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= 24)");
15016 return;
15017 }
15018 else if (octets_to_next_header < 28) {
15019 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= 28)");
15020 return;
15021 }
15022
15023 offset += 4;
15024
15025 /* readerEntityId */
15026 rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_rdentity_id, hf_rtps_sm_rdentity_id_key,
15027 hf_rtps_sm_rdentity_id_kind, ett_rtps_rdentity, "readerEntityId", NULL((void*)0));
15028 offset += 4;
15029
15030 /* writerEntityId */
15031 rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key,
15032 hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", &wid);
15033 offset += 4;
15034 guid->entity_id = wid;
15035 guid->fields_present |= GUID_HAS_ENTITY_ID0x00000008;
15036 rtps_util_add_topic_info(tree, pinfo, tvb, offset, guid);
15037
15038 /* First available Sequence Number */
15039 rtps_util_add_seq_number(tree, tvb, offset, encoding, "firstAvailableSeqNumber");
15040 offset += 8;
15041
15042 /* Last Sequence Number */
15043 rtps_util_add_seq_number(tree, tvb, offset, encoding, "lastSeqNumber");
15044 offset += 8;
15045
15046 /* Counter: it was not present in RTPS 1.0 */
15047 if (version >= 0x0101) {
15048 proto_tree_add_item(tree, hf_rtps_heartbeat_count, tvb, offset, 4, encoding);
15049 }
15050}
15051
15052/* *********************************************************************** */
15053/* * H E A R T B E A T _ B A T C H * */
15054/* *********************************************************************** */
15055static void dissect_HEARTBEAT_BATCH(tvbuff_t *tvb, packet_info *pinfo, int offset,
15056 uint8_t flags, const unsigned encoding, int octets_to_next_header,
15057 proto_tree *tree, endpoint_guid *guid) {
15058 /*
15059 * 0...2...........7...............15.............23...............31
15060 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
15061 * |HEARTBEAT_BATCH|X|X|X|X|X|L|F|E| octetsToNextHeader |
15062 * +---------------+---------------+---------------+---------------+
15063 * | EntityId readerId |
15064 * +---------------+---------------+---------------+---------------+
15065 * | EntityId writerId |
15066 * +---------------+---------------+---------------+---------------+
15067 * | |
15068 * + SequenceNumber firstBatchSN +
15069 * | |
15070 * +---------------+---------------+---------------+---------------+
15071 * | |
15072 * + SequenceNumber lastBatchSN +
15073 * | |
15074 * +---------------+---------------+---------------+---------------+
15075 * | |
15076 * + SequenceNumber firstSN +
15077 * | |
15078 * +---------------+---------------+---------------+---------------+
15079 * | |
15080 * + SequenceNumber lastSN +
15081 * | |
15082 * +---------------+---------------+---------------+---------------+
15083 * | Count count |
15084 * +---------------+---------------+---------------+---------------+
15085 */
15086 proto_item *octet_item;
15087 uint32_t wid;
15088 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, HEARTBEAT_BATCH_FLAGS, flags);
15089
15090 octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb,
15091 offset + 2, 2, encoding);
15092
15093 if (octets_to_next_header < 36) {
15094 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= 36)");
15095 return;
15096 }
15097
15098 /* Skip decoding the entire packet if (tree == NULL) */
15099 if (tree == NULL((void*)0)) {
15100 return;
15101 }
15102
15103 offset += 4;
15104
15105 /* readerEntityId */
15106 rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_rdentity_id, hf_rtps_sm_rdentity_id_key,
15107 hf_rtps_sm_rdentity_id_kind, ett_rtps_rdentity, "readerEntityId", NULL((void*)0));
15108 offset += 4;
15109
15110 /* writerEntityId */
15111 rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key,
15112 hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", &wid);
15113 offset += 4;
15114 guid->entity_id = wid;
15115 guid->fields_present |= GUID_HAS_ENTITY_ID0x00000008;
15116 rtps_util_add_topic_info(tree, pinfo, tvb, offset, guid);
15117
15118 /* First available Batch Sequence Number */
15119 rtps_util_add_seq_number(tree, tvb, offset, encoding, "firstBatchSN");
15120 offset += 8;
15121
15122 /* Last Batch Sequence Number */
15123 rtps_util_add_seq_number(tree, tvb, offset, encoding, "lastBatchSN");
15124 offset += 8;
15125
15126 /* First available Sequence Number */
15127 rtps_util_add_seq_number(tree, tvb, offset, encoding, "firstSeqNumber");
15128 offset += 8;
15129
15130 /* Last Sequence Number */
15131 rtps_util_add_seq_number(tree, tvb, offset, encoding, "lastSeqNumber");
15132 offset += 8;
15133
15134 /* Counter */
15135 proto_tree_add_item(tree, hf_rtps_heartbeat_batch_count, tvb, offset, 4, encoding);
15136}
15137
15138/* *********************************************************************** */
15139/* * H E A R T B E A T _ V I R T U A L * */
15140/* *********************************************************************** */
15141
15142static void dissect_HEARTBEAT_VIRTUAL(tvbuff_t *tvb, packet_info *pinfo _U___attribute__((unused)), int offset,
15143 uint8_t flags, const unsigned encoding, int octets_to_next_header, proto_tree *tree,
15144 uint16_t vendor_id _U___attribute__((unused)), endpoint_guid *guid) {
15145
15146 /*
15147 * VIRTUAL_HB:
15148 *
15149 * 0...2...........7...............15.............23...............31
15150 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
15151 * | VIRTUAL_HB |X|X|X|X|N|W|V|E| octetsToNextHeader |
15152 * +---------------+---------------+---------------+---------------+
15153 * | EntityId readerId |
15154 * +---------------+---------------+---------------+---------------+
15155 * | EntityId writerId |
15156 * +---------------+---------------+---------------+---------------+
15157 * | Guid_t virtualGUID (V=0 & N=0) |
15158 * + +
15159 * | |
15160 * + +
15161 * | |
15162 * + +
15163 * | |
15164 * +---------------+---------------+---------------+---------------+
15165 * | unsigned long numWriters (W=1) |
15166 * +---------------+---------------+---------------+---------------+
15167 * | |
15168 * ~ WriterVirtualHBList writerVirtualHBList ~
15169 * | |
15170 * +---------------+---------------+---------------+---------------+
15171 * | unsigned long count |
15172 * +---------------+---------------+---------------+---------------+
15173
15174 * WRITER_VIRTUAL_HB:
15175 *
15176 * 0...2...........7...............15.............23...............31
15177 * +---------------+---------------+---------------+---------------+
15178 * | EntityId writerId (W=1) |
15179 * +---------------+---------------+---------------+---------------+
15180 * | unsigned long numVirtualGUIDs (N=0) |
15181 * +---------------+---------------+---------------+---------------+
15182 * | |
15183 * ~ VirtualGUIDHBList virtualGUIDHBList ~
15184 * | |
15185 * +---------------+---------------+---------------+---------------+
15186 *
15187 * VIRTUAL_GUID_HB:
15188 *
15189 * 0...2...........7...............15.............23...............31
15190 * +---------------+---------------+---------------+---------------+
15191 * | Guid_t virtualGUID (V=1) |
15192 * + +
15193 * | |
15194 * + +
15195 * | |
15196 * + +
15197 * | |
15198 * +---------------+---------------+---------------+---------------+
15199 * | |
15200 * + SequenceNumber firstVirtualSN +
15201 * | |
15202 * +---------------+---------------+---------------+---------------+
15203 * | |
15204 * + SequenceNumber lastVirtualSN +
15205 * | |
15206 * +---------------+---------------+---------------+---------------+
15207 * | |
15208 * + SequenceNumber firstRTPSSN +
15209 * | |
15210 * +---------------+---------------+---------------+---------------+
15211 * | |
15212 * + SequenceNumber lastRTPSSN +
15213 * | |
15214 * +---------------+---------------+---------------+---------------+
15215 */
15216
15217 uint32_t num_writers, num_virtual_guids, wid;
15218 int writer_id_offset, virtual_guid_offset = 0, old_offset;
15219 proto_item *octet_item, *ti;
15220
15221 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, HEARTBEAT_VIRTUAL_FLAGS, flags);
15222
15223 octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb,
15224 offset + 2, 2, encoding);
15225
15226 if (octets_to_next_header < 12) {
15227 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", 12);
15228 return;
15229 }
15230 offset += 4;
15231
15232 /* readerEntityId */
15233 rtps_util_add_entity_id(tree,
15234 pinfo, tvb,
15235 offset,
15236 hf_rtps_sm_rdentity_id,
15237 hf_rtps_sm_rdentity_id_key,
15238 hf_rtps_sm_rdentity_id_kind,
15239 ett_rtps_rdentity,
15240 "readerEntityId",
15241 NULL((void*)0));
15242 offset += 4;
15243
15244 /* writerEntityId */
15245 rtps_util_add_entity_id(tree,
15246 pinfo, tvb,
15247 offset,
15248 hf_rtps_sm_wrentity_id,
15249 hf_rtps_sm_wrentity_id_key,
15250 hf_rtps_sm_wrentity_id_kind,
15251 ett_rtps_wrentity,
15252 "writerEntityId",
15253 &wid);
15254 writer_id_offset = offset;
15255 offset += 4;
15256 guid->entity_id = wid;
15257 guid->fields_present |= GUID_HAS_ENTITY_ID0x00000008;
15258 rtps_util_add_topic_info(tree, pinfo, tvb, offset, guid);
15259
15260 /* virtualGUID */
15261 if (!(flags & FLAG_VIRTUAL_HEARTBEAT_V(0x02)) && !(flags & FLAG_VIRTUAL_HEARTBEAT_N(0x08))) {
15262 /*rtps_util_add_generic_guid(tree,
15263 tvb,
15264 offset,
15265 "virtualGUID",
15266 buffer,
15267 MAX_GUID_SIZE);*/
15268 virtual_guid_offset = offset;
15269 offset += 16;
15270 }
15271
15272 /* num_writers */
15273 ti = proto_tree_add_item(tree, hf_rtps_virtual_heartbeat_num_writers, tvb,
15274 offset, 4, encoding);
15275 if (flags & FLAG_VIRTUAL_HEARTBEAT_W(0x04)) {
15276 num_writers = tvb_get_uint32(tvb, offset, encoding);
15277 offset += 4;
15278 } else {
15279 proto_item_set_text(ti, "numWriters: 1");
15280 num_writers = 1;
15281 }
15282
15283 {
15284 /* Deserialize Writers */
15285 proto_tree *sil_tree_writer_list;
15286 uint32_t current_writer_index;
15287
15288 /** Writer list **/
15289 sil_tree_writer_list = proto_tree_add_subtree_format(tree, tvb, offset, -1,
15290 ett_rtps_writer_heartbeat_virtual_list, NULL((void*)0), "Writer List");
15291
15292 current_writer_index = 0;
15293
15294 while (current_writer_index < num_writers) {
15295 proto_tree *sil_tree_writer;
15296 sil_tree_writer = proto_tree_add_subtree_format(sil_tree_writer_list, tvb, offset, -1,
15297 ett_rtps_writer_heartbeat_virtual, NULL((void*)0), "writer[%d]", current_writer_index);
15298
15299 if (num_writers == 1) {
15300 old_offset = offset;
15301 offset = writer_id_offset;
15302 }
15303
15304 rtps_util_add_entity_id(sil_tree_writer,
15305 pinfo, tvb,
15306 offset,
15307 hf_rtps_sm_wrentity_id,
15308 hf_rtps_sm_wrentity_id_key,
15309 hf_rtps_sm_wrentity_id_kind,
15310 ett_rtps_wrentity,
15311 "writerEntityId",
15312 NULL((void*)0));
15313
15314 if (num_writers == 1) {
15315 offset = old_offset;
15316 } else {
15317 offset += 4;
15318 }
15319
15320 if (!(flags & FLAG_VIRTUAL_HEARTBEAT_N(0x08))) {
15321 proto_tree_add_item(sil_tree_writer, hf_rtps_virtual_heartbeat_num_virtual_guids, tvb,
15322 offset, 4, encoding);
15323 num_virtual_guids = tvb_get_uint32(tvb, offset, encoding);
15324 offset += 4;
15325 } else {
15326 num_virtual_guids = 0;
15327 }
15328
15329 /** Virtual GUID list **/
15330 if (num_virtual_guids != 0) {
15331 proto_tree *sil_tree_virtual_guid_list;
15332 uint32_t current_virtual_guid_index;
15333
15334 sil_tree_virtual_guid_list = proto_tree_add_subtree_format(sil_tree_writer, tvb, offset, -1,
15335 ett_rtps_virtual_guid_heartbeat_virtual_list, NULL((void*)0), "Virtual GUID List");
15336
15337 current_virtual_guid_index = 0;
15338
15339 while (current_virtual_guid_index < num_virtual_guids) {
15340 proto_tree *sil_tree_virtual_guid;
15341 sil_tree_virtual_guid = proto_tree_add_subtree_format(sil_tree_virtual_guid_list, tvb, offset, -1,
15342 ett_rtps_virtual_guid_heartbeat_virtual, NULL((void*)0), "virtualGUID[%d]", current_virtual_guid_index);
15343
15344 if (!(flags & FLAG_VIRTUAL_HEARTBEAT_V(0x02))) {
15345 old_offset = offset;
15346 offset = virtual_guid_offset;
15347 }
15348
15349 /*rtps_util_add_generic_guid_v2(sil_tree_virtual_guid,
15350 tvb,
15351 offset,
15352 "virtualGUID",
15353 buffer,
15354 MAX_GUID_SIZE);*/
15355
15356 if (!(flags & FLAG_VIRTUAL_HEARTBEAT_V(0x02))) {
15357 offset = old_offset;
15358 } else {
15359 offset += 16;
15360 }
15361
15362 /* firstVirtualSN */
15363 rtps_util_add_seq_number(sil_tree_virtual_guid,
15364 tvb,
15365 offset,
15366 encoding,
15367 "firstVirtualSN");
15368 offset += 8;
15369
15370 /* lastVirtualSN */
15371 rtps_util_add_seq_number(sil_tree_virtual_guid,
15372 tvb,
15373 offset,
15374 encoding,
15375 "lastVirtualSN");
15376 offset += 8;
15377
15378 /* firstRTPSSN */
15379 rtps_util_add_seq_number(sil_tree_virtual_guid,
15380 tvb,
15381 offset,
15382 encoding,
15383 "firstRTPSSN");
15384 offset += 8;
15385
15386 /* lastRTPSSN */
15387 rtps_util_add_seq_number(sil_tree_virtual_guid,
15388 tvb,
15389 offset,
15390 encoding,
15391 "lastRTPSSN");
15392 offset += 8;
15393
15394 current_virtual_guid_index++;
15395 }
15396 }
15397
15398 current_writer_index++;
15399 }
15400 }
15401
15402 /* Count */
15403 proto_tree_add_item(tree, hf_rtps_virtual_heartbeat_count, tvb, offset, 4, encoding);
15404 }
15405
15406
15407/* *********************************************************************** */
15408/* * H E A R T B E A T _ F R A G * */
15409/* *********************************************************************** */
15410static void dissect_HEARTBEAT_FRAG(tvbuff_t *tvb, packet_info *pinfo, int offset, uint8_t flags,
15411 const unsigned encoding, int octets_to_next_header, proto_tree *tree, endpoint_guid *guid) {
15412 /*
15413 * 0...2...........7...............15.............23...............31
15414 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
15415 * |HEARTBEAT_FRAG |X|X|X|X|X|X|X|E| octetsToNextHeader |
15416 * +---------------+---------------+---------------+---------------+
15417 * | EntityId readerEntityId |
15418 * +---------------+---------------+---------------+---------------+
15419 * | EntityId writerEntityId |
15420 * +---------------+---------------+---------------+---------------+
15421 * | |
15422 * + SequenceNumber writerSeqNumber +
15423 * | |
15424 * +---------------+---------------+---------------+---------------+
15425 * | FragmentNumber lastFragmentNum |
15426 * +---------------+---------------+---------------+---------------+
15427 * | Counter count |
15428 * +---------------+---------------+---------------+---------------+
15429 */
15430 proto_item *octet_item;
15431 uint32_t wid;
15432 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, HEARTBEAT_FRAG_FLAGS, flags);
15433
15434 octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb,
15435 offset + 2, 2, encoding);
15436
15437 if (octets_to_next_header < 24) {
15438 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= 24)");
15439 return;
15440 }
15441
15442 /* Skip decoding the entire packet if (tree == NULL) */
15443 if (tree == NULL((void*)0)) {
15444 return;
15445 }
15446
15447 offset += 4;
15448
15449 /* readerEntityId */
15450 rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_rdentity_id, hf_rtps_sm_rdentity_id_key,
15451 hf_rtps_sm_rdentity_id_kind, ett_rtps_rdentity, "readerEntityId", NULL((void*)0));
15452 offset += 4;
15453
15454 /* writerEntityId */
15455 rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key,
15456 hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", &wid);
15457 offset += 4;
15458 guid->entity_id = wid;
15459 guid->fields_present |= GUID_HAS_ENTITY_ID0x00000008;
15460 rtps_util_add_topic_info(tree, pinfo, tvb, offset, guid);
15461
15462 /* First available Sequence Number */
15463 rtps_util_add_seq_number(tree, tvb, offset, encoding, "writerSeqNumber");
15464 offset += 8;
15465
15466 /* Fragment number */
15467 proto_tree_add_item(tree, hf_rtps_heartbeat_frag_number, tvb, offset, 4, encoding);
15468 offset += 4;
15469
15470 /* Counter */
15471 proto_tree_add_item(tree, hf_rtps_heartbeat_frag_count, tvb, offset, 4, encoding);
15472}
15473
15474/* *********************************************************************** */
15475/* * R T P S _ D A T A * */
15476/* * A N D * */
15477/* * R T P S _ D A T A _ S E S S I O N * */
15478/* *********************************************************************** */
15479static void dissect_RTPS_DATA(tvbuff_t *tvb, packet_info *pinfo, int offset, uint8_t flags,
15480 unsigned encoding, int octets_to_next_header, proto_tree *tree,
15481 uint16_t vendor_id, bool_Bool is_session, endpoint_guid *guid) {
15482 /*
15483 *
15484 * 0...2...........7...............15.............23...............31
15485 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
15486 * | RTPS_DATA |X|X|X|X|K|D|Q|E| octetsToNextHeader |
15487 * +---------------+---------------+---------------+---------------+
15488 * | Flags extraFlags | octetsToInlineQos |
15489 * +---------------+---------------+---------------+---------------+
15490 * | EntityId readerEntityId |
15491 * +---------------+---------------+---------------+---------------+
15492 * | EntityId writerEntityId |
15493 * +---------------+---------------+---------------+---------------+
15494 * | |
15495 * + SequenceNumber writerSeqNum +
15496 * | |
15497 * +---------------+---------------+---------------+---------------+
15498 * | |
15499 * ~ ParameterList inlineQos [only if Q==1] ~
15500 * | |
15501 * +---------------+---------------+---------------+---------------+
15502 * | |
15503 * ~ SerializedData serializedData [only if D==1 || K==1] ~
15504 * | |
15505 * +---------------+---------------+---------------+---------------+
15506 *
15507 * 0...2...........7...............15.............23...............31
15508 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
15509 * |RTPS_DATA_SESSI|X|X|X|X|K|D|Q|E| octetsToNextHeader |
15510 * +---------------+---------------+---------------+---------------+
15511 * | Flags extraFlags | octetsToInlineQos |
15512 * +---------------+---------------+---------------+---------------+
15513 * | EntityId readerEntityId |
15514 * +---------------+---------------+---------------+---------------+
15515 * | EntityId writerEntityId |
15516 * +---------------+---------------+---------------+---------------+
15517 * | |
15518 * + SequenceNumber writerSessionSeqNum +
15519 * | |
15520 * +---------------+---------------+---------------+---------------+
15521 * | |
15522 * + SequenceNumber writerVirtualSeqNum +
15523 * | |
15524 * +---------------+---------------+---------------+---------------+
15525 * | |
15526 * ~ ParameterList inlineQos [only if Q==1] ~
15527 * | |
15528 * +---------------+---------------+---------------+---------------+
15529 * | |
15530 * ~ SerializedData serializedData [only if D==1 || K==1] ~
15531 * | |
15532 * +---------------+---------------+---------------+---------------+
15533 */
15534 int min_len;
15535 int old_offset = offset;
15536 uint32_t writer_wid; /* Writer EntityID */
15537 uint32_t reader_wid = 0;
15538 uint32_t status_info = 0xffffffff;
15539 bool_Bool from_builtin_writer;
15540 proto_item *octet_item;
15541 coherent_set_entity_info coherent_set_entity_info_object = {0};
15542
15543 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, RTPS_DATA_FLAGS, flags);
15544
15545 octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb,
15546 offset + 2, 2, encoding);
15547
15548 /* Calculates the minimum length for this submessage */
15549 min_len = 20;
15550 if (is_session) {
15551 min_len += 8;
15552 bool_Bool* is_data_session_final = wmem_alloc(pinfo->pool, sizeof(bool_Bool));
15553 *is_data_session_final = false0;
15554 p_add_proto_data(pinfo->pool, pinfo, proto_rtps, RTPS_DATA_SESSION_FINAL_PROTODATA_KEY2, is_data_session_final);
15555 }
15556 if ((flags & FLAG_RTPS_DATA_Q(0x02)) != 0) min_len += 4;
15557 if ((flags & FLAG_RTPS_DATA_D(0x04)) != 0) min_len += 4;
15558 if ((flags & FLAG_RTPS_DATA_K(0x08)) != 0) min_len += 4;
15559
15560 if (octets_to_next_header < min_len) {
15561 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", min_len);
15562 return;
15563 }
15564
15565 offset += 4;
15566
15567 /* extraFlags */
15568 proto_tree_add_item(tree, hf_rtps_extra_flags, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
15569 offset += 2;
15570
15571 /* octetsToInlineQos */
15572 proto_tree_add_item(tree, hf_rtps_octets_to_inline_qos, tvb, offset, 2, encoding);
15573 offset += 2;
15574
15575 /* readerEntityId */
15576 rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_rdentity_id, hf_rtps_sm_rdentity_id_key,
15577 hf_rtps_sm_rdentity_id_kind, ett_rtps_rdentity, "readerEntityId", &reader_wid);
15578 offset += 4;
15579
15580 /* writerEntityId */
15581 rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key,
15582 hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", &writer_wid);
15583 offset += 4;
15584 guid->entity_id = writer_wid;
15585 guid->fields_present |= GUID_HAS_ENTITY_ID0x00000008;
15586 rtps_util_add_topic_info(tree, pinfo, tvb, offset, guid);
15587
15588 /* Sequence number */
15589 if (is_session) {
15590 rtps_util_add_seq_number(tree, tvb, offset, encoding, "writerSessionSeqNumber");
15591 offset += 8;
15592
15593 rtps_util_add_seq_number(tree, tvb, offset, encoding, "writerVirtualSeqNumber");
15594 offset += 8;
15595 } else {
15596 coherent_set_entity_info_object.writer_seq_number = rtps_util_add_seq_number(tree, tvb, offset,
15597 encoding, "writerSeqNumber");
15598 coherent_set_entity_info_object.guid = *guid;
15599 offset += 8;
15600 }
15601
15602 /* InlineQos */
15603 if ((flags & FLAG_RTPS_DATA_Q(0x02)) != 0) {
15604 bool_Bool is_inline_qos = true1;
15605 offset = dissect_parameter_sequence(tree, pinfo, tvb, offset, encoding,
15606 octets_to_next_header - (offset - old_offset) + 4,
15607 "inlineQos", 0x0200, &status_info, vendor_id, is_inline_qos, &coherent_set_entity_info_object);
15608 }
15609
15610 /* SerializedData */
15611 if (((flags & FLAG_RTPS_DATA_D(0x04)) != 0) || ((flags & FLAG_RTPS_DATA_K(0x08)) != 0)) {
15612 if (writer_wid == ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_WRITER(0x000200c2)) {
15613 /* Dissect the serialized data as ParticipantMessageData:
15614 * struct ParticipantMessageData {
15615 * KeyHashPrefix_t participantGuidPrefix;
15616 * KeyHashSuffix_t kind;
15617 * sequence<octet> data;
15618 * }
15619 */
15620 proto_tree *rtps_pm_tree;
15621 proto_tree *guid_tree;
15622 uint32_t kind;
15623 uint32_t encapsulation_id, encapsulation_len;
15624 proto_item *ti;
15625 rtps_pm_tree = proto_tree_add_subtree(tree, tvb, offset,
15626 octets_to_next_header - (offset - old_offset) + 4,
15627 ett_rtps_part_message_data, &ti, "ParticipantMessageData");
15628
15629 /* Encapsulation ID */
15630 proto_tree_add_item_ret_uint(rtps_pm_tree, hf_rtps_param_serialize_encap_kind, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &encapsulation_id);
15631 offset += 2;
15632
15633 encoding = get_encapsulation_endianness(encapsulation_id);
15634
15635 /* Encapsulation length (or option) */
15636 proto_tree_add_item_ret_uint(rtps_pm_tree, hf_rtps_param_serialize_encap_len, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &encapsulation_len);
15637 offset += 2;
15638
15639 guid_tree = proto_item_add_subtree(ti, ett_rtps_part_message_data);
15640
15641 rtps_util_add_guid_prefix_v2(guid_tree, tvb, offset, hf_rtps_sm_guid_prefix, hf_rtps_sm_host_id,
15642 hf_rtps_sm_app_id, hf_rtps_sm_instance_id, 0);
15643 offset += 12;
15644
15645 /* Kind */
15646 proto_tree_add_item_ret_uint(guid_tree, hf_rtps_encapsulation_kind, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000, &kind);
15647 offset += 4;
15648
15649 rtps_util_add_seq_octets(rtps_pm_tree, pinfo, tvb, offset, encoding,
15650 octets_to_next_header - (offset - old_offset) + 4, hf_rtps_data_serialize_data);
15651
15652 } else if (writer_wid == ENTITYID_P2P_BUILTIN_PARTICIPANT_STATELESS_WRITER(0x000201c3) || writer_wid == ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_WRITER(0xff0202c3)) {
15653 /* PGM stands for Participant Generic Message */
15654 proto_tree * rtps_pgm_tree, * guid_tree, * message_identity_tree;
15655 proto_item *ti;
15656 uint32_t encapsulation_id, encapsulation_opt;
15657 int32_t alignment_zero;
15658 uint64_t sequence_number;
15659
15660 ti = proto_tree_add_boolean_format(tree, hf_rtps_pgm, tvb, offset,
15661 octets_to_next_header - (offset - old_offset) + 4, true1, "Participant Generic Message");
15662 rtps_pgm_tree = proto_item_add_subtree(ti, ett_rtps_pgm_data);
15663
15664 proto_tree_add_item_ret_uint(rtps_pgm_tree, hf_rtps_param_serialize_encap_kind,
15665 tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &encapsulation_id);
15666 encoding = get_encapsulation_endianness(encapsulation_id);
15667
15668 offset += 2;
15669 proto_tree_add_item_ret_uint(rtps_pgm_tree, hf_rtps_param_serialize_encap_len,
15670 tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &encapsulation_opt);
15671
15672 offset += 2;
15673 alignment_zero = offset;
15674 /* Message Identity */
15675 message_identity_tree = proto_tree_add_subtree(rtps_pgm_tree, tvb, offset,
15676 24 , ett_rtps_message_identity, &ti, "Message Identity");
15677
15678 guid_tree = proto_item_add_subtree(ti, ett_rtps_message_identity);
15679 proto_item_append_text(guid_tree, " (");
15680 rtps_util_add_generic_guid_v2(guid_tree, tvb, offset,
15681 hf_rtps_message_identity_source_guid, hf_rtps_param_host_id, hf_rtps_param_app_id,
15682 hf_rtps_param_instance_id, hf_rtps_param_entity, hf_rtps_param_entity_key,
15683 hf_rtps_param_entity_kind, guid_tree);
15684 offset += 16;
15685
15686 proto_tree_add_item(message_identity_tree, hf_rtps_sm_seq_number, tvb, offset, 8, encoding);
15687
15688 /* This snippet shows the sequence number in the parent tree */
15689 sequence_number = tvb_get_uint64(tvb, offset, encoding);
15690 proto_item_append_text(guid_tree, ", sn: %" PRIu64"l" "u" ")",
15691 sequence_number);
15692 offset += 8;
15693
15694 /* Related Message Identity */
15695 message_identity_tree = proto_tree_add_subtree(rtps_pgm_tree, tvb, offset,
15696 24 , ett_rtps_related_message_identity, &ti, "Related Message Identity");
15697
15698 guid_tree = proto_item_add_subtree(ti, ett_rtps_related_message_identity);
15699 proto_item_append_text(guid_tree, " (");
15700 rtps_util_add_generic_guid_v2(guid_tree, tvb, offset,
15701 hf_rtps_message_identity_source_guid, hf_rtps_param_host_id, hf_rtps_param_app_id,
15702 hf_rtps_param_instance_id, hf_rtps_param_entity, hf_rtps_param_entity_key,
15703 hf_rtps_param_entity_kind, guid_tree);
15704 offset += 16;
15705
15706 proto_tree_add_item(message_identity_tree, hf_rtps_sm_seq_number, tvb,
15707 offset, 8, encoding);
15708
15709 /* This snippet shows the sequence number in the parent tree */
15710 sequence_number = tvb_get_uint64(tvb, offset, encoding);
15711 proto_item_append_text(guid_tree, ", sn: %" PRIu64"l" "u" ")",
15712 sequence_number);
15713 offset += 8;
15714
15715 guid_tree = proto_item_add_subtree(rtps_pgm_tree, ett_rtps_pgm_data);
15716 rtps_util_add_generic_guid_v2(guid_tree, tvb, offset,
15717 hf_rtps_pgm_dst_participant_guid, hf_rtps_param_host_id, hf_rtps_param_app_id,
15718 hf_rtps_param_instance_id, hf_rtps_param_entity, hf_rtps_param_entity_key,
15719 hf_rtps_param_entity_kind, NULL((void*)0));
15720 offset += 16;
15721
15722 guid_tree = proto_item_add_subtree(rtps_pgm_tree, ett_rtps_pgm_data);
15723 rtps_util_add_generic_guid_v2(guid_tree, tvb, offset,
15724 hf_rtps_pgm_dst_endpoint_guid, hf_rtps_param_host_id, hf_rtps_param_app_id,
15725 hf_rtps_param_instance_id, hf_rtps_param_entity, hf_rtps_param_entity_key,
15726 hf_rtps_param_entity_kind, NULL((void*)0));
15727 offset += 16;
15728
15729 guid_tree = proto_item_add_subtree(rtps_pgm_tree, ett_rtps_pgm_data);
15730 rtps_util_add_generic_guid_v2(guid_tree, tvb, offset,
15731 hf_rtps_pgm_src_endpoint_guid, hf_rtps_param_host_id, hf_rtps_param_app_id,
15732 hf_rtps_param_instance_id, hf_rtps_param_entity, hf_rtps_param_entity_key,
15733 hf_rtps_param_entity_kind, NULL((void*)0));
15734 offset += 16;
15735
15736 offset = rtps_util_add_string(rtps_pgm_tree, tvb, offset, hf_rtps_pgm_message_class_id, encoding);
15737
15738 rtps_util_add_data_holder_seq(rtps_pgm_tree, tvb, pinfo, offset,
15739 encoding, alignment_zero);
15740 } else if (writer_wid == ENTITYID_RTI_BUILTIN_LOCATOR_PING_WRITER(0x00020182)) {
15741 proto_tree * locator_ping_tree, *guid_tree;
15742 proto_item *ti;
15743 uint32_t encapsulation_id, encapsulation_opt;
15744
15745 locator_ping_tree = proto_tree_add_subtree(tree, tvb, offset,
15746 octets_to_next_header - (offset - old_offset) + 4,
15747 ett_rtps_locator_ping_tree, &ti, "Locator Ping Message");
15748
15749 /* Encapsulation Id */
15750 proto_tree_add_item_ret_uint(locator_ping_tree, hf_rtps_encapsulation_id,
15751 tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &encapsulation_id);
15752 offset += 2;
15753 encoding = get_encapsulation_endianness(encapsulation_id);
15754
15755 /* Encapsulation length (or option) */
15756 proto_tree_add_item_ret_uint(locator_ping_tree, hf_rtps_encapsulation_options,
15757 tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &encapsulation_opt);
15758 offset += 2;
15759
15760 guid_tree = proto_item_add_subtree(ti, ett_rtps_generic_guid);
15761 rtps_util_add_generic_guid_v2(guid_tree, tvb, offset,
15762 hf_rtps_source_participant_guid, hf_rtps_param_host_id, hf_rtps_param_app_id,
15763 hf_rtps_param_instance_id, hf_rtps_param_entity, hf_rtps_param_entity_key,
15764 hf_rtps_param_entity_kind, NULL((void*)0));
15765 offset += 16;
15766 rtps_util_add_locator_t(locator_ping_tree, pinfo, tvb, offset, encoding,
15767 "Destination Locator");
15768
15769 } else if (writer_wid == ENTITYID_RTI_BUILTIN_SERVICE_REQUEST_WRITER(0x00020082)) {
15770 /*
15771 struct ServiceRequest {
15772 long service_id; //@key
15773 GUID_t instance_id; //@key
15774 sequence<octet> request_body;
15775 }; //@Extensibility EXTENSIBLE_EXTENSIBILITY
15776 */
15777 proto_tree * service_request_tree, * guid_tree;
15778 proto_item *ti;
15779 uint32_t encapsulation_id, encapsulation_opt;
15780 int32_t service_id;
15781
15782 ti = proto_tree_add_boolean_format(tree, hf_rtps_srm, tvb, offset,
15783 octets_to_next_header - (offset - old_offset) + 4,
15784 true1, "Service Request Message");
15785 service_request_tree = proto_item_add_subtree(ti, ett_rtps_service_request_tree);
15786
15787 /* Encapsulation Id */
15788 proto_tree_add_item_ret_uint(service_request_tree, hf_rtps_encapsulation_id,
15789 tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &encapsulation_id);
15790 offset += 2;
15791 encoding = get_encapsulation_endianness(encapsulation_id);
15792 /* Encapsulation length (or option) */
15793 proto_tree_add_item_ret_uint(service_request_tree, hf_rtps_encapsulation_options, tvb,
15794 offset, 2, ENC_BIG_ENDIAN0x00000000, &encapsulation_opt);
15795 offset += 2;
15796
15797 proto_tree_add_item_ret_int(service_request_tree, hf_rtps_srm_service_id, tvb,
15798 offset, 4, encoding, &service_id);
15799 offset += 4;
15800 guid_tree = proto_item_add_subtree(ti, ett_rtps_generic_guid);
15801 rtps_util_add_generic_guid_v2(guid_tree, tvb, offset,
15802 hf_rtps_srm_instance_id, hf_rtps_param_host_id, hf_rtps_param_app_id,
15803 hf_rtps_param_instance_id, hf_rtps_param_entity, hf_rtps_param_entity_key,
15804 hf_rtps_param_entity_kind, NULL((void*)0));
15805 offset += 16;
15806 rtps_util_add_rti_service_request(service_request_tree, pinfo, tvb, offset,
15807 encoding, service_id);
15808
15809 } else {
15810 const char *label;
15811 if (((flags & FLAG_RTPS_DATA_D(0x04)) != 0) || ((flags & FLAG_RTPS_DATA_K(0x08)) == 0)) {
15812 label = "serializedData";
15813 } else if (((flags & FLAG_RTPS_DATA_D(0x04)) == 0) || ((flags & FLAG_RTPS_DATA_K(0x08)) != 0)) {
15814 label = "serializedKey";
15815 } else {
15816 /* D==1 && K==1 */
15817 label = "<invalid or unknown data type>";
15818 }
15819
15820 from_builtin_writer = (((writer_wid & ENTITYKIND_BUILTIN_WRITER_WITH_KEY(0xc2)) == ENTITYKIND_BUILTIN_WRITER_WITH_KEY(0xc2))
15821 || ((writer_wid & ENTITYKIND_BUILTIN_WRITER_NO_KEY(0xc3)) == ENTITYKIND_BUILTIN_WRITER_NO_KEY(0xc3))
15822 || (writer_wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_BOOTSTRAP_WRITER(0x00010082))
15823 || (writer_wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_WRITER(0x00010182)))
15824 || (writer_wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_WRITER(0xff010182))
15825 || (writer_wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_READER(0xff010187)) ? true1 : false0;
15826 /* At the end still dissect the rest of the bytes as raw data */
15827 dissect_serialized_data(tree, pinfo, tvb, offset,
15828 octets_to_next_header - (offset - old_offset) + 4,
15829 label, vendor_id, from_builtin_writer, guid, NOT_A_FRAGMENT(-1));
15830 }
15831 }
15832 rtps_util_detect_coherent_set_end_empty_data_case(&coherent_set_entity_info_object);
15833 generate_status_info(pinfo, writer_wid, status_info);
15834}
15835
15836static void dissect_RTPS_DATA_SESSION(tvbuff_t* tvb, packet_info* pinfo, int offset, uint8_t flags,
15837 unsigned encoding, int octets_to_next_header, proto_tree* tree,
15838 uint16_t vendor_id, endpoint_guid* guid) {
15839 bool_Bool is_data_session_intermediate = false0;
15840 proto_item* ti = NULL((void*)0);
15841
15842 p_set_proto_data(pinfo->pool, pinfo, proto_rtps, RTPS_DATA_SESSION_FINAL_PROTODATA_KEY2, &is_data_session_intermediate);
15843 dissect_RTPS_DATA(tvb, pinfo, offset, flags, encoding, octets_to_next_header,
15844 tree, vendor_id, true1, guid);
15845 ti = proto_tree_add_boolean(tree, hf_rtps_data_session_intermediate, tvb, offset, 0, is_data_session_intermediate);
15846 proto_item_set_generated(ti);
15847}
15848
15849/* *********************************************************************** */
15850/* * R T P S _ D A T A _ F R A G _ [SESSION] * */
15851/* *********************************************************************** */
15852static void dissect_RTPS_DATA_FRAG_kind(tvbuff_t *tvb, packet_info *pinfo, int offset, uint8_t flags,
15853 const unsigned encoding, int octets_to_next_header, proto_tree *tree,
15854 uint16_t vendor_id, bool_Bool is_session, endpoint_guid *guid) {
15855 /*
15856 * There are two kinds of DATA_FRAG, RTPS_DATA_FRAG and RTPS_DATA_FRAG_SESSION
15857 * the only difference is that RTPS_DATA_FRAG_SESSION has an extra sequence number after
15858 * writerSeqNum.
15859 *
15860 * RTPS_DATA_FRAG:
15861 * 0...2...........7...............15.............23...............31
15862 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
15863 * |RTPS_DATA_FRAG |X|X|X|X|X|K|Q|E| octetsToNextHeader |
15864 * +---------------+---------------+---------------+---------------+
15865 * | Flags extraFlags | octetsToInlineQos |
15866 * +---------------+---------------+---------------+---------------+
15867 * | EntityId readerEntityId |
15868 * +---------------+---------------+---------------+---------------+
15869 * | EntityId writerEntityId |
15870 * +---------------+---------------+---------------+---------------+
15871 * | |
15872 * + SequenceNumber writerSeqNum +
15873 * | |
15874 * +---------------+---------------+---------------+---------------+
15875 * | FragmentNumber fragmentStartingNum |
15876 * +---------------+---------------+---------------+---------------+
15877 * | ushort fragmentsInSubmessage | ushort fragmentSize |
15878 * +---------------+---------------+---------------+---------------+
15879 * | unsigned long sampleSize |
15880 * +---------------+---------------+---------------+---------------+
15881 * | |
15882 * ~ ParameterList inlineQos [only if Q==1] ~
15883 * | |
15884 * +---------------+---------------+---------------+---------------+
15885 * | |
15886 * ~ SerializedData serializedData ~
15887 * | |
15888 * +---------------+---------------+---------------+---------------+
15889 *
15890 *
15891 * RTPS_DATA_FRAG_SESSION:
15892 * 0...2...........7...............15.............23...............31
15893 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
15894 * |RTPS.._SESSION |X|X|X|X|X|K|Q|E| octetsToNextHeader |
15895 * +---------------+---------------+---------------+---------------+
15896 * | Flags extraFlags | octetsToInlineQos |
15897 * +---------------+---------------+---------------+---------------+
15898 * | EntityId readerEntityId |
15899 * +---------------+---------------+---------------+---------------+
15900 * | EntityId writerEntityId |
15901 * +---------------+---------------+---------------+---------------+
15902 * | |
15903 * + SequenceNumber writerSeqNum +
15904 * | |
15905 * +---------------+---------------+---------------+---------------+
15906 * | |
15907 * + SequenceNumber virtualSeqNum +
15908 * | |
15909 * +---------------+---------------+---------------+---------------+
15910 * | FragmentNumber fragmentStartingNum |
15911 * +---------------+---------------+---------------+---------------+
15912 * | ushort fragmentsInSubmessage | ushort fragmentSize |
15913 * +---------------+---------------+---------------+---------------+
15914 * | unsigned long sampleSize |
15915 * +---------------+---------------+---------------+---------------+
15916 * | |
15917 * ~ ParameterList inlineQos [only if Q==1] ~
15918 * | |
15919 * +---------------+---------------+---------------+---------------+
15920 * | |
15921 * ~ SerializedData serializedData ~
15922 * | |
15923 * +---------------+---------------+---------------+---------------+
15924
15925
15926 */
15927 int min_len;
15928 int old_offset = offset;
15929 uint64_t sample_seq_number = 0;
15930 uint32_t frag_number = 0, frag_size = 0, sample_size = 0, num_frags = 0;
15931 uint32_t wid; /* Writer EntityID */
15932 bool_Bool from_builtin_writer;
15933 uint32_t status_info = 0xffffffff;
15934 proto_item *octet_item;
15935 coherent_set_entity_info coherent_set_entity_info_object = {0};
15936
15937 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, RTPS_DATA_FRAG_FLAGS, flags);
15938
15939 octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb,
15940 offset + 2, 2, encoding);
15941
15942 /* Calculates the minimum length for this submessage
15943 * RTPS_DATA_FRAG_SESSION len = RTPS_DATA_FRAG len + 8 (extra virtualSequenceNum field).
15944 */
15945 min_len = (is_session)
15946 ? 44
15947 : 36;
15948 if ((flags & FLAG_RTPS_DATA_FRAG_Q(0x02)) != 0) min_len += 4;
15949
15950 if (octets_to_next_header < min_len) {
15951 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", min_len);
15952 return;
15953 }
15954
15955 offset += 4;
15956
15957 /* extraFlags */
15958 proto_tree_add_item(tree, hf_rtps_extra_flags, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
15959 offset += 2;
15960
15961 /* octetsToInlineQos */
15962 proto_tree_add_item(tree, hf_rtps_octets_to_inline_qos, tvb, offset, 2, encoding);
15963 offset += 2;
15964
15965 /* readerEntityId */
15966 rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_rdentity_id, hf_rtps_sm_rdentity_id_key,
15967 hf_rtps_sm_rdentity_id_kind, ett_rtps_rdentity, "readerEntityId", NULL((void*)0));
15968 offset += 4;
15969
15970 /* writerEntityId */
15971 rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key,
15972 hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", &wid);
15973 offset += 4;
15974 guid->entity_id = wid;
15975 guid->fields_present |= GUID_HAS_ENTITY_ID0x00000008;
15976 rtps_util_add_topic_info(tree, pinfo, tvb, offset, guid);
15977
15978
15979 /* Sequence number */
15980 coherent_set_entity_info_object.writer_seq_number = rtps_util_add_seq_number(tree, tvb, offset,
15981 encoding, "writerSeqNumber");
15982 coherent_set_entity_info_object.guid = *guid;
15983 offset += 8;
15984
15985 /* virtual Sequence Number (Only in RTPS_DATA_FRAG_SESSION)*/
15986 if (is_session) {
15987 rtps_util_add_seq_number(tree, tvb, offset, encoding, "virtualSeqNumber");
15988 offset += 8;
15989 }
15990 /* Fragment number */
15991 proto_tree_add_item_ret_uint(tree, hf_rtps_data_frag_number, tvb, offset, 4, encoding, &frag_number);
15992 offset += 4;
15993
15994 /* Fragments in submessage */
15995 proto_tree_add_item_ret_uint(tree, hf_rtps_data_frag_num_fragments, tvb, offset, 2, encoding, &num_frags);
15996 offset += 2;
15997
15998 /* Fragment size */
15999 proto_tree_add_item_ret_uint(tree, hf_rtps_data_frag_size, tvb, offset, 2, encoding, &frag_size);
16000 if (frag_size == 0) {
16001 // A zero fragment size means we don't advance our offset in loops, so
16002 // treat that as invalid.
16003 proto_tree_add_expert_format(tree, pinfo, &ei_rtps_invalid_fragment_size, tvb, offset, 2,
16004 "Invalid fragment size: %u", frag_size);
16005 }
16006 offset += 2;
16007
16008 /* sampleSize */
16009 proto_tree_add_item_ret_uint(tree, hf_rtps_data_frag_sample_size, tvb, offset, 4, encoding, &sample_size);
16010 offset += 4;
16011
16012 /* InlineQos */
16013 if ((flags & FLAG_RTPS_DATA_FRAG_Q(0x02)) != 0) {
16014 bool_Bool is_inline_qos = true1;
16015 offset = dissect_parameter_sequence(tree, pinfo, tvb, offset, encoding,
16016 octets_to_next_header - (offset - old_offset) + 4,
16017 "inlineQos", 0x0200, &status_info, vendor_id, is_inline_qos, &coherent_set_entity_info_object);
16018 }
16019
16020 /* SerializedData */
16021 if (frag_size > 0) {
16022 char label[20];
16023 snprintf(label, 9, "fragment");
16024 if ((flags & FLAG_RTPS_DATA_FRAG_K(0x04)) != 0) {
16025 snprintf(label, 14, "serializedKey");
16026 }
16027 from_builtin_writer = (((wid & ENTITYKIND_BUILTIN_WRITER_WITH_KEY(0xc2)) == ENTITYKIND_BUILTIN_WRITER_WITH_KEY(0xc2))
16028 || ((wid & ENTITYKIND_BUILTIN_WRITER_NO_KEY(0xc3)) == ENTITYKIND_BUILTIN_WRITER_NO_KEY(0xc3))
16029 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_BOOTSTRAP_WRITER(0x00010082))
16030 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_WRITER(0x00010182)))
16031 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_WRITER(0xff010182))
16032 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_READER(0xff010187)) ? true1 : false0;
16033
16034 uint32_t frag_index_in_submessage = 0, this_frag_number = 0, this_frag_size = 0, fragment_offset = 0;
16035 bool_Bool more_fragments = false0;
16036 if (enable_rtps_reassembly) {
16037 tvbuff_t* new_tvb = NULL((void*)0);
16038 fragment_head *frag_msg = NULL((void*)0);
16039 while(frag_index_in_submessage < num_frags) {
16040 this_frag_number = frag_number + frag_index_in_submessage;
16041 more_fragments = (this_frag_number * frag_size < sample_size);
16042 this_frag_size = more_fragments ? frag_size : (sample_size - ((this_frag_number - 1) * frag_size));
16043 fragment_offset = this_frag_number == 1 ? 0 : (((this_frag_number - 1) * frag_size));
16044 pinfo->fragmented = true1;
16045 frag_msg = fragment_add_check(&rtps_reassembly_table,
16046 tvb, offset, pinfo,
16047 (uint32_t)sample_seq_number, /* ID for fragments belonging together */
16048 (void *)guid, /* make sure only fragments from the same writer are considered for reassembly */
16049 fragment_offset, /* fragment offset */
16050 this_frag_size, /* fragment length */
16051 more_fragments); /* More fragments? */
16052
16053 new_tvb = process_reassembled_data(tvb, offset + (frag_index_in_submessage * frag_size), pinfo,
16054 "Reassembled sample", frag_msg, &rtps_frag_items,
16055 NULL((void*)0), tree);
16056
16057 if (frag_index_in_submessage == 0) {
16058 generate_status_info(pinfo, wid, status_info);
16059 if (frag_msg) { /* Reassembled */
16060 col_append_str(pinfo->cinfo, COL_INFO, " [Reassembled]");
16061 } else { /* Not last packet of reassembled Short Message */
16062 col_append_str(pinfo->cinfo, COL_INFO," [RTPS fragment]");
16063 }
16064 }
16065
16066 if (new_tvb) {
16067 snprintf(label, 19, "reassembled sample");
16068 dissect_serialized_data(tree, pinfo, new_tvb, 0,
16069 sample_size, label, vendor_id, from_builtin_writer, guid, NOT_A_FRAGMENT(-1));
16070 break;
16071 } else {
16072 snprintf(label, 15, "fragment [%d]", frag_index_in_submessage);
16073 dissect_serialized_data(tree, pinfo, tvb, offset + (frag_index_in_submessage * frag_size),
16074 this_frag_size, label, vendor_id, from_builtin_writer, NULL((void*)0), this_frag_number);
16075 }
16076 frag_index_in_submessage++;
16077 }
16078 } else {
16079 while (frag_index_in_submessage < num_frags) {
16080 this_frag_number = frag_number + frag_index_in_submessage;
16081 more_fragments = (this_frag_number * frag_size < sample_size);
16082 this_frag_size = more_fragments ? frag_size : (sample_size - ((this_frag_number - 1) * frag_size));
16083 fragment_offset = frag_index_in_submessage * frag_size;
16084 snprintf(label, 20, "fragment [%d]", frag_index_in_submessage);
16085 dissect_serialized_data(tree, pinfo, tvb, offset + fragment_offset,
16086 this_frag_size, label, vendor_id, from_builtin_writer, NULL((void*)0), this_frag_number);
16087 frag_index_in_submessage++;
16088 }
16089 generate_status_info(pinfo, wid, status_info);
16090 }
16091 }
16092 rtps_util_detect_coherent_set_end_empty_data_case(&coherent_set_entity_info_object);
16093}
16094
16095/* *********************************************************************** */
16096/* * R T P S _ D A T A _ B A T C H * */
16097/* *********************************************************************** */
16098static void dissect_RTPS_DATA_BATCH(tvbuff_t *tvb, packet_info *pinfo, int offset,
16099 uint8_t flags, const unsigned encoding, int octets_to_next_header,
16100 proto_tree *tree, uint16_t vendor_id, endpoint_guid *guid) {
16101 /*
16102 *
16103 * 0...2...........7...............15.............23...............31
16104 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
16105 * |RTPS_DATA_BATCH|X|X|X|X|X|X|Q|E| octetsToNextHeader |
16106 * +---------------+---------------+---------------+---------------+
16107 * | Flags extraFlags | octetsToInlineQos |
16108 * +---------------+---------------+---------------+---------------+
16109 * | EntityId readerId |
16110 * +---------------+---------------+---------------+---------------+
16111 * | EntityId writerId |
16112 * +---------------+---------------+---------------+---------------+
16113 * | |
16114 * + SequenceNumber batchSN +
16115 * | |
16116 * +---------------+---------------+---------------+---------------+
16117 * | |
16118 * + SequenceNumber firstSampleSN +
16119 * | |
16120 * +---------------+---------------+---------------+---------------+
16121 * | SequenceNumberOffset offsetToLastSampleSN |
16122 * +---------------+---------------+---------------+---------------+
16123 * | unsigned long batchSampleCount |
16124 * +---------------+---------------+---------------+---------------+
16125 * | |
16126 * ~ ParameterList batchInlineQos [only if Q==1] ~
16127 * | |
16128 * +---------------+---------------+---------------+---------------+
16129 * | unsigned long octetsToSLEncapsulationId |
16130 * +---------------+---------------+---------------+---------------+
16131 * | |
16132 * ~ SampleInfoList sampleInfoList ~
16133 * | |
16134 * +---------------+---------------+---------------+---------------+
16135 * | SampleListEncapsulationId | |
16136 * +---------------+---------------+---------------+---------------+
16137 * | |
16138 * ~ SampleList sampleList ~
16139 * | |
16140 * +---------------+---------------+---------------+---------------+
16141 *
16142 *
16143 * SampleInfo:
16144 * 0...............8..............16..............24..............32
16145 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
16146 * |X|X|X|X|X|X|X|X|X|X|K|I|D|O|Q|T| octetsToInlineQoS |
16147 * +---------------+---------------+---------------+---------------+
16148 * | unsigned long serializedDataLength |
16149 * +---------------+---------------+---------------+---------------+
16150 * | |
16151 * + Timestamp timestamp [only if T==1] +
16152 * | |
16153 * +---------------+---------------+---------------+---------------+
16154 * | SequenceNumberOffset offsetSN [only if O==1] |
16155 * +---------------+---------------+---------------+---------------+
16156 * | |
16157 * ~ ParameterList sampleInlineQos [only if Q==1] ~
16158 * | |
16159 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
16160 *
16161 *
16162 * Sample:
16163 * 0...............8..............16..............24..............32
16164 * +---------------+---------------+---------------+---------------+
16165 * | |
16166 * ~ SerializedData serializedData [sampleInfo D==1 || K==1] ~
16167 * | |
16168 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
16169 */
16170
16171 int min_len;
16172 int old_offset = offset;
16173 uint32_t wid; /* Writer EntityID */
16174 uint32_t status_info = 0xffffffff;
16175 int32_t octetsToSLEncapsulationId;
16176 int32_t sampleListOffset;
16177 uint16_t encapsulation_id;
16178 bool_Bool try_dissection_from_type_object = false0;
16179 uint16_t *sample_info_flags = NULL((void*)0);
16180 uint32_t *sample_info_length = NULL((void*)0);
16181 int32_t sample_info_count = 0,
16182 sample_info_max = rtps_max_batch_samples_dissected;
16183 proto_item *octet_item;
16184 rtps_dissector_data * data = NULL((void*)0);
16185 bool_Bool is_compressed = false0;
16186 bool_Bool uncompressed_ok = false0;
16187 proto_tree *compressed_subtree = NULL((void*)0);
16188 tvbuff_t *data_holder_tvb = tvb;
16189 tvbuff_t *compressed_tvb = NULL((void*)0);
16190 proto_tree *dissected_data_holder_tree = tree;
16191
16192
16193 data = wmem_new(pinfo->pool, rtps_dissector_data)((rtps_dissector_data*)wmem_alloc((pinfo->pool), sizeof(rtps_dissector_data
)))
;
16194 data->encapsulation_id = 0;
16195
16196 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, RTPS_DATA_BATCH_FLAGS, flags);
16197
16198 octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb,
16199 offset + 2, 2, encoding);
16200
16201 /* Calculates the minimum length for this submessage */
16202 min_len = 44;
16203 if ((flags & FLAG_RTPS_DATA_BATCH_Q(0x02)) != 0) min_len += 4;
16204
16205 if (octets_to_next_header < min_len) {
16206 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", min_len);
16207 return;
16208 }
16209
16210 offset += 4;
16211
16212 /* extraFlags */
16213 proto_tree_add_item(tree, hf_rtps_extra_flags, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
16214 offset += 2;
16215
16216 /* octetsToInlineQos */
16217 proto_tree_add_item(tree, hf_rtps_octets_to_inline_qos, tvb, offset, 2, encoding);
16218 offset += 2;
16219
16220
16221 /* readerEntityId */
16222 rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_rdentity_id, hf_rtps_sm_rdentity_id_key,
16223 hf_rtps_sm_rdentity_id_kind, ett_rtps_rdentity, "readerEntityId", NULL((void*)0));
16224 offset += 4;
16225
16226 /* writerEntityId */
16227 rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key,
16228 hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", &wid);
16229 offset += 4;
16230 guid->entity_id = wid;
16231 guid->fields_present |= GUID_HAS_ENTITY_ID0x00000008;
16232 rtps_util_add_topic_info(tree, pinfo, tvb, offset, guid);
16233
16234
16235 /* Batch sequence number */
16236 rtps_util_add_seq_number(tree, tvb, offset, encoding, "batchSeqNumber");
16237 offset += 8;
16238
16239 /* First sample sequence number */
16240 rtps_util_add_seq_number(tree, tvb, offset, encoding, "firstSampleSeqNumber");
16241 offset += 8;
16242
16243 /* offsetToLastSampleSN */
16244 proto_tree_add_item(tree, hf_rtps_data_batch_offset_to_last_sample_sn, tvb, offset, 4, encoding);
16245 offset += 4;
16246
16247 /* batchSampleCount */
16248 proto_tree_add_item(tree, hf_rtps_data_batch_sample_count, tvb, offset, 4, encoding);
16249 offset += 4;
16250
16251 /* Parameter list (if Q==1) */
16252 /* InlineQos */
16253 if ((flags & FLAG_RTPS_DATA_BATCH_Q(0x02)) != 0) {
16254 offset = dissect_parameter_sequence(tree, pinfo, tvb, offset, encoding,
16255 octets_to_next_header - (offset - old_offset) + 4,
16256 "batchInlineQos", 0x0200, &status_info, vendor_id, false0, NULL((void*)0));
16257 }
16258
16259 /* octetsToSLEncapsulationId */
16260 proto_tree_add_item_ret_uint(tree, hf_rtps_data_batch_octets_to_sl_encap_id, tvb,
16261 offset, 4, encoding, &octetsToSLEncapsulationId);
16262 offset += 4;
16263 sampleListOffset = offset + octetsToSLEncapsulationId;
16264
16265
16266 /* Sample info list */
16267 {
16268 proto_item *ti, *list_item;
16269 proto_tree *sil_tree;
16270 sample_info_count = 0;
16271
16272 sil_tree = proto_tree_add_subtree(tree, tvb, offset, octetsToSLEncapsulationId,
16273 ett_rtps_sample_info_list, &list_item, "Sample Info List");
16274
16275 /* Allocate sample_info_flags and sample_info_length
16276 * to store a copy of the flags for each sample info */
16277 if (rtps_max_batch_samples_dissected == 0) {
16278 sample_info_max = 1024; /* Max size of sampleInfo shown */
16279 }
16280 sample_info_flags = (uint16_t *)wmem_alloc(pinfo->pool, sizeof(uint16_t) *sample_info_max);
16281 sample_info_length = (uint32_t *)wmem_alloc(pinfo->pool, sizeof(uint32_t) *sample_info_max);
16282
16283 /* Sample Info List: start decoding the sample info list until the offset
16284 * is greater or equal than 'sampleListOffset' */
16285 while (offset < sampleListOffset) {
16286 uint16_t flags2;
16287 /*uint16_t octetsToInlineQos;*/
16288 int min_length;
16289 proto_tree *si_tree;
16290 int offset_begin_sampleinfo = offset;
16291
16292 if (rtps_max_batch_samples_dissected > 0 && (unsigned)sample_info_count >= rtps_max_batch_samples_dissected) {
16293 expert_add_info(pinfo, list_item, &ei_rtps_more_samples_available);
16294 offset = sampleListOffset;
16295 break;
16296 }
16297
16298 si_tree = proto_tree_add_subtree_format(sil_tree, tvb, offset, -1, ett_rtps_sample_info, &ti, "sampleInfo[%d]", sample_info_count);
16299
16300 flags2 = tvb_get_ntohs(tvb, offset); /* Flags are always big endian */
16301 sample_info_flags[sample_info_count] = flags2;
16302 proto_tree_add_bitmask_value(si_tree, tvb, offset, hf_rtps_sm_flags2, ett_rtps_flags, RTPS_SAMPLE_INFO_FLAGS16, flags2);
16303 offset += 2;
16304 proto_tree_add_item(si_tree, hf_rtps_data_batch_octets_to_inline_qos, tvb,
16305 offset, 2, encoding);
16306 offset += 2;
16307
16308 min_length = 4;
16309 if ((flags2 & FLAG_SAMPLE_INFO_T(0x01)) != 0) min_len += 8;
16310 if ((flags2 & FLAG_SAMPLE_INFO_Q(0x02)) != 0) min_len += 4;
16311 if ((flags2 & FLAG_SAMPLE_INFO_O(0x04)) != 0) min_len += 4;
16312
16313 /* Ensure there are enough bytes to decode */
16314 if (sampleListOffset - offset < min_length) {
16315 expert_add_info_format(pinfo, ti, &ei_rtps_parameter_value_invalid, "Error: not enough bytes to dissect sample info");
16316 return;
16317 }
16318
16319 /* Serialized data length */
16320 proto_tree_add_item_ret_uint(si_tree, hf_rtps_data_batch_serialized_data_length, tvb,
16321 offset, 4, encoding, &sample_info_length[sample_info_count]);
16322 offset += 4;
16323
16324 /* Timestamp [only if T==1] */
16325 if ((flags2 & FLAG_SAMPLE_INFO_T(0x01)) != 0) {
16326 rtps_util_add_timestamp(si_tree, tvb, offset, encoding, hf_rtps_data_batch_timestamp);
16327 offset += 8;
16328 }
16329
16330 /* Offset SN [only if O==1] */
16331 if ((flags2 & FLAG_SAMPLE_INFO_O(0x04)) != 0) {
16332 proto_tree_add_item(si_tree, hf_rtps_data_batch_offset_sn, tvb, offset, 4, encoding);
16333 offset += 4;
16334 }
16335
16336 /* Parameter list [only if Q==1] */
16337 if ((flags2 & FLAG_SAMPLE_INFO_Q(0x02)) != 0) {
16338 offset = dissect_parameter_sequence(si_tree, pinfo, tvb, offset, encoding,
16339 octets_to_next_header - (offset - old_offset) + 4,
16340 "sampleInlineQos", 0x0200, &status_info, vendor_id, false0, NULL((void*)0));
16341 }
16342 proto_item_set_len(ti, offset - offset_begin_sampleinfo);
16343 sample_info_count++;
16344 } /* while (offset < sampleListOffset) */
16345 }
16346
16347 /* Dissects the encapsulated data heder and uncompress the tvb if it is compressed and
16348 it can be uncompressed */
16349 offset = rtps_prepare_encapsulated_data(
16350 tree,
16351 pinfo,
16352 tvb,
16353 offset,
16354 tvb_reported_length(tvb) - offset,
16355 true1,
16356 &encapsulation_id,
16357 NULL((void*)0),
16358 NULL((void*)0),
16359 NULL((void*)0),
16360 NULL((void*)0),
16361 &is_compressed,
16362 &uncompressed_ok,
16363 &compressed_tvb,
16364 &compressed_subtree);
16365 data->encapsulation_id = encapsulation_id;
16366 if (is_compressed && uncompressed_ok) {
16367 data_holder_tvb = compressed_tvb;
16368 offset = 0;
16369 dissected_data_holder_tree = compressed_subtree;
16370 octets_to_next_header = tvb_reported_length(data_holder_tvb);
16371 old_offset = 0;
16372 }
16373
16374 /* If it is compressed but not uncompressed don't try to dissect */
16375 if (is_compressed == uncompressed_ok) {
16376 /* Now the list of serialized data:
16377 * Serialized data is allocated one after another one.
16378 * We need to use the data previously stored in the sampleInfo to detect the
16379 * kind and size.
16380 * - sample_info_flags -> Array of uint16_t holding the flags for this sample info
16381 * - sample_info_length -> Array of uint32_t with the size of this sample info
16382 * - sample_info_count -> size of the above arrays
16383 * This section will NEVER dissect more than 'sample_info_count'.
16384 * Note, if there are not enough bytes in the buffer, don't dissect it (this
16385 * can happen for example when a DISPOSE message is sent, there are sample
16386 * info records, but the payload size is zero for all of them)
16387 */
16388 if ((octets_to_next_header - (offset - old_offset) > 0)) {
16389 proto_item *ti;
16390 proto_tree *sil_tree;
16391 int count = 0;
16392
16393 sil_tree = proto_tree_add_subtree(
16394 dissected_data_holder_tree,
16395 data_holder_tvb,
16396 offset,
16397 -1,
16398 ett_rtps_sample_batch_list,
16399 &ti,
16400 "Serialized Sample List");
16401 for (count = 0; count < sample_info_count; ++count) {
16402 /* Ensure there are enough bytes in the buffer to dissect the next sample */
16403 if (octets_to_next_header - (offset - old_offset) + 4 < (int)sample_info_length[count]) {
16404 expert_add_info_format(pinfo, ti, &ei_rtps_parameter_value_invalid, "Error: not enough bytes to dissect sample");
16405 return;
16406 }
16407 /* We have enough bytes to dissect the next sample, so we update the rtps_dissector_data
16408 * "position in the batch" value and dissect the sample
16409 */
16410 data->position_in_batch = count;
16411 if (encapsulation_id == ENCAPSULATION_CDR_LE(0x0001) ||
16412 encapsulation_id == ENCAPSULATION_CDR_BE(0x0000) ||
16413 encapsulation_id == ENCAPSULATION_CDR2_LE(0x0007) ||
16414 encapsulation_id == ENCAPSULATION_CDR2_BE(0x0006) ||
16415 encapsulation_id == ENCAPSULATION_PL_CDR_LE(0x0003) ||
16416 encapsulation_id == ENCAPSULATION_PL_CDR_BE(0x0002)) {
16417 try_dissection_from_type_object = true1;
16418 }
16419 if ((sample_info_flags[count] & FLAG_SAMPLE_INFO_K(0x20)) != 0) {
16420 proto_tree_add_bytes_format(sil_tree, hf_rtps_serialized_key,
16421 data_holder_tvb, offset, sample_info_length[count], NULL((void*)0), "serializedKey[%d]", count);
16422 } else {
16423 if (!rtps_util_try_dissector(
16424 sil_tree, pinfo, data_holder_tvb, offset, guid, data, get_encapsulation_endianness(encapsulation_id), get_encapsulation_version(encapsulation_id), try_dissection_from_type_object)) {
16425 proto_tree_add_bytes_format(sil_tree, hf_rtps_serialized_data,
16426 data_holder_tvb, offset, sample_info_length[count], NULL((void*)0), "serializedData[%d]", count);
16427 }
16428 }
16429 offset += sample_info_length[count];
16430 }
16431 }
16432 }
16433 generate_status_info(pinfo, wid, status_info);
16434}
16435
16436/* *********************************************************************** */
16437/* * G A P * */
16438/* *********************************************************************** */
16439static void dissect_GAP(tvbuff_t *tvb, packet_info *pinfo, int offset,
16440 uint8_t flags, const unsigned encoding, int octets_to_next_header,
16441 proto_tree *tree, endpoint_guid *guid) {
16442 /* RTPS 1.0/1.1:
16443 * 0...2...........7...............15.............23...............31
16444 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
16445 * | GAP |X|X|X|X|X|X|X|E| octetsToNextHeader |
16446 * +---------------+---------------+---------------+---------------+
16447 * | ObjectId readerObjectId |
16448 * +---------------+---------------+---------------+---------------+
16449 * | ObjectId writerObjectId |
16450 * +---------------+---------------+---------------+---------------+
16451 * | |
16452 * + SequenceNumber firstSeqNumber +
16453 * | |
16454 * +---------------+---------------+---------------+---------------+
16455 * | |
16456 * + Bitmap bitmap +
16457 * | |
16458 * +---------------+---------------+---------------+---------------+
16459 *
16460 * RTPS 1.2/2.0
16461 * 0...2...........7...............15.............23...............31
16462 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
16463 * | GAP |X|X|X|X|X|X|F|E| octetsToNextHeader |
16464 * +---------------+---------------+---------------+---------------+
16465 * | EntityId readerEntityId |
16466 * +---------------+---------------+---------------+---------------+
16467 * | EntityId writerEntityId |
16468 * +---------------+---------------+---------------+---------------+
16469 * | |
16470 * + SequenceNumber gapStart +
16471 * | |
16472 * +---------------+---------------+---------------+---------------+
16473 * | |
16474 * ~ SequenceNumberSet gapList ~
16475 * | |
16476 * +---------------+---------------+---------------+---------------+
16477 */
16478 proto_item *octet_item;
16479 uint32_t wid;
16480 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, GAP_FLAGS, flags);
16481
16482 octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb,
16483 offset + 2, 2, encoding);
16484
16485 if (octets_to_next_header < 24) {
16486 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= 24)");
16487 return;
16488 }
16489
16490 offset += 4;
16491
16492 /* readerEntityId */
16493 rtps_util_add_entity_id(tree, pinfo, tvb, offset,
16494 hf_rtps_sm_rdentity_id, hf_rtps_sm_rdentity_id_key, hf_rtps_sm_rdentity_id_kind,
16495 ett_rtps_rdentity, "readerEntityId", NULL((void*)0));
16496 offset += 4;
16497
16498 /* writerEntityId */
16499 rtps_util_add_entity_id(tree, pinfo, tvb, offset,
16500 hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key, hf_rtps_sm_wrentity_id_kind,
16501 ett_rtps_wrentity, "writerEntityId", &wid);
16502 offset += 4;
16503 guid->entity_id = wid;
16504 guid->fields_present |= GUID_HAS_ENTITY_ID0x00000008;
16505 rtps_util_add_topic_info(tree, pinfo, tvb, offset, guid);
16506
16507
16508 /* First Sequence Number */
16509 rtps_util_add_seq_number(tree, tvb, offset, encoding, "gapStart");
16510 offset += 8;
16511
16512 /* Bitmap */
16513 rtps_util_add_bitmap(tree, pinfo, tvb, offset, encoding, "gapList", false0);
16514}
16515
16516
16517/* *********************************************************************** */
16518/* * I N F O _ T S * */
16519/* *********************************************************************** */
16520static void dissect_INFO_TS(tvbuff_t *tvb, packet_info *pinfo, int offset, uint8_t flags,
16521 const unsigned encoding, int octets_to_next_header, proto_tree *tree) {
16522 /* RTPS 1.0/1.1:
16523 * 0...2...........7...............15.............23...............31
16524 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
16525 * | INFO_TS |X|X|X|X|X|X|I|E| octetsToNextHeader |
16526 * +---------------+---------------+---------------+---------------+
16527 * | |
16528 * + NtpTime ntpTimestamp [only if I==0] +
16529 * | |
16530 * +---------------+---------------+---------------+---------------+
16531 *
16532 * RTPS 1.2/2.0:
16533 * 0...2...........7...............15.............23...............31
16534 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
16535 * | INFO_TS |X|X|X|X|X|X|T|E| octetsToNextHeader |
16536 * +---------------+---------------+---------------+---------------+
16537 * | |
16538 * + Timestamp timestamp [only if T==1] +
16539 * | |
16540 * +---------------+---------------+---------------+---------------+
16541 */
16542
16543 int min_len;
16544 proto_item *octet_item;
16545
16546 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, INFO_TS_FLAGS, flags);
16547
16548 octet_item = proto_tree_add_item(tree,
16549 hf_rtps_sm_octets_to_next_header,
16550 tvb,
16551 offset + 2,
16552 2,
16553 encoding);
16554
16555 min_len = 0;
16556 if ((flags & FLAG_INFO_TS_T(0x02)) == 0) min_len += 8;
16557
16558 if (octets_to_next_header != min_len) {
16559 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be == %u)", min_len);
16560 return;
16561 }
16562
16563 offset += 4;
16564
16565 if ((flags & FLAG_INFO_TS_T(0x02)) == 0) {
16566 rtps_util_add_timestamp(tree,
16567 tvb,
16568 offset,
16569 encoding,
16570 hf_rtps_info_ts_timestamp);
16571 }
16572}
16573
16574
16575/* *********************************************************************** */
16576/* * I N F O _ S R C * */
16577/* *********************************************************************** */
16578static void dissect_INFO_SRC(tvbuff_t *tvb, packet_info *pinfo, int offset, uint8_t flags,
16579 const unsigned encoding, int octets_to_next_header, proto_tree *tree, uint16_t rtps_version) {
16580 /* RTPS 1.0/1.1:
16581 * 0...2...........7...............15.............23...............31
16582 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
16583 * | INFO_SRC |X|X|X|X|X|X|X|E| octetsToNextHeader |
16584 * +---------------+---------------+---------------+---------------+
16585 * | IPAddress appIpAddress |
16586 * +---------------+---------------+---------------+---------------+
16587 * | ProtocolVersion version | VendorId vendor |
16588 * +---------------+---------------+---------------+---------------+
16589 * | HostId hostId |
16590 * +---------------+---------------+---------------+---------------+
16591 * | AppId appId |
16592 * +---------------+---------------+---------------+---------------+
16593 *
16594 * RTPS 1.2/2.0:
16595 * 0...2...........7...............15.............23...............31
16596 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
16597 * | INFO_SRC |X|X|X|X|X|X|X|E| octetsToNextHeader |
16598 * +---------------+---------------+---------------+---------------+
16599 * | long unused |
16600 * +---------------+---------------+---------------+---------------+
16601 * | ProtocolVersion version | VendorId vendor |
16602 * +---------------+---------------+---------------+---------------+
16603 * | |
16604 * + GuidPrefix guidPrefix +
16605 * | |
16606 * +---------------+---------------+---------------+---------------+
16607 */
16608 proto_item *octet_item;
16609 uint16_t version;
16610
16611 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, INFO_SRC_FLAGS, flags);
16612
16613 octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb,
16614 offset + 2, 2, encoding);
16615
16616 if (rtps_version < 0x0200) {
16617 if (octets_to_next_header != 16) {
16618 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be == 16)");
16619 return;
16620 }
16621 } else {
16622 if (octets_to_next_header != 20) {
16623 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be == 20)");
16624 return;
16625 }
16626 }
16627
16628 offset += 4;
16629
16630 /* Use version field to determine what to display */
16631 version = tvb_get_ntohs(tvb, offset+4);
16632 if (version < 0x102) {
16633 proto_tree_add_item(tree, hf_rtps_info_src_ip, tvb, offset, 4, encoding);
16634 } else {
16635 proto_tree_add_item(tree, hf_rtps_info_src_unused, tvb, offset, 4, encoding);
16636 }
16637
16638 offset += 4;
16639
16640 rtps_util_add_protocol_version(tree, tvb, offset);
16641 offset += 2;
16642
16643 /* Vendor ID */
16644 rtps_util_add_vendor_id(tree, tvb, offset);
16645 offset += 2;
16646
16647 if (rtps_version < 0x0200) {
16648 rtps_util_add_guid_prefix_v1(tree, pinfo, tvb, offset,
16649 hf_rtps_sm_guid_prefix_v1, hf_rtps_sm_host_id, hf_rtps_sm_app_id,
16650 hf_rtps_sm_instance_id_v1, hf_rtps_sm_app_kind,
16651 NULL((void*)0)); /* Use default 'guidPrefix' */
16652 } else {
16653 rtps_util_add_guid_prefix_v2(tree, tvb, offset, hf_rtps_guid_prefix_src,
16654 hf_rtps_host_id, hf_rtps_app_id, hf_rtps_sm_instance_id, hf_rtps_guid_prefix);
16655 }
16656}
16657
16658
16659/* *********************************************************************** */
16660/* * I N F O _ R E P L Y _ I P 4 * */
16661/* *********************************************************************** */
16662static void dissect_INFO_REPLY_IP4(tvbuff_t *tvb, packet_info *pinfo, int offset, uint8_t flags,
16663 const unsigned encoding, int octets_to_next_header, proto_tree *tree) {
16664 /* RTPS 1.0/1.1:
16665 * 0...2...........7...............15.............23...............31
16666 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
16667 * | INFO_REPLY |X|X|X|X|X|X|M|E| octetsToNextHeader |
16668 * +---------------+---------------+---------------+---------------+
16669 * | IPAddress unicastReplyIpAddress |
16670 * +---------------+---------------+---------------+---------------+
16671 * | Port unicastReplyPort |
16672 * +---------------+---------------+---------------+---------------+
16673 * | IPAddress multicastReplyIpAddress [ only if M==1 ] |
16674 * +---------------+---------------+---------------+---------------+
16675 * | Port multicastReplyPort [ only if M==1 ] |
16676 * +---------------+---------------+---------------+---------------+
16677 *
16678 * RTPS 1.2/2.0:
16679 * 0...2...........7...............15.............23...............31
16680 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
16681 * |INFO_REPLY_IP4 |X|X|X|X|X|X|M|E| octetsToNextHeader |
16682 * +---------------+---------------+---------------+---------------+
16683 * | |
16684 * + LocatorUDPv4 unicastReplyLocator +
16685 * | |
16686 * +---------------+---------------+---------------+---------------+
16687 * | |
16688 * + LocatorUDPv4 multicastReplyLocator [only if M==1] +
16689 * | |
16690 * +---------------+---------------+---------------+---------------+
16691 */
16692 int min_len;
16693 proto_item *octet_item;
16694
16695 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, INFO_REPLY_IP4_FLAGS, flags);
16696
16697 octet_item = proto_tree_add_item(tree,
16698 hf_rtps_sm_octets_to_next_header,
16699 tvb,
16700 offset + 2,
16701 2,
16702 encoding);
16703
16704 min_len = 8;
16705 if ((flags & FLAG_INFO_REPLY_IP4_M(0x02)) != 0) min_len += 8;
16706
16707 if (octets_to_next_header != min_len) {
16708 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be == %u)", min_len);
16709 return;
16710 }
16711
16712 offset += 4;
16713
16714
16715 /* unicastReplyLocator */
16716 rtps_util_add_locator_udp_v4(tree, pinfo, tvb, offset,
16717 "unicastReplyLocator", encoding);
16718
16719 offset += 8;
16720
16721 /* multicastReplyLocator */
16722 if ((flags & FLAG_INFO_REPLY_IP4_M(0x02)) != 0) {
16723 rtps_util_add_locator_udp_v4(tree, pinfo, tvb, offset,
16724 "multicastReplyLocator", encoding);
16725 /*offset += 8;*/
16726 }
16727}
16728
16729/* *********************************************************************** */
16730/* * I N F O _ D S T * */
16731/* *********************************************************************** */
16732static void dissect_INFO_DST(tvbuff_t *tvb, packet_info *pinfo, int offset, uint8_t flags,
16733 const unsigned encoding, int octets_to_next_header, proto_tree *tree,
16734 uint16_t version, endpoint_guid *dst_guid) {
16735 /* RTPS 1.0/1.1:
16736 * 0...2...........7...............15.............23...............31
16737 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
16738 * | INFO_DST |X|X|X|X|X|X|X|E| octetsToNextHeader |
16739 * +---------------+---------------+---------------+---------------+
16740 * | HostId hostId |
16741 * +---------------+---------------+---------------+---------------+
16742 * | AppId appId |
16743 * +---------------+---------------+---------------+---------------+
16744 *
16745 * RTPS 1.2/2.0:
16746 * 0...2...........7...............15.............23...............31
16747 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
16748 * | INFO_DST |X|X|X|X|X|X|X|E| octetsToNextHeader |
16749 * +---------------+---------------+---------------+---------------+
16750 * | |
16751 * + GuidPrefix guidPrefix +
16752 * | |
16753 * +---------------+---------------+---------------+---------------+
16754 */
16755 proto_item *octet_item;
16756
16757 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, INFO_DST_FLAGS, flags);
16758
16759 octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb,
16760 offset + 2, 2, encoding);
16761
16762 if (version < 0x0200) {
16763 if (octets_to_next_header != 8) {
16764 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be == 8)");
16765 return;
16766 }
16767 } else {
16768 if (octets_to_next_header != 12) {
16769 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be == 12)");
16770 return;
16771 }
16772 }
16773
16774 offset += 4;
16775
16776 if (version < 0x0200) {
16777 rtps_util_add_guid_prefix_v1(tree, pinfo, tvb, offset,
16778 hf_rtps_sm_guid_prefix_v1, hf_rtps_sm_host_id, hf_rtps_sm_app_id,
16779 hf_rtps_sm_instance_id_v1, hf_rtps_sm_app_kind,
16780 NULL((void*)0));
16781 } else {
16782 rtps_util_add_guid_prefix_v2(tree, tvb, offset, hf_rtps_guid_prefix_dst,
16783 hf_rtps_host_id, hf_rtps_app_id, hf_rtps_sm_instance_id, hf_rtps_guid_prefix);
16784
16785 dst_guid->host_id = tvb_get_ntohl(tvb, offset);
16786 dst_guid->app_id = tvb_get_ntohl(tvb, offset + 4);
16787 dst_guid->instance_id = tvb_get_ntohl(tvb, offset + 8);
16788 dst_guid->fields_present |= GUID_HAS_HOST_ID0x00000001|GUID_HAS_APP_ID0x00000002|GUID_HAS_INSTANCE_ID0x00000004;
16789 }
16790}
16791
16792/* *********************************************************************** */
16793/* * I N F O _ R E P L Y * */
16794/* *********************************************************************** */
16795static void dissect_INFO_REPLY(tvbuff_t *tvb, packet_info *pinfo, int offset, uint8_t flags,
16796 const unsigned encoding, int octets_to_next_header, proto_tree *tree) {
16797 /* RTPS 1.0/1.1:
16798 * INFO_REPLY is *NOT* the same thing as the old INFO_REPLY.
16799 *
16800 * RTPS 1.2/2.0:
16801 * 0...2...........7...............15.............23...............31
16802 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
16803 * | INFO_REPLY |X|X|X|X|X|X|M|E| octetsToNextHeader |
16804 * +---------------+---------------+---------------+---------------+
16805 * | |
16806 * ~ LocatorList unicastReplyLocatorList ~
16807 * | |
16808 * +---------------+---------------+---------------+---------------+
16809 * | |
16810 * ~ LocatorList multicastReplyLocatorList [only if M==1] ~
16811 * | |
16812 * +---------------+---------------+---------------+---------------+
16813 */
16814
16815 int min_len;
16816 proto_item *octet_item;
16817
16818 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, INFO_REPLY_FLAGS, flags);
16819
16820 octet_item = proto_tree_add_item(tree,
16821 hf_rtps_sm_octets_to_next_header,
16822 tvb,
16823 offset + 2,
16824 2,
16825 encoding);
16826
16827 min_len = 4;
16828 if ((flags & FLAG_INFO_REPLY_M(0x02)) != 0) min_len += 4;
16829
16830 if (octets_to_next_header < min_len) {
16831 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", min_len);
16832 return;
16833 }
16834
16835 offset += 4;
16836
16837 /* unicastReplyLocatorList */
16838 offset = rtps_util_add_locator_list(tree, pinfo, tvb, offset, "unicastReplyLocatorList", encoding);
16839
16840 /* multicastReplyLocatorList */
16841 if ((flags & FLAG_INFO_REPLY_M(0x02)) != 0) {
16842 /*offset = */rtps_util_add_locator_list(tree, pinfo, tvb, offset, "multicastReplyLocatorList", encoding);
16843 }
16844}
16845
16846/* *********************************************************************** */
16847/* * RTI CRC * */
16848/* *********************************************************************** */
16849static void dissect_RTI_CRC(tvbuff_t *tvb, packet_info *pinfo, int offset, uint8_t flags,
16850 const unsigned encoding, int octets_to_next_header,proto_tree *tree) {
16851 /*
16852 * 0...2...........7...............15.............23...............31
16853 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
16854 * | RTI_CRC |X|X|X|X|X|X|X|E| octetsToNextHeader |
16855 * +---------------+---------------+---------------+---------------+
16856 * | RTPS Message length (without the 20 bytes header) |
16857 * +---------------+---------------+---------------+---------------+
16858 * | CRC32 |
16859 * +---------------+---------------+---------------+---------------+
16860 Total 12 bytes */
16861 proto_item *octet_item;
16862
16863 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, RTI_CRC_FLAGS, flags);
16864
16865 octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb,
16866 offset + 2, 2, encoding);
16867
16868 if (octets_to_next_header != 8) {
16869 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be == 8)");
16870 return;
16871 }
16872
16873 offset += 4;
16874 proto_tree_add_item(tree, hf_rtps_sm_rti_crc_number, tvb, offset, 4, encoding);
16875
16876 offset += 4;
16877 proto_tree_add_item(tree, hf_rtps_sm_rti_crc_result, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000);
16878}
16879
16880/**
16881 * @brief Do a forward search for the begining of the tags section in the
16882 * SRTPS POSTFIX/SEC POSTFIX submessage.
16883 */
16884static int rtps_util_look_for_secure_tag(
16885 tvbuff_t *tvb,
16886 int offset)
16887{
16888 int submessage_offset = offset;
16889 uint8_t submessage_id = 0;
16890 int tvb_remaining_len = tvb_reported_length_remaining(tvb, offset);
16891 int submessage_len = 0;
16892
16893 while (tvb_remaining_len > 4) {
16894 submessage_id = tvb_get_uint8(tvb, submessage_offset);
16895 submessage_len = tvb_get_uint16(
16896 tvb,
16897 submessage_offset + 2,
16898 ENC_LITTLE_ENDIAN0x80000000);
16899 tvb_remaining_len -= submessage_len;
16900 if (submessage_id == SUBMESSAGE_SRTPS_POSTFIX(0x34)
16901 || submessage_id == SUBMESSAGE_SEC_POSTFIX(0x32)) {
16902 return submessage_offset + 4;
16903 }
16904 submessage_offset += submessage_len;
16905 tvb_remaining_len -= submessage_len;
16906 }
16907 return -1;
16908}
16909
16910// NOLINTNEXTLINE(misc-no-recursion)
16911static void dissect_SECURE(
16912 tvbuff_t *tvb,
16913 packet_info *pinfo,
16914 int offset,
16915 uint8_t flags,
16916 const unsigned encoding _U___attribute__((unused)),
16917 int octets_to_next_header,
16918 proto_tree *tree,
16919 uint16_t vendor_id _U___attribute__((unused)),
16920 endpoint_guid *guid,
16921 bool_Bool dissecting_encrypted_submessage)
16922{
16923 /* *********************************************************************** */
16924 /* * SECURE SUBMESSAGE * */
16925 /* *********************************************************************** */
16926 /* 0...2...........7...............15.............23...............31
16927 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
16928 * | SECURE SUBMSG |X|X|X|X|X|X|S|E| octetsToNextHeader |
16929 * +---------------+---------------+---------------+---------------+
16930 * | long transformationKind |
16931 * +---------------+---------------+---------------+---------------+
16932 * | |
16933 * + octet transformationId[8] +
16934 * | |
16935 * +---------------+---------------+---------------+---------------+
16936 * | |
16937 * + octet secure_data[] +
16938 * | |
16939 * +---------------+---------------+---------------+---------------+
16940 */
16941 proto_tree * payload_tree;
16942 unsigned local_encoding;
16943 int secure_body_len = 0;
16944 rtps_current_packet_decryption_info_t *decryption_info;
16945 int initial_offset = offset;
16946
16947 proto_tree_add_bitmask_value(
16948 tree,
16949 tvb,
16950 offset + 1,
16951 hf_rtps_sm_flags,
16952 ett_rtps_flags,
16953 SECURE_FLAGS,
16954 flags);
16955 local_encoding = ((flags & FLAG_E(0x01)) != 0) ? ENC_LITTLE_ENDIAN0x80000000 : ENC_BIG_ENDIAN0x00000000;
16956
16957 proto_tree_add_item(
16958 tree,
16959 hf_rtps_sm_octets_to_next_header,
16960 tvb,
16961 offset + 2,
16962 2,
16963 local_encoding);
16964 offset += 4;
16965
16966 payload_tree = proto_tree_add_subtree_format(
16967 tree,
16968 tvb,
16969 offset,
16970 octets_to_next_header,
16971 ett_rtps_secure_payload_tree,
16972 NULL((void*)0),
16973 "Secured payload");
16974
16975 proto_tree_add_item(
16976 payload_tree,
16977 hf_rtps_secure_secure_data_length,
16978 tvb,
16979 offset,
16980 4,
16981 ENC_BIG_ENDIAN0x00000000);
16982 offset += 4;
16983
16984 secure_body_len = octets_to_next_header - 4;
16985 proto_tree_add_item(
16986 payload_tree,
16987 hf_rtps_secure_secure_data,
16988 tvb,
16989 offset,
16990 octets_to_next_header - 4,
16991 local_encoding);
16992
16993 decryption_info = (rtps_current_packet_decryption_info_t *)
16994 p_get_proto_data(
16995 pinfo->pool,
16996 pinfo,
16997 proto_rtps,
16998 RTPS_DECRYPTION_INFO_KEY5);
16999
17000 if (!enable_rtps_psk_decryption
17001 || decryption_info == NULL((void*)0)
17002 || !decryption_info->try_psk_decryption) {
17003 return;
17004 }
17005
17006 if (dissecting_encrypted_submessage) {
17007 /*
17008 * This should never happen.
17009 * If an RTPS message is encrypted with a pre-shared key, then the dissector
17010 * will use this function to decrypt the SEC_BODY submessage and attempt to
17011 * dissect it by calling dissect_rtps_submessages. The
17012 * dissecting_encrypted_submessage parameter makes sure that the recursion
17013 * is not infinite. However, this is not really possible because pre-shared
17014 * key encryption takes only place at the RTPS message level; there
17015 * shouldn't be another pre-shared key encoded SEC_BODY submessage at this
17016 * point. Clang complains about the recursion because it doesn't have the
17017 * information about the RTPS protocol. We ignore the warning with the
17018 * NOLINTNEXTLINE suppression (misc-no-recursion argument) above each
17019 * affected function.
17020 */
17021 return;
17022 }
17023
17024 for (unsigned entry_idx = 0; entry_idx < rtps_psk_options.size; entry_idx++) {
17025 uint8_t *decrypted_data = NULL((void*)0);
17026 uint8_t session_key[RTPS_HMAC_256_BUFFER_SIZE_BYTES32];
17027 size_t session_key_len = RTPS_HMAC_256_BUFFER_SIZE_BYTES32;
17028 uint8_t *tag = NULL((void*)0);
17029 int tag_offset = 0;
17030 gcry_error_t error = GPG_ERR_NO_ERROR;
17031 /* Iterate all entries in the PSK table of the RTPS protocol options */
17032 rtps_psk_options_entry_t *entry = &rtps_psk_options.entries[entry_idx];
17033 /* Check if each field is equal or the ignore options are enabled */
17034 bool_Bool host_id_mismatch = !entry->host_id.ignore
17035 && entry->host_id.value != decryption_info->guid_prefix.host_id;
17036 bool_Bool host_app_mismatch = !entry->app_id.ignore
17037 && entry->app_id.value != decryption_info->guid_prefix.app_id;
17038 bool_Bool host_instance_mismatch = !entry->instance_id.ignore
17039 && entry->instance_id.value != decryption_info->guid_prefix.instance_id;
17040 bool_Bool psk_index_mismatch = !entry->passphrase_id.ignore
17041 && entry->passphrase_id.value != decryption_info->psk_index;
17042
17043 /*
17044 * We proceed to decryption only if host, app and instance ids are equals
17045 * (or ignored).
17046 */
17047 if (host_id_mismatch
17048 || host_app_mismatch
17049 || host_instance_mismatch
17050 || psk_index_mismatch) {
17051 continue;
17052 }
17053
17054 /*
17055 * When decrypting with PSKs there is only one tag in the SRTPS POSTFIX/SEC
17056 * POSTFIX submessage. The offset is the one until the next submessage.
17057 * The 4 constant is the sum of submessage_id(1 byte)
17058 * + flags (1 byte) + octects to the next submessage(2 bytes)
17059 */
17060 tag_offset = rtps_util_look_for_secure_tag(
17061 tvb,
17062 initial_offset + octets_to_next_header + 4);
17063 if (tag_offset > 0) {
17064 tag = tvb_memdup(
17065 pinfo->pool,
17066 tvb,
17067 tag_offset,
17068 SECURE_TAG_COMMON_AND_SPECIFIC_MAC_LENGTH16);
17069 }
17070
17071 /* Decrypt the payload */
17072 decrypted_data = rtps_decrypt_secure_payload(
17073 session_key, /* output*/
17074 &session_key_len, /* output */
17075 tvb,
17076 pinfo,
17077 offset,
17078 (size_t) secure_body_len,
17079 entry->passphrase_secret,
17080 decryption_info,
17081 tag,
17082 &error,
17083 pinfo->pool);
17084 error = gpg_err_code(error);
17085 if (error == GPG_ERR_NO_ERROR) {
17086 tvbuff_t *decrypted_tvb = NULL((void*)0);
17087 /*
17088 * Each byte becomes two hexadecimal characters.
17089 * We also add one for the NUL terminator, which we will add manually
17090 * because bytes_to_hexstr does not add it.
17091 */
17092 char session_key_hexadecimal_representation[
17093 RTPS_HMAC_256_BUFFER_SIZE_BYTES32 * 2 + 1];
17094 char *session_key_nul_terminator_ptr = NULL((void*)0);
17095 rtps_guid_prefix_t guid_backup = decryption_info->guid_prefix;
17096
17097 /* Add the decrypted payload as a generated tvb */
17098 decrypted_tvb = tvb_new_real_data(
17099 decrypted_data,
17100 (unsigned) secure_body_len,
17101 secure_body_len);
17102 tvb_set_child_real_data_tvbuff(tvb, decrypted_tvb);
17103 session_key_nul_terminator_ptr = bytes_to_hexstr(
17104 session_key_hexadecimal_representation,
17105 session_key,
17106 session_key_len);
17107 *session_key_nul_terminator_ptr = '\0';
17108
17109 proto_tree* decrypted_subtree = NULL((void*)0);
17110 decrypted_subtree = proto_tree_add_subtree_format(
17111 payload_tree,
17112 decrypted_tvb,
17113 offset,
17114 secure_body_len,
17115 ett_rtps_decrypted_payload,
17116 NULL((void*)0),
17117 "Decrypted Payload (Passphrase Secret: \"%s\", "
17118 "Passphrase ID: %d Session Key: %s)",
17119 entry->passphrase_secret,
17120 entry->passphrase_id.value,
17121 session_key_hexadecimal_representation);
17122 add_new_data_source(pinfo, decrypted_tvb, "Decrypted Data");
17123 proto_item_set_generated(decrypted_subtree);
17124
17125 /*
17126 * Reset the content of the decryption info except the guid.
17127 * We are already decrypting the secure body submessage encrypted with a
17128 * pre-shared key. The contents may contain more submessages, but none of
17129 * them can be encrypted. Pre-shared key protection works at the RTPS
17130 * protection level.
17131 */
17132 rtps_current_packet_decryption_info_reset(decryption_info);
17133 decryption_info->guid_prefix = guid_backup;
17134
17135 dissect_rtps_submessages(
17136 decrypted_tvb,
17137 0,
17138 pinfo,
17139 decrypted_subtree,
17140 0x0200,
17141 vendor_id,
17142 guid,
17143 true1 /* dissecting_encrypted_submessage. */);
17144 break;
17145 } else if (error == GPG_ERR_CHECKSUM) {
17146 /* Wrong PSK */
17147 proto_tree_add_expert_format(
17148 payload_tree,
17149 pinfo,
17150 &ei_rtps_invalid_psk,
17151 tvb,
17152 offset,
17153 octets_to_next_header,
17154 "Bad %s tag check. " \
17155 "Possibly wrong passphrase secret (\"%s\") or malformed packet",
17156 val_to_str(pinfo->pool,
17157 decryption_info->algorithm,
17158 secure_transformation_kind,
17159 "Unknown algorithm"),
17160 entry->passphrase_secret);
17161 break;
17162 } else {
17163 /* General error. Displaying GCRY error output */
17164 proto_tree_add_expert_format(
17165 payload_tree,
17166 pinfo,
17167 &ei_rtps_invalid_psk,
17168 tvb,
17169 offset,
17170 octets_to_next_header,
17171 "Unable to decrypt content with passphrase secret (\"%s\"). %s: %s",
17172 entry->passphrase_secret,
17173 gcry_strsource(error),
17174 gcry_strerror(error));
17175 break;
17176 }
17177 }
17178}
17179
17180static void dissect_SECURE_PREFIX(tvbuff_t *tvb, packet_info *pinfo _U___attribute__((unused)), int offset,
17181 uint8_t flags, const unsigned encoding, int octets_to_next_header,
17182 proto_tree *tree, uint16_t vendor_id _U___attribute__((unused))) {
17183 /*
17184 * MIG_RTPS_SECURE_RTPS_PREFIX and MIG_RTPS_SECURE_PREFIX share same serialization:
17185 * 0...2...........8...............16.............24...............32
17186 * +---------------+---------------+---------------+---------------+
17187 * | 0x33 / 0x31 |X|X|X|X|X|X|X|E| octetsToNextHeader |
17188 * +---------------+---------------+---------------+---------------+
17189 * | |
17190 * + SecureDataHeader sec_data_header +
17191 * | |
17192 * +---------------+---------------+---------------+---------------+
17193 *
17194 * where SecureDataHeader is:
17195 *
17196 * SecureDataHeader: TransformationIdentifier (kind + key) + plugin_sec_header
17197 * 0...2...........8...............16.............24...............32
17198 * +---------------+---------------+---------------+---------------+
17199 * | Revision_id |tran...on_kind |
17200 * +---------------+---------------+---------------+---------------+
17201 * | |
17202 * + octet transformation_key_id[4] +
17203 * | |
17204 * +---------------+---------------+---------------+---------------+
17205 * | sesion_id |
17206 * +---------------+---------------+---------------+---------------+
17207 * | init_vector_suffix[8] |
17208 * +---------------+---------------+---------------+---------------+
17209 */
17210 proto_tree * sec_data_header_tree;
17211 int flags_offset = offset + 1;
17212 int session_id_offset = 0;
17213 int transformation_key_offset = 0;
17214 int algorithm_offset = 0;
17215 int init_vector_offset = 0;
17216 int psk_index_offset_three_bytes = 0;
17217 int psk_index_offset_fourth_byte = 0;
17218 uint32_t psk_index = 0;
17219 proto_item *passphrase_id_item = NULL((void*)0);
17220 unsigned flags_byte = 0;
17221 bool_Bool is_psk_protected = false0;
17222 bool_Bool is_aad_enabled = false0;
17223 proto_item *transformation_kind_item = NULL((void*)0);
17224
17225 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags,
17226 ett_rtps_flags, SECURE_PREFIX_FLAGS, flags);
17227
17228 flags_byte = tvb_get_uint8(tvb, flags_offset);
17229 is_psk_protected = (flags_byte & 0x04) != 0;
17230 is_aad_enabled = (flags_byte & 0x02) != 0;
17231 proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb, offset + 2,
17232 2, encoding);
17233 offset += 4;
17234
17235 sec_data_header_tree = proto_tree_add_subtree_format(tree, tvb, offset, octets_to_next_header,
17236 ett_rtps_secure_dataheader_tree, NULL((void*)0), "Secure Data Header");
17237
17238 /* Transformation Kind field used to be 4 bytes. Now it is splitted:
17239 * - 3 bytes: Transformation Key Revision
17240 * - 1 byte: Transformation Kind
17241 * A single byte is enough for Transformation Kind since it only has five possible values (0-4).
17242 */
17243 psk_index_offset_three_bytes = offset;
17244 proto_tree_add_item(sec_data_header_tree, hf_rtps_secure_dataheader_transformation_key_revision_id, tvb,
17245 offset, 3, ENC_BIG_ENDIAN0x00000000);
17246 offset += 3;
17247
17248 algorithm_offset = offset;
17249 proto_tree_add_item(sec_data_header_tree, hf_rtps_secure_dataheader_transformation_kind, tvb,
17250 offset, 1, ENC_BIG_ENDIAN0x00000000);
17251
17252 offset += 1;
17253 transformation_key_offset = offset;
17254 proto_tree_add_item(sec_data_header_tree, hf_rtps_secure_dataheader_transformation_key_id, tvb,
17255 offset, 4, ENC_NA0x00000000);
17256
17257 offset += 3;
17258 if (is_psk_protected) {
17259 proto_tree *transformation_kind_tree;
17260 /* PSK index is the last byte of the transformation kind */
17261 psk_index_offset_fourth_byte = offset;
17262 transformation_kind_tree = proto_item_add_subtree(
17263 transformation_kind_item,
17264 ett_rtps_secure_transformation_kind);
17265 proto_tree_add_item(
17266 transformation_kind_tree,
17267 hf_rtps_secure_dataheader_passphrase_key_id,
17268 tvb,
17269 psk_index_offset_fourth_byte,
17270 1,
17271 ENC_NA0x00000000);
17272 }
17273 offset += 1;
17274 session_id_offset = offset;
17275 proto_tree_add_item(sec_data_header_tree, hf_rtps_secure_dataheader_session_id, tvb,
17276 offset, 4, ENC_BIG_ENDIAN0x00000000);
17277 offset += 4;
17278
17279 init_vector_offset = session_id_offset;
17280 proto_tree_add_item(sec_data_header_tree, hf_rtps_secure_dataheader_init_vector_suffix, tvb,
17281 offset, octets_to_next_header-12, ENC_NA0x00000000);
17282
17283 if (is_psk_protected) {
17284 uint8_t *psk_index_bytes = (uint8_t*) &psk_index;
17285 tvb_memcpy(tvb, &psk_index_bytes[1], psk_index_offset_three_bytes, 3);
17286 tvb_memcpy(tvb, psk_index_bytes, psk_index_offset_fourth_byte, 1);
17287 passphrase_id_item = proto_tree_add_uint(
17288 sec_data_header_tree,
17289 hf_rtps_secure_dataheader_passphrase_id,
17290 tvb,
17291 0,
17292 0,
17293 psk_index);
17294 proto_item_set_generated(passphrase_id_item);
17295 }
17296
17297 /*
17298 * If PSK decryption is enabled, then store the session id, init vector and
17299 * transformation key for using them later during the session key generation.
17300 */
17301 if (is_psk_protected && enable_rtps_psk_decryption) {
17302 rtps_current_packet_decryption_info_t *decryption_info =
17303 (rtps_current_packet_decryption_info_t *) p_get_proto_data(
17304 pinfo->pool,
17305 pinfo,
17306 proto_rtps,
17307 RTPS_DECRYPTION_INFO_KEY5);
17308 if (decryption_info == NULL((void*)0)) {
17309 return;
17310 }
17311
17312 decryption_info->try_psk_decryption = true1;
17313 decryption_info->is_aad_enabled = is_aad_enabled;
17314 decryption_info->algorithm = tvb_get_uint8(tvb, algorithm_offset);
17315
17316 /* Copy the bytes as they are. Without considering the endianness */
17317 tvb_memcpy(
17318 tvb,
17319 &decryption_info->session_id,
17320 session_id_offset,
17321 sizeof(uint32_t));
17322 tvb_memcpy(
17323 tvb,
17324 &decryption_info->init_vector,
17325 init_vector_offset,
17326 RTPS_SECURITY_INIT_VECTOR_LEN12);
17327 tvb_memcpy(
17328 tvb,
17329 &decryption_info->transformation_key,
17330 transformation_key_offset,
17331 sizeof(uint32_t));
17332
17333 /*
17334 * PSK index is the composition of the three bytes of the transformation key
17335 * revision Id and the byte of the transformation id.
17336 */
17337 decryption_info->psk_index = psk_index;
17338 }
17339}
17340
17341static void dissect_SECURE_POSTFIX(
17342 tvbuff_t *tvb,
17343 packet_info *pinfo _U___attribute__((unused)),
17344 int offset,
17345 uint8_t flags,
17346 const unsigned encoding,
17347 int octets_to_next_header,
17348 proto_tree *tree,
17349 uint16_t vendor_id _U___attribute__((unused)))
17350{
17351 /*
17352 * MIG_RTPS_SECURE_RTPS_POSTFIX and MIG_RTPS_SECURE_POSTFIX share the same
17353 * serialization:
17354 * 0...2...........8...............16.............24...............32
17355 * +---------------+---------------+---------------+---------------+
17356 * | 0x34 / 0x32 |X|X|X|X|X|X|X|E| octetsToNextHeader |
17357 * +---------------+---------------+---------------+---------------+
17358 * | |
17359 * + SecureDataTag sec_data_tag +
17360 * | |
17361 * +---------------+---------------+---------------+---------------+
17362 *
17363 * where SecureDataTag is:
17364 * 0...2...........8...............16.............24...............32
17365 * +---------------+---------------+---------------+---------------+
17366 * | |
17367 * ~ octet plugin_sec_tag[] ~
17368 * | |
17369 * +---------------+---------------+---------------+---------------+
17370 *
17371 * and plugin_sec_tag is:
17372 * 0...2...........8...............16.............24...............32
17373 * +---------------+---------------+---------------+---------------+
17374 * ~ octet[16] plugin_sec_tag.common_mac ~
17375 * +---------------+---------------+---------------+---------------+
17376 * + plugin_sec_tag.receiver_specific_macs: |
17377 * | long plugin_sec_tag.receiver_specific_macs.length = N |
17378 * +---------------+---------------+---------------+---------------+
17379 * | octet[4] receiver_specific_macs[0].receiver_mac_key_id |
17380 * | octet[16] receiver_specific_macs[0].receiver_mac |
17381 * +---------------+---------------+---------------+---------------+
17382 * | . . . |
17383 * +---------------+---------------+---------------+---------------+
17384 * | octet[4] receiver_specific_macs[N-1].receiver_mac_key_id |
17385 * | octet[16] receiver_specific_macs[N-1].receiver_mac |
17386 * +---------------+---------------+---------------+---------------+
17387 */
17388 int specific_macs_num = 0;
17389
17390 ++offset;
17391 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags,
17392 ett_rtps_flags, SECURE_POSTFIX_FLAGS, flags);
17393
17394 ++offset;
17395 proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb, offset,
17396 2, encoding);
17397 offset += 2;
17398 proto_tree_add_item(
17399 tree,
17400 hf_rtps_secure_datatag_plugin_sec_tag_common_mac,
17401 tvb,
17402 offset,
17403 SECURE_TAG_COMMON_AND_SPECIFIC_MAC_LENGTH16,
17404 encoding);
17405 offset += SECURE_TAG_COMMON_AND_SPECIFIC_MAC_LENGTH16;
17406
17407 if (octets_to_next_header <= SECURE_TAG_COMMON_AND_SPECIFIC_MAC_LENGTH16) {
17408 /* There are no receiver-specific MACs. */
17409 return;
17410 }
17411
17412 /*
17413 * The receiver-specific mac length is encoded in big endian (regardless of
17414 * the submessage flags), as per the Security specification.
17415 */
17416 proto_tree_add_item(
17417 tree,
17418 hf_rtps_secure_datatag_plugin_specific_macs_len,
17419 tvb,
17420 offset,
17421 4,
17422 ENC_BIG_ENDIAN0x00000000);
17423 specific_macs_num = tvb_get_int32(tvb, offset, ENC_BIG_ENDIAN0x00000000);
17424 offset += 4;
17425
17426 /* Dissect specific macs */
17427 if (specific_macs_num > 0) {
17428 int RECEIVER_SPECIFIC_MAC_KEY_LENGTH = 4; /* bytes. */
17429 int secure_tags_list_member_size =
17430 RECEIVER_SPECIFIC_MAC_KEY_LENGTH + SECURE_TAG_COMMON_AND_SPECIFIC_MAC_LENGTH16;
17431
17432 proto_tree *sec_data_tag_tree = NULL((void*)0);
17433 sec_data_tag_tree = proto_tree_add_subtree_format(
17434 tree,
17435 tvb,
17436 offset,
17437 octets_to_next_header,
17438 ett_rtps_secure_dataheader_tree,
17439 NULL((void*)0),
17440 "Receiver Specific Macs");
17441 for (int tag_counter = 0; tag_counter < specific_macs_num; tag_counter++) {
17442 proto_tree *tag_tree = NULL((void*)0);
17443 int tag_offset = tag_counter * secure_tags_list_member_size;
17444
17445 tag_tree = proto_tree_add_subtree_format(
17446 sec_data_tag_tree,
17447 tvb,
17448 offset + tag_offset,
17449 secure_tags_list_member_size,
17450 ett_rtps_secure_postfix_tag_list_item,
17451 NULL((void*)0),
17452 "Receiver Specific Mac[%d]",
17453 tag_counter);
17454 proto_tree_add_item(
17455 tag_tree,
17456 hf_rtps_secure_datatag_plugin_sec_tag,
17457 tvb,
17458 offset + tag_offset,
17459 SECURE_TAG_COMMON_AND_SPECIFIC_MAC_LENGTH16,
17460 encoding);
17461 proto_tree_add_item(
17462 tag_tree,
17463 hf_rtps_secure_datatag_plugin_sec_tag_key,
17464 tvb,
17465 offset + tag_offset + SECURE_TAG_COMMON_AND_SPECIFIC_MAC_LENGTH16,
17466 RECEIVER_SPECIFIC_MAC_KEY_LENGTH,
17467 encoding);
17468 }
17469 }
17470}
17471/*
17472 * 0...2...........7...............15.............23...............31
17473 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
17474 * | BINDING_PING |X|X|X|X|X|B|L|E| octetsToNextHeader |
17475 * +---------------+---------------+---------------+---------------+
17476 * | DDS_UnsignedLong rtps_port |
17477 * +---------------+---------------+---------------+---------------+
17478 * | |
17479 * + DDS_Octet address[12][If L = 0] +
17480 * | |
17481 * + +
17482 * | |
17483 * +---------------+---------------+---------------+---------------+
17484 * | |
17485 * + DDS_Octet address[16][If L = 1] +
17486 * | |
17487 * + +
17488 * | |
17489 * + +
17490 * | |
17491 * +---------------+---------------+---------------+---------------+
17492 *
17493 */
17494static void dissect_UDP_WAN_BINDING_PING(tvbuff_t *tvb, packet_info *pinfo _U___attribute__((unused)), int offset,
17495 uint8_t flags, const unsigned encoding, int octets_to_next_header _U___attribute__((unused)),
17496 proto_tree *tree, uint16_t vendor_id _U___attribute__((unused))) {
17497
17498 const unsigned flags_offset = offset + 1;
17499 const unsigned next_header_offset = flags_offset + 1;
17500 const unsigned port_offset = next_header_offset + 2;
17501 const unsigned address_offset = port_offset + 4;
17502
17503 proto_tree_add_bitmask_value(tree, tvb, flags_offset, hf_rtps_udpv4_wan_binding_ping_flags,
17504 ett_rtps_flags, UDPV4_WAN_BINDING_PING_FLAGS, flags);
17505 proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb, next_header_offset,
17506 2, encoding);
17507 proto_tree_add_item(tree, hf_rtps_udpv4_wan_binding_ping_port, tvb, port_offset,
17508 4, encoding);
17509 /*
17510 * Address[12] [If L=0] is the only one we currently support, and it maps to:
17511 * DDS_Octet UUID[9] + 3 bytes of padding.
17512 */
17513 if (flags & FLAG_UDPV4_WAN_BINDING_PING_FLAG_L(0x02)) {
17514 proto_tree_add_item(
17515 tree,
17516 hf_rtps_long_address,
17517 tvb,
17518 address_offset,
17519 LONG_ADDRESS_SIZE(16),
17520 encoding);
17521 } else {
17522 proto_tree_add_item(
17523 tree,
17524 hf_rtps_uuid,
17525 tvb,
17526 address_offset,
17527 UUID_SIZE(9),
17528 encoding);
17529 }
17530}
17531
17532// NOLINTNEXTLINE(misc-no-recursion)
17533static bool_Bool dissect_rtps_submessage_v2(
17534 tvbuff_t *tvb,
17535 packet_info *pinfo,
17536 int offset,
17537 uint8_t flags,
17538 const unsigned encoding,
17539 uint8_t submessageId,
17540 uint16_t vendor_id,
17541 int octets_to_next_header,
17542 proto_tree *rtps_submessage_tree,
17543 proto_item *submessage_item,
17544 endpoint_guid *guid,
17545 endpoint_guid *dst_guid,
17546 bool_Bool dissecting_encrypted_submessage)
17547{
17548 switch (submessageId)
30
Control jumps to 'case 0:' at line 17550
17549 {
17550 case SUBMESSAGE_HEADER_EXTENSION(0x0):
17551 dissect_HEADER_EXTENSION(tvb, pinfo, offset, flags, encoding, rtps_submessage_tree, octets_to_next_header, vendor_id);
31
Calling 'dissect_HEADER_EXTENSION'
17552 break;
17553 case SUBMESSAGE_DATA_FRAG(0x10):
17554 dissect_DATA_FRAG(tvb, pinfo, offset, flags, encoding,
17555 octets_to_next_header, rtps_submessage_tree, vendor_id, guid);
17556 break;
17557
17558 case SUBMESSAGE_NOKEY_DATA_FRAG(0x11):
17559 dissect_NOKEY_DATA_FRAG(tvb, pinfo, offset, flags, encoding, octets_to_next_header, rtps_submessage_tree, vendor_id);
17560 break;
17561
17562 case SUBMESSAGE_NACK_FRAG(0x12):
17563 dissect_NACK_FRAG(tvb, pinfo, offset, flags, encoding, octets_to_next_header, rtps_submessage_tree);
17564 break;
17565
17566 case SUBMESSAGE_ACKNACK_SESSION(0x1a):
17567 case SUBMESSAGE_ACKNACK_BATCH(0x17):
17568 dissect_ACKNACK(tvb, pinfo, offset, flags, encoding,
17569 octets_to_next_header, rtps_submessage_tree, submessage_item, dst_guid);
17570 break;
17571
17572 case SUBMESSAGE_APP_ACK(0x1c):
17573 dissect_APP_ACK(tvb, pinfo, offset, flags, encoding, octets_to_next_header, rtps_submessage_tree, submessage_item, guid);
17574 break;
17575
17576 case SUBMESSAGE_APP_ACK_CONF(0x1d):
17577 dissect_APP_ACK_CONF(tvb, pinfo, offset, flags, encoding, octets_to_next_header, rtps_submessage_tree, submessage_item, guid);
17578 break;
17579
17580 case SUBMESSAGE_HEARTBEAT_SESSION(0x1b):
17581 case SUBMESSAGE_HEARTBEAT_BATCH(0x19):
17582 dissect_HEARTBEAT_BATCH(tvb, pinfo, offset, flags, encoding,
17583 octets_to_next_header, rtps_submessage_tree, guid);
17584 break;
17585
17586 case SUBMESSAGE_HEARTBEAT_FRAG(0x13):
17587 dissect_HEARTBEAT_FRAG(tvb, pinfo, offset, flags, encoding,
17588 octets_to_next_header, rtps_submessage_tree, guid);
17589 break;
17590
17591 case SUBMESSAGE_HEARTBEAT_VIRTUAL(0x1e):
17592 dissect_HEARTBEAT_VIRTUAL(tvb, pinfo, offset, flags, encoding,
17593 octets_to_next_header, rtps_submessage_tree, vendor_id, guid);
17594 break;
17595
17596 case SUBMESSAGE_RTPS_DATA_SESSION(0x14): {
17597 dissect_RTPS_DATA_SESSION(tvb, pinfo, offset, flags, encoding, octets_to_next_header,
17598 rtps_submessage_tree, vendor_id, guid);
17599 break;
17600 }
17601 case SUBMESSAGE_RTPS_DATA(0x15):
17602 dissect_RTPS_DATA(tvb, pinfo, offset, flags, encoding, octets_to_next_header,
17603 rtps_submessage_tree, vendor_id, false0, guid);
17604
17605 break;
17606
17607 case SUBMESSAGE_RTI_DATA_FRAG_SESSION(0x81):
17608 case SUBMESSAGE_RTPS_DATA_FRAG(0x16):
17609 dissect_RTPS_DATA_FRAG_kind(tvb, pinfo, offset, flags, encoding, octets_to_next_header,
17610 rtps_submessage_tree, vendor_id, (submessageId == SUBMESSAGE_RTI_DATA_FRAG_SESSION(0x81)), guid);
17611 break;
17612
17613 case SUBMESSAGE_RTPS_DATA_BATCH(0x18):
17614 dissect_RTPS_DATA_BATCH(tvb, pinfo, offset, flags, encoding, octets_to_next_header,
17615 rtps_submessage_tree, vendor_id, guid);
17616 break;
17617
17618 case SUBMESSAGE_RTI_CRC(0x80):
17619 if (vendor_id == RTPS_VENDOR_RTI_DDS(0x0101)) {
17620 dissect_RTI_CRC(tvb, pinfo, offset, flags, encoding, octets_to_next_header,
17621 rtps_submessage_tree);
17622 }
17623 break;
17624 case SUBMESSAGE_SEC_BODY(0x30):
17625 dissect_SECURE(
17626 tvb,
17627 pinfo,
17628 offset,
17629 flags,
17630 encoding,
17631 octets_to_next_header,
17632 rtps_submessage_tree,
17633 vendor_id,
17634 guid,
17635 dissecting_encrypted_submessage);
17636 break;
17637 case SUBMESSAGE_SEC_PREFIX(0x31):
17638 case SUBMESSAGE_SRTPS_PREFIX(0x33):
17639 dissect_SECURE_PREFIX(tvb, pinfo, offset, flags, encoding, octets_to_next_header,
17640 rtps_submessage_tree, vendor_id);
17641 break;
17642 case SUBMESSAGE_SEC_POSTFIX(0x32):
17643 case SUBMESSAGE_SRTPS_POSTFIX(0x34):
17644 dissect_SECURE_POSTFIX(tvb, pinfo, offset, flags, encoding, octets_to_next_header,
17645 rtps_submessage_tree, vendor_id);
17646 break;
17647 case SUBMESSAGE_RTI_UDP_WAN_BINDING_PING(0x82):
17648 dissect_UDP_WAN_BINDING_PING(tvb, pinfo, offset, flags, encoding, octets_to_next_header,
17649 rtps_submessage_tree, vendor_id);
17650 break;
17651
17652 default:
17653 return false0;
17654 }
17655
17656 return true1;
17657}
17658
17659static bool_Bool dissect_rtps_submessage_v1(tvbuff_t *tvb, packet_info *pinfo, int offset, uint8_t flags, const unsigned encoding,
17660 uint8_t submessageId, uint16_t version, uint16_t vendor_id, int octets_to_next_header,
17661 proto_tree *rtps_submessage_tree, proto_item *submessage_item,
17662 endpoint_guid * guid, endpoint_guid * dst_guid)
17663{
17664 switch (submessageId)
17665 {
17666 case SUBMESSAGE_PAD(0x01):
17667 dissect_PAD(tvb, pinfo, offset, flags, encoding, octets_to_next_header, rtps_submessage_tree);
17668 break;
17669
17670 case SUBMESSAGE_DATA(0x02):
17671 if (version < 0x0200) {
17672 dissect_DATA_v1(tvb, pinfo, offset, flags, encoding,
17673 octets_to_next_header, rtps_submessage_tree);
17674 } else {
17675 dissect_DATA_v2(tvb, pinfo, offset, flags, encoding,
17676 octets_to_next_header, rtps_submessage_tree, vendor_id, guid);
17677 }
17678 break;
17679
17680 case SUBMESSAGE_NOKEY_DATA(0x03):
17681 dissect_NOKEY_DATA(tvb, pinfo, offset, flags, encoding, octets_to_next_header, rtps_submessage_tree,
17682 version, vendor_id);
17683 break;
17684
17685 case SUBMESSAGE_ACKNACK(0x06):
17686 dissect_ACKNACK(tvb, pinfo, offset, flags, encoding,
17687 octets_to_next_header, rtps_submessage_tree, submessage_item, dst_guid);
17688 break;
17689
17690 case SUBMESSAGE_HEARTBEAT(0x07):
17691 dissect_HEARTBEAT(tvb, pinfo, offset, flags, encoding,
17692 octets_to_next_header, rtps_submessage_tree, version, guid);
17693 break;
17694
17695 case SUBMESSAGE_GAP(0x08):
17696 dissect_GAP(tvb, pinfo, offset, flags, encoding,
17697 octets_to_next_header, rtps_submessage_tree, guid);
17698 break;
17699
17700 case SUBMESSAGE_INFO_TS(0x09):
17701 dissect_INFO_TS(tvb, pinfo, offset, flags, encoding, octets_to_next_header, rtps_submessage_tree);
17702 break;
17703
17704 case SUBMESSAGE_INFO_SRC(0x0c):
17705 dissect_INFO_SRC(tvb, pinfo, offset, flags, encoding, octets_to_next_header, rtps_submessage_tree, version);
17706 break;
17707
17708 case SUBMESSAGE_INFO_REPLY_IP4(0x0d):
17709 dissect_INFO_REPLY_IP4(tvb, pinfo, offset, flags, encoding, octets_to_next_header, rtps_submessage_tree);
17710 break;
17711
17712 case SUBMESSAGE_INFO_DST(0x0e):
17713 dissect_INFO_DST(tvb, pinfo, offset, flags, encoding,
17714 octets_to_next_header, rtps_submessage_tree, version, dst_guid);
17715 break;
17716
17717 case SUBMESSAGE_INFO_REPLY(0x0f):
17718 dissect_INFO_REPLY(tvb, pinfo, offset, flags, encoding, octets_to_next_header, rtps_submessage_tree);
17719 break;
17720
17721 default:
17722 return false0;
17723 }
17724
17725 return true1;
17726}
17727
17728/***************************************************************************/
17729/* The main packet dissector function
17730 */
17731static bool_Bool dissect_rtps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
17732{
17733 proto_item *ti;
17734 proto_tree *rtps_tree;
17735 uint8_t majorRev;
17736 uint16_t version, vendor_id;
17737 bool_Bool is_ping;
17738 endpoint_guid guid = {0};
17739 endpoint_guid *guid_copy;
17740 uint32_t magic_number;
17741 char domain_id_str[RTPS_UNKNOWN_DOMAIN_ID_STR_LENsizeof("Unknown")] = RTPS_UNKNOWN_DOMAIN_ID_STR"Unknown";
17742 bool_Bool is_domain_id_calculated = false0;
17743 const char* not_accuracy_str = "";
17744 int length_remaining = 0;
17745 rtps_tvb_field rtps_root;
17746 rtps_current_packet_decryption_info_t *decryption_info = NULL((void*)0);
17747
17748 /* Check 'RTPS' signature:
17749 * A header is invalid if it has less than 16 octets
17750 */
17751 length_remaining = tvb_reported_length_remaining(tvb, offset);
17752 if (length_remaining < 16)
2
Assuming 'length_remaining' is >= 16
3
Taking false branch
17753 return false0;
17754
17755 magic_number = tvb_get_ntohl(tvb, offset);
17756 if (magic_number != RTPX_MAGIC_NUMBER0x52545058 &&
4
Assuming 'magic_number' is equal to RTPX_MAGIC_NUMBER
17757 magic_number != RTPS_MAGIC_NUMBER0x52545053) {
17758 return false0;
17759 }
17760 /* Distinguish between RTPS 1.x and 2.x here */
17761 majorRev = tvb_get_uint8(tvb,offset+4);
17762 if ((majorRev != 1) && (majorRev != 2))
5
Assuming 'majorRev' is equal to 1
17763 return false0;
17764
17765 /* Save the beginning of the RTPS message */
17766 rtps_root.tvb = tvb;
17767 rtps_root.tvb_offset = offset;
17768 rtps_root.tvb_len = tvb_reported_length_remaining(tvb, offset);
17769 p_set_proto_data(pinfo->pool, pinfo, proto_rtps, RTPS_ROOT_MESSAGE_KEY4, (void **)&rtps_root);
17770 col_set_str(pinfo->cinfo, COL_PROTOCOL, "RTPS");
17771 col_clear(pinfo->cinfo, COL_INFO);
17772
17773 /* create display subtree for the protocol */
17774 ti = proto_tree_add_item(tree, proto_rtps, tvb, 0, -1, ENC_NA0x00000000);
17775 rtps_tree = proto_item_add_subtree(ti, ett_rtps);
17776
17777 /* magic */
17778 proto_tree_add_item(rtps_tree, hf_rtps_magic, tvb, 0, 4, ENC_ASCII0x00000000);
17779
17780 /* Protocol Version */
17781 version = rtps_util_add_protocol_version(rtps_tree, tvb, offset+4);
17782
17783 /* Vendor Id */
17784 vendor_id = rtps_util_add_vendor_id(rtps_tree, tvb, offset+6);
17785
17786 is_ping = rtps_is_ping(tvb, pinfo, offset+8);
17787
17788 if (is_ping
5.1
'is_ping' is false
) {
6
Taking false branch
17789 dissect_PING(tvb, offset + 8, ENC_BIG_ENDIAN0x00000000, length_remaining - 8, rtps_tree);
17790 } else {
17791 if (version < 0x0200)
7
Assuming 'version' is >= 512
8
Taking false branch
17792 rtps_util_add_guid_prefix_v1(rtps_tree, pinfo, tvb, offset+8,
17793 hf_rtps_guid_prefix_v1, hf_rtps_host_id, hf_rtps_app_id,
17794 hf_rtps_app_id_instance_id, hf_rtps_app_id_app_kind, NULL((void*)0));
17795 else
17796 rtps_util_add_guid_prefix_v2(rtps_tree, tvb, offset+8, hf_rtps_guid_prefix_src,
17797 hf_rtps_host_id, hf_rtps_app_id, hf_rtps_sm_instance_id, hf_rtps_guid_prefix);
17798
17799 guid.host_id = tvb_get_ntohl(tvb, offset+8);
17800 guid.app_id = tvb_get_ntohl(tvb, offset+12);
17801 guid.instance_id = tvb_get_ntohl(tvb, offset+16);
17802
17803 /*
17804 * If decryption is enabled, store the guid prefix to be used later in the
17805 * dissect_SECURE and dissect_SECURE_PREFIX functions.
17806 */
17807 if (enable_rtps_psk_decryption) {
9
Assuming 'enable_rtps_psk_decryption' is false
10
Taking false branch
17808 decryption_info = wmem_alloc(
17809 pinfo->pool,
17810 sizeof(rtps_current_packet_decryption_info_t));
17811 if (decryption_info == NULL((void*)0)) {
17812 return false0;
17813 }
17814 decryption_info->additional_authenticated_data_allocated = false0;
17815
17816 rtps_current_packet_decryption_info_reset(decryption_info);
17817 decryption_info->guid_prefix.host_id = guid.host_id;
17818 decryption_info->guid_prefix.app_id = guid.app_id;
17819 decryption_info->guid_prefix.instance_id = guid.instance_id;
17820
17821 decryption_info->aad_length = 20; /* rtps header size. */
17822
17823 /* Let's cast to avoid an unnecessary copy when HE is disabled. */
17824 decryption_info->additional_authenticated_data = (uint8_t *) tvb_get_ptr(
17825 rtps_root.tvb,
17826 rtps_root.tvb_offset,
17827 (int) decryption_info->aad_length);
17828
17829 p_set_proto_data(
17830 pinfo->pool,
17831 pinfo,
17832 proto_rtps,
17833 RTPS_DECRYPTION_INFO_KEY5,
17834 (void **) decryption_info);
17835 }
17836
17837 guid.fields_present = GUID_HAS_HOST_ID0x00000001|GUID_HAS_APP_ID0x00000002|GUID_HAS_INSTANCE_ID0x00000004;
17838 /* If the packet uses TCP we need top store the participant GUID to get the domainId later
17839 * For that operation the member fields_present is not required and is not affected by
17840 * its changes.
17841 */
17842 guid_copy = (endpoint_guid*)wmem_memdup(pinfo->pool,
17843 (const void*)&guid, sizeof(endpoint_guid));
17844 p_add_proto_data(pinfo->pool, pinfo, proto_rtps,
17845 RTPS_TCPMAP_DOMAIN_ID_PROTODATA_KEY0, (void *)guid_copy);
17846#ifdef RTI_BUILD
17847 pinfo->guid_prefix_host = tvb_get_ntohl(tvb, offset + 8);
17848 pinfo->guid_prefix_app = tvb_get_ntohl(tvb, offset + 12);
17849 pinfo->guid_prefix_count = tvb_get_ntohl(tvb, offset + 16);
17850 pinfo->guid_rtps2 = 1;
17851#endif
17852 }
17853 /* Extract the domain id and participant index */
17854 {
17855 int domain_id, doffset, participant_idx = 0, nature;
17856 proto_tree *mapping_tree;
17857 /* For a complete description of these rules, see RTPS documentation
17858
17859 RTPS 1.2 mapping:
17860 domain_id = ((pinfo->destport - PORT_BASE)/10) % 100;
17861 participant_idx = (pinfo->destport - PORT_BASE) / 1000;
17862 nature = (pinfo->destport % 10);
17863
17864 For Unicast, the port mapping formula is:
17865 metatraffic_unicast_port = port_base +
17866 (domain_id_gain * domain_id) +
17867 (participant_id_gain * participant_id) +
17868 builtin_unicast_port_offset
17869 For Multicast, the port mapping is:
17870 metatraffic_multicast_port = port_base +
17871 (domain_id_gain * domain_id) +
17872 builtin_multicast_port_offset
17873
17874 Where the constants are:
17875 port_base = 7400
17876 domain_id_gain = 250
17877 participant_id_gain = 2
17878 builtin_multicast_port_offset = 0
17879 builtin_unicast_port_offset = 10
17880 user_multicast_port_offset = 1
17881 user_unicast_port_offset = 11
17882
17883
17884 To obtain the individual components from the port number, the reverse formulas are:
17885 domain_id = (port - port_base) / 250 (valid both multicast / unicast)
17886 Doffset = (port - port_Base - (domain_id * 250));
17887 participant_idx = (Doffset - 10) / 2;
17888
17889 */
17890 if (version
10.1
'version' is >= 512
< 0x0200) {
11
Taking false branch
17891 /* If using TCP domainId cannot deduced from the port. It must be taken from the participant
17892 * discovery packets or Unknown.
17893 */
17894 domain_id = get_domain_id_from_tcp_discovered_participants(discovered_participants_domain_ids, &guid);
17895 if (pinfo->ptype != PT_TCP && domain_id == RTPS_UNKNOWN_DOMAIN_ID_VAL-1) {
17896 domain_id = ((pinfo->destport - PORT_BASE(7400)) / 10) % 100;
17897 is_domain_id_calculated = true1;
17898 }
17899 participant_idx = (pinfo->destport - PORT_BASE(7400)) / 1000;
17900 nature = (pinfo->destport % 10);
17901 } else {
17902 domain_id = get_domain_id_from_tcp_discovered_participants(discovered_participants_domain_ids, &guid);
17903 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
17904 domain_id = (pinfo->destport - PORT_BASE(7400)) / DOMAIN_GAIN(250);
17905 is_domain_id_calculated = true1;
17906 }
17907 doffset = (pinfo->destport - PORT_BASE(7400) - domain_id * DOMAIN_GAIN(250));
17908 if (doffset == 0) {
13
Assuming 'doffset' is not equal to 0
14
Taking false branch
17909 nature = PORT_METATRAFFIC_MULTICAST(2);
17910 }
17911 else if (doffset == 1) {
15
Assuming 'doffset' is not equal to 1
16
Taking false branch
17912 nature = PORT_USERTRAFFIC_MULTICAST(1);
17913 }
17914 else {
17915 participant_idx = (doffset - 10) / 2;
17916 if ((doffset - 10) % 2 == 0) {
17
Assuming the condition is false
18
Taking false branch
17917 nature = PORT_METATRAFFIC_UNICAST(0);
17918 }
17919 else {
17920 nature = PORT_USERTRAFFIC_UNICAST(3);
17921 }
17922 }
17923 if (domain_id
18.1
'domain_id' is <= 232
> 232 || domain_id
18.2
'domain_id' is < 0
< 0) {
19
Taking true branch
17924 domain_id = RTPS_UNKNOWN_DOMAIN_ID_VAL-1;
17925 }
17926 }
17927 /* Used string for the domain participant to show Unknown if the domainId is not known when using TCP*/
17928 if (domain_id != RTPS_UNKNOWN_DOMAIN_ID_VAL-1) {
17929 snprintf(domain_id_str, RTPS_UNKNOWN_DOMAIN_ID_STR_LENsizeof("Unknown"),
17930 "%"PRId32"d", domain_id);
17931 if (is_domain_id_calculated) {
17932 not_accuracy_str = " (Based on calculated domainId. Might not be accurate)";
17933 }
17934 }
17935 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)) ||
17936 (version < 0x0200)) {
17937 mapping_tree = proto_tree_add_subtree_format(rtps_tree, tvb, 0, 0,
17938 ett_rtps_default_mapping, NULL((void*)0), "Default port mapping%s: domainId=%s, "
17939 "participantIdx=%d, nature=%s",
17940 not_accuracy_str,
17941 domain_id_str,
17942 participant_idx,
17943 val_to_str(pinfo->pool, nature, nature_type_vals, "%02x"));
17944 } else {
17945 mapping_tree = proto_tree_add_subtree_format(rtps_tree, tvb, 0, 0,
17946 ett_rtps_default_mapping, NULL((void*)0), "Default port mapping%s: %s, domainId=%s",
17947 not_accuracy_str,
17948 val_to_str(pinfo->pool, nature, nature_type_vals, "%02x"),
17949 domain_id_str);
17950 }
17951
17952 ti = proto_tree_add_uint(mapping_tree, hf_rtps_domain_id, tvb, 0, 0, domain_id);
17953 proto_item_set_generated(ti);
17954 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)) ||
17955 (version < 0x0200)) {
17956 ti = proto_tree_add_uint(mapping_tree, hf_rtps_participant_idx, tvb, 0, 0, participant_idx);
17957 proto_item_set_generated(ti);
17958 }
17959 ti = proto_tree_add_uint(mapping_tree, hf_rtps_nature_type, tvb, 0, 0, nature);
17960 proto_item_set_generated(ti);
17961 }
17962
17963 /* offset behind RTPS's Header (need to be set in case tree=NULL)*/
17964 offset += ((version
19.5
'version' is >= 512
< 0x0200) ? 16 : 20);
20
'?' condition is false
17965
17966 dissect_rtps_submessages(
21
Calling 'dissect_rtps_submessages'
17967 tvb,
17968 offset,
17969 pinfo,
17970 rtps_tree,
17971 version,
17972 vendor_id,
17973 &guid,
17974 false0 /* dissecting_encrypted_submessage. */);
17975
17976 if (decryption_info != NULL((void*)0)) {
17977 rtps_current_packet_decryption_info_reset(decryption_info);
17978 }
17979
17980 /* If TCP there's an extra OOB byte at the end of the message */
17981 /* TODO: What to do with it? */
17982 return true1;
17983
17984} /* dissect_rtps(...) */
17985
17986static
17987void append_submessage_col_info(packet_info* pinfo, submessage_col_info* current_submessage_col_info) {
17988 bool_Bool* is_data_session_intermediate = NULL((void*)0);
17989
17990 /* Status info column: (r),(p[U])...*/
17991 if (current_submessage_col_info->status_info != NULL((void*)0)) {
17992 col_append_str(pinfo->cinfo, COL_INFO, current_submessage_col_info->status_info);
17993 }
17994 /* DATA_SESSION last package */
17995 is_data_session_intermediate = (bool_Bool*)p_get_proto_data(pinfo->pool, pinfo, proto_rtps, RTPS_DATA_SESSION_FINAL_PROTODATA_KEY2);
17996 if (is_data_session_intermediate != NULL((void*)0) && !*is_data_session_intermediate) {
17997 current_submessage_col_info->data_session_kind = "(Last)";
17998 col_append_str(pinfo->cinfo, COL_INFO, current_submessage_col_info->data_session_kind);
17999 }
18000 /* Topic name */
18001 if (current_submessage_col_info->topic_name != NULL((void*)0)) {
18002 col_append_sep_str(pinfo->cinfo, COL_INFO, " -> ", current_submessage_col_info->topic_name);
18003 }
18004}
18005
18006// NOLINTNEXTLINE(misc-no-recursion)
18007void dissect_rtps_submessages(
18008 tvbuff_t *tvb,
18009 int offset,
18010 packet_info *pinfo,
18011 proto_tree *rtps_tree,
18012 uint16_t version,
18013 uint16_t vendor_id,
18014 endpoint_guid *guid,
18015 bool_Bool dissecting_encrypted_submessage)
18016{
18017 uint8_t submessageId, flags;
18018 int sub_hf;
18019 const value_string *sub_vals;
18020 proto_item *ti;
18021 proto_tree *rtps_submessage_tree;
18022 unsigned encoding;
18023 int next_submsg, octets_to_next_header;
18024 endpoint_guid dst_guid;
18025 submessage_col_info current_submessage_col_info = {NULL((void*)0), NULL((void*)0), NULL((void*)0)};
18026
18027 /* No fields have been set in GUID yet. */
18028 dst_guid.fields_present = 0;
18029 while (tvb_reported_length_remaining(tvb, offset) > 0) {
22
Assuming the condition is true
23
Loop condition is true. Entering loop body
18030 submessageId = tvb_get_uint8(tvb, offset);
18031
18032 if (version
23.1
'version' is >= 512
< 0x0200) {
18033 sub_hf = hf_rtps_sm_id;
18034 sub_vals = submessage_id_vals;
18035 } else {
18036 if ((submessageId & 0x80) && (vendor_id == RTPS_VENDOR_RTI_DDS(0x0101))) {
24
Assuming the condition is false
18037 sub_hf = hf_rtps_sm_idv2;
18038 sub_vals = submessage_id_rti;
18039 } else {
18040 sub_hf = hf_rtps_sm_idv2;
18041 sub_vals = submessage_id_valsv2;
18042 }
18043 }
18044
18045 col_append_sep_str(pinfo->cinfo, COL_INFO, ", ", val_to_str(pinfo->pool, submessageId, sub_vals, "Unknown[%02x]"));
18046
18047 /* Creates the subtree 'Submessage: XXXX' */
18048 if (submessageId & 0x80) {
25
Taking false branch
18049 if (vendor_id == RTPS_VENDOR_RTI_DDS(0x0101)) {
18050 ti = proto_tree_add_uint_format_value(rtps_tree, sub_hf, tvb, offset, 1, submessageId, "%s",
18051 val_to_str(pinfo->pool, submessageId, submessage_id_rti, "Vendor-specific (0x%02x)"));
18052 } else {
18053 ti = proto_tree_add_uint_format_value(rtps_tree, sub_hf, tvb, offset, 1,
18054 submessageId, "Vendor-specific (0x%02x)", submessageId);
18055 }
18056 } else {
18057 ti = proto_tree_add_uint(rtps_tree, sub_hf, tvb, offset, 1, submessageId);
18058 }
18059
18060 rtps_submessage_tree = proto_item_add_subtree(ti, ett_rtps_submessage);
18061
18062 /* Gets the flags */
18063 flags = tvb_get_uint8(tvb, offset + 1);
18064
18065 /* Gets the E (Little endian) flag */
18066 encoding = ((flags & FLAG_E(0x01)) != 0) ? ENC_LITTLE_ENDIAN0x80000000 : ENC_BIG_ENDIAN0x00000000;
26
Assuming the condition is true
27
'?' condition is true
18067
18068 /* Octets-to-next-header */
18069 octets_to_next_header = tvb_get_uint16(tvb, offset + 2, encoding);
18070 if ((octets_to_next_header == 0) && (version >= 0x0200)
28
Assuming 'octets_to_next_header' is not equal to 0
18071 && (submessageId != SUBMESSAGE_PAD(0x01)) && (submessageId != SUBMESSAGE_INFO_TS(0x09))) {
18072 octets_to_next_header = tvb_reported_length_remaining(tvb, offset + 4);
18073 }
18074 next_submsg = offset + octets_to_next_header + 4;
18075
18076 /* Set length of this item */
18077 proto_item_set_len(ti, octets_to_next_header + 4);
18078
18079 /* Now decode each single submessage
18080 * The offset passed to the dissectors points to the start of the
18081 * submessage (at the ID byte).
18082 */
18083 p_set_proto_data(pinfo->pool, pinfo, proto_rtps, RTPS_CURRENT_SUBMESSAGE_COL_DATA_KEY3, (void **)&current_submessage_col_info);
18084 if (!dissect_rtps_submessage_v1(tvb, pinfo, offset, flags, encoding,
18085 submessageId, version, vendor_id,
18086 octets_to_next_header, rtps_submessage_tree,
18087 ti, guid, &dst_guid)) {
18088 if ((version
28.1
'version' is >= 512
< 0x0200) ||
18089 !dissect_rtps_submessage_v2(
29
Calling 'dissect_rtps_submessage_v2'
18090 tvb,
18091 pinfo,
18092 offset,
18093 flags,
18094 encoding,
18095 submessageId,
18096 vendor_id,
18097 octets_to_next_header,
18098 rtps_submessage_tree,
18099 ti,
18100 guid,
18101 &dst_guid,
18102 dissecting_encrypted_submessage)) {
18103 proto_tree_add_uint(rtps_submessage_tree, hf_rtps_sm_flags,
18104 tvb, offset + 1, 1, flags);
18105 proto_tree_add_uint(rtps_submessage_tree,
18106 hf_rtps_sm_octets_to_next_header,
18107 tvb, offset + 2, 2, octets_to_next_header);
18108 }
18109 }
18110 append_submessage_col_info(pinfo, &current_submessage_col_info);
18111 /* Reset the col info for the next submessage */
18112 current_submessage_col_info.data_session_kind = NULL((void*)0);
18113 current_submessage_col_info.status_info = NULL((void*)0);
18114 current_submessage_col_info.topic_name = NULL((void*)0);
18115 /* next submessage's offset */
18116 offset = next_submsg;
18117 }
18118}
18119
18120static bool_Bool dissect_rtps_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U___attribute__((unused)))
18121{
18122 int offset = 0;
18123
18124 return dissect_rtps(tvb, pinfo, tree, offset);
18125}
18126
18127static bool_Bool dissect_rtps_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U___attribute__((unused)))
18128{
18129 /* In RTPS over TCP the first 4 bytes are the packet length
18130 * as 32-bit unsigned int coded as BIG ENDIAN
18131 * uint32_t tcp_len = tvb_get_ntohl(tvb, offset);
18132 */
18133 int offset = 4;
18134
18135 return dissect_rtps(tvb, pinfo, tree, offset);
18136}
18137
18138static bool_Bool dissect_rtps_rtitcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U___attribute__((unused)))
18139{
18140 int offset = 0;
18141
18142 return dissect_rtps(tvb, pinfo, tree, offset);
18143}
18144
18145static int dissect_simple_rtps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U___attribute__((unused)))
18146{
18147 int offset = 0;
18148
18149 if (dissect_rtps(tvb, pinfo, tree, offset) == false0)
1
Calling 'dissect_rtps'
18150 return 0;
18151
18152 return tvb_captured_length(tvb);
18153}
18154
18155/*
18156 * Type InstanceStateDataresponse is sent as user user data but there is no discovery data for it.
18157 * So it is necessary to add it manually so Wireshark can dissect it
18158 */
18159static void initialize_instance_state_data_response_dissection_info(builtin_types_dissection_data_t *_builtin_types_dissection_data) {
18160 uint32_t element = 0;
18161 const uint64_t InstanceStateDataResponse_type_id = 0x9d6d4c879b0e6aa9;
18162 const uint64_t sequence_100_InstanceTransitionData_type_id = 0x2dac07d5577caaf6;
18163 const uint64_t guid_t_type_id = 0x36d940c4ed806097;
18164 const uint64_t value_type_id = 0x974064b1120169ed;
18165 const uint64_t instancetransitiondata_type_id = 0xceb6f5e405f4bde7;
18166 const uint64_t KeyHashValue_type_id = 0x48725f37453310ed;
18167 const uint64_t SerializedKey_type_id = 0x3fd77a8ff43c7e55;
18168 const uint64_t payload_type_id = 0x0d0ecc8d34a5c3ab;
18169 const uint64_t ntptime_t_type_id = 0x842c59af7e962a4c;
18170 const uint64_t sequencenumber_t_type_id = 0xb933efe30d85453b;
18171 /*
18172 * @appendable @nested
18173 * struct GUID_t {
18174 * octet value[16];
18175 * };
18176 * @appendable @nested
18177 * struct SequenceNumber_t {
18178 * long high;
18179 * unsigned long low;
18180 * };
18181 *
18182 * @final @nested
18183 * struct NtpTime_t {
18184 * int32 sec;
18185 * uint32 frac;
18186 * };
18187 * @final @nested
18188 * struct SerializedKey {
18189 * sequence<octet> payload;
18190 * };
18191 * typedef octet KeyHashValue[16];
18192 *
18193 * struct InstanceTransitionData {
18194 * @optional KeyHashValue key_hash;
18195 * @optional SerializedKey serialized_key;
18196 * NtpTime_t last_update_timestamp;
18197 * SequenceNumber_t transition_sequence_number;
18198 * };
18199 */
18200
18201 /* All dissection_infos are added to the "dissection_infos" map */
18202
18203 /* value */
18204 g_strlcpy(_builtin_types_dissection_data->dissection_infos.value_dissection_info.member_name, "value", MAX_TOPIC_AND_TYPE_LENGTH256);
18205 _builtin_types_dissection_data->dissection_infos.value_dissection_info.num_elements = VALUE_NUM_ELEMENTS16;
18206 _builtin_types_dissection_data->dissection_infos.value_dissection_info.bound = VALUE_NUM_ELEMENTS16;
18207 _builtin_types_dissection_data->dissection_infos.value_dissection_info.member_kind = RTI_CDR_TYPE_OBJECT_TYPE_KIND_ARRAY_TYPE;
18208 _builtin_types_dissection_data->dissection_infos.value_dissection_info.base_type_id = RTI_CDR_TYPE_OBJECT_TYPE_KIND_BYTE_TYPE;
18209 _builtin_types_dissection_data->dissection_infos.value_dissection_info.type_id = value_type_id;
18210 _builtin_types_dissection_data->dissection_infos.value_dissection_info.bound = VALUE_NUM_ELEMENTS16;
18211 _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))
))))
;
18212 wmem_map_insert(
18213 builtin_dissection_infos,
18214 &(_builtin_types_dissection_data->dissection_infos.value_dissection_info.type_id),
18215 (void*)&(_builtin_types_dissection_data->dissection_infos.value_dissection_info));
18216
18217 /* GUID_t */
18218 g_strlcpy(_builtin_types_dissection_data->dissection_infos.guid_t_dissection_info.member_name, "GUID_t", MAX_TOPIC_AND_TYPE_LENGTH256);
18219 _builtin_types_dissection_data->dissection_infos.guid_t_dissection_info.num_elements = GUID_T_NUM_ELEMENTS1;
18220 _builtin_types_dissection_data->dissection_infos.guid_t_dissection_info.member_kind = RTI_CDR_TYPE_OBJECT_TYPE_KIND_STRUCTURE_TYPE;
18221 _builtin_types_dissection_data->dissection_infos.guid_t_dissection_info.type_id = guid_t_type_id;
18222 _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))
))))
;
18223 /* octet value[16] */
18224 _builtin_types_dissection_data->dissection_infos.guid_t_dissection_info.elements[0].flags = 0;
18225 _builtin_types_dissection_data->dissection_infos.guid_t_dissection_info.elements[0].member_id = 0;
18226 _builtin_types_dissection_data->dissection_infos.guid_t_dissection_info.elements[0].type_id = value_type_id;
18227 g_strlcpy(_builtin_types_dissection_data->dissection_infos.guid_t_dissection_info.elements[0].member_name, "value", MAX_TOPIC_AND_TYPE_LENGTH256);
18228 wmem_map_insert(
18229 builtin_dissection_infos,
18230 &(_builtin_types_dissection_data->dissection_infos.guid_t_dissection_info.type_id),
18231 (void*)&(_builtin_types_dissection_data->dissection_infos.guid_t_dissection_info));
18232
18233 /* Payload */
18234 g_strlcpy(_builtin_types_dissection_data->dissection_infos.payload_dissection_info.member_name, "payload", MAX_TOPIC_AND_TYPE_LENGTH256);
18235 _builtin_types_dissection_data->dissection_infos.payload_dissection_info.member_kind = RTI_CDR_TYPE_OBJECT_TYPE_KIND_SEQUENCE_TYPE;
18236 _builtin_types_dissection_data->dissection_infos.payload_dissection_info.base_type_id = RTI_CDR_TYPE_OBJECT_TYPE_KIND_BYTE_TYPE;
18237 _builtin_types_dissection_data->dissection_infos.payload_dissection_info.type_id = payload_type_id;
18238 _builtin_types_dissection_data->dissection_infos.payload_dissection_info.bound = -1;
18239 _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))
))))
;
18240 wmem_map_insert(
18241 builtin_dissection_infos,
18242 &(_builtin_types_dissection_data->dissection_infos.payload_dissection_info.type_id),
18243 (void*)&(_builtin_types_dissection_data->dissection_infos.payload_dissection_info));
18244
18245 /* KeyHashValue */
18246 g_strlcpy(_builtin_types_dissection_data->dissection_infos.key_hash_value_dissection_info.member_name, "KeyHashValue", MAX_TOPIC_AND_TYPE_LENGTH256);
18247 _builtin_types_dissection_data->dissection_infos.key_hash_value_dissection_info.num_elements = KEY_HAS_VALUE_NUM_ELEMENTS16;
18248 _builtin_types_dissection_data->dissection_infos.key_hash_value_dissection_info.bound = KEY_HAS_VALUE_NUM_ELEMENTS16;
18249 _builtin_types_dissection_data->dissection_infos.key_hash_value_dissection_info.member_kind = RTI_CDR_TYPE_OBJECT_TYPE_KIND_ARRAY_TYPE;
18250 _builtin_types_dissection_data->dissection_infos.key_hash_value_dissection_info.base_type_id = RTI_CDR_TYPE_OBJECT_TYPE_KIND_BYTE_TYPE;
18251 _builtin_types_dissection_data->dissection_infos.key_hash_value_dissection_info.type_id = KeyHashValue_type_id;
18252 _builtin_types_dissection_data->dissection_infos.key_hash_value_dissection_info.bound = KEY_HAS_VALUE_NUM_ELEMENTS16;
18253 _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))
))))
;
18254 wmem_map_insert(
18255 builtin_dissection_infos,
18256 &(_builtin_types_dissection_data->dissection_infos.key_hash_value_dissection_info.type_id),
18257 (void*)&(_builtin_types_dissection_data->dissection_infos.key_hash_value_dissection_info));
18258
18259 /* SerializedKey */
18260 g_strlcpy(_builtin_types_dissection_data->dissection_infos.serialized_key_dissection_info.member_name, "SerializedKey", MAX_TOPIC_AND_TYPE_LENGTH256);
18261 _builtin_types_dissection_data->dissection_infos.serialized_key_dissection_info.num_elements = GUID_T_NUM_ELEMENTS1;
18262 _builtin_types_dissection_data->dissection_infos.serialized_key_dissection_info.member_kind = RTI_CDR_TYPE_OBJECT_TYPE_KIND_STRUCTURE_TYPE;
18263 _builtin_types_dissection_data->dissection_infos.serialized_key_dissection_info.type_id = SerializedKey_type_id;
18264 _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))
))))
;
18265 /* sequence<octet> payload */
18266 _builtin_types_dissection_data->dissection_infos.serialized_key_dissection_info.elements[0].flags = 0;
18267 _builtin_types_dissection_data->dissection_infos.serialized_key_dissection_info.elements[0].member_id = 0;
18268 _builtin_types_dissection_data->dissection_infos.serialized_key_dissection_info.elements[0].type_id = payload_type_id;
18269 g_strlcpy(_builtin_types_dissection_data->dissection_infos.serialized_key_dissection_info.elements[0].member_name, "payload", MAX_TOPIC_AND_TYPE_LENGTH256);
18270 wmem_map_insert(
18271 builtin_dissection_infos,
18272 &(_builtin_types_dissection_data->dissection_infos.serialized_key_dissection_info.type_id),
18273 (void*)&(_builtin_types_dissection_data->dissection_infos.serialized_key_dissection_info));
18274
18275 /* NtpTime_t */
18276 g_strlcpy(_builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info.member_name, "NtpTime_t", MAX_TOPIC_AND_TYPE_LENGTH256);
18277 _builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info.num_elements = NTPTIME_T_NUM_ELEMENTS2;
18278 _builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info.member_kind = RTI_CDR_TYPE_OBJECT_TYPE_KIND_STRUCTURE_TYPE;
18279 _builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info.type_id = ntptime_t_type_id;
18280 _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))
))))
;
18281 /* int32 sec */
18282 _builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info.elements[0].flags = 0;
18283 _builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info.elements[0].member_id = 0;
18284 _builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info.elements[0].type_id = RTI_CDR_TYPE_OBJECT_TYPE_KIND_INT_32_TYPE;
18285 g_strlcpy(_builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info.elements[0].member_name, "sec", MAX_TOPIC_AND_TYPE_LENGTH256);
18286 /* uint32 frac */
18287 _builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info.elements[1].flags = 0;
18288 _builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info.elements[1].member_id = 1;
18289 _builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info.elements[1].type_id = RTI_CDR_TYPE_OBJECT_TYPE_KIND_INT_32_TYPE;
18290 g_strlcpy(_builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info.elements[1].member_name, "frac", MAX_TOPIC_AND_TYPE_LENGTH256);
18291 wmem_map_insert(
18292 builtin_dissection_infos,
18293 &(_builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info.type_id),
18294 (void*)&(_builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info));
18295
18296 /* SequenceNumber_t */
18297 g_strlcpy(_builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info.member_name, "SequenceNumber_t", MAX_TOPIC_AND_TYPE_LENGTH256);
18298 _builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info.num_elements = SEQUENCE_NUMBER_T_NUM_ELEMENTS2;
18299 _builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info.member_kind = RTI_CDR_TYPE_OBJECT_TYPE_KIND_STRUCTURE_TYPE;
18300 _builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info.type_id = sequencenumber_t_type_id;
18301 _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))
))))
;
18302 _builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info.elements[0].flags = 0;
18303 _builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info.elements[0].member_id = 0;
18304 _builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info.elements[0].type_id = RTI_CDR_TYPE_OBJECT_TYPE_KIND_INT_32_TYPE;
18305 g_strlcpy(_builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info.elements[0].member_name, "high", MAX_TOPIC_AND_TYPE_LENGTH256);
18306 _builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info.elements[1].flags = 0;
18307 _builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info.elements[1].member_id = 1;
18308 _builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info.elements[1].type_id = RTI_CDR_TYPE_OBJECT_TYPE_KIND_UINT_32_TYPE;
18309 g_strlcpy(_builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info.elements[1].member_name, "low", MAX_TOPIC_AND_TYPE_LENGTH256);
18310 wmem_map_insert(
18311 builtin_dissection_infos,
18312 &(_builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info.type_id),
18313 (void*)&(_builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info));
18314
18315 /* Instance transition Data */
18316 g_strlcpy(_builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.member_name, "InstanceTransitionData", MAX_TOPIC_AND_TYPE_LENGTH256);
18317 _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.num_elements = INSTANCE_TRANSITION_DATA_NUM_ELEMENTS4;
18318 _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.member_kind = RTI_CDR_TYPE_OBJECT_TYPE_KIND_STRUCTURE_TYPE;
18319 _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.type_id = instancetransitiondata_type_id;
18320 _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))
))))
;
18321 wmem_map_insert(
18322 builtin_dissection_infos,
18323 &(_builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.type_id),
18324 (void*)&(_builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info));
18325
18326 for (element = 0; element < _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.num_elements; ++element) {
18327 switch (element) {
18328 case 0:
18329 /* @optional KeyHashValue key_hash */
18330 _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].flags = MEMBER_OPTIONAL(2);
18331 _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].member_id = element;
18332 _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].type_id = KeyHashValue_type_id;
18333 g_strlcpy(_builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].member_name, "key_hash", MAX_TOPIC_AND_TYPE_LENGTH256);
18334 break;
18335 case 1:
18336 /* @optional SerializedKey serialized_key */
18337 _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].flags = MEMBER_OPTIONAL(2);
18338 _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].member_id = element;
18339 _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].type_id = SerializedKey_type_id;
18340 g_strlcpy(_builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].member_name, "serialized_key", MAX_TOPIC_AND_TYPE_LENGTH256);
18341 break;
18342 case 2:
18343 /* NtpTime_t last_update_timestamp */
18344 _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].flags = 0;
18345 _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].member_id = element;
18346 _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].type_id = ntptime_t_type_id;
18347 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);
18348 break;
18349 case 3:
18350 /* SequenceNumber_t transition_sequence_number */
18351 _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].flags = 0;
18352 _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].member_id = element;
18353 _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].type_id = sequencenumber_t_type_id;
18354 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);
18355 break;
18356 }
18357 }
18358
18359 /* InstanceStateDataResponse
18360 * struct InstanceStateDataResponse {
18361 * @optional sequence<InstanceTransitionData> alive_instances;
18362 * @optional sequence<InstanceTransitionData> disposed_instances;
18363 * @optional sequence<InstanceTransitionData> unregistered_instances;
18364 * GUID_t writer_guid;
18365 * GUID_t reader_guid;
18366 * uint32 reader_group_oid;
18367 * boolean complete_snapshot;
18368 * };
18369 */
18370
18371 /* This type mapping is not available in the "registry" map. It is used in the function
18372 * rtps_util_get_topic_info when the endopint GUID determines that the type is InstanceStateDataResponse
18373 */
18374 _builtin_types_dissection_data->type_mappings.instance_state_data_response_type_mapping.type_id = InstanceStateDataResponse_type_id;
18375 _builtin_types_dissection_data->type_mappings.instance_state_data_response_type_mapping.guid.entity_id = ENTITYID_NORMAL_META_GROUP_READER(0x8d);
18376 _builtin_types_dissection_data->type_mappings.instance_state_data_response_type_mapping.guid.fields_present = GUID_HAS_ALL0x0000000F;
18377 _builtin_types_dissection_data->type_mappings.instance_state_data_response_type_mapping.fields_visited = TOPIC_INFO_ALL_SET(0x07);
18378 g_strlcpy(_builtin_types_dissection_data->type_mappings.instance_state_data_response_type_mapping.topic_name, "InstanceStateDataResponse", MAX_TOPIC_AND_TYPE_LENGTH256);
18379 g_strlcpy(_builtin_types_dissection_data->type_mappings.instance_state_data_response_type_mapping.type_name, "InstanceStateDataResponse", MAX_TOPIC_AND_TYPE_LENGTH256);
18380
18381 g_strlcpy(_builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.member_name, "InstanceStateDataResponse", MAX_TOPIC_AND_TYPE_LENGTH256);
18382 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.num_elements = INSTANCE_STATE_DATA_RESPONSE_NUM_ELEMENTS7;
18383 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.bound = INSTANCE_STATE_DATA_RESPONSE_NUM_ELEMENTS7;
18384 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.member_kind = RTI_CDR_TYPE_OBJECT_TYPE_KIND_STRUCTURE_TYPE;
18385 _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))
))))
;
18386 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.base_type_id = 0;
18387 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.type_id = InstanceStateDataResponse_type_id;
18388 wmem_map_insert(
18389 builtin_dissection_infos,
18390 &(_builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.type_id),
18391 (void*)&(_builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info));
18392
18393 /* sequence_100_InstanceTransitionData */
18394 g_strlcpy(_builtin_types_dissection_data->dissection_infos.alive_instances_dissection_info.member_name, "sequence_100_InstanceTransitionData", MAX_TOPIC_AND_TYPE_LENGTH256);
18395 _builtin_types_dissection_data->dissection_infos.alive_instances_dissection_info.num_elements = INSTANCE_STATE_DATA_RESPONSE_NUM_ELEMENTS7;
18396 _builtin_types_dissection_data->dissection_infos.alive_instances_dissection_info.bound = SEQUENCE_100_IINSTANCE_TRANSITION_DATA_BOUND100;
18397 _builtin_types_dissection_data->dissection_infos.alive_instances_dissection_info.member_kind = RTI_CDR_TYPE_OBJECT_TYPE_KIND_SEQUENCE_TYPE;
18398 _builtin_types_dissection_data->dissection_infos.alive_instances_dissection_info.base_type_id = instancetransitiondata_type_id;
18399 _builtin_types_dissection_data->dissection_infos.alive_instances_dissection_info.type_id = sequence_100_InstanceTransitionData_type_id;
18400 wmem_map_insert(
18401 builtin_dissection_infos,
18402 &(_builtin_types_dissection_data->dissection_infos.alive_instances_dissection_info.type_id),
18403 (void*)&(_builtin_types_dissection_data->dissection_infos.alive_instances_dissection_info));
18404
18405 /* @optional sequence<InstanceTransitionData> alive_instances */
18406 for (element = 0; element < _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.num_elements; ++element) {
18407 switch (element) {
18408 case 0:
18409 /* @optional sequence<InstanceTransitionData> alive_instances */
18410 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].flags = MEMBER_OPTIONAL(2);
18411 g_strlcpy(_builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].member_name, "alive_instances", MAX_MEMBER_NAME(256));
18412 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].type_id = sequence_100_InstanceTransitionData_type_id;
18413 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].member_id = element;
18414 break;
18415 case 1:
18416 /* @optional sequence<InstanceTransitionData> disposed_instances */
18417 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].flags = MEMBER_OPTIONAL(2);
18418 g_strlcpy(_builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].member_name, "disposed_instances", MAX_MEMBER_NAME(256));
18419 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].type_id = sequence_100_InstanceTransitionData_type_id;
18420 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].member_id = element;
18421 break;
18422 case 2:
18423 /* @optional sequence<InstanceTransitionData> unregistered_instances */
18424 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].flags = MEMBER_OPTIONAL(2);
18425 g_strlcpy(_builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].member_name, "unregistered_instances", MAX_MEMBER_NAME(256));
18426 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].type_id = sequence_100_InstanceTransitionData_type_id;
18427 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].member_id = element;
18428 break;
18429 case 3:
18430 /* GUID_t writer_guid */
18431 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].flags = 0;
18432 g_strlcpy(_builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].member_name, "writer_gid", MAX_MEMBER_NAME(256));
18433 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].type_id = guid_t_type_id;
18434 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].member_id = element;
18435 break;
18436 case 4:
18437 /* GUID_t reader_guid */
18438 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].flags = 0;
18439 g_strlcpy(_builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].member_name, "reader_gid", MAX_MEMBER_NAME(256));
18440 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].type_id = guid_t_type_id;
18441 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].member_id = element;
18442 break;
18443 case 5:
18444 /* uint32 reader_group_oid */
18445 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].flags = 0;
18446 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));
18447 _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;
18448 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].member_id = element;
18449 break;
18450 case 6:
18451 /* boolean complete_snapshot */
18452 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].flags = 0;
18453 g_strlcpy(_builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].member_name, "complete_snapshot", MAX_MEMBER_NAME(256));
18454 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].type_id = RTI_CDR_TYPE_OBJECT_TYPE_KIND_BOOLEAN_TYPE;
18455 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].member_id = element;
18456 break;
18457 }
18458 }
18459}
18460
18461void proto_register_rtps(void) {
18462
18463 static hf_register_info hf[] = {
18464 { &hf_rtps_ping, {
18465 "Ping String",
18466 "rtps.ping_str",
18467 FT_STRING,
18468 BASE_NONE,
18469 NULL((void*)0),
18470 0,
18471 "RTPS Ping String",
18472 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18473 },
18474 { &hf_rtps_magic, {
18475 "Magic",
18476 "rtps.magic",
18477 FT_STRING,
18478 BASE_NONE,
18479 NULL((void*)0),
18480 0,
18481 "RTPS magic",
18482 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18483 },
18484 /* Protocol Version (composed as major.minor) -------------------------- */
18485 { &hf_rtps_protocol_version, {
18486 "version",
18487 "rtps.version",
18488 FT_UINT16,
18489 BASE_HEX,
18490 NULL((void*)0),
18491 0,
18492 "RTPS protocol version number",
18493 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18494 },
18495 { &hf_rtps_protocol_version_major, {
18496 "major",
18497 "rtps.version.major",
18498 FT_INT8,
18499 BASE_DEC,
18500 NULL((void*)0),
18501 0,
18502 "RTPS major protocol version number",
18503 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18504 },
18505 { &hf_rtps_protocol_version_minor, {
18506 "minor",
18507 "rtps.version.minor",
18508 FT_INT8,
18509 BASE_DEC,
18510 NULL((void*)0),
18511 0,
18512 "RTPS minor protocol version number",
18513 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18514 },
18515
18516 /* Domain Participant and Participant Index ---------------------------- */
18517 { &hf_rtps_domain_id, {
18518 "domain_id",
18519 "rtps.domain_id",
18520 FT_UINT32,
18521 BASE_DEC,
18522 NULL((void*)0),
18523 0,
18524 "Domain ID",
18525 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18526 },
18527
18528 { &hf_rtps_domain_tag, {
18529 "domain_tag",
18530 "rtps.domain_tag",
18531 FT_STRINGZ,
18532 BASE_NONE,
18533 NULL((void*)0),
18534 0,
18535 "Domain Tag ID",
18536 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18537 },
18538
18539 { &hf_rtps_participant_idx, {
18540 "participant_idx",
18541 "rtps.participant_idx",
18542 FT_UINT32,
18543 BASE_DEC,
18544 NULL((void*)0),
18545 0,
18546 "Participant index",
18547 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18548 },
18549 { &hf_rtps_nature_type, {
18550 "traffic_nature",
18551 "rtps.traffic_nature",
18552 FT_UINT32,
18553 BASE_DEC,
18554 VALS(nature_type_vals)((0 ? (const struct _value_string*)0 : ((nature_type_vals)))),
18555 0,
18556 "Nature of the traffic (meta/user-traffic uni/multi-cast)",
18557 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18558 },
18559
18560 /* Vendor ID ----------------------------------------------------------- */
18561 { &hf_rtps_vendor_id, {
18562 "vendorId",
18563 "rtps.vendorId",
18564 FT_UINT16,
18565 BASE_HEX,
18566 NULL((void*)0),
18567 0,
18568 "Unique identifier of the DDS vendor that generated this packet",
18569 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18570 },
18571
18572 /* Guid Prefix for the Packet ------------------------------------------ */
18573 { &hf_rtps_guid_prefix_v1,
18574 { "guidPrefix", "rtps.guidPrefix_v1",
18575 FT_UINT64, BASE_HEX, NULL((void*)0), 0,
18576 "GuidPrefix of the RTPS packet", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18577 },
18578
18579 { &hf_rtps_guid_prefix,
18580 { "guidPrefix", "rtps.guidPrefix",
18581 FT_BYTES, BASE_NONE, NULL((void*)0), 0,
18582 "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) }
18583 },
18584
18585 { &hf_rtps_guid_prefix_src,
18586 { "guidPrefix", "rtps.guidPrefix.src",
18587 FT_BYTES, BASE_NONE, NULL((void*)0), 0,
18588 "the guidPrefix of the entity sending the sample", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18589 },
18590
18591 { &hf_rtps_guid_prefix_dst,
18592 { "guidPrefix", "rtps.guidPrefix.dst",
18593 FT_BYTES, BASE_NONE, NULL((void*)0), 0,
18594 "the guidPrefix of the entity receiving the sample", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18595 },
18596
18597 /* Host ID ------------------------------------------------------------- */
18598 { &hf_rtps_host_id, { /* HIDDEN */
18599 "hostId",
18600 "rtps.hostId",
18601 FT_UINT32,
18602 BASE_HEX,
18603 NULL((void*)0),
18604 0,
18605 "Sub-component 'hostId' of the GuidPrefix of the RTPS packet",
18606 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18607 },
18608
18609 /* AppID (composed as instanceId, appKind) ----------------------------- */
18610 { &hf_rtps_app_id, {
18611 "appId",
18612 "rtps.appId",
18613 FT_UINT32,
18614 BASE_HEX,
18615 NULL((void*)0),
18616 0,
18617 "Sub-component 'appId' of the GuidPrefix of the RTPS packet",
18618 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18619 },
18620 { &hf_rtps_app_id_instance_id, {
18621 "appId.instanceId",
18622 "rtps.appId.instanceId",
18623 FT_UINT24,
18624 BASE_HEX,
18625 NULL((void*)0),
18626 0,
18627 "'instanceId' field of the 'AppId' structure",
18628 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18629 },
18630 { &hf_rtps_app_id_app_kind, {
18631 "appid.appKind",
18632 "rtps.appId.appKind",
18633 FT_UINT8,
18634 BASE_HEX,
18635 VALS(app_kind_vals)((0 ? (const struct _value_string*)0 : ((app_kind_vals)))),
18636 0,
18637 "'appKind' field of the 'AppId' structure",
18638 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18639 },
18640
18641
18642
18643 /* Submessage ID ------------------------------------------------------- */
18644 { &hf_rtps_sm_id, {
18645 "submessageId",
18646 "rtps.sm.id",
18647 FT_UINT8,
18648 BASE_HEX,
18649 VALS(submessage_id_vals)((0 ? (const struct _value_string*)0 : ((submessage_id_vals))
))
,
18650 0,
18651 "defines the type of submessage",
18652 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18653 },
18654
18655 { &hf_rtps_sm_idv2, {
18656 "submessageId",
18657 "rtps.sm.id",
18658 FT_UINT8,
18659 BASE_HEX,
18660 VALS(submessage_id_valsv2)((0 ? (const struct _value_string*)0 : ((submessage_id_valsv2
))))
,
18661 0,
18662 "defines the type of submessage",
18663 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18664 },
18665
18666 /* Submessage flags ---------------------------------------------------- */
18667 { &hf_rtps_sm_flags, {
18668 "Flags",
18669 "rtps.sm.flags",
18670 FT_UINT8,
18671 BASE_HEX,
18672 NULL((void*)0),
18673 0,
18674 "bitmask representing the flags associated with a submessage",
18675 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18676 },
18677 { &hf_rtps_sm_flags2, {
18678 "Flags",
18679 "rtps.sm.flags",
18680 FT_UINT16,
18681 BASE_HEX,
18682 NULL((void*)0),
18683 0,
18684 "bitmask representing the flags associated with a submessage",
18685 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18686 },
18687
18688 /* octets to next header ---------------------------------------------- */
18689 { &hf_rtps_sm_octets_to_next_header, {
18690 "octetsToNextHeader",
18691 "rtps.sm.octetsToNextHeader",
18692 FT_UINT16,
18693 BASE_DEC,
18694 NULL((void*)0),
18695 0,
18696 "Size of the submessage payload",
18697 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18698 },
18699
18700 /* GUID as {GuidPrefix, EntityId} ------------------------------------ */
18701 { &hf_rtps_sm_guid_prefix_v1, {
18702 "guidPrefix",
18703 "rtps.sm.guidPrefix_v1",
18704 FT_UINT64,
18705 BASE_HEX,
18706 NULL((void*)0),
18707 0,
18708 "a generic guidPrefix that is transmitted inside the submessage (this is NOT the guidPrefix described in the packet header)",
18709 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18710 },
18711
18712 { &hf_rtps_sm_guid_prefix, {
18713 "guidPrefix",
18714 "rtps.sm.guidPrefix",
18715 FT_BYTES,
18716 BASE_NONE,
18717 NULL((void*)0),
18718 0,
18719 "a generic guidPrefix that is transmitted inside the submessage (this is NOT the guidPrefix described in the packet header)",
18720 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18721 },
18722
18723 { &hf_rtps_sm_host_id, {
18724 "host_id",
18725 "rtps.sm.guidPrefix.hostId",
18726 FT_UINT32,
18727 BASE_HEX,
18728 NULL((void*)0),
18729 0,
18730 "The hostId component of the rtps.sm.guidPrefix",
18731 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18732 },
18733
18734 { &hf_rtps_sm_app_id, {
18735 "appId",
18736 "rtps.sm.guidPrefix.appId",
18737 FT_UINT32,
18738 BASE_HEX,
18739 NULL((void*)0),
18740 0,
18741 "AppId component of the rtps.sm.guidPrefix",
18742 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18743 },
18744 { &hf_rtps_sm_instance_id_v1, {
18745 "instanceId",
18746 "rtps.sm.guidPrefix.appId.instanceId",
18747 FT_UINT24,
18748 BASE_HEX,
18749 NULL((void*)0),
18750 0,
18751 "instanceId component of the AppId of the rtps.sm.guidPrefix",
18752 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18753 },
18754 { &hf_rtps_sm_app_kind, {
18755 "appKind",
18756 "rtps.sm.guidPrefix.appId.appKind",
18757 FT_UINT8,
18758 BASE_HEX,
18759 NULL((void*)0),
18760 0,
18761 "appKind component of the AppId of the rtps.sm.guidPrefix",
18762 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18763 },
18764 { &hf_rtps_sm_instance_id, {
18765 "instanceId",
18766 "rtps.sm.guidPrefix.instanceId",
18767 FT_UINT32,
18768 BASE_HEX,
18769 NULL((void*)0),
18770 0,
18771 "instanceId component of the rtps.sm.guidPrefix",
18772 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18773 },
18774
18775 /* Entity ID (composed as entityKey, entityKind) ----------------------- */
18776 { &hf_rtps_sm_entity_id, {
18777 "entityId",
18778 "rtps.sm.entityId",
18779 FT_UINT32,
18780 BASE_HEX,
18781 VALS(entity_id_vals)((0 ? (const struct _value_string*)0 : ((entity_id_vals)))),
18782 0,
18783 "Object entity ID as it appears in a DATA submessage (keyHashSuffix)",
18784 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18785 },
18786 { &hf_rtps_sm_entity_id_key, {
18787 "entityKey",
18788 "rtps.sm.entityId.entityKey",
18789 FT_UINT24,
18790 BASE_HEX,
18791 NULL((void*)0),
18792 0,
18793 "'entityKey' field of the object entity ID",
18794 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18795 },
18796 { &hf_rtps_sm_entity_id_kind, {
18797 "entityKind",
18798 "rtps.sm.entityId.entityKind",
18799 FT_UINT8,
18800 BASE_HEX,
18801 VALS(entity_kind_vals)((0 ? (const struct _value_string*)0 : ((entity_kind_vals)))),
18802 0,
18803 "'entityKind' field of the object entity ID",
18804 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18805 },
18806
18807 { &hf_rtps_sm_rdentity_id, {
18808 "readerEntityId",
18809 "rtps.sm.rdEntityId",
18810 FT_UINT32,
18811 BASE_HEX,
18812 VALS(entity_id_vals)((0 ? (const struct _value_string*)0 : ((entity_id_vals)))),
18813 0,
18814 "Reader entity ID as it appears in a submessage",
18815 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18816 },
18817 { &hf_rtps_sm_rdentity_id_key, {
18818 "readerEntityKey",
18819 "rtps.sm.rdEntityId.entityKey",
18820 FT_UINT24,
18821 BASE_HEX,
18822 NULL((void*)0),
18823 0,
18824 "'entityKey' field of the reader entity ID",
18825 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18826 },
18827 { &hf_rtps_sm_rdentity_id_kind, {
18828 "readerEntityKind",
18829 "rtps.sm.rdEntityId.entityKind",
18830 FT_UINT8,
18831 BASE_HEX,
18832 VALS(entity_kind_vals)((0 ? (const struct _value_string*)0 : ((entity_kind_vals)))),
18833 0,
18834 "'entityKind' field of the reader entity ID",
18835 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18836 },
18837
18838 { &hf_rtps_sm_wrentity_id, {
18839 "writerEntityId",
18840 "rtps.sm.wrEntityId",
18841 FT_UINT32,
18842 BASE_HEX,
18843 VALS(entity_id_vals)((0 ? (const struct _value_string*)0 : ((entity_id_vals)))),
18844 0,
18845 "Writer entity ID as it appears in a submessage",
18846 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18847 },
18848 { &hf_rtps_sm_wrentity_id_key, {
18849 "writerEntityKey",
18850 "rtps.sm.wrEntityId.entityKey",
18851 FT_UINT24,
18852 BASE_HEX,
18853 NULL((void*)0),
18854 0,
18855 "'entityKey' field of the writer entity ID",
18856 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18857 },
18858 { &hf_rtps_sm_wrentity_id_kind, {
18859 "writerEntityKind",
18860 "rtps.sm.wrEntityId.entityKind",
18861 FT_UINT8,
18862 BASE_HEX,
18863 VALS(entity_kind_vals)((0 ? (const struct _value_string*)0 : ((entity_kind_vals)))),
18864 0,
18865 "'entityKind' field of the writer entity ID",
18866 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18867 },
18868
18869
18870
18871 /* Sequence number ----------------------------------------------------- */
18872 { &hf_rtps_sm_seq_number, {
18873 "writerSeqNumber",
18874 "rtps.sm.seqNumber",
18875 FT_INT64,
18876 BASE_DEC,
18877 NULL((void*)0),
18878 0,
18879 "Writer sequence number",
18880 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18881 },
18882
18883 { &hf_rtps_info_src_ip, {
18884 "appIpAddress",
18885 "rtps.info_src.ip",
18886 FT_IPv4,
18887 BASE_NONE,
18888 NULL((void*)0),
18889 0,
18890 NULL((void*)0),
18891 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18892 },
18893
18894 { &hf_rtps_info_src_unused, {
18895 "Unused",
18896 "rtps.info_src.unused",
18897 FT_UINT32,
18898 BASE_HEX,
18899 NULL((void*)0),
18900 0,
18901 NULL((void*)0),
18902 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18903 },
18904
18905 /* Parameter Id -------------------------------------------------------- */
18906 { &hf_rtps_parameter_id, {
18907 "parameterId",
18908 "rtps.param.id",
18909 FT_UINT16,
18910 BASE_HEX,
18911 VALS(parameter_id_vals)((0 ? (const struct _value_string*)0 : ((parameter_id_vals)))
)
,
18912 0,
18913 "Parameter Id",
18914 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18915 },
18916
18917 { &hf_rtps_parameter_id_v2, {
18918 "parameterId",
18919 "rtps.param.id",
18920 FT_UINT16,
18921 BASE_HEX,
18922 VALS(parameter_id_v2_vals)((0 ? (const struct _value_string*)0 : ((parameter_id_v2_vals
))))
,
18923 0,
18924 "Parameter Id",
18925 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18926 },
18927
18928 { &hf_rtps_parameter_id_inline_rti, {
18929 "Parameter Id", "rtps.param.id", FT_UINT16,
18930 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) }
18931 },
18932
18933 { &hf_rtps_parameter_id_toc, {
18934 "parameterId",
18935 "rtps.param.id",
18936 FT_UINT16,
18937 BASE_HEX,
18938 VALS(parameter_id_toc_vals)((0 ? (const struct _value_string*)0 : ((parameter_id_toc_vals
))))
,
18939 0,
18940 "Parameter Id",
18941 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18942 },
18943
18944 { &hf_rtps_parameter_id_rti, {
18945 "parameterId",
18946 "rtps.param.id",
18947 FT_UINT16,
18948 BASE_HEX,
18949 VALS(parameter_id_rti_vals)((0 ? (const struct _value_string*)0 : ((parameter_id_rti_vals
))))
,
18950 0,
18951 "Parameter Id",
18952 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18953 },
18954
18955 { &hf_rtps_parameter_id_adl, {
18956 "parameterId",
18957 "rtps.param.id",
18958 FT_UINT16,
18959 BASE_HEX,
18960 VALS(parameter_id_adl_vals)((0 ? (const struct _value_string*)0 : ((parameter_id_adl_vals
))))
,
18961 0,
18962 "Parameter Id",
18963 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18964 },
18965
18966 /* Parameter Length ---------------------------------------------------- */
18967 { &hf_rtps_parameter_length, {
18968 "parameterLength",
18969 "rtps.param.length",
18970 FT_UINT16,
18971 BASE_DEC,
18972 NULL((void*)0),
18973 0,
18974 "Parameter Length",
18975 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18976 },
18977
18978 /* String Length ---------------------------------------------------- */
18979 { &hf_rtps_string_length, {
18980 "String length",
18981 "rtps.param.string.length",
18982 FT_UINT32,
18983 BASE_DEC,
18984 NULL((void*)0),
18985 0,
18986 NULL((void*)0),
18987 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18988 },
18989
18990 /* Parameter / Topic --------------------------------------------------- */
18991 { &hf_rtps_param_topic_name, {
18992 "topic",
18993 "rtps.param.topicName",
18994 FT_STRINGZ,
18995 BASE_NONE,
18996 NULL((void*)0),
18997 0,
18998 "String representing the value value of a PID_TOPIC parameter",
18999 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19000 },
19001
19002 /* Parameter / Strength ------------------------------------------------ */
19003 { &hf_rtps_param_strength, {
19004 "strength",
19005 "rtps.param.strength",
19006 FT_INT32,
19007 BASE_DEC,
19008 NULL((void*)0),
19009 0,
19010 "Decimal value representing the value of a PID_OWNERSHIP_STRENGTH parameter",
19011 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19012 },
19013
19014 /* Parameter / Type Name ----------------------------------------------- */
19015 { &hf_rtps_param_type_name, {
19016 "typeName",
19017 "rtps.param.typeName",
19018 FT_STRINGZ,
19019 BASE_NONE,
19020 NULL((void*)0),
19021 0,
19022 "String representing the value of a PID_TYPE_NAME parameter",
19023 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19024 },
19025
19026 /* Parameter / User Data ----------------------------------------------- */
19027 { &hf_rtps_param_user_data, {
19028 "userData",
19029 "rtps.param.userData",
19030 FT_BYTES,
19031 BASE_NONE,
19032 NULL((void*)0),
19033 0,
19034 "The user data sent in a PID_USER_DATA parameter",
19035 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19036 },
19037
19038 /* Parameter / Group Data ---------------------------------------------- */
19039 { &hf_rtps_param_group_data, {
19040 "groupData",
19041 "rtps.param.groupData",
19042 FT_BYTES,
19043 BASE_NONE,
19044 NULL((void*)0),
19045 0,
19046 "The user data sent in a PID_GROUP_DATA parameter",
19047 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19048 },
19049
19050 { &hf_rtps_transportInfo_classId, {
19051 "classID",
19052 "rtps.transportInfo.classID",
19053 FT_INT32,
19054 BASE_DEC,
19055 NULL((void*)0),
19056 0,
19057 "Class ID of transport",
19058 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19059 },
19060
19061 { &hf_rtps_transportInfo_messageSizeMax, {
19062 "messageSizeMax",
19063 "rtps.transportInfo.messageSizeMax",
19064 FT_INT32,
19065 BASE_DEC,
19066 NULL((void*)0),
19067 0,
19068 "Maximum message size of transport",
19069 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19070 },
19071 { &hf_rtps_coherent_set_start, {
19072 "Coherent set start",
19073 "rtps.coherent_set.start",
19074 FT_UINT64,
19075 BASE_DEC,
19076 NULL((void*)0),
19077 0,
19078 "Start of a coherent set",
19079 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19080 },
19081
19082 { &hf_rtps_coherent_set_end, {
19083 "End of coherent set sequence",
19084 "rtps.coherent_set.end",
19085 FT_UINT64,
19086 BASE_DEC,
19087 NULL((void*)0),
19088 0,
19089 "End of a coherent set",
19090 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19091 },
19092
19093 /* Parameter / Topic Data ---------------------------------------------- */
19094 { &hf_rtps_param_topic_data, {
19095 "topicData",
19096 "rtps.param.topicData",
19097 FT_BYTES,
19098 BASE_NONE,
19099 NULL((void*)0),
19100 0,
19101 "The user data sent in a PID_TOPIC_DATA parameter",
19102 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19103 },
19104
19105
19106 /* Parameter / Content Filter Name ------------------------------------- */
19107 { &hf_rtps_param_content_filter_topic_name, {
19108 "contentFilterTopicName",
19109 "rtps.param.contentFilterTopicName",
19110 FT_STRINGZ,
19111 BASE_NONE,
19112 NULL((void*)0),
19113 0,
19114 "Value of the content filter topic name as sent in a PID_CONTENT_FILTER_PROPERTY parameter",
19115 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19116 },
19117 { &hf_rtps_param_related_topic_name, {
19118 "relatedTopicName",
19119 "rtps.param.relatedTopicName",
19120 FT_STRINGZ,
19121 BASE_NONE,
19122 NULL((void*)0),
19123 0,
19124 "Value of the related topic name as sent in a PID_CONTENT_FILTER_PROPERTY parameter",
19125 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19126 },
19127 { &hf_rtps_param_filter_class_name, {
19128 "filterClassName",
19129 "rtps.param.filterClassName",
19130 FT_STRINGZ,
19131 BASE_NONE,
19132 NULL((void*)0),
19133 0,
19134 "Value of the filter class name as sent in a PID_CONTENT_FILTER_PROPERTY parameter",
19135 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19136 },
19137
19138 { &hf_rtps_durability_service_cleanup_delay,
19139 { "Service Cleanup Delay", "rtps.durability.service_cleanup_delay",
19140 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL((void*)0), 0,
19141 "Time using the RTPS time_t standard format", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19142 },
19143
19144 { &hf_rtps_liveliness_lease_duration,
19145 { "Lease Duration", "rtps.liveliness.lease_duration",
19146 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL((void*)0), 0,
19147 "Time using the RTPS time_t standard format", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19148 },
19149
19150 { &hf_rtps_participant_lease_duration,
19151 { "Duration", "rtps.participant_lease_duration",
19152 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL((void*)0), 0,
19153 "Time using the RTPS time_t standard format", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19154 },
19155
19156 { &hf_rtps_time_based_filter_minimum_separation,
19157 { "Minimum Separation", "rtps.time_based_filter.minimum_separation",
19158 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL((void*)0), 0,
19159 "Time using the RTPS time_t standard format", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19160 },
19161
19162 { &hf_rtps_reliability_max_blocking_time,
19163 { "Max Blocking Time", "rtps.reliability.max_blocking_time",
19164 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL((void*)0), 0,
19165 "Time using the RTPS time_t standard format", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19166 },
19167
19168 { &hf_rtps_deadline_period,
19169 { "Period", "rtps.deadline_period",
19170 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL((void*)0), 0,
19171 "Time using the RTPS time_t standard format", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19172 },
19173
19174 { &hf_rtps_latency_budget_duration,
19175 { "Duration", "rtps.latency_budget.duration",
19176 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL((void*)0), 0,
19177 "Time using the RTPS time_t standard format", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19178 },
19179
19180 { &hf_rtps_lifespan_duration,
19181 { "Duration", "rtps.lifespan",
19182 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL((void*)0), 0,
19183 "Time using the RTPS time_t standard format", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19184 },
19185
19186 { &hf_rtps_persistence,
19187 { "Persistence", "rtps.persistence",
19188 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL((void*)0), 0,
19189 "Time using the RTPS time_t standard format", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19190 },
19191
19192 { &hf_rtps_info_ts_timestamp,
19193 { "Timestamp", "rtps.info_ts.timestamp",
19194 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL((void*)0), 0,
19195 "Time using the RTPS time_t standard format", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19196 },
19197
19198 { &hf_rtps_timestamp,
19199 { "Timestamp", "rtps.timestamp",
19200 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL((void*)0), 0,
19201 "Time using the RTPS time_t standard format", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19202 },
19203
19204 { &hf_rtps_locator_kind,
19205 { "Kind", "rtps.locator.kind",
19206 FT_UINT32, BASE_HEX, VALS(rtps_locator_kind_vals)((0 ? (const struct _value_string*)0 : ((rtps_locator_kind_vals
))))
, 0,
19207 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19208 },
19209
19210 { &hf_rtps_locator_port,
19211 { "Port", "rtps.locator.port",
19212 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
19213 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19214 },
19215#if 0
19216 { &hf_rtps_logical_port,
19217 { "RTPS Logical Port", "rtps.locator.port",
19218 FT_INT32, BASE_DEC, NULL((void*)0), 0,
19219 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19220 },
19221#endif
19222 { &hf_rtps_locator_public_address_port,
19223 { "Public Address Port", "rtps.locator.public_address_port",
19224 FT_INT32, BASE_DEC, NULL((void*)0), 0,
19225 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19226 },
19227
19228 { &hf_rtps_locator_ipv4,
19229 { "Address", "rtps.locator.ipv4",
19230 FT_IPv4, BASE_NONE, NULL((void*)0), 0,
19231 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19232 },
19233
19234 { &hf_rtps_locator_ipv6,
19235 { "Address", "rtps.locator.ipv6",
19236 FT_IPv6, BASE_NONE, NULL((void*)0), 0,
19237 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19238 },
19239
19240 { &hf_rtps_participant_builtin_endpoints,
19241 { "BuiltIn Endpoint", "rtps.participant_builtin_endpoints",
19242 FT_UINT32, BASE_HEX, NULL((void*)0), 0,
19243 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19244 },
19245
19246 { &hf_rtps_participant_manual_liveliness_count,
19247 { "Manual Liveliness Count", "rtps.participant_manual_liveliness_count",
19248 FT_UINT32, BASE_HEX, NULL((void*)0), 0,
19249 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19250 },
19251
19252 { &hf_rtps_history_depth,
19253 { "Depth", "rtps.history_depth",
19254 FT_INT32, BASE_DEC, NULL((void*)0), 0,
19255 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19256 },
19257
19258 { &hf_rtps_resource_limit_max_samples,
19259 { "Max Samples", "rtps.resource_limit.max_samples",
19260 FT_INT32, BASE_DEC, NULL((void*)0), 0,
19261 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19262 },
19263
19264 { &hf_rtps_resource_limit_max_instances,
19265 { "Max Instances", "rtps.resource_limit.max_instances",
19266 FT_INT32, BASE_DEC, NULL((void*)0), 0,
19267 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19268 },
19269
19270 { &hf_rtps_resource_limit_max_samples_per_instances,
19271 { "Max Samples Per Instance", "rtps.resource_limit.max_samples_per_instance",
19272 FT_INT32, BASE_DEC, NULL((void*)0), 0,
19273 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19274 },
19275
19276 { &hf_rtps_filter_bitmap,
19277 { "Filter Bitmap", "rtps.filter_bitmap",
19278 FT_UINT32, BASE_HEX, NULL((void*)0), 0,
19279 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19280 },
19281
19282 { &hf_rtps_type_checksum,
19283 { "Checksum", "rtps.type_checksum",
19284 FT_UINT32, BASE_HEX, NULL((void*)0), 0,
19285 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19286 },
19287
19288 { &hf_rtps_queue_size,
19289 { "queueSize", "rtps.queue_size",
19290 FT_UINT32, BASE_HEX, NULL((void*)0), 0,
19291 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19292 },
19293
19294 { &hf_rtps_acknack_count,
19295 { "Count", "rtps.acknack.count",
19296 FT_INT32, BASE_DEC, NULL((void*)0), 0,
19297 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19298 },
19299
19300 { &hf_rtps_param_app_ack_virtual_writer_count,
19301 { "virtualWriterCount", "rtps.app_ack.virtual_writer_count",
19302 FT_INT32, BASE_DEC, NULL((void*)0), 0,
19303 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19304 },
19305
19306 { &hf_rtps_param_app_ack_count,
19307 { "count", "rtps.app_ack.count",
19308 FT_INT32, BASE_DEC, NULL((void*)0), 0,
19309 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19310 },
19311
19312 { &hf_rtps_param_app_ack_conf_virtual_writer_count,
19313 { "virtualWriterCount", "rtps.app_ack_conf.virtual_writer_count",
19314 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
19315 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19316 },
19317
19318 { &hf_rtps_param_app_ack_conf_count,
19319 { "count", "rtps.app_ack_conf.count",
19320 FT_INT32, BASE_DEC, NULL((void*)0), 0,
19321 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19322 },
19323
19324 { &hf_rtps_param_app_ack_interval_payload_length,
19325 { "intervalPayloadLength", "rtps.app_ack.interval_payload_length",
19326 FT_INT16, BASE_DEC, NULL((void*)0), 0,
19327 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19328 },
19329
19330 { &hf_rtps_param_app_ack_interval_flags,
19331 { "intervalFlags", "rtps.app_ack.interval_flags",
19332 FT_INT16, BASE_DEC, NULL((void*)0), 0,
19333 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19334 },
19335
19336 { &hf_rtps_param_app_ack_interval_count,
19337 { "intervalCount", "rtps.app_ack.interval_count",
19338 FT_INT16, BASE_DEC, NULL((void*)0), 0,
19339 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19340 },
19341
19342 { &hf_rtps_param_app_ack_octets_to_next_virtual_writer,
19343 { "octetsToNextVirtualWriter", "rtps.app_ack.octets_to_next_virtual_writer",
19344 FT_INT16, BASE_DEC, NULL((void*)0), 0,
19345 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19346 },
19347
19348 { &hf_rtps_durability_service_history_kind,
19349 { "History Kind", "rtps.durability_service.history_kind",
19350 FT_UINT32, BASE_HEX, VALS(history_qos_vals)((0 ? (const struct _value_string*)0 : ((history_qos_vals)))), 0,
19351 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19352 },
19353
19354 { &hf_rtps_durability_service_history_depth,
19355 { "History Depth", "rtps.durability_service.history_depth",
19356 FT_INT32, BASE_DEC, NULL((void*)0), 0,
19357 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19358 },
19359
19360 { &hf_rtps_durability_service_max_samples,
19361 { "Max Samples", "rtps.durability_service.max_samples",
19362 FT_INT32, BASE_DEC, NULL((void*)0), 0,
19363 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19364 },
19365
19366 { &hf_rtps_durability_service_max_instances,
19367 { "Max Instances", "rtps.durability_service.max_instances",
19368 FT_INT32, BASE_DEC, NULL((void*)0), 0,
19369 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19370 },
19371
19372 { &hf_rtps_durability_service_max_samples_per_instances,
19373 { "Max Samples Per Instance", "rtps.durability_service.max_samples_per_instance",
19374 FT_INT32, BASE_DEC, NULL((void*)0), 0,
19375 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19376 },
19377
19378 { &hf_rtps_liveliness_kind,
19379 { "Kind", "rtps.liveliness.kind",
19380 FT_UINT32, BASE_HEX, VALS(liveliness_qos_vals)((0 ? (const struct _value_string*)0 : ((liveliness_qos_vals)
)))
, 0,
19381 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19382 },
19383
19384 { &hf_rtps_manager_key,
19385 { "Key", "rtps.manager_key",
19386 FT_UINT32, BASE_HEX, NULL((void*)0), 0,
19387 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19388 },
19389
19390 { &hf_rtps_locator_udp_v4,
19391 { "Address", "rtps.locator_udp_v4.ip",
19392 FT_IPv4, BASE_NONE, NULL((void*)0), 0,
19393 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19394 },
19395
19396 { &hf_rtps_locator_udp_v4_port,
19397 { "Port", "rtps.locator_udp_v4.port",
19398 FT_UINT32, BASE_HEX, NULL((void*)0), 0,
19399 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19400 },
19401
19402 { &hf_param_ip_address,
19403 { "Address", "rtps.param.ip_address",
19404 FT_IPv4, BASE_NONE, NULL((void*)0), 0,
19405 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19406 },
19407
19408 { &hf_rtps_param_port,
19409 { "Port", "rtps.param.port",
19410 FT_UINT32, BASE_HEX, NULL((void*)0), 0,
19411 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19412 },
19413
19414 { &hf_rtps_expects_inline_qos,
19415 { "Inline QoS", "rtps.expects_inline_qos",
19416 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0,
19417 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19418 },
19419
19420 { &hf_rtps_presentation_coherent_access,
19421 { "Coherent Access", "rtps.presentation.coherent_access",
19422 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0,
19423 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19424 },
19425
19426 { &hf_rtps_presentation_ordered_access,
19427 { "Ordered Access", "rtps.presentation.ordered_access",
19428 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0,
19429 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19430 },
19431
19432 { &hf_rtps_direct_communication,
19433 { "Direct Communication", "rtps.direct_communication",
19434 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0,
19435 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19436 },
19437
19438 { &hf_rtps_expects_ack,
19439 { "expectsAck", "rtps.expects_ack",
19440 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0,
19441 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19442 },
19443
19444 { &hf_rtps_expects_virtual_heartbeat,
19445 { "expectsVirtualHB", "rtps.expects_virtual_heartbeat",
19446 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0,
19447 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19448 },
19449
19450 { &hf_rtps_reliability_kind,
19451 { "Kind", "rtps.reliability_kind",
19452 FT_UINT32, BASE_HEX, VALS(reliability_qos_vals)((0 ? (const struct _value_string*)0 : ((reliability_qos_vals
))))
, 0,
19453 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19454 },
19455
19456 { &hf_rtps_durability,
19457 { "Durability", "rtps.durability",
19458 FT_UINT32, BASE_HEX, VALS(durability_qos_vals)((0 ? (const struct _value_string*)0 : ((durability_qos_vals)
)))
, 0,
19459 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19460 },
19461
19462 { &hf_rtps_ownership,
19463 { "Kind", "rtps.ownership",
19464 FT_UINT32, BASE_HEX, VALS(ownership_qos_vals)((0 ? (const struct _value_string*)0 : ((ownership_qos_vals))
))
, 0,
19465 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19466 },
19467
19468 { &hf_rtps_presentation_access_scope,
19469 { "Access Scope", "rtps.presentation.access_scope",
19470 FT_UINT32, BASE_HEX, VALS(presentation_qos_vals)((0 ? (const struct _value_string*)0 : ((presentation_qos_vals
))))
, 0,
19471 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19472 },
19473
19474 { &hf_rtps_destination_order,
19475 { "Kind", "rtps.destination_order",
19476 FT_UINT32, BASE_HEX, VALS(destination_order_qos_vals)((0 ? (const struct _value_string*)0 : ((destination_order_qos_vals
))))
, 0,
19477 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19478 },
19479
19480 { &hf_rtps_history_kind,
19481 { "Kind", "rtps.history.kind",
19482 FT_UINT32, BASE_HEX, VALS(history_qos_vals)((0 ? (const struct _value_string*)0 : ((history_qos_vals)))), 0,
19483 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19484 },
19485
19486 { &hf_rtps_data_status_info,
19487 { "statusInfo", "rtps.data.status_info",
19488 FT_UINT32, BASE_HEX, NULL((void*)0), 0,
19489 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19490 },
19491
19492 { &hf_rtps_param_serialize_encap_kind,
19493 { "encapsulation kind", "rtps.param.serialize.encap_kind",
19494 FT_UINT16, BASE_HEX, VALS(encapsulation_id_vals)((0 ? (const struct _value_string*)0 : ((encapsulation_id_vals
))))
, 0,
19495 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19496 },
19497
19498 { &hf_rtps_param_serialize_encap_len,
19499 { "encapsulation options", "rtps.param.serialize.encap_len",
19500 FT_UINT16, BASE_HEX, NULL((void*)0), 0,
19501 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19502 },
19503
19504 /* Parameter / NtpTime ------------------------------------------------- */
19505 { &hf_rtps_param_timestamp_sec, {
19506 "seconds", "rtps.param.ntpTime.sec",
19507 FT_INT32, BASE_DEC, NULL((void*)0), 0,
19508 "The 'second' component of an RTPS time_t",
19509 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19510 },
19511
19512 { &hf_rtps_param_timestamp_fraction, {
19513 "fraction", "rtps.param.ntpTime.fraction",
19514 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
19515 "The 'fraction' component of an RTPS time_t",
19516 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19517 },
19518
19519 { &hf_rtps_param_transport_priority,
19520 { "Value", "rtps.param.transport_priority",
19521 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
19522 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19523 },
19524
19525 { &hf_rtps_param_type_max_size_serialized,
19526 { "Value", "rtps.param.type_max_size_serialized",
19527 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
19528 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19529 },
19530
19531 { &hf_rtps_param_peer_host_epoch,
19532 { "Peer Host Epoch", "rtps.param.peer_host_epoch",
19533 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
19534 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19535 },
19536
19537 { &hf_rtps_param_endpoint_property_change_epoch,
19538 { "Endpoint Property Change Epoch", "rtps.param.endpoint_property_change_epoch",
19539 FT_INT64, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19540 },
19541
19542 { &hf_rtps_param_entity_name,
19543 { "entityName", "rtps.param.entityName",
19544 FT_STRINGZ, BASE_NONE, NULL((void*)0), 0,
19545 "String representing the name of the entity addressed by the submessage",
19546 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19547 },
19548
19549 { &hf_rtps_param_role_name,
19550 { "roleName", "rtps.param.roleName",
19551 FT_STRINGZ, BASE_NONE, NULL((void*)0), 0,
19552 "String representing the role name of the entity addressed by the submessage",
19553 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19554 },
19555
19556 { &hf_rtps_disable_positive_ack,
19557 { "disablePositiveAcks", "rtps.disable_positive_ack",
19558 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0,
19559 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19560 },
19561
19562 { &hf_rtps_participant_guid_v1,
19563 { "Participant GUID", "rtps.param.participant_guid_v1",
19564 FT_UINT64, BASE_HEX, NULL((void*)0), 0,
19565 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19566 },
19567
19568 { &hf_rtps_participant_guid,
19569 { "Participant GUID", "rtps.param.participant_guid",
19570 FT_BYTES, BASE_NONE, NULL((void*)0), 0,
19571 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19572 },
19573
19574 { &hf_rtps_group_guid_v1,
19575 { "Group GUID", "rtps.param.group_guid_v1",
19576 FT_UINT64, BASE_HEX, NULL((void*)0), 0,
19577 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19578 },
19579
19580 { &hf_rtps_group_guid,
19581 { "Group GUID", "rtps.param.group_guid",
19582 FT_BYTES, BASE_NONE, NULL((void*)0), 0,
19583 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19584 },
19585
19586 { &hf_rtps_endpoint_guid,
19587 { "Endpoint GUID", "rtps.param.endpoint_guid",
19588 FT_BYTES, BASE_NONE, NULL((void*)0), 0,
19589 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19590 },
19591
19592 { &hf_rtps_param_host_id,
19593 { "hostId", "rtps.param.guid.hostId",
19594 FT_UINT32, BASE_HEX, NULL((void*)0), 0,
19595 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19596 },
19597
19598 { &hf_rtps_param_app_id,
19599 { "appId", "rtps.param.guid.appId",
19600 FT_UINT32, BASE_HEX, NULL((void*)0), 0,
19601 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19602 },
19603
19604 { &hf_rtps_param_instance_id_v1,
19605 { "instanceId", "rtps.param.guid.instanceId",
19606 FT_UINT24, BASE_HEX, NULL((void*)0), 0,
19607 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19608 },
19609
19610 { &hf_rtps_param_instance_id,
19611 { "instanceId", "rtps.param.guid.instanceId",
19612 FT_UINT32, BASE_HEX, NULL((void*)0), 0,
19613 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19614 },
19615
19616 { &hf_rtps_param_app_kind,
19617 { "instanceId", "rtps.param.guid.appKind",
19618 FT_UINT8, BASE_HEX, NULL((void*)0), 0,
19619 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19620 },
19621
19622 { &hf_rtps_param_entity,
19623 { "entityId", "rtps.param.guid.entityId",
19624 FT_UINT32, BASE_HEX, VALS(entity_id_vals)((0 ? (const struct _value_string*)0 : ((entity_id_vals)))), 0,
19625 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19626 },
19627
19628 { &hf_rtps_param_entity_key,
19629 { "entityKey", "rtps.param.guid.entityKey",
19630 FT_UINT24, BASE_HEX, NULL((void*)0), 0,
19631 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19632 },
19633
19634 { &hf_rtps_param_entity_kind,
19635 { "entityKind", "rtps.param.guid.entityKind",
19636 FT_UINT8, BASE_HEX, VALS(entity_kind_vals)((0 ? (const struct _value_string*)0 : ((entity_kind_vals)))), 0,
19637 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19638 },
19639
19640 { &hf_rtps_param_extended_pid_length,
19641 { "Extended Length", "rtps.param.extended_pid_length",
19642 FT_UINT32, BASE_HEX, NULL((void*)0), 0,
19643 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19644 },
19645
19646 { &hf_rtps_param_extended_parameter,
19647 { "Extended Parameter", "rtps.param.extended_parameter",
19648 FT_UINT32, BASE_HEX, NULL((void*)0), 0,
19649 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19650 },
19651
19652 { &hf_rtps_data_frag_number,
19653 { "fragmentStartingNum", "rtps.data_frag.number",
19654 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
19655 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19656 },
19657
19658 { &hf_rtps_data_frag_sample_size,
19659 { "sampleSize", "rtps.data_frag.sample_size",
19660 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
19661 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19662 },
19663
19664 { &hf_rtps_data_frag_num_fragments,
19665 { "fragmentsInSubmessage", "rtps.data_frag.num_fragments",
19666 FT_UINT16, BASE_DEC, NULL((void*)0), 0,
19667 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19668 },
19669
19670 { &hf_rtps_data_frag_size,
19671 { "fragmentSize", "rtps.data_frag.size",
19672 FT_UINT16, BASE_DEC, NULL((void*)0), 0,
19673 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19674 },
19675
19676 { &hf_rtps_nokey_data_frag_number,
19677 { "fragmentStartingNum", "rtps.nokey_data_frag.number",
19678 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
19679 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19680 },
19681
19682 { &hf_rtps_nokey_data_frag_num_fragments,
19683 { "fragmentsInSubmessage", "rtps.nokey_data_frag.num_fragments",
19684 FT_UINT16, BASE_DEC, NULL((void*)0), 0,
19685 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19686 },
19687
19688 { &hf_rtps_nokey_data_frag_size,
19689 { "fragmentSize", "rtps.nokey_data_frag.size",
19690 FT_UINT16, BASE_DEC, NULL((void*)0), 0,
19691 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19692 },
19693
19694 { &hf_rtps_nack_frag_count,
19695 { "Count", "rtps.nack_frag.count",
19696 FT_INT32, BASE_DEC, NULL((void*)0), 0,
19697 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19698 },
19699
19700 { &hf_rtps_heartbeat_frag_number,
19701 { "lastFragmentNum", "rtps.heartbeat_frag.number",
19702 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
19703 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19704 },
19705
19706 { &hf_rtps_heartbeat_frag_count,
19707 { "Count", "rtps.heartbeat_frag.count",
19708 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
19709 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19710 },
19711
19712 { &hf_rtps_heartbeat_batch_count,
19713 { "Count", "rtps.heartbeat_batch.count",
19714 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
19715 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19716 },
19717
19718 { &hf_rtps_virtual_heartbeat_count,
19719 { "Count", "rtps.virtual_heartbeat.count",
19720 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
19721 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19722 },
19723
19724 { &hf_rtps_virtual_heartbeat_num_virtual_guids,
19725 { "numVirtualGUIDs", "rtps.virtual_heartbeat.num_virtual_guids",
19726 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
19727 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19728 },
19729
19730 { &hf_rtps_virtual_heartbeat_num_writers,
19731 { "numWriters", "rtps.virtual_heartbeat.num_writers",
19732 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
19733 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19734 },
19735
19736 { &hf_rtps_data_serialize_data, {
19737 "serializedData", "rtps.data.serialize_data",
19738 FT_BYTES, BASE_NONE, NULL((void*)0), 0,
19739 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19740 },
19741
19742 { &hf_rtps_parameter_data, {
19743 "parameterData", "rtps.parameter_data",
19744 FT_BYTES, BASE_NONE, NULL((void*)0), 0,
19745 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19746 },
19747
19748 { &hf_rtps_data_batch_timestamp,
19749 { "Timestamp", "rtps.data_batch.timestamp",
19750 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL((void*)0), 0,
19751 "Time using the RTPS time_t standard format", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19752 },
19753
19754 { &hf_rtps_data_batch_offset_to_last_sample_sn,
19755 { "offsetToLastSampleSN", "rtps.data_batch.offset_to_last_sample_sn",
19756 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
19757 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19758 },
19759
19760 { &hf_rtps_data_batch_sample_count,
19761 { "batchSampleCount", "rtps.data_batch.sample_count",
19762 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
19763 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19764 },
19765
19766 { &hf_rtps_data_batch_offset_sn,
19767 { "offsetSN", "rtps.data_batch.offset_sn",
19768 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
19769 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19770 },
19771
19772 { &hf_rtps_data_batch_octets_to_sl_encap_id,
19773 { "octetsToSLEncapsulationId", "rtps.data_batch.octets_to_sl_encap_id",
19774 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
19775 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19776 },
19777
19778 { &hf_rtps_data_batch_serialized_data_length,
19779 { "serializedDataLength", "rtps.data_batch.serialized_data_length",
19780 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
19781 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19782 },
19783
19784 { &hf_rtps_data_batch_octets_to_inline_qos,
19785 { "octetsToInlineQos", "rtps.data_batch.octets_to_inline_qos",
19786 FT_UINT16, BASE_DEC, NULL((void*)0), 0,
19787 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19788 },
19789
19790 { &hf_rtps_fragment_number_base64,
19791 { "bitmapBase", "rtps.fragment_number.base64",
19792 FT_UINT64, BASE_DEC, NULL((void*)0), 0,
19793 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19794 },
19795
19796 { &hf_rtps_fragment_number_base,
19797 { "bitmapBase", "rtps.fragment_number.base32",
19798 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
19799 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19800 },
19801
19802 { &hf_rtps_fragment_number_num_bits,
19803 { "numBits", "rtps.fragment_number.num_bits",
19804 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
19805 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19806 },
19807
19808 { &hf_rtps_bitmap_num_bits,
19809 { "numBits", "rtps.bitmap.num_bits",
19810 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
19811 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19812 },
19813
19814 { &hf_rtps_acknack_analysis,
19815 { "Acknack Analysis", "rtps.sm.acknack_analysis",
19816 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
19817 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19818 },
19819
19820 { &hf_rtps_param_partition_num,
19821 { "Number of partition names", "rtps.param.partition_num",
19822 FT_INT32, BASE_DEC, NULL((void*)0), 0,
19823 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19824 },
19825
19826 { &hf_rtps_param_topic_alias_num,
19827 { "Number of topic aliases", "rtps.param.topic_alias_num",
19828 FT_INT32, BASE_DEC, NULL((void*)0), 0,
19829 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19830 },
19831
19832 { &hf_rtps_param_type_alias_num,
19833 { "Number of type aliases", "rtps.param.type_alias_num",
19834 FT_INT32, BASE_DEC, NULL((void*)0), 0,
19835 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19836 },
19837
19838 { &hf_rtps_param_expression_parameters_num,
19839 { "Number of expression params", "rtps.param.expression_parameters_num",
19840 FT_INT32, BASE_DEC, NULL((void*)0), 0,
19841 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19842 },
19843
19844 { &hf_rtps_param_partition,
19845 { "name", "rtps.param.partition",
19846 FT_STRING, BASE_NONE, NULL((void*)0), 0,
19847 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19848 },
19849
19850 { &hf_rtps_param_topic_alias,
19851 { "Topic alias", "rtps.param.topic_alias",
19852 FT_STRING, BASE_NONE, NULL((void*)0), 0,
19853 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19854 },
19855
19856 { &hf_rtps_param_type_alias,
19857 { "Type alias", "rtps.param.type_alias",
19858 FT_STRING, BASE_NONE, NULL((void*)0), 0,
19859 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19860 },
19861
19862 { &hf_rtps_param_filter_expression,
19863 { "filterExpression", "rtps.param.filter_expression",
19864 FT_STRING, BASE_NONE, NULL((void*)0), 0,
19865 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19866 },
19867
19868 { &hf_rtps_param_expression_parameters,
19869 { "expressionParameters", "rtps.param.expression_parameters",
19870 FT_STRING, BASE_NONE, NULL((void*)0), 0,
19871 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19872 },
19873
19874 { &hf_rtps_locator_filter_list_num_channels,
19875 { "numberOfChannels", "rtps.param.locator_filter_list.num_channels",
19876 FT_INT32, BASE_DEC, NULL((void*)0), 0,
19877 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19878 },
19879
19880 { &hf_rtps_locator_filter_list_filter_name,
19881 { "filterName", "rtps.param.locator_filter_list.filter_name",
19882 FT_STRING, BASE_NONE, NULL((void*)0), 0,
19883 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19884 },
19885
19886 { &hf_rtps_locator_filter_list_filter_exp,
19887 { "filterExpression", "rtps.param.locator_filter_list.filter_exp",
19888 FT_STRING, BASE_NONE, NULL((void*)0), 0,
19889 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19890 },
19891
19892 { &hf_rtps_extra_flags,
19893 { "Extra flags", "rtps.extra_flags",
19894 FT_UINT16, BASE_HEX, NULL((void*)0), 0xFFFF,
19895 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19896 },
19897
19898 { &hf_rtps_param_builtin_endpoint_set_flags,
19899 { "Flags", "rtps.param.builtin_endpoint_set",
19900 FT_UINT32, BASE_HEX, NULL((void*)0), 0,
19901 "bitmask representing the flags in PID_BUILTIN_ENDPOINT_SET",
19902 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19903 },
19904
19905 { &hf_rtps_param_vendor_builtin_endpoint_set_flags,
19906 { "Flags", "rtps.param.vendor_builtin_endpoint_set",
19907 FT_UINT32, BASE_HEX, NULL((void*)0), 0,
19908 "bitmask representing the flags in PID_VENDOR_BUILTIN_ENDPOINT_SET",
19909 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19910 },
19911
19912 { &hf_rtps_param_builtin_endpoint_ext_set_flags,
19913 { "Flags", "rtps.param.builtin_endpoint_ext_set",
19914 FT_UINT32, BASE_HEX, NULL((void*)0), 0,
19915 "bitmask representing the flags in PID_AVAILABLE_BUILTIN_ENDPOINTS_EXT",
19916 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19917 },
19918
19919 { &hf_rtps_param_endpoint_security_attributes,
19920 { "Flags", "rtps.param.endpoint_security_attributes",
19921 FT_UINT32, BASE_HEX, NULL((void*)0), 0,
19922 "bitmask representing the flags in PID_ENDPOINT_SECURITY_ATTRIBUTES",
19923 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19924 },
19925
19926 { &hf_rtps_param_plugin_promiscuity_kind, {
19927 "promiscuityKind", "rtps.param.plugin_promiscuity_kind",
19928 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) }
19929 },
19930
19931 { &hf_rtps_param_service_kind, {
19932 "serviceKind", "rtps.param.service_kind",
19933 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) }
19934 },
19935
19936 { &hf_rtps_param_data_representation,{
19937 "Data Representation Kind", "rtps.param.data_representation",
19938 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) }
19939 },
19940
19941 { &hf_rtps_param_type_consistency_kind, {
19942 "Type Consistency Kind", "rtps.param.type_consistency_kind",
19943 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) }
19944 },
19945
19946 { &hf_rtps_param_ignore_sequence_bounds, {
19947 "Ignore Sequence Bounds", "rtps.param.ignore_sequence_bounds",
19948 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19949 },
19950
19951 { &hf_rtps_param_ignore_string_bounds, {
19952 "Ignore String Bounds", "rtps.param.ignore_string_bounds",
19953 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19954 },
19955
19956 { &hf_rtps_param_ignore_member_names, {
19957 "Ignore Member Names", "rtps.param.ignore_member_names",
19958 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19959 },
19960
19961 { &hf_rtps_param_prevent_type_widening, {
19962 "Prevent Type Widening", "rtps.param.prevent_type_widening",
19963 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19964 },
19965
19966 { &hf_rtps_param_force_type_validation, {
19967 "Force Type Validation", "rtps.param.force_type_validation",
19968 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19969 },
19970
19971 { &hf_rtps_param_ignore_enum_literal_names, {
19972 "Ignore Enum Literal Names", "rtps.param.ignore_enum_literal_names",
19973 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19974 },
19975
19976 { &hf_rtps_param_acknowledgment_kind, {
19977 "Acknowledgment Kind", "rtps.param.acknowledgment_kind",
19978 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) }
19979 },
19980
19981 /* Finally the raw issue data ------------------------------------------ */
19982 { &hf_rtps_issue_data, {
19983 "serializedData", "rtps.issueData",
19984 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) }
19985 },
19986
19987 { &hf_rtps_param_product_version_major, {
19988 "Major", "rtps.param.product_version.major",
19989 FT_UINT8, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19990 },
19991
19992 { &hf_rtps_param_product_version_minor, {
19993 "Minor", "rtps.param.product_version.minor",
19994 FT_UINT8, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19995 },
19996
19997 { &hf_rtps_param_product_version_release, {
19998 "Release", "rtps.param.product_version.release",
19999 FT_UINT8, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20000 },
20001
20002 { &hf_rtps_param_product_version_release_as_char, {
20003 "Release", "rtps.param.product_version.release_string",
20004 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20005 },
20006
20007 { &hf_rtps_param_product_version_revision, {
20008 "Revision", "rtps.param.product_version.revision",
20009 FT_UINT8, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20010 },
20011
20012 { &hf_rtps_encapsulation_id, {
20013 "encapsulation id", "rtps.encapsulation_id",
20014 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) }
20015 },
20016
20017 { &hf_rtps_encapsulation_kind, {
20018 "kind", "rtps.encapsulation_kind",
20019 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) }
20020 },
20021
20022 { &hf_rtps_octets_to_inline_qos, {
20023 "Octets to inline QoS", "rtps.octets_to_inline_qos",
20024 FT_UINT16, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20025 },
20026
20027 { &hf_rtps_filter_signature, {
20028 "filterSignature", "rtps.filter_signature",
20029 FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20030 },
20031
20032 { &hf_rtps_bitmap, {
20033 "bitmap", "rtps.bitmap",
20034 FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20035 },
20036
20037 { &hf_rtps_property_name, {
20038 "Property Name", "rtps.property_name",
20039 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20040 },
20041
20042 { &hf_rtps_property_value, {
20043 "Value", "rtps.property_value",
20044 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20045 },
20046
20047 { &hf_rtps_union, {
20048 "union", "rtps.union",
20049 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20050 },
20051
20052 { &hf_rtps_union_case, {
20053 "case", "rtps.union_case",
20054 FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20055 },
20056
20057 { &hf_rtps_struct, {
20058 "struct", "rtps.struct",
20059 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20060 },
20061
20062 { &hf_rtps_member_name, {
20063 "member_name", "rtps.member_name",
20064 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20065 },
20066
20067 { &hf_rtps_sequence, {
20068 "sequence", "rtps.sequence",
20069 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20070 },
20071
20072 { &hf_rtps_array, {
20073 "array", "rtps.array",
20074 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20075 },
20076
20077 { &hf_rtps_bitfield, {
20078 "bitfield", "rtps.bitfield",
20079 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20080 },
20081
20082 { &hf_rtps_datatype, {
20083 "datatype", "rtps.datatype",
20084 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20085 },
20086
20087 { &hf_rtps_sequence_size, {
20088 "sequenceSize", "rtps.sequence_size",
20089 FT_UINT32, BASE_DEC|BASE_UNIT_STRING0x00001000, UNS(&units_octet_octets)((0 ? (const struct unit_name_string*)0 : ((&units_octet_octets
))))
, 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20090 },
20091
20092 { &hf_rtps_guid, {
20093 "guid", "rtps.guid",
20094 FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20095 },
20096
20097 { &hf_rtps_heartbeat_count, {
20098 "count", "rtps.heartbeat_count",
20099 FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20100 },
20101
20102 { &hf_rtps_encapsulation_options, {
20103 "Encapsulation options", "rtps.encapsulation_options",
20104 FT_UINT16, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20105 },
20106
20107 { &hf_rtps_serialized_key, {
20108 "serializedKey", "rtps.serialized_key",
20109 FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20110 },
20111
20112 { &hf_rtps_serialized_data, {
20113 "serializedData", "rtps.serialized_data",
20114 FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20115 },
20116
20117 { &hf_rtps_sm_rti_crc_number, {
20118 "RTPS Message Length", "rtps.sm.rti_crc.message_length",
20119 FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20120 },
20121
20122 { &hf_rtps_sm_rti_crc_result, {
20123 "CRC", "rtps.sm.rti_crc",
20124 FT_UINT32, BASE_HEX, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20125 },
20126 { &hf_rtps_message_length, {
20127 "RTPS Message Length", "rtps.message_length",
20128 FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20129 },
20130
20131 /* Flag bits */
20132 { &hf_rtps_flag_reserved80, {
20133 "Reserved", "rtps.flag.reserved",
20134 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) }
20135 },
20136 { &hf_rtps_flag_reserved40, {
20137 "Reserved", "rtps.flag.reserved",
20138 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) }
20139 },
20140 { &hf_rtps_flag_reserved20, {
20141 "Reserved", "rtps.flag.reserved",
20142 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) }
20143 },
20144 { &hf_rtps_flag_reserved10, {
20145 "Reserved", "rtps.flag.reserved",
20146 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) }
20147 },
20148 { &hf_rtps_flag_reserved08, {
20149 "Reserved", "rtps.flag.reserved",
20150 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) }
20151 },
20152 { &hf_rtps_flag_reserved04, {
20153 "Reserved", "rtps.flag.reserved",
20154 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) }
20155 },
20156 { &hf_rtps_flag_reserved02, {
20157 "Reserved", "rtps.flag.reserved",
20158 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) }
20159 },
20160 { &hf_rtps_flag_reserved8000, {
20161 "Reserved", "rtps.flag.reserved",
20162 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) }
20163 },
20164 { &hf_rtps_flag_reserved4000, {
20165 "Reserved", "rtps.flag.reserved",
20166 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) }
20167 },
20168 { &hf_rtps_flag_reserved2000, {
20169 "Reserved", "rtps.flag.reserved",
20170 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) }
20171 },
20172 { &hf_rtps_flag_reserved1000, {
20173 "Reserved", "rtps.flag.reserved",
20174 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) }
20175 },
20176 { &hf_rtps_flag_reserved0800, {
20177 "Reserved", "rtps.flag.reserved",
20178 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) }
20179 },
20180 { &hf_rtps_flag_reserved0400, {
20181 "Reserved", "rtps.flag.reserved",
20182 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) }
20183 },
20184 { &hf_rtps_flag_reserved0200, {
20185 "Reserved", "rtps.flag.reserved",
20186 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) }
20187 },
20188 { &hf_rtps_flag_reserved0100, {
20189 "Reserved", "rtps.flag.reserved",
20190 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) }
20191 },
20192 { &hf_rtps_flag_reserved0080, {
20193 "Reserved", "rtps.flag.reserved",
20194 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) }
20195 },
20196 { &hf_rtps_flag_reserved0040, {
20197 "Reserved", "rtps.flag.reserved",
20198 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) }
20199 },
20200 { &hf_rtps_flag_builtin_endpoint_set_reserved, {
20201 "Reserved", "rtps.flag.reserved",
20202 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) }
20203 },
20204 { &hf_rtps_flag_unregister, {
20205 "Unregister flag", "rtps.flag.unregister",
20206 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) }
20207 },
20208 { &hf_rtps_flag_inline_qos_v1, {
20209 "Inline QoS", "rtps.flag.inline_qos",
20210 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) }
20211 },
20212 { &hf_rtps_flag_hash_key, {
20213 "Hash key flag", "rtps.flag.hash_key",
20214 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) }
20215 },
20216 { &hf_rtps_flag_hash_key_rti, {
20217 "Hash key flag", "rtps.flag.hash_key",
20218 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) }
20219 },
20220 { &hf_rtps_flag_alive, {
20221 "Alive flag", "rtps.flag.alive",
20222 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) }
20223 },
20224 { &hf_rtps_flag_data_present_v1, {
20225 "Data present", "rtps.flag.data_present",
20226 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) }
20227 },
20228 { &hf_rtps_flag_multisubmessage, {
20229 "Multi-submessage", "rtps.flag.multisubmessage",
20230 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) }
20231 },
20232 { &hf_rtps_flag_endianness, {
20233 "Endianness", "rtps.flag.endianness",
20234 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) }
20235 },
20236 { &hf_rtps_flag_additional_authenticated_data, {
20237 "Additional Authenticated Data", "rtps.flag.additional_authenticated_data",
20238 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) }
20239 },
20240 { &hf_rtps_flag_protected_with_psk, {
20241 "Message protected with PSK", "rtps.flag.message_protected_with_psk",
20242 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) }
20243 },
20244 { &hf_rtps_flag_vendor_specific_content, {
20245 "Vendor-Specific Content", "rtps.flag.vendor_specific_content",
20246 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) }
20247 },
20248 { &hf_rtps_flag_inline_qos_v2, {
20249 "Inline QoS", "rtps.flag.inline_qos",
20250 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) }
20251 },
20252 { &hf_rtps_flag_data_present_v2, {
20253 "Data present", "rtps.flag.data_present",
20254 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) }
20255 },
20256 { &hf_rtps_flag_status_info, {
20257 "Status info flag", "rtps.flag.status_info",
20258 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) }
20259 },
20260 { &hf_rtps_flag_final, {
20261 "Final flag", "rtps.flag.final",
20262 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) }
20263 },
20264 { &hf_rtps_flag_liveliness, {
20265 "Liveliness flag", "rtps.flag.liveliness",
20266 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) }
20267 },
20268 { &hf_rtps_flag_multicast, {
20269 "Multicast flag", "rtps.flag.multicast",
20270 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) }
20271 },
20272 { &hf_rtps_flag_data_serialized_key, {
20273 "Serialized Key", "rtps.flag.data.serialized_key",
20274 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) }
20275 },
20276 { &hf_rtps_flag_data_frag_serialized_key, {
20277 "Serialized Key", "rtps.flag.data_frag.serialized_key",
20278 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) }
20279 },
20280 { &hf_rtps_flag_timestamp, {
20281 "Timestamp flag", "rtps.flag.timestamp",
20282 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) }
20283 },
20284 { &hf_rtps_flag_no_virtual_guids, {
20285 "No virtual GUIDs flag", "rtps.flag.no_virtual_guids",
20286 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) }
20287 },
20288 { &hf_rtps_flag_multiple_writers, {
20289 "Multiple writers flag", "rtps.flag.multiple_writers",
20290 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) }
20291 },
20292 { &hf_rtps_flag_multiple_virtual_guids, {
20293 "Multiple virtual GUIDs flag", "rtps.flag.multiple_virtual_guids",
20294 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) }
20295 },
20296 { &hf_rtps_flag_serialize_key16, {
20297 "Serialized Key", "rtps.flag.serialize_key",
20298 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) }
20299 },
20300 { &hf_rtps_flag_invalid_sample, {
20301 "Invalid sample", "rtps.flag.invalid_sample",
20302 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) }
20303 },
20304 { &hf_rtps_flag_data_present16, {
20305 "Data present", "rtps.flag.data_present",
20306 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) }
20307 },
20308 { &hf_rtps_flag_offsetsn_present, {
20309 "OffsetSN present", "rtps.flag.offsetsn_present",
20310 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) }
20311 },
20312 { &hf_rtps_flag_inline_qos16_v2, {
20313 "Inline QoS", "rtps.flag.inline_qos",
20314 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) }
20315 },
20316 { &hf_rtps_flag_timestamp_present, {
20317 "Timestamp present", "rtps.flag.timestamp_present",
20318 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) }
20319 },
20320 { &hf_rtps_param_status_info_flags,
20321 { "Flags", "rtps.param.status_info",
20322 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) }
20323 },
20324 { &hf_rtps_header_extension_flags,
20325 { "Flags", "rtps.header_extension_flags",
20326 FT_UINT8, BASE_HEX, NULL((void*)0), 0, "bitmask representing header extension flags", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20327 },
20328 { &hf_rtps_flag_header_extension_parameters, {
20329 "Header Extension Parameter List Present", "rtps.flag.header_extension.parameter_list",
20330 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) }
20331 },
20332 { &hf_rtps_flag_header_extension_checksum2, {
20333 "Header Extension Message Checksum 2", "rtps.flag.header_extension.message_checksum2",
20334 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) }
20335 },
20336 { &hf_rtps_flag_header_extension_checksum1, {
20337 "Header Extension Message Checksum 1", "rtps.flag.header_extension.message_checksum1",
20338 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) }
20339 },
20340 { &hf_rtps_flag_header_extension_wextension, {
20341 "Header Extension W Extension Present", "rtps.flag.header_extension.wextension",
20342 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) }
20343 },
20344 { &hf_rtps_flag_header_extension_uextension, {
20345 "Header Extension U Extension Present", "rtps.flag.header_extension.uextension",
20346 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) }
20347 },
20348 { &hf_rtps_flag_header_extension_timestamp, {
20349 "Header Extension Timestamp Present", "rtps.flag.header_extension.timestamp",
20350 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) }
20351 },
20352 { &hf_rtps_flag_header_extension_message_length, {
20353 "Header Extension Message Length", "rtps.flag.header_extension.message_length",
20354 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) }
20355 },
20356 { &hf_rtps_header_extension_checksum_crc32c, {
20357 "Header Extension Checksum CRC-32C", "rtps.header_extension.checksum_crc32c",
20358 FT_UINT32, BASE_HEX, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20359 },
20360 { &hf_rtps_header_extension_checksum_crc64, {
20361 "Header Extension Checksum CRC64", "rtps.header_extension.checksum_crc64",
20362 FT_UINT64, BASE_HEX, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20363 },
20364 { &hf_rtps_header_extension_checksum_md5, {
20365 "Header Extension Checksum MD5", "rtps.header_extension.checksum_md5",
20366 FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20367 },
20368 { &hf_rtps_uextension, {
20369 "Header Extension uExtension", "rtps.uextension",
20370 FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20371 },
20372 { &hf_rtps_wextension, {
20373 "Header Extension wExtension", "rtps.wextension",
20374 FT_UINT64, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20375 },
20376 { &hf_rtps_flag_unregistered, {
20377 "Unregistered", "rtps.flag.unregistered",
20378 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) }
20379 },
20380 { &hf_rtps_flag_disposed, {
20381 "Disposed", "rtps.flag.undisposed",
20382 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) }
20383 },
20384 { &hf_rtps_flag_participant_announcer, {
20385 "Participant Announcer", "rtps.flag.participant_announcer",
20386 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) }
20387 },
20388 { &hf_rtps_flag_participant_detector, {
20389 "Participant Detector", "rtps.flag.participant_detector",
20390 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) }
20391 },
20392 { &hf_rtps_flag_publication_announcer, {
20393 "Publication Announcer", "rtps.flag.publication_announcer",
20394 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) }
20395 },
20396 { &hf_rtps_flag_publication_detector, {
20397 "Publication Detector", "rtps.flag.publication_detector",
20398 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) }
20399 },
20400 { &hf_rtps_flag_subscription_announcer, {
20401 "Subscription Announcer", "rtps.flag.subscription_announcer",
20402 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) }
20403 },
20404 { &hf_rtps_flag_subscription_detector, {
20405 "Subscription Detector", "rtps.flag.subscription_detector",
20406 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) }
20407 },
20408 { &hf_rtps_flag_participant_proxy_announcer, {
20409 "Participant Proxy Announcer", "rtps.flag.participant_proxy_announcer",
20410 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) }
20411 },
20412 { &hf_rtps_flag_participant_proxy_detector, {
20413 "Participant Proxy Detector", "rtps.flag.participant_proxy_detector",
20414 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) }
20415 },
20416 { &hf_rtps_flag_participant_state_announcer, {
20417 "Participant State Announcer", "rtps.flag.participant_state_announcer",
20418 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) }
20419 },
20420 { &hf_rtps_flag_participant_state_detector, {
20421 "Participant State Detector", "rtps.flag.participant_state_detector",
20422 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) }
20423 },
20424 { &hf_rtps_flag_participant_message_datawriter, {
20425 "Participant Message DataWriter", "rtps.flag.participant_message_datawriter",
20426 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) }
20427 },
20428 { &hf_rtps_flag_participant_message_datareader, {
20429 "Participant Message DataReader", "rtps.flag.participant_message_datareader",
20430 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) }
20431 },
20432 { &hf_rtps_flag_typelookup_request_datawriter, {
20433 "TypeLookup Service Request DataWriter", "rtps.flag.typelookup_request_datawriter",
20434 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00001000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20435 },
20436 { &hf_rtps_flag_typelookup_request_datareader, {
20437 "TypeLookup Service Request DataReader", "rtps.flag.typelookup_request_datareader",
20438 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00002000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20439 },
20440 { &hf_rtps_flag_typelookup_reply_datawriter, {
20441 "TypeLookup Service Reply DataWriter", "rtps.flag.typelookup_reply_datawriter",
20442 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00004000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20443 },
20444 { &hf_rtps_flag_typelookup_reply_datareader, {
20445 "TypeLookup Service Reply DataReader", "rtps.flag.typelookup_reply_datareader",
20446 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x00008000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20447 },
20448 { &hf_rtps_flag_typelookup_request_secure_datawriter, {
20449 "TypeLookup Service Request Secure DataWriter", "rtps.flag.typelookup_request_secure_datawriter",
20450 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) }
20451 },
20452 { &hf_rtps_flag_typelookup_request_secure_datareader, {
20453 "TypeLookup Service Request Secure DataReader", "rtps.flag.typelookup_request_secure_datareader",
20454 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) }
20455 },
20456 { &hf_rtps_flag_typelookup_reply_secure_datawriter, {
20457 "TypeLookup Service Reply Secure DataWriter", "rtps.flag.typelookup_reply_secure_datawriter",
20458 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) }
20459 },
20460 { &hf_rtps_flag_typelookup_reply_secure_datareader, {
20461 "TypeLookup Service Reply Secure DataReader", "rtps.flag.typelookup_reply_secure_datareader",
20462 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) }
20463 },
20464 { &hf_rtps_flag_secure_publication_writer, {
20465 "Secure Publication Writer", "rtps.flag.secure_publication_writer",
20466 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) }
20467 },
20468 { &hf_rtps_flag_secure_publication_reader, {
20469 "Secure Publication Reader", "rtps.flag.secure_publication_reader",
20470 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) }
20471 },
20472 { &hf_rtps_flag_secure_subscription_writer, {
20473 "Secure Subscription Writer", "rtps.flag.secure_subscription_writer",
20474 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) }
20475 },
20476 { &hf_rtps_flag_secure_subscription_reader, {
20477 "Secure Subscription Reader", "rtps.flag.secure_subscription_reader",
20478 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) }
20479 },
20480 { &hf_rtps_flag_secure_participant_message_writer, {
20481 "Secure Participant Message Writer", "rtps.flag.secure_participant_message_writer",
20482 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) }
20483 },
20484 { &hf_rtps_flag_secure_participant_message_reader, {
20485 "Secure Participant Message Reader", "rtps.flag.secure_participant_message_reader",
20486 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) }
20487 },
20488 { &hf_rtps_flag_participant_stateless_message_writer, {
20489 "Participant Stateless Message Writer", "rtps.flag.participant_stateless_message_writer",
20490 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) }
20491 },
20492 { &hf_rtps_flag_participant_stateless_message_reader, {
20493 "Participant Stateless Message Reader", "rtps.flag.participant_stateless_message_reader",
20494 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) }
20495 },
20496 { &hf_rtps_flag_secure_participant_volatile_message_writer,{
20497 "Secure Participant Volatile Message Writer", "rtps.flag.secure_participant_volatile_message_writer",
20498 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) }
20499 },
20500 { &hf_rtps_flag_secure_participant_volatile_message_reader,{
20501 "Secure Participant Volatile Message Reader", "rtps.flag.secure_participant_volatile_message_reader",
20502 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) }
20503 },
20504 { &hf_rtps_flag_participant_secure_writer,{
20505 "Participant Secure Writer", "rtps.flag.participant_secure_writer",
20506 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) }
20507 },
20508 { &hf_rtps_flag_participant_secure_reader,{
20509 "Participant Secure Reader", "rtps.flag.participant_secure_reader",
20510 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) }
20511 },
20512 { &hf_rtps_type_object_v2, {
20513 "Type Object V2", "rtps.type_object_v2",
20514 FT_NONE, BASE_NONE, NULL((void*)0), 0,
20515 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20516 },
20517 { &hf_rtps_xcdr2_delimited_header, {
20518 "DHEADER", "rtps.xcdr2.dheader",
20519 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
20520 "XCDR2 Delimited Header", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20521 },
20522 { &hf_rtps_xcdr2_enhanced_mutable_header, {
20523 "EMHEADER", "rtps.xcdr2.emheader",
20524 FT_UINT32, BASE_HEX, NULL((void*)0), 0,
20525 "XCDR2 Enhanced Mutable Header", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20526 },
20527 { &hf_rtps_xcdr2_must_understand, {
20528 "Must Understand", "rtps.xcdr2.must_understand",
20529 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x80000000,
20530 "XCDR2 Must Understand", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20531 },
20532 { &hf_rtps_xcdr2_length_code, {
20533 "Length Code", "rtps.xcdr2.length_code",
20534 FT_UINT32, BASE_DEC, NULL((void*)0), 0x70000000,
20535 "XCDR2 Length Code", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20536 },
20537 { &hf_rtps_xcdr2_member_id, {
20538 "Member Id", "rtps.xcdr2.member_id",
20539 FT_UINT32, BASE_HEX, NULL((void*)0), 0x0fffffff,
20540 "XCDR2 Member Id", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20541 },
20542 { &hf_rtps_xcdr2_nextint, {
20543 "NEXTINT", "rtps.xcdr2.nextint",
20544 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
20545 "XCDR2 NEXTINT", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20546 },
20547 { &hf_rtps_type_object_v2_type_flags, {
20548 "Type Flags", "rtps.type_object_v2.type_flags",
20549 FT_UINT16, BASE_HEX, NULL((void*)0), 0,
20550 "Type Object V2 Type Flags", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20551 },
20552 { &hf_rtps_type_object_v2_type_flag_is_final, {
20553 "Final", "rtps.type_object_v2.is_final",
20554 FT_BOOLEAN, 16, NULL((void*)0), 0x0001,
20555 "Type Object V2 Type Flag Is Final", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20556 },
20557 { &hf_rtps_type_object_v2_type_flag_is_appendable, {
20558 "Appendable", "rtps.type_object_v2.is_appendable",
20559 FT_BOOLEAN, 16, NULL((void*)0), 0x0002,
20560 "Type Object V2 Type Flag Is Appendable", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20561 },
20562 { &hf_rtps_type_object_v2_type_flag_is_mutable, {
20563 "Mutable", "rtps.type_object_v2.is_mutable",
20564 FT_BOOLEAN, 16, NULL((void*)0), 0x0004,
20565 "Type Object V2 Type Flag Is Mutable", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20566 },
20567 { &hf_rtps_type_object_v2_type_flag_is_nested, {
20568 "Nested", "rtps.type_object_v2.is_nested",
20569 FT_BOOLEAN, 16, NULL((void*)0), 0x0008,
20570 "Type Object V2 Type Flag Is Nested", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20571 },
20572 { &hf_rtps_type_object_v2_type_flag_is_autoid_hash, {
20573 "Autoid Hash", "rtps.type_object_v2.is_autoid_hash",
20574 FT_BOOLEAN, 16, NULL((void*)0), 0x0010,
20575 "Type Object V2 Type Flag Is Autoid Hash", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20576 },
20577 { &hf_rtps_type_object_v2_type_name, {
20578 "Type Name", "rtps.type_object_v2.type_name",
20579 FT_STRING, BASE_NONE, NULL((void*)0), 0,
20580 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20581 },
20582 { &hf_rtps_type_object_v2_has_ann_builtin, {
20583 "Has Builtin Annotation", "rtps.type_object_v2.has_ann_builtin",
20584 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0,
20585 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20586 },
20587 { &hf_rtps_type_object_v2_ann_builtin, {
20588 "Builtin Annotation", "rtps.type_object_v2.ann_builtin",
20589 FT_NONE, BASE_NONE, NULL((void*)0), 0,
20590 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20591 },
20592 { &hf_rtps_type_object_v2_has_ann_custom, {
20593 "Has Custom Annotation", "rtps.type_object_v2.has_ann_custom",
20594 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0,
20595 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20596 },
20597 { &hf_rtps_type_object_v2_member_id, {
20598 "Member ID", "rtps.type_object_v2.member_id",
20599 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
20600 "Type Object V2 Member ID", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20601 },
20602 { &hf_rtps_type_object_v2_member_flags, {
20603 "Member Flags", "rtps.type_object_v2.member_flags",
20604 FT_UINT16, BASE_HEX, NULL((void*)0), 0,
20605 "Type Object V2 Member Flags", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20606 },
20607 { &hf_rtps_type_object_v2_member_flag_try_construct, {
20608 "Try Construct", "rtps.type_object_v2.member_flag.try_construct",
20609 FT_UINT16, BASE_DEC, VALS(try_construct_vals)((0 ? (const struct _value_string*)0 : ((try_construct_vals))
))
, 0x0003,
20610 "Type Object V2 Member Flag Try Construct", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20611 },
20612 { &hf_rtps_type_object_v2_member_flag_is_external, {
20613 "Is External", "rtps.type_object_v2.member_flag.is_external",
20614 FT_BOOLEAN, 16, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x0004,
20615 "Type Object V2 Member Flag Is External", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20616 },
20617 { &hf_rtps_type_object_v2_member_flag_is_optional, {
20618 "Is Optional", "rtps.type_object_v2.member_flag.is_optional",
20619 FT_BOOLEAN, 16, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x0008,
20620 "Type Object V2 Member Flag Is Optional", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20621 },
20622 { &hf_rtps_type_object_v2_member_flag_is_must_understand, {
20623 "Is Must Understand", "rtps.type_object_v2.member_flag.is_must_understand",
20624 FT_BOOLEAN, 16, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x0010,
20625 "Type Object V2 Member Flag Is Must Understand", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20626 },
20627 { &hf_rtps_type_object_v2_member_flag_is_key, {
20628 "Is Key", "rtps.type_object_v2.member_flag.is_key",
20629 FT_BOOLEAN, 16, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x0020,
20630 "Type Object V2 Member Flag Is Key", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20631 },
20632 { &hf_rtps_type_object_v2_member_flag_is_default, {
20633 "Is Default", "rtps.type_object_v2.member_flag.is_default",
20634 FT_BOOLEAN, 16, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x0040,
20635 "Type Object V2 Member Flag Is Default", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20636 },
20637 { &hf_rtps_type_object_v2_member_name, {
20638 "Member Name", "rtps.type_object_v2.member_name",
20639 FT_STRING, BASE_NONE, NULL((void*)0), 0,
20640 "Type Object V2 Member Name", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20641 },
20642 { &hf_rtps_type_object_v2_unit_name, {
20643 "Units", "rtps.type_object_v2.unit_name",
20644 FT_STRING, BASE_NONE, NULL((void*)0), 0,
20645 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20646 },
20647 { &hf_rtps_type_object_v2_hash_id, {
20648 "hash_id", "rtps.type_object_v2.hash_id",
20649 FT_STRING, BASE_NONE, NULL((void*)0), 0,
20650 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20651 },
20652 { &hf_rtps_type_object_v2_member_name_hash, {
20653 "Member Name Hash", "rtps.type_object_v2.member_name_hash",
20654 FT_UINT32, BASE_HEX, NULL((void*)0), 0,
20655 "Type Object V2 Member Name Hash", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20656 },
20657 { &hf_rtps_type_object_v2_union_label, {
20658 "Union Label", "rtps.type_object_v2.union_label",
20659 FT_INT32, BASE_DEC, NULL((void*)0), 0,
20660 "Type Object V2 Union Label", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20661 },
20662 { &hf_rtps_type_object_v2_enum_bit_bound, {
20663 "Enum Bit Bound", "rtps.type_object_v2.enum_bit_bound",
20664 FT_UINT16, BASE_DEC, NULL((void*)0), 0,
20665 "Type Object V2 Enum Bit Bound", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20666 },
20667 { &hf_rtps_type_object_v2_enum_literal_value, {
20668 "Value", "rtps.type_object_v2.enum_literal_value",
20669 FT_INT32, BASE_DEC, NULL((void*)0), 0,
20670 "Type Object V2 Enum Literal Value", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20671 },
20672 { &hf_rtps_type_id_discriminator, {
20673 "Type Id Discriminator", "rtps.type_id.discriminator",
20674 FT_UINT8, BASE_HEX, VALS(type_id_discriminator_vals)((0 ? (const struct _value_string*)0 : ((type_id_discriminator_vals
))))
, 0,
20675 "Type Identifier Discriminator", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20676 },
20677 { &hf_rtps_type_kind_discriminator, {
20678 "Type Kind Discriminator", "rtps.type_kind.discriminator",
20679 FT_UINT8, BASE_HEX, VALS(type_id_discriminator_vals)((0 ? (const struct _value_string*)0 : ((type_id_discriminator_vals
))))
, 0,
20680 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20681 },
20682 { &hf_rtps_base_type_id_discriminator, {
20683 "Base Type Id Discriminator", "rtps.base_type_id.discriminator",
20684 FT_UINT8, BASE_HEX, VALS(type_id_discriminator_vals)((0 ? (const struct _value_string*)0 : ((type_id_discriminator_vals
))))
, 0,
20685 "Base Type Identifier Discriminator", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20686 },
20687 { &hf_rtps_remote_exception_code, {
20688 "Remote Exception Code", "rtps.remote_exception_code",
20689 FT_UINT32, BASE_HEX, VALS(remote_exception_code_vals)((0 ? (const struct _value_string*)0 : ((remote_exception_code_vals
))))
, 0,
20690 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20691 },
20692 { &hf_rtps_type_bound, {
20693 "Bound", "rtps.type.bound",
20694 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
20695 "Collection Type Bound", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20696 },
20697 { &hf_rtps_type_element_flags, {
20698 "Element Flags", "rtps.type.element_flags",
20699 FT_UINT16, BASE_HEX, NULL((void*)0), 0,
20700 "Collection Element Flags", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20701 },
20702 { &hf_rtps_type_equiv_kind, {
20703 "Equivalence Kind", "rtps.type.equiv_kind",
20704 FT_UINT8, BASE_HEX, VALS(type_id_discriminator_vals)((0 ? (const struct _value_string*)0 : ((type_id_discriminator_vals
))))
, 0,
20705 "Type Equivalence Kind", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20706 },
20707 { &hf_rtps_type_hash, {
20708 "Equivalence Hash", "rtps.type.hash",
20709 FT_BYTES, BASE_NONE, NULL((void*)0), 0,
20710 "Type Equivalence Hash", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20711 },
20712 { &hf_rtps_type_extended, {
20713 "Extended Type Definition", "rtps.type.extended",
20714 FT_BYTES, BASE_NONE, NULL((void*)0), 0,
20715 "Extended Type Data", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20716 },
20717 { &hf_rtps_type_id_w_size, {
20718 "Type Id With Size", "rtps.type_id_w_size",
20719 FT_NONE, BASE_NONE, NULL((void*)0), 0,
20720 "Type Identifier With Size", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20721 },
20722 { &hf_rtps_type_deps_count, {
20723 "Dependent Type Count", "rtps.type.deps_count",
20724 FT_INT32, BASE_DEC, NULL((void*)0), 0,
20725 "Number of Dependent Types", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20726 },
20727 { &hf_rtps_type_deps_result, {
20728 "Result Discriminator", "rtps.type.deps_result",
20729 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
20730 "GetTypeDependencies Result Discriminator", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20731 },
20732 { &hf_rtps_type_lookup_discriminator, {
20733 "Discriminator", "rtps.type_lookup_discriminator",
20734 FT_UINT32, BASE_HEX, VALS(type_lookup_discriminator_vals)((0 ? (const struct _value_string*)0 : ((type_lookup_discriminator_vals
))))
, 0,
20735 "DDS XTypes Type Lookup Discriminator", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20736 },
20737 { &hf_rtps_type_lookup_deps_seq, {
20738 "Dependencies Seq", "rtps.type_lookup_deps_seq",
20739 FT_NONE, BASE_NONE, NULL((void*)0), 0,
20740 "DDS XTypes Type Lookup Dependencies Sequence", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20741 },
20742 { &hf_rtps_instance_name, {
20743 "Instance Name", "rtps.instance_name",
20744 FT_STRING, BASE_NONE, NULL((void*)0), 0,
20745 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20746 },
20747 { &hf_rtps_type_object_serialized_size, {
20748 "Serialized Size", "rtps.type.serialized_size",
20749 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
20750 "Type Object Serialized Size", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20751 },
20752 { &hf_rtps_type_object_type_id_disc,
20753 { "TypeId (_d)", "rtps.type_object.type_id.discr",
20754 FT_INT16, BASE_DEC, 0x0, 0,
20755 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20756 },
20757 { &hf_rtps_type_object_primitive_type_id,
20758 { "Type Id", "rtps.type_object.primitive_type_id",
20759 FT_UINT16, BASE_HEX, VALS(type_object_kind)((0 ? (const struct _value_string*)0 : ((type_object_kind)))), 0,
20760 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20761 },
20762 { &hf_rtps_type_object_base_primitive_type_id,
20763 { "Base Id", "rtps.type_object.base_primitive_type_id",
20764 FT_UINT16, BASE_HEX, VALS(type_object_kind)((0 ? (const struct _value_string*)0 : ((type_object_kind)))), 0,
20765 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20766 },
20767 { &hf_rtps_type_object_type_id,
20768 { "Type Id", "rtps.type_object.type_id",
20769 FT_UINT64, BASE_HEX, 0x0, 0,
20770 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20771 },
20772 { &hf_rtps_type_object_base_type,
20773 { "Base Type Id", "rtps.type_object.base_type_id",
20774 FT_UINT64, BASE_HEX, 0x0, 0,
20775 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20776 },
20777 { &hf_rtps_type_object_element_raw, {
20778 "Type Element Content", "rtps.type_object.element",
20779 FT_BYTES, BASE_NONE, NULL((void*)0), 0,
20780 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20781 },
20782 { &hf_rtps_type_object_type_property_name,
20783 { "Name", "rtps.type_object.property.name",
20784 FT_STRING, BASE_NONE, 0x0, 0,
20785 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20786 },
20787 { &hf_rtps_type_object_member_id,
20788 { "Member Id", "rtps.type_object.annotation.member_id",
20789 FT_UINT32, BASE_DEC, 0x0, 0,
20790 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20791 },
20792 { &hf_rtps_type_object_name,
20793 { "Name", "rtps.type_object.member.name",
20794 FT_STRING, BASE_NONE, 0x0, 0,
20795 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20796 },
20797 { &hf_rtps_type_object_annotation_value_d,
20798 { "Annotation Member (_d)", "rtps.type_object.annotation.value_d",
20799 FT_UINT16, BASE_DEC, 0x0, 0,
20800 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20801 },
20802 { &hf_rtps_type_object_annotation_value_16,
20803 { "16 bits type", "rtps.type_object.annotation.value",
20804 FT_UINT16, BASE_DEC, 0x0, 0,
20805 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20806 },
20807 { &hf_rtps_type_object_union_label,
20808 { "Label", "rtps.type_object.union.label",
20809 FT_UINT32, BASE_DEC, 0x0, 0,
20810 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20811 },
20812 { &hf_rtps_type_object_bound,
20813 { "Bound", "rtps.type_object.bound",
20814 FT_UINT32, BASE_DEC, 0x0, 0,
20815 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20816 },
20817 { &hf_rtps_type_object_enum_constant_name,
20818 { "Enum name", "rtps.type_object.enum.name",
20819 FT_STRING, BASE_NONE, 0x0, 0,
20820 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20821 },
20822 { &hf_rtps_type_object_enum_constant_value,
20823 { "Enum value", "rtps.type_object.enum.value",
20824 FT_INT32, BASE_DEC, 0x0, 0,
20825 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20826 },
20827 { &hf_rtps_type_object_element_shared,
20828 { "Element shared", "rtps.type_object.shared",
20829 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0,
20830 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20831 },
20832 { &hf_rtps_flag_typeflag_final, {
20833 "FINAL", "rtps.flag.typeflags.final",
20834 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) }
20835 },
20836 { &hf_rtps_flag_typeflag_mutable, {
20837 "MUTABLE", "rtps.flag.typeflags.mutable",
20838 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) }
20839 },
20840 { &hf_rtps_flag_typeflag_nested, {
20841 "NESTED", "rtps.flag.typeflags.nested",
20842 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) }
20843 },
20844 { &hf_rtps_type_object_flags, {
20845 "Flags", "rtps.flag.typeflags",
20846 FT_UINT16, BASE_HEX, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20847 },
20848 { &hf_rtps_flag_memberflag_key, {
20849 "Key", "rtps.flag.typeflags.key",
20850 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) }
20851 },
20852 { &hf_rtps_flag_memberflag_optional, {
20853 "Optional", "rtps.flag.typeflags.optional",
20854 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) }
20855 },
20856 { &hf_rtps_flag_memberflag_shareable, {
20857 "Shareable", "rtps.flag.typeflags.shareable",
20858 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) }
20859 },
20860 { &hf_rtps_flag_memberflag_union_default, {
20861 "Union default", "rtps.flag.typeflags.union_default",
20862 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) }
20863 },
20864 { &hf_rtps_type_object_element_module_name,
20865 { "Module name", "rtps.type_object.module_name",
20866 FT_STRINGZ, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20867 },
20868 { &hf_rtps_flag_service_request_writer, {
20869 "Service Request Writer", "rtps.flag.service_request_writer",
20870 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) }
20871 },
20872 { &hf_rtps_flag_service_request_reader, {
20873 "Service Request Reader", "rtps.flag.service_request_reader",
20874 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) }
20875 },
20876 { &hf_rtps_flag_locator_ping_writer, {
20877 "Locator Ping Writer", "rtps.flag.locator_ping_writer",
20878 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) }
20879 },
20880 { &hf_rtps_flag_locator_ping_reader, {
20881 "Locator Ping Reader", "rtps.flag.locator_ping_reader",
20882 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) }
20883 },
20884 { &hf_rtps_flag_secure_service_request_writer, {
20885 "Secure Service Request Writer", "rtps.flag.secure_service_request_writer",
20886 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) }
20887 },
20888 { &hf_rtps_flag_secure_service_request_reader, {
20889 "Secure Service Request Reader", "rtps.flag.secure_service_request_reader",
20890 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) }
20891 },
20892 { &hf_rtps_flag_security_access_protected, {
20893 "Access Protected", "rtps.flag.security.access_protected",
20894 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) }
20895 },
20896 { &hf_rtps_flag_security_discovery_protected, {
20897 "Discovery Protected", "rtps.flag.security.discovery_protected",
20898 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) }
20899 },
20900 { &hf_rtps_flag_security_submessage_protected, {
20901 "Submessage Protected", "rtps.flag.security.submessage_protected",
20902 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) }
20903 },
20904 { &hf_rtps_flag_security_payload_protected, {
20905 "Payload Protected", "rtps.flag.security.payload_protected",
20906 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) }
20907 },
20908 { &hf_rtps_flag_endpoint_security_attribute_flag_is_read_protected,{
20909 "Read Protected", "rtps.flag.security.info.read_protected",
20910 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) }
20911 },
20912 { &hf_rtps_flag_endpoint_security_attribute_flag_is_write_protected,{
20913 "Write Protected", "rtps.flag.security.info.write_protected",
20914 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) }
20915 },
20916 { &hf_rtps_flag_endpoint_security_attribute_flag_is_discovery_protected,{
20917 "Discovery Protected", "rtps.flag.security.info.discovery_protected",
20918 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) }
20919 },
20920 { &hf_rtps_flag_endpoint_security_attribute_flag_is_submessage_protected,{
20921 "Submessage Protected", "rtps.flag.security.info.submessage_protected",
20922 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) }
20923 },
20924 { &hf_rtps_flag_endpoint_security_attribute_flag_is_payload_protected,{
20925 "Payload Protected", "rtps.flag.security.info.payload_protected",
20926 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) }
20927 },
20928 { &hf_rtps_flag_endpoint_security_attribute_flag_is_key_protected,{
20929 "Key Protected", "rtps.flag.security.info.key_protected",
20930 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) }
20931 },
20932 { &hf_rtps_flag_endpoint_security_attribute_flag_is_liveliness_protected,{
20933 "Liveliness Protected", "rtps.flag.security.info.liveliness_protected",
20934 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) }
20935 },
20936 { &hf_rtps_flag_endpoint_security_attribute_flag_is_valid,{
20937 "Mask Valid", "rtps.flag.security.info.valid",
20938 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) }
20939 },
20940 { &hf_rtps_param_endpoint_security_attributes_mask,{
20941 "EndpointSecurityAttributesMask", "rtps.param.endpoint_security_attributes",
20942 FT_UINT32, BASE_HEX, NULL((void*)0), 0,
20943 "Bitmask representing the EndpointSecurityAttributes flags in PID_ENDPOINT_SECURITY_INFO",
20944 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20945 },
20946 { &hf_rtps_param_participant_security_symmetric_cipher_algorithms_builtin_endpoints_required_mask, {
20947 "Builtin Endpoints Required Mask", "rtps.param.participant_security_symmetric_cipher_algorithms.builtin_endpoints_used_bit",
20948 FT_UINT32, BASE_HEX, NULL((void*)0), 0,
20949 "Bitmask representing the Symmetric Cipher algorithm the builtin endpoints use",
20950 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20951 },
20952 { &hf_rtps_param_participant_security_symmetric_cipher_algorithms_builtin_endpoints_key_exchange_used_bit, {
20953 "Key Exchange Builtin Endpoints Required Mask", "rtps.param.participant_security_symmetric_cipher_algorithms.builtin_endpoints_key_exchange_required_mask",
20954 FT_UINT32, BASE_HEX, NULL((void*)0), 0,
20955 "Bitmask representing the Symmetric Cipher algorithm the key exchange builtin endpoints require",
20956 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20957 },
20958 { &hf_rtps_param_participant_security_symmetric_cipher_algorithms_user_endpoints_default_required_mask, {
20959 "User Endpoints Default Required Mask", "rtps.param.participant_security_symmetric_cipher_algorithms.user_endpoints_default_required_mask",
20960 FT_UINT32, BASE_HEX, 0, 0,
20961 "Bitmask representing the default algorithm that endpoints use to protect data",
20962 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20963 },
20964 { &hf_rtps_param_participant_security_symmetric_cipher_algorithms_supported_mask, {
20965 "Supported Mask", "rtps.param.security_symmetric_cipher_algorithms.supported_mask",
20966 FT_UINT32, BASE_HEX, 0, 0, "Bitmask representing supported Symmetric Cipher algorithms",
20967 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20968 },
20969 { &hf_rtps_param_compression_id_mask, {
20970 "Compression Id Mask", "rtps.param.compression_id_mask",
20971 FT_UINT32, BASE_HEX, 0, 0, "Bitmask representing compression id.", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20972 },
20973 { &hf_rtps_flag_compression_id_zlib, {
20974 "ZLIB", "rtps.flag.compression_id_zlib",
20975 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) }
20976 },
20977 { &hf_rtps_flag_compression_id_bzip2, {
20978 "BZIP2", "rtps.flag.compression_id_bzip2",
20979 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) }
20980 },
20981 { &hf_rtps_flag_compression_id_lz4, {
20982 "LZ4", "rtps.flag.compression_id_lz4",
20983 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) }
20984 },
20985 { &hf_rtps_flag_security_supported, {
20986 "Supported", "rtps.security.supported",
20987 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20988 },
20989 { &hf_rtps_flag_security_required, {
20990 "Required", "rtps.security.required",
20991 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20992 },
20993 { &hf_rtps_flag_security_symmetric_cipher_mask_aes128_gcm, {
20994 "AES128 GCM", "rtps.flag.security_symmetric_cipher_mask.aes128_gcm",
20995 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) }
20996 },
20997 { &hf_rtps_flag_security_symmetric_cipher_mask_aes256_gcm, {
20998 "AES256 GCM", "rtps.flag.security_symmetric_cipher_mask.aes256_gcm",
20999 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) }
21000 },
21001 { &hf_rtps_flag_security_symmetric_cipher_mask_vendor_rti_aes192_gcm, {
21002 "AES192 GCM (RTI)", "rtps.flag.security_symmetric_cipher_mask.vendor_rti_aes192_gcm",
21003 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, SECURITY_SYMMETRIC_CIPHER_BIT_VENDOR_RTI_AES192_GCM0x40000000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21004 },
21005 { &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm01, {
21006 "Vendor Specific Algorithm", "rtps.flag.security_symmetric_cipher_mask.vendor_specific_algorithm_01",
21007 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, BITMASK_VENDOR_SPECIFIC_ALGORITHM010x00010000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21008 },
21009 { &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm02, {
21010 "Vendor Specific Algorithm", "rtps.flag.security_symmetric_cipher_mask.vendor_specific_algorithm_02",
21011 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, BITMASK_VENDOR_SPECIFIC_ALGORITHM020x00020000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21012 },
21013 { &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm03, {
21014 "Vendor Specific Algorithm", "rtps.flag.security_symmetric_cipher_mask.vendor_specific_algorithm_03",
21015 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, BITMASK_VENDOR_SPECIFIC_ALGORITHM030x00040000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21016 },
21017 { &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm04, {
21018 "Vendor Specific Algorithm", "rtps.flag.security_symmetric_cipher_mask.vendor_specific_algorithm_04",
21019 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, BITMASK_VENDOR_SPECIFIC_ALGORITHM040x00080000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21020 },
21021 { &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm05, {
21022 "Vendor Specific Algorithm", "rtps.flag.security_symmetric_cipher_mask.vendor_specific_algorithm_05",
21023 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, BITMASK_VENDOR_SPECIFIC_ALGORITHM050x00100000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21024 },
21025 { &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm06, {
21026 "Vendor Specific Algorithm", "rtps.flag.security_symmetric_cipher_mask.vendor_specific_algorithm_06",
21027 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, BITMASK_VENDOR_SPECIFIC_ALGORITHM060x00200000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21028 },
21029 { &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm07, {
21030 "Vendor Specific Algorithm", "rtps.flag.security_symmetric_cipher_mask.vendor_specific_algorithm_07",
21031 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, BITMASK_VENDOR_SPECIFIC_ALGORITHM070x00400000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21032 },
21033 { &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm08, {
21034 "Vendor Specific Algorithm", "rtps.flag.security_symmetric_cipher_mask.vendor_specific_algorithm_08",
21035 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, BITMASK_VENDOR_SPECIFIC_ALGORITHM080x00800000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21036 },
21037 { &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm09, {
21038 "Vendor Specific Algorithm", "rtps.flag.security_symmetric_cipher_mask.vendor_specific_algorithm_09",
21039 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, BITMASK_VENDOR_SPECIFIC_ALGORITHM090x01000000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21040 },
21041 { &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm10, {
21042 "Vendor Specific Algorithm", "rtps.flag.security_symmetric_cipher_mask.vendor_specific_algorithm_10",
21043 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, BITMASK_VENDOR_SPECIFIC_ALGORITHM100x02000000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21044 },
21045 { &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm11, {
21046 "Vendor Specific Algorithm", "rtps.flag.security_symmetric_cipher_mask.vendor_specific_algorithm_11",
21047 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, BITMASK_VENDOR_SPECIFIC_ALGORITHM110x04000000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21048 },
21049 { &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm12, {
21050 "Vendor Specific Algorithm", "rtps.flag.security_symmetric_cipher_mask.vendor_specific_algorithm_12",
21051 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, BITMASK_VENDOR_SPECIFIC_ALGORITHM120x08000000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21052 },
21053 { &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm13, {
21054 "Vendor Specific Algorithm", "rtps.flag.security_symmetric_cipher_mask.vendor_specific_algorithm_13",
21055 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, BITMASK_VENDOR_SPECIFIC_ALGORITHM130x10000000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21056 },
21057 { &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm14, {
21058 "Vendor Specific Algorithm", "rtps.flag.security_symmetric_cipher_mask.vendor_specific_algorithm_14",
21059 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, BITMASK_VENDOR_SPECIFIC_ALGORITHM140x20000000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21060 },
21061 { &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm15, {
21062 "Vendor Specific Algorithm", "rtps.flag.security_symmetric_cipher_mask.vendor_specific_algorithm_15",
21063 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, BITMASK_VENDOR_SPECIFIC_ALGORITHM150x40000000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21064 },
21065 { &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm16, {
21066 "Vendor Specific Algorithm", "rtps.flag.security_symmetric_cipher_mask.vendor_specific_algorithm_16",
21067 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, BITMASK_VENDOR_SPECIFIC_ALGORITHM160x80000000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21068 },
21069 { &hf_rtps_flag_security_key_establishment_mask_dhe_modp2048256, {
21070 "DHE_MODP2048256", "rtps.flag.security_key_establishment_mask.dhe_modp2048256",
21071 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) }
21072 },
21073 { &hf_rtps_flag_security_key_establishment_mask_ecdheceum_p256, {
21074 "ECDHECEUM_P256", "rtps.flag.security_key_establishment_mask.ecdheceum_p256",
21075 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) }
21076 },
21077 { &hf_rtps_flag_security_key_establishment_mask_ecdheceum_p384, {
21078 "ECDHECEUM_P384", "rtps.flag.security_key_establishment_mask.ecdheceum_p384",
21079 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) }
21080 },
21081 { &hf_rtps_flag_security_key_establishment_mask_ecdheceum_x25519, {
21082 "ECDHECEUM_X25519 (RTI)", "rtps.flag.security_key_establishment_mask.vendor_rti_ecdheceum_x25519",
21083 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, SECURITY_KEY_ESTABLISHMENT_BIT_VENDOR_RTI_ECDHECEUM_X255190x00010000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21084 },
21085 { &hf_rtps_flag_security_key_establishment_mask_ecdheceum_x448, {
21086 "ECDHECEUM_X448 (RTI)", "rtps.flag.security_key_establishment_mask.vendor_rti_ecdheceum_x448",
21087 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, SECURITY_KEY_ESTABLISHMENT_BIT_VENDOR_RTI_ECDHECEUM_X4480x00020000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21088 },
21089 { &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm01, {
21090 "Vendor Specific Algorithm", "rtps.flag.security_key_establishment_mask.vendor_specific_algorithm_01",
21091 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, BITMASK_VENDOR_SPECIFIC_ALGORITHM010x00010000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21092 },
21093 { &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm02, {
21094 "Vendor Specific Algorithm", "rtps.flag.security_key_establishment_mask.vendor_specific_algorithm_02",
21095 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, BITMASK_VENDOR_SPECIFIC_ALGORITHM020x00020000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21096 },
21097 { &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm03, {
21098 "Vendor Specific Algorithm", "rtps.flag.security_key_establishment_mask.vendor_specific_algorithm_03",
21099 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, BITMASK_VENDOR_SPECIFIC_ALGORITHM030x00040000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21100 },
21101 { &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm04, {
21102 "Vendor Specific Algorithm", "rtps.flag.security_key_establishment_mask.vendor_specific_algorithm_04",
21103 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, BITMASK_VENDOR_SPECIFIC_ALGORITHM040x00080000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21104 },
21105 { &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm05, {
21106 "Vendor Specific Algorithm", "rtps.flag.security_key_establishment_mask.vendor_specific_algorithm_05",
21107 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, BITMASK_VENDOR_SPECIFIC_ALGORITHM050x00100000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21108 },
21109 { &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm06, {
21110 "Vendor Specific Algorithm", "rtps.flag.security_key_establishment_mask.vendor_specific_algorithm_06",
21111 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, BITMASK_VENDOR_SPECIFIC_ALGORITHM060x00200000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21112 },
21113 { &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm07, {
21114 "Vendor Specific Algorithm", "rtps.flag.security_key_establishment_mask.vendor_specific_algorithm_07",
21115 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, BITMASK_VENDOR_SPECIFIC_ALGORITHM070x00400000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21116 },
21117 { &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm08, {
21118 "Vendor Specific Algorithm", "rtps.flag.security_key_establishment_mask.vendor_specific_algorithm_08",
21119 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, BITMASK_VENDOR_SPECIFIC_ALGORITHM080x00800000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21120 },
21121 { &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm09, {
21122 "Vendor Specific Algorithm", "rtps.flag.security_key_establishment_mask.vendor_specific_algorithm_09",
21123 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, BITMASK_VENDOR_SPECIFIC_ALGORITHM090x01000000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21124 },
21125 { &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm10, {
21126 "Vendor Specific Algorithm", "rtps.flag.security_key_establishment_mask.vendor_specific_algorithm_10",
21127 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, BITMASK_VENDOR_SPECIFIC_ALGORITHM100x02000000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21128 },
21129 { &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm11, {
21130 "Vendor Specific Algorithm", "rtps.flag.security_key_establishment_mask.vendor_specific_algorithm_11",
21131 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, BITMASK_VENDOR_SPECIFIC_ALGORITHM110x04000000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21132 },
21133 { &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm12, {
21134 "Vendor Specific Algorithm", "rtps.flag.security_key_establishment_mask.vendor_specific_algorithm_12",
21135 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, BITMASK_VENDOR_SPECIFIC_ALGORITHM120x08000000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21136 },
21137 { &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm13, {
21138 "Vendor Specific Algorithm", "rtps.flag.security_key_establishment_mask.vendor_specific_algorithm_13",
21139 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, BITMASK_VENDOR_SPECIFIC_ALGORITHM130x10000000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21140 },
21141 { &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm14, {
21142 "Vendor Specific Algorithm", "rtps.flag.security_key_establishment_mask.vendor_specific_algorithm_14",
21143 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, BITMASK_VENDOR_SPECIFIC_ALGORITHM140x20000000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21144 },
21145 { &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm15, {
21146 "Vendor Specific Algorithm", "rtps.flag.security_key_establishment_mask.vendor_specific_algorithm_15",
21147 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, BITMASK_VENDOR_SPECIFIC_ALGORITHM150x40000000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21148 },
21149 { &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm16, {
21150 "Vendor Specific Algorithm", "rtps.flag.security_key_establishment_mask.vendor_specific_algorithm_16",
21151 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, BITMASK_VENDOR_SPECIFIC_ALGORITHM160x80000000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21152 },
21153 { &hf_rtps_flag_security_algorithm_compatibility_mode, {
21154 "Compatibility Mode", "rtps.flag.security_algorithm_compatibility_mode",
21155 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) }
21156 },
21157 { &hf_rtps_flag_plugin_endpoint_security_attribute_flag_is_payload_encrypted, {
21158 "Submessage Encrypted", "rtps.flag.security.info.plugin_submessage_encrypted",
21159 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) }
21160 },
21161 { &hf_rtps_param_crypto_algorithm_requirements_trust_chain, {
21162 "Supported", "rtps.param.crypto_algorithm_requirements.supported",
21163 FT_UINT32, BASE_HEX, 0, 0, "Bitmask representing the trust chain", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21164 },
21165 { &hf_rtps_param_crypto_algorithm_requirements_message_auth, {
21166 "Required", "rtps.param.crypto_algorithm_requirements.required",
21167 FT_UINT32, BASE_HEX, 0, 0, "Bitmask representing the message authentication", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21168 },
21169 { &hf_rtps_flag_security_digital_signature_mask_rsassapssmgf1sha256_2048_sha256, {
21170 "RSASSAPSSMGF1SHA256_2048_SHA256", "rtps.flag.security_digital_signature_mask.rsassapssmgf1sha256_2048_sha256",
21171 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) }
21172 },
21173 { &hf_rtps_flag_security_digital_signature_mask_rsassapkcs1v15_2048_sha256, {
21174 "RSASSAPKCS1V15_2048_SHA256", "rtps.flag.security_digital_signature_mask.rsassapkcs1v15_2048_sha256",
21175 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) }
21176 },
21177 { &hf_rtps_flag_security_digital_signature_mask_ecdsa_p256_sha256, {
21178 "ECDSA_P256_SHA256", "rtps.flag.security_digital_signature_mask.ecdsa_p256_sha256",
21179 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) }
21180 },
21181 { &hf_rtps_flag_security_digital_signature_mask_ecdsa_p384_sha384, {
21182 "ECDSA_P384_SHA384", "rtps.flag.security_digital_signature_mask.ecdsa_p384_sha384",
21183 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) }
21184 },
21185 { &hf_rtps_flag_security_digital_signature_mask_ecdsa_ed25519_sha512, {
21186 "EDDSA_ED25519_SHA512 (RTI)", "rtps.flag.security_digital_signature_mask.vendor_rti_ecdsa_ed25519_sha512",
21187 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, SECURITY_DIGITAL_SIGNATURE_BIT_VENDOR_RTI_EDDSA_ED25519_SHA5120x00010000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21188 },
21189 { &hf_rtps_flag_security_digital_signature_mask_ecdsa_ed448_shake256, {
21190 "EDDSA_ED448_SHAKE256 (RTI)", "rtps.flag.security_digital_signature_mask.vendor_rti_ecdsa_ed448_shake256",
21191 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, SECURITY_DIGITAL_SIGNATURE_BIT_VENDOR_RTI_EDDSA_ED448_SHAKE2560x00020000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21192 },
21193 { &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm01, {
21194 "Vendor Specific Algorithm", "rtps.flag.security_digital_signature_mask.vendor_specific_algorithm_01",
21195 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, BITMASK_VENDOR_SPECIFIC_ALGORITHM010x00010000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21196 },
21197 { &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm02, {
21198 "Vendor Specific Algorithm", "rtps.flag.security_digital_signature_mask.vendor_specific_algorithm_02",
21199 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, BITMASK_VENDOR_SPECIFIC_ALGORITHM020x00020000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21200 },
21201 { &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm03, {
21202 "Vendor Specific Algorithm", "rtps.flag.security_digital_signature_mask.vendor_specific_algorithm_03",
21203 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, BITMASK_VENDOR_SPECIFIC_ALGORITHM030x00040000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21204 },
21205 { &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm04, {
21206 "Vendor Specific Algorithm", "rtps.flag.security_digital_signature_mask.vendor_specific_algorithm_04",
21207 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, BITMASK_VENDOR_SPECIFIC_ALGORITHM040x00080000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21208 },
21209 { &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm05, {
21210 "Vendor Specific Algorithm", "rtps.flag.security_digital_signature_mask.vendor_specific_algorithm_05",
21211 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, BITMASK_VENDOR_SPECIFIC_ALGORITHM050x00100000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21212 },
21213 { &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm06, {
21214 "Vendor Specific Algorithm", "rtps.flag.security_digital_signature_mask.vendor_specific_algorithm_06",
21215 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, BITMASK_VENDOR_SPECIFIC_ALGORITHM060x00200000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21216 },
21217 { &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm07, {
21218 "Vendor Specific Algorithm", "rtps.flag.security_digital_signature_mask.vendor_specific_algorithm_07",
21219 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, BITMASK_VENDOR_SPECIFIC_ALGORITHM070x00400000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21220 },
21221 { &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm08, {
21222 "Vendor Specific Algorithm", "rtps.flag.security_digital_signature_mask.vendor_specific_algorithm_08",
21223 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, BITMASK_VENDOR_SPECIFIC_ALGORITHM080x00800000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21224 },
21225 { &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm09, {
21226 "Vendor Specific Algorithm", "rtps.flag.security_digital_signature_mask.vendor_specific_algorithm_09",
21227 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, BITMASK_VENDOR_SPECIFIC_ALGORITHM090x01000000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21228 },
21229 { &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm10, {
21230 "Vendor Specific Algorithm", "rtps.flag.security_digital_signature_mask.vendor_specific_algorithm_10",
21231 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, BITMASK_VENDOR_SPECIFIC_ALGORITHM100x02000000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21232 },
21233 { &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm11, {
21234 "Vendor Specific Algorithm", "rtps.flag.security_digital_signature_mask.vendor_specific_algorithm_11",
21235 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, BITMASK_VENDOR_SPECIFIC_ALGORITHM110x04000000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21236 },
21237 { &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm12, {
21238 "Vendor Specific Algorithm", "rtps.flag.security_digital_signature_mask.vendor_specific_algorithm_12",
21239 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, BITMASK_VENDOR_SPECIFIC_ALGORITHM120x08000000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21240 },
21241 { &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm13, {
21242 "Vendor Specific Algorithm", "rtps.flag.security_digital_signature_mask.vendor_specific_algorithm_13",
21243 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, BITMASK_VENDOR_SPECIFIC_ALGORITHM130x10000000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21244 },
21245 { &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm14, {
21246 "Vendor Specific Algorithm", "rtps.flag.security_digital_signature_mask.vendor_specific_algorithm_14",
21247 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, BITMASK_VENDOR_SPECIFIC_ALGORITHM140x20000000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21248 },
21249 { &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm15, {
21250 "Vendor Specific Algorithm", "rtps.flag.security_digital_signature_mask.vendor_specific_algorithm_15",
21251 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, BITMASK_VENDOR_SPECIFIC_ALGORITHM150x40000000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21252 },
21253 { &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm16, {
21254 "Vendor Specific Algorithm", "rtps.flag.security_digital_signature_mask.vendor_specific_algorithm_16",
21255 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, BITMASK_VENDOR_SPECIFIC_ALGORITHM160x80000000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21256 },
21257 { &hf_rtps_flag_plugin_endpoint_security_attribute_flag_is_key_encrypted,{
21258 "Payload Encrypted", "rtps.flag.security.info.plugin_payload_encrypted",
21259 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) }
21260 },
21261 { &hf_rtps_flag_plugin_endpoint_security_attribute_flag_is_liveliness_encrypted,{
21262 "Submessage Origin Encrypted", "rtps.flag.security.info.plugin_liveliness_encrypted",
21263 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) }
21264 },
21265 { &hf_rtps_flag_plugin_endpoint_security_attribute_flag_is_valid,{
21266 "Mask Valid", "rtps.flag.security.info.plugin_valid",
21267 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) }
21268 },
21269 { &hf_rtps_param_plugin_endpoint_security_attributes_mask,{
21270 "PluginEndpointSecurityAttributesMask (valid dissection if using the Specification Builtin Plugins)",
21271 "rtps.param.plugin_endpoint_security_attributes",
21272 FT_UINT32, BASE_HEX, NULL((void*)0), 0,
21273 "bitmask representing the PluginEndpointSecurityAttributes flags in PID_ENDPOINT_SECURITY_INFO",
21274 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21275 },
21276 { &hf_rtps_flag_participant_security_attribute_flag_is_rtps_protected,{
21277 "RTPS Protected", "rtps.flag.security.info.participant_rtps_protected",
21278 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) }
21279 },
21280 { &hf_rtps_flag_participant_security_attribute_flag_is_discovery_protected,{
21281 "Discovery Protected", "rtps.flag.security.info.participant_discovery_protected",
21282 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) }
21283 },
21284 { &hf_rtps_flag_participant_security_attribute_flag_is_liveliness_protected,{
21285 "Liveliness Protected", "rtps.flag.security.info.participant_liveliness_protected",
21286 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) }
21287 },
21288 { &hf_rtps_flag_participant_security_attribute_flag_key_revisions_enabled,{
21289 "Key Revisions Enabled", "rtps.flag.security.info.key_revisions_enabled",
21290 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) }
21291 },
21292 { &hf_rtps_flag_participant_security_attribute_flag_key_psk_protected,{
21293 "RTPS Pre-Shared Key Protected", "rtps.flag.security.info.participant_psk_protected",
21294 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) }
21295 },
21296 { &hf_rtps_flag_participant_security_attribute_flag_is_valid,{
21297 "Mask Valid", "rtps.flag.security.info.participant_mask_valid",
21298 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) }
21299 },
21300 { &hf_rtps_param_participant_security_attributes_mask,{
21301 "ParticipantSecurityAttributesMask",
21302 "rtps.param.participant_security_attributes",
21303 FT_UINT32, BASE_HEX, NULL((void*)0), 0,
21304 "bitmask representing the ParticipantSecurityAttributes flags in PID_PARTICIPANT_SECURITY_INFO",
21305 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21306 },
21307 { &hf_rtps_flag_plugin_participant_security_attribute_flag_is_rtps_encrypted,{
21308 "RTPS Encrypted", "rtps.flag.security.info.plugin_participant_rtps_encrypted",
21309 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) }
21310 },
21311 { &hf_rtps_flag_plugin_participant_security_attribute_flag_is_discovery_encrypted,{
21312 "Discovery Encrypted", "rtps.flag.security.info.plugin_participant_discovery_encrypted",
21313 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) }
21314 },
21315 { &hf_rtps_flag_plugin_participant_security_attribute_flag_is_liveliness_encrypted,{
21316 "Liveliness Encrypted", "rtps.flag.security.info.plugin_participant_liveliness_encrypted",
21317 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) }
21318 },
21319 { &hf_rtps_flag_plugin_participant_security_attribute_flag_is_rtps_origin_encrypted,{
21320 "RTPS Origin Encrypted", "rtps.flag.security.info.plugin_participant_rtps_origin_encrypted",
21321 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) }
21322 },
21323 { &hf_rtps_flag_plugin_participant_security_attribute_flag_is_discovery_origin_encrypted,{
21324 "Discovery Origin Encrypted", "rtps.flag.security.info.plugin_participant_discovery_origin_encrypted",
21325 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) }
21326 },
21327 { &hf_rtps_flag_plugin_participant_security_attribute_flag_is_liveliness_origin_encrypted,{
21328 "Liveliness Origin Encrypted", "rtps.flag.security.info.plugin_participant_liveliness_origin_encrypted",
21329 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) }
21330 },
21331 { &hf_rtps_flag_plugin_participant_security_attribute_flag_is_psk_encrypted,{
21332 "RTPS Pre-Shared Key Encrypted", "rtps.flag.security.info.plugin_participant_psk_encrypted",
21333 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) }
21334 },
21335 { &hf_rtps_flag_plugin_participant_security_attribute_flag_is_valid,{
21336 "Mask Valid", "rtps.flag.security.info.plugin_participant_mask_valid",
21337 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) }
21338 },
21339 { &hf_rtps_param_plugin_participant_security_attributes_mask,{
21340 "PluginParticipantSecurityAttributesMask (valid dissection if using the Specification Builtin Plugins)",
21341 "rtps.param.plugin_participant_security_attributes",
21342 FT_UINT32, BASE_HEX, NULL((void*)0), 0,
21343 "bitmask representing the PluginParticipantSecurityAttributes flags in PID_PARTICIPANT_SECURITY_INFO",
21344 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21345 },
21346 { &hf_rtps_param_enable_authentication,
21347 { "Authentication enabled", "rtps.secure.enable_authentication",
21348 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21349 },
21350 { &hf_rtps_param_builtin_endpoint_qos,
21351 { "Built-in Endpoint QoS", "rtps.param.builtin_endpoint_qos",
21352 FT_UINT32, BASE_HEX, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21353 },
21354 { &hf_rtps_param_sample_signature_epoch,
21355 { "Epoch", "rtps.sample_signature.epoch",
21356 FT_UINT64, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21357 },
21358 { &hf_rtps_param_sample_signature_nonce,
21359 { "Nonce", "rtps.sample_signature.nonce",
21360 FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21361 },
21362 { &hf_rtps_param_sample_signature_length,
21363 {"Signature Length", "rtps.sample_signature.signature_length",
21364 FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21365 },
21366 { &hf_rtps_param_sample_signature_signature,
21367 { "Signature", "rtps.sample_signature.signature",
21368 FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21369 },
21370 { &hf_rtps_secure_dataheader_transformation_kind, {
21371 "Transformation Kind", "rtps.secure.data_header.transformation_kind",
21372 FT_INT8, BASE_DEC, VALS(secure_transformation_kind)((0 ? (const struct _value_string*)0 : ((secure_transformation_kind
))))
, 0,
21373 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21374 },
21375 { &hf_rtps_secure_dataheader_transformation_key_revision_id, {
21376 "Transformation Key Revision Id", "rtps.secure.data_header.transformation_key_revision_id",
21377 FT_INT24, BASE_DEC, NULL((void*)0), 0,
21378 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21379 },
21380 { &hf_rtps_secure_dataheader_transformation_key_id, {
21381 "Transformation Key Id", "rtps.secure.data_header.transformation_key",
21382 FT_BYTES, BASE_NONE, NULL((void*)0), 0,
21383 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21384 },
21385 { &hf_rtps_secure_dataheader_passphrase_id, {
21386 "Passphrase Id", "rtps.secure.data_header.passphrase_id",
21387 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
21388 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21389 },
21390 { &hf_rtps_secure_dataheader_passphrase_key_id, {
21391 "Passphrase Key Id", "rtps.secure.data_header.passphrase_key_id",
21392 FT_UINT8, BASE_HEX, NULL((void*)0), 0,
21393 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21394 },
21395 { &hf_rtps_secure_dataheader_init_vector_suffix, {
21396 "Plugin Secure Header", "rtps.secure.data_header.init_vector_suffix",
21397 FT_BYTES, BASE_NONE, NULL((void*)0), 0,
21398 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21399 },
21400 { &hf_rtps_secure_dataheader_session_id, {
21401 "Session Id", "rtps.secure.data_header.session_id",
21402 FT_UINT32, BASE_HEX, NULL((void*)0), 0,
21403 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21404 },
21405 { &hf_rtps_secure_datatag_plugin_sec_tag, {
21406 "Receiver-Specific Mac",
21407 "rtps.secure.data_tag.receiver_specific_mac",
21408 FT_BYTES, BASE_NONE, NULL((void*)0), 0,
21409 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21410 },
21411 { &hf_rtps_secure_datatag_plugin_sec_tag_key, {
21412 "Receiver-Specific Mac Key Id",
21413 "rtps.secure.data_tag.receiver_specific_macs_key_id",
21414 FT_BYTES, BASE_NONE, NULL((void*)0), 0,
21415 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21416 },
21417 { &hf_rtps_secure_datatag_plugin_sec_tag_common_mac, {
21418 "Plugin Secure Tag Common Mac", "rtps.secure.data_tag.common_mac",
21419 FT_BYTES, BASE_NONE, NULL((void*)0), 0,
21420 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21421 },
21422 { &hf_rtps_secure_datatag_plugin_specific_macs_len, {
21423 "Plugin Secure Tag Receiver-Specific Macs Length", "rtps.secure.data_tag.specific_macs_len",
21424 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
21425 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21426 },
21427 { &hf_rtps_srm_service_id,
21428 { "Service Id", "rtps.srm.service_id",
21429 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) }
21430 },
21431 { &hf_rtps_srm_request_body, {
21432 "Request Body", "rtps.srm.request_body",
21433 FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21434 },
21435 { &hf_rtps_srm_instance_id, {
21436 "Instance Id", "rtps.srm.instance_id",
21437 FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21438 },
21439 { &hf_rtps_topic_query_selection_filter_class_name,
21440 { "Class Name", "rtps.srm.topic_query.class_name",
21441 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21442 },
21443 { &hf_rtps_topic_query_selection_filter_expression,
21444 { "Filter Expression", "rtps.srm.topic_query.filter_expression",
21445 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21446 },
21447 { &hf_rtps_topic_query_selection_filter_parameter,
21448 { "Filter Parameter", "rtps.srm.topic_query.filter_parameter",
21449 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21450 },
21451 { &hf_rtps_topic_query_selection_num_parameters,
21452 { "Number of Filter Parameters", "rtps.srm.topic_query.num_filter_parameters",
21453 FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21454 },
21455 { &hf_rtps_topic_query_topic_name,
21456 { "Topic Name", "rtps.srm.topic_query.topic_name",
21457 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21458 },
21459 { &hf_rtps_topic_query_original_related_reader_guid,
21460 { "Original Related Reader GUID", "rtps.srm.topic_query.original_related_reader_guid",
21461 FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21462 },
21463 { &hf_rtps_topic_query_selection_kind,
21464 { "Topic Query Selection Kind", "rtps.srm.topic_query.kind",
21465 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) }
21466 },
21467 { &hf_rtps_data_session_intermediate,
21468 { "Data Session Intermediate Packet", "rtps.data_session.intermediate",
21469 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x00, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21470 },
21471 { &hf_rtps_secure_secure_data_length,
21472 { "Secure Data Length", "rtps.secure.secure_data_length",
21473 FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21474 },
21475 { &hf_rtps_secure_secure_data,
21476 { "Secure Data", "rtps.secure.secure_data",
21477 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) }
21478 },
21479 { &hf_rtps_secure_session_key,
21480 { "[Session Key]", "rtps.secure.session_key",
21481 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) }
21482 },
21483 { &hf_rtps_pgm, {
21484 "Participant Generic Message", "rtps.pgm",
21485 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) }
21486 },
21487 { &hf_rtps_srm, {
21488 "Service Request Message", "rtps.srm",
21489 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) }
21490 },
21491 { &hf_rtps_pgm_dst_participant_guid,
21492 { "Destination Participant GUID", "rtps.pgm.dst_participant_guid",
21493 FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21494 },
21495 { &hf_rtps_source_participant_guid,
21496 { "Source Participant GUID", "rtps.pgm.source_participant_guid",
21497 FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21498 },
21499 { &hf_rtps_pgm_dst_endpoint_guid,
21500 { "Destination Endpoint GUID", "rtps.pgm.dst_endpoint_guid",
21501 FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21502 },
21503 { &hf_rtps_pgm_src_endpoint_guid,
21504 { "Source Endpoint GUID", "rtps.pgm.src_endpoint_guid",
21505 FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21506 },
21507 { &hf_rtps_message_identity_source_guid,
21508 { "Source GUID", "rtps.pgm.message_identity.source_guid",
21509 FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21510 },
21511 { &hf_rtps_pgm_message_class_id,
21512 { "Message class id", "rtps.pgm.data_holder.message_class_id",
21513 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21514 },
21515 { &hf_rtps_pgm_data_holder_class_id,
21516 { "Class Id", "rtps.pgm.data_holder.class_id",
21517 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21518 },
21519#if 0
21520 { &hf_rtps_pgm_data_holder_stringseq_size,
21521 { "Size", "rtps.pgm.data_holder.string_seq_size",
21522 FT_INT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21523 },
21524 { &hf_rtps_pgm_data_holder_stringseq_name,
21525 { "Name", "rtps.pgm.data_holder.string_seq_name",
21526 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21527 },
21528 { &hf_rtps_pgm_data_holder_long_long,
21529 { "Long long", "rtps.pgm.data_holder.long_long",
21530 FT_INT64, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21531 },
21532#endif
21533 { &hf_rtps_param_topic_query_publication_enable,
21534 { "Enable", "rtps.param.topic_query_publication_enable",
21535 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21536 },
21537 { &hf_rtps_param_topic_query_publication_sessions,
21538 { "Number of sessions", "rtps.param.topic_query_publication_sessions",
21539 FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21540 },
21541 { &hf_rtps_pl_cdr_member,
21542 { "Member value", "rtps.data.value",
21543 FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21544 },
21545 { &hf_rtps_pl_cdr_member_id,
21546 { "Member ID", "rtps.data.member_id",
21547 FT_UINT16, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21548 },
21549 { &hf_rtps_pl_cdr_member_length,
21550 { "Member length", "rtps.data.member_length",
21551 FT_UINT16, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21552 },
21553 { &hf_rtps_pl_cdr_member_id_ext,
21554 { "Member ID", "rtps.data.member_id",
21555 FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21556 },
21557 { &hf_rtps_pl_cdr_member_length_ext,
21558 { "Member length", "rtps.data.member_length",
21559 FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21560 },
21561 { &hf_rtps_dcps_publication_data_frame_number,{
21562 "DCPSPublicationData In", "rtps.dcps_publication_data_frame_number",
21563 FT_FRAMENUM, BASE_NONE, NULL((void*)0), 0x0,
21564 "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) }
21565 },
21566 { &hf_rtps_data_tag_name,
21567 { "Name", "rtps.param.data_tag.name",
21568 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21569 },
21570 { &hf_rtps_data_tag_value,
21571 { "Value", "rtps.param.data_tag.value",
21572 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21573 },
21574 { &hf_rtps_fragments,
21575 { "Message fragments", "rtps.fragments",
21576 FT_NONE, BASE_NONE, NULL((void*)0), 0x00, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21577 },
21578 { &hf_rtps_fragment,
21579 { "Message fragment", "rtps.fragment",
21580 FT_FRAMENUM, BASE_NONE, NULL((void*)0), 0x00, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21581 },
21582 { &hf_rtps_fragment_overlap,
21583 { "Message fragment overlap", "rtps.fragment.overlap",
21584 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x00, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21585 },
21586 { &hf_rtps_fragment_overlap_conflict,
21587 { "Message fragment overlapping with conflicting data", "rtps.fragment.overlap.conflicts",
21588 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x00, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21589 },
21590 { &hf_rtps_fragment_multiple_tails,
21591 { "Message has multiple tail fragments", "rtps.fragment.multiple_tails",
21592 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x00, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21593 },
21594 { &hf_rtps_fragment_too_long_fragment,
21595 { "Message fragment too long", "rtps.fragment.too_long_fragment",
21596 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x00, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21597 },
21598 { &hf_rtps_fragment_error,
21599 { "Message defragmentation error", "rtps.fragment.error",
21600 FT_FRAMENUM, BASE_NONE, NULL((void*)0), 0x00, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21601 },
21602 { &hf_rtps_fragment_count,
21603 { "Message fragment count", "rtps.fragment.count",
21604 FT_UINT32, BASE_DEC, NULL((void*)0), 0x00, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21605 },
21606 { &hf_rtps_reassembled_in,
21607 { "Reassembled in", "rtps.reassembled.in",
21608 FT_FRAMENUM, BASE_NONE, NULL((void*)0), 0x00, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21609 },
21610 { &hf_rtps_reassembled_length,
21611 { "Reassembled length", "rtps.reassembled.length",
21612 FT_UINT32, BASE_DEC, NULL((void*)0), 0x00, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21613 },
21614 { &hf_rtps_reassembled_data,
21615 { "Reassembled RTPS data", "rtps.reassembled.data", FT_BYTES, BASE_NONE,
21616 NULL((void*)0), 0x0, "The reassembled payload", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21617 },
21618 { &hf_rtps_compression_plugin_class_id,
21619 { "Compression class Id", "rtps.param.compression_class_id", FT_UINT32, BASE_DEC,
21620 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) }
21621 },
21622 { &hf_rtps_encapsulation_options_compression_plugin_class_id,
21623 { "Compression class Id", "rtps.param.plugin.compression_class_id", FT_INT8, BASE_DEC,
21624 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) }
21625 },
21626 { &hf_rtps_padding_bytes,
21627 { "Padding bytes", "rtps.padding_bytes", FT_INT8, BASE_DEC,
21628 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21629 },
21630 { &hf_rtps_uncompressed_serialized_length,
21631 { "Uncompressed serialized length", "rtps.param.uncompressed_serialized_length", FT_UINT32, BASE_DEC,
21632 NULL((void*)0), 0x0, "The reassembled payload", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21633 },
21634
21635 { &hf_rtps_encapsulation_extended_compression_options,
21636 { "Uncompressed serialized length", "rtps.extended_compression_options", FT_UINT32, BASE_DEC,
21637 NULL((void*)0), 0x0, "Extended compression options", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21638 },
21639 { &hf_rtps_compressed_serialized_type_object,
21640 { "Compressed serialized type object", "rtps.param.compressed_serialized_typeobject", FT_BYTES, BASE_NONE,
21641 NULL((void*)0), 0x0, "The reassembled payload", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21642 },
21643
21644 { &hf_rtps_dissection_boolean,
21645 {"BOOLEAN", "rtps.dissection.boolean",
21646 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21647 },
21648
21649 { &hf_rtps_dissection_byte,
21650 {"BYTE", "rtps.dissection.byte",
21651 FT_UINT8, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21652 },
21653
21654 { &hf_rtps_dissection_int8,
21655 {"INT8", "rtps.dissection.int8",
21656 FT_INT8, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21657 },
21658
21659 { &hf_rtps_dissection_int16,
21660 {"INT16", "rtps.dissection.int16",
21661 FT_INT16, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21662 },
21663
21664 { &hf_rtps_dissection_uint16,
21665 {"UINT16", "rtps.dissection.uint16",
21666 FT_UINT16, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21667 },
21668
21669 { &hf_rtps_dissection_int32,
21670 {"INT32", "rtps.dissection.int32",
21671 FT_INT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21672 },
21673
21674 { &hf_rtps_dissection_uint32,
21675 {"UINT32", "rtps.dissection.uint32",
21676 FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21677 },
21678
21679 { &hf_rtps_dissection_int64,
21680 {"INT64", "rtps.dissection.int64",
21681 FT_INT64, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21682 },
21683
21684 { &hf_rtps_dissection_uint64,
21685 {"UINT64", "rtps.dissection.uint64",
21686 FT_UINT64, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21687 },
21688
21689 { &hf_rtps_dissection_float,
21690 {"FLOAT", "rtps.dissection.float",
21691 FT_FLOAT, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21692 },
21693
21694 { &hf_rtps_dissection_double,
21695 {"DOUBLE", "rtps.dissection.double",
21696 FT_DOUBLE, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21697 },
21698
21699 { &hf_rtps_dissection_int128,
21700 {"INT128", "rtps.dissection.int128",
21701 FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21702 },
21703
21704 { &hf_rtps_dissection_string,
21705 { "STRING", "rtps.dissection.string",
21706 FT_STRINGZ, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21707 },
21708 { &hf_rtps_flag_udpv4_wan_locator_u, {
21709 "UUID Locator", "rtps.flag.udpv4_wan_locator.u",
21710 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) }
21711 },
21712 { &hf_rtps_flag_udpv4_wan_locator_p, {
21713 "Public Locator", "rtps.flag.udpv4_wan_locator.p",
21714 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) }
21715 },
21716 { &hf_rtps_flag_udpv4_wan_locator_b, {
21717 "Bidirectional Locator", "rtps.flag.udpv4_wan_locator.b",
21718 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) }
21719 },
21720 { &hf_rtps_flag_udpv4_wan_locator_r, {
21721 "Relay Locator", "rtps.flag.udpv4_wan_locator.r",
21722 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) }
21723 },
21724 { &hf_rtps_udpv4_wan_locator_flags, {
21725 "Flags", "rtps.flag.udpv4_wan_locator",
21726 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) }
21727 },
21728 { &hf_rtps_uuid,{
21729 "UUID", "rtps.uuid",
21730 FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21731 },
21732 { &hf_rtps_udpv4_wan_locator_public_ip, {
21733 "Public IP", "rtps.udpv4_wan_locator.public_ip",
21734 FT_IPv4, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21735 },
21736 { &hf_rtps_udpv4_wan_locator_public_port, {
21737 "Public port", "rtps.udpv4_wan_locator.public_port",
21738 FT_UINT16, BASE_PT_UDP, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21739 },
21740 { &hf_rtps_udpv4_wan_locator_local_ip,{
21741 "Local IP", "rtps.udpv4_wan_locator.local_ip",
21742 FT_IPv4, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21743 },
21744 { &hf_rtps_udpv4_wan_locator_local_port,{
21745 "Local port", "rtps.udpv4_wan_locator.local_port",
21746 FT_UINT16, BASE_PT_UDP, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21747 },
21748 { &hf_rtps_flag_udpv4_wan_binding_ping_e, {
21749 "Endianness", "rtps.flag.udpv4_wan_binding_ping.e",
21750 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) }
21751 },
21752 { &hf_rtps_flag_udpv4_wan_binding_ping_l, {
21753 "Long address", "rtps.flag.udpv4_wan_binding_ping.l",
21754 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) }
21755 },
21756 { &hf_rtps_flag_udpv4_wan_binding_ping_b,{
21757 "Bidirectional", "rtps.flag.udpv4_wan_binding_ping.b",
21758 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) }
21759 },
21760 { &hf_rtps_udpv4_wan_binding_ping_flags, {
21761 "Flags", "rtps.flag.udpv4_wan_binding_ping",
21762 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) }
21763 },
21764 { &hf_rtps_udpv4_wan_binding_ping_port, {
21765 "RTPS port", "rtps.flag.udpv4_wan_binding_rtps_port",
21766 FT_UINT32, BASE_DEC, NULL((void*)0), 0, "UDPv4 WAN binding ping RTPS port", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21767 },
21768 { &hf_rtps_long_address, {
21769 "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) }
21770 },
21771 { &hf_rtps_param_group_coherent_set, {
21772 "Group coherent set sequence number", "rtps.param.group_coherent_set",
21773 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) }
21774 },
21775 { &hf_rtps_param_end_group_coherent_set, {
21776 "End group coherent set sequence number", "rtps.param.end_group_coherent_set",
21777 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) }
21778 },
21779 { &hf_rtps_param_mig_end_coherent_set_sample_count, {
21780 "Ended coherent set sample count", "rtps.param.mig_end_coherent_set_sample_count",
21781 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) }
21782 },
21783 { &hf_rtps_flag_cloud_discovery_service_announcer,{
21784 "Cloud Discovery Service Announcer", "rtps.flag.cloud_discovery_service_announcer",
21785 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) }
21786 },
21787 { &hf_rtps_writer_group_oid, {
21788 "Writer Group OID", "rtps.writer_group_oid",
21789 FT_UINT32, BASE_DEC, NULL((void*)0), 0, "Decimal representing the writer group OID", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21790 },
21791 { &hf_rtps_reader_group_oid, {
21792 "Reader Group OID", "rtps.reader_group_oid",
21793 FT_UINT32, BASE_DEC, NULL((void*)0), 0, "Decimal representing the reader group OID", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21794 },
21795 { &hf_rtps_writer_session_id,{
21796 "Writer Session ID", "rtps.writer_session_id",
21797 FT_UINT32, BASE_DEC, NULL((void*)0), 0, "Decimal representing the writer session ID", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21798 },
21799 { &hf_rtps_flag_participant_config_writer,{
21800 "Participant Config Writer", "rtps.flag.participant_config_writer",
21801 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, VENDOR_BUILTIN_ENDPOINT_SET_FLAG_PARTICIPANT_CONFIG_WRITER0x00000080, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21802 },
21803 { &hf_rtps_flag_participant_config_reader,{
21804 "Participant Config Reader", "rtps.flag.participant_config_reader",
21805 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, VENDOR_BUILTIN_ENDPOINT_SET_FLAG_PARTICIPANT_CONFIG_READER0x00000100, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21806 },
21807 { &hf_rtps_flag_participant_config_secure_writer,{
21808 "Participant Config Secure Writer", "rtps.flag.participant_config_secure_writer",
21809 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_WRITER0x00000200, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21810 },
21811 { &hf_rtps_flag_participant_config_secure_reader,{
21812 "Participant Config Secure Reader", "rtps.flag.participant_config_secure_reader",
21813 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_READER0x00000400, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21814 },
21815 { &hf_rtps_flag_participant_bootstrap_writer,{
21816 "Participant Bootstrap Writer", "rtps.flag.participant_bootstrap_writer",
21817 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, VENDOR_BUILTIN_ENDPOINT_SET_FLAG_PARTICIPANT_BOOTSTRAP_WRITER0x00020000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21818 },
21819 { &hf_rtps_flag_participant_bootstrap_reader,{
21820 "Participant Bootstrap Reader", "rtps.flag.participant_bootstrap_reader",
21821 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, VENDOR_BUILTIN_ENDPOINT_SET_FLAG_PARTICIPANT_BOOTSTRAP_READER0x00040000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21822 },
21823 { &hf_rtps_flag_monitoring_periodic_writer,{
21824 "Monitoring Periodic Writer", "rtps.flag.monitoring_periodic_writer",
21825 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, VENDOR_BUILTIN_ENDPOINT_SET_FLAG_MONITORING_PERIODIC_WRITER0x00000800, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21826 },
21827 { &hf_rtps_flag_monitoring_periodic_reader,{
21828 "Monitoring Periodic Reader", "rtps.flag.monitoring_periodic_reader",
21829 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, VENDOR_BUILTIN_ENDPOINT_SET_FLAG_MONITORING_PERIODIC_READER0x00001000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21830 },
21831 { &hf_rtps_flag_monitoring_event_writer,{
21832 "Monitoring Event Writer", "rtps.flag.monitoring_event_writer",
21833 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, VENDOR_BUILTIN_ENDPOINT_SET_FLAG_MONITORING_EVENT_WRITER0x00002000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21834 },
21835 { &hf_rtps_flag_monitoring_event_reader,{
21836 "Monitoring Event Reader", "rtps.flag.monitoring_event_reader",
21837 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, VENDOR_BUILTIN_ENDPOINT_SET_FLAG_MONITORING_EVENT_READER0x00004000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21838 },
21839 { &hf_rtps_flag_monitoring_logging_writer,{
21840 "Monitoring Logging Writer", "rtps.flag.monitoring_logging_writer",
21841 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, VENDOR_BUILTIN_ENDPOINT_SET_FLAG_MONITORING_LOGGING_WRITER0x00008000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21842 },
21843 { &hf_rtps_flag_monitoring_logging_reader,{
21844 "Monitoring Logging Reader", "rtps.flag.monitoring_logging_reader",
21845 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, VENDOR_BUILTIN_ENDPOINT_SET_FLAG_MONITORING_LOGGING_READER0x00010000, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21846 }
21847 };
21848
21849 static int *ett[] = {
21850 &ett_rtps,
21851 &ett_rtps_default_mapping,
21852 &ett_rtps_proto_version,
21853 &ett_rtps_product_version,
21854 &ett_rtps_submessage,
21855 &ett_rtps_parameter_sequence,
21856 &ett_rtps_parameter,
21857 &ett_rtps_flags,
21858 &ett_rtps_entity,
21859 &ett_rtps_generic_guid,
21860 &ett_rtps_rdentity,
21861 &ett_rtps_wrentity,
21862 &ett_rtps_guid_prefix,
21863 &ett_rtps_app_id,
21864 &ett_rtps_locator_udp_v4,
21865 &ett_rtps_locator,
21866 &ett_rtps_locator_list,
21867 &ett_rtps_timestamp,
21868 &ett_rtps_bitmap,
21869 &ett_rtps_seq_string,
21870 &ett_rtps_seq_ulong,
21871 &ett_rtps_resource_limit,
21872 &ett_rtps_durability_service,
21873 &ett_rtps_liveliness,
21874 &ett_rtps_manager_key,
21875 &ett_rtps_serialized_data,
21876 &ett_rtps_locator_filter_channel,
21877 &ett_rtps_part_message_data,
21878 &ett_rtps_sample_info_list,
21879 &ett_rtps_sample_info,
21880 &ett_rtps_sample_batch_list,
21881 &ett_rtps_locator_filter_locator,
21882 &ett_rtps_writer_heartbeat_virtual_list,
21883 &ett_rtps_writer_heartbeat_virtual,
21884 &ett_rtps_virtual_guid_heartbeat_virtual_list,
21885 &ett_rtps_virtual_guid_heartbeat_virtual,
21886 &ett_rtps_app_ack_virtual_writer_list,
21887 &ett_rtps_app_ack_virtual_writer,
21888 &ett_rtps_app_ack_virtual_writer_interval_list,
21889 &ett_rtps_app_ack_virtual_writer_interval,
21890 &ett_rtps_transport_info,
21891 &ett_rtps_property_list,
21892 &ett_rtps_property,
21893 &ett_rtps_topic_info,
21894 &ett_rtps_topic_info_dw_qos,
21895 &ett_rtps_type_bound_seq,
21896 &ett_rtps_type_dep,
21897 &ett_rtps_type_id,
21898 &ett_rtps_type_object_v2,
21899 &ett_rtps_type_object_v2_complete_type_detail,
21900 &ett_rtps_type_object_v2_alias,
21901 &ett_rtps_type_object_v2_alias_body,
21902 &ett_rtps_type_object_v2_struct,
21903 &ett_rtps_type_object_v2_struct_header,
21904 &ett_rtps_type_object_v2_member_seq,
21905 &ett_rtps_type_object_v2_member,
21906 &ett_rtps_type_object_v2_union,
21907 &ett_rtps_type_object_v2_union_header,
21908 &ett_rtps_type_object_v2_union_discriminator,
21909 &ett_rtps_type_object_v2_union_label_seq,
21910 &ett_rtps_type_object_v2_enum,
21911 &ett_rtps_type_object_v2_enum_header,
21912 &ett_rtps_type_object_v2_enum_literal,
21913 &ett_rtps_type_deps_seq,
21914 &ett_rtps_type_id_w_deps,
21915 &ett_rtps_type_id_w_size,
21916 &ett_rtps_type_object,
21917 &ett_rtps_type_information,
21918 &ett_rtps_type_lookup_request,
21919 &ett_rtps_type_lookup_reply,
21920 &ett_rtps_type_lookup_request_id,
21921 &ett_rtps_type_lookup_request_header,
21922 &ett_rtps_type_lookup_reply_header,
21923 &ett_rtps_type_lookup_reply_data,
21924 &ett_rtps_type_lookup_deps_seq,
21925 &ett_rtps_type_lookup_request_data,
21926 &ett_rtps_instance_name,
21927 &ett_rtps_type_information_minimal,
21928 &ett_rtps_type_information_complete,
21929 &ett_rtps_type_library,
21930 &ett_rtps_type_element,
21931 &ett_rtps_type_annotation_usage_list,
21932 &ett_rtps_type_enum_constant,
21933 &ett_rtps_type_bound_list,
21934 &ett_rtps_secure_payload_tree,
21935 &ett_rtps_secure_dataheader_tree,
21936 &ett_rtps_secure_transformation_kind,
21937 &ett_rtps_pgm_data,
21938 &ett_rtps_message_identity,
21939 &ett_rtps_related_message_identity,
21940 &ett_rtps_data_holder_seq,
21941 &ett_rtps_data_holder,
21942 &ett_rtps_data_holder_properties,
21943 &ett_rtps_property_tree,
21944 &ett_rtps_param_header_tree,
21945 &ett_rtps_custom_dissection_info,
21946 &ett_rtps_service_request_tree,
21947 &ett_rtps_locator_ping_tree,
21948 &ett_rtps_locator_reachability_tree,
21949 &ett_rtps_locator_list_tree,
21950 &ett_rtps_topic_query_tree,
21951 &ett_rtps_topic_query_selection_tree,
21952 &ett_rtps_topic_query_filter_params_tree,
21953 &ett_rtps_data_member,
21954 &ett_rtps_data_tag_seq,
21955 &ett_rtps_data_tag_item,
21956 &ett_rtps_fragment,
21957 &ett_rtps_fragments,
21958 &ett_rtps_data_representation,
21959 &ett_rtps_decompressed_type_object,
21960 &ett_rtps_dissection_tree,
21961 &ett_rtps_info_remaining_items,
21962 &ett_rtps_data_encapsulation_options,
21963 &ett_rtps_decompressed_serialized_data,
21964 &ett_rtps_instance_transition_data,
21965 &ett_rtps_crypto_algorithm_requirements,
21966 &ett_rtps_decrypted_payload,
21967 &ett_rtps_secure_postfix_tag_list_item
21968 };
21969
21970 static ei_register_info ei[] = {
21971 { &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)}}
}},
21972 { &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)}}
}},
21973 { &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)}}
}},
21974 { &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)}}
}},
21975 { &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)}}
}},
21976 { &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)}}
}},
21977 { &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)}}
}},
21978 { &ei_rtps_extra_bytes, { "rtps.extra_bytes", PI_MALFORMED0x07000000, PI_ERROR0x00800000, "Unhandled extra byte", 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)}}
}},
21979 { &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)}}
}},
21980 { &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)}}
}},
21981 { &ei_rtps_pid_type_csonsistency_invalid_size, { "rtps.pid_type_consistency_invalid_size", PI_MALFORMED0x07000000, PI_ERROR0x00800000, "PID_TYPE_CONSISTENCY invalid size", 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)}}
}},
21982 { &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)}}
}},
21983 { &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)}}
}},
21984 { &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)}}
}},
21985 { &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)}}
}},
21986 { &ei_rtps_invalid_fragment_size, { "rtps.fragment_size", PI_MALFORMED0x07000000, PI_WARN0x00600000, "Invalid fragment size", 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)}}
}},
21987 };
21988
21989 module_t *rtps_module;
21990 expert_module_t *expert_rtps;
21991 uat_t * rtps_psk_uat;
21992
21993 proto_rtps = proto_register_protocol("Real-Time Publish-Subscribe Wire Protocol", "RTPS", "rtps");
21994 proto_register_field_array(proto_rtps, hf, array_length(hf)(sizeof (hf) / sizeof (hf)[0]));
21995 proto_register_subtree_array(ett, array_length(ett)(sizeof (ett) / sizeof (ett)[0]));
21996 expert_rtps = expert_register_protocol(proto_rtps);
21997 expert_register_field_array(expert_rtps, ei, array_length(ei)(sizeof (ei) / sizeof (ei)[0]));
21998
21999 /* Registers the control in the preference panel */
22000 rtps_module = prefs_register_protocol(proto_rtps, NULL((void*)0));
22001 prefs_register_uint_preference(
22002 rtps_module,
22003 "max_batch_samples_dissected",
22004 "Max samples dissected for DATA_BATCH",
22005 "Specifies the maximum number of samples dissected in a DATA_BATCH "
22006 "submessage. Increasing this value may affect performance if the "
22007 "trace has a lot of big batched samples.",
22008 10,
22009 &rtps_max_batch_samples_dissected);
22010
22011 prefs_register_bool_preference(
22012 rtps_module,
22013 "enable_max_dissection_info_elements",
22014 "Limit the number of elements dissected in structs",
22015 "Enabling this option may affect performance if the trace has messages "
22016 "with large Data Types.",
22017 &enable_max_data_type_elements);
22018
22019 prefs_register_uint_preference(
22020 rtps_module,
22021 "max_dissection_info_elements",
22022 "Max Dissection info elements shown in structs",
22023 "Specifies the maximum number of Data Type elements dissected. "
22024 "Increasing this value may affect performance if the trace has "
22025 "messages with large Data Types.",
22026 10,
22027 &rtps_max_data_type_elements);
22028
22029 prefs_register_bool_preference(
22030 rtps_module,
22031 "enable_max_dissection_array_elements",
22032 "Limit the number of elements dissected in arrays or sequences",
22033 "Disabling this option may affect performance if the trace has messages "
22034 "with large arrays or sequences.",
22035 &enable_max_array_data_type_elements);
22036
22037 prefs_register_uint_preference(
22038 rtps_module,
22039 "max_dissection_array_elements",
22040 "Max Dissection elements shown in arrays or sequences",
22041 "Specifies the maximum number of Data Type elements dissected in arrays or sequences. "
22042 "Increasing this value may affect "
22043 "performance if the trace has messages with large Data Types.",
22044 10,
22045 &rtps_max_array_data_type_elements);
22046
22047 prefs_register_bool_preference(
22048 rtps_module,
22049 "enable_topic_info",
22050 "Enable Topic Information",
22051 "Shows the Topic Name and Type Name of the samples. "
22052 "Note: this can considerably increase the dissection time.",
22053 &enable_topic_info);
22054
22055 prefs_register_bool_preference(
22056 rtps_module,
22057 "enable_debug_info",
22058 "Enable Debug Information",
22059 "Shows debug information such XCDR2 headers and string sizes",
22060 &enable_debug_info);
22061
22062 prefs_register_bool_preference(
22063 rtps_module,
22064 "enable_user_data_dissection",
22065 "Enable User Data Dissection (based on Type Object V1)",
22066 "Dissects the user data if the Type Object V1 is propagated in Discovery.",
22067 &enable_user_data_dissection);
22068
22069 prefs_register_bool_preference(
22070 rtps_module,
22071 "enable_rtps_reassembly",
22072 "Enable RTPS Reassembly",
22073 "Enables the reassembly of DATA_FRAG submessages.",
22074 &enable_rtps_reassembly);
22075
22076 prefs_register_bool_preference(
22077 rtps_module,
22078 "enable_rtps_checksum_check",
22079 "Enable RTPS Checksum check (Only CRC-32C and MD5 supported)",
22080 "Detects the RTPS packets with invalid checksums (Only CRC-32C and MD5 "
22081 "supported)",
22082 &enable_rtps_crc_check);
22083
22084 prefs_register_bool_preference(
22085 rtps_module,
22086 "enable_rtps_psk_decryption",
22087 "Enable RTPS PSK decryption",
22088 "Decode RTPS messages protected with a pre-shared key",
22089 &enable_rtps_psk_decryption);
22090
22091 rtps_psk_uat = uat_new(
22092 "RTPS GUID-PSK",
22093 sizeof(rtps_psk_options_entry_t),
22094 "RTPS PSK Keys",
22095 true1,
22096 &rtps_psk_options.entries,
22097 &rtps_psk_options.size,
22098 0x00000001,
22099 NULL((void*)0),
22100 rtps_psk_options_copy_entry,
22101 rtps_psk_options_update_entry,
22102 rtps_psk_options_free_entry,
22103 NULL((void*)0),
22104 NULL((void*)0),
22105 rtps_psk_table_field_array);
22106
22107 prefs_register_uat_preference(
22108 rtps_module,
22109 "psk_keys",
22110 "Pre-shared keys",
22111 "List of pre-shared keys that will be used to decode RTPS messages if"
22112 " the previous option is enabled",
22113 rtps_psk_uat);
22114
22115 rtps_type_name_table = register_dissector_table("rtps.type_name", "RTPS Type Name",
22116 proto_rtps, FT_STRING, STRING_CASE_SENSITIVE0);
22117
22118 registry = wmem_map_new_autoreset(wmem_epan_scope(), wmem_file_scope(), hash_by_guid, compare_by_guid);
22119 dissection_infos = wmem_map_new_autoreset(wmem_epan_scope(), wmem_file_scope(), g_int64_hash, g_int64_equal);
22120 union_member_mappings = wmem_map_new_autoreset(wmem_epan_scope(), wmem_file_scope(), g_int64_hash, g_int64_equal);
22121 mutable_member_mappings = wmem_map_new_autoreset(wmem_epan_scope(), wmem_file_scope(), g_int64_hash, g_int64_equal);
22122 coherent_set_tracking.entities_using_map = wmem_map_new_autoreset(wmem_epan_scope(), wmem_file_scope(), hash_by_guid, compare_by_guid);
22123 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);
22124 builtin_dissection_infos = wmem_map_new_autoreset(wmem_epan_scope(), wmem_epan_scope(), g_int64_hash, g_int64_equal);
22125
22126 coherent_set_tracking.entities_using_map = wmem_map_new_autoreset(wmem_epan_scope(), wmem_file_scope(), hash_by_guid, compare_by_guid);
22127 discovered_participants_domain_ids = wmem_map_new_autoreset(wmem_epan_scope(), wmem_file_scope(), hash_by_participant_guid, compare_by_participant_guid);
22128 /* In order to get this dissector from other dissectors */
22129 register_dissector("rtps", dissect_simple_rtps, proto_rtps);
22130
22131 initialize_instance_state_data_response_dissection_info(&builtin_types_dissection_data);
22132
22133 reassembly_table_register(&rtps_reassembly_table,
22134 &addresses_reassembly_table_functions);
22135}
22136
22137void proto_reg_handoff_rtps(void) {
22138 heur_dissector_add("rtitcp", dissect_rtps_rtitcp, "RTPS over RTITCP", "rtps_rtitcp", proto_rtps, HEURISTIC_ENABLE);
22139 heur_dissector_add("udp", dissect_rtps_udp, "RTPS over UDP", "rtps_udp", proto_rtps, HEURISTIC_ENABLE);
22140 heur_dissector_add("tcp", dissect_rtps_tcp, "RTPS over TCP", "rtps_tcp", proto_rtps, HEURISTIC_ENABLE);
22141}
22142
22143/*
22144 * Editor modelines
22145 *
22146 * Local Variables:
22147 * c-basic-offset: 2
22148 * tab-width: 8
22149 * indent-tabs-mode: nil
22150 * End:
22151 *
22152 * ex: set shiftwidth=2 tabstop=8 expandtab:
22153 * :indentSize=2:tabSize=8:noTabs=true:
22154 */