Bug Summary

File:epan/dissectors/packet-rtps.c
Warning:line 13934, 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-09-100415-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_RTI_BUILTIN_PARTICIPANT_BOOTSTRAP_WRITER(0x00010082) (0x00010082)
722#define ENTITYID_RTI_BUILTIN_PARTICIPANT_BOOTSTRAP_READER(0x00010087) (0x00010087)
723#define ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_WRITER(0x00010182) (0x00010182)
724#define ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_READER(0x00010187) (0x00010187)
725#define ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_WRITER(0xff010182) (0xff010182)
726#define ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_READER(0xff010187) (0xff010187)
727
728
729#define ENTITYID_RESERVED_META_CST_GROUP_WRITER(0xcb) (0xcb)
730#define ENTITYID_RESERVED_META_GROUP_WRITER(0xcc) (0xcc)
731#define ENTITYID_RESERVED_META_GROUP_READER(0xcd) (0xcd)
732#define ENTITYID_RESERVED_META_CST_GROUP_READER(0xce) (0xce)
733#define ENTITYID_OBJECT_NORMAL_META_WRITER_GROUP(0x88) (0x88)
734#define ENTITYID_OBJECT_NORMAL_META_READER_GROUP(0x89) (0x89)
735#define ENTITYID_OBJECT_NORMAL_META_TOPIC(0x8a) (0x8a)
736#define ENTITYID_NORMAL_META_CST_GROUP_WRITER(0x8b) (0x8b)
737#define ENTITYID_NORMAL_META_GROUP_WRITER(0x8c) (0x8c)
738#define ENTITYID_NORMAL_META_GROUP_READER(0x8d) (0x8d)
739#define ENTITYID_NORMAL_META_CST_GROUP_READER(0x8e) (0x8e)
740#define ENTITYID_RESERVED_USER_CST_GROUP_WRITER(0x4b) (0x4b)
741#define ENTITYID_RESERVED_USER_GROUP_WRITER(0x4c) (0x4c)
742#define ENTITYID_RESERVED_USER_GROUP_READER(0x4d) (0x4d)
743#define ENTITYID_RESERVED_USER_CST_GROUP_READER(0x4e) (0x4e)
744#define ENTITYID_NORMAL_USER_CST_GROUP_WRITER(0x0b) (0x0b)
745#define ENTITYID_NORMAL_USER_GROUP_WRITER(0x0c) (0x0c)
746#define ENTITYID_NORMAL_USER_GROUP_READER(0x0d) (0x0d)
747#define ENTITYID_NORMAL_USER_CST_GROUP_READER(0x0e) (0x0e)
748
749
750/* Secure DDS */
751#define ENTITYID_P2P_BUILTIN_PARTICIPANT_STATELESS_WRITER(0x000201c3) (0x000201c3)
752#define ENTITYID_P2P_BUILTIN_PARTICIPANT_STATELESS_READER(0x000201c4) (0x000201c4)
753#define ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_WRITER(0xff0003c2) (0xff0003c2)
754#define ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_READER(0xff0003c7) (0xff0003c7)
755#define ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_WRITER(0xff0004c2) (0xff0004c2)
756#define ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_READER(0xff0004c7) (0xff0004c7)
757#define ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_SECURE_WRITER(0xff0200c2) (0xff0200c2)
758#define ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_SECURE_READER(0xff0200c7) (0xff0200c7)
759#define ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_WRITER(0xff0202c3) (0xff0202c3)
760#define ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_READER(0xff0202c4) (0xff0202c4)
761#define ENTITYID_SPDP_RELIABLE_BUILTIN_PARTICIPANT_SECURE_WRITER(0xff0101c2) (0xff0101c2)
762#define ENTITYID_SPDP_RELIABLE_BUILTIN_PARTICIPANT_SECURE_READER(0xff0101c7) (0xff0101c7)
763
764/* Vendor-specific: RTI */
765#define ENTITYID_RTI_BUILTIN_SERVICE_REQUEST_WRITER(0x00020082) (0x00020082)
766#define ENTITYID_RTI_BUILTIN_SERVICE_REQUEST_READER(0x00020087) (0x00020087)
767#define ENTITYID_RTI_BUILTIN_LOCATOR_PING_WRITER(0x00020182) (0x00020182)
768#define ENTITYID_RTI_BUILTIN_LOCATOR_PING_READER(0x00020187) (0x00020187)
769
770/* Deprecated EntityId */
771#define ENTITYID_APPLICATIONS_WRITER(0x000001c2) (0x000001c2)
772#define ENTITYID_APPLICATIONS_READER(0x000001c7) (0x000001c7)
773#define ENTITYID_CLIENTS_WRITER(0x000005c2) (0x000005c2)
774#define ENTITYID_CLIENTS_READER(0x000005c7) (0x000005c7)
775#define ENTITYID_SERVICES_WRITER(0x000006c2) (0x000006c2)
776#define ENTITYID_SERVICES_READER(0x000006c7) (0x000006c7)
777#define ENTITYID_MANAGERS_WRITER(0x000007c2) (0x000007c2)
778#define ENTITYID_MANAGERS_READER(0x000007c7) (0x000007c7)
779#define ENTITYID_APPLICATION_SELF(0x000008c1) (0x000008c1)
780#define ENTITYID_APPLICATION_SELF_WRITER(0x000008c2) (0x000008c2)
781#define ENTITYID_APPLICATION_SELF_READER(0x000008c7) (0x000008c7)
782
783/* Predefined Entity Kind */
784#define ENTITYKIND_APPDEF_UNKNOWN(0x00) (0x00)
785#define ENTITYKIND_APPDEF_PARTICIPANT(0x01) (0x01)
786#define ENTITYKIND_APPDEF_WRITER_WITH_KEY(0x02) (0x02)
787#define ENTITYKIND_APPDEF_WRITER_NO_KEY(0x03) (0x03)
788#define ENTITYKIND_APPDEF_READER_NO_KEY(0x04) (0x04)
789#define ENTITYKIND_APPDEF_READER_WITH_KEY(0x07) (0x07)
790#define ENTITYKIND_BUILTIN_PARTICIPANT(0xc1) (0xc1)
791#define ENTITYKIND_BUILTIN_WRITER_WITH_KEY(0xc2) (0xc2)
792#define ENTITYKIND_BUILTIN_WRITER_NO_KEY(0xc3) (0xc3)
793#define ENTITYKIND_BUILTIN_READER_NO_KEY(0xc4) (0xc4)
794#define ENTITYKIND_BUILTIN_READER_WITH_KEY(0xc7) (0xc7)
795
796/* vendor specific RTI */
797#define ENTITYKIND_RTI_BUILTIN_WRITER_WITH_KEY(0x82) (0x82)
798#define ENTITYKIND_RTI_BUILTIN_WRITER_NO_KEY(0x83) (0x83)
799#define ENTITYKIND_RTI_BUILTIN_READER_NO_KEY(0x84) (0x84)
800#define ENTITYKIND_RTI_BUILTIN_READER_WITH_KEY(0x87) (0x87)
801
802/* Submessage Type */
803#define SUBMESSAGE_HEADER_EXTENSION(0x0) (0x0)
804#define SUBMESSAGE_PAD(0x01) (0x01)
805#define SUBMESSAGE_DATA(0x02) (0x02)
806#define SUBMESSAGE_NOKEY_DATA(0x03) (0x03)
807#define SUBMESSAGE_ACKNACK(0x06) (0x06)
808#define SUBMESSAGE_HEARTBEAT(0x07) (0x07)
809#define SUBMESSAGE_GAP(0x08) (0x08)
810#define SUBMESSAGE_INFO_TS(0x09) (0x09)
811#define SUBMESSAGE_INFO_SRC(0x0c) (0x0c)
812#define SUBMESSAGE_INFO_REPLY_IP4(0x0d) (0x0d)
813#define SUBMESSAGE_INFO_DST(0x0e) (0x0e)
814#define SUBMESSAGE_INFO_REPLY(0x0f) (0x0f)
815
816#define SUBMESSAGE_DATA_FRAG(0x10) (0x10) /* RTPS 2.0 Only */
817#define SUBMESSAGE_NOKEY_DATA_FRAG(0x11) (0x11) /* RTPS 2.0 Only */
818#define SUBMESSAGE_NACK_FRAG(0x12) (0x12) /* RTPS 2.0 Only */
819#define SUBMESSAGE_HEARTBEAT_FRAG(0x13) (0x13) /* RTPS 2.0 Only */
820
821#define SUBMESSAGE_RTPS_DATA_SESSION(0x14) (0x14) /* RTPS 2.1 only */
822#define SUBMESSAGE_RTPS_DATA(0x15) (0x15) /* RTPS 2.1 only */
823#define SUBMESSAGE_RTPS_DATA_FRAG(0x16) (0x16) /* RTPS 2.1 only */
824#define SUBMESSAGE_ACKNACK_BATCH(0x17) (0x17) /* RTPS 2.1 only */
825#define SUBMESSAGE_RTPS_DATA_BATCH(0x18) (0x18) /* RTPS 2.1 Only */
826#define SUBMESSAGE_HEARTBEAT_BATCH(0x19) (0x19) /* RTPS 2.1 only */
827#define SUBMESSAGE_ACKNACK_SESSION(0x1a) (0x1a) /* RTPS 2.1 only */
828#define SUBMESSAGE_HEARTBEAT_SESSION(0x1b) (0x1b) /* RTPS 2.1 only */
829#define SUBMESSAGE_APP_ACK(0x1c) (0x1c)
830#define SUBMESSAGE_APP_ACK_CONF(0x1d) (0x1d)
831#define SUBMESSAGE_HEARTBEAT_VIRTUAL(0x1e) (0x1e)
832#define SUBMESSAGE_SEC_BODY(0x30) (0x30)
833#define SUBMESSAGE_SEC_PREFIX(0x31) (0x31)
834#define SUBMESSAGE_SEC_POSTFIX(0x32) (0x32)
835#define SUBMESSAGE_SRTPS_PREFIX(0x33) (0x33)
836#define SUBMESSAGE_SRTPS_POSTFIX(0x34) (0x34)
837#define SUBMESSAGE_RTI_CRC(0x80) (0x80)
838#define SUBMESSAGE_RTI_DATA_FRAG_SESSION(0x81) (0x81) /* Vendor Specific */
839#define SUBMESSAGE_RTI_UDP_WAN_BINDING_PING(0x82) (0x82)
840
841
842/* An invalid IP Address:
843 * Make sure the _STRING macro is bigger than a normal IP
844 */
845#define IPADDRESS_INVALID(0) (0)
846#define IPADDRESS_INVALID_STRING"ADDRESS_INVALID" "ADDRESS_INVALID"
847
848/* Identifies the value of an invalid port number:
849 * Make sure the _STRING macro is bigger than a normal port
850 */
851#define PORT_INVALID(0) (0)
852#define PORT_INVALID_STRING"PORT_INVALID" "PORT_INVALID"
853
854/* Protocol Vendor Information (uint16_t) as per July 2020 */
855#define RTPS_VENDOR_UNKNOWN(0x0000) (0x0000)
856#define RTPS_VENDOR_UNKNOWN_STRING"VENDOR_ID_UNKNOWN (0x0000)" "VENDOR_ID_UNKNOWN (0x0000)"
857#define RTPS_VENDOR_RTI_DDS(0x0101) (0x0101)
858#define RTPS_VENDOR_RTI_DDS_STRING"Real-Time Innovations, Inc. - Connext DDS" "Real-Time Innovations, Inc. - Connext DDS"
859#define RTPS_VENDOR_ADL_DDS(0x0102) (0x0102)
860#define RTPS_VENDOR_ADL_DDS_STRING"ADLink Ltd. - OpenSplice DDS" "ADLink Ltd. - OpenSplice DDS"
861#define RTPS_VENDOR_OCI(0x0103) (0x0103)
862#define RTPS_VENDOR_OCI_STRING"Object Computing, Inc. (OCI) - OpenDDS" "Object Computing, Inc. (OCI) - OpenDDS"
863#define RTPS_VENDOR_MILSOFT(0x0104) (0x0104)
864#define RTPS_VENDOR_MILSOFT_STRING"MilSoft" "MilSoft"
865#define RTPS_VENDOR_KONGSBERG(0x0105) (0x0105)
866#define RTPS_VENDOR_KONGSBERG_STRING"Kongsberg - InterCOM DDS" "Kongsberg - InterCOM DDS"
867#define RTPS_VENDOR_TOC(0x0106) (0x0106)
868#define RTPS_VENDOR_TOC_STRING"TwinOaks Computing, Inc. - CoreDX DDS" "TwinOaks Computing, Inc. - CoreDX DDS"
869#define RTPS_VENDOR_LAKOTA_TSI(0x0107) (0x0107)
870#define RTPS_VENDOR_LAKOTA_TSI_STRING"Lakota Technical Solutions, Inc." "Lakota Technical Solutions, Inc."
871#define RTPS_VENDOR_ICOUP(0x0108) (0x0108)
872#define RTPS_VENDOR_ICOUP_STRING"ICOUP Consulting" "ICOUP Consulting"
873#define RTPS_VENDOR_ETRI(0x0109) (0x0109)
874#define RTPS_VENDOR_ETRI_STRING"Electronics and Telecommunication Research Institute (ETRI) - Diamond DDS" "Electronics and Telecommunication Research Institute (ETRI) - Diamond DDS"
875#define RTPS_VENDOR_RTI_DDS_MICRO(0x010A) (0x010A)
876#define RTPS_VENDOR_RTI_DDS_MICRO_STRING"Real-Time Innovations, Inc. (RTI) - Connext DDS Micro" "Real-Time Innovations, Inc. (RTI) - Connext DDS Micro"
877#define RTPS_VENDOR_ADL_CAFE(0x010B) (0x010B)
878#define RTPS_VENDOR_ADL_CAFE_STRING"ADLink Ltd. - Vortex Cafe" "ADLink Ltd. - Vortex Cafe"
879#define RTPS_VENDOR_PT(0x010C) (0x010C)
880#define RTPS_VENDOR_PT_STRING"PrismTech" "PrismTech"
881#define RTPS_VENDOR_ADL_LITE(0x010D) (0x010D)
882#define RTPS_VENDOR_ADL_LITE_STRING"ADLink Ltd. - Vortex Lite" "ADLink Ltd. - Vortex Lite"
883#define RTPS_VENDOR_TECHNICOLOR(0x010E) (0x010E)
884#define RTPS_VENDOR_TECHNICOLOR_STRING"Technicolor Inc. - Qeo" "Technicolor Inc. - Qeo"
885#define RTPS_VENDOR_EPROSIMA(0x010F) (0x010F)
886#define RTPS_VENDOR_EPROSIMA_STRING"eProsima - Fast-RTPS" "eProsima - Fast-RTPS"
887#define RTPS_VENDOR_ECLIPSE(0x0110) (0x0110)
888#define RTPS_VENDOR_ECLIPSE_STRING"Eclipse Foundation - Cyclone DDS" "Eclipse Foundation - Cyclone DDS"
889#define RTPS_VENDOR_GURUM(0x0111) (0x0111)
890#define RTPS_VENDOR_GURUM_STRING"GurumNetworks Ltd. - GurumDDS" "GurumNetworks Ltd. - GurumDDS"
891#define RTPS_VENDOR_RUST(0x0112) (0x0112)
892#define RTPS_VENDOR_RUST_STRING"Atostek - RustDDS" "Atostek - RustDDS"
893#define RTPS_VENDOR_ZRDDS(0x0113) (0x0113)
894#define RTPS_VENDOR_ZRDDS_STRING"Nanjing Zhenrong Software Technology Co. - ZRDDS" "Nanjing Zhenrong Software Technology Co. - ZRDDS"
895#define RTPS_VENDOR_DUST(0x0114) (0x0114)
896#define RTPS_VENDOR_DUST_STRING"S2E Software Systems B.V. - Dust DDS" "S2E Software Systems B.V. - Dust DDS"
897
898
899/* Data encapsulation */
900#define ENCAPSULATION_CDR_BE(0x0000) (0x0000)
901#define ENCAPSULATION_CDR_LE(0x0001) (0x0001)
902#define ENCAPSULATION_PL_CDR_BE(0x0002) (0x0002)
903#define ENCAPSULATION_PL_CDR_LE(0x0003) (0x0003)
904#define ENCAPSULATION_CDR2_BE(0x0006) (0x0006)
905#define ENCAPSULATION_CDR2_LE(0x0007) (0x0007)
906#define ENCAPSULATION_D_CDR2_BE(0x0008) (0x0008)
907#define ENCAPSULATION_D_CDR2_LE(0x0009) (0x0009)
908#define ENCAPSULATION_PL_CDR2_BE(0x000a) (0x000a)
909#define ENCAPSULATION_PL_CDR2_LE(0x000b) (0x000b)
910#define ENCAPSULATION_SHMEM_REF_PLAIN(0xC000) (0xC000)
911#define ENCAPSULATION_SHMEM_REF_FLAT_DATA(0xC001) (0xC001)
912
913/* Data encapsulation options */
914#define ENCAPSULATION_OPTIONS_COMPRESSION_BYTES_MASK(0x1C) (0x1C)
915#define GET_ENCAPSULATION_COMPRESSION_OPTIONS(encapsulation_options_in, compression_options_out)(compression_options_out = (((encapsulation_options_in) &
((0x1C))) >> 2))
\
916 (compression_options_out = (((encapsulation_options_in) & (ENCAPSULATION_OPTIONS_COMPRESSION_BYTES_MASK(0x1C))) >> 2))
917#define ENCAPSULATION_OPTIONS_COMPRESSION_EXTENDED_HEADER_VALUE(0x1C) ENCAPSULATION_OPTIONS_COMPRESSION_BYTES_MASK(0x1C)
918#define ENCAPSULATION_OPTIONS_COMPRESSION_PADDING_BYTES_MASK(0x3) (0x3)
919
920
921/* Parameter Liveliness */
922#define LIVELINESS_AUTOMATIC(0) (0)
923#define LIVELINESS_BY_PARTICIPANT(1) (1)
924#define LIVELINESS_BY_TOPIC(2) (2)
925
926/* Parameter Durability */
927#define DURABILITY_VOLATILE(0) (0)
928#define DURABILITY_TRANSIENT_LOCAL(1) (1)
929#define DURABILITY_TRANSIENT(2) (2)
930#define DURABILITY_PERSISTENT(3) (3)
931
932/* Parameter Ownership */
933#define OWNERSHIP_SHARED(0) (0)
934#define OWNERSHIP_EXCLUSIVE(1) (1)
935
936/* Parameter Presentation */
937#define PRESENTATION_INSTANCE(0) (0)
938#define PRESENTATION_TOPIC(1) (1)
939#define PRESENTATION_GROUP(2) (2)
940
941#define LOCATOR_KIND_INVALID(-1) (-1)
942#define LOCATOR_KIND_RESERVED(0) (0)
943#define LOCATOR_KIND_UDPV4(1) (1)
944#define LOCATOR_KIND_UDPV6(2) (2)
945/* Vendor specific - rti */
946#define LOCATOR_KIND_DTLS(6) (6)
947#define LOCATOR_KIND_TCPV4_LAN(8) (8)
948#define LOCATOR_KIND_TCPV4_WAN(9) (9)
949#define LOCATOR_KIND_TLSV4_LAN(10) (10)
950#define LOCATOR_KIND_TLSV4_WAN(11) (11)
951#define LOCATOR_KIND_SHMEM(0x01000000) (0x01000000)
952#define LOCATOR_KIND_TUDPV4(0x01001001) (0x01001001)
953#define LOCATOR_KIND_UDPV4_WAN(0x01000001) (0x01000001)
954
955/* History Kind */
956#define HISTORY_KIND_KEEP_LAST(0) (0)
957#define HISTORY_KIND_KEEP_ALL(1) (1)
958
959/* Reliability Values */
960#define RELIABILITY_BEST_EFFORT(1) (1)
961#define RELIABILITY_RELIABLE(2) (2)
962
963/* Destination Order */
964#define BY_RECEPTION_TIMESTAMP(0) (0)
965#define BY_SOURCE_TIMESTAMP(1) (1)
966
967/* Member flags */
968#define MEMBER_IS_KEY(1) (1)
969#define MEMBER_OPTIONAL(2) (2)
970#define MEMBER_SHAREABLE(4) (4)
971#define MEMBER_UNION_DEFAULT(8) (8)
972/* Participant message data kind */
973#define PARTICIPANT_MESSAGE_DATA_KIND_UNKNOWN(0x00000000) (0x00000000)
974#define PARTICIPANT_MESSAGE_DATA_KIND_AUTOMATIC_LIVELINESS_UPDATE(0x00000001) (0x00000001)
975#define PARTICIPANT_MESSAGE_DATA_KIND_MANUAL_LIVELINESS_UPDATE(0x00000002) (0x00000002)
976
977/* Type Consistency Kinds */
978#define DISALLOW_TYPE_COERCION(0) (0)
979#define ALLOW_TYPE_COERCION(1) (1)
980
981/* Ack kind */
982#define PROTOCOL_ACKNOWLEDGMENT(0) (0)
983#define APPLICATION_AUTO_ACKNOWLEDGMENT(1) (1)
984#define APPLICATION_ORDERED_ACKNOWLEDGMENT(2) (2)
985#define APPLICATION_EXPLICIT_ACKNOWLEDGMENT(3) (3)
986
987#define CRYPTO_TRANSFORMATION_KIND_NONE(0) (0)
988#define CRYPTO_TRANSFORMATION_KIND_AES128_GMAC(1) (1)
989#define CRYPTO_TRANSFORMATION_KIND_AES128_GCM(2) (2)
990#define CRYPTO_TRANSFORMATION_KIND_AES256_GMAC(3) (3)
991#define CRYPTO_TRANSFORMATION_KIND_AES256_GCM(4) (4)
992
993/* Vendor specific algorithm bits are the upper 16 bits of 32-bit value */
994#define BITMASK_VENDOR_SPECIFIC_ALGORITHM010x00010000 0x00010000
995#define BITMASK_VENDOR_SPECIFIC_ALGORITHM020x00020000 0x00020000
996#define BITMASK_VENDOR_SPECIFIC_ALGORITHM030x00040000 0x00040000
997#define BITMASK_VENDOR_SPECIFIC_ALGORITHM040x00080000 0x00080000
998#define BITMASK_VENDOR_SPECIFIC_ALGORITHM050x00100000 0x00100000
999#define BITMASK_VENDOR_SPECIFIC_ALGORITHM060x00200000 0x00200000
1000#define BITMASK_VENDOR_SPECIFIC_ALGORITHM070x00400000 0x00400000
1001#define BITMASK_VENDOR_SPECIFIC_ALGORITHM080x00800000 0x00800000
1002#define BITMASK_VENDOR_SPECIFIC_ALGORITHM090x01000000 0x01000000
1003#define BITMASK_VENDOR_SPECIFIC_ALGORITHM100x02000000 0x02000000
1004#define BITMASK_VENDOR_SPECIFIC_ALGORITHM110x04000000 0x04000000
1005#define BITMASK_VENDOR_SPECIFIC_ALGORITHM120x08000000 0x08000000
1006#define BITMASK_VENDOR_SPECIFIC_ALGORITHM130x10000000 0x10000000
1007#define BITMASK_VENDOR_SPECIFIC_ALGORITHM140x20000000 0x20000000
1008#define BITMASK_VENDOR_SPECIFIC_ALGORITHM150x40000000 0x40000000
1009#define BITMASK_VENDOR_SPECIFIC_ALGORITHM160x80000000 0x80000000
1010
1011
1012#define SECURITY_SYMMETRIC_CIPHER_BIT_AES128_GCM0x00000001 0x00000001
1013#define SECURITY_SYMMETRIC_CIPHER_BIT_AES256_GCM0x00000002 0x00000002
1014#define SECURITY_SYMMETRIC_CIPHER_BIT_VENDOR_RTI_AES192_GCM0x40000000 0x40000000
1015#define SECURITY_SYMMETRIC_CIPHER_ALGORITHM_INFO_SUPPORTED_MASK_DEFAULT0x00000003 0x00000003
1016#define SECURITY_SYMMETRIC_CIPHER_ALGORITHM_INFO_BUILTIN_ENDPOINTS_REQUIRED_MASK_DEFAULT0x00000002 0x00000002
1017#define SECURITY_SYMMETRIC_CIPHER_ALGORITHM_INFO_BUILTIN_ENDPOINTS_KEY_EXCHANGE_REQUIRED_MASK_DEFAULT0x00000002 0x00000002
1018#define SECURITY_SYMMETRIC_CIPHER_ALGORITHM_INFO_USER_ENDPOINTS_DEFAULT_REQUIRED_MASK_DEFAULT0x00000002 0x00000002
1019
1020#define SECURITY_DIGITAL_SIGNATURE_BIT_RSASSAPSSMGF1SHA256_2048_SHA2560x00000001 0x00000001
1021#define SECURITY_DIGITAL_SIGNATURE_BIT_RSASSAPKCS1V15_2048_SHA2560x00000002 0x00000002
1022#define SECURITY_DIGITAL_SIGNATURE_BIT_ECDSA_P256_SHA2560x00000004 0x00000004
1023#define SECURITY_DIGITAL_SIGNATURE_BIT_ECDSA_P384_SHA3840x00000008 0x00000008
1024#define SECURITY_DIGITAL_SIGNATURE_BIT_VENDOR_RTI_EDDSA_ED25519_SHA5120x00010000 0x00010000
1025#define SECURITY_DIGITAL_SIGNATURE_BIT_VENDOR_RTI_EDDSA_ED448_SHAKE2560x00020000 0x00020000
1026#define SECURITY_DIGITAL_SIGNATURE_ALGORITHM_INFO_TRUST_CHAIN_SUPPORTED_MASK_DEFAULT0x00000007 0x00000007
1027#define SECURITY_DIGITAL_SIGNATURE_ALGORITHM_INFO_TRUST_CHAIN_REQUIRED_MASK_DEFAULT0x00000004 0x00000004
1028#define SECURITY_DIGITAL_SIGNATURE_ALGORITHM_INFO_MESSAGE_AUTH_SUPPORTED_MASK_DEFAULT0x00000005 0x00000005
1029#define SECURITY_DIGITAL_SIGNATURE_ALGORITHM_INFO_MESSAGE_AUTH_REQUIRED_MASK_DEFAULT0x00000004 0x00000004
1030
1031#define SECURITY_KEY_ESTABLISHMENT_BIT_DHE_MODP20482560x00000001 0x00000001
1032#define SECURITY_KEY_ESTABLISHMENT_BIT_ECDHECEUM_P2560x00000002 0x00000002
1033#define SECURITY_KEY_ESTABLISHMENT_BIT_ECDHECEUM_P3840x00000004 0x00000004
1034#define SECURITY_KEY_ESTABLISHMENT_BIT_VENDOR_RTI_ECDHECEUM_X255190x00010000 0x00010000
1035#define SECURITY_KEY_ESTABLISHMENT_BIT_VENDOR_RTI_ECDHECEUM_X4480x00020000 0x00020000
1036#define SECURITY_KEY_ESTABLISHMENT_ALGORITHM_INFO_SUPPORTED_MASK_DEFAULT0x00000003 0x00000003
1037#define SECURITY_KEY_ESTABLISHMENT_ALGORITHM_INFO_REQUIRED_MASK_DEFAULT0x00000002 0x00000002
1038
1039#define SECURITY_ALGORITHM_BIT_COMPATIBILITY_MODE0x80000000 0x80000000
1040
1041#define TOPIC_INFO_ADD_GUID(0x01) (0x01)
1042#define TOPIC_INFO_ADD_TYPE_NAME(0x02) (0x02)
1043#define TOPIC_INFO_ADD_TOPIC_NAME(0x04) (0x04)
1044#define TOPIC_INFO_ALL_SET(0x07) (0x07)
1045
1046#define NOT_A_FRAGMENT(-1) (-1)
1047
1048/* */
1049#define RTI_OSAPI_COMPRESSION_CLASS_ID_NONE(0) (0)
1050#define RTI_OSAPI_COMPRESSION_CLASS_ID_ZLIB(1) (1)
1051#define RTI_OSAPI_COMPRESSION_CLASS_ID_BZIP2(2) (2)
1052#define RTI_OSAPI_COMPRESSION_CLASS_ID_LZ4(4) (4)
1053#define RTI_OSAPI_COMPRESSION_CLASS_ID_AUTO((4294967295U)) (UINT32_MAX(4294967295U))
1054
1055/* VENDOR_BUILTIN_ENDPOINT_SET FLAGS */
1056#define VENDOR_BUILTIN_ENDPOINT_SET_FLAG_PARTICIPANT_CONFIG_WRITER0x00000080 0x00000080
1057#define VENDOR_BUILTIN_ENDPOINT_SET_FLAG_PARTICIPANT_CONFIG_READER0x00000100 0x00000100
1058#define VENDOR_BUILTIN_ENDPOINT_SET_FLAG_PARTICIPANT_CONFIG_SECURE_WRITER0x00000200 0x00000200
1059#define VENDOR_BUILTIN_ENDPOINT_SET_FLAG_PARTICIPANT_CONFIG_SECURE_READER0x00000400 0x00000400
1060#define VENDOR_BUILTIN_ENDPOINT_SET_FLAG_MONITORING_PERIODIC_WRITER0x00000800 0x00000800
1061#define VENDOR_BUILTIN_ENDPOINT_SET_FLAG_MONITORING_PERIODIC_READER0x00001000 0x00001000
1062#define VENDOR_BUILTIN_ENDPOINT_SET_FLAG_MONITORING_EVENT_WRITER0x00002000 0x00002000
1063#define VENDOR_BUILTIN_ENDPOINT_SET_FLAG_MONITORING_EVENT_READER0x00004000 0x00004000
1064#define VENDOR_BUILTIN_ENDPOINT_SET_FLAG_MONITORING_LOGGING_WRITER0x00008000 0x00008000
1065#define VENDOR_BUILTIN_ENDPOINT_SET_FLAG_MONITORING_LOGGING_READER0x00010000 0x00010000
1066#define VENDOR_BUILTIN_ENDPOINT_SET_FLAG_PARTICIPANT_BOOTSTRAP_WRITER0x00020000 0x00020000
1067#define VENDOR_BUILTIN_ENDPOINT_SET_FLAG_PARTICIPANT_BOOTSTRAP_READER0x00040000 0x00040000
1068
1069static int hf_rtps_dissection_boolean;
1070static int hf_rtps_dissection_byte;
1071static int hf_rtps_dissection_int16;
1072static int hf_rtps_dissection_uint16;
1073static int hf_rtps_dissection_int32;
1074static int hf_rtps_dissection_uint32;
1075static int hf_rtps_dissection_int64;
1076static int hf_rtps_dissection_uint64;
1077static int hf_rtps_dissection_float;
1078static int hf_rtps_dissection_double;
1079static int hf_rtps_dissection_int128;
1080static int hf_rtps_dissection_string;
1081
1082static const char *const SM_EXTRA_RPLUS = "(r+)";
1083static const char *const SM_EXTRA_RMINUS = "(r-)";
1084static const char *const SM_EXTRA_WPLUS = "(w+)";
1085static const char *const SM_EXTRA_WMINUS = "(w-)";
1086static const char *const SM_EXTRA_PPLUS = "(p+)";
1087static const char *const SM_EXTRA_PMINUS = "(p-)";
1088static const char *const SM_EXTRA_TPLUS = "(t+)";
1089static const char *const SM_EXTRA_TMINUS = "(t-)";
1090
1091/***************************************************************************/
1092/* Protocol Fields Identifiers */
1093static int proto_rtps;
1094static int hf_rtps_magic;
1095static int hf_rtps_ping;
1096static int hf_rtps_protocol_version;
1097static int hf_rtps_protocol_version_major;
1098static int hf_rtps_protocol_version_minor;
1099static int hf_rtps_vendor_id;
1100
1101static int hf_rtps_domain_id;
1102static int hf_rtps_domain_tag;
1103static int hf_rtps_participant_idx;
1104static int hf_rtps_nature_type;
1105
1106static int hf_rtps_guid_prefix_v1;
1107static int hf_rtps_guid_prefix;
1108static int hf_rtps_guid_prefix_src;
1109static int hf_rtps_guid_prefix_dst;
1110static int hf_rtps_host_id;
1111static int hf_rtps_app_id;
1112static int hf_rtps_app_id_instance_id;
1113static int hf_rtps_app_id_app_kind;
1114
1115static int hf_rtps_sm_id;
1116static int hf_rtps_sm_idv2;
1117static int hf_rtps_sm_flags;
1118static int hf_rtps_sm_flags2;
1119static int hf_rtps_sm_octets_to_next_header;
1120static int hf_rtps_sm_guid_prefix_v1;
1121static int hf_rtps_sm_guid_prefix;
1122static int hf_rtps_sm_host_id;
1123static int hf_rtps_sm_app_id;
1124static int hf_rtps_sm_instance_id_v1;
1125static int hf_rtps_sm_app_kind;
1126static int hf_rtps_sm_instance_id;
1127static int hf_rtps_sm_entity_id;
1128static int hf_rtps_sm_entity_id_key;
1129static int hf_rtps_sm_entity_id_kind;
1130static int hf_rtps_sm_rdentity_id;
1131static int hf_rtps_sm_rdentity_id_key;
1132static int hf_rtps_sm_rdentity_id_kind;
1133static int hf_rtps_sm_wrentity_id;
1134static int hf_rtps_sm_wrentity_id_key;
1135static int hf_rtps_sm_wrentity_id_kind;
1136static int hf_rtps_sm_seq_number;
1137
1138static int hf_rtps_info_src_ip;
1139static int hf_rtps_info_src_unused;
1140
1141static int hf_rtps_parameter_id;
1142static int hf_rtps_parameter_id_v2;
1143static int hf_rtps_parameter_id_inline_rti;
1144static int hf_rtps_parameter_id_toc;
1145static int hf_rtps_parameter_id_rti;
1146static int hf_rtps_parameter_id_adl;
1147static int hf_rtps_parameter_length;
1148static int hf_rtps_string_length;
1149static int hf_rtps_coherent_set_start;
1150static int hf_rtps_coherent_set_end;
1151static int hf_rtps_param_topic_name;
1152static int hf_rtps_param_strength;
1153static int hf_rtps_param_type_name;
1154static int hf_rtps_param_user_data;
1155static int hf_rtps_param_group_data;
1156static int hf_rtps_param_topic_data;
1157static int hf_rtps_param_content_filter_topic_name;
1158static int hf_rtps_param_related_topic_name;
1159static int hf_rtps_param_filter_class_name;
1160static int hf_rtps_issue_data;
1161static int hf_rtps_durability_service_cleanup_delay;
1162static int hf_rtps_liveliness_lease_duration;
1163static int hf_rtps_participant_lease_duration;
1164static int hf_rtps_time_based_filter_minimum_separation;
1165static int hf_rtps_reliability_max_blocking_time;
1166static int hf_rtps_deadline_period;
1167static int hf_rtps_latency_budget_duration;
1168static int hf_rtps_lifespan_duration;
1169static int hf_rtps_persistence;
1170static int hf_rtps_info_ts_timestamp;
1171static int hf_rtps_timestamp;
1172static int hf_rtps_locator_kind;
1173static int hf_rtps_locator_port;
1174/* static int hf_rtps_logical_port; */
1175static int hf_rtps_locator_public_address_port;
1176static int hf_rtps_locator_ipv4;
1177static int hf_rtps_locator_ipv6;
1178static int hf_rtps_participant_builtin_endpoints;
1179static int hf_rtps_participant_manual_liveliness_count;
1180static int hf_rtps_history_depth;
1181static int hf_rtps_resource_limit_max_samples;
1182static int hf_rtps_resource_limit_max_instances;
1183static int hf_rtps_resource_limit_max_samples_per_instances;
1184static int hf_rtps_filter_bitmap;
1185static int hf_rtps_type_checksum;
1186static int hf_rtps_queue_size;
1187static int hf_rtps_acknack_count;
1188static int hf_rtps_durability_service_history_kind;
1189static int hf_rtps_durability_service_history_depth;
1190static int hf_rtps_durability_service_max_samples;
1191static int hf_rtps_durability_service_max_instances;
1192static int hf_rtps_durability_service_max_samples_per_instances;
1193static int hf_rtps_liveliness_kind;
1194static int hf_rtps_manager_key;
1195static int hf_rtps_locator_udp_v4;
1196static int hf_rtps_locator_udp_v4_port;
1197static int hf_param_ip_address;
1198static int hf_rtps_param_port;
1199static int hf_rtps_expects_inline_qos;
1200static int hf_rtps_presentation_coherent_access;
1201static int hf_rtps_presentation_ordered_access;
1202static int hf_rtps_expects_ack;
1203static int hf_rtps_reliability_kind;
1204static int hf_rtps_durability;
1205static int hf_rtps_ownership;
1206static int hf_rtps_presentation_access_scope;
1207static int hf_rtps_destination_order;
1208static int hf_rtps_history_kind;
1209static int hf_rtps_data_status_info;
1210static int hf_rtps_param_serialize_encap_kind;
1211static int hf_rtps_param_serialize_encap_len;
1212static int hf_rtps_param_transport_priority;
1213static int hf_rtps_param_type_max_size_serialized;
1214static int hf_rtps_param_entity_name;
1215static int hf_rtps_param_role_name;
1216static int hf_rtps_disable_positive_ack;
1217static int hf_rtps_participant_guid_v1;
1218static int hf_rtps_participant_guid;
1219static int hf_rtps_group_guid_v1;
1220static int hf_rtps_group_guid;
1221static int hf_rtps_endpoint_guid;
1222static int hf_rtps_param_host_id;
1223static int hf_rtps_param_app_id;
1224static int hf_rtps_param_instance_id;
1225static int hf_rtps_param_instance_id_v1;
1226static int hf_rtps_param_app_kind;
1227static int hf_rtps_param_entity;
1228static int hf_rtps_param_entity_key;
1229static int hf_rtps_param_entity_kind;
1230static int hf_rtps_data_frag_number;
1231static int hf_rtps_data_frag_num_fragments;
1232static int hf_rtps_data_frag_size;
1233static int hf_rtps_data_frag_sample_size;
1234static int hf_rtps_nokey_data_frag_number;
1235static int hf_rtps_nokey_data_frag_num_fragments;
1236static int hf_rtps_nokey_data_frag_size;
1237static int hf_rtps_nack_frag_count;
1238static int hf_rtps_heartbeat_frag_number;
1239static int hf_rtps_heartbeat_frag_count;
1240static int hf_rtps_heartbeat_batch_count;
1241static int hf_rtps_data_serialize_data;
1242static int hf_rtps_data_batch_timestamp;
1243static int hf_rtps_data_batch_offset_to_last_sample_sn;
1244static int hf_rtps_data_batch_sample_count;
1245static int hf_rtps_data_batch_offset_sn;
1246static int hf_rtps_data_batch_octets_to_sl_encap_id;
1247static int hf_rtps_data_batch_serialized_data_length;
1248static int hf_rtps_data_batch_octets_to_inline_qos;
1249static int hf_rtps_fragment_number_base64;
1250static int hf_rtps_fragment_number_base;
1251static int hf_rtps_fragment_number_num_bits;
1252static int hf_rtps_bitmap_num_bits;
1253static int hf_rtps_param_partition_num;
1254static int hf_rtps_param_partition;
1255static int hf_rtps_param_topic_alias_num;
1256static int hf_rtps_param_topic_alias;
1257static int hf_rtps_param_type_alias_num;
1258static int hf_rtps_param_type_alias;
1259static int hf_rtps_param_filter_expression;
1260static int hf_rtps_param_expression_parameters_num;
1261static int hf_rtps_param_expression_parameters;
1262static int hf_rtps_locator_filter_list_num_channels;
1263static int hf_rtps_locator_filter_list_filter_name;
1264static int hf_rtps_locator_filter_list_filter_exp;
1265static int hf_rtps_extra_flags;
1266static int hf_rtps_param_builtin_endpoint_set_flags;
1267static int hf_rtps_param_builtin_endpoint_ext_set_flags;
1268static int hf_rtps_param_vendor_builtin_endpoint_set_flags;
1269static int hf_rtps_param_endpoint_security_attributes;
1270static int hf_rtps_param_plugin_promiscuity_kind;
1271static int hf_rtps_param_service_kind;
1272
1273static int hf_rtps_param_sample_signature_epoch;
1274static int hf_rtps_param_sample_signature_nonce;
1275static int hf_rtps_param_sample_signature_length;
1276static int hf_rtps_param_sample_signature_signature;
1277static int hf_rtps_secure_secure_data_length;
1278static int hf_rtps_secure_secure_data;
1279static int hf_rtps_param_enable_authentication;
1280static int hf_rtps_param_builtin_endpoint_qos;
1281static int hf_rtps_secure_dataheader_transformation_kind;
1282static int hf_rtps_secure_dataheader_transformation_key_revision_id;
1283static int hf_rtps_secure_dataheader_transformation_key_id;
1284static int hf_rtps_secure_dataheader_passphrase_id;
1285static int hf_rtps_secure_dataheader_passphrase_key_id;
1286static int hf_rtps_secure_dataheader_init_vector_suffix;
1287static int hf_rtps_secure_dataheader_session_id;
1288static int hf_rtps_secure_datatag_plugin_sec_tag;
1289static int hf_rtps_secure_datatag_plugin_sec_tag_key;
1290static int hf_rtps_secure_datatag_plugin_sec_tag_common_mac;
1291static int hf_rtps_secure_datatag_plugin_specific_macs_len;
1292static int hf_rtps_pgm;
1293static int hf_rtps_pgm_dst_participant_guid;
1294static int hf_rtps_pgm_dst_endpoint_guid;
1295static int hf_rtps_pgm_src_endpoint_guid;
1296static int hf_rtps_source_participant_guid;
1297static int hf_rtps_message_identity_source_guid;
1298static int hf_rtps_pgm_message_class_id;
1299static int hf_rtps_pgm_data_holder_class_id;
1300static int hf_rtps_secure_session_key;
1301/* static int hf_rtps_pgm_data_holder_stringseq_size; */
1302/* static int hf_rtps_pgm_data_holder_stringseq_name; */
1303/* static int hf_rtps_pgm_data_holder_long_long; */
1304
1305static int hf_rtps_param_timestamp_sec;
1306static int hf_rtps_param_timestamp_fraction;
1307static int hf_rtps_transportInfo_classId;
1308static int hf_rtps_transportInfo_messageSizeMax;
1309static int hf_rtps_param_app_ack_count;
1310static int hf_rtps_param_app_ack_virtual_writer_count;
1311static int hf_rtps_param_app_ack_conf_virtual_writer_count;
1312static int hf_rtps_param_app_ack_conf_count;
1313static int hf_rtps_param_app_ack_interval_payload_length;
1314static int hf_rtps_param_app_ack_interval_flags;
1315static int hf_rtps_param_app_ack_interval_count;
1316static int hf_rtps_param_app_ack_octets_to_next_virtual_writer;
1317static int hf_rtps_expects_virtual_heartbeat;
1318static int hf_rtps_direct_communication;
1319static int hf_rtps_param_peer_host_epoch;
1320static int hf_rtps_param_endpoint_property_change_epoch;
1321static int hf_rtps_virtual_heartbeat_count;
1322static int hf_rtps_virtual_heartbeat_num_virtual_guids;
1323static int hf_rtps_virtual_heartbeat_num_writers;
1324static int hf_rtps_param_extended_parameter;
1325static int hf_rtps_param_extended_pid_length;
1326static int hf_rtps_param_type_consistency_kind;
1327static int hf_rtps_param_data_representation;
1328static int hf_rtps_param_ignore_sequence_bounds;
1329static int hf_rtps_param_ignore_string_bounds;
1330static int hf_rtps_param_ignore_member_names;
1331static int hf_rtps_param_prevent_type_widening;
1332static int hf_rtps_param_force_type_validation;
1333static int hf_rtps_param_ignore_enum_literal_names;
1334static int hf_rtps_parameter_data;
1335static int hf_rtps_param_product_version_major;
1336static int hf_rtps_param_product_version_minor;
1337static int hf_rtps_param_product_version_release;
1338static int hf_rtps_param_product_version_release_as_char;
1339static int hf_rtps_param_product_version_revision;
1340static int hf_rtps_param_acknowledgment_kind;
1341static int hf_rtps_param_topic_query_publication_enable;
1342static int hf_rtps_param_topic_query_publication_sessions;
1343
1344static int hf_rtps_srm;
1345static int hf_rtps_srm_service_id;
1346static int hf_rtps_srm_request_body;
1347static int hf_rtps_srm_instance_id;
1348static int hf_rtps_topic_query_selection_filter_class_name;
1349static int hf_rtps_topic_query_selection_filter_expression;
1350static int hf_rtps_topic_query_selection_num_parameters;
1351static int hf_rtps_topic_query_selection_filter_parameter;
1352static int hf_rtps_topic_query_topic_name;
1353static int hf_rtps_topic_query_original_related_reader_guid;
1354
1355static int hf_rtps_encapsulation_id;
1356static int hf_rtps_encapsulation_kind;
1357static int hf_rtps_octets_to_inline_qos;
1358static int hf_rtps_filter_signature;
1359static int hf_rtps_bitmap;
1360static int hf_rtps_acknack_analysis;
1361static int hf_rtps_property_name;
1362static int hf_rtps_property_value;
1363static int hf_rtps_union;
1364static int hf_rtps_union_case;
1365static int hf_rtps_struct;
1366static int hf_rtps_member_name;
1367static int hf_rtps_sequence;
1368static int hf_rtps_array;
1369static int hf_rtps_bitfield;
1370static int hf_rtps_datatype;
1371static int hf_rtps_sequence_size;
1372static int hf_rtps_guid;
1373static int hf_rtps_heartbeat_count;
1374static int hf_rtps_encapsulation_options;
1375static int hf_rtps_serialized_key;
1376static int hf_rtps_serialized_data;
1377static int hf_rtps_base_type_id_discriminator;
1378static int hf_rtps_instance_name;
1379static int hf_rtps_remote_exception_code;
1380static int hf_rtps_type_bound;
1381static int hf_rtps_type_deps_count;
1382static int hf_rtps_type_deps_result;
1383static int hf_rtps_type_element_flags;
1384static int hf_rtps_type_equiv_kind;
1385static int hf_rtps_type_extended;
1386static int hf_rtps_type_hash;
1387static int hf_rtps_type_id_discriminator;
1388static int hf_rtps_type_id_w_size;
1389static int hf_rtps_type_kind_discriminator;
1390static int hf_rtps_type_lookup_deps_seq;
1391static int hf_rtps_type_lookup_discriminator;
1392static int hf_rtps_type_object_serialized_size;
1393static int hf_rtps_type_object_v2;
1394static int hf_rtps_type_object_v2_ann_builtin;
1395static int hf_rtps_type_object_v2_enum_bit_bound;
1396static int hf_rtps_type_object_v2_enum_literal_value;
1397static int hf_rtps_type_object_v2_has_ann_builtin;
1398static int hf_rtps_type_object_v2_has_ann_custom;
1399static int hf_rtps_type_object_v2_member_flag_is_default;
1400static int hf_rtps_type_object_v2_member_flag_is_external;
1401static int hf_rtps_type_object_v2_member_flag_is_key;
1402static int hf_rtps_type_object_v2_member_flag_is_must_understand;
1403static int hf_rtps_type_object_v2_member_flag_is_optional;
1404static int hf_rtps_type_object_v2_member_flag_try_construct;
1405static int hf_rtps_type_object_v2_member_flags;
1406static int hf_rtps_type_object_v2_member_id;
1407static int hf_rtps_type_object_v2_member_name;
1408static int hf_rtps_type_object_v2_member_name_hash;
1409static int hf_rtps_type_object_v2_type_flag_is_appendable;
1410static int hf_rtps_type_object_v2_type_flag_is_autoid_hash;
1411static int hf_rtps_type_object_v2_type_flag_is_final;
1412static int hf_rtps_type_object_v2_type_flag_is_mutable;
1413static int hf_rtps_type_object_v2_type_flag_is_nested;
1414static int hf_rtps_type_object_v2_type_flags;
1415static int hf_rtps_type_object_v2_type_name;
1416static int hf_rtps_type_object_v2_union_label;
1417static int hf_rtps_xcdr2_delimited_header;
1418static int hf_rtps_xcdr2_enhanced_mutable_header;
1419static int hf_rtps_xcdr2_length_code;
1420static int hf_rtps_xcdr2_member_id;
1421static int hf_rtps_xcdr2_must_understand;
1422static int hf_rtps_xcdr2_nextint;
1423static int hf_rtps_type_object_type_id_disc;
1424static int hf_rtps_type_object_type_id;
1425static int hf_rtps_type_object_primitive_type_id;
1426static int hf_rtps_type_object_base_type;
1427static int hf_rtps_type_object_base_primitive_type_id;
1428static int hf_rtps_type_object_element_raw;
1429static int hf_rtps_type_object_type_property_name;
1430static int hf_rtps_type_object_flags;
1431static int hf_rtps_type_object_member_id;
1432static int hf_rtps_type_object_annotation_value_d;
1433static int hf_rtps_type_object_annotation_value_16;
1434static int hf_rtps_type_object_union_label;
1435static int hf_rtps_type_object_bound;
1436static int hf_rtps_type_object_enum_constant_name;
1437static int hf_rtps_type_object_enum_constant_value;
1438static int hf_rtps_type_object_element_shared;
1439static int hf_rtps_type_object_name;
1440static int hf_rtps_type_object_element_module_name;
1441static int hf_rtps_uncompressed_serialized_length;
1442static int hf_rtps_compression_plugin_class_id;
1443static int hf_rtps_compressed_serialized_type_object;
1444static int hf_rtps_pl_cdr_member;
1445static int hf_rtps_pl_cdr_member_id;
1446static int hf_rtps_pl_cdr_member_length;
1447static int hf_rtps_pl_cdr_member_id_ext;
1448static int hf_rtps_pl_cdr_member_length_ext;
1449static int hf_rtps_dcps_publication_data_frame_number;
1450static int hf_rtps_udpv4_wan_locator_flags;
1451static int hf_rtps_uuid;
1452static int hf_rtps_udpv4_wan_locator_public_ip;
1453static int hf_rtps_udpv4_wan_locator_public_port;
1454static int hf_rtps_udpv4_wan_locator_local_ip;
1455static int hf_rtps_udpv4_wan_locator_local_port;
1456static int hf_rtps_udpv4_wan_binding_ping_port;
1457static int hf_rtps_udpv4_wan_binding_ping_flags;
1458static int hf_rtps_long_address;
1459static int hf_rtps_param_group_coherent_set;
1460static int hf_rtps_param_end_group_coherent_set;
1461static int hf_rtps_param_mig_end_coherent_set_sample_count;
1462static int hf_rtps_encapsulation_options_compression_plugin_class_id;
1463static int hf_rtps_padding_bytes;
1464static int hf_rtps_topic_query_selection_kind;
1465static int hf_rtps_data_session_intermediate;
1466
1467/* Flag bits */
1468static int hf_rtps_flag_reserved80;
1469static int hf_rtps_flag_reserved40;
1470static int hf_rtps_flag_reserved20;
1471static int hf_rtps_flag_reserved10;
1472static int hf_rtps_flag_reserved08;
1473static int hf_rtps_flag_reserved04;
1474static int hf_rtps_flag_reserved02;
1475static int hf_rtps_flag_reserved8000;
1476static int hf_rtps_flag_reserved4000;
1477static int hf_rtps_flag_reserved2000;
1478static int hf_rtps_flag_reserved1000;
1479static int hf_rtps_flag_reserved0800;
1480static int hf_rtps_flag_reserved0400;
1481static int hf_rtps_flag_reserved0200;
1482static int hf_rtps_flag_reserved0100;
1483static int hf_rtps_flag_reserved0080;
1484static int hf_rtps_flag_reserved0040;
1485
1486static int hf_rtps_flag_builtin_endpoint_set_reserved;
1487static int hf_rtps_flag_unregister;
1488static int hf_rtps_flag_inline_qos_v1;
1489static int hf_rtps_flag_hash_key;
1490static int hf_rtps_flag_alive;
1491static int hf_rtps_flag_data_present_v1;
1492static int hf_rtps_flag_multisubmessage;
1493static int hf_rtps_flag_endianness;
1494static int hf_rtps_flag_additional_authenticated_data;
1495static int hf_rtps_flag_protected_with_psk;
1496static int hf_rtps_flag_vendor_specific_content;
1497static int hf_rtps_flag_status_info;
1498static int hf_rtps_flag_data_present_v2;
1499static int hf_rtps_flag_inline_qos_v2;
1500static int hf_rtps_flag_final;
1501static int hf_rtps_flag_hash_key_rti;
1502static int hf_rtps_flag_liveliness;
1503static int hf_rtps_flag_multicast;
1504static int hf_rtps_flag_data_serialized_key;
1505static int hf_rtps_flag_data_frag_serialized_key;
1506static int hf_rtps_flag_timestamp;
1507static int hf_rtps_flag_no_virtual_guids;
1508static int hf_rtps_flag_multiple_writers;
1509static int hf_rtps_flag_multiple_virtual_guids;
1510static int hf_rtps_flag_serialize_key16;
1511static int hf_rtps_flag_invalid_sample;
1512static int hf_rtps_flag_data_present16;
1513static int hf_rtps_flag_offsetsn_present;
1514static int hf_rtps_flag_inline_qos16_v2;
1515static int hf_rtps_flag_timestamp_present;
1516static int hf_rtps_flag_unregistered;
1517static int hf_rtps_flag_disposed;
1518static int hf_rtps_param_status_info_flags;
1519
1520static int hf_rtps_flag_participant_announcer;
1521static int hf_rtps_flag_participant_detector;
1522static int hf_rtps_flag_publication_announcer;
1523static int hf_rtps_flag_publication_detector;
1524static int hf_rtps_flag_subscription_announcer;
1525static int hf_rtps_flag_subscription_detector;
1526static int hf_rtps_flag_participant_proxy_announcer;
1527static int hf_rtps_flag_participant_proxy_detector;
1528static int hf_rtps_flag_participant_state_announcer;
1529static int hf_rtps_flag_participant_state_detector;
1530static int hf_rtps_flag_participant_message_datawriter;
1531static int hf_rtps_flag_participant_message_datareader;
1532static int hf_rtps_flag_typelookup_request_datawriter;
1533static int hf_rtps_flag_typelookup_request_datareader;
1534static int hf_rtps_flag_typelookup_reply_datawriter;
1535static int hf_rtps_flag_typelookup_reply_datareader;
1536static int hf_rtps_flag_typelookup_request_secure_datawriter;
1537static int hf_rtps_flag_typelookup_request_secure_datareader;
1538static int hf_rtps_flag_typelookup_reply_secure_datawriter;
1539static int hf_rtps_flag_typelookup_reply_secure_datareader;
1540static int hf_rtps_flag_secure_publication_writer;
1541static int hf_rtps_flag_secure_publication_reader;
1542static int hf_rtps_flag_secure_subscription_writer;
1543static int hf_rtps_flag_secure_subscription_reader;
1544static int hf_rtps_flag_secure_participant_message_writer;
1545static int hf_rtps_flag_secure_participant_message_reader;
1546static int hf_rtps_flag_participant_stateless_message_writer;
1547static int hf_rtps_flag_participant_stateless_message_reader;
1548static int hf_rtps_flag_secure_participant_volatile_message_writer;
1549static int hf_rtps_flag_secure_participant_volatile_message_reader;
1550static int hf_rtps_flag_participant_secure_writer;
1551static int hf_rtps_flag_participant_secure_reader;
1552static int hf_rtps_flag_typeflag_final;
1553static int hf_rtps_flag_typeflag_mutable;
1554static int hf_rtps_flag_typeflag_nested;
1555static int hf_rtps_flag_memberflag_key;
1556static int hf_rtps_flag_memberflag_optional;
1557static int hf_rtps_flag_memberflag_shareable;
1558static int hf_rtps_flag_memberflag_union_default;
1559static int hf_rtps_flag_service_request_writer;
1560static int hf_rtps_flag_service_request_reader;
1561static int hf_rtps_flag_locator_ping_writer;
1562static int hf_rtps_flag_locator_ping_reader;
1563static int hf_rtps_flag_secure_service_request_writer;
1564static int hf_rtps_flag_cloud_discovery_service_announcer;
1565static int hf_rtps_flag_participant_config_writer;
1566static int hf_rtps_flag_participant_config_reader;
1567static int hf_rtps_flag_participant_config_secure_writer;
1568static int hf_rtps_flag_participant_config_secure_reader;
1569static int hf_rtps_flag_participant_bootstrap_writer;
1570static int hf_rtps_flag_participant_bootstrap_reader;
1571static int hf_rtps_flag_monitoring_periodic_writer;
1572static int hf_rtps_flag_monitoring_periodic_reader;
1573static int hf_rtps_flag_monitoring_event_writer;
1574static int hf_rtps_flag_monitoring_event_reader;
1575static int hf_rtps_flag_monitoring_logging_writer;
1576static int hf_rtps_flag_monitoring_logging_reader;
1577static int hf_rtps_flag_secure_service_request_reader;
1578static int hf_rtps_flag_security_access_protected;
1579static int hf_rtps_flag_security_discovery_protected;
1580static int hf_rtps_flag_security_submessage_protected;
1581static int hf_rtps_param_participant_security_symmetric_cipher_algorithms_builtin_endpoints_required_mask;
1582static int hf_rtps_param_participant_security_symmetric_cipher_algorithms_builtin_endpoints_key_exchange_used_bit;
1583static int hf_rtps_param_participant_security_symmetric_cipher_algorithms_supported_mask;
1584static int hf_rtps_param_participant_security_symmetric_cipher_algorithms_user_endpoints_default_required_mask;
1585static int hf_rtps_flag_security_supported;
1586static int hf_rtps_flag_security_required;
1587static int hf_rtps_flag_security_symmetric_cipher_mask_aes128_gcm;
1588static int hf_rtps_flag_security_symmetric_cipher_mask_aes256_gcm;
1589static int hf_rtps_flag_security_symmetric_cipher_mask_vendor_rti_aes192_gcm;
1590static int hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm01;
1591static int hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm02;
1592static int hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm03;
1593static int hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm04;
1594static int hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm05;
1595static int hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm06;
1596static int hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm07;
1597static int hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm08;
1598static int hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm09;
1599static int hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm10;
1600static int hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm11;
1601static int hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm12;
1602static int hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm13;
1603static int hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm14;
1604static int hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm15;
1605static int hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm16;
1606static int hf_rtps_param_compression_id_mask;
1607static int hf_rtps_flag_compression_id_zlib;
1608static int hf_rtps_flag_compression_id_bzip2;
1609static int hf_rtps_flag_compression_id_lz4;
1610static int hf_rtps_param_crypto_algorithm_requirements_trust_chain;
1611static int hf_rtps_param_crypto_algorithm_requirements_message_auth;
1612static int hf_rtps_flag_security_digital_signature_mask_rsassapssmgf1sha256_2048_sha256;
1613static int hf_rtps_flag_security_digital_signature_mask_rsassapkcs1v15_2048_sha256;
1614static int hf_rtps_flag_security_digital_signature_mask_ecdsa_p256_sha256;
1615static int hf_rtps_flag_security_digital_signature_mask_ecdsa_p384_sha384;
1616static int hf_rtps_flag_security_digital_signature_mask_ecdsa_ed25519_sha512;
1617static int hf_rtps_flag_security_digital_signature_mask_ecdsa_ed448_shake256;
1618static int hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm01;
1619static int hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm02;
1620static int hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm03;
1621static int hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm04;
1622static int hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm05;
1623static int hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm06;
1624static int hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm07;
1625static int hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm08;
1626static int hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm09;
1627static int hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm10;
1628static int hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm11;
1629static int hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm12;
1630static int hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm13;
1631static int hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm14;
1632static int hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm15;
1633static int hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm16;
1634static int hf_rtps_flag_security_key_establishment_mask_dhe_modp2048256;
1635static int hf_rtps_flag_security_key_establishment_mask_ecdheceum_p256;
1636static int hf_rtps_flag_security_key_establishment_mask_ecdheceum_p384;
1637static int hf_rtps_flag_security_key_establishment_mask_ecdheceum_x25519;
1638static int hf_rtps_flag_security_key_establishment_mask_ecdheceum_x448;
1639static int hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm01;
1640static int hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm02;
1641static int hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm03;
1642static int hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm04;
1643static int hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm05;
1644static int hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm06;
1645static int hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm07;
1646static int hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm08;
1647static int hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm09;
1648static int hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm10;
1649static int hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm11;
1650static int hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm12;
1651static int hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm13;
1652static int hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm14;
1653static int hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm15;
1654static int hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm16;
1655static int hf_rtps_flag_security_algorithm_compatibility_mode;
1656static int hf_rtps_flag_security_payload_protected;
1657static int hf_rtps_flag_endpoint_security_attribute_flag_is_read_protected;
1658static int hf_rtps_flag_endpoint_security_attribute_flag_is_write_protected;
1659static int hf_rtps_flag_endpoint_security_attribute_flag_is_discovery_protected;
1660static int hf_rtps_flag_endpoint_security_attribute_flag_is_submessage_protected;
1661static int hf_rtps_flag_endpoint_security_attribute_flag_is_payload_protected;
1662static int hf_rtps_flag_endpoint_security_attribute_flag_is_key_protected;
1663static int hf_rtps_flag_endpoint_security_attribute_flag_is_liveliness_protected;
1664static int hf_rtps_flag_endpoint_security_attribute_flag_is_valid;
1665static int hf_rtps_param_endpoint_security_attributes_mask;
1666static int hf_rtps_flag_plugin_endpoint_security_attribute_flag_is_payload_encrypted;
1667static int hf_rtps_flag_plugin_endpoint_security_attribute_flag_is_key_encrypted;
1668static int hf_rtps_flag_plugin_endpoint_security_attribute_flag_is_liveliness_encrypted;
1669static int hf_rtps_flag_plugin_endpoint_security_attribute_flag_is_valid;
1670static int hf_rtps_param_plugin_endpoint_security_attributes_mask;
1671static int hf_rtps_flag_participant_security_attribute_flag_key_psk_protected;
1672static int hf_rtps_flag_participant_security_attribute_flag_is_rtps_protected;
1673static int hf_rtps_flag_participant_security_attribute_flag_is_discovery_protected;
1674static int hf_rtps_flag_participant_security_attribute_flag_is_liveliness_protected;
1675static int hf_rtps_flag_participant_security_attribute_flag_key_revisions_enabled;
1676static int hf_rtps_flag_participant_security_attribute_flag_is_valid;
1677static int hf_rtps_param_participant_security_attributes_mask;
1678static int hf_rtps_flag_plugin_participant_security_attribute_flag_is_psk_encrypted;
1679static int hf_rtps_flag_plugin_participant_security_attribute_flag_is_rtps_encrypted;
1680static int hf_rtps_flag_plugin_participant_security_attribute_flag_is_discovery_encrypted;
1681static int hf_rtps_flag_plugin_participant_security_attribute_flag_is_liveliness_encrypted;
1682static int hf_rtps_flag_plugin_participant_security_attribute_flag_is_rtps_origin_encrypted;
1683static int hf_rtps_flag_plugin_participant_security_attribute_flag_is_discovery_origin_encrypted;
1684static int hf_rtps_flag_plugin_participant_security_attribute_flag_is_liveliness_origin_encrypted;
1685static int hf_rtps_flag_plugin_participant_security_attribute_flag_is_valid;
1686static int hf_rtps_param_plugin_participant_security_attributes_mask;
1687static int hf_rtps_sm_rti_crc_number;
1688static int hf_rtps_sm_rti_crc_result;
1689static int hf_rtps_data_tag_name;
1690static int hf_rtps_data_tag_value;
1691static int hf_rtps_flag_udpv4_wan_locator_u;
1692static int hf_rtps_flag_udpv4_wan_locator_p;
1693static int hf_rtps_flag_udpv4_wan_locator_b;
1694static int hf_rtps_flag_udpv4_wan_locator_r;
1695static int hf_rtps_flag_udpv4_wan_binding_ping_e;
1696static int hf_rtps_flag_udpv4_wan_binding_ping_l;
1697static int hf_rtps_flag_udpv4_wan_binding_ping_b;
1698static int hf_rtps_header_extension_flags;
1699static int hf_rtps_flag_header_extension_message_length;
1700static int hf_rtps_flag_header_extension_uextension;
1701static int hf_rtps_flag_header_extension_wextension;
1702static int hf_rtps_flag_header_extension_checksum1;
1703static int hf_rtps_flag_header_extension_checksum2;
1704static int hf_rtps_flag_header_extension_parameters;
1705static int hf_rtps_flag_header_extension_timestamp;
1706
1707static int hf_rtps_fragments;
1708static int hf_rtps_fragment;
1709static int hf_rtps_fragment_overlap;
1710static int hf_rtps_fragment_overlap_conflict;
1711static int hf_rtps_fragment_multiple_tails;
1712static int hf_rtps_fragment_too_long_fragment;
1713static int hf_rtps_fragment_error;
1714static int hf_rtps_fragment_count;
1715static int hf_rtps_reassembled_in;
1716static int hf_rtps_reassembled_length;
1717static int hf_rtps_reassembled_data;
1718static int hf_rtps_encapsulation_extended_compression_options;
1719static int hf_rtps_message_length;
1720static int hf_rtps_header_extension_checksum_crc32c;
1721static int hf_rtps_header_extension_checksum_crc64;
1722static int hf_rtps_header_extension_checksum_md5;
1723static int hf_rtps_uextension;
1724static int hf_rtps_wextension;
1725static int hf_rtps_writer_group_oid;
1726static int hf_rtps_reader_group_oid;
1727static int hf_rtps_writer_session_id;
1728
1729/* Subtree identifiers */
1730static int ett_rtps_dissection_tree;
1731static int ett_rtps;
1732static int ett_rtps_default_mapping;
1733static int ett_rtps_proto_version;
1734static int ett_rtps_submessage;
1735static int ett_rtps_parameter_sequence;
1736static int ett_rtps_parameter;
1737static int ett_rtps_flags;
1738static int ett_rtps_entity;
1739static int ett_rtps_generic_guid;
1740static int ett_rtps_rdentity;
1741static int ett_rtps_wrentity;
1742static int ett_rtps_guid_prefix;
1743static int ett_rtps_app_id;
1744static int ett_rtps_locator_udp_v4;
1745static int ett_rtps_locator;
1746static int ett_rtps_locator_list;
1747static int ett_rtps_timestamp;
1748static int ett_rtps_bitmap;
1749static int ett_rtps_seq_string;
1750static int ett_rtps_seq_ulong;
1751static int ett_rtps_resource_limit;
1752static int ett_rtps_durability_service;
1753static int ett_rtps_liveliness;
1754static int ett_rtps_manager_key;
1755static int ett_rtps_serialized_data;
1756static int ett_rtps_locator_filter_channel;
1757static int ett_rtps_part_message_data;
1758static int ett_rtps_sample_info_list;
1759static int ett_rtps_sample_info;
1760static int ett_rtps_sample_batch_list;
1761static int ett_rtps_locator_filter_locator;
1762static int ett_rtps_writer_heartbeat_virtual_list;
1763static int ett_rtps_writer_heartbeat_virtual;
1764static int ett_rtps_virtual_guid_heartbeat_virtual_list;
1765static int ett_rtps_virtual_guid_heartbeat_virtual;
1766static int ett_rtps_app_ack_virtual_writer_interval_list;
1767static int ett_rtps_app_ack_virtual_writer_interval;
1768static int ett_rtps_transport_info;
1769static int ett_rtps_app_ack_virtual_writer_list;
1770static int ett_rtps_app_ack_virtual_writer;
1771static int ett_rtps_product_version;
1772static int ett_rtps_property_list;
1773static int ett_rtps_property;
1774static int ett_rtps_topic_info;
1775static int ett_rtps_topic_info_dw_qos;
1776static int ett_rtps_type_bound_seq;
1777static int ett_rtps_type_dep;
1778static int ett_rtps_type_id;
1779static int ett_rtps_type_object_v2;
1780static int ett_rtps_type_object_v2_complete_type_detail;
1781static int ett_rtps_type_object_v2_alias;
1782static int ett_rtps_type_object_v2_alias_body;
1783static int ett_rtps_type_object_v2_struct;
1784static int ett_rtps_type_object_v2_struct_header;
1785static int ett_rtps_type_object_v2_member_seq;
1786static int ett_rtps_type_object_v2_member;
1787static int ett_rtps_type_object_v2_union;
1788static int ett_rtps_type_object_v2_union_header;
1789static int ett_rtps_type_object_v2_union_discriminator;
1790static int ett_rtps_type_object_v2_union_label_seq;
1791static int ett_rtps_type_object_v2_enum;
1792static int ett_rtps_type_object_v2_enum_header;
1793static int ett_rtps_type_object_v2_enum_literal;
1794static int ett_rtps_type_deps_seq;
1795static int ett_rtps_type_id_w_deps;
1796static int ett_rtps_type_id_w_size;
1797static int ett_rtps_type_information;
1798static int ett_rtps_type_lookup_request;
1799static int ett_rtps_type_lookup_reply;
1800static int ett_rtps_type_lookup_request_id;
1801static int ett_rtps_type_lookup_request_header;
1802static int ett_rtps_type_lookup_request_data;
1803static int ett_rtps_type_lookup_reply_header;
1804static int ett_rtps_type_lookup_reply_data;
1805static int ett_rtps_type_lookup_deps_seq;
1806static int ett_rtps_instance_name;
1807static int ett_rtps_type_information_minimal;
1808static int ett_rtps_type_information_complete;
1809static int ett_rtps_type_object;
1810static int ett_rtps_type_library;
1811static int ett_rtps_type_element;
1812static int ett_rtps_type_annotation_usage_list;
1813static int ett_rtps_type_enum_constant;
1814static int ett_rtps_type_bound_list;
1815static int ett_rtps_secure_payload_tree;
1816static int ett_rtps_secure_dataheader_tree;
1817static int ett_rtps_secure_transformation_kind;
1818static int ett_rtps_pgm_data;
1819static int ett_rtps_message_identity;
1820static int ett_rtps_related_message_identity;
1821static int ett_rtps_data_holder_seq;
1822static int ett_rtps_data_holder;
1823static int ett_rtps_data_holder_properties;
1824static int ett_rtps_property_tree;
1825static int ett_rtps_param_header_tree;
1826static int ett_rtps_service_request_tree;
1827static int ett_rtps_locator_ping_tree;
1828static int ett_rtps_locator_reachability_tree;
1829static int ett_rtps_custom_dissection_info;
1830static int ett_rtps_locator_list_tree;
1831static int ett_rtps_topic_query_tree;
1832static int ett_rtps_topic_query_selection_tree;
1833static int ett_rtps_topic_query_filter_params_tree;
1834static int ett_rtps_data_member;
1835static int ett_rtps_data_tag_seq;
1836static int ett_rtps_data_tag_item;
1837static int ett_rtps_fragment;
1838static int ett_rtps_fragments;
1839static int ett_rtps_data_representation;
1840static int ett_rtps_decompressed_type_object;
1841static int ett_rtps_info_remaining_items;
1842static int ett_rtps_data_encapsulation_options;
1843static int ett_rtps_decompressed_serialized_data;
1844static int ett_rtps_instance_transition_data;
1845static int ett_rtps_crypto_algorithm_requirements;
1846static int ett_rtps_decrypted_payload;
1847static int ett_rtps_secure_postfix_tag_list_item;
1848
1849static expert_field ei_rtps_sm_octets_to_next_header_error;
1850static expert_field ei_rtps_checksum_check_error;
1851static expert_field ei_rtps_port_invalid;
1852static expert_field ei_rtps_ip_invalid;
1853static expert_field ei_rtps_parameter_value_invalid;
1854static expert_field ei_rtps_extra_bytes;
1855static expert_field ei_rtps_missing_bytes;
1856static expert_field ei_rtps_locator_port;
1857static expert_field ei_rtps_more_samples_available;
1858static expert_field ei_rtps_parameter_not_decoded;
1859static expert_field ei_rtps_sm_octets_to_next_header_not_zero;
1860static expert_field ei_rtps_pid_type_csonsistency_invalid_size;
1861static expert_field ei_rtps_uncompression_error;
1862static expert_field ei_rtps_value_too_large;
1863static expert_field ei_rtps_invalid_psk;
1864static expert_field ei_rtps_invalid_fragment_size;
1865
1866/***************************************************************************/
1867/* Value-to-String Tables */
1868static const value_string vendor_vals[] = {
1869 { RTPS_VENDOR_UNKNOWN(0x0000), RTPS_VENDOR_UNKNOWN_STRING"VENDOR_ID_UNKNOWN (0x0000)"},
1870 { RTPS_VENDOR_RTI_DDS(0x0101), RTPS_VENDOR_RTI_DDS_STRING"Real-Time Innovations, Inc. - Connext DDS"},
1871 { RTPS_VENDOR_ADL_DDS(0x0102), RTPS_VENDOR_ADL_DDS_STRING"ADLink Ltd. - OpenSplice DDS"},
1872 { RTPS_VENDOR_OCI(0x0103), RTPS_VENDOR_OCI_STRING"Object Computing, Inc. (OCI) - OpenDDS"},
1873 { RTPS_VENDOR_MILSOFT(0x0104), RTPS_VENDOR_MILSOFT_STRING"MilSoft"},
1874 { RTPS_VENDOR_KONGSBERG(0x0105), RTPS_VENDOR_KONGSBERG_STRING"Kongsberg - InterCOM DDS"},
1875 { RTPS_VENDOR_TOC(0x0106), RTPS_VENDOR_TOC_STRING"TwinOaks Computing, Inc. - CoreDX DDS"},
1876 { RTPS_VENDOR_LAKOTA_TSI(0x0107), RTPS_VENDOR_LAKOTA_TSI_STRING"Lakota Technical Solutions, Inc."},
1877 { RTPS_VENDOR_ICOUP(0x0108), RTPS_VENDOR_ICOUP_STRING"ICOUP Consulting"},
1878 { RTPS_VENDOR_ETRI(0x0109), RTPS_VENDOR_ETRI_STRING"Electronics and Telecommunication Research Institute (ETRI) - Diamond DDS"},
1879 { RTPS_VENDOR_RTI_DDS_MICRO(0x010A), RTPS_VENDOR_RTI_DDS_MICRO_STRING"Real-Time Innovations, Inc. (RTI) - Connext DDS Micro"},
1880 { RTPS_VENDOR_ADL_CAFE(0x010B), RTPS_VENDOR_ADL_CAFE_STRING"ADLink Ltd. - Vortex Cafe"},
1881 { RTPS_VENDOR_PT(0x010C), RTPS_VENDOR_PT_STRING"PrismTech"},
1882 { RTPS_VENDOR_ADL_LITE(0x010D), RTPS_VENDOR_ADL_LITE_STRING"ADLink Ltd. - Vortex Lite"},
1883 { RTPS_VENDOR_TECHNICOLOR(0x010E), RTPS_VENDOR_TECHNICOLOR_STRING"Technicolor Inc. - Qeo"},
1884 { RTPS_VENDOR_EPROSIMA(0x010F), RTPS_VENDOR_EPROSIMA_STRING"eProsima - Fast-RTPS"},
1885 { RTPS_VENDOR_ECLIPSE(0x0110), RTPS_VENDOR_ECLIPSE_STRING"Eclipse Foundation - Cyclone DDS"},
1886 { RTPS_VENDOR_GURUM(0x0111), RTPS_VENDOR_GURUM_STRING"GurumNetworks Ltd. - GurumDDS"},
1887 { RTPS_VENDOR_RUST(0x0112), RTPS_VENDOR_RUST_STRING"Atostek - RustDDS"},
1888 { RTPS_VENDOR_ZRDDS(0x0113), RTPS_VENDOR_ZRDDS_STRING"Nanjing Zhenrong Software Technology Co. - ZRDDS"},
1889 { RTPS_VENDOR_DUST(0x0114), RTPS_VENDOR_DUST_STRING"S2E Software Systems B.V. - Dust DDS"},
1890 { 0, NULL((void*)0) }
1891};
1892
1893static const value_string entity_id_vals[] = {
1894 { ENTITYID_UNKNOWN(0x00000000), "ENTITYID_UNKNOWN" },
1895 { ENTITYID_PARTICIPANT(0x000001c1), "ENTITYID_PARTICIPANT" },
1896 { ENTITYID_BUILTIN_TOPIC_WRITER(0x000002c2), "ENTITYID_BUILTIN_TOPIC_WRITER" },
1897 { ENTITYID_BUILTIN_TOPIC_READER(0x000002c7), "ENTITYID_BUILTIN_TOPIC_READER" },
1898 { ENTITYID_BUILTIN_PUBLICATIONS_WRITER(0x000003c2), "ENTITYID_BUILTIN_PUBLICATIONS_WRITER" },
1899 { ENTITYID_BUILTIN_PUBLICATIONS_READER(0x000003c7), "ENTITYID_BUILTIN_PUBLICATIONS_READER" },
1900 { ENTITYID_BUILTIN_SUBSCRIPTIONS_WRITER(0x000004c2), "ENTITYID_BUILTIN_SUBSCRIPTIONS_WRITER" },
1901 { ENTITYID_BUILTIN_SUBSCRIPTIONS_READER(0x000004c7), "ENTITYID_BUILTIN_SUBSCRIPTIONS_READER" },
1902 { ENTITYID_BUILTIN_PARTICIPANT_WRITER(0x000100c2), "ENTITYID_BUILTIN_PARTICIPANT_WRITER" },
1903 { ENTITYID_BUILTIN_PARTICIPANT_READER(0x000100c7), "ENTITYID_BUILTIN_PARTICIPANT_READER" },
1904 { ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_WRITER(0x000200c2), "ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_WRITER" },
1905 { ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_READER(0x000200c7), "ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_READER" },
1906 { ENTITYID_TL_SVC_REQ_WRITER(0x000300c3), "ENTITYID_TL_SVC_REQ_WRITER" },
1907 { ENTITYID_TL_SVC_REQ_READER(0x000300c4), "ENTITYID_TL_SVC_REQ_READER" },
1908 { ENTITYID_TL_SVC_REPLY_WRITER(0x000301c3), "ENTITYID_TL_SVC_REPLY_WRITER" },
1909 { ENTITYID_TL_SVC_REPLY_READER(0x000301c4), "ENTITYID_TL_SVC_REPLY_READER" },
1910 { ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_WRITER(0xff0003c2), "ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_WRITER" },
1911 { ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_READER(0xff0003c7), "ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_READER" },
1912 { ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_WRITER(0xff0004c2), "ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_WRITER" },
1913 { ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_READER(0xff0004c7), "ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_READER" },
1914 { ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_SECURE_WRITER(0xff0200c2), "ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_SECURE_WRITER" },
1915 { ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_SECURE_READER(0xff0200c7), "ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_SECURE_READER" },
1916 { ENTITYID_P2P_BUILTIN_PARTICIPANT_STATELESS_WRITER(0x000201c3), "ENTITYID_P2P_BUILTIN_PARTICIPANT_STATELESS_WRITER" },
1917 { ENTITYID_P2P_BUILTIN_PARTICIPANT_STATELESS_READER(0x000201c4), "ENTITYID_P2P_BUILTIN_PARTICIPANT_STATELESS_READER" },
1918 { ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_WRITER(0xff0202c3), "ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_WRITER" },
1919 { ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_READER(0xff0202c4), "ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_READER" },
1920 { ENTITYID_SPDP_RELIABLE_BUILTIN_PARTICIPANT_SECURE_WRITER(0xff0101c2), "ENTITYID_SPDP_RELIABLE_BUILTIN_PARTICIPANT_SECURE_WRITER"},
1921 { ENTITYID_SPDP_RELIABLE_BUILTIN_PARTICIPANT_SECURE_READER(0xff0101c7), "ENTITYID_SPDP_RELIABLE_BUILTIN_PARTICIPANT_SECURE_READER"},
1922
1923 /* vendor specific - RTI */
1924 { ENTITYID_RTI_BUILTIN_LOCATOR_PING_WRITER(0x00020182), "ENTITYID_RTI_BUILTIN_LOCATOR_PING_WRITER" },
1925 { ENTITYID_RTI_BUILTIN_LOCATOR_PING_READER(0x00020187), "ENTITYID_RTI_BUILTIN_LOCATOR_PING_READER" },
1926 { ENTITYID_RTI_BUILTIN_SERVICE_REQUEST_WRITER(0x00020082), "ENTITYID_RTI_BUILTIN_SERVICE_REQUEST_WRITER" },
1927 { ENTITYID_RTI_BUILTIN_SERVICE_REQUEST_READER(0x00020087), "ENTITYID_RTI_BUILTIN_SERVICE_REQUEST_READER" },
1928 { ENTITYID_RTI_BUILTIN_PARTICIPANT_BOOTSTRAP_WRITER(0x00010082), "ENTITYID_RTI_BUILTIN_PARTICIPANT_BOOTSTRAP_WRITER" },
1929 { ENTITYID_RTI_BUILTIN_PARTICIPANT_BOOTSTRAP_READER(0x00010087), "ENTITYID_RTI_BUILTIN_PARTICIPANT_BOOTSTRAP_READER" },
1930 { ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_WRITER(0x00010182), "ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_WRITER" },
1931 { ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_READER(0x00010187), "ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_READER" },
1932 { ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_WRITER(0xff010182), "ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_WRITER"},
1933 { ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_READER(0xff010187), "ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_READER"},
1934
1935 /* Deprecated Items */
1936 { ENTITYID_APPLICATIONS_WRITER(0x000001c2), "writerApplications [DEPRECATED]" },
1937 { ENTITYID_APPLICATIONS_READER(0x000001c7), "readerApplications [DEPRECATED]" },
1938 { ENTITYID_CLIENTS_WRITER(0x000005c2), "writerClients [DEPRECATED]" },
1939 { ENTITYID_CLIENTS_READER(0x000005c7), "readerClients [DEPRECATED]" },
1940 { ENTITYID_SERVICES_WRITER(0x000006c2), "writerServices [DEPRECATED]" },
1941 { ENTITYID_SERVICES_READER(0x000006c7), "readerServices [DEPRECATED]" },
1942 { ENTITYID_MANAGERS_WRITER(0x000007c2), "writerManagers [DEPRECATED]" },
1943 { ENTITYID_MANAGERS_READER(0x000007c7), "readerManagers [DEPRECATED]" },
1944 { ENTITYID_APPLICATION_SELF(0x000008c1), "applicationSelf [DEPRECATED]" },
1945 { ENTITYID_APPLICATION_SELF_WRITER(0x000008c2), "writerApplicationSelf [DEPRECATED]" },
1946 { ENTITYID_APPLICATION_SELF_READER(0x000008c7), "readerApplicationSelf [DEPRECATED]" },
1947 { 0, NULL((void*)0) }
1948};
1949
1950static const value_string entity_kind_vals [] = {
1951 { ENTITYKIND_APPDEF_UNKNOWN(0x00), "Application-defined unknown kind" },
1952 { ENTITYKIND_APPDEF_PARTICIPANT(0x01), "Application-defined participant" },
1953 { ENTITYKIND_APPDEF_WRITER_WITH_KEY(0x02), "Application-defined writer (with key)" },
1954 { ENTITYKIND_APPDEF_WRITER_NO_KEY(0x03), "Application-defined writer (no key)" },
1955 { ENTITYKIND_APPDEF_READER_WITH_KEY(0x07), "Application-defined reader (with key)" },
1956 { ENTITYKIND_APPDEF_READER_NO_KEY(0x04), "Application-defined reader (no key)" },
1957 { ENTITYKIND_BUILTIN_PARTICIPANT(0xc1), "Built-in participant" },
1958 { ENTITYKIND_BUILTIN_WRITER_WITH_KEY(0xc2), "Built-in writer (with key)" },
1959 { ENTITYKIND_BUILTIN_WRITER_NO_KEY(0xc3), "Built-in writer (no key)" },
1960 { ENTITYKIND_BUILTIN_READER_WITH_KEY(0xc7), "Built-in reader (with key)" },
1961 { ENTITYKIND_BUILTIN_READER_NO_KEY(0xc4), "Built-in reader (no key)" },
1962 { ENTITYKIND_RTI_BUILTIN_WRITER_WITH_KEY(0x82), "RTI Built-in writer (with key)" },
1963 { ENTITYKIND_RTI_BUILTIN_WRITER_NO_KEY(0x83), "RTI Built-in writer (no key)" },
1964 { ENTITYKIND_RTI_BUILTIN_READER_WITH_KEY(0x87), "RTI Built-in reader (with key)" },
1965 { ENTITYKIND_RTI_BUILTIN_READER_NO_KEY(0x84), "RTI Built-in reader (no key)" },
1966 { ENTITYID_OBJECT_NORMAL_META_WRITER_GROUP(0x88), "Object normal meta writer group" },
1967 { ENTITYID_OBJECT_NORMAL_META_READER_GROUP(0x89), "Object normal meta reader group" },
1968 { ENTITYID_OBJECT_NORMAL_META_TOPIC(0x8a), "Object normal meta topic" },
1969
1970 { ENTITYID_RESERVED_META_CST_GROUP_WRITER(0xcb), "Reserved meta CST group writer" },
1971 { ENTITYID_RESERVED_META_GROUP_WRITER(0xcc), "Reserved meta group writer" },
1972 { ENTITYID_RESERVED_META_GROUP_READER(0xcd), "Reserved meta group reader" },
1973 { ENTITYID_RESERVED_META_CST_GROUP_READER(0xce), "Reserved meta CST group reader" },
1974 { ENTITYID_NORMAL_META_CST_GROUP_WRITER(0x8b), "Normal meta CST group writer" },
1975 { ENTITYID_NORMAL_META_GROUP_WRITER(0x8c), "Normal meta group writer" },
1976 { ENTITYID_NORMAL_META_GROUP_READER(0x8d), "Normal meta group reader" },
1977 { ENTITYID_NORMAL_META_CST_GROUP_READER(0x8e), "Normal meta CST group reader" },
1978 { ENTITYID_RESERVED_USER_CST_GROUP_WRITER(0x4b), "Reserved user CST group writer" },
1979 { ENTITYID_RESERVED_USER_GROUP_WRITER(0x4c), "Reserved user group writer" },
1980 { ENTITYID_RESERVED_USER_GROUP_READER(0x4d), "Reserved user group reader" },
1981 { ENTITYID_RESERVED_USER_CST_GROUP_READER(0x4e), "Reserved user CST group reader" },
1982 { ENTITYID_NORMAL_USER_CST_GROUP_WRITER(0x0b), "Normal user CST group writer" },
1983 { ENTITYID_NORMAL_USER_GROUP_WRITER(0x0c), "Normal user writer" },
1984 { ENTITYID_NORMAL_USER_GROUP_READER(0x0d), "Normal user reader" },
1985 { ENTITYID_NORMAL_USER_CST_GROUP_READER(0x0e), "Normal user CST group reader" },
1986 { 0, NULL((void*)0) }
1987};
1988
1989
1990static const value_string nature_type_vals[] = {
1991 { PORT_METATRAFFIC_UNICAST(0), "UNICAST_METATRAFFIC"},
1992 { PORT_METATRAFFIC_MULTICAST(2), "MULTICAST_METATRAFFIC"},
1993 { PORT_USERTRAFFIC_UNICAST(3), "UNICAST_USERTRAFFIC"},
1994 { PORT_USERTRAFFIC_MULTICAST(1), "MULTICAST_USERTRAFFIC"},
1995 { 0, NULL((void*)0) }
1996};
1997
1998
1999static const value_string app_kind_vals[] = {
2000 { APPKIND_UNKNOWN(0x00), "APPKIND_UNKNOWN" },
2001 { APPKIND_MANAGED_APPLICATION(0x01), "ManagedApplication" },
2002 { APPKIND_MANAGER(0x02), "Manager" },
2003 { 0, NULL((void*)0) }
2004};
2005
2006static const value_string rtps_locator_kind_vals[] = {
2007 { LOCATOR_KIND_UDPV4(1), "LOCATOR_KIND_UDPV4" },
2008 { LOCATOR_KIND_UDPV6(2), "LOCATOR_KIND_UDPV6" },
2009 { LOCATOR_KIND_INVALID(-1), "LOCATOR_KIND_INVALID" },
2010 { LOCATOR_KIND_DTLS(6), "LOCATOR_KIND_DTLS" },
2011 { LOCATOR_KIND_TCPV4_LAN(8), "LOCATOR_KIND_TCPV4_LAN" },
2012 { LOCATOR_KIND_TCPV4_WAN(9), "LOCATOR_KIND_TCPV4_WAN" },
2013 { LOCATOR_KIND_TLSV4_LAN(10), "LOCATOR_KIND_TLSV4_LAN" },
2014 { LOCATOR_KIND_TLSV4_WAN(11), "LOCATOR_KIND_TLSV4_WAN" },
2015 { LOCATOR_KIND_SHMEM(0x01000000), "LOCATOR_KIND_SHMEM" },
2016 { LOCATOR_KIND_TUDPV4(0x01001001), "LOCATOR_KIND_TUDPV4" },
2017 { LOCATOR_KIND_RESERVED(0), "LOCATOR_KIND_RESERVED" },
2018 { LOCATOR_KIND_UDPV4_WAN(0x01000001), "LOCATOR_KIND_UDPV4_WAN" },
2019 { 0, NULL((void*)0) }
2020};
2021
2022static const value_string submessage_id_vals[] = {
2023 { SUBMESSAGE_PAD(0x01), "PAD" },
2024 { SUBMESSAGE_DATA(0x02), "DATA" },
2025 { SUBMESSAGE_NOKEY_DATA(0x03), "NOKEY_DATA" },
2026 { SUBMESSAGE_ACKNACK(0x06), "ACKNACK" },
2027 { SUBMESSAGE_HEARTBEAT(0x07), "HEARTBEAT" },
2028 { SUBMESSAGE_GAP(0x08), "GAP" },
2029 { SUBMESSAGE_INFO_TS(0x09), "INFO_TS" },
2030 { SUBMESSAGE_INFO_SRC(0x0c), "INFO_SRC" },
2031 { SUBMESSAGE_INFO_REPLY_IP4(0x0d), "INFO_REPLY_IP4" },
2032 { SUBMESSAGE_INFO_DST(0x0e), "INFO_DST" },
2033 { SUBMESSAGE_INFO_REPLY(0x0f), "INFO_REPLY" },
2034 { 0, NULL((void*)0) }
2035};
2036
2037static const value_string submessage_id_valsv2[] = {
2038 { SUBMESSAGE_HEADER_EXTENSION(0x0), "HEADER_EXTENSION" },
2039 { SUBMESSAGE_PAD(0x01), "PAD" },
2040 { SUBMESSAGE_RTPS_DATA(0x15), "DATA" },
2041 { SUBMESSAGE_RTPS_DATA_FRAG(0x16), "DATA_FRAG" },
2042 { SUBMESSAGE_RTI_DATA_FRAG_SESSION(0x81), "DATA_FRAG_SESSION" },
2043 { SUBMESSAGE_RTPS_DATA_BATCH(0x18), "DATA_BATCH" },
2044 { SUBMESSAGE_ACKNACK(0x06), "ACKNACK" },
2045 { SUBMESSAGE_HEARTBEAT(0x07), "HEARTBEAT" },
2046 { SUBMESSAGE_GAP(0x08), "GAP" },
2047 { SUBMESSAGE_INFO_TS(0x09), "INFO_TS" },
2048 { SUBMESSAGE_INFO_SRC(0x0c), "INFO_SRC" },
2049 { SUBMESSAGE_INFO_REPLY_IP4(0x0d), "INFO_REPLY_IP4" },
2050 { SUBMESSAGE_INFO_DST(0x0e), "INFO_DST" },
2051 { SUBMESSAGE_INFO_REPLY(0x0f), "INFO_REPLY" },
2052 { SUBMESSAGE_NACK_FRAG(0x12), "NACK_FRAG" },
2053 { SUBMESSAGE_HEARTBEAT_FRAG(0x13), "HEARTBEAT_FRAG" },
2054 { SUBMESSAGE_ACKNACK_BATCH(0x17), "ACKNACK_BATCH" },
2055 { SUBMESSAGE_HEARTBEAT_BATCH(0x19), "HEARTBEAT_BATCH" },
2056 { SUBMESSAGE_ACKNACK_SESSION(0x1a), "ACKNACK_SESSION" },
2057 { SUBMESSAGE_HEARTBEAT_SESSION(0x1b), "HEARTBEAT_SESSION" },
2058 { SUBMESSAGE_RTPS_DATA_SESSION(0x14), "DATA_SESSION" },
2059 { SUBMESSAGE_APP_ACK(0x1c), "APP_ACK" },
2060 { SUBMESSAGE_APP_ACK_CONF(0x1d), "APP_ACK_CONF" },
2061 { SUBMESSAGE_HEARTBEAT_VIRTUAL(0x1e), "HEARTBEAT_VIRTUAL" },
2062 { SUBMESSAGE_SEC_BODY(0x30), "SEC_BODY" },
2063 { SUBMESSAGE_SEC_PREFIX(0x31), "SEC_PREFIX" },
2064 { SUBMESSAGE_SEC_POSTFIX(0x32), "SEC_POSTFIX" },
2065 { SUBMESSAGE_SRTPS_PREFIX(0x33), "SRTPS_PREFIX" },
2066 { SUBMESSAGE_SRTPS_POSTFIX(0x34), "SRTPS_POSTFIX" },
2067 /* Deprecated submessages */
2068 { SUBMESSAGE_DATA(0x02), "DATA_deprecated" },
2069 { SUBMESSAGE_NOKEY_DATA(0x03), "NOKEY_DATA_deprecated" },
2070 { SUBMESSAGE_DATA_FRAG(0x10), "DATA_FRAG_deprecated" },
2071 { SUBMESSAGE_NOKEY_DATA_FRAG(0x11), "NOKEY_DATA_FRAG_deprecated" },
2072 { 0, NULL((void*)0) }
2073};
2074
2075static const value_string submessage_id_rti[] = {
2076 { SUBMESSAGE_RTI_CRC(0x80), "RTI_CRC" },
2077 { SUBMESSAGE_RTI_UDP_WAN_BINDING_PING(0x82), "RTI_BINDING_PING" },
2078 { SUBMESSAGE_RTI_DATA_FRAG_SESSION(0x81), "DATA_FRAG_SESSION" },
2079 { 0, NULL((void*)0) }
2080};
2081
2082#if 0
2083static const value_string typecode_kind_vals[] = {
2084 { RTI_CDR_TK_NULL, "(unknown)" },
2085 { RTI_CDR_TK_SHORT, "short" },
2086 { RTI_CDR_TK_LONG, "long" },
2087 { RTI_CDR_TK_USHORT, "unsigned short" },
2088 { RTI_CDR_TK_ULONG, "unsigned long" },
2089 { RTI_CDR_TK_FLOAT, "float" },
2090 { RTI_CDR_TK_DOUBLE, "double" },
2091 { RTI_CDR_TK_BOOLEAN, "boolean" },
2092 { RTI_CDR_TK_CHAR, "char" },
2093 { RTI_CDR_TK_OCTET, "octet" },
2094 { RTI_CDR_TK_STRUCT, "struct" },
2095 { RTI_CDR_TK_UNION, "union" },
2096 { RTI_CDR_TK_ENUM, "enum" },
2097 { RTI_CDR_TK_STRING, "string" },
2098 { RTI_CDR_TK_SEQUENCE, "sequence" },
2099 { RTI_CDR_TK_ARRAY, "array" },
2100 { RTI_CDR_TK_ALIAS, "alias" },
2101 { RTI_CDR_TK_LONGLONG, "long long" },
2102 { RTI_CDR_TK_ULONGLONG, "unsigned long long" },
2103 { RTI_CDR_TK_LONGDOUBLE, "long double" },
2104 { RTI_CDR_TK_WCHAR, "wchar" },
2105 { RTI_CDR_TK_WSTRING, "wstring" },
2106 { 0, NULL((void*)0) }
2107};
2108#endif
2109
2110static const value_string parameter_id_vals[] = {
2111 { PID_PAD(0x00), "PID_PAD" },
2112 { PID_SENTINEL(0x01), "PID_SENTINEL" },
2113 { PID_USER_DATA(0x2c), "PID_USER_DATA" },
2114 { PID_TOPIC_NAME(0x05), "PID_TOPIC_NAME" },
2115 { PID_TYPE_NAME(0x07), "PID_TYPE_NAME" },
2116 { PID_GROUP_DATA(0x2d), "PID_GROUP_DATA" },
2117 { PID_DEADLINE(0x23), "PID_DEADLINE" },
2118 { PID_DEADLINE_OFFERED(0x24), "PID_DEADLINE_OFFERED [deprecated]" },
2119 { PID_PARTICIPANT_LEASE_DURATION(0x02), "PID_PARTICIPANT_LEASE_DURATION" },
2120 { PID_PERSISTENCE(0x03), "PID_PERSISTENCE" },
2121 { PID_TIME_BASED_FILTER(0x04), "PID_TIME_BASED_FILTER" },
2122 { PID_OWNERSHIP_STRENGTH(0x06), "PID_OWNERSHIP_STRENGTH" },
2123 { PID_TYPE_CHECKSUM(0x08), "PID_TYPE_CHECKSUM [deprecated]" },
2124 { PID_TYPE2_NAME(0x09), "PID_TYPE2_NAME [deprecated]" },
2125 { PID_TYPE2_CHECKSUM(0x0a), "PID_TYPE2_CHECKSUM [deprecated]" },
2126 { PID_METATRAFFIC_MULTICAST_IPADDRESS(0x0b),"PID_METATRAFFIC_MULTICAST_IPADDRESS"},
2127 { PID_DEFAULT_UNICAST_IPADDRESS(0x0c), "PID_DEFAULT_UNICAST_IPADDRESS" },
2128 { PID_METATRAFFIC_UNICAST_PORT(0x0d), "PID_METATRAFFIC_UNICAST_PORT" },
2129 { PID_DEFAULT_UNICAST_PORT(0x0e), "PID_DEFAULT_UNICAST_PORT" },
2130 { PID_EXPECTS_ACK(0x10), "PID_EXPECTS_ACK" },
2131 { PID_MULTICAST_IPADDRESS(0x11), "PID_MULTICAST_IPADDRESS" },
2132 { PID_MANAGER_KEY(0x12), "PID_MANAGER_KEY [deprecated]" },
2133 { PID_SEND_QUEUE_SIZE(0x13), "PID_SEND_QUEUE_SIZE" },
2134 { PID_RELIABILITY_ENABLED(0x14), "PID_RELIABILITY_ENABLED" },
2135 { PID_PROTOCOL_VERSION(0x15), "PID_PROTOCOL_VERSION" },
2136 { PID_VENDOR_ID(0x16), "PID_VENDOR_ID" },
2137 { PID_VARGAPPS_SEQUENCE_NUMBER_LAST(0x17), "PID_VARGAPPS_SEQUENCE_NUMBER_LAST [deprecated]" },
2138 { PID_RECV_QUEUE_SIZE(0x18), "PID_RECV_QUEUE_SIZE [deprecated]" },
2139 { PID_RELIABILITY_OFFERED(0x19), "PID_RELIABILITY_OFFERED [deprecated]" },
2140 { PID_RELIABILITY(0x1a), "PID_RELIABILITY" },
2141 { PID_LIVELINESS(0x1b), "PID_LIVELINESS" },
2142 { PID_LIVELINESS_OFFERED(0x1c), "PID_LIVELINESS_OFFERED [deprecated]" },
2143 { PID_DURABILITY(0x1d), "PID_DURABILITY" },
2144 { PID_DURABILITY_SERVICE(0x1e), "PID_DURABILITY_SERVICE" },
2145 { PID_PRESENTATION_OFFERED(0x22), "PID_PRESENTATION_OFFERED [deprecated]" },
2146 { PID_OWNERSHIP(0x1f), "PID_OWNERSHIP" },
2147 { PID_OWNERSHIP_OFFERED(0x20), "PID_OWNERSHIP_OFFERED [deprecated]" },
2148 { PID_PRESENTATION(0x21), "PID_PRESENTATION" },
2149 { PID_DESTINATION_ORDER(0x25), "PID_DESTINATION_ORDER" },
2150 { PID_DESTINATION_ORDER_OFFERED(0x26), "PID_DESTINATION_ORDER_OFFERED [deprecated]" },
2151 { PID_LATENCY_BUDGET(0x27), "PID_LATENCY_BUDGET" },
2152 { PID_LATENCY_BUDGET_OFFERED(0x28), "PID_LATENCY_BUDGET_OFFERED [deprecated]" },
2153 { PID_PARTITION(0x29), "PID_PARTITION" },
2154 { PID_PARTITION_OFFERED(0x2a), "PID_PARTITION_OFFERED [deprecated]" },
2155 { PID_LIFESPAN(0x2b), "PID_LIFESPAN" },
2156 { PID_TOPIC_DATA(0x2e), "PID_TOPIC_DATA" },
2157 { PID_UNICAST_LOCATOR(0x2f), "PID_UNICAST_LOCATOR" },
2158 { PID_MULTICAST_LOCATOR(0x30), "PID_MULTICAST_LOCATOR" },
2159 { PID_DEFAULT_UNICAST_LOCATOR(0x31), "PID_DEFAULT_UNICAST_LOCATOR" },
2160 { PID_METATRAFFIC_UNICAST_LOCATOR(0x32), "PID_METATRAFFIC_UNICAST_LOCATOR" },
2161 { PID_METATRAFFIC_MULTICAST_LOCATOR(0x33), "PID_METATRAFFIC_MULTICAST_LOCATOR" },
2162 { PID_PARTICIPANT_MANUAL_LIVELINESS_COUNT(0x34), "PID_PARTICIPANT_MANUAL_LIVELINESS_COUNT" },
2163 { PID_HISTORY(0x40), "PID_HISTORY" },
2164 { PID_RESOURCE_LIMIT(0x41), "PID_RESOURCE_LIMIT" },
2165 { PID_METATRAFFIC_MULTICAST_PORT(0x46), "PID_METATRAFFIC_MULTICAST_PORT" },
2166 { PID_EXPECTS_INLINE_QOS(0x43), "PID_EXPECTS_INLINE_QOS" },
2167 { PID_METATRAFFIC_UNICAST_IPADDRESS(0x45), "PID_METATRAFFIC_UNICAST_IPADDRESS" },
2168 { PID_PARTICIPANT_BUILTIN_ENDPOINTS(0x44), "PID_PARTICIPANT_BUILTIN_ENDPOINTS" },
2169 { PID_CONTENT_FILTER_PROPERTY(0x35), "PID_CONTENT_FILTER_PROPERTY" },
2170 { PID_PROPERTY_LIST_OLD(0x36), "PID_PROPERTY_LIST" },
2171 { PID_FILTER_SIGNATURE(0x55), "PID_FILTER_SIGNATURE" },
2172 { PID_COHERENT_SET(0x56), "PID_COHERENT_SET" },
2173 { PID_TYPECODE(0x47), "PID_TYPECODE" },
2174 { PID_PARTICIPANT_GUID(0x50), "PID_PARTICIPANT_GUID" },
2175 { PID_PARTICIPANT_ENTITY_ID(0x51), "PID_PARTICIPANT_ENTITY_ID" },
2176 { PID_GROUP_GUID(0x52), "PID_GROUP_GUID" },
2177 { PID_GROUP_ENTITY_ID(0x53), "PID_GROUP_ENTITY_ID" },
2178 { 0, NULL((void*)0) }
2179};
2180
2181static const value_string parameter_id_inline_qos_rti[] = {
2182 { PID_RELATED_ORIGINAL_WRITER_INFO(0x0083), "PID_RELATED_ORIGINAL_WRITER_INFO" },
2183 { PID_RELATED_ORIGINAL_WRITER_INFO_LEGACY(0x800f), "PID_RELATED_ORIGINAL_WRITER_INFO_LEGACY" },
2184 { PID_RELATED_SOURCE_GUID(0x8012), "PID_RELATED_SOURCE_GUID" },
2185 { PID_RELATED_READER_GUID(0x8010), "PID_RELATED_READER_GUID" },
2186 { PID_SOURCE_GUID(0x8011), "PID_SOURCE_GUID" },
2187 { PID_TOPIC_QUERY_GUID(0x8013), "PID_TOPIC_QUERY_GUID" },
2188 { PID_SAMPLE_SIGNATURE(0x8019), "PID_SAMPLE_SIGNATURE" },
2189 { 0, NULL((void*)0) }
2190};
2191
2192static const value_string parameter_id_v2_vals[] = {
2193 { PID_PAD(0x00), "PID_PAD" },
2194 { PID_SENTINEL(0x01), "PID_SENTINEL" },
2195 { PID_PARTICIPANT_LEASE_DURATION(0x02), "PID_PARTICIPANT_LEASE_DURATION" },
2196 { PID_TIME_BASED_FILTER(0x04), "PID_TIME_BASED_FILTER" },
2197 { PID_TOPIC_NAME(0x05), "PID_TOPIC_NAME" },
2198 { PID_OWNERSHIP_STRENGTH(0x06), "PID_OWNERSHIP_STRENGTH" },
2199 { PID_TYPE_NAME(0x07), "PID_TYPE_NAME" },
2200 { PID_METATRAFFIC_MULTICAST_IPADDRESS(0x0b),"PID_METATRAFFIC_MULTICAST_IPADDRESS"},
2201 { PID_DEFAULT_UNICAST_IPADDRESS(0x0c), "PID_DEFAULT_UNICAST_IPADDRESS" },
2202 { PID_METATRAFFIC_UNICAST_PORT(0x0d), "PID_METATRAFFIC_UNICAST_PORT" },
2203 { PID_DEFAULT_UNICAST_PORT(0x0e), "PID_DEFAULT_UNICAST_PORT" },
2204 { PID_MULTICAST_IPADDRESS(0x11), "PID_MULTICAST_IPADDRESS" },
2205 { PID_PROTOCOL_VERSION(0x15), "PID_PROTOCOL_VERSION" },
2206 { PID_VENDOR_ID(0x16), "PID_VENDOR_ID" },
2207 { PID_RELIABILITY(0x1a), "PID_RELIABILITY" },
2208 { PID_LIVELINESS(0x1b), "PID_LIVELINESS" },
2209 { PID_DURABILITY(0x1d), "PID_DURABILITY" },
2210 { PID_DURABILITY_SERVICE(0x1e), "PID_DURABILITY_SERVICE" },
2211 { PID_OWNERSHIP(0x1f), "PID_OWNERSHIP" },
2212 { PID_PRESENTATION(0x21), "PID_PRESENTATION" },
2213 { PID_DEADLINE(0x23), "PID_DEADLINE" },
2214 { PID_DESTINATION_ORDER(0x25), "PID_DESTINATION_ORDER" },
2215 { PID_LATENCY_BUDGET(0x27), "PID_LATENCY_BUDGET" },
2216 { PID_PARTITION(0x29), "PID_PARTITION" },
2217 { PID_LIFESPAN(0x2b), "PID_LIFESPAN" },
2218 { PID_USER_DATA(0x2c), "PID_USER_DATA" },
2219 { PID_GROUP_DATA(0x2d), "PID_GROUP_DATA" },
2220 { PID_TOPIC_DATA(0x2e), "PID_TOPIC_DATA" },
2221 { PID_UNICAST_LOCATOR(0x2f), "PID_UNICAST_LOCATOR" },
2222 { PID_MULTICAST_LOCATOR(0x30), "PID_MULTICAST_LOCATOR" },
2223 { PID_DEFAULT_UNICAST_LOCATOR(0x31), "PID_DEFAULT_UNICAST_LOCATOR" },
2224 { PID_METATRAFFIC_UNICAST_LOCATOR(0x32), "PID_METATRAFFIC_UNICAST_LOCATOR" },
2225 { PID_METATRAFFIC_MULTICAST_LOCATOR(0x33), "PID_METATRAFFIC_MULTICAST_LOCATOR" },
2226 { PID_PARTICIPANT_MANUAL_LIVELINESS_COUNT(0x34), "PID_PARTICIPANT_MANUAL_LIVELINESS_COUNT" },
2227 { PID_CONTENT_FILTER_PROPERTY(0x35), "PID_CONTENT_FILTER_PROPERTY" },
2228 { PID_PROPERTY_LIST(0x0059), "PID_PROPERTY_LIST" },
2229 { PID_HISTORY(0x40), "PID_HISTORY" },
2230 { PID_RESOURCE_LIMIT(0x41), "PID_RESOURCE_LIMIT" },
2231 { PID_EXPECTS_INLINE_QOS(0x43), "PID_EXPECTS_INLINE_QOS" },
2232 { PID_PARTICIPANT_BUILTIN_ENDPOINTS(0x44), "PID_PARTICIPANT_BUILTIN_ENDPOINTS" },
2233 { PID_METATRAFFIC_UNICAST_IPADDRESS(0x45), "PID_METATRAFFIC_UNICAST_IPADDRESS" },
2234 { PID_METATRAFFIC_MULTICAST_PORT(0x46), "PID_METATRAFFIC_MULTICAST_PORT" },
2235 { PID_DEFAULT_MULTICAST_LOCATOR(0x0048), "PID_DEFAULT_MULTICAST_LOCATOR" },
2236 { PID_TRANSPORT_PRIORITY(0x0049), "PID_TRANSPORT_PRIORITY" },
2237 { PID_PARTICIPANT_GUID(0x50), "PID_PARTICIPANT_GUID" },
2238 { PID_PARTICIPANT_ENTITY_ID(0x51), "PID_PARTICIPANT_ENTITY_ID" },
2239 { PID_GROUP_GUID(0x52), "PID_GROUP_GUID" },
2240 { PID_GROUP_ENTITY_ID(0x53), "PID_GROUP_ENTITY_ID" },
2241 { PID_CONTENT_FILTER_INFO(0x0055), "PID_CONTENT_FILTER_INFO" },
2242 { PID_COHERENT_SET(0x56), "PID_COHERENT_SET" },
2243 { PID_DIRECTED_WRITE(0x0057), "PID_DIRECTED_WRITE" },
2244 { PID_BUILTIN_ENDPOINT_SET(0x0058), "PID_BUILTIN_ENDPOINT_SET" },
2245 { PID_PROPERTY_LIST_OLD(0x36), "PID_PROPERTY_LIST" },
2246 { PID_ENDPOINT_GUID(0x005a), "PID_ENDPOINT_GUID" },
2247 { PID_TYPE_MAX_SIZE_SERIALIZED(0x0060), "PID_TYPE_MAX_SIZE_SERIALIZED" },
2248 { PID_ORIGINAL_WRITER_INFO(0x0061), "PID_ORIGINAL_WRITER_INFO" },
2249 { PID_ENTITY_NAME(0x0062), "PID_ENTITY_NAME" },
2250 { PID_KEY_HASH(0x0070), "PID_KEY_HASH" },
2251 { PID_STATUS_INFO(0x0071), "PID_STATUS_INFO" },
2252 { PID_DATA_REPRESENTATION(0x0073), "PID_DATA_REPRESENTATION" },
2253 { PID_TYPE_CONSISTENCY(0x0074), "PID_TYPE_CONSISTENCY" },
2254 { PID_BUILTIN_ENDPOINT_QOS(0x0077), "PID_BUILTIN_ENDPOINT_QOS" },
2255 { PID_ENABLE_AUTHENTICATION(0x0078), "PID_ENABLE_AUTHENTICATION" },
2256 { PID_RELATED_ENTITY_GUID(0x0081), "PID_RELATED_ENTITY_GUID" },
2257 { PID_IDENTITY_TOKEN(0x1001), "PID_IDENTITY_TOKEN" },
2258 { PID_PERMISSIONS_TOKEN(0x1002), "PID_PERMISSIONS_TOKEN" },
2259 { PID_DATA_TAGS(0x1003), "PID_DATA_TAGS" },
2260 { PID_ENDPOINT_SECURITY_INFO(0x1004), "PID_ENDPOINT_SECURITY_INFO" },
2261 { PID_PARTICIPANT_SECURITY_INFO(0x1005), "PID_PARTICIPANT_SECURITY_INFO" },
2262 { PID_PARTICIPANT_SECURITY_DIGITAL_SIGNATURE_ALGO(0x1010), "PID_PARTICIPANT_SECURITY_DIGITAL_SIGNATURE_ALGO" },
2263 { PID_PARTICIPANT_SECURITY_KEY_ESTABLISHMENT_ALGO(0x1011), "PID_PARTICIPANT_SECURITY_KEY_ESTABLISHMENT_ALGO" },
2264 { PID_PARTICIPANT_SECURITY_SYMMETRIC_CIPHER_ALGO(0x1012), "PID_PARTICIPANT_SECURITY_SYMMETRIC_CIPHER_ALGO" },
2265 { PID_ENDPOINT_SECURITY_SYMMETRIC_CIPHER_ALGO(0x1013), "PID_ENDPOINT_SECURITY_SYMMETRIC_CIPHER_ALGO" },
2266 { PID_IDENTITY_STATUS_TOKEN(0x1006), "PID_IDENTITY_STATUS_TOKEN"},
2267 { PID_AVAILABLE_BUILTIN_ENDPOINTS_EXT(0x1007), "PID_AVAILABLE_BUILTIN_ENDPOINTS_EXT"},
2268 { PID_DOMAIN_ID(0x000f), "PID_DOMAIN_ID" },
2269 { PID_DOMAIN_TAG(0x4014), "PID_DOMAIN_TAG" },
2270 { PID_GROUP_COHERENT_SET(0x0063), "PID_GROUP_COHERENT_SET" },
2271 { PID_END_COHERENT_SET(0x8022), "PID_END_COHERENT_SET" },
2272 { PID_END_GROUP_COHERENT_SET(0x8023), "PID_END_GROUP_COHERENT_SET" },
2273 { MIG_RTPS_PID_END_COHERENT_SET_SAMPLE_COUNT(0x8024), "MIG_RTPS_PID_END_COHERENT_SET_SAMPLE_COUNT" },
2274 { PID_TYPE_INFORMATION(0x0075), "PID_TYPE_INFORMATION" },
2275
2276 /* The following PID are deprecated */
2277 { PID_DEADLINE_OFFERED(0x24), "PID_DEADLINE_OFFERED [deprecated]" },
2278 { PID_PERSISTENCE(0x03), "PID_PERSISTENCE [deprecated]" },
2279 { PID_TYPE_CHECKSUM(0x08), "PID_TYPE_CHECKSUM [deprecated]" },
2280 { PID_TYPE2_NAME(0x09), "PID_TYPE2_NAME [deprecated]" },
2281 { PID_TYPE2_CHECKSUM(0x0a), "PID_TYPE2_CHECKSUM [deprecated]" },
2282 { PID_EXPECTS_ACK(0x10), "PID_EXPECTS_ACK [deprecated]" },
2283 { PID_MANAGER_KEY(0x12), "PID_MANAGER_KEY [deprecated]" },
2284 { PID_SEND_QUEUE_SIZE(0x13), "PID_SEND_QUEUE_SIZE [deprecated]" },
2285 { PID_RELIABILITY_ENABLED(0x14), "PID_RELIABILITY_ENABLED [deprecated]" },
2286 { PID_VARGAPPS_SEQUENCE_NUMBER_LAST(0x17), "PID_VARGAPPS_SEQUENCE_NUMBER_LAST [deprecated]" },
2287 { PID_RECV_QUEUE_SIZE(0x18), "PID_RECV_QUEUE_SIZE [deprecated]" },
2288 { PID_RELIABILITY_OFFERED(0x19), "PID_RELIABILITY_OFFERED [deprecated]" },
2289 { PID_LIVELINESS_OFFERED(0x1c), "PID_LIVELINESS_OFFERED [deprecated]" },
2290 { PID_PRESENTATION_OFFERED(0x22), "PID_PRESENTATION_OFFERED [deprecated]" },
2291 { PID_OWNERSHIP_OFFERED(0x20), "PID_OWNERSHIP_OFFERED [deprecated]" },
2292 { PID_DESTINATION_ORDER_OFFERED(0x26), "PID_DESTINATION_ORDER_OFFERED [deprecated]" },
2293 { PID_LATENCY_BUDGET_OFFERED(0x28), "PID_LATENCY_BUDGET_OFFERED [deprecated]" },
2294 { PID_PARTITION_OFFERED(0x2a), "PID_PARTITION_OFFERED [deprecated]" },
2295 { PID_EXTENDED(0x3f01), "PID_EXTENDED" },
2296 { 0, NULL((void*)0) }
2297};
2298
2299static const value_string parameter_id_rti_vals[] = {
2300 /* Vendor specific: RTI */
2301 { PID_PRODUCT_VERSION(0x8000), "PID_PRODUCT_VERSION" },
2302 { PID_PLUGIN_PROMISCUITY_KIND(0x8001), "PID_PLUGIN_PROMISCUITY_KIND" },
2303 { PID_ENTITY_VIRTUAL_GUID(0x8002), "PID_ENTITY_VIRTUAL_GUID" },
2304 { PID_SERVICE_KIND(0x8003), "PID_SERVICE_KIND" },
2305 { PID_TYPECODE_RTPS2(0x8004), "PID_TYPECODE" },
2306 { PID_DISABLE_POSITIVE_ACKS(0x8005), "PID_DISABLE_POSITIVE_ACKS" },
2307 { PID_LOCATOR_FILTER_LIST(0x8006), "PID_LOCATOR_FILTER_LIST" },
2308 { PID_ROLE_NAME(0x800a), "PID_ROLE_NAME"},
2309 { PID_ACK_KIND(0x800b), "PID_ACK_KIND" },
2310 { PID_PEER_HOST_EPOCH(0x800e), "PID_PEER_HOST_EPOCH" },
2311 { PID_TRANSPORT_INFO_LIST(0x8010), "PID_TRANSPORT_INFO_LIST" },
2312 { PID_DIRECT_COMMUNICATION(0x8011), "PID_DIRECT_COMMUNICATION" },
2313 { PID_TYPE_OBJECT(0x0072), "PID_TYPE_OBJECT" },
2314 { PID_EXPECTS_VIRTUAL_HB(0x8009), "PID_EXPECTS_VIRTUAL_HB" },
2315 { PID_RTI_DOMAIN_ID(0x800f), "PID_RTI_DOMAIN_ID" },
2316 { PID_TOPIC_QUERY_PUBLICATION(0x8014), "PID_TOPIC_QUERY_PUBLICATION" },
2317 { PID_ENDPOINT_PROPERTY_CHANGE_EPOCH(0x8015), "PID_ENDPOINT_PROPERTY_CHANGE_EPOCH" },
2318 { PID_REACHABILITY_LEASE_DURATION(0x8016), "PID_REACHABILITY_LEASE_DURATION" },
2319 { PID_VENDOR_BUILTIN_ENDPOINT_SET(0x8017), "PID_VENDOR_BUILTIN_ENDPOINT_SET" },
2320 { PID_ENDPOINT_SECURITY_ATTRIBUTES(0x8018), "PID_ENDPOINT_SECURITY_ATTRIBUTES" },
2321 { PID_TYPE_OBJECT_LB(0x8021), "PID_TYPE_OBJECT_LB" },
2322 { PID_UNICAST_LOCATOR_EX(0x8007), "PID_UNICAST_LOCATOR_EX"},
2323 { PID_TOPIC_NAME_ALIASES(0x8028), "PID_TOPIC_NAME_ALIASES" },
2324 { PID_TYPE_NAME_ALIASES(0x8029), "PID_TYPE_NAME_ALIASES" },
2325 { 0, NULL((void*)0) }
2326};
2327static const value_string parameter_id_toc_vals[] = {
2328 /* Vendor specific: Twin Oaks Computing */
2329 { PID_TYPECODE_RTPS2(0x8004), "PID_TYPECODE_RTPS2" },
2330 { 0, NULL((void*)0) }
2331};
2332
2333static const value_string parameter_id_adl_vals[] = {
2334 /* Vendor specific: ADLink Ltd. */
2335 { PID_ADLINK_WRITER_INFO(0x8001), "PID_ADLINK_WRITER_INFO" },
2336 { PID_ADLINK_READER_DATA_LIFECYCLE(0x8002), "PID_ADLINK_READER_DATA_LIFECYCLE" },
2337 { PID_ADLINK_WRITER_DATA_LIFECYCLE(0x8003), "PID_ADLINK_WRITER_DATA_LIFECYCLE" },
2338 { PID_ADLINK_ENDPOINT_GUID(0x8004), "PID_ADLINK_ENDPOINT_GUID" },
2339 { PID_ADLINK_SYNCHRONOUS_ENDPOINT(0x8005), "PID_ADLINK_SYNCHRONOUS_ENDPOINT" },
2340 { PID_ADLINK_RELAXED_QOS_MATCHING(0x8006), "PID_ADLINK_RELAXED_QOS_MATCHING" },
2341 { PID_ADLINK_PARTICIPANT_VERSION_INFO(0x8007), "PID_ADLINK_PARTICIPANT_VERSION_INFO" },
2342 { PID_ADLINK_NODE_NAME(0x8008), "PID_ADLINK_NODE_NAME" },
2343 { PID_ADLINK_EXEC_NAME(0x8009), "PID_ADLINK_EXEC_NAME" },
2344 { PID_ADLINK_PROCESS_ID(0x800a), "PID_ADLINK_PROCESS_ID" },
2345 { PID_ADLINK_SERVICE_TYPE(0x800b), "PID_ADLINK_SERVICE_TYPE" },
2346 { PID_ADLINK_ENTITY_FACTORY(0x800c), "PID_ADLINK_ENTITY_FACTORY" },
2347 { PID_ADLINK_WATCHDOG_SCHEDULING(0x800d), "PID_ADLINK_WATCHDOG_SCHEDULING" },
2348 { PID_ADLINK_LISTENER_SCHEDULING(0x800e), "PID_ADLINK_LISTENER_SCHEDULING" },
2349 { PID_ADLINK_SUBSCRIPTION_KEYS(0x800f), "PID_ADLINK_SUBSCRIPTION_KEYS" },
2350 { PID_ADLINK_READER_LIFESPAN(0x8010), "PID_ADLINK_READER_LIFESPAN" },
2351 { PID_ADLINK_SHARE(0x8011), "PID_ADLINK_SHARE" },
2352 { PID_ADLINK_TYPE_DESCRIPTION(0x8012), "PID_ADLINK_TYPE_DESCRIPTION" },
2353 { PID_ADLINK_LAN_ID(0x8013), "PID_ADLINK_LAN_ID" },
2354 { PID_ADLINK_ENDPOINT_GID(0x8014), "PID_ADLINK_ENDPOINT_GID" },
2355 { PID_ADLINK_GROUP_GID(0x8015), "PID_ADLINK_GROUP_GID" },
2356 { PID_ADLINK_EOTINFO(0x8016), "PID_ADLINK_EOTINFO" },
2357 { PID_ADLINK_PART_CERT_NAME(0x8017), "PID_ADLINK_PART_CERT_NAME" },
2358 { PID_ADLINK_LAN_CERT_NAME(0x8018), "PID_ADLINK_LAN_CERT_NAME" },
2359 { 0, NULL((void*)0) }
2360};
2361
2362static const value_string liveliness_qos_vals[] = {
2363 { LIVELINESS_AUTOMATIC(0), "AUTOMATIC_LIVELINESS_QOS" },
2364 { LIVELINESS_BY_PARTICIPANT(1), "MANUAL_BY_PARTICIPANT_LIVELINESS_QOS" },
2365 { LIVELINESS_BY_TOPIC(2), "MANUAL_BY_TOPIC_LIVELINESS_QOS" },
2366 { 0, NULL((void*)0) }
2367};
2368
2369static const value_string durability_qos_vals[] = {
2370 { DURABILITY_VOLATILE(0), "VOLATILE_DURABILITY_QOS" },
2371 { DURABILITY_TRANSIENT_LOCAL(1), "TRANSIENT_LOCAL_DURABILITY_QOS" },
2372 { DURABILITY_TRANSIENT(2), "TRANSIENT_DURABILITY_QOS" },
2373 { DURABILITY_PERSISTENT(3), "PERSISTENT_DURABILITY_QOS" },
2374 { 0, NULL((void*)0) }
2375};
2376
2377static const value_string ownership_qos_vals[] = {
2378 { OWNERSHIP_SHARED(0), "SHARED_OWNERSHIP_QOS" },
2379 { OWNERSHIP_EXCLUSIVE(1), "EXCLUSIVE_OWNERSHIP_QOS" },
2380 { 0, NULL((void*)0) }
2381};
2382
2383static const value_string presentation_qos_vals[] = {
2384 { PRESENTATION_INSTANCE(0), "INSTANCE_PRESENTATION_QOS" },
2385 { PRESENTATION_TOPIC(1), "TOPIC_PRESENTATION_QOS" },
2386 { PRESENTATION_GROUP(2), "GROUP_PRESENTATION_QOS" },
2387 { 0, NULL((void*)0) }
2388};
2389
2390static const value_string history_qos_vals[] = {
2391 { HISTORY_KIND_KEEP_LAST(0), "KEEP_LAST_HISTORY_QOS" },
2392 { HISTORY_KIND_KEEP_ALL(1), "KEEP_ALL_HISTORY_QOS" },
2393 { 0, NULL((void*)0) }
2394};
2395
2396static const value_string reliability_qos_vals[] = {
2397 { RELIABILITY_BEST_EFFORT(1), "BEST_EFFORT_RELIABILITY_QOS" },
2398 { RELIABILITY_RELIABLE(2), "RELIABLE_RELIABILITY_QOS" },
2399 { 0, NULL((void*)0) }
2400};
2401
2402static const value_string destination_order_qos_vals[] = {
2403 { BY_RECEPTION_TIMESTAMP(0), "BY_RECEPTION_TIMESTAMP_DESTINATIONORDER_QOS" },
2404 { BY_SOURCE_TIMESTAMP(1), "BY_SOURCE_TIMESTAMP_DESTINATIONORDER_QOS" },
2405 { 0, NULL((void*)0) }
2406};
2407
2408static const value_string encapsulation_id_vals[] = {
2409 { ENCAPSULATION_CDR_BE(0x0000), "CDR_BE" },
2410 { ENCAPSULATION_CDR_LE(0x0001), "CDR_LE" },
2411 { ENCAPSULATION_PL_CDR_BE(0x0002), "PL_CDR_BE" },
2412 { ENCAPSULATION_PL_CDR_LE(0x0003), "PL_CDR_LE" },
2413 { ENCAPSULATION_CDR2_BE(0x0006), "CDR2_BE" },
2414 { ENCAPSULATION_CDR2_LE(0x0007), "CDR2_LE" },
2415 { ENCAPSULATION_D_CDR2_BE(0x0008), "D_CDR2_BE" },
2416 { ENCAPSULATION_D_CDR2_LE(0x0009), "D_CDR2_LE" },
2417 { ENCAPSULATION_PL_CDR2_BE(0x000a), "PL_CDR2_BE" },
2418 { ENCAPSULATION_PL_CDR2_LE(0x000b), "PL_CDR2_LE" },
2419 { ENCAPSULATION_SHMEM_REF_PLAIN(0xC000), "SHMEM_REF_PLAIN" },
2420 { ENCAPSULATION_SHMEM_REF_FLAT_DATA(0xC001), "SHMEM_REF_FLAT_DATA" },
2421 { 0, NULL((void*)0) }
2422};
2423
2424static const value_string data_representation_kind_vals[] = {
2425 { 0, "XCDR_DATA_REPRESENTATION" },
2426 { 1, "XML_DATA_REPRESENTATION" },
2427 { 2, "XCDR2_DATA_REPRESENTATION" },
2428 { 0, NULL((void*)0) }
2429};
2430
2431static const value_string plugin_promiscuity_kind_vals[] = {
2432 { 0x0001, "MATCHING_REMOTE_ENTITIES_PROMISCUITY" },
2433 { 0xffff, "ALL_REMOTE_ENTITIES_PROMISCUITY" },
2434 { 0, NULL((void*)0) }
2435};
2436
2437static const value_string service_kind_vals[] = {
2438 { 0x00000000, "NO_SERVICE_QOS" },
2439 { 0x00000001, "PERSISTENCE_SERVICE_QOS" },
2440 { 0, NULL((void*)0) }
2441};
2442
2443static const value_string secure_transformation_kind[] = {
2444 { CRYPTO_TRANSFORMATION_KIND_NONE(0), "NONE" },
2445 { CRYPTO_TRANSFORMATION_KIND_AES128_GMAC(1), "AES128_GMAC" },
2446 { CRYPTO_TRANSFORMATION_KIND_AES128_GCM(2), "AES128_GCM" },
2447 { CRYPTO_TRANSFORMATION_KIND_AES256_GMAC(3), "AES256_GMAC" },
2448 { CRYPTO_TRANSFORMATION_KIND_AES256_GCM(4), "AES256_GCM" },
2449 { 0, NULL((void*)0) }
2450};
2451
2452static const value_string participant_message_data_kind [] = {
2453 { PARTICIPANT_MESSAGE_DATA_KIND_UNKNOWN(0x00000000), "PARTICIPANT_MESSAGE_DATA_KIND_UNKNOWN" },
2454 { PARTICIPANT_MESSAGE_DATA_KIND_AUTOMATIC_LIVELINESS_UPDATE(0x00000001), "PARTICIPANT_MESSAGE_DATA_KIND_AUTOMATIC_LIVELINESS_UPDATE" },
2455 { PARTICIPANT_MESSAGE_DATA_KIND_MANUAL_LIVELINESS_UPDATE(0x00000002), "PARTICIPANT_MESSAGE_DATA_KIND_MANUAL_LIVELINESS_UPDATE" },
2456 { 0, NULL((void*)0) }
2457};
2458
2459/* Vendor specific: RTI */
2460static const value_string type_consistency_kind_vals[] = {
2461 { DISALLOW_TYPE_COERCION(0), "DISALLOW_TYPE_COERCION" },
2462 { ALLOW_TYPE_COERCION(1), "ALLOW_TYPE_COERCION" },
2463 { 0, NULL((void*)0) }
2464};
2465
2466static const value_string service_request_kind[] = {
2467 { RTI_SERVICE_REQUEST_ID_UNKNOWN0, "RTI_SERVICE_REQUEST_ID_UNKNOWN" },
2468 { RTI_SERVICE_REQUEST_ID_TOPIC_QUERY1, "RTI_SERVICE_REQUEST_ID_TOPIC_QUERY" },
2469 { RTI_SERVICE_REQUEST_ID_INSTANCE_STATE3, "RTI_SERVICE_REQUEST_ID_INSTANCE_STATE" },
2470 { 0, NULL((void*)0) }
2471};
2472/* Vendor specific: RTI */
2473static const value_string acknowledgement_kind_vals[] = {
2474 { PROTOCOL_ACKNOWLEDGMENT(0), "PROTOCOL_ACKNOWLEDGMENT" },
2475 { APPLICATION_AUTO_ACKNOWLEDGMENT(1), "APPLICATION_AUTO_ACKNOWLEDGMENT" },
2476 { APPLICATION_ORDERED_ACKNOWLEDGMENT(2), "APPLICATION_ORDERED_ACKNOWLEDGMENT" },
2477 { APPLICATION_EXPLICIT_ACKNOWLEDGMENT(3), "APPLICATION_EXPLICIT_ACKNOWLEDGMENT" },
2478 { 0, NULL((void*)0) }
2479};
2480
2481static int* const TYPE_FLAG_FLAGS[] = {
2482 &hf_rtps_flag_typeflag_nested, /* Bit 2 */
2483 &hf_rtps_flag_typeflag_mutable, /* Bit 1 */
2484 &hf_rtps_flag_typeflag_final, /* Bit 0 */
2485 NULL((void*)0)
2486};
2487
2488static int* const MEMBER_FLAGS[] = {
2489 &hf_rtps_flag_memberflag_union_default, /* Bit 3 */
2490 &hf_rtps_flag_memberflag_shareable, /* Bit 2 */
2491 &hf_rtps_flag_memberflag_optional, /* Bit 1 */
2492 &hf_rtps_flag_memberflag_key, /* Bit 0 */
2493 NULL((void*)0)
2494};
2495
2496static int* const UDPV4_WAN_LOCATOR_FLAGS[] = {
2497 &hf_rtps_flag_reserved80, /* Bit 7 */
2498 &hf_rtps_flag_reserved40, /* Bit 6 */
2499 &hf_rtps_flag_reserved20, /* Bit 5 */
2500 &hf_rtps_flag_reserved10, /* Bit 4 */
2501 &hf_rtps_flag_udpv4_wan_locator_r, /* Bit 3 */
2502 &hf_rtps_flag_udpv4_wan_locator_b, /* Bit 2 */
2503 &hf_rtps_flag_udpv4_wan_locator_p, /* Bit 1 */
2504 &hf_rtps_flag_udpv4_wan_locator_u, /* Bit 0 */
2505 NULL((void*)0)
2506};
2507
2508static int* const UDPV4_WAN_BINDING_PING_FLAGS[] = {
2509 &hf_rtps_flag_reserved80, /* Bit 7 */
2510 &hf_rtps_flag_reserved40, /* Bit 6 */
2511 &hf_rtps_flag_reserved20, /* Bit 5 */
2512 &hf_rtps_flag_reserved10, /* Bit 4 */
2513 &hf_rtps_flag_reserved08, /* Bit 3 */
2514 &hf_rtps_flag_udpv4_wan_binding_ping_b, /* Bit 2 */
2515 &hf_rtps_flag_udpv4_wan_binding_ping_l, /* Bit 1 */
2516 &hf_rtps_flag_udpv4_wan_binding_ping_e, /* Bit 0 */
2517 NULL((void*)0)
2518};
2519
2520/* Vendor specific: RTI */
2521static const value_string ndds_transport_class_id_vals[] = {
2522 { NDDS_TRANSPORT_CLASSID_ANY(0), "ANY" },
2523 { NDDS_TRANSPORT_CLASSID_UDPv4(1), "UDPv4" },
2524 { NDDS_TRANSPORT_CLASSID_SHMEM(0x01000000), "SHMEM" },
2525 { NDDS_TRANSPORT_CLASSID_INTRA(3), "INTRA" },
2526 { NDDS_TRANSPORT_CLASSID_UDPv6(2), "UDPv6" },
2527 { NDDS_TRANSPORT_CLASSID_DTLS(6), "DTLS" },
2528 { NDDS_TRANSPORT_CLASSID_WAN(7), "WAN" },
2529 { NDDS_TRANSPORT_CLASSID_TCPV4_LAN(8), "TCPv4_LAN" },
2530 { NDDS_TRANSPORT_CLASSID_TCPV4_WAN(9), "TCPv4_WAN" },
2531 { NDDS_TRANSPORT_CLASSID_TLSV4_LAN(10), "TLSv4_LAN" },
2532 { NDDS_TRANSPORT_CLASSID_TLSV4_WAN(11), "TLSv4_WAN" },
2533 { NDDS_TRANSPORT_CLASSID_PCIE(12), "PCIE" },
2534 { NDDS_TRANSPORT_CLASSID_ITP(13), "ITP" },
2535 { NDDS_TRANSPORT_CLASSID_UDPv4_WAN(0x01000001), "UDPv4_WAN" },
2536 { 0, NULL((void*)0) }
2537};
2538
2539static const value_string class_id_enum_names[] = {
2540 { RTI_OSAPI_COMPRESSION_CLASS_ID_NONE(0), "NONE" },
2541 { RTI_OSAPI_COMPRESSION_CLASS_ID_ZLIB(1), "ZLIB" },
2542 { RTI_OSAPI_COMPRESSION_CLASS_ID_BZIP2(2), "BZIP2" },
2543 { RTI_OSAPI_COMPRESSION_CLASS_ID_AUTO((4294967295U)), "AUTO"},
2544 { 0, NULL((void*)0)}
2545};
2546
2547static const value_string topic_query_selection_kind[] = {
2548 { RTPS_TOPIC_QUERY_SELECTION_KIND_HISTORY_SNAPSHOT0, "HISTORY_SNAPSHOT" },
2549 { RTPS_TOPIC_QUERY_SELECTION_KIND_CONTINUOUS1, "CONTINUOUS" },
2550 { 0, NULL((void*)0)}
2551};
2552
2553static int* const PAD_FLAGS[] = {
2554 &hf_rtps_flag_reserved80, /* Bit 7 */
2555 &hf_rtps_flag_reserved40, /* Bit 6 */
2556 &hf_rtps_flag_reserved20, /* Bit 5 */
2557 &hf_rtps_flag_reserved10, /* Bit 4 */
2558 &hf_rtps_flag_reserved08, /* Bit 3 */
2559 &hf_rtps_flag_reserved04, /* Bit 2 */
2560 &hf_rtps_flag_reserved02, /* Bit 1 */
2561 &hf_rtps_flag_endianness, /* Bit 0 */
2562 NULL((void*)0)
2563};
2564
2565static int* const DATA_FLAGSv1[] = {
2566 &hf_rtps_flag_reserved80, /* Bit 7 */
2567 &hf_rtps_flag_reserved40, /* Bit 6 */
2568 &hf_rtps_flag_unregister, /* Bit 5 */
2569 &hf_rtps_flag_inline_qos_v1, /* Bit 4 */
2570 &hf_rtps_flag_hash_key, /* Bit 3 */
2571 &hf_rtps_flag_alive, /* Bit 2 */
2572 &hf_rtps_flag_data_present_v1, /* Bit 1 */
2573 &hf_rtps_flag_endianness, /* Bit 0 */
2574 NULL((void*)0)
2575};
2576
2577static int* const DATA_FLAGSv2[] = {
2578 &hf_rtps_flag_reserved80, /* Bit 7 */
2579 &hf_rtps_flag_reserved40, /* Bit 6 */
2580 &hf_rtps_flag_reserved20, /* Bit 5 */
2581 &hf_rtps_flag_status_info, /* Bit 4 */
2582 &hf_rtps_flag_hash_key, /* Bit 3 */
2583 &hf_rtps_flag_data_present_v2, /* Bit 2 */
2584 &hf_rtps_flag_inline_qos_v2, /* Bit 1 */
2585 &hf_rtps_flag_endianness, /* Bit 0 */
2586 NULL((void*)0)
2587};
2588
2589static int* const NOKEY_DATA_FRAG_FLAGS[] = {
2590 &hf_rtps_flag_reserved80, /* Bit 7 */
2591 &hf_rtps_flag_reserved40, /* Bit 6 */
2592 &hf_rtps_flag_reserved20, /* Bit 5 */
2593 &hf_rtps_flag_reserved10, /* Bit 4 */
2594 &hf_rtps_flag_reserved08, /* Bit 3 */
2595 &hf_rtps_flag_reserved04, /* Bit 2 */
2596 &hf_rtps_flag_inline_qos_v2, /* Bit 1 */
2597 &hf_rtps_flag_endianness, /* Bit 0 */
2598 NULL((void*)0)
2599};
2600
2601static int* const NOKEY_DATA_FLAGS[] = {
2602 &hf_rtps_flag_reserved80, /* Bit 7 */
2603 &hf_rtps_flag_reserved40, /* Bit 6 */
2604 &hf_rtps_flag_reserved20, /* Bit 5 */
2605 &hf_rtps_flag_reserved10, /* Bit 4 */
2606 &hf_rtps_flag_reserved08, /* Bit 3 */
2607 &hf_rtps_flag_reserved04, /* Bit 2 */
2608 &hf_rtps_flag_inline_qos_v2, /* Bit 1 */
2609 &hf_rtps_flag_endianness, /* Bit 0 */
2610 NULL((void*)0)
2611};
2612
2613static int* const ACKNACK_FLAGS[] = {
2614 &hf_rtps_flag_reserved80, /* Bit 7 */
2615 &hf_rtps_flag_reserved40, /* Bit 6 */
2616 &hf_rtps_flag_reserved20, /* Bit 5 */
2617 &hf_rtps_flag_reserved10, /* Bit 4 */
2618 &hf_rtps_flag_reserved08, /* Bit 3 */
2619 &hf_rtps_flag_reserved04, /* Bit 2 */
2620 &hf_rtps_flag_final, /* Bit 1 */
2621 &hf_rtps_flag_endianness, /* Bit 0 */
2622 NULL((void*)0)
2623};
2624
2625static int* const NACK_FRAG_FLAGS[] = {
2626 &hf_rtps_flag_reserved80, /* Bit 7 */
2627 &hf_rtps_flag_reserved40, /* Bit 6 */
2628 &hf_rtps_flag_reserved20, /* Bit 5 */
2629 &hf_rtps_flag_reserved10, /* Bit 4 */
2630 &hf_rtps_flag_reserved08, /* Bit 3 */
2631 &hf_rtps_flag_reserved04, /* Bit 2 */
2632 &hf_rtps_flag_reserved02, /* Bit 1 */
2633 &hf_rtps_flag_endianness, /* Bit 0 */
2634 NULL((void*)0)
2635};
2636
2637static int* const GAP_FLAGS[] = {
2638 &hf_rtps_flag_reserved80, /* Bit 7 */
2639 &hf_rtps_flag_reserved40, /* Bit 6 */
2640 &hf_rtps_flag_reserved20, /* Bit 5 */
2641 &hf_rtps_flag_reserved10, /* Bit 4 */
2642 &hf_rtps_flag_reserved08, /* Bit 3 */
2643 &hf_rtps_flag_reserved04, /* Bit 2 */
2644 &hf_rtps_flag_reserved02, /* Bit 1 */
2645 &hf_rtps_flag_endianness, /* Bit 0 */
2646 NULL((void*)0)
2647};
2648
2649static int* const HEARTBEAT_FLAGS[] = {
2650 &hf_rtps_flag_reserved80, /* Bit 7 */
2651 &hf_rtps_flag_reserved40, /* Bit 6 */
2652 &hf_rtps_flag_reserved20, /* Bit 5 */
2653 &hf_rtps_flag_reserved10, /* Bit 4 */
2654 &hf_rtps_flag_reserved08, /* Bit 3 */
2655 &hf_rtps_flag_liveliness, /* Bit 2 */
2656 &hf_rtps_flag_final, /* Bit 1 */
2657 &hf_rtps_flag_endianness, /* Bit 0 */
2658 NULL((void*)0)
2659};
2660
2661static int* const HEARTBEAT_BATCH_FLAGS[] = {
2662 &hf_rtps_flag_reserved80, /* Bit 7 */
2663 &hf_rtps_flag_reserved40, /* Bit 6 */
2664 &hf_rtps_flag_reserved20, /* Bit 5 */
2665 &hf_rtps_flag_reserved10, /* Bit 4 */
2666 &hf_rtps_flag_reserved08, /* Bit 3 */
2667 &hf_rtps_flag_liveliness, /* Bit 2 */
2668 &hf_rtps_flag_final, /* Bit 1 */
2669 &hf_rtps_flag_endianness, /* Bit 0 */
2670 NULL((void*)0)
2671};
2672
2673static int* const HEARTBEAT_FRAG_FLAGS[] = {
2674 &hf_rtps_flag_reserved80, /* Bit 7 */
2675 &hf_rtps_flag_reserved40, /* Bit 6 */
2676 &hf_rtps_flag_reserved20, /* Bit 5 */
2677 &hf_rtps_flag_reserved10, /* Bit 4 */
2678 &hf_rtps_flag_reserved08, /* Bit 3 */
2679 &hf_rtps_flag_reserved04, /* Bit 2 */
2680 &hf_rtps_flag_reserved02, /* Bit 1 */
2681 &hf_rtps_flag_endianness, /* Bit 0 */
2682 NULL((void*)0)
2683};
2684
2685static int* const RTPS_DATA_FLAGS[] = {
2686 &hf_rtps_flag_reserved80, /* Bit 7 */
2687 &hf_rtps_flag_reserved40, /* Bit 6 */
2688 &hf_rtps_flag_reserved20, /* Bit 5 */
2689 &hf_rtps_flag_reserved10, /* Bit 4 */
2690 &hf_rtps_flag_data_serialized_key, /* Bit 3 */
2691 &hf_rtps_flag_data_present_v2, /* Bit 2 */
2692 &hf_rtps_flag_inline_qos_v2, /* Bit 1 */
2693 &hf_rtps_flag_endianness, /* Bit 0 */
2694 NULL((void*)0)
2695};
2696
2697static int* const RTPS_DATA_FRAG_FLAGS[] = {
2698 &hf_rtps_flag_reserved80, /* Bit 7 */
2699 &hf_rtps_flag_reserved40, /* Bit 6 */
2700 &hf_rtps_flag_reserved20, /* Bit 5 */
2701 &hf_rtps_flag_reserved10, /* Bit 4 */
2702 &hf_rtps_flag_reserved08, /* Bit 3 */
2703 &hf_rtps_flag_data_frag_serialized_key, /* Bit 2 */
2704 &hf_rtps_flag_inline_qos_v2, /* Bit 1 */
2705 &hf_rtps_flag_endianness, /* Bit 0 */
2706 NULL((void*)0)
2707};
2708
2709static int* const RTPS_DATA_BATCH_FLAGS[] = {
2710 &hf_rtps_flag_reserved80, /* Bit 7 */
2711 &hf_rtps_flag_reserved40, /* Bit 6 */
2712 &hf_rtps_flag_reserved20, /* Bit 5 */
2713 &hf_rtps_flag_reserved10, /* Bit 4 */
2714 &hf_rtps_flag_reserved08, /* Bit 3 */
2715 &hf_rtps_flag_reserved04, /* Bit 2 */
2716 &hf_rtps_flag_inline_qos_v2, /* Bit 1 */
2717 &hf_rtps_flag_endianness, /* Bit 0 */
2718 NULL((void*)0)
2719};
2720
2721static int* const RTPS_SAMPLE_INFO_FLAGS16[] = {
2722 &hf_rtps_flag_reserved8000, /* Bit 15 */
2723 &hf_rtps_flag_reserved4000, /* Bit 14 */
2724 &hf_rtps_flag_reserved2000, /* Bit 13 */
2725 &hf_rtps_flag_reserved1000, /* Bit 12 */
2726 &hf_rtps_flag_reserved0800, /* Bit 11 */
2727 &hf_rtps_flag_reserved0400, /* Bit 10 */
2728 &hf_rtps_flag_reserved0200, /* Bit 9 */
2729 &hf_rtps_flag_reserved0100, /* Bit 8 */
2730 &hf_rtps_flag_reserved0080, /* Bit 7 */
2731 &hf_rtps_flag_reserved0040, /* Bit 6 */
2732 &hf_rtps_flag_serialize_key16, /* Bit 5 */
2733 &hf_rtps_flag_invalid_sample, /* Bit 4 */
2734 &hf_rtps_flag_data_present16, /* Bit 3 */
2735 &hf_rtps_flag_offsetsn_present, /* Bit 2 */
2736 &hf_rtps_flag_inline_qos16_v2, /* Bit 1 */
2737 &hf_rtps_flag_timestamp_present, /* Bit 0 */
2738 NULL((void*)0)
2739};
2740
2741static int* const INFO_TS_FLAGS[] = {
2742 &hf_rtps_flag_reserved80, /* Bit 7 */
2743 &hf_rtps_flag_reserved40, /* Bit 6 */
2744 &hf_rtps_flag_reserved20, /* Bit 5 */
2745 &hf_rtps_flag_reserved10, /* Bit 4 */
2746 &hf_rtps_flag_reserved08, /* Bit 3 */
2747 &hf_rtps_flag_reserved04, /* Bit 2 */
2748 &hf_rtps_flag_timestamp, /* Bit 1 */
2749 &hf_rtps_flag_endianness, /* Bit 0 */
2750 NULL((void*)0)
2751};
2752
2753static int* const INFO_SRC_FLAGS[] = {
2754 &hf_rtps_flag_reserved80, /* Bit 7 */
2755 &hf_rtps_flag_reserved40, /* Bit 6 */
2756 &hf_rtps_flag_reserved20, /* Bit 5 */
2757 &hf_rtps_flag_reserved10, /* Bit 4 */
2758 &hf_rtps_flag_reserved08, /* Bit 3 */
2759 &hf_rtps_flag_reserved04, /* Bit 2 */
2760 &hf_rtps_flag_reserved02, /* Bit 1 */
2761 &hf_rtps_flag_endianness, /* Bit 0 */
2762 NULL((void*)0)
2763};
2764
2765static int* const INFO_REPLY_IP4_FLAGS[] = {
2766 &hf_rtps_flag_reserved80, /* Bit 7 */
2767 &hf_rtps_flag_reserved40, /* Bit 6 */
2768 &hf_rtps_flag_reserved20, /* Bit 5 */
2769 &hf_rtps_flag_reserved10, /* Bit 4 */
2770 &hf_rtps_flag_reserved08, /* Bit 3 */
2771 &hf_rtps_flag_reserved04, /* Bit 2 */
2772 &hf_rtps_flag_multicast, /* Bit 1 */
2773 &hf_rtps_flag_endianness, /* Bit 0 */
2774 NULL((void*)0)
2775};
2776
2777static int* const INFO_DST_FLAGS[] = {
2778 &hf_rtps_flag_reserved80, /* Bit 7 */
2779 &hf_rtps_flag_reserved40, /* Bit 6 */
2780 &hf_rtps_flag_reserved20, /* Bit 5 */
2781 &hf_rtps_flag_reserved10, /* Bit 4 */
2782 &hf_rtps_flag_reserved08, /* Bit 3 */
2783 &hf_rtps_flag_reserved04, /* Bit 2 */
2784 &hf_rtps_flag_reserved02, /* Bit 1 */
2785 &hf_rtps_flag_endianness, /* Bit 0 */
2786 NULL((void*)0)
2787};
2788
2789static int* const INFO_REPLY_FLAGS[] = {
2790 &hf_rtps_flag_reserved80, /* Bit 7 */
2791 &hf_rtps_flag_reserved40, /* Bit 6 */
2792 &hf_rtps_flag_reserved20, /* Bit 5 */
2793 &hf_rtps_flag_reserved10, /* Bit 4 */
2794 &hf_rtps_flag_reserved08, /* Bit 3 */
2795 &hf_rtps_flag_reserved04, /* Bit 2 */
2796 &hf_rtps_flag_multicast, /* Bit 1 */
2797 &hf_rtps_flag_endianness, /* Bit 0 */
2798 NULL((void*)0)
2799};
2800
2801static int* const RTI_CRC_FLAGS[] = {
2802 &hf_rtps_flag_reserved80, /* Bit 7 */
2803 &hf_rtps_flag_reserved40, /* Bit 6 */
2804 &hf_rtps_flag_reserved20, /* Bit 5 */
2805 &hf_rtps_flag_reserved10, /* Bit 4 */
2806 &hf_rtps_flag_reserved08, /* Bit 3 */
2807 &hf_rtps_flag_reserved04, /* Bit 2 */
2808 &hf_rtps_flag_reserved02, /* Bit 1 */
2809 &hf_rtps_flag_endianness, /* Bit 0 */
2810 NULL((void*)0)
2811};
2812/* It is a 4 bytes field but with these 8 bits is enough */
2813static int* const STATUS_INFO_FLAGS[] = {
2814 &hf_rtps_flag_reserved80, /* Bit 7 */
2815 &hf_rtps_flag_reserved40, /* Bit 6 */
2816 &hf_rtps_flag_reserved20, /* Bit 5 */
2817 &hf_rtps_flag_reserved10, /* Bit 4 */
2818 &hf_rtps_flag_reserved08, /* Bit 3 */
2819 &hf_rtps_flag_reserved04, /* Bit 2 */
2820 &hf_rtps_flag_unregistered, /* Bit 1 */
2821 &hf_rtps_flag_disposed, /* Bit 0 */
2822 NULL((void*)0)
2823};
2824
2825static int* const TYPE_FLAGS_V2[] = {
2826 &hf_rtps_type_object_v2_type_flag_is_autoid_hash, /* Bit 4 */
2827 &hf_rtps_type_object_v2_type_flag_is_nested, /* Bit 3 */
2828 &hf_rtps_type_object_v2_type_flag_is_mutable, /* Bit 2 */
2829 &hf_rtps_type_object_v2_type_flag_is_appendable, /* Bit 1 */
2830 &hf_rtps_type_object_v2_type_flag_is_final, /* Bit 0 */
2831 NULL((void*)0)
2832};
2833
2834static int* const MEMBER_FLAGS_V2[] = {
2835 &hf_rtps_type_object_v2_member_flag_is_default, /* Bit 6 */
2836 &hf_rtps_type_object_v2_member_flag_is_key, /* Bit 5 */
2837 &hf_rtps_type_object_v2_member_flag_is_must_understand, /* Bit 4 */
2838 &hf_rtps_type_object_v2_member_flag_is_optional, /* Bit 3 */
2839 &hf_rtps_type_object_v2_member_flag_is_external, /* Bit 2 */
2840 &hf_rtps_type_object_v2_member_flag_try_construct, /* Bits 01 */
2841 NULL((void*)0)
2842};
2843
2844static int* const EMHEADER[] = {
2845 &hf_rtps_xcdr2_must_understand, /* Bit 31 */
2846 &hf_rtps_xcdr2_length_code, /* Bits 28-30 */
2847 &hf_rtps_xcdr2_member_id, /* Bits 0-27 */
2848 NULL((void*)0)
2849};
2850
2851static int* const BUILTIN_ENDPOINT_EXT_FLAGS[] = {
2852 &hf_rtps_flag_typelookup_reply_secure_datareader, /* Bit 3 */
2853 &hf_rtps_flag_typelookup_reply_secure_datawriter, /* Bit 2 */
2854 &hf_rtps_flag_typelookup_request_secure_datareader, /* Bit 1 */
2855 &hf_rtps_flag_typelookup_request_secure_datawriter, /* Bit 0 */
2856 NULL((void*)0)
2857};
2858
2859static int* const BUILTIN_ENDPOINT_FLAGS[] = {
2860 &hf_rtps_flag_participant_secure_reader, /* Bit 27 */
2861 &hf_rtps_flag_participant_secure_writer, /* Bit 26 */
2862 &hf_rtps_flag_secure_participant_volatile_message_reader, /* Bit 25 */
2863 &hf_rtps_flag_secure_participant_volatile_message_writer, /* Bit 24 */
2864 &hf_rtps_flag_participant_stateless_message_reader, /* Bit 23 */
2865 &hf_rtps_flag_participant_stateless_message_writer, /* Bit 22 */
2866 &hf_rtps_flag_secure_participant_message_reader, /* Bit 21 */
2867 &hf_rtps_flag_secure_participant_message_writer, /* Bit 20 */
2868 &hf_rtps_flag_secure_subscription_reader, /* Bit 19 */
2869 &hf_rtps_flag_secure_subscription_writer, /* Bit 18 */
2870 &hf_rtps_flag_secure_publication_reader, /* Bit 17 */
2871 &hf_rtps_flag_secure_publication_writer, /* Bit 16 */
2872 &hf_rtps_flag_typelookup_reply_datareader, /* Bit 15 */
2873 &hf_rtps_flag_typelookup_reply_datawriter, /* Bit 14 */
2874 &hf_rtps_flag_typelookup_request_datareader, /* Bit 13 */
2875 &hf_rtps_flag_typelookup_request_datawriter, /* Bit 12 */
2876 &hf_rtps_flag_participant_message_datareader, /* Bit 11 */
2877 &hf_rtps_flag_participant_message_datawriter, /* Bit 10 */
2878 &hf_rtps_flag_participant_state_detector, /* Bit 9 */
2879 &hf_rtps_flag_participant_state_announcer, /* Bit 8 */
2880 &hf_rtps_flag_participant_proxy_detector, /* Bit 7 */
2881 &hf_rtps_flag_participant_proxy_announcer, /* Bit 6 */
2882 &hf_rtps_flag_subscription_detector, /* Bit 5 */
2883 &hf_rtps_flag_subscription_announcer, /* Bit 4 */
2884 &hf_rtps_flag_publication_detector, /* Bit 3 */
2885 &hf_rtps_flag_publication_announcer, /* Bit 2 */
2886 &hf_rtps_flag_participant_detector, /* Bit 1 */
2887 &hf_rtps_flag_participant_announcer, /* Bit 0 */
2888 NULL((void*)0)
2889};
2890
2891static int* const SECURE_FLAGS[] = {
2892 &hf_rtps_flag_reserved80, /* Bit 7 */
2893 &hf_rtps_flag_reserved40, /* Bit 6 */
2894 &hf_rtps_flag_reserved20, /* Bit 5 */
2895 &hf_rtps_flag_reserved10, /* Bit 4 */
2896 &hf_rtps_flag_reserved08, /* Bit 3 */
2897 &hf_rtps_flag_reserved04, /* Bit 2 */
2898 &hf_rtps_flag_multisubmessage, /* Bit 1 */
2899 &hf_rtps_flag_endianness, /* Bit 0 */
2900 NULL((void*)0)
2901};
2902
2903static int* const SECURE_PREFIX_FLAGS[] = {
2904 &hf_rtps_flag_vendor_specific_content, /* Bit 7 */
2905 &hf_rtps_flag_reserved40, /* Bit 6 */
2906 &hf_rtps_flag_reserved20, /* Bit 5 */
2907 &hf_rtps_flag_reserved10, /* Bit 4 */
2908 &hf_rtps_flag_reserved08, /* Bit 3 */
2909 &hf_rtps_flag_protected_with_psk, /* Bit 2 */
2910 &hf_rtps_flag_additional_authenticated_data, /* Bit 1 */
2911 &hf_rtps_flag_endianness, /* Bit 0 */
2912 NULL((void*)0)
2913};
2914
2915static int* const SECURE_POSTFIX_FLAGS[] = {
2916 &hf_rtps_flag_reserved80, /* Bit 7 */
2917 &hf_rtps_flag_reserved40, /* Bit 6 */
2918 &hf_rtps_flag_reserved20, /* Bit 5 */
2919 &hf_rtps_flag_reserved10, /* Bit 4 */
2920 &hf_rtps_flag_reserved08, /* Bit 3 */
2921 &hf_rtps_flag_reserved04, /* Bit 2 */
2922 &hf_rtps_flag_reserved02, /* Bit 1 */
2923 &hf_rtps_flag_endianness, /* Bit 0 */
2924 NULL((void*)0)
2925};
2926
2927static int* const ENDPOINT_SECURITY_INFO_FLAGS[] = {
2928 &hf_rtps_flag_endpoint_security_attribute_flag_is_valid, /* Bit 31 */
2929 &hf_rtps_flag_endpoint_security_attribute_flag_is_liveliness_protected, /* Bit 6 */
2930 &hf_rtps_flag_endpoint_security_attribute_flag_is_key_protected, /* Bit 5 */
2931 &hf_rtps_flag_endpoint_security_attribute_flag_is_payload_protected, /* Bit 4 */
2932 &hf_rtps_flag_endpoint_security_attribute_flag_is_submessage_protected, /* Bit 3 */
2933 &hf_rtps_flag_endpoint_security_attribute_flag_is_discovery_protected, /* Bit 2 */
2934 &hf_rtps_flag_endpoint_security_attribute_flag_is_write_protected, /* Bit 1 */
2935 &hf_rtps_flag_endpoint_security_attribute_flag_is_read_protected, /* Bit 0 */
2936 NULL((void*)0)
2937};
2938
2939static int* const PLUGIN_ENDPOINT_SECURITY_INFO_FLAGS[] = {
2940 &hf_rtps_flag_plugin_endpoint_security_attribute_flag_is_valid, /* Bit 31 */
2941 &hf_rtps_flag_participant_security_attribute_flag_key_psk_protected, /* Bit 4 */
2942 &hf_rtps_flag_plugin_endpoint_security_attribute_flag_is_liveliness_encrypted, /* Bit 2 */
2943 &hf_rtps_flag_plugin_endpoint_security_attribute_flag_is_key_encrypted, /* Bit 1 */
2944 &hf_rtps_flag_plugin_endpoint_security_attribute_flag_is_payload_encrypted, /* Bit 0 */
2945 NULL((void*)0)
2946};
2947static int* const PARTICIPANT_SECURITY_INFO_FLAGS[] = {
2948 &hf_rtps_flag_participant_security_attribute_flag_is_valid, /* Bit 31 */
2949 &hf_rtps_flag_plugin_participant_security_attribute_flag_is_psk_encrypted, /* Bit 6 */
2950 &hf_rtps_flag_participant_security_attribute_flag_key_revisions_enabled, /* Bit 3 */
2951 &hf_rtps_flag_participant_security_attribute_flag_is_liveliness_protected, /* Bit 2 */
2952 &hf_rtps_flag_participant_security_attribute_flag_is_discovery_protected, /* Bit 1 */
2953 &hf_rtps_flag_participant_security_attribute_flag_is_rtps_protected, /* Bit 0 */
2954 NULL((void*)0)
2955};
2956
2957static int* const PLUGIN_PARTICIPANT_SECURITY_INFO_FLAGS[] = {
2958 &hf_rtps_flag_plugin_participant_security_attribute_flag_is_valid, /* Bit 31 */
2959 &hf_rtps_flag_plugin_participant_security_attribute_flag_is_liveliness_origin_encrypted, /* Bit 5 */
2960 &hf_rtps_flag_plugin_participant_security_attribute_flag_is_discovery_origin_encrypted, /* Bit 4 */
2961 &hf_rtps_flag_plugin_participant_security_attribute_flag_is_rtps_origin_encrypted, /* Bit 3 */
2962 &hf_rtps_flag_plugin_participant_security_attribute_flag_is_liveliness_encrypted, /* Bit 2 */
2963 &hf_rtps_flag_plugin_participant_security_attribute_flag_is_discovery_encrypted, /* Bit 1 */
2964 &hf_rtps_flag_plugin_participant_security_attribute_flag_is_rtps_encrypted, /* Bit 0 */
2965 NULL((void*)0)
2966};
2967
2968/* Vendor specific: RTI */
2969static int* const APP_ACK_FLAGS[] = {
2970 &hf_rtps_flag_reserved80, /* Bit 7 */
2971 &hf_rtps_flag_reserved40, /* Bit 6 */
2972 &hf_rtps_flag_reserved20, /* Bit 5 */
2973 &hf_rtps_flag_reserved10, /* Bit 4 */
2974 &hf_rtps_flag_reserved08, /* Bit 3 */
2975 &hf_rtps_flag_reserved04, /* Bit 2 */
2976 &hf_rtps_flag_reserved02, /* Bit 1 */
2977 &hf_rtps_flag_endianness, /* Bit 0 */
2978 NULL((void*)0)
2979};
2980/* Vendor specific: RTI */
2981static int* const APP_ACK_CONF_FLAGS[] = {
2982 &hf_rtps_flag_reserved80, /* Bit 7 */
2983 &hf_rtps_flag_reserved40, /* Bit 6 */
2984 &hf_rtps_flag_reserved20, /* Bit 5 */
2985 &hf_rtps_flag_reserved10, /* Bit 4 */
2986 &hf_rtps_flag_reserved08, /* Bit 3 */
2987 &hf_rtps_flag_reserved04, /* Bit 2 */
2988 &hf_rtps_flag_reserved02, /* Bit 1 */
2989 &hf_rtps_flag_endianness, /* Bit 0 */
2990 NULL((void*)0)
2991};
2992/* Vendor specific: RTI */
2993static int* const HEARTBEAT_VIRTUAL_FLAGS[] = {
2994 &hf_rtps_flag_reserved80, /* Bit 7 */
2995 &hf_rtps_flag_reserved40, /* Bit 6 */
2996 &hf_rtps_flag_reserved20, /* Bit 5 */
2997 &hf_rtps_flag_reserved10, /* Bit 4 */
2998 &hf_rtps_flag_no_virtual_guids, /* Bit 3 */
2999 &hf_rtps_flag_multiple_writers, /* Bit 2 */
3000 &hf_rtps_flag_multiple_virtual_guids, /* Bit 1 */
3001 &hf_rtps_flag_endianness, /* Bit 0 */
3002 NULL((void*)0)
3003};
3004/* Vendor specific: RTI */
3005static int* const DATA_FRAG_FLAGS[] = {
3006 &hf_rtps_flag_reserved80, /* Bit 7 */
3007 &hf_rtps_flag_reserved40, /* Bit 6 */
3008 &hf_rtps_flag_reserved20, /* Bit 5 */
3009 &hf_rtps_flag_reserved10, /* Bit 4 */
3010 &hf_rtps_flag_reserved08, /* Bit 3 */
3011 &hf_rtps_flag_hash_key_rti, /* Bit 2 */
3012 &hf_rtps_flag_inline_qos_v2, /* Bit 1 */
3013 &hf_rtps_flag_endianness, /* Bit 0 */
3014 NULL((void*)0)
3015};
3016#if 0
3017/* Vendor specific: RTI */
3018static int* const NACK_FLAGS[] = {
3019 &hf_rtps_flag_reserved80, /* Bit 7 */
3020 &hf_rtps_flag_reserved40, /* Bit 6 */
3021 &hf_rtps_flag_reserved20, /* Bit 5 */
3022 &hf_rtps_flag_reserved10, /* Bit 4 */
3023 &hf_rtps_flag_reserved08, /* Bit 3 */
3024 &hf_rtps_flag_reserved04, /* Bit 2 */
3025 &hf_rtps_flag_final, /* Bit 1 */
3026 &hf_rtps_flag_endianness, /* Bit 0 */
3027 NULL((void*)0)
3028};
3029#endif
3030
3031static int* const VENDOR_BUILTIN_ENDPOINT_FLAGS[] = {
3032 &hf_rtps_flag_participant_bootstrap_reader, /* Bit 18 */
3033 &hf_rtps_flag_participant_bootstrap_writer, /* Bit 17 */
3034 &hf_rtps_flag_monitoring_logging_reader, /* Bit 16 */
3035 &hf_rtps_flag_monitoring_logging_writer, /* Bit 15 */
3036 &hf_rtps_flag_monitoring_event_reader, /* Bit 14 */
3037 &hf_rtps_flag_monitoring_event_writer, /* Bit 13 */
3038 &hf_rtps_flag_monitoring_periodic_reader, /* Bit 12 */
3039 &hf_rtps_flag_monitoring_periodic_writer, /* Bit 11 */
3040 &hf_rtps_flag_participant_config_secure_reader, /* Bit 10 */
3041 &hf_rtps_flag_participant_config_secure_writer, /* Bit 9 */
3042 &hf_rtps_flag_participant_config_reader, /* Bit 8 */
3043 &hf_rtps_flag_participant_config_writer, /* Bit 7 */
3044 &hf_rtps_flag_cloud_discovery_service_announcer, /* Bit 6 */
3045 &hf_rtps_flag_secure_service_request_reader, /* Bit 5 */
3046 &hf_rtps_flag_secure_service_request_writer, /* Bit 4 */
3047 &hf_rtps_flag_locator_ping_reader, /* Bit 3 */
3048 &hf_rtps_flag_locator_ping_writer, /* Bit 2 */
3049 &hf_rtps_flag_service_request_reader, /* Bit 1 */
3050 &hf_rtps_flag_service_request_writer, /* Bit 0 */
3051 NULL((void*)0)
3052};
3053
3054static int* const ENDPOINT_SECURITY_ATTRIBUTES[] = {
3055 &hf_rtps_flag_security_payload_protected, /* Bit 3 */
3056 &hf_rtps_flag_security_submessage_protected, /* Bit 2 */
3057 &hf_rtps_flag_security_discovery_protected, /* Bit 1 */
3058 &hf_rtps_flag_security_access_protected, /* Bit 0 */
3059 NULL((void*)0)
3060};
3061
3062
3063static int* const RTI_SECURITY_SIMMETRIC_CIPHER_MASK_FLAGS[] = {
3064 &hf_rtps_flag_security_algorithm_compatibility_mode,
3065 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm01,
3066 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm02,
3067 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm03,
3068 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm04,
3069 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm05,
3070 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm06,
3071 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm07,
3072 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm08,
3073 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm09,
3074 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm10,
3075 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm11,
3076 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm12,
3077 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm13,
3078 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm14,
3079 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_rti_aes192_gcm,
3080 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm16,
3081 &hf_rtps_flag_security_symmetric_cipher_mask_aes256_gcm,
3082 &hf_rtps_flag_security_symmetric_cipher_mask_aes128_gcm,
3083 NULL((void*)0)
3084};
3085
3086static int* const SECURITY_SIMMETRIC_CIPHER_MASK_FLAGS[] = {
3087 &hf_rtps_flag_security_algorithm_compatibility_mode,
3088 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm01,
3089 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm02,
3090 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm03,
3091 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm04,
3092 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm05,
3093 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm06,
3094 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm07,
3095 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm08,
3096 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm09,
3097 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm10,
3098 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm11,
3099 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm12,
3100 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm13,
3101 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm14,
3102 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm15,
3103 &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm16,
3104 &hf_rtps_flag_security_symmetric_cipher_mask_aes256_gcm,
3105 &hf_rtps_flag_security_symmetric_cipher_mask_aes128_gcm,
3106 NULL((void*)0)
3107};
3108
3109static int* const COMPRESSION_ID_MASK_FLAGS[] = {
3110 &hf_rtps_flag_compression_id_lz4,
3111 &hf_rtps_flag_compression_id_bzip2,
3112 &hf_rtps_flag_compression_id_zlib,
3113 NULL((void*)0)
3114};
3115
3116static int* const RTI_SECURITY_KEY_ESTABLISHMENT_MASK_FLAGS[] = {
3117 &hf_rtps_flag_security_algorithm_compatibility_mode,
3118 &hf_rtps_flag_security_key_establishment_mask_ecdheceum_x25519,
3119 &hf_rtps_flag_security_key_establishment_mask_ecdheceum_x448,
3120 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm03,
3121 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm04,
3122 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm05,
3123 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm06,
3124 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm07,
3125 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm08,
3126 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm09,
3127 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm10,
3128 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm11,
3129 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm12,
3130 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm13,
3131 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm14,
3132 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm15,
3133 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm16,
3134 &hf_rtps_flag_security_key_establishment_mask_ecdheceum_p384,
3135 &hf_rtps_flag_security_key_establishment_mask_ecdheceum_p256,
3136 &hf_rtps_flag_security_key_establishment_mask_dhe_modp2048256,
3137 NULL((void*)0)
3138};
3139
3140static int* const SECURITY_KEY_ESTABLISHMENT_MASK_FLAGS[] = {
3141 &hf_rtps_flag_security_algorithm_compatibility_mode,
3142 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm01,
3143 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm02,
3144 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm03,
3145 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm04,
3146 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm05,
3147 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm06,
3148 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm07,
3149 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm08,
3150 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm09,
3151 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm10,
3152 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm11,
3153 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm12,
3154 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm13,
3155 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm14,
3156 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm15,
3157 &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm16,
3158 &hf_rtps_flag_security_key_establishment_mask_ecdheceum_p384,
3159 &hf_rtps_flag_security_key_establishment_mask_ecdheceum_p256,
3160 &hf_rtps_flag_security_key_establishment_mask_dhe_modp2048256,
3161 NULL((void*)0)
3162};
3163
3164static int* const RTI_SECURITY_DIGITAL_SIGNATURE_MASK_FLAGS[] = {
3165 &hf_rtps_flag_security_algorithm_compatibility_mode,
3166 &hf_rtps_flag_security_digital_signature_mask_ecdsa_ed25519_sha512,
3167 &hf_rtps_flag_security_digital_signature_mask_ecdsa_ed448_shake256,
3168 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm03,
3169 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm04,
3170 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm05,
3171 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm06,
3172 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm07,
3173 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm08,
3174 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm09,
3175 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm10,
3176 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm11,
3177 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm12,
3178 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm13,
3179 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm14,
3180 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm15,
3181 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm16,
3182 &hf_rtps_flag_security_digital_signature_mask_ecdsa_p384_sha384,
3183 &hf_rtps_flag_security_digital_signature_mask_ecdsa_p256_sha256,
3184 &hf_rtps_flag_security_digital_signature_mask_rsassapkcs1v15_2048_sha256,
3185 &hf_rtps_flag_security_digital_signature_mask_rsassapssmgf1sha256_2048_sha256,
3186 NULL((void*)0)
3187};
3188
3189static int* const SECURITY_DIGITAL_SIGNATURE_MASK_FLAGS[] = {
3190 &hf_rtps_flag_security_algorithm_compatibility_mode,
3191 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm01,
3192 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm02,
3193 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm03,
3194 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm04,
3195 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm05,
3196 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm06,
3197 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm07,
3198 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm08,
3199 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm09,
3200 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm10,
3201 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm11,
3202 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm12,
3203 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm13,
3204 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm14,
3205 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm15,
3206 &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm16,
3207 &hf_rtps_flag_security_digital_signature_mask_ecdsa_p384_sha384,
3208 &hf_rtps_flag_security_digital_signature_mask_ecdsa_p256_sha256,
3209 &hf_rtps_flag_security_digital_signature_mask_rsassapkcs1v15_2048_sha256,
3210 &hf_rtps_flag_security_digital_signature_mask_rsassapssmgf1sha256_2048_sha256,
3211 NULL((void*)0)
3212};
3213
3214static int* const HEADER_EXTENSION_MASK_FLAGS[] = {
3215 &hf_rtps_flag_header_extension_parameters, /* Bit 7 */
3216 &hf_rtps_flag_header_extension_checksum1, /* Bit 6 */
3217 &hf_rtps_flag_header_extension_checksum2, /* Bit 5 */
3218 &hf_rtps_flag_header_extension_wextension, /* Bit 4 */
3219 &hf_rtps_flag_header_extension_uextension, /* Bit 3 */
3220 &hf_rtps_flag_header_extension_timestamp, /* Bit 2 */
3221 &hf_rtps_flag_header_extension_message_length, /* Bit 1 */
3222 &hf_rtps_flag_endianness, /* Bit 0 */
3223 NULL((void*)0)
3224};
3225
3226/**TCP get DomainId feature constants**/
3227#define RTPS_UNKNOWN_DOMAIN_ID_VAL-1 -1
3228#define RTPS_UNKNOWN_DOMAIN_ID_STR"Unknown" "Unknown"
3229#define RTPS_UNKNOWN_DOMAIN_ID_STR_LENsizeof("Unknown") sizeof(RTPS_UNKNOWN_DOMAIN_ID_STR"Unknown")
3230#define RTPS_TCPMAP_DOMAIN_ID_KEY_STR"ParticipantGuid" "ParticipantGuid"
3231#define RTPS_TCPMAP_DOMAIN_ID_PROTODATA_KEY0 0
3232
3233/* Keys for mapping stuff in pinfo */
3234#define RTPS_SERVICE_REQUEST_ID_PROTODATA_KEY1 1
3235#define RTPS_DATA_SESSION_FINAL_PROTODATA_KEY2 2
3236#define RTPS_CURRENT_SUBMESSAGE_COL_DATA_KEY3 3
3237#define RTPS_ROOT_MESSAGE_KEY4 4
3238#define RTPS_DECRYPTION_INFO_KEY5 5
3239
3240#define RTPS_CHECKSUM_MAX_LEN16 16
3241
3242/* End of TCP get DomainId feature constants */
3243
3244typedef struct _participant_info {
3245 int domainId;
3246} participant_info;
3247
3248typedef struct _datawriter_qos {
3249 uint32_t reliability_kind;
3250 uint32_t durability_kind;
3251 uint32_t ownership_kind;
3252} datawriter_qos;
3253
3254#define MAX_TOPIC_AND_TYPE_LENGTH256 256
3255typedef struct _type_mapping {
3256 endpoint_guid guid;
3257 char type_name[MAX_TOPIC_AND_TYPE_LENGTH256];
3258 char topic_name[MAX_TOPIC_AND_TYPE_LENGTH256];
3259 int fields_visited;
3260 datawriter_qos dw_qos;
3261 uint32_t dcps_publication_frame_number;
3262 uint64_t type_id;
3263} type_mapping;
3264
3265/* Links a coherent set with an specific writer. Useful to detect if an empty packet is the end of a coherent set */
3266typedef struct _coherent_set_entity_info {
3267 endpoint_guid guid;
3268 uint64_t writer_seq_number;
3269 uint64_t coherent_set_seq_number;
3270 uint64_t expected_coherent_set_end_writers_seq_number;
3271} coherent_set_entity_info;
3272
3273typedef struct _coherent_set_key {
3274 endpoint_guid guid;
3275 uint64_t coherent_set_seq_number;
3276} coherent_set_key;
3277
3278/* Holds information about the coherent set */
3279typedef struct _coherent_set_info {
3280 coherent_set_key *key;
3281 uint64_t writer_seq_number;
3282 bool_Bool is_set;
3283} coherent_set_info;
3284
3285/* Links a writer_seq_number with a coherent set. Useful when coherent set ends with parameter empty packet*/
3286typedef struct _coherent_set_end {
3287 uint64_t writer_seq_number;
3288 coherent_set_key coherent_set_id;
3289} coherent_set_end;
3290
3291typedef struct _coherent_set_track {
3292 wmem_map_t *entities_using_map;
3293 wmem_map_t *coherent_set_registry_map;
3294} coherent_set_track;
3295
3296static coherent_set_track coherent_set_tracking;
3297static wmem_map_t * registry;
3298static reassembly_table rtps_reassembly_table;
3299static wmem_map_t *discovered_participants_domain_ids;
3300
3301
3302typedef struct {
3303 type_mapping instance_state_data_response_type_mapping;
3304} builtin_types_type_mappings;
3305
3306typedef struct {
3307 dissection_info instance_state_data_response_dissection_info;
3308 dissection_info alive_instances_dissection_info;
3309 dissection_info disposed_instances_dissection_info;
3310 dissection_info unregistered_instances_dissection_info;
3311 dissection_info guid_t_dissection_info;
3312 dissection_info value_dissection_info;
3313 dissection_info instance_transition_data_dissection_info;
3314 dissection_info key_hash_value_dissection_info;
3315 dissection_info array_16_byte_dissection_info;
3316 dissection_info ntptime_t_dissection_info;
3317 dissection_info sequence_number_t_dissection_info;
3318 dissection_info serialized_key_dissection_info;
3319 dissection_info payload_dissection_info;
3320} builtin_types_dissection_infos;
3321
3322
3323/* Dissection info of types that are sent as user data but doesn't publish discovery data */
3324typedef struct {
3325 builtin_types_type_mappings type_mappings;
3326 builtin_types_dissection_infos dissection_infos;
3327} builtin_types_dissection_data_t;
3328
3329static builtin_types_dissection_data_t builtin_types_dissection_data;
3330
3331/*
3332static type_mapping instance_state_data_response_type_mapping;
3333static dissection_info instance_state_data_response_dissection_info;
3334static dissection_info alive_instances_dissection_info;
3335static dissection_info disposed_instances_dissection_info;
3336static dissection_info unregistered_instances_dissection_info;
3337static dissection_info writer_guid_dissection_info;
3338static dissection_info reader_guid_dissection_info;
3339static dissection_info value_dissection_info;
3340*/
3341
3342static const fragment_items rtps_frag_items = {
3343 &ett_rtps_fragment,
3344 &ett_rtps_fragments,
3345 &hf_rtps_fragments,
3346 &hf_rtps_fragment,
3347 &hf_rtps_fragment_overlap,
3348 &hf_rtps_fragment_overlap_conflict,
3349 &hf_rtps_fragment_multiple_tails,
3350 &hf_rtps_fragment_too_long_fragment,
3351 &hf_rtps_fragment_error,
3352 &hf_rtps_fragment_count,
3353 &hf_rtps_reassembled_in,
3354 &hf_rtps_reassembled_length,
3355 &hf_rtps_reassembled_data,
3356 "RTPS fragments"
3357};
3358
3359/******************************************************************************/
3360/* PRE-SHARED KEY DECODING FUNCTIONALITY */
3361/******************************************************************************/
3362#define RTPS_HMAC_256_BUFFER_SIZE_BYTES32 32
3363
3364typedef struct {
3365 uint32_t host_id;
3366 uint32_t app_id;
3367 uint32_t instance_id;
3368} rtps_guid_prefix_t;
3369
3370typedef enum {
3371 CRYPTO_ALGORITHM_NONE = CRYPTO_TRANSFORMATION_KIND_NONE(0),
3372 CRYPTO_ALGORITHM_AES128_GMAC = CRYPTO_TRANSFORMATION_KIND_AES128_GMAC(1),
3373 CRYPTO_ALGORITHM_AES128_GCM = CRYPTO_TRANSFORMATION_KIND_AES128_GCM(2),
3374 CRYPTO_ALGORITHM_AES256_GMAC = CRYPTO_TRANSFORMATION_KIND_AES256_GMAC(3),
3375 CRYPTO_ALGORITHM_AES256_GCM = CRYPTO_TRANSFORMATION_KIND_AES256_GCM(4)
3376} rtps_encryption_algorithm_t;
3377
3378#define RTPS_SECURITY_INIT_VECTOR_LEN12 12
3379typedef struct {
3380 rtps_guid_prefix_t guid_prefix;
3381 bool_Bool try_psk_decryption;
3382 bool_Bool is_aad_enabled;
3383 uint32_t session_id;
3384 uint32_t transformation_key;
3385 rtps_encryption_algorithm_t algorithm;
3386 uint8_t init_vector[RTPS_SECURITY_INIT_VECTOR_LEN12];
3387 uint8_t *additional_authenticated_data;
3388 /* True if using Header Extension. */
3389 bool_Bool additional_authenticated_data_allocated;
3390 size_t aad_length;
3391 uint32_t psk_index;
3392} rtps_current_packet_decryption_info_t;
3393
3394typedef struct {
3395 uint32_t value;
3396 bool_Bool ignore;
3397} rtps_psk_options_entry_uint32_string_t;
3398
3399typedef struct {
3400 char *passphrase_secret;
3401
3402 char *passphrase_id_in;
3403 rtps_psk_options_entry_uint32_string_t passphrase_id;
3404
3405 char *host_id_in;
3406 rtps_psk_options_entry_uint32_string_t host_id;
3407
3408 char *app_id_in;
3409 rtps_psk_options_entry_uint32_string_t app_id;
3410
3411 char *instance_id_in;
3412 rtps_psk_options_entry_uint32_string_t instance_id;
3413
3414} rtps_psk_options_entry_t;
3415
3416/* PSK table options in RTPS protocol options */
3417typedef struct {
3418 rtps_psk_options_entry_t *entries;
3419 unsigned size;
3420} rtps_psk_options_t;
3421
3422static rtps_psk_options_t rtps_psk_options = { NULL((void*)0), 0 };
3423
3424/*
3425 * The table presented to the user has five columns: psk_index_str, psk,
3426 * host_id, app_id, and instance_id. Decoding of the RTPS message using the
3427 * pre-shared key will only take place if there is a match in the host_id,
3428 * app_id, instance_id, and psk_index. These fields do not require a match if
3429 * the user leaves them empty or containing only the '*' wildcard character
3430 * (note that the the psk secret passphrase must always match). Ignoring all the
3431 * previuos fields will result in an attempt to decode the RTPS message
3432 * regardless of the GUID or the PSK index.
3433 */
3434UAT_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; } }
3435 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; } }
3436 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; } }
3437UAT_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; } }
3438 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; } }
3439 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; } }
3440UAT_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; } }
3441 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; } }
3442 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; } }
3443UAT_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; } }
3444 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; } }
3445 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; } }
3446UAT_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; } }
3447 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; } }
3448 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; } }
3449
3450static uat_field_t rtps_psk_table_field_array[] = {
3451 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)}
3452 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)}
3453 "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)}
3454 "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)}
3455 "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)}
,
3456 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)}
3457 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)}
3458 "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)}
3459 "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)}
,
3460 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)}
3461 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)}
3462 "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)}
3463 "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)}
3464 "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)}
,
3465 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)}
3466 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)}
3467 "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)}
3468 "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)}
3469 "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)}
,
3470 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)}
3471 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)}
3472 "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)}
3473 "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)}
3474 "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)}
,
3475 UAT_END_FIELDS{((void*)0),((void*)0),PT_TXTMOD_NONE,{0,0,0},{0,0,0},0,0,((void
*)0)}
3476};
3477
3478static void *rtps_psk_options_copy_entry(
3479 void *destination,
3480 const void *source,
3481 size_t length _U___attribute__((unused)))
3482{
3483 const rtps_psk_options_entry_t *src = source;
3484 rtps_psk_options_entry_t *dest = destination;
3485
3486 dest->passphrase_secret = g_strdup(src->passphrase_secret)g_strdup_inline (src->passphrase_secret);
3487
3488 dest->passphrase_id = src->passphrase_id;
3489 dest->passphrase_id_in = g_strdup(src->passphrase_id_in)g_strdup_inline (src->passphrase_id_in);
3490
3491 dest->host_id = src->host_id;
3492 dest->host_id_in = g_strdup(src->host_id_in)g_strdup_inline (src->host_id_in);
3493
3494 dest->app_id = src->app_id;
3495 dest->app_id_in = g_strdup(src->app_id_in)g_strdup_inline (src->app_id_in);
3496
3497 dest->instance_id = src->instance_id;
3498 dest->instance_id_in = g_strdup(src->instance_id_in)g_strdup_inline (src->instance_id_in);
3499
3500 return dest;
3501}
3502
3503static void rtps_psk_options_free_entry(void *record)
3504{
3505 rtps_psk_options_entry_t *entry = record;
3506
3507 g_free(entry->passphrase_secret);
3508 entry->passphrase_secret = NULL((void*)0);
3509
3510 g_free(entry->passphrase_id_in);
3511 entry->passphrase_id_in = NULL((void*)0);
3512
3513 g_free(entry->host_id_in);
3514 entry->host_id_in = NULL((void*)0);
3515
3516 g_free(entry->app_id_in);
3517 entry->app_id_in = NULL((void*)0);
3518
3519 g_free(entry->instance_id_in);
3520 entry->instance_id_in = NULL((void*)0);
3521 return;
3522}
3523
3524static bool_Bool rtps_psk_options_entry_uint32_string_validate(
3525 char **error_string,
3526 rtps_psk_options_entry_uint32_string_t *out,
3527 char *in,
3528 const char *field_name)
3529{
3530 if (in == NULL((void*)0) || strlen(in) == 0 || in[0] == '*') {
3531 out->ignore = true1;
3532 } else {
3533 if (!ws_strtou32(in, NULL((void*)0), &out->value)) {
3534 *error_string = g_strdup_printf(
3535 "The '%s' field must be either the '*' wildcard character, or a "
3536 "valid integer.",
3537 field_name);
3538 return false0;
3539 }
3540 }
3541 return true1;
3542}
3543
3544static bool_Bool rtps_psk_options_update_entry(void *record, char **error_string)
3545{
3546 size_t PASSPHRASE_MAX_LENGTH = 512; /* fixed by specification. */
3547 rtps_psk_options_entry_t *entry = record;
3548 size_t passphrase_length = 0;
3549
3550 /* Validation of the Passphrase Id. */
3551 if (!rtps_psk_options_entry_uint32_string_validate(
3552 error_string,
3553 &entry->passphrase_id,
3554 entry->passphrase_id_in,
3555 "Passphrase Id")) {
3556 return false0;
3557 }
3558
3559 /* Validation of the Passphrase Secret. */
3560 if (entry->passphrase_secret == NULL((void*)0)) {
3561 *error_string = g_strdup("The 'Passphrase Secret' field can't be empty")g_strdup_inline ("The 'Passphrase Secret' field can't be empty"
)
;
3562 return false0;
3563 }
3564 g_strstrip(entry->passphrase_secret)g_strchomp (g_strchug (entry->passphrase_secret));
3565
3566 passphrase_length = strlen(entry->passphrase_secret);
3567 if (passphrase_length == 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 if (passphrase_length > (PASSPHRASE_MAX_LENGTH - 1)) {
3572 *error_string = g_strdup_printf(
3573 "The 'Passphrase Secret' field has %zu characters length. "
3574 "It cannot be larger than %zu characters.",
3575 passphrase_length,
3576 PASSPHRASE_MAX_LENGTH - 1); /* last byte is for null character. */
3577 return false0;
3578 }
3579
3580 /* Validation of the Host Id. */
3581 if (!rtps_psk_options_entry_uint32_string_validate(
3582 error_string,
3583 &entry->host_id,
3584 entry->host_id_in,
3585 "Host Id")) {
3586 return false0;
3587 }
3588
3589 /* Validation of the App Id. */
3590 if (!rtps_psk_options_entry_uint32_string_validate(
3591 error_string,
3592 &entry->app_id,
3593 entry->app_id_in,
3594 "App Id")) {
3595 return false0;
3596 }
3597
3598 /* Validation of the Instance Id. */
3599 if (!rtps_psk_options_entry_uint32_string_validate(
3600 error_string,
3601 &entry->instance_id,
3602 entry->instance_id_in,
3603 "Instance Id")) {
3604 return false0;
3605 }
3606
3607 return true1;
3608}
3609/* End of PSK table options */
3610
3611static void rtps_current_packet_decryption_info_reset(
3612 rtps_current_packet_decryption_info_t *info)
3613{
3614 rtps_guid_prefix_t guid_prefix_zero = {0, 0, 0};
3615
3616 info->guid_prefix = guid_prefix_zero;
3617 info->try_psk_decryption = false0;
3618 info->is_aad_enabled = false0;
3619 info->session_id = 0;
3620 info->transformation_key = 0;
3621 info->algorithm = CRYPTO_ALGORITHM_NONE;
3622 memset(info->init_vector, 0, RTPS_SECURITY_INIT_VECTOR_LEN12);
3623 if (info->additional_authenticated_data_allocated
3624 && info->additional_authenticated_data != NULL((void*)0)) {
3625 g_free(info->additional_authenticated_data);
3626 }
3627 info->additional_authenticated_data = NULL((void*)0);
3628 info->additional_authenticated_data_allocated = false0;
3629 info->aad_length = 0;
3630 info->psk_index = 0;
3631 return;
3632}
3633
3634/* ----------------------- PSK Session Key Generation ---------------------- */
3635/*
3636 * The session key is calculated as follows:
3637 * HMAC-SHA256(
3638 * master_sender_key,
3639 * "SessionKey" | master_sender_salt | session_id)
3640 *
3641 * This is implemented in rtps_psk_generate_session_key.
3642 *
3643 * Each component of the above formula can be obtained as follows:
3644 *
3645 * - master_sender_key and master_sender_salt 32 bytes element computed from:
3646 * HMAC-SHA256(prk_key, <derivation_suffix> | 0x01)
3647 *
3648 * - prk_key: Implemented in rtps_psk_generate_prk_key.
3649 * HMAC-SHA256(public_salt_for_master_key, preshared_secret_key)
3650 *
3651 * - public_salt_for_master_key (256 bits): Implemented in
3652 * rtps_generate_public_salt.
3653 * concatenate(
3654 * <prk_prefix> (64 bits),
3655 * <sender_key_id> (32 bits),
3656 * RTPS header (160 bits))
3657 * - preshared_secret_key: Secret key given by the user in the
3658 * dialog.
3659 *
3660 * Where <derivation_suffix> is equal to "master sender key derivation" for
3661 * the master_sender_key and "master salt derivation" for the
3662 * master_sender_salt.
3663 *
3664 * Where <prk_prefix> is equal to "PSK-SKEY" for the master_sender_key and
3665 * "PSK-SALT" for the master_sender_salt.
3666 *
3667 * Where <sender_key_id> is sent in the transformation_key_id field of the
3668 * crypto header (only when the message is encoded using PSK).
3669 *
3670 * This is implemented in rtps_psk_generate_master_sender.
3671 *
3672 * - session_id: We can read the session_id from the crypto header of the
3673 * SRTPS_PREFIX submessage.
3674 * Note: The session_id is a counter starting at zero and increased by one
3675 * every time we have encoded a specific number of messages.
3676 */
3677static bool_Bool rtps_psk_generate_master_sender(
3678 uint8_t *output,
3679 bool_Bool is_salt,
3680 const char* preshared_secret_key,
3681 uint32_t sender_key_id,
3682 tvbuff_t *rtps_header_tvb,
3683 int rtps_header_tvb_offset);
3684
3685static gcry_error_t rtps_util_generate_hmac_sha256(
3686 void *output,
3687 const void *key,
3688 size_t key_length,
3689 const void *data,
3690 size_t datalen);
3691
3692/**
3693 * @brief Generate the session key that will be used to decrypt PSK-encoded RTPS
3694 * messages. It requires the pre-shared secret key known and given by the user,
3695 * the RTPS header, and two fields (sender key id and session id) sent on the
3696 * wire.
3697 */
3698static bool_Bool rtps_psk_generate_session_key(
3699 uint8_t *session_key, /* output. */
3700 size_t *session_key_length, /* output. */
3701 packet_info *pinfo,
3702 const char *preshared_secret_key,
3703 uint32_t sender_key_id,
3704 uint32_t session_id,
3705 rtps_encryption_algorithm_t algorithm)
3706{
3707 const char *sessionKeyString = "SessionKey";
3708 rtps_tvb_field* rtps_root = NULL((void*)0);
3709 uint8_t sender_key[RTPS_HMAC_256_BUFFER_SIZE_BYTES32];
3710 /*
3711 * Must be big enough to fit the sessionKeyString, the master sender key and
3712 * the session id.
3713 */
3714 uint8_t input[50];
3715 size_t offset = 0;
3716
3717 if (algorithm == CRYPTO_ALGORITHM_AES256_GCM
3718 || algorithm == CRYPTO_ALGORITHM_AES256_GMAC) {
3719 *session_key_length = RTPS_HMAC_256_BUFFER_SIZE_BYTES32;
3720 } else {
3721 /* 128 bits for AES128. */
3722 *session_key_length = RTPS_HMAC_256_BUFFER_SIZE_BYTES32 / 2;
3723 }
3724
3725 rtps_root = (rtps_tvb_field*) p_get_proto_data(
3726 pinfo->pool,
3727 pinfo,
3728 proto_rtps,
3729 RTPS_ROOT_MESSAGE_KEY4);
3730 if (rtps_root == NULL((void*)0) || session_key == NULL((void*)0)) {
3731 return false0;
3732 }
3733
3734 memcpy(input, sessionKeyString, strlen(sessionKeyString));
3735 offset += strlen(sessionKeyString);
3736
3737 if (!rtps_psk_generate_master_sender(
3738 input + offset,
3739 true1, /* is_salt. */
3740 preshared_secret_key,
3741 sender_key_id,
3742 rtps_root->tvb,
3743 rtps_root->tvb_offset)) {
3744 return false0;
3745 }
3746 offset += *session_key_length;
3747
3748 memcpy(
3749 input + offset,
3750 &session_id,
3751 sizeof(uint32_t));
3752 offset += sizeof(uint32_t);
3753
3754 if (!rtps_psk_generate_master_sender(
3755 sender_key,
3756 false0, /* is_salt. */
3757 preshared_secret_key,
3758 sender_key_id,
3759 rtps_root->tvb,
3760 rtps_root->tvb_offset)) {
3761 return false0;
3762 }
3763
3764 return rtps_util_generate_hmac_sha256(
3765 session_key,
3766 sender_key,
3767 *session_key_length,
3768 input,
3769 offset) == GPG_ERR_NO_ERROR;
3770}
3771
3772static bool_Bool rtps_psk_generate_prk_key(
3773 uint8_t *output,
3774 const char *prefix,
3775 const char *preshared_secret_key,
3776 uint32_t sender_key_id,
3777 tvbuff_t *rtps_header_tvb,
3778 int rtps_header_tvb_offset);
3779
3780/**
3781 * @brief Generate the master sender key or master sender salt (depending on the
3782 * is_salt parameter) that will be used to derive the session key.
3783 */
3784static bool_Bool rtps_psk_generate_master_sender(
3785 uint8_t *output,
3786 bool_Bool is_salt,
3787 const char* preshared_secret_key,
3788 uint32_t sender_key_id,
3789 tvbuff_t *rtps_header_tvb,
3790 int rtps_header_tvb_offset)
3791{
3792 const char *prk_prefix = is_salt ? "PSK-SALT" : "PSK-SKEY";
3793 const char *suffix = is_salt ?
3794 "master salt derivation" :
3795 "master sender key derivation";
3796 uint8_t prk_key[RTPS_HMAC_256_BUFFER_SIZE_BYTES32];
3797 /* Must be big enough to fit the largest suffix and the 0x1 constant byte. */
3798 uint8_t input[50];
3799
3800 if (!rtps_psk_generate_prk_key(
3801 prk_key,
3802 prk_prefix,
3803 preshared_secret_key,
3804 sender_key_id,
3805 rtps_header_tvb,
3806 rtps_header_tvb_offset)) {
3807 return false0;
3808 }
3809
3810 memcpy(input, suffix, strlen(suffix));
3811 input[strlen(suffix)] = 0x1; /* Fixed value. */
3812
3813 return rtps_util_generate_hmac_sha256(
3814 output,
3815 prk_key,
3816 RTPS_HMAC_256_BUFFER_SIZE_BYTES32,
3817 input,
3818 strlen(suffix) + 1) == GPG_ERR_NO_ERROR;
3819}
3820
3821static void rtps_generate_public_salt(
3822 uint8_t *output,
3823 const char *prefix,
3824 uint32_t sender_key_id,
3825 tvbuff_t *rtps_header_tvb,
3826 int rtps_header_tvb_offset);
3827
3828/**
3829 * @brief Compute the Pseudo-Random Key; an intermediate step to get the
3830 * master sender. This function computes:
3831 * HMAC-SHA256(
3832 * concatenate(prefix, sender_key_id. rtps_header),
3833 * preshared_secret_key)
3834 */
3835static bool_Bool rtps_psk_generate_prk_key(
3836 uint8_t *output,
3837 const char *prefix,
3838 const char *preshared_secret_key,
3839 uint32_t sender_key_id,
3840 tvbuff_t *rtps_header_tvb,
3841 int rtps_header_tvb_offset)
3842{
3843 gcry_error_t error = GPG_ERR_NO_ERROR;
3844 uint8_t public_salt[RTPS_HMAC_256_BUFFER_SIZE_BYTES32];
3845
3846 rtps_generate_public_salt(
3847 public_salt,
3848 prefix,
3849 sender_key_id,
3850 rtps_header_tvb,
3851 rtps_header_tvb_offset);
3852
3853 error = rtps_util_generate_hmac_sha256(
3854 output,
3855 public_salt,
3856 RTPS_HMAC_256_BUFFER_SIZE_BYTES32,
3857 preshared_secret_key,
3858 strlen(preshared_secret_key));
3859 return error == GPG_ERR_NO_ERROR;
3860}
3861
3862/**
3863 * @brief Generates the public salt that can be used to derive the prk_key
3864 * and prk_salt Pseudo-Random Keys.
3865 *
3866 * It does the concatenation of:
3867 * concatenate(
3868 * <8-byte prefix>,
3869 * <4-byte sender's key id>,
3870 * <20-byte RTPS header>)
3871 * So output must be a 32-byte buffer (i.e. RTPS_HMAC_256_BUFFER_SIZE_BYTES).
3872 */
3873static void rtps_generate_public_salt(
3874 uint8_t *output,
3875 const char *prefix,
3876 uint32_t sender_key_id,
3877 tvbuff_t *rtps_header_tvb,
3878 int rtps_header_tvb_offset)
3879{
3880 size_t offset = 0;
3881
3882 /* Copy the 8-byte prefix. */
3883 memcpy(output, prefix, strlen(prefix));
3884 offset += strlen(prefix);
3885
3886 /* Copy the 4-byte sender's key id. */
3887 memcpy(output + offset, &sender_key_id, sizeof(uint32_t));
3888 offset += sizeof(uint32_t);
3889
3890 /* Copy the 20-byte RTPS header. */
3891 tvb_memcpy(
3892 rtps_header_tvb,
3893 output + offset,
3894 rtps_header_tvb_offset,
3895 20); /* RTPS HEADER SIZE. */
3896
3897 return;
3898}
3899
3900/**
3901 * @brief Compute the HMAC-SHA256 of the data using the key.
3902 * This function is required to derive the PSK session key.
3903 */
3904static gcry_error_t rtps_util_generate_hmac_sha256(
3905 void *output,
3906 const void *key,
3907 size_t key_length,
3908 const void *data,
3909 size_t datalen)
3910{
3911 gcry_mac_hd_t hmac;
3912 gcry_error_t error = GPG_ERR_NO_ERROR;
3913 size_t OUTPUT_SIZE = RTPS_HMAC_256_BUFFER_SIZE_BYTES32;
3914
3915 error = gcry_mac_open(&hmac, GCRY_MAC_HMAC_SHA256, 0, NULL((void*)0));
3916 if (error != GPG_ERR_NO_ERROR) {
3917 gcry_mac_close(hmac);
3918 return error;
3919 }
3920
3921 error = gcry_mac_setkey(hmac, key, key_length);
3922 if (error != GPG_ERR_NO_ERROR) {
3923 gcry_mac_close(hmac);
3924 return error;
3925 }
3926
3927 error = gcry_mac_write(hmac, data, datalen);
3928 if (error != GPG_ERR_NO_ERROR) {
3929 gcry_mac_close(hmac);
3930 return error;
3931 }
3932
3933 error = gcry_mac_read(hmac, output, &OUTPUT_SIZE);
3934 if (error != GPG_ERR_NO_ERROR) {
3935 gcry_mac_close(hmac);
3936 ws_warning("Failure: %s/%s",do { if (1) { ws_log_full("packet-rtps", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 3938, __func__, "Failure: %s/%s", gcry_strsource (error), gcry_strerror
(error)); } } while (0)
3937 gcry_strsource (error),do { if (1) { ws_log_full("packet-rtps", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 3938, __func__, "Failure: %s/%s", gcry_strsource (error), gcry_strerror
(error)); } } while (0)
3938 gcry_strerror (error))do { if (1) { ws_log_full("packet-rtps", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 3938, __func__, "Failure: %s/%s", gcry_strsource (error), gcry_strerror
(error)); } } while (0)
;
3939 return error;
3940 }
3941
3942 gcry_mac_close(hmac);
3943 return error;
3944}
3945/* ------------------------------------------------------------------------- */
3946
3947/**
3948 * @brief Translate between the RTPS and gcrypt types.
3949 */
3950static int rtps_encryption_algorithm_to_gcry_enum(
3951 rtps_encryption_algorithm_t rtps_enum_in,
3952 int *gcry_cipher_mode_out)
3953{
3954 if (gcry_cipher_mode_out == NULL((void*)0)) {
3955 return -1;
3956 }
3957 switch(rtps_enum_in) {
3958 case CRYPTO_ALGORITHM_AES128_GMAC:
3959 *gcry_cipher_mode_out = GCRY_CIPHER_MODE_CCM;
3960 return GCRY_CIPHER_AES128GCRY_CIPHER_AES;
3961 case CRYPTO_ALGORITHM_AES128_GCM:
3962 *gcry_cipher_mode_out = GCRY_CIPHER_MODE_GCM;
3963 return GCRY_CIPHER_AES128GCRY_CIPHER_AES;
3964 case CRYPTO_ALGORITHM_AES256_GMAC:
3965 *gcry_cipher_mode_out = GCRY_CIPHER_MODE_CCM;
3966 return GCRY_CIPHER_AES256;
3967 case CRYPTO_ALGORITHM_AES256_GCM:
3968 *gcry_cipher_mode_out = GCRY_CIPHER_MODE_GCM;
3969 return GCRY_CIPHER_AES256;
3970 case CRYPTO_ALGORITHM_NONE:
3971 default:
3972 *gcry_cipher_mode_out = GCRY_CIPHER_MODE_NONE;
3973 return GCRY_CIPHER_NONE;
3974 }
3975}
3976
3977static gcry_error_t rtps_util_decrypt_data(
3978 uint8_t *encrypted_data,
3979 size_t encrypted_data_size,
3980 uint8_t *key,
3981 size_t key_length,
3982 uint8_t *init_vector,
3983 uint8_t *tag,
3984 const uint8_t *aad,
3985 size_t aad_length,
3986 rtps_encryption_algorithm_t algorithm)
3987{
3988 gcry_error_t err = GPG_ERR_NO_ERROR;
3989 gcry_cipher_hd_t cipher_hd;
3990 int encryption_algo;
3991 int encryption_mode = 0;
3992
3993 encryption_algo = rtps_encryption_algorithm_to_gcry_enum(
3994 algorithm,
3995 &encryption_mode);
3996
3997 err = gcry_cipher_open(
3998 &cipher_hd,
3999 encryption_algo,
4000 encryption_mode,
4001 0);
4002 if (err != GPG_ERR_NO_ERROR) {
4003 ws_warning(do { if (1) { ws_log_full("packet-rtps", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 4006, __func__, "GCRY: cipher open %s/%s\n", gcry_strsource
(err), gcry_strerror(err)); } } while (0)
4004 "GCRY: cipher open %s/%s\n",do { if (1) { ws_log_full("packet-rtps", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 4006, __func__, "GCRY: cipher open %s/%s\n", gcry_strsource
(err), gcry_strerror(err)); } } while (0)
4005 gcry_strsource(err),do { if (1) { ws_log_full("packet-rtps", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 4006, __func__, "GCRY: cipher open %s/%s\n", gcry_strsource
(err), gcry_strerror(err)); } } while (0)
4006 gcry_strerror(err))do { if (1) { ws_log_full("packet-rtps", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 4006, __func__, "GCRY: cipher open %s/%s\n", gcry_strsource
(err), gcry_strerror(err)); } } while (0)
;
4007 return err;
4008 }
4009
4010 err = gcry_cipher_setkey(cipher_hd, key, key_length);
4011 if (err != GPG_ERR_NO_ERROR) {
4012 ws_warning(do { if (1) { ws_log_full("packet-rtps", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 4015, __func__, "GCRY: setkey %s/%s\n", gcry_strsource(err)
, gcry_strerror(err)); } } while (0)
4013 "GCRY: setkey %s/%s\n",do { if (1) { ws_log_full("packet-rtps", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 4015, __func__, "GCRY: setkey %s/%s\n", gcry_strsource(err)
, gcry_strerror(err)); } } while (0)
4014 gcry_strsource(err),do { if (1) { ws_log_full("packet-rtps", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 4015, __func__, "GCRY: setkey %s/%s\n", gcry_strsource(err)
, gcry_strerror(err)); } } while (0)
4015 gcry_strerror(err))do { if (1) { ws_log_full("packet-rtps", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 4015, __func__, "GCRY: setkey %s/%s\n", gcry_strsource(err)
, gcry_strerror(err)); } } while (0)
;
4016 gcry_cipher_close(cipher_hd);
4017 return err;
4018 }
4019
4020 if (init_vector != NULL((void*)0)) {
4021 err = gcry_cipher_setiv(
4022 cipher_hd,
4023 init_vector,
4024 RTPS_SECURITY_INIT_VECTOR_LEN12);
4025 if (err != GPG_ERR_NO_ERROR) {
4026 ws_warning(do { if (1) { ws_log_full("packet-rtps", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 4029, __func__, "GCRY: setiv %s/%s\n", gcry_strsource(err),
gcry_strerror(err)); } } while (0)
4027 "GCRY: setiv %s/%s\n",do { if (1) { ws_log_full("packet-rtps", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 4029, __func__, "GCRY: setiv %s/%s\n", gcry_strsource(err),
gcry_strerror(err)); } } while (0)
4028 gcry_strsource(err),do { if (1) { ws_log_full("packet-rtps", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 4029, __func__, "GCRY: setiv %s/%s\n", gcry_strsource(err),
gcry_strerror(err)); } } while (0)
4029 gcry_strerror(err))do { if (1) { ws_log_full("packet-rtps", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 4029, __func__, "GCRY: setiv %s/%s\n", gcry_strsource(err),
gcry_strerror(err)); } } while (0)
;
4030 gcry_cipher_close(cipher_hd);
4031 return err;
4032 }
4033 }
4034
4035 if (aad != NULL((void*)0)) {
4036 err = gcry_cipher_authenticate(cipher_hd, aad, aad_length);
4037 if (err != GPG_ERR_NO_ERROR) {
4038 ws_warning(do { if (1) { ws_log_full("packet-rtps", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 4041, __func__, "GCRY: authenticate %s/%s\n", gcry_strsource
(err), gcry_strerror(err)); } } while (0)
4039 "GCRY: authenticate %s/%s\n",do { if (1) { ws_log_full("packet-rtps", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 4041, __func__, "GCRY: authenticate %s/%s\n", gcry_strsource
(err), gcry_strerror(err)); } } while (0)
4040 gcry_strsource(err),do { if (1) { ws_log_full("packet-rtps", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 4041, __func__, "GCRY: authenticate %s/%s\n", gcry_strsource
(err), gcry_strerror(err)); } } while (0)
4041 gcry_strerror(err))do { if (1) { ws_log_full("packet-rtps", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 4041, __func__, "GCRY: authenticate %s/%s\n", gcry_strsource
(err), gcry_strerror(err)); } } while (0)
;
4042 gcry_cipher_close(cipher_hd);
4043 return err;
4044 }
4045 }
4046
4047 err = gcry_cipher_decrypt(
4048 cipher_hd,
4049 encrypted_data,
4050 encrypted_data_size,
4051 NULL((void*)0),
4052 0);
4053 if (err != GPG_ERR_NO_ERROR) {
4054 ws_warning(do { if (1) { ws_log_full("packet-rtps", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 4057, __func__, "GCRY: decrypt %s/%s\n", gcry_strsource(err
), gcry_strerror(err)); } } while (0)
4055 "GCRY: decrypt %s/%s\n",do { if (1) { ws_log_full("packet-rtps", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 4057, __func__, "GCRY: decrypt %s/%s\n", gcry_strsource(err
), gcry_strerror(err)); } } while (0)
4056 gcry_strsource(err),do { if (1) { ws_log_full("packet-rtps", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 4057, __func__, "GCRY: decrypt %s/%s\n", gcry_strsource(err
), gcry_strerror(err)); } } while (0)
4057 gcry_strerror(err))do { if (1) { ws_log_full("packet-rtps", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 4057, __func__, "GCRY: decrypt %s/%s\n", gcry_strsource(err
), gcry_strerror(err)); } } while (0)
;
4058 gcry_cipher_close(cipher_hd);
4059 return err;
4060 }
4061
4062 if (tag != NULL((void*)0)) {
4063 err = gcry_cipher_checktag(cipher_hd, tag, SECURE_TAG_COMMON_AND_SPECIFIC_MAC_LENGTH16);
4064 if (err != GPG_ERR_NO_ERROR) {
4065 ws_warning(do { if (1) { ws_log_full("packet-rtps", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 4068, __func__, "GCRY: Decryption (checktag) failed: %s/%s\n"
, gcry_strsource(err), gcry_strerror(err)); } } while (0)
4066 "GCRY: Decryption (checktag) failed: %s/%s\n",do { if (1) { ws_log_full("packet-rtps", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 4068, __func__, "GCRY: Decryption (checktag) failed: %s/%s\n"
, gcry_strsource(err), gcry_strerror(err)); } } while (0)
4067 gcry_strsource(err),do { if (1) { ws_log_full("packet-rtps", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 4068, __func__, "GCRY: Decryption (checktag) failed: %s/%s\n"
, gcry_strsource(err), gcry_strerror(err)); } } while (0)
4068 gcry_strerror(err))do { if (1) { ws_log_full("packet-rtps", LOG_LEVEL_WARNING, "epan/dissectors/packet-rtps.c"
, 4068, __func__, "GCRY: Decryption (checktag) failed: %s/%s\n"
, gcry_strsource(err), gcry_strerror(err)); } } while (0)
;
4069 }
4070 }
4071
4072 gcry_cipher_close(cipher_hd);
4073 return err;
4074}
4075
4076/**
4077 * @brief Generates the session key and uses it to decrypt the secure payload.
4078 * The decrypted payload is stored in an allocated buffer using the allocator
4079 * passed as parameter.
4080 */
4081static uint8_t *rtps_decrypt_secure_payload(
4082 uint8_t *session_key, /* output. */
4083 size_t *session_key_length, /* output. */
4084 tvbuff_t *tvb,
4085 packet_info *pinfo,
4086 int offset,
4087 size_t secure_payload_len,
4088 uint8_t *preshared_secret_key,
4089 rtps_current_packet_decryption_info_t *decryption_info,
4090 uint8_t *tag,
4091 gcry_error_t* error,
4092 wmem_allocator_t *allocator)
4093{
4094 uint8_t *secure_body_ptr;
4095 uint8_t *aad = decryption_info->is_aad_enabled ?
4096 decryption_info->additional_authenticated_data :
4097 NULL((void*)0);
4098
4099 if (!rtps_psk_generate_session_key(
4100 session_key, /* output. */
4101 session_key_length, /* output. */
4102 pinfo,
4103 preshared_secret_key,
4104 decryption_info->transformation_key,
4105 decryption_info->session_id,
4106 decryption_info->algorithm)) {
4107 return NULL((void*)0);
4108 }
4109
4110 secure_body_ptr = wmem_alloc0(allocator, secure_payload_len);
4111 if (secure_body_ptr == NULL((void*)0)) {
4112 return NULL((void*)0);
4113 }
4114
4115 tvb_memcpy(tvb, secure_body_ptr, offset, secure_payload_len);
4116
4117 *error = rtps_util_decrypt_data(
4118 secure_body_ptr,
4119 secure_payload_len,
4120 session_key,
4121 *session_key_length,
4122 decryption_info->init_vector,
4123 tag,
4124 aad,
4125 decryption_info->aad_length,
4126 decryption_info->algorithm);
4127
4128 /*
4129 * Free the allocated memory if the decryption goes wrong or if the content is
4130 * not healthy.
4131 */
4132 if (*error != GPG_ERR_NO_ERROR) {
4133 wmem_free(allocator, secure_body_ptr);
4134 secure_body_ptr = NULL((void*)0);
4135 }
4136 return secure_body_ptr;
4137}
4138/******************************************************************************/
4139
4140static const true_false_string tfs_little_big_endianness = { "Little-Endian", "Big-Endian" };
4141
4142/* #19359 - ensure strings we copy aren't truncated halfway through a Unicode codepoint */
4143static void rtps_strlcpy(char *dest, const char *src, size_t dest_size)
4144{
4145 /* Reserving the last character in case ws_utf8_truncate overwrites it */
4146 (void) g_strlcpy(dest, src, dest_size);
4147 ws_utf8_truncate(dest, strlen(dest));
4148}
4149
4150static int check_offset_addition(int offset, uint32_t value, proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb)
4151{
4152 int new_offset = offset + (int)value;
4153 if (new_offset < offset) {
4154 proto_tree_add_expert_format(tree, pinfo, &ei_rtps_value_too_large, tvb, 0, 0, "Offset value too large: %u", value);
4155 THROW(ReportedBoundsError)except_throw(1, (3), ((void*)0));
4156 }
4157 return new_offset;
4158}
4159
4160static void rtps_util_dissect_parameter_header(tvbuff_t * tvb, int * offset,
4161 const unsigned encoding, uint32_t * member_id, uint32_t * member_length)
4162{
4163 *member_id = tvb_get_uint16(tvb, *offset, encoding);
4164 *offset += 2;
4165 *member_length = tvb_get_uint16(tvb, *offset, encoding);
4166 *offset += 2;
4167
4168 if ((*member_id & PID_EXTENDED(0x3f01)) == PID_EXTENDED(0x3f01)) {
4169 /* get extended member id and length */
4170 *member_id = tvb_get_uint32(tvb, *offset, encoding);
4171 *offset += 4;
4172 *member_length = tvb_get_uint32(tvb, *offset, encoding);
4173 *offset += 4;
4174 }
4175}
4176
4177/**
4178 * @brief Dissect a crypto algorithm bitmask. If the length is 0, a default
4179 * value is used.
4180 */
4181static proto_item *dissect_crypto_algo_bitmask(proto_tree *parent_tree, tvbuff_t *tvb, unsigned *offset,
4182 uint32_t *algo_length, const int hf_hdr, const int ett, int * const *fields,
4183 const unsigned encoding, const char *algo_name, const int algo_default_value, const char *algo_default_value_string)
4184{
4185 proto_item *item = NULL((void*)0);
4186 if (*algo_length > 0) {
4187 item = proto_tree_add_bitmask(parent_tree, tvb, *offset, hf_hdr, ett, fields, encoding);
4188 *offset += 4;
4189 *algo_length -= 4;
4190 } else {
4191 item = proto_tree_add_string_format(parent_tree, hf_rtps_flag_security_supported,
4192 tvb, 0, 0, algo_name, "[%s (default value): 0x%08x, %s]",
4193 algo_name, algo_default_value, algo_default_value_string);
4194 }
4195 return item;
4196}
4197
4198static int dissect_crypto_algorithm_requirements(proto_tree *tree, tvbuff_t* tvb,
4199 int offset, uint32_t *algo_length, int encoding, int* const *flags,
4200 const int default_supported_mask, const char *default_supported_mask_string,
4201 const int default_required_mask, const char *default_required_mask_string)
4202{
4203
4204 dissect_crypto_algo_bitmask(tree, tvb, &offset, algo_length,
4205 hf_rtps_param_crypto_algorithm_requirements_trust_chain,
4206 ett_rtps_flags, flags, encoding, "Supported",
4207 default_supported_mask, default_supported_mask_string);
4208
4209 dissect_crypto_algo_bitmask(tree, tvb, &offset, algo_length,
4210 hf_rtps_param_crypto_algorithm_requirements_message_auth,
4211 ett_rtps_flags, flags, encoding, "Required",
4212 default_required_mask, default_required_mask_string);
4213
4214 return offset;
4215}
4216
4217static int dissect_mutable_member(proto_tree *tree , tvbuff_t * tvb, packet_info *pinfo, int offset, unsigned encoding, unsigned encoding_version,
4218 dissection_info * info, bool_Bool * is_end, bool_Bool show);
4219
4220static int get_native_type_cdr_length(uint64_t member_kind) {
4221 unsigned length = 0;
4222
4223 switch (member_kind) {
4224 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_BOOLEAN_TYPE: {
4225 length = 1;
4226 break;
4227 }
4228 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_CHAR_8_TYPE:
4229 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_BYTE_TYPE: {
4230 length = 1;
4231 break;
4232 }
4233 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_INT_16_TYPE: {
4234 length = 2;
4235 break;
4236 }
4237 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_UINT_16_TYPE: {
4238 length = 2;
4239 break;
4240 }
4241 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_ENUMERATION_TYPE:
4242 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_INT_32_TYPE: {
4243 length = 4;
4244 break;
4245 }
4246 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_UINT_32_TYPE: {
4247 length = 4;
4248 break;
4249 }
4250 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_INT_64_TYPE: {
4251 length = 8;
4252 break;
4253 }
4254 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_UINT_64_TYPE: {
4255 length = 8;
4256 break;
4257 }
4258 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_FLOAT_32_TYPE: {
4259 length = 4;
4260 break;
4261 }
4262 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_FLOAT_64_TYPE: {
4263 length = 8;
4264 break;
4265 }
4266 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_FLOAT_128_TYPE: {
4267 length = 16;
4268 break;
4269 }
4270 default: {
4271 /* XXX We should probably add expert info, but make sure our offset advances for now. */
4272 length = 1;
4273 break;
4274 }
4275 }
4276 return length;
4277}
4278
4279static int get_native_type_cdr_alignment(uint64_t member_kind, int encapsulation_version) {
4280 unsigned align = 0;
4281
4282 switch (member_kind) {
4283 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_BOOLEAN_TYPE: {
4284 align = 1;
4285 break;
4286 }
4287 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_CHAR_8_TYPE:
4288 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_BYTE_TYPE: {
4289 align = 1;
4290 break;
4291 }
4292 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_INT_16_TYPE: {
4293 align = 2;
4294 break;
4295 }
4296 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_UINT_16_TYPE: {
4297 align = 2;
4298 break;
4299 }
4300 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_ENUMERATION_TYPE:
4301 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_INT_32_TYPE: {
4302 align = 4;
4303 break;
4304 }
4305 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_UINT_32_TYPE: {
4306 align = 4;
4307 break;
4308 }
4309 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_INT_64_TYPE: {
4310 align = (encapsulation_version == 1) ? 8 : 4;
4311 break;
4312 }
4313 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_UINT_64_TYPE: {
4314 align = (encapsulation_version == 1) ? 8 : 4;
4315 break;
4316 }
4317 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_FLOAT_32_TYPE: {
4318 align = 4;
4319 break;
4320 }
4321 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_FLOAT_64_TYPE: {
4322 align = (encapsulation_version == 1) ? 8 : 4;
4323 break;
4324 }
4325 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_FLOAT_128_TYPE: {
4326 align = (encapsulation_version == 1) ? 8 : 4;
4327 break;
4328 }
4329 default: {
4330 align = 1;
4331 break;
4332 }
4333 }
4334 return align;
4335}
4336
4337static int get_encapsulation_endianness(int encapsulation_id)
4338{
4339 return (encapsulation_id == ENCAPSULATION_CDR_LE(0x0001) ||
4340 encapsulation_id == ENCAPSULATION_PL_CDR_LE(0x0003) ||
4341 encapsulation_id == ENCAPSULATION_CDR2_LE(0x0007) ||
4342 encapsulation_id == ENCAPSULATION_D_CDR2_LE(0x0009) ||
4343 encapsulation_id == ENCAPSULATION_PL_CDR2_LE(0x000b)) ? ENC_LITTLE_ENDIAN0x80000000 : ENC_BIG_ENDIAN0x00000000;
4344}
4345
4346static int get_encapsulation_version(int encapsulation_id)
4347{
4348 return (encapsulation_id == ENCAPSULATION_CDR2_LE(0x0007) ||
4349 encapsulation_id == ENCAPSULATION_D_CDR2_LE(0x0009) ||
4350 encapsulation_id == ENCAPSULATION_PL_CDR2_LE(0x000b)) ? 2 : 1;
4351}
4352
4353
4354static dissection_info* lookup_dissection_info_in_custom_and_builtin_types(uint64_t type_id) {
4355 dissection_info* info = NULL((void*)0);
4356 if (dissection_infos != NULL((void*)0)) {
4357 info = (dissection_info*)wmem_map_lookup(dissection_infos, &(type_id));
4358 if (info == NULL((void*)0) && builtin_dissection_infos != NULL((void*)0)) {
4359 info = (dissection_info*)wmem_map_lookup(builtin_dissection_infos, &(type_id));
4360 }
4361 }
4362 return info;
4363}
4364
4365/* this is a recursive function. _info may or may not be NULL depending on the use iteration */
4366// NOLINTNEXTLINE(misc-no-recursion)
4367static int dissect_user_defined(proto_tree *tree, tvbuff_t * tvb, packet_info *pinfo, int offset, unsigned encoding, unsigned encoding_version,
4368 dissection_info * _info, uint64_t type_id, char * name,
4369 RTICdrTypeObjectExtensibility extensibility, int offset_zero,
4370 uint16_t flags, uint32_t element_member_id, bool_Bool show) {
4371
4372 uint64_t member_kind;
4373 dissection_info * info = NULL((void*)0);
4374 uint32_t member_id;
4375 uint32_t member_length = 0;
4376
4377 if (_info) { /* first call enters here */
4378 info = _info;
4379 member_kind = info->member_kind;
4380 } else {
4381 info = lookup_dissection_info_in_custom_and_builtin_types(type_id);
4382 if (info != NULL((void*)0)) {
4383 member_kind = info->member_kind;
4384 } else {
4385 member_kind = type_id;
4386 }
4387 }
4388 if ((flags & MEMBER_OPTIONAL(2)) != 0) {
4389 int offset_before = offset;
4390 /* Parameter header is at minimum 4 bytes */
4391 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)
4392 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)
4393 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)
4394 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)
;
4395 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);
4396 if (info
4397 && (flags & MEMBER_OPTIONAL(2)) == MEMBER_OPTIONAL(2)
4398 && element_member_id != 0
4399 && member_id != element_member_id) {
4400 offset = offset_before;
4401 return offset;
4402 }
4403 if (member_length == 0) {
4404 return offset;
4405 }
4406 }
4407 if (extensibility == EXTENSIBILITY_MUTABLE) {
4408 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);
4409 offset_zero = offset;
4410 if ((member_id & PID_LIST_END(0x3f02)) == PID_LIST_END(0x3f02)){
4411 /* If this is the end of the list, don't add a tree.
4412 * If we add more logic here in the future, take into account that
4413 * offset is incremented by 4 */
4414 offset += 0;
4415 return offset;
4416 }
4417 if (member_length == 0){
4418 return offset;
4419 }
4420 }
4421 //proto_item_append_text(tree, "(Before Switch 0x%016" PRIx64 ")", type_id);
4422
4423 increment_dissection_depth(pinfo);
4424 switch (member_kind) {
4425 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_BOOLEAN_TYPE: {
4426 int length = get_native_type_cdr_length(member_kind);
4427 if (show) {
4428 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
)
;
4429 int16_t value = tvb_get_int8(tvb, offset);
4430 proto_tree_add_boolean_format(tree, hf_rtps_dissection_boolean, tvb, offset, length, value,
4431 "%s: %d", name, value);
4432 }
4433 offset += length;
4434 break;
4435 }
4436 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_CHAR_8_TYPE:
4437 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_BYTE_TYPE: {
4438 int length = get_native_type_cdr_length(member_kind);
4439 if (show) {
4440 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
)
;
4441 int16_t value = tvb_get_int8(tvb, offset);
4442 proto_tree_add_uint_format(tree, hf_rtps_dissection_byte, tvb, offset, length, value,
4443 "%s: %d", name, value);
4444 }
4445 offset += length;
4446 break;
4447 }
4448 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_INT_16_TYPE: {
4449 int length = get_native_type_cdr_length(member_kind);
4450 if (show) {
4451 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
)
;
4452 int16_t value = tvb_get_int16(tvb, offset, encoding);
4453 proto_tree_add_int_format(tree, hf_rtps_dissection_int16, tvb, offset, length, value,
4454 "%s: %d", name, value);
4455 }
4456 offset += length;
4457 break;
4458 }
4459 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_UINT_16_TYPE: {
4460 int length = get_native_type_cdr_length(member_kind);
4461 if (show) {
4462 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
)
;
4463 uint16_t value = tvb_get_uint16(tvb, offset, encoding);
4464 proto_tree_add_uint_format(tree, hf_rtps_dissection_uint16, tvb, offset, length, value,
4465 "%s: %u", name, value);
4466 }
4467 offset += length;
4468 break;
4469 }
4470 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_ENUMERATION_TYPE:
4471 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_INT_32_TYPE: {
4472 int length = get_native_type_cdr_length(member_kind);
4473 if (show) {
4474 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
)
;
4475 int value = tvb_get_int32(tvb, offset, encoding);
4476 proto_tree_add_int_format(tree, hf_rtps_dissection_int32, tvb, offset, length, value,
4477 "%s: %d", name, value);
4478 }
4479 offset += length;
4480 break;
4481 }
4482 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_UINT_32_TYPE: {
4483 int length = get_native_type_cdr_length(member_kind);
4484 if (show) {
4485 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
)
;
4486 unsigned value = tvb_get_uint32(tvb, offset, encoding);
4487 proto_tree_add_uint_format(tree, hf_rtps_dissection_uint32, tvb, offset, length, value,
4488 "%s: %u", name, value);
4489 }
4490 offset += length;
4491 break;
4492 }
4493 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_INT_64_TYPE: {
4494 int length = get_native_type_cdr_length(member_kind);
4495 if (show) {
4496 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
)
;
4497 int64_t value = tvb_get_int64(tvb, offset, encoding);
4498 proto_tree_add_int64_format(tree, hf_rtps_dissection_int64, tvb, offset, length, value,
4499 "%s: %"PRId64"l" "d", name, value);
4500 }
4501 offset += length;
4502 break;
4503 }
4504 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_UINT_64_TYPE: {
4505 int length = get_native_type_cdr_length(member_kind);
4506 if (show) {
4507 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
)
;
4508 uint64_t value = tvb_get_uint64(tvb, offset, encoding);
4509 proto_tree_add_uint64_format(tree, hf_rtps_dissection_uint64, tvb, offset, length, value,
4510 "%s: %"PRIu64"l" "u", name, value);
4511 }
4512 offset += length;
4513 break;
4514 }
4515 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_FLOAT_32_TYPE: {
4516 int length = get_native_type_cdr_length(member_kind);
4517 if (show) {
4518 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
)
;
4519 float value = tvb_get_ieee_float(tvb, offset, encoding);
4520 proto_tree_add_float_format(tree, hf_rtps_dissection_float, tvb, offset, length, value,
4521 "%s: %.6f", name, value);
4522 }
4523 offset += length;
4524 break;
4525 }
4526 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_FLOAT_64_TYPE: {
4527 int length = get_native_type_cdr_length(member_kind);
4528 if (show) {
4529 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
)
;
4530 double value = tvb_get_ieee_double(tvb, offset, encoding);
4531 proto_tree_add_double_format(tree, hf_rtps_dissection_double, tvb, offset, length, value,
4532 "%s: %.6f", name, value);
4533 }
4534 offset += length;
4535 break;
4536 }
4537 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_FLOAT_128_TYPE: {
4538 int length = get_native_type_cdr_length(member_kind);
4539 if (show) {
4540 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
)
;
4541 proto_tree_add_item(tree, hf_rtps_dissection_int128, tvb, offset, length, encoding);
4542 }
4543 offset += length;
4544 break;
4545 }
4546 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_ARRAY_TYPE: {
4547 unsigned i;
4548 unsigned num_elements;
4549 proto_tree * aux_tree = NULL((void*)0);
4550 int base_offset = offset;
4551 bool_Bool show_current_element = true1;
4552 int array_kind_length = 0;
4553 unsigned bound = 0;
4554 int first_skipped_element_offset = 0;
4555
4556 if (info != NULL((void*)0)) {
4557 bound = (unsigned)info->bound;
4558
4559 /* In case this array is not shown and is a native type. We get the sze length for calculating
4560 * the whole array length */
4561 array_kind_length = get_native_type_cdr_length(info->base_type_id);
4562 }
4563 /* Do not add any information to the tree if it is not shown */
4564 if (show) {
4565 aux_tree = proto_tree_add_subtree(tree, tvb, offset, -1, ett_rtps_dissection_tree,
4566 NULL((void*)0), name);
4567 } else if (array_kind_length != -1) {
4568 /* Total length of the array. Nothing else to do here. */
4569 offset += bound * array_kind_length;
4570 break;
4571 }
4572
4573 /* Get the maximum number of elements to be shown */
4574 num_elements = (enable_max_array_data_type_elements)
4575 ? MIN(bound, rtps_max_array_data_type_elements)(((bound) < (rtps_max_array_data_type_elements)) ? (bound)
: (rtps_max_array_data_type_elements))
4576 : bound;
4577 for (i = 0; i < bound; i++) {
4578 char temp_buff[MAX_MEMBER_NAME(256)];
4579
4580 if (show && i < num_elements) {
4581 /* No need to copy if it will not be shown */
4582 snprintf(temp_buff, MAX_MEMBER_NAME(256), "%s[%u]", name, i);
4583 show_current_element = true1;
4584 } else {
4585 if (show_current_element) {
4586 show_current_element = false0;
4587 /* Updated only once */
4588 first_skipped_element_offset = offset;
4589 }
4590 /* If this array has elements that won't be shown and is an array of native type
4591 * we can calculate the total offset and break the loop */
4592 if (array_kind_length != -1) {
4593 offset += (bound - i) * array_kind_length;
4594 break;
4595 }
4596 }
4597 offset = dissect_user_defined(aux_tree, tvb, pinfo, offset, encoding, encoding_version, NULL((void*)0),
4598 info->base_type_id, temp_buff, EXTENSIBILITY_INVALID, offset_zero, 0, 0, show_current_element);
4599 }
4600
4601 /* If reached the limit and there are remaining elements we need to show the message and
4602 * assign the length of the ramining elements to this */
4603 if (enable_max_array_data_type_elements && show && !show_current_element) {
4604 proto_tree_add_subtree_format(
4605 aux_tree,
4606 tvb,
4607 /* Start at the first item not shown */
4608 first_skipped_element_offset,
4609 offset - first_skipped_element_offset,
4610 ett_rtps_info_remaining_items,
4611 NULL((void*)0),
4612 DISSECTION_INFO_REMAINING_ELEMENTS_STR_d"... %d items(s) remaining. The number of items shown is configurable through RTPS properties under Preferences/Protocols.",
4613 bound - num_elements);
4614 }
4615 proto_item_set_len(aux_tree, offset - base_offset);
4616 break;
4617 }
4618 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_SEQUENCE_TYPE: {
4619 unsigned i;
4620 unsigned num_elements;
4621 proto_tree * aux_tree = NULL((void*)0);
4622 int base_offset = offset;
4623 bool_Bool show_current_element = true1;
4624 int length = 4;
4625 int sequence_kind_length = 0;
4626 int first_skipped_element_offset = 0;
4627
4628 ALIGN_ZERO(offset, length, offset_zero)(offset -= offset_zero, offset = (((offset) + ((length) - 1))
& ~((length) - 1)), offset += offset_zero)
;
4629 unsigned seq_size = tvb_get_uint32(tvb, offset, encoding);
4630
4631 /* In case this sequence is not shown and is a native type. We get the sze length for calculating
4632 * the whole seuqnece length */
4633 if (info != NULL((void*)0)) {
4634 sequence_kind_length = get_native_type_cdr_length(info->base_type_id);
4635 }
4636 if (show) {
4637 aux_tree = proto_tree_add_subtree_format(tree, tvb, offset, -1, ett_rtps_dissection_tree,
4638 NULL((void*)0), "%s (%u elements)", name, seq_size);
4639 /* If it is a native type we can calculate the sequence length and finish. */
4640 } else if (sequence_kind_length != -1) {
4641 /* Number of elements integer size + number of elements * size of the native type */
4642 offset += 4 + seq_size * sequence_kind_length;
4643 break;
4644 }
4645 offset += 4;
4646
4647 num_elements = (enable_max_array_data_type_elements)
4648 ? 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))
4649 : seq_size;
4650 for (i = 0; i < seq_size; i++) {
4651 char temp_buff[MAX_MEMBER_NAME(256)];
4652 if (show && i < num_elements) {
4653 /* No need to copy if it will not be shown */
4654 snprintf(temp_buff, MAX_MEMBER_NAME(256), "%s[%u]", name, i);
4655 show_current_element = true1;
4656 } else {
4657 if (show_current_element) {
4658 show_current_element = false0;
4659 /* Updated only once */
4660 first_skipped_element_offset = offset;
4661 }
4662 /* If this array has elements that won't be shown and is an array of native type
4663 * we can calculate the total offset and break the loop */
4664 if (sequence_kind_length != -1) {
4665 offset += (seq_size - i) * sequence_kind_length;
4666 break;
4667 }
4668 }
4669 if (info != NULL((void*)0) && info->base_type_id > 0)
4670 offset = dissect_user_defined(aux_tree, tvb, pinfo, offset, encoding, encoding_version, NULL((void*)0),
4671 info->base_type_id, temp_buff, EXTENSIBILITY_INVALID, offset_zero, 0, 0, show_current_element);
4672 }
4673 /* If reached the limit and there are remaining elements we need to show the message and
4674 * assign the length of the ramining elements to this */
4675 if (enable_max_array_data_type_elements && show && !show_current_element) {
4676 proto_tree_add_subtree_format(
4677 aux_tree,
4678 tvb,
4679 /* Start at the first item not shown */
4680 first_skipped_element_offset,
4681 offset - first_skipped_element_offset,
4682 ett_rtps_info_remaining_items,
4683 NULL((void*)0),
4684 DISSECTION_INFO_REMAINING_ELEMENTS_STR_d"... %d items(s) remaining. The number of items shown is configurable through RTPS properties under Preferences/Protocols.",
4685 seq_size - num_elements);
4686 }
4687 proto_item_set_len(aux_tree, offset - base_offset);
4688 break;
4689 }
4690 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_STRING_TYPE: {
4691 char * string_value = NULL((void*)0);
4692 int length = 4;
4693
4694 ALIGN_ZERO(offset, length, offset_zero)(offset -= offset_zero, offset = (((offset) + ((length) - 1))
& ~((length) - 1)), offset += offset_zero)
;
4695 unsigned string_size = tvb_get_uint32(tvb, offset, encoding);
4696 offset += 4;
4697 //proto_item_append_text(tree, "(String length: %u)", string_size);
4698 if (show) {
4699 string_value = tvb_get_string_enc(pinfo->pool, tvb, offset, string_size, ENC_ASCII0x00000000);
4700 proto_tree_add_string_format(tree, hf_rtps_dissection_string, tvb, offset, string_size,
4701 string_value, "%s: %s", name, string_value);
4702 }
4703 offset += string_size;
4704 break;
4705 }
4706 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_ALIAS_TYPE: {
4707 uint64_t base_type_id = 0;
4708 if (info != NULL((void*)0)) {
4709 base_type_id = info->base_type_id;
4710 }
4711 offset = dissect_user_defined(tree, tvb, pinfo, offset, encoding, encoding_version, NULL((void*)0),
4712 base_type_id, name, EXTENSIBILITY_INVALID, offset_zero, 0, 0, show);
4713 break;
4714 }
4715 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_UNION_TYPE: {
4716 uint64_t key = type_id - 1;
4717 union_member_mapping * result = (union_member_mapping *)wmem_map_lookup(union_member_mappings, &(key));
4718
4719 if (result != NULL((void*)0)) {
4720 int value = tvb_get_int32(tvb, offset, encoding);
4721 offset += 4;
4722 key = type_id + value;
4723 result = (union_member_mapping *)wmem_map_lookup(union_member_mappings, &(key));
4724 if (result != NULL((void*)0)) {
4725 if (show) {
4726 proto_item_append_text(tree, " (discriminator = %d, type_id = 0x%016" PRIx64"l" "x" ")",
4727 value, result->member_type_id);
4728 }
4729 offset = dissect_user_defined(tree, tvb, pinfo, offset, encoding, encoding_version, NULL((void*)0),
4730 result->member_type_id, result->member_name, EXTENSIBILITY_INVALID, offset, 0, 0, show);
4731 } else {
4732 /* the hashmap uses the type_id to index the objects. subtracting -2 here to lookup the discriminator
4733 related to the type_id that identifies an union */
4734 key = type_id + HASHMAP_DISCRIMINATOR_CONSTANT(-2);
4735 result = (union_member_mapping *)wmem_map_lookup(union_member_mappings, &(key));
4736 if (result != NULL((void*)0)) {
4737 if (show) {
4738 proto_item_append_text(tree, " (discriminator = %d, type_id = 0x%016" PRIx64"l" "x" ")",
4739 value, result->member_type_id);
4740 }
4741 offset = dissect_user_defined(tree, tvb, pinfo, offset, encoding, encoding_version, NULL((void*)0),
4742 result->member_type_id, result->member_name, EXTENSIBILITY_INVALID, offset, 0, 0, show);
4743 }
4744 }
4745 } else {
4746 if (show) {
4747 proto_item_append_text(tree, "(NULL 0x%016" PRIx64"l" "x" ")", type_id);
4748 }
4749 }
4750 break;
4751 }
4752 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_STRUCTURE_TYPE: {
4753 unsigned i;
4754 proto_tree * aux_tree = NULL((void*)0);
4755 unsigned shown_elements = 0;
4756 bool_Bool show_current_element = true1;
4757 unsigned num_elements = 0;
4758 int first_skipped_element_offset = 0;
4759
4760 if (info != NULL((void*)0)) {
4761 if (show) {
4762 aux_tree = proto_tree_add_subtree(tree, tvb, offset, -1, ett_rtps_dissection_tree,
4763 NULL((void*)0), name);
4764 }
4765 if (info->extensibility == EXTENSIBILITY_MUTABLE) {
4766 bool_Bool is_end = false0;
4767 /* Don't know beforehand the number of elements. Need to count them */
4768 while (!is_end) {
4769 if (!(show && shown_elements < rtps_max_data_type_elements) && show_current_element) {
4770 show_current_element = false0;
4771 /* Updated only once */
4772 first_skipped_element_offset = offset;
4773 }
4774 offset = dissect_mutable_member(aux_tree, tvb, pinfo, offset, encoding, encoding_version, info, &is_end, show_current_element);
4775 ++num_elements;
4776 if (show_current_element) {
4777 ++shown_elements;
4778 }
4779 }
4780 }
4781 else {
4782 if (info->base_type_id > 0) {
4783 if (show) {
4784 proto_item_append_text(tree, "(BaseId: 0x%016" PRIx64"l" "x" ")", info->base_type_id);
4785 }
4786 offset = dissect_user_defined(aux_tree, tvb, pinfo, offset, encoding, encoding_version, NULL((void*)0),
4787 info->base_type_id, info->member_name, EXTENSIBILITY_INVALID,
4788 offset, 0, 0, show);
4789 }
4790
4791 /* Get the maximum number of elements to be shown depending if enable_max_data_type_elements is enabled */
4792 shown_elements = (enable_max_data_type_elements)
4793 ? 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))
4794 : info->num_elements;
4795 for (i = 0; i < info->num_elements; i++) {
4796 if (info->elements[i].type_id > 0) {
4797 /* A member is shown if the parent cluster is shown and the position is in the
4798 * range of maximum number of elements shown */
4799 if (!(show && i < shown_elements) && show_current_element) {
4800 show_current_element = false0;
4801 /* Updated only once */
4802 first_skipped_element_offset = offset;
4803 }
4804 /* If a member is not shown all it children will inherit the "show_current_element" value */
4805 offset = dissect_user_defined(aux_tree, tvb, pinfo, offset, encoding, encoding_version, NULL((void*)0),
4806 info->elements[i].type_id, info->elements[i].member_name, info->extensibility,
4807 offset_zero, info->elements[i].flags, info->elements[i].member_id, show_current_element);
4808 }
4809 }
4810 num_elements = info->num_elements;
4811 }
4812 /* If reached the limit and there are remaining elements we need to show the message and
4813 * assign the length of the ramining elements to this */
4814 if (enable_max_array_data_type_elements && show && !show_current_element) {
4815 proto_tree_add_subtree_format(
4816 aux_tree,
4817 tvb,
4818 first_skipped_element_offset,
4819 offset - first_skipped_element_offset,
4820 ett_rtps_info_remaining_items,
4821 NULL((void*)0),
4822 DISSECTION_INFO_REMAINING_ELEMENTS_STR_d"... %d items(s) remaining. The number of items shown is configurable through RTPS properties under Preferences/Protocols.",
4823 num_elements - shown_elements);
4824 }
4825 }
4826 break;
4827 }
4828 default:{
4829 /* undefined behavior. this should not happen. the following line helps to debug if it happened */
4830 if (show) {
4831 proto_item_append_text(tree, "(unknown 0x%016" PRIx64"l" "x" ")", member_kind);
4832 }
4833 break;
4834 }
4835 }
4836 decrement_dissection_depth(pinfo);
4837
4838 if (extensibility == EXTENSIBILITY_MUTABLE) {
4839 offset_zero += member_length;
4840 return offset_zero;
4841 } else {
4842 return offset;
4843 }
4844}
4845
4846// NOLINTNEXTLINE(misc-no-recursion)
4847static int dissect_mutable_member(proto_tree *tree , tvbuff_t * tvb, packet_info *pinfo, int offset, unsigned encoding, unsigned encoding_version,
4848 dissection_info * info, bool_Bool * is_end, bool_Bool show) {
4849
4850 proto_tree * member;
4851 uint32_t member_id, member_length;
4852 mutable_member_mapping * mapping;
4853 int64_t key;
4854
4855 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);
4856 if ((member_id & PID_LIST_END(0x3f02)) == PID_LIST_END(0x3f02)){
4857 /* If this is the end of the list, don't add a tree.
4858 * If we add more logic here in the future, take into account that
4859 * offset is incremented by 4 */
4860 offset += 0;
4861 *is_end = true1;
4862 return offset;
4863 }
4864 if (member_length == 0){
4865 return offset;
4866 }
4867 member = proto_tree_add_subtree_format(tree, tvb, offset, member_length, ett_rtps_dissection_tree,
4868 NULL((void*)0), "ID: %d, Length: %d", member_id, member_length);
4869
4870 {
4871 if (info->base_type_id > 0) {
4872 key = (info->base_type_id + info->base_type_id * member_id);
4873 mapping = (mutable_member_mapping *) wmem_map_lookup(mutable_member_mappings, &(key));
4874 if (mapping) { /* the library knows how to dissect this */
4875 proto_item_append_text(member, "(base found 0x%016" PRIx64"l" "x" ")", key);
4876 dissect_user_defined(tree, tvb, pinfo, offset, encoding, encoding_version, NULL((void*)0), mapping->member_type_id,
4877 mapping->member_name, EXTENSIBILITY_INVALID, offset, 0, mapping->member_id, show);
4878 proto_item_set_hidden(member);
4879 return check_offset_addition(offset, member_length, tree, NULL((void*)0), tvb);
4880 } else
4881 proto_item_append_text(member, "(base not found 0x%016" PRIx64"l" "x" " from 0x%016" PRIx64"l" "x" ")",
4882 key, info->base_type_id);
4883 }
4884 }
4885
4886 key = (info->type_id + info->type_id * member_id);
4887 mapping = (mutable_member_mapping *) wmem_map_lookup(mutable_member_mappings, &(key));
4888 if (mapping) { /* the library knows how to dissect this */
4889 proto_item_append_text(member, "(found 0x%016" PRIx64"l" "x" ")", key);
4890 dissect_user_defined(tree, tvb, pinfo, offset, encoding, encoding_version, NULL((void*)0), mapping->member_type_id,
4891 mapping->member_name, EXTENSIBILITY_INVALID, offset, 0, mapping->member_id, show);
4892
4893 } else
4894 proto_item_append_text(member, "(not found 0x%016" PRIx64"l" "x" " from 0x%016" PRIx64"l" "x" ")",
4895 key, info->type_id);
4896 proto_item_set_hidden(member);
4897 return check_offset_addition(offset, member_length, tree, NULL((void*)0), tvb);
4898}
4899
4900
4901/* *********************************************************************** */
4902/* Appends extra formatting for those submessages that have a status info
4903 */
4904static void generate_status_info(packet_info *pinfo,
4905 uint32_t writer_id,
4906 uint32_t status_info) {
4907
4908 /* Defines the extra information associated to the writer involved in
4909 * this communication
4910 *
4911 * Format: [?Ptwrpm]\(u?d?\)
4912 *
4913 * First letter table:
4914 *
4915 * writerEntityId value | Letter
4916 * ----------------------------------------------------------+--------
4917 * ENTITYID_UNKNOWN | ?
4918 * ENTITYID_PARTICIPANT | P
4919 * ENTITYID_SEDP_BUILTIN_TOPIC_WRITER | t
4920 * ENTITYID_SEDP_BUILTIN_PUBLICATIONS_WRITER | w
4921 * ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_WRITER | r
4922 * ENTITYID_SPDP_BUILTIN_PARTICIPANT_WRITER | p
4923 * ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_WRITER | m
4924 * ENTITYID_P2P_BUILTIN_PARTICIPANT_STATELESS_WRITER | s
4925 * ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_WRITER | V
4926 * ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_SECURE_WRITER | M
4927 * ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_WRITER | W
4928 * ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_WRITER | R
4929 * ENTITYID_RTI_BUILTIN_PARTICIPANT_BOOTSTRAP_WRITER | Pc
4930 * ENTITYID_RTI_BUILTIN_PARTICIPANT_BOOTSTRAP_READER | Pc
4931 * ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_WRITER | Pb
4932 * ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_READER | Pb
4933 * ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_WRITER | sPc
4934 * ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_READER | sPc
4935
4936
4937 * The letter is followed by:
4938 * status_info &1 | status_info & 2 | Text
4939 * ---------------+-----------------------+--------------
4940 * status_info not defined in inlineQos | [?]
4941 * 0 | 0 | [__]
4942 * 0 | 1 | [u_]
4943 * 1 | 0 | [_d]
4944 * 1 | 1 | [ud]
4945 */
4946 /* 0123456 */
4947 char * writerId = NULL((void*)0);
4948 char * disposeFlag = NULL((void*)0);
4949 char * unregisterFlag = NULL((void*)0);
4950
4951 wmem_strbuf_t *buffer = wmem_strbuf_create(pinfo->pool)wmem_strbuf_new(pinfo->pool, "");
4952 submessage_col_info* current_submessage_col_info = NULL((void*)0);
4953
4954 current_submessage_col_info = (submessage_col_info*)p_get_proto_data(pinfo->pool, pinfo, proto_rtps, RTPS_CURRENT_SUBMESSAGE_COL_DATA_KEY3);
4955 switch(writer_id) {
4956 case ENTITYID_PARTICIPANT(0x000001c1):
4957 case ENTITYID_SPDP_RELIABLE_BUILTIN_PARTICIPANT_SECURE_WRITER(0xff0101c2):
4958 writerId = "P";
4959 break;
4960 case ENTITYID_BUILTIN_TOPIC_WRITER(0x000002c2):
4961 writerId = "t";
4962 break;
4963 case ENTITYID_BUILTIN_PUBLICATIONS_WRITER(0x000003c2):
4964 writerId = "w";
4965 break;
4966 case ENTITYID_BUILTIN_SUBSCRIPTIONS_WRITER(0x000004c2):
4967 writerId = "r";
4968 break;
4969 case ENTITYID_BUILTIN_PARTICIPANT_WRITER(0x000100c2):
4970 writerId = "p";
4971 break;
4972 case ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_WRITER(0x000200c2):
4973 writerId = "m";
4974 break;
4975 case ENTITYID_P2P_BUILTIN_PARTICIPANT_STATELESS_WRITER(0x000201c3):
4976 writerId = "s";
4977 break;
4978 case ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_WRITER(0xff0202c3):
4979 writerId = "V";
4980 break;
4981 case ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_SECURE_WRITER(0xff0200c2):
4982 writerId = "M";
4983 break;
4984 case ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_WRITER(0xff0003c2):
4985 writerId = "W";
4986 break;
4987 case ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_WRITER(0xff0004c2):
4988 writerId = "R";
4989 break;
4990 case ENTITYID_RTI_BUILTIN_PARTICIPANT_BOOTSTRAP_WRITER(0x00010082):
4991 case ENTITYID_RTI_BUILTIN_PARTICIPANT_BOOTSTRAP_READER(0x00010087):
4992 writerId = "Pb";
4993 break;
4994 case ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_WRITER(0x00010182):
4995 case ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_READER(0x00010187):
4996 writerId = "Pc";
4997 break;
4998 case ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_WRITER(0xff010182):
4999 case ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_READER(0xff010187):
5000 writerId = "sPc";
5001 break;
5002 case ENTITYID_TL_SVC_REQ_WRITER(0x000300c3):
5003 case ENTITYID_TL_SVC_REQ_READER(0x000300c4):
5004 writerId = "trq";
5005 break;
5006 case ENTITYID_TL_SVC_REPLY_WRITER(0x000301c3):
5007 case ENTITYID_TL_SVC_REPLY_READER(0x000301c4):
5008 writerId = "trp";
5009 break;
5010 case ENTITYID_RTI_BUILTIN_SERVICE_REQUEST_WRITER(0x00020082):
5011 case ENTITYID_RTI_BUILTIN_SERVICE_REQUEST_READER(0x00020087): {
5012 /* This is added to proto_rtps in rtps_util_add_rti_service_request* */
5013 uint32_t* service_id = (uint32_t*)p_get_proto_data(pinfo->pool, pinfo, proto_rtps, RTPS_SERVICE_REQUEST_ID_PROTODATA_KEY1);
5014 if (service_id != NULL((void*)0) && *service_id == RTI_SERVICE_REQUEST_ID_TOPIC_QUERY1) {
5015 writerId = "tq";
5016 }
5017 break;
5018 }
5019 default:
5020 /* Unknown writer ID, don't format anything */
5021 break;
5022 }
5023
5024 switch(status_info) {
5025 case 0: unregisterFlag = "_"; disposeFlag = "_"; break;
5026 case 1: unregisterFlag = "_"; disposeFlag = "D"; break;
5027 case 2: unregisterFlag = "U"; disposeFlag = "_"; break;
5028 case 3: unregisterFlag = "U"; disposeFlag = "D"; break;
5029 default: /* Unknown status info, omit it */
5030 break;
5031 }
5032
5033 if (writerId != NULL((void*)0) || unregisterFlag != NULL((void*)0) ||
5034 disposeFlag != NULL((void*)0) ) {
5035 wmem_strbuf_append(buffer, "(");
5036 if (writerId != NULL((void*)0)) {
5037 wmem_strbuf_append(buffer, writerId);
5038 }
5039 if (unregisterFlag != NULL((void*)0) || disposeFlag != NULL((void*)0)) {
5040 wmem_strbuf_append(buffer, "[");
5041 wmem_strbuf_append(buffer, unregisterFlag);
5042 wmem_strbuf_append(buffer, disposeFlag);
5043 wmem_strbuf_append(buffer, "]");
5044 }
5045 wmem_strbuf_append(buffer, ")");
5046 current_submessage_col_info->status_info = wmem_strbuf_get_str(buffer);
5047 }
5048}
5049
5050/* *********************************************************************** */
5051
5052/*
5053 * Coherent set starts if seqNumber == writerSeqNumber
5054 *
5055 * Coherent sets end in three different ways:
5056 * - A new coherence set starts with the consecutive writerSeqNumber of the last coherent set packet.
5057 * -seqNumber == RTPS_SEQUENCENUMBER_UNKNOWN
5058 * - A DATA packet sent with the consecutive writerSeqNumber of the last coherent set packet.
5059 * - PID_END_COHERENT_SET received. That condition is not handled here. Check PID_END_COHERENT_SET dissection.
5060 * 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
5061 */
5062static void rtps_util_add_coherent_set_general_cases_case(
5063 proto_tree *tree,
5064 tvbuff_t *tvb,
5065 uint64_t coherent_seq_number,
5066 coherent_set_entity_info *coherent_set_entity_info_object) {
5067
5068 coherent_set_entity_info *register_entry;
5069 proto_tree *marked_item_tree;
5070 coherent_set_info *coherent_set_info_entry;
5071 coherent_set_key coherent_set_info_key;
5072
5073 coherent_set_entity_info_object->coherent_set_seq_number = coherent_seq_number;
5074 register_entry = (coherent_set_entity_info*)wmem_map_lookup(coherent_set_tracking.entities_using_map,
5075 &coherent_set_entity_info_object->guid);
5076 if (!register_entry) {
5077 register_entry = (coherent_set_entity_info*)wmem_memdup(wmem_file_scope(), coherent_set_entity_info_object, sizeof(coherent_set_entity_info));
5078 wmem_map_insert(
5079 coherent_set_tracking.entities_using_map,
5080 &register_entry->guid,
5081 register_entry);
5082 }
5083
5084 /* The hash and compare functions treat the key as a sequence of bytes */
5085 memset(&coherent_set_info_key, 0, sizeof(coherent_set_info_key));
5086 coherent_set_info_key.guid = coherent_set_entity_info_object->guid;
5087 coherent_set_info_key.coherent_set_seq_number = coherent_seq_number;
5088 coherent_set_info_entry = (coherent_set_info*)wmem_map_lookup(coherent_set_tracking.coherent_set_registry_map,
5089 &coherent_set_info_key);
5090 if (!coherent_set_info_entry) {
5091 coherent_set_info_entry = wmem_new0(wmem_file_scope(), coherent_set_info)((coherent_set_info*)wmem_alloc0((wmem_file_scope()), sizeof(
coherent_set_info)))
;
5092 coherent_set_info_entry->key = (coherent_set_key*)wmem_memdup(wmem_file_scope(), &coherent_set_info_key, sizeof(coherent_set_key));
5093 coherent_set_info_entry->is_set = false0;
5094 wmem_map_insert(
5095 coherent_set_tracking.coherent_set_registry_map,
5096 coherent_set_info_entry->key,
5097 coherent_set_info_entry);
5098 }
5099
5100 if (coherent_set_info_entry->writer_seq_number < coherent_set_entity_info_object->writer_seq_number) {
5101 coherent_set_info_entry->writer_seq_number = coherent_set_entity_info_object->writer_seq_number;
5102 }
5103 /* Start */
5104 if (coherent_set_entity_info_object->coherent_set_seq_number == coherent_set_entity_info_object->writer_seq_number) {
5105 marked_item_tree = proto_tree_add_uint64(tree, hf_rtps_coherent_set_start,
5106 tvb, 0, 0, coherent_seq_number);
5107 proto_item_set_generated(marked_item_tree);
5108
5109 /* End case: Start of a new coherent set */
5110 if (coherent_set_entity_info_object->coherent_set_seq_number > register_entry->coherent_set_seq_number &&
5111 coherent_set_entity_info_object->writer_seq_number - 1 == register_entry->writer_seq_number) {
5112 coherent_set_info *previous_entry;
5113
5114 marked_item_tree = proto_tree_add_uint64(tree, hf_rtps_coherent_set_end,
5115 tvb, 0, 0, register_entry->coherent_set_seq_number);
5116 proto_item_set_generated(marked_item_tree);
5117 coherent_set_info_key.coherent_set_seq_number = register_entry->writer_seq_number;
5118 coherent_set_info_key.guid = register_entry->guid;
5119 previous_entry = (coherent_set_info*)wmem_map_lookup(coherent_set_tracking.coherent_set_registry_map, &coherent_set_info_key);
5120 if (previous_entry) {
5121 previous_entry->is_set = true1;
5122 }
5123 }
5124 }
5125
5126 if (!coherent_set_info_entry->is_set) {
5127
5128 coherent_set_info_key.coherent_set_seq_number = coherent_seq_number - 1;
5129
5130 /* End case: Sequence unknown received */
5131
5132 if (coherent_set_entity_info_object->coherent_set_seq_number == RTPS_SEQUENCENUMBER_UNKNOWN0xffffffff00000000) {
5133 register_entry->coherent_set_seq_number = coherent_set_entity_info_object->coherent_set_seq_number;
5134 marked_item_tree = proto_tree_add_uint64(tree, hf_rtps_coherent_set_end,
5135 tvb, 0, 0, coherent_set_info_entry->key->coherent_set_seq_number);
5136 proto_item_set_generated(marked_item_tree);
5137 coherent_set_info_entry->is_set = true1;
5138 }
5139 } else if (coherent_set_info_entry->writer_seq_number == coherent_set_entity_info_object->writer_seq_number) {
5140 proto_tree *ti;
5141
5142 ti = proto_tree_add_uint64(tree, hf_rtps_coherent_set_end,
5143 tvb, 0, 0, coherent_set_info_entry->key->coherent_set_seq_number);
5144 proto_item_set_generated(ti);
5145 }
5146 /* Update the entity */
5147 coherent_set_entity_info_object->expected_coherent_set_end_writers_seq_number = coherent_set_entity_info_object->writer_seq_number + 1;
5148 *register_entry = *coherent_set_entity_info_object;
5149}
5150
5151/*
5152 * Handles the coherent set termination case where the coherent set finishes by sending a DATA or DATA_FRAG with no parameters.
5153 * For the other cases, check rtps_util_add_coherent_set_general_cases_case.
5154 * this function must be called at the end of dissect_RTPS_DATA and dissect_RTPS_DATA_FRAG_kind
5155 */
5156static void rtps_util_detect_coherent_set_end_empty_data_case(
5157
5158 coherent_set_entity_info *coherent_set_entity_info_object) {
5159 coherent_set_entity_info *coherent_set_entry = NULL((void*)0);
5160
5161 coherent_set_entry = (coherent_set_entity_info*) wmem_map_lookup(coherent_set_tracking.entities_using_map, &coherent_set_entity_info_object->guid);
5162 if (coherent_set_entry) {
5163 coherent_set_info *coherent_set_info_entry;
5164 coherent_set_key key;
5165
5166 /* The hash and compare functions treat the key as a sequence of bytes. */
5167 memset(&key, 0, sizeof(key));
5168 key.guid = coherent_set_entity_info_object->guid;
5169 key.coherent_set_seq_number = coherent_set_entry->coherent_set_seq_number;
5170
5171 coherent_set_info_entry = (coherent_set_info*)wmem_map_lookup(coherent_set_tracking.coherent_set_registry_map, &key);
5172 if (coherent_set_info_entry
5173 && (coherent_set_entry->expected_coherent_set_end_writers_seq_number == coherent_set_entity_info_object->writer_seq_number)
5174 && !coherent_set_info_entry->is_set) {
5175 coherent_set_info_entry->is_set = true1;
5176 coherent_set_info_entry->writer_seq_number = coherent_set_entry->expected_coherent_set_end_writers_seq_number - 1;
5177 }
5178 }
5179}
5180
5181static uint16_t rtps_util_add_protocol_version(proto_tree *tree, /* Can NOT be NULL */
5182 tvbuff_t *tvb,
5183 int offset) {
5184 proto_item *ti;
5185 proto_tree *version_tree;
5186 uint16_t version;
5187
5188 version = tvb_get_ntohs(tvb, offset);
5189
5190 ti = proto_tree_add_uint_format(tree, hf_rtps_protocol_version, tvb, offset, 2,
5191 version, "Protocol version: %d.%d",
5192 tvb_get_uint8(tvb, offset), tvb_get_uint8(tvb, offset+1));
5193 version_tree = proto_item_add_subtree(ti, ett_rtps_proto_version);
5194
5195 proto_tree_add_item(version_tree, hf_rtps_protocol_version_major, tvb, offset, 1, ENC_NA0x00000000);
5196 proto_tree_add_item(version_tree, hf_rtps_protocol_version_minor, tvb, offset+1, 1, ENC_NA0x00000000);
5197
5198 return version;
5199}
5200
5201
5202/* ------------------------------------------------------------------------- */
5203/* Interpret the next bytes as vendor ID. If proto_tree and field ID is
5204 * provided, it can also set.
5205 */
5206static uint16_t rtps_util_add_vendor_id(proto_tree *tree,
5207 tvbuff_t *tvb,
5208 int offset) {
5209 uint8_t major, minor;
5210 uint16_t vendor_id;
5211
5212 major = tvb_get_uint8(tvb, offset);
5213 minor = tvb_get_uint8(tvb, offset+1);
5214 vendor_id = tvb_get_ntohs(tvb, offset);
5215
5216 proto_tree_add_uint_format_value(tree, hf_rtps_vendor_id, tvb, offset, 2, vendor_id,
5217 "%02d.%02d (%s)", major, minor,
5218 val_to_str_const(vendor_id, vendor_vals, "Unknown"));
5219
5220 return vendor_id;
5221}
5222
5223
5224
5225/* ------------------------------------------------------------------------- */
5226/* Insert in the protocol tree the next 8 bytes interpreted as Locator_t
5227 *
5228 * Locator_t is a struct defined as:
5229 * struct {
5230 * long kind; // kind of locator
5231 * unsigned long port;
5232 * octet[16] address;
5233 * } Locator_t;
5234 */
5235static int rtps_util_add_locator_t(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, int offset,
5236 const unsigned encoding, const char *label) {
5237
5238 proto_tree *ti;
5239 proto_tree *locator_tree;
5240 uint32_t kind;
5241 uint32_t port;
5242 const int parameter_size = 24;
5243
5244 locator_tree = proto_tree_add_subtree(tree, tvb, offset, parameter_size, ett_rtps_locator,
5245 NULL((void*)0), label);
5246
5247 proto_tree_add_item_ret_uint(locator_tree, hf_rtps_locator_kind, tvb, offset, 4, encoding, &kind);
5248 switch (kind) {
5249 case LOCATOR_KIND_UDPV4(1):
5250 case LOCATOR_KIND_TUDPV4(0x01001001): {
5251 ti = proto_tree_add_item_ret_uint(
5252 locator_tree,
5253 hf_rtps_locator_port,
5254 tvb,
5255 offset + 4,
5256 4,
5257 encoding,
5258 &port);
5259
5260 if (port == 0)
5261 expert_add_info(pinfo, ti, &ei_rtps_locator_port);
5262 proto_item_append_text(tree, " (%s, %s:%u)",
5263 val_to_str(pinfo->pool, kind, rtps_locator_kind_vals, "%02x"),
5264 tvb_ip_to_str(pinfo->pool, tvb, offset + 20)tvb_address_to_str(pinfo->pool, tvb, AT_IPv4, offset + 20), port);
5265 proto_tree_add_item(locator_tree, hf_rtps_locator_ipv4, tvb, offset + 20, 4, ENC_BIG_ENDIAN0x00000000);
5266 break;
5267 }
5268 case LOCATOR_KIND_TCPV4_LAN(8):
5269 case LOCATOR_KIND_TCPV4_WAN(9):
5270 case LOCATOR_KIND_TLSV4_LAN(10):
5271 case LOCATOR_KIND_TLSV4_WAN(11): {
5272 uint16_t ip_kind;
5273 ti = proto_tree_add_item_ret_uint(
5274 locator_tree,
5275 hf_rtps_locator_port,
5276 tvb,
5277 offset + 4,
5278 4,
5279 encoding,
5280 &port);
5281 if (port == 0)
5282 expert_add_info(pinfo, ti, &ei_rtps_locator_port);
5283 ip_kind = tvb_get_uint16(tvb, offset+16, encoding);
5284 if (ip_kind == 0xFFFF) { /* IPv4 format */
5285 uint16_t public_address_port = tvb_get_uint16(tvb, offset + 18, ENC_BIG_ENDIAN0x00000000);
5286 proto_tree_add_item(locator_tree, hf_rtps_locator_public_address_port,
5287 tvb, offset+18, 2, ENC_BIG_ENDIAN0x00000000);
5288 proto_tree_add_item(locator_tree, hf_rtps_locator_ipv4, tvb, offset+20,
5289 4, ENC_BIG_ENDIAN0x00000000);
5290 proto_item_append_text(tree, " (%s, %s:%d, Logical Port = %u)",
5291 val_to_str(pinfo->pool, kind, rtps_locator_kind_vals, "%02x"),
5292 tvb_ip_to_str(pinfo->pool, tvb, offset + 20)tvb_address_to_str(pinfo->pool, tvb, AT_IPv4, offset + 20), public_address_port, port);
5293 } else { /* IPv6 format */
5294 proto_tree_add_item(locator_tree, hf_rtps_locator_ipv6, tvb, offset+8,
5295 16, ENC_NA0x00000000);
5296 proto_item_append_text(tree, " (%s, %s, Logical Port = %u)",
5297 val_to_str(pinfo->pool, kind, rtps_locator_kind_vals, "%02x"),
5298 tvb_ip6_to_str(pinfo->pool, tvb, offset + 8)tvb_address_to_str(pinfo->pool, tvb, AT_IPv6, offset + 8), port);
5299 }
5300 break;
5301 }
5302 case LOCATOR_KIND_SHMEM(0x01000000): {
5303 uint32_t hostId;
5304 ti = proto_tree_add_item_ret_uint(
5305 locator_tree,
5306 hf_rtps_locator_port,
5307 tvb,
5308 offset + 4,
5309 4,
5310 encoding,
5311 &port);
5312 proto_tree_add_item_ret_uint(locator_tree, hf_rtps_param_host_id, tvb, offset+10, 4, ENC_BIG_ENDIAN0x00000000, &hostId);
5313 if (port == 0)
5314 expert_add_info(pinfo, ti, &ei_rtps_locator_port);
5315 proto_item_append_text(tree, " (%s, HostId = 0x%08x, Port = %u)",
5316 val_to_str(pinfo->pool, kind, rtps_locator_kind_vals, "%02x"),
5317 hostId, port);
5318 break;
5319 }
5320 case LOCATOR_KIND_UDPV6(2): {
5321 ti = proto_tree_add_item_ret_uint(
5322 locator_tree,
5323 hf_rtps_locator_port,
5324 tvb,
5325 offset + 4,
5326 4,
5327 encoding,
5328 &port);
5329 if (port == 0)
5330 expert_add_info(pinfo, ti, &ei_rtps_locator_port);
5331 proto_tree_add_item(locator_tree, hf_rtps_locator_ipv6, tvb, offset+8, 16, ENC_NA0x00000000);
5332 proto_item_append_text(tree, " (%s, %s:%u)",
5333 val_to_str(pinfo->pool, kind, rtps_locator_kind_vals, "%02x"),
5334 tvb_ip6_to_str(pinfo->pool, tvb, offset + 8)tvb_address_to_str(pinfo->pool, tvb, AT_IPv6, offset + 8), port);
5335 break;
5336 }
5337 case LOCATOR_KIND_DTLS(6): {
5338 proto_tree_add_item_ret_uint(
5339 locator_tree,
5340 hf_rtps_locator_port,
5341 tvb,
5342 offset + 4,
5343 4,
5344 encoding,
5345 &port);
5346 proto_tree_add_item(locator_tree, hf_rtps_locator_ipv6, tvb, offset+8, 16, ENC_NA0x00000000);
5347 proto_item_append_text(tree, " (%s, %s:%u)",
5348 val_to_str(pinfo->pool, kind, rtps_locator_kind_vals, "%02x"),
5349 tvb_ip6_to_str(pinfo->pool, tvb, offset + 8)tvb_address_to_str(pinfo->pool, tvb, AT_IPv6, offset + 8), port);
5350 break;
5351 }
5352 /*
5353 * +-------+-------+-------+-------+
5354 * | Flags | |
5355 * +-------+ +
5356 * | DDS_Octet UUID[9] |
5357 * + +-------+-------+
5358 * | | public_port |
5359 * +-------+-------+-------+-------+
5360 * | DDS_Octet public_ip_address[4]|
5361 * +-------+-------+-------+-------+
5362 */
5363 case LOCATOR_KIND_UDPV4_WAN(0x01000001): {
5364 uint8_t flags = 0;
5365 ws_in4_addr locator_ip = 0;
5366 const uint32_t uuid_size = 9;
5367 const uint32_t locator_port_size = 4;
5368 const uint32_t locator_port_offset = offset + 4;
5369 const uint32_t flags_offset = locator_port_offset + locator_port_size;
5370 const uint32_t uuid_offset = flags_offset + 1;
5371 const uint32_t port_offset = uuid_offset + uuid_size;
5372 const uint32_t ip_offset = port_offset + 2;
5373 int hf_port = 0;
5374 int hf_ip = 0;
5375 char* ip_str = NULL((void*)0);
5376 uint32_t public_port = 0;
5377 bool_Bool is_public = false0;
5378
5379 ti = proto_tree_add_item_ret_uint(
5380 locator_tree,
5381 hf_rtps_locator_port,
5382 tvb,
5383 locator_port_offset,
5384 locator_port_size,
5385 encoding,
5386 &port);
5387 flags = tvb_get_int8(tvb, flags_offset);
5388 proto_tree_add_bitmask_value(
5389 locator_tree,
5390 tvb,
5391 flags_offset,
5392 hf_rtps_udpv4_wan_locator_flags,
5393 ett_rtps_flags,
5394 UDPV4_WAN_LOCATOR_FLAGS,
5395 (uint64_t)flags);
5396
5397 /* UUID */
5398 proto_tree_add_item(locator_tree, hf_rtps_uuid, tvb, uuid_offset, UUID_SIZE(9), encoding);
5399
5400 /*
5401 * The P flag indicates that the locator contains a globally public IP address
5402 * and public port where a transport instance can be reached. public_ip_address
5403 * contains the public IP address and public_port contains the public UDP port.
5404 * Locators with the P flag set are called PUBLIC locators.
5405 */
5406 is_public = ((flags & FLAG_UDPV4_WAN_LOCATOR_P(0x02)) != 0);
5407 if (is_public) {
5408 hf_ip = hf_rtps_udpv4_wan_locator_public_ip;
5409 hf_port = hf_rtps_udpv4_wan_locator_public_port;
5410 } else {
5411 hf_ip = hf_rtps_udpv4_wan_locator_local_ip;
5412 hf_port = hf_rtps_udpv4_wan_locator_local_port;
5413 }
5414
5415 /* Port & IP */
5416 ip_str = tvb_ip_to_str(pinfo->pool, tvb, ip_offset)tvb_address_to_str(pinfo->pool, tvb, AT_IPv4, ip_offset);
5417 locator_ip = tvb_get_ipv4(tvb, ip_offset);
5418 if (locator_ip != 0) {
5419 proto_tree_add_item_ret_uint(
5420 locator_tree,
5421 hf_port,
5422 tvb,
5423 port_offset,
5424 2,
5425 ENC_NA0x00000000,
5426 &public_port);
5427 proto_tree_add_ipv4(
5428 locator_tree,
5429 hf_ip,
5430 tvb,
5431 ip_offset,
5432 4,
5433 locator_ip);
5434 }
5435 if (port == 0)
5436 expert_add_info(pinfo, ti, &ei_rtps_locator_port);
5437 if (ip_str != NULL((void*)0) && locator_ip != 0) {
5438 if (is_public) {
5439 proto_item_append_text(tree, " (%s, public: %s:%u, rtps port:%u)",
5440 val_to_str(pinfo->pool, kind, rtps_locator_kind_vals, "%02x"),
5441 ip_str, public_port, port);
5442 } else {
5443 proto_item_append_text(tree, " (%s, local: %s:%u)",
5444 val_to_str(pinfo->pool, kind, rtps_locator_kind_vals, "%02x"),
5445 ip_str, port);
5446 }
5447 }
5448 }
5449 /* Default case, we already have the locator kind so don't do anything */
5450 default:
5451 break;
5452 }
5453 return offset + parameter_size;
5454}
5455
5456/* ------------------------------------------------------------------------- */
5457/* Insert in the protocol tree the next bytes interpreted as Sequence of
5458 * unsigned shorts.
5459 * The formatted buffer is: val1, val2, val3, ...
5460 * Returns the new updated offset
5461 */
5462static int rtps_util_add_seq_short(proto_tree *tree, tvbuff_t *tvb, int offset, int hf_item,
5463 const unsigned encoding, int param_length _U___attribute__((unused)), const char *label) {
5464 uint32_t num_elem;
5465 uint32_t i;
5466 proto_tree *string_tree;
5467
5468 num_elem = tvb_get_uint32(tvb, offset, encoding);
5469 offset += 4;
5470
5471 /* Create the string node with an empty string, the replace it later */
5472 string_tree = proto_tree_add_subtree_format(tree, tvb, offset, num_elem * 4,
5473 ett_rtps_seq_ulong, NULL((void*)0), "%s (%d elements)", label, num_elem);
5474
5475 for (i = 0; i < num_elem; ++i) {
5476 proto_tree_add_item(string_tree, hf_item, tvb, offset, 2, encoding);
5477 offset += 2;
5478 }
5479
5480 return offset;
5481}
5482
5483static int rtps_util_add_locator_ex_t(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, int offset,
5484 const unsigned encoding, int param_length) {
5485 int locator_offset = 0;
5486
5487 locator_offset = rtps_util_add_locator_t(tree, pinfo, tvb,
5488 offset, encoding, "locator");
5489 offset += rtps_util_add_seq_short(tree, tvb, locator_offset, hf_rtps_encapsulation_id,
5490 encoding, param_length - (locator_offset - offset), "encapsulations");
5491 return offset;
5492}
5493
5494/* ------------------------------------------------------------------------- */
5495/* Insert in the protocol tree the next bytes interpreted as a list of
5496 * Locators:
5497 * - unsigned long numLocators
5498 * - locator 1
5499 * - locator 2
5500 * - ...
5501 * - locator n
5502 * Returns the new offset after parsing the locator list
5503 */
5504static int rtps_util_add_locator_list(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
5505 int offset, const uint8_t *label, const unsigned encoding) {
5506
5507 proto_tree *locator_tree;
5508 uint32_t num_locators;
5509
5510 num_locators = tvb_get_uint32(tvb, offset, encoding);
5511
5512 locator_tree = proto_tree_add_subtree_format(tree, tvb, offset, 4,
5513 ett_rtps_locator_udp_v4, NULL((void*)0), "%s: %d Locators", label, num_locators);
5514 offset += 4;
5515 if (num_locators > 0) {
5516 uint32_t i;
5517 char temp_buff[20];
5518
5519 for (i = 0; i < num_locators; ++i) {
5520 snprintf(temp_buff, 20, "Locator[%d]", i);
5521 rtps_util_add_locator_t(locator_tree, pinfo, tvb, offset,
5522 encoding, temp_buff);
5523 offset += 24;
5524 }
5525 }
5526 return offset;
5527}
5528
5529/* ------------------------------------------------------------------------- */
5530/* Insert in the protocol tree the next bytes interpreted as a list of
5531* multichannel Locators:
5532* - unsigned long numLocators
5533* - locator 1
5534* - locator 2
5535* - ...
5536* - locator n
5537* Returns the new offset after parsing the locator list
5538*/
5539static int rtps_util_add_multichannel_locator_list(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
5540 int offset, const uint8_t *label, const unsigned encoding) {
5541
5542 proto_tree *locator_tree;
5543 uint32_t num_locators;
5544
5545 num_locators = tvb_get_uint32(tvb, offset, encoding);
5546 locator_tree = proto_tree_add_subtree_format(tree, tvb, offset, 4,
5547 ett_rtps_locator_udp_v4, NULL((void*)0), "%s: %d Locators", label, num_locators);
5548
5549 offset += 4;
5550 if (num_locators > 0) {
5551 uint32_t i;
5552 for (i = 0; i < num_locators; ++i) {
5553 proto_tree *ti, *locator_item_tree;
5554 uint32_t kind;
5555 uint32_t port;
5556 char *channel_address;
5557 locator_item_tree = proto_tree_add_subtree(locator_tree, tvb, offset, 24, ett_rtps_locator,
5558 NULL((void*)0), label);
5559 proto_tree_add_item_ret_uint(locator_item_tree, hf_rtps_locator_kind, tvb, offset, 4, encoding, &kind);
5560 switch (kind) {
5561 case LOCATOR_KIND_UDPV4(1):
5562 case LOCATOR_KIND_TUDPV4(0x01001001): {
5563 proto_tree_add_item(locator_item_tree, hf_rtps_locator_ipv4, tvb, offset + 16, 4,
5564 ENC_BIG_ENDIAN0x00000000);
5565 channel_address = tvb_ip_to_str(pinfo->pool, tvb, offset + 16)tvb_address_to_str(pinfo->pool, tvb, AT_IPv4, offset + 16);
5566 break;
5567 }
5568 case LOCATOR_KIND_UDPV6(2): {
5569 proto_tree_add_item(locator_tree, hf_rtps_locator_ipv6, tvb, offset + 4, 16, ENC_NA0x00000000);
5570 channel_address = tvb_ip6_to_str(pinfo->pool, tvb, offset + 4)tvb_address_to_str(pinfo->pool, tvb, AT_IPv6, offset + 4);
5571 proto_item_append_text(tree, " (%s, %s)",
5572 val_to_str(pinfo->pool, kind, rtps_locator_kind_vals, "%02x"),
5573 tvb_ip6_to_str(pinfo->pool, tvb, offset + 4)tvb_address_to_str(pinfo->pool, tvb, AT_IPv6, offset + 4));
5574 break;
5575 }
5576 /* Default case, Multichannel locators only should be present in UDPv4 and UDPv6 transports
5577 * Unknown address format.
5578 * */
5579 default:
5580 offset += 24;
5581 continue;
5582 break;
5583 }
5584 ti = proto_tree_add_item_ret_uint(locator_item_tree, hf_rtps_locator_port, tvb, offset + 20, 4, encoding, &port);
5585 if (port == 0)
5586 expert_add_info(pinfo, ti, &ei_rtps_locator_port);
5587 proto_item_append_text(tree, " (%s, %s:%u)",
5588 val_to_str(pinfo->pool, kind, rtps_locator_kind_vals, "%02x"),
5589 channel_address, port);
5590 offset += 24;
5591 }
5592 }
5593 return offset;
5594}
5595
5596/* ------------------------------------------------------------------------- */
5597/* Insert in the protocol tree the next 4 bytes interpreted as IPV4Address_t
5598 */
5599static void rtps_util_add_ipv4_address_t(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, int offset,
5600 const unsigned encoding, int hf_item) {
5601
5602 proto_item *ti;
5603
5604 ti = proto_tree_add_item(tree, hf_item, tvb, offset, 4, encoding);
5605 if (tvb_get_ntohl(tvb, offset) == IPADDRESS_INVALID(0))
5606 expert_add_info(pinfo, ti, &ei_rtps_ip_invalid);
5607}
5608
5609
5610
5611/* ------------------------------------------------------------------------- */
5612/* Insert in the protocol tree the next 8 bytes interpreted as LocatorUDPv4
5613 *
5614 * LocatorUDPv4 is a struct defined as:
5615 * struct {
5616 * unsigned long address;
5617 * unsigned long port;
5618 * } LocatorUDPv4_t;
5619 *
5620 */
5621static void rtps_util_add_locator_udp_v4(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
5622 int offset, const uint8_t *label, const unsigned encoding) {
5623
5624 proto_item *ti;
5625 proto_tree *locator_tree;
5626 uint32_t port;
5627
5628 locator_tree = proto_tree_add_subtree(tree, tvb, offset, 8, ett_rtps_locator_udp_v4, NULL((void*)0), label);
5629
5630 rtps_util_add_ipv4_address_t(locator_tree, pinfo, tvb, offset,
5631 encoding, hf_rtps_locator_udp_v4);
5632
5633 ti = proto_tree_add_item_ret_uint(locator_tree, hf_rtps_locator_udp_v4_port, tvb, offset, 4, encoding, &port);
5634 if (port == PORT_INVALID(0))
5635 expert_add_info(pinfo, ti, &ei_rtps_port_invalid);
5636}
5637
5638/* ------------------------------------------------------------------------- */
5639/* Insert in the protocol tree the next 8 bytes interpreted as GuidPrefix
5640 * If tree is specified, it fills up the protocol tree item:
5641 * - hf_rtps_guid_prefix
5642 * - hf_rtps_host_id
5643 * - hf_rtps_app_id
5644 * - hf_rtps_app_id_instance_id
5645 * - hf_rtps_app_id_app_kind
5646 */
5647static void rtps_util_add_guid_prefix_v1(proto_tree *tree, packet_info* pinfo, tvbuff_t *tvb, int offset,
5648 int hf_prefix, int hf_host_id, int hf_app_id, int hf_app_id_instance_id,
5649 int hf_app_id_app_kind, const uint8_t *label) {
5650 uint64_t prefix;
5651 uint32_t host_id, app_id, instance_id;
5652 uint8_t app_kind;
5653 proto_item *ti;
5654 proto_tree *guid_tree, *appid_tree;
5655 const uint8_t *safe_label = (label == NULL((void*)0)) ? (const uint8_t *)"guidPrefix" : label;
5656
5657 /* Read values from TVB */
5658 prefix = tvb_get_ntoh64(tvb, offset);
5659 host_id = tvb_get_ntohl(tvb, offset);
5660 app_id = tvb_get_ntohl(tvb, offset + 4);
5661 instance_id = (app_id >> 8);
5662 app_kind = (app_id & 0xff);
5663
5664 if (tree != NULL((void*)0)) {
5665 ti = proto_tree_add_uint64_format(tree, hf_prefix, tvb, offset, 8, prefix,
5666 "%s=%08x %08x { hostId=%08x, appId=%08x (%s: %06x) }",
5667 safe_label, host_id, app_id, host_id, app_id,
5668 val_to_str(pinfo->pool, app_kind, app_kind_vals, "%02x"),
5669 instance_id);
5670
5671 guid_tree = proto_item_add_subtree(ti, ett_rtps_guid_prefix);
5672
5673 /* Host Id */
5674 proto_tree_add_item(guid_tree, hf_host_id, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000);
5675
5676 /* AppId (root of the app_id sub-tree) */
5677 ti = proto_tree_add_item(guid_tree, hf_app_id, tvb, offset+4, 4, ENC_BIG_ENDIAN0x00000000);
5678 appid_tree = proto_item_add_subtree(ti, ett_rtps_app_id);
5679
5680 /* InstanceId */
5681 proto_tree_add_item(appid_tree, hf_app_id_instance_id, tvb, offset+4, 3, ENC_BIG_ENDIAN0x00000000);
5682 /* AppKind */
5683 proto_tree_add_item(appid_tree, hf_app_id_app_kind, tvb, offset+7, 1, ENC_BIG_ENDIAN0x00000000);
5684 }
5685}
5686
5687/* ------------------------------------------------------------------------- */
5688/* Insert in the protocol tree the next 12 bytes interpreted as GuidPrefix
5689 * If tree is specified, it fills up the protocol tree item:
5690 * - hf_rtps_guid_prefix
5691 * - hf_rtps_host_id
5692 * - hf_rtps_app_id
5693 * - hf_rtps_counter
5694 */
5695static void rtps_util_add_guid_prefix_v2(proto_tree *tree, tvbuff_t *tvb, int offset,
5696 int hf_prefix, int hf_host_id, int hf_app_id,
5697 int hf_instance_id, int hf_prefix_extra) {
5698 /*
5699 * 0...2...........7...............15.............23...............31
5700 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
5701 * | host id |
5702 * +---------------+---------------+---------------+---------------+
5703 * | app id |
5704 * +---------------+---------------+---------------+---------------+
5705 * | instance id |
5706 * +---------------+---------------+---------------+---------------+
5707 */
5708 if (tree) {
5709 proto_item *ti;
5710 proto_tree *guid_tree;
5711
5712 /* The text node (root of the guid prefix sub-tree) */
5713 ti = proto_tree_add_item(tree, hf_prefix, tvb, offset, 12, ENC_NA0x00000000);
5714 guid_tree = proto_item_add_subtree(ti, ett_rtps_guid_prefix);
5715
5716 /* Optional filter that can be guidPrefix.src or guidPrefix.dst */
5717 if (hf_prefix_extra != 0) {
5718 ti = proto_tree_add_item(tree, hf_prefix_extra, tvb, offset, 12, ENC_NA0x00000000);
5719 proto_item_set_hidden(ti);
5720 }
5721
5722 /* Host Id */
5723 proto_tree_add_item(guid_tree, hf_host_id, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000);
5724
5725 /* App Id */
5726 proto_tree_add_item(guid_tree, hf_app_id, tvb, offset+4, 4, ENC_BIG_ENDIAN0x00000000);
5727
5728 /* Counter */
5729 proto_tree_add_item(guid_tree, hf_instance_id, tvb, offset+8, 4, ENC_BIG_ENDIAN0x00000000);
5730 }
5731}
5732/* ------------------------------------------------------------------------- */
5733 /* Insert the entityId from the next 4 bytes. Since there are more than
5734 * one entityId, we need to specify also the IDs of the entityId (and its
5735 * sub-components), as well as the label identifying it.
5736 * Returns true if the entityKind is one of the NDDS built-in entities.
5737 */
5738static bool_Bool rtps_util_add_entity_id(proto_tree *tree, packet_info* pinfo, tvbuff_t *tvb, int offset,
5739 int hf_item, int hf_item_entity_key, int hf_item_entity_kind,
5740 int subtree_entity_id, const char *label, uint32_t *entity_id_out) {
5741 uint32_t entity_id = tvb_get_ntohl(tvb, offset);
5742 uint32_t entity_key = (entity_id >> 8);
5743 uint8_t entity_kind = (entity_id & 0xff);
5744 const char *str_predef = try_val_to_str(entity_id, entity_id_vals);
5745
5746 if (entity_id_out != NULL((void*)0)) {
5747 *entity_id_out = entity_id;
5748 }
5749
5750 if (tree != NULL((void*)0)) {
5751 proto_tree *entity_tree;
5752 proto_item *ti;
5753
5754 if (str_predef == NULL((void*)0)) {
5755 /* entityId is not a predefined value, format it */
5756 ti = proto_tree_add_uint_format(tree, hf_item, tvb, offset, 4, entity_id,
5757 "%s: 0x%08x (%s: 0x%06x)",
5758 label, entity_id,
5759 val_to_str(pinfo->pool, entity_kind, entity_kind_vals, "unknown kind (%02x)"),
5760 entity_key);
5761 } else {
5762 /* entityId is a predefined value */
5763 ti = proto_tree_add_uint_format(tree, hf_item, tvb, offset, 4, entity_id,
5764 "%s: %s (0x%08x)", label, str_predef, entity_id);
5765 }
5766
5767 entity_tree = proto_item_add_subtree(ti, subtree_entity_id);
5768
5769 proto_tree_add_item(entity_tree, hf_item_entity_key, tvb, offset, 3, ENC_BIG_ENDIAN0x00000000);
5770 proto_tree_add_item(entity_tree, hf_item_entity_kind, tvb, offset+3, 1, ENC_BIG_ENDIAN0x00000000);
5771 }
5772
5773 /* is a built-in entity if the bit M and R (5 and 6) of the entityKind are set */
5774 /* return ((entity_kind & 0xc0) == 0xc0); */
5775 return ( ((entity_kind & 0xc0) == 0xc0) ||
5776 entity_id == ENTITYID_RTI_BUILTIN_SERVICE_REQUEST_WRITER(0x00020082) ||
5777 entity_id == ENTITYID_RTI_BUILTIN_SERVICE_REQUEST_READER(0x00020087) ||
5778 entity_id == ENTITYID_RTI_BUILTIN_LOCATOR_PING_WRITER(0x00020182) ||
5779 entity_id == ENTITYID_RTI_BUILTIN_LOCATOR_PING_READER(0x00020187));
5780}
5781
5782/* ------------------------------------------------------------------------- */
5783 /* Insert the entityId from the next 4 bytes as a generic one (not connected
5784 * to any protocol field). It simply insert the content as a simple text entry
5785 * and returns in the passed buffer only the value (without the label).
5786 */
5787static void rtps_util_add_generic_entity_id(proto_tree *tree, packet_info* pinfo, tvbuff_t *tvb, int offset, const char *label,
5788 int hf_item, int hf_item_entity_key, int hf_item_entity_kind,
5789 int subtree_entity_id) {
5790 uint32_t entity_id = tvb_get_ntohl(tvb, offset);
5791 uint32_t entity_key = (entity_id >> 8);
5792 uint8_t entity_kind = (entity_id & 0xff);
5793 const char *str_predef = try_val_to_str(entity_id, entity_id_vals);
5794 proto_item *ti;
5795 proto_tree *entity_tree;
5796
5797 if (str_predef == NULL((void*)0)) {
5798 /* entityId is not a predefined value, format it */
5799 ti = proto_tree_add_uint_format(tree, hf_item, tvb, offset, 4, entity_id,
5800 "%s: 0x%08x (%s: 0x%06x)", label, entity_id,
5801 val_to_str(pinfo->pool, entity_kind, entity_kind_vals, "unknown kind (%02x)"),
5802 entity_key);
5803 } else {
5804 /* entityId is a predefined value */
5805 ti = proto_tree_add_uint_format_value(tree, hf_item, tvb, offset, 4, entity_id,
5806 "%s: %s (0x%08x)", label, str_predef, entity_id);
5807 }
5808
5809 entity_tree = proto_item_add_subtree(ti, subtree_entity_id);
5810
5811 proto_tree_add_item(entity_tree, hf_item_entity_key, tvb, offset, 3, ENC_BIG_ENDIAN0x00000000);
5812 proto_tree_add_item(entity_tree, hf_item_entity_kind, tvb, offset+3, 1, ENC_BIG_ENDIAN0x00000000);
5813
5814}
5815
5816/* ------------------------------------------------------------------------- */
5817 /* Interpret the next 12 octets as a generic GUID and insert it in the protocol
5818 * tree as simple text (no reference fields are set).
5819 * It is mostly used in situation where is not required to perform search for
5820 * this kind of GUID (i.e. like in some DATA parameter lists).
5821 */
5822static void rtps_util_add_generic_guid_v1(proto_tree *tree, tvbuff_t *tvb, int offset,
5823 int hf_guid, int hf_host_id, int hf_app_id, int hf_app_id_instance_id,
5824 int hf_app_id_app_kind, int hf_entity, int hf_entity_key,
5825 int hf_entity_kind) {
5826
5827 uint64_t prefix;
5828 uint32_t host_id, app_id, entity_id;
5829 proto_item *ti;
5830 proto_tree *guid_tree, *appid_tree, *entity_tree;
5831
5832 /* Read typed data */
5833 prefix = tvb_get_ntoh64(tvb, offset);
5834 host_id = tvb_get_ntohl(tvb, offset);
5835 app_id = tvb_get_ntohl(tvb, offset + 4);
5836 entity_id = tvb_get_ntohl(tvb, offset + 8);
5837
5838 ti = proto_tree_add_uint64_format_value(tree, hf_guid, tvb, offset, 8, prefix, "%08x %08x %08x",
5839 host_id, app_id, entity_id);
5840
5841 guid_tree = proto_item_add_subtree(ti, ett_rtps_generic_guid);
5842
5843 /* Host Id */
5844 proto_tree_add_item(guid_tree, hf_host_id, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000);
5845
5846 /* AppId (root of the app_id sub-tree) */
5847 ti = proto_tree_add_item(guid_tree, hf_app_id, tvb, offset+4, 4, ENC_BIG_ENDIAN0x00000000);
5848 appid_tree = proto_item_add_subtree(ti, ett_rtps_app_id);
5849
5850 /* InstanceId */
5851 proto_tree_add_item(appid_tree, hf_app_id_instance_id, tvb, offset+4, 3, ENC_BIG_ENDIAN0x00000000);
5852 /* AppKind */
5853 proto_tree_add_item(appid_tree, hf_app_id_app_kind, tvb, offset+7, 1, ENC_BIG_ENDIAN0x00000000);
5854
5855 /* Entity (root of the app_id sub-tree) */
5856 ti = proto_tree_add_item(guid_tree, hf_entity, tvb, offset+8, 4, ENC_BIG_ENDIAN0x00000000);
5857 entity_tree = proto_item_add_subtree(ti, ett_rtps_entity);
5858
5859 proto_tree_add_item(entity_tree, hf_entity_key, tvb, offset+8, 3, ENC_BIG_ENDIAN0x00000000);
5860 proto_tree_add_item(entity_tree, hf_entity_kind, tvb, offset+11, 1, ENC_BIG_ENDIAN0x00000000);
5861}
5862
5863/* ------------------------------------------------------------------------- */
5864/* Insert in the protocol tree the next data interpreted as a String
5865 * Returns the new offset (after reading the string)
5866 * XXX - should check that string length field makes sense, possibly by
5867 * comparing to a passed-in container length (cf. #19359)
5868 */
5869static int rtps_util_add_string(proto_tree *tree, tvbuff_t *tvb, int offset,
5870 int hf_item, const unsigned encoding) {
5871 uint32_t size;
5872
5873 proto_tree_add_item_ret_uint(tree, hf_rtps_string_length, tvb, offset, 4, encoding, &size);
5874 proto_tree_add_item(tree, hf_item, tvb, offset+4, size, ENC_ASCII0x00000000);
5875
5876 /* NDDS align strings at 4-bytes word. So:
5877 * string_length: 4 -> buffer_length = 4;
5878 * string_length: 5 -> buffer_length = 8;
5879 * string_length: 6 -> buffer_length = 8;
5880 * string_length: 7 -> buffer_length = 8;
5881 * string_length: 8 -> buffer_length = 8;
5882 * ...
5883 */
5884 return offset + 4 + ((size + 3) & 0xfffffffc);
5885}
5886
5887/*
5888 * Insert in the protocol tree the next data interpreted as a String
5889 * Returns the new offset (after reading the string, without adding alignment)
5890 */
5891static int rtps_util_add_string_no_align(proto_tree* tree, tvbuff_t* tvb,
5892 int offset, int hf_item, const unsigned encoding)
5893{
5894 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
5895 uint32_t size = tvb_get_uint32(tvb, offset, encoding);
5896
5897 if (enable_debug_info)
5898 {
5899 proto_tree_add_item(tree, hf_rtps_string_length, tvb, offset,
5900 4, encoding);
5901 }
5902 offset += 4;
5903
5904 proto_tree_add_item(tree, hf_item, tvb, offset, size, ENC_ASCII0x00000000);
5905 return offset + size;
5906}
5907
5908static int rtps_util_add_data_tags(proto_tree *rtps_parameter_tree, tvbuff_t *tvb,
5909 int offset, const unsigned encoding, int param_length) {
5910
5911 /* 0...2...........7...............15.............23...............31
5912 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
5913 * | Sequence Size |
5914 * +ITEM 0---------+---------------+---------------+---------------+
5915 * | Name String Bytes |
5916 * +---------------+---------------+---------------+---------------+
5917 * | Value String Bytes |
5918 * +---------------+---------------+---------------+---------------+
5919 * ....
5920 * +ITEM N---------+---------------+---------------+---------------+
5921 * | Name String Bytes |
5922 * +---------------+---------------+---------------+---------------+
5923 * | Value String Bytes |
5924 * +---------------+---------------+---------------+---------------+
5925 */
5926
5927 proto_tree *tags_seq_tree = NULL((void*)0);
5928 proto_tree *tag_tree = NULL((void*)0);
5929 uint32_t seq_sum_elements, i;
5930
5931 seq_sum_elements = tvb_get_uint32(tvb, offset, encoding);
5932 offset += 4;
5933
5934 tags_seq_tree = proto_tree_add_subtree_format(rtps_parameter_tree, tvb, offset - 4, param_length,
5935 ett_rtps_data_tag_seq, NULL((void*)0), "Tags (size = %u)", seq_sum_elements);
5936
5937 for (i = 0; i < seq_sum_elements; ++i) {
5938 uint32_t initial_offset = offset;
5939 tag_tree = proto_tree_add_subtree_format(tags_seq_tree, tvb, offset, -1, ett_rtps_data_tag_item,
5940 NULL((void*)0), "Tag [%u]", i);
5941 offset = rtps_util_add_string(tag_tree, tvb, offset, hf_rtps_data_tag_name, encoding);
5942 offset = rtps_util_add_string(tag_tree, tvb, offset, hf_rtps_data_tag_value, encoding);
5943 proto_item_set_len(tag_tree, offset - initial_offset);
5944 }
5945 return offset;
5946}
5947
5948
5949
5950/* ------------------------------------------------------------------------- */
5951 /* Interpret the next 16 octets as a generic GUID and insert it in the protocol
5952 * tree as simple text (no reference fields are set).
5953 * It is mostly used in situation where is not required to perform search for
5954 * this kind of GUID (i.e. like in some DATA parameter lists).
5955 */
5956static void rtps_util_add_generic_guid_v2(proto_tree *tree, tvbuff_t *tvb, int offset,
5957 int hf_guid, int hf_host_id, int hf_app_id, int hf_instance_id,
5958 int hf_entity, int hf_entity_key, int hf_entity_kind, proto_tree *print_tree) {
5959
5960 uint32_t host_id, app_id, entity_id, instance_id;
5961 proto_item *ti;
5962 proto_tree *guid_tree, *entity_tree;
5963
5964 /* Read typed data */
5965 host_id = tvb_get_ntohl(tvb, offset);
5966 app_id = tvb_get_ntohl(tvb, offset + 4);
5967 instance_id = tvb_get_ntohl(tvb, offset + 8);
5968 entity_id = tvb_get_ntohl(tvb, offset + 12);
5969
5970 ti = proto_tree_add_bytes_format_value(tree, hf_guid, tvb, offset, 16, NULL((void*)0), "%08x %08x %08x %08x",
5971 host_id, app_id, instance_id, entity_id);
5972
5973 /* If the method is called with a valid print_tree pointer, we add the info to the tree.
5974 * This improves usability a lot since the user doesn't have to click a lot to debug. */
5975 proto_item_append_text(print_tree, "%08x %08x %08x %08x",
5976 host_id, app_id, instance_id, entity_id);
5977
5978 guid_tree = proto_item_add_subtree(ti, ett_rtps_generic_guid);
5979
5980 /* Host Id */
5981 proto_tree_add_item(guid_tree, hf_host_id, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000);
5982
5983 /* App Id */
5984 proto_tree_add_item(guid_tree, hf_app_id, tvb, offset+4, 4, ENC_BIG_ENDIAN0x00000000);
5985
5986 /* Instance Id */
5987 proto_tree_add_item(guid_tree, hf_instance_id, tvb, offset+8, 4, ENC_BIG_ENDIAN0x00000000);
5988
5989 /* Entity (root of the app_id sub-tree) */
5990 ti = proto_tree_add_item(guid_tree, hf_entity, tvb, offset+12, 4, ENC_BIG_ENDIAN0x00000000);
5991 entity_tree = proto_item_add_subtree(ti, ett_rtps_entity);
5992
5993 proto_tree_add_item(entity_tree, hf_entity_key, tvb, offset+12, 3, ENC_BIG_ENDIAN0x00000000);
5994 proto_tree_add_item(entity_tree, hf_entity_kind, tvb, offset+15, 1, ENC_BIG_ENDIAN0x00000000);
5995}
5996
5997
5998/* ------------------------------------------------------------------------- */
5999/* Insert in the protocol tree the next 8 bytes interpreted as sequence
6000 * number.
6001 */
6002static uint64_t rtps_util_add_seq_number(proto_tree *tree,
6003 tvbuff_t *tvb,
6004 int offset,
6005 const unsigned encoding,
6006 const char *label) {
6007 uint64_t hi = (uint64_t)tvb_get_uint32(tvb, offset, encoding);
6008 uint64_t lo = (uint64_t)tvb_get_uint32(tvb, offset+4, encoding);
6009 uint64_t all = (hi << 32) | lo;
6010
6011 proto_tree_add_int64_format(tree, hf_rtps_sm_seq_number, tvb, offset, 8,
6012 all, "%s: %" PRIu64"l" "u", label, all);
6013
6014 return all;
6015}
6016
6017
6018/* ------------------------------------------------------------------------- */
6019/* Vendor specific: RTI
6020 * Insert in the protocol tree the next 8 bytes interpreted as TransportInfo
6021 */
6022static void rtps_util_add_transport_info(proto_tree *tree,
6023 tvbuff_t *tvb,
6024 int offset,
6025 const unsigned encoding,
6026 int transport_index)
6027 {
6028 int32_t classId = tvb_get_uint32(tvb, offset, encoding);
6029
6030 if (tree) {
6031 proto_tree *xport_info_tree;
6032
6033 xport_info_tree = proto_tree_add_subtree_format(tree, tvb, offset, 8, ett_rtps_transport_info, NULL((void*)0),
6034 "transportInfo %d: %s", transport_index, val_to_str_const(classId, ndds_transport_class_id_vals, "unknown"));
6035
6036 proto_tree_add_item(xport_info_tree, hf_rtps_transportInfo_classId, tvb,
6037 offset, 4, encoding);
6038 proto_tree_add_item(xport_info_tree, hf_rtps_transportInfo_messageSizeMax, tvb,
6039 offset+4, 4, encoding);
6040 }
6041}
6042
6043/* ------------------------------------------------------------------------- */
6044/* Insert in the protocol tree the next 8 bytes interpreted as an RTPS time_t,
6045 * which is like an NTP time stamp, except that it uses the UNIX epoch,
6046 * rather than the NTP epoch, as the time base. Doesn't check for TIME_ZERO,
6047 * TIME_INVALID, or TIME_INFINITE, and doesn't show the seconds and
6048 * fraction field separately.
6049 */
6050static void rtps_util_add_timestamp(proto_tree *tree,
6051 tvbuff_t *tvb,
6052 int offset,
6053 const unsigned encoding,
6054 int hf_time) {
6055
6056 proto_tree_add_item(tree, hf_time, tvb, offset, 8,
6057 ENC_TIME_RTPS0x00000008|encoding);
6058
6059}
6060
6061/* ------------------------------------------------------------------------- */
6062/* Insert in the protocol tree the next 8 bytes interpreted as an RTPS time_t.
6063 * Checks for special values except for TIME_INVALID, and shows the
6064 * seconds and fraction as separate fields.
6065 */
6066static void rtps_util_add_timestamp_sec_and_fraction(proto_tree *tree,
6067 tvbuff_t *tvb,
6068 int offset,
6069 const unsigned encoding,
6070 int hf_time _U___attribute__((unused))) {
6071
6072 char tempBuffer[MAX_TIMESTAMP_SIZE(128)];
6073 double absolute;
6074 int32_t sec;
6075 uint32_t frac;
6076
6077 if (tree) {
6078 proto_tree *time_tree;
6079
6080 sec = tvb_get_uint32(tvb, offset, encoding);
6081 frac = tvb_get_uint32(tvb, offset+4, encoding);
6082
6083 if ((sec == 0x7fffffff) && (frac == 0xffffffff)) {
6084 (void) g_strlcpy(tempBuffer, "INFINITE", MAX_TIMESTAMP_SIZE(128));
6085 } else if ((sec == 0) && (frac == 0)) {
6086 (void) g_strlcpy(tempBuffer, "0 sec", MAX_TIMESTAMP_SIZE(128));
6087 } else {
6088 absolute = (double)sec + (double)frac / ((double)(0x80000000) * 2.0);
6089 snprintf(tempBuffer, MAX_TIMESTAMP_SIZE(128),
6090 "%f sec (%ds + 0x%08x)", absolute, sec, frac);
6091 }
6092
6093 time_tree = proto_tree_add_subtree_format(tree, tvb, offset, 8,
6094 ett_rtps_timestamp, NULL((void*)0), "%s: %s", "lease_duration", tempBuffer);
6095
6096 proto_tree_add_item(time_tree, hf_rtps_param_timestamp_sec, tvb, offset, 4, encoding);
6097 proto_tree_add_item(time_tree, hf_rtps_param_timestamp_fraction, tvb, offset+4, 4, encoding);
6098 }
6099}
6100
6101/* ------------------------------------------------------------------------- */
6102/* Insert in the protocol tree the next data interpreted as a port (unsigned
6103 * 32-bit integer)
6104 */
6105static void rtps_util_add_port(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
6106 int offset, const unsigned encoding, int hf_item) {
6107 proto_item *ti;
6108 uint32_t port;
6109
6110 ti = proto_tree_add_item_ret_uint(tree, hf_item, tvb, offset, 4, encoding, &port);
6111 if (port == PORT_INVALID(0))
6112 expert_add_info(pinfo, ti, &ei_rtps_port_invalid);
6113}
6114
6115
6116/* ------------------------------------------------------------------------- */
6117/* Insert in the protocol tree the next bytes interpreted as
6118 * DurabilityServiceQosPolicy
6119 */
6120static void rtps_util_add_durability_service_qos(proto_tree *tree,
6121 tvbuff_t *tvb,
6122 int offset,
6123 const unsigned encoding) {
6124 proto_tree *subtree;
6125
6126 subtree = proto_tree_add_subtree(tree, tvb, offset, 28, ett_rtps_durability_service, NULL((void*)0), "PID_DURABILITY_SERVICE");
6127
6128 rtps_util_add_timestamp_sec_and_fraction(subtree, tvb, offset, encoding, hf_rtps_durability_service_cleanup_delay);
6129 proto_tree_add_item(subtree, hf_rtps_durability_service_history_kind, tvb, offset+8, 4, encoding);
6130 proto_tree_add_item(subtree, hf_rtps_durability_service_history_depth, tvb, offset+12, 4, encoding);
6131 proto_tree_add_item(subtree, hf_rtps_durability_service_max_samples, tvb, offset+16, 4, encoding);
6132 proto_tree_add_item(subtree, hf_rtps_durability_service_max_instances, tvb, offset+20, 4, encoding);
6133 proto_tree_add_item(subtree, hf_rtps_durability_service_max_samples_per_instances, tvb, offset+24, 4, encoding);
6134}
6135
6136/* ------------------------------------------------------------------------- */
6137/* Insert in the protocol tree the next bytes interpreted as Liveliness
6138 * QoS Policy structure.
6139 */
6140static void rtps_util_add_liveliness_qos(proto_tree *tree, tvbuff_t *tvb, int offset, const unsigned encoding) {
6141
6142 proto_tree *subtree;
6143
6144 subtree = proto_tree_add_subtree(tree, tvb, offset, 12, ett_rtps_liveliness, NULL((void*)0), "PID_LIVELINESS");
6145
6146 proto_tree_add_item(subtree, hf_rtps_liveliness_kind, tvb, offset, 4, encoding);
6147 rtps_util_add_timestamp_sec_and_fraction(subtree, tvb, offset+4, encoding, hf_rtps_liveliness_lease_duration);
6148}
6149
6150/* ------------------------------------------------------------------------- */
6151/* Insert in the protocol tree the next bytes interpreted as Liveliness
6152 * QoS Policy structure.
6153 */
6154static void rtps_util_add_product_version(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, int offset, int vendor_id) {
6155
6156 proto_tree *subtree;
6157 uint8_t major, minor, release, revision;
6158 int release_offset;
6159 int revision_offset;
6160
6161 release_offset = 2;
6162 revision_offset = 3;
6163 major = tvb_get_uint8(tvb, offset);
6164 minor = tvb_get_uint8(tvb, offset+1);
6165 release = tvb_get_uint8(tvb, offset+2);
6166 revision = tvb_get_uint8(tvb, offset+3);
6167
6168 if (vendor_id == RTPS_VENDOR_RTI_DDS(0x0101)) {
6169 if (major < 5 && revision == 0) {
6170 subtree = proto_tree_add_subtree_format(tree, tvb, offset, 4, ett_rtps_product_version, NULL((void*)0),
6171 "Product version: %d.%d%s", major, minor, format_char(pinfo->pool, release));
6172 } else if (major < 5 && revision > 0) {
6173 subtree = proto_tree_add_subtree_format(tree, tvb, offset, 4, ett_rtps_product_version, NULL((void*)0),
6174 "Product version: %d.%d%s rev%d", major, minor, format_char(pinfo->pool, release), revision);
6175 } else {
6176 subtree = proto_tree_add_subtree_format(tree, tvb, offset, 4, ett_rtps_product_version, NULL((void*)0),
6177 "Product version: %d.%d.%d.%d", major, minor, release, revision);
6178 }
6179 } else if (vendor_id == RTPS_VENDOR_RTI_DDS_MICRO(0x010A)) {
6180 /* In Micro < 3.0.0 release and revision numbers are switched */
6181 if (major < 3) {
6182 revision = revision ^ release;
6183 release = revision ^ release;
6184 revision = revision ^ release;
6185
6186 revision_offset = revision_offset ^ release_offset;
6187 release_offset = revision_offset ^ release_offset;
6188 revision_offset = revision_offset ^ release_offset;
6189 }
6190 if (revision != 0) {
6191 subtree = proto_tree_add_subtree_format(tree, tvb, offset, 4, ett_rtps_product_version, NULL((void*)0),
6192 "Product version: %d.%d.%d.%d", major, minor, release, revision);
6193 } else {
6194 subtree = proto_tree_add_subtree_format(tree, tvb, offset, 4, ett_rtps_product_version, NULL((void*)0),
6195 "Product version: %d.%d.%d", major, minor, release);
6196 }
6197 } else {
6198 return;
6199 }
6200
6201 proto_tree_add_item(subtree, hf_rtps_param_product_version_major,
6202 tvb, offset, 1, ENC_NA0x00000000);
6203 proto_tree_add_item(subtree, hf_rtps_param_product_version_minor,
6204 tvb, offset+1, 1, ENC_NA0x00000000);
6205 /* If major revision is smaller than 5, release interpreted as char */
6206 if (vendor_id == RTPS_VENDOR_RTI_DDS(0x0101) && major < 5) {
6207 proto_tree_add_item(subtree, hf_rtps_param_product_version_release_as_char,
6208 tvb, offset + release_offset, 1, ENC_ASCII0x00000000);
6209 } else {
6210 proto_tree_add_item(subtree, hf_rtps_param_product_version_release,
6211 tvb, offset + release_offset, 1, ENC_NA0x00000000);
6212 }
6213 proto_tree_add_item(subtree, hf_rtps_param_product_version_revision,
6214 tvb, offset + revision_offset, 1, ENC_NA0x00000000);
6215}
6216
6217/* ------------------------------------------------------------------------- */
6218/* Insert in the protocol tree the next bytes interpreted as Sequence of
6219 * Strings.
6220 * The formatted buffer is: "string1", "string2", "string3", ...
6221 * Returns the new updated offset
6222 */
6223static int rtps_util_add_seq_string(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, int offset,
6224 const unsigned encoding, int hf_numstring,
6225 int hf_string, const char *label) {
6226 uint32_t size;
6227 int32_t i, num_strings;
6228 const char *retVal;
6229 proto_tree *string_tree;
6230 int start;
6231
6232 proto_tree_add_item_ret_int(tree, hf_numstring, tvb, offset, 4, encoding, &num_strings);
6233 offset += 4;
6234
6235 if (num_strings == 0) {
6236 return offset;
6237 }
6238
6239 start = offset;
6240 /* Create the string node with a fake string, the replace it later */
6241 string_tree = proto_tree_add_subtree(tree, tvb, offset, -1, ett_rtps_seq_string, NULL((void*)0), label);
6242
6243 for (i = 0; i < num_strings; ++i) {
6244 size = tvb_get_uint32(tvb, offset, encoding);
6245
6246 retVal = (const char* )tvb_get_string_enc(pinfo->pool, tvb, offset+4, size, ENC_ASCII0x00000000);
6247
6248 proto_tree_add_string_format(string_tree, hf_string, tvb, offset, size+4, retVal,
6249 "%s[%d]: %s", label, i, retVal);
6250
6251 offset += (4 + ((size + 3) & 0xfffffffc));
6252 }
6253
6254 proto_item_set_len(string_tree, offset - start);
6255 return offset;
6256}
6257
6258/* ------------------------------------------------------------------------- */
6259/* Insert in the protocol tree the next bytes interpreted as Sequence of
6260 * longs.
6261 * The formatted buffer is: val1, val2, val3, ...
6262 * Returns the new updated offset
6263 */
6264static int rtps_util_add_seq_ulong(proto_tree *tree, tvbuff_t *tvb, int offset, int hf_item,
6265 const unsigned encoding, int param_length _U___attribute__((unused)), const char *label) {
6266 uint32_t num_elem;
6267 uint32_t i;
6268 proto_tree *string_tree;
6269
6270 num_elem = tvb_get_uint32(tvb, offset, encoding);
6271 offset += 4;
6272
6273 /* Create the string node with an empty string, the replace it later */
6274 string_tree = proto_tree_add_subtree_format(tree, tvb, offset, num_elem*4,
6275 ett_rtps_seq_ulong, NULL((void*)0), "%s (%d elements)", label, num_elem);
6276
6277 for (i = 0; i < num_elem; ++i) {
6278 proto_tree_add_item(string_tree, hf_item, tvb, offset, 4, encoding);
6279 offset += 4;
6280 }
6281
6282 return offset;
6283}
6284
6285/* ------------------------------------------------------------------------- */
6286static const char *rtps_util_typecode_id_to_string(uint32_t typecode_id) {
6287 switch(typecode_id) {
6288 case RTI_CDR_TK_ENUM: return "enum";
6289 case RTI_CDR_TK_UNION: return "union";
6290 case RTI_CDR_TK_STRUCT: return "struct";
6291 case RTI_CDR_TK_LONG: return "long";
6292 case RTI_CDR_TK_SHORT: return "short";
6293 case RTI_CDR_TK_USHORT: return "unsigned short";
6294 case RTI_CDR_TK_ULONG: return "unsigned long";
6295 case RTI_CDR_TK_FLOAT: return "float";
6296 case RTI_CDR_TK_DOUBLE: return "double";
6297 case RTI_CDR_TK_BOOLEAN: return "boolean";
6298 case RTI_CDR_TK_CHAR: return "char";
6299 case RTI_CDR_TK_OCTET: return "octet";
6300 case RTI_CDR_TK_LONGLONG: return "longlong";
6301 case RTI_CDR_TK_ULONGLONG: return "unsigned long long";
6302 case RTI_CDR_TK_LONGDOUBLE: return "long double";
6303 case RTI_CDR_TK_WCHAR: return "wchar";
6304 case RTI_CDR_TK_WSTRING: return "wstring";
6305 case RTI_CDR_TK_STRING: return "string";
6306 case RTI_CDR_TK_SEQUENCE: return "sequence";
6307 case RTI_CDR_TK_ARRAY: return "array";
6308 case RTI_CDR_TK_ALIAS: return "alias";
6309 case RTI_CDR_TK_VALUE: return "valuetype";
6310
6311 case RTI_CDR_TK_NULL:
6312 default:
6313 return "<unknown type>";
6314 }
6315}
6316
6317/* ------------------------------------------------------------------------- */
6318/* Insert in the protocol tree the next bytes interpreted as typecode info
6319 * Returns the number of bytes parsed
6320 */
6321// NOLINTNEXTLINE(misc-no-recursion)
6322static int rtps_util_add_typecode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset, const unsigned encoding,
6323 int indent_level, int is_pointer, uint16_t bitfield, int is_key, const int offset_begin,
6324 char *name,
6325 int seq_max_len, /* -1 = not a sequence field */
6326 uint32_t *arr_dimension, /* if !NULL: array of 10 int */
6327 int ndds_40_hack) {
6328 const int original_offset = offset;
6329 uint32_t tk_id;
6330 uint16_t tk_size;
6331 unsigned int i;
6332 char *indent_string;
6333 int retVal;
6334 char type_name[40];
6335
6336 /* Structure of the typecode data:
6337 * Offset | Size | Field | Notes
6338 * ----------|-------|------------------------------|---------------------
6339 * ? | ? | pad? |
6340 * 0 | 4 | RTI_CDR_TK_XXXXX | 4 bytes aligned
6341 * 4 | 2 | length the struct |
6342 */
6343
6344 /* Calc indent string */
6345 indent_string = (char *)wmem_alloc(wmem_epan_scope(), (indent_level*2)+1);
6346 memset(indent_string, ' ', (indent_level*2)+1);
6347 indent_string[indent_level*2] = '\0';
6348
6349 /* Gets TK ID */
6350 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
6351 tk_id = tvb_get_uint32(tvb, offset, encoding);
6352 offset += 4;
6353
6354 /* Gets TK size */
6355 tk_size = tvb_get_uint16(tvb, offset, encoding);
6356 offset += 2;
6357
6358 retVal = tk_size + 6; /* 6 = 4 (typecode ID) + 2 (size) */
6359
6360 /* The first bit of typecode is set to 1, clear it */
6361 tk_id &= 0x7fffffff;
6362
6363 /* HACK: NDDS 4.0 and NDDS 4.1 has different typecode ID list.
6364 * The ID listed in the RTI_CDR_TK_XXXXX are the one from NDDS 4.1
6365 * In order to correctly dissect NDDS 4.0 packets containing typecode
6366 * information, we check if the ID of the element at level zero is a
6367 * struct or union. If not, it means we are dissecting a ndds 4.0 packet
6368 * (and we can decrement the ID to match the correct values).
6369 */
6370 if (indent_level == 0) {
6371 if (tk_id == RTI_CDR_TK_OCTET) {
6372 ndds_40_hack = 1;
6373 }
6374 }
6375 if (ndds_40_hack) {
6376 ++tk_id;
6377 }
6378
6379 (void) g_strlcpy(type_name, rtps_util_typecode_id_to_string(tk_id), sizeof(type_name));
6380
6381 /* Structure of the typecode data:
6382 *
6383 * <type_code_header> ::=
6384 * <kind>
6385 * <type_code_length>
6386 *
6387 * <kind> ::= long (0=TK_NULL, 1=TK_SHORT...)
6388 * <type_code_length> ::= unsugned short
6389 *
6390 */
6391 switch(tk_id) {
6392
6393 /* Structure of the typecode data:
6394 *
6395 * <union_type_code> ::=
6396 * <type_code_header>
6397 * <name>
6398 * <default_index>
6399 * <discriminator_type_code>
6400 * <member_count>
6401 * <union_member>+
6402 * <union_member> ::= <member_length><name><union_member_detail>
6403 * <member_length> ::= unsigned short
6404 * <name> ::= <string>
6405 * <string> ::= <length>char+<eol>
6406 * <length> ::= unsigned long
6407 * <eol> ::= (char)0
6408 *
6409 * <union_member_detail> ::= <is_pointer>
6410 * <labels_count>
6411 * <label>+
6412 * <type_code>
6413 * <labels_count> ::= unsigned long
6414 * <label> ::= long
6415 *
6416 */
6417 case RTI_CDR_TK_UNION: {
6418 uint32_t struct_name_len;
6419 uint8_t *struct_name;
6420 const char *discriminator_name; /* for unions */
6421 char *discriminator_enum_name = NULL((void*)0); /* for unions with enum discriminator */
6422 /*uint32_t defaultIdx;*/ /* Currently is ignored */
6423 uint32_t disc_id; /* Used temporarily to populate 'discriminator_name' */
6424 uint16_t disc_size; /* Currently is ignored */
6425 uint32_t disc_offset_begin, num_members, member_name_len;
6426 uint16_t member_length;
6427 uint8_t *member_name = NULL((void*)0);
6428 uint32_t next_offset, field_offset_begin, member_label_count, discriminator_enum_name_length;
6429 int32_t member_label;
6430 unsigned j;
6431
6432 /* - - - - - - - Union name - - - - - - - */
6433 /* Pad-align */
6434 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
6435
6436 /* Get structure name length */
6437 struct_name_len = tvb_get_uint32(tvb, offset, encoding);
6438 offset += 4;
6439 struct_name = tvb_get_string_enc(pinfo->pool, tvb, offset, struct_name_len, ENC_ASCII0x00000000);
6440 offset = check_offset_addition(offset, struct_name_len, tree, NULL((void*)0), tvb);
6441
6442 /* - - - - - - - Default index - - - - - - - */
6443 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
6444 /*defaultIdx = NEXT_uint32(tvb, offset, encoding);*/
6445 offset += 4;
6446
6447 /* - - - - - - - Discriminator type code - - - - - - - */
6448 /* We don't recursively dissect everything, instead we just read the type */
6449 disc_id = tvb_get_uint32(tvb, offset, encoding);
6450 offset += 4;
6451
6452 disc_size = tvb_get_uint16(tvb, offset, encoding);
6453 offset += 2;
6454 disc_offset_begin = offset;
6455 disc_id &= 0x7fffffff;
6456 discriminator_name = rtps_util_typecode_id_to_string(disc_id);
6457 if (disc_id == RTI_CDR_TK_ENUM) {
6458 /* Enums has also a name that we should print */
6459 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
6460 discriminator_enum_name_length = tvb_get_uint32(tvb, offset, encoding);
6461 discriminator_enum_name = tvb_get_string_enc(pinfo->pool, tvb, offset+4, discriminator_enum_name_length, ENC_ASCII0x00000000);
6462 }
6463 offset = disc_offset_begin + disc_size;
6464#if 0
6465 field_offset_begin = offset;
6466 increment_dissection_depth(pinfo);
6467 offset += rtps_util_add_typecode(
6468 tree,
6469 tvb,
6470 pinfo,
6471 offset,
6472 encoding,
6473 indent_level+1,
6474 0,
6475 0,
6476 0,
6477 field_offset_begin,
6478 member_name,
6479 -1,
6480 NULL((void*)0),
6481 ndds_40_hack);
6482 decrement_dissection_depth(pinfo);
6483#endif
6484
6485 /* Add the entry of the union in the tree */
6486 proto_tree_add_string_format(tree, hf_rtps_union, tvb, original_offset, retVal, struct_name, "%sunion %s (%s%s%s) {",
6487 indent_string, struct_name, discriminator_name,
6488 (discriminator_enum_name ? " " : ""),
6489 (discriminator_enum_name ? discriminator_enum_name : ""));
6490
6491 if (seq_max_len != -1) {
6492 /* We're dissecting a sequence of struct, bypass the seq definition */
6493 snprintf(type_name, 40, "%s", struct_name);
6494 break;
6495 }
6496
6497 /* - - - - - - - Number of members - - - - - - - */
6498 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
6499 num_members = tvb_get_uint32(tvb, offset, encoding);
6500 offset += 4;
6501
6502 /* - - - - - - - <union_member>+ - - - - - - - */
6503 next_offset = offset;
6504
6505 for (i = 0; i < num_members; ++i) {
6506 uint8_t member_is_pointer;
6507 /* Safety: this theoretically should be the same already */
6508 field_offset_begin = offset = next_offset;
6509
6510 SHORT_ALIGN(offset)(offset = (offset+1)&0xfffffffe);
6511
6512 /* member's length */
6513 member_length = tvb_get_uint16(tvb, offset, encoding);
6514 offset += 2;
6515 next_offset = offset + member_length;
6516
6517 /* Name length */
6518 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
6519 member_name_len = tvb_get_uint32(tvb, offset, encoding);
6520 offset += 4;
6521
6522 /* Name */
6523 member_name = tvb_get_string_enc(pinfo->pool, tvb, offset, member_name_len, ENC_ASCII0x00000000);
6524 offset = check_offset_addition(offset, member_name_len, tree, NULL((void*)0), tvb);
6525
6526 /* is Pointer ? */
6527 member_is_pointer = tvb_get_uint8(tvb, offset);
6528 offset++;
6529
6530 /* Label count */
6531 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
6532 member_label_count = tvb_get_uint32(tvb, offset, encoding);
6533 offset += 4;
6534
6535 for (j = 0; j < member_label_count; ++j) {
6536 proto_item* case_item;
6537 /* Label count */
6538 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
6539 member_label = tvb_get_uint32(tvb, offset, encoding);
6540 offset += 4;
6541
6542 /* Add the entry of the union in the tree */
6543 case_item = proto_tree_add_uint_format(tree, hf_rtps_union_case, tvb, field_offset_begin, 1, member_label,
6544 "%s case %d:", indent_string, member_label);
6545 proto_item_set_len(case_item, retVal);
6546 }
6547
6548 increment_dissection_depth(pinfo);
6549 offset += rtps_util_add_typecode(tree, tvb, pinfo, offset, encoding,
6550 indent_level+2, member_is_pointer, 0, 0, field_offset_begin,
6551 member_name, -1, NULL((void*)0), ndds_40_hack);
6552 decrement_dissection_depth(pinfo);
6553 }
6554 /* Finally prints the name of the struct (if provided) */
6555 (void) g_strlcpy(type_name, "}", sizeof(type_name));
6556 break;
6557
6558 } /* end of case UNION */
6559
6560
6561 case RTI_CDR_TK_ENUM:
6562 case RTI_CDR_TK_STRUCT: {
6563 /* Structure of the typecode data:
6564 *
6565 * <union_type_code> ::=
6566 * <type_code_header>
6567 * <name>
6568 * <default_index>
6569 * <discriminator_type_code>
6570 * <member_count>
6571 * <member>+
6572 *
6573 * <struct_type_code> ::=
6574 * <type_code_header>
6575 * <name>
6576 * <member_count>
6577 * <member>+
6578 *
6579 * <name> ::= <string>
6580 * <string> ::= <length>char+<eol>
6581 * <length> ::= unsigned long
6582 * <eol> ::= (char)0
6583 * <member_count> ::= unsigned long
6584 *
6585 * STRUCT / UNION:
6586 * Foreach member {
6587 * - A2: 2: member length
6588 * - A4: 4: member name length
6589 * - n: member name
6590 * - 1: isPointer?
6591 * - A2 2: bitfield bits (-1=none)
6592 * - 1: isKey?
6593 * - A4 4: Typecode ID
6594 * - A2 2: length
6595 * }
6596 *
6597 * ENUM:
6598 * Foreach member {
6599 * - A2: 2: member length
6600 * - A4: 4: member name length
6601 * - n: member name
6602 * - A4: 4: ordinal number
6603 *
6604 * -> ----------------------------------------------------- <-
6605 * -> The alignment pad bytes belong to the FOLLOWING field <-
6606 * -> A4 = 4 bytes alignment, A2 = 2 bytes alignment <-
6607 * -> ----------------------------------------------------- <-
6608 */
6609 int8_t *struct_name;
6610 uint32_t struct_name_len, num_members;
6611 uint32_t next_offset;
6612 const char *typecode_name;
6613
6614 /* Pad-align */
6615 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
6616
6617 /* Get structure name length */
6618 struct_name_len = tvb_get_uint32(tvb, offset, encoding);
6619 offset += 4;
6620
6621 /* struct name */
6622 struct_name = tvb_get_string_enc(pinfo->pool, tvb, offset, struct_name_len, ENC_ASCII0x00000000);
6623 offset = check_offset_addition(offset, struct_name_len, tree, NULL((void*)0), tvb);
6624
6625
6626 if (tk_id == RTI_CDR_TK_ENUM) {
6627 typecode_name = "enum";
6628 } else if (tk_id == RTI_CDR_TK_VALUE_PARAM) {
6629 /* uint16_t type_modifier; */
6630 /* uint32_t baseTypeCodeKind; */
6631 uint32_t baseTypeCodeLength;
6632
6633 /* Need to read the type modifier and the base type code */
6634 typecode_name = "<sparse type>";
6635 SHORT_ALIGN(offset)(offset = (offset+1)&0xfffffffe);
6636 /* type_modifier = */ tvb_get_uint16(tvb, offset, encoding);
6637 offset += 2;
6638
6639 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
6640 /* baseTypeCodeKind = */ tvb_get_uint32(tvb, offset, encoding);
6641 offset += 4;
6642
6643 baseTypeCodeLength = tvb_get_uint32(tvb, offset, encoding);
6644 offset += 4;
6645 offset = check_offset_addition(offset, baseTypeCodeLength, tree, NULL((void*)0), tvb);
6646 } else {
6647 typecode_name = "struct";
6648 }
6649
6650 if (seq_max_len != -1) {
6651 /* We're dissecting a sequence of struct, bypass the seq definition */
6652 snprintf(type_name, 40, "%s", struct_name);
6653 break;
6654 }
6655 /* Prints it */
6656 proto_tree_add_string_format(tree, hf_rtps_struct, tvb, original_offset, retVal, struct_name,
6657 "%s%s %s {", indent_string, typecode_name, struct_name);
6658
6659 /* PAD align */
6660 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
6661
6662 /* number of members */
6663 num_members = tvb_get_uint32(tvb, offset, encoding);
6664 offset += 4;
6665
6666 next_offset = offset;
6667 for (i = 0; i < num_members; ++i) {
6668 uint8_t *member_name;
6669 uint32_t member_name_len;
6670 uint16_t member_length;
6671 uint32_t field_offset_begin;
6672
6673 /* Safety: this theoretically should be the same already */
6674 field_offset_begin = offset = next_offset;
6675
6676 SHORT_ALIGN(offset)(offset = (offset+1)&0xfffffffe);
6677
6678 /* member's length */
6679 member_length = tvb_get_uint16(tvb, offset, encoding);
6680 offset += 2;
6681 next_offset = offset + member_length;
6682
6683 /* Name length */
6684 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
6685 member_name_len = tvb_get_uint32(tvb, offset, encoding);
6686 offset += 4;
6687
6688 /* Name */
6689 member_name = tvb_get_string_enc(pinfo->pool, tvb, offset, member_name_len, ENC_ASCII0x00000000);
6690 offset += member_name_len;
6691
6692 if (tk_id == RTI_CDR_TK_ENUM) {
6693 /* ordinal number */
6694 uint32_t ordinal_number;
6695 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
6696 ordinal_number = tvb_get_uint32(tvb, offset, encoding);
6697 offset += 4;
6698
6699 proto_tree_add_string_format(tree, hf_rtps_member_name, tvb, field_offset_begin, (offset-field_offset_begin), member_name,
6700 "%s %s = %d;", indent_string, member_name, ordinal_number);
6701 } else {
6702 /* Structs */
6703 uint16_t member_bitfield;
6704 uint8_t member_is_pointer;
6705 uint8_t member_is_key;
6706
6707 /* is Pointer ? */
6708 member_is_pointer = tvb_get_uint8(tvb, offset);
6709 offset++;
6710
6711 /* Bitfield */
6712 SHORT_ALIGN(offset)(offset = (offset+1)&0xfffffffe);
6713 member_bitfield = tvb_get_uint16(tvb, offset, encoding);
6714 offset += 2; /* pad will be added by typecode dissector */
6715
6716 /* is Key ? */
6717 member_is_key = tvb_get_uint8(tvb, offset);
6718 offset++;
6719
6720 increment_dissection_depth(pinfo);
6721 offset += rtps_util_add_typecode(tree, tvb, pinfo, offset, encoding,
6722 indent_level+1, member_is_pointer, member_bitfield, member_is_key,
6723 field_offset_begin, member_name, -1, NULL((void*)0), ndds_40_hack);
6724 decrement_dissection_depth(pinfo);
6725 }
6726 }
6727 /* Finally prints the name of the struct (if provided) */
6728 (void) g_strlcpy(type_name, "}", sizeof(type_name));
6729 break;
6730 }
6731
6732 case RTI_CDR_TK_WSTRING:
6733 case RTI_CDR_TK_STRING: {
6734 /* Structure of the typecode data:
6735 * Offset | Size | Field | Notes
6736 * ----------|-------|------------------------------|---------------------
6737 * 6 | 2 | pad |
6738 * 8 | 4 | String length | 4-bytes aligned
6739 */
6740 uint32_t string_length;
6741
6742 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
6743 string_length = tvb_get_uint32(tvb, offset, encoding);
6744 offset += 4;
6745 snprintf(type_name, 40, "%s<%d>",
6746 (tk_id == RTI_CDR_TK_STRING) ? "string" : "wstring",
6747 string_length);
6748 break;
6749 }
6750
6751 case RTI_CDR_TK_SEQUENCE: {
6752 /* Structure of the typecode data:
6753 *
6754 * - A4: 4: Sequence max length
6755 * - the sequence typecode
6756 */
6757 uint32_t seq_max_len2;
6758 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
6759 seq_max_len2 = tvb_get_uint32(tvb, offset, encoding);
6760 offset += 4;
6761
6762 /* Recursive decode seq typecode */
6763 /*offset += */rtps_util_add_typecode(tree, tvb, pinfo, offset, encoding, indent_level,
6764 is_pointer, bitfield, is_key, offset_begin, name,
6765 seq_max_len2, NULL((void*)0), ndds_40_hack);
6766 /* Differently from the other typecodes, the line has been already printed */
6767 return retVal;
6768 }
6769
6770 case RTI_CDR_TK_ARRAY: {
6771 /* Structure of the typecode data:
6772 *
6773 * - A4: 4: number of dimensions
6774 * - A4: 4: dim1
6775 * - <A4: 4: dim2>
6776 * - ...
6777 * - the array typecode
6778 */
6779 uint32_t size[MAX_ARRAY_DIMENSION10]; /* Max dimensions */
6780 uint32_t dim_max;
6781
6782 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
6783 dim_max = tvb_get_uint32(tvb, offset, encoding);
6784 offset += 4;
6785
6786 if (dim_max > MAX_ARRAY_DIMENSION10) {
6787 /* We don't have a tree item to add expert info to... */
6788 dim_max = MAX_ARRAY_DIMENSION10;
6789 }
6790
6791 for (i = 0; i < MAX_ARRAY_DIMENSION10; ++i) size[i] = 0;
6792 for (i = 0; i < dim_max; ++i) {
6793 size[i] = tvb_get_uint32(tvb, offset, encoding);
6794 offset += 4;
6795 }
6796
6797 /* Recursive decode seq typecode */
6798 increment_dissection_depth(pinfo);
6799 /*offset += */rtps_util_add_typecode(tree, tvb, pinfo, offset, encoding,
6800 indent_level, is_pointer, bitfield, is_key, offset_begin,
6801 name, -1, size, ndds_40_hack);
6802 decrement_dissection_depth(pinfo);
6803 /* Differently from the other typecodes, the line has been already printed */
6804 return retVal;
6805 }
6806
6807 case RTI_CDR_TK_ALIAS: {
6808 /* Structure of the typecode data:
6809 *
6810 * - A4: 4: alias name size
6811 * - A4: 4: alias name
6812 * - A4: 4: the alias typecode
6813 */
6814 uint32_t alias_name_length;
6815 uint8_t *alias_name;
6816
6817 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
6818 alias_name_length = tvb_get_uint32(tvb, offset, encoding);
6819 offset += 4;
6820 alias_name = tvb_get_string_enc(pinfo->pool, tvb, offset, alias_name_length, ENC_ASCII0x00000000);
6821 offset = check_offset_addition(offset, alias_name_length, tree, NULL((void*)0), tvb);
6822 (void) g_strlcpy(type_name, alias_name, sizeof(type_name));
6823 break;
6824 }
6825
6826
6827 /*
6828 * VALUETYPES:
6829 * - A4: 4: name length
6830 * - n: name
6831 * - A2: type modifier
6832 * - A4: base type code
6833 * - A4: number of members
6834 * Foreach member: (it's just like a struct)
6835 *
6836 */
6837 case RTI_CDR_TK_VALUE_PARAM:
6838 case RTI_CDR_TK_VALUE: {
6839 /* Not fully dissected for now */
6840 /* Pad-align */
6841 uint32_t value_name_len;
6842 int8_t *value_name;
6843 const char *type_id_name = "valuetype";
6844 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
6845
6846 /* Get structure name length */
6847 value_name_len = tvb_get_uint32(tvb, offset, encoding);
6848 offset += 4;
6849
6850 /* value name */
6851 value_name = tvb_get_string_enc(pinfo->pool, tvb, offset, value_name_len, ENC_ASCII0x00000000);
6852 offset = check_offset_addition(offset, value_name_len, tree, NULL((void*)0), tvb);
6853
6854 if (tk_id == RTI_CDR_TK_VALUE_PARAM) {
6855 type_id_name = "valueparam";
6856 }
6857 snprintf(type_name, sizeof(type_name), "%s '%s'", type_id_name, value_name);
6858 break;
6859 }
6860 } /* switch(tk_id) */
6861
6862 /* Sequence print */
6863 if (seq_max_len != -1) {
6864 proto_tree_add_string_format(tree, hf_rtps_sequence, tvb, offset_begin, (offset-offset_begin), type_name,
6865 "%ssequence<%s, %d> %s%s;%s", indent_string, type_name, seq_max_len,
6866 is_pointer ? "*" : "",
6867 name ? name : "",
6868 is_key ? KEY_COMMENT(" //@key") : "");
6869 return retVal;
6870 }
6871
6872 /* Array print */
6873 if (arr_dimension != NULL((void*)0)) {
6874 /* Printing an array */
6875 wmem_strbuf_t *dim_str = wmem_strbuf_create(pinfo->pool)wmem_strbuf_new(pinfo->pool, "");
6876 for (i = 0; i < MAX_ARRAY_DIMENSION10; ++i) {
6877 if (arr_dimension[i] != 0) {
6878 wmem_strbuf_append_printf(dim_str, "[%d]", arr_dimension[i]);
6879 } else {
6880 break;
6881 }
6882 }
6883 proto_tree_add_string_format(tree, hf_rtps_array, tvb, offset_begin, (offset-offset_begin), type_name,
6884 "%s%s %s%s;%s", indent_string, type_name, name ? name : "",
6885 wmem_strbuf_get_str(dim_str), is_key ? KEY_COMMENT(" //@key") : "");
6886 return retVal;
6887 }
6888
6889 /* Bitfield print */
6890 if (bitfield != 0xffff && name != NULL((void*)0) && is_pointer == 0) {
6891 proto_tree_add_string_format(tree, hf_rtps_bitfield, tvb, offset_begin, (offset-offset_begin), type_name,
6892 "%s%s %s:%d;%s", indent_string, type_name, name,
6893 bitfield, is_key ? KEY_COMMENT(" //@key") : "");
6894 return retVal;
6895 }
6896
6897 /* Everything else */
6898 proto_tree_add_string_format(tree, hf_rtps_datatype, tvb, offset_begin, (offset-offset_begin), type_name,
6899 "%s%s%s%s%s;%s", indent_string, type_name,
6900 name ? " " : "",
6901 is_pointer ? "*" : "",
6902 name ? name : "",
6903 is_key ? KEY_COMMENT(" //@key") : "");
6904 return retVal;
6905}
6906
6907static int rtps_util_add_type_id(proto_tree *tree, packet_info* pinfo,
6908 tvbuff_t * tvb, int offset, const unsigned encoding,
6909 int zero, int hf_base, proto_item * append_info_item,
6910 uint64_t * type_id) {
6911 proto_item * ti;
6912 uint16_t short_number;
6913 uint64_t longlong_number;
6914 int hf_type;
6915 short_number = tvb_get_uint16(tvb, offset, encoding);
6916 ti = proto_tree_add_item(tree, hf_rtps_type_object_type_id_disc, tvb, offset, 2, encoding);
6917 proto_item_set_hidden(ti);
6918
6919 /* Here we choose the proper hf item to use */
6920 if (hf_base != -1) {
6921 if (short_number <= 13)
6922 hf_type = hf_rtps_type_object_base_primitive_type_id;
6923 else
6924 hf_type = hf_rtps_type_object_base_type;
6925 } else {
6926 if (short_number <= 13)
6927 hf_type = hf_rtps_type_object_primitive_type_id;
6928 else
6929 hf_type = hf_rtps_type_object_type_id;
6930 }
6931
6932 offset += 2;
6933 if (short_number <= 13) {
6934 proto_tree_add_item(tree, hf_type, tvb, offset, 2, encoding);
6935 if (append_info_item) {
6936 proto_item_append_text(append_info_item, "(%s)",
6937 val_to_str(pinfo->pool, short_number, type_object_kind, "(0x%016x)"));
6938 }
6939 offset += 2;
6940 } else {
6941 ALIGN_ZERO(offset, 8, zero)(offset -= zero, offset = (((offset) + ((8) - 1)) & ~((8)
- 1)), offset += zero)
;
6942 longlong_number = tvb_get_uint64(tvb, offset, encoding);
6943 proto_tree_add_item(tree, hf_type, tvb, offset, 8, encoding);
6944 if (append_info_item) {
6945 proto_item_append_text(append_info_item, "(0x%016" PRIx64"l" "x" ")", longlong_number);
6946 }
6947 offset += 8;
6948 }
6949
6950 if (short_number <= 13) {
6951 if (type_id) {
6952 *type_id = short_number;
6953 }
6954 } else {
6955 if (type_id) {
6956 *type_id = longlong_number;
6957 }
6958 }
6959 return offset;
6960}
6961
6962static int rtps_util_add_type_annotation_usage(proto_tree *tree,
6963 tvbuff_t * tvb, packet_info* pinfo, int offset, const unsigned encoding, int zero) {
6964 uint32_t long_number, i;
6965 uint16_t short_number;
6966 offset = rtps_util_add_type_id(tree, pinfo, tvb, offset, encoding, zero, -1, NULL((void*)0), NULL((void*)0));
6967 long_number = tvb_get_uint32(tvb, offset, encoding);
6968 offset += 4;
6969 for (i = 0; i < long_number; i++) {
6970 proto_tree_add_item(tree, hf_rtps_type_object_member_id, tvb, offset, 4, encoding);
6971 offset += 4;
6972 short_number = tvb_get_uint16(tvb, offset, encoding);
6973 proto_tree_add_item(tree, hf_rtps_type_object_annotation_value_d, tvb, offset, 2, encoding);
6974 offset += 2;
6975 /* There may be more additions in the future */
6976 switch (short_number) {
6977 case 4: /* UINT_16 */
6978 proto_tree_add_item(tree, hf_rtps_type_object_annotation_value_16, tvb, offset, 2, encoding);
6979 offset += 2;
6980 break;
6981 default:
6982 break;
6983 }
6984
6985 }
6986 return offset;
6987}
6988
6989static int rtps_util_add_type_library_type(proto_tree *tree, packet_info* pinfo,
6990 tvbuff_t * tvb, int offset, const unsigned encoding, dissection_info *info) {
6991 proto_tree * annotation_tree;
6992 uint32_t member_id = 0, member_length = 0, long_number, i;
6993 int offset_tmp;
6994 uint16_t short_number;
6995 char * name = NULL((void*)0);
6996 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);
6997 offset_tmp = offset;
6998
6999 /* dissect property */
7000 short_number = tvb_get_uint16(tvb, offset_tmp, encoding);
7001 proto_tree_add_bitmask_value(tree, tvb, offset_tmp, hf_rtps_type_object_flags,
7002 ett_rtps_flags, TYPE_FLAG_FLAGS, short_number);
7003 if (info) {
7004 if (short_number & 0x02)
7005 info->extensibility = EXTENSIBILITY_MUTABLE;
7006 else if (short_number & 0x01)
7007 info->extensibility = EXTENSIBILITY_FINAL;
7008 else
7009 info->extensibility = EXTENSIBILITY_EXTENSIBLE;
7010 }
7011 offset_tmp += 2;
7012 if (info)
7013 offset_tmp = rtps_util_add_type_id(tree, pinfo, tvb, offset_tmp, encoding, offset, -1, tree, &(info->type_id));
7014 else
7015 offset_tmp = rtps_util_add_type_id(tree, pinfo, tvb, offset_tmp, encoding, offset, -1, tree, NULL((void*)0));
7016 rtps_util_add_string(tree, tvb, offset_tmp, hf_rtps_type_object_type_property_name,
7017 encoding);
7018 long_number = tvb_get_uint32(tvb, offset_tmp, encoding);
7019 name = tvb_get_string_enc(pinfo->pool, tvb, offset_tmp + 4, long_number, ENC_ASCII0x00000000);
7020 if (info)
7021 (void) g_strlcpy(info->member_name, name, sizeof(info->member_name));
7022
7023 proto_item_append_text(tree, " %s", name);
7024 offset = check_offset_addition(offset, member_length, tree, NULL((void*)0), tvb);
7025
7026 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);
7027 offset_tmp = offset;
7028
7029 /* dissect annotation_seq */
7030 long_number = tvb_get_uint32(tvb, offset_tmp, encoding);
7031 annotation_tree = proto_tree_add_subtree_format(tree, tvb, offset_tmp, member_length,
7032 ett_rtps_type_annotation_usage_list, NULL((void*)0), "Annotation Usage Member List (%d elements)",
7033 long_number);
7034 offset_tmp += 4;
7035 for (i = 0; i < long_number ; i++) {
7036 offset_tmp = rtps_util_add_type_annotation_usage(annotation_tree, tvb, pinfo, offset_tmp,
7037 encoding, offset);
7038 }
7039 offset = check_offset_addition(offset, member_length, tree, NULL((void*)0), tvb);
7040
7041 return offset;
7042}
7043
7044static void rtps_util_add_type_element_enumeration(proto_tree *tree, packet_info* pinfo,
7045 tvbuff_t * tvb, int offset, const unsigned encoding, dissection_info * info) {
7046 proto_tree * enumerated_constant;
7047 uint32_t member_id = 0, member_length = 0;
7048 uint32_t long_number, i;
7049 int enum_size, offset_tmp;
7050
7051 offset = rtps_util_add_type_library_type(tree, pinfo, tvb, offset, encoding, info);
7052
7053 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);
7054 /* dissect Bound */
7055 proto_tree_add_item(tree, hf_rtps_type_object_bound, tvb, offset, 4, encoding);
7056 offset = check_offset_addition(offset, member_length, tree, NULL((void*)0), tvb);
7057
7058 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);
7059 /* dissect constant seq */
7060 offset_tmp = offset;
7061 long_number = tvb_get_uint32(tvb, offset_tmp, encoding);
7062 offset_tmp += 4;
7063 for (i = 0; i < long_number; i++) {
7064 char * name = NULL((void*)0);
7065 uint32_t size, value;
7066 enum_size = offset_tmp;
7067 size = tvb_get_uint32(tvb, offset_tmp + 4, encoding);
7068 name = tvb_get_string_enc(pinfo->pool, tvb, offset_tmp + 8, size, ENC_ASCII0x00000000);
7069 value = tvb_get_uint32(tvb, offset_tmp, encoding);
7070 enumerated_constant = proto_tree_add_subtree_format(tree, tvb, offset_tmp, 0,
7071 ett_rtps_type_enum_constant, NULL((void*)0), "%s (%u)", name, value);
7072 proto_tree_add_item(enumerated_constant, hf_rtps_type_object_enum_constant_value, tvb, offset_tmp, 4, encoding);
7073 offset_tmp += 4;
7074 offset_tmp = rtps_util_add_string(enumerated_constant, tvb, offset_tmp, hf_rtps_type_object_enum_constant_name, encoding);
7075 proto_item_set_len(enumerated_constant, offset_tmp - enum_size);
7076 }
7077
7078 info->num_elements = 0;
7079}
7080
7081static void rtps_util_add_type_element_sequence(proto_tree* tree, packet_info* pinfo,
7082 tvbuff_t * tvb, int offset, const unsigned encoding, dissection_info * info) {
7083 uint32_t member_id = 0, member_length = 0;
7084 int zero_alignment;
7085 offset = rtps_util_add_type_library_type(tree, pinfo, tvb, offset, encoding, info);
7086
7087 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);
7088 zero_alignment = offset;
7089 rtps_util_add_type_id(tree, pinfo, tvb, offset, encoding, zero_alignment, -1 , NULL((void*)0), &(info->base_type_id));
7090 offset = check_offset_addition(offset, member_length, tree, NULL((void*)0), tvb);
7091 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);
7092 proto_tree_add_item(tree, hf_rtps_type_object_element_shared, tvb, offset, 1, encoding);
7093 offset = check_offset_addition(offset, member_length, tree, NULL((void*)0), tvb);
7094 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);
7095 /* dissect Bound */
7096 proto_tree_add_item(tree, hf_rtps_type_object_bound, tvb, offset, 4, encoding);
7097 if (info)
7098 info->bound = tvb_get_int32(tvb, offset, encoding);
7099}
7100
7101static void rtps_util_add_type_element_string(proto_tree* tree, packet_info* pinfo,
7102 tvbuff_t * tvb, int offset, const unsigned encoding, dissection_info * info _U___attribute__((unused))) {
7103 uint32_t member_id = 0, member_length = 0;
7104 int zero_alignment;
7105 offset = rtps_util_add_type_library_type(tree, pinfo, tvb, offset, encoding, info);
7106
7107 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);
7108 zero_alignment = offset;
7109 rtps_util_add_type_id(tree, pinfo, tvb, offset, encoding, zero_alignment, -1, NULL((void*)0), NULL((void*)0));
7110 offset = check_offset_addition(offset, member_length, tree, NULL((void*)0), tvb);
7111 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);
7112 proto_tree_add_item(tree, hf_rtps_type_object_element_shared, tvb, offset, 1, encoding);
7113 offset = check_offset_addition(offset, member_length, tree, NULL((void*)0), tvb);
7114 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);
7115 /* dissect Bound */
7116 proto_tree_add_item(tree, hf_rtps_type_object_bound, tvb, offset, 4, encoding);
7117 offset = check_offset_addition(offset, member_length, tree, NULL((void*)0), tvb);
7118}
7119
7120static void rtps_util_add_type_element_array(proto_tree* tree, packet_info* pinfo,
7121 tvbuff_t * tvb, int offset, const unsigned encoding, dissection_info * info _U___attribute__((unused))) {
7122 proto_tree * bound_tree;
7123 uint32_t member_id = 0, member_length = 0;
7124 uint32_t long_number, i;
7125 int zero_alignment, offset_tmp;
7126 offset = rtps_util_add_type_library_type(tree, pinfo, tvb, offset, encoding, info);
7127
7128 /* Dissect Collection Type */
7129 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);
7130 zero_alignment = offset;
7131 rtps_util_add_type_id(tree, pinfo, tvb, offset, encoding, zero_alignment, -1, NULL((void*)0), &(info->base_type_id));
7132 offset = check_offset_addition(offset, member_length, tree, NULL((void*)0), tvb);
7133 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);
7134 proto_tree_add_item(tree, hf_rtps_type_object_element_shared, tvb, offset, 1, encoding);
7135 offset = check_offset_addition(offset, member_length, tree, NULL((void*)0), tvb);
7136 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);
7137
7138 /* dissect Bound sequence */
7139
7140 offset_tmp = offset;
7141 long_number = tvb_get_uint32(tvb, offset_tmp, encoding);
7142 bound_tree = proto_tree_add_subtree_format(tree, tvb, offset_tmp, member_length,
7143 ett_rtps_type_bound_list, NULL((void*)0), "Bounds (%d elements)",
7144 long_number);
7145 offset_tmp += 4;
7146 for (i = 0; i < long_number ; i++) {
7147 proto_tree_add_item(bound_tree, hf_rtps_type_object_bound, tvb, offset_tmp, 4, encoding);
7148 if (info) info->bound = tvb_get_int32(tvb, offset_tmp, encoding);
7149 if (info) info->num_elements = tvb_get_int32(tvb, offset_tmp, encoding);
7150
7151 offset_tmp += 4;
7152 }
7153}
7154
7155static void rtps_util_add_type_element_alias(proto_tree* tree, packet_info* pinfo,
7156 tvbuff_t * tvb, int offset, const unsigned encoding, dissection_info * info) {
7157 uint32_t member_id = 0, member_length = 0;
7158 offset = rtps_util_add_type_library_type(tree, pinfo, tvb, offset, encoding, info);
7159
7160 /* dissect base_type */
7161 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);
7162 rtps_util_add_type_id(tree, pinfo, tvb, offset, encoding, offset, hf_rtps_type_object_base_type, NULL((void*)0), &(info->base_type_id));
7163}
7164
7165static int rtps_util_add_type_member(proto_tree* tree, packet_info* pinfo,
7166 tvbuff_t * tvb, int offset, const unsigned encoding,
7167 dissection_info * info, dissection_element * member_object) {
7168 proto_tree * member_property, *annotation_tree;
7169 uint32_t member_id = 0, member_length = 0;
7170 uint32_t long_number, i;
7171 uint16_t short_number;
7172 uint64_t member_type_id;
7173 int offset_tmp;
7174 char * name = NULL((void*)0);
7175
7176 member_property = proto_tree_add_subtree(tree, tvb, offset, 0,
7177 ett_rtps_type_element, NULL((void*)0), "Member Property");
7178 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);
7179 offset_tmp = offset;
7180 short_number = tvb_get_uint16(tvb, offset_tmp, encoding);
7181 proto_tree_add_bitmask_value(member_property, tvb, offset_tmp, hf_rtps_type_object_flags,
7182 ett_rtps_flags, MEMBER_FLAGS, short_number);
7183 if (member_object) member_object->flags = short_number;
7184 offset_tmp += 2;
7185 ALIGN_ZERO(offset_tmp, 4, offset)(offset_tmp -= offset, offset_tmp = (((offset_tmp) + ((4) - 1
)) & ~((4) - 1)), offset_tmp += offset)
;
7186 proto_tree_add_item(member_property, hf_rtps_type_object_member_id, tvb, offset_tmp, 4, encoding);
7187 member_id = tvb_get_uint32(tvb, offset_tmp, encoding);
7188 offset_tmp += 4;
7189 offset_tmp = rtps_util_add_type_id(member_property, pinfo, tvb, offset_tmp, encoding,
7190 offset, -1, tree, &member_type_id);
7191 rtps_util_add_string(member_property, tvb, offset_tmp, hf_rtps_type_object_name, encoding);
7192 long_number = tvb_get_uint32(tvb, offset_tmp, encoding);
7193 name = tvb_get_string_enc(pinfo->pool, tvb, offset_tmp+4, long_number, ENC_ASCII0x00000000);
7194 proto_item_append_text(tree, " %s (ID: %d)", name, member_id);
7195 if (member_object) {
7196 member_object->member_id = member_id;
7197 (void) g_strlcpy(member_object->member_name, name, sizeof(member_object->member_name));
7198 member_object->type_id = member_type_id;
7199 }
7200 if (info && info->extensibility == EXTENSIBILITY_MUTABLE) {
7201 mutable_member_mapping * mutable_mapping = NULL((void*)0);
7202 mutable_mapping = wmem_new(wmem_file_scope(), mutable_member_mapping)((mutable_member_mapping*)wmem_alloc((wmem_file_scope()), sizeof
(mutable_member_mapping)))
;
7203 (void) g_strlcpy(mutable_mapping->member_name, name, sizeof(mutable_mapping->member_name));
7204 mutable_mapping->struct_type_id = info->type_id;
7205 mutable_mapping->member_type_id = member_type_id;
7206 mutable_mapping->member_id = member_id;
7207 mutable_mapping->key = (mutable_mapping->struct_type_id + mutable_mapping->struct_type_id * mutable_mapping->member_id);
7208 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);
7209 wmem_map_insert(mutable_member_mappings, &(mutable_mapping->key), (void *) mutable_mapping);
7210
7211 }
7212
7213 offset = check_offset_addition(offset, member_length, tree, NULL((void*)0), tvb);
7214
7215 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);
7216 offset_tmp = offset;
7217 long_number = tvb_get_uint32(tvb, offset_tmp, encoding);
7218 annotation_tree = proto_tree_add_subtree_format(tree, tvb, offset_tmp, member_length,
7219 ett_rtps_type_annotation_usage_list, NULL((void*)0), "Annotation Usage Member List (%d elements)",
7220 long_number);
7221 offset_tmp += 4;
7222 for (i = 0; i < long_number ; i++) {
7223 offset_tmp = rtps_util_add_type_annotation_usage(annotation_tree, tvb, pinfo, offset_tmp,
7224 encoding, offset);
7225 }
7226 offset = check_offset_addition(offset, member_length, tree, NULL((void*)0), tvb);
7227
7228 long_number = tvb_get_uint32(tvb, offset, encoding);
7229 if ((long_number & PID_LIST_END(0x3f02)) == PID_LIST_END(0x3f02)) {
7230 offset += 4;
7231 }
7232
7233 return offset;
7234}
7235
7236static int rtps_util_add_type_union_member(proto_tree* tree, packet_info* pinfo,
7237 tvbuff_t * tvb, int offset, const unsigned encoding, uint64_t union_type_id,
7238 bool_Bool is_discriminator, dissection_info * info _U___attribute__((unused))) {
7239 proto_tree * labels;
7240 int long_number, i;
7241 int offset_tmp;
7242 uint32_t member_id = 0, member_length = 0;
7243 dissection_element object;
7244 offset = rtps_util_add_type_member(tree, pinfo, tvb, offset, encoding, NULL((void*)0), &object); //&(info->elements[i])
7245
7246 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);
7247 offset_tmp = offset;
7248
7249 long_number = tvb_get_uint32(tvb, offset_tmp, encoding);
7250
7251 labels = proto_tree_add_subtree_format(tree, tvb, offset_tmp, member_length,
7252 ett_rtps_type_enum_constant, NULL((void*)0), "Labels (%u elements)", long_number);
7253 offset_tmp += 4;
7254 if ((object.flags & 8) == 8) {
7255 union_member_mapping * mapping = NULL((void*)0);
7256
7257 mapping = wmem_new(wmem_file_scope(), union_member_mapping)((union_member_mapping*)wmem_alloc((wmem_file_scope()), sizeof
(union_member_mapping)))
;
7258 (void) g_strlcpy(mapping->member_name, object.member_name, sizeof(mapping->member_name));
7259 mapping->member_type_id = object.type_id;
7260 mapping->discriminator = HASHMAP_DISCRIMINATOR_CONSTANT(-2);
7261 mapping->union_type_id = union_type_id + mapping->discriminator;
7262
7263 wmem_map_insert(union_member_mappings, &(mapping->union_type_id), (void *) mapping);
7264 proto_item_append_text(labels, " Added mapping for discriminator (0x%016" PRIx64"l" "x" ") name = %s",
7265 mapping->union_type_id, mapping->member_name);
7266 }
7267 if (is_discriminator) {
7268 union_member_mapping * mapping = NULL((void*)0);
7269
7270 mapping = wmem_new(wmem_file_scope(), union_member_mapping)((union_member_mapping*)wmem_alloc((wmem_file_scope()), sizeof
(union_member_mapping)))
;
7271 (void) g_strlcpy(mapping->member_name, object.member_name, sizeof(mapping->member_name));
7272 mapping->member_type_id = object.type_id;
7273 mapping->discriminator = -1;
7274 mapping->union_type_id = union_type_id + mapping->discriminator;
7275
7276 wmem_map_insert(union_member_mappings, &(mapping->union_type_id), (void *) mapping);
7277 proto_item_append_text(labels, " Added mapping for discriminator (0x%016" PRIx64"l" "x" ") name = %s",
7278 mapping->union_type_id, mapping->member_name);
7279 }
7280 for (i = 0; i < long_number; i++) {
7281 proto_item * ti;
7282 union_member_mapping * mapping = NULL((void*)0);
7283 uint32_t discriminator_case;
7284
7285 mapping = wmem_new(wmem_file_scope(), union_member_mapping)((union_member_mapping*)wmem_alloc((wmem_file_scope()), sizeof
(union_member_mapping)))
;
7286
7287 discriminator_case = tvb_get_uint32(tvb, offset_tmp, encoding);
7288 ti = proto_tree_add_item(labels, hf_rtps_type_object_union_label, tvb, offset_tmp, 4, encoding);
7289 offset_tmp += 4;
7290
7291 (void) g_strlcpy(mapping->member_name, object.member_name, sizeof(mapping->member_name));
7292 mapping->member_type_id = object.type_id;
7293 mapping->discriminator = discriminator_case;
7294 mapping->union_type_id = union_type_id + discriminator_case;
7295
7296 wmem_map_insert(union_member_mappings, &(mapping->union_type_id), (void *) mapping);
7297 proto_item_append_text(ti, " Added mapping for discriminator (0x%016" PRIx64"l" "x" ") name = %s",
7298 mapping->union_type_id, mapping->member_name);
7299 }
7300
7301 offset = check_offset_addition(offset, member_length, tree, NULL((void*)0), tvb);
7302 long_number = tvb_get_uint32(tvb, offset_tmp, encoding);
7303
7304 if ((long_number & PID_LIST_END(0x3f02)) == PID_LIST_END(0x3f02)) {
7305 offset += 4;
7306 }
7307
7308 return offset;
7309}
7310
7311static void rtps_util_add_type_element_union(proto_tree* tree, packet_info* pinfo,
7312 tvbuff_t * tvb, int offset, const unsigned encoding, dissection_info * info) {
7313 proto_tree * members;
7314 uint32_t member_id = 0, member_length = 0;
7315 uint32_t long_number, i;
7316 int offset_tmp;
7317 offset = rtps_util_add_type_library_type(tree, pinfo, tvb, offset, encoding, info);
7318
7319 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);
7320 offset_tmp = offset;
7321
7322 long_number = tvb_get_uint32(tvb, offset_tmp, encoding);
7323 members = proto_tree_add_subtree(tree, tvb, offset_tmp, -1,
7324 ett_rtps_type_enum_constant, NULL((void*)0), "Members");
7325
7326 offset_tmp += 4;
7327
7328 for (i = 0; i < long_number; i++) {
7329 proto_tree * member = NULL((void*)0);
7330 int offset_member = offset_tmp;
7331 member = proto_tree_add_subtree(members, tvb, offset_tmp, 0,
7332 ett_rtps_type_enum_constant, NULL((void*)0), "Member");
7333 offset_tmp = rtps_util_add_type_union_member(member, pinfo, tvb, offset_tmp, encoding,
7334 info->type_id, (i == 0), info);
7335 proto_item_set_len(member, offset_tmp - offset_member);
7336 }
7337
7338 long_number = tvb_get_uint32(tvb, offset_tmp, encoding);
7339 if ((long_number & PID_LIST_END(0x3f02)) == PID_LIST_END(0x3f02)) {
7340 offset_tmp += 4;
7341 }
7342 proto_item_set_len(members, offset_tmp - offset);
7343}
7344
7345static void rtps_util_add_type_element_struct(proto_tree* tree, packet_info* pinfo,
7346 tvbuff_t * tvb, int offset, const unsigned encoding, dissection_info * info) {
7347 proto_tree * member;
7348 uint32_t member_id = 0, member_length = 0;
7349 uint32_t long_number, i;
7350 int offset_tmp, member_size;
7351 wmem_array_t *elements = NULL((void*)0);
7352 dissection_element zero_element = {0};
7353
7354 offset = rtps_util_add_type_library_type(tree, pinfo, tvb, offset, encoding, info);
7355
7356 /* dissect base_type */
7357 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);
7358 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));
7359
7360 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);
7361 /* dissect seq_member*/
7362
7363 offset_tmp = offset;
7364 long_number = tvb_get_uint32(tvb, offset_tmp, encoding);
7365
7366 offset_tmp += 4;
7367
7368 if (info) {
7369 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))));
7370 }
7371 for (i = 0; i < long_number; i++) {
7372 member_size = offset_tmp;
7373 member = proto_tree_add_subtree(tree, tvb, offset_tmp, 0,
7374 ett_rtps_type_enum_constant, NULL((void*)0), "");
7375 if (info && elements) {
7376 wmem_array_append_one(elements, zero_element)wmem_array_append((elements), &(zero_element), 1);
7377 offset_tmp = rtps_util_add_type_member(member, pinfo, tvb, offset_tmp, encoding, info, wmem_array_index(elements, i));
7378 } else {
7379 offset_tmp = rtps_util_add_type_member(member, pinfo, tvb, offset_tmp, encoding, NULL((void*)0), NULL((void*)0));
7380 }
7381 proto_item_set_len(member, offset_tmp - member_size);
7382 }
7383 if (info) {
7384 info->num_elements = wmem_array_get_count(elements);
7385 info->elements = wmem_array_finalize(elements);
7386 }
7387}
7388
7389static void rtps_util_add_type_library(proto_tree *tree, packet_info * pinfo,
7390 tvbuff_t * tvb, int offset, const unsigned encoding, uint32_t size);
7391
7392// NOLINTNEXTLINE(misc-no-recursion)
7393static void rtps_util_add_type_element_module(proto_tree *tree, packet_info * pinfo,
7394 tvbuff_t * tvb, int offset, const unsigned encoding) {
7395 uint32_t long_number;
7396 char * name = NULL((void*)0);
7397 long_number = tvb_get_uint32(tvb, offset, encoding);
7398 name = tvb_get_string_enc(pinfo->pool, tvb, offset+4, long_number, ENC_ASCII0x00000000);
7399 proto_item_set_text(tree, "module %s", name);
7400 offset = rtps_util_add_string(tree, tvb, offset, hf_rtps_type_object_element_module_name, encoding);
7401 rtps_util_add_type_library(tree, pinfo, tvb, offset, encoding, -1);
7402}
7403
7404// NOLINTNEXTLINE(misc-no-recursion)
7405static int rtps_util_add_type_library_element(proto_tree *tree, packet_info * pinfo,
7406 tvbuff_t * tvb, int offset, const unsigned encoding) {
7407 proto_tree * element_tree;
7408 uint32_t long_number;
7409 uint32_t member_id = 0, member_length = 0;
7410 int initial_offset = offset;
7411 dissection_info * info;
7412 bool_Bool add_info = true1;
7413
7414 info = wmem_new(wmem_file_scope(), dissection_info)((dissection_info*)wmem_alloc((wmem_file_scope()), sizeof(dissection_info
)))
;
7415 info->elements = NULL((void*)0);
7416
7417 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);
7418 long_number = tvb_get_uint32(tvb, offset, encoding);
7419 info->member_kind = long_number;
7420
7421 element_tree = proto_tree_add_subtree(tree, tvb, offset, 0,
7422 ett_rtps_type_element, NULL((void*)0), "");
7423 offset = check_offset_addition(offset, member_length, tree, pinfo, tvb);
7424 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);
7425 proto_item_set_len(element_tree, member_length + offset - initial_offset);
7426 switch (long_number) {
7427 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_ENUMERATION_TYPE: /*ENUMERATION */
7428 rtps_util_add_type_element_enumeration(element_tree, pinfo, tvb, offset, encoding, info);
7429 break;
7430 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_ALIAS_TYPE: /* ALIAS */
7431 rtps_util_add_type_element_alias(element_tree, pinfo, tvb, offset, encoding, info);
7432 break;
7433 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_ARRAY_TYPE: /* ARRAY */
7434 rtps_util_add_type_element_array(element_tree, pinfo, tvb, offset, encoding, info);
7435 break;
7436 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_SEQUENCE_TYPE: /* SEQUENCE */
7437 rtps_util_add_type_element_sequence(element_tree, pinfo, tvb, offset, encoding, info);
7438 break;
7439 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_STRING_TYPE: /* STRING : COLLECTION */
7440 rtps_util_add_type_element_string(element_tree, pinfo, tvb, offset, encoding, info);
7441 break;
7442 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_UNION_TYPE:
7443 rtps_util_add_type_element_union(element_tree, pinfo, tvb, offset, encoding, info);
7444 break;
7445 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_STRUCTURE_TYPE: /* STRUCT */
7446 rtps_util_add_type_element_struct(element_tree, pinfo, tvb, offset, encoding, info);
7447 break;
7448 case RTI_CDR_TYPE_OBJECT_TYPE_KIND_MODULE:
7449 /* This does *not* fill in the info structure, so do *not* add it. */
7450 add_info = false0;
7451 rtps_util_add_type_element_module(element_tree, pinfo, tvb, offset, encoding);
7452 break;
7453 default:
7454 /* We have *not* filled in the info structure, so do *not* add it. */
7455 add_info = false0;
7456 proto_item_append_text(element_tree, "Kind: %u", long_number);
7457 proto_tree_add_item(element_tree, hf_rtps_type_object_element_raw, tvb, offset,
7458 member_length, encoding);
7459 break;
7460 }
7461 offset = check_offset_addition(offset, member_length, tree, NULL((void*)0), tvb);
7462 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
7463 long_number = tvb_get_uint32(tvb, offset, encoding);
7464 if ((long_number & PID_LIST_END(0x3f02)) != PID_LIST_END(0x3f02)) {
7465 expert_add_info_format(pinfo, element_tree, &ei_rtps_parameter_value_invalid,
7466 "Now it should be PID_LIST_END and it is not"); \
7467 }
7468 offset += 4;
7469 proto_item_set_len(element_tree, offset - initial_offset);
7470
7471 if (add_info) {
7472 wmem_map_insert(dissection_infos, &(info->type_id), (void *) info);
7473 }
7474
7475 return offset;
7476}
7477
7478// NOLINTNEXTLINE(misc-no-recursion)
7479static void rtps_util_add_type_library(proto_tree *tree, packet_info * pinfo,
7480 tvbuff_t * tvb, int offset, const unsigned encoding, uint32_t size) {
7481 proto_tree * library_tree;
7482 uint32_t long_number, i;
7483 long_number = tvb_get_uint32(tvb, offset, encoding);
7484 library_tree = proto_tree_add_subtree_format(tree, tvb, offset, size,
7485 ett_rtps_type_library, NULL((void*)0), "Type Library (%d elements)", long_number);
7486 offset += 4;
7487 increment_dissection_depth(pinfo);
7488 for (i = 0; i < long_number; i++) {
7489 offset = rtps_util_add_type_library_element(library_tree, pinfo, tvb,
7490 offset, encoding);
7491 }
7492 decrement_dissection_depth(pinfo);
7493}
7494
7495static void rtps_util_add_typeobject(proto_tree *tree, packet_info * pinfo,
7496 tvbuff_t * tvb, int offset, const unsigned encoding, uint32_t size,
7497 type_mapping * type_mapping_object ) {
7498 proto_tree * typeobject_tree;
7499 int offset_tmp = 0;
7500 uint32_t member_id = 0, member_length = 0;
7501 uint32_t long_number;
7502 uint64_t type_id;
7503
7504 typeobject_tree = proto_tree_add_subtree(tree, tvb, offset, size,
7505 ett_rtps_type_object, NULL((void*)0), "Type Object");
7506 /* --- This is the standard parameterized serialization --- */
7507 /* TypeLibrary */
7508 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);
7509 offset_tmp = offset;
7510 /* Dissect the member */
7511 rtps_util_add_type_library(typeobject_tree, pinfo, tvb, offset_tmp, encoding, member_length);
7512 offset = check_offset_addition(offset, member_length, tree, pinfo, tvb);
7513 /* End TypeLibrary */
7514
7515 /* _TypeId */
7516 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &member_id, &member_length);
7517 offset_tmp = offset;
7518 /* Dissect the member. In this case, the typeid is an union with a short
7519 * as a discriminator*/
7520 rtps_util_add_type_id(typeobject_tree, pinfo, tvb, offset_tmp, encoding, offset, -1, NULL((void*)0), &type_id);
7521 if (type_mapping_object) type_mapping_object->type_id = type_id;
7522 offset = check_offset_addition(offset, member_length, tree, pinfo, tvb);
7523 /* End _TypeId */
7524
7525 long_number = tvb_get_uint32(tvb, offset, encoding);
7526 if ((long_number & PID_LIST_END(0x3f02)) != PID_LIST_END(0x3f02)) {
7527 expert_add_info_format(pinfo, typeobject_tree, &ei_rtps_parameter_value_invalid,
7528 "This should be PID_LIST_END and it is not"); \
7529 }
7530
7531}
7532
7533/**
7534 * @brief Add an XCDR2 delimited header to the protocol tree:
7535 * Format used in XCDR2 extensible types where a 32-bit length prefix
7536 * indicates the size of the following data structure.
7537 *
7538 * @param tree Protocol tree where the header will be added
7539 * @param tvb The buffer containing the data
7540 * @param offset Current offset in the buffer
7541 * @return The new offset after the delimited header
7542 */
7543static int rtps_util_add_xcdr2_delimited_header(proto_tree* tree, tvbuff_t* tvb,
7544 int offset)
7545{
7546 /*
7547 * 0...2...........7...............15.............23...............31
7548 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
7549 * | delimited header |
7550 * +---------------+---------------+---------------+---------------+
7551 */
7552
7553 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
7554
7555 if (enable_debug_info)
7556 {
7557 proto_tree_add_item(tree, hf_rtps_xcdr2_delimited_header, tvb, offset, 4,
7558 ENC_LITTLE_ENDIAN0x80000000);
7559 }
7560 return offset + 4;
7561}
7562
7563/**
7564 * @brief Dissect an XCDR2 enhanced mutable header (EMHEADER)
7565 *
7566 * This function handles the dissection of an XCDR2 enhanced mutable header
7567 * following the OMG XTypes 1.3 specification. It processes the header fields
7568 * including the EMHeader value, must understand flag, length code, and member ID.
7569 * For length codes greater than 3, it also processes the nextint field which
7570 * contains additional information.
7571 *
7572 * @param tree Protocol tree to add the enhanced mutable header elements to
7573 * @param tvb The tv buffer containing packet data
7574 * @param offset The current offset in the tvb
7575 * @return The new offset after parsing the enhanced mutable header
7576 */
7577static int rtps_util_add_xcdr2_enhanced_mutable_header(proto_tree* tree,
7578 tvbuff_t* tvb, int offset)
7579{
7580 /*
7581 * 0...2...........7...............15.............23...............31
7582 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
7583 * | member ID |LC |M|
7584 * +---------------+---------------+---------------+---------------+
7585 * | nextint |
7586 * +---------------+---------------+---------------+---------------+
7587 * M = Must Understand bit
7588 * LC = Length Code (3 bits)
7589 */
7590
7591 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
7592 const uint32_t header = tvb_get_uint32(tvb, offset, ENC_LITTLE_ENDIAN0x80000000);
7593
7594 if (enable_debug_info)
7595 {
7596 proto_tree_add_bitmask(tree, tvb, offset,
7597 hf_rtps_xcdr2_enhanced_mutable_header, ett_rtps_flags,
7598 EMHEADER, ENC_LITTLE_ENDIAN0x80000000);
7599 }
7600
7601 offset += 4;
7602
7603 const uint32_t length_code = (header & 0x70000000) >> 28;
7604 if (length_code > 3)
7605 {
7606 if (enable_debug_info)
7607 {
7608 /* nextint */
7609 proto_tree_add_item(tree, hf_rtps_xcdr2_nextint, tvb, offset, 4,
7610 ENC_LITTLE_ENDIAN0x80000000);
7611 }
7612 offset += 4;
7613 }
7614
7615 return offset;
7616}
7617
7618/**
7619 * @brief Add TypeIdentifier to the protocol tree per XTypes v1.3
7620 *
7621 * @details The TypeIdentifier is one of the core structures of the XTypes specification,
7622 * used to identify and reference types. It can identify primitive types like
7623 * int32, or more complex types like structures, arrays, etc.
7624 *
7625 * This function parses the type identifier discriminator and its associated data,
7626 * recursively processing nested type identifiers when present.
7627 *
7628 * @param tree The protocol tree where this element will be added
7629 * @param pinfo Packet info
7630 * @param tvb The buffer containing the data
7631 * @param offset The current offset in the buffer
7632 * @param isBaseType TRUE if this is a base type identifier (for structures)
7633 * @return The new offset after the type identifier has been processed
7634 */
7635// Recursion is required for parsing nested TypeIdentifiers in RTPS.
7636// NOLINTNEXTLINE(misc-no-recursion)
7637static int rtps_util_add_type_id_v2(proto_tree *tree, packet_info *pinfo,
7638 tvbuff_t *tvb, int offset, bool_Bool isBaseType)
7639{
7640 /* Create subtree for TypeIdentifier */
7641 proto_item* ti_item;
7642 proto_tree* ti_tree = proto_tree_add_subtree(tree, tvb, offset, -1,
7643 ett_rtps_type_id, &ti_item, isBaseType ? "Base Type Id" : "Type Id");
7644 const int initial_offset = offset;
7645
7646 /* Read the discriminator (first octet) */
7647 const uint8_t type_kind_discriminator = tvb_get_uint8(tvb, offset);
7648 proto_tree_add_item(ti_tree,
7649 isBaseType
7650 ? hf_rtps_base_type_id_discriminator
7651 : hf_rtps_type_id_discriminator, tvb, offset, 1, ENC_NA0x00000000);
7652 offset++;
7653
7654 /* Handle the different TypeIdentifier cases based on discriminator */
7655 switch (type_kind_discriminator)
7656 {
7657 /* Primitive types - no additional data */
7658 case TK_NONE(0x00):
7659 case TK_BOOLEAN(0x01):
7660 case TK_BYTE(0x02):
7661 case TK_INT8(0x0C):
7662 case TK_INT16(0x03):
7663 case TK_INT32(0x04):
7664 case TK_INT64(0x05):
7665 case TK_UINT8(0x0D):
7666 case TK_UINT16(0x06):
7667 case TK_UINT32(0x07):
7668 case TK_UINT64(0x08):
7669 case TK_FLOAT32(0x09):
7670 case TK_FLOAT64(0x0A):
7671 case TK_FLOAT128(0x0B):
7672 case TK_CHAR8(0x10):
7673 case TK_CHAR16(0x11):
7674 /* These cases have no additional data */
7675 break;
7676
7677 /* String types with small bounds */
7678 case TI_STRING8_SMALL(0x70):
7679 case TI_STRING16_SMALL(0x72):
7680 /* StringSTypeDefn: SBound (1 byte) */
7681 proto_tree_add_item(ti_tree, hf_rtps_type_bound, tvb, offset, 1,
7682 ENC_LITTLE_ENDIAN0x80000000);
7683 offset += 1;
7684 break;
7685
7686 /* String types with large bounds */
7687 case TI_STRING8_LARGE(0x71):
7688 case TI_STRING16_LARGE(0x73):
7689 /* StringLTypeDefn: LBound (4 bytes) */
7690 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
7691 proto_tree_add_item(ti_tree, hf_rtps_type_bound, tvb, offset, 4,
7692 ENC_LITTLE_ENDIAN0x80000000);
7693 offset += 4;
7694 break;
7695
7696 /* Sequence types with small bounds */
7697 case TI_PLAIN_SEQUENCE_SMALL(0x80):
7698 /* PlainSequenceSElemDefn */
7699 /* PlainCollectionHeader */
7700 proto_tree_add_item(ti_tree, hf_rtps_type_equiv_kind, tvb, offset, 1,
7701 ENC_LITTLE_ENDIAN0x80000000);
7702 offset += 1;
7703 proto_tree_add_item(ti_tree, hf_rtps_type_element_flags, tvb, offset, 2,
7704 ENC_LITTLE_ENDIAN0x80000000);
7705 offset += 2;
7706
7707 /* SBound (1 byte) */
7708 proto_tree_add_item(ti_tree, hf_rtps_type_bound, tvb, offset, 1,
7709 ENC_LITTLE_ENDIAN0x80000000);
7710 offset += 1;
7711
7712 /* element_identifier (recursive TypeIdentifier) */
7713 offset = rtps_util_add_type_id_v2(ti_tree, pinfo, tvb, offset, false0);
7714 break;
7715
7716 /* Sequence types with large bounds */
7717 case TI_PLAIN_SEQUENCE_LARGE(0x81):
7718 /* Similar to small sequence but with LBound (4 bytes) */
7719 /* PlainCollectionHeader */
7720 proto_tree_add_item(ti_tree, hf_rtps_type_equiv_kind, tvb, offset, 1,
7721 ENC_LITTLE_ENDIAN0x80000000);
7722 offset += 1;
7723 proto_tree_add_item(ti_tree, hf_rtps_type_element_flags, tvb, offset, 2,
7724 ENC_LITTLE_ENDIAN0x80000000);
7725 offset += 2;
7726
7727 /* LBound (4 bytes) */
7728 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
7729 proto_tree_add_item(ti_tree, hf_rtps_type_bound, tvb, offset, 4,
7730 ENC_LITTLE_ENDIAN0x80000000);
7731 offset += 4;
7732
7733 /* element_identifier (recursive TypeIdentifier) */
7734 offset = rtps_util_add_type_id_v2(ti_tree, pinfo, tvb, offset, false0);
7735 break;
7736
7737 /* Array types with small bounds */
7738 case TI_PLAIN_ARRAY_SMALL(0x90):
7739 /* PlainArraySElemDefn */
7740 /* PlainCollectionHeader */
7741 proto_tree_add_item(ti_tree, hf_rtps_type_equiv_kind, tvb, offset, 1,
7742 ENC_LITTLE_ENDIAN0x80000000);
7743 offset += 1;
7744 proto_tree_add_item(ti_tree, hf_rtps_type_element_flags, tvb, offset, 2,
7745 ENC_LITTLE_ENDIAN0x80000000);
7746 offset += 2;
7747 /* array_bound_seq (sequence of SBound, 1 byte each) */
7748 {
7749 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
7750 const uint32_t bound_seq_len = tvb_get_uint32(tvb, offset, ENC_LITTLE_ENDIAN0x80000000);
7751 proto_tree* arr_tree = proto_tree_add_subtree_format(ti_tree, tvb, offset,
7752 4 + bound_seq_len, ett_rtps_type_bound_seq, NULL((void*)0), "Array Bounds [%u]",
7753 bound_seq_len);
7754 offset += 4;
7755
7756 for (uint32_t i = 0; i < bound_seq_len; i++)
7757 {
7758 uint32_t bound;
7759 proto_item* bound_it = proto_tree_add_item_ret_uint(arr_tree,
7760 hf_rtps_type_bound, tvb, offset, 1, ENC_LITTLE_ENDIAN0x80000000, &bound);
7761 proto_item_set_text(bound_it, "Bound [%u]: %u", i, bound);
7762 offset += 1;
7763 }
7764 }
7765
7766 /* element_identifier (recursive TypeIdentifier) */
7767 offset = rtps_util_add_type_id_v2(ti_tree, pinfo, tvb, offset, false0);
7768 break;
7769
7770 /* Array types with large bounds */
7771 case TI_PLAIN_ARRAY_LARGE(0x91):
7772 /* Similar to small array but with LBound sequence */
7773 /* PlainCollectionHeader */
7774 proto_tree_add_item(ti_tree, hf_rtps_type_equiv_kind, tvb, offset, 1,
7775 ENC_LITTLE_ENDIAN0x80000000);
7776 offset += 1;
7777 proto_tree_add_item(ti_tree, hf_rtps_type_element_flags, tvb, offset, 2,
7778 ENC_LITTLE_ENDIAN0x80000000);
7779 offset += 2;
7780
7781 /* array_bound_seq (sequence of LBound, 4 bytes each) */
7782 {
7783 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
7784 const uint32_t bound_seq_len = tvb_get_uint32(tvb, offset, ENC_LITTLE_ENDIAN0x80000000);
7785 proto_tree* arr_tree = proto_tree_add_subtree_format(ti_tree, tvb, offset,
7786 4 + (bound_seq_len * 4), ett_rtps_type_bound_seq, NULL((void*)0), "Array Bounds [%u]",
7787 bound_seq_len);
7788 offset += 4;
7789
7790 for (uint32_t i = 0; i < bound_seq_len; i++)
7791 {
7792 uint32_t bound;
7793 proto_item* bound_it = proto_tree_add_item_ret_uint(arr_tree,
7794 hf_rtps_type_bound, tvb, offset, 4, ENC_LITTLE_ENDIAN0x80000000, &bound);
7795 proto_item_set_text(bound_it, "Bound [%u]: %u", i, bound);
7796 offset += 4;
7797 }
7798 }
7799
7800 /* element_identifier (recursive TypeIdentifier) */
7801 offset = rtps_util_add_type_id_v2(ti_tree, pinfo, tvb, offset, false0);
7802 break;
7803
7804 /* Map types */
7805 case TI_PLAIN_MAP_SMALL(0xA0):
7806 /* PlainMapSTypeDefn */
7807 /* PlainCollectionHeader header */
7808 proto_tree_add_item(ti_tree, hf_rtps_type_equiv_kind, tvb, offset, 1,
7809 ENC_NA0x00000000);
7810 offset += 1;
7811 proto_tree_add_item(ti_tree, hf_rtps_type_element_flags, tvb, offset, 2,
7812 ENC_LITTLE_ENDIAN0x80000000);
7813 offset += 2;
7814
7815 /* SBound (1 byte) */
7816 proto_tree_add_item(ti_tree, hf_rtps_type_bound, tvb, offset, 1,
7817 ENC_LITTLE_ENDIAN0x80000000);
7818 offset += 1;
7819
7820 /* element_identifier (recursive TypeIdentifier) */
7821 offset = rtps_util_add_type_id_v2(ti_tree, pinfo, tvb, offset, false0);
7822
7823 /* key_flags */
7824 SHORT_ALIGN(offset)(offset = (offset+1)&0xfffffffe);
7825 proto_tree_add_item(ti_tree, hf_rtps_type_element_flags, tvb, offset, 2,
7826 ENC_LITTLE_ENDIAN0x80000000);
7827 offset += 2;
7828
7829 /* key_identifier (recursive TypeIdentifier) */
7830 offset = rtps_util_add_type_id_v2(ti_tree, pinfo, tvb, offset, false0);
7831 break;
7832
7833 case TI_PLAIN_MAP_LARGE(0xA1):
7834 /* PlainMapLTypeDefn */
7835 /* PlainCollectionHeader */
7836 proto_tree_add_item(ti_tree, hf_rtps_type_equiv_kind, tvb, offset, 1,
7837 ENC_NA0x00000000);
7838 offset += 1;
7839 proto_tree_add_item(ti_tree, hf_rtps_type_element_flags, tvb, offset, 2,
7840 ENC_LITTLE_ENDIAN0x80000000);
7841 offset += 2;
7842
7843 /* LBound (4 bytes) */
7844 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
7845 proto_tree_add_item(ti_tree, hf_rtps_type_bound, tvb, offset, 4,
7846 ENC_LITTLE_ENDIAN0x80000000);
7847 offset += 4;
7848
7849 /* Read element_identifier (recursive TypeIdentifier) */
7850 offset = rtps_util_add_type_id_v2(ti_tree, pinfo, tvb, offset, false0);
7851
7852 /* key_flags */
7853 proto_tree_add_item(ti_tree, hf_rtps_type_element_flags, tvb, offset, 2,
7854 ENC_LITTLE_ENDIAN0x80000000);
7855 offset += 2;
7856
7857 /* key_identifier (recursive TypeIdentifier) */
7858 offset = rtps_util_add_type_id_v2(ti_tree, pinfo, tvb, offset, false0);
7859 break;
7860 /* Strongly connected component (for cyclic dependencies) */
7861 case TI_STRONGLY_CONNECTED_COMPONENT(0xB0):
7862 /* not supported */
7863 /* Parse TypeObjectHashId, etc. */
7864 break;
7865
7866 /* Hash-based type identification */
7867 case EK_COMPLETE(0xF2):
7868 case EK_MINIMAL(0xF1):
7869 /* EquivalenceHash is 14 bytes */
7870 proto_tree_add_item(ti_tree, hf_rtps_type_hash, tvb, offset, 14, ENC_NA0x00000000);
7871 offset += 14;
7872 break;
7873
7874 /* Extended type definition (future use) */
7875 default:
7876 /* ExtendedTypeDefn - currently just a placeholder */
7877 proto_tree_add_item(ti_tree, hf_rtps_type_extended, tvb, offset,
7878 0, ENC_NA0x00000000);
7879 break;
7880 }
7881
7882 proto_item_set_len(ti_item, offset - initial_offset);
7883 return offset;
7884}
7885
7886/**
7887 * @brief Dissect a CompleteTypeDetail structure
7888 *
7889 * The CompleteTypeDetail structure contains:
7890 * - Annotation built-in flags
7891 * - Annotation custom flags
7892 * - Type name
7893 *
7894 * @note Currently assumes that optional annotations are not present.
7895 *
7896 * @param tree Protocol tree to add the detail info
7897 * @param tvb Buffer containing the packet data
7898 * @param offset Current offset in the buffer
7899 * @return New offset after reading the CompleteTypeDetail
7900 */
7901static int rtps_util_add_complete_type_detail(proto_tree* tree, tvbuff_t* tvb,
7902 int offset)
7903{
7904 /*
7905 * 0...2...........7...............15.............23...............31
7906 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
7907 * |has builtin ann|has custom ann | padding |
7908 * +---------------+---------------+---------------+---------------+
7909 * | string length |
7910 * +---------------+---------------+---------------+---------------+
7911 * | type name (length + 1 bytes) ... |
7912 * +---------------+---------------+---------------+---------------+
7913 *
7914 * assumes that optional annotations are not present
7915 *
7916 * IDL
7917 * @extensibility(FINAL) @nested @no_sequence
7918 * struct CompleteTypeDetail {
7919 * @optional AppliedBuiltinTypeAnnotations ann_builtin;
7920 * @optional AppliedAnnotationSeq ann_custom;
7921 * QualifiedTypeName type_name;
7922 * };
7923 */
7924
7925 /* Create subtree for the alias type */
7926 proto_item* complete_type_ti;
7927 proto_tree* complete_type_tree = proto_tree_add_subtree(
7928 tree, tvb, offset, -1, ett_rtps_type_object_v2_complete_type_detail,
7929 &complete_type_ti, "Complete Type Detail");
7930 const int initial_offset = offset;
7931
7932 /* Extract and store annotation built-in flags */
7933 proto_tree_add_item(complete_type_tree,
7934 hf_rtps_type_object_v2_has_ann_builtin, tvb, offset, 1, ENC_LITTLE_ENDIAN0x80000000);
7935 offset++;
7936
7937 /* Extract and store annotation custom flags */
7938 proto_tree_add_item(complete_type_tree, hf_rtps_type_object_v2_has_ann_custom,
7939 tvb, offset, 1, ENC_LITTLE_ENDIAN0x80000000);
7940 offset++;
7941
7942 /* Type name */
7943 offset = rtps_util_add_string_no_align(complete_type_tree, tvb, offset,
7944 hf_rtps_type_object_v2_type_name, ENC_LITTLE_ENDIAN0x80000000);
7945
7946 proto_item_set_len(complete_type_ti, offset - initial_offset);
7947 return offset;
7948}
7949
7950/**
7951 * @brief Dissect an CompleteAliasType or MinimalAliasType type within a TypeObjectV2
7952 *
7953 * @details This function handles the dissection of an ALIAS type from a TypeObjectV2
7954 * following the OMG XTypes 1.3 specification. It processes alias_flags,
7955 * header information (when applicable in COMPLETE mode), and the alias body
7956 * which contains the related type information.
7957 *
7958 * @param tree Protocol tree to add the alias elements to
7959 * @param pinfo Packet info for the current packet
7960 * @param tvb The tv buffer containing packet data
7961 * @param offset The current offset in the tvb
7962 * @param typeobject_discriminator The discriminator (EK_COMPLETE or EK_MINIMAL)
7963 * of the TypeObjectV2 of which this alias is a member.
7964 * @return The new offset after parsing the alias type
7965 */
7966static int rtps_util_add_type_object_v2_alias(proto_tree *tree,
7967 packet_info *pinfo, tvbuff_t *tvb, int offset,
7968 uint8_t typeobject_discriminator)
7969{
7970 /* Create Alias subtree */
7971 proto_item* alias_ti;
7972 proto_tree* alias_tree = proto_tree_add_subtree(tree, tvb, offset, -1,
7973 ett_rtps_type_object_v2_alias, &alias_ti, "Alias Type");
7974 const int initial_offset = offset;
7975
7976 /* AliasTypeFlag alias_flags */
7977 proto_tree_add_bitmask(alias_tree, tvb, offset,
7978 hf_rtps_type_object_v2_type_flags, ett_rtps_flags,
7979 TYPE_FLAGS_V2, ENC_LITTLE_ENDIAN0x80000000);
7980 offset += 2;
7981
7982 /* Delimited header for CompleteAliasHeader/MinimalAliasHeader */
7983 offset = rtps_util_add_xcdr2_delimited_header(alias_tree, tvb, offset);
7984
7985 /* CompleteAliasHeader header (MinimalAliasHeader is empty) */
7986 if (typeobject_discriminator == EK_COMPLETE(0xF2))
7987 {
7988 /* CompleteTypeDetail detail */
7989 offset = rtps_util_add_complete_type_detail(alias_tree, tvb, offset);
7990 }
7991
7992 /* CompleteAliasBody body */
7993 /* CommonAliasBody common */
7994 proto_item* body_ti;
7995 proto_tree* body_tree = proto_tree_add_subtree(alias_tree, tvb, offset, -1,
7996 ett_rtps_type_object_v2_alias_body, &body_ti, "Alias Body");
7997 const int initial_body_offset = offset;
7998
7999 /* Delimited header for CompleteAliasBody/MinimalAliasBody */
8000 offset = rtps_util_add_xcdr2_delimited_header(body_tree, tvb, offset);
8001
8002 /* AliasMemberFlag related_flags */
8003 proto_tree_add_bitmask(body_tree, tvb, offset,
8004 hf_rtps_type_object_v2_member_flags, ett_rtps_flags,
8005 MEMBER_FLAGS_V2, ENC_LITTLE_ENDIAN0x80000000);
8006 offset += 2;
8007
8008 /* TypeIdentifier related_type */
8009 offset = rtps_util_add_type_id_v2(body_tree, pinfo, tvb, offset, false0);
8010
8011 if (typeobject_discriminator == EK_COMPLETE(0xF2))
8012 {
8013 /* annotation built-in flags */
8014 proto_tree_add_item(body_tree, hf_rtps_type_object_v2_has_ann_builtin, tvb,
8015 offset, 1, ENC_NA0x00000000);
8016 offset++;
8017
8018 /* annotation custom flags */
8019 proto_tree_add_item(body_tree, hf_rtps_type_object_v2_has_ann_custom, tvb,
8020 offset, 1, ENC_NA0x00000000);
8021 offset++;
8022 }
8023
8024 proto_item_set_len(body_ti, offset - initial_body_offset);
8025
8026 proto_item_set_len(alias_ti, offset - initial_offset);
8027 return offset;
8028}
8029
8030/**
8031 * @brief Adds a CompleteMemberDetail or MinimalMemberDetail to the protocol tree.
8032 *
8033 * This function handles the dissection of either a CompleteMemberDetail or
8034 * MinimalMemberDetail, depending on the typeobject discriminator.
8035 *
8036 * @param member_item_tree The proto_tree to add items to.
8037 * @param tvb The tv buffer containing packet data
8038 * @param offset The current offset in the buffer.
8039 * @param typeobject_discriminator The discriminator (EK_COMPLETE or EK_MINIMAL).
8040 * @return The new offset after adding the member detail.
8041 */
8042static int rtps_util_add_member_detail(proto_tree* member_item_tree,
8043 tvbuff_t* tvb, int offset, int typeobject_discriminator)
8044{
8045 if (typeobject_discriminator == EK_COMPLETE(0xF2))
8046 {
8047 /*
8048 * 0...2...........7...............15.............23...............31
8049 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
8050 * | string length |
8051 * +---------------+---------------+---------------+---------------+
8052 * | member name (length + 1 bytes) ... |
8053 * +---------------+---------------+---------------+---------------+
8054 * |end of member name (no padding)|has builtin ann|has custom ann |
8055 * +---------------+---------------+---------------+---------------+
8056 *
8057 * assumes that optional annotations are not present
8058 *
8059 * IDL
8060 * @extensibility(FINAL) @nested @no_sequence
8061 * struct CompleteMemberDetail {
8062 * MemberName name;
8063 * @optional AppliedBuiltinMemberAnnotations ann_builtin;
8064 * @optional AppliedAnnotationSeq ann_custom;
8065 * };
8066 */
8067
8068 /* CompleteMemberDetail */
8069 /* name */
8070 offset = rtps_util_add_string_no_align(member_item_tree, tvb, offset,
8071 hf_rtps_type_object_v2_member_name, ENC_LITTLE_ENDIAN0x80000000);
8072
8073 /* annotation built-in flags */
8074 proto_tree_add_item(member_item_tree,
8075 hf_rtps_type_object_v2_has_ann_builtin, tvb,
8076 offset, 1, ENC_NA0x00000000);
8077 offset++;
8078
8079 /* annotation custom flags */
8080 proto_tree_add_item(member_item_tree, hf_rtps_type_object_v2_has_ann_custom,
8081 tvb,
8082 offset, 1, ENC_NA0x00000000);
8083 offset++;
8084 }
8085 else
8086 {
8087 /*
8088 * 0...2...........7...............15.............23...............31
8089 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
8090 * | name hash (4 bytes) | |
8091 * +---------------+---------------+---------------+---------------+
8092 *
8093 * IDL
8094 * @extensibility(FINAL) @nested @no_sequence
8095 * struct MinimalMemberDetail {
8096 * NameHash name_hash;
8097 * };
8098 */
8099
8100 /* MinimalMemberDetail */
8101 /* name_hash */
8102 proto_tree_add_item(member_item_tree,
8103 hf_rtps_type_object_v2_member_name_hash, tvb, offset, 4,
8104 ENC_LITTLE_ENDIAN0x80000000);
8105 offset += 4;
8106 }
8107 return offset;
8108}
8109
8110/**
8111 * @brief Dissect a CompleteStructType or MinimalStructType within a TypeObjectV2
8112 *
8113 * This function handles the dissection of a STRUCT type from a TypeObjectV2
8114 * following the OMG XTypes 1.3 specification. It processes struct_flags,
8115 * header information, base_type, CompleteTypeDetail (when applicable),
8116 * and the member sequence.
8117 *
8118 * @param tree Protocol tree to add the structure elements to
8119 * @param pinfo Packet info for the current packet
8120 * @param tvb The tv buffer containing packet data
8121 * @param offset The current offset in the tvb
8122 * @param typeobject_discriminator The discriminator (EK_COMPLETE or EK_MINIMAL)
8123 * @return The new offset after parsing the structure
8124 */
8125static int rtps_util_add_type_object_v2_struct(proto_tree *tree,
8126 packet_info *pinfo, tvbuff_t *tvb, int offset,
8127 uint8_t typeobject_discriminator)
8128{
8129 /* Create Structure subtree */
8130 proto_item* structure_ti;
8131 proto_tree* structure_tree = proto_tree_add_subtree(tree, tvb, offset, -1,
8132 ett_rtps_type_object_v2_struct, &structure_ti, "Struct Type");
8133 const int initial_offset = offset;
8134
8135 /* StructTypeFlag struct_flags */
8136 proto_tree_add_bitmask(structure_tree, tvb, offset,
8137 hf_rtps_type_object_v2_type_flags, ett_rtps_flags,
8138 TYPE_FLAGS_V2, ENC_LITTLE_ENDIAN0x80000000);
8139 offset += 2;
8140
8141 /* Delimited header for CompleteStructHeader/MinimalStructHeader */
8142 offset = rtps_util_add_xcdr2_delimited_header(structure_tree, tvb, offset);
8143
8144 /* CompleteStructHeader/MinimalStructHeader header */
8145 proto_item* header_ti;
8146 proto_tree* header_tree = proto_tree_add_subtree(structure_tree, tvb, offset, -1,
8147 ett_rtps_type_object_v2_struct_header, &header_ti, "Struct Header");
8148 const int initial_header_offset = offset;
8149
8150 /* TypeIdentifier base_type */
8151 offset = rtps_util_add_type_id_v2(header_tree, pinfo, tvb, offset, true1);
8152
8153 if (typeobject_discriminator == EK_COMPLETE(0xF2))
8154 {
8155 /* CompleteTypeDetail detail */
8156 offset = rtps_util_add_complete_type_detail(header_tree, tvb, offset);
8157 }
8158 proto_item_set_len(header_ti, offset - initial_header_offset);
8159
8160 /* Member sequence */
8161
8162 /* Delimited header for CompleteStructMemberSeq/MinimalStructMemberSeq */
8163 offset = rtps_util_add_xcdr2_delimited_header(structure_tree, tvb, offset);
8164
8165 /* CompleteStructMemberSeq/MinimalStructMemberSeq member_seq */
8166 const uint32_t member_seq_len = tvb_get_uint32(tvb, offset, ENC_LITTLE_ENDIAN0x80000000);
8167 offset += 4;
8168
8169 if (member_seq_len > 0)
8170 {
8171 proto_item* member_seq_item;
8172 proto_tree* member_seq_tree = proto_tree_add_subtree_format(structure_tree,
8173 tvb, offset, -1, ett_rtps_type_object_v2_member_seq, &member_seq_item,
8174 "Members [%u]", member_seq_len);
8175 const int initial_member_seq_item_offset = offset;
8176
8177 for (uint32_t i = 0; i < member_seq_len; i++)
8178 {
8179 /* For each member */
8180 proto_item* member_item_ti;
8181 proto_tree* member_item_tree = proto_tree_add_subtree_format(
8182 member_seq_tree, tvb, offset, -1, ett_rtps_type_object_v2_member,
8183 &member_item_ti, "Member [%u]", i);
8184 const int initial_member_item_offset = offset;
8185
8186 /* Delimited header */
8187 offset =
8188 rtps_util_add_xcdr2_delimited_header(member_item_tree, tvb, offset);
8189
8190 /* Common part */
8191 /* member_id */
8192 proto_tree_add_item(member_item_tree, hf_rtps_type_object_v2_member_id, tvb,
8193 offset, 4, ENC_LITTLE_ENDIAN0x80000000);
8194 offset += 4;
8195
8196 /* StructMemberFlag member_flags */
8197 proto_tree_add_bitmask(member_item_tree, tvb, offset,
8198 hf_rtps_type_object_v2_member_flags, ett_rtps_flags,
8199 MEMBER_FLAGS_V2, ENC_LITTLE_ENDIAN0x80000000);
8200 offset += 2;
8201
8202 /* member_type_id */
8203 const uint8_t discriminator = tvb_get_uint8(tvb, offset);
8204 offset = rtps_util_add_type_id_v2(member_item_tree, pinfo, tvb, offset,
8205 false0);
8206
8207 /*
8208 * iterate through type_id_discriminator_vals to find a string
8209 * corresponding to the discriminator
8210 */
8211 const char* lbl_str = "Unknown";
8212 for (size_t j = 0; j < array_length(type_id_discriminator_vals)(sizeof (type_id_discriminator_vals) / sizeof (type_id_discriminator_vals
)[0])
; j++)
8213 {
8214 if (type_id_discriminator_vals[j].value == discriminator)
8215 {
8216 lbl_str = type_id_discriminator_vals[j].strptr;
8217 break;
8218 }
8219 }
8220 proto_item_set_text(member_item_ti, "Member [%u] (%s)", i, lbl_str);
8221
8222 /* member detail */
8223 offset = rtps_util_add_member_detail(member_item_tree, tvb, offset, typeobject_discriminator);
8224
8225 proto_item_set_len(member_item_ti, offset - initial_member_item_offset);
8226 }
8227 proto_item_set_len(member_seq_item, offset - initial_member_seq_item_offset);
8228 }
8229
8230 proto_item_set_len(structure_ti, offset - initial_offset);
8231 return offset;
8232}
8233
8234/**
8235 * @brief Dissect a CompleteUnionType within a TypeObjectV2
8236 *
8237 * @details This function handles the dissection of a UNION type from a TypeObjectV2
8238 * following the OMG XTypes 1.3 specification. It processes union_flags,
8239 * header information (with CompleteTypeDetail when in COMPLETE mode),
8240 * the discriminator member, and the union member sequence which includes
8241 * case labels for each member.
8242 *
8243 * @param tree Protocol tree to add the union elements to
8244 * @param pinfo Packet info for the current packet
8245 * @param tvb The tv buffer containing packet data
8246 * @param offset The current offset in the tvb
8247 * @param typeobject_discriminator The discriminator (EK_COMPLETE or EK_MINIMAL)
8248 * @return The new offset after parsing the union
8249 */
8250static int rtps_util_add_type_object_v2_union(proto_tree* tree,
8251 packet_info* pinfo, tvbuff_t* tvb, int offset,
8252 uint8_t typeobject_discriminator)
8253{
8254
8255 /* Create Union subtree */
8256 proto_item* union_ti;
8257 proto_tree* union_tree = proto_tree_add_subtree(tree, tvb, offset, -1,
8258 ett_rtps_type_object_v2_union, &union_ti, "Union Type");
8259 const int initial_offset = offset;
8260
8261 /* UnionTypeFlag union_flags */
8262 proto_tree_add_bitmask(union_tree, tvb, offset,
8263 hf_rtps_type_object_v2_type_flags, ett_rtps_flags,
8264 TYPE_FLAGS_V2, ENC_LITTLE_ENDIAN0x80000000);
8265 offset += 2;
8266
8267 /* Delimited header for CompleteUnionHeader/MinimalUnionHeader */
8268 offset = rtps_util_add_xcdr2_delimited_header(union_tree, tvb, offset);
8269
8270 /* CompleteUnionHeader/MinimalUnionHeader header */
8271 if (typeobject_discriminator == EK_COMPLETE(0xF2))
8272 {
8273 proto_item* header_ti;
8274 proto_tree* header_tree = proto_tree_add_subtree(union_tree, tvb, offset, -1,
8275 ett_rtps_type_object_v2_union_header, &header_ti, "Union Header");
8276 const int initial_header_offset = offset;
8277
8278 /* CompleteTypeDetail detail */
8279 offset = rtps_util_add_complete_type_detail(header_tree, tvb, offset);
8280 proto_item_set_len(header_ti, offset - initial_header_offset);
8281 }
8282
8283 /* Delimited header for CompleteDiscriminatorMember/MinimalDiscriminatorMember */
8284 offset = rtps_util_add_xcdr2_delimited_header(union_tree, tvb, offset);
8285
8286 /* CompleteDiscriminatorMember/MinimalDiscriminatorMember discriminator */
8287 proto_item* discriminator_ti;
8288 proto_tree* discriminator_tree = proto_tree_add_subtree(union_tree,
8289 tvb, offset, -1, ett_rtps_type_object_v2_union_discriminator,
8290 &discriminator_ti, "Union Discriminator");
8291 const int initial_discriminator_offset = offset;
8292
8293 /* CommonDiscriminatorMember common */
8294 /* UnionDiscriminatorFlag member_flags */
8295 proto_tree_add_bitmask(discriminator_tree, tvb, offset,
8296 hf_rtps_type_object_v2_member_flags, ett_rtps_flags,
8297 MEMBER_FLAGS_V2, ENC_LITTLE_ENDIAN0x80000000);
8298 offset += 2;
8299
8300 /* TypeIdentifier type_id */
8301 offset = rtps_util_add_type_id_v2(discriminator_tree, pinfo, tvb, offset,
8302 false0);
8303
8304 if (typeobject_discriminator == EK_COMPLETE(0xF2))
8305 {
8306 /* annotation built-in flags */
8307 proto_tree_add_item(discriminator_tree,
8308 hf_rtps_type_object_v2_has_ann_builtin, tvb, offset, 1,
8309 ENC_LITTLE_ENDIAN0x80000000);
8310 offset++;
8311
8312 /* annotation custom flags */
8313 proto_tree_add_item(discriminator_tree,
8314 hf_rtps_type_object_v2_has_ann_custom, tvb, offset, 1, ENC_LITTLE_ENDIAN0x80000000);
8315 offset++;
8316 }
8317 proto_item_set_len(discriminator_ti, offset - initial_discriminator_offset);
8318
8319 /* Delimited header for CompleteUnionMemberSeq/MinimalUnionMemberSeq */
8320 offset = rtps_util_add_xcdr2_delimited_header(union_tree, tvb, offset);
8321
8322 /* CompleteUnionMemberSeq/MinimalUnionMemberSeq member_seq */
8323 const uint32_t member_seq_len = tvb_get_uint32(tvb, offset, ENC_LITTLE_ENDIAN0x80000000);
8324 offset += 4;
8325
8326 if (member_seq_len > 0)
8327 {
8328 proto_item* member_seq_ti;
8329 proto_tree* member_seq_tree = proto_tree_add_subtree_format(union_tree, tvb,
8330 offset, -1, ett_rtps_type_object_v2_member_seq, &member_seq_ti,
8331 "Members [%u]", member_seq_len);
8332 const int initial_member_seq_offset = offset;
8333
8334 for (uint32_t i = 0; i < member_seq_len; i++)
8335 {
8336 /* For each CompleteUnionMember/MinimalUnionMember */
8337 proto_item* member_item_ti;
8338 proto_tree* member_item_tree = proto_tree_add_subtree_format(
8339 member_seq_tree, tvb, offset, -1, ett_rtps_type_object_v2_member,
8340 &member_item_ti, "Member [%u]", i);
8341 const int initial_member_item_offset = offset;
8342
8343 /* Delimited header for CompleteUnionMember/MinimalUnionMember */
8344 offset =
8345 rtps_util_add_xcdr2_delimited_header(member_item_tree, tvb, offset);
8346
8347 /* CommonUnionMember common */
8348
8349 /* MemberId member_id */
8350 proto_tree_add_item(member_item_tree, hf_rtps_type_object_v2_member_id, tvb,
8351 offset, 4, ENC_LITTLE_ENDIAN0x80000000);
8352 offset += 4;
8353
8354 /* UnionMemberFlag member_flags */
8355 proto_tree_add_bitmask(member_item_tree, tvb, offset,
8356 hf_rtps_type_object_v2_member_flags, ett_rtps_flags,
8357 MEMBER_FLAGS_V2, ENC_LITTLE_ENDIAN0x80000000);
8358 offset += 2;
8359
8360 /* TypeIdentifier type_id */
8361
8362 const uint8_t type_kind_discriminator = tvb_get_uint8(tvb, offset);
8363 offset = rtps_util_add_type_id_v2(member_item_tree, pinfo, tvb, offset,
8364 false0);
8365
8366 /* iterate through type_id_discriminator_vals to find a string corresponding to the discriminator */
8367 const char* lbl_str = NULL((void*)0);
8368 for (size_t j = 0; j < array_length(type_id_discriminator_vals)(sizeof (type_id_discriminator_vals) / sizeof (type_id_discriminator_vals
)[0])
; j++)
8369 {
8370 if (type_id_discriminator_vals[j].value == type_kind_discriminator)
8371 {
8372 lbl_str = type_id_discriminator_vals[j].strptr;
8373 break;
8374 }
8375 }
8376 if (lbl_str == NULL((void*)0))
8377 {
8378 lbl_str = "Unknown";
8379 }
8380 proto_item_set_text(member_item_ti, "Member [%u] (%s)", i, lbl_str);
8381
8382 /* UnionCaseLabelSeq label_seq sequence<long> */
8383 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
8384 const uint32_t union_label_seq_len = tvb_get_uint32(tvb, offset, ENC_LITTLE_ENDIAN0x80000000);
8385 offset += 4;
8386
8387 if (union_label_seq_len > 0)
8388 {
8389 proto_item* label_item;
8390 proto_tree* label_tree = proto_tree_add_subtree_format(member_item_tree,
8391 tvb, offset, -1, ett_rtps_type_object_v2_union_label_seq, &label_item,
8392 "Labels [%u]", union_label_seq_len);
8393 const int initial_label_item_offset = offset;
8394
8395 for (uint32_t j = 0; j < union_label_seq_len; j++)
8396 {
8397 /* For each case label */
8398 proto_tree_add_item(label_tree, hf_rtps_type_object_v2_union_label, tvb,
8399 offset, 4, ENC_LITTLE_ENDIAN0x80000000);
8400 offset += 4;
8401 }
8402 proto_item_set_len(label_item, offset - initial_label_item_offset);
8403 }
8404
8405 /* Member detail */
8406 offset = rtps_util_add_member_detail(member_item_tree, tvb, offset,
8407 typeobject_discriminator);
8408
8409 proto_item_set_len(member_item_ti, offset - initial_member_item_offset);
8410 }
8411 proto_item_set_len(member_seq_ti, offset - initial_member_seq_offset);
8412 }
8413
8414 proto_item_set_len(union_ti, offset - initial_offset);
8415 return offset;
8416}
8417
8418/**
8419 * @brief Dissect a CompleteEnumeratedType or MinimalEnumeratedType within a TypeObjectV2
8420 *
8421 * @details This function handles the dissection of an ENUM type from a TypeObjectV2
8422 * following the OMG XTypes 1.3 specification. It processes enum_flags,
8423 * header information including bit_bound (and type name when in COMPLETE mode),
8424 * and enumeration literals with their values, flags, and names/name_hashes.
8425 *
8426 * @param tree Protocol tree to add the enum elements to
8427 * @param tvb The tv buffer containing packet data
8428 * @param offset The current offset in the tvb
8429 * @param typeobject_discriminator The discriminator (EK_COMPLETE or EK_MINIMAL)
8430 * @return The new offset after parsing the enum type
8431 */
8432static int rtps_util_add_type_object_v2_enum(proto_tree *tree, tvbuff_t *tvb,
8433 int offset, uint8_t typeobject_discriminator)
8434{
8435 /* Create Enumeration subtree */
8436 proto_item* enum_ti;
8437 proto_tree* enum_tree = proto_tree_add_subtree(tree, tvb, offset, -1,
8438 ett_rtps_type_object_v2_enum, &enum_ti, "Enum Type");
8439 const int initial_offset = offset;
8440
8441 /* EnumTypeFlag enum_flags */
8442 proto_tree_add_bitmask_value(enum_tree, tvb, offset,
8443 hf_rtps_type_object_v2_type_flags, ett_rtps_flags,
8444 TYPE_FLAGS_V2, ENC_LITTLE_ENDIAN0x80000000);
8445 offset += 2;
8446
8447 /* Delimited header for CompleteEnumeratedHeader/MinimalEnumeratedHeader */
8448 offset = rtps_util_add_xcdr2_delimited_header(enum_tree, tvb, offset);
8449
8450 /* CompleteEnumeratedHeader/MinimalEnumeratedHeader header */
8451 proto_item* enum_header_ti;
8452 proto_tree* enum_header_tree = proto_tree_add_subtree(enum_tree, tvb,
8453 offset, -1, ett_rtps_type_object_v2_enum_header, &enum_header_ti,
8454 "Enum Header");
8455 const int initial_enum_header_offset = offset;
8456
8457 /* CommonEnumeratedHeader common */
8458 /* BitBound bit_bound */
8459 proto_tree_add_item(enum_header_tree,
8460 hf_rtps_type_object_v2_enum_bit_bound, tvb, offset,
8461 2, ENC_LITTLE_ENDIAN0x80000000);
8462 offset += 2;
8463
8464 if (typeobject_discriminator == EK_COMPLETE(0xF2))
8465 {
8466 /* CompleteTypeDetail detail */
8467 offset = rtps_util_add_complete_type_detail(enum_header_tree, tvb, offset);
8468 }
8469 proto_item_set_len(enum_header_ti, offset - initial_enum_header_offset);
8470
8471 /* Delimited header for CompleteEnumeratedLiteralSeq/MinimalEnumeratedLiteralSeq */
8472 offset = rtps_util_add_xcdr2_delimited_header(enum_tree, tvb, offset);
8473
8474 /* CompleteEnumeratedLiteralSeq/MinimalEnumeratedLiteralSeq literal_seq */
8475 const uint32_t literal_seq_len = tvb_get_uint32(tvb, offset, ENC_LITTLE_ENDIAN0x80000000);
8476 offset += 4;
8477 if (literal_seq_len > 0)
8478 {
8479 proto_item* literal_seq_ti;
8480 proto_tree* literal_seq_tree = proto_tree_add_subtree_format(enum_tree, tvb,
8481 offset, -1, ett_rtps_type_deps_seq, &literal_seq_ti,
8482 "Enum Literals [%u]", literal_seq_len);
8483 const int initial_literal_seq_offset = offset;
8484
8485 /* Process each literal in the sequence */
8486 for (uint32_t i = 0; i < literal_seq_len; i++)
8487 {
8488 proto_item* literal_ti;
8489 proto_tree* literal_tree = proto_tree_add_subtree_format(literal_seq_tree,
8490 tvb, offset, 0, ett_rtps_type_object_v2_enum_literal, &literal_ti,
8491 "Enum Literal [%u]", i);
8492 const int initial_literal_offset = offset;
8493
8494 /* CompleteEnumeratedLiteral/MinimalEnumeratedLiteral */
8495 /* Delimited header for CompleteEnumeratedLiteral/MinimalEnumeratedLiteral */
8496 offset = rtps_util_add_xcdr2_delimited_header(literal_tree, tvb, offset);
8497
8498 /* Delimited header for CommonEnumeratedLiteral */
8499 offset = rtps_util_add_xcdr2_delimited_header(literal_tree, tvb, offset);
8500
8501 /* CommonEnumeratedLiteral common */
8502 /* long value */
8503 proto_tree_add_item(literal_tree, hf_rtps_type_object_v2_enum_literal_value,
8504 tvb, offset, 4, ENC_LITTLE_ENDIAN0x80000000);
8505 offset += 4;
8506
8507 /* EnumeratedLiteralFlag flags */
8508 proto_tree_add_bitmask(literal_tree, tvb, offset,
8509 hf_rtps_type_object_v2_member_flags, ett_rtps_flags,
8510 MEMBER_FLAGS_V2, ENC_LITTLE_ENDIAN0x80000000);
8511 offset += 2;
8512
8513 /* member detail */
8514 offset = rtps_util_add_member_detail(literal_tree, tvb, offset, typeobject_discriminator);
8515
8516 proto_item_set_len(literal_ti, offset - initial_literal_offset);
8517 }
8518 proto_item_set_len(literal_seq_ti, offset - initial_literal_seq_offset);
8519 }
8520
8521 proto_item_set_len(enum_ti, offset - initial_offset);
8522 return offset;
8523}
8524
8525
8526
8527/**
8528 * @brief Dissect a TypeObjectV2 structure
8529 *
8530 * @details This function handles the dissection of a TypeObjectV2 structure following
8531 * the OMG XTypes 1.3 specification. It reads the equivalence kind discriminator
8532 * (COMPLETE or MINIMAL) and the type kind discriminator, then dispatches to the
8533 * appropriate type-specific handler based on the type kind (alias, structure,
8534 * union, sequence, array, enum, etc.).
8535 *
8536 * @param tree Protocol tree to add the TypeObjectV2 elements to
8537 * @param pinfo Packet info for the current packet
8538 * @param tvb The tv buffer containing packet data
8539 * @param offset The current offset in the tvb
8540 * @param label Pointer to a text label describing the Type
8541 * @return The new offset after parsing the TypeObjectV2
8542 */
8543static int rtps_util_add_type_object_v2(proto_tree *tree, packet_info *pinfo,
8544 tvbuff_t *tvb, int offset, const char** label)
8545{
8546 const int initial_offset = offset;
8547
8548 /* Create subtree for TypeObjectV2 */
8549 proto_item* ti = proto_tree_add_item(tree, hf_rtps_type_object_v2, tvb,
8550 offset, 0, ENC_NA0x00000000);
8551 proto_tree* to_tree = proto_item_add_subtree(ti, ett_rtps_type_object_v2);
8552
8553 /* Read the discriminator (first octet) */
8554 uint8_t typeobject_discriminator = tvb_get_uint8(tvb, offset);
8555 proto_tree_add_item(to_tree, hf_rtps_type_id_discriminator, tvb, offset, 1,
8556 ENC_NA0x00000000);
8557 offset++;
8558
8559 const uint8_t typekind_discriminator = tvb_get_uint8(tvb, offset);
8560 if (label != NULL((void*)0))
8561 {
8562 *label = "Unknown";
8563 for (size_t j = 0; j < array_length(type_id_discriminator_vals)(sizeof (type_id_discriminator_vals) / sizeof (type_id_discriminator_vals
)[0])
; j++)
8564 {
8565 if (type_id_discriminator_vals[j].value == typekind_discriminator)
8566 {
8567 *label = type_id_discriminator_vals[j].strptr;
8568 break;
8569 }
8570 }
8571 }
8572
8573 proto_tree_add_item(to_tree, hf_rtps_type_kind_discriminator, tvb, offset, 1,
8574 ENC_NA0x00000000);
8575 offset++;
8576
8577 /* Handle the different TypeIdentifier cases based on discriminator */
8578 switch (typekind_discriminator)
8579 {
8580 case TK_ALIAS(0x30):
8581 offset = rtps_util_add_type_object_v2_alias(to_tree, pinfo, tvb, offset,
8582 typeobject_discriminator);
8583 break;
8584 case TK_STRUCTURE(0x51):
8585 offset = rtps_util_add_type_object_v2_struct(
8586 to_tree, pinfo, tvb, offset, typeobject_discriminator);
8587 break;
8588 case TK_UNION(0x52):
8589 offset = rtps_util_add_type_object_v2_union(to_tree, pinfo, tvb, offset,
8590 typeobject_discriminator);
8591 break;
8592 case TK_ENUM(0x40):
8593 offset = rtps_util_add_type_object_v2_enum(to_tree, tvb, offset,
8594 typeobject_discriminator);
8595 break;
8596 /* Extended type definition (future use) */
8597 default:
8598 /* ExtendedTypeDefn - currently just a placeholder */
8599 proto_tree_add_item(to_tree, hf_rtps_type_extended, tvb, offset,
8600 0, ENC_NA0x00000000);
8601 break;
8602 }
8603
8604 proto_item_set_len(ti, offset - initial_offset);
8605 return offset;
8606}
8607
8608/**
8609 * @brief Dissect a TypeIdentifierWithSize structure
8610 *
8611 * @details This function handles the dissection of a TypeIdentifierWithSize structure
8612 * following the OMG XTypes 1.3 specification. It processes the type_id field
8613 * by calling rtps_util_add_type_id_v2(), and then reads the
8614 * typeobject_serialized_size field which indicates the serialized size of
8615 * the associated TypeObject.
8616 *
8617 * @param tree Protocol tree to add the TypeIdentifierWithSize elements to
8618 * @param pinfo Packet info for the current packet
8619 * @param tvb The tv buffer containing packet data
8620 * @param offset The current offset in the tvb
8621 * @return The new offset after parsing the TypeIdentifierWithSize
8622 */
8623static int rtps_util_add_type_id_w_size(proto_tree* tree, packet_info* pinfo,
8624 tvbuff_t* tvb, int offset)
8625{
8626 const int initial_offset = offset;
8627
8628 /* TypeIdentifier type_id */
8629 offset = rtps_util_add_type_id_v2(tree, pinfo, tvb, offset, false0);
8630
8631 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
8632
8633 /* unsigned long typeobject_serialized_size */
8634 proto_tree_add_item(tree, hf_rtps_type_object_serialized_size, tvb, offset, 4,
8635 ENC_LITTLE_ENDIAN0x80000000);
8636 offset += 4;
8637
8638 proto_item_set_len(tree, offset - initial_offset);
8639 return offset;
8640}
8641
8642/**
8643 * @brief Dissect a TypeIdentifierWithDependencies structure
8644 *
8645 * This function handles the dissection of a TypeIdentifierWithDependencies structure
8646 * following the OMG XTypes 1.3 specification. It processes the typeid_with_size field
8647 * by calling rtps_util_add_type_id_w_size(), followed by a dependent_typeid_count,
8648 * and a sequence of TypeIdentifierWithSize objects representing dependent type IDs.
8649 *
8650 * @param tree Protocol tree to add the TypeIdentifierWithDependencies elements to
8651 * @param pinfo Packet info for the current packet
8652 * @param tvb The tv buffer containing packet data
8653 * @param offset The current offset in the tvb
8654 * @return The new offset after parsing the TypeIdentifierWithDependencies
8655 */
8656static int rtps_util_add_type_id_w_dependencies(proto_tree* tree,
8657 packet_info* pinfo,
8658 tvbuff_t* tvb, int offset)
8659{
8660 proto_item* ti;
8661 proto_tree* typeid_deps_tree = proto_tree_add_subtree(tree, tvb, offset, -1,
8662 ett_rtps_type_id_w_deps, &ti, "Type Id With Dependencies");
8663 const int initial_offset = offset;
8664
8665 /* TypeIdentifierWithSize typeid_with_size */
8666 proto_tree* typeid_size_tree = proto_tree_add_subtree(typeid_deps_tree, tvb,
8667 offset, -1, ett_rtps_type_id_w_size, NULL((void*)0), "Type Id With Size");
8668
8669 offset = rtps_util_add_type_id_w_size(typeid_size_tree, pinfo, tvb, offset);
8670
8671 /* long dependent_typeid_count */
8672 proto_tree_add_item(typeid_deps_tree, hf_rtps_type_deps_count, tvb, offset, 4,
8673 ENC_LITTLE_ENDIAN0x80000000);
8674 offset += 4;
8675
8676 /* long dependent_typeids sequence length */
8677
8678 /* Delimited header */
8679 offset = rtps_util_add_xcdr2_delimited_header(typeid_deps_tree, tvb, offset);
8680
8681 const uint32_t dependent_typeid_seq_len = tvb_get_uint32(tvb, offset,
8682 ENC_LITTLE_ENDIAN0x80000000);
8683 offset += 4;
8684
8685 /* sequence<TypeIdentifierWithSize> dependent_typeids */
8686 if (dependent_typeid_seq_len > 0)
8687 {
8688 proto_tree* deps_seq_tree = proto_tree_add_subtree_format(
8689 typeid_deps_tree, tvb, offset, -1, ett_rtps_type_deps_seq, NULL((void*)0),
8690 "Dependent Type IDs [%u]", dependent_typeid_seq_len);
8691
8692 for (uint32_t i = 0; i < dependent_typeid_seq_len; i++)
8693 {
8694 proto_item* dep_item;
8695 proto_tree* dep_tree = proto_tree_add_subtree_format(deps_seq_tree, tvb,
8696 offset, -1, ett_rtps_type_dep, &dep_item, "Dependent Type ID [%u]", i);
8697 const int initial_dep_offset = offset;
8698 offset = rtps_util_add_type_id_w_size(dep_tree, pinfo, tvb, offset);
8699 proto_item_set_len(dep_item, offset - initial_dep_offset);
8700 }
8701 }
8702
8703 proto_item_set_len(ti, offset - initial_offset);
8704 return offset;
8705}
8706
8707/**
8708 * @brief Dissect a TypeIdentifierWithDependencies structure with XCDR2 headers
8709 *
8710 * This function handles the dissection of a TypeIdentifierWithDependencies structure
8711 * with XCDR2 serialization headers following the OMG XTypes 1.3 specification.
8712 * It processes the XCDR2 enhanced mutable header, followed by an XCDR2 delimited
8713 * header, and then calls rtps_util_add_type_id_w_dependencies() to process the
8714 * TypeIdentifierWithDependencies data itself.
8715 *
8716 * @param tree Protocol tree to add the delimited TypeIdentifierWithDependencies elements to
8717 * @param pinfo Packet info for the current packet
8718 * @param tvb The tv buffer containing packet data
8719 * @param offset The current offset in the tvb
8720 * @return The new offset after parsing the delimited TypeIdentifierWithDependencies
8721 */
8722static int rtps_util_add_delimited_type_id_w_dependencies(proto_tree* tree,
8723 packet_info* pinfo, tvbuff_t* tvb, int offset)
8724{
8725 const int initial_offset = offset;
8726
8727 /* Enhanced Mutable Header */
8728 offset = rtps_util_add_xcdr2_enhanced_mutable_header(tree, tvb, offset);
8729
8730 /* Delimited header */
8731 offset = rtps_util_add_xcdr2_delimited_header(tree, tvb, offset);
8732
8733 /* Process the TypeIdentifierWithDependencies */
8734 offset = rtps_util_add_type_id_w_dependencies(tree, pinfo, tvb, offset);
8735
8736 proto_item_set_len(tree, offset - initial_offset);
8737 return offset;
8738}
8739
8740/**
8741 * @brief Dissect a TypeInformation structure
8742 *
8743 * @details This function handles the dissection of a TypeInformation structure
8744 * following the OMG XTypes 1.3 specification. It processes a full TypeInformation
8745 * structure with both minimal and complete TypeIdentifierWithDependencies fields.
8746 * TypeInformation appears in the builtin DDS topics PublicationBuiltinTopicData
8747 * and SubscriptionBuiltinTopicData.
8748 *
8749 * @param tree Protocol tree to add the TypeInformation elements to
8750 * @param pinfo Packet info for the current packet
8751 * @param tvb The tv buffer containing packet data
8752 * @param offset The current offset in the tvb
8753 */
8754static void rtps_util_add_typeinformation(proto_tree* tree, packet_info* pinfo,
8755 tvbuff_t* tvb, int offset)
8756{
8757 /*
8758 * IDL
8759 * @extensibility(MUTABLE) @nested
8760 * struct TypeInformation {
8761 * @id(0x1001) TypeIdentifierWithDependencies minimal;
8762 * @id(0x1002) TypeIdentifierWithDependencies complete;
8763 * };
8764 */
8765
8766
8767 proto_item* typeinfo_item;
8768 proto_tree* typeinfo_tree = proto_tree_add_subtree(tree, tvb, offset,
8769 -1, ett_rtps_type_information, &typeinfo_item, "Type Information");
8770 const int initial_offset = offset;
8771
8772 /* Delimited header */
8773 offset = rtps_util_add_xcdr2_delimited_header(typeinfo_tree, tvb, offset);
8774
8775 /* TypeInformation has two fields: minimal and complete */
8776
8777 /* Minimal TypeIdentifierWithDependencies */
8778 proto_tree* minimal_tree = proto_tree_add_subtree(typeinfo_tree, tvb, offset,
8779 -1, ett_rtps_type_information_minimal, NULL((void*)0), "Minimal");
8780
8781 offset = rtps_util_add_delimited_type_id_w_dependencies(minimal_tree, pinfo,
8782 tvb, offset);
8783
8784 /* Complete TypeIdentifierWithDependencies */
8785 proto_tree* complete_tree = proto_tree_add_subtree(typeinfo_tree, tvb, offset,
8786 -1, ett_rtps_type_information_complete, NULL((void*)0), "Complete");
8787
8788 offset = rtps_util_add_delimited_type_id_w_dependencies(complete_tree, pinfo,
8789 tvb, offset);
8790
8791 proto_item_set_len(typeinfo_item, offset - initial_offset);
8792}
8793
8794/**
8795 * @brief Dissect the GET_DEPENDENCIES reply data
8796 *
8797 * This function handles the dissection of the GET_DEPENDENCIES reply data
8798 * following the OMG XTypes 1.3 specification. It processes a structure containing
8799 * a return code, followed by a sequence of TypeIdentifierWithSize objects
8800 * representing dependent type IDs, and a continuation point for future use.
8801 * Each field is preceded by XCDR2 delimited headers for proper alignment and parsing.
8802 *
8803 * @param tree Protocol tree to add the GET_DEPENDENCIES reply data elements to
8804 * @param pinfo Packet info for the current packet
8805 * @param tvb The tv buffer containing packet data
8806 * @param offset The current offset in the tvb
8807 * @return The new offset after parsing the GET_DEPENDENCIES reply data
8808 */
8809static int rtps_util_dissect_get_type_dependencies_out(proto_tree* tree,
8810 packet_info* pinfo, tvbuff_t* tvb, int offset)
8811{
8812 /* Delimited header */
8813 offset = rtps_util_add_xcdr2_delimited_header(tree, tvb, offset);
8814
8815 /* reply header - discriminator - always 0 - DDS_RETCODE_OK*/
8816 uint32_t type_lookup_result_discriminator = tvb_get_uint32(tvb, offset,
8817 ENC_LITTLE_ENDIAN0x80000000);
8818 proto_tree_add_uint(tree, hf_rtps_type_deps_result, tvb, offset, 4,
8819 type_lookup_result_discriminator);
8820 offset += 4;
8821
8822 /* (mutable) TypeLookup_getTypeDependencies_Out */
8823
8824 /* Delimited header */
8825 offset = rtps_util_add_xcdr2_delimited_header(tree, tvb, offset);
8826
8827 /* Enhanced Mutable Header for dependent_typeids */
8828 offset = rtps_util_add_xcdr2_enhanced_mutable_header(
8829 tree, tvb, offset);
8830
8831 uint32_t dependent_typeids_seq_len = tvb_get_uint32(tvb, offset,
8832 ENC_LITTLE_ENDIAN0x80000000);
8833 offset += 4;
8834
8835 /* sequence<TypeIdentifierWithSize> dependent_typeids */
8836 if (dependent_typeids_seq_len > 0)
8837 {
8838 proto_item* dep_seq_item;
8839 proto_tree* deps_seq_tree = proto_tree_add_subtree_format(tree, tvb, offset,
8840 -1, ett_rtps_type_lookup_deps_seq, &dep_seq_item, "Dependent Type IDs [%u]",
8841 dependent_typeids_seq_len);
8842 const int initial_sequence_offset = offset;
8843
8844 for (uint32_t i = 0; i < dependent_typeids_seq_len; i++)
8845 {
8846 proto_item* dep_item;
8847 proto_tree* dep_tree = proto_tree_add_subtree_format(deps_seq_tree, tvb,
8848 offset, -1, ett_rtps_type_dep, &dep_item, "Dependent Type ID [%d]", i);
8849 const int initial_dep_offset = offset;
8850
8851 offset = rtps_util_add_xcdr2_delimited_header(dep_tree, tvb, offset);
8852
8853 offset = rtps_util_add_type_id_w_size(dep_tree, pinfo, tvb, offset);
8854 proto_item_set_len(dep_item, offset - initial_dep_offset);
8855 }
8856 proto_item_set_len(dep_seq_item, offset - initial_sequence_offset);
8857 }
8858
8859 /* Enhanced Mutable Header for continuation_point */
8860 offset = rtps_util_add_xcdr2_enhanced_mutable_header(tree, tvb, offset);
8861 return offset;
8862}
8863
8864/**
8865 * @brief Dissect a TypeLookup Reply structure for GET_TYPES
8866 *
8867 * @details This function handles the dissection of a TypeLookup Reply structure
8868 * specifically for the GET_TYPES operation. It processes the reply data containing
8869 * a sequence of TypeIdentifierTypeObjectPair objects that map type identifiers to
8870 * their corresponding type objects, as well as mappings from complete to minimal types.
8871 * Each section is preceded by XCDR2 delimited or enhanced mutable headers for proper
8872 * alignment and parsing.
8873 *
8874 * @param tree Protocol tree to add the GET_TYPES reply elements to
8875 * @param pinfo Packet info for the current packet
8876 * @param tvb The tv buffer containing packet data
8877 * @param offset The current offset in the tvb
8878 * @return The new offset after parsing the GET_TYPES reply
8879 */
8880static int rtps_util_dissect_get_types_out(proto_tree* tree, packet_info* pinfo,
8881 tvbuff_t* tvb, int offset)
8882{
8883 /* Delimited header */
8884 offset = rtps_util_add_xcdr2_delimited_header(tree, tvb, offset);
8885
8886 /* reply header - discriminator - always 0 */
8887 const uint32_t type_lookup_result_discriminator = tvb_get_uint32(tvb, offset,
8888 ENC_LITTLE_ENDIAN0x80000000);
8889 proto_tree_add_uint(tree, hf_rtps_type_deps_result, tvb, offset, 4,
8890 type_lookup_result_discriminator);
8891 offset += 4;
8892
8893 /* (mutable) TypeLookup_getTypes_Out result */
8894
8895 /* Delimited header */
8896 offset = rtps_util_add_xcdr2_delimited_header(tree, tvb, offset);
8897
8898 /* Enhanced Mutable Header for types */
8899 offset = rtps_util_add_xcdr2_enhanced_mutable_header(tree, tvb, offset);
8900
8901 /* sequence<TypeIdentifierTypeObjectPair> types */
8902 const uint32_t ti_to_pair_seq_len = tvb_get_uint32(tvb, offset,
8903 ENC_LITTLE_ENDIAN0x80000000);
8904 offset += 4;
8905
8906 if (ti_to_pair_seq_len == 0)
8907 {
8908 /* Enhanced Mutable Header for continuation_point */
8909 offset = rtps_util_add_xcdr2_enhanced_mutable_header(tree, tvb, offset);
8910 return offset;
8911 }
8912
8913 proto_item* deps_seq_item;
8914 proto_tree* deps_seq_tree = proto_tree_add_subtree_format(
8915 tree, tvb, offset, -1, ett_rtps_type_deps_seq,
8916 &deps_seq_item, "Dependent Type IDs [%u]", ti_to_pair_seq_len);
8917 const int initial_deps_seq_offset = offset;
8918
8919 for (uint32_t i = 0; i < ti_to_pair_seq_len; i++)
8920 {
8921 proto_item* dep_item;
8922 proto_tree* dep_tree = proto_tree_add_subtree_format(deps_seq_tree, tvb,
8923 offset, -1, ett_rtps_type_dep, &dep_item, "Dependent Type ID [%u]", i);
8924 const int initial_dep_offset = offset;
8925
8926 /* TypeIdentifier */
8927 offset = rtps_util_add_type_id_v2(dep_tree, pinfo, tvb, offset, false0);
8928
8929 /* Delimited header */
8930 offset = rtps_util_add_xcdr2_delimited_header(dep_tree, tvb, offset);
8931
8932 /* (appendable) TypeObject */
8933 const char* label = "Unknown";
8934 offset = rtps_util_add_type_object_v2(dep_tree, pinfo, tvb, offset, &label);
8935 proto_item_set_text(dep_item, "Dependent Type ID [%d] (%s)", i, label);
8936
8937 proto_item_set_len(dep_item, offset - initial_dep_offset);
8938 }
8939
8940 proto_item_set_len(deps_seq_item, offset - initial_deps_seq_offset);
8941
8942 /* Enhanced Mutable Header for complete_to_minimal */
8943 offset = rtps_util_add_xcdr2_enhanced_mutable_header(tree, tvb, offset);
8944
8945 const uint32_t complete_minimal_seq_len = tvb_get_uint32(tvb, offset,
8946 ENC_LITTLE_ENDIAN0x80000000);
8947 offset += 4;
8948
8949 /* sequence<TypeIdentifierPair> complete_to_minimal */
8950 if (complete_minimal_seq_len > 0)
8951 {
8952 proto_tree* complete_to_minimal_seq_tree = proto_tree_add_subtree_format(
8953 tree, tvb, offset, -1, ett_rtps_type_deps_seq, NULL((void*)0),
8954 "Complete to Minimal Type IDs [%u]", complete_minimal_seq_len);
8955
8956 /* TypeIdentifierPair */
8957 for (uint32_t i = 0; i < complete_minimal_seq_len; i++)
8958 {
8959 proto_tree* dep_tree = proto_tree_add_subtree_format(
8960 complete_to_minimal_seq_tree, tvb, offset, -1, ett_rtps_type_dep, NULL((void*)0),
8961 "Mapping %d", i);
8962 offset = rtps_util_add_type_id_v2(dep_tree, pinfo, tvb, offset, false0);
8963 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
8964 offset += 4;
8965 offset = rtps_util_add_type_id_v2(dep_tree, pinfo, tvb, offset, false0);
8966 }
8967 }
8968
8969 return offset;
8970}
8971
8972/**
8973 * @brief Add a type lookup request ID to the protocol tree
8974 *
8975 * @details This function adds the type lookup request ID to the protocol tree.
8976 * The request ID consists of a GUID (16 bytes) followed by a sequence number
8977 * (8 bytes).
8978 *
8979 * @param tree Protocol tree to add the request ID elements to
8980 * @param tvb The tv buffer containing packet data
8981 * @param offset The current offset in the tvb
8982 * @return The new offset after parsing the request ID
8983 */
8984static int rtps_util_add_type_lookup_request_id(proto_tree* tree, packet_info* pinfo, tvbuff_t* tvb,
8985 int offset)
8986{
8987 /*
8988 * 0...2...........7...............15.............23...............31
8989 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
8990 * | host id |
8991 * +---------------+---------------+---------------+---------------+
8992 * | app id |
8993 * +---------------+---------------+---------------+---------------+
8994 * | instance id |
8995 * +---------------+---------------+---------------+---------------+
8996 * | entity id |
8997 * +---------------+---------------+---------------+---------------+
8998 * | sequence number |
8999 * | |
9000 * +---------------+---------------+---------------+---------------+
9001 */
9002 /* request id - guid */
9003 rtps_util_add_guid_prefix_v2(tree, tvb, offset,
9004 hf_rtps_sm_guid_prefix, hf_rtps_sm_host_id, hf_rtps_sm_app_id,
9005 hf_rtps_sm_instance_id, 0);
9006 offset += 12;
9007 rtps_util_add_entity_id(tree, pinfo, tvb, offset,
9008 hf_rtps_sm_entity_id, hf_rtps_sm_entity_id_key, hf_rtps_sm_entity_id_kind,
9009 ett_rtps_entity, "TypeLookup Writer", NULL((void*)0));
9010 offset += 4;
9011
9012 /* request id - sequence number */
9013 rtps_util_add_seq_number(tree, tvb, offset, ENC_LITTLE_ENDIAN0x80000000,
9014 "sequenceNumber");
9015 offset += 8;
9016
9017 return offset;
9018}
9019
9020/**
9021 * @brief Dissect a TypeLookup Reply structure
9022 *
9023 * @details This function handles the dissection of a TypeLookup Reply structure
9024 * following the OMG XTypes 1.3 specification. It processes a complete TypeLookup reply
9025 * structure that consists of a reply header containing a related request ID and
9026 * remote exception code, followed by reply data. Depending on the reply type,
9027 * the data contains either a sequence of TypeIdentifierTypeObjectPair objects with
9028 * mappings from complete to minimal types (for GET_TYPES), or a sequence of
9029 * TypeIdentifierWithSize objects with a continuation point (for GET_DEPENDENCIES).
9030 * Each section is preceded by XCDR2 delimited headers for proper alignment and parsing.
9031 *
9032 * @param tree Protocol tree to add the TypeLookup Reply elements to
9033 * @param pinfo Packet info for the current packet
9034 * @param tvb The tv buffer containing packet data
9035 * @param offset The current offset in the tvb
9036 */
9037static void rtps_util_dissect_type_lookup_reply(proto_tree* tree,
9038 packet_info* pinfo, tvbuff_t* tvb, int offset)
9039{
9040 proto_item* type_lookup_reply_item;
9041 proto_tree* type_lookup_reply_tree = proto_tree_add_subtree(tree, tvb,
9042 offset, -1, ett_rtps_type_lookup_reply,
9043 &type_lookup_reply_item, "Type Lookup Reply");
9044 const int initial_offset = offset;
9045
9046 /* reply header */
9047 proto_item* type_lookup_reply_header_item;
9048 proto_tree* type_lookup_reply_header_tree = proto_tree_add_subtree(
9049 type_lookup_reply_tree, tvb, offset, -1, ett_rtps_type_lookup_reply_header,
9050 &type_lookup_reply_header_item, "Reply Header");
9051
9052 /* reply header - request id */
9053 proto_item* type_lookup_request_id_item;
9054 proto_tree* type_lookup_request_id_tree = proto_tree_add_subtree(
9055 type_lookup_reply_header_tree, tvb, offset, -1, ett_rtps_type_lookup_request_id,
9056 &type_lookup_request_id_item, "Related Request ID");
9057 offset = rtps_util_add_type_lookup_request_id(type_lookup_request_id_tree, pinfo, tvb, offset);
9058 proto_item_set_len(type_lookup_request_id_item, offset - initial_offset);
9059
9060 /* reply header - remote exception code */
9061 proto_tree_add_item(type_lookup_reply_header_tree,
9062 hf_rtps_remote_exception_code, tvb, offset, 4, ENC_LITTLE_ENDIAN0x80000000);
9063 offset += 4;
9064
9065 /* end of reply header */
9066 proto_item_set_len(type_lookup_reply_header_item, offset - initial_offset);
9067
9068 /* reply data */
9069 proto_item* type_lookup_reply_data_item;
9070 proto_tree* type_lookup_reply_data_tree = proto_tree_add_subtree(
9071 type_lookup_reply_tree, tvb, offset, -1, ett_rtps_type_lookup_reply_data,
9072 &type_lookup_reply_data_item, "Reply Data");
9073 const int initial_reply_data_offset = offset;
9074
9075 /* Delimited header */
9076 offset = rtps_util_add_xcdr2_delimited_header(type_lookup_reply_data_tree, tvb, offset);
9077
9078 /* reply header - reply type GET_TYPES or GET_TYPE_DEPENDENCIES */
9079 const uint32_t reply_discriminator = tvb_get_uint32(tvb, offset, ENC_LITTLE_ENDIAN0x80000000);
9080 proto_tree_add_item(type_lookup_reply_data_tree,
9081 hf_rtps_type_lookup_discriminator, tvb, offset, 4, ENC_LITTLE_ENDIAN0x80000000);
9082 offset += 4;
9083
9084 if (reply_discriminator == GET_TYPE_DEPENDENCIES(0x05aafb31))
9085 {
9086 /* rtps_util_dissect_get_type_dependencies_out() would go here */
9087 proto_item_set_text(type_lookup_reply_data_item,
9088 "TypeLookup Reply Data: GET_DEPENDENCIES");
9089 offset = rtps_util_dissect_get_type_dependencies_out(
9090 type_lookup_reply_data_tree, pinfo, tvb, offset);
9091 }
9092 else
9093 {
9094 /* GET_TYPES */
9095 proto_item_set_text(type_lookup_reply_data_item,
9096 "TypeLookup Reply Data: GET_TYPES");
9097 offset = rtps_util_dissect_get_types_out(type_lookup_reply_data_tree, pinfo,
9098 tvb, offset);
9099 }
9100
9101 proto_item_set_len(type_lookup_reply_data_item,
9102 offset - initial_reply_data_offset);
9103 proto_item_set_len(type_lookup_reply_item, offset - initial_offset);
9104}
9105
9106/**
9107 * @brief Dissect a TypeLookup Request structure
9108 *
9109 * @details This function handles the dissection of a TypeLookup Request structure
9110 * following the OMG XTypes 1.3 * specification. It processes the request header
9111 * that contains a GUID, sequence number, and instance name, followed by request
9112 * data that varies based on the requested operation type (GET_TYPES or
9113 * GET_DEPENDENCIES). For GET_TYPES, it dissects a sequence of TypeIdentifiers
9114 * to look up; for GET_DEPENDENCIES, it additionally processes a continuation
9115 * point after the sequence of TypeIdentifiers. Each section is preceded by XCDR2
9116 * delimited headers for proper alignment and parsing.
9117 *
9118 * @param tree Protocol tree to add the TypeLookup Request elements to
9119 * @param pinfo Packet info for the current packet
9120 * @param tvb The tv buffer containing packet data
9121 * @param offset The current offset in the tvb
9122 */
9123static void rtps_util_dissect_type_lookup_request(proto_tree* tree,
9124 packet_info* pinfo, tvbuff_t* tvb, int offset)
9125{
9126 proto_item* type_lookup_request_item;
9127 proto_tree* type_lookup_request_tree = proto_tree_add_subtree(tree,
9128 tvb, offset, -1, ett_rtps_type_lookup_request, &type_lookup_request_item,
9129 "Type Lookup Request");
9130 const int initial_offset = offset;
9131
9132 /* request header */
9133 proto_item* type_lookup_request_header_item;
9134 proto_tree* type_lookup_request_header_tree = proto_tree_add_subtree(
9135 type_lookup_request_tree, tvb, offset, -1,
9136 ett_rtps_type_lookup_request_header,
9137 &type_lookup_request_header_item, "Request Header");
9138
9139 /* request header - request id */
9140 proto_item* type_lookup_request_id_item;
9141 proto_tree* type_lookup_request_id_tree = proto_tree_add_subtree(
9142 type_lookup_request_header_tree, tvb, offset, -1,
9143 ett_rtps_type_lookup_request_id, &type_lookup_request_id_item,
9144 "Request ID");
9145 offset = rtps_util_add_type_lookup_request_id(type_lookup_request_id_tree, pinfo, tvb, offset);
9146 proto_item_set_len(type_lookup_request_id_item, offset - initial_offset);
9147
9148 /* request header - instance name */
9149 offset = rtps_util_add_string_no_align(type_lookup_request_header_tree, tvb,
9150 offset, hf_rtps_instance_name, ENC_LITTLE_ENDIAN0x80000000);
9151 proto_item_set_len(type_lookup_request_header_item, offset - initial_offset);
9152
9153 /* TypeLookup request data */
9154 proto_item* type_lookup_request_data_item;
9155 proto_tree* type_lookup_request_data_tree = proto_tree_add_subtree(
9156 type_lookup_request_tree, tvb, offset, -1,
9157 ett_rtps_type_lookup_request_data, &type_lookup_request_data_item,
9158 "Request Data");
9159 const int initial_data_offset = offset;
9160
9161 /* Delimited header */
9162 offset = rtps_util_add_xcdr2_delimited_header(type_lookup_request_data_tree,
9163 tvb, offset);
9164
9165 /* request_type discriminator - GET_TYPES or GET_TYPE_DEPENDENCIES */
9166 const uint32_t request_type_discriminator = tvb_get_uint32(tvb, offset,
9167 ENC_LITTLE_ENDIAN0x80000000);
9168 proto_tree_add_item(type_lookup_request_data_tree,
9169 hf_rtps_type_lookup_discriminator, tvb, offset, 4, ENC_LITTLE_ENDIAN0x80000000);
9170 offset += 4;
9171
9172 /*
9173 * (mutable) TypeLookup_getTypes_In or TypeLookup_getDependencies_In
9174 * both start with sequence<TypeIdentifier> type_ids */
9175
9176 /* Delimited header */
9177 offset = rtps_util_add_xcdr2_delimited_header(type_lookup_request_data_tree,
9178 tvb, offset);
9179
9180 /* Enhanced Mutable Header for type_ids */
9181 offset = rtps_util_add_xcdr2_enhanced_mutable_header(
9182 type_lookup_request_data_tree, tvb, offset);
9183
9184 /* long type_ids sequence length */
9185 const uint32_t requested_typeid_seq_len = tvb_get_uint32(tvb, offset,
9186 ENC_LITTLE_ENDIAN0x80000000);
9187 offset += 4;
9188
9189 /* sequence<TypeIdentifier> type_ids */
9190 if (requested_typeid_seq_len > 0) {
9191 proto_item* req_seq_item;
9192 proto_tree* req_seq_tree = proto_tree_add_subtree_format(
9193 type_lookup_request_data_tree, tvb, offset, -1,
9194 ett_rtps_type_lookup_deps_seq, &req_seq_item, "Requested Type IDs [%u]",
9195 requested_typeid_seq_len);
9196 const int initial_req_seq_offset = offset;
9197
9198 for (uint32_t i = 0; i < requested_typeid_seq_len; i++)
9199 {
9200 proto_item* req_item;
9201 proto_tree* req_tree = proto_tree_add_subtree_format(req_seq_tree, tvb,
9202 offset, -1, ett_rtps_type_dep, &req_item, "Requested Type ID [%u]", i);
9203 const int initial_req_offset = offset;
9204 offset = rtps_util_add_type_id_v2(req_tree, pinfo, tvb, offset, false0);
9205 proto_item_set_len(req_item, offset - initial_req_offset);
9206 }
9207
9208 proto_item_set_len(req_seq_item, offset - initial_req_seq_offset);
9209 }
9210
9211 /* Is this a GET_TYPE_DEPENDENCIES request? */
9212 if (request_type_discriminator == GET_TYPE_DEPENDENCIES(0x05aafb31))
9213 {
9214 proto_item_set_text(type_lookup_request_data_item,
9215 "TypeLookup Request Data: GET_DEPENDENCIES");
9216 /*
9217 * GET_TYPE_DEPENDENCIES has a continuation_point, GET_TYPES does not,
9218 * that is the only difference between the two.
9219 */
9220 /* Enhanced Mutable Header for continuation_point */
9221 offset = rtps_util_add_xcdr2_enhanced_mutable_header(
9222 type_lookup_request_data_tree, tvb, offset);
9223 }
9224 else
9225 {
9226 proto_item_set_text(type_lookup_request_data_item,
9227 "TypeLookup Request Data: GET_TYPES");
9228 }
9229
9230 proto_item_set_len(type_lookup_request_data_item,
9231 offset - initial_data_offset);
9232 proto_item_set_len(type_lookup_request_item, offset - initial_offset);
9233}
9234
9235#if defined (HAVE_ZLIB1) || defined (HAVE_ZLIBNG)
9236static void rtps_add_zlib_compressed_typeobject(proto_tree *tree, packet_info * pinfo,
9237 tvbuff_t * tvb, int offset, const unsigned encoding, unsigned compressed_size,
9238 unsigned decompressed_size, type_mapping * type_mapping_object) {
9239
9240 tvbuff_t *decompressed_data_child_tvb;
9241 tvbuff_t *compressed_type_object_subset;
9242 proto_tree *decompressed_type_object_subtree;
9243
9244 compressed_type_object_subset = tvb_new_subset_length(tvb, offset, decompressed_size);
9245 decompressed_data_child_tvb = tvb_child_uncompress_zlib(tvb, compressed_type_object_subset, 0, compressed_size);
9246 if (decompressed_data_child_tvb) {
9247 decompressed_type_object_subtree = proto_tree_add_subtree(tree, decompressed_data_child_tvb,
9248 0, 0, ett_rtps_decompressed_type_object, NULL((void*)0), "[Uncompressed type object]");
9249 rtps_util_add_typeobject(decompressed_type_object_subtree, pinfo,
9250 decompressed_data_child_tvb, 0, encoding, decompressed_size, type_mapping_object);
9251 }
9252 else {
9253 proto_tree_add_subtree(tree, compressed_type_object_subset,
9254 0, 0, ett_rtps_decompressed_type_object, NULL((void*)0), "[Failed to decompress type object]");
9255 }
9256}
9257#else
9258static void rtps_add_zlib_compressed_typeobject(proto_tree *tree _U___attribute__((unused)), packet_info * pinfo _U___attribute__((unused)),
9259 tvbuff_t * tvb _U___attribute__((unused)), int offset _U___attribute__((unused)), const unsigned encoding _U___attribute__((unused)), unsigned compressed_size _U___attribute__((unused)),
9260 unsigned decompressed_size _U___attribute__((unused)), type_mapping * type_mapping_object _U___attribute__((unused)))
9261{
9262}
9263#endif
9264
9265/* ------------------------------------------------------------------------- */
9266/* Insert in the protocol tree the next bytes interpreted as Sequence of
9267 * Octets.
9268 * The formatted buffer is: [ 0x01, 0x02, 0x03, 0x04, ...]
9269 * The maximum number of elements displayed is 10, after that a '...' is
9270 * inserted.
9271 */
9272static int rtps_util_add_seq_octets(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
9273 int offset, const unsigned encoding, int param_length, int hf_id) {
9274 uint32_t seq_length;
9275 proto_item *ti;
9276
9277 ti = proto_tree_add_item_ret_uint(tree, hf_rtps_sequence_size, tvb, offset, 4, encoding, &seq_length);
9278
9279 offset += 4;
9280 /* param length -1 means not specified */
9281 if (param_length != -1 && param_length < 4 + (int)seq_length) {
9282 expert_add_info_format(pinfo, ti, &ei_rtps_parameter_value_invalid, "ERROR: Parameter value too small");
9283 return offset + seq_length;
9284 }
9285
9286 if (seq_length) {
9287 proto_tree_add_item(tree, hf_id, tvb, offset, seq_length, ENC_NA0x00000000);
9288 }
9289
9290 return offset + seq_length;
9291}
9292
9293static int rtps_util_add_data_holder(proto_tree *tree, tvbuff_t * tvb, packet_info * pinfo,
9294 int offset, const unsigned encoding, int seq_index, int alignment_zero) {
9295 proto_tree * data_holder_tree, * properties_tree, * property_tree;
9296 proto_item * tii, * ti, * data_holder;
9297 uint32_t seq_size, i;
9298 int offset_tmp, data_holder_begin;
9299
9300 data_holder_tree = proto_tree_add_subtree_format(tree, tvb, offset,
9301 -1, ett_rtps_data_holder, &data_holder, "Data Holder [%d]", seq_index);
9302 data_holder_begin = offset;
9303 offset = rtps_util_add_string(data_holder_tree, tvb, offset,
9304 hf_rtps_pgm_data_holder_class_id, encoding);
9305 LONG_ALIGN_ZERO(offset, alignment_zero)(offset -= alignment_zero, (offset = (offset+3)&0xfffffffc
), offset += alignment_zero)
;
9306
9307 offset_tmp = offset;
9308 properties_tree = proto_tree_add_subtree_format(data_holder_tree, tvb, offset,
9309 -1, ett_rtps_data_holder_properties, &tii, "String Properties");
9310 seq_size = tvb_get_uint32(tvb, offset, encoding);
9311 offset += 4;
9312 for(i = 0; i < seq_size; i++) {
9313 int local_offset = offset;
9314 property_tree = proto_tree_add_subtree_format(properties_tree, tvb, offset,
9315 -1, ett_rtps_property_tree, &ti, "Property [%d]", i);
9316 offset = rtps_util_add_string(property_tree, tvb, offset,
9317 hf_rtps_property_name, encoding);
9318 offset = rtps_util_add_string(property_tree, tvb, offset,
9319 hf_rtps_property_value, encoding);
9320 proto_item_set_len(ti, offset - local_offset);
9321 }
9322 proto_item_set_len(tii, offset - offset_tmp);
9323
9324 offset_tmp = offset;
9325 properties_tree = proto_tree_add_subtree_format(data_holder_tree, tvb, offset,
9326 -1, ett_rtps_data_holder_properties, &tii, "Binary Properties");
9327 seq_size = tvb_get_uint32(tvb, offset, encoding);
9328 offset += 4;
9329 for(i = 0; i < seq_size; i++) {
9330 int local_offset = offset;
9331 LONG_ALIGN(offset)(offset = (offset+3)&0xfffffffc);
9332 property_tree = proto_tree_add_subtree_format(properties_tree, tvb, offset,
9333 -1, ett_rtps_property_tree, &ti, "Property [%d]", i);
9334 offset = rtps_util_add_string(property_tree, tvb, offset,
9335 hf_rtps_property_name, encoding);
9336 offset = rtps_util_add_seq_octets(property_tree, pinfo, tvb, offset,
9337 encoding, -1, hf_rtps_param_user_data);
9338 proto_item_set_len(ti, offset - local_offset);
9339 }
9340 proto_item_set_len(tii, offset - offset_tmp);
9341 proto_item_set_len(data_holder, offset - offset_tmp);
9342
9343 proto_item_set_len(data_holder, offset - data_holder_begin);
9344 return offset;
9345}
9346
9347static int rtps_util_add_data_holder_seq(proto_tree *tree, tvbuff_t * tvb,
9348 packet_info * pinfo, int offset, const unsigned encoding, int alignment_zero) {
9349 proto_tree * data_holder_seq_tree;
9350 proto_item * ti;
9351 uint32_t seq_length;
9352 uint32_t i;
9353
9354 data_holder_seq_tree = proto_tree_add_subtree(tree, tvb, offset,
9355 -1, ett_rtps_data_holder_seq, &ti, "Data Holder Sequence");
9356 seq_length = tvb_get_uint32(tvb, offset, encoding);
9357 offset += 4;
9358 for(i = 0; i < seq_length; i++) {
9359 offset = rtps_util_add_data_holder(data_holder_seq_tree, tvb, pinfo, offset,
9360 encoding, i, alignment_zero);
9361 }
9362 return offset;
9363}
9364
9365/* ------------------------------------------------------------------------- */
9366/* Insert in the protocol tree the next bytes interpreted as a Bitmap
9367 * struct {
9368 * SequenceNumber_t bitmapBase;
9369 * sequence<long, 8> bitmap;
9370 * } SequenceNumberSet;
9371 *
9372 * Returns the new offset after reading the bitmap.
9373 */
9374static int rtps_util_add_bitmap(proto_tree *tree,
9375 packet_info *pinfo,
9376 tvbuff_t *tvb,
9377 int offset,
9378 const unsigned encoding,
9379 const char *label,
9380 bool_Bool show_analysis) {
9381 int32_t num_bits;
9382 uint32_t data;
9383 wmem_strbuf_t *temp_buff = wmem_strbuf_create(pinfo->pool)wmem_strbuf_new(pinfo->pool, "");
9384 wmem_strbuf_t *analysis_buff = wmem_strbuf_create(pinfo->pool)wmem_strbuf_new(pinfo->pool, "");
9385 int i, j, idx;
9386 char *last_one;
9387 proto_item *ti = NULL((void*)0), *ti_tree = NULL((void*)0);
9388 proto_tree *bitmap_tree;
9389 const int original_offset = offset;
9390 uint32_t datamask;
9391 uint64_t first_seq_number;
9392 bool_Bool first_nack = true1;
9393
9394 bitmap_tree = proto_tree_add_subtree(tree, tvb, original_offset, offset-original_offset,
9395 ett_rtps_bitmap, &ti_tree, label);
9396
9397 /* Bitmap base sequence number */
9398 first_seq_number = rtps_util_add_seq_number(bitmap_tree, tvb, offset, encoding, "bitmapBase");
9399 offset += 8;
9400
9401 /* Reads the bitmap size */
9402 proto_tree_add_item_ret_uint(bitmap_tree, hf_rtps_bitmap_num_bits, tvb, offset, 4, encoding, &num_bits);
9403 offset += 4;
9404 /* bitmap base 0 means that this is a preemptive ACKNACK */
9405 if (first_seq_number == 0 && show_analysis) {
9406 ti = proto_tree_add_uint_format(bitmap_tree, hf_rtps_acknack_analysis, tvb, 0, 0,
9407 1, "Acknack Analysis: Preemptive ACKNACK");
9408 proto_item_set_generated(ti);
9409 }
9410
9411 if (first_seq_number > 0 && num_bits == 0 && show_analysis) {
9412 ti = proto_tree_add_uint_format(bitmap_tree, hf_rtps_acknack_analysis, tvb, 0, 0,
9413 2, "Acknack Analysis: Expecting sample %" PRIu64"l" "u", first_seq_number);
9414 proto_item_set_generated(ti);
9415 }
9416
9417 if (num_bits > 0 && show_analysis) {
9418 ti = proto_tree_add_uint_format(bitmap_tree, hf_rtps_acknack_analysis, tvb, 0, 0,
9419 3, "Acknack Analysis: Lost samples");
9420 proto_item_set_generated(ti);
9421 }
9422
9423 /* Reads the bits (and format the print buffer) */
9424 idx = 0;
9425 for (i = 0; i < num_bits; i += 32) {
9426 data = tvb_get_uint32(tvb, offset, encoding);
9427 offset += 4;
9428 for (j = 0; j < 32; ++j) {
9429 datamask = (1U << (31-j));
9430 wmem_strbuf_append_c(temp_buff, ((data & datamask) == datamask) ? '1':'0');
9431 if ((data & datamask) == datamask) {
9432 proto_item_append_text(ti,
9433 first_nack ? " %" PRIu64"l" "u" : ", %" PRIu64"l" "u",
9434 first_seq_number + idx);
9435 first_nack = false0;
9436 }
9437 ++idx;
9438 if ((idx >= num_bits) || (wmem_strbuf_get_len(temp_buff) >= (ITEM_LABEL_LENGTH240 - 1))) {
9439 break;
9440 }
9441 }
9442 }
9443
9444 /* removes all the ending '0' */
9445 last_one = strrchr(wmem_strbuf_get_str(temp_buff), '1');
9446 if (last_one) {
9447 wmem_strbuf_truncate(temp_buff, (size_t) (last_one - wmem_strbuf_get_str(temp_buff)) + 1);
9448 }
9449
9450 if (wmem_strbuf_get_len(temp_buff) > 0) {
9451 proto_tree_add_bytes_format_value(bitmap_tree, hf_rtps_bitmap, tvb,
9452 original_offset + 12, offset - original_offset - 12,
9453 NULL((void*)0), "%s", wmem_strbuf_get_str(temp_buff));
9454 }
9455
9456 proto_item_set_len(ti_tree, offset-original_offset);
9457
9458 /* Add analysis of the information */
9459 if (num_bits > 0 && show_analysis) {
9460 proto_item_append_text(ti, "%s in range [%" PRIu64"l" "u" ",%" PRIu64"l" "u" "]",
9461 wmem_strbuf_get_str(analysis_buff), first_seq_number, first_seq_number + num_bits - 1);
9462 }
9463
9464 return offset;
9465}
9466
9467/* ------------------------------------------------------------------------- */
9468/* Insert in the protocol tree the next bytes interpreted as a FragmentNumberSet
9469 * typedef unsigned long FragmentNumber_t;
9470 * struct {
9471 * FragmentNumber_t bitmapBase;
9472 * sequence<FragmentNumber_t> bitmap;
9473 * } FragmentNumberSet;
9474 *
9475 * Returns the new offset after reading the bitmap.
9476 */
9477static int rtps_util_add_fragment_number_set(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
9478 int offset, const unsigned encoding, const char *label, int section_size) {
9479 uint64_t base;
9480 int32_t num_bits;
9481 uint32_t data;
9482 wmem_strbuf_t *temp_buff = wmem_strbuf_create(pinfo->pool)wmem_strbuf_new(pinfo->pool, "");
9483 char *last_one;
9484 int i, j, idx;
9485 proto_item *ti;
9486 proto_tree *bitmap_tree;
9487 const int original_offset = offset;
9488 uint32_t datamask;
9489 int expected_size;
9490 int base_size;
9491
9492 bitmap_tree = proto_tree_add_subtree(tree, tvb, original_offset, offset-original_offset, ett_rtps_bitmap, &ti, label);
9493
9494 /* RTI DDS 4.2d was sending the FragmentNumber_t as a 64-bit long integer
9495 * instead of 32-bit long.
9496 * Attempt to decode this section as 32-bit, then check if the size of the
9497 * message match what is here. If not re-decode it as 64-bit.
9498 */
9499 num_bits = tvb_get_uint32(tvb, offset+4, encoding);
9500 expected_size = ((num_bits + 31) / 32) * 4 + 8;
9501 if (expected_size == section_size) {
9502 base = (uint64_t)tvb_get_uint32(tvb, offset, encoding);
9503 base_size = 4;
9504 offset += 8;
9505 } else {
9506 /* Attempt to use 64-bit for base */
9507 num_bits = tvb_get_uint32(tvb, offset+8, encoding);
9508 /* num_bits/8 must be aligned to the 4-byte word */
9509 expected_size = (((num_bits / 8) + 3) / 4) * 4 + 12;
9510 if (expected_size == section_size) {
9511 uint64_t hi = (uint64_t)tvb_get_uint32(tvb, offset, encoding);
9512 uint64_t lo = (uint64_t)tvb_get_uint32(tvb, offset+4, encoding);
9513 base = (hi << 32) | lo;
9514 base_size = 8;
9515 offset += 12;
9516 } else {
9517 /* size don't match, packet error */
9518 expert_add_info_format(pinfo, ti, &ei_rtps_parameter_value_invalid, "Illegal size for fragment number set");
9519 return -1;
9520 }
9521 }
9522
9523 /* Reads the bits (and format the print buffer) */
9524 idx = 0;
9525 for (i = 0; i < num_bits; i += 32) {
9526 data = tvb_get_uint32(tvb, offset, encoding);
9527 offset += 4;
9528 for (j = 0; j < 32; ++j) {
9529 datamask = (1U << (31-j));
9530 wmem_strbuf_append_c(temp_buff, ((data & datamask) == datamask) ? '1':'0');
9531 ++idx;
9532 if ((idx >= num_bits) || (wmem_strbuf_get_len(temp_buff) >= (ITEM_LABEL_LENGTH240 - 1))) {
9533 break;
9534 }
9535 }
9536 }
9537
9538 /* removes all the ending '0' */
9539 last_one = strrchr(wmem_strbuf_get_str(temp_buff), '1');
9540 if (last_one) {
9541 wmem_strbuf_truncate(temp_buff, (size_t) (last_one - wmem_strbuf_get_str(temp_buff)));
9542 }
9543
9544 if (base_size == 8) {
9545 proto_tree_add_uint64(bitmap_tree, hf_rtps_fragment_number_base64, tvb, original_offset, 8,
9546 base);
9547 } else {
9548 proto_tree_add_item(bitmap_tree, hf_rtps_fragment_number_base, tvb, original_offset, base_size, encoding);
9549 }
9550 proto_tree_add_uint(bitmap_tree, hf_rtps_fragment_number_num_bits, tvb, original_offset + base_size, 4, num_bits);
9551
9552 if (wmem_strbuf_get_len(temp_buff) > 0) {
9553 proto_tree_add_bytes_format_value(bitmap_tree, hf_rtps_bitmap, tvb, original_offset + base_size + 4, offset - original_offset - base_size - 4,
9554 NULL((void*)0), "%s", wmem_strbuf_get_str(temp_buff));
9555 }
9556
9557 proto_item_set_len(ti, offset-original_offset);
9558 return offset;
9559}
9560
9561static void rtps_util_insert_type_mapping_in_registry(packet_info *pinfo, type_mapping *type_mapping_object) {
9562 if (type_mapping_object) {
9563 if ((type_mapping_object->fields_visited & TOPIC_INFO_ALL_SET(0x07)) == TOPIC_INFO_ALL_SET(0x07) &&
9564 type_mapping_object->guid.fields_present == GUID_HAS_ALL0x0000000F &&
9565 !wmem_map_lookup(registry, &(type_mapping_object->guid))) {
9566 if (((type_mapping_object->guid.entity_id & 0x02) == 0x02) || ((type_mapping_object->guid.entity_id & 0x04) == 0x04)){
9567 /* If it is an application defined writer matches 0x02. Matches 0x04 if it is an application defined reader */
9568 type_mapping_object->dcps_publication_frame_number = pinfo->num;
9569 wmem_map_insert(registry, &(type_mapping_object->guid), type_mapping_object);
9570 }
9571 }
9572 }
9573}
9574
9575static void rtps_util_store_type_mapping(packet_info *pinfo _U___attribute__((unused)), tvbuff_t *tvb, int offset,
9576 type_mapping * type_mapping_object, const char * value,
9577 int topic_info_add_id) {
9578 if (enable_topic_info && type_mapping_object) {
9579 switch (topic_info_add_id) {
9580 case TOPIC_INFO_ADD_GUID(0x01): {
9581 type_mapping_object->guid.host_id = tvb_get_ntohl(tvb, offset);
9582 type_mapping_object->guid.app_id = tvb_get_ntohl(tvb, offset+4);
9583 type_mapping_object->guid.instance_id = tvb_get_ntohl(tvb, offset+8);
9584 type_mapping_object->guid.entity_id = tvb_get_ntohl(tvb, offset+12);
9585 type_mapping_object->guid.fields_present |=
9586 GUID_HAS_HOST_ID0x00000001|GUID_HAS_APP_ID0x00000002|GUID_HAS_INSTANCE_ID0x00000004|GUID_HAS_ENTITY_ID0x00000008;
9587 type_mapping_object->fields_visited =
9588 type_mapping_object->fields_visited | TOPIC_INFO_ADD_GUID(0x01);
9589 break;
9590 }
9591 case TOPIC_INFO_ADD_TOPIC_NAME(0x04): {
9592 rtps_strlcpy(type_mapping_object->topic_name, value, MAX_TOPIC_AND_TYPE_LENGTH256);
9593 type_mapping_object->fields_visited =
9594 type_mapping_object->fields_visited | TOPIC_INFO_ADD_TOPIC_NAME(0x04);
9595 break;
9596 }
9597 case TOPIC_INFO_ADD_TYPE_NAME(0x02): {
9598 rtps_strlcpy(type_mapping_object->type_name, value, MAX_TOPIC_AND_TYPE_LENGTH256);
9599 type_mapping_object->fields_visited =
9600 type_mapping_object->fields_visited | TOPIC_INFO_ADD_TYPE_NAME(0x02);
9601 break;
9602 }
9603
9604 default:
9605 break;
9606 }
9607 }
9608}
9609
9610static unsigned hash_by_participant_guid(const void *key) {
9611 const endpoint_guid* guid = (const endpoint_guid*)key;
9612 int vals[] = { guid->host_id, guid->app_id, guid->instance_id };
9613 GBytes* gbytes = g_bytes_new(vals, sizeof(vals));
9614 unsigned hash = g_bytes_hash(gbytes);
9615 g_bytes_unref(gbytes);
9616 return hash;
9617}
9618
9619static unsigned hash_by_guid(const void *key) {
9620 const endpoint_guid * guid = (const endpoint_guid *) key;
9621 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", 9621, "guid->fields_present & 0x00000002"
))))
;
9622 return g_int_hash(&(guid->app_id));
9623}
9624
9625static gboolean compare_by_guid(const void *guid_a, const void *guid_b) {
9626 return memcmp(guid_a, guid_b, sizeof(endpoint_guid)) == 0;
9627}
9628
9629static gboolean compare_by_participant_guid(const void *guid_a, const void *guid_b) {
9630 const endpoint_guid* a = (const endpoint_guid*)guid_a;
9631 const endpoint_guid* b = (const endpoint_guid*)guid_b;
9632 return ((a->host_id == b->host_id) && (a->app_id == b->app_id) && (a->instance_id == b->instance_id));
9633}
9634
9635static unsigned get_domain_id_from_tcp_discovered_participants(wmem_map_t *map, endpoint_guid* key) {
9636 participant_info *p_info = (participant_info*)wmem_map_lookup(map, (void*)key);
9637 return (p_info != NULL((void*)0)) ? p_info->domainId: RTPS_UNKNOWN_DOMAIN_ID_VAL-1;
9638}
9639
9640static unsigned coherent_set_key_hash_by_key(const void *key) {
9641 return wmem_strong_hash((const uint8_t *)key, sizeof(coherent_set_key));
9642}
9643
9644static gboolean compare_by_coherent_set_key(const void *key_a, const void *key_b) {
9645 return memcmp(key_a, key_b, sizeof(coherent_set_key)) == 0;
9646}
9647
9648static type_mapping * rtps_util_get_topic_info(endpoint_guid * guid) {
9649 /* At this point, we know the boolean enable_topic_info is true */
9650 type_mapping * result = NULL((void*)0);
9651 if (guid) {
9652 unsigned entity_id_low = 0xFF & guid->entity_id;
9653 /* If the entity guid low is ENTITYID_NORMAL_META_GROUP_READER or ENTITYID_NORMAL_META_GROUP_WRITER then
9654 * is a builtin endpoint that uses the type InstaneStateResponseData. The type_mapping for this type is not
9655 * available through discovery. It is defined by code in
9656 * initialize_instance_state_data_response_dissection_info function.
9657 */
9658 if (entity_id_low == ENTITYID_NORMAL_META_GROUP_READER(0x8d) || entity_id_low == ENTITYID_NORMAL_META_GROUP_WRITER(0x8c)) {
9659 result = &builtin_types_dissection_data.type_mappings.instance_state_data_response_type_mapping;
9660 }
9661 else if (guid->fields_present == GUID_HAS_ALL0x0000000F)
9662 result = (type_mapping *)wmem_map_lookup(registry, guid);
9663 }
9664 return result;
9665}
9666
9667static void rtps_util_format_typename(wmem_allocator_t *scope, char * type_name, char ** output) {
9668 char ** tokens;
9669 char * result_caps;
9670 /* The standard specifies that the max size of a type name
9671 can be 255 bytes */
9672 tokens = wmem_strsplit(scope, type_name, "::", 255);
9673 result_caps = wmem_strjoinv(scope, "_", tokens);
9674 *output = wmem_ascii_strdown(scope, result_caps, -1);
9675
9676}
9677
9678/* Adds the topic topic information to the tree and the topic name to the info column.
9679 * Topic name will be added to the info column only if the topic information is stored
9680 * in the "registry map".
9681 * This is used when the packet doesn't contain the topic information (PID_TOPIC_INFORMATION)
9682 */
9683static const char* rtps_util_add_topic_info(proto_tree *tree, packet_info* pinfo, tvbuff_t *tvb,
9684 int offset, endpoint_guid * guid) {
9685 const char* topic_name = NULL((void*)0);
9686 if (enable_topic_info) {
9687 proto_tree * topic_info_tree;
9688 proto_item * ti;
9689 bool_Bool is_builtin_type = false0;
9690 type_mapping * type_mapping_object = rtps_util_get_topic_info(guid);
9691 /* If it is a builtin type mapping then the information is not taken from discovery data */
9692 is_builtin_type = (type_mapping_object == &builtin_types_dissection_data.type_mappings.instance_state_data_response_type_mapping);
9693 if (type_mapping_object != NULL((void*)0)) {
9694 const char* topic_information_text = (!is_builtin_type) ?
9695 "[Topic Information (from Discovery)]" :
9696 "[Topic Information (BuiltIn type)]";
9697 topic_name = type_mapping_object->topic_name;
9698 if (topic_name != NULL((void*)0)) {
9699 submessage_col_info* current_submessage_col_info = NULL((void*)0);
9700
9701 topic_info_tree = proto_tree_add_subtree(tree, tvb, offset, 0,
9702 ett_rtps_topic_info, NULL((void*)0), topic_information_text);
9703 ti = proto_tree_add_string(topic_info_tree, hf_rtps_param_type_name, tvb, offset, 0,
9704 type_mapping_object->type_name);
9705 proto_item_set_generated(ti);
9706 if (!is_builtin_type) {
9707 ti = proto_tree_add_string(topic_info_tree, hf_rtps_param_topic_name, tvb, offset, 0,
9708 topic_name);
9709 proto_item_set_generated(ti);
9710 ti = proto_tree_add_uint(topic_info_tree, hf_rtps_dcps_publication_data_frame_number,
9711 tvb, 0, 0, type_mapping_object->dcps_publication_frame_number);
9712 }
9713 proto_item_set_generated(ti);
9714 current_submessage_col_info = (submessage_col_info*)p_get_proto_data(pinfo->pool, pinfo, proto_rtps, RTPS_CURRENT_SUBMESSAGE_COL_DATA_KEY3);
9715 if (current_submessage_col_info != NULL((void*)0) && current_submessage_col_info->topic_name == NULL((void*)0)) {
9716 current_submessage_col_info->topic_name = wmem_strdup(pinfo->pool, topic_name);
9717 }
9718 }
9719 }
9720 }
9721 return topic_name;
9722}
9723
9724/* Uncompress data and returns it uncompressed on a new tvb.
9725 *
9726 * @param[in] tree a chunk of data in the tvb and return a new tvb with the uncompressed data
9727 * @param[in] tvb
9728 * @param[in] offset offset at the beginning of the compressed data.
9729 * @param[in] size in bytes from the initial offset to the end of the serialized data
9730 * @param[in] compressed_size size in bytes of the compressed chunk in the tvb.
9731 * @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
9732 * distinguis when the data is not decompressed because Zlib is not available (not warning) and cases where it is but fails (warning).
9733 *
9734 * @return The uncompressed data on a new TVB if everything goes fine. Otherwise NULL
9735 */
9736static
9737tvbuff_t *rtps_util_get_uncompressed_tvb_zlib(
9738 tvbuff_t *tvb _U___attribute__((unused)),
9739 const int offset _U___attribute__((unused)),
9740 const unsigned compressed_size _U___attribute__((unused)),
9741 bool_Bool *tried_to_decompress) {
9742 tvbuff_t *uncompressed_tvb = NULL((void*)0);
9743#if defined(HAVE_ZLIB1) || defined(HAVE_ZLIBNG)
9744 /* If ZLIB is available always try to decompress. */
9745 *tried_to_decompress = true1;
9746 uncompressed_tvb = tvb_new_subset_length_caplen(tvb, offset, compressed_size, -1);
9747 uncompressed_tvb = tvb_child_uncompress_zlib(uncompressed_tvb, uncompressed_tvb, 0, compressed_size);
9748#else
9749 *tried_to_decompress = false0;
9750#endif
9751 return uncompressed_tvb;
9752}
9753
9754/*
9755 * 0...2...........8...............16
9756 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
9757 * | X X X X X X X X X X X | C C C P P |
9758 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
9759 * X = Unused options bits
9760 * C = Compression bits
9761 * P = Padding bits
9762 * C = 0b111 would be extended compression options which would come in as an
9763 * additional header before the payload.
9764 * C = 0b000 to indicate no compression
9765*/
9766
9767/* Dissects the encapsultaion options
9768*
9769* @param[in] tree
9770* @param[in] packet info.
9771* @param[in] tvb
9772* @param[in] offset at the beginning of the encapsulation options.
9773* @param[out] encapsulation_options_out If not null it will contain the encapsulation options
9774* @param[out] compression_option_out If not null it will contain the compression option
9775* @param[out] padding_bytes_out If not null it will contain the padding bytes
9776* @param[out] extended_header_bits_out If not null it will contain the extended header bits
9777* @return the offset after the encapsulation options
9778* @note All output parameters are optional.
9779*/
9780static
9781int rtps_util_dissect_encapsulation_options(
9782 proto_tree *tree,
9783 tvbuff_t *tvb,
9784 int offset,
9785 int16_t *encapsulation_options_out,
9786 uint8_t *compression_options_out,
9787 uint8_t *padding_bytes_out,
9788 uint8_t *extended_header_bits_out) {
9789 uint8_t compression_options = 0;
9790 proto_tree *compression_options_subtree = NULL((void*)0);
9791 int16_t encapsulation_options = 0;
9792 uint8_t padding_bytes = 0;
9793 uint8_t extended_header_bits = 0;
9794
9795 /* Encapsulation length (or option). Always big endian. */
9796 encapsulation_options = tvb_get_int16(tvb, offset, ENC_BIG_ENDIAN0x00000000);
9797 if (encapsulation_options != 0) {
9798 compression_options_subtree = proto_tree_add_subtree_format(
9799 tree,
9800 tvb,
9801 offset,
9802 2,
9803 ett_rtps_data_encapsulation_options,
9804 NULL((void*)0),
9805 "Encapsulation options (0x%02x)",
9806 encapsulation_options);
9807 /* If compression options ENCAPSULATION_OPTIONS_COMPRESSION_EXTENDED_HEADER_VALUE bits are set, the
9808 header contains an extra field */
9809 extended_header_bits = (encapsulation_options
9810 & ENCAPSULATION_OPTIONS_COMPRESSION_EXTENDED_HEADER_VALUE(0x1C));
9811 GET_ENCAPSULATION_COMPRESSION_OPTIONS(encapsulation_options, compression_options)(compression_options = (((encapsulation_options) & ((0x1C
))) >> 2))
;
9812 padding_bytes = (encapsulation_options & ENCAPSULATION_OPTIONS_COMPRESSION_PADDING_BYTES_MASK(0x3));
9813 proto_tree_add_int(
9814 compression_options_subtree,
9815 hf_rtps_encapsulation_options_compression_plugin_class_id,
9816 tvb,
9817 offset + 1,
9818 1,
9819 compression_options);
9820 proto_tree_add_int(
9821 compression_options_subtree,
9822 hf_rtps_padding_bytes,
9823 tvb,
9824 offset + 1,
9825 1,
9826 padding_bytes);
9827 offset += 2;
9828 padding_bytes = encapsulation_options & ENCAPSULATION_OPTIONS_COMPRESSION_PADDING_BYTES_MASK(0x3);
9829 } else {
9830 /* Encapsulation length (or option). Always big endian. */
9831 proto_tree_add_item(
9832 tree,
9833 hf_rtps_param_serialize_encap_len,
9834 tvb,
9835 offset,
9836 2,
9837 ENC_BIG_ENDIAN0x00000000);
9838 offset += 2;
9839 }
9840 /* Set the optional outputs */
9841 if (encapsulation_options_out != NULL((void*)0)) {
9842 *encapsulation_options_out = encapsulation_options;
9843 }
9844 if (compression_options_out != NULL((void*)0)) {
9845 *compression_options_out = compression_options;
9846 }
9847 if (padding_bytes_out != NULL((void*)0)) {
9848 *padding_bytes_out = padding_bytes;
9849 }
9850 if (extended_header_bits_out != NULL((void*)0)) {
9851 *extended_header_bits_out = extended_header_bits;
9852 }
9853 return offset;
9854}
9855
9856static bool_Bool rtps_util_try_dissector(proto_tree *tree,
9857 packet_info *pinfo, tvbuff_t *tvb, int offset, endpoint_guid * guid,
9858 rtps_dissector_data * data, unsigned encoding, unsigned encoding_version, bool_Bool try_dissection_from_type_object) {
9859
9860
9861 if (enable_topic_info) {
9862 type_mapping * type_mapping_object = rtps_util_get_topic_info(guid);
9863 if (type_mapping_object != NULL((void*)0)) {
9864 char * dissector_name = NULL((void*)0);
9865 tvbuff_t *next_tvb;
9866 dissection_info* info = NULL((void*)0);
9867
9868 if (try_dissection_from_type_object && enable_user_data_dissection) {
9869 info = lookup_dissection_info_in_custom_and_builtin_types(type_mapping_object->type_id);
9870 if (info != NULL((void*)0)) {
9871 proto_item_append_text(tree, " (TypeId: 0x%016" PRIx64"l" "x" ")", info->type_id);
9872 return dissect_user_defined(tree, tvb, pinfo, offset, encoding, encoding_version, info,
9873 info->type_id, info->member_name, EXTENSIBILITY_INVALID, offset,
9874 0 /* flags */, 0 /* member_id */, true1);
9875 }
9876 }
9877 /* This part tries to dissect the content using a dissector */
9878 next_tvb = tvb_new_subset_remaining(tvb, offset);
9879
9880 rtps_util_format_typename(pinfo->pool, type_mapping_object->type_name, &dissector_name);
9881 return dissector_try_string_with_data(rtps_type_name_table, dissector_name,
9882 next_tvb, pinfo, tree, true1, data);
9883 }
9884 }
9885 /* Return false so the content is dissected by the codepath following this one */
9886 return false0;
9887}
9888
9889static int rtps_util_add_rti_topic_query_service_request(proto_tree * tree, packet_info *pinfo,
9890 tvbuff_t * tvb, int offset, unsigned encoding) {
9891 /*
9892 struct TopicQuerySelection {
9893 string filter_class_name; //@Optional 0
9894 string filter_expression; // 1
9895 sequence<string> filter_parameters;
9896 }; //@top-level false
9897 //@Extensibility MUTABLE_EXTENSIBILITY
9898
9899 struct TopicQueryData {
9900 TopicQuerySelection topic_query_selection;
9901 SequenceNumber_t sync_sequence_number;
9902 string topic_name;
9903 GUID_t original_related_reader_guid;
9904 }; //@top-level false
9905 //@Extensibility MUTABLE_EXTENSIBILITY
9906 */
9907 proto_tree * topic_query_tree, * topic_query_selection_tree, *topic_query_filter_params_tree;
9908 proto_item * ti;
9909 uint16_t encapsulation_id, encapsulation_opt;
9910 uint32_t param_id, param_length, param_length_2, num_filter_params;
9911 int alignment_zero, tmp_offset;
9912 uint32_t i;
9913 char* topic_name = NULL((void*)0);
9914 int topic_name_len = 0;
9915 topic_query_tree = proto_tree_add_subtree(tree, tvb, offset,
9916 0 /* To be defined */, ett_rtps_topic_query_tree, &ti, "Topic Query Data");
9917
9918 /* Encapsulation Id */
9919 encapsulation_id = tvb_get_ntohs(tvb, offset); /* Always big endian */
9920 proto_tree_add_uint(topic_query_tree, hf_rtps_encapsulation_id,
9921 tvb, offset, 2, encapsulation_id);
9922 offset += 2;
9923 encoding = get_encapsulation_endianness(encapsulation_id);
9924 /* Encapsulation length (or option) */
9925 encapsulation_opt = tvb_get_ntohs(tvb, offset); /* Always big endian */
9926 proto_tree_add_uint(topic_query_tree, hf_rtps_encapsulation_options, tvb,
9927 offset, 2, encapsulation_opt);
9928 offset += 2;
9929 alignment_zero = offset;
9930 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &param_id, &param_length);
9931 tmp_offset = offset;
9932 {
9933 /* TopicQuerySelection */
9934 topic_query_selection_tree = proto_tree_add_subtree(topic_query_tree, tvb, tmp_offset,
9935 0 /* To be defined */, ett_rtps_topic_query_selection_tree, &ti, "Topic Query Selection");
9936
9937 SHORT_ALIGN_ZERO(tmp_offset,alignment_zero)(tmp_offset -= alignment_zero, (tmp_offset = (tmp_offset+1)&
0xfffffffe), tmp_offset += alignment_zero)
;
9938 rtps_util_dissect_parameter_header(tvb, &tmp_offset, encoding, &param_id, &param_length_2);
9939 if (param_id == 0) { /* Optional string filter_class_name */
9940 LONG_ALIGN_ZERO(tmp_offset, alignment_zero)(tmp_offset -= alignment_zero, (tmp_offset = (tmp_offset+3)&
0xfffffffc), tmp_offset += alignment_zero)
;
9941 rtps_util_add_string(topic_query_selection_tree, tvb, tmp_offset,
9942 hf_rtps_topic_query_selection_filter_class_name, encoding);
9943 }
9944 tmp_offset += param_length_2;
9945
9946 SHORT_ALIGN_ZERO(tmp_offset,alignment_zero)(tmp_offset -= alignment_zero, (tmp_offset = (tmp_offset+1)&
0xfffffffe), tmp_offset += alignment_zero)
;
9947 rtps_util_dissect_parameter_header(tvb, &tmp_offset, encoding, &param_id, &param_length_2);
9948
9949 LONG_ALIGN_ZERO(tmp_offset, alignment_zero)(tmp_offset -= alignment_zero, (tmp_offset = (tmp_offset+3)&
0xfffffffc), tmp_offset += alignment_zero)
;
9950 tmp_offset = rtps_util_add_string(topic_query_selection_tree, tvb, tmp_offset,
9951 hf_rtps_topic_query_selection_filter_expression, encoding);
9952
9953 SHORT_ALIGN_ZERO(tmp_offset,alignment_zero)(tmp_offset -= alignment_zero, (tmp_offset = (tmp_offset+1)&
0xfffffffe), tmp_offset += alignment_zero)
;
9954 rtps_util_dissect_parameter_header(tvb, &tmp_offset, encoding, &param_id, &param_length_2);
9955
9956 num_filter_params = tvb_get_uint32(tvb, tmp_offset, encoding);
9957 proto_tree_add_item(topic_query_selection_tree, hf_rtps_topic_query_selection_num_parameters,
9958 tvb, tmp_offset, 4, encoding);
9959 topic_query_filter_params_tree = proto_tree_add_subtree_format(topic_query_selection_tree, tvb,
9960 tmp_offset + 4, 0 /* To be defined */, ett_rtps_topic_query_filter_params_tree, &ti,
9961 "Filter Parameters (size = %u)", num_filter_params);
9962 tmp_offset += 4;
9963
9964 for (i = 0; i < num_filter_params; ++i) {
9965 uint32_t string_size;
9966 char * retVal;
9967 LONG_ALIGN_ZERO(tmp_offset, alignment_zero)(tmp_offset -= alignment_zero, (tmp_offset = (tmp_offset+3)&
0xfffffffc), tmp_offset += alignment_zero)
;
9968 string_size = tvb_get_uint32(tvb, tmp_offset, encoding);
9969 retVal = tvb_get_string_enc(pinfo->pool, tvb, tmp_offset+4, string_size, ENC_ASCII0x00000000);
9970
9971 proto_tree_add_string_format(topic_query_filter_params_tree,
9972 hf_rtps_topic_query_selection_filter_parameter, tvb,
9973 tmp_offset, string_size+4, retVal, "%s[%d]: %s", "Filter Parameter", i, retVal);
9974
9975 tmp_offset += (4 + string_size);
9976 }
9977 SHORT_ALIGN_ZERO(tmp_offset, alignment_zero)(tmp_offset -= alignment_zero, (tmp_offset = (tmp_offset+1)&
0xfffffffe), tmp_offset += alignment_zero)
;
9978 tmp_offset += 4;
9979 proto_tree_add_item(topic_query_selection_tree, hf_rtps_topic_query_selection_kind,
9980 tvb, tmp_offset, 4, encoding);
9981 }
9982 offset = check_offset_addition(offset, param_length, tree, NULL((void*)0), tvb);
9983 SHORT_ALIGN_ZERO(offset,alignment_zero)(offset -= alignment_zero, (offset = (offset+1)&0xfffffffe
), offset += alignment_zero)
;
9984 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &param_id, &param_length);
9985
9986 rtps_util_add_seq_number(topic_query_tree, tvb, offset, encoding, "Sync Sequence Number");
9987 offset = check_offset_addition(offset, param_length, tree, NULL((void*)0), tvb);
9988
9989 SHORT_ALIGN_ZERO(offset,alignment_zero)(offset -= alignment_zero, (offset = (offset+1)&0xfffffffe
), offset += alignment_zero)
;
9990 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &param_id, &param_length);
9991
9992 LONG_ALIGN_ZERO(offset, alignment_zero)(offset -= alignment_zero, (offset = (offset+3)&0xfffffffc
), offset += alignment_zero)
;
9993 topic_name_len = tvb_get_uint32(tvb, offset, encoding);
9994 topic_name = tvb_get_string_enc(pinfo->pool, tvb, offset + 4, topic_name_len, ENC_ASCII0x00000000);
9995 proto_tree_add_string(topic_query_tree, hf_rtps_topic_query_topic_name, tvb, offset, topic_name_len + 4, topic_name);
9996 if (topic_name != NULL((void*)0)) {
9997 submessage_col_info* current_submessage_col_info = NULL((void*)0);
9998 current_submessage_col_info = (submessage_col_info*)p_get_proto_data(pinfo->pool, pinfo, proto_rtps, RTPS_CURRENT_SUBMESSAGE_COL_DATA_KEY3);
9999 if (current_submessage_col_info != NULL((void*)0) && current_submessage_col_info->topic_name == NULL((void*)0)) {
10000 current_submessage_col_info->topic_name = wmem_strdup(pinfo->pool, topic_name);
10001 }
10002 }
10003
10004
10005 offset = check_offset_addition(offset, param_length, tree, NULL((void*)0), tvb);
10006
10007 SHORT_ALIGN_ZERO(offset,alignment_zero)(offset -= alignment_zero, (offset = (offset+1)&0xfffffffe
), offset += alignment_zero)
;
10008 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &param_id, &param_length);
10009
10010 rtps_util_add_generic_guid_v2(topic_query_tree, tvb, offset,
10011 hf_rtps_topic_query_original_related_reader_guid,
10012 hf_rtps_param_host_id, hf_rtps_param_app_id, hf_rtps_param_instance_id,
10013 hf_rtps_param_entity, hf_rtps_param_entity_key, hf_rtps_param_entity_kind,
10014 NULL((void*)0));
10015
10016 offset = check_offset_addition(offset, param_length, tree, NULL((void*)0), tvb);
10017 return offset;
10018}
10019
10020static int rtps_util_add_rti_locator_reachability_service_request(proto_tree * tree,
10021 packet_info *pinfo, tvbuff_t * tvb, int offset, unsigned encoding) {
10022 proto_tree * locator_reachability_tree, * locator_seq_tree;
10023 proto_item * ti;
10024 uint16_t encapsulation_id, encapsulation_opt;
10025 uint32_t param_id, param_length, seq_length, i;
10026 locator_reachability_tree = proto_tree_add_subtree(tree, tvb, offset,
10027 0 /* To be defined */, ett_rtps_locator_reachability_tree, &ti, "Locator Reachability Data");
10028 /* Encapsulation Id */
10029 encapsulation_id = tvb_get_ntohs(tvb, offset); /* Always big endian */
10030 proto_tree_add_uint(locator_reachability_tree, hf_rtps_encapsulation_id,
10031 tvb, offset, 2, encapsulation_id);
10032 offset += 2;
10033 encoding = get_encapsulation_endianness(encapsulation_id);
10034 /* Encapsulation length (or option) */
10035 encapsulation_opt = tvb_get_ntohs(tvb, offset); /* Always big endian */
10036 proto_tree_add_uint(locator_reachability_tree, hf_rtps_encapsulation_options, tvb,
10037 offset, 2, encapsulation_opt);
10038 offset += 2;
10039
10040 rtps_util_dissect_parameter_header(tvb, &offset, encoding, &param_id, &param_length);
10041
10042 seq_length = tvb_get_uint32(tvb, offset, encoding);
10043 locator_seq_tree = proto_tree_add_subtree_format(locator_reachability_tree, tvb, offset,
10044 param_length, ett_rtps_locator_list_tree, &ti, "Locator List [Size = %u]", seq_length);
10045 offset += 4;
10046 for(i = 0; i < seq_length; i++) {
10047 rtps_util_add_locator_t(locator_seq_tree, pinfo, tvb, offset, encoding, "Locator");
10048 offset += 24;
10049 }
10050 return offset;
10051}
10052
10053static int rtps_util_add_instance_state_request_data(proto_tree* tree, tvbuff_t* tvb,
10054 int offset, const unsigned encoding) {
10055 proto_tree* instance_state_request_tree = NULL((void*)0);
10056 proto_item* ti = NULL((void*)0);
10057 /* The sum of all fields */
10058 const unsigned instance_state_request_data_len = 8 + GUID_SIZE(16) + (4 * 3);
10059 instance_state_request_tree = proto_tree_add_subtree(
10060 tree,
10061 tvb,
10062 offset,
10063 instance_state_request_data_len,
10064 ett_rtps_instance_transition_data,
10065 &ti,
10066 "Instance State Request Data");
10067 rtps_util_add_seq_number(instance_state_request_tree, tvb, offset, encoding, "seqNumber");
10068 offset += 8;
10069 rtps_util_add_generic_guid_v2(instance_state_request_tree, tvb, offset, hf_rtps_pgm_dst_endpoint_guid,
10070 hf_rtps_param_host_id, hf_rtps_param_app_id, hf_rtps_param_instance_id,
10071 hf_rtps_param_entity, hf_rtps_param_entity_key, hf_rtps_param_entity_kind,
10072 NULL((void*)0));
10073 offset += GUID_SIZE(16);
10074 proto_tree_add_item(instance_state_request_tree, hf_rtps_writer_group_oid, tvb, offset, 4, encoding);
10075 offset += 4;
10076 proto_tree_add_item(instance_state_request_tree, hf_rtps_reader_group_oid, tvb, offset, 4, encoding);
10077 offset += 4;
10078 proto_tree_add_item(instance_state_request_tree, hf_rtps_writer_session_id, tvb, offset, 4, encoding);
10079 offset += 4;
10080 return offset;
10081}
10082
10083static int rtps_util_add_rti_service_request(proto_tree * tree, packet_info *pinfo, tvbuff_t * tvb,
10084 int offset, const unsigned encoding, uint32_t service_id) {
10085 uint32_t *service_id_copy = wmem_alloc(pinfo->pool, sizeof(uint32_t));
10086 *service_id_copy = service_id;
10087 /* This is used in append_status_info for adding the column info */
10088 p_add_proto_data(pinfo->pool, pinfo, proto_rtps, RTPS_SERVICE_REQUEST_ID_PROTODATA_KEY1, (void *)service_id_copy);
10089 switch (service_id) {
10090 case RTI_SERVICE_REQUEST_ID_TOPIC_QUERY1:
10091 offset = rtps_util_add_rti_topic_query_service_request(tree, pinfo, tvb, offset + 4,
10092 encoding);
10093 break;
10094 case RTI_SERVICE_REQUEST_ID_LOCATOR_REACHABILITY2:
10095 offset = rtps_util_add_rti_locator_reachability_service_request(tree, pinfo, tvb, offset + 4,
10096 encoding);
10097 break;
10098 case RTI_SERVICE_REQUEST_ID_UNKNOWN0: {
10099 uint32_t seq_length;
10100 seq_length = tvb_get_uint32(tvb, offset, encoding);
10101 proto_tree_add_item(tree, hf_rtps_srm_request_body,
10102 tvb, offset + 4, seq_length, ENC_NA0x00000000);
10103 offset = check_offset_addition(offset, seq_length, tree, NULL((void*)0), tvb);
10104 offset = check_offset_addition(offset, 4, tree, NULL((void*)0), tvb);
10105 break;
10106 }
10107 case RTI_SERVICE_REQUEST_ID_INSTANCE_STATE3: {
10108 /* First four after the sequence size are not needed */
10109 offset += 8;
10110 offset = rtps_util_add_instance_state_request_data(tree, tvb, offset, encoding);
10111 break;
10112 }
10113 }
10114 return offset;
10115}
10116
10117/* *********************************************************************** */
10118/* * Parameter Sequence dissector * */
10119/* *********************************************************************** */
10120/*
10121 * It returns the new offset representing the point where the parameter
10122 * sequence terminates.
10123 * In case of protocol error, it returns 0 (cannot determine the end of
10124 * the sequence, the caller should be responsible to find the end of the
10125 * section if possible or pass the error back and abort dissecting the
10126 * current packet).
10127 * If no error occurred, the returned value is ALWAYS > than the offset passed.
10128 */
10129#define ENSURE_LENGTH(size) \
10130 if (param_length < size) { \
10131 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); \
10132 break; \
10133 }
10134
10135static bool_Bool dissect_parameter_sequence_rti_dds(proto_tree *rtps_parameter_tree, packet_info *pinfo, tvbuff_t *tvb,
10136 proto_item *parameter_item, proto_item * param_len_item, int offset,
10137 const unsigned encoding, int param_length, uint16_t parameter, type_mapping * type_mapping_object,
10138 bool_Bool is_inline_qos, unsigned vendor_id) {
10139
10140 switch(parameter) {
10141
10142 case PID_DATA_TAGS(0x1003):
10143 ENSURE_LENGTH(4);
10144 rtps_util_add_data_tags(rtps_parameter_tree, tvb, offset, encoding, param_length);
10145 break;
10146
10147 case PID_SAMPLE_SIGNATURE(0x8019):
10148 ENSURE_LENGTH(16);
10149 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_sample_signature_epoch, tvb,
10150 offset, 8, encoding);
10151 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_sample_signature_nonce, tvb,
10152 offset+8, 4, encoding);
10153 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_sample_signature_length, tvb,
10154 offset+12, 4, encoding);
10155 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_sample_signature_signature, tvb,
10156 offset+16, param_length-16, ENC_NA0x00000000);
10157 break;
10158
10159 case PID_ENABLE_AUTHENTICATION(0x0078):
10160 ENSURE_LENGTH(4);
10161 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_enable_authentication, tvb,
10162 offset, 4, ENC_NA0x00000000);
10163 break;
10164
10165 case PID_RELATED_ENTITY_GUID(0x0081):
10166 ENSURE_LENGTH(16);
10167 rtps_util_add_guid_prefix_v2(
10168 rtps_parameter_tree,
10169 tvb,
10170 offset,
10171 hf_rtps_sm_guid_prefix,
10172 hf_rtps_sm_host_id,
10173 hf_rtps_sm_app_id,
10174 hf_rtps_sm_instance_id,
10175 0);
10176 rtps_util_add_entity_id(
10177 rtps_parameter_tree,
10178 pinfo, tvb,
10179 offset + 12,
10180 hf_rtps_sm_entity_id,
10181 hf_rtps_sm_entity_id_key,
10182 hf_rtps_sm_entity_id_kind,
10183 ett_rtps_entity,
10184 "Related entity instance id",
10185 NULL((void*)0));
10186 break;
10187
10188 case PID_BUILTIN_ENDPOINT_QOS(0x0077):
10189 ENSURE_LENGTH(1);
10190 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_builtin_endpoint_qos, tvb,
10191 offset, 1, encoding);
10192 break;
10193
10194 case PID_ENDPOINT_SECURITY_INFO(0x1004): {
10195 uint32_t flags;
10196 ENSURE_LENGTH(8);
10197 flags = tvb_get_uint32(tvb, offset, encoding);
10198 proto_tree_add_bitmask_value(rtps_parameter_tree, tvb, offset,
10199 hf_rtps_param_endpoint_security_attributes_mask, ett_rtps_flags,
10200 ENDPOINT_SECURITY_INFO_FLAGS, flags);
10201 flags = tvb_get_uint32(tvb, offset, encoding);
10202 proto_tree_add_bitmask_value(rtps_parameter_tree, tvb, offset,
10203 hf_rtps_param_plugin_endpoint_security_attributes_mask, ett_rtps_flags,
10204 PLUGIN_ENDPOINT_SECURITY_INFO_FLAGS, flags);
10205 break;
10206 }
10207
10208 case PID_PARTICIPANT_SECURITY_INFO(0x1005): {
10209 uint32_t flags;
10210 ENSURE_LENGTH(8);
10211 flags = tvb_get_uint32(tvb, offset, encoding);
10212 proto_tree_add_bitmask_value(rtps_parameter_tree, tvb, offset,
10213 hf_rtps_param_participant_security_attributes_mask, ett_rtps_flags,
10214 PARTICIPANT_SECURITY_INFO_FLAGS, flags);
10215 offset += 4;
10216 flags = tvb_get_uint32(tvb, offset, encoding);
10217 proto_tree_add_bitmask_value(rtps_parameter_tree, tvb, offset,
10218 hf_rtps_param_plugin_participant_security_attributes_mask, ett_rtps_flags,
10219 PLUGIN_PARTICIPANT_SECURITY_INFO_FLAGS, flags);
10220 break;
10221 }
10222
10223 case PID_VENDOR_BUILTIN_ENDPOINT_SET(0x8017): {
10224 uint32_t flags;
10225 ENSURE_LENGTH(4);
10226 flags = tvb_get_uint32(tvb, offset, encoding);
10227 proto_tree_add_bitmask_value(rtps_parameter_tree, tvb, offset,
10228 hf_rtps_param_vendor_builtin_endpoint_set_flags, ett_rtps_flags,
10229 VENDOR_BUILTIN_ENDPOINT_FLAGS, flags);
10230 break;
10231 }
10232 /* 0...2...........7...............15.............23...............31
10233 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
10234 * | Unsigned long classId |
10235 * +---------------+---------------+---------------+---------------+
10236 * | Unsigned long uncompressedSerializedLength |
10237 * +---------------+---------------+---------------+---------------+
10238 * | byteSeq compressedSerializedTypeObject |
10239 * +---------------+---------------+---------------+---------------+
10240 * classId:
10241 * value(0) RTI_OSAPI_COMPRESSION_CLASS_ID_NONE
10242 * value(1) RTI_OSAPI_COMPRESSION_CLASS_ID_ZLIB
10243 * value(2) RTI_OSAPI_COMPRESSION_CLASS_ID_BZIP2
10244 * value(-1) RTI_OSAPI_COMPRESSION_CLASS_ID_AUTO
10245 */
10246 case PID_TYPE_OBJECT_LB(0x8021): {
10247 unsigned compressed_size;
10248 unsigned decompressed_size;
10249 unsigned compression_plugin_class;
10250 tvbuff_t *compressed_type_object_subset;
10251
10252 ENSURE_LENGTH(8);
10253 proto_tree_add_item(rtps_parameter_tree, hf_rtps_compression_plugin_class_id, tvb, offset, 4, encoding);
10254 proto_tree_add_item(rtps_parameter_tree, hf_rtps_uncompressed_serialized_length, tvb, offset + 4, 4, encoding);
10255
10256 compression_plugin_class = tvb_get_uint32(tvb, offset, encoding);
10257 decompressed_size = tvb_get_uint32(tvb, offset + 4, encoding);
10258 /* Get the number of bytes (elements) in the sequence */
10259 compressed_size = tvb_get_uint32(tvb, offset + 8, encoding);
10260
10261 switch(compression_plugin_class) {
10262 case RTI_OSAPI_COMPRESSION_CLASS_ID_ZLIB(1): {
10263 /* + 12 Because First 4 bytes of the sequence are the number of elements in the sequence */
10264 proto_tree_add_item(rtps_parameter_tree, hf_rtps_compressed_serialized_type_object, tvb, offset + 12, param_length - 8, encoding);
10265 compressed_type_object_subset = tvb_new_subset_length(tvb, offset + 12, decompressed_size);
10266 rtps_add_zlib_compressed_typeobject(rtps_parameter_tree, pinfo, compressed_type_object_subset,
10267 0, encoding, compressed_size, decompressed_size, type_mapping_object);
10268 break;
10269 }
10270 case RTI_OSAPI_COMPRESSION_CLASS_ID_NONE(0): {
10271 compressed_type_object_subset = tvb_new_subset_length(tvb, offset + 12, decompressed_size);
10272 rtps_util_add_typeobject(rtps_parameter_tree, pinfo,
10273 compressed_type_object_subset, 0, encoding, decompressed_size, type_mapping_object);
10274 break;
10275 }
10276 default: {
10277 /* + 12 Because First 4 bytes of the sequence are the number of elements in the sequence */
10278 proto_tree_add_item(rtps_parameter_tree, hf_rtps_compressed_serialized_type_object, tvb, offset + 12, param_length - 8, encoding);
10279 }
10280 }
10281 break;
10282 }
10283
10284 case PID_ENDPOINT_SECURITY_ATTRIBUTES(0x8018): {
10285 uint32_t flags;
10286 ENSURE_LENGTH(4);
10287 flags = tvb_get_uint32(tvb, offset, encoding);
10288 proto_tree_add_bitmask_value(rtps_parameter_tree, tvb, offset,
10289 hf_rtps_param_endpoint_security_attributes, ett_rtps_flags,
10290 ENDPOINT_SECURITY_ATTRIBUTES, flags);
10291 break;
10292 }
10293
10294 case PID_TOPIC_QUERY_PUBLICATION(0x8014): {
10295 ENSURE_LENGTH(8);
10296 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_topic_query_publication_enable,
10297 tvb, offset, 1, encoding);
10298 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_topic_query_publication_sessions,
10299 tvb, offset+4, 4, encoding);
10300 break;
10301 }
10302
10303 case PID_ENDPOINT_PROPERTY_CHANGE_EPOCH(0x8015): {
10304 ENSURE_LENGTH(8);
10305 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_endpoint_property_change_epoch,
10306 tvb, offset, 8, encoding);
10307 break;
10308 }
10309
10310 case PID_TOPIC_QUERY_GUID(0x8013):
10311 if (is_inline_qos) {
10312 ENSURE_LENGTH(16);
10313 rtps_util_add_generic_guid_v2(rtps_parameter_tree, tvb, offset,
10314 hf_rtps_endpoint_guid, hf_rtps_param_host_id, hf_rtps_param_app_id,
10315 hf_rtps_param_instance_id, hf_rtps_param_entity, hf_rtps_param_entity_key,
10316 hf_rtps_param_entity_kind, NULL((void*)0));
10317 }
10318 break;
10319
10320 case PID_REACHABILITY_LEASE_DURATION(0x8016):
10321 ENSURE_LENGTH(8);
10322 rtps_util_add_timestamp_sec_and_fraction(rtps_parameter_tree, tvb, offset, encoding,
10323 hf_rtps_participant_lease_duration);
10324 break;
10325
10326 case PID_RELATED_SOURCE_GUID(0x8012): {
10327 ENSURE_LENGTH(16);
10328 /* PID_RELATED_SOURCE_GUID */
10329 rtps_util_add_generic_guid_v2(rtps_parameter_tree, tvb, offset,
10330 hf_rtps_endpoint_guid, hf_rtps_param_host_id, hf_rtps_param_app_id,
10331 hf_rtps_param_instance_id, hf_rtps_param_entity, hf_rtps_param_entity_key,
10332 hf_rtps_param_entity_kind, NULL((void*)0));
10333 break;
10334 }
10335 /* 0...2...........7...............15.............23...............31
10336 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
10337 * | PID_TRANSPORT_INFO_LIST | length |
10338 * +---------------+---------------+---------------+---------------+
10339 * | unsigned long Seq.Length |
10340 * +---------------+---------------+---------------+---------------+
10341 * | ... |
10342 * | TransportInfo 1 |
10343 * | ... |
10344 * +---------------+---------------+---------------+---------------+
10345 * | ... |
10346 * | TransportInfo 2 |
10347 * | ... |
10348 * +---------------+---------------+---------------+---------------+
10349 * | ... |
10350 * | TransportInfo n |
10351 * | ... |
10352 * +---------------+---------------+---------------+---------------+
10353 *
10354 * IDL:
10355 * struct TRANSPORT_INFO {
10356 * long classid;
10357 * long messageSizeMax;
10358 * };
10359 *
10360 * struct TRANSPORT_INFO_LIST {
10361 * Sequence<TRANSPORT_INFO> TransportInfoList;
10362 * };
10363 *
10364 */
10365 /* PID_RELATED_READER_GUID and PID_TRANSPORT_INFO_LIST have the same value */
10366 case PID_TRANSPORT_INFO_LIST(0x8010): {
10367 if (is_inline_qos) {
10368 ENSURE_LENGTH(16);
10369 /* PID_RELATED_READER_GUID */
10370 rtps_util_add_generic_guid_v2(rtps_parameter_tree, tvb, offset,
10371 hf_rtps_endpoint_guid, hf_rtps_param_host_id, hf_rtps_param_app_id,
10372 hf_rtps_param_instance_id, hf_rtps_param_entity, hf_rtps_param_entity_key,
10373 hf_rtps_param_entity_kind, NULL((void*)0));
10374 } else {
10375 ENSURE_LENGTH(4);
10376 {
10377 int i;
10378 uint32_t temp_offset;
10379 uint32_t seq_size = tvb_get_uint32(tvb, offset, encoding);
10380 if (seq_size > 0) {
10381 temp_offset = offset+4; /* move to first transportInfo */
10382 i = 1;
10383 while(seq_size-- > 0) {
10384 rtps_util_add_transport_info(rtps_parameter_tree, tvb, temp_offset, encoding, i);
10385 temp_offset += 8;
10386 ++i;
10387 }
10388 }
10389 }
10390 }
10391 break;
10392 }
10393
10394 /* PID_DIRECT_COMMUNICATION and PID_SOURCE_GUID have the same value */
10395 case PID_DIRECT_COMMUNICATION(0x8011): {
10396 if (is_inline_qos) {
10397 ENSURE_LENGTH(16);
10398 /* PID_SOURCE_GUID */
10399 rtps_util_add_generic_guid_v2(rtps_parameter_tree, tvb, offset,
10400 hf_rtps_endpoint_guid, hf_rtps_param_host_id, hf_rtps_param_app_id,
10401 hf_rtps_param_instance_id, hf_rtps_param_entity, hf_rtps_param_entity_key,
10402 hf_rtps_param_entity_kind, NULL((void*)0));
10403 } else {
10404 proto_tree_add_item(rtps_parameter_tree, hf_rtps_direct_communication, tvb, offset, 1, ENC_NA0x00000000 );
10405 }
10406 break;
10407 }
10408
10409 /* Product Version Version 5.3.1 and earlier
10410 * 0...2...........7...............15.............23...............31
10411 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
10412 * | PID_TYPE_CONSISTENCY_KIND | length |
10413 * +---------------+---------------+---------------+---------------+
10414 * | unsigned short value Kind | = = u n u s e d = = = = = = |
10415 * +---------------+---------------+---------------+---------------+
10416 *
10417 * Product Version 5.3.3 and later
10418 * 0...2...........7...............15.............23...............31
10419 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
10420 * | PID_TYPE_CONSISTENCY_KIND | length |
10421 * +---------------+---------------+---------------+---------------+
10422 * | unsigned short value Kind | Boolean ISeqB | Boolean IStrB |
10423 * +---------------+---------------+---------------+---------------+
10424 * | Boolean IMemN | Boolean PTypW | Boolean FtypV | Boolean IEnLN |
10425 * +---------------+---------------+---------------+---------------+
10426 * ISeqB = Ignore Sequence Names
10427 * IStrB = Ignore String names
10428 * IMemN = Ignore Member Names
10429 * PTypW = Prevent Type Widening
10430 * FtypV = Force Type Validation
10431 * IEnLN = Ignore Enum Literal Names
10432 */
10433 case PID_TYPE_CONSISTENCY(0x0074): {
10434 if (param_length !=4 && param_length !=8) {
10435 expert_add_info_format(pinfo, rtps_parameter_tree,
10436 &ei_rtps_pid_type_csonsistency_invalid_size,
10437 "PID_TYPE_CONSISTENCY invalid size. It has a size of %d bytes. Expected %d or %d bytes.",
10438 param_length, 4, 8);
10439 break;
10440 }
10441 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_type_consistency_kind, tvb, offset, 2, encoding);
10442 /* Parameter size can be used as a discriminator between product versions. */
10443 if (param_length == 8) {
10444 offset += 2;
10445 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_ignore_sequence_bounds,
10446 tvb, offset, 1, encoding);
10447 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_ignore_string_bounds,
10448 tvb, offset + 1, 1, encoding);
10449 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_ignore_member_names,
10450 tvb, offset + 2, 1, encoding);
10451 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_prevent_type_widening,
10452 tvb, offset + 3, 1, encoding);
10453 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_force_type_validation,
10454 tvb, offset + 4, 1, encoding);
10455 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_ignore_enum_literal_names,
10456 tvb, offset + 5, 1, encoding);
10457 }
10458 break;
10459 }
10460
10461 /* ==================================================================
10462 * Here are all the deprecated items.
10463 */
10464
10465 /* 0...2...........7...............15.............23...............31
10466 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
10467 * | PID_PRODUCT_VERSION | length |
10468 * +---------------+---------------+---------------+---------------+
10469 * | uint8 major | uint8 minor | uint8 release |uint8 revision |
10470 * +---------------+---------------+---------------+---------------+
10471 */
10472 case PID_PRODUCT_VERSION(0x8000): {
10473 ENSURE_LENGTH(4);
10474 rtps_util_add_product_version(rtps_parameter_tree, pinfo, tvb, offset, vendor_id);
10475 break;
10476 }
10477
10478 /* 0...2...........7...............15.............23...............31
10479 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
10480 * | PID_PLUGIN_PROMISCUITY_KIND | length |
10481 * +---------------+---------------+---------------+---------------+
10482 * | short value | |
10483 * +---------------+---------------+---------------+---------------+
10484 */
10485 case PID_PLUGIN_PROMISCUITY_KIND(0x8001): {
10486 ENSURE_LENGTH(4);
10487 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_plugin_promiscuity_kind, tvb, offset, 4, encoding);
10488 break;
10489 }
10490 /* 0...2...........7...............15.............23...............31
10491 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
10492 * | PID_ENTITY_VIRTUAL_GUID | length |
10493 * +---------------+---------------+---------------+---------------+
10494 * | |
10495 * +- -+
10496 * | octet[12] guidPrefix |
10497 * +- -+
10498 * | |
10499 * +---------------+---------------+---------------+---------------+
10500 * | octet[4] entityId |
10501 * +---------------+---------------+---------------+---------------+
10502 */
10503
10504 case PID_ENTITY_VIRTUAL_GUID(0x8002): {
10505 ENSURE_LENGTH(16);
10506 rtps_util_add_guid_prefix_v2(rtps_parameter_tree, tvb, offset,
10507 hf_rtps_sm_guid_prefix, hf_rtps_sm_host_id, hf_rtps_sm_app_id,
10508 hf_rtps_sm_instance_id, 0);
10509 rtps_util_add_entity_id(rtps_parameter_tree, pinfo, tvb, offset+12,
10510 hf_rtps_sm_entity_id, hf_rtps_sm_entity_id_key, hf_rtps_sm_entity_id_kind,
10511 ett_rtps_entity, "virtualGUIDSuffix", NULL((void*)0));
10512 break;
10513 }
10514
10515
10516 /* 0...2...........7...............15.............23...............31
10517 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
10518 * | PID_SERVICE_KIND | length |
10519 * +---------------+---------------+---------------+---------------+
10520 * | long value |
10521 * +---------------+---------------+---------------+---------------+
10522 */
10523 case PID_SERVICE_KIND(0x8003): {
10524 ENSURE_LENGTH(4);
10525 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_service_kind, tvb, offset, 4, encoding);
10526 break;
10527 }
10528
10529
10530 case PID_ROLE_NAME(0x800a): {
10531 rtps_util_add_string(rtps_parameter_tree, tvb, offset, hf_rtps_param_role_name, encoding);
10532 break;
10533 }
10534
10535
10536 case PID_ACK_KIND(0x800b): {
10537 ENSURE_LENGTH(4);
10538 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_acknowledgment_kind, tvb, offset, 4, encoding);
10539 break;
10540 }
10541
10542 /* 0...2...........7...............15.............23...............31
10543 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
10544 * | PID_PEER_HOST_EPOCH | length |
10545 * +---------------+---------------+---------------+---------------+
10546 * | unsigned long epoch |
10547 * +---------------+---------------+---------------+---------------+
10548 */
10549 case PID_PEER_HOST_EPOCH(0x800e): {
10550 ENSURE_LENGTH(4);
10551 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_peer_host_epoch, tvb, offset, 4, encoding);
10552 break;
10553 }
10554
10555 /* 0...2...........7...............15.............23...............31
10556 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
10557 * | PID_DOMAIN_ID|PID_RTI_DOMAIN_ID| length |
10558 * +---------------+---------------+---------------+---------------+
10559 * | long domain_id |
10560 * +---------------+---------------+---------------+---------------+
10561 */
10562
10563 case PID_RTI_DOMAIN_ID(0x800f):
10564 case PID_DOMAIN_ID(0x000f): {
10565 if (is_inline_qos) { /* PID_RELATED_ORIGINAL_WRITER_INFO_LEGACY */
10566 ENSURE_LENGTH(16);
10567 rtps_util_add_guid_prefix_v2(rtps_parameter_tree, tvb, offset, hf_rtps_sm_guid_prefix,
10568 hf_rtps_sm_host_id, hf_rtps_sm_app_id, hf_rtps_sm_instance_id, 0);
10569 rtps_util_add_entity_id(rtps_parameter_tree, pinfo, tvb, offset+12, hf_rtps_sm_entity_id,
10570 hf_rtps_sm_entity_id_key, hf_rtps_sm_entity_id_kind, ett_rtps_entity,
10571 "virtualGUIDSuffix", NULL((void*)0));
10572 /* Sequence number */
10573 rtps_util_add_seq_number(rtps_parameter_tree, tvb, offset+16,
10574 encoding, "virtualSeqNumber");
10575 } else {
10576 ENSURE_LENGTH(4);
10577 proto_tree_add_item(rtps_parameter_tree, hf_rtps_domain_id, tvb, offset, 4, encoding);
10578
10579 /* Each packet stores its participant guid in the private table. This is done in dissect_rtps */
10580 endpoint_guid *participant_guid = (endpoint_guid*)p_get_proto_data(pinfo->pool, pinfo, proto_rtps, RTPS_TCPMAP_DOMAIN_ID_PROTODATA_KEY0);
10581 if (participant_guid != NULL((void*)0)) {
10582 /* Since this information is fixed there is no need to update in a second pass */
10583 if (!wmem_map_contains(discovered_participants_domain_ids, participant_guid)) {
10584 int domainId = tvb_get_int32(tvb, offset, encoding);
10585 participant_info *p_info = (participant_info*)wmem_new(wmem_file_scope(), participant_info)((participant_info*)wmem_alloc((wmem_file_scope()), sizeof(participant_info
)))
;
10586 p_info->domainId = domainId;
10587 endpoint_guid *participant_guid_copy = (endpoint_guid*)wmem_memdup(wmem_file_scope(),
10588 participant_guid, sizeof(endpoint_guid));
10589 wmem_map_insert(discovered_participants_domain_ids,
10590 (const void*)participant_guid_copy, (void*)p_info);
10591 }
10592 }
10593 }
10594 break;
10595 }
10596
10597 case PID_RELATED_ORIGINAL_WRITER_INFO(0x0083): {
10598 if (is_inline_qos) { /* PID_RELATED_ORIGINAL_WRITER_INFO */
10599 ENSURE_LENGTH(16);
10600 rtps_util_add_guid_prefix_v2(
10601 rtps_parameter_tree,
10602 tvb,
10603 offset,
10604 hf_rtps_sm_guid_prefix,
10605 hf_rtps_sm_host_id,
10606 hf_rtps_sm_app_id,
10607 hf_rtps_sm_instance_id,
10608 0);
10609 rtps_util_add_entity_id(
10610 rtps_parameter_tree,
10611 pinfo, tvb,
10612 offset + 12,
10613 hf_rtps_sm_entity_id,
10614 hf_rtps_sm_entity_id_key,
10615 hf_rtps_sm_entity_id_kind,
10616 ett_rtps_entity,
10617 "virtualGUIDSuffix",
10618 NULL((void*)0));
10619 /* Sequence number */
10620 rtps_util_add_seq_number(
10621 rtps_parameter_tree,
10622 tvb,
10623 offset + 16,
10624 encoding,
10625 "virtualSeqNumber");
10626 }
10627 break;
10628 }
10629
10630 /* 0...2...........7...............15.............23...............31
10631 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
10632 * | PID_DOMAIN_TAG | length |
10633 * +---------------+---------------+---------------+---------------+
10634 * | long domain_tag.Length |
10635 * +---------------+---------------+---------------+---------------+
10636 * | string domain_tag |
10637 * | ... |
10638 * +---------------+---------------+---------------+---------------+
10639 */
10640 case PID_DOMAIN_TAG(0x4014): {
10641 ENSURE_LENGTH(4);
10642 rtps_util_add_string(rtps_parameter_tree, tvb, offset, hf_rtps_domain_tag, encoding);
10643 break;
10644 }
10645
10646 case PID_EXTENDED(0x3f01): {
10647 ENSURE_LENGTH(8);
10648 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_extended_parameter, tvb, offset, 4, encoding);
10649 offset += 4;
10650 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_extended_pid_length, tvb, offset, 4, encoding);
10651 break;
10652 }
10653
10654 case PID_TYPE_OBJECT(0x0072): {
10655 rtps_util_add_typeobject(rtps_parameter_tree, pinfo, tvb,
10656 offset, encoding, param_length, type_mapping_object);
10657 break;
10658 }
10659
10660 /* 0...2...........7...............15.............23...............31
10661 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
10662 * | PID_TYPECODE_RTPS2 | length |
10663 * +---------------+---------------+---------------+---------------+
10664 * | |
10665 * + Type code description +
10666 * | |
10667 * +---------------+---------------+---------------+---------------+
10668 */
10669 case PID_TYPECODE(0x47):
10670 case PID_TYPECODE_RTPS2(0x8004): {
10671 rtps_util_add_typecode(rtps_parameter_tree,
10672 tvb,
10673 pinfo,
10674 offset,
10675 encoding,
10676 0, /* indent level */
10677 0, /* isPointer */
10678 -1, /* bitfield */
10679 0, /* isKey */
10680 offset,
10681 NULL((void*)0), /* name */
10682 -1, /* not a seq field */
10683 NULL((void*)0), /* not an array */
10684 0); /* ndds 4.0 hack: init to false */
10685 break;
10686 }
10687
10688 /* 0...2...........7...............15.............23...............31
10689 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
10690 * | PID_DISABLE_POSITIVE_ACKS | length |
10691 * +---------------+---------------+---------------+---------------+
10692 * | boolean value | = = = = = = = = u n u s e d = = = = = = = = |
10693 * +---------------+---------------+---------------+---------------+
10694 */
10695 case PID_DISABLE_POSITIVE_ACKS(0x8005): {
10696 ENSURE_LENGTH(1);
10697 proto_tree_add_item(rtps_parameter_tree, hf_rtps_disable_positive_ack, tvb, offset, 1, ENC_NA0x00000000 );
10698 break;
10699 }
10700
10701 /* 0...2...........7...............15.............23...............31
10702 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
10703 * | PID_EXPECTS_VIRTUAL_HB | length |
10704 * +---------------+---------------+---------------+---------------+
10705 * | boolean value | = = = = = = = = u n u s e d = = = = = = = = |
10706 * +---------------+---------------+---------------+---------------+
10707 */
10708 case PID_EXPECTS_VIRTUAL_HB(0x8009): {
10709 ENSURE_LENGTH(1);
10710 proto_tree_add_item(rtps_parameter_tree, hf_rtps_expects_virtual_heartbeat, tvb, offset, 1, ENC_NA0x00000000 );
10711 break;
10712 }
10713
10714 /* 0...2...........7...............15.............23...............31
10715 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
10716 * | PID_LOCATOR_FILTER_LIST | length |
10717 * +---------------+---------------+---------------+---------------+
10718 * | unsigned long number_of_channels |
10719 * +---------------+---------------+---------------+---------------+
10720 * | |
10721 * ~ String filter_name ~
10722 * | |
10723 * +---------------+---------------+---------------+---------------+
10724 * | |
10725 * ~ LocatorList ~ <----------+
10726 * | | Repeat |
10727 * +---------------+---------------+---------------+---------------+ For each|
10728 * | | Channel |
10729 * ~ String filter_expression ~ |
10730 * | | |
10731 * +---------------+---------------+---------------+---------------+ <----------+
10732 */
10733 case PID_LOCATOR_FILTER_LIST(0x8006): {
10734 int32_t number_of_channels, ch;
10735 proto_tree *channel_tree;
10736 proto_item *ti_channel;
10737 char temp_buff[20];
10738 int old_offset;
10739 uint32_t off = offset;
10740
10741 ENSURE_LENGTH(4);
10742 proto_tree_add_item_ret_int(rtps_parameter_tree, hf_rtps_locator_filter_list_num_channels, tvb, off, 4, encoding, &number_of_channels );
10743 proto_item_append_text(parameter_item, " (%d channels)", number_of_channels );
10744 off += 4;
10745
10746 if (number_of_channels == 0) {
10747 /* Do not dissect the rest */
10748 break;
10749 }
10750
10751 /* filter name */
10752 off = rtps_util_add_string(rtps_parameter_tree, tvb, off, hf_rtps_locator_filter_list_filter_name, encoding);
10753
10754 /* Foreach channel... */
10755 for (ch = 0; ch < number_of_channels; ++ch) {
10756 snprintf(temp_buff, 20, "Channel[%u]", ch);
10757 old_offset = off;
10758 channel_tree = proto_tree_add_subtree_format(rtps_parameter_tree, tvb, off, 0, ett_rtps_locator_filter_channel, &ti_channel, "Channel[%u]", ch);
10759
10760 off = rtps_util_add_multichannel_locator_list(channel_tree, pinfo, tvb, off, temp_buff, encoding);
10761 /* Filter expression */
10762 off = rtps_util_add_string(rtps_parameter_tree, tvb, off, hf_rtps_locator_filter_list_filter_exp, encoding);
10763
10764 /* Now we know the length of the channel data, set the length */
10765 proto_item_set_len(ti_channel, (off - old_offset));
10766 } /* End of for each channel */
10767 break;
10768 }/* End of case PID_LOCATOR_FILTER_LIST */
10769
10770 /* 0...2...........7...............15.............23...............31
10771 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
10772 * | PID_UNICAST_LOCATOR_EX | 0x8007 |
10773 * +---------------+---------------+---------------+---------------+
10774 * | long kind |
10775 * +---------------+---------------+---------------+---------------+
10776 * | long port |
10777 * +---------------+---------------+---------------+---------------+
10778 * | ipv6addr[0] | ipv6addr[1] | ipv6addr[2] | ipv6addr[3] |
10779 * +---------------+---------------+---------------+---------------+
10780 * | ipv6addr[4] | ipv6addr[5] | ipv6addr[6] | ipv6addr[7] |
10781 * +---------------+---------------+---------------+---------------+
10782 * | ipv6addr[8] | ipv6addr[9] | ipv6addr[10] | ipv6addr[11] |
10783 * +---------------+---------------+---------------+---------------+
10784 * | ipv6addr[12] | ipv6addr[13] | ipv6addr[14] | ipv6addr[15] |
10785 * +---------------+---------------+---------------+---------------+
10786 * | Locator Sequence Length |
10787 * +---------------+---------------+---------------+---------------+
10788 * | Locator 1 | Locator 2 |
10789 * +---------------+---------------+---------------+---------------+
10790 */
10791 case PID_UNICAST_LOCATOR_EX(0x8007): {
10792 ENSURE_LENGTH(28);
10793 rtps_util_add_locator_ex_t(rtps_parameter_tree, pinfo, tvb, offset, encoding, param_length);
10794 break;
10795 }
10796
10797 case PID_ENDPOINT_SECURITY_SYMMETRIC_CIPHER_ALGO(0x1013): {
10798 ENSURE_LENGTH(4);
10799 proto_tree_add_bitmask(
10800 rtps_parameter_tree,
10801 tvb,
10802 offset,
10803 hf_rtps_param_participant_security_symmetric_cipher_algorithms_builtin_endpoints_required_mask,
10804 ett_rtps_flags,
10805 (vendor_id == RTPS_VENDOR_RTI_DDS(0x0101))
10806 ? RTI_SECURITY_SIMMETRIC_CIPHER_MASK_FLAGS
10807 : SECURITY_SIMMETRIC_CIPHER_MASK_FLAGS,
10808 encoding);
10809
10810 break;
10811 }
10812
10813 case PID_PARTICIPANT_SECURITY_SYMMETRIC_CIPHER_ALGO(0x1012): {
10814 uint32_t algo_length = param_length;
10815 /*
10816 * Only the first field is always available, the remaining three might
10817 * be available in the capture or not. dissect_crypto_algo_bitmask
10818 * takes that into consideration and add the default values if the field
10819 * is not available in the capture.
10820 */
10821 dissect_crypto_algo_bitmask(
10822 rtps_parameter_tree,
10823 tvb,
10824 &offset,
10825 &algo_length,
10826 hf_rtps_param_participant_security_symmetric_cipher_algorithms_supported_mask,
10827 ett_rtps_flags,
10828 (vendor_id == RTPS_VENDOR_RTI_DDS(0x0101))
10829 ? RTI_SECURITY_SIMMETRIC_CIPHER_MASK_FLAGS
10830 : SECURITY_SIMMETRIC_CIPHER_MASK_FLAGS,
10831 encoding,
10832 "Supported Mask",
10833 SECURITY_KEY_ESTABLISHMENT_ALGORITHM_INFO_SUPPORTED_MASK_DEFAULT0x00000003,
10834 "AES128_GCM, AES256_GCM");
10835 dissect_crypto_algo_bitmask(
10836 rtps_parameter_tree,
10837 tvb,
10838 &offset,
10839 &algo_length,
10840 hf_rtps_param_participant_security_symmetric_cipher_algorithms_builtin_endpoints_required_mask,
10841 ett_rtps_flags,
10842 (vendor_id == RTPS_VENDOR_RTI_DDS(0x0101))
10843 ? RTI_SECURITY_SIMMETRIC_CIPHER_MASK_FLAGS
10844 : SECURITY_SIMMETRIC_CIPHER_MASK_FLAGS,
10845 encoding,
10846 "Builtin Endpoints Required Mask",
10847 SECURITY_KEY_ESTABLISHMENT_ALGORITHM_INFO_SUPPORTED_MASK_DEFAULT0x00000003,
10848 "AES256_GCM");
10849 dissect_crypto_algo_bitmask(
10850 rtps_parameter_tree,
10851 tvb,
10852 &offset,
10853 &algo_length,
10854 hf_rtps_param_participant_security_symmetric_cipher_algorithms_builtin_endpoints_key_exchange_used_bit,
10855 ett_rtps_flags,
10856 (vendor_id == RTPS_VENDOR_RTI_DDS(0x0101))
10857 ? RTI_SECURITY_SIMMETRIC_CIPHER_MASK_FLAGS
10858 : SECURITY_SIMMETRIC_CIPHER_MASK_FLAGS,
10859 encoding,
10860 "Key Exchange Builtin Endpoints Required Mask",
10861 SECURITY_KEY_ESTABLISHMENT_ALGORITHM_INFO_SUPPORTED_MASK_DEFAULT0x00000003,
10862 "AES256_GCM");
10863 dissect_crypto_algo_bitmask(
10864 rtps_parameter_tree,
10865 tvb,
10866 &offset,
10867 &algo_length,
10868 hf_rtps_param_participant_security_symmetric_cipher_algorithms_user_endpoints_default_required_mask,
10869 ett_rtps_flags,
10870 (vendor_id == RTPS_VENDOR_RTI_DDS(0x0101))
10871 ? RTI_SECURITY_SIMMETRIC_CIPHER_MASK_FLAGS
10872 : SECURITY_SIMMETRIC_CIPHER_MASK_FLAGS,
10873 encoding,
10874 "Key Endpoints Default Required Mask",
10875 SECURITY_KEY_ESTABLISHMENT_ALGORITHM_INFO_SUPPORTED_MASK_DEFAULT0x00000003,
10876 "AES256_GCM");
10877 break;
10878 }
10879
10880 case PID_PARTICIPANT_SECURITY_KEY_ESTABLISHMENT_ALGO(0x1011): {
10881 uint32_t algo_length = param_length;
10882 proto_tree *sub_tree = proto_tree_add_subtree(rtps_parameter_tree, tvb, offset, 4,
10883 ett_rtps_crypto_algorithm_requirements, NULL((void*)0), "Shared Secret");
10884 dissect_crypto_algorithm_requirements(sub_tree, tvb, offset, &algo_length, encoding,
10885 (vendor_id == RTPS_VENDOR_RTI_DDS(0x0101))
10886 ? RTI_SECURITY_KEY_ESTABLISHMENT_MASK_FLAGS
10887 : SECURITY_KEY_ESTABLISHMENT_MASK_FLAGS,
10888 SECURITY_KEY_ESTABLISHMENT_ALGORITHM_INFO_SUPPORTED_MASK_DEFAULT0x00000003,
10889 "DHE_MODP_2048_256, ECDHE_CEUM_P256",
10890 SECURITY_KEY_ESTABLISHMENT_ALGORITHM_INFO_REQUIRED_MASK_DEFAULT0x00000002,
10891 "ECDHE_CEUM_P256");
10892 break;
10893 }
10894
10895 case PID_PARTICIPANT_SECURITY_DIGITAL_SIGNATURE_ALGO(0x1010): {
10896 uint32_t algo_length = param_length;
10897 proto_tree *sub_tree = proto_tree_add_subtree(rtps_parameter_tree, tvb, offset, 4,
10898 ett_rtps_crypto_algorithm_requirements, NULL((void*)0), "Trust Chain");
10899 offset = dissect_crypto_algorithm_requirements( sub_tree, tvb, offset, &algo_length, encoding,
10900 (vendor_id == RTPS_VENDOR_RTI_DDS(0x0101))
10901 ? RTI_SECURITY_DIGITAL_SIGNATURE_MASK_FLAGS
10902 : SECURITY_DIGITAL_SIGNATURE_MASK_FLAGS,
10903 SECURITY_DIGITAL_SIGNATURE_ALGORITHM_INFO_TRUST_CHAIN_SUPPORTED_MASK_DEFAULT0x00000007,
10904 "RSASSA_PKCS1V15_2048_SHA256, RSASSA_PSS_MGF1SHA256_2048_SHA256, ECDSA_P256_SHA256",
10905 SECURITY_DIGITAL_SIGNATURE_ALGORITHM_INFO_TRUST_CHAIN_REQUIRED_MASK_DEFAULT0x00000004,
10906 "ECDSA_P256_SHA256");
10907 sub_tree = proto_tree_add_subtree(rtps_parameter_tree, tvb, offset,
10908 (algo_length > 0) ? 4 : 0, ett_rtps_crypto_algorithm_requirements, NULL((void*)0), "Message Authentication");
10909 dissect_crypto_algorithm_requirements( sub_tree, tvb, offset, &algo_length, encoding,
10910 (vendor_id == RTPS_VENDOR_RTI_DDS(0x0101))
10911 ? RTI_SECURITY_DIGITAL_SIGNATURE_MASK_FLAGS
10912 : SECURITY_DIGITAL_SIGNATURE_MASK_FLAGS,
10913 SECURITY_DIGITAL_SIGNATURE_ALGORITHM_INFO_MESSAGE_AUTH_SUPPORTED_MASK_DEFAULT0x00000005,
10914 "RSASSA_PSS_MGF1SHA256_2048_SHA256, ECDSA_P256_SHA256",
10915 SECURITY_DIGITAL_SIGNATURE_ALGORITHM_INFO_MESSAGE_AUTH_REQUIRED_MASK_DEFAULT0x00000004,
10916 "ECDSA_P256_SHA256");
10917 break;
10918 }
10919
10920 default: {
10921 return false0;
10922 }
10923 }/* End of switch for parameters for vendor RTI */
10924 return true1;
10925}
10926
10927static bool_Bool dissect_parameter_sequence_toc(proto_tree *rtps_parameter_tree, packet_info *pinfo _U___attribute__((unused)),
10928 tvbuff_t *tvb, proto_item *parameter_item _U___attribute__((unused)), proto_item *param_len_item _U___attribute__((unused)), int offset,
10929 const unsigned encoding, int param_length _U___attribute__((unused)),
10930 uint16_t parameter) {
10931
10932 switch(parameter) {
10933
10934 /* 0...2...........7...............15.............23...............31
10935 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
10936 * | PID_TYPECODE_RTPS2 | length |
10937 * +---------------+---------------+---------------+---------------+
10938 * | |
10939 * + Type code description +
10940 * | |
10941 * +---------------+---------------+---------------+---------------+
10942 */
10943 case PID_TYPECODE_RTPS2(0x8004): {
10944 rtps_util_add_typecode(rtps_parameter_tree,
10945 tvb,
10946 pinfo,
10947 offset,
10948 encoding,
10949 0, /* indent level */
10950 0, /* isPointer */
10951 -1, /* bitfield */
10952 0, /* isKey */
10953 offset,
10954 NULL((void*)0), /* name */
10955 0, /* not a seq field */
10956 NULL((void*)0), /* not an array */
10957 0); /* ndds 4.0 hack: init to false */
10958 break;
10959 }
10960
10961 default:
10962 return false0;
10963 }
10964 return true1;
10965}
10966
10967static bool_Bool dissect_parameter_sequence_adl(proto_tree *rtps_parameter_tree _U___attribute__((unused)), packet_info *pinfo _U___attribute__((unused)),
10968 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)),
10969 const unsigned encoding _U___attribute__((unused)), int param_length _U___attribute__((unused)),
10970 uint16_t parameter) {
10971
10972 switch(parameter) {
10973
10974 case PID_ADLINK_WRITER_INFO(0x8001): {
10975 break;
10976 }
10977 case PID_ADLINK_READER_DATA_LIFECYCLE(0x8002): {
10978 break;
10979 }
10980 case PID_ADLINK_WRITER_DATA_LIFECYCLE(0x8003): {
10981 break;
10982 }
10983 case PID_ADLINK_ENDPOINT_GUID(0x8004): {
10984 break;
10985 }
10986 case PID_ADLINK_SYNCHRONOUS_ENDPOINT(0x8005): {
10987 break;
10988 }
10989 case PID_ADLINK_RELAXED_QOS_MATCHING(0x8006): {
10990 break;
10991 }
10992 case PID_ADLINK_PARTICIPANT_VERSION_INFO(0x8007): {
10993 break;
10994 }
10995 case PID_ADLINK_NODE_NAME(0x8008): {
10996 break;
10997 }
10998 case PID_ADLINK_EXEC_NAME(0x8009): {
10999 break;
11000 }
11001 case PID_ADLINK_PROCESS_ID(0x800a): {
11002 break;
11003 }
11004 case PID_ADLINK_SERVICE_TYPE(0x800b): {
11005 break;
11006 }
11007 case PID_ADLINK_ENTITY_FACTORY(0x800c): {
11008 break;
11009 }
11010 case PID_ADLINK_WATCHDOG_SCHEDULING(0x800d): {
11011 break;
11012 }
11013 case PID_ADLINK_LISTENER_SCHEDULING(0x800e): {
11014 break;
11015 }
11016 case PID_ADLINK_SUBSCRIPTION_KEYS(0x800f): {
11017 break;
11018 }
11019 case PID_ADLINK_READER_LIFESPAN(0x8010): {
11020 break;
11021 }
11022 case PID_ADLINK_SHARE(0x8011): {
11023 break;
11024 }
11025 case PID_ADLINK_TYPE_DESCRIPTION(0x8012): {
11026 break;
11027 }
11028 case PID_ADLINK_LAN_ID(0x8013): {
11029 break;
11030 }
11031 case PID_ADLINK_ENDPOINT_GID(0x8014): {
11032 break;
11033 }
11034 case PID_ADLINK_GROUP_GID(0x8015): {
11035 break;
11036 }
11037 case PID_ADLINK_EOTINFO(0x8016): {
11038 break;
11039 }
11040 case PID_ADLINK_PART_CERT_NAME(0x8017): {
11041 break;
11042 }
11043 case PID_ADLINK_LAN_CERT_NAME(0x8018): {
11044 break;
11045 }
11046 default:
11047 return false0;
11048 }
11049 return true1;
11050}
11051
11052
11053static bool_Bool dissect_parameter_sequence_v1(proto_tree *rtps_parameter_tree, packet_info *pinfo, tvbuff_t *tvb,
11054 proto_item *parameter_item, proto_item * param_len_item, int offset,
11055 const unsigned encoding, int size, int param_length,
11056 uint16_t parameter, uint16_t version, type_mapping * type_mapping_object,
11057 coherent_set_entity_info *coherent_set_entity_info_object) {
11058
11059 proto_tree *subtree;
11060
11061 switch(parameter) {
11062
11063 /* 0...2...........7...............15.............23...............31
11064 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11065 * | PID_PARTICIPANT_LEASE_DURATION| 0x0008 |
11066 * +---------------+---------------+---------------+---------------+
11067 * | long NtpTime.seconds |
11068 * +---------------+---------------+---------------+---------------+
11069 * | unsigned long NtpTime.fraction |
11070 * +---------------+---------------+---------------+---------------+
11071 */
11072 case PID_PARTICIPANT_LEASE_DURATION(0x02):
11073 ENSURE_LENGTH(8);
11074 rtps_util_add_timestamp_sec_and_fraction(rtps_parameter_tree, tvb, offset, encoding,
11075 hf_rtps_participant_lease_duration);
11076 break;
11077
11078
11079 /* 0...2...........7...............15.............23...............31
11080 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11081 * | PID_TIME_BASED_FILTER | 0x0008 |
11082 * +---------------+---------------+---------------+---------------+
11083 * | long NtpTime.seconds |
11084 * +---------------+---------------+---------------+---------------+
11085 * | unsigned long NtpTime.fraction |
11086 * +---------------+---------------+---------------+---------------+
11087 */
11088 case PID_TIME_BASED_FILTER(0x04):
11089 ENSURE_LENGTH(8);
11090 rtps_util_add_timestamp_sec_and_fraction(rtps_parameter_tree, tvb, offset, encoding,
11091 hf_rtps_time_based_filter_minimum_separation);
11092 break;
11093
11094 /* 0...2...........7...............15.............23...............31
11095 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11096 * | PID_TOPIC_NAME | length |
11097 * +---------------+---------------+---------------+---------------+
11098 * | unsigned long String.length |
11099 * +---------------+---------------+---------------+---------------+
11100 * | str[0] | str[1] | str[2] | str[3] |
11101 * +---------------+---------------+---------------+---------------+
11102 * | ... |
11103 * +---------------+---------------+---------------+---------------+
11104 */
11105 case PID_TOPIC_NAME(0x05): {
11106 const char * retVal = NULL((void*)0);
11107 uint32_t str_size = tvb_get_uint32(tvb, offset, encoding);
11108
11109 retVal = (char*)tvb_get_string_enc(pinfo->pool, tvb, offset+4, str_size, ENC_ASCII0x00000000);
11110 rtps_util_add_string(rtps_parameter_tree, tvb, offset, hf_rtps_param_topic_name, encoding);
11111 /* If topic information is enabled we have to store the topic name for showing after the DATA(r|w)
11112 * in the infor column. This information is used in append_status_info function.
11113 */
11114 if (retVal != NULL((void*)0) && enable_topic_info) {
11115 submessage_col_info* current_submessage_col_info = NULL((void*)0);
11116
11117 rtps_util_store_type_mapping(pinfo, tvb, offset, type_mapping_object, retVal, TOPIC_INFO_ADD_TOPIC_NAME(0x04));
11118 /* retVal has packet scope lifetime, enough for adding to the DATA(r|w) column information */
11119 current_submessage_col_info = (submessage_col_info*)p_get_proto_data(pinfo->pool, pinfo, proto_rtps, RTPS_CURRENT_SUBMESSAGE_COL_DATA_KEY3);
11120 if (current_submessage_col_info != NULL((void*)0) && current_submessage_col_info->topic_name == NULL((void*)0)) {
11121 current_submessage_col_info->topic_name = retVal;
11122 }
11123 }
11124 break;
11125 }
11126
11127 /* 0...2...........7...............15.............23...............31
11128 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11129 * | PID_OWNERSHIP_STRENGTH | 0x0004 |
11130 * +---------------+---------------+---------------+---------------+
11131 * | long strength |
11132 * +---------------+---------------+---------------+---------------+
11133 */
11134 case PID_OWNERSHIP_STRENGTH(0x06):
11135 ENSURE_LENGTH(4);
11136 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_strength, tvb, offset, 4, encoding);
11137 break;
11138
11139 /* 0...2...........7...............15.............23...............31
11140 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11141 * | PID_TYPE_NAME | length |
11142 * +---------------+---------------+---------------+---------------+
11143 * | unsigned long String.length |
11144 * +---------------+---------------+---------------+---------------+
11145 * | str[0] | str[1] | str[2] | str[3] |
11146 * +---------------+---------------+---------------+---------------+
11147 * | ... |
11148 * +---------------+---------------+---------------+---------------+
11149 */
11150 case PID_TYPE_NAME(0x07): {
11151 const char * retVal = NULL((void*)0);
11152 uint32_t str_size = tvb_get_uint32(tvb, offset, encoding);
11153
11154 retVal = (char*) tvb_get_string_enc(pinfo->pool, tvb, offset+4, str_size, ENC_ASCII0x00000000);
11155
11156 rtps_util_store_type_mapping(pinfo, tvb, offset, type_mapping_object,
11157 retVal, TOPIC_INFO_ADD_TYPE_NAME(0x02));
11158
11159 rtps_util_add_string(rtps_parameter_tree, tvb, offset, hf_rtps_param_type_name, encoding);
11160 break;
11161 }
11162
11163 /* 0...2...........7...............15.............23...............31
11164 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11165 * | PID_XXXXXXXXXXX | 0x0004 |
11166 * +---------------+---------------+---------------+---------------+
11167 * | long port |
11168 * +---------------+---------------+---------------+---------------+
11169 */
11170 case PID_METATRAFFIC_MULTICAST_PORT(0x46):
11171 case PID_METATRAFFIC_UNICAST_PORT(0x0d):
11172 case PID_DEFAULT_UNICAST_PORT(0x0e):
11173 ENSURE_LENGTH(4);
11174 rtps_util_add_port(rtps_parameter_tree, pinfo, tvb, offset, encoding, hf_rtps_param_port);
11175 break;
11176
11177 /* 0...2...........7...............15.............23...............31
11178 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11179 * | PID_EXPECTS_INLINE_QOS | 0x0004 |
11180 * +---------------+---------------+---------------+---------------+
11181 * | boolean | N O T U S E D |
11182 * +---------------+---------------+---------------+---------------+
11183 */
11184 case PID_EXPECTS_INLINE_QOS(0x43):
11185 ENSURE_LENGTH(1);
11186 proto_tree_add_item(rtps_parameter_tree, hf_rtps_expects_inline_qos, tvb, offset, 1, ENC_NA0x00000000 );
11187 break;
11188
11189 /* 0...2...........7...............15.............23...............31
11190 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11191 * | PID_XXXXXXXXXXX | length |
11192 * +---------------+---------------+---------------+---------------+
11193 * | unsigned long ip_address |
11194 * +---------------+---------------+---------------+---------------+
11195 */
11196 case PID_METATRAFFIC_MULTICAST_IPADDRESS(0x0b):
11197 case PID_DEFAULT_UNICAST_IPADDRESS(0x0c):
11198 case PID_MULTICAST_IPADDRESS(0x11):
11199 case PID_METATRAFFIC_UNICAST_IPADDRESS(0x45):
11200 rtps_util_add_ipv4_address_t(rtps_parameter_tree, pinfo, tvb, offset,
11201 encoding, hf_param_ip_address);
11202 break;
11203
11204 /* 0...2...........7...............15.............23...............31
11205 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11206 * | PID_PROTOCOL_VERSION | 0x0004 |
11207 * +---------------+---------------+---------------+---------------+
11208 * | uint8 major | uint8 minor | N O T U S E D |
11209 * +---------------+---------------+---------------+---------------+
11210 */
11211 case PID_PROTOCOL_VERSION(0x15):
11212 ENSURE_LENGTH(2);
11213 rtps_util_add_protocol_version(rtps_parameter_tree, tvb, offset);
11214 break;
11215
11216 /* 0...2...........7...............15.............23...............31
11217 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11218 * | PID_VENDOR_ID | 0x0004 |
11219 * +---------------+---------------+---------------+---------------+
11220 * | uint8 major | uint8 minor | N O T U S E D |
11221 * +---------------+---------------+---------------+---------------+
11222 */
11223 case PID_VENDOR_ID(0x16):
11224 ENSURE_LENGTH(2);
11225 rtps_util_add_vendor_id(rtps_parameter_tree, tvb, offset);
11226 break;
11227
11228 /* 0...2...........7...............15.............23...............31
11229 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11230 * | PID_RELIABILITY | 0x0004 |
11231 * +---------------+---------------+---------------+---------------+
11232 * | unsigned long kind |
11233 * +---------------+---------------+---------------+---------------+
11234 */
11235 case PID_RELIABILITY_OFFERED(0x19): /* Deprecated */
11236 case PID_RELIABILITY(0x1a):
11237 ENSURE_LENGTH(4);
11238 proto_tree_add_item(rtps_parameter_tree, hf_rtps_reliability_kind, tvb, offset, 4, encoding);
11239 /* Older version of the protocol (and for PID_RELIABILITY_OFFERED)
11240 * this parameter was carrying also a NtpTime called
11241 * 'maxBlockingTime'.
11242 */
11243 if (size == 12) {
11244 rtps_util_add_timestamp(rtps_parameter_tree, tvb, offset + 4,
11245 encoding, hf_rtps_reliability_max_blocking_time);
11246 }
11247 break;
11248
11249 /* 0...2...........7...............15.............23...............31
11250 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11251 * | PID_LIVELINESS | 0x000c |
11252 * +---------------+---------------+---------------+---------------+
11253 * | unsigned long kind |
11254 * +---------------+---------------+---------------+---------------+
11255 * | long NtpTime.seconds |
11256 * +---------------+---------------+---------------+---------------+
11257 * | unsigned long NtpTime.fraction |
11258 * +---------------+---------------+---------------+---------------+
11259 * NDDS 3.1 sends only 'kind' on the wire.
11260 *
11261 */
11262 case PID_LIVELINESS_OFFERED(0x1c): /* Deprecated */
11263 case PID_LIVELINESS(0x1b):
11264 ENSURE_LENGTH(12);
11265 rtps_util_add_liveliness_qos(rtps_parameter_tree, tvb, offset, encoding);
11266 break;
11267
11268 /* 0...2...........7...............15.............23...............31
11269 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11270 * | PID_DURABILITY | 0x0004 |
11271 * +---------------+---------------+---------------+---------------+
11272 * | unsigned long kind |
11273 * +---------------+---------------+---------------+---------------+
11274 */
11275 case PID_DURABILITY(0x1d):
11276 ENSURE_LENGTH(4);
11277 proto_tree_add_item(rtps_parameter_tree, hf_rtps_durability, tvb, offset, 4, encoding);
11278 break;
11279
11280 /* 0...2...........7...............15.............23...............31
11281 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11282 * | PID_DURABILITY_SERVICE | 0x0004 |
11283 * +---------------+---------------+---------------+---------------+
11284 * | long NtpTime.seconds |
11285 * +---------------+---------------+---------------+---------------+
11286 * | unsigned long NtpTime.fraction |
11287 * +---------------+---------------+---------------+---------------+
11288 * | unsigned long kind |
11289 * +---------------+---------------+---------------+---------------+
11290 * | long history_depth |
11291 * +---------------+---------------+---------------+---------------+
11292 * | long max_samples |
11293 * +---------------+---------------+---------------+---------------+
11294 * | long max_instances |
11295 * +---------------+---------------+---------------+---------------+
11296 * | long max_samples_per_instance |
11297 * +---------------+---------------+---------------+---------------+
11298 */
11299 case PID_DURABILITY_SERVICE(0x1e):
11300 ENSURE_LENGTH(28);
11301 rtps_util_add_durability_service_qos(rtps_parameter_tree, tvb, offset, encoding);
11302 break;
11303
11304 /* 0...2...........7...............15.............23...............31
11305 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11306 * | PID_OWNERSHIP | 0x0004 |
11307 * +---------------+---------------+---------------+---------------+
11308 * | unsigned long kind |
11309 * +---------------+---------------+---------------+---------------+
11310 */
11311 case PID_OWNERSHIP_OFFERED(0x20): /* Deprecated */
11312 case PID_OWNERSHIP(0x1f):
11313 ENSURE_LENGTH(4);
11314 proto_tree_add_item(rtps_parameter_tree, hf_rtps_ownership, tvb, offset, 4, encoding);
11315 break;
11316
11317 /* 0...2...........7...............15.............23...............31
11318 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11319 * | PID_PRESENTATION | 0x0008 |
11320 * +---------------+---------------+---------------+---------------+
11321 * | unsigned long kind |
11322 * +---------------+---------------+---------------+---------------+
11323 * | boolean | boolean | N O T U S E D |
11324 * +---------------+---------------+---------------+---------------+
11325 */
11326 case PID_PRESENTATION_OFFERED(0x22): /* Deprecated */
11327 case PID_PRESENTATION(0x21):
11328 ENSURE_LENGTH(6);
11329 proto_tree_add_item(rtps_parameter_tree, hf_rtps_presentation_access_scope, tvb, offset, 4, encoding);
11330 proto_tree_add_item(rtps_parameter_tree, hf_rtps_presentation_coherent_access, tvb, offset+4, 1, ENC_NA0x00000000 );
11331 proto_tree_add_item(rtps_parameter_tree, hf_rtps_presentation_ordered_access, tvb, offset+5, 1, ENC_NA0x00000000 );
11332 break;
11333
11334 /* 0...2...........7...............15.............23...............31
11335 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11336 * | PID_DEADLINE | 0x0008 |
11337 * +---------------+---------------+---------------+---------------+
11338 * | long NtpTime.seconds |
11339 * +---------------+---------------+---------------+---------------+
11340 * | unsigned long NtpTime.fraction |
11341 * +---------------+---------------+---------------+---------------+
11342 */
11343 case PID_DEADLINE_OFFERED(0x24): /* Deprecated */
11344 case PID_DEADLINE(0x23):
11345 ENSURE_LENGTH(8);
11346 rtps_util_add_timestamp_sec_and_fraction(rtps_parameter_tree, tvb, offset, encoding, hf_rtps_deadline_period);
11347 break;
11348
11349 /* 0...2...........7...............15.............23...............31
11350 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11351 * | PID_DESTINATION_ORDER | 0x0004 |
11352 * +---------------+---------------+---------------+---------------+
11353 * | unsigned long kind |
11354 * +---------------+---------------+---------------+---------------+
11355 */
11356 case PID_DESTINATION_ORDER_OFFERED(0x26): /* Deprecated */
11357 case PID_DESTINATION_ORDER(0x25):
11358 ENSURE_LENGTH(4);
11359 proto_tree_add_item(rtps_parameter_tree, hf_rtps_destination_order, tvb, offset, 4, encoding);
11360 break;
11361
11362 /* 0...2...........7...............15.............23...............31
11363 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11364 * | PID_LATENCY_BUDGET | 0x0008 |
11365 * +---------------+---------------+---------------+---------------+
11366 * | long NtpTime.seconds |
11367 * +---------------+---------------+---------------+---------------+
11368 * | unsigned long NtpTime.fraction |
11369 * +---------------+---------------+---------------+---------------+
11370 */
11371 case PID_LATENCY_BUDGET_OFFERED(0x28):
11372 case PID_LATENCY_BUDGET(0x27):
11373 ENSURE_LENGTH(8);
11374 rtps_util_add_timestamp_sec_and_fraction(rtps_parameter_tree, tvb, offset,
11375 encoding, hf_rtps_latency_budget_duration);
11376 break;
11377
11378 /* 0...2...........7...............15.............23...............31
11379 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11380 * | PID_PARTITION | length |
11381 * +---------------+---------------+---------------+---------------+
11382 * | unsigned long sequence_size |
11383 * +---------------+---------------+---------------+---------------+
11384 * | unsigned long string[0].size |
11385 * +---------------+---------------+---------------+---------------+
11386 * | string[0][0] | string[0][1] | string[0][2] | string[0][3] |
11387 * +---------------+---------------+---------------+---------------+
11388 * | ... |
11389 * +---------------+---------------+---------------+---------------+
11390 * The value is a sequence of strings.
11391 */
11392 case PID_PARTITION_OFFERED(0x2a): /* Deprecated */
11393 case PID_PARTITION(0x29):
11394 ENSURE_LENGTH(4);
11395 rtps_util_add_seq_string(rtps_parameter_tree, pinfo, tvb, offset, encoding,
11396 hf_rtps_param_partition_num, hf_rtps_param_partition, "name");
11397 break;
11398 case PID_TOPIC_NAME_ALIASES(0x8028):
11399 ENSURE_LENGTH(4);
11400 rtps_util_add_seq_string(rtps_parameter_tree, pinfo, tvb, offset, encoding,
11401 hf_rtps_param_topic_alias_num, hf_rtps_param_topic_alias, "Topic alias");
11402 break;
11403 case PID_TYPE_NAME_ALIASES(0x8029):
11404 ENSURE_LENGTH(4);
11405 rtps_util_add_seq_string(rtps_parameter_tree, pinfo, tvb, offset, encoding,
11406 hf_rtps_param_type_alias_num, hf_rtps_param_type_alias, "Type alias");
11407 break;
11408 /* 0...2...........7...............15.............23...............31
11409 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11410 * | PID_LIFESPAN | 0x0008 |
11411 * +---------------+---------------+---------------+---------------+
11412 * | long NtpTime.seconds |
11413 * +---------------+---------------+---------------+---------------+
11414 * | unsigned long NtpTime.fraction |
11415 * +---------------+---------------+---------------+---------------+
11416 */
11417 case PID_LIFESPAN(0x2b):
11418 ENSURE_LENGTH(8);
11419 rtps_util_add_timestamp_sec_and_fraction(rtps_parameter_tree, tvb, offset, encoding,
11420 hf_rtps_lifespan_duration);
11421 break;
11422
11423 /* 0...2...........7...............15.............23...............31
11424 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11425 * | PID_USER_DATA | length |
11426 * +---------------+---------------+---------------+---------------+
11427 * | unsigned long sequence_size |
11428 * +---------------+---------------+---------------+---------------+
11429 * | octet[0] | octet[1] | octet[2] | octet[3] |
11430 * +---------------+---------------+---------------+---------------+
11431 * | ... |
11432 * +---------------+---------------+---------------+---------------+
11433 */
11434 case PID_USER_DATA(0x2c):
11435 ENSURE_LENGTH(4);
11436 rtps_util_add_seq_octets(rtps_parameter_tree, pinfo, tvb, offset,
11437 encoding, param_length, hf_rtps_param_user_data);
11438 break;
11439
11440 /* 0...2...........7...............15.............23...............31
11441 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11442 * | PID_GROUP_DATA | length |
11443 * +---------------+---------------+---------------+---------------+
11444 * | unsigned long sequence_size |
11445 * +---------------+---------------+---------------+---------------+
11446 * | octet[0] | octet[1] | octet[2 ] | octet[3] |
11447 * +---------------+---------------+---------------+---------------+
11448 * | ... |
11449 * +---------------+---------------+---------------+---------------+
11450 */
11451 case PID_GROUP_DATA(0x2d):
11452 ENSURE_LENGTH(4);
11453 rtps_util_add_seq_octets(rtps_parameter_tree, pinfo, tvb, offset,
11454 encoding, param_length, hf_rtps_param_group_data);
11455 break;
11456
11457 /* 0...2...........7...............15.............23...............31
11458 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11459 * | PID_TOPIC_DATA | length |
11460 * +---------------+---------------+---------------+---------------+
11461 * | unsigned long sequence_size |
11462 * +---------------+---------------+---------------+---------------+
11463 * | octet[0] | octet[1] | octet[2] | octet[3] |
11464 * +---------------+---------------+---------------+---------------+
11465 * | ... |
11466 * +---------------+---------------+---------------+---------------+
11467 */
11468 case PID_TOPIC_DATA(0x2e):
11469 ENSURE_LENGTH(4);
11470 rtps_util_add_seq_octets(rtps_parameter_tree, pinfo, tvb, offset,
11471 encoding, param_length, hf_rtps_param_topic_data);
11472 break;
11473
11474 /* 0...2...........7...............15.............23...............31
11475 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11476 * | PID_UNICAST_LOCATOR | 0x0018 |
11477 * +---------------+---------------+---------------+---------------+
11478 * | long kind |
11479 * +---------------+---------------+---------------+---------------+
11480 * | long port |
11481 * +---------------+---------------+---------------+---------------+
11482 * | ipv6addr[0] | ipv6addr[1] | ipv6addr[2] | ipv6addr[3] |
11483 * +---------------+---------------+---------------+---------------+
11484 * | ipv6addr[4] | ipv6addr[5] | ipv6addr[6] | ipv6addr[7] |
11485 * +---------------+---------------+---------------+---------------+
11486 * | ipv6addr[8] | ipv6addr[9] | ipv6addr[10] | ipv6addr[11] |
11487 * +---------------+---------------+---------------+---------------+
11488 * | ipv6addr[12] | ipv6addr[13] | ipv6addr[14] | ipv6addr[15] |
11489 * +---------------+---------------+---------------+---------------+
11490 */
11491 case PID_UNICAST_LOCATOR(0x2f):
11492 ENSURE_LENGTH(24);
11493 rtps_util_add_locator_t(rtps_parameter_tree, pinfo, tvb,
11494 offset, encoding, "locator");
11495 break;
11496
11497 /* 0...2...........7...............15.............23...............31
11498 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11499 * | PID_MULTICAST_LOCATOR | 0x0018 |
11500 * +---------------+---------------+---------------+---------------+
11501 * | long kind |
11502 * +---------------+---------------+---------------+---------------+
11503 * | long port |
11504 * +---------------+---------------+---------------+---------------+
11505 * | ipv6addr[0] | ipv6addr[1] | ipv6addr[2] | ipv6addr[3] |
11506 * +---------------+---------------+---------------+---------------+
11507 * | ipv6addr[4] | ipv6addr[5] | ipv6addr[6] | ipv6addr[7] |
11508 * +---------------+---------------+---------------+---------------+
11509 * | ipv6addr[8] | ipv6addr[9] | ipv6addr[10] | ipv6addr[11] |
11510 * +---------------+---------------+---------------+---------------+
11511 * | ipv6addr[12] | ipv6addr[13] | ipv6addr[14] | ipv6addr[15] |
11512 * +---------------+---------------+---------------+---------------+
11513 */
11514 case PID_MULTICAST_LOCATOR(0x30):
11515 ENSURE_LENGTH(24);
11516 rtps_util_add_locator_t(rtps_parameter_tree, pinfo, tvb,
11517 offset, encoding, "locator");
11518 break;
11519
11520 /* 0...2...........7...............15.............23...............31
11521 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11522 * | PID_DEFAULT_UNICAST_LOCATOR | 0x0018 |
11523 * +---------------+---------------+---------------+---------------+
11524 * | long kind |
11525 * +---------------+---------------+---------------+---------------+
11526 * | long port |
11527 * +---------------+---------------+---------------+---------------+
11528 * | ipv6addr[0] | ipv6addr[1] | ipv6addr[2] | ipv6addr[3] |
11529 * +---------------+---------------+---------------+---------------+
11530 * | ipv6addr[4] | ipv6addr[5] | ipv6addr[6] | ipv6addr[7] |
11531 * +---------------+---------------+---------------+---------------+
11532 * | ipv6addr[8] | ipv6addr[9] | ipv6addr[10] | ipv6addr[11] |
11533 * +---------------+---------------+---------------+---------------+
11534 * | ipv6addr[12] | ipv6addr[13] | ipv6addr[14] | ipv6addr[15] |
11535 * +---------------+---------------+---------------+---------------+
11536 */
11537 case PID_DEFAULT_UNICAST_LOCATOR(0x31):
11538 ENSURE_LENGTH(24);
11539 rtps_util_add_locator_t(rtps_parameter_tree, pinfo, tvb, offset,
11540 encoding, "locator");
11541 break;
11542
11543 /* 0...2...........7...............15.............23...............31
11544 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11545 * | PID_METATRAFFIC_UNICAST_LOC...| 0x0018 |
11546 * +---------------+---------------+---------------+---------------+
11547 * | long kind |
11548 * +---------------+---------------+---------------+---------------+
11549 * | long port |
11550 * +---------------+---------------+---------------+---------------+
11551 * | ipv6addr[0] | ipv6addr[1] | ipv6addr[2] | ipv6addr[3] |
11552 * +---------------+---------------+---------------+---------------+
11553 * | ipv6addr[4] | ipv6addr[5] | ipv6addr[6] | ipv6addr[7] |
11554 * +---------------+---------------+---------------+---------------+
11555 * | ipv6addr[8] | ipv6addr[9] | ipv6addr[10] | ipv6addr[11] |
11556 * +---------------+---------------+---------------+---------------+
11557 * | ipv6addr[12] | ipv6addr[13] | ipv6addr[14] | ipv6addr[15] |
11558 * +---------------+---------------+---------------+---------------+
11559 */
11560 case PID_METATRAFFIC_UNICAST_LOCATOR(0x32):
11561 ENSURE_LENGTH(24);
11562 rtps_util_add_locator_t(rtps_parameter_tree, pinfo, tvb, offset,
11563 encoding, "locator");
11564 break;
11565
11566 /* 0...2...........7...............15.............23...............31
11567 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11568 * | PID_METATRAFFIC_MULTICAST_L...| 0x0018 |
11569 * +---------------+---------------+---------------+---------------+
11570 * | long kind |
11571 * +---------------+---------------+---------------+---------------+
11572 * | long port |
11573 * +---------------+---------------+---------------+---------------+
11574 * | ipv6addr[0] | ipv6addr[1] | ipv6addr[2] | ipv6addr[3] |
11575 * +---------------+---------------+---------------+---------------+
11576 * | ipv6addr[4] | ipv6addr[5] | ipv6addr[6] | ipv6addr[7] |
11577 * +---------------+---------------+---------------+---------------+
11578 * | ipv6addr[8] | ipv6addr[9] | ipv6addr[10] | ipv6addr[11] |
11579 * +---------------+---------------+---------------+---------------+
11580 * | ipv6addr[12] | ipv6addr[13] | ipv6addr[14] | ipv6addr[15] |
11581 * +---------------+---------------+---------------+---------------+
11582 */
11583 case PID_METATRAFFIC_MULTICAST_LOCATOR(0x33):
11584 ENSURE_LENGTH(24);
11585 rtps_util_add_locator_t(rtps_parameter_tree, pinfo, tvb,
11586 offset, encoding, "locator");
11587 break;
11588
11589 /* 0...2...........7...............15.............23...............31
11590 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11591 * | PID_PARTICIPANT_MANUAL_LIVE...| 0x0004 |
11592 * +---------------+---------------+---------------+---------------+
11593 * | long livelinessEpoch |
11594 * +---------------+---------------+---------------+---------------+
11595 */
11596 case PID_PARTICIPANT_BUILTIN_ENDPOINTS(0x44):
11597 ENSURE_LENGTH(4);
11598 proto_tree_add_item(rtps_parameter_tree, hf_rtps_participant_builtin_endpoints, tvb, offset, 4, encoding);
11599 break;
11600
11601 case PID_PARTICIPANT_MANUAL_LIVELINESS_COUNT(0x34):
11602 ENSURE_LENGTH(4);
11603 proto_tree_add_item(rtps_parameter_tree, hf_rtps_participant_manual_liveliness_count, tvb, offset, 4, encoding);
11604 break;
11605
11606 /* 0...2...........7...............15.............23...............31
11607 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11608 * | PID_HISTORY | 0x0004 |
11609 * +---------------+---------------+---------------+---------------+
11610 * | long kind |
11611 * +---------------+---------------+---------------+---------------+
11612 * | long depth |
11613 * +---------------+---------------+---------------+---------------+
11614 */
11615 case PID_HISTORY(0x40):
11616 ENSURE_LENGTH(8);
11617 proto_tree_add_item(rtps_parameter_tree, hf_rtps_history_kind, tvb, offset, 4, encoding);
11618 proto_tree_add_item(rtps_parameter_tree, hf_rtps_history_depth, tvb, offset+4, 4, encoding);
11619 break;
11620
11621 /* 0...2...........7...............15.............23...............31
11622 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11623 * | PID_RESOURCE_LIMIT | 0x0004 |
11624 * +---------------+---------------+---------------+---------------+
11625 * | long max_samples |
11626 * +---------------+---------------+---------------+---------------+
11627 * | long max_instances |
11628 * +---------------+---------------+---------------+---------------+
11629 * | long max_samples_per_instances |
11630 * +---------------+---------------+---------------+---------------+
11631 */
11632 case PID_RESOURCE_LIMIT(0x41):
11633 ENSURE_LENGTH(12);
11634 subtree = proto_tree_add_subtree(rtps_parameter_tree, tvb, offset, 12, ett_rtps_resource_limit, NULL((void*)0), "Resource Limit");
11635 proto_tree_add_item(subtree, hf_rtps_resource_limit_max_samples, tvb, offset, 4, encoding);
11636 proto_tree_add_item(subtree, hf_rtps_resource_limit_max_instances, tvb, offset+4, 4, encoding);
11637 proto_tree_add_item(subtree, hf_rtps_resource_limit_max_samples_per_instances, tvb, offset+8, 4, encoding);
11638 break;
11639
11640 /* 0...2...........7...............15.............23...............31
11641 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11642 * | PID_CONTENT_FILTER_PROPERTY | length |
11643 * +---------------+---------------+---------------+---------------+
11644 * | unsigned long String1.length |
11645 * +---------------+---------------+---------------+---------------+
11646 * | str1[0] | str1[1] | str1[2] | str1[3] |
11647 * +---------------+---------------+---------------+---------------+
11648 * | ... |
11649 * +---------------+---------------+---------------+---------------+
11650 * | unsigned long String2.length |
11651 * +---------------+---------------+---------------+---------------+
11652 * | str2[0] | str2[1] | str2[2] | str2[3] |
11653 * +---------------+---------------+---------------+---------------+
11654 * | ... |
11655 * +---------------+---------------+---------------+---------------+
11656 * | unsigned long String3.length |
11657 * +---------------+---------------+---------------+---------------+
11658 * | str3[0] | str3[1] | str3[2] | str3[3] |
11659 * +---------------+---------------+---------------+---------------+
11660 * | ... |
11661 * +---------------+---------------+---------------+---------------+
11662 * | unsigned long String4.length |
11663 * +---------------+---------------+---------------+---------------+
11664 * | str4[0] | str4[1] | str4[2] | str4[3] |
11665 * +---------------+---------------+---------------+---------------+
11666 * | ... |
11667 * +---------------+---------------+---------------+---------------+
11668 * | ... |
11669 * | Filter Parameters |
11670 * | ... |
11671 * +---------------+---------------+---------------+---------------+
11672 *
11673 * String1: ContentFilterTopicName
11674 * String2: RelatedTopicName
11675 * String3: FilterClassName
11676 * String4: FilterExpression
11677 * ExpressionParameters: sequence of Strings
11678 *
11679 * Note: those strings starts all to a word-aligned (4 bytes) offset
11680 */
11681 case PID_CONTENT_FILTER_PROPERTY(0x35): {
11682 uint32_t temp_offset = offset;
11683 ENSURE_LENGTH(20);
11684 temp_offset = rtps_util_add_string(rtps_parameter_tree, tvb, temp_offset,
11685 hf_rtps_param_content_filter_topic_name, encoding);
11686 temp_offset = rtps_util_add_string(rtps_parameter_tree, tvb, temp_offset,
11687 hf_rtps_param_related_topic_name, encoding);
11688 temp_offset = rtps_util_add_string(rtps_parameter_tree, tvb, temp_offset,
11689 hf_rtps_param_filter_class_name, encoding);
11690 temp_offset = rtps_util_add_string(rtps_parameter_tree, tvb, temp_offset,
11691 hf_rtps_param_filter_expression, encoding);
11692 /*temp_offset = */rtps_util_add_seq_string(rtps_parameter_tree, pinfo, tvb, temp_offset,
11693 encoding, hf_rtps_param_expression_parameters_num,
11694 hf_rtps_param_expression_parameters, "expressionParameters");
11695 break;
11696 }
11697
11698 /* 0...2...........7...............15.............23...............31
11699 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11700 * | PID_PROPERTY_LIST | length |
11701 * +---------------+---------------+---------------+---------------+
11702 * | unsigned long Seq.Length |
11703 * +---------------+---------------+---------------+---------------+
11704 * | ... |
11705 * | Property 1 |
11706 * | ... |
11707 * +---------------+---------------+---------------+---------------+
11708 * | ... |
11709 * | Property 2 |
11710 * | ... |
11711 * +---------------+---------------+---------------+---------------+
11712 * | ... |
11713 * | Property n |
11714 * | ... |
11715 * +---------------+---------------+---------------+---------------+
11716 *
11717 * IDL:
11718 * struct PROPERTY {
11719 * String Name;
11720 * String Value;
11721 * };
11722 *
11723 * struct PROPERTY_LIST {
11724 * Sequence<PROPERTY> PropertyList;
11725 * };
11726 *
11727 */
11728 case PID_PROPERTY_LIST(0x0059):
11729 case PID_PROPERTY_LIST_OLD(0x36):
11730 ENSURE_LENGTH(4);
11731 {
11732 uint32_t temp_offset, prop_size;
11733 const uint8_t *propName, *propValue;
11734 proto_item *list_item, *item;
11735 proto_tree *property_list_tree, *property_tree;
11736 uint32_t seq_size = tvb_get_uint32(tvb, offset, encoding);
11737 int start_offset = offset, str_length;
11738
11739 proto_item_append_text( parameter_item, " (%d properties)", seq_size );
11740 if (seq_size > 0) {
11741 property_list_tree = proto_tree_add_subtree(rtps_parameter_tree, tvb, offset, -1, ett_rtps_property_list, &list_item, "Property List");
11742
11743 temp_offset = offset+4;
11744 while(seq_size-- > 0) {
11745 prop_size = tvb_get_uint32(tvb, temp_offset, encoding);
11746 propName = tvb_get_string_enc(pinfo->pool, tvb, temp_offset+4, prop_size, ENC_ASCII0x00000000);
11747
11748 /* NDDS align strings at 4-bytes word. */
11749 str_length = (4 + ((prop_size + 3) & 0xfffffffc));
11750 item = proto_tree_add_string(property_list_tree, hf_rtps_property_name, tvb, temp_offset, str_length, propName);
11751 property_tree = proto_item_add_subtree(item, ett_rtps_property);
11752 temp_offset += str_length;
11753
11754 prop_size = tvb_get_uint32(tvb, temp_offset, encoding);
11755 propValue = tvb_get_string_enc(pinfo->pool, tvb, temp_offset+4, prop_size, ENC_ASCII0x00000000);
11756
11757 /* NDDS align strings at 4-bytes word. */
11758 str_length = (4 + ((prop_size + 3) & 0xfffffffc));
11759 proto_tree_add_string(property_tree, hf_rtps_property_value, tvb, temp_offset, str_length, propValue);
11760 temp_offset += str_length;
11761 }
11762
11763 proto_item_set_len(list_item, temp_offset-start_offset);
11764 }
11765 }
11766 break;
11767
11768 /* 0...2...........7...............15.............23...............31
11769 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11770 * | PID_FILTER_SIGNATURE | length |
11771 * +---------------+---------------+---------------+---------------+
11772 * | ... |
11773 * +---------------+---------------+---------------+---------------+
11774 *
11775 * IDL:
11776 * struct CONTENT_FILTER_SIGNATURE {
11777 * sequence<long> filterBitmap;
11778 * sequence<FILTER_SIGNATURE, 4> filterSignature;
11779 * }
11780 *
11781 * where:
11782 * struct FILTER_SIGNATURE {
11783 * long filterSignature[4];
11784 * }
11785 */
11786 case PID_FILTER_SIGNATURE(0x55): {
11787 uint32_t temp_offset;
11788 uint32_t prev_offset;
11789 uint32_t fs_elem;
11790 uint32_t fs[4];
11791 ENSURE_LENGTH(8);
11792
11793 /* Dissect filter bitmap */
11794 temp_offset = rtps_util_add_seq_ulong(rtps_parameter_tree, tvb, offset,
11795 hf_rtps_filter_bitmap, encoding, param_length, "filterBitmap");
11796
11797 /* Dissect sequence of FILTER_SIGNATURE */
11798 fs_elem = tvb_get_uint32(tvb, temp_offset, encoding);
11799 temp_offset += 4;
11800 while (fs_elem-- > 0) {
11801 prev_offset = temp_offset;
11802 /* Dissect the next FILTER_SIGNATURE object */
11803 fs[0] = tvb_get_uint32(tvb, temp_offset, encoding);
11804 temp_offset += 4;
11805 fs[1] = tvb_get_uint32(tvb, temp_offset, encoding);
11806 temp_offset += 4;
11807 fs[2] = tvb_get_uint32(tvb, temp_offset, encoding);
11808 temp_offset += 4;
11809 fs[3] = tvb_get_uint32(tvb, temp_offset, encoding);
11810 temp_offset += 4;
11811 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",
11812 fs[0], fs[1], fs[2], fs[3]);
11813 }
11814
11815 break;
11816 }
11817
11818
11819 /* 0...2...........7...............15.............23...............31
11820 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11821 * | PID_COHERENT_SET | length |
11822 * +---------------+---------------+---------------+---------------+
11823 * | |
11824 * + SequenceNumber seqNumber +
11825 * | |
11826 * +---------------+---------------+---------------+---------------+
11827 */
11828 case PID_COHERENT_SET(0x56): {
11829 uint64_t coherent_seq_number;
11830
11831 ENSURE_LENGTH(8);
11832 coherent_seq_number = rtps_util_add_seq_number(rtps_parameter_tree, tvb, offset,
11833 encoding, "sequenceNumber");
11834 if (coherent_set_entity_info_object && rtps_parameter_tree) {
11835 rtps_util_add_coherent_set_general_cases_case(rtps_parameter_tree,
11836 tvb, coherent_seq_number, coherent_set_entity_info_object);
11837 }
11838 break;
11839 }
11840 /* 0...2...........7...............15.............23...............31
11841 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11842 * | PID_TYPECODE | length |
11843 * +---------------+---------------+---------------+---------------+
11844 * | |
11845 * + Type code description +
11846 * | |
11847 * +---------------+---------------+---------------+---------------+
11848 */
11849 case PID_TYPECODE(0x47):
11850 rtps_util_add_typecode(rtps_parameter_tree, tvb, pinfo, offset, encoding,
11851 0, /* indent level */
11852 0, /* isPointer */
11853 -1, /* bitfield */
11854 0, /* isKey */
11855 offset,
11856 NULL((void*)0), /* name */
11857 -1, /* not a seq field */
11858 NULL((void*)0), /* not an array */
11859 0); /* ndds 4.0 hack: init to false */
11860 break;
11861
11862 /* 0...2...........7...............15.............23...............31
11863 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11864 * | PID_PARTICIPANT_GUID | 0x000c |
11865 * +---------------+---------------+---------------+---------------+
11866 * | guid[0] | guid[1] | guid[2] | guid[3] |
11867 * +---------------+---------------+---------------+---------------+
11868 * | guid[4] | guid[5] | guid[6] | guid[7] |
11869 * +---------------+---------------+---------------+---------------+
11870 * | guid[8] | guid[9] | guid[10] | guid[11] |
11871 * +---------------+---------------+---------------+---------------+
11872 */
11873 case PID_PARTICIPANT_GUID(0x50):
11874 if (version < 0x0200) {
11875 ENSURE_LENGTH(12);
11876 rtps_util_add_generic_guid_v1(rtps_parameter_tree, tvb, offset,
11877 hf_rtps_participant_guid_v1, hf_rtps_param_host_id, hf_rtps_param_app_id,
11878 hf_rtps_param_instance_id_v1, hf_rtps_param_app_kind,
11879 hf_rtps_param_entity, hf_rtps_param_entity_key, hf_rtps_param_entity_kind);
11880 } else {
11881 ENSURE_LENGTH(16);
11882 rtps_util_add_generic_guid_v2(rtps_parameter_tree, tvb, offset,
11883 hf_rtps_participant_guid, hf_rtps_param_host_id, hf_rtps_param_app_id,
11884 hf_rtps_param_instance_id, hf_rtps_param_entity, hf_rtps_param_entity_key,
11885 hf_rtps_param_entity_kind, NULL((void*)0));
11886 }
11887 break;
11888
11889 /* 0...2...........7...............15.............23...............31
11890 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11891 * | PID_PARTICIPANT_ENTITY_ID | 0x0004 |
11892 * +---------------+---------------+---------------+---------------+
11893 * | entity[0] | entity[1] | entity[2] | entity[3] |
11894 * +---------------+---------------+---------------+---------------+
11895 */
11896 case PID_PARTICIPANT_ENTITY_ID(0x51):
11897 ENSURE_LENGTH(4);
11898 rtps_util_add_generic_entity_id(rtps_parameter_tree, pinfo, tvb, offset, "Participant entity ID",
11899 hf_rtps_param_entity, hf_rtps_param_entity_key,
11900 hf_rtps_param_entity_kind, ett_rtps_entity);
11901
11902 break;
11903
11904 /* 0...2...........7...............15.............23...............31
11905 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11906 * | PID_GROUP_GUID | 0x000c |
11907 * +---------------+---------------+---------------+---------------+
11908 * | guid[0] | guid[1] | guid[2] | guid[3] |
11909 * +---------------+---------------+---------------+---------------+
11910 * | guid[4] | guid[5] | guid[6] | guid[7] |
11911 * +---------------+---------------+---------------+---------------+
11912 * | guid[8] | guid[9] | guid[10] | guid[11] |
11913 * +---------------+---------------+---------------+---------------+
11914 */
11915 case PID_GROUP_GUID(0x52):
11916 if (version < 0x0200) {
11917 ENSURE_LENGTH(12);
11918 rtps_util_add_generic_guid_v1(rtps_parameter_tree, tvb, offset,
11919 hf_rtps_group_guid_v1, hf_rtps_param_host_id, hf_rtps_param_app_id,
11920 hf_rtps_param_instance_id_v1, hf_rtps_param_app_kind,
11921 hf_rtps_param_entity, hf_rtps_param_entity_key, hf_rtps_param_entity_kind);
11922 } else {
11923 ENSURE_LENGTH(16);
11924 rtps_util_add_generic_guid_v2(rtps_parameter_tree, tvb, offset,
11925 hf_rtps_group_guid, hf_rtps_param_host_id, hf_rtps_param_app_id,
11926 hf_rtps_param_instance_id, hf_rtps_param_entity, hf_rtps_param_entity_key,
11927 hf_rtps_param_entity_kind, NULL((void*)0));
11928 }
11929 break;
11930
11931 /* 0...2...........7...............15.............23...............31
11932 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11933 * | PID_GROUP_ENTITY_ID | 0x0004 |
11934 * +---------------+---------------+---------------+---------------+
11935 * | entity[0] | entity[1] | entity[2] | entity[3] |
11936 * +---------------+---------------+---------------+---------------+
11937 */
11938 case PID_GROUP_ENTITY_ID(0x53):
11939 ENSURE_LENGTH(4);
11940 rtps_util_add_generic_entity_id(rtps_parameter_tree, pinfo, tvb, offset, "Group entity ID",
11941 hf_rtps_param_entity, hf_rtps_param_entity_key,
11942 hf_rtps_param_entity_kind, ett_rtps_entity);
11943 break;
11944
11945 /* ==================================================================
11946 * Here are all the deprecated items.
11947 */
11948
11949 case PID_PERSISTENCE(0x03):
11950 ENSURE_LENGTH(8);
11951 rtps_util_add_timestamp_sec_and_fraction(rtps_parameter_tree, tvb, offset, encoding,
11952 hf_rtps_persistence);
11953 break;
11954
11955 case PID_TYPE_CHECKSUM(0x08):
11956 ENSURE_LENGTH(4);
11957 proto_tree_add_checksum(rtps_parameter_tree, tvb, offset, hf_rtps_type_checksum, -1, NULL((void*)0), pinfo, 0, encoding, PROTO_CHECKSUM_NO_FLAGS0x00);
11958 break;
11959
11960 case PID_EXPECTS_ACK(0x10):
11961 ENSURE_LENGTH(1);
11962 proto_tree_add_item(rtps_parameter_tree, hf_rtps_expects_ack, tvb, offset, 1, ENC_NA0x00000000 );
11963 break;
11964
11965 case PID_MANAGER_KEY(0x12): {
11966 int i = 0;
11967 uint32_t manager_key;
11968
11969 subtree = proto_tree_add_subtree(rtps_parameter_tree, tvb, offset, param_length, ett_rtps_manager_key, NULL((void*)0), "Manager Keys");
11970
11971 while (param_length >= 4) {
11972 manager_key = tvb_get_uint32(tvb, offset, encoding);
11973 proto_tree_add_uint_format(subtree, hf_rtps_manager_key, tvb, offset, 4,
11974 manager_key, "Key[%d]: 0x%X", i, manager_key);
11975
11976 ++i;
11977 offset +=4;
11978 param_length -= 4; /* decrement count */
11979 }
11980 break;
11981 }
11982
11983 case PID_RECV_QUEUE_SIZE(0x18):
11984 case PID_SEND_QUEUE_SIZE(0x13):
11985 ENSURE_LENGTH(4);
11986 proto_tree_add_item(rtps_parameter_tree, hf_rtps_queue_size, tvb, offset, 4, encoding);
11987 break;
11988
11989 case PID_VARGAPPS_SEQUENCE_NUMBER_LAST(0x17):
11990 ENSURE_LENGTH(4);
11991 rtps_util_add_seq_number(rtps_parameter_tree, tvb, offset, encoding, "sequenceNumberLast");
11992 break;
11993
11994 case PID_SENTINEL(0x01):
11995 /* PID_SENTINEL should ignore any value of parameter length */
11996 break;
11997
11998 /* This is the default branch when we don't have enough information
11999 * on how to decode the parameter. It can be used also for known
12000 * parameters.
12001 */
12002 /* 0...2...........7...............15.............23...............31
12003 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
12004 * | <pid_id> | 0x0000 |
12005 * +---------------+---------------+---------------+---------------+
12006 */
12007 case PID_TYPE2_NAME(0x09):
12008 case PID_TYPE2_CHECKSUM(0x0a):
12009 case PID_RELIABILITY_ENABLED(0x14):
12010 expert_add_info(pinfo, parameter_item, &ei_rtps_parameter_not_decoded);
12011 /* Fall Through */
12012 case PID_PAD(0x00):
12013 if (param_length > 0) {
12014 proto_tree_add_item(rtps_parameter_tree, hf_rtps_parameter_data, tvb,
12015 offset, param_length, ENC_NA0x00000000);
12016 }
12017 break;
12018
12019 default:
12020 return false0;
12021 }
12022
12023 return true1;
12024}
12025
12026static bool_Bool dissect_parameter_sequence_v2(proto_tree *rtps_parameter_tree, packet_info *pinfo, tvbuff_t *tvb,
12027 proto_item *parameter_item _U___attribute__((unused)), proto_item *param_len_item,
12028 int offset, const unsigned encoding, int param_length,
12029 uint16_t parameter, uint32_t *pStatusInfo, uint16_t vendor_id _U___attribute__((unused)),
12030 type_mapping * type_mapping_object,
12031 coherent_set_entity_info *coherent_set_entity_info_object _U___attribute__((unused))) {
12032 proto_item *ti;
12033
12034 switch(parameter) {
12035 /* 0...2...........7...............15.............23...............31
12036 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
12037 * | PID_STATUS_INFO | 0x0004 |
12038 * +---------------+---------------+---------------+---------------+
12039 * | long statusInfo |
12040 * +---------------+---------------+---------------+---------------+
12041 */
12042 case PID_STATUS_INFO(0x0071): {
12043 bool_Bool* is_data_session_intermediate = NULL((void*)0);
12044 ENSURE_LENGTH(4);
12045 /* PID_STATUS_INFO is always coded in network byte order (big endian) */
12046 proto_tree_add_bitmask(rtps_parameter_tree, tvb, offset,
12047 hf_rtps_param_status_info_flags, ett_rtps_flags,
12048 STATUS_INFO_FLAGS, ENC_BIG_ENDIAN0x00000000);
12049 if (pStatusInfo != NULL((void*)0)) {
12050 *pStatusInfo = tvb_get_ntohl(tvb, offset);
12051 }
12052 is_data_session_intermediate = (bool_Bool*)p_get_proto_data(pinfo->pool, pinfo, proto_rtps, RTPS_DATA_SESSION_FINAL_PROTODATA_KEY2);
12053 if (is_data_session_intermediate != NULL((void*)0)) {
12054 *is_data_session_intermediate = true1;
12055 }
12056 break;
12057 }
12058
12059 /* 0...2...........7...............15.............23...............31
12060 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
12061 * | PID_DIRECTED_WRITE | 0x0010 |
12062 * +---------------+---------------+---------------+---------------+
12063 * | |
12064 * +- -+
12065 * | octet[12] guidPrefix |
12066 * +- -+
12067 * | |
12068 * +---------------+---------------+---------------+---------------+
12069 * | octet[4] entityId |
12070 * +---------------+---------------+---------------+---------------+
12071 */
12072 case PID_DIRECTED_WRITE(0x0057): {
12073 ENSURE_LENGTH(16);
12074 rtps_util_add_guid_prefix_v2(rtps_parameter_tree, tvb, offset, hf_rtps_sm_guid_prefix,
12075 hf_rtps_sm_host_id, hf_rtps_sm_app_id, hf_rtps_sm_instance_id, 0);
12076 rtps_util_add_entity_id(rtps_parameter_tree, pinfo, tvb, offset+12, hf_rtps_sm_entity_id,
12077 hf_rtps_sm_entity_id_key, hf_rtps_sm_entity_id_kind, ett_rtps_entity,
12078 "guidSuffix", NULL((void*)0));
12079 break;
12080 }
12081
12082
12083 /* 0...2...........7...............15.............23...............31
12084 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
12085 * | PID_KEY_HASH | xxxx |
12086 * +---------------+---------------+---------------+---------------+
12087 * | |
12088 * +- -+
12089 * | octet[xxxx] guid |
12090 * +- -+
12091 * | |
12092 * +---------------+---------------+---------------+---------------+
12093 * Differently from the other GUID, the KEY_HASH parameter may have
12094 * variable length in the future.
12095 * As consequence, no interpretation is performed here (and no check
12096 * for size).
12097 */
12098 case PID_KEY_HASH(0x0070): {
12099 uint8_t guidPart;
12100 int i;
12101 ti = proto_tree_add_bytes_format(rtps_parameter_tree, hf_rtps_guid, tvb, offset, param_length, NULL((void*)0), "guid: ");
12102 for (i = 0; i < param_length; ++i) {
12103 guidPart = tvb_get_uint8(tvb, offset+i);
12104 proto_item_append_text(ti, "%02x", guidPart);
12105 if (( ((i+1) % 4) == 0 ) && (i != param_length-1) )
12106 proto_item_append_text(ti, ":");
12107 }
12108 break;
12109 }
12110
12111 /* 0...2...........7...............15.............23...............31
12112 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
12113 * | PID_TRANSPORT_PRIORITY | 0x0004 |
12114 * +---------------+---------------+---------------+---------------+
12115 * | unsigned long value |
12116 * +---------------+---------------+---------------+---------------+
12117 */
12118 case PID_TRANSPORT_PRIORITY(0x0049):
12119 ENSURE_LENGTH(4);
12120 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_transport_priority, tvb, offset, 4, encoding);
12121 break;
12122
12123 /* 0...2...........7...............15.............23...............31
12124 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
12125 * | PID_CONTENT_FILTER_INFO | length |
12126 * +---------------+---------------+---------------+---------------+
12127 * | ... |
12128 * +---------------+---------------+---------------+---------------+
12129 *
12130 * IDL:
12131 * struct CONTENT_FILTER_SIGNATURE {
12132 * sequence<long> filterBitmap;
12133 * sequence<FILTER_SIGNATURE, 4> filterSignature;
12134 * }
12135 *
12136 * where:
12137 * struct FILTER_SIGNATURE {
12138 * long filterSignature[4];
12139 * }
12140 */
12141 case PID_CONTENT_FILTER_INFO(0x0055): {
12142 uint32_t temp_offset;
12143 uint32_t prev_offset;
12144 uint32_t fs_elem;
12145 uint32_t fs[4];
12146 ENSURE_LENGTH(8);
12147
12148 /* Dissect filter bitmap */
12149 temp_offset = rtps_util_add_seq_ulong(rtps_parameter_tree, tvb, offset,
12150 hf_rtps_filter_bitmap, encoding, param_length, "filterBitmap");
12151
12152 /* Dissect sequence of FILTER_SIGNATURE */
12153 fs_elem = tvb_get_uint32(tvb, temp_offset, encoding);
12154 temp_offset += 4;
12155 while (fs_elem-- > 0) {
12156 prev_offset = temp_offset;
12157 /* Dissect the next FILTER_SIGNATURE object */
12158 fs[0] = tvb_get_uint32(tvb, temp_offset, encoding);
12159 temp_offset += 4;
12160 fs[1] = tvb_get_uint32(tvb, temp_offset, encoding);
12161 temp_offset += 4;
12162 fs[2] = tvb_get_uint32(tvb, temp_offset, encoding);
12163 temp_offset += 4;
12164 fs[3] = tvb_get_uint32(tvb, temp_offset, encoding);
12165 temp_offset += 4;
12166 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",
12167 fs[0], fs[1], fs[2], fs[3]);
12168 }
12169
12170 break;
12171 }
12172
12173 /* 0...2...........7...............15.............23...............31
12174 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
12175 * | PID_BUILTIN_ENDPOINT_SET | length |
12176 * +---------------+---------------+---------------+---------------+
12177 * | long value |
12178 * +---------------+---------------+---------------+---------------+
12179 */
12180 case PID_BUILTIN_ENDPOINT_SET(0x0058): {
12181 uint32_t flags;
12182 ENSURE_LENGTH(4);
12183 flags = tvb_get_uint32(tvb, offset, encoding);
12184 proto_tree_add_bitmask_value(rtps_parameter_tree, tvb, offset,
12185 hf_rtps_param_builtin_endpoint_set_flags, ett_rtps_flags,
12186 BUILTIN_ENDPOINT_FLAGS, flags);
12187 break;
12188 }
12189
12190 /* 0...2...........7...............15.............23...............31
12191 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
12192 * | PID ... BUILTIN_ENDPOINTS_EXT | length |
12193 * +---------------+---------------+---------------+---------------+
12194 * |0|1|2|3| unused |
12195 * +---------------+---------------+---------------+---------------+
12196 * 0 = TypeLookup Service Request Secure Writer
12197 * 1 = TypeLookup Service Request Secure Reader
12198 * 2 = TypeLookup Service Reply Secure Writer
12199 * 3 = TypeLookup Service Reply Secure Reader
12200 */
12201 case PID_AVAILABLE_BUILTIN_ENDPOINTS_EXT(0x1007):
12202 {
12203 ENSURE_LENGTH(4);
12204 uint32_t flags = tvb_get_uint32(tvb, offset, encoding);
12205 proto_tree_add_bitmask_value(rtps_parameter_tree, tvb, offset,
12206 hf_rtps_param_builtin_endpoint_ext_set_flags, ett_rtps_flags,
12207 BUILTIN_ENDPOINT_EXT_FLAGS, flags);
12208 break;
12209 }
12210
12211 /* 0...2...........7...............15.............23...............31
12212 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
12213 * | PID_TYPE_MAX_SIZE_SERIALIZED | length |
12214 * +---------------+---------------+---------------+---------------+
12215 * | long value |
12216 * +---------------+---------------+---------------+---------------+
12217 */
12218 case PID_TYPE_MAX_SIZE_SERIALIZED(0x0060):
12219 ENSURE_LENGTH(4);
12220 proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_type_max_size_serialized, tvb, offset, 4, encoding);
12221 break;
12222
12223
12224
12225 /* 0...2...........7...............15.............23...............31
12226 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
12227 * | PID_ORIGINAL_WRITER_INFO | length |
12228 * +---------------+---------------+---------------+---------------+
12229 * | |
12230 * +- -+
12231 * | octet[12] guidPrefix |
12232 * +- -+
12233 * | |
12234 * +---------------+---------------+---------------+---------------+
12235 * | octet[4] entityId |
12236 * +---------------+---------------+---------------+---------------+
12237 * | |
12238 * + SequenceNumber writerSeqNum +
12239 * | |
12240 * +---------------+---------------+---------------+---------------+
12241 */
12242 case PID_ORIGINAL_WRITER_INFO(0x0061):
12243 ENSURE_LENGTH(16);
12244 rtps_util_add_guid_prefix_v2(rtps_parameter_tree, tvb, offset, hf_rtps_sm_guid_prefix,
12245 hf_rtps_sm_host_id, hf_rtps_sm_app_id, hf_rtps_sm_instance_id, 0);
12246 rtps_util_add_entity_id(rtps_parameter_tree, pinfo, tvb, offset+12, hf_rtps_sm_entity_id,
12247 hf_rtps_sm_entity_id_key, hf_rtps_sm_entity_id_kind, ett_rtps_entity,
12248 "virtualGUIDSuffix", NULL((void*)0));
12249
12250 /* Sequence number */
12251 rtps_util_add_seq_number(rtps_parameter_tree, tvb, offset+16,
12252 encoding, "virtualSeqNumber");
12253 break;
12254
12255 /* 0...2...........7...............15.............23...............31
12256 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
12257 * | PID_ENTITY_NAME | length |
12258 * +---------------+---------------+---------------+---------------+
12259 * | unsigned long String.length |
12260 * +---------------+---------------+---------------+---------------+
12261 * | str[0] | str[1] | str[2] | str[3] |
12262 * +---------------+---------------+---------------+---------------+
12263 * | ... |
12264 * +---------------+---------------+---------------+---------------+
12265 */
12266 case PID_ENTITY_NAME(0x0062):
12267 rtps_util_add_string(rtps_parameter_tree, tvb, offset, hf_rtps_param_entity_name, encoding);
12268 break;
12269
12270 /* 0...2...........7...............15.............23...............31
12271 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
12272 * | PID_ENDPOINT_GUID | 0x0010 |
12273 * +---------------+---------------+---------------+---------------+
12274 * | guid[0] | guid[1] | guid[2] | guid[3] |
12275 * +---------------+---------------+---------------+---------------+
12276 * | guid[4] | guid[5] | guid[6] | guid[7] |
12277 * +---------------+---------------+---------------+---------------+
12278 * | guid[8] | guid[9] | guid[10] | guid[11] |
12279 * +---------------+---------------+---------------+---------------+
12280 * | guid[12] | guid[13] | guid[14] | guid[15] |
12281 * +---------------+---------------+---------------+---------------+
12282 */
12283 case PID_ENDPOINT_GUID(0x005a):
12284 ENSURE_LENGTH(16);
12285 rtps_util_store_type_mapping(pinfo, tvb, offset, type_mapping_object,
12286 NULL((void*)0), TOPIC_INFO_ADD_GUID(0x01));
12287 rtps_util_add_generic_guid_v2(rtps_parameter_tree, tvb, offset,
12288 hf_rtps_endpoint_guid, hf_rtps_param_host_id, hf_rtps_param_app_id,
12289 hf_rtps_param_instance_id, hf_rtps_param_entity, hf_rtps_param_entity_key,
12290 hf_rtps_param_entity_kind, NULL((void*)0));
12291 break;
12292
12293
12294 /* 0...2...........7...............15.............23...............31
12295 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
12296 * | PID_DATA_REPRESENTATION | length |
12297 * +---------------+---------------+---------------+---------------+
12298 * | uint32 SequenceSize |
12299 * +---------------+---------------+---------------+---------------+
12300 * | int16 DataRepresentationId[0] | int16 DataRepresentationId[1] |
12301 * +---------------+-------------------------------+---------------+
12302 * | ... | int16 DataRepresentationId[N] |
12303 * +---------------+---------------+---------------+---------------+
12304 * | uint32_t Compression_id (Optional) |
12305 * +---------------+---------------+---------------+---------------+
12306 * compression_iD flags:
12307 * ZLIB: 0001b
12308 * BZIP: 0010b
12309 * LZ4: 0100b
12310 */
12311
12312 case PID_DATA_REPRESENTATION(0x0073): {
12313 proto_tree *data_representation_seq_subtree;
12314 proto_item *item;
12315 unsigned value;
12316 unsigned item_offset;
12317 unsigned seq_size;
12318 unsigned counter = 0;
12319 unsigned initial_offset = offset;
12320 unsigned compression_id_offset = 0;
12321
12322 seq_size = tvb_get_uint32(tvb, offset, encoding);
12323 data_representation_seq_subtree = proto_tree_add_subtree_format(rtps_parameter_tree, tvb, offset,
12324 param_length, ett_rtps_data_representation, &item, "Data Representation Sequence[%d]", seq_size);
12325 item_offset = offset + 4;
12326 for (; counter < seq_size; ++counter) {
12327 value = tvb_get_uint16(tvb, item_offset, encoding);
12328 proto_tree_add_uint_format(data_representation_seq_subtree, hf_rtps_param_data_representation,
12329 tvb, item_offset, 2, value, "[%d]: %s (0x%X)", counter,
12330 val_to_str(pinfo->pool, value, data_representation_kind_vals, "Unknown data representation value: %u"),
12331 value);
12332 item_offset += 2;
12333 }
12334 compression_id_offset = item_offset;
12335 ALIGN_ME(compression_id_offset, 4)compression_id_offset = (((compression_id_offset) + ((4) - 1)
) & ~((4) - 1))
;
12336 if (compression_id_offset - initial_offset >= 4) {
12337 proto_tree_add_bitmask(
12338 rtps_parameter_tree,
12339 tvb,
12340 compression_id_offset,
12341 hf_rtps_param_compression_id_mask,
12342 ett_rtps_flags,
12343 COMPRESSION_ID_MASK_FLAGS,
12344 encoding);
12345 }
12346 break;
12347 }
12348 /* This parameter PID serializes a sequence number like the existing PID_COHERENT_SET */
12349 /* 0...2...........7...............15.............23...............31
12350 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
12351 * | PID_GROUP_COHERENT_SET | length |
12352 * +---------------+---------------+---------------+---------------+
12353 * | |
12354 * + SequenceNumber seqNumber +
12355 * | |
12356 * +---------------+---------------+---------------+---------------+
12357 */
12358 case PID_GROUP_COHERENT_SET(0x0063): {
12359 uint64_t hi = (uint64_t)tvb_get_uint32(tvb, offset, encoding);
12360 uint64_t lo = (uint64_t)tvb_get_uint32(tvb, offset + 4, encoding);
12361 uint64_t all = (hi << 32) | lo;
12362
12363 proto_tree_add_uint64(
12364 rtps_parameter_tree,
12365 hf_rtps_param_group_coherent_set,
12366 tvb, offset,
12367 sizeof(uint64_t),
12368 all);
12369 break;
12370 }
12371 /* This parameter serializes a sequence number like the existing PID_COHERENT_SET
12372 * and only applies to an end coherent set sample.
12373 */
12374 /* 0...2...........7...............15.............23...............31
12375 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
12376 * | PID_END_GROUP_COHERENT_SET | length |
12377 * +---------------+---------------+---------------+---------------+
12378 * | |
12379 * + SequenceNumber seqNumber +
12380 * | |
12381 * +---------------+---------------+---------------+---------------+
12382 */
12383 case PID_END_GROUP_COHERENT_SET(0x8023): {
12384 uint64_t hi = (uint64_t)tvb_get_uint32(tvb, offset, encoding);
12385 uint64_t lo = (uint64_t)tvb_get_uint32(tvb, offset + 4, encoding);
12386 uint64_t all = (hi << 32) | lo;
12387
12388 proto_tree_add_uint64(
12389 rtps_parameter_tree,
12390 hf_rtps_param_end_group_coherent_set,
12391 tvb, offset,
12392 sizeof(uint64_t),
12393 all);
12394 break;
12395 }
12396 /* This parameter serializes a SN like the existing PID_COHERENT_SET and
12397 * only applies to an end coherent set sample.
12398 * Since there are different ways to finish a coherent set it is necessary
12399 * to store information about the available coherent sets. this PID requires
12400 * set the corrresponding coherence set as "is_set".
12401 */
12402 /* 0...2...........7...............15.............23...............31
12403 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
12404 * | PID_END_COHERENT_SET | length |
12405 * +---------------+---------------+---------------+---------------+
12406 * | |
12407 * + SequenceNumber seqNumber +
12408 * | |
12409 * +---------------+---------------+---------------+---------------+
12410 */
12411 case PID_END_COHERENT_SET(0x8022): {
12412
12413 coherent_set_key coherent_set_info_key;
12414 uint64_t coherent_seq_number = 0;
12415 coherent_set_entity_info *register_entry = NULL((void*)0);
12416 coherent_set_info *coherent_set_info_entry;
12417
12418 coherent_seq_number = rtps_util_add_seq_number(
12419 rtps_parameter_tree,
12420 tvb,
12421 offset,
12422 encoding,
12423 "coherenceSetSequenceNumber");
12424 ti = proto_tree_add_uint64(
12425 rtps_parameter_tree,
12426 hf_rtps_coherent_set_end,
12427 tvb,
12428 0,
12429 0,
12430 coherent_seq_number);
12431 proto_item_set_generated(ti);
12432 /* Need to finish the stored coherence set */
12433 if (coherent_set_entity_info_object != NULL((void*)0)) {
12434 register_entry = (coherent_set_entity_info*)wmem_map_lookup(
12435 coherent_set_tracking.entities_using_map,
12436 &coherent_set_entity_info_object->guid);
12437 if (register_entry) {
12438 register_entry->coherent_set_seq_number = coherent_seq_number;
12439 memset(&coherent_set_info_key, 0, sizeof(coherent_set_info_key));
12440 coherent_set_info_key.guid = register_entry->guid;
12441 coherent_set_info_key.coherent_set_seq_number = register_entry->coherent_set_seq_number;
12442 coherent_set_info_entry = (coherent_set_info*)wmem_map_lookup(
12443 coherent_set_tracking.coherent_set_registry_map,
12444 &coherent_set_info_key);
12445 if (coherent_set_info_entry) {
12446 /* The coherence set is completely set up */
12447 coherent_set_info_entry->is_set = true1;
12448 /* Updating by last time the writer_seq_number */
12449 coherent_set_info_entry->writer_seq_number = coherent_set_entity_info_object->writer_seq_number;
12450 }
12451 }
12452 }
12453 break;
12454 }
12455 /* This parameter serializes a long (4-byte integer) and only applies to an end coherent set sample */
12456 /* 0...2...........7...............15.............23...............31
12457 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
12458 * | MIG..._SET_SAMPLE_COUNT | length |
12459 * +---------------+---------------+---------------+---------------+
12460 * + sampleCount +
12461 * +---------------+---------------+---------------+---------------+
12462 */
12463 case MIG_RTPS_PID_END_COHERENT_SET_SAMPLE_COUNT(0x8024): {
12464 uint32_t sample_count = tvb_get_uint32(tvb, offset, encoding);
12465
12466 proto_tree_add_uint(
12467 rtps_parameter_tree,
12468 hf_rtps_param_mig_end_coherent_set_sample_count,
12469 tvb, offset,
12470 sizeof(uint32_t),
12471 sample_count);
12472 break;
12473 }
12474
12475 /* 0...2...........7...............15.............23...............31
12476 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
12477 * | PID_DEFAULT_MULTICAST_LOCATOR | 0x0018 |
12478 * +---------------+---------------+---------------+---------------+
12479 * | long kind |
12480 * +---------------+---------------+---------------+---------------+
12481 * | long port |
12482 * +---------------+---------------+---------------+---------------+
12483 * | ipv6addr[0] | ipv6addr[1] | ipv6addr[2] | ipv6addr[3] |
12484 * +---------------+---------------+---------------+---------------+
12485 * | ipv6addr[4] | ipv6addr[5] | ipv6addr[6] | ipv6addr[7] |
12486 * +---------------+---------------+---------------+---------------+
12487 * | ipv6addr[8] | ipv6addr[9] | ipv6addr[10] | ipv6addr[11] |
12488 * +---------------+---------------+---------------+---------------+
12489 * | ipv6addr[12] | ipv6addr[13] | ipv6addr[14] | ipv6addr[15] |
12490 * +---------------+---------------+---------------+---------------+
12491 */
12492 case PID_DEFAULT_MULTICAST_LOCATOR(0x0048): {
12493 ENSURE_LENGTH(24);
12494 rtps_util_add_locator_t(rtps_parameter_tree, pinfo, tvb, offset, encoding, "locator");
12495 break;
12496 }
12497
12498 case PID_TYPE_INFORMATION(0x0075): {
12499 rtps_util_add_typeinformation(rtps_parameter_tree, pinfo, tvb, offset);
12500 break;
12501 }
12502
12503 default:
12504 return false0;
12505 } /* End of switch(parameter) */
12506
12507 return true1;
12508}
12509#undef ENSURE_LENGTH
12510
12511static int dissect_parameter_sequence(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
12512 int offset, const unsigned encoding, unsigned size, const char *label,
12513 uint16_t version, uint32_t *pStatusInfo, uint16_t vendor_id,
12514 bool_Bool is_inline_qos, coherent_set_entity_info *coherent_set_entity_info_object) {
12515
12516 proto_item *ti, *param_item, *param_len_item = NULL((void*)0);
12517 proto_tree *rtps_parameter_sequence_tree, *rtps_parameter_tree;
12518 uint32_t parameter, param_length, param_length_length = 2;
12519 int original_offset = offset, initial_offset = offset;
12520 type_mapping * type_mapping_object = NULL((void*)0);
12521 const char * param_name = NULL((void*)0);
12522 if (!pinfo->fd->visited) {
12523 /*
12524 * At minimum, type_mapping_object->fields_visited must be
12525 * initialized to 0, because we haven't visited any fields
12526 * yet. The routines that visit fields just set individual
12527 * bits in type_mapping_object->fields_visited; they don't
12528 * initialize it.
12529 */
12530 type_mapping_object = wmem_new(wmem_file_scope(), type_mapping)((type_mapping*)wmem_alloc((wmem_file_scope()), sizeof(type_mapping
)))
;
12531 type_mapping_object->fields_visited = 0;
12532 type_mapping_object->guid.fields_present = 0;
12533 }
12534
12535 rtps_parameter_sequence_tree = proto_tree_add_subtree_format(tree, tvb, offset, size,
12536 ett_rtps_parameter_sequence, &ti, "%s:", label);
12537
12538 /* Loop through all the parameters defined until PID_SENTINEL is found */
12539 for (;;) {
12540 size -= offset - original_offset;
12541 if (size < 4) {
12542 expert_add_info_format(pinfo, (param_len_item == NULL((void*)0)) ? ti : param_len_item,
12543 &ei_rtps_parameter_value_invalid, "ERROR: not enough bytes to read the next parameter");
12544 return offset + size;
12545 }
12546 original_offset = offset;
12547
12548 /* Reads parameter and create the sub tree. At this point we don't know
12549 * the final string that will identify the node or its length. It will
12550 * be set later...
12551 */
12552 parameter = tvb_get_uint16(tvb, offset, encoding);
12553 param_length = tvb_get_uint16(tvb, offset+2, encoding);
12554 if ((parameter & PID_EXTENDED(0x3f01)) == PID_EXTENDED(0x3f01)) {
12555 offset += 4;
12556 /* get extended member id and length */
12557 parameter = tvb_get_uint32(tvb, offset, encoding);
12558 param_length = tvb_get_uint32(tvb, offset+4, encoding);
12559 param_length_length = 4;
12560 }
12561 if (version < 0x0200) {
12562 rtps_parameter_tree = proto_tree_add_subtree(rtps_parameter_sequence_tree, tvb, offset, -1,
12563 ett_rtps_parameter, &param_item, val_to_str(pinfo->pool, parameter, parameter_id_vals, "Unknown (0x%04x)"));
12564
12565 proto_tree_add_uint(rtps_parameter_tree, hf_rtps_parameter_id, tvb, offset, 2, parameter);
12566 } else {
12567 bool_Bool goto_default = true1;
12568 switch(vendor_id) {
12569 case RTPS_VENDOR_RTI_DDS(0x0101):
12570 case RTPS_VENDOR_RTI_DDS_MICRO(0x010A): {
12571 if (is_inline_qos) {
12572 param_name = try_val_to_str(parameter, parameter_id_inline_qos_rti);
12573 if (param_name != NULL((void*)0)) {
12574 rtps_parameter_tree = proto_tree_add_subtree(rtps_parameter_sequence_tree, tvb, offset, -1,
12575 ett_rtps_parameter, &param_item, val_to_str(pinfo->pool, parameter, parameter_id_inline_qos_rti, "Unknown (0x%04x)"));
12576 proto_tree_add_uint(rtps_parameter_tree, hf_rtps_parameter_id_inline_rti, tvb, offset,
12577 param_length_length, parameter);
12578 goto_default = false0;
12579 }
12580 } else {
12581 param_name = try_val_to_str(parameter, parameter_id_rti_vals);
12582 if (param_name != NULL((void*)0)) {
12583 rtps_parameter_tree = proto_tree_add_subtree(rtps_parameter_sequence_tree, tvb, offset, -1,
12584 ett_rtps_parameter, &param_item, val_to_str(pinfo->pool, parameter, parameter_id_rti_vals, "Unknown (0x%04x)"));
12585 proto_tree_add_uint(rtps_parameter_tree, hf_rtps_parameter_id_rti, tvb, offset,
12586 param_length_length, parameter);
12587 goto_default = false0;
12588 }
12589 }
12590 break;
12591 }
12592 case RTPS_VENDOR_TOC(0x0106): {
12593 param_name = try_val_to_str(parameter, parameter_id_toc_vals);
12594 if (param_name != NULL((void*)0)) {
12595 rtps_parameter_tree = proto_tree_add_subtree(rtps_parameter_sequence_tree, tvb, offset, -1,
12596 ett_rtps_parameter, &param_item, val_to_str(pinfo->pool, parameter, parameter_id_toc_vals, "Unknown (0x%04x)"));
12597
12598 proto_tree_add_uint(rtps_parameter_tree, hf_rtps_parameter_id_toc, tvb, offset,
12599 param_length_length, parameter);
12600 goto_default = false0;
12601 }
12602 break;
12603 }
12604 case RTPS_VENDOR_ADL_DDS(0x0102): {
12605 param_name = try_val_to_str(parameter, parameter_id_adl_vals);
12606 if (param_name != NULL((void*)0)) {
12607 rtps_parameter_tree = proto_tree_add_subtree(rtps_parameter_sequence_tree, tvb, offset, -1,
12608 ett_rtps_parameter, &param_item, val_to_str(pinfo->pool, parameter, parameter_id_adl_vals, "Unknown (0x%04x)"));
12609
12610 proto_tree_add_uint(rtps_parameter_tree, hf_rtps_parameter_id_adl, tvb, offset,
12611 param_length_length, parameter);
12612 goto_default = false0;
12613 }
12614 break;
12615 }
12616 }
12617 if (goto_default) {
12618 rtps_parameter_tree = proto_tree_add_subtree(rtps_parameter_sequence_tree, tvb, offset, -1,
12619 ett_rtps_parameter, &param_item, val_to_str(pinfo->pool, parameter, parameter_id_v2_vals, "Unknown (0x%04x)"));
12620 proto_tree_add_uint(rtps_parameter_tree, hf_rtps_parameter_id_v2, tvb, offset,
12621 param_length_length, parameter);
12622 }
12623
12624 }
12625 /* after param_id */
12626 offset += param_length_length;
12627
12628 if (parameter == PID_SENTINEL(0x01)) {
12629 /* PID_SENTINEL closes the parameter list, (length is ignored) */
12630 proto_item_set_len(param_item, 4);
12631 offset += 2;
12632 proto_item_set_len(rtps_parameter_sequence_tree, offset - initial_offset);
12633 return offset;
12634 }
12635
12636 /* parameter length */
12637 param_len_item = proto_tree_add_item(rtps_parameter_tree, hf_rtps_parameter_length,
12638 tvb, offset, param_length_length, encoding);
12639 offset += param_length_length;
12640
12641 /* Make sure we have enough bytes for the param value */
12642 if ((size-4 < param_length) &&
12643 (parameter != PID_SENTINEL(0x01))) {
12644 expert_add_info_format(pinfo, param_len_item, &ei_rtps_parameter_value_invalid, "Not enough bytes to read the parameter value");
12645 return offset + size;
12646 }
12647
12648 /* Sets the end of this item (now we know it!) */
12649 proto_item_set_len(param_item, param_length+2*param_length_length);
12650
12651 /* This way, we can include vendor specific dissections without modifying the main ones */
12652
12653 if (!dissect_parameter_sequence_v1(rtps_parameter_tree, pinfo, tvb, param_item, param_len_item,
12654 offset, encoding, size, param_length, parameter, version, type_mapping_object, coherent_set_entity_info_object)) {
12655 if ((version < 0x0200) ||
12656 !dissect_parameter_sequence_v2(rtps_parameter_tree, pinfo, tvb, param_item, param_len_item,
12657 offset, encoding, param_length, parameter,
12658 pStatusInfo, vendor_id, type_mapping_object, coherent_set_entity_info_object)) {
12659 if (param_length > 0) {
12660 proto_tree_add_item(rtps_parameter_tree, hf_rtps_parameter_data, tvb,
12661 offset, param_length, ENC_NA0x00000000);
12662 }
12663 }
12664 }
12665
12666 switch (vendor_id) {
12667 case RTPS_VENDOR_RTI_DDS(0x0101):
12668 case RTPS_VENDOR_RTI_DDS_MICRO(0x010A): {
12669 dissect_parameter_sequence_rti_dds(rtps_parameter_tree, pinfo, tvb,
12670 param_item, param_len_item, offset, encoding, param_length, parameter, type_mapping_object, is_inline_qos, vendor_id);
12671 break;
12672 }
12673 case RTPS_VENDOR_TOC(0x0106): {
12674 dissect_parameter_sequence_toc(rtps_parameter_tree, pinfo, tvb,
12675 param_item, param_len_item, offset, encoding, param_length, parameter);
12676 break;
12677 }
12678 case RTPS_VENDOR_ADL_DDS(0x0102): {
12679 dissect_parameter_sequence_adl(rtps_parameter_tree, pinfo, tvb,
12680 param_item, param_len_item, offset, encoding, param_length, parameter);
12681 break;
12682 }
12683 default:
12684 break;
12685 }
12686
12687 rtps_util_insert_type_mapping_in_registry(pinfo, type_mapping_object);
12688 offset += param_length;
12689 }
12690 return offset;
12691}
12692
12693static bool_Bool rtps_is_ping(tvbuff_t *tvb, packet_info *pinfo, int offset)
12694{
12695 bool_Bool is_ping = false0;
12696
12697 if (!tvb_strneql(tvb, offset, "NDDSPING", 8))
12698 is_ping = true1;
12699
12700 if (is_ping)
12701 col_set_str(pinfo->cinfo, COL_INFO, "PING");
12702
12703 return is_ping;
12704}
12705
12706/* *********************************************************************** */
12707/* * A P P_ A C K_ C O N F * */
12708/* *********************************************************************** */
12709static void dissect_APP_ACK_CONF(tvbuff_t *tvb,
12710 packet_info *pinfo _U___attribute__((unused)),
12711 int offset,
12712 uint8_t flags,
12713 const unsigned encoding,
12714 int octets_to_next_header,
12715 proto_tree *tree,
12716 proto_item *item,
12717 endpoint_guid * guid)
12718 {
12719 /*
12720 * 0...2...........7...............15.............23...............31
12721 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
12722 * | APP_ACK_CONF |X|X|X|X|X|X|X|E| octetsToNextHeader |
12723 * +---------------+---------------+---------------+---------------+
12724 * | EntityId readerEntityId |
12725 * +---------------+---------------+---------------+---------------+
12726 * | EntityId writerEntityId |
12727 * +---------------+---------------+---------------+---------------+
12728 * + unsigned long virtualWriterCount +
12729 * +---------------+---------------+---------------+---------------+
12730 * | GuidPrefix virtualWriterGuidPrefix |
12731 * +---------------+---------------+---------------+---------------+
12732 * EntityId virtualWriterObjectId
12733 *
12734 * (after last interval) unsigned long virtualWriterEpoch
12735 *
12736 */
12737 int original_offset; /* Offset to the readerEntityId */
12738 int32_t virtual_writer_count;
12739 uint32_t wid;
12740 proto_item *octet_item;
12741 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, APP_ACK_CONF_FLAGS, flags);
12742
12743 octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb, offset + 2, 2, encoding);
12744 offset += 4;
12745 original_offset = offset;
12746
12747 if (octets_to_next_header < 20) {
12748 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", 20);
12749 return;
12750 }
12751
12752 /* readerEntityId */
12753 rtps_util_add_entity_id(tree,
12754 pinfo, tvb,
12755 offset,
12756 hf_rtps_sm_rdentity_id,
12757 hf_rtps_sm_rdentity_id_key,
12758 hf_rtps_sm_rdentity_id_kind,
12759 ett_rtps_rdentity,
12760 "readerEntityId",
12761 NULL((void*)0));
12762 offset += 4;
12763
12764 /* writerEntityId */
12765 rtps_util_add_entity_id(tree,
12766 pinfo, tvb,
12767 offset,
12768 hf_rtps_sm_wrentity_id,
12769 hf_rtps_sm_wrentity_id_key,
12770 hf_rtps_sm_wrentity_id_kind,
12771 ett_rtps_wrentity,
12772 "writerEntityId",
12773 &wid);
12774 offset += 4;
12775 guid->entity_id = wid;
12776 guid->fields_present |= GUID_HAS_ENTITY_ID0x00000008;
12777 rtps_util_add_topic_info(tree, pinfo, tvb, offset, guid);
12778
12779 /* virtualWriterCount */
12780 proto_tree_add_item_ret_uint(tree, hf_rtps_param_app_ack_conf_virtual_writer_count, tvb, offset, 4,
12781 encoding, &virtual_writer_count);
12782 offset += 4;
12783
12784 {
12785 /* Deserialize Virtual Writers */
12786 proto_tree *sil_tree_writer_list;
12787 proto_tree *sil_tree_writer;
12788
12789 int32_t current_writer_index = 0;
12790
12791 /** Writer list **/
12792
12793 sil_tree_writer_list = proto_tree_add_subtree_format(tree, tvb, offset, -1,
12794 ett_rtps_app_ack_virtual_writer_list, NULL((void*)0), "Virtual Writer List");
12795
12796 current_writer_index = 0;
12797
12798 while (current_writer_index < virtual_writer_count) {
12799 sil_tree_writer = proto_tree_add_subtree_format(sil_tree_writer_list, tvb, offset, -1,
12800 ett_rtps_app_ack_virtual_writer, NULL((void*)0), "virtualWriter[%d]", current_writer_index);
12801
12802 /* Virtual Writer Guid */
12803 rtps_util_add_guid_prefix_v2(sil_tree_writer, tvb, offset,
12804 hf_rtps_sm_guid_prefix, hf_rtps_sm_host_id, hf_rtps_sm_app_id,
12805 hf_rtps_sm_instance_id, 0);
12806
12807 rtps_util_add_entity_id(sil_tree_writer, pinfo, tvb, offset+12,
12808 hf_rtps_sm_entity_id, hf_rtps_sm_entity_id_key, hf_rtps_sm_entity_id_kind,
12809 ett_rtps_entity, "virtualGUIDSuffix", NULL((void*)0));
12810
12811 offset += 16;
12812
12813 /* Counter */
12814 proto_tree_add_item(tree, hf_rtps_param_app_ack_conf_count, tvb, offset, 4, encoding);
12815 offset += 4;
12816
12817 current_writer_index++;
12818
12819 } /* virtual_writer_count */
12820 }
12821
12822
12823 if (offset < original_offset + octets_to_next_header)
12824 {
12825 /* In this case there must be something wrong in the bitmap: there
12826 * are some extra bytes that we don't know how to decode
12827 */
12828 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);
12829 }
12830 else if (offset > original_offset + octets_to_next_header)
12831 {
12832 /* Decoding the bitmap went over the end of this submessage.
12833 * Enter an item in the protocol tree that spans over the entire
12834 * submessage.
12835 */
12836 expert_add_info(pinfo, item, &ei_rtps_missing_bytes);
12837 }
12838}
12839
12840static void dissect_parameterized_serialized_data(proto_tree *tree, tvbuff_t *tvb,
12841 int offset_input, int size, const unsigned encoding)
12842{
12843 uint32_t member_id, member_length;
12844 proto_item * ti;
12845 proto_tree * data_tree, * member_tree;
12846 int offset = offset_input;
12847 int deserialized_size = 0;
12848 data_tree = proto_tree_add_subtree_format(tree, tvb, offset, -1,
12849 ett_rtps_serialized_data, &ti, "serializedData");
12850 while (deserialized_size < size) {
12851 ALIGN_ZERO(offset, 2, offset_input)(offset -= offset_input, offset = (((offset) + ((2) - 1)) &
~((2) - 1)), offset += offset_input)
;
12852 member_id = tvb_get_uint16(tvb, offset, encoding);
12853 member_length = tvb_get_uint16(tvb, offset+2, encoding);
12854
12855 if ((member_id & PID_EXTENDED(0x3f01)) == PID_EXTENDED(0x3f01)) {
12856 member_id = tvb_get_uint32(tvb, offset+4, encoding);
12857 member_length = tvb_get_uint32(tvb, offset+8, encoding);
12858 member_tree = proto_tree_add_subtree_format(data_tree, tvb, offset, member_length + 12,
12859 ett_rtps_data_member, NULL((void*)0), "Member (id = %u, len = %u)", member_id, member_length);
12860 proto_tree_add_item(member_tree, hf_rtps_pl_cdr_member_id_ext, tvb, offset+4, 4, encoding);
12861 proto_tree_add_item(member_tree, hf_rtps_pl_cdr_member_length_ext, tvb, offset+8, 4, encoding);
12862 offset += 12;
12863 deserialized_size += 12;
12864 } else if ((member_id & PID_LIST_END(0x3f02)) == PID_LIST_END(0x3f02)){
12865 /* If this is the end of the list, don't add a tree.
12866 * If we add more logic here in the future, take into account that
12867 * offset is incremented by 4 */
12868 deserialized_size += 4;
12869 break;
12870 } else {
12871 member_tree = proto_tree_add_subtree_format(data_tree, tvb, offset, member_length + 4,
12872 ett_rtps_data_member, NULL((void*)0), "Member (id = %u, len = %u)", member_id, member_length);
12873 proto_tree_add_item(member_tree, hf_rtps_pl_cdr_member_id, tvb, offset, 2, encoding);
12874 proto_tree_add_item(member_tree, hf_rtps_pl_cdr_member_length, tvb, offset+2, 2, encoding);
12875 offset += 4;
12876 deserialized_size += 4;
12877 }
12878
12879 proto_tree_add_item(member_tree, hf_rtps_pl_cdr_member, tvb, offset,
12880 member_length, encoding);
12881 offset = check_offset_addition(offset, member_length, tree, NULL((void*)0), tvb);
12882 deserialized_size += member_length;
12883 }
12884 proto_item_set_len(ti, deserialized_size);
12885}
12886
12887/************************************************************************ */
12888/* Encapsulated data * */
12889/* ********************************************************************** */
12890/*
12891 * Note: the encapsulation header is ALWAYS big endian, then the encapsulation
12892 * type specified the type of endianness of the payload.
12893 * 0...2...........8...............16..............24..............32
12894 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
12895 *| representation_identifier | X X X X X X X X X X X | C C C P P |
12896 *+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
12897 *~ ~
12898 * ~... Bytes of data representation using a format that ... ~
12899 * ~... depends on the RepresentationIdentifier and options ... ~
12900 * ~ ~
12901 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
12902 *
12903 * X = Unused options bits
12904 * C = Compression bits
12905 * P = Padding bits
12906 *
12907 * If compressed:
12908 * 0...2...........8...............16..............24..............32
12909 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
12910 * | representation_identifier | X X X X X X X X X X X | C C C P P |
12911 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
12912 * ~ Uncompressed Length ~
12913 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
12914 * ~ *Extended Compression Options ~
12915 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
12916 * ~ Compressed User Data ... ~
12917 * ~ ~
12918 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
12919 *
12920 * C = 0b111 would be extended compression options which would come in as an
12921 * additional header before the payload.
12922 * C = 0b000 to indicate no compression
12923 *
12924 * This options field would be used for future enhancements.For example,
12925 * could be used to define a custom compressor plugin for matching purposes.
12926 */
12927
12928 /* Dissects the encapsultaion header and uncompress the serialized
12929 * data if is is compressed and it is compressed in using Zlib.
12930 *
12931 * @param[in] tree
12932 * @param[in] packet info.
12933 * @param[in] tvb
12934 * @param[in] offset offset at the beginning of the encapsulation id.
12935 * @param[in] size in bytes from the initial offset to the end of the serialized data
12936 * @param[in] uncompress_if_compressed true for uncompressing if the data should be uncompressed.
12937 * @param[out] encapsulation_id_out If not null it will contain the encapsultaion_id
12938 * @param[out] compression_option_out If not null it will contain the compression option
12939 * @param[out] padding_bytes_out If not null it will contain the padding bytes
12940 * @param[out] extended_compression_options_out If not null it will contain the extended compression options
12941 * @param[out] extended_header_bits_out If not null it will contain the extended header bits
12942 * @param[out] is_compressed_out If not null it will indicate if the serielized data is compressed
12943 * @param[out] uncompressed_ok_out If not null it will indicate if the serizlized data has been successfully uncompressed
12944 * @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.
12945 * @param[out] compressed_data_tree_out If not null it will contain the subtree of the uncompressed data.
12946 *
12947 * @return the offset after the at the beginining of the serialized data
12948 * @note All output parameters are optional.
12949 */
12950static
12951int rtps_prepare_encapsulated_data(
12952 proto_tree *tree,
12953 packet_info *pinfo,
12954 tvbuff_t *tvb,
12955 int offset,
12956 int size,
12957 bool_Bool uncompress_if_compressed,
12958 uint16_t *encapsulation_id_out,
12959 uint8_t *compression_option_out,
12960 uint8_t *padding_bytes_out,
12961 uint32_t *extended_compression_options_out,
12962 uint8_t *extended_header_bits_out,
12963 bool_Bool *is_compressed_out,
12964 bool_Bool *uncompressed_ok_out,
12965 tvbuff_t **uncompressed_tvb_out,
12966 proto_tree **compressed_data_tree_out) {
12967 int initial_offset = offset;
12968 int16_t encapsulation_options = 0;
12969 uint32_t compressed_size = 0;
12970 uint32_t uncompressed_size = 0;
12971 uint16_t encapsulation_id = 0;
12972 uint8_t compression_option = 0;
12973 uint8_t padding_bytes = 0;
12974 uint32_t extended_compression_options = 0;
12975 uint8_t extended_header_bits = 0;
12976 bool_Bool is_compressed = 0;
12977 bool_Bool uncompressed_ok = 0;
12978 tvbuff_t *uncompressed_tvb = NULL((void*)0);
12979
12980 /* This logic applies to data that is not a fragment (-1) or is the first fragment */
12981 /* Encapsulation ID */
12982 encapsulation_id = tvb_get_ntohs(tvb, offset); /* Always big endian */
12983 proto_tree_add_uint(tree,
12984 hf_rtps_param_serialize_encap_kind, tvb, offset, 2, encapsulation_id);
12985 offset += 2;
12986
12987 offset = rtps_util_dissect_encapsulation_options(
12988 tree,
12989 tvb,
12990 offset,
12991 &encapsulation_options,
12992 &compression_option,
12993 &padding_bytes,
12994 &extended_header_bits);
12995 /* If compressed on a supported format we have to uncompress it on a new tvb
12996 * and reset the offset */
12997 is_compressed = (encapsulation_options & ENCAPSULATION_OPTIONS_COMPRESSION_BYTES_MASK(0x1C)) != 0;
12998 if (is_compressed) {
12999 uncompressed_size = tvb_get_int32(tvb, offset, ENC_BIG_ENDIAN0x00000000);
13000 proto_tree_add_item(
13001 tree,
13002 hf_rtps_uncompressed_serialized_length,
13003 tvb,
13004 offset,
13005 4,
13006 ENC_BIG_ENDIAN0x00000000);
13007 offset += 4;
13008 /* Get the compression extended options if required */
13009 if (extended_header_bits == ENCAPSULATION_OPTIONS_COMPRESSION_EXTENDED_HEADER_VALUE(0x1C)) {
13010 extended_compression_options = tvb_get_int32(tvb, offset, ENC_BIG_ENDIAN0x00000000);
13011 proto_tree_add_item(
13012 tree,
13013 hf_rtps_encapsulation_extended_compression_options,
13014 tvb,
13015 offset,
13016 4,
13017 ENC_BIG_ENDIAN0x00000000);
13018 offset += 4;
13019 }
13020 /* Get the compressed size. Padding bytes are the padding at the end of the compressed data */
13021 compressed_size = size - (offset - initial_offset) - padding_bytes;
13022 }
13023
13024 /* Only decompress if it is compressed with ZLIB */
13025 if (uncompress_if_compressed && (compression_option == RTI_OSAPI_COMPRESSION_CLASS_ID_ZLIB(1))) {
13026 bool_Bool tried_to_uncompress = false0;
13027 proto_item *uncompressed_data_item = NULL((void*)0);
13028
13029 /* Try to uncompress the data */
13030 uncompressed_tvb = rtps_util_get_uncompressed_tvb_zlib(
13031 tvb,
13032 offset,
13033 compressed_size,
13034 &tried_to_uncompress);
13035 /* The uncompressed data size must be the same as it is in the "Uncompressed Length" field */
13036 uncompressed_ok = (uncompressed_tvb != NULL((void*)0)
13037 && (uncompressed_size == (uint32_t)tvb_reported_length(uncompressed_tvb)));
13038
13039 /* If uncompression went well we have a new tvb that holds the uncompressed data */
13040 if (tried_to_uncompress) {
13041 tvbuff_t *child_tvb = NULL((void*)0);
13042 int child_size = 0;
13043 int child_offset = 0;
13044
13045 /* If the tvb is not uncompressed we add use the ovb, offset and size
13046 * of the original tvb */
13047 if (uncompressed_tvb != NULL((void*)0)) {
13048 child_tvb = uncompressed_tvb;
13049 child_size = -1;
13050 child_offset = 0;
13051 } else {
13052 child_tvb = tvb;
13053 child_size = compressed_size;
13054 child_offset = offset;
13055 }
13056 /* Uncompressed sample hangs from a different subtree */
13057 *compressed_data_tree_out = proto_tree_add_subtree(
13058 tree,
13059 child_tvb,
13060 child_offset,
13061 child_size,
13062 ett_rtps_decompressed_serialized_data,
13063 &uncompressed_data_item,
13064 "[Decompressed data]");
13065 /* If we tried to decompress we need to add hf_rtps_uncompression_ok set to true or false*/
13066 if (!(uncompressed_ok)) {
13067 expert_add_info_format(
13068 pinfo,
13069 uncompressed_data_item,
13070 &ei_rtps_uncompression_error,
13071 "Error: unable to uncompress payload");
13072 }
13073 }
13074 }
13075
13076 /* Set the optional output parameters */
13077 if (encapsulation_id_out != NULL((void*)0)) {
13078 *encapsulation_id_out = encapsulation_id;
13079 }
13080 if (compression_option_out != NULL((void*)0)) {
13081 *compression_option_out = compression_option;
13082 }
13083 if (padding_bytes_out != NULL((void*)0)) {
13084 *padding_bytes_out = padding_bytes;
13085 }
13086 if (extended_compression_options_out != NULL((void*)0)) {
13087 *extended_compression_options_out = extended_compression_options;
13088 }
13089 if (extended_header_bits_out != NULL((void*)0)) {
13090 *extended_header_bits_out = extended_header_bits;
13091 }
13092 if (is_compressed_out != NULL((void*)0)) {
13093 *is_compressed_out = is_compressed;
13094 }
13095 if (uncompressed_ok_out != NULL((void*)0)) {
13096 *uncompressed_ok_out = uncompressed_ok;
13097 }
13098 if (uncompressed_tvb_out != NULL((void*)0)) {
13099 *uncompressed_tvb_out = uncompressed_tvb;
13100 }
13101 return offset;
13102}
13103
13104
13105
13106/* *********************************************************************** */
13107/* * Serialized data dissector * */
13108/* *********************************************************************** */
13109/* Note: the encapsulation header is ALWAYS big endian, then the encapsulation
13110 * type specified the type of endianness of the payload.
13111 *
13112 * Fragmentation : Options only appear on first fragment
13113 * Serieaized data might be compressed or uncompressed. Depending on that the
13114 * header contains more elements. This is indicated in the encapsulation
13115 * options where:
13116 *
13117 * X = Unused options bits
13118 * C = Compression bits
13119 * P = Padding bits
13120 *
13121 * 0...2...........8...............16..............24..............32
13122 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
13123 * | representation_identifier |X X X X X X X X X X X|C C C P P|
13124 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
13125 * ~ ~
13126 * ~ ... Bytes of data representation using a format that ... ~
13127 * ~ ... depends on the RepresentationIdentifier and options ... ~
13128 * ~ ~
13129 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
13130 *
13131 * If compressed:
13132 *
13133 * 0...2...........8...............16..............24..............32
13134 * + -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
13135 * | representation_identifier | X X X X X X X X X X X | C C C P P |
13136 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
13137 * ~ Uncompressed Length ~
13138 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
13139 * ~ *Extended Compression Options ~
13140 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
13141 * ~ Compressed User Data ... ~
13142 * ~ ~
13143 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
13144 *
13145 * C = 0b111 would be extended compression options which would come in as an
13146 * additional header before the payload.
13147 * C = 0b000 to indicate no compression
13148 *
13149 * *This options field would be used for future enhancements.For example,
13150 * could be used to define a custom compressor plugin for matching purposes.
13151 *
13152 */
13153
13154static void dissect_serialized_data(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, int offset,
13155 int size, const char *label, uint16_t vendor_id, bool_Bool is_discovery_data,
13156 endpoint_guid * guid, int32_t frag_number /* -1 if no fragmentation */) {
13157 proto_item *ti;
13158 proto_tree *rtps_parameter_sequence_tree;
13159 uint16_t encapsulation_id;
13160 bool_Bool try_dissection_from_type_object = false0;
13161 unsigned encapsulation_encoding = ENC_BIG_ENDIAN0x00000000;
13162 rtps_dissector_data * data = wmem_new(pinfo->pool, rtps_dissector_data)((rtps_dissector_data*)wmem_alloc((pinfo->pool), sizeof(rtps_dissector_data
)))
;
13163 tvbuff_t *data_holder_tvb = tvb;
13164 tvbuff_t *compressed_tvb = NULL((void*)0);
13165 proto_tree *dissected_data_holder_tree = NULL((void*)0);
13166 bool_Bool is_compressed = false0;
13167 bool_Bool uncompressed_ok = false0;
13168 proto_tree *compressed_subtree = NULL((void*)0);
13169
13170 data->encapsulation_id = 0;
13171 data->position_in_batch = -1;
13172 /* Creates the sub-tree */
13173 rtps_parameter_sequence_tree = proto_tree_add_subtree(tree, tvb, offset, size,
13174 ett_rtps_serialized_data, &ti, label);
13175
13176 /* We store this value for using later */
13177 dissected_data_holder_tree = rtps_parameter_sequence_tree;
13178
13179 if (frag_number > 1) {
13180 /* if the data is a fragment and not the first fragment, simply dissect the
13181 content as raw bytes */
13182 proto_tree_add_item(rtps_parameter_sequence_tree, hf_rtps_issue_data, tvb,
13183 offset, size, ENC_NA0x00000000);
13184 } else {
13185 /* Dissects the encapsulation header options and uncompress the tvb if it is
13186 * compressed and can be uncompressed */
13187 offset = rtps_prepare_encapsulated_data(
13188 rtps_parameter_sequence_tree,
13189 pinfo,
13190 tvb,
13191 offset,
13192 size,
13193 true1,
13194 &encapsulation_id,
13195 NULL((void*)0),
13196 NULL((void*)0),
13197 NULL((void*)0),
13198 NULL((void*)0),
13199 &is_compressed,
13200 &uncompressed_ok,
13201 &compressed_tvb,
13202 &compressed_subtree);
13203 data->encapsulation_id = encapsulation_id;
13204 if (is_compressed && uncompressed_ok) {
13205 data_holder_tvb = compressed_tvb;
13206 offset = 0;
13207 dissected_data_holder_tree = compressed_subtree;
13208 }
13209
13210 /* Sets the correct values for encapsulation_encoding */
13211 encapsulation_encoding = get_encapsulation_endianness(encapsulation_id);
13212
13213 if (encapsulation_id == ENCAPSULATION_CDR_LE(0x0001) ||
13214 encapsulation_id == ENCAPSULATION_CDR_BE(0x0000) ||
13215 encapsulation_id == ENCAPSULATION_CDR2_LE(0x0007) ||
13216 encapsulation_id == ENCAPSULATION_CDR2_BE(0x0006) ||
13217 encapsulation_id == ENCAPSULATION_PL_CDR_LE(0x0003) ||
13218 encapsulation_id == ENCAPSULATION_PL_CDR_BE(0x0002)) {
13219 try_dissection_from_type_object = true1;
13220 }
13221
13222 /* In case it is compressed only try to dissect the type object if it is correctly uncompressed */
13223 try_dissection_from_type_object = try_dissection_from_type_object
13224 && ((is_compressed == uncompressed_ok));
13225
13226 /* At this point:
13227 * - uncompressed_tvb contains the uncompressed tvb or the packet tvb
13228 * - compressed_data_tree points to the tree of the uncompressed data
13229 * or the rtps_parameter_sequence_tree.
13230 * - offset points to 0 of the uncompressed tvb or the offseet of the packet
13231 * tvb if it is not decompressed.
13232 * Only try to dissect the user data if it is not compressed or it is compressed and correctly uncompressed */
13233 if (is_compressed == uncompressed_ok) {
13234 if (rtps_util_try_dissector(dissected_data_holder_tree,
13235 pinfo, data_holder_tvb, offset, guid, data, encapsulation_encoding,
13236 get_encapsulation_version(encapsulation_id), try_dissection_from_type_object)) {
13237 return;
13238 }
13239 /* The payload */
13240 size -= 4;
13241 switch (encapsulation_id) {
13242 /* CDR_LE and CDR_BE data should be dissected like this if it is a fragment or
13243 if it is not */
13244 case ENCAPSULATION_CDR_LE(0x0001):
13245 case ENCAPSULATION_CDR_BE(0x0000):
13246 proto_tree_add_item(dissected_data_holder_tree, hf_rtps_issue_data, data_holder_tvb,
13247 offset, size, ENC_NA0x00000000);
13248 break;
13249
13250 case ENCAPSULATION_PL_CDR_LE(0x0003):
13251 case ENCAPSULATION_PL_CDR_BE(0x0002):
13252 if (is_discovery_data) {
13253 dissect_parameter_sequence(dissected_data_holder_tree, pinfo, data_holder_tvb, offset,
13254 encapsulation_encoding, size, "serializedData", 0x0200, NULL((void*)0), vendor_id, false0, NULL((void*)0));
13255 }
13256 else if (frag_number != NOT_A_FRAGMENT(-1)) {
13257 /* fragments should be dissected as raw bytes (not parameterized) */
13258 proto_tree_add_item(dissected_data_holder_tree, hf_rtps_issue_data, data_holder_tvb,
13259 offset, size, ENC_NA0x00000000);
13260 break;
13261 }
13262 else {
13263 /* Instead of showing a warning like before, we now dissect the data as
13264 * (id - length - value) members */
13265 dissect_parameterized_serialized_data(dissected_data_holder_tree,
13266 data_holder_tvb, offset, size, encapsulation_encoding);
13267 }
13268 break;
13269 case ENCAPSULATION_CDR2_LE(0x0007):
13270 if (guid != NULL((void*)0) && guid->entity_id == ENTITYID_TL_SVC_REQ_WRITER(0x000300c3)) {
13271 rtps_util_dissect_type_lookup_request(dissected_data_holder_tree,
13272 pinfo, tvb, offset);
13273 } else if (guid != NULL((void*)0) && guid->entity_id == ENTITYID_TL_SVC_REPLY_WRITER(0x000301c3)) {
13274 rtps_util_dissect_type_lookup_reply(dissected_data_holder_tree,
13275 pinfo, tvb, offset);
13276 } else {
13277 proto_tree_add_item(dissected_data_holder_tree,
13278 hf_rtps_data_serialize_data, tvb, offset, size, ENC_NA0x00000000);
13279 }
13280 break;
13281 default:
13282 proto_tree_add_item(dissected_data_holder_tree, hf_rtps_data_serialize_data, tvb,
13283 offset, size, ENC_NA0x00000000);
13284 }
13285 }
13286 }
13287}
13288
13289/* *********************************************************************** */
13290/* * A P P_ A C K * */
13291/* *********************************************************************** */
13292static void dissect_APP_ACK(tvbuff_t *tvb,
13293 packet_info *pinfo,
13294 int offset,
13295 uint8_t flags,
13296 const unsigned encoding,
13297 int octets_to_next_header,
13298 proto_tree *tree,
13299 proto_item *item,
13300 endpoint_guid * guid)
13301 {
13302 /*
13303 * 0...2...........7...............15.............23...............31
13304 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
13305 * | APP_ACK |X|X|X|X|X|X|X|E| octetsToNextHeader |
13306 * +---------------+---------------+---------------+---------------+
13307 * | EntityId readerEntityId |
13308 * +---------------+---------------+---------------+---------------+
13309 * | EntityId writerEntityId |
13310 * +---------------+---------------+---------------+---------------+
13311 * + unsigned long virtualWriterCount +
13312 * +---------------+---------------+---------------+---------------+
13313 * | GuidPrefix virtualWriterGuidPrefix |
13314 * +---------------+---------------+---------------+---------------+
13315 * EntityId virtualWriterObjectId
13316 * unsigned short intervalCount | unsigned short bytesToNextVirtualWriter
13317 *
13318 * SequenceNumber intervalFirstSn
13319 * SequenceNumber intervalLastSn
13320 * unsigned short intervalFlags | unsigned short payloadLength
13321 *
13322 * (after last interval) unsigned long virtualWriterEpoch
13323 *
13324 */
13325 int original_offset; /* Offset to the readerEntityId */
13326 int32_t virtual_writer_count;
13327 uint32_t wid; /* Writer EntityID */
13328 proto_item *octet_item;
13329 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, APP_ACK_FLAGS, flags);
13330
13331 octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb,
13332 offset + 2, 2, encoding);
13333
13334 if (octets_to_next_header < 56) {
13335 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", 56);
13336 return;
13337 }
13338
13339 offset += 4;
13340 original_offset = offset;
13341
13342 /* readerEntityId */
13343 rtps_util_add_entity_id(tree,
13344 pinfo, tvb,
13345 offset,
13346 hf_rtps_sm_rdentity_id,
13347 hf_rtps_sm_rdentity_id_key,
13348 hf_rtps_sm_rdentity_id_kind,
13349 ett_rtps_rdentity,
13350 "readerEntityId",
13351 &wid);
13352 offset += 4;
13353 guid->entity_id = wid;
13354 rtps_util_add_topic_info(tree, pinfo, tvb, offset, guid);
13355
13356 /* writerEntityId */
13357 rtps_util_add_entity_id(tree,
13358 pinfo, tvb,
13359 offset,
13360 hf_rtps_sm_wrentity_id,
13361 hf_rtps_sm_wrentity_id_key,
13362 hf_rtps_sm_wrentity_id_kind,
13363 ett_rtps_wrentity,
13364 "writerEntityId",
13365 &wid);
13366 offset += 4;
13367
13368 /* virtualWriterCount */
13369 proto_tree_add_item_ret_int(tree, hf_rtps_param_app_ack_virtual_writer_count, tvb, offset, 4, encoding, &virtual_writer_count);
13370 offset += 4;
13371
13372
13373 {
13374 /* Deserialize Virtual Writers */
13375 proto_tree *sil_tree_writer_list;
13376
13377 int32_t current_writer_index;
13378 int32_t current_interval_count;
13379 /* uint16_t interval_flags = 0; */
13380 /* uint32_t current_virtual_guid_index = 0;*/
13381
13382 /** Writer list **/
13383 sil_tree_writer_list = proto_tree_add_subtree_format(tree, tvb, offset, -1,
13384 ett_rtps_app_ack_virtual_writer_list, NULL((void*)0), "Virtual Writer List");
13385
13386 current_writer_index = 0;
13387
13388 while (current_writer_index < virtual_writer_count) {
13389 proto_tree *sil_tree_writer;
13390 proto_tree *sil_tree_interval_list;
13391 int32_t interval_count;
13392
13393 sil_tree_writer = proto_tree_add_subtree_format(sil_tree_writer_list, tvb, offset, -1,
13394 ett_rtps_app_ack_virtual_writer, NULL((void*)0), "virtualWriter[%d]", current_writer_index);
13395
13396 /* Virtual Writer Guid */
13397#if 0
13398 rtps_util_add_generic_guid(sil_tree_writer,
13399 tvb,
13400 offset,
13401 "virtualGUID",
13402 buffer,
13403 MAX_GUID_SIZE(160));
13404#endif
13405 offset += 16;
13406
13407
13408 /* Interval count */
13409 proto_tree_add_item_ret_int(sil_tree_writer, hf_rtps_param_app_ack_interval_count,
13410 tvb, offset, 2, encoding, &interval_count);
13411 offset += 2;
13412
13413 /* bytes to next virtual writer */
13414 proto_tree_add_item(sil_tree_writer, hf_rtps_param_app_ack_octets_to_next_virtual_writer,
13415 tvb, offset, 2, encoding);
13416 offset += 2;
13417
13418 /* Interval list */
13419 sil_tree_interval_list = proto_tree_add_subtree_format(sil_tree_writer, tvb, offset, -1,
13420 ett_rtps_app_ack_virtual_writer_interval_list, NULL((void*)0), "Interval List");
13421
13422 current_interval_count = 0;
13423 while (current_interval_count < interval_count) {
13424 proto_tree *sil_tree_interval;
13425 int32_t interval_payload_length;
13426
13427 sil_tree_interval = proto_tree_add_subtree_format(sil_tree_interval_list, tvb, offset, -1,
13428 ett_rtps_app_ack_virtual_writer_interval, NULL((void*)0), "Interval[%d]", current_interval_count);
13429
13430 /* firstVirtualSN */
13431 rtps_util_add_seq_number(sil_tree_interval,
13432 tvb,
13433 offset,
13434 encoding,
13435 "firstVirtualSN");
13436 offset += 8;
13437
13438 /* lastVirtualSN */
13439 rtps_util_add_seq_number(sil_tree_interval,
13440 tvb,
13441 offset,
13442 encoding,
13443 "lastVirtualSN");
13444 offset += 8;
13445
13446 /* interval flags */
13447 proto_tree_add_item(sil_tree_interval, hf_rtps_param_app_ack_interval_flags,
13448 tvb, offset, 2, encoding);
13449 offset += 2;
13450
13451 /* interval payload length */
13452 proto_tree_add_item_ret_int(sil_tree_interval, hf_rtps_param_app_ack_interval_payload_length,
13453 tvb, offset, 2, encoding, &interval_payload_length);
13454 offset += 2;
13455
13456 if (interval_payload_length > 0) {
13457 proto_tree_add_item(sil_tree_interval, hf_rtps_serialized_data, tvb, offset,
13458 interval_payload_length, ENC_NA0x00000000);
13459 offset += ((interval_payload_length + 3) & 0xfffffffc);
13460 }
13461
13462 ++current_interval_count;
13463
13464 } /* interval list */
13465
13466 /* Count */
13467 proto_tree_add_item(tree, hf_rtps_param_app_ack_count, tvb, offset, 4, encoding);
13468 offset += 4;
13469
13470 current_writer_index++;
13471
13472 } /* virtual_writer_count */
13473 }
13474
13475
13476 if (offset < original_offset + octets_to_next_header)
13477 {
13478 /* In this case there must be something wrong in the bitmap: there
13479 * are some extra bytes that we don't know how to decode
13480 */
13481 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);
13482 }
13483 else if (offset > original_offset + octets_to_next_header)
13484 {
13485 /* Decoding the bitmap went over the end of this submessage.
13486 * Enter an item in the protocol tree that spans over the entire
13487 * submessage.
13488 */
13489 expert_add_info(pinfo, item, &ei_rtps_missing_bytes);
13490 }
13491}
13492
13493/* *********************************************************************** */
13494/* * P A D * */
13495/* *********************************************************************** */
13496static void dissect_PAD(tvbuff_t *tvb,
13497 packet_info *pinfo,
13498 int offset,
13499 uint8_t flags,
13500 const unsigned encoding,
13501 int octets_to_next_header,
13502 proto_tree *tree) {
13503 /* 0...2...........7...............15.............23...............31
13504 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
13505 * | PAD |X|X|X|X|X|X|X|E| octetsToNextHeader |
13506 * +---------------+---------------+---------------+---------------+
13507 */
13508 proto_item *item;
13509
13510 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, PAD_FLAGS, flags);
13511
13512 item = proto_tree_add_item(tree,
13513 hf_rtps_sm_octets_to_next_header,
13514 tvb,
13515 offset + 2,
13516 2,
13517 encoding);
13518 if (octets_to_next_header != 0) {
13519 expert_add_info(pinfo, item, &ei_rtps_sm_octets_to_next_header_not_zero);
13520 }
13521}
13522
13523
13524
13525
13526
13527/* *********************************************************************** */
13528/* * D A T A * */
13529/* *********************************************************************** */
13530static void dissect_DATA_v1(tvbuff_t *tvb, packet_info *pinfo, int offset, uint8_t flags,
13531 const unsigned encoding, int octets_to_next_header, proto_tree *tree) {
13532 /* RTPS 1.0/1.1:
13533 * 0...2...........7...............15.............23...............31
13534 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
13535 * | DATA |X|X|X|U|H|A|P|E| octetsToNextHeader |
13536 * +---------------+---------------+---------------+---------------+
13537 * | ObjectId readerObjectId |
13538 * +---------------+---------------+---------------+---------------+
13539 * | ObjectId writerObjectId |
13540 * +---------------+---------------+---------------+---------------+
13541 * | HostId hostId (iff H==1) |
13542 * +---------------+---------------+---------------+---------------+
13543 * | AppId appId (iff H==1) |
13544 * +---------------+---------------+---------------+---------------+
13545 * | ObjectId objectId |
13546 * +---------------+---------------+---------------+---------------+
13547 * | |
13548 * + SequenceNumber writerSeqNumber +
13549 * | |
13550 * +---------------+---------------+---------------+---------------+
13551 * | |
13552 * ~ ParameterSequence parameters [only if P==1] ~
13553 * | |
13554 * +---------------+---------------+---------------+---------------+
13555 * Note: on RTPS 1.0, flag U is not present
13556 *
13557 * RTPS 1.2:
13558 * 0...2...........7...............15.............23...............31
13559 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
13560 * | DATA |X|X|U|Q|H|A|D|E| octetsToNextHeader |
13561 * +---------------+---------------+---------------+---------------+
13562 * | EntityId readerEntityId |
13563 * +---------------+---------------+---------------+---------------+
13564 * | EntityId writerEntityId |
13565 * +---------------+---------------+---------------+---------------+
13566 * | |
13567 * + KeyHashPrefix keyHashPrefix [only if H==1] +
13568 * | |
13569 * +---------------+---------------+---------------+---------------+
13570 * | KeyHashSuffix keyHashSuffix |
13571 * +---------------+---------------+---------------+---------------+
13572 * | |
13573 * + SequenceNumber writerSeqNum +
13574 * | |
13575 * +---------------+---------------+---------------+---------------+
13576 * | |
13577 * ~ ParameterList inlineQos [only if Q==1] ~
13578 * | |
13579 * +---------------+---------------+---------------+---------------+
13580 * | |
13581 * ~ SerializedData serializedData [only if D==1] ~
13582 * | |
13583 * +---------------+---------------+---------------+---------------+
13584 * Notes:
13585 * - inlineQos is NEW
13586 * - serializedData is equivalent to the old 'parameters'
13587 */
13588 int min_len;
13589 bool_Bool is_builtin_entity = false0; /* true=entityId.entityKind = built-in */
13590 int old_offset = offset;
13591 uint32_t wid; /* Writer EntityID */
13592 proto_item *octet_item;
13593
13594 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, DATA_FLAGSv1, flags);
13595
13596 octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb,
13597 offset + 2, 2, encoding);
13598
13599 /* Calculates the minimum length for this submessage */
13600 min_len = 20;
13601 if ((flags & FLAG_DATA_H(0x08)) != 0) min_len += 8;
13602 if ((flags & FLAG_DATA_Q(0x10)) != 0) min_len += 4;
13603 if ((flags & FLAG_DATA_D(0x02)) != 0) min_len += 4;
13604
13605 if (octets_to_next_header < min_len) {
13606 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", min_len);
13607 return;
13608 }
13609
13610 offset += 4;
13611
13612 /* readerEntityId */
13613 is_builtin_entity |= rtps_util_add_entity_id(tree, pinfo, tvb, offset,
13614 hf_rtps_sm_rdentity_id, hf_rtps_sm_rdentity_id_key, hf_rtps_sm_rdentity_id_kind,
13615 ett_rtps_rdentity, "readerEntityId", NULL((void*)0));
13616 offset += 4;
13617
13618 /* writerEntityId */
13619 is_builtin_entity |= rtps_util_add_entity_id(tree, pinfo, tvb, offset,
13620 hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key, hf_rtps_sm_wrentity_id_kind,
13621 ett_rtps_wrentity, "writerEntityId", &wid);
13622 offset += 4;
13623
13624 /* Checks for predefined declarations
13625 *
13626 * writerEntityId value | A flag | Extra
13627 * -------------------------------------------|--------|-------------
13628 * ENTITYID_BUILTIN_SUBSCRIPTIONS_WRITER | 1 | r+
13629 * ENTITYID_BUILTIN_SUBSCRIPTIONS_WRITER | 0 | r-
13630 * ENTITYID_BUILTIN_PUBLICATIONS_WRITER | 1 | w+
13631 * ENTITYID_BUILTIN_PUBLICATIONS_WRITER | 0 | w-
13632 * ENTITYID_BUILTIN_PARTICIPANT_WRITER | 1 | p+
13633 * ENTITYID_BUILTIN_PARTICIPANT_WRITER | 0 | p- (*)
13634 * ENTITYID_BUILTIN_TOPIC_WRITER | 1 | t+ (*)
13635 * ENTITYID_BUILTIN_TOPIC_WRITER | 0 | t- (*)
13636 *
13637 * Note (*): Currently NDDS does not publish those values
13638 */
13639 if (wid == ENTITYID_BUILTIN_PUBLICATIONS_WRITER(0x000003c2) && (flags & FLAG_DATA_A(0x04)) != 0) {
13640 col_append_str(pinfo->cinfo, COL_INFO, SM_EXTRA_WPLUS);
13641 } else if (wid == ENTITYID_BUILTIN_PUBLICATIONS_WRITER(0x000003c2) && (flags & FLAG_DATA_A(0x04)) == 0) {
13642 col_append_str(pinfo->cinfo, COL_INFO, SM_EXTRA_WMINUS);
13643 } else if (wid == ENTITYID_BUILTIN_SUBSCRIPTIONS_WRITER(0x000004c2) && (flags & FLAG_DATA_A(0x04)) != 0) {
13644 col_append_str(pinfo->cinfo, COL_INFO, SM_EXTRA_RPLUS);
13645 } else if (wid == ENTITYID_BUILTIN_SUBSCRIPTIONS_WRITER(0x000004c2) && (flags & FLAG_DATA_A(0x04)) == 0) {
13646 col_append_str(pinfo->cinfo, COL_INFO, SM_EXTRA_RMINUS);
13647 } else if (wid == ENTITYID_BUILTIN_PARTICIPANT_WRITER(0x000100c2) && (flags & FLAG_DATA_A(0x04)) != 0) {
13648 col_append_str(pinfo->cinfo, COL_INFO, SM_EXTRA_PPLUS);
13649 } else if (wid == ENTITYID_BUILTIN_PARTICIPANT_WRITER(0x000100c2) && (flags & FLAG_DATA_A(0x04)) == 0) {
13650 col_append_str(pinfo->cinfo, COL_INFO, SM_EXTRA_PMINUS);
13651 } else if (wid == ENTITYID_BUILTIN_TOPIC_WRITER(0x000002c2) && (flags & FLAG_DATA_A(0x04)) != 0) {
13652 col_append_str(pinfo->cinfo, COL_INFO, SM_EXTRA_TPLUS);
13653 } else if (wid == ENTITYID_BUILTIN_TOPIC_WRITER(0x000002c2) && (flags & FLAG_DATA_A(0x04)) == 0) {
13654 col_append_str(pinfo->cinfo, COL_INFO, SM_EXTRA_TMINUS);
13655 }
13656
13657 /* If flag H is defined, read the HostId and AppId fields */
13658 if ((flags & FLAG_DATA_H(0x08)) != 0) {
13659 rtps_util_add_guid_prefix_v1(tree, pinfo, tvb, offset,
13660 hf_rtps_sm_guid_prefix_v1, hf_rtps_sm_host_id, hf_rtps_sm_app_id,
13661 hf_rtps_sm_instance_id_v1, hf_rtps_sm_app_kind,
13662 "keyHashPrefix");
13663
13664 offset += 8;
13665 } else {
13666 /* Flag H not set, use hostId, appId from the packet header */
13667 }
13668
13669 /* Complete the GUID by reading the Object ID */
13670 rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_entity_id, hf_rtps_sm_entity_id_key,
13671 hf_rtps_sm_entity_id_kind, ett_rtps_entity, "keyHashSuffix", NULL((void*)0));
13672 offset += 4;
13673
13674 /* Sequence number */
13675 rtps_util_add_seq_number(tree, tvb, offset, encoding, "writerSeqNumber");
13676 offset += 8;
13677
13678 /* InlineQos */
13679 if ((flags & FLAG_DATA_Q(0x10)) != 0) {
13680 bool_Bool is_inline_qos = true1;
13681 offset = dissect_parameter_sequence(tree, pinfo, tvb, offset,
13682 encoding, octets_to_next_header, "inlineQos",
13683 0x0102, NULL((void*)0), 0, is_inline_qos, NULL((void*)0));
13684 }
13685
13686 /* SerializedData */
13687 if ((flags & FLAG_DATA_D(0x02)) != 0) {
13688 if (is_builtin_entity) {
13689 dissect_parameter_sequence(tree, pinfo, tvb, offset,
13690 encoding, octets_to_next_header, "serializedData",
13691 0x0102, NULL((void*)0), 0, false0, NULL((void*)0));
13692 } else {
13693 proto_tree_add_item(tree, hf_rtps_issue_data, tvb, offset,
13694 octets_to_next_header - (offset - old_offset) + 4,
13695 ENC_NA0x00000000);
13696 }
13697 }
13698}
13699
13700static void dissect_DATA_v2(tvbuff_t *tvb, packet_info *pinfo, int offset, uint8_t flags,
13701 const unsigned encoding, int octets_to_next_header, proto_tree *tree,
13702 uint16_t vendor_id, endpoint_guid *guid) {
13703 /*
13704 *
13705 * 0...2...........7...............15.............23...............31
13706 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
13707 * | DATA |X|X|X|I|H|D|Q|E| octetsToNextHeader |
13708 * +---------------+---------------+---------------+---------------+
13709 * | EntityId readerEntityId |
13710 * +---------------+---------------+---------------+---------------+
13711 * | EntityId writerEntityId |
13712 * +---------------+---------------+---------------+---------------+
13713 * | |
13714 * + SequenceNumber writerSeqNum +
13715 * | |
13716 * +---------------+---------------+---------------+---------------+
13717 * | |
13718 * + +
13719 * | KeyHashPrefix keyHashPrefix [only if H==1] |
13720 * + +
13721 * | |
13722 * +---------------+---------------+---------------+---------------+
13723 * | KeyHashSuffix keyHashSuffix |
13724 * +---------------+---------------+---------------+---------------+
13725 * | StatusInfo statusInfo [only if I==1] |
13726 * +---------------+---------------+---------------+---------------+
13727 * | |
13728 * ~ ParameterList inlineQos [only if Q==1] ~
13729 * | |
13730 * +---------------+---------------+---------------+---------------+
13731 * | |
13732 * ~ SerializedData serializedData [only if D==1] ~
13733 * | |
13734 * +---------------+---------------+---------------+---------------+
13735 */
13736 int min_len;
13737 int old_offset = offset;
13738 uint32_t wid; /* Writer EntityID */
13739 uint32_t status_info = 0xffffffff;
13740 proto_item *octet_item;
13741 bool_Bool from_builtin_writer;
13742
13743 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, DATA_FLAGSv2, flags);
13744
13745 octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb,
13746 offset + 2, 2, encoding);
13747
13748 /* Calculates the minimum length for this submessage */
13749 min_len = 20;
13750 if ((flags & FLAG_DATA_Q_v2(0x02)) != 0) min_len += 4;
13751 if ((flags & FLAG_DATA_D_v2(0x04)) != 0) min_len += 4;
13752 if ((flags & FLAG_DATA_H(0x08)) != 0) min_len += 12;
13753
13754 if (octets_to_next_header < min_len) {
13755 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", min_len);
13756 return;
13757 }
13758
13759 offset += 4;
13760
13761
13762 /* readerEntityId */
13763 rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_rdentity_id, hf_rtps_sm_rdentity_id_key,
13764 hf_rtps_sm_rdentity_id_kind, ett_rtps_rdentity, "readerEntityId", NULL((void*)0));
13765 offset += 4;
13766
13767 /* writerEntityId */
13768 rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key,
13769 hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", &wid);
13770 offset += 4;
13771 guid->entity_id = wid;
13772 guid->fields_present |= GUID_HAS_ENTITY_ID0x00000008;
13773 rtps_util_add_topic_info(tree, pinfo, tvb, offset, guid);
13774
13775 /* Sequence number */
13776 rtps_util_add_seq_number(tree, tvb, offset, encoding, "writerSeqNumber");
13777 offset += 8;
13778
13779 /* If flag H is defined, read the GUID Prefix */
13780 if ((flags & FLAG_DATA_H(0x08)) != 0) {
13781 rtps_util_add_guid_prefix_v2(tree, tvb, offset, hf_rtps_sm_guid_prefix, hf_rtps_sm_host_id,
13782 hf_rtps_sm_app_id, hf_rtps_sm_instance_id, 0);
13783
13784 offset += 12;
13785 } else {
13786 /* Flag H not set, use hostId, appId from the packet header */
13787 }
13788
13789 /* Complete the GUID by reading the Object ID */
13790 rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_entity_id, hf_rtps_sm_entity_id_key,
13791 hf_rtps_sm_entity_id_kind, ett_rtps_entity, "keyHashSuffix", NULL((void*)0));
13792 offset += 4;
13793
13794 if ((flags & FLAG_DATA_I(0x10)) != 0) {
13795 proto_tree_add_item(tree, hf_rtps_data_status_info, tvb, offset, 4, encoding);
13796 offset += 4;
13797 }
13798
13799 /* InlineQos */
13800 if ((flags & FLAG_DATA_Q_v2(0x02)) != 0) {
13801 bool_Bool is_inline_qos = true1;
13802 offset = dissect_parameter_sequence(tree, pinfo, tvb, offset, encoding,
13803 octets_to_next_header - (offset - old_offset) + 4,
13804 "inlineQos", 0x0200, NULL((void*)0), vendor_id, is_inline_qos, NULL((void*)0));
13805 }
13806
13807 /* SerializedData */
13808 if ((flags & FLAG_DATA_D_v2(0x04)) != 0) {
13809 from_builtin_writer = (((wid & ENTITYKIND_BUILTIN_WRITER_WITH_KEY(0xc2)) == ENTITYKIND_BUILTIN_WRITER_WITH_KEY(0xc2))
13810 || ((wid & ENTITYKIND_BUILTIN_WRITER_NO_KEY(0xc3)) == ENTITYKIND_BUILTIN_WRITER_NO_KEY(0xc3))
13811 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_BOOTSTRAP_WRITER(0x00010082))
13812 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_WRITER(0x00010182)))
13813 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_WRITER(0xff010182))
13814 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_READER(0xff010187)) ? true1 : false0;
13815 dissect_serialized_data(tree, pinfo, tvb, offset,
13816 octets_to_next_header - (offset - old_offset) + 4,
13817 "serializedData", vendor_id, from_builtin_writer, guid, NOT_A_FRAGMENT(-1));
13818 }
13819 generate_status_info(pinfo, wid, status_info);
13820}
13821
13822
13823static void dissect_HEADER_EXTENSION(tvbuff_t* tvb, packet_info* pinfo, int offset, uint8_t flags,
13824 const unsigned encoding, proto_tree* tree, int octets_to_next_header, uint16_t vendor_id) {
13825 /*
13826 * 0...2...........7...............15.............23...............31
13827 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
13828 * | DATA_HE |P|C|C|W|U|T|L|E| octetsToNextHeader |
13829 * +---------------+---------------+---------------+---------------+
13830 * | MessageLength messageLength (Only if L == 1 ) |
13831 * +---------------+---------------+---------------+---------------+
13832 * | |
13833 * + TimeStamp rtpsSendTimestamp (Only if T == 1 ) +
13834 * | |
13835 * +---------------+---------------+---------------+---------------+
13836 * | UExtension4 uExtension (Only if U == 1 ) |
13837 * +---------------+---------------+---------------+---------------+
13838 * | |
13839 * + WExtension8 wExtension8 (Only if W == 1 ) +
13840 * | |
13841 * +---------------+---------------+---------------+---------------+
13842 * | |
13843 * + Checksum messageChecksum (Only if CC != 00 ) +
13844 * | |
13845 * +---------------+---------------+---------------+---------------+
13846 * | |
13847 * + ParameterList parameters (Only if P != 0 ) +
13848 * | |
13849 * +---------------+---------------+---------------+---------------+
13850 * C1,C2 == 01 -> 4 bytes checksum
13851 * C1,C2 == 10 -> 8 bytes checksum
13852 * C1,C2 == 11 -> 16 bytes checksum
13853 */
13854#define RTPS_HE_ENDIANESS_FLAG(0x01) (0x01)
13855#define RTPS_HE_MESSAGE_LENGTH_FLAG(0x02) (0x02)
13856#define RTPS_HE_TIMESTAMP_FLAG(0x04) (0x04)
13857#define RTPS_HE_UEXTENSION_FLAG(0x08) (0x08)
13858#define RTPS_HE_WEXTENSION_FLAG(0x10) (0x10)
13859#define RTPS_HE_CHECKSUM_2_FLAG(0x20) (0x20)
13860#define RTPS_HE_CHECKSUM_1_FLAG(0x40) (0x40)
13861#define RTPS_HE_PARAMETERS_FLAG(0x80) (0x80)
13862
13863#define RTPS_HE_CHECKSUM_CRC32(0x20) RTPS_HE_CHECKSUM_2_FLAG(0x20)
13864#define RTPS_HE_CHECKSUM_CRC64(0x40) RTPS_HE_CHECKSUM_1_FLAG(0x40)
13865#define RTPS_HE_CHECKSUM_MD5((0x40) | (0x20)) (RTPS_HE_CHECKSUM_1_FLAG(0x40) | RTPS_HE_CHECKSUM_2_FLAG(0x20))
13866
13867 uint8_t checksum_type = 0;
13868 int initial_offset = offset;
13869 unsigned checksum_flags = PROTO_CHECKSUM_NO_FLAGS0x00;
13870 bool_Bool is_crc_supported = true1;
13871 /*Checksum can be CRC32, CRC64 and MD5 */
13872 union _calculated_checksum {
13873 uint8_t md5[RTPS_CHECKSUM_MAX_LEN16];
13874 uint32_t crc32c;
13875 uint64_t crc64;
13876 } calculated_checksum = {0}, he_checksum = {0};
13877 int16_t header_extension_length = 0;
13878 int offsetToHeaderExtensionData = 24;
13879 rtps_current_packet_decryption_info_t *decryption_info = NULL((void*)0);
32
'decryption_info' initialized to a null pointer value
13880
13881 ++offset;
13882 proto_tree_add_bitmask_value(
13883 tree,
13884 tvb,
13885 offset,
13886 hf_rtps_header_extension_flags,
13887 ett_rtps_flags,
13888 HEADER_EXTENSION_MASK_FLAGS,
13889 flags);
13890 ++offset;
13891 header_extension_length = tvb_get_int16(tvb, offset, encoding);
13892 proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb, offset, 2, encoding);
13893 offset += 2;
13894
13895 if (enable_rtps_psk_decryption) {
33
Assuming 'enable_rtps_psk_decryption' is false
34
Taking false branch
13896 /*
13897 * Let's update the additional authenticated data, so that it includes the
13898 * Header Extension.
13899 */
13900 const uint8_t *additional_authenticated_data;
13901 rtps_tvb_field *rtps_root = (rtps_tvb_field*)
13902 p_get_proto_data(
13903 pinfo->pool,
13904 pinfo, proto_rtps,
13905 RTPS_ROOT_MESSAGE_KEY4);
13906
13907 decryption_info = (rtps_current_packet_decryption_info_t *)
13908 p_get_proto_data(
13909 pinfo->pool, pinfo, proto_rtps, RTPS_DECRYPTION_INFO_KEY5);
13910
13911 decryption_info->aad_length =
13912 20 /* rtps header size. */
13913 + 4 /* header extension submessage id, flags, octetsToNextHeader */
13914 + header_extension_length;
13915
13916 additional_authenticated_data = tvb_get_ptr(
13917 rtps_root->tvb,
13918 rtps_root->tvb_offset,
13919 (int) decryption_info->aad_length);
13920
13921 /* Do a copy of the bytes, so that we can later zero the necessary parts. */
13922 decryption_info->additional_authenticated_data_allocated = true1;
13923 decryption_info->additional_authenticated_data = g_memdup2(
13924 additional_authenticated_data,
13925 decryption_info->aad_length);
13926 }
13927
13928 if ((flags & RTPS_HE_MESSAGE_LENGTH_FLAG(0x02)) == RTPS_HE_MESSAGE_LENGTH_FLAG(0x02)) {
35
Assuming the condition is true
36
Taking true branch
13929 proto_tree_add_item(tree, hf_rtps_message_length, tvb, offset, 4, encoding);
13930 offset += 4;
13931
13932 if (enable_rtps_psk_decryption) {
37
Assuming 'enable_rtps_psk_decryption' is true
38
Taking true branch
13933 memset(
13934 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')
13935 + offsetToHeaderExtensionData,
13936 0,
13937 RTPS_HE_MESSAGE_LENGTH_FLAG(0x02));
13938 offsetToHeaderExtensionData += 4;
13939 }
13940 }
13941
13942 if ((flags & RTPS_HE_TIMESTAMP_FLAG(0x04)) == RTPS_HE_TIMESTAMP_FLAG(0x04)) {
13943 rtps_util_add_timestamp(tree,
13944 tvb, offset,
13945 encoding,
13946 hf_rtps_timestamp);
13947 offset += 8;
13948
13949 if (enable_rtps_psk_decryption) {
13950 /* No need to zero for AAD. */
13951 offsetToHeaderExtensionData += 8;
13952 }
13953 }
13954
13955 if ((flags & RTPS_HE_UEXTENSION_FLAG(0x08)) == RTPS_HE_UEXTENSION_FLAG(0x08)) {
13956 proto_tree_add_item(tree, hf_rtps_uextension, tvb, offset, 4, encoding);
13957 offset += 4;
13958
13959 if (enable_rtps_psk_decryption) {
13960 /* No need to zero for AAD. */
13961 offsetToHeaderExtensionData += 4;
13962 }
13963 }
13964
13965 if ((flags & RTPS_HE_WEXTENSION_FLAG(0x10)) == RTPS_HE_WEXTENSION_FLAG(0x10)) {
13966 proto_tree_add_item(tree, hf_rtps_wextension, tvb, offset, 8, encoding);
13967 offset += 8;
13968
13969 if (enable_rtps_psk_decryption) {
13970 /* No need to zero for AAD. */
13971 offsetToHeaderExtensionData += 8;
13972 }
13973 }
13974
13975 checksum_type = (flags & (RTPS_HE_CHECKSUM_2_FLAG(0x20) | RTPS_HE_CHECKSUM_1_FLAG(0x40)));
13976 if (checksum_type != 0) {
13977 int checksum_len = 0;
13978
13979 /* Adds the CRC of the RTPS message */
13980 switch (checksum_type) {
13981 /* 32-bit checksum */
13982 case RTPS_HE_CHECKSUM_CRC32(0x20):
13983 checksum_len = 4;
13984 break;
13985
13986 /* 64-bit checksum */
13987 case RTPS_HE_CHECKSUM_CRC64(0x40):
13988 checksum_len = 8;
13989 is_crc_supported = false0;
13990 break;
13991
13992 /* 128-bit checksum */
13993 case RTPS_HE_CHECKSUM_MD5((0x40) | (0x20)):
13994 checksum_len = 16;
13995 break;
13996 default:
13997 break;
13998 }
13999
14000 if (enable_rtps_psk_decryption && decryption_info != NULL((void*)0)) {
14001 memset(
14002 decryption_info->additional_authenticated_data
14003 + offsetToHeaderExtensionData,
14004 0,
14005 checksum_len);
14006 }
14007
14008 /* If the check CRC feature is enabled */
14009 if (enable_rtps_crc_check && is_crc_supported) {
14010 char* tvb_zero_checksum = NULL((void*)0);
14011 rtps_tvb_field *rtps_root = NULL((void*)0);
14012
14013 checksum_flags = PROTO_CHECKSUM_VERIFY0x01;
14014 rtps_root = (rtps_tvb_field*)p_get_proto_data(pinfo->pool, pinfo, proto_rtps, RTPS_ROOT_MESSAGE_KEY4);
14015 if (rtps_root != NULL((void*)0)) {
14016 /* The checksum in the wire is the checksum of the RTPS message with the
14017 * checksum field set to 0. To calculate the checksum of the RTPS message
14018 * we need to set those bytes to 0 in a separate buffer.
14019 */
14020 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))))))
;
14021 tvb_memcpy(
14022 rtps_root->tvb,
14023 tvb_zero_checksum,
14024 rtps_root->tvb_offset,
14025 rtps_root->tvb_len);
14026
14027 /* Set checksum bytes to 0 */
14028 memset(tvb_zero_checksum + offset, 0, checksum_len);
14029 switch (checksum_type) {
14030 case RTPS_HE_CHECKSUM_CRC32(0x20):
14031 /* Checksum is always big endian */
14032 he_checksum.crc32c = tvb_get_uint32(tvb, offset, ENC_BIG_ENDIAN0x00000000);
14033 calculated_checksum.crc32c = crc32c_calculate_no_swap(
14034 tvb_zero_checksum,
14035 rtps_root->tvb_len,
14036 CRC32C_PRELOAD0xffffffff);
14037 calculated_checksum.crc32c ^= CRC32C_PRELOAD0xffffffff;
14038 break;
14039
14040 case RTPS_HE_CHECKSUM_CRC64(0x40):
14041 /* CRC64 is not supported yet */
14042 break;
14043
14044 case RTPS_HE_CHECKSUM_MD5((0x40) | (0x20)):
14045 tvb_memcpy(
14046 tvb,
14047 &he_checksum.md5,
14048 offset,
14049 checksum_len);
14050 gcry_md_hash_buffer(
14051 GCRY_MD_MD5,
14052 calculated_checksum.md5,
14053 tvb_zero_checksum,
14054 rtps_root->tvb_len);
14055 break;
14056
14057 default:
14058 break;
14059 }
14060 }
14061 }
14062 switch (checksum_type) {
14063 case RTPS_HE_CHECKSUM_CRC32(0x20):
14064 proto_tree_add_checksum(
14065 tree,
14066 tvb,
14067 offset,
14068 hf_rtps_header_extension_checksum_crc32c,
14069 -1,
14070 &ei_rtps_checksum_check_error,
14071 pinfo,
14072 calculated_checksum.crc32c,
14073 ENC_BIG_ENDIAN0x00000000,
14074 checksum_flags);
14075 break;
14076 case RTPS_HE_CHECKSUM_MD5((0x40) | (0x20)):
14077 proto_tree_add_checksum_bytes(
14078 tree,
14079 tvb,
14080 offset,
14081 hf_rtps_header_extension_checksum_md5,
14082 -1,
14083 &ei_rtps_checksum_check_error,
14084 pinfo,
14085 calculated_checksum.md5,
14086 checksum_len,
14087 checksum_flags);
14088 break;
14089
14090 case RTPS_HE_CHECKSUM_CRC64(0x40):
14091 default:
14092 break;
14093 }
14094 offset += checksum_len;
14095 }
14096 if ((flags & RTPS_HE_PARAMETERS_FLAG(0x80)) == RTPS_HE_PARAMETERS_FLAG(0x80)) {
14097 unsigned parameter_endianess = ((flags & RTPS_HE_ENDIANESS_FLAG(0x01)) == RTPS_HE_ENDIANESS_FLAG(0x01))
14098 ? ENC_LITTLE_ENDIAN0x80000000
14099 : ENC_BIG_ENDIAN0x00000000;
14100 dissect_parameter_sequence(tree, pinfo, tvb, offset, parameter_endianess,
14101 octets_to_next_header - (offset - initial_offset),
14102 "Parameters", 0x0200, NULL((void*)0), vendor_id, false0, NULL((void*)0));
14103 }
14104}
14105
14106static void dissect_DATA_FRAG(tvbuff_t *tvb, packet_info *pinfo, int offset, uint8_t flags,
14107 const unsigned encoding, int octets_to_next_header, proto_tree *tree,
14108 uint16_t vendor_id, endpoint_guid *guid) {
14109 /*
14110 * 0...2...........7...............15.............23...............31
14111 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
14112 * | DATA_FRAG |X|X|X|X|X|H|Q|E| octetsToNextHeader |
14113 * +---------------+---------------+---------------+---------------+
14114 * | EntityId readerEntityId |
14115 * +---------------+---------------+---------------+---------------+
14116 * | EntityId writerEntityId |
14117 * +---------------+---------------+---------------+---------------+
14118 * | |
14119 * + SequenceNumber writerSeqNum +
14120 * | |
14121 * +---------------+---------------+---------------+---------------+
14122 * | |
14123 * + +
14124 * | KeyHashPrefix keyHashPrefix [only if H==1] |
14125 * + +
14126 * | |
14127 * +---------------+---------------+---------------+---------------+
14128 * | KeyHashSuffix keyHashSuffix |
14129 * +---------------+---------------+---------------+---------------+
14130 * | FragmentNumber fragmentStartingNum |
14131 * +---------------+---------------+---------------+---------------+
14132 * | ushort fragmentsInSubmessage | ushort fragmentSize |
14133 * +---------------+---------------+---------------+---------------+
14134 * | unsigned long sampleSize |
14135 * +---------------+---------------+---------------+---------------+
14136 * | |
14137 * ~ ParameterList inlineQos [only if Q==1] ~
14138 * | |
14139 * +---------------+---------------+---------------+---------------+
14140 * | |
14141 * ~ SerializedData serializedData ~
14142 * | |
14143 * +---------------+---------------+---------------+---------------+
14144 */
14145
14146 int min_len;
14147 int old_offset = offset;
14148 uint32_t frag_number = 0;
14149 proto_item *octet_item;
14150 uint32_t wid;
14151 bool_Bool from_builtin_writer;
14152
14153 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, DATA_FRAG_FLAGS, flags);
14154
14155 octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb,
14156 offset + 2, 2, encoding);
14157
14158 /* Calculates the minimum length for this submessage */
14159 min_len = 32;
14160 if ((flags & FLAG_DATA_FRAG_Q(0x02)) != 0) min_len += 4;
14161 if ((flags & FLAG_DATA_FRAG_H(0x04)) != 0) min_len += 12;
14162
14163 if (octets_to_next_header < min_len) {
14164 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", min_len);
14165 return;
14166 }
14167
14168 offset += 4;
14169
14170 /* readerEntityId */
14171 rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_rdentity_id, hf_rtps_sm_rdentity_id_key,
14172 hf_rtps_sm_rdentity_id_kind, ett_rtps_rdentity, "readerEntityId", NULL((void*)0));
14173 offset += 4;
14174
14175 /* writerEntityId */
14176 rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key,
14177 hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", &wid);
14178 offset += 4;
14179 guid->entity_id = wid;
14180 guid->fields_present |= GUID_HAS_ENTITY_ID0x00000008;
14181 rtps_util_add_topic_info(tree, pinfo, tvb, offset, guid);
14182
14183 /* Sequence number */
14184 rtps_util_add_seq_number(tree, tvb, offset, encoding, "writerSeqNumber");
14185 offset += 8;
14186
14187 /* If flag H is defined, read the GUID Prefix */
14188 if ((flags & FLAG_DATA_H(0x08)) != 0) {
14189 rtps_util_add_guid_prefix_v2(tree, tvb, offset, hf_rtps_sm_guid_prefix,
14190 hf_rtps_sm_host_id, hf_rtps_sm_app_id, hf_rtps_sm_instance_id, 0);
14191 offset += 12;
14192 } else {
14193 /* Flag H not set, use hostId, appId from the packet header */
14194 }
14195
14196 /* Complete the GUID by reading the Object ID */
14197 rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_entity_id, hf_rtps_sm_entity_id_key,
14198 hf_rtps_sm_entity_id_kind, ett_rtps_entity, "keyHashSuffix", NULL((void*)0));
14199 offset += 4;
14200
14201
14202 /* Fragment number */
14203 proto_tree_add_item_ret_uint(tree, hf_rtps_data_frag_number, tvb, offset, 4, encoding, &frag_number);
14204 offset += 4;
14205
14206 /* Fragments in submessage */
14207 proto_tree_add_item(tree, hf_rtps_data_frag_num_fragments, tvb, offset, 2, encoding);
14208 offset += 2;
14209
14210 /* Fragment size */
14211 proto_tree_add_item(tree, hf_rtps_data_frag_size, tvb, offset, 2, encoding);
14212 offset += 2;
14213
14214 /* sampleSize */
14215 proto_tree_add_item(tree, hf_rtps_data_frag_sample_size, tvb, offset, 4, encoding);
14216 offset += 4;
14217
14218 /* InlineQos */
14219 if ((flags & FLAG_DATA_Q_v2(0x02)) != 0) {
14220 bool_Bool is_inline_qos = true1;
14221 offset = dissect_parameter_sequence(tree, pinfo, tvb, offset, encoding,
14222 octets_to_next_header - (offset - old_offset) + 4,
14223 "inlineQos", 0x0200, NULL((void*)0), vendor_id, is_inline_qos, NULL((void*)0));
14224 }
14225
14226 /* SerializedData */
14227 if ((flags & FLAG_DATA_D_v2(0x04)) != 0) {
14228 from_builtin_writer = (((wid & ENTITYKIND_BUILTIN_WRITER_WITH_KEY(0xc2)) == ENTITYKIND_BUILTIN_WRITER_WITH_KEY(0xc2))
14229 || ((wid & ENTITYKIND_BUILTIN_WRITER_NO_KEY(0xc3)) == ENTITYKIND_BUILTIN_WRITER_NO_KEY(0xc3))
14230 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_BOOTSTRAP_WRITER(0x00010082))
14231 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_WRITER(0x00010182)))
14232 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_WRITER(0xff010182))
14233 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_READER(0xff010187)) ? true1 : false0;
14234 dissect_serialized_data(tree, pinfo, tvb, offset,
14235 octets_to_next_header - (offset - old_offset) + 4,
14236 "serializedData", vendor_id, from_builtin_writer, NULL((void*)0), (int32_t)frag_number);
14237 }
14238}
14239
14240
14241/* *********************************************************************** */
14242/* * N O K E Y _ D A T A * */
14243/* *********************************************************************** */
14244static void dissect_NOKEY_DATA(tvbuff_t *tvb, packet_info *pinfo, int offset, uint8_t flags,
14245 const unsigned encoding, int octets_to_next_header, proto_tree *tree,
14246 uint16_t version, uint16_t vendor_id) {
14247 /* RTPS 1.0/1.1:
14248 * 0...2...........7...............15.............23...............31
14249 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
14250 * | ISSUE |X|X|X|X|X|X|P|E| octetsToNextHeader |
14251 * +---------------+---------------+---------------+---------------+
14252 * | ObjectId readerObjectId |
14253 * +---------------+---------------+---------------+---------------+
14254 * | ObjectId writerObjectId |
14255 * +---------------+---------------+---------------+---------------+
14256 * | |
14257 * + SequenceNumber writerSeqNumber +
14258 * | |
14259 * +---------------+---------------+---------------+---------------+
14260 * | |
14261 * ~ ParameterSequence parameters [only if P==1] ~
14262 * | |
14263 * +---------------+---------------+---------------+---------------+
14264 * | |
14265 * ~ UserData issueData ~
14266 * | |
14267 * +---------------+---------------+---------------+---------------+
14268 *
14269 * RTPS 1.2:
14270 * 0...2...........7...............15.............23...............31
14271 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
14272 * | NOKEY_DATA |X|X|X|X|X|D|Q|E| octetsToNextHeader |
14273 * +---------------+---------------+---------------+---------------+
14274 * | EntityId readerEntityId |
14275 * +---------------+---------------+---------------+---------------+
14276 * | EntityId writerEntityId |
14277 * +---------------+---------------+---------------+---------------+
14278 * | |
14279 * + SequenceNumber writerSeqNum +
14280 * | |
14281 * +---------------+---------------+---------------+---------------+
14282 * | |
14283 * ~ ParameterList inlineQos [only if Q==1] ~
14284 * | |
14285 * +---------------+---------------+---------------+---------------+
14286 * | |
14287 * ~ SerializedData serializedData [only if D==0] ~
14288 * | |
14289 * +---------------+---------------+---------------+---------------+
14290 *
14291 * RTPS 2.0:
14292 * 0...2...........7...............15.............23...............31
14293 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
14294 * | NOKEY_DATA |X|X|X|X|X|D|Q|E| octetsToNextHeader |
14295 * +---------------+---------------+---------------+---------------+
14296 * | EntityId readerEntityId |
14297 * +---------------+---------------+---------------+---------------+
14298 * | EntityId writerEntityId |
14299 * +---------------+---------------+---------------+---------------+
14300 * | |
14301 * + SequenceNumber writerSeqNum +
14302 * | |
14303 * +---------------+---------------+---------------+---------------+
14304 * | |
14305 * ~ ParameterList inlineQos [only if Q==1] ~
14306 * | |
14307 * +---------------+---------------+---------------+---------------+
14308 * | |
14309 * ~ SerializedData serializedData [only if D==1] ~
14310 * | |
14311 * +---------------+---------------+---------------+---------------+
14312 * Notes:
14313 * - inlineQos is equivalent to the old 'parameters'
14314 * - serializedData is equivalent to the old 'issueData'
14315 */
14316
14317 int min_len;
14318 uint32_t wid; /* Writer EntityID */
14319 bool_Bool from_builtin_writer;
14320 int old_offset = offset;
14321 proto_item *octet_item;
14322
14323 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, NOKEY_DATA_FLAGS, flags);
14324
14325 octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb,
14326 offset + 2, 2, encoding);
14327
14328 /* Calculates the minimum length for this submessage */
14329 min_len = 16;
14330 if ((flags & FLAG_NOKEY_DATA_Q(0x02)) != 0) min_len += 4;
14331
14332 if (octets_to_next_header < min_len) {
14333 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", min_len);
14334 return;
14335 }
14336
14337 offset += 4;
14338
14339 /* readerEntityId */
14340 rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_rdentity_id, hf_rtps_sm_rdentity_id_key,
14341 hf_rtps_sm_rdentity_id_kind, ett_rtps_rdentity, "readerEntityId", NULL((void*)0));
14342 offset += 4;
14343
14344 /* writerEntityId */
14345 rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key,
14346 hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", &wid);
14347 offset += 4;
14348
14349 /* Sequence number */
14350 rtps_util_add_seq_number(tree, tvb, offset, encoding, "writerSeqNumber");
14351 offset += 8;
14352
14353 /* Parameters */
14354 if ((flags & FLAG_NOKEY_DATA_Q(0x02)) != 0) {
14355 bool_Bool is_inline_qos = true1;
14356 offset = dissect_parameter_sequence(tree, pinfo, tvb, offset,
14357 encoding, octets_to_next_header, "inlineQos",
14358 version, NULL((void*)0), vendor_id, is_inline_qos, NULL((void*)0));
14359
14360 }
14361
14362 /* Issue Data */
14363 if ((version < 0x0200) && (flags & FLAG_NOKEY_DATA_D(0x04)) == 0) {
14364 proto_tree_add_item(tree, hf_rtps_issue_data, tvb, offset,
14365 octets_to_next_header - (offset - old_offset) + 4,
14366 ENC_NA0x00000000);
14367 }
14368
14369 if ((version >= 0x0200) && (flags & FLAG_DATA_D_v2(0x04)) != 0) {
14370 from_builtin_writer = (((wid & ENTITYKIND_BUILTIN_WRITER_WITH_KEY(0xc2)) == ENTITYKIND_BUILTIN_WRITER_WITH_KEY(0xc2))
14371 || ((wid & ENTITYKIND_BUILTIN_WRITER_NO_KEY(0xc3)) == ENTITYKIND_BUILTIN_WRITER_NO_KEY(0xc3))
14372 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_BOOTSTRAP_WRITER(0x00010082))
14373 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_WRITER(0x00010182)))
14374 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_WRITER(0xff010182))
14375 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_READER(0xff010187)) ? true1 : false0;
14376 dissect_serialized_data(tree, pinfo, tvb, offset,
14377 octets_to_next_header - (offset - old_offset) + 4,
14378 "serializedData", vendor_id, from_builtin_writer, NULL((void*)0), NOT_A_FRAGMENT(-1));
14379 }
14380
14381}
14382
14383/* *********************************************************************** */
14384/* * N O K E Y _ D A T A _ F R A G * */
14385/* *********************************************************************** */
14386static void dissect_NOKEY_DATA_FRAG(tvbuff_t *tvb, packet_info *pinfo, int offset,
14387 uint8_t flags, const unsigned encoding, int octets_to_next_header, proto_tree *tree,
14388 uint16_t vendor_id) {
14389 /*
14390 * 0...2...........7...............15.............23...............31
14391 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
14392 * |NOKEY_DATA_FRAG|X|X|X|X|X|X|Q|E| octetsToNextHeader |
14393 * +---------------+---------------+---------------+---------------+
14394 * | EntityId readerEntityId |
14395 * +---------------+---------------+---------------+---------------+
14396 * | EntityId writerEntityId |
14397 * +---------------+---------------+---------------+---------------+
14398 * | |
14399 * + SequenceNumber writerSeqNum +
14400 * | |
14401 * +---------------+---------------+---------------+---------------+
14402 * | FragmentNumber fragmentStartingNum |
14403 * +---------------+---------------+---------------+---------------+
14404 * | ushort fragmentsInSubmessage | ushort fragmentSize |
14405 * +---------------+---------------+---------------+---------------+
14406 * | unsigned long sampleSize |
14407 * +---------------+---------------+---------------+---------------+
14408 * | |
14409 * ~ ParameterList inlineQos [only if Q==1] ~
14410 * | |
14411 * +---------------+---------------+---------------+---------------+
14412 * | |
14413 * ~ SerializedData serializedData ~
14414 * | |
14415 * +---------------+---------------+---------------+---------------+
14416 */
14417
14418 int min_len;
14419 uint32_t wid; /* Writer EntityID */
14420 bool_Bool from_builtin_writer;
14421 int old_offset = offset;
14422 uint32_t frag_number = 0;
14423 proto_item *octet_item;
14424 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, NOKEY_DATA_FRAG_FLAGS, flags);
14425
14426 octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb,
14427 offset + 2, 2, encoding);
14428
14429 /* Calculates the minimum length for this submessage */
14430 min_len = 28;
14431 if ((flags & FLAG_NOKEY_DATA_Q(0x02)) != 0) min_len += 4;
14432
14433 if (octets_to_next_header < min_len) {
14434 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", min_len);
14435 return;
14436 }
14437
14438 offset += 4;
14439
14440 /* readerEntityId */
14441 rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_rdentity_id, hf_rtps_sm_rdentity_id_key,
14442 hf_rtps_sm_rdentity_id_kind, ett_rtps_rdentity, "readerEntityId", NULL((void*)0));
14443 offset += 4;
14444
14445 /* writerEntityId */
14446 rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key,
14447 hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", &wid);
14448 offset += 4;
14449
14450 /* Sequence number */
14451 rtps_util_add_seq_number(tree, tvb, offset, encoding, "writerSeqNumber");
14452 offset += 8;
14453
14454 /* Fragment number */
14455 proto_tree_add_item_ret_uint(tree, hf_rtps_nokey_data_frag_number, tvb,
14456 offset, 4, encoding, &frag_number);
14457 offset += 4;
14458
14459 /* Fragments in submessage */
14460 proto_tree_add_item(tree, hf_rtps_nokey_data_frag_num_fragments, tvb,
14461 offset, 2, encoding);
14462 offset += 2;
14463
14464 /* Fragment size */
14465 proto_tree_add_item(tree, hf_rtps_nokey_data_frag_size, tvb,
14466 offset, 2, encoding);
14467 offset += 2;
14468
14469 /* InlineQos */
14470 if ((flags & FLAG_DATA_Q_v2(0x02)) != 0) {
14471 bool_Bool is_inline_qos = true1;
14472 offset = dissect_parameter_sequence(tree, pinfo, tvb, offset, encoding,
14473 octets_to_next_header - (offset - old_offset) + 4,
14474 "inlineQos", 0x0200, NULL((void*)0), vendor_id, is_inline_qos, NULL((void*)0));
14475 }
14476
14477 /* SerializedData */
14478 if ((flags & FLAG_DATA_D_v2(0x04)) != 0) {
14479 from_builtin_writer = (((wid & ENTITYKIND_BUILTIN_WRITER_WITH_KEY(0xc2)) == ENTITYKIND_BUILTIN_WRITER_WITH_KEY(0xc2))
14480 || ((wid & ENTITYKIND_BUILTIN_WRITER_NO_KEY(0xc3)) == ENTITYKIND_BUILTIN_WRITER_NO_KEY(0xc3))
14481 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_BOOTSTRAP_WRITER(0x00010082))
14482 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_WRITER(0x00010182)))
14483 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_WRITER(0xff010182))
14484 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_READER(0xff010187)) ? true1 : false0;
14485 dissect_serialized_data(tree, pinfo, tvb,offset,
14486 octets_to_next_header - (offset - old_offset) + 4,
14487 "serializedData", vendor_id, from_builtin_writer, NULL((void*)0), (int32_t)frag_number);
14488 }
14489}
14490
14491static void dissect_PING(tvbuff_t* tvb, int offset, const unsigned encoding, int octets_to_next_header, proto_tree* tree) {
14492 proto_tree_add_item(tree, hf_rtps_ping,tvb, offset, octets_to_next_header, encoding);
14493}
14494
14495/* *********************************************************************** */
14496/* * A C K N A C K * */
14497/* *********************************************************************** */
14498static void dissect_ACKNACK(tvbuff_t *tvb, packet_info *pinfo, int offset, uint8_t flags,
14499 const unsigned encoding, int octets_to_next_header, proto_tree *tree,
14500 proto_item *item, endpoint_guid *guid) {
14501 /* RTPS 1.0/1.1:
14502 * 0...2...........7...............15.............23...............31
14503 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
14504 * | ACK |X|X|X|X|X|X|F|E| octetsToNextHeader |
14505 * +---------------+---------------+---------------+---------------+
14506 * | ObjectId readerObjectId |
14507 * +---------------+---------------+---------------+---------------+
14508 * | ObjectId writerObjectId |
14509 * +---------------+---------------+---------------+---------------+
14510 * | |
14511 * + Bitmap bitmap +
14512 * | |
14513 * +---------------+---------------+---------------+---------------+
14514 * | Counter count |
14515 * +---------------+---------------+---------------+---------------+
14516 *
14517 * RTPS 1.2/2.0:
14518 * 0...2...........7...............15.............23...............31
14519 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
14520 * | ACKNACK |X|X|X|X|X|X|F|E| octetsToNextHeader |
14521 * +---------------+---------------+---------------+---------------+
14522 * | EntityId readerEntityId |
14523 * +---------------+---------------+---------------+---------------+
14524 * | EntityId writerEntityId |
14525 * +---------------+---------------+---------------+---------------+
14526 * | |
14527 * + SequenceNumberSet readerSNState +
14528 * | |
14529 * +---------------+---------------+---------------+---------------+
14530 * | Counter count |
14531 * +---------------+---------------+---------------+---------------+
14532 */
14533 int original_offset; /* Offset to the readerEntityId */
14534 proto_item *octet_item;
14535 uint32_t wid;
14536
14537 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, ACKNACK_FLAGS, flags);
14538 octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb, offset + 2, 2, encoding);
14539 if (octets_to_next_header < 20) {
14540 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= 20)");
14541 return;
14542 }
14543
14544 offset += 4;
14545 original_offset = offset;
14546
14547 /* readerEntityId */
14548 rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_rdentity_id, hf_rtps_sm_rdentity_id_key,
14549 hf_rtps_sm_rdentity_id_kind, ett_rtps_rdentity, "readerEntityId", NULL((void*)0));
14550 offset += 4;
14551
14552 /* writerEntityId */
14553 rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key,
14554 hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", &wid);
14555 offset += 4;
14556 guid->entity_id = wid;
14557 guid->fields_present |= GUID_HAS_ENTITY_ID0x00000008;
14558 rtps_util_add_topic_info(tree, pinfo, tvb, offset, guid);
14559
14560 /* Bitmap */
14561 offset = rtps_util_add_bitmap(tree, pinfo, tvb, offset, encoding, "readerSNState", true1);
14562
14563 /* RTPS 1.0 didn't have count: make sure we don't decode it wrong
14564 * in this case
14565 */
14566 if (offset + 4 == original_offset + octets_to_next_header) {
14567 /* Count is present */
14568 proto_tree_add_item(tree, hf_rtps_acknack_count, tvb, offset, 4, encoding);
14569 } else if (offset < original_offset + octets_to_next_header) {
14570 /* In this case there must be something wrong in the bitmap: there
14571 * are some extra bytes that we don't know how to decode
14572 */
14573 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);
14574 } else if (offset > original_offset + octets_to_next_header) {
14575 /* Decoding the bitmap went over the end of this submessage.
14576 * Enter an item in the protocol tree that spans over the entire
14577 * submessage.
14578 */
14579 expert_add_info(pinfo, item, &ei_rtps_missing_bytes);
14580 }
14581
14582}
14583
14584/* *********************************************************************** */
14585/* * N A C K _ F R A G * */
14586/* *********************************************************************** */
14587static void dissect_NACK_FRAG(tvbuff_t *tvb, packet_info *pinfo, int offset, uint8_t flags,
14588 const unsigned encoding, int octets_to_next_header, proto_tree *tree) {
14589 /*
14590 * 0...2...........7...............15.............23...............31
14591 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
14592 * | NACK_FRAG |X|X|X|X|X|X|X|E| octetsToNextHeader |
14593 * +---------------+---------------+---------------+---------------+
14594 * | EntityId readerEntityId |
14595 * +---------------+---------------+---------------+---------------+
14596 * | EntityId writerEntityId |
14597 * +---------------+---------------+---------------+---------------+
14598 * | |
14599 * + SequenceNumberSet writerSN +
14600 * | |
14601 * +---------------+---------------+---------------+---------------+
14602 * | |
14603 * ~ FragmentNumberSet fragmentNumberState +
14604 * | |
14605 * +---------------+---------------+---------------+---------------+
14606 * | Counter count |
14607 * +---------------+---------------+---------------+---------------+
14608 */
14609 proto_item *octet_item;
14610
14611 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, NACK_FRAG_FLAGS, flags);
14612
14613 octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb,
14614 offset + 2, 2, encoding);
14615
14616 if (octets_to_next_header < 24) {
14617 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= 24)");
14618 return;
14619 }
14620
14621 offset += 4;
14622
14623 /* readerEntityId */
14624 rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_rdentity_id, hf_rtps_sm_rdentity_id_key,
14625 hf_rtps_sm_rdentity_id_kind, ett_rtps_rdentity, "readerEntityId", NULL((void*)0));
14626 offset += 4;
14627
14628 /* writerEntityId */
14629 rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key,
14630 hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", NULL((void*)0));
14631 offset += 4;
14632
14633 /* Writer sequence number */
14634 rtps_util_add_seq_number(tree, tvb, offset, encoding, "writerSN");
14635 offset += 8;
14636
14637 /* FragmentNumberSet */
14638 offset = rtps_util_add_fragment_number_set(tree, pinfo, tvb, offset, encoding,
14639 "fragmentNumberState", octets_to_next_header - 20);
14640
14641 if (offset == -1) {
14642 return;
14643 }
14644 /* Count */
14645 proto_tree_add_item(tree, hf_rtps_nack_frag_count, tvb, offset, 4, encoding);
14646}
14647
14648/* *********************************************************************** */
14649/* * H E A R T B E A T * */
14650/* *********************************************************************** */
14651static void dissect_HEARTBEAT(tvbuff_t *tvb, packet_info *pinfo, int offset, uint8_t flags,
14652 const unsigned encoding, int octets_to_next_header, proto_tree *tree,
14653 uint16_t version, endpoint_guid *guid) {
14654 /* RTPS 1.0/1.1:
14655 * 0...2...........7...............15.............23...............31
14656 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
14657 * | HEARTBEAT |X|X|X|X|X|L|F|E| octetsToNextHeader |
14658 * +---------------+---------------+---------------+---------------+
14659 * | ObjectId readerObjectId |
14660 * +---------------+---------------+---------------+---------------+
14661 * | ObjectId writerObjectId |
14662 * +---------------+---------------+---------------+---------------+
14663 * | |
14664 * + SequenceNumber firstAvailableSeqNumber +
14665 * | |
14666 * +---------------+---------------+---------------+---------------+
14667 * | |
14668 * + SequenceNumber lastSeqNumber +
14669 * | |
14670 * +---------------+---------------+---------------+---------------+
14671 * | long counter |
14672 * +---------------+---------------+---------------+---------------+
14673 *
14674 * Notes:
14675 * - on RTPS 1.0, counter is not present
14676 * - on RTPS 1.0, L flag is not present
14677 *
14678 * RTPS 1.2/2.0:
14679 * 0...2...........7...............15.............23...............31
14680 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
14681 * | HEARTBEAT |X|X|X|X|X|X|F|E| octetsToNextHeader |
14682 * +---------------+---------------+---------------+---------------+
14683 * | EntityId readerEntityId |
14684 * +---------------+---------------+---------------+---------------+
14685 * | EntityId writerEntityId |
14686 * +---------------+---------------+---------------+---------------+
14687 * | |
14688 * + SequenceNumber firstAvailableSeqNumber +
14689 * | |
14690 * +---------------+---------------+---------------+---------------+
14691 * | |
14692 * + SequenceNumber lastSeqNumber +
14693 * | |
14694 * +---------------+---------------+---------------+---------------+
14695 * | Counter count |
14696 * +---------------+---------------+---------------+---------------+
14697 */
14698 proto_item *octet_item;
14699 uint32_t wid;
14700 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, HEARTBEAT_FLAGS, flags);
14701
14702 octet_item = proto_tree_add_item(tree,
14703 hf_rtps_sm_octets_to_next_header,
14704 tvb,
14705 offset + 2,
14706 2,
14707 encoding);
14708
14709 if ((octets_to_next_header < 24) && (version <= 0x0101)) {
14710 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= 24)");
14711 return;
14712 }
14713 else if (octets_to_next_header < 28) {
14714 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= 28)");
14715 return;
14716 }
14717
14718 offset += 4;
14719
14720 /* readerEntityId */
14721 rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_rdentity_id, hf_rtps_sm_rdentity_id_key,
14722 hf_rtps_sm_rdentity_id_kind, ett_rtps_rdentity, "readerEntityId", NULL((void*)0));
14723 offset += 4;
14724
14725 /* writerEntityId */
14726 rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key,
14727 hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", &wid);
14728 offset += 4;
14729 guid->entity_id = wid;
14730 guid->fields_present |= GUID_HAS_ENTITY_ID0x00000008;
14731 rtps_util_add_topic_info(tree, pinfo, tvb, offset, guid);
14732
14733 /* First available Sequence Number */
14734 rtps_util_add_seq_number(tree, tvb, offset, encoding, "firstAvailableSeqNumber");
14735 offset += 8;
14736
14737 /* Last Sequence Number */
14738 rtps_util_add_seq_number(tree, tvb, offset, encoding, "lastSeqNumber");
14739 offset += 8;
14740
14741 /* Counter: it was not present in RTPS 1.0 */
14742 if (version >= 0x0101) {
14743 proto_tree_add_item(tree, hf_rtps_heartbeat_count, tvb, offset, 4, encoding);
14744 }
14745}
14746
14747/* *********************************************************************** */
14748/* * H E A R T B E A T _ B A T C H * */
14749/* *********************************************************************** */
14750static void dissect_HEARTBEAT_BATCH(tvbuff_t *tvb, packet_info *pinfo, int offset,
14751 uint8_t flags, const unsigned encoding, int octets_to_next_header,
14752 proto_tree *tree, endpoint_guid *guid) {
14753 /*
14754 * 0...2...........7...............15.............23...............31
14755 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
14756 * |HEARTBEAT_BATCH|X|X|X|X|X|L|F|E| octetsToNextHeader |
14757 * +---------------+---------------+---------------+---------------+
14758 * | EntityId readerId |
14759 * +---------------+---------------+---------------+---------------+
14760 * | EntityId writerId |
14761 * +---------------+---------------+---------------+---------------+
14762 * | |
14763 * + SequenceNumber firstBatchSN +
14764 * | |
14765 * +---------------+---------------+---------------+---------------+
14766 * | |
14767 * + SequenceNumber lastBatchSN +
14768 * | |
14769 * +---------------+---------------+---------------+---------------+
14770 * | |
14771 * + SequenceNumber firstSN +
14772 * | |
14773 * +---------------+---------------+---------------+---------------+
14774 * | |
14775 * + SequenceNumber lastSN +
14776 * | |
14777 * +---------------+---------------+---------------+---------------+
14778 * | Count count |
14779 * +---------------+---------------+---------------+---------------+
14780 */
14781 proto_item *octet_item;
14782 uint32_t wid;
14783 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, HEARTBEAT_BATCH_FLAGS, flags);
14784
14785 octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb,
14786 offset + 2, 2, encoding);
14787
14788 if (octets_to_next_header < 36) {
14789 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= 36)");
14790 return;
14791 }
14792
14793 /* Skip decoding the entire packet if (tree == NULL) */
14794 if (tree == NULL((void*)0)) {
14795 return;
14796 }
14797
14798 offset += 4;
14799
14800 /* readerEntityId */
14801 rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_rdentity_id, hf_rtps_sm_rdentity_id_key,
14802 hf_rtps_sm_rdentity_id_kind, ett_rtps_rdentity, "readerEntityId", NULL((void*)0));
14803 offset += 4;
14804
14805 /* writerEntityId */
14806 rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key,
14807 hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", &wid);
14808 offset += 4;
14809 guid->entity_id = wid;
14810 guid->fields_present |= GUID_HAS_ENTITY_ID0x00000008;
14811 rtps_util_add_topic_info(tree, pinfo, tvb, offset, guid);
14812
14813 /* First available Batch Sequence Number */
14814 rtps_util_add_seq_number(tree, tvb, offset, encoding, "firstBatchSN");
14815 offset += 8;
14816
14817 /* Last Batch Sequence Number */
14818 rtps_util_add_seq_number(tree, tvb, offset, encoding, "lastBatchSN");
14819 offset += 8;
14820
14821 /* First available Sequence Number */
14822 rtps_util_add_seq_number(tree, tvb, offset, encoding, "firstSeqNumber");
14823 offset += 8;
14824
14825 /* Last Sequence Number */
14826 rtps_util_add_seq_number(tree, tvb, offset, encoding, "lastSeqNumber");
14827 offset += 8;
14828
14829 /* Counter */
14830 proto_tree_add_item(tree, hf_rtps_heartbeat_batch_count, tvb, offset, 4, encoding);
14831}
14832
14833/* *********************************************************************** */
14834/* * H E A R T B E A T _ V I R T U A L * */
14835/* *********************************************************************** */
14836
14837static void dissect_HEARTBEAT_VIRTUAL(tvbuff_t *tvb, packet_info *pinfo _U___attribute__((unused)), int offset,
14838 uint8_t flags, const unsigned encoding, int octets_to_next_header, proto_tree *tree,
14839 uint16_t vendor_id _U___attribute__((unused)), endpoint_guid *guid) {
14840
14841 /*
14842 * VIRTUAL_HB:
14843 *
14844 * 0...2...........7...............15.............23...............31
14845 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
14846 * | VIRTUAL_HB |X|X|X|X|N|W|V|E| octetsToNextHeader |
14847 * +---------------+---------------+---------------+---------------+
14848 * | EntityId readerId |
14849 * +---------------+---------------+---------------+---------------+
14850 * | EntityId writerId |
14851 * +---------------+---------------+---------------+---------------+
14852 * | Guid_t virtualGUID (V=0 & N=0) |
14853 * + +
14854 * | |
14855 * + +
14856 * | |
14857 * + +
14858 * | |
14859 * +---------------+---------------+---------------+---------------+
14860 * | unsigned long numWriters (W=1) |
14861 * +---------------+---------------+---------------+---------------+
14862 * | |
14863 * ~ WriterVirtualHBList writerVirtualHBList ~
14864 * | |
14865 * +---------------+---------------+---------------+---------------+
14866 * | unsigned long count |
14867 * +---------------+---------------+---------------+---------------+
14868
14869 * WRITER_VIRTUAL_HB:
14870 *
14871 * 0...2...........7...............15.............23...............31
14872 * +---------------+---------------+---------------+---------------+
14873 * | EntityId writerId (W=1) |
14874 * +---------------+---------------+---------------+---------------+
14875 * | unsigned long numVirtualGUIDs (N=0) |
14876 * +---------------+---------------+---------------+---------------+
14877 * | |
14878 * ~ VirtualGUIDHBList virtualGUIDHBList ~
14879 * | |
14880 * +---------------+---------------+---------------+---------------+
14881 *
14882 * VIRTUAL_GUID_HB:
14883 *
14884 * 0...2...........7...............15.............23...............31
14885 * +---------------+---------------+---------------+---------------+
14886 * | Guid_t virtualGUID (V=1) |
14887 * + +
14888 * | |
14889 * + +
14890 * | |
14891 * + +
14892 * | |
14893 * +---------------+---------------+---------------+---------------+
14894 * | |
14895 * + SequenceNumber firstVirtualSN +
14896 * | |
14897 * +---------------+---------------+---------------+---------------+
14898 * | |
14899 * + SequenceNumber lastVirtualSN +
14900 * | |
14901 * +---------------+---------------+---------------+---------------+
14902 * | |
14903 * + SequenceNumber firstRTPSSN +
14904 * | |
14905 * +---------------+---------------+---------------+---------------+
14906 * | |
14907 * + SequenceNumber lastRTPSSN +
14908 * | |
14909 * +---------------+---------------+---------------+---------------+
14910 */
14911
14912 uint32_t num_writers, num_virtual_guids, wid;
14913 int writer_id_offset, virtual_guid_offset = 0, old_offset;
14914 proto_item *octet_item, *ti;
14915
14916 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, HEARTBEAT_VIRTUAL_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 < 12) {
14922 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", 12);
14923 return;
14924 }
14925 offset += 4;
14926
14927 /* readerEntityId */
14928 rtps_util_add_entity_id(tree,
14929 pinfo, tvb,
14930 offset,
14931 hf_rtps_sm_rdentity_id,
14932 hf_rtps_sm_rdentity_id_key,
14933 hf_rtps_sm_rdentity_id_kind,
14934 ett_rtps_rdentity,
14935 "readerEntityId",
14936 NULL((void*)0));
14937 offset += 4;
14938
14939 /* writerEntityId */
14940 rtps_util_add_entity_id(tree,
14941 pinfo, tvb,
14942 offset,
14943 hf_rtps_sm_wrentity_id,
14944 hf_rtps_sm_wrentity_id_key,
14945 hf_rtps_sm_wrentity_id_kind,
14946 ett_rtps_wrentity,
14947 "writerEntityId",
14948 &wid);
14949 writer_id_offset = offset;
14950 offset += 4;
14951 guid->entity_id = wid;
14952 guid->fields_present |= GUID_HAS_ENTITY_ID0x00000008;
14953 rtps_util_add_topic_info(tree, pinfo, tvb, offset, guid);
14954
14955 /* virtualGUID */
14956 if (!(flags & FLAG_VIRTUAL_HEARTBEAT_V(0x02)) && !(flags & FLAG_VIRTUAL_HEARTBEAT_N(0x08))) {
14957 /*rtps_util_add_generic_guid(tree,
14958 tvb,
14959 offset,
14960 "virtualGUID",
14961 buffer,
14962 MAX_GUID_SIZE);*/
14963 virtual_guid_offset = offset;
14964 offset += 16;
14965 }
14966
14967 /* num_writers */
14968 ti = proto_tree_add_item(tree, hf_rtps_virtual_heartbeat_num_writers, tvb,
14969 offset, 4, encoding);
14970 if (flags & FLAG_VIRTUAL_HEARTBEAT_W(0x04)) {
14971 num_writers = tvb_get_uint32(tvb, offset, encoding);
14972 offset += 4;
14973 } else {
14974 proto_item_set_text(ti, "numWriters: 1");
14975 num_writers = 1;
14976 }
14977
14978 {
14979 /* Deserialize Writers */
14980 proto_tree *sil_tree_writer_list;
14981 uint32_t current_writer_index;
14982
14983 /** Writer list **/
14984 sil_tree_writer_list = proto_tree_add_subtree_format(tree, tvb, offset, -1,
14985 ett_rtps_writer_heartbeat_virtual_list, NULL((void*)0), "Writer List");
14986
14987 current_writer_index = 0;
14988
14989 while (current_writer_index < num_writers) {
14990 proto_tree *sil_tree_writer;
14991 sil_tree_writer = proto_tree_add_subtree_format(sil_tree_writer_list, tvb, offset, -1,
14992 ett_rtps_writer_heartbeat_virtual, NULL((void*)0), "writer[%d]", current_writer_index);
14993
14994 if (num_writers == 1) {
14995 old_offset = offset;
14996 offset = writer_id_offset;
14997 }
14998
14999 rtps_util_add_entity_id(sil_tree_writer,
15000 pinfo, tvb,
15001 offset,
15002 hf_rtps_sm_wrentity_id,
15003 hf_rtps_sm_wrentity_id_key,
15004 hf_rtps_sm_wrentity_id_kind,
15005 ett_rtps_wrentity,
15006 "writerEntityId",
15007 NULL((void*)0));
15008
15009 if (num_writers == 1) {
15010 offset = old_offset;
15011 } else {
15012 offset += 4;
15013 }
15014
15015 if (!(flags & FLAG_VIRTUAL_HEARTBEAT_N(0x08))) {
15016 proto_tree_add_item(sil_tree_writer, hf_rtps_virtual_heartbeat_num_virtual_guids, tvb,
15017 offset, 4, encoding);
15018 num_virtual_guids = tvb_get_uint32(tvb, offset, encoding);
15019 offset += 4;
15020 } else {
15021 num_virtual_guids = 0;
15022 }
15023
15024 /** Virtual GUID list **/
15025 if (num_virtual_guids != 0) {
15026 proto_tree *sil_tree_virtual_guid_list;
15027 uint32_t current_virtual_guid_index;
15028
15029 sil_tree_virtual_guid_list = proto_tree_add_subtree_format(sil_tree_writer, tvb, offset, -1,
15030 ett_rtps_virtual_guid_heartbeat_virtual_list, NULL((void*)0), "Virtual GUID List");
15031
15032 current_virtual_guid_index = 0;
15033
15034 while (current_virtual_guid_index < num_virtual_guids) {
15035 proto_tree *sil_tree_virtual_guid;
15036 sil_tree_virtual_guid = proto_tree_add_subtree_format(sil_tree_virtual_guid_list, tvb, offset, -1,
15037 ett_rtps_virtual_guid_heartbeat_virtual, NULL((void*)0), "virtualGUID[%d]", current_virtual_guid_index);
15038
15039 if (!(flags & FLAG_VIRTUAL_HEARTBEAT_V(0x02))) {
15040 old_offset = offset;
15041 offset = virtual_guid_offset;
15042 }
15043
15044 /*rtps_util_add_generic_guid_v2(sil_tree_virtual_guid,
15045 tvb,
15046 offset,
15047 "virtualGUID",
15048 buffer,
15049 MAX_GUID_SIZE);*/
15050
15051 if (!(flags & FLAG_VIRTUAL_HEARTBEAT_V(0x02))) {
15052 offset = old_offset;
15053 } else {
15054 offset += 16;
15055 }
15056
15057 /* firstVirtualSN */
15058 rtps_util_add_seq_number(sil_tree_virtual_guid,
15059 tvb,
15060 offset,
15061 encoding,
15062 "firstVirtualSN");
15063 offset += 8;
15064
15065 /* lastVirtualSN */
15066 rtps_util_add_seq_number(sil_tree_virtual_guid,
15067 tvb,
15068 offset,
15069 encoding,
15070 "lastVirtualSN");
15071 offset += 8;
15072
15073 /* firstRTPSSN */
15074 rtps_util_add_seq_number(sil_tree_virtual_guid,
15075 tvb,
15076 offset,
15077 encoding,
15078 "firstRTPSSN");
15079 offset += 8;
15080
15081 /* lastRTPSSN */
15082 rtps_util_add_seq_number(sil_tree_virtual_guid,
15083 tvb,
15084 offset,
15085 encoding,
15086 "lastRTPSSN");
15087 offset += 8;
15088
15089 current_virtual_guid_index++;
15090 }
15091 }
15092
15093 current_writer_index++;
15094 }
15095 }
15096
15097 /* Count */
15098 proto_tree_add_item(tree, hf_rtps_virtual_heartbeat_count, tvb, offset, 4, encoding);
15099 }
15100
15101
15102/* *********************************************************************** */
15103/* * H E A R T B E A T _ F R A G * */
15104/* *********************************************************************** */
15105static void dissect_HEARTBEAT_FRAG(tvbuff_t *tvb, packet_info *pinfo, int offset, uint8_t flags,
15106 const unsigned encoding, int octets_to_next_header, proto_tree *tree, endpoint_guid *guid) {
15107 /*
15108 * 0...2...........7...............15.............23...............31
15109 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
15110 * |HEARTBEAT_FRAG |X|X|X|X|X|X|X|E| octetsToNextHeader |
15111 * +---------------+---------------+---------------+---------------+
15112 * | EntityId readerEntityId |
15113 * +---------------+---------------+---------------+---------------+
15114 * | EntityId writerEntityId |
15115 * +---------------+---------------+---------------+---------------+
15116 * | |
15117 * + SequenceNumber writerSeqNumber +
15118 * | |
15119 * +---------------+---------------+---------------+---------------+
15120 * | FragmentNumber lastFragmentNum |
15121 * +---------------+---------------+---------------+---------------+
15122 * | Counter count |
15123 * +---------------+---------------+---------------+---------------+
15124 */
15125 proto_item *octet_item;
15126 uint32_t wid;
15127 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, HEARTBEAT_FRAG_FLAGS, flags);
15128
15129 octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb,
15130 offset + 2, 2, encoding);
15131
15132 if (octets_to_next_header < 24) {
15133 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= 24)");
15134 return;
15135 }
15136
15137 /* Skip decoding the entire packet if (tree == NULL) */
15138 if (tree == NULL((void*)0)) {
15139 return;
15140 }
15141
15142 offset += 4;
15143
15144 /* readerEntityId */
15145 rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_rdentity_id, hf_rtps_sm_rdentity_id_key,
15146 hf_rtps_sm_rdentity_id_kind, ett_rtps_rdentity, "readerEntityId", NULL((void*)0));
15147 offset += 4;
15148
15149 /* writerEntityId */
15150 rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key,
15151 hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", &wid);
15152 offset += 4;
15153 guid->entity_id = wid;
15154 guid->fields_present |= GUID_HAS_ENTITY_ID0x00000008;
15155 rtps_util_add_topic_info(tree, pinfo, tvb, offset, guid);
15156
15157 /* First available Sequence Number */
15158 rtps_util_add_seq_number(tree, tvb, offset, encoding, "writerSeqNumber");
15159 offset += 8;
15160
15161 /* Fragment number */
15162 proto_tree_add_item(tree, hf_rtps_heartbeat_frag_number, tvb, offset, 4, encoding);
15163 offset += 4;
15164
15165 /* Counter */
15166 proto_tree_add_item(tree, hf_rtps_heartbeat_frag_count, tvb, offset, 4, encoding);
15167}
15168
15169/* *********************************************************************** */
15170/* * R T P S _ D A T A * */
15171/* * A N D * */
15172/* * R T P S _ D A T A _ S E S S I O N * */
15173/* *********************************************************************** */
15174static void dissect_RTPS_DATA(tvbuff_t *tvb, packet_info *pinfo, int offset, uint8_t flags,
15175 unsigned encoding, int octets_to_next_header, proto_tree *tree,
15176 uint16_t vendor_id, bool_Bool is_session, endpoint_guid *guid) {
15177 /*
15178 *
15179 * 0...2...........7...............15.............23...............31
15180 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
15181 * | RTPS_DATA |X|X|X|X|K|D|Q|E| octetsToNextHeader |
15182 * +---------------+---------------+---------------+---------------+
15183 * | Flags extraFlags | octetsToInlineQos |
15184 * +---------------+---------------+---------------+---------------+
15185 * | EntityId readerEntityId |
15186 * +---------------+---------------+---------------+---------------+
15187 * | EntityId writerEntityId |
15188 * +---------------+---------------+---------------+---------------+
15189 * | |
15190 * + SequenceNumber writerSeqNum +
15191 * | |
15192 * +---------------+---------------+---------------+---------------+
15193 * | |
15194 * ~ ParameterList inlineQos [only if Q==1] ~
15195 * | |
15196 * +---------------+---------------+---------------+---------------+
15197 * | |
15198 * ~ SerializedData serializedData [only if D==1 || K==1] ~
15199 * | |
15200 * +---------------+---------------+---------------+---------------+
15201 *
15202 * 0...2...........7...............15.............23...............31
15203 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
15204 * |RTPS_DATA_SESSI|X|X|X|X|K|D|Q|E| octetsToNextHeader |
15205 * +---------------+---------------+---------------+---------------+
15206 * | Flags extraFlags | octetsToInlineQos |
15207 * +---------------+---------------+---------------+---------------+
15208 * | EntityId readerEntityId |
15209 * +---------------+---------------+---------------+---------------+
15210 * | EntityId writerEntityId |
15211 * +---------------+---------------+---------------+---------------+
15212 * | |
15213 * + SequenceNumber writerSessionSeqNum +
15214 * | |
15215 * +---------------+---------------+---------------+---------------+
15216 * | |
15217 * + SequenceNumber writerVirtualSeqNum +
15218 * | |
15219 * +---------------+---------------+---------------+---------------+
15220 * | |
15221 * ~ ParameterList inlineQos [only if Q==1] ~
15222 * | |
15223 * +---------------+---------------+---------------+---------------+
15224 * | |
15225 * ~ SerializedData serializedData [only if D==1 || K==1] ~
15226 * | |
15227 * +---------------+---------------+---------------+---------------+
15228 */
15229 int min_len;
15230 int old_offset = offset;
15231 uint32_t writer_wid; /* Writer EntityID */
15232 uint32_t reader_wid = 0;
15233 uint32_t status_info = 0xffffffff;
15234 bool_Bool from_builtin_writer;
15235 proto_item *octet_item;
15236 coherent_set_entity_info coherent_set_entity_info_object = {0};
15237
15238 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, RTPS_DATA_FLAGS, flags);
15239
15240 octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb,
15241 offset + 2, 2, encoding);
15242
15243 /* Calculates the minimum length for this submessage */
15244 min_len = 20;
15245 if (is_session) {
15246 min_len += 8;
15247 bool_Bool* is_data_session_final = wmem_alloc(pinfo->pool, sizeof(bool_Bool));
15248 *is_data_session_final = false0;
15249 p_add_proto_data(pinfo->pool, pinfo, proto_rtps, RTPS_DATA_SESSION_FINAL_PROTODATA_KEY2, is_data_session_final);
15250 }
15251 if ((flags & FLAG_RTPS_DATA_Q(0x02)) != 0) min_len += 4;
15252 if ((flags & FLAG_RTPS_DATA_D(0x04)) != 0) min_len += 4;
15253 if ((flags & FLAG_RTPS_DATA_K(0x08)) != 0) min_len += 4;
15254
15255 if (octets_to_next_header < min_len) {
15256 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", min_len);
15257 return;
15258 }
15259
15260 offset += 4;
15261
15262 /* extraFlags */
15263 proto_tree_add_item(tree, hf_rtps_extra_flags, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
15264 offset += 2;
15265
15266 /* octetsToInlineQos */
15267 proto_tree_add_item(tree, hf_rtps_octets_to_inline_qos, tvb, offset, 2, encoding);
15268 offset += 2;
15269
15270 /* readerEntityId */
15271 rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_rdentity_id, hf_rtps_sm_rdentity_id_key,
15272 hf_rtps_sm_rdentity_id_kind, ett_rtps_rdentity, "readerEntityId", &reader_wid);
15273 offset += 4;
15274
15275 /* writerEntityId */
15276 rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key,
15277 hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", &writer_wid);
15278 offset += 4;
15279 guid->entity_id = writer_wid;
15280 guid->fields_present |= GUID_HAS_ENTITY_ID0x00000008;
15281 rtps_util_add_topic_info(tree, pinfo, tvb, offset, guid);
15282
15283 /* Sequence number */
15284 if (is_session) {
15285 rtps_util_add_seq_number(tree, tvb, offset, encoding, "writerSessionSeqNumber");
15286 offset += 8;
15287
15288 rtps_util_add_seq_number(tree, tvb, offset, encoding, "writerVirtualSeqNumber");
15289 offset += 8;
15290 } else {
15291 coherent_set_entity_info_object.writer_seq_number = rtps_util_add_seq_number(tree, tvb, offset,
15292 encoding, "writerSeqNumber");
15293 coherent_set_entity_info_object.guid = *guid;
15294 offset += 8;
15295 }
15296
15297 /* InlineQos */
15298 if ((flags & FLAG_RTPS_DATA_Q(0x02)) != 0) {
15299 bool_Bool is_inline_qos = true1;
15300 offset = dissect_parameter_sequence(tree, pinfo, tvb, offset, encoding,
15301 octets_to_next_header - (offset - old_offset) + 4,
15302 "inlineQos", 0x0200, &status_info, vendor_id, is_inline_qos, &coherent_set_entity_info_object);
15303 }
15304
15305 /* SerializedData */
15306 if (((flags & FLAG_RTPS_DATA_D(0x04)) != 0) || ((flags & FLAG_RTPS_DATA_K(0x08)) != 0)) {
15307 if (writer_wid == ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_WRITER(0x000200c2)) {
15308 /* Dissect the serialized data as ParticipantMessageData:
15309 * struct ParticipantMessageData {
15310 * KeyHashPrefix_t participantGuidPrefix;
15311 * KeyHashSuffix_t kind;
15312 * sequence<octet> data;
15313 * }
15314 */
15315 proto_tree *rtps_pm_tree;
15316 proto_tree *guid_tree;
15317 uint32_t kind;
15318 uint32_t encapsulation_id, encapsulation_len;
15319 proto_item *ti;
15320 rtps_pm_tree = proto_tree_add_subtree(tree, tvb, offset,
15321 octets_to_next_header - (offset - old_offset) + 4,
15322 ett_rtps_part_message_data, &ti, "ParticipantMessageData");
15323
15324 /* Encapsulation ID */
15325 proto_tree_add_item_ret_uint(rtps_pm_tree, hf_rtps_param_serialize_encap_kind, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &encapsulation_id);
15326 offset += 2;
15327
15328 encoding = get_encapsulation_endianness(encapsulation_id);
15329
15330 /* Encapsulation length (or option) */
15331 proto_tree_add_item_ret_uint(rtps_pm_tree, hf_rtps_param_serialize_encap_len, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &encapsulation_len);
15332 offset += 2;
15333
15334 guid_tree = proto_item_add_subtree(ti, ett_rtps_part_message_data);
15335
15336 rtps_util_add_guid_prefix_v2(guid_tree, tvb, offset, hf_rtps_sm_guid_prefix, hf_rtps_sm_host_id,
15337 hf_rtps_sm_app_id, hf_rtps_sm_instance_id, 0);
15338 offset += 12;
15339
15340 /* Kind */
15341 proto_tree_add_item_ret_uint(guid_tree, hf_rtps_encapsulation_kind, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000, &kind);
15342 offset += 4;
15343
15344 rtps_util_add_seq_octets(rtps_pm_tree, pinfo, tvb, offset, encoding,
15345 octets_to_next_header - (offset - old_offset) + 4, hf_rtps_data_serialize_data);
15346
15347 } else if (writer_wid == ENTITYID_P2P_BUILTIN_PARTICIPANT_STATELESS_WRITER(0x000201c3) || writer_wid == ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_WRITER(0xff0202c3)) {
15348 /* PGM stands for Participant Generic Message */
15349 proto_tree * rtps_pgm_tree, * guid_tree, * message_identity_tree;
15350 proto_item *ti;
15351 uint32_t encapsulation_id, encapsulation_opt;
15352 int32_t alignment_zero;
15353 uint64_t sequence_number;
15354
15355 ti = proto_tree_add_boolean_format(tree, hf_rtps_pgm, tvb, offset,
15356 octets_to_next_header - (offset - old_offset) + 4, true1, "Participant Generic Message");
15357 rtps_pgm_tree = proto_item_add_subtree(ti, ett_rtps_pgm_data);
15358
15359 proto_tree_add_item_ret_uint(rtps_pgm_tree, hf_rtps_param_serialize_encap_kind,
15360 tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &encapsulation_id);
15361 encoding = get_encapsulation_endianness(encapsulation_id);
15362
15363 offset += 2;
15364 proto_tree_add_item_ret_uint(rtps_pgm_tree, hf_rtps_param_serialize_encap_len,
15365 tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &encapsulation_opt);
15366
15367 offset += 2;
15368 alignment_zero = offset;
15369 /* Message Identity */
15370 message_identity_tree = proto_tree_add_subtree(rtps_pgm_tree, tvb, offset,
15371 24 , ett_rtps_message_identity, &ti, "Message Identity");
15372
15373 guid_tree = proto_item_add_subtree(ti, ett_rtps_message_identity);
15374 proto_item_append_text(guid_tree, " (");
15375 rtps_util_add_generic_guid_v2(guid_tree, tvb, offset,
15376 hf_rtps_message_identity_source_guid, hf_rtps_param_host_id, hf_rtps_param_app_id,
15377 hf_rtps_param_instance_id, hf_rtps_param_entity, hf_rtps_param_entity_key,
15378 hf_rtps_param_entity_kind, guid_tree);
15379 offset += 16;
15380
15381 proto_tree_add_item(message_identity_tree, hf_rtps_sm_seq_number, tvb, offset, 8, encoding);
15382
15383 /* This snippet shows the sequence number in the parent tree */
15384 sequence_number = tvb_get_uint64(tvb, offset, encoding);
15385 proto_item_append_text(guid_tree, ", sn: %" PRIu64"l" "u" ")",
15386 sequence_number);
15387 offset += 8;
15388
15389 /* Related Message Identity */
15390 message_identity_tree = proto_tree_add_subtree(rtps_pgm_tree, tvb, offset,
15391 24 , ett_rtps_related_message_identity, &ti, "Related Message Identity");
15392
15393 guid_tree = proto_item_add_subtree(ti, ett_rtps_related_message_identity);
15394 proto_item_append_text(guid_tree, " (");
15395 rtps_util_add_generic_guid_v2(guid_tree, tvb, offset,
15396 hf_rtps_message_identity_source_guid, hf_rtps_param_host_id, hf_rtps_param_app_id,
15397 hf_rtps_param_instance_id, hf_rtps_param_entity, hf_rtps_param_entity_key,
15398 hf_rtps_param_entity_kind, guid_tree);
15399 offset += 16;
15400
15401 proto_tree_add_item(message_identity_tree, hf_rtps_sm_seq_number, tvb,
15402 offset, 8, encoding);
15403
15404 /* This snippet shows the sequence number in the parent tree */
15405 sequence_number = tvb_get_uint64(tvb, offset, encoding);
15406 proto_item_append_text(guid_tree, ", sn: %" PRIu64"l" "u" ")",
15407 sequence_number);
15408 offset += 8;
15409
15410 guid_tree = proto_item_add_subtree(rtps_pgm_tree, ett_rtps_pgm_data);
15411 rtps_util_add_generic_guid_v2(guid_tree, tvb, offset,
15412 hf_rtps_pgm_dst_participant_guid, hf_rtps_param_host_id, hf_rtps_param_app_id,
15413 hf_rtps_param_instance_id, hf_rtps_param_entity, hf_rtps_param_entity_key,
15414 hf_rtps_param_entity_kind, NULL((void*)0));
15415 offset += 16;
15416
15417 guid_tree = proto_item_add_subtree(rtps_pgm_tree, ett_rtps_pgm_data);
15418 rtps_util_add_generic_guid_v2(guid_tree, tvb, offset,
15419 hf_rtps_pgm_dst_endpoint_guid, hf_rtps_param_host_id, hf_rtps_param_app_id,
15420 hf_rtps_param_instance_id, hf_rtps_param_entity, hf_rtps_param_entity_key,
15421 hf_rtps_param_entity_kind, NULL((void*)0));
15422 offset += 16;
15423
15424 guid_tree = proto_item_add_subtree(rtps_pgm_tree, ett_rtps_pgm_data);
15425 rtps_util_add_generic_guid_v2(guid_tree, tvb, offset,
15426 hf_rtps_pgm_src_endpoint_guid, hf_rtps_param_host_id, hf_rtps_param_app_id,
15427 hf_rtps_param_instance_id, hf_rtps_param_entity, hf_rtps_param_entity_key,
15428 hf_rtps_param_entity_kind, NULL((void*)0));
15429 offset += 16;
15430
15431 offset = rtps_util_add_string(rtps_pgm_tree, tvb, offset, hf_rtps_pgm_message_class_id, encoding);
15432
15433 rtps_util_add_data_holder_seq(rtps_pgm_tree, tvb, pinfo, offset,
15434 encoding, alignment_zero);
15435 } else if (writer_wid == ENTITYID_RTI_BUILTIN_LOCATOR_PING_WRITER(0x00020182)) {
15436 proto_tree * locator_ping_tree, *guid_tree;
15437 proto_item *ti;
15438 uint32_t encapsulation_id, encapsulation_opt;
15439
15440 locator_ping_tree = proto_tree_add_subtree(tree, tvb, offset,
15441 octets_to_next_header - (offset - old_offset) + 4,
15442 ett_rtps_locator_ping_tree, &ti, "Locator Ping Message");
15443
15444 /* Encapsulation Id */
15445 proto_tree_add_item_ret_uint(locator_ping_tree, hf_rtps_encapsulation_id,
15446 tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &encapsulation_id);
15447 offset += 2;
15448 encoding = get_encapsulation_endianness(encapsulation_id);
15449
15450 /* Encapsulation length (or option) */
15451 proto_tree_add_item_ret_uint(locator_ping_tree, hf_rtps_encapsulation_options,
15452 tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &encapsulation_opt);
15453 offset += 2;
15454
15455 guid_tree = proto_item_add_subtree(ti, ett_rtps_generic_guid);
15456 rtps_util_add_generic_guid_v2(guid_tree, tvb, offset,
15457 hf_rtps_source_participant_guid, hf_rtps_param_host_id, hf_rtps_param_app_id,
15458 hf_rtps_param_instance_id, hf_rtps_param_entity, hf_rtps_param_entity_key,
15459 hf_rtps_param_entity_kind, NULL((void*)0));
15460 offset += 16;
15461 rtps_util_add_locator_t(locator_ping_tree, pinfo, tvb, offset, encoding,
15462 "Destination Locator");
15463
15464 } else if (writer_wid == ENTITYID_RTI_BUILTIN_SERVICE_REQUEST_WRITER(0x00020082)) {
15465 /*
15466 struct ServiceRequest {
15467 long service_id; //@key
15468 GUID_t instance_id; //@key
15469 sequence<octet> request_body;
15470 }; //@Extensibility EXTENSIBLE_EXTENSIBILITY
15471 */
15472 proto_tree * service_request_tree, * guid_tree;
15473 proto_item *ti;
15474 uint32_t encapsulation_id, encapsulation_opt;
15475 int32_t service_id;
15476
15477 ti = proto_tree_add_boolean_format(tree, hf_rtps_srm, tvb, offset,
15478 octets_to_next_header - (offset - old_offset) + 4,
15479 true1, "Service Request Message");
15480 service_request_tree = proto_item_add_subtree(ti, ett_rtps_service_request_tree);
15481
15482 /* Encapsulation Id */
15483 proto_tree_add_item_ret_uint(service_request_tree, hf_rtps_encapsulation_id,
15484 tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &encapsulation_id);
15485 offset += 2;
15486 encoding = get_encapsulation_endianness(encapsulation_id);
15487 /* Encapsulation length (or option) */
15488 proto_tree_add_item_ret_uint(service_request_tree, hf_rtps_encapsulation_options, tvb,
15489 offset, 2, ENC_BIG_ENDIAN0x00000000, &encapsulation_opt);
15490 offset += 2;
15491
15492 proto_tree_add_item_ret_int(service_request_tree, hf_rtps_srm_service_id, tvb,
15493 offset, 4, encoding, &service_id);
15494 offset += 4;
15495 guid_tree = proto_item_add_subtree(ti, ett_rtps_generic_guid);
15496 rtps_util_add_generic_guid_v2(guid_tree, tvb, offset,
15497 hf_rtps_srm_instance_id, hf_rtps_param_host_id, hf_rtps_param_app_id,
15498 hf_rtps_param_instance_id, hf_rtps_param_entity, hf_rtps_param_entity_key,
15499 hf_rtps_param_entity_kind, NULL((void*)0));
15500 offset += 16;
15501 rtps_util_add_rti_service_request(service_request_tree, pinfo, tvb, offset,
15502 encoding, service_id);
15503
15504 } else {
15505 const char *label;
15506 if (((flags & FLAG_RTPS_DATA_D(0x04)) != 0) || ((flags & FLAG_RTPS_DATA_K(0x08)) == 0)) {
15507 label = "serializedData";
15508 } else if (((flags & FLAG_RTPS_DATA_D(0x04)) == 0) || ((flags & FLAG_RTPS_DATA_K(0x08)) != 0)) {
15509 label = "serializedKey";
15510 } else {
15511 /* D==1 && K==1 */
15512 label = "<invalid or unknown data type>";
15513 }
15514
15515 from_builtin_writer = (((writer_wid & ENTITYKIND_BUILTIN_WRITER_WITH_KEY(0xc2)) == ENTITYKIND_BUILTIN_WRITER_WITH_KEY(0xc2))
15516 || ((writer_wid & ENTITYKIND_BUILTIN_WRITER_NO_KEY(0xc3)) == ENTITYKIND_BUILTIN_WRITER_NO_KEY(0xc3))
15517 || (writer_wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_BOOTSTRAP_WRITER(0x00010082))
15518 || (writer_wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_WRITER(0x00010182)))
15519 || (writer_wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_WRITER(0xff010182))
15520 || (writer_wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_READER(0xff010187)) ? true1 : false0;
15521 /* At the end still dissect the rest of the bytes as raw data */
15522 dissect_serialized_data(tree, pinfo, tvb, offset,
15523 octets_to_next_header - (offset - old_offset) + 4,
15524 label, vendor_id, from_builtin_writer, guid, NOT_A_FRAGMENT(-1));
15525 }
15526 }
15527 rtps_util_detect_coherent_set_end_empty_data_case(&coherent_set_entity_info_object);
15528 generate_status_info(pinfo, writer_wid, status_info);
15529}
15530
15531static void dissect_RTPS_DATA_SESSION(tvbuff_t* tvb, packet_info* pinfo, int offset, uint8_t flags,
15532 unsigned encoding, int octets_to_next_header, proto_tree* tree,
15533 uint16_t vendor_id, endpoint_guid* guid) {
15534 bool_Bool is_data_session_intermediate = false0;
15535 proto_item* ti = NULL((void*)0);
15536
15537 p_set_proto_data(pinfo->pool, pinfo, proto_rtps, RTPS_DATA_SESSION_FINAL_PROTODATA_KEY2, &is_data_session_intermediate);
15538 dissect_RTPS_DATA(tvb, pinfo, offset, flags, encoding, octets_to_next_header,
15539 tree, vendor_id, true1, guid);
15540 ti = proto_tree_add_boolean(tree, hf_rtps_data_session_intermediate, tvb, offset, 0, is_data_session_intermediate);
15541 proto_item_set_generated(ti);
15542}
15543
15544/* *********************************************************************** */
15545/* * R T P S _ D A T A _ F R A G _ [SESSION] * */
15546/* *********************************************************************** */
15547static void dissect_RTPS_DATA_FRAG_kind(tvbuff_t *tvb, packet_info *pinfo, int offset, uint8_t flags,
15548 const unsigned encoding, int octets_to_next_header, proto_tree *tree,
15549 uint16_t vendor_id, bool_Bool is_session, endpoint_guid *guid) {
15550 /*
15551 * There are two kinds of DATA_FRAG, RTPS_DATA_FRAG and RTPS_DATA_FRAG_SESSION
15552 * the only difference is that RTPS_DATA_FRAG_SESSION has an extra sequence number after
15553 * writerSeqNum.
15554 *
15555 * RTPS_DATA_FRAG:
15556 * 0...2...........7...............15.............23...............31
15557 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
15558 * |RTPS_DATA_FRAG |X|X|X|X|X|K|Q|E| octetsToNextHeader |
15559 * +---------------+---------------+---------------+---------------+
15560 * | Flags extraFlags | octetsToInlineQos |
15561 * +---------------+---------------+---------------+---------------+
15562 * | EntityId readerEntityId |
15563 * +---------------+---------------+---------------+---------------+
15564 * | EntityId writerEntityId |
15565 * +---------------+---------------+---------------+---------------+
15566 * | |
15567 * + SequenceNumber writerSeqNum +
15568 * | |
15569 * +---------------+---------------+---------------+---------------+
15570 * | FragmentNumber fragmentStartingNum |
15571 * +---------------+---------------+---------------+---------------+
15572 * | ushort fragmentsInSubmessage | ushort fragmentSize |
15573 * +---------------+---------------+---------------+---------------+
15574 * | unsigned long sampleSize |
15575 * +---------------+---------------+---------------+---------------+
15576 * | |
15577 * ~ ParameterList inlineQos [only if Q==1] ~
15578 * | |
15579 * +---------------+---------------+---------------+---------------+
15580 * | |
15581 * ~ SerializedData serializedData ~
15582 * | |
15583 * +---------------+---------------+---------------+---------------+
15584 *
15585 *
15586 * RTPS_DATA_FRAG_SESSION:
15587 * 0...2...........7...............15.............23...............31
15588 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
15589 * |RTPS.._SESSION |X|X|X|X|X|K|Q|E| octetsToNextHeader |
15590 * +---------------+---------------+---------------+---------------+
15591 * | Flags extraFlags | octetsToInlineQos |
15592 * +---------------+---------------+---------------+---------------+
15593 * | EntityId readerEntityId |
15594 * +---------------+---------------+---------------+---------------+
15595 * | EntityId writerEntityId |
15596 * +---------------+---------------+---------------+---------------+
15597 * | |
15598 * + SequenceNumber writerSeqNum +
15599 * | |
15600 * +---------------+---------------+---------------+---------------+
15601 * | |
15602 * + SequenceNumber virtualSeqNum +
15603 * | |
15604 * +---------------+---------------+---------------+---------------+
15605 * | FragmentNumber fragmentStartingNum |
15606 * +---------------+---------------+---------------+---------------+
15607 * | ushort fragmentsInSubmessage | ushort fragmentSize |
15608 * +---------------+---------------+---------------+---------------+
15609 * | unsigned long sampleSize |
15610 * +---------------+---------------+---------------+---------------+
15611 * | |
15612 * ~ ParameterList inlineQos [only if Q==1] ~
15613 * | |
15614 * +---------------+---------------+---------------+---------------+
15615 * | |
15616 * ~ SerializedData serializedData ~
15617 * | |
15618 * +---------------+---------------+---------------+---------------+
15619
15620
15621 */
15622 int min_len;
15623 int old_offset = offset;
15624 uint64_t sample_seq_number = 0;
15625 uint32_t frag_number = 0, frag_size = 0, sample_size = 0, num_frags = 0;
15626 uint32_t wid; /* Writer EntityID */
15627 bool_Bool from_builtin_writer;
15628 uint32_t status_info = 0xffffffff;
15629 proto_item *octet_item;
15630 coherent_set_entity_info coherent_set_entity_info_object = {0};
15631
15632 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, RTPS_DATA_FRAG_FLAGS, flags);
15633
15634 octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb,
15635 offset + 2, 2, encoding);
15636
15637 /* Calculates the minimum length for this submessage
15638 * RTPS_DATA_FRAG_SESSION len = RTPS_DATA_FRAG len + 8 (extra virtualSequenceNum field).
15639 */
15640 min_len = (is_session)
15641 ? 44
15642 : 36;
15643 if ((flags & FLAG_RTPS_DATA_FRAG_Q(0x02)) != 0) min_len += 4;
15644
15645 if (octets_to_next_header < min_len) {
15646 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", min_len);
15647 return;
15648 }
15649
15650 offset += 4;
15651
15652 /* extraFlags */
15653 proto_tree_add_item(tree, hf_rtps_extra_flags, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
15654 offset += 2;
15655
15656 /* octetsToInlineQos */
15657 proto_tree_add_item(tree, hf_rtps_octets_to_inline_qos, tvb, offset, 2, encoding);
15658 offset += 2;
15659
15660 /* readerEntityId */
15661 rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_rdentity_id, hf_rtps_sm_rdentity_id_key,
15662 hf_rtps_sm_rdentity_id_kind, ett_rtps_rdentity, "readerEntityId", NULL((void*)0));
15663 offset += 4;
15664
15665 /* writerEntityId */
15666 rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key,
15667 hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", &wid);
15668 offset += 4;
15669 guid->entity_id = wid;
15670 guid->fields_present |= GUID_HAS_ENTITY_ID0x00000008;
15671 rtps_util_add_topic_info(tree, pinfo, tvb, offset, guid);
15672
15673
15674 /* Sequence number */
15675 coherent_set_entity_info_object.writer_seq_number = rtps_util_add_seq_number(tree, tvb, offset,
15676 encoding, "writerSeqNumber");
15677 coherent_set_entity_info_object.guid = *guid;
15678 offset += 8;
15679
15680 /* virtual Sequence Number (Only in RTPS_DATA_FRAG_SESSION)*/
15681 if (is_session) {
15682 rtps_util_add_seq_number(tree, tvb, offset, encoding, "virtualSeqNumber");
15683 offset += 8;
15684 }
15685 /* Fragment number */
15686 proto_tree_add_item_ret_uint(tree, hf_rtps_data_frag_number, tvb, offset, 4, encoding, &frag_number);
15687 offset += 4;
15688
15689 /* Fragments in submessage */
15690 proto_tree_add_item_ret_uint(tree, hf_rtps_data_frag_num_fragments, tvb, offset, 2, encoding, &num_frags);
15691 offset += 2;
15692
15693 /* Fragment size */
15694 proto_tree_add_item_ret_uint(tree, hf_rtps_data_frag_size, tvb, offset, 2, encoding, &frag_size);
15695 if (frag_size == 0) {
15696 // A zero fragment size means we don't advance our offset in loops, so
15697 // treat that as invalid.
15698 proto_tree_add_expert_format(tree, pinfo, &ei_rtps_invalid_fragment_size, tvb, offset, 2,
15699 "Invalid fragment size: %u", frag_size);
15700 }
15701 offset += 2;
15702
15703 /* sampleSize */
15704 proto_tree_add_item_ret_uint(tree, hf_rtps_data_frag_sample_size, tvb, offset, 4, encoding, &sample_size);
15705 offset += 4;
15706
15707 /* InlineQos */
15708 if ((flags & FLAG_RTPS_DATA_FRAG_Q(0x02)) != 0) {
15709 bool_Bool is_inline_qos = true1;
15710 offset = dissect_parameter_sequence(tree, pinfo, tvb, offset, encoding,
15711 octets_to_next_header - (offset - old_offset) + 4,
15712 "inlineQos", 0x0200, &status_info, vendor_id, is_inline_qos, &coherent_set_entity_info_object);
15713 }
15714
15715 /* SerializedData */
15716 if (frag_size > 0) {
15717 char label[20];
15718 snprintf(label, 9, "fragment");
15719 if ((flags & FLAG_RTPS_DATA_FRAG_K(0x04)) != 0) {
15720 snprintf(label, 14, "serializedKey");
15721 }
15722 from_builtin_writer = (((wid & ENTITYKIND_BUILTIN_WRITER_WITH_KEY(0xc2)) == ENTITYKIND_BUILTIN_WRITER_WITH_KEY(0xc2))
15723 || ((wid & ENTITYKIND_BUILTIN_WRITER_NO_KEY(0xc3)) == ENTITYKIND_BUILTIN_WRITER_NO_KEY(0xc3))
15724 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_BOOTSTRAP_WRITER(0x00010082))
15725 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_WRITER(0x00010182)))
15726 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_WRITER(0xff010182))
15727 || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_READER(0xff010187)) ? true1 : false0;
15728
15729 uint32_t frag_index_in_submessage = 0, this_frag_number = 0, this_frag_size = 0, fragment_offset = 0;
15730 bool_Bool more_fragments = false0;
15731 if (enable_rtps_reassembly) {
15732 tvbuff_t* new_tvb = NULL((void*)0);
15733 fragment_head *frag_msg = NULL((void*)0);
15734 while(frag_index_in_submessage < num_frags) {
15735 this_frag_number = frag_number + frag_index_in_submessage;
15736 more_fragments = (this_frag_number * frag_size < sample_size);
15737 this_frag_size = more_fragments ? frag_size : (sample_size - ((this_frag_number - 1) * frag_size));
15738 fragment_offset = this_frag_number == 1 ? 0 : (((this_frag_number - 1) * frag_size));
15739 pinfo->fragmented = true1;
15740 frag_msg = fragment_add_check(&rtps_reassembly_table,
15741 tvb, offset, pinfo,
15742 (uint32_t)sample_seq_number, /* ID for fragments belonging together */
15743 (void *)guid, /* make sure only fragments from the same writer are considered for reassembly */
15744 fragment_offset, /* fragment offset */
15745 this_frag_size, /* fragment length */
15746 more_fragments); /* More fragments? */
15747
15748 new_tvb = process_reassembled_data(tvb, offset + (frag_index_in_submessage * frag_size), pinfo,
15749 "Reassembled sample", frag_msg, &rtps_frag_items,
15750 NULL((void*)0), tree);
15751
15752 if (frag_index_in_submessage == 0) {
15753 generate_status_info(pinfo, wid, status_info);
15754 if (frag_msg) { /* Reassembled */
15755 col_append_str(pinfo->cinfo, COL_INFO, " [Reassembled]");
15756 } else { /* Not last packet of reassembled Short Message */
15757 col_append_str(pinfo->cinfo, COL_INFO," [RTPS fragment]");
15758 }
15759 }
15760
15761 if (new_tvb) {
15762 snprintf(label, 19, "reassembled sample");
15763 dissect_serialized_data(tree, pinfo, new_tvb, 0,
15764 sample_size, label, vendor_id, from_builtin_writer, guid, NOT_A_FRAGMENT(-1));
15765 break;
15766 } else {
15767 snprintf(label, 15, "fragment [%d]", frag_index_in_submessage);
15768 dissect_serialized_data(tree, pinfo, tvb, offset + (frag_index_in_submessage * frag_size),
15769 this_frag_size, label, vendor_id, from_builtin_writer, NULL((void*)0), this_frag_number);
15770 }
15771 frag_index_in_submessage++;
15772 }
15773 } else {
15774 while (frag_index_in_submessage < num_frags) {
15775 this_frag_number = frag_number + frag_index_in_submessage;
15776 more_fragments = (this_frag_number * frag_size < sample_size);
15777 this_frag_size = more_fragments ? frag_size : (sample_size - ((this_frag_number - 1) * frag_size));
15778 fragment_offset = frag_index_in_submessage * frag_size;
15779 snprintf(label, 20, "fragment [%d]", frag_index_in_submessage);
15780 dissect_serialized_data(tree, pinfo, tvb, offset + fragment_offset,
15781 this_frag_size, label, vendor_id, from_builtin_writer, NULL((void*)0), this_frag_number);
15782 frag_index_in_submessage++;
15783 }
15784 generate_status_info(pinfo, wid, status_info);
15785 }
15786 }
15787 rtps_util_detect_coherent_set_end_empty_data_case(&coherent_set_entity_info_object);
15788}
15789
15790/* *********************************************************************** */
15791/* * R T P S _ D A T A _ B A T C H * */
15792/* *********************************************************************** */
15793static void dissect_RTPS_DATA_BATCH(tvbuff_t *tvb, packet_info *pinfo, int offset,
15794 uint8_t flags, const unsigned encoding, int octets_to_next_header,
15795 proto_tree *tree, uint16_t vendor_id, endpoint_guid *guid) {
15796 /*
15797 *
15798 * 0...2...........7...............15.............23...............31
15799 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
15800 * |RTPS_DATA_BATCH|X|X|X|X|X|X|Q|E| octetsToNextHeader |
15801 * +---------------+---------------+---------------+---------------+
15802 * | Flags extraFlags | octetsToInlineQos |
15803 * +---------------+---------------+---------------+---------------+
15804 * | EntityId readerId |
15805 * +---------------+---------------+---------------+---------------+
15806 * | EntityId writerId |
15807 * +---------------+---------------+---------------+---------------+
15808 * | |
15809 * + SequenceNumber batchSN +
15810 * | |
15811 * +---------------+---------------+---------------+---------------+
15812 * | |
15813 * + SequenceNumber firstSampleSN +
15814 * | |
15815 * +---------------+---------------+---------------+---------------+
15816 * | SequenceNumberOffset offsetToLastSampleSN |
15817 * +---------------+---------------+---------------+---------------+
15818 * | unsigned long batchSampleCount |
15819 * +---------------+---------------+---------------+---------------+
15820 * | |
15821 * ~ ParameterList batchInlineQos [only if Q==1] ~
15822 * | |
15823 * +---------------+---------------+---------------+---------------+
15824 * | unsigned long octetsToSLEncapsulationId |
15825 * +---------------+---------------+---------------+---------------+
15826 * | |
15827 * ~ SampleInfoList sampleInfoList ~
15828 * | |
15829 * +---------------+---------------+---------------+---------------+
15830 * | SampleListEncapsulationId | |
15831 * +---------------+---------------+---------------+---------------+
15832 * | |
15833 * ~ SampleList sampleList ~
15834 * | |
15835 * +---------------+---------------+---------------+---------------+
15836 *
15837 *
15838 * SampleInfo:
15839 * 0...............8..............16..............24..............32
15840 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
15841 * |X|X|X|X|X|X|X|X|X|X|K|I|D|O|Q|T| octetsToInlineQoS |
15842 * +---------------+---------------+---------------+---------------+
15843 * | unsigned long serializedDataLength |
15844 * +---------------+---------------+---------------+---------------+
15845 * | |
15846 * + Timestamp timestamp [only if T==1] +
15847 * | |
15848 * +---------------+---------------+---------------+---------------+
15849 * | SequenceNumberOffset offsetSN [only if O==1] |
15850 * +---------------+---------------+---------------+---------------+
15851 * | |
15852 * ~ ParameterList sampleInlineQos [only if Q==1] ~
15853 * | |
15854 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
15855 *
15856 *
15857 * Sample:
15858 * 0...............8..............16..............24..............32
15859 * +---------------+---------------+---------------+---------------+
15860 * | |
15861 * ~ SerializedData serializedData [sampleInfo D==1 || K==1] ~
15862 * | |
15863 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
15864 */
15865
15866 int min_len;
15867 int old_offset = offset;
15868 uint32_t wid; /* Writer EntityID */
15869 uint32_t status_info = 0xffffffff;
15870 int32_t octetsToSLEncapsulationId;
15871 int32_t sampleListOffset;
15872 uint16_t encapsulation_id;
15873 bool_Bool try_dissection_from_type_object = false0;
15874 uint16_t *sample_info_flags = NULL((void*)0);
15875 uint32_t *sample_info_length = NULL((void*)0);
15876 int32_t sample_info_count = 0,
15877 sample_info_max = rtps_max_batch_samples_dissected;
15878 proto_item *octet_item;
15879 rtps_dissector_data * data = NULL((void*)0);
15880 bool_Bool is_compressed = false0;
15881 bool_Bool uncompressed_ok = false0;
15882 proto_tree *compressed_subtree = NULL((void*)0);
15883 tvbuff_t *data_holder_tvb = tvb;
15884 tvbuff_t *compressed_tvb = NULL((void*)0);
15885 proto_tree *dissected_data_holder_tree = tree;
15886
15887
15888 data = wmem_new(pinfo->pool, rtps_dissector_data)((rtps_dissector_data*)wmem_alloc((pinfo->pool), sizeof(rtps_dissector_data
)))
;
15889 data->encapsulation_id = 0;
15890
15891 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, RTPS_DATA_BATCH_FLAGS, flags);
15892
15893 octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb,
15894 offset + 2, 2, encoding);
15895
15896 /* Calculates the minimum length for this submessage */
15897 min_len = 44;
15898 if ((flags & FLAG_RTPS_DATA_BATCH_Q(0x02)) != 0) min_len += 4;
15899
15900 if (octets_to_next_header < min_len) {
15901 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", min_len);
15902 return;
15903 }
15904
15905 offset += 4;
15906
15907 /* extraFlags */
15908 proto_tree_add_item(tree, hf_rtps_extra_flags, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
15909 offset += 2;
15910
15911 /* octetsToInlineQos */
15912 proto_tree_add_item(tree, hf_rtps_octets_to_inline_qos, tvb, offset, 2, encoding);
15913 offset += 2;
15914
15915
15916 /* readerEntityId */
15917 rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_rdentity_id, hf_rtps_sm_rdentity_id_key,
15918 hf_rtps_sm_rdentity_id_kind, ett_rtps_rdentity, "readerEntityId", NULL((void*)0));
15919 offset += 4;
15920
15921 /* writerEntityId */
15922 rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key,
15923 hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", &wid);
15924 offset += 4;
15925 guid->entity_id = wid;
15926 guid->fields_present |= GUID_HAS_ENTITY_ID0x00000008;
15927 rtps_util_add_topic_info(tree, pinfo, tvb, offset, guid);
15928
15929
15930 /* Batch sequence number */
15931 rtps_util_add_seq_number(tree, tvb, offset, encoding, "batchSeqNumber");
15932 offset += 8;
15933
15934 /* First sample sequence number */
15935 rtps_util_add_seq_number(tree, tvb, offset, encoding, "firstSampleSeqNumber");
15936 offset += 8;
15937
15938 /* offsetToLastSampleSN */
15939 proto_tree_add_item(tree, hf_rtps_data_batch_offset_to_last_sample_sn, tvb, offset, 4, encoding);
15940 offset += 4;
15941
15942 /* batchSampleCount */
15943 proto_tree_add_item(tree, hf_rtps_data_batch_sample_count, tvb, offset, 4, encoding);
15944 offset += 4;
15945
15946 /* Parameter list (if Q==1) */
15947 /* InlineQos */
15948 if ((flags & FLAG_RTPS_DATA_BATCH_Q(0x02)) != 0) {
15949 offset = dissect_parameter_sequence(tree, pinfo, tvb, offset, encoding,
15950 octets_to_next_header - (offset - old_offset) + 4,
15951 "batchInlineQos", 0x0200, &status_info, vendor_id, false0, NULL((void*)0));
15952 }
15953
15954 /* octetsToSLEncapsulationId */
15955 proto_tree_add_item_ret_uint(tree, hf_rtps_data_batch_octets_to_sl_encap_id, tvb,
15956 offset, 4, encoding, &octetsToSLEncapsulationId);
15957 offset += 4;
15958 sampleListOffset = offset + octetsToSLEncapsulationId;
15959
15960
15961 /* Sample info list */
15962 {
15963 proto_item *ti, *list_item;
15964 proto_tree *sil_tree;
15965 sample_info_count = 0;
15966
15967 sil_tree = proto_tree_add_subtree(tree, tvb, offset, octetsToSLEncapsulationId,
15968 ett_rtps_sample_info_list, &list_item, "Sample Info List");
15969
15970 /* Allocate sample_info_flags and sample_info_length
15971 * to store a copy of the flags for each sample info */
15972 if (rtps_max_batch_samples_dissected == 0) {
15973 sample_info_max = 1024; /* Max size of sampleInfo shown */
15974 }
15975 sample_info_flags = (uint16_t *)wmem_alloc(pinfo->pool, sizeof(uint16_t) *sample_info_max);
15976 sample_info_length = (uint32_t *)wmem_alloc(pinfo->pool, sizeof(uint32_t) *sample_info_max);
15977
15978 /* Sample Info List: start decoding the sample info list until the offset
15979 * is greater or equal than 'sampleListOffset' */
15980 while (offset < sampleListOffset) {
15981 uint16_t flags2;
15982 /*uint16_t octetsToInlineQos;*/
15983 int min_length;
15984 proto_tree *si_tree;
15985 int offset_begin_sampleinfo = offset;
15986
15987 if (rtps_max_batch_samples_dissected > 0 && (unsigned)sample_info_count >= rtps_max_batch_samples_dissected) {
15988 expert_add_info(pinfo, list_item, &ei_rtps_more_samples_available);
15989 offset = sampleListOffset;
15990 break;
15991 }
15992
15993 si_tree = proto_tree_add_subtree_format(sil_tree, tvb, offset, -1, ett_rtps_sample_info, &ti, "sampleInfo[%d]", sample_info_count);
15994
15995 flags2 = tvb_get_ntohs(tvb, offset); /* Flags are always big endian */
15996 sample_info_flags[sample_info_count] = flags2;
15997 proto_tree_add_bitmask_value(si_tree, tvb, offset, hf_rtps_sm_flags2, ett_rtps_flags, RTPS_SAMPLE_INFO_FLAGS16, flags2);
15998 offset += 2;
15999 proto_tree_add_item(si_tree, hf_rtps_data_batch_octets_to_inline_qos, tvb,
16000 offset, 2, encoding);
16001 offset += 2;
16002
16003 min_length = 4;
16004 if ((flags2 & FLAG_SAMPLE_INFO_T(0x01)) != 0) min_len += 8;
16005 if ((flags2 & FLAG_SAMPLE_INFO_Q(0x02)) != 0) min_len += 4;
16006 if ((flags2 & FLAG_SAMPLE_INFO_O(0x04)) != 0) min_len += 4;
16007
16008 /* Ensure there are enough bytes to decode */
16009 if (sampleListOffset - offset < min_length) {
16010 expert_add_info_format(pinfo, ti, &ei_rtps_parameter_value_invalid, "Error: not enough bytes to dissect sample info");
16011 return;
16012 }
16013
16014 /* Serialized data length */
16015 proto_tree_add_item_ret_uint(si_tree, hf_rtps_data_batch_serialized_data_length, tvb,
16016 offset, 4, encoding, &sample_info_length[sample_info_count]);
16017 offset += 4;
16018
16019 /* Timestamp [only if T==1] */
16020 if ((flags2 & FLAG_SAMPLE_INFO_T(0x01)) != 0) {
16021 rtps_util_add_timestamp(si_tree, tvb, offset, encoding, hf_rtps_data_batch_timestamp);
16022 offset += 8;
16023 }
16024
16025 /* Offset SN [only if O==1] */
16026 if ((flags2 & FLAG_SAMPLE_INFO_O(0x04)) != 0) {
16027 proto_tree_add_item(si_tree, hf_rtps_data_batch_offset_sn, tvb, offset, 4, encoding);
16028 offset += 4;
16029 }
16030
16031 /* Parameter list [only if Q==1] */
16032 if ((flags2 & FLAG_SAMPLE_INFO_Q(0x02)) != 0) {
16033 offset = dissect_parameter_sequence(si_tree, pinfo, tvb, offset, encoding,
16034 octets_to_next_header - (offset - old_offset) + 4,
16035 "sampleInlineQos", 0x0200, &status_info, vendor_id, false0, NULL((void*)0));
16036 }
16037 proto_item_set_len(ti, offset - offset_begin_sampleinfo);
16038 sample_info_count++;
16039 } /* while (offset < sampleListOffset) */
16040 }
16041
16042 /* Dissects the encapsulated data heder and uncompress the tvb if it is compressed and
16043 it can be uncompressed */
16044 offset = rtps_prepare_encapsulated_data(
16045 tree,
16046 pinfo,
16047 tvb,
16048 offset,
16049 tvb_reported_length(tvb) - offset,
16050 true1,
16051 &encapsulation_id,
16052 NULL((void*)0),
16053 NULL((void*)0),
16054 NULL((void*)0),
16055 NULL((void*)0),
16056 &is_compressed,
16057 &uncompressed_ok,
16058 &compressed_tvb,
16059 &compressed_subtree);
16060 data->encapsulation_id = encapsulation_id;
16061 if (is_compressed && uncompressed_ok) {
16062 data_holder_tvb = compressed_tvb;
16063 offset = 0;
16064 dissected_data_holder_tree = compressed_subtree;
16065 octets_to_next_header = tvb_reported_length(data_holder_tvb);
16066 old_offset = 0;
16067 }
16068
16069 /* If it is compressed but not uncompressed don't try to dissect */
16070 if (is_compressed == uncompressed_ok) {
16071 /* Now the list of serialized data:
16072 * Serialized data is allocated one after another one.
16073 * We need to use the data previously stored in the sampleInfo to detect the
16074 * kind and size.
16075 * - sample_info_flags -> Array of uint16_t holding the flags for this sample info
16076 * - sample_info_length -> Array of uint32_t with the size of this sample info
16077 * - sample_info_count -> size of the above arrays
16078 * This section will NEVER dissect more than 'sample_info_count'.
16079 * Note, if there are not enough bytes in the buffer, don't dissect it (this
16080 * can happen for example when a DISPOSE message is sent, there are sample
16081 * info records, but the payload size is zero for all of them)
16082 */
16083 if ((octets_to_next_header - (offset - old_offset) > 0)) {
16084 proto_item *ti;
16085 proto_tree *sil_tree;
16086 int count = 0;
16087
16088 sil_tree = proto_tree_add_subtree(
16089 dissected_data_holder_tree,
16090 data_holder_tvb,
16091 offset,
16092 -1,
16093 ett_rtps_sample_batch_list,
16094 &ti,
16095 "Serialized Sample List");
16096 for (count = 0; count < sample_info_count; ++count) {
16097 /* Ensure there are enough bytes in the buffer to dissect the next sample */
16098 if (octets_to_next_header - (offset - old_offset) + 4 < (int)sample_info_length[count]) {
16099 expert_add_info_format(pinfo, ti, &ei_rtps_parameter_value_invalid, "Error: not enough bytes to dissect sample");
16100 return;
16101 }
16102 /* We have enough bytes to dissect the next sample, so we update the rtps_dissector_data
16103 * "position in the batch" value and dissect the sample
16104 */
16105 data->position_in_batch = count;
16106 if (encapsulation_id == ENCAPSULATION_CDR_LE(0x0001) ||
16107 encapsulation_id == ENCAPSULATION_CDR_BE(0x0000) ||
16108 encapsulation_id == ENCAPSULATION_CDR2_LE(0x0007) ||
16109 encapsulation_id == ENCAPSULATION_CDR2_BE(0x0006) ||
16110 encapsulation_id == ENCAPSULATION_PL_CDR_LE(0x0003) ||
16111 encapsulation_id == ENCAPSULATION_PL_CDR_BE(0x0002)) {
16112 try_dissection_from_type_object = true1;
16113 }
16114 if ((sample_info_flags[count] & FLAG_SAMPLE_INFO_K(0x20)) != 0) {
16115 proto_tree_add_bytes_format(sil_tree, hf_rtps_serialized_key,
16116 data_holder_tvb, offset, sample_info_length[count], NULL((void*)0), "serializedKey[%d]", count);
16117 } else {
16118 if (!rtps_util_try_dissector(
16119 sil_tree, pinfo, data_holder_tvb, offset, guid, data, get_encapsulation_endianness(encapsulation_id), get_encapsulation_version(encapsulation_id), try_dissection_from_type_object)) {
16120 proto_tree_add_bytes_format(sil_tree, hf_rtps_serialized_data,
16121 data_holder_tvb, offset, sample_info_length[count], NULL((void*)0), "serializedData[%d]", count);
16122 }
16123 }
16124 offset += sample_info_length[count];
16125 }
16126 }
16127 }
16128 generate_status_info(pinfo, wid, status_info);
16129}
16130
16131/* *********************************************************************** */
16132/* * G A P * */
16133/* *********************************************************************** */
16134static void dissect_GAP(tvbuff_t *tvb, packet_info *pinfo, int offset,
16135 uint8_t flags, const unsigned encoding, int octets_to_next_header,
16136 proto_tree *tree, endpoint_guid *guid) {
16137 /* RTPS 1.0/1.1:
16138 * 0...2...........7...............15.............23...............31
16139 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
16140 * | GAP |X|X|X|X|X|X|X|E| octetsToNextHeader |
16141 * +---------------+---------------+---------------+---------------+
16142 * | ObjectId readerObjectId |
16143 * +---------------+---------------+---------------+---------------+
16144 * | ObjectId writerObjectId |
16145 * +---------------+---------------+---------------+---------------+
16146 * | |
16147 * + SequenceNumber firstSeqNumber +
16148 * | |
16149 * +---------------+---------------+---------------+---------------+
16150 * | |
16151 * + Bitmap bitmap +
16152 * | |
16153 * +---------------+---------------+---------------+---------------+
16154 *
16155 * RTPS 1.2/2.0
16156 * 0...2...........7...............15.............23...............31
16157 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
16158 * | GAP |X|X|X|X|X|X|F|E| octetsToNextHeader |
16159 * +---------------+---------------+---------------+---------------+
16160 * | EntityId readerEntityId |
16161 * +---------------+---------------+---------------+---------------+
16162 * | EntityId writerEntityId |
16163 * +---------------+---------------+---------------+---------------+
16164 * | |
16165 * + SequenceNumber gapStart +
16166 * | |
16167 * +---------------+---------------+---------------+---------------+
16168 * | |
16169 * ~ SequenceNumberSet gapList ~
16170 * | |
16171 * +---------------+---------------+---------------+---------------+
16172 */
16173 proto_item *octet_item;
16174 uint32_t wid;
16175 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, GAP_FLAGS, flags);
16176
16177 octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb,
16178 offset + 2, 2, encoding);
16179
16180 if (octets_to_next_header < 24) {
16181 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= 24)");
16182 return;
16183 }
16184
16185 offset += 4;
16186
16187 /* readerEntityId */
16188 rtps_util_add_entity_id(tree, pinfo, tvb, offset,
16189 hf_rtps_sm_rdentity_id, hf_rtps_sm_rdentity_id_key, hf_rtps_sm_rdentity_id_kind,
16190 ett_rtps_rdentity, "readerEntityId", NULL((void*)0));
16191 offset += 4;
16192
16193 /* writerEntityId */
16194 rtps_util_add_entity_id(tree, pinfo, tvb, offset,
16195 hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key, hf_rtps_sm_wrentity_id_kind,
16196 ett_rtps_wrentity, "writerEntityId", &wid);
16197 offset += 4;
16198 guid->entity_id = wid;
16199 guid->fields_present |= GUID_HAS_ENTITY_ID0x00000008;
16200 rtps_util_add_topic_info(tree, pinfo, tvb, offset, guid);
16201
16202
16203 /* First Sequence Number */
16204 rtps_util_add_seq_number(tree, tvb, offset, encoding, "gapStart");
16205 offset += 8;
16206
16207 /* Bitmap */
16208 rtps_util_add_bitmap(tree, pinfo, tvb, offset, encoding, "gapList", false0);
16209}
16210
16211
16212/* *********************************************************************** */
16213/* * I N F O _ T S * */
16214/* *********************************************************************** */
16215static void dissect_INFO_TS(tvbuff_t *tvb, packet_info *pinfo, int offset, uint8_t flags,
16216 const unsigned encoding, int octets_to_next_header, proto_tree *tree) {
16217 /* RTPS 1.0/1.1:
16218 * 0...2...........7...............15.............23...............31
16219 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
16220 * | INFO_TS |X|X|X|X|X|X|I|E| octetsToNextHeader |
16221 * +---------------+---------------+---------------+---------------+
16222 * | |
16223 * + NtpTime ntpTimestamp [only if I==0] +
16224 * | |
16225 * +---------------+---------------+---------------+---------------+
16226 *
16227 * RTPS 1.2/2.0:
16228 * 0...2...........7...............15.............23...............31
16229 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
16230 * | INFO_TS |X|X|X|X|X|X|T|E| octetsToNextHeader |
16231 * +---------------+---------------+---------------+---------------+
16232 * | |
16233 * + Timestamp timestamp [only if T==1] +
16234 * | |
16235 * +---------------+---------------+---------------+---------------+
16236 */
16237
16238 int min_len;
16239 proto_item *octet_item;
16240
16241 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, INFO_TS_FLAGS, flags);
16242
16243 octet_item = proto_tree_add_item(tree,
16244 hf_rtps_sm_octets_to_next_header,
16245 tvb,
16246 offset + 2,
16247 2,
16248 encoding);
16249
16250 min_len = 0;
16251 if ((flags & FLAG_INFO_TS_T(0x02)) == 0) min_len += 8;
16252
16253 if (octets_to_next_header != min_len) {
16254 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be == %u)", min_len);
16255 return;
16256 }
16257
16258 offset += 4;
16259
16260 if ((flags & FLAG_INFO_TS_T(0x02)) == 0) {
16261 rtps_util_add_timestamp(tree,
16262 tvb,
16263 offset,
16264 encoding,
16265 hf_rtps_info_ts_timestamp);
16266 }
16267}
16268
16269
16270/* *********************************************************************** */
16271/* * I N F O _ S R C * */
16272/* *********************************************************************** */
16273static void dissect_INFO_SRC(tvbuff_t *tvb, packet_info *pinfo, int offset, uint8_t flags,
16274 const unsigned encoding, int octets_to_next_header, proto_tree *tree, uint16_t rtps_version) {
16275 /* RTPS 1.0/1.1:
16276 * 0...2...........7...............15.............23...............31
16277 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
16278 * | INFO_SRC |X|X|X|X|X|X|X|E| octetsToNextHeader |
16279 * +---------------+---------------+---------------+---------------+
16280 * | IPAddress appIpAddress |
16281 * +---------------+---------------+---------------+---------------+
16282 * | ProtocolVersion version | VendorId vendor |
16283 * +---------------+---------------+---------------+---------------+
16284 * | HostId hostId |
16285 * +---------------+---------------+---------------+---------------+
16286 * | AppId appId |
16287 * +---------------+---------------+---------------+---------------+
16288 *
16289 * RTPS 1.2/2.0:
16290 * 0...2...........7...............15.............23...............31
16291 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
16292 * | INFO_SRC |X|X|X|X|X|X|X|E| octetsToNextHeader |
16293 * +---------------+---------------+---------------+---------------+
16294 * | long unused |
16295 * +---------------+---------------+---------------+---------------+
16296 * | ProtocolVersion version | VendorId vendor |
16297 * +---------------+---------------+---------------+---------------+
16298 * | |
16299 * + GuidPrefix guidPrefix +
16300 * | |
16301 * +---------------+---------------+---------------+---------------+
16302 */
16303 proto_item *octet_item;
16304 uint16_t version;
16305
16306 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, INFO_SRC_FLAGS, flags);
16307
16308 octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb,
16309 offset + 2, 2, encoding);
16310
16311 if (rtps_version < 0x0200) {
16312 if (octets_to_next_header != 16) {
16313 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be == 16)");
16314 return;
16315 }
16316 } else {
16317 if (octets_to_next_header != 20) {
16318 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be == 20)");
16319 return;
16320 }
16321 }
16322
16323 offset += 4;
16324
16325 /* Use version field to determine what to display */
16326 version = tvb_get_ntohs(tvb, offset+4);
16327 if (version < 0x102) {
16328 proto_tree_add_item(tree, hf_rtps_info_src_ip, tvb, offset, 4, encoding);
16329 } else {
16330 proto_tree_add_item(tree, hf_rtps_info_src_unused, tvb, offset, 4, encoding);
16331 }
16332
16333 offset += 4;
16334
16335 rtps_util_add_protocol_version(tree, tvb, offset);
16336 offset += 2;
16337
16338 /* Vendor ID */
16339 rtps_util_add_vendor_id(tree, tvb, offset);
16340 offset += 2;
16341
16342 if (rtps_version < 0x0200) {
16343 rtps_util_add_guid_prefix_v1(tree, pinfo, tvb, offset,
16344 hf_rtps_sm_guid_prefix_v1, hf_rtps_sm_host_id, hf_rtps_sm_app_id,
16345 hf_rtps_sm_instance_id_v1, hf_rtps_sm_app_kind,
16346 NULL((void*)0)); /* Use default 'guidPrefix' */
16347 } else {
16348 rtps_util_add_guid_prefix_v2(tree, tvb, offset, hf_rtps_guid_prefix_src,
16349 hf_rtps_host_id, hf_rtps_app_id, hf_rtps_sm_instance_id, hf_rtps_guid_prefix);
16350 }
16351}
16352
16353
16354/* *********************************************************************** */
16355/* * I N F O _ R E P L Y _ I P 4 * */
16356/* *********************************************************************** */
16357static void dissect_INFO_REPLY_IP4(tvbuff_t *tvb, packet_info *pinfo, int offset, uint8_t flags,
16358 const unsigned encoding, int octets_to_next_header, proto_tree *tree) {
16359 /* RTPS 1.0/1.1:
16360 * 0...2...........7...............15.............23...............31
16361 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
16362 * | INFO_REPLY |X|X|X|X|X|X|M|E| octetsToNextHeader |
16363 * +---------------+---------------+---------------+---------------+
16364 * | IPAddress unicastReplyIpAddress |
16365 * +---------------+---------------+---------------+---------------+
16366 * | Port unicastReplyPort |
16367 * +---------------+---------------+---------------+---------------+
16368 * | IPAddress multicastReplyIpAddress [ only if M==1 ] |
16369 * +---------------+---------------+---------------+---------------+
16370 * | Port multicastReplyPort [ only if M==1 ] |
16371 * +---------------+---------------+---------------+---------------+
16372 *
16373 * RTPS 1.2/2.0:
16374 * 0...2...........7...............15.............23...............31
16375 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
16376 * |INFO_REPLY_IP4 |X|X|X|X|X|X|M|E| octetsToNextHeader |
16377 * +---------------+---------------+---------------+---------------+
16378 * | |
16379 * + LocatorUDPv4 unicastReplyLocator +
16380 * | |
16381 * +---------------+---------------+---------------+---------------+
16382 * | |
16383 * + LocatorUDPv4 multicastReplyLocator [only if M==1] +
16384 * | |
16385 * +---------------+---------------+---------------+---------------+
16386 */
16387 int min_len;
16388 proto_item *octet_item;
16389
16390 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, INFO_REPLY_IP4_FLAGS, flags);
16391
16392 octet_item = proto_tree_add_item(tree,
16393 hf_rtps_sm_octets_to_next_header,
16394 tvb,
16395 offset + 2,
16396 2,
16397 encoding);
16398
16399 min_len = 8;
16400 if ((flags & FLAG_INFO_REPLY_IP4_M(0x02)) != 0) min_len += 8;
16401
16402 if (octets_to_next_header != min_len) {
16403 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be == %u)", min_len);
16404 return;
16405 }
16406
16407 offset += 4;
16408
16409
16410 /* unicastReplyLocator */
16411 rtps_util_add_locator_udp_v4(tree, pinfo, tvb, offset,
16412 "unicastReplyLocator", encoding);
16413
16414 offset += 8;
16415
16416 /* multicastReplyLocator */
16417 if ((flags & FLAG_INFO_REPLY_IP4_M(0x02)) != 0) {
16418 rtps_util_add_locator_udp_v4(tree, pinfo, tvb, offset,
16419 "multicastReplyLocator", encoding);
16420 /*offset += 8;*/
16421 }
16422}
16423
16424/* *********************************************************************** */
16425/* * I N F O _ D S T * */
16426/* *********************************************************************** */
16427static void dissect_INFO_DST(tvbuff_t *tvb, packet_info *pinfo, int offset, uint8_t flags,
16428 const unsigned encoding, int octets_to_next_header, proto_tree *tree,
16429 uint16_t version, endpoint_guid *dst_guid) {
16430 /* RTPS 1.0/1.1:
16431 * 0...2...........7...............15.............23...............31
16432 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
16433 * | INFO_DST |X|X|X|X|X|X|X|E| octetsToNextHeader |
16434 * +---------------+---------------+---------------+---------------+
16435 * | HostId hostId |
16436 * +---------------+---------------+---------------+---------------+
16437 * | AppId appId |
16438 * +---------------+---------------+---------------+---------------+
16439 *
16440 * RTPS 1.2/2.0:
16441 * 0...2...........7...............15.............23...............31
16442 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
16443 * | INFO_DST |X|X|X|X|X|X|X|E| octetsToNextHeader |
16444 * +---------------+---------------+---------------+---------------+
16445 * | |
16446 * + GuidPrefix guidPrefix +
16447 * | |
16448 * +---------------+---------------+---------------+---------------+
16449 */
16450 proto_item *octet_item;
16451
16452 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, INFO_DST_FLAGS, flags);
16453
16454 octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb,
16455 offset + 2, 2, encoding);
16456
16457 if (version < 0x0200) {
16458 if (octets_to_next_header != 8) {
16459 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be == 8)");
16460 return;
16461 }
16462 } else {
16463 if (octets_to_next_header != 12) {
16464 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be == 12)");
16465 return;
16466 }
16467 }
16468
16469 offset += 4;
16470
16471 if (version < 0x0200) {
16472 rtps_util_add_guid_prefix_v1(tree, pinfo, tvb, offset,
16473 hf_rtps_sm_guid_prefix_v1, hf_rtps_sm_host_id, hf_rtps_sm_app_id,
16474 hf_rtps_sm_instance_id_v1, hf_rtps_sm_app_kind,
16475 NULL((void*)0));
16476 } else {
16477 rtps_util_add_guid_prefix_v2(tree, tvb, offset, hf_rtps_guid_prefix_dst,
16478 hf_rtps_host_id, hf_rtps_app_id, hf_rtps_sm_instance_id, hf_rtps_guid_prefix);
16479
16480 dst_guid->host_id = tvb_get_ntohl(tvb, offset);
16481 dst_guid->app_id = tvb_get_ntohl(tvb, offset + 4);
16482 dst_guid->instance_id = tvb_get_ntohl(tvb, offset + 8);
16483 dst_guid->fields_present |= GUID_HAS_HOST_ID0x00000001|GUID_HAS_APP_ID0x00000002|GUID_HAS_INSTANCE_ID0x00000004;
16484 }
16485}
16486
16487/* *********************************************************************** */
16488/* * I N F O _ R E P L Y * */
16489/* *********************************************************************** */
16490static void dissect_INFO_REPLY(tvbuff_t *tvb, packet_info *pinfo, int offset, uint8_t flags,
16491 const unsigned encoding, int octets_to_next_header, proto_tree *tree) {
16492 /* RTPS 1.0/1.1:
16493 * INFO_REPLY is *NOT* the same thing as the old INFO_REPLY.
16494 *
16495 * RTPS 1.2/2.0:
16496 * 0...2...........7...............15.............23...............31
16497 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
16498 * | INFO_REPLY |X|X|X|X|X|X|M|E| octetsToNextHeader |
16499 * +---------------+---------------+---------------+---------------+
16500 * | |
16501 * ~ LocatorList unicastReplyLocatorList ~
16502 * | |
16503 * +---------------+---------------+---------------+---------------+
16504 * | |
16505 * ~ LocatorList multicastReplyLocatorList [only if M==1] ~
16506 * | |
16507 * +---------------+---------------+---------------+---------------+
16508 */
16509
16510 int min_len;
16511 proto_item *octet_item;
16512
16513 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, INFO_REPLY_FLAGS, flags);
16514
16515 octet_item = proto_tree_add_item(tree,
16516 hf_rtps_sm_octets_to_next_header,
16517 tvb,
16518 offset + 2,
16519 2,
16520 encoding);
16521
16522 min_len = 4;
16523 if ((flags & FLAG_INFO_REPLY_M(0x02)) != 0) min_len += 4;
16524
16525 if (octets_to_next_header < min_len) {
16526 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", min_len);
16527 return;
16528 }
16529
16530 offset += 4;
16531
16532 /* unicastReplyLocatorList */
16533 offset = rtps_util_add_locator_list(tree, pinfo, tvb, offset, "unicastReplyLocatorList", encoding);
16534
16535 /* multicastReplyLocatorList */
16536 if ((flags & FLAG_INFO_REPLY_M(0x02)) != 0) {
16537 /*offset = */rtps_util_add_locator_list(tree, pinfo, tvb, offset, "multicastReplyLocatorList", encoding);
16538 }
16539}
16540
16541/* *********************************************************************** */
16542/* * RTI CRC * */
16543/* *********************************************************************** */
16544static void dissect_RTI_CRC(tvbuff_t *tvb, packet_info *pinfo, int offset, uint8_t flags,
16545 const unsigned encoding, int octets_to_next_header,proto_tree *tree) {
16546 /*
16547 * 0...2...........7...............15.............23...............31
16548 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
16549 * | RTI_CRC |X|X|X|X|X|X|X|E| octetsToNextHeader |
16550 * +---------------+---------------+---------------+---------------+
16551 * | RTPS Message length (without the 20 bytes header) |
16552 * +---------------+---------------+---------------+---------------+
16553 * | CRC32 |
16554 * +---------------+---------------+---------------+---------------+
16555 Total 12 bytes */
16556 proto_item *octet_item;
16557
16558 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, RTI_CRC_FLAGS, flags);
16559
16560 octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb,
16561 offset + 2, 2, encoding);
16562
16563 if (octets_to_next_header != 8) {
16564 expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be == 8)");
16565 return;
16566 }
16567
16568 offset += 4;
16569 proto_tree_add_item(tree, hf_rtps_sm_rti_crc_number, tvb, offset, 4, encoding);
16570
16571 offset += 4;
16572 proto_tree_add_item(tree, hf_rtps_sm_rti_crc_result, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000);
16573}
16574
16575/**
16576 * @brief Do a forward search for the begining of the tags section in the
16577 * SRTPS POSTFIX/SEC POSTFIX submessage.
16578 */
16579static int rtps_util_look_for_secure_tag(
16580 tvbuff_t *tvb,
16581 int offset)
16582{
16583 int submessage_offset = offset;
16584 uint8_t submessage_id = 0;
16585 int tvb_remaining_len = tvb_reported_length_remaining(tvb, offset);
16586 int submessage_len = 0;
16587
16588 while (tvb_remaining_len > 4) {
16589 submessage_id = tvb_get_uint8(tvb, submessage_offset);
16590 submessage_len = tvb_get_uint16(
16591 tvb,
16592 submessage_offset + 2,
16593 ENC_LITTLE_ENDIAN0x80000000);
16594 tvb_remaining_len -= submessage_len;
16595 if (submessage_id == SUBMESSAGE_SRTPS_POSTFIX(0x34)
16596 || submessage_id == SUBMESSAGE_SEC_POSTFIX(0x32)) {
16597 return submessage_offset + 4;
16598 }
16599 submessage_offset += submessage_len;
16600 tvb_remaining_len -= submessage_len;
16601 }
16602 return -1;
16603}
16604
16605// NOLINTNEXTLINE(misc-no-recursion)
16606static void dissect_SECURE(
16607 tvbuff_t *tvb,
16608 packet_info *pinfo,
16609 int offset,
16610 uint8_t flags,
16611 const unsigned encoding _U___attribute__((unused)),
16612 int octets_to_next_header,
16613 proto_tree *tree,
16614 uint16_t vendor_id _U___attribute__((unused)),
16615 endpoint_guid *guid,
16616 bool_Bool dissecting_encrypted_submessage)
16617{
16618 /* *********************************************************************** */
16619 /* * SECURE SUBMESSAGE * */
16620 /* *********************************************************************** */
16621 /* 0...2...........7...............15.............23...............31
16622 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
16623 * | SECURE SUBMSG |X|X|X|X|X|X|S|E| octetsToNextHeader |
16624 * +---------------+---------------+---------------+---------------+
16625 * | long transformationKind |
16626 * +---------------+---------------+---------------+---------------+
16627 * | |
16628 * + octet transformationId[8] +
16629 * | |
16630 * +---------------+---------------+---------------+---------------+
16631 * | |
16632 * + octet secure_data[] +
16633 * | |
16634 * +---------------+---------------+---------------+---------------+
16635 */
16636 proto_tree * payload_tree;
16637 unsigned local_encoding;
16638 int secure_body_len = 0;
16639 rtps_current_packet_decryption_info_t *decryption_info;
16640 int initial_offset = offset;
16641
16642 proto_tree_add_bitmask_value(
16643 tree,
16644 tvb,
16645 offset + 1,
16646 hf_rtps_sm_flags,
16647 ett_rtps_flags,
16648 SECURE_FLAGS,
16649 flags);
16650 local_encoding = ((flags & FLAG_E(0x01)) != 0) ? ENC_LITTLE_ENDIAN0x80000000 : ENC_BIG_ENDIAN0x00000000;
16651
16652 proto_tree_add_item(
16653 tree,
16654 hf_rtps_sm_octets_to_next_header,
16655 tvb,
16656 offset + 2,
16657 2,
16658 local_encoding);
16659 offset += 4;
16660
16661 payload_tree = proto_tree_add_subtree_format(
16662 tree,
16663 tvb,
16664 offset,
16665 octets_to_next_header,
16666 ett_rtps_secure_payload_tree,
16667 NULL((void*)0),
16668 "Secured payload");
16669
16670 proto_tree_add_item(
16671 payload_tree,
16672 hf_rtps_secure_secure_data_length,
16673 tvb,
16674 offset,
16675 4,
16676 ENC_BIG_ENDIAN0x00000000);
16677 offset += 4;
16678
16679 secure_body_len = octets_to_next_header - 4;
16680 proto_tree_add_item(
16681 payload_tree,
16682 hf_rtps_secure_secure_data,
16683 tvb,
16684 offset,
16685 octets_to_next_header - 4,
16686 local_encoding);
16687
16688 decryption_info = (rtps_current_packet_decryption_info_t *)
16689 p_get_proto_data(
16690 pinfo->pool,
16691 pinfo,
16692 proto_rtps,
16693 RTPS_DECRYPTION_INFO_KEY5);
16694
16695 if (!enable_rtps_psk_decryption
16696 || decryption_info == NULL((void*)0)
16697 || !decryption_info->try_psk_decryption) {
16698 return;
16699 }
16700
16701 if (dissecting_encrypted_submessage) {
16702 /*
16703 * This should never happen.
16704 * If an RTPS message is encrypted with a pre-shared key, then the dissector
16705 * will use this function to decrypt the SEC_BODY submessage and attempt to
16706 * dissect it by calling dissect_rtps_submessages. The
16707 * dissecting_encrypted_submessage parameter makes sure that the recursion
16708 * is not infinite. However, this is not really possible because pre-shared
16709 * key encryption takes only place at the RTPS message level; there
16710 * shouldn't be another pre-shared key encoded SEC_BODY submessage at this
16711 * point. Clang complains about the recursion because it doesn't have the
16712 * information about the RTPS protocol. We ignore the warning with the
16713 * NOLINTNEXTLINE suppression (misc-no-recursion argument) above each
16714 * affected function.
16715 */
16716 return;
16717 }
16718
16719 for (unsigned entry_idx = 0; entry_idx < rtps_psk_options.size; entry_idx++) {
16720 uint8_t *decrypted_data = NULL((void*)0);
16721 uint8_t session_key[RTPS_HMAC_256_BUFFER_SIZE_BYTES32];
16722 size_t session_key_len = RTPS_HMAC_256_BUFFER_SIZE_BYTES32;
16723 uint8_t *tag = NULL((void*)0);
16724 int tag_offset = 0;
16725 gcry_error_t error = GPG_ERR_NO_ERROR;
16726 /* Iterate all entries in the PSK table of the RTPS protocol options */
16727 rtps_psk_options_entry_t *entry = &rtps_psk_options.entries[entry_idx];
16728 /* Check if each field is equal or the ignore options are enabled */
16729 bool_Bool host_id_mismatch = !entry->host_id.ignore
16730 && entry->host_id.value != decryption_info->guid_prefix.host_id;
16731 bool_Bool host_app_mismatch = !entry->app_id.ignore
16732 && entry->app_id.value != decryption_info->guid_prefix.app_id;
16733 bool_Bool host_instance_mismatch = !entry->instance_id.ignore
16734 && entry->instance_id.value != decryption_info->guid_prefix.instance_id;
16735 bool_Bool psk_index_mismatch = !entry->passphrase_id.ignore
16736 && entry->passphrase_id.value != decryption_info->psk_index;
16737
16738 /*
16739 * We proceed to decryption only if host, app and instance ids are equals
16740 * (or ignored).
16741 */
16742 if (host_id_mismatch
16743 || host_app_mismatch
16744 || host_instance_mismatch
16745 || psk_index_mismatch) {
16746 continue;
16747 }
16748
16749 /*
16750 * When decrypting with PSKs there is only one tag in the SRTPS POSTFIX/SEC
16751 * POSTFIX submessage. The offset is the one until the next submessage.
16752 * The 4 constant is the sum of submessage_id(1 byte)
16753 * + flags (1 byte) + octects to the next submessage(2 bytes)
16754 */
16755 tag_offset = rtps_util_look_for_secure_tag(
16756 tvb,
16757 initial_offset + octets_to_next_header + 4);
16758 if (tag_offset > 0) {
16759 tag = tvb_memdup(
16760 pinfo->pool,
16761 tvb,
16762 tag_offset,
16763 SECURE_TAG_COMMON_AND_SPECIFIC_MAC_LENGTH16);
16764 }
16765
16766 /* Decrypt the payload */
16767 decrypted_data = rtps_decrypt_secure_payload(
16768 session_key, /* output*/
16769 &session_key_len, /* output */
16770 tvb,
16771 pinfo,
16772 offset,
16773 (size_t) secure_body_len,
16774 entry->passphrase_secret,
16775 decryption_info,
16776 tag,
16777 &error,
16778 pinfo->pool);
16779 error = gpg_err_code(error);
16780 if (error == GPG_ERR_NO_ERROR) {
16781 tvbuff_t *decrypted_tvb = NULL((void*)0);
16782 /*
16783 * Each byte becomes two hexadecimal characters.
16784 * We also add one for the NUL terminator, which we will add manually
16785 * because bytes_to_hexstr does not add it.
16786 */
16787 char session_key_hexadecimal_representation[
16788 RTPS_HMAC_256_BUFFER_SIZE_BYTES32 * 2 + 1];
16789 char *session_key_nul_terminator_ptr = NULL((void*)0);
16790 rtps_guid_prefix_t guid_backup = decryption_info->guid_prefix;
16791
16792 /* Add the decrypted payload as a generated tvb */
16793 decrypted_tvb = tvb_new_real_data(
16794 decrypted_data,
16795 (unsigned) secure_body_len,
16796 secure_body_len);
16797 tvb_set_child_real_data_tvbuff(tvb, decrypted_tvb);
16798 session_key_nul_terminator_ptr = bytes_to_hexstr(
16799 session_key_hexadecimal_representation,
16800 session_key,
16801 session_key_len);
16802 *session_key_nul_terminator_ptr = '\0';
16803
16804 proto_tree* decrypted_subtree = NULL((void*)0);
16805 decrypted_subtree = proto_tree_add_subtree_format(
16806 payload_tree,
16807 decrypted_tvb,
16808 offset,
16809 secure_body_len,
16810 ett_rtps_decrypted_payload,
16811 NULL((void*)0),
16812 "Decrypted Payload (Passphrase Secret: \"%s\", "
16813 "Passphrase ID: %d Session Key: %s)",
16814 entry->passphrase_secret,
16815 entry->passphrase_id.value,
16816 session_key_hexadecimal_representation);
16817 add_new_data_source(pinfo, decrypted_tvb, "Decrypted Data");
16818 proto_item_set_generated(decrypted_subtree);
16819
16820 /*
16821 * Reset the content of the decryption info except the guid.
16822 * We are already decrypting the secure body submessage encrypted with a
16823 * pre-shared key. The contents may contain more submessages, but none of
16824 * them can be encrypted. Pre-shared key protection works at the RTPS
16825 * protection level.
16826 */
16827 rtps_current_packet_decryption_info_reset(decryption_info);
16828 decryption_info->guid_prefix = guid_backup;
16829
16830 dissect_rtps_submessages(
16831 decrypted_tvb,
16832 0,
16833 pinfo,
16834 decrypted_subtree,
16835 0x0200,
16836 vendor_id,
16837 guid,
16838 true1 /* dissecting_encrypted_submessage. */);
16839 break;
16840 } else if (error == GPG_ERR_CHECKSUM) {
16841 /* Wrong PSK */
16842 proto_tree_add_expert_format(
16843 payload_tree,
16844 pinfo,
16845 &ei_rtps_invalid_psk,
16846 tvb,
16847 offset,
16848 octets_to_next_header,
16849 "Bad %s tag check. " \
16850 "Possibly wrong passphrase secret (\"%s\") or malformed packet",
16851 val_to_str(pinfo->pool,
16852 decryption_info->algorithm,
16853 secure_transformation_kind,
16854 "Unknown algorithm"),
16855 entry->passphrase_secret);
16856 break;
16857 } else {
16858 /* General error. Displaying GCRY error output */
16859 proto_tree_add_expert_format(
16860 payload_tree,
16861 pinfo,
16862 &ei_rtps_invalid_psk,
16863 tvb,
16864 offset,
16865 octets_to_next_header,
16866 "Unable to decrypt content with passphrase secret (\"%s\"). %s: %s",
16867 entry->passphrase_secret,
16868 gcry_strsource(error),
16869 gcry_strerror(error));
16870 break;
16871 }
16872 }
16873}
16874
16875static void dissect_SECURE_PREFIX(tvbuff_t *tvb, packet_info *pinfo _U___attribute__((unused)), int offset,
16876 uint8_t flags, const unsigned encoding, int octets_to_next_header,
16877 proto_tree *tree, uint16_t vendor_id _U___attribute__((unused))) {
16878 /*
16879 * MIG_RTPS_SECURE_RTPS_PREFIX and MIG_RTPS_SECURE_PREFIX share same serialization:
16880 * 0...2...........8...............16.............24...............32
16881 * +---------------+---------------+---------------+---------------+
16882 * | 0x33 / 0x31 |X|X|X|X|X|X|X|E| octetsToNextHeader |
16883 * +---------------+---------------+---------------+---------------+
16884 * | |
16885 * + SecureDataHeader sec_data_header +
16886 * | |
16887 * +---------------+---------------+---------------+---------------+
16888 *
16889 * where SecureDataHeader is:
16890 *
16891 * SecureDataHeader: TransformationIdentifier (kind + key) + plugin_sec_header
16892 * 0...2...........8...............16.............24...............32
16893 * +---------------+---------------+---------------+---------------+
16894 * | Revision_id |tran...on_kind |
16895 * +---------------+---------------+---------------+---------------+
16896 * | |
16897 * + octet transformation_key_id[4] +
16898 * | |
16899 * +---------------+---------------+---------------+---------------+
16900 * | sesion_id |
16901 * +---------------+---------------+---------------+---------------+
16902 * | init_vector_suffix[8] |
16903 * +---------------+---------------+---------------+---------------+
16904 */
16905 proto_tree * sec_data_header_tree;
16906 int flags_offset = offset + 1;
16907 int session_id_offset = 0;
16908 int transformation_key_offset = 0;
16909 int algorithm_offset = 0;
16910 int init_vector_offset = 0;
16911 int psk_index_offset_three_bytes = 0;
16912 int psk_index_offset_fourth_byte = 0;
16913 uint32_t psk_index = 0;
16914 proto_item *passphrase_id_item = NULL((void*)0);
16915 unsigned flags_byte = 0;
16916 bool_Bool is_psk_protected = false0;
16917 bool_Bool is_aad_enabled = false0;
16918 proto_item *transformation_kind_item = NULL((void*)0);
16919
16920 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags,
16921 ett_rtps_flags, SECURE_PREFIX_FLAGS, flags);
16922
16923 flags_byte = tvb_get_uint8(tvb, flags_offset);
16924 is_psk_protected = (flags_byte & 0x04) != 0;
16925 is_aad_enabled = (flags_byte & 0x02) != 0;
16926 proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb, offset + 2,
16927 2, encoding);
16928 offset += 4;
16929
16930 sec_data_header_tree = proto_tree_add_subtree_format(tree, tvb, offset, octets_to_next_header,
16931 ett_rtps_secure_dataheader_tree, NULL((void*)0), "Secure Data Header");
16932
16933 /* Transformation Kind field used to be 4 bytes. Now it is splitted:
16934 * - 3 bytes: Transformation Key Revision
16935 * - 1 byte: Transformation Kind
16936 * A single byte is enough for Transformation Kind since it only has five possible values (0-4).
16937 */
16938 psk_index_offset_three_bytes = offset;
16939 proto_tree_add_item(sec_data_header_tree, hf_rtps_secure_dataheader_transformation_key_revision_id, tvb,
16940 offset, 3, ENC_BIG_ENDIAN0x00000000);
16941 offset += 3;
16942
16943 algorithm_offset = offset;
16944 proto_tree_add_item(sec_data_header_tree, hf_rtps_secure_dataheader_transformation_kind, tvb,
16945 offset, 1, ENC_BIG_ENDIAN0x00000000);
16946
16947 offset += 1;
16948 transformation_key_offset = offset;
16949 proto_tree_add_item(sec_data_header_tree, hf_rtps_secure_dataheader_transformation_key_id, tvb,
16950 offset, 4, ENC_NA0x00000000);
16951
16952 offset += 3;
16953 if (is_psk_protected) {
16954 proto_tree *transformation_kind_tree;
16955 /* PSK index is the last byte of the transformation kind */
16956 psk_index_offset_fourth_byte = offset;
16957 transformation_kind_tree = proto_item_add_subtree(
16958 transformation_kind_item,
16959 ett_rtps_secure_transformation_kind);
16960 proto_tree_add_item(
16961 transformation_kind_tree,
16962 hf_rtps_secure_dataheader_passphrase_key_id,
16963 tvb,
16964 psk_index_offset_fourth_byte,
16965 1,
16966 ENC_NA0x00000000);
16967 }
16968 offset += 1;
16969 session_id_offset = offset;
16970 proto_tree_add_item(sec_data_header_tree, hf_rtps_secure_dataheader_session_id, tvb,
16971 offset, 4, ENC_BIG_ENDIAN0x00000000);
16972 offset += 4;
16973
16974 init_vector_offset = session_id_offset;
16975 proto_tree_add_item(sec_data_header_tree, hf_rtps_secure_dataheader_init_vector_suffix, tvb,
16976 offset, octets_to_next_header-12, ENC_NA0x00000000);
16977
16978 if (is_psk_protected) {
16979 uint8_t *psk_index_bytes = (uint8_t*) &psk_index;
16980 tvb_memcpy(tvb, &psk_index_bytes[1], psk_index_offset_three_bytes, 3);
16981 tvb_memcpy(tvb, psk_index_bytes, psk_index_offset_fourth_byte, 1);
16982 passphrase_id_item = proto_tree_add_uint(
16983 sec_data_header_tree,
16984 hf_rtps_secure_dataheader_passphrase_id,
16985 tvb,
16986 0,
16987 0,
16988 psk_index);
16989 proto_item_set_generated(passphrase_id_item);
16990 }
16991
16992 /*
16993 * If PSK decryption is enabled, then store the session id, init vector and
16994 * transformation key for using them later during the session key generation.
16995 */
16996 if (is_psk_protected && enable_rtps_psk_decryption) {
16997 rtps_current_packet_decryption_info_t *decryption_info =
16998 (rtps_current_packet_decryption_info_t *) p_get_proto_data(
16999 pinfo->pool,
17000 pinfo,
17001 proto_rtps,
17002 RTPS_DECRYPTION_INFO_KEY5);
17003 if (decryption_info == NULL((void*)0)) {
17004 return;
17005 }
17006
17007 decryption_info->try_psk_decryption = true1;
17008 decryption_info->is_aad_enabled = is_aad_enabled;
17009 decryption_info->algorithm = tvb_get_uint8(tvb, algorithm_offset);
17010
17011 /* Copy the bytes as they are. Without considering the endianness */
17012 tvb_memcpy(
17013 tvb,
17014 &decryption_info->session_id,
17015 session_id_offset,
17016 sizeof(uint32_t));
17017 tvb_memcpy(
17018 tvb,
17019 &decryption_info->init_vector,
17020 init_vector_offset,
17021 RTPS_SECURITY_INIT_VECTOR_LEN12);
17022 tvb_memcpy(
17023 tvb,
17024 &decryption_info->transformation_key,
17025 transformation_key_offset,
17026 sizeof(uint32_t));
17027
17028 /*
17029 * PSK index is the composition of the three bytes of the transformation key
17030 * revision Id and the byte of the transformation id.
17031 */
17032 decryption_info->psk_index = psk_index;
17033 }
17034}
17035
17036static void dissect_SECURE_POSTFIX(
17037 tvbuff_t *tvb,
17038 packet_info *pinfo _U___attribute__((unused)),
17039 int offset,
17040 uint8_t flags,
17041 const unsigned encoding,
17042 int octets_to_next_header,
17043 proto_tree *tree,
17044 uint16_t vendor_id _U___attribute__((unused)))
17045{
17046 /*
17047 * MIG_RTPS_SECURE_RTPS_POSTFIX and MIG_RTPS_SECURE_POSTFIX share the same
17048 * serialization:
17049 * 0...2...........8...............16.............24...............32
17050 * +---------------+---------------+---------------+---------------+
17051 * | 0x34 / 0x32 |X|X|X|X|X|X|X|E| octetsToNextHeader |
17052 * +---------------+---------------+---------------+---------------+
17053 * | |
17054 * + SecureDataTag sec_data_tag +
17055 * | |
17056 * +---------------+---------------+---------------+---------------+
17057 *
17058 * where SecureDataTag is:
17059 * 0...2...........8...............16.............24...............32
17060 * +---------------+---------------+---------------+---------------+
17061 * | |
17062 * ~ octet plugin_sec_tag[] ~
17063 * | |
17064 * +---------------+---------------+---------------+---------------+
17065 *
17066 * and plugin_sec_tag is:
17067 * 0...2...........8...............16.............24...............32
17068 * +---------------+---------------+---------------+---------------+
17069 * ~ octet[16] plugin_sec_tag.common_mac ~
17070 * +---------------+---------------+---------------+---------------+
17071 * + plugin_sec_tag.receiver_specific_macs: |
17072 * | long plugin_sec_tag.receiver_specific_macs.length = N |
17073 * +---------------+---------------+---------------+---------------+
17074 * | octet[4] receiver_specific_macs[0].receiver_mac_key_id |
17075 * | octet[16] receiver_specific_macs[0].receiver_mac |
17076 * +---------------+---------------+---------------+---------------+
17077 * | . . . |
17078 * +---------------+---------------+---------------+---------------+
17079 * | octet[4] receiver_specific_macs[N-1].receiver_mac_key_id |
17080 * | octet[16] receiver_specific_macs[N-1].receiver_mac |
17081 * +---------------+---------------+---------------+---------------+
17082 */
17083 int specific_macs_num = 0;
17084
17085 ++offset;
17086 proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags,
17087 ett_rtps_flags, SECURE_POSTFIX_FLAGS, flags);
17088
17089 ++offset;
17090 proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb, offset,
17091 2, encoding);
17092 offset += 2;
17093 proto_tree_add_item(
17094 tree,
17095 hf_rtps_secure_datatag_plugin_sec_tag_common_mac,
17096 tvb,
17097 offset,
17098 SECURE_TAG_COMMON_AND_SPECIFIC_MAC_LENGTH16,
17099 encoding);
17100 offset += SECURE_TAG_COMMON_AND_SPECIFIC_MAC_LENGTH16;
17101
17102 if (octets_to_next_header <= SECURE_TAG_COMMON_AND_SPECIFIC_MAC_LENGTH16) {
17103 /* There are no receiver-specific MACs. */
17104 return;
17105 }
17106
17107 /*
17108 * The receiver-specific mac length is encoded in big endian (regardless of
17109 * the submessage flags), as per the Security specification.
17110 */
17111 proto_tree_add_item(
17112 tree,
17113 hf_rtps_secure_datatag_plugin_specific_macs_len,
17114 tvb,
17115 offset,
17116 4,
17117 ENC_BIG_ENDIAN0x00000000);
17118 specific_macs_num = tvb_get_int32(tvb, offset, ENC_BIG_ENDIAN0x00000000);
17119 offset += 4;
17120
17121 /* Dissect specific macs */
17122 if (specific_macs_num > 0) {
17123 int RECEIVER_SPECIFIC_MAC_KEY_LENGTH = 4; /* bytes. */
17124 int secure_tags_list_member_size =
17125 RECEIVER_SPECIFIC_MAC_KEY_LENGTH + SECURE_TAG_COMMON_AND_SPECIFIC_MAC_LENGTH16;
17126
17127 proto_tree *sec_data_tag_tree = NULL((void*)0);
17128 sec_data_tag_tree = proto_tree_add_subtree_format(
17129 tree,
17130 tvb,
17131 offset,
17132 octets_to_next_header,
17133 ett_rtps_secure_dataheader_tree,
17134 NULL((void*)0),
17135 "Receiver Specific Macs");
17136 for (int tag_counter = 0; tag_counter < specific_macs_num; tag_counter++) {
17137 proto_tree *tag_tree = NULL((void*)0);
17138 int tag_offset = tag_counter * secure_tags_list_member_size;
17139
17140 tag_tree = proto_tree_add_subtree_format(
17141 sec_data_tag_tree,
17142 tvb,
17143 offset + tag_offset,
17144 secure_tags_list_member_size,
17145 ett_rtps_secure_postfix_tag_list_item,
17146 NULL((void*)0),
17147 "Receiver Specific Mac[%d]",
17148 tag_counter);
17149 proto_tree_add_item(
17150 tag_tree,
17151 hf_rtps_secure_datatag_plugin_sec_tag,
17152 tvb,
17153 offset + tag_offset,
17154 SECURE_TAG_COMMON_AND_SPECIFIC_MAC_LENGTH16,
17155 encoding);
17156 proto_tree_add_item(
17157 tag_tree,
17158 hf_rtps_secure_datatag_plugin_sec_tag_key,
17159 tvb,
17160 offset + tag_offset + SECURE_TAG_COMMON_AND_SPECIFIC_MAC_LENGTH16,
17161 RECEIVER_SPECIFIC_MAC_KEY_LENGTH,
17162 encoding);
17163 }
17164 }
17165}
17166/*
17167 * 0...2...........7...............15.............23...............31
17168 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
17169 * | BINDING_PING |X|X|X|X|X|B|L|E| octetsToNextHeader |
17170 * +---------------+---------------+---------------+---------------+
17171 * | DDS_UnsignedLong rtps_port |
17172 * +---------------+---------------+---------------+---------------+
17173 * | |
17174 * + DDS_Octet address[12][If L = 0] +
17175 * | |
17176 * + +
17177 * | |
17178 * +---------------+---------------+---------------+---------------+
17179 * | |
17180 * + DDS_Octet address[16][If L = 1] +
17181 * | |
17182 * + +
17183 * | |
17184 * + +
17185 * | |
17186 * +---------------+---------------+---------------+---------------+
17187 *
17188 */
17189static void dissect_UDP_WAN_BINDING_PING(tvbuff_t *tvb, packet_info *pinfo _U___attribute__((unused)), int offset,
17190 uint8_t flags, const unsigned encoding, int octets_to_next_header _U___attribute__((unused)),
17191 proto_tree *tree, uint16_t vendor_id _U___attribute__((unused))) {
17192
17193 const unsigned flags_offset = offset + 1;
17194 const unsigned next_header_offset = flags_offset + 1;
17195 const unsigned port_offset = next_header_offset + 2;
17196 const unsigned address_offset = port_offset + 4;
17197
17198 proto_tree_add_bitmask_value(tree, tvb, flags_offset, hf_rtps_udpv4_wan_binding_ping_flags,
17199 ett_rtps_flags, UDPV4_WAN_BINDING_PING_FLAGS, flags);
17200 proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb, next_header_offset,
17201 2, encoding);
17202 proto_tree_add_item(tree, hf_rtps_udpv4_wan_binding_ping_port, tvb, port_offset,
17203 4, encoding);
17204 /*
17205 * Address[12] [If L=0] is the only one we currently support, and it maps to:
17206 * DDS_Octet UUID[9] + 3 bytes of padding.
17207 */
17208 if (flags & FLAG_UDPV4_WAN_BINDING_PING_FLAG_L(0x02)) {
17209 proto_tree_add_item(
17210 tree,
17211 hf_rtps_long_address,
17212 tvb,
17213 address_offset,
17214 LONG_ADDRESS_SIZE(16),
17215 encoding);
17216 } else {
17217 proto_tree_add_item(
17218 tree,
17219 hf_rtps_uuid,
17220 tvb,
17221 address_offset,
17222 UUID_SIZE(9),
17223 encoding);
17224 }
17225}
17226
17227// NOLINTNEXTLINE(misc-no-recursion)
17228static bool_Bool dissect_rtps_submessage_v2(
17229 tvbuff_t *tvb,
17230 packet_info *pinfo,
17231 int offset,
17232 uint8_t flags,
17233 const unsigned encoding,
17234 uint8_t submessageId,
17235 uint16_t vendor_id,
17236 int octets_to_next_header,
17237 proto_tree *rtps_submessage_tree,
17238 proto_item *submessage_item,
17239 endpoint_guid *guid,
17240 endpoint_guid *dst_guid,
17241 bool_Bool dissecting_encrypted_submessage)
17242{
17243 switch (submessageId)
30
Control jumps to 'case 0:' at line 17245
17244 {
17245 case SUBMESSAGE_HEADER_EXTENSION(0x0):
17246 dissect_HEADER_EXTENSION(tvb, pinfo, offset, flags, encoding, rtps_submessage_tree, octets_to_next_header, vendor_id);
31
Calling 'dissect_HEADER_EXTENSION'
17247 break;
17248 case SUBMESSAGE_DATA_FRAG(0x10):
17249 dissect_DATA_FRAG(tvb, pinfo, offset, flags, encoding,
17250 octets_to_next_header, rtps_submessage_tree, vendor_id, guid);
17251 break;
17252
17253 case SUBMESSAGE_NOKEY_DATA_FRAG(0x11):
17254 dissect_NOKEY_DATA_FRAG(tvb, pinfo, offset, flags, encoding, octets_to_next_header, rtps_submessage_tree, vendor_id);
17255 break;
17256
17257 case SUBMESSAGE_NACK_FRAG(0x12):
17258 dissect_NACK_FRAG(tvb, pinfo, offset, flags, encoding, octets_to_next_header, rtps_submessage_tree);
17259 break;
17260
17261 case SUBMESSAGE_ACKNACK_SESSION(0x1a):
17262 case SUBMESSAGE_ACKNACK_BATCH(0x17):
17263 dissect_ACKNACK(tvb, pinfo, offset, flags, encoding,
17264 octets_to_next_header, rtps_submessage_tree, submessage_item, dst_guid);
17265 break;
17266
17267 case SUBMESSAGE_APP_ACK(0x1c):
17268 dissect_APP_ACK(tvb, pinfo, offset, flags, encoding, octets_to_next_header, rtps_submessage_tree, submessage_item, guid);
17269 break;
17270
17271 case SUBMESSAGE_APP_ACK_CONF(0x1d):
17272 dissect_APP_ACK_CONF(tvb, pinfo, offset, flags, encoding, octets_to_next_header, rtps_submessage_tree, submessage_item, guid);
17273 break;
17274
17275 case SUBMESSAGE_HEARTBEAT_SESSION(0x1b):
17276 case SUBMESSAGE_HEARTBEAT_BATCH(0x19):
17277 dissect_HEARTBEAT_BATCH(tvb, pinfo, offset, flags, encoding,
17278 octets_to_next_header, rtps_submessage_tree, guid);
17279 break;
17280
17281 case SUBMESSAGE_HEARTBEAT_FRAG(0x13):
17282 dissect_HEARTBEAT_FRAG(tvb, pinfo, offset, flags, encoding,
17283 octets_to_next_header, rtps_submessage_tree, guid);
17284 break;
17285
17286 case SUBMESSAGE_HEARTBEAT_VIRTUAL(0x1e):
17287 dissect_HEARTBEAT_VIRTUAL(tvb, pinfo, offset, flags, encoding,
17288 octets_to_next_header, rtps_submessage_tree, vendor_id, guid);
17289 break;
17290
17291 case SUBMESSAGE_RTPS_DATA_SESSION(0x14): {
17292 dissect_RTPS_DATA_SESSION(tvb, pinfo, offset, flags, encoding, octets_to_next_header,
17293 rtps_submessage_tree, vendor_id, guid);
17294 break;
17295 }
17296 case SUBMESSAGE_RTPS_DATA(0x15):
17297 dissect_RTPS_DATA(tvb, pinfo, offset, flags, encoding, octets_to_next_header,
17298 rtps_submessage_tree, vendor_id, false0, guid);
17299
17300 break;
17301
17302 case SUBMESSAGE_RTI_DATA_FRAG_SESSION(0x81):
17303 case SUBMESSAGE_RTPS_DATA_FRAG(0x16):
17304 dissect_RTPS_DATA_FRAG_kind(tvb, pinfo, offset, flags, encoding, octets_to_next_header,
17305 rtps_submessage_tree, vendor_id, (submessageId == SUBMESSAGE_RTI_DATA_FRAG_SESSION(0x81)), guid);
17306 break;
17307
17308 case SUBMESSAGE_RTPS_DATA_BATCH(0x18):
17309 dissect_RTPS_DATA_BATCH(tvb, pinfo, offset, flags, encoding, octets_to_next_header,
17310 rtps_submessage_tree, vendor_id, guid);
17311 break;
17312
17313 case SUBMESSAGE_RTI_CRC(0x80):
17314 if (vendor_id == RTPS_VENDOR_RTI_DDS(0x0101)) {
17315 dissect_RTI_CRC(tvb, pinfo, offset, flags, encoding, octets_to_next_header,
17316 rtps_submessage_tree);
17317 }
17318 break;
17319 case SUBMESSAGE_SEC_BODY(0x30):
17320 dissect_SECURE(
17321 tvb,
17322 pinfo,
17323 offset,
17324 flags,
17325 encoding,
17326 octets_to_next_header,
17327 rtps_submessage_tree,
17328 vendor_id,
17329 guid,
17330 dissecting_encrypted_submessage);
17331 break;
17332 case SUBMESSAGE_SEC_PREFIX(0x31):
17333 case SUBMESSAGE_SRTPS_PREFIX(0x33):
17334 dissect_SECURE_PREFIX(tvb, pinfo, offset, flags, encoding, octets_to_next_header,
17335 rtps_submessage_tree, vendor_id);
17336 break;
17337 case SUBMESSAGE_SEC_POSTFIX(0x32):
17338 case SUBMESSAGE_SRTPS_POSTFIX(0x34):
17339 dissect_SECURE_POSTFIX(tvb, pinfo, offset, flags, encoding, octets_to_next_header,
17340 rtps_submessage_tree, vendor_id);
17341 break;
17342 case SUBMESSAGE_RTI_UDP_WAN_BINDING_PING(0x82):
17343 dissect_UDP_WAN_BINDING_PING(tvb, pinfo, offset, flags, encoding, octets_to_next_header,
17344 rtps_submessage_tree, vendor_id);
17345 break;
17346
17347 default:
17348 return false0;
17349 }
17350
17351 return true1;
17352}
17353
17354static bool_Bool dissect_rtps_submessage_v1(tvbuff_t *tvb, packet_info *pinfo, int offset, uint8_t flags, const unsigned encoding,
17355 uint8_t submessageId, uint16_t version, uint16_t vendor_id, int octets_to_next_header,
17356 proto_tree *rtps_submessage_tree, proto_item *submessage_item,
17357 endpoint_guid * guid, endpoint_guid * dst_guid)
17358{
17359 switch (submessageId)
17360 {
17361 case SUBMESSAGE_PAD(0x01):
17362 dissect_PAD(tvb, pinfo, offset, flags, encoding, octets_to_next_header, rtps_submessage_tree);
17363 break;
17364
17365 case SUBMESSAGE_DATA(0x02):
17366 if (version < 0x0200) {
17367 dissect_DATA_v1(tvb, pinfo, offset, flags, encoding,
17368 octets_to_next_header, rtps_submessage_tree);
17369 } else {
17370 dissect_DATA_v2(tvb, pinfo, offset, flags, encoding,
17371 octets_to_next_header, rtps_submessage_tree, vendor_id, guid);
17372 }
17373 break;
17374
17375 case SUBMESSAGE_NOKEY_DATA(0x03):
17376 dissect_NOKEY_DATA(tvb, pinfo, offset, flags, encoding, octets_to_next_header, rtps_submessage_tree,
17377 version, vendor_id);
17378 break;
17379
17380 case SUBMESSAGE_ACKNACK(0x06):
17381 dissect_ACKNACK(tvb, pinfo, offset, flags, encoding,
17382 octets_to_next_header, rtps_submessage_tree, submessage_item, dst_guid);
17383 break;
17384
17385 case SUBMESSAGE_HEARTBEAT(0x07):
17386 dissect_HEARTBEAT(tvb, pinfo, offset, flags, encoding,
17387 octets_to_next_header, rtps_submessage_tree, version, guid);
17388 break;
17389
17390 case SUBMESSAGE_GAP(0x08):
17391 dissect_GAP(tvb, pinfo, offset, flags, encoding,
17392 octets_to_next_header, rtps_submessage_tree, guid);
17393 break;
17394
17395 case SUBMESSAGE_INFO_TS(0x09):
17396 dissect_INFO_TS(tvb, pinfo, offset, flags, encoding, octets_to_next_header, rtps_submessage_tree);
17397 break;
17398
17399 case SUBMESSAGE_INFO_SRC(0x0c):
17400 dissect_INFO_SRC(tvb, pinfo, offset, flags, encoding, octets_to_next_header, rtps_submessage_tree, version);
17401 break;
17402
17403 case SUBMESSAGE_INFO_REPLY_IP4(0x0d):
17404 dissect_INFO_REPLY_IP4(tvb, pinfo, offset, flags, encoding, octets_to_next_header, rtps_submessage_tree);
17405 break;
17406
17407 case SUBMESSAGE_INFO_DST(0x0e):
17408 dissect_INFO_DST(tvb, pinfo, offset, flags, encoding,
17409 octets_to_next_header, rtps_submessage_tree, version, dst_guid);
17410 break;
17411
17412 case SUBMESSAGE_INFO_REPLY(0x0f):
17413 dissect_INFO_REPLY(tvb, pinfo, offset, flags, encoding, octets_to_next_header, rtps_submessage_tree);
17414 break;
17415
17416 default:
17417 return false0;
17418 }
17419
17420 return true1;
17421}
17422
17423/***************************************************************************/
17424/* The main packet dissector function
17425 */
17426static bool_Bool dissect_rtps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
17427{
17428 proto_item *ti;
17429 proto_tree *rtps_tree;
17430 uint8_t majorRev;
17431 uint16_t version, vendor_id;
17432 bool_Bool is_ping;
17433 endpoint_guid guid = {0};
17434 endpoint_guid *guid_copy;
17435 uint32_t magic_number;
17436 char domain_id_str[RTPS_UNKNOWN_DOMAIN_ID_STR_LENsizeof("Unknown")] = RTPS_UNKNOWN_DOMAIN_ID_STR"Unknown";
17437 bool_Bool is_domain_id_calculated = false0;
17438 const char* not_accuracy_str = "";
17439 int length_remaining = 0;
17440 rtps_tvb_field rtps_root;
17441 rtps_current_packet_decryption_info_t *decryption_info = NULL((void*)0);
17442
17443 /* Check 'RTPS' signature:
17444 * A header is invalid if it has less than 16 octets
17445 */
17446 length_remaining = tvb_reported_length_remaining(tvb, offset);
17447 if (length_remaining < 16)
2
Assuming 'length_remaining' is >= 16
3
Taking false branch
17448 return false0;
17449
17450 magic_number = tvb_get_ntohl(tvb, offset);
17451 if (magic_number != RTPX_MAGIC_NUMBER0x52545058 &&
4
Assuming 'magic_number' is equal to RTPX_MAGIC_NUMBER
17452 magic_number != RTPS_MAGIC_NUMBER0x52545053) {
17453 return false0;
17454 }
17455 /* Distinguish between RTPS 1.x and 2.x here */
17456 majorRev = tvb_get_uint8(tvb,offset+4);
17457 if ((majorRev != 1) && (majorRev != 2))
5
Assuming 'majorRev' is equal to 1
17458 return false0;
17459
17460 /* Save the beginning of the RTPS message */
17461 rtps_root.tvb = tvb;
17462 rtps_root.tvb_offset = offset;
17463 rtps_root.tvb_len = tvb_reported_length_remaining(tvb, offset);
17464 p_set_proto_data(pinfo->pool, pinfo, proto_rtps, RTPS_ROOT_MESSAGE_KEY4, (void **)&rtps_root);
17465 col_set_str(pinfo->cinfo, COL_PROTOCOL, "RTPS");
17466 col_clear(pinfo->cinfo, COL_INFO);
17467
17468 /* create display subtree for the protocol */
17469 ti = proto_tree_add_item(tree, proto_rtps, tvb, 0, -1, ENC_NA0x00000000);
17470 rtps_tree = proto_item_add_subtree(ti, ett_rtps);
17471
17472 /* magic */
17473 proto_tree_add_item(rtps_tree, hf_rtps_magic, tvb, 0, 4, ENC_ASCII0x00000000);
17474
17475 /* Protocol Version */
17476 version = rtps_util_add_protocol_version(rtps_tree, tvb, offset+4);
17477
17478 /* Vendor Id */
17479 vendor_id = rtps_util_add_vendor_id(rtps_tree, tvb, offset+6);
17480
17481 is_ping = rtps_is_ping(tvb, pinfo, offset+8);
17482
17483 if (is_ping
5.1
'is_ping' is false
) {
6
Taking false branch
17484 dissect_PING(tvb, offset + 8, ENC_BIG_ENDIAN0x00000000, length_remaining - 8, rtps_tree);
17485 } else {
17486 if (version < 0x0200)
7
Assuming 'version' is >= 512
8
Taking false branch
17487 rtps_util_add_guid_prefix_v1(rtps_tree, pinfo, tvb, offset+8,
17488 hf_rtps_guid_prefix_v1, hf_rtps_host_id, hf_rtps_app_id,
17489 hf_rtps_app_id_instance_id, hf_rtps_app_id_app_kind, NULL((void*)0));
17490 else
17491 rtps_util_add_guid_prefix_v2(rtps_tree, tvb, offset+8, hf_rtps_guid_prefix_src,
17492 hf_rtps_host_id, hf_rtps_app_id, hf_rtps_sm_instance_id, hf_rtps_guid_prefix);
17493
17494 guid.host_id = tvb_get_ntohl(tvb, offset+8);
17495 guid.app_id = tvb_get_ntohl(tvb, offset+12);
17496 guid.instance_id = tvb_get_ntohl(tvb, offset+16);
17497
17498 /*
17499 * If decryption is enabled, store the guid prefix to be used later in the
17500 * dissect_SECURE and dissect_SECURE_PREFIX functions.
17501 */
17502 if (enable_rtps_psk_decryption) {
9
Assuming 'enable_rtps_psk_decryption' is false
10
Taking false branch
17503 decryption_info = wmem_alloc(
17504 pinfo->pool,
17505 sizeof(rtps_current_packet_decryption_info_t));
17506 if (decryption_info == NULL((void*)0)) {
17507 return false0;
17508 }
17509 decryption_info->additional_authenticated_data_allocated = false0;
17510
17511 rtps_current_packet_decryption_info_reset(decryption_info);
17512 decryption_info->guid_prefix.host_id = guid.host_id;
17513 decryption_info->guid_prefix.app_id = guid.app_id;
17514 decryption_info->guid_prefix.instance_id = guid.instance_id;
17515
17516 decryption_info->aad_length = 20; /* rtps header size. */
17517
17518 /* Let's cast to avoid an unnecessary copy when HE is disabled. */
17519 decryption_info->additional_authenticated_data = (uint8_t *) tvb_get_ptr(
17520 rtps_root.tvb,
17521 rtps_root.tvb_offset,
17522 (int) decryption_info->aad_length);
17523
17524 p_set_proto_data(
17525 pinfo->pool,
17526 pinfo,
17527 proto_rtps,
17528 RTPS_DECRYPTION_INFO_KEY5,
17529 (void **) decryption_info);
17530 }
17531
17532 guid.fields_present = GUID_HAS_HOST_ID0x00000001|GUID_HAS_APP_ID0x00000002|GUID_HAS_INSTANCE_ID0x00000004;
17533 /* If the packet uses TCP we need top store the participant GUID to get the domainId later
17534 * For that operation the member fields_present is not required and is not affected by
17535 * its changes.
17536 */
17537 guid_copy = (endpoint_guid*)wmem_memdup(pinfo->pool,
17538 (const void*)&guid, sizeof(endpoint_guid));
17539 p_add_proto_data(pinfo->pool, pinfo, proto_rtps,
17540 RTPS_TCPMAP_DOMAIN_ID_PROTODATA_KEY0, (void *)guid_copy);
17541#ifdef RTI_BUILD
17542 pinfo->guid_prefix_host = tvb_get_ntohl(tvb, offset + 8);
17543 pinfo->guid_prefix_app = tvb_get_ntohl(tvb, offset + 12);
17544 pinfo->guid_prefix_count = tvb_get_ntohl(tvb, offset + 16);
17545 pinfo->guid_rtps2 = 1;
17546#endif
17547 }
17548 /* Extract the domain id and participant index */
17549 {
17550 int domain_id, doffset, participant_idx = 0, nature;
17551 proto_tree *mapping_tree;
17552 /* For a complete description of these rules, see RTPS documentation
17553
17554 RTPS 1.2 mapping:
17555 domain_id = ((pinfo->destport - PORT_BASE)/10) % 100;
17556 participant_idx = (pinfo->destport - PORT_BASE) / 1000;
17557 nature = (pinfo->destport % 10);
17558
17559 For Unicast, the port mapping formula is:
17560 metatraffic_unicast_port = port_base +
17561 (domain_id_gain * domain_id) +
17562 (participant_id_gain * participant_id) +
17563 builtin_unicast_port_offset
17564 For Multicast, the port mapping is:
17565 metatraffic_multicast_port = port_base +
17566 (domain_id_gain * domain_id) +
17567 builtin_multicast_port_offset
17568
17569 Where the constants are:
17570 port_base = 7400
17571 domain_id_gain = 250
17572 participant_id_gain = 2
17573 builtin_multicast_port_offset = 0
17574 builtin_unicast_port_offset = 10
17575 user_multicast_port_offset = 1
17576 user_unicast_port_offset = 11
17577
17578
17579 To obtain the individual components from the port number, the reverse formulas are:
17580 domain_id = (port - port_base) / 250 (valid both multicast / unicast)
17581 Doffset = (port - port_Base - (domain_id * 250));
17582 participant_idx = (Doffset - 10) / 2;
17583
17584 */
17585 if (version
10.1
'version' is >= 512
< 0x0200) {
11
Taking false branch
17586 /* If using TCP domainId cannot deduced from the port. It must be taken from the participant
17587 * discovery packets or Unknown.
17588 */
17589 domain_id = get_domain_id_from_tcp_discovered_participants(discovered_participants_domain_ids, &guid);
17590 if (pinfo->ptype != PT_TCP && domain_id == RTPS_UNKNOWN_DOMAIN_ID_VAL-1) {
17591 domain_id = ((pinfo->destport - PORT_BASE(7400)) / 10) % 100;
17592 is_domain_id_calculated = true1;
17593 }
17594 participant_idx = (pinfo->destport - PORT_BASE(7400)) / 1000;
17595 nature = (pinfo->destport % 10);
17596 } else {
17597 domain_id = get_domain_id_from_tcp_discovered_participants(discovered_participants_domain_ids, &guid);
17598 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
17599 domain_id = (pinfo->destport - PORT_BASE(7400)) / DOMAIN_GAIN(250);
17600 is_domain_id_calculated = true1;
17601 }
17602 doffset = (pinfo->destport - PORT_BASE(7400) - domain_id * DOMAIN_GAIN(250));
17603 if (doffset == 0) {
13
Assuming 'doffset' is not equal to 0
14
Taking false branch
17604 nature = PORT_METATRAFFIC_MULTICAST(2);
17605 }
17606 else if (doffset == 1) {
15
Assuming 'doffset' is not equal to 1
16
Taking false branch
17607 nature = PORT_USERTRAFFIC_MULTICAST(1);
17608 }
17609 else {
17610 participant_idx = (doffset - 10) / 2;
17611 if ((doffset - 10) % 2 == 0) {
17
Assuming the condition is false
18
Taking false branch
17612 nature = PORT_METATRAFFIC_UNICAST(0);
17613 }
17614 else {
17615 nature = PORT_USERTRAFFIC_UNICAST(3);
17616 }
17617 }
17618 if (domain_id
18.1
'domain_id' is <= 232
> 232 || domain_id
18.2
'domain_id' is < 0
< 0) {
19
Taking true branch
17619 domain_id = RTPS_UNKNOWN_DOMAIN_ID_VAL-1;
17620 }
17621 }
17622 /* Used string for the domain participant to show Unknown if the domainId is not known when using TCP*/
17623 if (domain_id != RTPS_UNKNOWN_DOMAIN_ID_VAL-1) {
17624 snprintf(domain_id_str, RTPS_UNKNOWN_DOMAIN_ID_STR_LENsizeof("Unknown"),
17625 "%"PRId32"d", domain_id);
17626 if (is_domain_id_calculated) {
17627 not_accuracy_str = " (Based on calculated domainId. Might not be accurate)";
17628 }
17629 }
17630 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)) ||
17631 (version < 0x0200)) {
17632 mapping_tree = proto_tree_add_subtree_format(rtps_tree, tvb, 0, 0,
17633 ett_rtps_default_mapping, NULL((void*)0), "Default port mapping%s: domainId=%s, "
17634 "participantIdx=%d, nature=%s",
17635 not_accuracy_str,
17636 domain_id_str,
17637 participant_idx,
17638 val_to_str(pinfo->pool, nature, nature_type_vals, "%02x"));
17639 } else {
17640 mapping_tree = proto_tree_add_subtree_format(rtps_tree, tvb, 0, 0,
17641 ett_rtps_default_mapping, NULL((void*)0), "Default port mapping%s: %s, domainId=%s",
17642 not_accuracy_str,
17643 val_to_str(pinfo->pool, nature, nature_type_vals, "%02x"),
17644 domain_id_str);
17645 }
17646
17647 ti = proto_tree_add_uint(mapping_tree, hf_rtps_domain_id, tvb, 0, 0, domain_id);
17648 proto_item_set_generated(ti);
17649 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)) ||
17650 (version < 0x0200)) {
17651 ti = proto_tree_add_uint(mapping_tree, hf_rtps_participant_idx, tvb, 0, 0, participant_idx);
17652 proto_item_set_generated(ti);
17653 }
17654 ti = proto_tree_add_uint(mapping_tree, hf_rtps_nature_type, tvb, 0, 0, nature);
17655 proto_item_set_generated(ti);
17656 }
17657
17658 /* offset behind RTPS's Header (need to be set in case tree=NULL)*/
17659 offset += ((version
19.5
'version' is >= 512
< 0x0200) ? 16 : 20);
20
'?' condition is false
17660
17661 dissect_rtps_submessages(
21
Calling 'dissect_rtps_submessages'
17662 tvb,
17663 offset,
17664 pinfo,
17665 rtps_tree,
17666 version,
17667 vendor_id,
17668 &guid,
17669 false0 /* dissecting_encrypted_submessage. */);
17670
17671 if (decryption_info != NULL((void*)0)) {
17672 rtps_current_packet_decryption_info_reset(decryption_info);
17673 }
17674
17675 /* If TCP there's an extra OOB byte at the end of the message */
17676 /* TODO: What to do with it? */
17677 return true1;
17678
17679} /* dissect_rtps(...) */
17680
17681static
17682void append_submessage_col_info(packet_info* pinfo, submessage_col_info* current_submessage_col_info) {
17683 bool_Bool* is_data_session_intermediate = NULL((void*)0);
17684
17685 /* Status info column: (r),(p[U])...*/
17686 if (current_submessage_col_info->status_info != NULL((void*)0)) {
17687 col_append_str(pinfo->cinfo, COL_INFO, current_submessage_col_info->status_info);
17688 }
17689 /* DATA_SESSION last package */
17690 is_data_session_intermediate = (bool_Bool*)p_get_proto_data(pinfo->pool, pinfo, proto_rtps, RTPS_DATA_SESSION_FINAL_PROTODATA_KEY2);
17691 if (is_data_session_intermediate != NULL((void*)0) && !*is_data_session_intermediate) {
17692 current_submessage_col_info->data_session_kind = "(Last)";
17693 col_append_str(pinfo->cinfo, COL_INFO, current_submessage_col_info->data_session_kind);
17694 }
17695 /* Topic name */
17696 if (current_submessage_col_info->topic_name != NULL((void*)0)) {
17697 col_append_sep_str(pinfo->cinfo, COL_INFO, " -> ", current_submessage_col_info->topic_name);
17698 }
17699}
17700
17701// NOLINTNEXTLINE(misc-no-recursion)
17702void dissect_rtps_submessages(
17703 tvbuff_t *tvb,
17704 int offset,
17705 packet_info *pinfo,
17706 proto_tree *rtps_tree,
17707 uint16_t version,
17708 uint16_t vendor_id,
17709 endpoint_guid *guid,
17710 bool_Bool dissecting_encrypted_submessage)
17711{
17712 uint8_t submessageId, flags;
17713 int sub_hf;
17714 const value_string *sub_vals;
17715 proto_item *ti;
17716 proto_tree *rtps_submessage_tree;
17717 unsigned encoding;
17718 int next_submsg, octets_to_next_header;
17719 endpoint_guid dst_guid;
17720 submessage_col_info current_submessage_col_info = {NULL((void*)0), NULL((void*)0), NULL((void*)0)};
17721
17722 /* No fields have been set in GUID yet. */
17723 dst_guid.fields_present = 0;
17724 while (tvb_reported_length_remaining(tvb, offset) > 0) {
22
Assuming the condition is true
23
Loop condition is true. Entering loop body
17725 submessageId = tvb_get_uint8(tvb, offset);
17726
17727 if (version
23.1
'version' is >= 512
< 0x0200) {
17728 sub_hf = hf_rtps_sm_id;
17729 sub_vals = submessage_id_vals;
17730 } else {
17731 if ((submessageId & 0x80) && (vendor_id == RTPS_VENDOR_RTI_DDS(0x0101))) {
24
Assuming the condition is false
17732 sub_hf = hf_rtps_sm_idv2;
17733 sub_vals = submessage_id_rti;
17734 } else {
17735 sub_hf = hf_rtps_sm_idv2;
17736 sub_vals = submessage_id_valsv2;
17737 }
17738 }
17739
17740 col_append_sep_str(pinfo->cinfo, COL_INFO, ", ", val_to_str(pinfo->pool, submessageId, sub_vals, "Unknown[%02x]"));
17741
17742 /* Creates the subtree 'Submessage: XXXX' */
17743 if (submessageId & 0x80) {
25
Taking false branch
17744 if (vendor_id == RTPS_VENDOR_RTI_DDS(0x0101)) {
17745 ti = proto_tree_add_uint_format_value(rtps_tree, sub_hf, tvb, offset, 1, submessageId, "%s",
17746 val_to_str(pinfo->pool, submessageId, submessage_id_rti, "Vendor-specific (0x%02x)"));
17747 } else {
17748 ti = proto_tree_add_uint_format_value(rtps_tree, sub_hf, tvb, offset, 1,
17749 submessageId, "Vendor-specific (0x%02x)", submessageId);
17750 }
17751 } else {
17752 ti = proto_tree_add_uint(rtps_tree, sub_hf, tvb, offset, 1, submessageId);
17753 }
17754
17755 rtps_submessage_tree = proto_item_add_subtree(ti, ett_rtps_submessage);
17756
17757 /* Gets the flags */
17758 flags = tvb_get_uint8(tvb, offset + 1);
17759
17760 /* Gets the E (Little endian) flag */
17761 encoding = ((flags & FLAG_E(0x01)) != 0) ? ENC_LITTLE_ENDIAN0x80000000 : ENC_BIG_ENDIAN0x00000000;
26
Assuming the condition is true
27
'?' condition is true
17762
17763 /* Octets-to-next-header */
17764 octets_to_next_header = tvb_get_uint16(tvb, offset + 2, encoding);
17765 if ((octets_to_next_header == 0) && (version >= 0x0200)
28
Assuming 'octets_to_next_header' is not equal to 0
17766 && (submessageId != SUBMESSAGE_PAD(0x01)) && (submessageId != SUBMESSAGE_INFO_TS(0x09))) {
17767 octets_to_next_header = tvb_reported_length_remaining(tvb, offset + 4);
17768 }
17769 next_submsg = offset + octets_to_next_header + 4;
17770
17771 /* Set length of this item */
17772 proto_item_set_len(ti, octets_to_next_header + 4);
17773
17774 /* Now decode each single submessage
17775 * The offset passed to the dissectors points to the start of the
17776 * submessage (at the ID byte).
17777 */
17778 p_set_proto_data(pinfo->pool, pinfo, proto_rtps, RTPS_CURRENT_SUBMESSAGE_COL_DATA_KEY3, (void **)&current_submessage_col_info);
17779 if (!dissect_rtps_submessage_v1(tvb, pinfo, offset, flags, encoding,
17780 submessageId, version, vendor_id,
17781 octets_to_next_header, rtps_submessage_tree,
17782 ti, guid, &dst_guid)) {
17783 if ((version
28.1
'version' is >= 512
< 0x0200) ||
17784 !dissect_rtps_submessage_v2(
29
Calling 'dissect_rtps_submessage_v2'
17785 tvb,
17786 pinfo,
17787 offset,
17788 flags,
17789 encoding,
17790 submessageId,
17791 vendor_id,
17792 octets_to_next_header,
17793 rtps_submessage_tree,
17794 ti,
17795 guid,
17796 &dst_guid,
17797 dissecting_encrypted_submessage)) {
17798 proto_tree_add_uint(rtps_submessage_tree, hf_rtps_sm_flags,
17799 tvb, offset + 1, 1, flags);
17800 proto_tree_add_uint(rtps_submessage_tree,
17801 hf_rtps_sm_octets_to_next_header,
17802 tvb, offset + 2, 2, octets_to_next_header);
17803 }
17804 }
17805 append_submessage_col_info(pinfo, &current_submessage_col_info);
17806 /* Reset the col info for the next submessage */
17807 current_submessage_col_info.data_session_kind = NULL((void*)0);
17808 current_submessage_col_info.status_info = NULL((void*)0);
17809 current_submessage_col_info.topic_name = NULL((void*)0);
17810 /* next submessage's offset */
17811 offset = next_submsg;
17812 }
17813}
17814
17815static bool_Bool dissect_rtps_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U___attribute__((unused)))
17816{
17817 int offset = 0;
17818
17819 return dissect_rtps(tvb, pinfo, tree, offset);
17820}
17821
17822static bool_Bool dissect_rtps_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U___attribute__((unused)))
17823{
17824 /* In RTPS over TCP the first 4 bytes are the packet length
17825 * as 32-bit unsigned int coded as BIG ENDIAN
17826 * uint32_t tcp_len = tvb_get_ntohl(tvb, offset);
17827 */
17828 int offset = 4;
17829
17830 return dissect_rtps(tvb, pinfo, tree, offset);
17831}
17832
17833static bool_Bool dissect_rtps_rtitcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U___attribute__((unused)))
17834{
17835 int offset = 0;
17836
17837 return dissect_rtps(tvb, pinfo, tree, offset);
17838}
17839
17840static int dissect_simple_rtps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U___attribute__((unused)))
17841{
17842 int offset = 0;
17843
17844 if (dissect_rtps(tvb, pinfo, tree, offset) == false0)
1
Calling 'dissect_rtps'
17845 return 0;
17846
17847 return tvb_captured_length(tvb);
17848}
17849
17850/*
17851 * Type InstanceStateDataresponse is sent as user user data but there is no discovery data for it.
17852 * So it is necessary to add it manually so Wireshark can dissect it
17853 */
17854static void initialize_instance_state_data_response_dissection_info(builtin_types_dissection_data_t *_builtin_types_dissection_data) {
17855 uint32_t element = 0;
17856 const uint64_t InstanceStateDataResponse_type_id = 0x9d6d4c879b0e6aa9;
17857 const uint64_t sequence_100_InstanceTransitionData_type_id = 0x2dac07d5577caaf6;
17858 const uint64_t guid_t_type_id = 0x36d940c4ed806097;
17859 const uint64_t value_type_id = 0x974064b1120169ed;
17860 const uint64_t instancetransitiondata_type_id = 0xceb6f5e405f4bde7;
17861 const uint64_t KeyHashValue_type_id = 0x48725f37453310ed;
17862 const uint64_t SerializedKey_type_id = 0x3fd77a8ff43c7e55;
17863 const uint64_t payload_type_id = 0x0d0ecc8d34a5c3ab;
17864 const uint64_t ntptime_t_type_id = 0x842c59af7e962a4c;
17865 const uint64_t sequencenumber_t_type_id = 0xb933efe30d85453b;
17866 /*
17867 * @appendable @nested
17868 * struct GUID_t {
17869 * octet value[16];
17870 * };
17871 * @appendable @nested
17872 * struct SequenceNumber_t {
17873 * long high;
17874 * unsigned long low;
17875 * };
17876 *
17877 * @final @nested
17878 * struct NtpTime_t {
17879 * int32 sec;
17880 * uint32 frac;
17881 * };
17882 * @final @nested
17883 * struct SerializedKey {
17884 * sequence<octet> payload;
17885 * };
17886 * typedef octet KeyHashValue[16];
17887 *
17888 * struct InstanceTransitionData {
17889 * @optional KeyHashValue key_hash;
17890 * @optional SerializedKey serialized_key;
17891 * NtpTime_t last_update_timestamp;
17892 * SequenceNumber_t transition_sequence_number;
17893 * };
17894 */
17895
17896 /* All dissection_infos are added to the "dissection_infos" map */
17897
17898 /* value */
17899 g_strlcpy(_builtin_types_dissection_data->dissection_infos.value_dissection_info.member_name, "value", MAX_TOPIC_AND_TYPE_LENGTH256);
17900 _builtin_types_dissection_data->dissection_infos.value_dissection_info.num_elements = VALUE_NUM_ELEMENTS16;
17901 _builtin_types_dissection_data->dissection_infos.value_dissection_info.bound = VALUE_NUM_ELEMENTS16;
17902 _builtin_types_dissection_data->dissection_infos.value_dissection_info.member_kind = RTI_CDR_TYPE_OBJECT_TYPE_KIND_ARRAY_TYPE;
17903 _builtin_types_dissection_data->dissection_infos.value_dissection_info.base_type_id = RTI_CDR_TYPE_OBJECT_TYPE_KIND_BYTE_TYPE;
17904 _builtin_types_dissection_data->dissection_infos.value_dissection_info.type_id = value_type_id;
17905 _builtin_types_dissection_data->dissection_infos.value_dissection_info.bound = VALUE_NUM_ELEMENTS16;
17906 _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))
))))
;
17907 wmem_map_insert(
17908 builtin_dissection_infos,
17909 &(_builtin_types_dissection_data->dissection_infos.value_dissection_info.type_id),
17910 (void*)&(_builtin_types_dissection_data->dissection_infos.value_dissection_info));
17911
17912 /* GUID_t */
17913 g_strlcpy(_builtin_types_dissection_data->dissection_infos.guid_t_dissection_info.member_name, "GUID_t", MAX_TOPIC_AND_TYPE_LENGTH256);
17914 _builtin_types_dissection_data->dissection_infos.guid_t_dissection_info.num_elements = GUID_T_NUM_ELEMENTS1;
17915 _builtin_types_dissection_data->dissection_infos.guid_t_dissection_info.member_kind = RTI_CDR_TYPE_OBJECT_TYPE_KIND_STRUCTURE_TYPE;
17916 _builtin_types_dissection_data->dissection_infos.guid_t_dissection_info.type_id = guid_t_type_id;
17917 _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))
))))
;
17918 /* octet value[16] */
17919 _builtin_types_dissection_data->dissection_infos.guid_t_dissection_info.elements[0].flags = 0;
17920 _builtin_types_dissection_data->dissection_infos.guid_t_dissection_info.elements[0].member_id = 0;
17921 _builtin_types_dissection_data->dissection_infos.guid_t_dissection_info.elements[0].type_id = value_type_id;
17922 g_strlcpy(_builtin_types_dissection_data->dissection_infos.guid_t_dissection_info.elements[0].member_name, "value", MAX_TOPIC_AND_TYPE_LENGTH256);
17923 wmem_map_insert(
17924 builtin_dissection_infos,
17925 &(_builtin_types_dissection_data->dissection_infos.guid_t_dissection_info.type_id),
17926 (void*)&(_builtin_types_dissection_data->dissection_infos.guid_t_dissection_info));
17927
17928 /* Payload */
17929 g_strlcpy(_builtin_types_dissection_data->dissection_infos.payload_dissection_info.member_name, "payload", MAX_TOPIC_AND_TYPE_LENGTH256);
17930 _builtin_types_dissection_data->dissection_infos.payload_dissection_info.member_kind = RTI_CDR_TYPE_OBJECT_TYPE_KIND_SEQUENCE_TYPE;
17931 _builtin_types_dissection_data->dissection_infos.payload_dissection_info.base_type_id = RTI_CDR_TYPE_OBJECT_TYPE_KIND_BYTE_TYPE;
17932 _builtin_types_dissection_data->dissection_infos.payload_dissection_info.type_id = payload_type_id;
17933 _builtin_types_dissection_data->dissection_infos.payload_dissection_info.bound = -1;
17934 _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))
))))
;
17935 wmem_map_insert(
17936 builtin_dissection_infos,
17937 &(_builtin_types_dissection_data->dissection_infos.payload_dissection_info.type_id),
17938 (void*)&(_builtin_types_dissection_data->dissection_infos.payload_dissection_info));
17939
17940 /* KeyHashValue */
17941 g_strlcpy(_builtin_types_dissection_data->dissection_infos.key_hash_value_dissection_info.member_name, "KeyHashValue", MAX_TOPIC_AND_TYPE_LENGTH256);
17942 _builtin_types_dissection_data->dissection_infos.key_hash_value_dissection_info.num_elements = KEY_HAS_VALUE_NUM_ELEMENTS16;
17943 _builtin_types_dissection_data->dissection_infos.key_hash_value_dissection_info.bound = KEY_HAS_VALUE_NUM_ELEMENTS16;
17944 _builtin_types_dissection_data->dissection_infos.key_hash_value_dissection_info.member_kind = RTI_CDR_TYPE_OBJECT_TYPE_KIND_ARRAY_TYPE;
17945 _builtin_types_dissection_data->dissection_infos.key_hash_value_dissection_info.base_type_id = RTI_CDR_TYPE_OBJECT_TYPE_KIND_BYTE_TYPE;
17946 _builtin_types_dissection_data->dissection_infos.key_hash_value_dissection_info.type_id = KeyHashValue_type_id;
17947 _builtin_types_dissection_data->dissection_infos.key_hash_value_dissection_info.bound = KEY_HAS_VALUE_NUM_ELEMENTS16;
17948 _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))
))))
;
17949 wmem_map_insert(
17950 builtin_dissection_infos,
17951 &(_builtin_types_dissection_data->dissection_infos.key_hash_value_dissection_info.type_id),
17952 (void*)&(_builtin_types_dissection_data->dissection_infos.key_hash_value_dissection_info));
17953
17954 /* SerializedKey */
17955 g_strlcpy(_builtin_types_dissection_data->dissection_infos.serialized_key_dissection_info.member_name, "SerializedKey", MAX_TOPIC_AND_TYPE_LENGTH256);
17956 _builtin_types_dissection_data->dissection_infos.serialized_key_dissection_info.num_elements = GUID_T_NUM_ELEMENTS1;
17957 _builtin_types_dissection_data->dissection_infos.serialized_key_dissection_info.member_kind = RTI_CDR_TYPE_OBJECT_TYPE_KIND_STRUCTURE_TYPE;
17958 _builtin_types_dissection_data->dissection_infos.serialized_key_dissection_info.type_id = SerializedKey_type_id;
17959 _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))
))))
;
17960 /* sequence<octet> payload */
17961 _builtin_types_dissection_data->dissection_infos.serialized_key_dissection_info.elements[0].flags = 0;
17962 _builtin_types_dissection_data->dissection_infos.serialized_key_dissection_info.elements[0].member_id = 0;
17963 _builtin_types_dissection_data->dissection_infos.serialized_key_dissection_info.elements[0].type_id = payload_type_id;
17964 g_strlcpy(_builtin_types_dissection_data->dissection_infos.serialized_key_dissection_info.elements[0].member_name, "payload", MAX_TOPIC_AND_TYPE_LENGTH256);
17965 wmem_map_insert(
17966 builtin_dissection_infos,
17967 &(_builtin_types_dissection_data->dissection_infos.serialized_key_dissection_info.type_id),
17968 (void*)&(_builtin_types_dissection_data->dissection_infos.serialized_key_dissection_info));
17969
17970 /* NtpTime_t */
17971 g_strlcpy(_builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info.member_name, "NtpTime_t", MAX_TOPIC_AND_TYPE_LENGTH256);
17972 _builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info.num_elements = NTPTIME_T_NUM_ELEMENTS2;
17973 _builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info.member_kind = RTI_CDR_TYPE_OBJECT_TYPE_KIND_STRUCTURE_TYPE;
17974 _builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info.type_id = ntptime_t_type_id;
17975 _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))
))))
;
17976 /* int32 sec */
17977 _builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info.elements[0].flags = 0;
17978 _builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info.elements[0].member_id = 0;
17979 _builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info.elements[0].type_id = RTI_CDR_TYPE_OBJECT_TYPE_KIND_INT_32_TYPE;
17980 g_strlcpy(_builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info.elements[0].member_name, "sec", MAX_TOPIC_AND_TYPE_LENGTH256);
17981 /* uint32 frac */
17982 _builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info.elements[1].flags = 0;
17983 _builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info.elements[1].member_id = 1;
17984 _builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info.elements[1].type_id = RTI_CDR_TYPE_OBJECT_TYPE_KIND_INT_32_TYPE;
17985 g_strlcpy(_builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info.elements[1].member_name, "frac", MAX_TOPIC_AND_TYPE_LENGTH256);
17986 wmem_map_insert(
17987 builtin_dissection_infos,
17988 &(_builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info.type_id),
17989 (void*)&(_builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info));
17990
17991 /* SequenceNumber_t */
17992 g_strlcpy(_builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info.member_name, "SequenceNumber_t", MAX_TOPIC_AND_TYPE_LENGTH256);
17993 _builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info.num_elements = SEQUENCE_NUMBER_T_NUM_ELEMENTS2;
17994 _builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info.member_kind = RTI_CDR_TYPE_OBJECT_TYPE_KIND_STRUCTURE_TYPE;
17995 _builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info.type_id = sequencenumber_t_type_id;
17996 _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))
))))
;
17997 _builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info.elements[0].flags = 0;
17998 _builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info.elements[0].member_id = 0;
17999 _builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info.elements[0].type_id = RTI_CDR_TYPE_OBJECT_TYPE_KIND_INT_32_TYPE;
18000 g_strlcpy(_builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info.elements[0].member_name, "high", MAX_TOPIC_AND_TYPE_LENGTH256);
18001 _builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info.elements[1].flags = 0;
18002 _builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info.elements[1].member_id = 1;
18003 _builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info.elements[1].type_id = RTI_CDR_TYPE_OBJECT_TYPE_KIND_UINT_32_TYPE;
18004 g_strlcpy(_builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info.elements[1].member_name, "low", MAX_TOPIC_AND_TYPE_LENGTH256);
18005 wmem_map_insert(
18006 builtin_dissection_infos,
18007 &(_builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info.type_id),
18008 (void*)&(_builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info));
18009
18010 /* Instance transition Data */
18011 g_strlcpy(_builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.member_name, "InstanceTransitionData", MAX_TOPIC_AND_TYPE_LENGTH256);
18012 _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.num_elements = INSTANCE_TRANSITION_DATA_NUM_ELEMENTS4;
18013 _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.member_kind = RTI_CDR_TYPE_OBJECT_TYPE_KIND_STRUCTURE_TYPE;
18014 _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.type_id = instancetransitiondata_type_id;
18015 _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))
))))
;
18016 wmem_map_insert(
18017 builtin_dissection_infos,
18018 &(_builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.type_id),
18019 (void*)&(_builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info));
18020
18021 for (element = 0; element < _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.num_elements; ++element) {
18022 switch (element) {
18023 case 0:
18024 /* @optional KeyHashValue key_hash */
18025 _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].flags = MEMBER_OPTIONAL(2);
18026 _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].member_id = element;
18027 _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].type_id = KeyHashValue_type_id;
18028 g_strlcpy(_builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].member_name, "key_hash", MAX_TOPIC_AND_TYPE_LENGTH256);
18029 break;
18030 case 1:
18031 /* @optional SerializedKey serialized_key */
18032 _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].flags = MEMBER_OPTIONAL(2);
18033 _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].member_id = element;
18034 _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].type_id = SerializedKey_type_id;
18035 g_strlcpy(_builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].member_name, "serialized_key", MAX_TOPIC_AND_TYPE_LENGTH256);
18036 break;
18037 case 2:
18038 /* NtpTime_t last_update_timestamp */
18039 _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].flags = 0;
18040 _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].member_id = element;
18041 _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].type_id = ntptime_t_type_id;
18042 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);
18043 break;
18044 case 3:
18045 /* SequenceNumber_t transition_sequence_number */
18046 _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].flags = 0;
18047 _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].member_id = element;
18048 _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].type_id = sequencenumber_t_type_id;
18049 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);
18050 break;
18051 }
18052 }
18053
18054 /* InstanceStateDataResponse
18055 * struct InstanceStateDataResponse {
18056 * @optional sequence<InstanceTransitionData> alive_instances;
18057 * @optional sequence<InstanceTransitionData> disposed_instances;
18058 * @optional sequence<InstanceTransitionData> unregistered_instances;
18059 * GUID_t writer_guid;
18060 * GUID_t reader_guid;
18061 * uint32 reader_group_oid;
18062 * boolean complete_snapshot;
18063 * };
18064 */
18065
18066 /* This type mapping is not available in the "registry" map. It is used in the function
18067 * rtps_util_get_topic_info when the endopint GUID determines that the type is InstanceStateDataResponse
18068 */
18069 _builtin_types_dissection_data->type_mappings.instance_state_data_response_type_mapping.type_id = InstanceStateDataResponse_type_id;
18070 _builtin_types_dissection_data->type_mappings.instance_state_data_response_type_mapping.guid.entity_id = ENTITYID_NORMAL_META_GROUP_READER(0x8d);
18071 _builtin_types_dissection_data->type_mappings.instance_state_data_response_type_mapping.guid.fields_present = GUID_HAS_ALL0x0000000F;
18072 _builtin_types_dissection_data->type_mappings.instance_state_data_response_type_mapping.fields_visited = TOPIC_INFO_ALL_SET(0x07);
18073 g_strlcpy(_builtin_types_dissection_data->type_mappings.instance_state_data_response_type_mapping.topic_name, "InstanceStateDataResponse", MAX_TOPIC_AND_TYPE_LENGTH256);
18074 g_strlcpy(_builtin_types_dissection_data->type_mappings.instance_state_data_response_type_mapping.type_name, "InstanceStateDataResponse", MAX_TOPIC_AND_TYPE_LENGTH256);
18075
18076 g_strlcpy(_builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.member_name, "InstanceStateDataResponse", MAX_TOPIC_AND_TYPE_LENGTH256);
18077 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.num_elements = INSTANCE_STATE_DATA_RESPONSE_NUM_ELEMENTS7;
18078 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.bound = INSTANCE_STATE_DATA_RESPONSE_NUM_ELEMENTS7;
18079 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.member_kind = RTI_CDR_TYPE_OBJECT_TYPE_KIND_STRUCTURE_TYPE;
18080 _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))
))))
;
18081 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.base_type_id = 0;
18082 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.type_id = InstanceStateDataResponse_type_id;
18083 wmem_map_insert(
18084 builtin_dissection_infos,
18085 &(_builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.type_id),
18086 (void*)&(_builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info));
18087
18088 /* sequence_100_InstanceTransitionData */
18089 g_strlcpy(_builtin_types_dissection_data->dissection_infos.alive_instances_dissection_info.member_name, "sequence_100_InstanceTransitionData", MAX_TOPIC_AND_TYPE_LENGTH256);
18090 _builtin_types_dissection_data->dissection_infos.alive_instances_dissection_info.num_elements = INSTANCE_STATE_DATA_RESPONSE_NUM_ELEMENTS7;
18091 _builtin_types_dissection_data->dissection_infos.alive_instances_dissection_info.bound = SEQUENCE_100_IINSTANCE_TRANSITION_DATA_BOUND100;
18092 _builtin_types_dissection_data->dissection_infos.alive_instances_dissection_info.member_kind = RTI_CDR_TYPE_OBJECT_TYPE_KIND_SEQUENCE_TYPE;
18093 _builtin_types_dissection_data->dissection_infos.alive_instances_dissection_info.base_type_id = instancetransitiondata_type_id;
18094 _builtin_types_dissection_data->dissection_infos.alive_instances_dissection_info.type_id = sequence_100_InstanceTransitionData_type_id;
18095 wmem_map_insert(
18096 builtin_dissection_infos,
18097 &(_builtin_types_dissection_data->dissection_infos.alive_instances_dissection_info.type_id),
18098 (void*)&(_builtin_types_dissection_data->dissection_infos.alive_instances_dissection_info));
18099
18100 /* @optional sequence<InstanceTransitionData> alive_instances */
18101 for (element = 0; element < _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.num_elements; ++element) {
18102 switch (element) {
18103 case 0:
18104 /* @optional sequence<InstanceTransitionData> alive_instances */
18105 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].flags = MEMBER_OPTIONAL(2);
18106 g_strlcpy(_builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].member_name, "alive_instances", MAX_MEMBER_NAME(256));
18107 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].type_id = sequence_100_InstanceTransitionData_type_id;
18108 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].member_id = element;
18109 break;
18110 case 1:
18111 /* @optional sequence<InstanceTransitionData> disposed_instances */
18112 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].flags = MEMBER_OPTIONAL(2);
18113 g_strlcpy(_builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].member_name, "disposed_instances", MAX_MEMBER_NAME(256));
18114 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].type_id = sequence_100_InstanceTransitionData_type_id;
18115 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].member_id = element;
18116 break;
18117 case 2:
18118 /* @optional sequence<InstanceTransitionData> unregistered_instances */
18119 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].flags = MEMBER_OPTIONAL(2);
18120 g_strlcpy(_builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].member_name, "unregistered_instances", MAX_MEMBER_NAME(256));
18121 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].type_id = sequence_100_InstanceTransitionData_type_id;
18122 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].member_id = element;
18123 break;
18124 case 3:
18125 /* GUID_t writer_guid */
18126 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].flags = 0;
18127 g_strlcpy(_builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].member_name, "writer_gid", MAX_MEMBER_NAME(256));
18128 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].type_id = guid_t_type_id;
18129 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].member_id = element;
18130 break;
18131 case 4:
18132 /* GUID_t reader_guid */
18133 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].flags = 0;
18134 g_strlcpy(_builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].member_name, "reader_gid", MAX_MEMBER_NAME(256));
18135 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].type_id = guid_t_type_id;
18136 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].member_id = element;
18137 break;
18138 case 5:
18139 /* uint32 reader_group_oid */
18140 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].flags = 0;
18141 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));
18142 _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;
18143 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].member_id = element;
18144 break;
18145 case 6:
18146 /* boolean complete_snapshot */
18147 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].flags = 0;
18148 g_strlcpy(_builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].member_name, "complete_snapshot", MAX_MEMBER_NAME(256));
18149 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].type_id = RTI_CDR_TYPE_OBJECT_TYPE_KIND_BOOLEAN_TYPE;
18150 _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].member_id = element;
18151 break;
18152 }
18153 }
18154}
18155
18156void proto_register_rtps(void) {
18157
18158 static hf_register_info hf[] = {
18159 { &hf_rtps_ping, {
18160 "Ping String",
18161 "rtps.ping_str",
18162 FT_STRING,
18163 BASE_NONE,
18164 NULL((void*)0),
18165 0,
18166 "RTPS Ping String",
18167 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18168 },
18169 { &hf_rtps_magic, {
18170 "Magic",
18171 "rtps.magic",
18172 FT_STRING,
18173 BASE_NONE,
18174 NULL((void*)0),
18175 0,
18176 "RTPS magic",
18177 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18178 },
18179 /* Protocol Version (composed as major.minor) -------------------------- */
18180 { &hf_rtps_protocol_version, {
18181 "version",
18182 "rtps.version",
18183 FT_UINT16,
18184 BASE_HEX,
18185 NULL((void*)0),
18186 0,
18187 "RTPS protocol version number",
18188 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18189 },
18190 { &hf_rtps_protocol_version_major, {
18191 "major",
18192 "rtps.version.major",
18193 FT_INT8,
18194 BASE_DEC,
18195 NULL((void*)0),
18196 0,
18197 "RTPS major protocol version number",
18198 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18199 },
18200 { &hf_rtps_protocol_version_minor, {
18201 "minor",
18202 "rtps.version.minor",
18203 FT_INT8,
18204 BASE_DEC,
18205 NULL((void*)0),
18206 0,
18207 "RTPS minor protocol version number",
18208 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18209 },
18210
18211 /* Domain Participant and Participant Index ---------------------------- */
18212 { &hf_rtps_domain_id, {
18213 "domain_id",
18214 "rtps.domain_id",
18215 FT_UINT32,
18216 BASE_DEC,
18217 NULL((void*)0),
18218 0,
18219 "Domain ID",
18220 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18221 },
18222
18223 { &hf_rtps_domain_tag, {
18224 "domain_tag",
18225 "rtps.domain_tag",
18226 FT_STRINGZ,
18227 BASE_NONE,
18228 NULL((void*)0),
18229 0,
18230 "Domain Tag ID",
18231 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18232 },
18233
18234 { &hf_rtps_participant_idx, {
18235 "participant_idx",
18236 "rtps.participant_idx",
18237 FT_UINT32,
18238 BASE_DEC,
18239 NULL((void*)0),
18240 0,
18241 "Participant index",
18242 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18243 },
18244 { &hf_rtps_nature_type, {
18245 "traffic_nature",
18246 "rtps.traffic_nature",
18247 FT_UINT32,
18248 BASE_DEC,
18249 VALS(nature_type_vals)((0 ? (const struct _value_string*)0 : ((nature_type_vals)))),
18250 0,
18251 "Nature of the traffic (meta/user-traffic uni/multi-cast)",
18252 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18253 },
18254
18255 /* Vendor ID ----------------------------------------------------------- */
18256 { &hf_rtps_vendor_id, {
18257 "vendorId",
18258 "rtps.vendorId",
18259 FT_UINT16,
18260 BASE_HEX,
18261 NULL((void*)0),
18262 0,
18263 "Unique identifier of the DDS vendor that generated this packet",
18264 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18265 },
18266
18267 /* Guid Prefix for the Packet ------------------------------------------ */
18268 { &hf_rtps_guid_prefix_v1,
18269 { "guidPrefix", "rtps.guidPrefix_v1",
18270 FT_UINT64, BASE_HEX, NULL((void*)0), 0,
18271 "GuidPrefix of the RTPS packet", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18272 },
18273
18274 { &hf_rtps_guid_prefix,
18275 { "guidPrefix", "rtps.guidPrefix",
18276 FT_BYTES, BASE_NONE, NULL((void*)0), 0,
18277 "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) }
18278 },
18279
18280 { &hf_rtps_guid_prefix_src,
18281 { "guidPrefix", "rtps.guidPrefix.src",
18282 FT_BYTES, BASE_NONE, NULL((void*)0), 0,
18283 "the guidPrefix of the entity sending the sample", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18284 },
18285
18286 { &hf_rtps_guid_prefix_dst,
18287 { "guidPrefix", "rtps.guidPrefix.dst",
18288 FT_BYTES, BASE_NONE, NULL((void*)0), 0,
18289 "the guidPrefix of the entity receiving the sample", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18290 },
18291
18292 /* Host ID ------------------------------------------------------------- */
18293 { &hf_rtps_host_id, { /* HIDDEN */
18294 "hostId",
18295 "rtps.hostId",
18296 FT_UINT32,
18297 BASE_HEX,
18298 NULL((void*)0),
18299 0,
18300 "Sub-component 'hostId' of the GuidPrefix of the RTPS packet",
18301 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18302 },
18303
18304 /* AppID (composed as instanceId, appKind) ----------------------------- */
18305 { &hf_rtps_app_id, {
18306 "appId",
18307 "rtps.appId",
18308 FT_UINT32,
18309 BASE_HEX,
18310 NULL((void*)0),
18311 0,
18312 "Sub-component 'appId' of the GuidPrefix of the RTPS packet",
18313 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18314 },
18315 { &hf_rtps_app_id_instance_id, {
18316 "appId.instanceId",
18317 "rtps.appId.instanceId",
18318 FT_UINT24,
18319 BASE_HEX,
18320 NULL((void*)0),
18321 0,
18322 "'instanceId' field of the 'AppId' structure",
18323 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18324 },
18325 { &hf_rtps_app_id_app_kind, {
18326 "appid.appKind",
18327 "rtps.appId.appKind",
18328 FT_UINT8,
18329 BASE_HEX,
18330 VALS(app_kind_vals)((0 ? (const struct _value_string*)0 : ((app_kind_vals)))),
18331 0,
18332 "'appKind' field of the 'AppId' structure",
18333 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18334 },
18335
18336
18337
18338 /* Submessage ID ------------------------------------------------------- */
18339 { &hf_rtps_sm_id, {
18340 "submessageId",
18341 "rtps.sm.id",
18342 FT_UINT8,
18343 BASE_HEX,
18344 VALS(submessage_id_vals)((0 ? (const struct _value_string*)0 : ((submessage_id_vals))
))
,
18345 0,
18346 "defines the type of submessage",
18347 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18348 },
18349
18350 { &hf_rtps_sm_idv2, {
18351 "submessageId",
18352 "rtps.sm.id",
18353 FT_UINT8,
18354 BASE_HEX,
18355 VALS(submessage_id_valsv2)((0 ? (const struct _value_string*)0 : ((submessage_id_valsv2
))))
,
18356 0,
18357 "defines the type of submessage",
18358 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18359 },
18360
18361 /* Submessage flags ---------------------------------------------------- */
18362 { &hf_rtps_sm_flags, {
18363 "Flags",
18364 "rtps.sm.flags",
18365 FT_UINT8,
18366 BASE_HEX,
18367 NULL((void*)0),
18368 0,
18369 "bitmask representing the flags associated with a submessage",
18370 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18371 },
18372 { &hf_rtps_sm_flags2, {
18373 "Flags",
18374 "rtps.sm.flags",
18375 FT_UINT16,
18376 BASE_HEX,
18377 NULL((void*)0),
18378 0,
18379 "bitmask representing the flags associated with a submessage",
18380 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18381 },
18382
18383 /* octets to next header ---------------------------------------------- */
18384 { &hf_rtps_sm_octets_to_next_header, {
18385 "octetsToNextHeader",
18386 "rtps.sm.octetsToNextHeader",
18387 FT_UINT16,
18388 BASE_DEC,
18389 NULL((void*)0),
18390 0,
18391 "Size of the submessage payload",
18392 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18393 },
18394
18395 /* GUID as {GuidPrefix, EntityId} ------------------------------------ */
18396 { &hf_rtps_sm_guid_prefix_v1, {
18397 "guidPrefix",
18398 "rtps.sm.guidPrefix_v1",
18399 FT_UINT64,
18400 BASE_HEX,
18401 NULL((void*)0),
18402 0,
18403 "a generic guidPrefix that is transmitted inside the submessage (this is NOT the guidPrefix described in the packet header)",
18404 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18405 },
18406
18407 { &hf_rtps_sm_guid_prefix, {
18408 "guidPrefix",
18409 "rtps.sm.guidPrefix",
18410 FT_BYTES,
18411 BASE_NONE,
18412 NULL((void*)0),
18413 0,
18414 "a generic guidPrefix that is transmitted inside the submessage (this is NOT the guidPrefix described in the packet header)",
18415 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18416 },
18417
18418 { &hf_rtps_sm_host_id, {
18419 "host_id",
18420 "rtps.sm.guidPrefix.hostId",
18421 FT_UINT32,
18422 BASE_HEX,
18423 NULL((void*)0),
18424 0,
18425 "The hostId component of the rtps.sm.guidPrefix",
18426 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18427 },
18428
18429 { &hf_rtps_sm_app_id, {
18430 "appId",
18431 "rtps.sm.guidPrefix.appId",
18432 FT_UINT32,
18433 BASE_HEX,
18434 NULL((void*)0),
18435 0,
18436 "AppId component of the rtps.sm.guidPrefix",
18437 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18438 },
18439 { &hf_rtps_sm_instance_id_v1, {
18440 "instanceId",
18441 "rtps.sm.guidPrefix.appId.instanceId",
18442 FT_UINT24,
18443 BASE_HEX,
18444 NULL((void*)0),
18445 0,
18446 "instanceId component of the AppId of the rtps.sm.guidPrefix",
18447 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18448 },
18449 { &hf_rtps_sm_app_kind, {
18450 "appKind",
18451 "rtps.sm.guidPrefix.appId.appKind",
18452 FT_UINT8,
18453 BASE_HEX,
18454 NULL((void*)0),
18455 0,
18456 "appKind component of the AppId of the rtps.sm.guidPrefix",
18457 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18458 },
18459 { &hf_rtps_sm_instance_id, {
18460 "instanceId",
18461 "rtps.sm.guidPrefix.instanceId",
18462 FT_UINT32,
18463 BASE_HEX,
18464 NULL((void*)0),
18465 0,
18466 "instanceId component of the rtps.sm.guidPrefix",
18467 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18468 },
18469
18470 /* Entity ID (composed as entityKey, entityKind) ----------------------- */
18471 { &hf_rtps_sm_entity_id, {
18472 "entityId",
18473 "rtps.sm.entityId",
18474 FT_UINT32,
18475 BASE_HEX,
18476 VALS(entity_id_vals)((0 ? (const struct _value_string*)0 : ((entity_id_vals)))),
18477 0,
18478 "Object entity ID as it appears in a DATA submessage (keyHashSuffix)",
18479 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18480 },
18481 { &hf_rtps_sm_entity_id_key, {
18482 "entityKey",
18483 "rtps.sm.entityId.entityKey",
18484 FT_UINT24,
18485 BASE_HEX,
18486 NULL((void*)0),
18487 0,
18488 "'entityKey' field of the object entity ID",
18489 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18490 },
18491 { &hf_rtps_sm_entity_id_kind, {
18492 "entityKind",
18493 "rtps.sm.entityId.entityKind",
18494 FT_UINT8,
18495 BASE_HEX,
18496 VALS(entity_kind_vals)((0 ? (const struct _value_string*)0 : ((entity_kind_vals)))),
18497 0,
18498 "'entityKind' field of the object entity ID",
18499 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18500 },
18501
18502 { &hf_rtps_sm_rdentity_id, {
18503 "readerEntityId",
18504 "rtps.sm.rdEntityId",
18505 FT_UINT32,
18506 BASE_HEX,
18507 VALS(entity_id_vals)((0 ? (const struct _value_string*)0 : ((entity_id_vals)))),
18508 0,
18509 "Reader entity ID as it appears in a submessage",
18510 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18511 },
18512 { &hf_rtps_sm_rdentity_id_key, {
18513 "readerEntityKey",
18514 "rtps.sm.rdEntityId.entityKey",
18515 FT_UINT24,
18516 BASE_HEX,
18517 NULL((void*)0),
18518 0,
18519 "'entityKey' field of the reader entity ID",
18520 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18521 },
18522 { &hf_rtps_sm_rdentity_id_kind, {
18523 "readerEntityKind",
18524 "rtps.sm.rdEntityId.entityKind",
18525 FT_UINT8,
18526 BASE_HEX,
18527 VALS(entity_kind_vals)((0 ? (const struct _value_string*)0 : ((entity_kind_vals)))),
18528 0,
18529 "'entityKind' field of the reader entity ID",
18530 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18531 },
18532
18533 { &hf_rtps_sm_wrentity_id, {
18534 "writerEntityId",
18535 "rtps.sm.wrEntityId",
18536 FT_UINT32,
18537 BASE_HEX,
18538 VALS(entity_id_vals)((0 ? (const struct _value_string*)0 : ((entity_id_vals)))),
18539 0,
18540 "Writer entity ID as it appears in a submessage",
18541 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18542 },
18543 { &hf_rtps_sm_wrentity_id_key, {
18544 "writerEntityKey",
18545 "rtps.sm.wrEntityId.entityKey",
18546 FT_UINT24,
18547 BASE_HEX,
18548 NULL((void*)0),
18549 0,
18550 "'entityKey' field of the writer entity ID",
18551 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18552 },
18553 { &hf_rtps_sm_wrentity_id_kind, {
18554 "writerEntityKind",
18555 "rtps.sm.wrEntityId.entityKind",
18556 FT_UINT8,
18557 BASE_HEX,
18558 VALS(entity_kind_vals)((0 ? (const struct _value_string*)0 : ((entity_kind_vals)))),
18559 0,
18560 "'entityKind' field of the writer entity ID",
18561 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18562 },
18563
18564
18565
18566 /* Sequence number ----------------------------------------------------- */
18567 { &hf_rtps_sm_seq_number, {
18568 "writerSeqNumber",
18569 "rtps.sm.seqNumber",
18570 FT_INT64,
18571 BASE_DEC,
18572 NULL((void*)0),
18573 0,
18574 "Writer sequence number",
18575 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18576 },
18577
18578 { &hf_rtps_info_src_ip, {
18579 "appIpAddress",
18580 "rtps.info_src.ip",
18581 FT_IPv4,
18582 BASE_NONE,
18583 NULL((void*)0),
18584 0,
18585 NULL((void*)0),
18586 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18587 },
18588
18589 { &hf_rtps_info_src_unused, {
18590 "Unused",
18591 "rtps.info_src.unused",
18592 FT_UINT32,
18593 BASE_HEX,
18594 NULL((void*)0),
18595 0,
18596 NULL((void*)0),
18597 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18598 },
18599
18600 /* Parameter Id -------------------------------------------------------- */
18601 { &hf_rtps_parameter_id, {
18602 "parameterId",
18603 "rtps.param.id",
18604 FT_UINT16,
18605 BASE_HEX,
18606 VALS(parameter_id_vals)((0 ? (const struct _value_string*)0 : ((parameter_id_vals)))
)
,
18607 0,
18608 "Parameter Id",
18609 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18610 },
18611
18612 { &hf_rtps_parameter_id_v2, {
18613 "parameterId",
18614 "rtps.param.id",
18615 FT_UINT16,
18616 BASE_HEX,
18617 VALS(parameter_id_v2_vals)((0 ? (const struct _value_string*)0 : ((parameter_id_v2_vals
))))
,
18618 0,
18619 "Parameter Id",
18620 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18621 },
18622
18623 { &hf_rtps_parameter_id_inline_rti, {
18624 "Parameter Id", "rtps.param.id", FT_UINT16,
18625 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) }
18626 },
18627
18628 { &hf_rtps_parameter_id_toc, {
18629 "parameterId",
18630 "rtps.param.id",
18631 FT_UINT16,
18632 BASE_HEX,
18633 VALS(parameter_id_toc_vals)((0 ? (const struct _value_string*)0 : ((parameter_id_toc_vals
))))
,
18634 0,
18635 "Parameter Id",
18636 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18637 },
18638
18639 { &hf_rtps_parameter_id_rti, {
18640 "parameterId",
18641 "rtps.param.id",
18642 FT_UINT16,
18643 BASE_HEX,
18644 VALS(parameter_id_rti_vals)((0 ? (const struct _value_string*)0 : ((parameter_id_rti_vals
))))
,
18645 0,
18646 "Parameter Id",
18647 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18648 },
18649
18650 { &hf_rtps_parameter_id_adl, {
18651 "parameterId",
18652 "rtps.param.id",
18653 FT_UINT16,
18654 BASE_HEX,
18655 VALS(parameter_id_adl_vals)((0 ? (const struct _value_string*)0 : ((parameter_id_adl_vals
))))
,
18656 0,
18657 "Parameter Id",
18658 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18659 },
18660
18661 /* Parameter Length ---------------------------------------------------- */
18662 { &hf_rtps_parameter_length, {
18663 "parameterLength",
18664 "rtps.param.length",
18665 FT_UINT16,
18666 BASE_DEC,
18667 NULL((void*)0),
18668 0,
18669 "Parameter Length",
18670 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18671 },
18672
18673 /* String Length ---------------------------------------------------- */
18674 { &hf_rtps_string_length, {
18675 "String length",
18676 "rtps.param.string.length",
18677 FT_UINT32,
18678 BASE_DEC,
18679 NULL((void*)0),
18680 0,
18681 NULL((void*)0),
18682 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18683 },
18684
18685 /* Parameter / Topic --------------------------------------------------- */
18686 { &hf_rtps_param_topic_name, {
18687 "topic",
18688 "rtps.param.topicName",
18689 FT_STRINGZ,
18690 BASE_NONE,
18691 NULL((void*)0),
18692 0,
18693 "String representing the value value of a PID_TOPIC parameter",
18694 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18695 },
18696
18697 /* Parameter / Strength ------------------------------------------------ */
18698 { &hf_rtps_param_strength, {
18699 "strength",
18700 "rtps.param.strength",
18701 FT_INT32,
18702 BASE_DEC,
18703 NULL((void*)0),
18704 0,
18705 "Decimal value representing the value of a PID_OWNERSHIP_STRENGTH parameter",
18706 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18707 },
18708
18709 /* Parameter / Type Name ----------------------------------------------- */
18710 { &hf_rtps_param_type_name, {
18711 "typeName",
18712 "rtps.param.typeName",
18713 FT_STRINGZ,
18714 BASE_NONE,
18715 NULL((void*)0),
18716 0,
18717 "String representing the value of a PID_TYPE_NAME parameter",
18718 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18719 },
18720
18721 /* Parameter / User Data ----------------------------------------------- */
18722 { &hf_rtps_param_user_data, {
18723 "userData",
18724 "rtps.param.userData",
18725 FT_BYTES,
18726 BASE_NONE,
18727 NULL((void*)0),
18728 0,
18729 "The user data sent in a PID_USER_DATA parameter",
18730 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18731 },
18732
18733 /* Parameter / Group Data ---------------------------------------------- */
18734 { &hf_rtps_param_group_data, {
18735 "groupData",
18736 "rtps.param.groupData",
18737 FT_BYTES,
18738 BASE_NONE,
18739 NULL((void*)0),
18740 0,
18741 "The user data sent in a PID_GROUP_DATA parameter",
18742 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18743 },
18744
18745 { &hf_rtps_transportInfo_classId, {
18746 "classID",
18747 "rtps.transportInfo.classID",
18748 FT_INT32,
18749 BASE_DEC,
18750 NULL((void*)0),
18751 0,
18752 "Class ID of transport",
18753 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18754 },
18755
18756 { &hf_rtps_transportInfo_messageSizeMax, {
18757 "messageSizeMax",
18758 "rtps.transportInfo.messageSizeMax",
18759 FT_INT32,
18760 BASE_DEC,
18761 NULL((void*)0),
18762 0,
18763 "Maximum message size of transport",
18764 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18765 },
18766 { &hf_rtps_coherent_set_start, {
18767 "Coherent set start",
18768 "rtps.coherent_set.start",
18769 FT_UINT64,
18770 BASE_DEC,
18771 NULL((void*)0),
18772 0,
18773 "Start of a coherent set",
18774 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18775 },
18776
18777 { &hf_rtps_coherent_set_end, {
18778 "End of coherent set sequence",
18779 "rtps.coherent_set.end",
18780 FT_UINT64,
18781 BASE_DEC,
18782 NULL((void*)0),
18783 0,
18784 "End of a coherent set",
18785 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18786 },
18787
18788 /* Parameter / Topic Data ---------------------------------------------- */
18789 { &hf_rtps_param_topic_data, {
18790 "topicData",
18791 "rtps.param.topicData",
18792 FT_BYTES,
18793 BASE_NONE,
18794 NULL((void*)0),
18795 0,
18796 "The user data sent in a PID_TOPIC_DATA parameter",
18797 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18798 },
18799
18800
18801 /* Parameter / Content Filter Name ------------------------------------- */
18802 { &hf_rtps_param_content_filter_topic_name, {
18803 "contentFilterTopicName",
18804 "rtps.param.contentFilterTopicName",
18805 FT_STRINGZ,
18806 BASE_NONE,
18807 NULL((void*)0),
18808 0,
18809 "Value of the content filter topic name as sent in a PID_CONTENT_FILTER_PROPERTY parameter",
18810 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18811 },
18812 { &hf_rtps_param_related_topic_name, {
18813 "relatedTopicName",
18814 "rtps.param.relatedTopicName",
18815 FT_STRINGZ,
18816 BASE_NONE,
18817 NULL((void*)0),
18818 0,
18819 "Value of the related topic name as sent in a PID_CONTENT_FILTER_PROPERTY parameter",
18820 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18821 },
18822 { &hf_rtps_param_filter_class_name, {
18823 "filterClassName",
18824 "rtps.param.filterClassName",
18825 FT_STRINGZ,
18826 BASE_NONE,
18827 NULL((void*)0),
18828 0,
18829 "Value of the filter class name as sent in a PID_CONTENT_FILTER_PROPERTY parameter",
18830 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18831 },
18832
18833 { &hf_rtps_durability_service_cleanup_delay,
18834 { "Service Cleanup Delay", "rtps.durability.service_cleanup_delay",
18835 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL((void*)0), 0,
18836 "Time using the RTPS time_t standard format", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18837 },
18838
18839 { &hf_rtps_liveliness_lease_duration,
18840 { "Lease Duration", "rtps.liveliness.lease_duration",
18841 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL((void*)0), 0,
18842 "Time using the RTPS time_t standard format", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18843 },
18844
18845 { &hf_rtps_participant_lease_duration,
18846 { "Duration", "rtps.participant_lease_duration",
18847 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL((void*)0), 0,
18848 "Time using the RTPS time_t standard format", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18849 },
18850
18851 { &hf_rtps_time_based_filter_minimum_separation,
18852 { "Minimum Separation", "rtps.time_based_filter.minimum_separation",
18853 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL((void*)0), 0,
18854 "Time using the RTPS time_t standard format", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18855 },
18856
18857 { &hf_rtps_reliability_max_blocking_time,
18858 { "Max Blocking Time", "rtps.reliability.max_blocking_time",
18859 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL((void*)0), 0,
18860 "Time using the RTPS time_t standard format", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18861 },
18862
18863 { &hf_rtps_deadline_period,
18864 { "Period", "rtps.deadline_period",
18865 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL((void*)0), 0,
18866 "Time using the RTPS time_t standard format", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18867 },
18868
18869 { &hf_rtps_latency_budget_duration,
18870 { "Duration", "rtps.latency_budget.duration",
18871 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL((void*)0), 0,
18872 "Time using the RTPS time_t standard format", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18873 },
18874
18875 { &hf_rtps_lifespan_duration,
18876 { "Duration", "rtps.lifespan",
18877 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL((void*)0), 0,
18878 "Time using the RTPS time_t standard format", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18879 },
18880
18881 { &hf_rtps_persistence,
18882 { "Persistence", "rtps.persistence",
18883 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL((void*)0), 0,
18884 "Time using the RTPS time_t standard format", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18885 },
18886
18887 { &hf_rtps_info_ts_timestamp,
18888 { "Timestamp", "rtps.info_ts.timestamp",
18889 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL((void*)0), 0,
18890 "Time using the RTPS time_t standard format", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18891 },
18892
18893 { &hf_rtps_timestamp,
18894 { "Timestamp", "rtps.timestamp",
18895 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL((void*)0), 0,
18896 "Time using the RTPS time_t standard format", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18897 },
18898
18899 { &hf_rtps_locator_kind,
18900 { "Kind", "rtps.locator.kind",
18901 FT_UINT32, BASE_HEX, VALS(rtps_locator_kind_vals)((0 ? (const struct _value_string*)0 : ((rtps_locator_kind_vals
))))
, 0,
18902 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18903 },
18904
18905 { &hf_rtps_locator_port,
18906 { "Port", "rtps.locator.port",
18907 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
18908 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18909 },
18910#if 0
18911 { &hf_rtps_logical_port,
18912 { "RTPS Logical Port", "rtps.locator.port",
18913 FT_INT32, BASE_DEC, NULL((void*)0), 0,
18914 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18915 },
18916#endif
18917 { &hf_rtps_locator_public_address_port,
18918 { "Public Address Port", "rtps.locator.public_address_port",
18919 FT_INT32, BASE_DEC, NULL((void*)0), 0,
18920 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18921 },
18922
18923 { &hf_rtps_locator_ipv4,
18924 { "Address", "rtps.locator.ipv4",
18925 FT_IPv4, BASE_NONE, NULL((void*)0), 0,
18926 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18927 },
18928
18929 { &hf_rtps_locator_ipv6,
18930 { "Address", "rtps.locator.ipv6",
18931 FT_IPv6, BASE_NONE, NULL((void*)0), 0,
18932 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18933 },
18934
18935 { &hf_rtps_participant_builtin_endpoints,
18936 { "BuiltIn Endpoint", "rtps.participant_builtin_endpoints",
18937 FT_UINT32, BASE_HEX, NULL((void*)0), 0,
18938 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18939 },
18940
18941 { &hf_rtps_participant_manual_liveliness_count,
18942 { "Manual Liveliness Count", "rtps.participant_manual_liveliness_count",
18943 FT_UINT32, BASE_HEX, NULL((void*)0), 0,
18944 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18945 },
18946
18947 { &hf_rtps_history_depth,
18948 { "Depth", "rtps.history_depth",
18949 FT_INT32, BASE_DEC, NULL((void*)0), 0,
18950 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18951 },
18952
18953 { &hf_rtps_resource_limit_max_samples,
18954 { "Max Samples", "rtps.resource_limit.max_samples",
18955 FT_INT32, BASE_DEC, NULL((void*)0), 0,
18956 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18957 },
18958
18959 { &hf_rtps_resource_limit_max_instances,
18960 { "Max Instances", "rtps.resource_limit.max_instances",
18961 FT_INT32, BASE_DEC, NULL((void*)0), 0,
18962 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18963 },
18964
18965 { &hf_rtps_resource_limit_max_samples_per_instances,
18966 { "Max Samples Per Instance", "rtps.resource_limit.max_samples_per_instance",
18967 FT_INT32, BASE_DEC, NULL((void*)0), 0,
18968 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18969 },
18970
18971 { &hf_rtps_filter_bitmap,
18972 { "Filter Bitmap", "rtps.filter_bitmap",
18973 FT_UINT32, BASE_HEX, NULL((void*)0), 0,
18974 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18975 },
18976
18977 { &hf_rtps_type_checksum,
18978 { "Checksum", "rtps.type_checksum",
18979 FT_UINT32, BASE_HEX, NULL((void*)0), 0,
18980 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18981 },
18982
18983 { &hf_rtps_queue_size,
18984 { "queueSize", "rtps.queue_size",
18985 FT_UINT32, BASE_HEX, NULL((void*)0), 0,
18986 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18987 },
18988
18989 { &hf_rtps_acknack_count,
18990 { "Count", "rtps.acknack.count",
18991 FT_INT32, BASE_DEC, NULL((void*)0), 0,
18992 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18993 },
18994
18995 { &hf_rtps_param_app_ack_virtual_writer_count,
18996 { "virtualWriterCount", "rtps.app_ack.virtual_writer_count",
18997 FT_INT32, BASE_DEC, NULL((void*)0), 0,
18998 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
18999 },
19000
19001 { &hf_rtps_param_app_ack_count,
19002 { "count", "rtps.app_ack.count",
19003 FT_INT32, BASE_DEC, NULL((void*)0), 0,
19004 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19005 },
19006
19007 { &hf_rtps_param_app_ack_conf_virtual_writer_count,
19008 { "virtualWriterCount", "rtps.app_ack_conf.virtual_writer_count",
19009 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
19010 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19011 },
19012
19013 { &hf_rtps_param_app_ack_conf_count,
19014 { "count", "rtps.app_ack_conf.count",
19015 FT_INT32, BASE_DEC, NULL((void*)0), 0,
19016 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19017 },
19018
19019 { &hf_rtps_param_app_ack_interval_payload_length,
19020 { "intervalPayloadLength", "rtps.app_ack.interval_payload_length",
19021 FT_INT16, BASE_DEC, NULL((void*)0), 0,
19022 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19023 },
19024
19025 { &hf_rtps_param_app_ack_interval_flags,
19026 { "intervalFlags", "rtps.app_ack.interval_flags",
19027 FT_INT16, BASE_DEC, NULL((void*)0), 0,
19028 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19029 },
19030
19031 { &hf_rtps_param_app_ack_interval_count,
19032 { "intervalCount", "rtps.app_ack.interval_count",
19033 FT_INT16, BASE_DEC, NULL((void*)0), 0,
19034 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19035 },
19036
19037 { &hf_rtps_param_app_ack_octets_to_next_virtual_writer,
19038 { "octetsToNextVirtualWriter", "rtps.app_ack.octets_to_next_virtual_writer",
19039 FT_INT16, BASE_DEC, NULL((void*)0), 0,
19040 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19041 },
19042
19043 { &hf_rtps_durability_service_history_kind,
19044 { "History Kind", "rtps.durability_service.history_kind",
19045 FT_UINT32, BASE_HEX, VALS(history_qos_vals)((0 ? (const struct _value_string*)0 : ((history_qos_vals)))), 0,
19046 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19047 },
19048
19049 { &hf_rtps_durability_service_history_depth,
19050 { "History Depth", "rtps.durability_service.history_depth",
19051 FT_INT32, BASE_DEC, NULL((void*)0), 0,
19052 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19053 },
19054
19055 { &hf_rtps_durability_service_max_samples,
19056 { "Max Samples", "rtps.durability_service.max_samples",
19057 FT_INT32, BASE_DEC, NULL((void*)0), 0,
19058 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19059 },
19060
19061 { &hf_rtps_durability_service_max_instances,
19062 { "Max Instances", "rtps.durability_service.max_instances",
19063 FT_INT32, BASE_DEC, NULL((void*)0), 0,
19064 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19065 },
19066
19067 { &hf_rtps_durability_service_max_samples_per_instances,
19068 { "Max Samples Per Instance", "rtps.durability_service.max_samples_per_instance",
19069 FT_INT32, BASE_DEC, NULL((void*)0), 0,
19070 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19071 },
19072
19073 { &hf_rtps_liveliness_kind,
19074 { "Kind", "rtps.liveliness.kind",
19075 FT_UINT32, BASE_HEX, VALS(liveliness_qos_vals)((0 ? (const struct _value_string*)0 : ((liveliness_qos_vals)
)))
, 0,
19076 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19077 },
19078
19079 { &hf_rtps_manager_key,
19080 { "Key", "rtps.manager_key",
19081 FT_UINT32, BASE_HEX, NULL((void*)0), 0,
19082 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19083 },
19084
19085 { &hf_rtps_locator_udp_v4,
19086 { "Address", "rtps.locator_udp_v4.ip",
19087 FT_IPv4, BASE_NONE, NULL((void*)0), 0,
19088 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19089 },
19090
19091 { &hf_rtps_locator_udp_v4_port,
19092 { "Port", "rtps.locator_udp_v4.port",
19093 FT_UINT32, BASE_HEX, NULL((void*)0), 0,
19094 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19095 },
19096
19097 { &hf_param_ip_address,
19098 { "Address", "rtps.param.ip_address",
19099 FT_IPv4, BASE_NONE, NULL((void*)0), 0,
19100 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19101 },
19102
19103 { &hf_rtps_param_port,
19104 { "Port", "rtps.param.port",
19105 FT_UINT32, BASE_HEX, NULL((void*)0), 0,
19106 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19107 },
19108
19109 { &hf_rtps_expects_inline_qos,
19110 { "Inline QoS", "rtps.expects_inline_qos",
19111 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0,
19112 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19113 },
19114
19115 { &hf_rtps_presentation_coherent_access,
19116 { "Coherent Access", "rtps.presentation.coherent_access",
19117 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0,
19118 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19119 },
19120
19121 { &hf_rtps_presentation_ordered_access,
19122 { "Ordered Access", "rtps.presentation.ordered_access",
19123 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0,
19124 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19125 },
19126
19127 { &hf_rtps_direct_communication,
19128 { "Direct Communication", "rtps.direct_communication",
19129 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0,
19130 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19131 },
19132
19133 { &hf_rtps_expects_ack,
19134 { "expectsAck", "rtps.expects_ack",
19135 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0,
19136 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19137 },
19138
19139 { &hf_rtps_expects_virtual_heartbeat,
19140 { "expectsVirtualHB", "rtps.expects_virtual_heartbeat",
19141 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0,
19142 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19143 },
19144
19145 { &hf_rtps_reliability_kind,
19146 { "Kind", "rtps.reliability_kind",
19147 FT_UINT32, BASE_HEX, VALS(reliability_qos_vals)((0 ? (const struct _value_string*)0 : ((reliability_qos_vals
))))
, 0,
19148 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19149 },
19150
19151 { &hf_rtps_durability,
19152 { "Durability", "rtps.durability",
19153 FT_UINT32, BASE_HEX, VALS(durability_qos_vals)((0 ? (const struct _value_string*)0 : ((durability_qos_vals)
)))
, 0,
19154 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19155 },
19156
19157 { &hf_rtps_ownership,
19158 { "Kind", "rtps.ownership",
19159 FT_UINT32, BASE_HEX, VALS(ownership_qos_vals)((0 ? (const struct _value_string*)0 : ((ownership_qos_vals))
))
, 0,
19160 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19161 },
19162
19163 { &hf_rtps_presentation_access_scope,
19164 { "Access Scope", "rtps.presentation.access_scope",
19165 FT_UINT32, BASE_HEX, VALS(presentation_qos_vals)((0 ? (const struct _value_string*)0 : ((presentation_qos_vals
))))
, 0,
19166 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19167 },
19168
19169 { &hf_rtps_destination_order,
19170 { "Kind", "rtps.destination_order",
19171 FT_UINT32, BASE_HEX, VALS(destination_order_qos_vals)((0 ? (const struct _value_string*)0 : ((destination_order_qos_vals
))))
, 0,
19172 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19173 },
19174
19175 { &hf_rtps_history_kind,
19176 { "Kind", "rtps.history.kind",
19177 FT_UINT32, BASE_HEX, VALS(history_qos_vals)((0 ? (const struct _value_string*)0 : ((history_qos_vals)))), 0,
19178 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19179 },
19180
19181 { &hf_rtps_data_status_info,
19182 { "statusInfo", "rtps.data.status_info",
19183 FT_UINT32, BASE_HEX, NULL((void*)0), 0,
19184 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19185 },
19186
19187 { &hf_rtps_param_serialize_encap_kind,
19188 { "encapsulation kind", "rtps.param.serialize.encap_kind",
19189 FT_UINT16, BASE_HEX, VALS(encapsulation_id_vals)((0 ? (const struct _value_string*)0 : ((encapsulation_id_vals
))))
, 0,
19190 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19191 },
19192
19193 { &hf_rtps_param_serialize_encap_len,
19194 { "encapsulation options", "rtps.param.serialize.encap_len",
19195 FT_UINT16, BASE_HEX, NULL((void*)0), 0,
19196 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19197 },
19198
19199 /* Parameter / NtpTime ------------------------------------------------- */
19200 { &hf_rtps_param_timestamp_sec, {
19201 "seconds", "rtps.param.ntpTime.sec",
19202 FT_INT32, BASE_DEC, NULL((void*)0), 0,
19203 "The 'second' component of an RTPS time_t",
19204 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19205 },
19206
19207 { &hf_rtps_param_timestamp_fraction, {
19208 "fraction", "rtps.param.ntpTime.fraction",
19209 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
19210 "The 'fraction' component of an RTPS time_t",
19211 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19212 },
19213
19214 { &hf_rtps_param_transport_priority,
19215 { "Value", "rtps.param.transport_priority",
19216 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
19217 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19218 },
19219
19220 { &hf_rtps_param_type_max_size_serialized,
19221 { "Value", "rtps.param.type_max_size_serialized",
19222 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
19223 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19224 },
19225
19226 { &hf_rtps_param_peer_host_epoch,
19227 { "Peer Host Epoch", "rtps.param.peer_host_epoch",
19228 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
19229 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19230 },
19231
19232 { &hf_rtps_param_endpoint_property_change_epoch,
19233 { "Endpoint Property Change Epoch", "rtps.param.endpoint_property_change_epoch",
19234 FT_INT64, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19235 },
19236
19237 { &hf_rtps_param_entity_name,
19238 { "entityName", "rtps.param.entityName",
19239 FT_STRINGZ, BASE_NONE, NULL((void*)0), 0,
19240 "String representing the name of the entity addressed by the submessage",
19241 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19242 },
19243
19244 { &hf_rtps_param_role_name,
19245 { "roleName", "rtps.param.roleName",
19246 FT_STRINGZ, BASE_NONE, NULL((void*)0), 0,
19247 "String representing the role name of the entity addressed by the submessage",
19248 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19249 },
19250
19251 { &hf_rtps_disable_positive_ack,
19252 { "disablePositiveAcks", "rtps.disable_positive_ack",
19253 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0,
19254 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19255 },
19256
19257 { &hf_rtps_participant_guid_v1,
19258 { "Participant GUID", "rtps.param.participant_guid_v1",
19259 FT_UINT64, BASE_HEX, NULL((void*)0), 0,
19260 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19261 },
19262
19263 { &hf_rtps_participant_guid,
19264 { "Participant GUID", "rtps.param.participant_guid",
19265 FT_BYTES, BASE_NONE, NULL((void*)0), 0,
19266 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19267 },
19268
19269 { &hf_rtps_group_guid_v1,
19270 { "Group GUID", "rtps.param.group_guid_v1",
19271 FT_UINT64, BASE_HEX, NULL((void*)0), 0,
19272 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19273 },
19274
19275 { &hf_rtps_group_guid,
19276 { "Group GUID", "rtps.param.group_guid",
19277 FT_BYTES, BASE_NONE, NULL((void*)0), 0,
19278 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19279 },
19280
19281 { &hf_rtps_endpoint_guid,
19282 { "Endpoint GUID", "rtps.param.endpoint_guid",
19283 FT_BYTES, BASE_NONE, NULL((void*)0), 0,
19284 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19285 },
19286
19287 { &hf_rtps_param_host_id,
19288 { "hostId", "rtps.param.guid.hostId",
19289 FT_UINT32, BASE_HEX, NULL((void*)0), 0,
19290 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19291 },
19292
19293 { &hf_rtps_param_app_id,
19294 { "appId", "rtps.param.guid.appId",
19295 FT_UINT32, BASE_HEX, NULL((void*)0), 0,
19296 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19297 },
19298
19299 { &hf_rtps_param_instance_id_v1,
19300 { "instanceId", "rtps.param.guid.instanceId",
19301 FT_UINT24, BASE_HEX, NULL((void*)0), 0,
19302 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19303 },
19304
19305 { &hf_rtps_param_instance_id,
19306 { "instanceId", "rtps.param.guid.instanceId",
19307 FT_UINT32, BASE_HEX, NULL((void*)0), 0,
19308 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19309 },
19310
19311 { &hf_rtps_param_app_kind,
19312 { "instanceId", "rtps.param.guid.appKind",
19313 FT_UINT8, BASE_HEX, NULL((void*)0), 0,
19314 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19315 },
19316
19317 { &hf_rtps_param_entity,
19318 { "entityId", "rtps.param.guid.entityId",
19319 FT_UINT32, BASE_HEX, VALS(entity_id_vals)((0 ? (const struct _value_string*)0 : ((entity_id_vals)))), 0,
19320 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19321 },
19322
19323 { &hf_rtps_param_entity_key,
19324 { "entityKey", "rtps.param.guid.entityKey",
19325 FT_UINT24, BASE_HEX, NULL((void*)0), 0,
19326 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19327 },
19328
19329 { &hf_rtps_param_entity_kind,
19330 { "entityKind", "rtps.param.guid.entityKind",
19331 FT_UINT8, BASE_HEX, VALS(entity_kind_vals)((0 ? (const struct _value_string*)0 : ((entity_kind_vals)))), 0,
19332 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19333 },
19334
19335 { &hf_rtps_param_extended_pid_length,
19336 { "Extended Length", "rtps.param.extended_pid_length",
19337 FT_UINT32, BASE_HEX, NULL((void*)0), 0,
19338 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19339 },
19340
19341 { &hf_rtps_param_extended_parameter,
19342 { "Extended Parameter", "rtps.param.extended_parameter",
19343 FT_UINT32, BASE_HEX, NULL((void*)0), 0,
19344 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19345 },
19346
19347 { &hf_rtps_data_frag_number,
19348 { "fragmentStartingNum", "rtps.data_frag.number",
19349 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
19350 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19351 },
19352
19353 { &hf_rtps_data_frag_sample_size,
19354 { "sampleSize", "rtps.data_frag.sample_size",
19355 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
19356 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19357 },
19358
19359 { &hf_rtps_data_frag_num_fragments,
19360 { "fragmentsInSubmessage", "rtps.data_frag.num_fragments",
19361 FT_UINT16, BASE_DEC, NULL((void*)0), 0,
19362 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19363 },
19364
19365 { &hf_rtps_data_frag_size,
19366 { "fragmentSize", "rtps.data_frag.size",
19367 FT_UINT16, BASE_DEC, NULL((void*)0), 0,
19368 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19369 },
19370
19371 { &hf_rtps_nokey_data_frag_number,
19372 { "fragmentStartingNum", "rtps.nokey_data_frag.number",
19373 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
19374 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19375 },
19376
19377 { &hf_rtps_nokey_data_frag_num_fragments,
19378 { "fragmentsInSubmessage", "rtps.nokey_data_frag.num_fragments",
19379 FT_UINT16, BASE_DEC, NULL((void*)0), 0,
19380 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19381 },
19382
19383 { &hf_rtps_nokey_data_frag_size,
19384 { "fragmentSize", "rtps.nokey_data_frag.size",
19385 FT_UINT16, BASE_DEC, NULL((void*)0), 0,
19386 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19387 },
19388
19389 { &hf_rtps_nack_frag_count,
19390 { "Count", "rtps.nack_frag.count",
19391 FT_INT32, BASE_DEC, NULL((void*)0), 0,
19392 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19393 },
19394
19395 { &hf_rtps_heartbeat_frag_number,
19396 { "lastFragmentNum", "rtps.heartbeat_frag.number",
19397 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
19398 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19399 },
19400
19401 { &hf_rtps_heartbeat_frag_count,
19402 { "Count", "rtps.heartbeat_frag.count",
19403 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
19404 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19405 },
19406
19407 { &hf_rtps_heartbeat_batch_count,
19408 { "Count", "rtps.heartbeat_batch.count",
19409 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
19410 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19411 },
19412
19413 { &hf_rtps_virtual_heartbeat_count,
19414 { "Count", "rtps.virtual_heartbeat.count",
19415 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
19416 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19417 },
19418
19419 { &hf_rtps_virtual_heartbeat_num_virtual_guids,
19420 { "numVirtualGUIDs", "rtps.virtual_heartbeat.num_virtual_guids",
19421 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
19422 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19423 },
19424
19425 { &hf_rtps_virtual_heartbeat_num_writers,
19426 { "numWriters", "rtps.virtual_heartbeat.num_writers",
19427 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
19428 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19429 },
19430
19431 { &hf_rtps_data_serialize_data, {
19432 "serializedData", "rtps.data.serialize_data",
19433 FT_BYTES, BASE_NONE, NULL((void*)0), 0,
19434 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19435 },
19436
19437 { &hf_rtps_parameter_data, {
19438 "parameterData", "rtps.parameter_data",
19439 FT_BYTES, BASE_NONE, NULL((void*)0), 0,
19440 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19441 },
19442
19443 { &hf_rtps_data_batch_timestamp,
19444 { "Timestamp", "rtps.data_batch.timestamp",
19445 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL((void*)0), 0,
19446 "Time using the RTPS time_t standard format", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19447 },
19448
19449 { &hf_rtps_data_batch_offset_to_last_sample_sn,
19450 { "offsetToLastSampleSN", "rtps.data_batch.offset_to_last_sample_sn",
19451 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
19452 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19453 },
19454
19455 { &hf_rtps_data_batch_sample_count,
19456 { "batchSampleCount", "rtps.data_batch.sample_count",
19457 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
19458 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19459 },
19460
19461 { &hf_rtps_data_batch_offset_sn,
19462 { "offsetSN", "rtps.data_batch.offset_sn",
19463 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
19464 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19465 },
19466
19467 { &hf_rtps_data_batch_octets_to_sl_encap_id,
19468 { "octetsToSLEncapsulationId", "rtps.data_batch.octets_to_sl_encap_id",
19469 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
19470 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19471 },
19472
19473 { &hf_rtps_data_batch_serialized_data_length,
19474 { "serializedDataLength", "rtps.data_batch.serialized_data_length",
19475 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
19476 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19477 },
19478
19479 { &hf_rtps_data_batch_octets_to_inline_qos,
19480 { "octetsToInlineQos", "rtps.data_batch.octets_to_inline_qos",
19481 FT_UINT16, BASE_DEC, NULL((void*)0), 0,
19482 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19483 },
19484
19485 { &hf_rtps_fragment_number_base64,
19486 { "bitmapBase", "rtps.fragment_number.base64",
19487 FT_UINT64, BASE_DEC, NULL((void*)0), 0,
19488 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19489 },
19490
19491 { &hf_rtps_fragment_number_base,
19492 { "bitmapBase", "rtps.fragment_number.base32",
19493 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
19494 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19495 },
19496
19497 { &hf_rtps_fragment_number_num_bits,
19498 { "numBits", "rtps.fragment_number.num_bits",
19499 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
19500 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19501 },
19502
19503 { &hf_rtps_bitmap_num_bits,
19504 { "numBits", "rtps.bitmap.num_bits",
19505 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
19506 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19507 },
19508
19509 { &hf_rtps_acknack_analysis,
19510 { "Acknack Analysis", "rtps.sm.acknack_analysis",
19511 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
19512 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19513 },
19514
19515 { &hf_rtps_param_partition_num,
19516 { "Number of partition names", "rtps.param.partition_num",
19517 FT_INT32, BASE_DEC, NULL((void*)0), 0,
19518 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19519 },
19520
19521 { &hf_rtps_param_topic_alias_num,
19522 { "Number of topic aliases", "rtps.param.topic_alias_num",
19523 FT_INT32, BASE_DEC, NULL((void*)0), 0,
19524 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19525 },
19526
19527 { &hf_rtps_param_type_alias_num,
19528 { "Number of type aliases", "rtps.param.type_alias_num",
19529 FT_INT32, BASE_DEC, NULL((void*)0), 0,
19530 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19531 },
19532
19533 { &hf_rtps_param_expression_parameters_num,
19534 { "Number of expression params", "rtps.param.expression_parameters_num",
19535 FT_INT32, BASE_DEC, NULL((void*)0), 0,
19536 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19537 },
19538
19539 { &hf_rtps_param_partition,
19540 { "name", "rtps.param.partition",
19541 FT_STRING, BASE_NONE, NULL((void*)0), 0,
19542 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19543 },
19544
19545 { &hf_rtps_param_topic_alias,
19546 { "Topic alias", "rtps.param.topic_alias",
19547 FT_STRING, BASE_NONE, NULL((void*)0), 0,
19548 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19549 },
19550
19551 { &hf_rtps_param_type_alias,
19552 { "Type alias", "rtps.param.type_alias",
19553 FT_STRING, BASE_NONE, NULL((void*)0), 0,
19554 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19555 },
19556
19557 { &hf_rtps_param_filter_expression,
19558 { "filterExpression", "rtps.param.filter_expression",
19559 FT_STRING, BASE_NONE, NULL((void*)0), 0,
19560 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19561 },
19562
19563 { &hf_rtps_param_expression_parameters,
19564 { "expressionParameters", "rtps.param.expression_parameters",
19565 FT_STRING, BASE_NONE, NULL((void*)0), 0,
19566 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19567 },
19568
19569 { &hf_rtps_locator_filter_list_num_channels,
19570 { "numberOfChannels", "rtps.param.locator_filter_list.num_channels",
19571 FT_INT32, BASE_DEC, NULL((void*)0), 0,
19572 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19573 },
19574
19575 { &hf_rtps_locator_filter_list_filter_name,
19576 { "filterName", "rtps.param.locator_filter_list.filter_name",
19577 FT_STRING, BASE_NONE, NULL((void*)0), 0,
19578 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19579 },
19580
19581 { &hf_rtps_locator_filter_list_filter_exp,
19582 { "filterExpression", "rtps.param.locator_filter_list.filter_exp",
19583 FT_STRING, BASE_NONE, NULL((void*)0), 0,
19584 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19585 },
19586
19587 { &hf_rtps_extra_flags,
19588 { "Extra flags", "rtps.extra_flags",
19589 FT_UINT16, BASE_HEX, NULL((void*)0), 0xFFFF,
19590 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19591 },
19592
19593 { &hf_rtps_param_builtin_endpoint_set_flags,
19594 { "Flags", "rtps.param.builtin_endpoint_set",
19595 FT_UINT32, BASE_HEX, NULL((void*)0), 0,
19596 "bitmask representing the flags in PID_BUILTIN_ENDPOINT_SET",
19597 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19598 },
19599
19600 { &hf_rtps_param_vendor_builtin_endpoint_set_flags,
19601 { "Flags", "rtps.param.vendor_builtin_endpoint_set",
19602 FT_UINT32, BASE_HEX, NULL((void*)0), 0,
19603 "bitmask representing the flags in PID_VENDOR_BUILTIN_ENDPOINT_SET",
19604 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19605 },
19606
19607 { &hf_rtps_param_builtin_endpoint_ext_set_flags,
19608 { "Flags", "rtps.param.builtin_endpoint_ext_set",
19609 FT_UINT32, BASE_HEX, NULL((void*)0), 0,
19610 "bitmask representing the flags in PID_AVAILABLE_BUILTIN_ENDPOINTS_EXT",
19611 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19612 },
19613
19614 { &hf_rtps_param_endpoint_security_attributes,
19615 { "Flags", "rtps.param.endpoint_security_attributes",
19616 FT_UINT32, BASE_HEX, NULL((void*)0), 0,
19617 "bitmask representing the flags in PID_ENDPOINT_SECURITY_ATTRIBUTES",
19618 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19619 },
19620
19621 { &hf_rtps_param_plugin_promiscuity_kind, {
19622 "promiscuityKind", "rtps.param.plugin_promiscuity_kind",
19623 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) }
19624 },
19625
19626 { &hf_rtps_param_service_kind, {
19627 "serviceKind", "rtps.param.service_kind",
19628 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) }
19629 },
19630
19631 { &hf_rtps_param_data_representation,{
19632 "Data Representation Kind", "rtps.param.data_representation",
19633 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) }
19634 },
19635
19636 { &hf_rtps_param_type_consistency_kind, {
19637 "Type Consistency Kind", "rtps.param.type_consistency_kind",
19638 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) }
19639 },
19640
19641 { &hf_rtps_param_ignore_sequence_bounds, {
19642 "Ignore Sequence Bounds", "rtps.param.ignore_sequence_bounds",
19643 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19644 },
19645
19646 { &hf_rtps_param_ignore_string_bounds, {
19647 "Ignore String Bounds", "rtps.param.ignore_string_bounds",
19648 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19649 },
19650
19651 { &hf_rtps_param_ignore_member_names, {
19652 "Ignore Member Names", "rtps.param.ignore_member_names",
19653 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19654 },
19655
19656 { &hf_rtps_param_prevent_type_widening, {
19657 "Prevent Type Widening", "rtps.param.prevent_type_widening",
19658 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19659 },
19660
19661 { &hf_rtps_param_force_type_validation, {
19662 "Force Type Validation", "rtps.param.force_type_validation",
19663 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19664 },
19665
19666 { &hf_rtps_param_ignore_enum_literal_names, {
19667 "Ignore Enum Literal Names", "rtps.param.ignore_enum_literal_names",
19668 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19669 },
19670
19671 { &hf_rtps_param_acknowledgment_kind, {
19672 "Acknowledgment Kind", "rtps.param.acknowledgment_kind",
19673 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) }
19674 },
19675
19676 /* Finally the raw issue data ------------------------------------------ */
19677 { &hf_rtps_issue_data, {
19678 "serializedData", "rtps.issueData",
19679 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) }
19680 },
19681
19682 { &hf_rtps_param_product_version_major, {
19683 "Major", "rtps.param.product_version.major",
19684 FT_UINT8, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19685 },
19686
19687 { &hf_rtps_param_product_version_minor, {
19688 "Minor", "rtps.param.product_version.minor",
19689 FT_UINT8, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19690 },
19691
19692 { &hf_rtps_param_product_version_release, {
19693 "Release", "rtps.param.product_version.release",
19694 FT_UINT8, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19695 },
19696
19697 { &hf_rtps_param_product_version_release_as_char, {
19698 "Release", "rtps.param.product_version.release_string",
19699 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19700 },
19701
19702 { &hf_rtps_param_product_version_revision, {
19703 "Revision", "rtps.param.product_version.revision",
19704 FT_UINT8, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19705 },
19706
19707 { &hf_rtps_encapsulation_id, {
19708 "encapsulation id", "rtps.encapsulation_id",
19709 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) }
19710 },
19711
19712 { &hf_rtps_encapsulation_kind, {
19713 "kind", "rtps.encapsulation_kind",
19714 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) }
19715 },
19716
19717 { &hf_rtps_octets_to_inline_qos, {
19718 "Octets to inline QoS", "rtps.octets_to_inline_qos",
19719 FT_UINT16, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19720 },
19721
19722 { &hf_rtps_filter_signature, {
19723 "filterSignature", "rtps.filter_signature",
19724 FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19725 },
19726
19727 { &hf_rtps_bitmap, {
19728 "bitmap", "rtps.bitmap",
19729 FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19730 },
19731
19732 { &hf_rtps_property_name, {
19733 "Property Name", "rtps.property_name",
19734 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19735 },
19736
19737 { &hf_rtps_property_value, {
19738 "Value", "rtps.property_value",
19739 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19740 },
19741
19742 { &hf_rtps_union, {
19743 "union", "rtps.union",
19744 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19745 },
19746
19747 { &hf_rtps_union_case, {
19748 "case", "rtps.union_case",
19749 FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19750 },
19751
19752 { &hf_rtps_struct, {
19753 "struct", "rtps.struct",
19754 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19755 },
19756
19757 { &hf_rtps_member_name, {
19758 "member_name", "rtps.member_name",
19759 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19760 },
19761
19762 { &hf_rtps_sequence, {
19763 "sequence", "rtps.sequence",
19764 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19765 },
19766
19767 { &hf_rtps_array, {
19768 "array", "rtps.array",
19769 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19770 },
19771
19772 { &hf_rtps_bitfield, {
19773 "bitfield", "rtps.bitfield",
19774 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19775 },
19776
19777 { &hf_rtps_datatype, {
19778 "datatype", "rtps.datatype",
19779 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19780 },
19781
19782 { &hf_rtps_sequence_size, {
19783 "sequenceSize", "rtps.sequence_size",
19784 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) }
19785 },
19786
19787 { &hf_rtps_guid, {
19788 "guid", "rtps.guid",
19789 FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19790 },
19791
19792 { &hf_rtps_heartbeat_count, {
19793 "count", "rtps.heartbeat_count",
19794 FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19795 },
19796
19797 { &hf_rtps_encapsulation_options, {
19798 "Encapsulation options", "rtps.encapsulation_options",
19799 FT_UINT16, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19800 },
19801
19802 { &hf_rtps_serialized_key, {
19803 "serializedKey", "rtps.serialized_key",
19804 FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19805 },
19806
19807 { &hf_rtps_serialized_data, {
19808 "serializedData", "rtps.serialized_data",
19809 FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19810 },
19811
19812 { &hf_rtps_sm_rti_crc_number, {
19813 "RTPS Message Length", "rtps.sm.rti_crc.message_length",
19814 FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19815 },
19816
19817 { &hf_rtps_sm_rti_crc_result, {
19818 "CRC", "rtps.sm.rti_crc",
19819 FT_UINT32, BASE_HEX, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19820 },
19821 { &hf_rtps_message_length, {
19822 "RTPS Message Length", "rtps.message_length",
19823 FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
19824 },
19825
19826 /* Flag bits */
19827 { &hf_rtps_flag_reserved80, {
19828 "Reserved", "rtps.flag.reserved",
19829 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) }
19830 },
19831 { &hf_rtps_flag_reserved40, {
19832 "Reserved", "rtps.flag.reserved",
19833 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) }
19834 },
19835 { &hf_rtps_flag_reserved20, {
19836 "Reserved", "rtps.flag.reserved",
19837 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) }
19838 },
19839 { &hf_rtps_flag_reserved10, {
19840 "Reserved", "rtps.flag.reserved",
19841 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) }
19842 },
19843 { &hf_rtps_flag_reserved08, {
19844 "Reserved", "rtps.flag.reserved",
19845 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) }
19846 },
19847 { &hf_rtps_flag_reserved04, {
19848 "Reserved", "rtps.flag.reserved",
19849 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) }
19850 },
19851 { &hf_rtps_flag_reserved02, {
19852 "Reserved", "rtps.flag.reserved",
19853 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) }
19854 },
19855 { &hf_rtps_flag_reserved8000, {
19856 "Reserved", "rtps.flag.reserved",
19857 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) }
19858 },
19859 { &hf_rtps_flag_reserved4000, {
19860 "Reserved", "rtps.flag.reserved",
19861 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) }
19862 },
19863 { &hf_rtps_flag_reserved2000, {
19864 "Reserved", "rtps.flag.reserved",
19865 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) }
19866 },
19867 { &hf_rtps_flag_reserved1000, {
19868 "Reserved", "rtps.flag.reserved",
19869 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) }
19870 },
19871 { &hf_rtps_flag_reserved0800, {
19872 "Reserved", "rtps.flag.reserved",
19873 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) }
19874 },
19875 { &hf_rtps_flag_reserved0400, {
19876 "Reserved", "rtps.flag.reserved",
19877 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) }
19878 },
19879 { &hf_rtps_flag_reserved0200, {
19880 "Reserved", "rtps.flag.reserved",
19881 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) }
19882 },
19883 { &hf_rtps_flag_reserved0100, {
19884 "Reserved", "rtps.flag.reserved",
19885 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) }
19886 },
19887 { &hf_rtps_flag_reserved0080, {
19888 "Reserved", "rtps.flag.reserved",
19889 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) }
19890 },
19891 { &hf_rtps_flag_reserved0040, {
19892 "Reserved", "rtps.flag.reserved",
19893 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) }
19894 },
19895 { &hf_rtps_flag_builtin_endpoint_set_reserved, {
19896 "Reserved", "rtps.flag.reserved",
19897 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) }
19898 },
19899 { &hf_rtps_flag_unregister, {
19900 "Unregister flag", "rtps.flag.unregister",
19901 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) }
19902 },
19903 { &hf_rtps_flag_inline_qos_v1, {
19904 "Inline QoS", "rtps.flag.inline_qos",
19905 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) }
19906 },
19907 { &hf_rtps_flag_hash_key, {
19908 "Hash key flag", "rtps.flag.hash_key",
19909 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) }
19910 },
19911 { &hf_rtps_flag_hash_key_rti, {
19912 "Hash key flag", "rtps.flag.hash_key",
19913 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) }
19914 },
19915 { &hf_rtps_flag_alive, {
19916 "Alive flag", "rtps.flag.alive",
19917 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) }
19918 },
19919 { &hf_rtps_flag_data_present_v1, {
19920 "Data present", "rtps.flag.data_present",
19921 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) }
19922 },
19923 { &hf_rtps_flag_multisubmessage, {
19924 "Multi-submessage", "rtps.flag.multisubmessage",
19925 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) }
19926 },
19927 { &hf_rtps_flag_endianness, {
19928 "Endianness", "rtps.flag.endianness",
19929 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) }
19930 },
19931 { &hf_rtps_flag_additional_authenticated_data, {
19932 "Additional Authenticated Data", "rtps.flag.additional_authenticated_data",
19933 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) }
19934 },
19935 { &hf_rtps_flag_protected_with_psk, {
19936 "Message protected with PSK", "rtps.flag.message_protected_with_psk",
19937 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) }
19938 },
19939 { &hf_rtps_flag_vendor_specific_content, {
19940 "Vendor-Specific Content", "rtps.flag.vendor_specific_content",
19941 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) }
19942 },
19943 { &hf_rtps_flag_inline_qos_v2, {
19944 "Inline QoS", "rtps.flag.inline_qos",
19945 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) }
19946 },
19947 { &hf_rtps_flag_data_present_v2, {
19948 "Data present", "rtps.flag.data_present",
19949 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) }
19950 },
19951 { &hf_rtps_flag_status_info, {
19952 "Status info flag", "rtps.flag.status_info",
19953 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) }
19954 },
19955 { &hf_rtps_flag_final, {
19956 "Final flag", "rtps.flag.final",
19957 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) }
19958 },
19959 { &hf_rtps_flag_liveliness, {
19960 "Liveliness flag", "rtps.flag.liveliness",
19961 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) }
19962 },
19963 { &hf_rtps_flag_multicast, {
19964 "Multicast flag", "rtps.flag.multicast",
19965 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) }
19966 },
19967 { &hf_rtps_flag_data_serialized_key, {
19968 "Serialized Key", "rtps.flag.data.serialized_key",
19969 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) }
19970 },
19971 { &hf_rtps_flag_data_frag_serialized_key, {
19972 "Serialized Key", "rtps.flag.data_frag.serialized_key",
19973 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) }
19974 },
19975 { &hf_rtps_flag_timestamp, {
19976 "Timestamp flag", "rtps.flag.timestamp",
19977 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) }
19978 },
19979 { &hf_rtps_flag_no_virtual_guids, {
19980 "No virtual GUIDs flag", "rtps.flag.no_virtual_guids",
19981 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) }
19982 },
19983 { &hf_rtps_flag_multiple_writers, {
19984 "Multiple writers flag", "rtps.flag.multiple_writers",
19985 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) }
19986 },
19987 { &hf_rtps_flag_multiple_virtual_guids, {
19988 "Multiple virtual GUIDs flag", "rtps.flag.multiple_virtual_guids",
19989 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) }
19990 },
19991 { &hf_rtps_flag_serialize_key16, {
19992 "Serialized Key", "rtps.flag.serialize_key",
19993 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) }
19994 },
19995 { &hf_rtps_flag_invalid_sample, {
19996 "Invalid sample", "rtps.flag.invalid_sample",
19997 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) }
19998 },
19999 { &hf_rtps_flag_data_present16, {
20000 "Data present", "rtps.flag.data_present",
20001 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) }
20002 },
20003 { &hf_rtps_flag_offsetsn_present, {
20004 "OffsetSN present", "rtps.flag.offsetsn_present",
20005 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) }
20006 },
20007 { &hf_rtps_flag_inline_qos16_v2, {
20008 "Inline QoS", "rtps.flag.inline_qos",
20009 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) }
20010 },
20011 { &hf_rtps_flag_timestamp_present, {
20012 "Timestamp present", "rtps.flag.timestamp_present",
20013 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) }
20014 },
20015 { &hf_rtps_param_status_info_flags,
20016 { "Flags", "rtps.param.status_info",
20017 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) }
20018 },
20019 { &hf_rtps_header_extension_flags,
20020 { "Flags", "rtps.header_extension_flags",
20021 FT_UINT8, BASE_HEX, NULL((void*)0), 0, "bitmask representing header extension flags", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20022 },
20023 { &hf_rtps_flag_header_extension_parameters, {
20024 "Header Extension Parameter List Present", "rtps.flag.header_extension.parameter_list",
20025 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) }
20026 },
20027 { &hf_rtps_flag_header_extension_checksum2, {
20028 "Header Extension Message Checksum 2", "rtps.flag.header_extension.message_checksum2",
20029 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) }
20030 },
20031 { &hf_rtps_flag_header_extension_checksum1, {
20032 "Header Extension Message Checksum 1", "rtps.flag.header_extension.message_checksum1",
20033 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) }
20034 },
20035 { &hf_rtps_flag_header_extension_wextension, {
20036 "Header Extension W Extension Present", "rtps.flag.header_extension.wextension",
20037 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) }
20038 },
20039 { &hf_rtps_flag_header_extension_uextension, {
20040 "Header Extension U Extension Present", "rtps.flag.header_extension.uextension",
20041 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) }
20042 },
20043 { &hf_rtps_flag_header_extension_timestamp, {
20044 "Header Extension Timestamp Present", "rtps.flag.header_extension.timestamp",
20045 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) }
20046 },
20047 { &hf_rtps_flag_header_extension_message_length, {
20048 "Header Extension Message Length", "rtps.flag.header_extension.message_length",
20049 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) }
20050 },
20051 { &hf_rtps_header_extension_checksum_crc32c, {
20052 "Header Extension Checksum CRC-32C", "rtps.header_extension.checksum_crc32c",
20053 FT_UINT32, BASE_HEX, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20054 },
20055 { &hf_rtps_header_extension_checksum_crc64, {
20056 "Header Extension Checksum CRC64", "rtps.header_extension.checksum_crc64",
20057 FT_UINT64, BASE_HEX, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20058 },
20059 { &hf_rtps_header_extension_checksum_md5, {
20060 "Header Extension Checksum MD5", "rtps.header_extension.checksum_md5",
20061 FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20062 },
20063 { &hf_rtps_uextension, {
20064 "Header Extension uExtension", "rtps.uextension",
20065 FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20066 },
20067 { &hf_rtps_wextension, {
20068 "Header Extension wExtension", "rtps.wextension",
20069 FT_UINT64, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20070 },
20071 { &hf_rtps_flag_unregistered, {
20072 "Unregistered", "rtps.flag.unregistered",
20073 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) }
20074 },
20075 { &hf_rtps_flag_disposed, {
20076 "Disposed", "rtps.flag.undisposed",
20077 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) }
20078 },
20079 { &hf_rtps_flag_participant_announcer, {
20080 "Participant Announcer", "rtps.flag.participant_announcer",
20081 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) }
20082 },
20083 { &hf_rtps_flag_participant_detector, {
20084 "Participant Detector", "rtps.flag.participant_detector",
20085 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) }
20086 },
20087 { &hf_rtps_flag_publication_announcer, {
20088 "Publication Announcer", "rtps.flag.publication_announcer",
20089 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) }
20090 },
20091 { &hf_rtps_flag_publication_detector, {
20092 "Publication Detector", "rtps.flag.publication_detector",
20093 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) }
20094 },
20095 { &hf_rtps_flag_subscription_announcer, {
20096 "Subscription Announcer", "rtps.flag.subscription_announcer",
20097 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) }
20098 },
20099 { &hf_rtps_flag_subscription_detector, {
20100 "Subscription Detector", "rtps.flag.subscription_detector",
20101 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) }
20102 },
20103 { &hf_rtps_flag_participant_proxy_announcer, {
20104 "Participant Proxy Announcer", "rtps.flag.participant_proxy_announcer",
20105 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) }
20106 },
20107 { &hf_rtps_flag_participant_proxy_detector, {
20108 "Participant Proxy Detector", "rtps.flag.participant_proxy_detector",
20109 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) }
20110 },
20111 { &hf_rtps_flag_participant_state_announcer, {
20112 "Participant State Announcer", "rtps.flag.participant_state_announcer",
20113 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) }
20114 },
20115 { &hf_rtps_flag_participant_state_detector, {
20116 "Participant State Detector", "rtps.flag.participant_state_detector",
20117 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) }
20118 },
20119 { &hf_rtps_flag_participant_message_datawriter, {
20120 "Participant Message DataWriter", "rtps.flag.participant_message_datawriter",
20121 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) }
20122 },
20123 { &hf_rtps_flag_participant_message_datareader, {
20124 "Participant Message DataReader", "rtps.flag.participant_message_datareader",
20125 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) }
20126 },
20127 { &hf_rtps_flag_typelookup_request_datawriter, {
20128 "TypeLookup Service Request DataWriter", "rtps.flag.typelookup_request_datawriter",
20129 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) }
20130 },
20131 { &hf_rtps_flag_typelookup_request_datareader, {
20132 "TypeLookup Service Request DataReader", "rtps.flag.typelookup_request_datareader",
20133 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) }
20134 },
20135 { &hf_rtps_flag_typelookup_reply_datawriter, {
20136 "TypeLookup Service Reply DataWriter", "rtps.flag.typelookup_reply_datawriter",
20137 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) }
20138 },
20139 { &hf_rtps_flag_typelookup_reply_datareader, {
20140 "TypeLookup Service Reply DataReader", "rtps.flag.typelookup_reply_datareader",
20141 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) }
20142 },
20143 { &hf_rtps_flag_typelookup_request_secure_datawriter, {
20144 "TypeLookup Service Request Secure DataWriter", "rtps.flag.typelookup_request_secure_datawriter",
20145 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) }
20146 },
20147 { &hf_rtps_flag_typelookup_request_secure_datareader, {
20148 "TypeLookup Service Request Secure DataReader", "rtps.flag.typelookup_request_secure_datareader",
20149 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) }
20150 },
20151 { &hf_rtps_flag_typelookup_reply_secure_datawriter, {
20152 "TypeLookup Service Reply Secure DataWriter", "rtps.flag.typelookup_reply_secure_datawriter",
20153 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) }
20154 },
20155 { &hf_rtps_flag_typelookup_reply_secure_datareader, {
20156 "TypeLookup Service Reply Secure DataReader", "rtps.flag.typelookup_reply_secure_datareader",
20157 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) }
20158 },
20159 { &hf_rtps_flag_secure_publication_writer, {
20160 "Secure Publication Writer", "rtps.flag.secure_publication_writer",
20161 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) }
20162 },
20163 { &hf_rtps_flag_secure_publication_reader, {
20164 "Secure Publication Reader", "rtps.flag.secure_publication_reader",
20165 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) }
20166 },
20167 { &hf_rtps_flag_secure_subscription_writer, {
20168 "Secure Subscription Writer", "rtps.flag.secure_subscription_writer",
20169 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) }
20170 },
20171 { &hf_rtps_flag_secure_subscription_reader, {
20172 "Secure Subscription Reader", "rtps.flag.secure_subscription_reader",
20173 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) }
20174 },
20175 { &hf_rtps_flag_secure_participant_message_writer, {
20176 "Secure Participant Message Writer", "rtps.flag.secure_participant_message_writer",
20177 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) }
20178 },
20179 { &hf_rtps_flag_secure_participant_message_reader, {
20180 "Secure Participant Message Reader", "rtps.flag.secure_participant_message_reader",
20181 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) }
20182 },
20183 { &hf_rtps_flag_participant_stateless_message_writer, {
20184 "Participant Stateless Message Writer", "rtps.flag.participant_stateless_message_writer",
20185 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) }
20186 },
20187 { &hf_rtps_flag_participant_stateless_message_reader, {
20188 "Participant Stateless Message Reader", "rtps.flag.participant_stateless_message_reader",
20189 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) }
20190 },
20191 { &hf_rtps_flag_secure_participant_volatile_message_writer,{
20192 "Secure Participant Volatile Message Writer", "rtps.flag.secure_participant_volatile_message_writer",
20193 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) }
20194 },
20195 { &hf_rtps_flag_secure_participant_volatile_message_reader,{
20196 "Secure Participant Volatile Message Reader", "rtps.flag.secure_participant_volatile_message_reader",
20197 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) }
20198 },
20199 { &hf_rtps_flag_participant_secure_writer,{
20200 "Participant Secure Writer", "rtps.flag.participant_secure_writer",
20201 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) }
20202 },
20203 { &hf_rtps_flag_participant_secure_reader,{
20204 "Participant Secure Reader", "rtps.flag.participant_secure_reader",
20205 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) }
20206 },
20207 { &hf_rtps_type_object_v2, {
20208 "Type Object V2", "rtps.type_object_v2",
20209 FT_NONE, BASE_NONE, NULL((void*)0), 0,
20210 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20211 },
20212 { &hf_rtps_xcdr2_delimited_header, {
20213 "DHEADER", "rtps.xcdr2.dheader",
20214 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
20215 "XCDR2 Delimited Header", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20216 },
20217 { &hf_rtps_xcdr2_enhanced_mutable_header, {
20218 "EMHEADER", "rtps.xcdr2.emheader",
20219 FT_UINT32, BASE_HEX, NULL((void*)0), 0,
20220 "XCDR2 Enhanced Mutable Header", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20221 },
20222 { &hf_rtps_xcdr2_must_understand, {
20223 "Must Understand", "rtps.xcdr2.must_understand",
20224 FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x80000000,
20225 "XCDR2 Must Understand", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20226 },
20227 { &hf_rtps_xcdr2_length_code, {
20228 "Length Code", "rtps.xcdr2.length_code",
20229 FT_UINT32, BASE_DEC, NULL((void*)0), 0x70000000,
20230 "XCDR2 Length Code", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20231 },
20232 { &hf_rtps_xcdr2_member_id, {
20233 "Member Id", "rtps.xcdr2.member_id",
20234 FT_UINT32, BASE_HEX, NULL((void*)0), 0x0fffffff,
20235 "XCDR2 Member Id", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20236 },
20237 { &hf_rtps_xcdr2_nextint, {
20238 "NEXTINT", "rtps.xcdr2.nextint",
20239 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
20240 "XCDR2 NEXTINT", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20241 },
20242 { &hf_rtps_type_object_v2_type_flags, {
20243 "Type Flags", "rtps.type_object_v2.type_flags",
20244 FT_UINT16, BASE_HEX, NULL((void*)0), 0,
20245 "Type Object V2 Type Flags", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20246 },
20247 { &hf_rtps_type_object_v2_type_flag_is_final, {
20248 "Final", "rtps.type_object_v2.is_final",
20249 FT_BOOLEAN, 16, NULL((void*)0), 0x0001,
20250 "Type Object V2 Type Flag Is Final", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20251 },
20252 { &hf_rtps_type_object_v2_type_flag_is_appendable, {
20253 "Appendable", "rtps.type_object_v2.is_appendable",
20254 FT_BOOLEAN, 16, NULL((void*)0), 0x0002,
20255 "Type Object V2 Type Flag Is Appendable", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20256 },
20257 { &hf_rtps_type_object_v2_type_flag_is_mutable, {
20258 "Mutable", "rtps.type_object_v2.is_mutable",
20259 FT_BOOLEAN, 16, NULL((void*)0), 0x0004,
20260 "Type Object V2 Type Flag Is Mutable", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20261 },
20262 { &hf_rtps_type_object_v2_type_flag_is_nested, {
20263 "Nested", "rtps.type_object_v2.is_nested",
20264 FT_BOOLEAN, 16, NULL((void*)0), 0x0008,
20265 "Type Object V2 Type Flag Is Nested", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20266 },
20267 { &hf_rtps_type_object_v2_type_flag_is_autoid_hash, {
20268 "Autoid Hash", "rtps.type_object_v2.is_autoid_hash",
20269 FT_BOOLEAN, 16, NULL((void*)0), 0x0010,
20270 "Type Object V2 Type Flag Is Autoid Hash", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20271 },
20272 { &hf_rtps_type_object_v2_type_name, {
20273 "Type Name", "rtps.type_object_v2.type_name",
20274 FT_STRING, BASE_NONE, NULL((void*)0), 0,
20275 "Type Object V2", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20276 },
20277 { &hf_rtps_type_object_v2_has_ann_builtin, {
20278 "Has Builtin Annotation", "rtps.type_object_v2.has_ann_builtin",
20279 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0,
20280 "Type Object V2", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20281 },
20282 { &hf_rtps_type_object_v2_ann_builtin, {
20283 "Builtin Annotation", "rtps.type_object_v2.ann_builtin",
20284 FT_NONE, BASE_NONE, NULL((void*)0), 0,
20285 "Type Object V2", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20286 },
20287 { &hf_rtps_type_object_v2_has_ann_custom, {
20288 "Has Custom Annotation", "rtps.type_object_v2.has_ann_custom",
20289 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0,
20290 "Type Object V2", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20291 },
20292 { &hf_rtps_type_object_v2_member_id, {
20293 "Member ID", "rtps.type_object_v2.member_id",
20294 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
20295 "Type Object V2 Member ID", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20296 },
20297 { &hf_rtps_type_object_v2_member_flags, {
20298 "Member Flags", "rtps.type_object_v2.member_flags",
20299 FT_UINT16, BASE_HEX, NULL((void*)0), 0,
20300 "Type Object V2 Member Flags", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20301 },
20302 { &hf_rtps_type_object_v2_member_flag_try_construct, {
20303 "Try Construct", "rtps.type_object_v2.member_flag.try_construct",
20304 FT_UINT16, BASE_DEC, VALS(try_construct_vals)((0 ? (const struct _value_string*)0 : ((try_construct_vals))
))
, 0x0003,
20305 "Type Object V2 Member Flag Try Construct", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20306 },
20307 { &hf_rtps_type_object_v2_member_flag_is_external, {
20308 "Is External", "rtps.type_object_v2.member_flag.is_external",
20309 FT_BOOLEAN, 16, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x0004,
20310 "Type Object V2 Member Flag Is External", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20311 },
20312 { &hf_rtps_type_object_v2_member_flag_is_optional, {
20313 "Is Optional", "rtps.type_object_v2.member_flag.is_optional",
20314 FT_BOOLEAN, 16, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x0008,
20315 "Type Object V2 Member Flag Is Optional", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20316 },
20317 { &hf_rtps_type_object_v2_member_flag_is_must_understand, {
20318 "Is Must Understand", "rtps.type_object_v2.member_flag.is_must_understand",
20319 FT_BOOLEAN, 16, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x0010,
20320 "Type Object V2 Member Flag Is Must Understand", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20321 },
20322 { &hf_rtps_type_object_v2_member_flag_is_key, {
20323 "Is Key", "rtps.type_object_v2.member_flag.is_key",
20324 FT_BOOLEAN, 16, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x0020,
20325 "Type Object V2 Member Flag Is Key", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20326 },
20327 { &hf_rtps_type_object_v2_member_flag_is_default, {
20328 "Is Default", "rtps.type_object_v2.member_flag.is_default",
20329 FT_BOOLEAN, 16, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x0040,
20330 "Type Object V2 Member Flag Is Default", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20331 },
20332 { &hf_rtps_type_object_v2_member_name, {
20333 "Member Name", "rtps.type_object_v2.member_name",
20334 FT_STRING, BASE_NONE, NULL((void*)0), 0,
20335 "Type Object V2 Member Name", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20336 },
20337 { &hf_rtps_type_object_v2_member_name_hash, {
20338 "Member Name Hash", "rtps.type_object_v2.member_name_hash",
20339 FT_UINT32, BASE_HEX, NULL((void*)0), 0,
20340 "Type Object V2 Member Name Hash", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20341 },
20342 { &hf_rtps_type_object_v2_union_label, {
20343 "Union Label", "rtps.type_object_v2.union_label",
20344 FT_INT32, BASE_DEC, NULL((void*)0), 0,
20345 "Type Object V2 Union Label", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20346 },
20347 { &hf_rtps_type_object_v2_enum_bit_bound, {
20348 "Enum Bit Bound", "rtps.type_object_v2.enum_bit_bound",
20349 FT_UINT16, BASE_DEC, NULL((void*)0), 0,
20350 "Type Object V2 Enum Bit Bound", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20351 },
20352 { &hf_rtps_type_object_v2_enum_literal_value, {
20353 "Value", "rtps.type_object_v2.enum_literal_value",
20354 FT_INT32, BASE_DEC, NULL((void*)0), 0,
20355 "Type Object V2 Enum Literal Value", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20356 },
20357 { &hf_rtps_type_id_discriminator, {
20358 "Type Id Discriminator", "rtps.type_id.discriminator",
20359 FT_UINT8, BASE_HEX, VALS(type_id_discriminator_vals)((0 ? (const struct _value_string*)0 : ((type_id_discriminator_vals
))))
, 0,
20360 "Type Identifier Discriminator", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20361 },
20362 { &hf_rtps_type_kind_discriminator, {
20363 "Type Kind Discriminator", "rtps.type_kind.discriminator",
20364 FT_UINT8, BASE_HEX, VALS(type_id_discriminator_vals)((0 ? (const struct _value_string*)0 : ((type_id_discriminator_vals
))))
, 0,
20365 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20366 },
20367 { &hf_rtps_base_type_id_discriminator, {
20368 "Base Type Id Discriminator", "rtps.base_type_id.discriminator",
20369 FT_UINT8, BASE_HEX, VALS(type_id_discriminator_vals)((0 ? (const struct _value_string*)0 : ((type_id_discriminator_vals
))))
, 0,
20370 "Base Type Identifier Discriminator", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20371 },
20372 { &hf_rtps_remote_exception_code, {
20373 "Remote Exception Code", "rtps.remote_exception_code",
20374 FT_UINT32, BASE_HEX, VALS(remote_exception_code_vals)((0 ? (const struct _value_string*)0 : ((remote_exception_code_vals
))))
, 0,
20375 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20376 },
20377 { &hf_rtps_type_bound, {
20378 "Bound", "rtps.type.bound",
20379 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
20380 "Collection Type Bound", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20381 },
20382 { &hf_rtps_type_element_flags, {
20383 "Element Flags", "rtps.type.element_flags",
20384 FT_UINT16, BASE_HEX, NULL((void*)0), 0,
20385 "Collection Element Flags", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20386 },
20387 { &hf_rtps_type_equiv_kind, {
20388 "Equivalence Kind", "rtps.type.equiv_kind",
20389 FT_UINT8, BASE_HEX, VALS(type_id_discriminator_vals)((0 ? (const struct _value_string*)0 : ((type_id_discriminator_vals
))))
, 0,
20390 "Type Equivalence Kind", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20391 },
20392 { &hf_rtps_type_hash, {
20393 "Equivalence Hash", "rtps.type.hash",
20394 FT_BYTES, BASE_NONE, NULL((void*)0), 0,
20395 "Type Equivalence Hash", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20396 },
20397 { &hf_rtps_type_extended, {
20398 "Extended Type Definition", "rtps.type.extended",
20399 FT_BYTES, BASE_NONE, NULL((void*)0), 0,
20400 "Extended Type Data", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20401 },
20402 { &hf_rtps_type_id_w_size, {
20403 "Type Id With Size", "rtps.type_id_w_size",
20404 FT_NONE, BASE_NONE, NULL((void*)0), 0,
20405 "Type Identifier With Size", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20406 },
20407 { &hf_rtps_type_deps_count, {
20408 "Dependent Type Count", "rtps.type.deps_count",
20409 FT_INT32, BASE_DEC, NULL((void*)0), 0,
20410 "Number of Dependent Types", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20411 },
20412 { &hf_rtps_type_deps_result, {
20413 "Result Discriminator", "rtps.type.deps_result",
20414 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
20415 "GetTypeDependencies Result Discriminator", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20416 },
20417 { &hf_rtps_type_lookup_discriminator, {
20418 "Discriminator", "rtps.type_lookup_discriminator",
20419 FT_UINT32, BASE_HEX, VALS(type_lookup_discriminator_vals)((0 ? (const struct _value_string*)0 : ((type_lookup_discriminator_vals
))))
, 0,
20420 "DDS XTypes Type Lookup Discriminator", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20421 },
20422 { &hf_rtps_type_lookup_deps_seq, {
20423 "Dependencies Seq", "rtps.type_lookup_deps_seq",
20424 FT_NONE, BASE_NONE, NULL((void*)0), 0,
20425 "DDS XTypes Type Lookup Dependencies Sequence", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20426 },
20427 { &hf_rtps_instance_name, {
20428 "Instance Name", "rtps.instance_name",
20429 FT_STRING, BASE_NONE, NULL((void*)0), 0,
20430 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20431 },
20432 { &hf_rtps_type_object_serialized_size, {
20433 "Serialized Size", "rtps.type.serialized_size",
20434 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
20435 "Type Object Serialized Size", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20436 },
20437 { &hf_rtps_type_object_type_id_disc,
20438 { "TypeId (_d)", "rtps.type_object.type_id.discr",
20439 FT_INT16, BASE_DEC, 0x0, 0,
20440 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20441 },
20442 { &hf_rtps_type_object_primitive_type_id,
20443 { "Type Id", "rtps.type_object.primitive_type_id",
20444 FT_UINT16, BASE_HEX, VALS(type_object_kind)((0 ? (const struct _value_string*)0 : ((type_object_kind)))), 0,
20445 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20446 },
20447 { &hf_rtps_type_object_base_primitive_type_id,
20448 { "Base Id", "rtps.type_object.base_primitive_type_id",
20449 FT_UINT16, BASE_HEX, VALS(type_object_kind)((0 ? (const struct _value_string*)0 : ((type_object_kind)))), 0,
20450 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20451 },
20452 { &hf_rtps_type_object_type_id,
20453 { "Type Id", "rtps.type_object.type_id",
20454 FT_UINT64, BASE_HEX, 0x0, 0,
20455 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20456 },
20457 { &hf_rtps_type_object_base_type,
20458 { "Base Type Id", "rtps.type_object.base_type_id",
20459 FT_UINT64, BASE_HEX, 0x0, 0,
20460 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20461 },
20462 { &hf_rtps_type_object_element_raw, {
20463 "Type Element Content", "rtps.type_object.element",
20464 FT_BYTES, BASE_NONE, NULL((void*)0), 0,
20465 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20466 },
20467 { &hf_rtps_type_object_type_property_name,
20468 { "Name", "rtps.type_object.property.name",
20469 FT_STRING, BASE_NONE, 0x0, 0,
20470 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20471 },
20472 { &hf_rtps_type_object_member_id,
20473 { "Member Id", "rtps.type_object.annotation.member_id",
20474 FT_UINT32, BASE_DEC, 0x0, 0,
20475 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20476 },
20477 { &hf_rtps_type_object_name,
20478 { "Name", "rtps.type_object.member.name",
20479 FT_STRING, BASE_NONE, 0x0, 0,
20480 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20481 },
20482 { &hf_rtps_type_object_annotation_value_d,
20483 { "Annotation Member (_d)", "rtps.type_object.annotation.value_d",
20484 FT_UINT16, BASE_DEC, 0x0, 0,
20485 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20486 },
20487 { &hf_rtps_type_object_annotation_value_16,
20488 { "16 bits type", "rtps.type_object.annotation.value",
20489 FT_UINT16, BASE_DEC, 0x0, 0,
20490 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20491 },
20492 { &hf_rtps_type_object_union_label,
20493 { "Label", "rtps.type_object.union.label",
20494 FT_UINT32, BASE_DEC, 0x0, 0,
20495 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20496 },
20497 { &hf_rtps_type_object_bound,
20498 { "Bound", "rtps.type_object.bound",
20499 FT_UINT32, BASE_DEC, 0x0, 0,
20500 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20501 },
20502 { &hf_rtps_type_object_enum_constant_name,
20503 { "Enum name", "rtps.type_object.enum.name",
20504 FT_STRING, BASE_NONE, 0x0, 0,
20505 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20506 },
20507 { &hf_rtps_type_object_enum_constant_value,
20508 { "Enum value", "rtps.type_object.enum.value",
20509 FT_INT32, BASE_DEC, 0x0, 0,
20510 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20511 },
20512 { &hf_rtps_type_object_element_shared,
20513 { "Element shared", "rtps.type_object.shared",
20514 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0,
20515 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20516 },
20517 { &hf_rtps_flag_typeflag_final, {
20518 "FINAL", "rtps.flag.typeflags.final",
20519 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) }
20520 },
20521 { &hf_rtps_flag_typeflag_mutable, {
20522 "MUTABLE", "rtps.flag.typeflags.mutable",
20523 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) }
20524 },
20525 { &hf_rtps_flag_typeflag_nested, {
20526 "NESTED", "rtps.flag.typeflags.nested",
20527 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) }
20528 },
20529 { &hf_rtps_type_object_flags, {
20530 "Flags", "rtps.flag.typeflags",
20531 FT_UINT16, BASE_HEX, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20532 },
20533 { &hf_rtps_flag_memberflag_key, {
20534 "Key", "rtps.flag.typeflags.key",
20535 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) }
20536 },
20537 { &hf_rtps_flag_memberflag_optional, {
20538 "Optional", "rtps.flag.typeflags.optional",
20539 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) }
20540 },
20541 { &hf_rtps_flag_memberflag_shareable, {
20542 "Shareable", "rtps.flag.typeflags.shareable",
20543 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) }
20544 },
20545 { &hf_rtps_flag_memberflag_union_default, {
20546 "Union default", "rtps.flag.typeflags.union_default",
20547 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) }
20548 },
20549 { &hf_rtps_type_object_element_module_name,
20550 { "Module name", "rtps.type_object.module_name",
20551 FT_STRINGZ, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20552 },
20553 { &hf_rtps_flag_service_request_writer, {
20554 "Service Request Writer", "rtps.flag.service_request_writer",
20555 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) }
20556 },
20557 { &hf_rtps_flag_service_request_reader, {
20558 "Service Request Reader", "rtps.flag.service_request_reader",
20559 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) }
20560 },
20561 { &hf_rtps_flag_locator_ping_writer, {
20562 "Locator Ping Writer", "rtps.flag.locator_ping_writer",
20563 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) }
20564 },
20565 { &hf_rtps_flag_locator_ping_reader, {
20566 "Locator Ping Reader", "rtps.flag.locator_ping_reader",
20567 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) }
20568 },
20569 { &hf_rtps_flag_secure_service_request_writer, {
20570 "Secure Service Request Writer", "rtps.flag.secure_service_request_writer",
20571 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) }
20572 },
20573 { &hf_rtps_flag_secure_service_request_reader, {
20574 "Secure Service Request Reader", "rtps.flag.secure_service_request_reader",
20575 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) }
20576 },
20577 { &hf_rtps_flag_security_access_protected, {
20578 "Access Protected", "rtps.flag.security.access_protected",
20579 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) }
20580 },
20581 { &hf_rtps_flag_security_discovery_protected, {
20582 "Discovery Protected", "rtps.flag.security.discovery_protected",
20583 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) }
20584 },
20585 { &hf_rtps_flag_security_submessage_protected, {
20586 "Submessage Protected", "rtps.flag.security.submessage_protected",
20587 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) }
20588 },
20589 { &hf_rtps_flag_security_payload_protected, {
20590 "Payload Protected", "rtps.flag.security.payload_protected",
20591 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) }
20592 },
20593 { &hf_rtps_flag_endpoint_security_attribute_flag_is_read_protected,{
20594 "Read Protected", "rtps.flag.security.info.read_protected",
20595 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) }
20596 },
20597 { &hf_rtps_flag_endpoint_security_attribute_flag_is_write_protected,{
20598 "Write Protected", "rtps.flag.security.info.write_protected",
20599 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) }
20600 },
20601 { &hf_rtps_flag_endpoint_security_attribute_flag_is_discovery_protected,{
20602 "Discovery Protected", "rtps.flag.security.info.discovery_protected",
20603 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) }
20604 },
20605 { &hf_rtps_flag_endpoint_security_attribute_flag_is_submessage_protected,{
20606 "Submessage Protected", "rtps.flag.security.info.submessage_protected",
20607 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) }
20608 },
20609 { &hf_rtps_flag_endpoint_security_attribute_flag_is_payload_protected,{
20610 "Payload Protected", "rtps.flag.security.info.payload_protected",
20611 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) }
20612 },
20613 { &hf_rtps_flag_endpoint_security_attribute_flag_is_key_protected,{
20614 "Key Protected", "rtps.flag.security.info.key_protected",
20615 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) }
20616 },
20617 { &hf_rtps_flag_endpoint_security_attribute_flag_is_liveliness_protected,{
20618 "Liveliness Protected", "rtps.flag.security.info.liveliness_protected",
20619 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) }
20620 },
20621 { &hf_rtps_flag_endpoint_security_attribute_flag_is_valid,{
20622 "Mask Valid", "rtps.flag.security.info.valid",
20623 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) }
20624 },
20625 { &hf_rtps_param_endpoint_security_attributes_mask,{
20626 "EndpointSecurityAttributesMask", "rtps.param.endpoint_security_attributes",
20627 FT_UINT32, BASE_HEX, NULL((void*)0), 0,
20628 "Bitmask representing the EndpointSecurityAttributes flags in PID_ENDPOINT_SECURITY_INFO",
20629 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20630 },
20631 { &hf_rtps_param_participant_security_symmetric_cipher_algorithms_builtin_endpoints_required_mask, {
20632 "Builtin Endpoints Required Mask", "rtps.param.participant_security_symmetric_cipher_algorithms.builtin_endpoints_used_bit",
20633 FT_UINT32, BASE_HEX, NULL((void*)0), 0,
20634 "Bitmask representing the Symmetric Cipher algorithm the builtin endpoints use",
20635 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20636 },
20637 { &hf_rtps_param_participant_security_symmetric_cipher_algorithms_builtin_endpoints_key_exchange_used_bit, {
20638 "Key Exchange Builtin Endpoints Required Mask", "rtps.param.participant_security_symmetric_cipher_algorithms.builtin_endpoints_key_exchange_required_mask",
20639 FT_UINT32, BASE_HEX, NULL((void*)0), 0,
20640 "Bitmask representing the Symmetric Cipher algorithm the key exchange builtin endpoints require",
20641 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20642 },
20643 { &hf_rtps_param_participant_security_symmetric_cipher_algorithms_user_endpoints_default_required_mask, {
20644 "User Endpoints Default Required Mask", "rtps.param.participant_security_symmetric_cipher_algorithms.user_endpoints_default_required_mask",
20645 FT_UINT32, BASE_HEX, 0, 0,
20646 "Bitmask representing the default algorithm that endpoints use to protect data",
20647 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20648 },
20649 { &hf_rtps_param_participant_security_symmetric_cipher_algorithms_supported_mask, {
20650 "Supported Mask", "rtps.param.security_symmetric_cipher_algorithms.supported_mask",
20651 FT_UINT32, BASE_HEX, 0, 0, "Bitmask representing supported Symmetric Cipher algorithms",
20652 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20653 },
20654 { &hf_rtps_param_compression_id_mask, {
20655 "Compression Id Mask", "rtps.param.compression_id_mask",
20656 FT_UINT32, BASE_HEX, 0, 0, "Bitmask representing compression id.", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20657 },
20658 { &hf_rtps_flag_compression_id_zlib, {
20659 "ZLIB", "rtps.flag.compression_id_zlib",
20660 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) }
20661 },
20662 { &hf_rtps_flag_compression_id_bzip2, {
20663 "BZIP2", "rtps.flag.compression_id_bzip2",
20664 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) }
20665 },
20666 { &hf_rtps_flag_compression_id_lz4, {
20667 "LZ4", "rtps.flag.compression_id_lz4",
20668 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) }
20669 },
20670 { &hf_rtps_flag_security_supported, {
20671 "Supported", "rtps.security.supported",
20672 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20673 },
20674 { &hf_rtps_flag_security_required, {
20675 "Required", "rtps.security.required",
20676 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20677 },
20678 { &hf_rtps_flag_security_symmetric_cipher_mask_aes128_gcm, {
20679 "AES128 GCM", "rtps.flag.security_symmetric_cipher_mask.aes128_gcm",
20680 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) }
20681 },
20682 { &hf_rtps_flag_security_symmetric_cipher_mask_aes256_gcm, {
20683 "AES256 GCM", "rtps.flag.security_symmetric_cipher_mask.aes256_gcm",
20684 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) }
20685 },
20686 { &hf_rtps_flag_security_symmetric_cipher_mask_vendor_rti_aes192_gcm, {
20687 "AES192 GCM (RTI)", "rtps.flag.security_symmetric_cipher_mask.vendor_rti_aes192_gcm",
20688 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) }
20689 },
20690 { &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm01, {
20691 "Vendor Specific Algorithm", "rtps.flag.security_symmetric_cipher_mask.vendor_specific_algorithm_01",
20692 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) }
20693 },
20694 { &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm02, {
20695 "Vendor Specific Algorithm", "rtps.flag.security_symmetric_cipher_mask.vendor_specific_algorithm_02",
20696 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) }
20697 },
20698 { &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm03, {
20699 "Vendor Specific Algorithm", "rtps.flag.security_symmetric_cipher_mask.vendor_specific_algorithm_03",
20700 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) }
20701 },
20702 { &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm04, {
20703 "Vendor Specific Algorithm", "rtps.flag.security_symmetric_cipher_mask.vendor_specific_algorithm_04",
20704 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) }
20705 },
20706 { &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm05, {
20707 "Vendor Specific Algorithm", "rtps.flag.security_symmetric_cipher_mask.vendor_specific_algorithm_05",
20708 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) }
20709 },
20710 { &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm06, {
20711 "Vendor Specific Algorithm", "rtps.flag.security_symmetric_cipher_mask.vendor_specific_algorithm_06",
20712 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) }
20713 },
20714 { &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm07, {
20715 "Vendor Specific Algorithm", "rtps.flag.security_symmetric_cipher_mask.vendor_specific_algorithm_07",
20716 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) }
20717 },
20718 { &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm08, {
20719 "Vendor Specific Algorithm", "rtps.flag.security_symmetric_cipher_mask.vendor_specific_algorithm_08",
20720 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) }
20721 },
20722 { &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm09, {
20723 "Vendor Specific Algorithm", "rtps.flag.security_symmetric_cipher_mask.vendor_specific_algorithm_09",
20724 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) }
20725 },
20726 { &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm10, {
20727 "Vendor Specific Algorithm", "rtps.flag.security_symmetric_cipher_mask.vendor_specific_algorithm_10",
20728 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) }
20729 },
20730 { &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm11, {
20731 "Vendor Specific Algorithm", "rtps.flag.security_symmetric_cipher_mask.vendor_specific_algorithm_11",
20732 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) }
20733 },
20734 { &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm12, {
20735 "Vendor Specific Algorithm", "rtps.flag.security_symmetric_cipher_mask.vendor_specific_algorithm_12",
20736 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) }
20737 },
20738 { &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm13, {
20739 "Vendor Specific Algorithm", "rtps.flag.security_symmetric_cipher_mask.vendor_specific_algorithm_13",
20740 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) }
20741 },
20742 { &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm14, {
20743 "Vendor Specific Algorithm", "rtps.flag.security_symmetric_cipher_mask.vendor_specific_algorithm_14",
20744 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) }
20745 },
20746 { &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm15, {
20747 "Vendor Specific Algorithm", "rtps.flag.security_symmetric_cipher_mask.vendor_specific_algorithm_15",
20748 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) }
20749 },
20750 { &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm16, {
20751 "Vendor Specific Algorithm", "rtps.flag.security_symmetric_cipher_mask.vendor_specific_algorithm_16",
20752 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) }
20753 },
20754 { &hf_rtps_flag_security_key_establishment_mask_dhe_modp2048256, {
20755 "DHE_MODP2048256", "rtps.flag.security_key_establishment_mask.dhe_modp2048256",
20756 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) }
20757 },
20758 { &hf_rtps_flag_security_key_establishment_mask_ecdheceum_p256, {
20759 "ECDHECEUM_P256", "rtps.flag.security_key_establishment_mask.ecdheceum_p256",
20760 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) }
20761 },
20762 { &hf_rtps_flag_security_key_establishment_mask_ecdheceum_p384, {
20763 "ECDHECEUM_P384", "rtps.flag.security_key_establishment_mask.ecdheceum_p384",
20764 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) }
20765 },
20766 { &hf_rtps_flag_security_key_establishment_mask_ecdheceum_x25519, {
20767 "ECDHECEUM_X25519 (RTI)", "rtps.flag.security_key_establishment_mask.vendor_rti_ecdheceum_x25519",
20768 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) }
20769 },
20770 { &hf_rtps_flag_security_key_establishment_mask_ecdheceum_x448, {
20771 "ECDHECEUM_X448 (RTI)", "rtps.flag.security_key_establishment_mask.vendor_rti_ecdheceum_x448",
20772 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) }
20773 },
20774 { &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm01, {
20775 "Vendor Specific Algorithm", "rtps.flag.security_key_establishment_mask.vendor_specific_algorithm_01",
20776 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) }
20777 },
20778 { &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm02, {
20779 "Vendor Specific Algorithm", "rtps.flag.security_key_establishment_mask.vendor_specific_algorithm_02",
20780 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) }
20781 },
20782 { &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm03, {
20783 "Vendor Specific Algorithm", "rtps.flag.security_key_establishment_mask.vendor_specific_algorithm_03",
20784 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) }
20785 },
20786 { &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm04, {
20787 "Vendor Specific Algorithm", "rtps.flag.security_key_establishment_mask.vendor_specific_algorithm_04",
20788 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) }
20789 },
20790 { &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm05, {
20791 "Vendor Specific Algorithm", "rtps.flag.security_key_establishment_mask.vendor_specific_algorithm_05",
20792 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) }
20793 },
20794 { &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm06, {
20795 "Vendor Specific Algorithm", "rtps.flag.security_key_establishment_mask.vendor_specific_algorithm_06",
20796 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) }
20797 },
20798 { &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm07, {
20799 "Vendor Specific Algorithm", "rtps.flag.security_key_establishment_mask.vendor_specific_algorithm_07",
20800 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) }
20801 },
20802 { &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm08, {
20803 "Vendor Specific Algorithm", "rtps.flag.security_key_establishment_mask.vendor_specific_algorithm_08",
20804 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) }
20805 },
20806 { &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm09, {
20807 "Vendor Specific Algorithm", "rtps.flag.security_key_establishment_mask.vendor_specific_algorithm_09",
20808 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) }
20809 },
20810 { &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm10, {
20811 "Vendor Specific Algorithm", "rtps.flag.security_key_establishment_mask.vendor_specific_algorithm_10",
20812 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) }
20813 },
20814 { &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm11, {
20815 "Vendor Specific Algorithm", "rtps.flag.security_key_establishment_mask.vendor_specific_algorithm_11",
20816 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) }
20817 },
20818 { &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm12, {
20819 "Vendor Specific Algorithm", "rtps.flag.security_key_establishment_mask.vendor_specific_algorithm_12",
20820 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) }
20821 },
20822 { &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm13, {
20823 "Vendor Specific Algorithm", "rtps.flag.security_key_establishment_mask.vendor_specific_algorithm_13",
20824 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) }
20825 },
20826 { &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm14, {
20827 "Vendor Specific Algorithm", "rtps.flag.security_key_establishment_mask.vendor_specific_algorithm_14",
20828 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) }
20829 },
20830 { &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm15, {
20831 "Vendor Specific Algorithm", "rtps.flag.security_key_establishment_mask.vendor_specific_algorithm_15",
20832 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) }
20833 },
20834 { &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm16, {
20835 "Vendor Specific Algorithm", "rtps.flag.security_key_establishment_mask.vendor_specific_algorithm_16",
20836 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) }
20837 },
20838 { &hf_rtps_flag_security_algorithm_compatibility_mode, {
20839 "Compatibility Mode", "rtps.flag.security_algorithm_compatibility_mode",
20840 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) }
20841 },
20842 { &hf_rtps_flag_plugin_endpoint_security_attribute_flag_is_payload_encrypted, {
20843 "Submessage Encrypted", "rtps.flag.security.info.plugin_submessage_encrypted",
20844 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) }
20845 },
20846 { &hf_rtps_param_crypto_algorithm_requirements_trust_chain, {
20847 "Supported", "rtps.param.crypto_algorithm_requirements.supported",
20848 FT_UINT32, BASE_HEX, 0, 0, "Bitmask representing the trust chain", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20849 },
20850 { &hf_rtps_param_crypto_algorithm_requirements_message_auth, {
20851 "Required", "rtps.param.crypto_algorithm_requirements.required",
20852 FT_UINT32, BASE_HEX, 0, 0, "Bitmask representing the message authentication", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20853 },
20854 { &hf_rtps_flag_security_digital_signature_mask_rsassapssmgf1sha256_2048_sha256, {
20855 "RSASSAPSSMGF1SHA256_2048_SHA256", "rtps.flag.security_digital_signature_mask.rsassapssmgf1sha256_2048_sha256",
20856 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) }
20857 },
20858 { &hf_rtps_flag_security_digital_signature_mask_rsassapkcs1v15_2048_sha256, {
20859 "RSASSAPKCS1V15_2048_SHA256", "rtps.flag.security_digital_signature_mask.rsassapkcs1v15_2048_sha256",
20860 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) }
20861 },
20862 { &hf_rtps_flag_security_digital_signature_mask_ecdsa_p256_sha256, {
20863 "ECDSA_P256_SHA256", "rtps.flag.security_digital_signature_mask.ecdsa_p256_sha256",
20864 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) }
20865 },
20866 { &hf_rtps_flag_security_digital_signature_mask_ecdsa_p384_sha384, {
20867 "ECDSA_P384_SHA384", "rtps.flag.security_digital_signature_mask.ecdsa_p384_sha384",
20868 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) }
20869 },
20870 { &hf_rtps_flag_security_digital_signature_mask_ecdsa_ed25519_sha512, {
20871 "EDDSA_ED25519_SHA512 (RTI)", "rtps.flag.security_digital_signature_mask.vendor_rti_ecdsa_ed25519_sha512",
20872 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) }
20873 },
20874 { &hf_rtps_flag_security_digital_signature_mask_ecdsa_ed448_shake256, {
20875 "EDDSA_ED448_SHAKE256 (RTI)", "rtps.flag.security_digital_signature_mask.vendor_rti_ecdsa_ed448_shake256",
20876 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) }
20877 },
20878 { &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm01, {
20879 "Vendor Specific Algorithm", "rtps.flag.security_digital_signature_mask.vendor_specific_algorithm_01",
20880 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) }
20881 },
20882 { &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm02, {
20883 "Vendor Specific Algorithm", "rtps.flag.security_digital_signature_mask.vendor_specific_algorithm_02",
20884 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) }
20885 },
20886 { &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm03, {
20887 "Vendor Specific Algorithm", "rtps.flag.security_digital_signature_mask.vendor_specific_algorithm_03",
20888 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) }
20889 },
20890 { &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm04, {
20891 "Vendor Specific Algorithm", "rtps.flag.security_digital_signature_mask.vendor_specific_algorithm_04",
20892 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) }
20893 },
20894 { &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm05, {
20895 "Vendor Specific Algorithm", "rtps.flag.security_digital_signature_mask.vendor_specific_algorithm_05",
20896 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) }
20897 },
20898 { &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm06, {
20899 "Vendor Specific Algorithm", "rtps.flag.security_digital_signature_mask.vendor_specific_algorithm_06",
20900 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) }
20901 },
20902 { &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm07, {
20903 "Vendor Specific Algorithm", "rtps.flag.security_digital_signature_mask.vendor_specific_algorithm_07",
20904 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) }
20905 },
20906 { &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm08, {
20907 "Vendor Specific Algorithm", "rtps.flag.security_digital_signature_mask.vendor_specific_algorithm_08",
20908 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) }
20909 },
20910 { &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm09, {
20911 "Vendor Specific Algorithm", "rtps.flag.security_digital_signature_mask.vendor_specific_algorithm_09",
20912 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) }
20913 },
20914 { &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm10, {
20915 "Vendor Specific Algorithm", "rtps.flag.security_digital_signature_mask.vendor_specific_algorithm_10",
20916 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) }
20917 },
20918 { &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm11, {
20919 "Vendor Specific Algorithm", "rtps.flag.security_digital_signature_mask.vendor_specific_algorithm_11",
20920 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) }
20921 },
20922 { &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm12, {
20923 "Vendor Specific Algorithm", "rtps.flag.security_digital_signature_mask.vendor_specific_algorithm_12",
20924 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) }
20925 },
20926 { &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm13, {
20927 "Vendor Specific Algorithm", "rtps.flag.security_digital_signature_mask.vendor_specific_algorithm_13",
20928 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) }
20929 },
20930 { &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm14, {
20931 "Vendor Specific Algorithm", "rtps.flag.security_digital_signature_mask.vendor_specific_algorithm_14",
20932 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) }
20933 },
20934 { &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm15, {
20935 "Vendor Specific Algorithm", "rtps.flag.security_digital_signature_mask.vendor_specific_algorithm_15",
20936 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) }
20937 },
20938 { &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm16, {
20939 "Vendor Specific Algorithm", "rtps.flag.security_digital_signature_mask.vendor_specific_algorithm_16",
20940 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) }
20941 },
20942 { &hf_rtps_flag_plugin_endpoint_security_attribute_flag_is_key_encrypted,{
20943 "Payload Encrypted", "rtps.flag.security.info.plugin_payload_encrypted",
20944 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) }
20945 },
20946 { &hf_rtps_flag_plugin_endpoint_security_attribute_flag_is_liveliness_encrypted,{
20947 "Submessage Origin Encrypted", "rtps.flag.security.info.plugin_liveliness_encrypted",
20948 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) }
20949 },
20950 { &hf_rtps_flag_plugin_endpoint_security_attribute_flag_is_valid,{
20951 "Mask Valid", "rtps.flag.security.info.plugin_valid",
20952 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) }
20953 },
20954 { &hf_rtps_param_plugin_endpoint_security_attributes_mask,{
20955 "PluginEndpointSecurityAttributesMask (valid dissection if using the Specification Builtin Plugins)",
20956 "rtps.param.plugin_endpoint_security_attributes",
20957 FT_UINT32, BASE_HEX, NULL((void*)0), 0,
20958 "bitmask representing the PluginEndpointSecurityAttributes flags in PID_ENDPOINT_SECURITY_INFO",
20959 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20960 },
20961 { &hf_rtps_flag_participant_security_attribute_flag_is_rtps_protected,{
20962 "RTPS Protected", "rtps.flag.security.info.participant_rtps_protected",
20963 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) }
20964 },
20965 { &hf_rtps_flag_participant_security_attribute_flag_is_discovery_protected,{
20966 "Discovery Protected", "rtps.flag.security.info.participant_discovery_protected",
20967 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) }
20968 },
20969 { &hf_rtps_flag_participant_security_attribute_flag_is_liveliness_protected,{
20970 "Liveliness Protected", "rtps.flag.security.info.participant_liveliness_protected",
20971 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) }
20972 },
20973 { &hf_rtps_flag_participant_security_attribute_flag_key_revisions_enabled,{
20974 "Key Revisions Enabled", "rtps.flag.security.info.key_revisions_enabled",
20975 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) }
20976 },
20977 { &hf_rtps_flag_participant_security_attribute_flag_key_psk_protected,{
20978 "RTPS Pre-Shared Key Protected", "rtps.flag.security.info.participant_psk_protected",
20979 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) }
20980 },
20981 { &hf_rtps_flag_participant_security_attribute_flag_is_valid,{
20982 "Mask Valid", "rtps.flag.security.info.participant_mask_valid",
20983 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) }
20984 },
20985 { &hf_rtps_param_participant_security_attributes_mask,{
20986 "ParticipantSecurityAttributesMask",
20987 "rtps.param.participant_security_attributes",
20988 FT_UINT32, BASE_HEX, NULL((void*)0), 0,
20989 "bitmask representing the ParticipantSecurityAttributes flags in PID_PARTICIPANT_SECURITY_INFO",
20990 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
20991 },
20992 { &hf_rtps_flag_plugin_participant_security_attribute_flag_is_rtps_encrypted,{
20993 "RTPS Encrypted", "rtps.flag.security.info.plugin_participant_rtps_encrypted",
20994 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) }
20995 },
20996 { &hf_rtps_flag_plugin_participant_security_attribute_flag_is_discovery_encrypted,{
20997 "Discovery Encrypted", "rtps.flag.security.info.plugin_participant_discovery_encrypted",
20998 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) }
20999 },
21000 { &hf_rtps_flag_plugin_participant_security_attribute_flag_is_liveliness_encrypted,{
21001 "Liveliness Encrypted", "rtps.flag.security.info.plugin_participant_liveliness_encrypted",
21002 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) }
21003 },
21004 { &hf_rtps_flag_plugin_participant_security_attribute_flag_is_rtps_origin_encrypted,{
21005 "RTPS Origin Encrypted", "rtps.flag.security.info.plugin_participant_rtps_origin_encrypted",
21006 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) }
21007 },
21008 { &hf_rtps_flag_plugin_participant_security_attribute_flag_is_discovery_origin_encrypted,{
21009 "Discovery Origin Encrypted", "rtps.flag.security.info.plugin_participant_discovery_origin_encrypted",
21010 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) }
21011 },
21012 { &hf_rtps_flag_plugin_participant_security_attribute_flag_is_liveliness_origin_encrypted,{
21013 "Liveliness Origin Encrypted", "rtps.flag.security.info.plugin_participant_liveliness_origin_encrypted",
21014 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) }
21015 },
21016 { &hf_rtps_flag_plugin_participant_security_attribute_flag_is_psk_encrypted,{
21017 "RTPS Pre-Shared Key Encrypted", "rtps.flag.security.info.plugin_participant_psk_encrypted",
21018 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) }
21019 },
21020 { &hf_rtps_flag_plugin_participant_security_attribute_flag_is_valid,{
21021 "Mask Valid", "rtps.flag.security.info.plugin_participant_mask_valid",
21022 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) }
21023 },
21024 { &hf_rtps_param_plugin_participant_security_attributes_mask,{
21025 "PluginParticipantSecurityAttributesMask (valid dissection if using the Specification Builtin Plugins)",
21026 "rtps.param.plugin_participant_security_attributes",
21027 FT_UINT32, BASE_HEX, NULL((void*)0), 0,
21028 "bitmask representing the PluginParticipantSecurityAttributes flags in PID_PARTICIPANT_SECURITY_INFO",
21029 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21030 },
21031 { &hf_rtps_param_enable_authentication,
21032 { "Authentication enabled", "rtps.secure.enable_authentication",
21033 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21034 },
21035 { &hf_rtps_param_builtin_endpoint_qos,
21036 { "Built-in Endpoint QoS", "rtps.param.builtin_endpoint_qos",
21037 FT_UINT32, BASE_HEX, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21038 },
21039 { &hf_rtps_param_sample_signature_epoch,
21040 { "Epoch", "rtps.sample_signature.epoch",
21041 FT_UINT64, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21042 },
21043 { &hf_rtps_param_sample_signature_nonce,
21044 { "Nonce", "rtps.sample_signature.nonce",
21045 FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21046 },
21047 { &hf_rtps_param_sample_signature_length,
21048 {"Signature Length", "rtps.sample_signature.signature_length",
21049 FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21050 },
21051 { &hf_rtps_param_sample_signature_signature,
21052 { "Signature", "rtps.sample_signature.signature",
21053 FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21054 },
21055 { &hf_rtps_secure_dataheader_transformation_kind, {
21056 "Transformation Kind", "rtps.secure.data_header.transformation_kind",
21057 FT_INT8, BASE_DEC, VALS(secure_transformation_kind)((0 ? (const struct _value_string*)0 : ((secure_transformation_kind
))))
, 0,
21058 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21059 },
21060 { &hf_rtps_secure_dataheader_transformation_key_revision_id, {
21061 "Transformation Key Revision Id", "rtps.secure.data_header.transformation_key_revision_id",
21062 FT_INT24, BASE_DEC, NULL((void*)0), 0,
21063 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21064 },
21065 { &hf_rtps_secure_dataheader_transformation_key_id, {
21066 "Transformation Key Id", "rtps.secure.data_header.transformation_key",
21067 FT_BYTES, BASE_NONE, NULL((void*)0), 0,
21068 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21069 },
21070 { &hf_rtps_secure_dataheader_passphrase_id, {
21071 "Passphrase Id", "rtps.secure.data_header.passphrase_id",
21072 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
21073 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21074 },
21075 { &hf_rtps_secure_dataheader_passphrase_key_id, {
21076 "Passphrase Key Id", "rtps.secure.data_header.passphrase_key_id",
21077 FT_UINT8, BASE_HEX, NULL((void*)0), 0,
21078 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21079 },
21080 { &hf_rtps_secure_dataheader_init_vector_suffix, {
21081 "Plugin Secure Header", "rtps.secure.data_header.init_vector_suffix",
21082 FT_BYTES, BASE_NONE, NULL((void*)0), 0,
21083 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21084 },
21085 { &hf_rtps_secure_dataheader_session_id, {
21086 "Session Id", "rtps.secure.data_header.session_id",
21087 FT_UINT32, BASE_HEX, NULL((void*)0), 0,
21088 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21089 },
21090 { &hf_rtps_secure_datatag_plugin_sec_tag, {
21091 "Receiver-Specific Mac",
21092 "rtps.secure.data_tag.receiver_specific_mac",
21093 FT_BYTES, BASE_NONE, NULL((void*)0), 0,
21094 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21095 },
21096 { &hf_rtps_secure_datatag_plugin_sec_tag_key, {
21097 "Receiver-Specific Mac Key Id",
21098 "rtps.secure.data_tag.receiver_specific_macs_key_id",
21099 FT_BYTES, BASE_NONE, NULL((void*)0), 0,
21100 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21101 },
21102 { &hf_rtps_secure_datatag_plugin_sec_tag_common_mac, {
21103 "Plugin Secure Tag Common Mac", "rtps.secure.data_tag.common_mac",
21104 FT_BYTES, BASE_NONE, NULL((void*)0), 0,
21105 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21106 },
21107 { &hf_rtps_secure_datatag_plugin_specific_macs_len, {
21108 "Plugin Secure Tag Receiver-Specific Macs Length", "rtps.secure.data_tag.specific_macs_len",
21109 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
21110 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21111 },
21112 { &hf_rtps_srm_service_id,
21113 { "Service Id", "rtps.srm.service_id",
21114 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) }
21115 },
21116 { &hf_rtps_srm_request_body, {
21117 "Request Body", "rtps.srm.request_body",
21118 FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21119 },
21120 { &hf_rtps_srm_instance_id, {
21121 "Instance Id", "rtps.srm.instance_id",
21122 FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21123 },
21124 { &hf_rtps_topic_query_selection_filter_class_name,
21125 { "Class Name", "rtps.srm.topic_query.class_name",
21126 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21127 },
21128 { &hf_rtps_topic_query_selection_filter_expression,
21129 { "Filter Expression", "rtps.srm.topic_query.filter_expression",
21130 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21131 },
21132 { &hf_rtps_topic_query_selection_filter_parameter,
21133 { "Filter Parameter", "rtps.srm.topic_query.filter_parameter",
21134 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21135 },
21136 { &hf_rtps_topic_query_selection_num_parameters,
21137 { "Number of Filter Parameters", "rtps.srm.topic_query.num_filter_parameters",
21138 FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21139 },
21140 { &hf_rtps_topic_query_topic_name,
21141 { "Topic Name", "rtps.srm.topic_query.topic_name",
21142 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21143 },
21144 { &hf_rtps_topic_query_original_related_reader_guid,
21145 { "Original Related Reader GUID", "rtps.srm.topic_query.original_related_reader_guid",
21146 FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21147 },
21148 { &hf_rtps_topic_query_selection_kind,
21149 { "Topic Query Selection Kind", "rtps.srm.topic_query.kind",
21150 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) }
21151 },
21152 { &hf_rtps_data_session_intermediate,
21153 { "Data Session Intermediate Packet", "rtps.data_session.intermediate",
21154 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x00, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21155 },
21156 { &hf_rtps_secure_secure_data_length,
21157 { "Secure Data Length", "rtps.secure.secure_data_length",
21158 FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21159 },
21160 { &hf_rtps_secure_secure_data,
21161 { "Secure Data", "rtps.secure.secure_data",
21162 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) }
21163 },
21164 { &hf_rtps_secure_session_key,
21165 { "[Session Key]", "rtps.secure.session_key",
21166 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) }
21167 },
21168 { &hf_rtps_pgm, {
21169 "Participant Generic Message", "rtps.pgm",
21170 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) }
21171 },
21172 { &hf_rtps_srm, {
21173 "Service Request Message", "rtps.srm",
21174 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) }
21175 },
21176 { &hf_rtps_pgm_dst_participant_guid,
21177 { "Destination Participant GUID", "rtps.pgm.dst_participant_guid",
21178 FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21179 },
21180 { &hf_rtps_source_participant_guid,
21181 { "Source Participant GUID", "rtps.pgm.source_participant_guid",
21182 FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21183 },
21184 { &hf_rtps_pgm_dst_endpoint_guid,
21185 { "Destination Endpoint GUID", "rtps.pgm.dst_endpoint_guid",
21186 FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21187 },
21188 { &hf_rtps_pgm_src_endpoint_guid,
21189 { "Source Endpoint GUID", "rtps.pgm.src_endpoint_guid",
21190 FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21191 },
21192 { &hf_rtps_message_identity_source_guid,
21193 { "Source GUID", "rtps.pgm.message_identity.source_guid",
21194 FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21195 },
21196 { &hf_rtps_pgm_message_class_id,
21197 { "Message class id", "rtps.pgm.data_holder.message_class_id",
21198 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21199 },
21200 { &hf_rtps_pgm_data_holder_class_id,
21201 { "Class Id", "rtps.pgm.data_holder.class_id",
21202 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21203 },
21204#if 0
21205 { &hf_rtps_pgm_data_holder_stringseq_size,
21206 { "Size", "rtps.pgm.data_holder.string_seq_size",
21207 FT_INT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21208 },
21209 { &hf_rtps_pgm_data_holder_stringseq_name,
21210 { "Name", "rtps.pgm.data_holder.string_seq_name",
21211 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21212 },
21213 { &hf_rtps_pgm_data_holder_long_long,
21214 { "Long long", "rtps.pgm.data_holder.long_long",
21215 FT_INT64, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21216 },
21217#endif
21218 { &hf_rtps_param_topic_query_publication_enable,
21219 { "Enable", "rtps.param.topic_query_publication_enable",
21220 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21221 },
21222 { &hf_rtps_param_topic_query_publication_sessions,
21223 { "Number of sessions", "rtps.param.topic_query_publication_sessions",
21224 FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21225 },
21226 { &hf_rtps_pl_cdr_member,
21227 { "Member value", "rtps.data.value",
21228 FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21229 },
21230 { &hf_rtps_pl_cdr_member_id,
21231 { "Member ID", "rtps.data.member_id",
21232 FT_UINT16, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21233 },
21234 { &hf_rtps_pl_cdr_member_length,
21235 { "Member length", "rtps.data.member_length",
21236 FT_UINT16, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21237 },
21238 { &hf_rtps_pl_cdr_member_id_ext,
21239 { "Member ID", "rtps.data.member_id",
21240 FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21241 },
21242 { &hf_rtps_pl_cdr_member_length_ext,
21243 { "Member length", "rtps.data.member_length",
21244 FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21245 },
21246 { &hf_rtps_dcps_publication_data_frame_number,{
21247 "DCPSPublicationData In", "rtps.dcps_publication_data_frame_number",
21248 FT_FRAMENUM, BASE_NONE, NULL((void*)0), 0x0,
21249 "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) }
21250 },
21251 { &hf_rtps_data_tag_name,
21252 { "Name", "rtps.param.data_tag.name",
21253 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21254 },
21255 { &hf_rtps_data_tag_value,
21256 { "Value", "rtps.param.data_tag.value",
21257 FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21258 },
21259 { &hf_rtps_fragments,
21260 { "Message fragments", "rtps.fragments",
21261 FT_NONE, BASE_NONE, NULL((void*)0), 0x00, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21262 },
21263 { &hf_rtps_fragment,
21264 { "Message fragment", "rtps.fragment",
21265 FT_FRAMENUM, BASE_NONE, NULL((void*)0), 0x00, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21266 },
21267 { &hf_rtps_fragment_overlap,
21268 { "Message fragment overlap", "rtps.fragment.overlap",
21269 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x00, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21270 },
21271 { &hf_rtps_fragment_overlap_conflict,
21272 { "Message fragment overlapping with conflicting data", "rtps.fragment.overlap.conflicts",
21273 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x00, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21274 },
21275 { &hf_rtps_fragment_multiple_tails,
21276 { "Message has multiple tail fragments", "rtps.fragment.multiple_tails",
21277 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x00, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21278 },
21279 { &hf_rtps_fragment_too_long_fragment,
21280 { "Message fragment too long", "rtps.fragment.too_long_fragment",
21281 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x00, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21282 },
21283 { &hf_rtps_fragment_error,
21284 { "Message defragmentation error", "rtps.fragment.error",
21285 FT_FRAMENUM, BASE_NONE, NULL((void*)0), 0x00, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21286 },
21287 { &hf_rtps_fragment_count,
21288 { "Message fragment count", "rtps.fragment.count",
21289 FT_UINT32, BASE_DEC, NULL((void*)0), 0x00, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21290 },
21291 { &hf_rtps_reassembled_in,
21292 { "Reassembled in", "rtps.reassembled.in",
21293 FT_FRAMENUM, BASE_NONE, NULL((void*)0), 0x00, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21294 },
21295 { &hf_rtps_reassembled_length,
21296 { "Reassembled length", "rtps.reassembled.length",
21297 FT_UINT32, BASE_DEC, NULL((void*)0), 0x00, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21298 },
21299 { &hf_rtps_reassembled_data,
21300 { "Reassembled RTPS data", "rtps.reassembled.data", FT_BYTES, BASE_NONE,
21301 NULL((void*)0), 0x0, "The reassembled payload", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21302 },
21303 { &hf_rtps_compression_plugin_class_id,
21304 { "Compression class Id", "rtps.param.compression_class_id", FT_UINT32, BASE_DEC,
21305 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) }
21306 },
21307 { &hf_rtps_encapsulation_options_compression_plugin_class_id,
21308 { "Compression class Id", "rtps.param.plugin.compression_class_id", FT_INT8, BASE_DEC,
21309 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) }
21310 },
21311 { &hf_rtps_padding_bytes,
21312 { "Padding bytes", "rtps.padding_bytes", FT_INT8, BASE_DEC,
21313 NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21314 },
21315 { &hf_rtps_uncompressed_serialized_length,
21316 { "Uncompressed serialized length", "rtps.param.uncompressed_serialized_length", FT_UINT32, BASE_DEC,
21317 NULL((void*)0), 0x0, "The reassembled payload", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21318 },
21319
21320 { &hf_rtps_encapsulation_extended_compression_options,
21321 { "Uncompressed serialized length", "rtps.extended_compression_options", FT_UINT32, BASE_DEC,
21322 NULL((void*)0), 0x0, "Extended compression options", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21323 },
21324 { &hf_rtps_compressed_serialized_type_object,
21325 { "Compressed serialized type object", "rtps.param.compressed_serialized_typeobject", FT_BYTES, BASE_NONE,
21326 NULL((void*)0), 0x0, "The reassembled payload", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21327 },
21328
21329 { &hf_rtps_dissection_boolean,
21330 {"BOOLEAN", "rtps.dissection.boolean",
21331 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21332 },
21333
21334 { &hf_rtps_dissection_byte,
21335 {"BYTE", "rtps.dissection.byte",
21336 FT_UINT8, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21337 },
21338
21339 { &hf_rtps_dissection_int16,
21340 {"INT16", "rtps.dissection.int16",
21341 FT_INT16, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21342 },
21343
21344 { &hf_rtps_dissection_uint16,
21345 {"UINT16", "rtps.dissection.uint16",
21346 FT_UINT16, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21347 },
21348
21349 { &hf_rtps_dissection_int32,
21350 {"INT32", "rtps.dissection.int32",
21351 FT_INT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21352 },
21353
21354 { &hf_rtps_dissection_uint32,
21355 {"UINT32", "rtps.dissection.uint32",
21356 FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21357 },
21358
21359 { &hf_rtps_dissection_int64,
21360 {"INT64", "rtps.dissection.int64",
21361 FT_INT64, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21362 },
21363
21364 { &hf_rtps_dissection_uint64,
21365 {"UINT64", "rtps.dissection.uint64",
21366 FT_UINT64, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21367 },
21368
21369 { &hf_rtps_dissection_float,
21370 {"FLOAT", "rtps.dissection.float",
21371 FT_FLOAT, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21372 },
21373
21374 { &hf_rtps_dissection_double,
21375 {"DOUBLE", "rtps.dissection.double",
21376 FT_DOUBLE, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21377 },
21378
21379 { &hf_rtps_dissection_int128,
21380 {"INT128", "rtps.dissection.int128",
21381 FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21382 },
21383
21384 { &hf_rtps_dissection_string,
21385 { "STRING", "rtps.dissection.string",
21386 FT_STRINGZ, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21387 },
21388 { &hf_rtps_flag_udpv4_wan_locator_u, {
21389 "UUID Locator", "rtps.flag.udpv4_wan_locator.u",
21390 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) }
21391 },
21392 { &hf_rtps_flag_udpv4_wan_locator_p, {
21393 "Public Locator", "rtps.flag.udpv4_wan_locator.p",
21394 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) }
21395 },
21396 { &hf_rtps_flag_udpv4_wan_locator_b, {
21397 "Bidirectional Locator", "rtps.flag.udpv4_wan_locator.b",
21398 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) }
21399 },
21400 { &hf_rtps_flag_udpv4_wan_locator_r, {
21401 "Relay Locator", "rtps.flag.udpv4_wan_locator.r",
21402 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) }
21403 },
21404 { &hf_rtps_udpv4_wan_locator_flags, {
21405 "Flags", "rtps.flag.udpv4_wan_locator",
21406 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) }
21407 },
21408 { &hf_rtps_uuid,{
21409 "UUID", "rtps.uuid",
21410 FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21411 },
21412 { &hf_rtps_udpv4_wan_locator_public_ip, {
21413 "Public IP", "rtps.udpv4_wan_locator.public_ip",
21414 FT_IPv4, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21415 },
21416 { &hf_rtps_udpv4_wan_locator_public_port, {
21417 "Public port", "rtps.udpv4_wan_locator.public_port",
21418 FT_UINT16, BASE_PT_UDP, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21419 },
21420 { &hf_rtps_udpv4_wan_locator_local_ip,{
21421 "Local IP", "rtps.udpv4_wan_locator.local_ip",
21422 FT_IPv4, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21423 },
21424 { &hf_rtps_udpv4_wan_locator_local_port,{
21425 "Local port", "rtps.udpv4_wan_locator.local_port",
21426 FT_UINT16, BASE_PT_UDP, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21427 },
21428 { &hf_rtps_flag_udpv4_wan_binding_ping_e, {
21429 "Endianness", "rtps.flag.udpv4_wan_binding_ping.e",
21430 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) }
21431 },
21432 { &hf_rtps_flag_udpv4_wan_binding_ping_l, {
21433 "Long address", "rtps.flag.udpv4_wan_binding_ping.l",
21434 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) }
21435 },
21436 { &hf_rtps_flag_udpv4_wan_binding_ping_b,{
21437 "Bidirectional", "rtps.flag.udpv4_wan_binding_ping.b",
21438 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) }
21439 },
21440 { &hf_rtps_udpv4_wan_binding_ping_flags, {
21441 "Flags", "rtps.flag.udpv4_wan_binding_ping",
21442 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) }
21443 },
21444 { &hf_rtps_udpv4_wan_binding_ping_port, {
21445 "RTPS port", "rtps.flag.udpv4_wan_binding_rtps_port",
21446 FT_UINT32, BASE_DEC, NULL((void*)0), 0, "UDPv4 WAN binding ping RTPS port", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21447 },
21448 { &hf_rtps_long_address, {
21449 "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) }
21450 },
21451 { &hf_rtps_param_group_coherent_set, {
21452 "Group coherent set sequence number", "rtps.param.group_coherent_set",
21453 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) }
21454 },
21455 { &hf_rtps_param_end_group_coherent_set, {
21456 "End group coherent set sequence number", "rtps.param.end_group_coherent_set",
21457 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) }
21458 },
21459 { &hf_rtps_param_mig_end_coherent_set_sample_count, {
21460 "Ended coherent set sample count", "rtps.param.mig_end_coherent_set_sample_count",
21461 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) }
21462 },
21463 { &hf_rtps_flag_cloud_discovery_service_announcer,{
21464 "Cloud Discovery Service Announcer", "rtps.flag.cloud_discovery_service_announcer",
21465 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) }
21466 },
21467 { &hf_rtps_writer_group_oid, {
21468 "Writer Group OID", "rtps.writer_group_oid",
21469 FT_UINT32, BASE_DEC, NULL((void*)0), 0, "Decimal representing the writer group OID", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21470 },
21471 { &hf_rtps_reader_group_oid, {
21472 "Reader Group OID", "rtps.reader_group_oid",
21473 FT_UINT32, BASE_DEC, NULL((void*)0), 0, "Decimal representing the reader group OID", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21474 },
21475 { &hf_rtps_writer_session_id,{
21476 "Writer Session ID", "rtps.writer_session_id",
21477 FT_UINT32, BASE_DEC, NULL((void*)0), 0, "Decimal representing the writer session ID", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
21478 },
21479 { &hf_rtps_flag_participant_config_writer,{
21480 "Participant Config Writer", "rtps.flag.participant_config_writer",
21481 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) }
21482 },
21483 { &hf_rtps_flag_participant_config_reader,{
21484 "Participant Config Reader", "rtps.flag.participant_config_reader",
21485 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) }
21486 },
21487 { &hf_rtps_flag_participant_config_secure_writer,{
21488 "Participant Config Secure Writer", "rtps.flag.participant_config_secure_writer",
21489 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) }
21490 },
21491 { &hf_rtps_flag_participant_config_secure_reader,{
21492 "Participant Config Secure Reader", "rtps.flag.participant_config_secure_reader",
21493 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) }
21494 },
21495 { &hf_rtps_flag_participant_bootstrap_writer,{
21496 "Participant Bootstrap Writer", "rtps.flag.participant_bootstrap_writer",
21497 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) }
21498 },
21499 { &hf_rtps_flag_participant_bootstrap_reader,{
21500 "Participant Bootstrap Reader", "rtps.flag.participant_bootstrap_reader",
21501 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) }
21502 },
21503 { &hf_rtps_flag_monitoring_periodic_writer,{
21504 "Monitoring Periodic Writer", "rtps.flag.monitoring_periodic_writer",
21505 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) }
21506 },
21507 { &hf_rtps_flag_monitoring_periodic_reader,{
21508 "Monitoring Periodic Reader", "rtps.flag.monitoring_periodic_reader",
21509 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) }
21510 },
21511 { &hf_rtps_flag_monitoring_event_writer,{
21512 "Monitoring Event Writer", "rtps.flag.monitoring_event_writer",
21513 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) }
21514 },
21515 { &hf_rtps_flag_monitoring_event_reader,{
21516 "Monitoring Event Reader", "rtps.flag.monitoring_event_reader",
21517 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) }
21518 },
21519 { &hf_rtps_flag_monitoring_logging_writer,{
21520 "Monitoring Logging Writer", "rtps.flag.monitoring_logging_writer",
21521 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) }
21522 },
21523 { &hf_rtps_flag_monitoring_logging_reader,{
21524 "Monitoring Logging Reader", "rtps.flag.monitoring_logging_reader",
21525 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) }
21526 }
21527 };
21528
21529 static int *ett[] = {
21530 &ett_rtps,
21531 &ett_rtps_default_mapping,
21532 &ett_rtps_proto_version,
21533 &ett_rtps_product_version,
21534 &ett_rtps_submessage,
21535 &ett_rtps_parameter_sequence,
21536 &ett_rtps_parameter,
21537 &ett_rtps_flags,
21538 &ett_rtps_entity,
21539 &ett_rtps_generic_guid,
21540 &ett_rtps_rdentity,
21541 &ett_rtps_wrentity,
21542 &ett_rtps_guid_prefix,
21543 &ett_rtps_app_id,
21544 &ett_rtps_locator_udp_v4,
21545 &ett_rtps_locator,
21546 &ett_rtps_locator_list,
21547 &ett_rtps_timestamp,
21548 &ett_rtps_bitmap,
21549 &ett_rtps_seq_string,
21550 &ett_rtps_seq_ulong,
21551 &ett_rtps_resource_limit,
21552 &ett_rtps_durability_service,
21553 &ett_rtps_liveliness,
21554 &ett_rtps_manager_key,
21555 &ett_rtps_serialized_data,
21556 &ett_rtps_locator_filter_channel,
21557 &ett_rtps_part_message_data,
21558 &ett_rtps_sample_info_list,
21559 &ett_rtps_sample_info,
21560 &ett_rtps_sample_batch_list,
21561 &ett_rtps_locator_filter_locator,
21562 &ett_rtps_writer_heartbeat_virtual_list,
21563 &ett_rtps_writer_heartbeat_virtual,
21564 &ett_rtps_virtual_guid_heartbeat_virtual_list,
21565 &ett_rtps_virtual_guid_heartbeat_virtual,
21566 &ett_rtps_app_ack_virtual_writer_list,
21567 &ett_rtps_app_ack_virtual_writer,
21568 &ett_rtps_app_ack_virtual_writer_interval_list,
21569 &ett_rtps_app_ack_virtual_writer_interval,
21570 &ett_rtps_transport_info,
21571 &ett_rtps_property_list,
21572 &ett_rtps_property,
21573 &ett_rtps_topic_info,
21574 &ett_rtps_topic_info_dw_qos,
21575 &ett_rtps_type_bound_seq,
21576 &ett_rtps_type_dep,
21577 &ett_rtps_type_id,
21578 &ett_rtps_type_object_v2,
21579 &ett_rtps_type_object_v2_complete_type_detail,
21580 &ett_rtps_type_object_v2_alias,
21581 &ett_rtps_type_object_v2_alias_body,
21582 &ett_rtps_type_object_v2_struct,
21583 &ett_rtps_type_object_v2_struct_header,
21584 &ett_rtps_type_object_v2_member_seq,
21585 &ett_rtps_type_object_v2_member,
21586 &ett_rtps_type_object_v2_union,
21587 &ett_rtps_type_object_v2_union_header,
21588 &ett_rtps_type_object_v2_union_discriminator,
21589 &ett_rtps_type_object_v2_union_label_seq,
21590 &ett_rtps_type_object_v2_enum,
21591 &ett_rtps_type_object_v2_enum_header,
21592 &ett_rtps_type_object_v2_enum_literal,
21593 &ett_rtps_type_deps_seq,
21594 &ett_rtps_type_id_w_deps,
21595 &ett_rtps_type_id_w_size,
21596 &ett_rtps_type_object,
21597 &ett_rtps_type_information,
21598 &ett_rtps_type_lookup_request,
21599 &ett_rtps_type_lookup_reply,
21600 &ett_rtps_type_lookup_request_id,
21601 &ett_rtps_type_lookup_request_header,
21602 &ett_rtps_type_lookup_reply_header,
21603 &ett_rtps_type_lookup_reply_data,
21604 &ett_rtps_type_lookup_deps_seq,
21605 &ett_rtps_type_lookup_request_data,
21606 &ett_rtps_instance_name,
21607 &ett_rtps_type_information_minimal,
21608 &ett_rtps_type_information_complete,
21609 &ett_rtps_type_library,
21610 &ett_rtps_type_element,
21611 &ett_rtps_type_annotation_usage_list,
21612 &ett_rtps_type_enum_constant,
21613 &ett_rtps_type_bound_list,
21614 &ett_rtps_secure_payload_tree,
21615 &ett_rtps_secure_dataheader_tree,
21616 &ett_rtps_secure_transformation_kind,
21617 &ett_rtps_pgm_data,
21618 &ett_rtps_message_identity,
21619 &ett_rtps_related_message_identity,
21620 &ett_rtps_data_holder_seq,
21621 &ett_rtps_data_holder,
21622 &ett_rtps_data_holder_properties,
21623 &ett_rtps_property_tree,
21624 &ett_rtps_param_header_tree,
21625 &ett_rtps_custom_dissection_info,
21626 &ett_rtps_service_request_tree,
21627 &ett_rtps_locator_ping_tree,
21628 &ett_rtps_locator_reachability_tree,
21629 &ett_rtps_locator_list_tree,
21630 &ett_rtps_topic_query_tree,
21631 &ett_rtps_topic_query_selection_tree,
21632 &ett_rtps_topic_query_filter_params_tree,
21633 &ett_rtps_data_member,
21634 &ett_rtps_data_tag_seq,
21635 &ett_rtps_data_tag_item,
21636 &ett_rtps_fragment,
21637 &ett_rtps_fragments,
21638 &ett_rtps_data_representation,
21639 &ett_rtps_decompressed_type_object,
21640 &ett_rtps_dissection_tree,
21641 &ett_rtps_info_remaining_items,
21642 &ett_rtps_data_encapsulation_options,
21643 &ett_rtps_decompressed_serialized_data,
21644 &ett_rtps_instance_transition_data,
21645 &ett_rtps_crypto_algorithm_requirements,
21646 &ett_rtps_decrypted_payload,
21647 &ett_rtps_secure_postfix_tag_list_item
21648 };
21649
21650 static ei_register_info ei[] = {
21651 { &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)}}
}},
21652 { &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)}}
}},
21653 { &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)}}
}},
21654 { &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)}}
}},
21655 { &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)}}
}},
21656 { &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)}}
}},
21657 { &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)}}
}},
21658 { &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)}}
}},
21659 { &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)}}
}},
21660 { &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)}}
}},
21661 { &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)}}
}},
21662 { &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)}}
}},
21663 { &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)}}
}},
21664 { &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)}}
}},
21665 { &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)}}
}},
21666 { &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)}}
}},
21667 };
21668
21669 module_t *rtps_module;
21670 expert_module_t *expert_rtps;
21671 uat_t * rtps_psk_uat;
21672
21673 proto_rtps = proto_register_protocol("Real-Time Publish-Subscribe Wire Protocol", "RTPS", "rtps");
21674 proto_register_field_array(proto_rtps, hf, array_length(hf)(sizeof (hf) / sizeof (hf)[0]));
21675 proto_register_subtree_array(ett, array_length(ett)(sizeof (ett) / sizeof (ett)[0]));
21676 expert_rtps = expert_register_protocol(proto_rtps);
21677 expert_register_field_array(expert_rtps, ei, array_length(ei)(sizeof (ei) / sizeof (ei)[0]));
21678
21679 /* Registers the control in the preference panel */
21680 rtps_module = prefs_register_protocol(proto_rtps, NULL((void*)0));
21681 prefs_register_uint_preference(
21682 rtps_module,
21683 "max_batch_samples_dissected",
21684 "Max samples dissected for DATA_BATCH",
21685 "Specifies the maximum number of samples dissected in a DATA_BATCH "
21686 "submessage. Increasing this value may affect performance if the "
21687 "trace has a lot of big batched samples.",
21688 10,
21689 &rtps_max_batch_samples_dissected);
21690
21691 prefs_register_bool_preference(
21692 rtps_module,
21693 "enable_max_dissection_info_elements",
21694 "Limit the number of elements dissected in structs",
21695 "Enabling this option may affect performance if the trace has messages "
21696 "with large Data Types.",
21697 &enable_max_data_type_elements);
21698
21699 prefs_register_uint_preference(
21700 rtps_module,
21701 "max_dissection_info_elements",
21702 "Max Dissection info elements shown in structs",
21703 "Specifies the maximum number of Data Type elements dissected. "
21704 "Increasing this value may affect performance if the trace has "
21705 "messages with large Data Types.",
21706 10,
21707 &rtps_max_data_type_elements);
21708
21709 prefs_register_bool_preference(
21710 rtps_module,
21711 "enable_max_dissection_array_elements",
21712 "Limit the number of elements dissected in arrays or sequences",
21713 "Disabling this option may affect performance if the trace has messages "
21714 "with large arrays or sequences.",
21715 &enable_max_array_data_type_elements);
21716
21717 prefs_register_uint_preference(
21718 rtps_module,
21719 "max_dissection_array_elements",
21720 "Max Dissection elements shown in arrays or sequences",
21721 "Specifies the maximum number of Data Type elements dissected in arrays or sequences. "
21722 "Increasing this value may affect "
21723 "performance if the trace has messages with large Data Types.",
21724 10,
21725 &rtps_max_array_data_type_elements);
21726
21727 prefs_register_bool_preference(
21728 rtps_module,
21729 "enable_topic_info",
21730 "Enable Topic Information",
21731 "Shows the Topic Name and Type Name of the samples. "
21732 "Note: this can considerably increase the dissection time.",
21733 &enable_topic_info);
21734
21735 prefs_register_bool_preference(
21736 rtps_module,
21737 "enable_debug_info",
21738 "Enable Debug Information",
21739 "Shows debug information such XCDR2 headers and string sizes",
21740 &enable_debug_info);
21741
21742 prefs_register_bool_preference(
21743 rtps_module,
21744 "enable_user_data_dissection",
21745 "Enable User Data Dissection (based on Type Object V1)",
21746 "Dissects the user data if the Type Object V1 is propagated in Discovery.",
21747 &enable_user_data_dissection);
21748
21749 prefs_register_bool_preference(
21750 rtps_module,
21751 "enable_rtps_reassembly",
21752 "Enable RTPS Reassembly",
21753 "Enables the reassembly of DATA_FRAG submessages.",
21754 &enable_rtps_reassembly);
21755
21756 prefs_register_bool_preference(
21757 rtps_module,
21758 "enable_rtps_checksum_check",
21759 "Enable RTPS Checksum check (Only CRC-32C and MD5 supported)",
21760 "Detects the RTPS packets with invalid checksums (Only CRC-32C and MD5 "
21761 "supported)",
21762 &enable_rtps_crc_check);
21763
21764 prefs_register_bool_preference(
21765 rtps_module,
21766 "enable_rtps_psk_decryption",
21767 "Enable RTPS PSK decryption",
21768 "Decode RTPS messages protected with a pre-shared key",
21769 &enable_rtps_psk_decryption);
21770
21771 rtps_psk_uat = uat_new(
21772 "RTPS GUID-PSK",
21773 sizeof(rtps_psk_options_entry_t),
21774 "RTPS PSK Keys",
21775 true1,
21776 &rtps_psk_options.entries,
21777 &rtps_psk_options.size,
21778 0x00000001,
21779 NULL((void*)0),
21780 rtps_psk_options_copy_entry,
21781 rtps_psk_options_update_entry,
21782 rtps_psk_options_free_entry,
21783 NULL((void*)0),
21784 NULL((void*)0),
21785 rtps_psk_table_field_array);
21786
21787 prefs_register_uat_preference(
21788 rtps_module,
21789 "psk_keys",
21790 "Pre-shared keys",
21791 "List of pre-shared keys that will be used to decode RTPS messages if"
21792 " the previous option is enabled",
21793 rtps_psk_uat);
21794
21795 rtps_type_name_table = register_dissector_table("rtps.type_name", "RTPS Type Name",
21796 proto_rtps, FT_STRING, STRING_CASE_SENSITIVE0);
21797
21798 registry = wmem_map_new_autoreset(wmem_epan_scope(), wmem_file_scope(), hash_by_guid, compare_by_guid);
21799 dissection_infos = wmem_map_new_autoreset(wmem_epan_scope(), wmem_file_scope(), g_int64_hash, g_int64_equal);
21800 union_member_mappings = wmem_map_new_autoreset(wmem_epan_scope(), wmem_file_scope(), g_int64_hash, g_int64_equal);
21801 mutable_member_mappings = wmem_map_new_autoreset(wmem_epan_scope(), wmem_file_scope(), g_int64_hash, g_int64_equal);
21802 coherent_set_tracking.entities_using_map = wmem_map_new_autoreset(wmem_epan_scope(), wmem_file_scope(), hash_by_guid, compare_by_guid);
21803 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);
21804 builtin_dissection_infos = wmem_map_new_autoreset(wmem_epan_scope(), wmem_epan_scope(), g_int64_hash, g_int64_equal);
21805
21806 coherent_set_tracking.entities_using_map = wmem_map_new_autoreset(wmem_epan_scope(), wmem_file_scope(), hash_by_guid, compare_by_guid);
21807 discovered_participants_domain_ids = wmem_map_new_autoreset(wmem_epan_scope(), wmem_file_scope(), hash_by_participant_guid, compare_by_participant_guid);
21808 /* In order to get this dissector from other dissectors */
21809 register_dissector("rtps", dissect_simple_rtps, proto_rtps);
21810
21811 initialize_instance_state_data_response_dissection_info(&builtin_types_dissection_data);
21812
21813 reassembly_table_register(&rtps_reassembly_table,
21814 &addresses_reassembly_table_functions);
21815}
21816
21817void proto_reg_handoff_rtps(void) {
21818 heur_dissector_add("rtitcp", dissect_rtps_rtitcp, "RTPS over RTITCP", "rtps_rtitcp", proto_rtps, HEURISTIC_ENABLE);
21819 heur_dissector_add("udp", dissect_rtps_udp, "RTPS over UDP", "rtps_udp", proto_rtps, HEURISTIC_ENABLE);
21820 heur_dissector_add("tcp", dissect_rtps_tcp, "RTPS over TCP", "rtps_tcp", proto_rtps, HEURISTIC_ENABLE);
21821}
21822
21823/*
21824 * Editor modelines
21825 *
21826 * Local Variables:
21827 * c-basic-offset: 2
21828 * tab-width: 8
21829 * indent-tabs-mode: nil
21830 * End:
21831 *
21832 * ex: set shiftwidth=2 tabstop=8 expandtab:
21833 * :indentSize=2:tabSize=8:noTabs=true:
21834 */