File: | epan/dissectors/packet-rtps.c |
Warning: | line 13943, column 11 Access to field 'additional_authenticated_data' results in a dereference of a null pointer (loaded from variable 'decryption_info') |
Press '?' to see keyboard shortcuts
Keyboard shortcuts:
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> | ||||
65 | typedef 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> | ||||
71 | typedef 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 | |||||
80 | void proto_register_rtps(void); | ||||
81 | void 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 | |||||
120 | typedef 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 | |||||
127 | typedef 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 | |||||
135 | typedef 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 | |||||
142 | typedef enum { | ||||
143 | EXTENSIBILITY_INVALID = 1, | ||||
144 | EXTENSIBILITY_FINAL, | ||||
145 | EXTENSIBILITY_EXTENSIBLE, | ||||
146 | EXTENSIBILITY_MUTABLE | ||||
147 | } RTICdrTypeObjectExtensibility; | ||||
148 | |||||
149 | typedef 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 | |||||
165 | typedef 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 | |||||
171 | typedef 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 | |||||
198 | typedef 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 | |||||
226 | typedef 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 | |||||
233 | typedef struct _rtps_tvb_field { | ||||
234 | tvbuff_t *tvb; | ||||
235 | int tvb_offset; | ||||
236 | int tvb_len; | ||||
237 | } rtps_tvb_field; | ||||
238 | |||||
239 | static 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 | */ | ||||
328 | static 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 | */ | ||||
400 | static 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 | |||||
410 | static 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) | ||||
428 | static 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 | |||||
434 | static wmem_map_t * dissection_infos; | ||||
435 | static wmem_map_t * builtin_dissection_infos; | ||||
436 | static wmem_map_t * union_member_mappings; | ||||
437 | static wmem_map_t * mutable_member_mappings; | ||||
438 | |||||
439 | /***************************************************************************/ | ||||
440 | /* Preferences */ | ||||
441 | /***************************************************************************/ | ||||
442 | static unsigned rtps_max_batch_samples_dissected = 16; | ||||
443 | static unsigned rtps_max_data_type_elements = DISSECTION_INFO_MAX_ELEMENTS_DEFAULT_VALUE(100); | ||||
444 | static unsigned rtps_max_array_data_type_elements = DISSECTION_INFO_ARRAY_MAX_ELEMENTS_DEFAULT_VALUE(100); | ||||
445 | static bool_Bool enable_topic_info = true1; | ||||
446 | static bool_Bool enable_debug_info = false0; | ||||
447 | static bool_Bool enable_rtps_reassembly = false0; | ||||
448 | static bool_Bool enable_user_data_dissection = false0; | ||||
449 | static bool_Bool enable_max_array_data_type_elements = true1; | ||||
450 | static bool_Bool enable_max_data_type_elements = true1; | ||||
451 | static bool_Bool enable_rtps_crc_check = false0; | ||||
452 | static bool_Bool enable_rtps_psk_decryption = false0; | ||||
453 | static 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 | |||||
1069 | static int hf_rtps_dissection_boolean; | ||||
1070 | static int hf_rtps_dissection_byte; | ||||
1071 | static int hf_rtps_dissection_int16; | ||||
1072 | static int hf_rtps_dissection_uint16; | ||||
1073 | static int hf_rtps_dissection_int32; | ||||
1074 | static int hf_rtps_dissection_uint32; | ||||
1075 | static int hf_rtps_dissection_int64; | ||||
1076 | static int hf_rtps_dissection_uint64; | ||||
1077 | static int hf_rtps_dissection_float; | ||||
1078 | static int hf_rtps_dissection_double; | ||||
1079 | static int hf_rtps_dissection_int128; | ||||
1080 | static int hf_rtps_dissection_string; | ||||
1081 | |||||
1082 | static const char *const SM_EXTRA_RPLUS = "(r+)"; | ||||
1083 | static const char *const SM_EXTRA_RMINUS = "(r-)"; | ||||
1084 | static const char *const SM_EXTRA_WPLUS = "(w+)"; | ||||
1085 | static const char *const SM_EXTRA_WMINUS = "(w-)"; | ||||
1086 | static const char *const SM_EXTRA_PPLUS = "(p+)"; | ||||
1087 | static const char *const SM_EXTRA_PMINUS = "(p-)"; | ||||
1088 | static const char *const SM_EXTRA_TPLUS = "(t+)"; | ||||
1089 | static const char *const SM_EXTRA_TMINUS = "(t-)"; | ||||
1090 | |||||
1091 | /***************************************************************************/ | ||||
1092 | /* Protocol Fields Identifiers */ | ||||
1093 | static int proto_rtps; | ||||
1094 | static int hf_rtps_magic; | ||||
1095 | static int hf_rtps_ping; | ||||
1096 | static int hf_rtps_protocol_version; | ||||
1097 | static int hf_rtps_protocol_version_major; | ||||
1098 | static int hf_rtps_protocol_version_minor; | ||||
1099 | static int hf_rtps_vendor_id; | ||||
1100 | |||||
1101 | static int hf_rtps_domain_id; | ||||
1102 | static int hf_rtps_domain_tag; | ||||
1103 | static int hf_rtps_participant_idx; | ||||
1104 | static int hf_rtps_nature_type; | ||||
1105 | |||||
1106 | static int hf_rtps_guid_prefix_v1; | ||||
1107 | static int hf_rtps_guid_prefix; | ||||
1108 | static int hf_rtps_guid_prefix_src; | ||||
1109 | static int hf_rtps_guid_prefix_dst; | ||||
1110 | static int hf_rtps_host_id; | ||||
1111 | static int hf_rtps_app_id; | ||||
1112 | static int hf_rtps_app_id_instance_id; | ||||
1113 | static int hf_rtps_app_id_app_kind; | ||||
1114 | |||||
1115 | static int hf_rtps_sm_id; | ||||
1116 | static int hf_rtps_sm_idv2; | ||||
1117 | static int hf_rtps_sm_flags; | ||||
1118 | static int hf_rtps_sm_flags2; | ||||
1119 | static int hf_rtps_sm_octets_to_next_header; | ||||
1120 | static int hf_rtps_sm_guid_prefix_v1; | ||||
1121 | static int hf_rtps_sm_guid_prefix; | ||||
1122 | static int hf_rtps_sm_host_id; | ||||
1123 | static int hf_rtps_sm_app_id; | ||||
1124 | static int hf_rtps_sm_instance_id_v1; | ||||
1125 | static int hf_rtps_sm_app_kind; | ||||
1126 | static int hf_rtps_sm_instance_id; | ||||
1127 | static int hf_rtps_sm_entity_id; | ||||
1128 | static int hf_rtps_sm_entity_id_key; | ||||
1129 | static int hf_rtps_sm_entity_id_kind; | ||||
1130 | static int hf_rtps_sm_rdentity_id; | ||||
1131 | static int hf_rtps_sm_rdentity_id_key; | ||||
1132 | static int hf_rtps_sm_rdentity_id_kind; | ||||
1133 | static int hf_rtps_sm_wrentity_id; | ||||
1134 | static int hf_rtps_sm_wrentity_id_key; | ||||
1135 | static int hf_rtps_sm_wrentity_id_kind; | ||||
1136 | static int hf_rtps_sm_seq_number; | ||||
1137 | |||||
1138 | static int hf_rtps_info_src_ip; | ||||
1139 | static int hf_rtps_info_src_unused; | ||||
1140 | |||||
1141 | static int hf_rtps_parameter_id; | ||||
1142 | static int hf_rtps_parameter_id_v2; | ||||
1143 | static int hf_rtps_parameter_id_inline_rti; | ||||
1144 | static int hf_rtps_parameter_id_toc; | ||||
1145 | static int hf_rtps_parameter_id_rti; | ||||
1146 | static int hf_rtps_parameter_id_adl; | ||||
1147 | static int hf_rtps_parameter_length; | ||||
1148 | static int hf_rtps_string_length; | ||||
1149 | static int hf_rtps_coherent_set_start; | ||||
1150 | static int hf_rtps_coherent_set_end; | ||||
1151 | static int hf_rtps_param_topic_name; | ||||
1152 | static int hf_rtps_param_strength; | ||||
1153 | static int hf_rtps_param_type_name; | ||||
1154 | static int hf_rtps_param_user_data; | ||||
1155 | static int hf_rtps_param_group_data; | ||||
1156 | static int hf_rtps_param_topic_data; | ||||
1157 | static int hf_rtps_param_content_filter_topic_name; | ||||
1158 | static int hf_rtps_param_related_topic_name; | ||||
1159 | static int hf_rtps_param_filter_class_name; | ||||
1160 | static int hf_rtps_issue_data; | ||||
1161 | static int hf_rtps_durability_service_cleanup_delay; | ||||
1162 | static int hf_rtps_liveliness_lease_duration; | ||||
1163 | static int hf_rtps_participant_lease_duration; | ||||
1164 | static int hf_rtps_time_based_filter_minimum_separation; | ||||
1165 | static int hf_rtps_reliability_max_blocking_time; | ||||
1166 | static int hf_rtps_deadline_period; | ||||
1167 | static int hf_rtps_latency_budget_duration; | ||||
1168 | static int hf_rtps_lifespan_duration; | ||||
1169 | static int hf_rtps_persistence; | ||||
1170 | static int hf_rtps_info_ts_timestamp; | ||||
1171 | static int hf_rtps_timestamp; | ||||
1172 | static int hf_rtps_locator_kind; | ||||
1173 | static int hf_rtps_locator_port; | ||||
1174 | /* static int hf_rtps_logical_port; */ | ||||
1175 | static int hf_rtps_locator_public_address_port; | ||||
1176 | static int hf_rtps_locator_ipv4; | ||||
1177 | static int hf_rtps_locator_ipv6; | ||||
1178 | static int hf_rtps_participant_builtin_endpoints; | ||||
1179 | static int hf_rtps_participant_manual_liveliness_count; | ||||
1180 | static int hf_rtps_history_depth; | ||||
1181 | static int hf_rtps_resource_limit_max_samples; | ||||
1182 | static int hf_rtps_resource_limit_max_instances; | ||||
1183 | static int hf_rtps_resource_limit_max_samples_per_instances; | ||||
1184 | static int hf_rtps_filter_bitmap; | ||||
1185 | static int hf_rtps_type_checksum; | ||||
1186 | static int hf_rtps_queue_size; | ||||
1187 | static int hf_rtps_acknack_count; | ||||
1188 | static int hf_rtps_durability_service_history_kind; | ||||
1189 | static int hf_rtps_durability_service_history_depth; | ||||
1190 | static int hf_rtps_durability_service_max_samples; | ||||
1191 | static int hf_rtps_durability_service_max_instances; | ||||
1192 | static int hf_rtps_durability_service_max_samples_per_instances; | ||||
1193 | static int hf_rtps_liveliness_kind; | ||||
1194 | static int hf_rtps_manager_key; | ||||
1195 | static int hf_rtps_locator_udp_v4; | ||||
1196 | static int hf_rtps_locator_udp_v4_port; | ||||
1197 | static int hf_param_ip_address; | ||||
1198 | static int hf_rtps_param_port; | ||||
1199 | static int hf_rtps_expects_inline_qos; | ||||
1200 | static int hf_rtps_presentation_coherent_access; | ||||
1201 | static int hf_rtps_presentation_ordered_access; | ||||
1202 | static int hf_rtps_expects_ack; | ||||
1203 | static int hf_rtps_reliability_kind; | ||||
1204 | static int hf_rtps_durability; | ||||
1205 | static int hf_rtps_ownership; | ||||
1206 | static int hf_rtps_presentation_access_scope; | ||||
1207 | static int hf_rtps_destination_order; | ||||
1208 | static int hf_rtps_history_kind; | ||||
1209 | static int hf_rtps_data_status_info; | ||||
1210 | static int hf_rtps_param_serialize_encap_kind; | ||||
1211 | static int hf_rtps_param_serialize_encap_len; | ||||
1212 | static int hf_rtps_param_transport_priority; | ||||
1213 | static int hf_rtps_param_type_max_size_serialized; | ||||
1214 | static int hf_rtps_param_entity_name; | ||||
1215 | static int hf_rtps_param_role_name; | ||||
1216 | static int hf_rtps_disable_positive_ack; | ||||
1217 | static int hf_rtps_participant_guid_v1; | ||||
1218 | static int hf_rtps_participant_guid; | ||||
1219 | static int hf_rtps_group_guid_v1; | ||||
1220 | static int hf_rtps_group_guid; | ||||
1221 | static int hf_rtps_endpoint_guid; | ||||
1222 | static int hf_rtps_param_host_id; | ||||
1223 | static int hf_rtps_param_app_id; | ||||
1224 | static int hf_rtps_param_instance_id; | ||||
1225 | static int hf_rtps_param_instance_id_v1; | ||||
1226 | static int hf_rtps_param_app_kind; | ||||
1227 | static int hf_rtps_param_entity; | ||||
1228 | static int hf_rtps_param_entity_key; | ||||
1229 | static int hf_rtps_param_entity_kind; | ||||
1230 | static int hf_rtps_data_frag_number; | ||||
1231 | static int hf_rtps_data_frag_num_fragments; | ||||
1232 | static int hf_rtps_data_frag_size; | ||||
1233 | static int hf_rtps_data_frag_sample_size; | ||||
1234 | static int hf_rtps_nokey_data_frag_number; | ||||
1235 | static int hf_rtps_nokey_data_frag_num_fragments; | ||||
1236 | static int hf_rtps_nokey_data_frag_size; | ||||
1237 | static int hf_rtps_nack_frag_count; | ||||
1238 | static int hf_rtps_heartbeat_frag_number; | ||||
1239 | static int hf_rtps_heartbeat_frag_count; | ||||
1240 | static int hf_rtps_heartbeat_batch_count; | ||||
1241 | static int hf_rtps_data_serialize_data; | ||||
1242 | static int hf_rtps_data_batch_timestamp; | ||||
1243 | static int hf_rtps_data_batch_offset_to_last_sample_sn; | ||||
1244 | static int hf_rtps_data_batch_sample_count; | ||||
1245 | static int hf_rtps_data_batch_offset_sn; | ||||
1246 | static int hf_rtps_data_batch_octets_to_sl_encap_id; | ||||
1247 | static int hf_rtps_data_batch_serialized_data_length; | ||||
1248 | static int hf_rtps_data_batch_octets_to_inline_qos; | ||||
1249 | static int hf_rtps_fragment_number_base64; | ||||
1250 | static int hf_rtps_fragment_number_base; | ||||
1251 | static int hf_rtps_fragment_number_num_bits; | ||||
1252 | static int hf_rtps_bitmap_num_bits; | ||||
1253 | static int hf_rtps_param_partition_num; | ||||
1254 | static int hf_rtps_param_partition; | ||||
1255 | static int hf_rtps_param_topic_alias_num; | ||||
1256 | static int hf_rtps_param_topic_alias; | ||||
1257 | static int hf_rtps_param_type_alias_num; | ||||
1258 | static int hf_rtps_param_type_alias; | ||||
1259 | static int hf_rtps_param_filter_expression; | ||||
1260 | static int hf_rtps_param_expression_parameters_num; | ||||
1261 | static int hf_rtps_param_expression_parameters; | ||||
1262 | static int hf_rtps_locator_filter_list_num_channels; | ||||
1263 | static int hf_rtps_locator_filter_list_filter_name; | ||||
1264 | static int hf_rtps_locator_filter_list_filter_exp; | ||||
1265 | static int hf_rtps_extra_flags; | ||||
1266 | static int hf_rtps_param_builtin_endpoint_set_flags; | ||||
1267 | static int hf_rtps_param_builtin_endpoint_ext_set_flags; | ||||
1268 | static int hf_rtps_param_vendor_builtin_endpoint_set_flags; | ||||
1269 | static int hf_rtps_param_endpoint_security_attributes; | ||||
1270 | static int hf_rtps_param_plugin_promiscuity_kind; | ||||
1271 | static int hf_rtps_param_service_kind; | ||||
1272 | |||||
1273 | static int hf_rtps_param_sample_signature_epoch; | ||||
1274 | static int hf_rtps_param_sample_signature_nonce; | ||||
1275 | static int hf_rtps_param_sample_signature_length; | ||||
1276 | static int hf_rtps_param_sample_signature_signature; | ||||
1277 | static int hf_rtps_secure_secure_data_length; | ||||
1278 | static int hf_rtps_secure_secure_data; | ||||
1279 | static int hf_rtps_param_enable_authentication; | ||||
1280 | static int hf_rtps_param_builtin_endpoint_qos; | ||||
1281 | static int hf_rtps_secure_dataheader_transformation_kind; | ||||
1282 | static int hf_rtps_secure_dataheader_transformation_key_revision_id; | ||||
1283 | static int hf_rtps_secure_dataheader_transformation_key_id; | ||||
1284 | static int hf_rtps_secure_dataheader_passphrase_id; | ||||
1285 | static int hf_rtps_secure_dataheader_passphrase_key_id; | ||||
1286 | static int hf_rtps_secure_dataheader_init_vector_suffix; | ||||
1287 | static int hf_rtps_secure_dataheader_session_id; | ||||
1288 | static int hf_rtps_secure_datatag_plugin_sec_tag; | ||||
1289 | static int hf_rtps_secure_datatag_plugin_sec_tag_key; | ||||
1290 | static int hf_rtps_secure_datatag_plugin_sec_tag_common_mac; | ||||
1291 | static int hf_rtps_secure_datatag_plugin_specific_macs_len; | ||||
1292 | static int hf_rtps_pgm; | ||||
1293 | static int hf_rtps_pgm_dst_participant_guid; | ||||
1294 | static int hf_rtps_pgm_dst_endpoint_guid; | ||||
1295 | static int hf_rtps_pgm_src_endpoint_guid; | ||||
1296 | static int hf_rtps_source_participant_guid; | ||||
1297 | static int hf_rtps_message_identity_source_guid; | ||||
1298 | static int hf_rtps_pgm_message_class_id; | ||||
1299 | static int hf_rtps_pgm_data_holder_class_id; | ||||
1300 | static 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 | |||||
1305 | static int hf_rtps_param_timestamp_sec; | ||||
1306 | static int hf_rtps_param_timestamp_fraction; | ||||
1307 | static int hf_rtps_transportInfo_classId; | ||||
1308 | static int hf_rtps_transportInfo_messageSizeMax; | ||||
1309 | static int hf_rtps_param_app_ack_count; | ||||
1310 | static int hf_rtps_param_app_ack_virtual_writer_count; | ||||
1311 | static int hf_rtps_param_app_ack_conf_virtual_writer_count; | ||||
1312 | static int hf_rtps_param_app_ack_conf_count; | ||||
1313 | static int hf_rtps_param_app_ack_interval_payload_length; | ||||
1314 | static int hf_rtps_param_app_ack_interval_flags; | ||||
1315 | static int hf_rtps_param_app_ack_interval_count; | ||||
1316 | static int hf_rtps_param_app_ack_octets_to_next_virtual_writer; | ||||
1317 | static int hf_rtps_expects_virtual_heartbeat; | ||||
1318 | static int hf_rtps_direct_communication; | ||||
1319 | static int hf_rtps_param_peer_host_epoch; | ||||
1320 | static int hf_rtps_param_endpoint_property_change_epoch; | ||||
1321 | static int hf_rtps_virtual_heartbeat_count; | ||||
1322 | static int hf_rtps_virtual_heartbeat_num_virtual_guids; | ||||
1323 | static int hf_rtps_virtual_heartbeat_num_writers; | ||||
1324 | static int hf_rtps_param_extended_parameter; | ||||
1325 | static int hf_rtps_param_extended_pid_length; | ||||
1326 | static int hf_rtps_param_type_consistency_kind; | ||||
1327 | static int hf_rtps_param_data_representation; | ||||
1328 | static int hf_rtps_param_ignore_sequence_bounds; | ||||
1329 | static int hf_rtps_param_ignore_string_bounds; | ||||
1330 | static int hf_rtps_param_ignore_member_names; | ||||
1331 | static int hf_rtps_param_prevent_type_widening; | ||||
1332 | static int hf_rtps_param_force_type_validation; | ||||
1333 | static int hf_rtps_param_ignore_enum_literal_names; | ||||
1334 | static int hf_rtps_parameter_data; | ||||
1335 | static int hf_rtps_param_product_version_major; | ||||
1336 | static int hf_rtps_param_product_version_minor; | ||||
1337 | static int hf_rtps_param_product_version_release; | ||||
1338 | static int hf_rtps_param_product_version_release_as_char; | ||||
1339 | static int hf_rtps_param_product_version_revision; | ||||
1340 | static int hf_rtps_param_acknowledgment_kind; | ||||
1341 | static int hf_rtps_param_topic_query_publication_enable; | ||||
1342 | static int hf_rtps_param_topic_query_publication_sessions; | ||||
1343 | |||||
1344 | static int hf_rtps_srm; | ||||
1345 | static int hf_rtps_srm_service_id; | ||||
1346 | static int hf_rtps_srm_request_body; | ||||
1347 | static int hf_rtps_srm_instance_id; | ||||
1348 | static int hf_rtps_topic_query_selection_filter_class_name; | ||||
1349 | static int hf_rtps_topic_query_selection_filter_expression; | ||||
1350 | static int hf_rtps_topic_query_selection_num_parameters; | ||||
1351 | static int hf_rtps_topic_query_selection_filter_parameter; | ||||
1352 | static int hf_rtps_topic_query_topic_name; | ||||
1353 | static int hf_rtps_topic_query_original_related_reader_guid; | ||||
1354 | |||||
1355 | static int hf_rtps_encapsulation_id; | ||||
1356 | static int hf_rtps_encapsulation_kind; | ||||
1357 | static int hf_rtps_octets_to_inline_qos; | ||||
1358 | static int hf_rtps_filter_signature; | ||||
1359 | static int hf_rtps_bitmap; | ||||
1360 | static int hf_rtps_acknack_analysis; | ||||
1361 | static int hf_rtps_property_name; | ||||
1362 | static int hf_rtps_property_value; | ||||
1363 | static int hf_rtps_union; | ||||
1364 | static int hf_rtps_union_case; | ||||
1365 | static int hf_rtps_struct; | ||||
1366 | static int hf_rtps_member_name; | ||||
1367 | static int hf_rtps_sequence; | ||||
1368 | static int hf_rtps_array; | ||||
1369 | static int hf_rtps_bitfield; | ||||
1370 | static int hf_rtps_datatype; | ||||
1371 | static int hf_rtps_sequence_size; | ||||
1372 | static int hf_rtps_guid; | ||||
1373 | static int hf_rtps_heartbeat_count; | ||||
1374 | static int hf_rtps_encapsulation_options; | ||||
1375 | static int hf_rtps_serialized_key; | ||||
1376 | static int hf_rtps_serialized_data; | ||||
1377 | static int hf_rtps_base_type_id_discriminator; | ||||
1378 | static int hf_rtps_instance_name; | ||||
1379 | static int hf_rtps_remote_exception_code; | ||||
1380 | static int hf_rtps_type_bound; | ||||
1381 | static int hf_rtps_type_deps_count; | ||||
1382 | static int hf_rtps_type_deps_result; | ||||
1383 | static int hf_rtps_type_element_flags; | ||||
1384 | static int hf_rtps_type_equiv_kind; | ||||
1385 | static int hf_rtps_type_extended; | ||||
1386 | static int hf_rtps_type_hash; | ||||
1387 | static int hf_rtps_type_id_discriminator; | ||||
1388 | static int hf_rtps_type_id_w_size; | ||||
1389 | static int hf_rtps_type_kind_discriminator; | ||||
1390 | static int hf_rtps_type_lookup_deps_seq; | ||||
1391 | static int hf_rtps_type_lookup_discriminator; | ||||
1392 | static int hf_rtps_type_object_serialized_size; | ||||
1393 | static int hf_rtps_type_object_v2; | ||||
1394 | static int hf_rtps_type_object_v2_ann_builtin; | ||||
1395 | static int hf_rtps_type_object_v2_enum_bit_bound; | ||||
1396 | static int hf_rtps_type_object_v2_enum_literal_value; | ||||
1397 | static int hf_rtps_type_object_v2_has_ann_builtin; | ||||
1398 | static int hf_rtps_type_object_v2_has_ann_custom; | ||||
1399 | static int hf_rtps_type_object_v2_member_flag_is_default; | ||||
1400 | static int hf_rtps_type_object_v2_member_flag_is_external; | ||||
1401 | static int hf_rtps_type_object_v2_member_flag_is_key; | ||||
1402 | static int hf_rtps_type_object_v2_member_flag_is_must_understand; | ||||
1403 | static int hf_rtps_type_object_v2_member_flag_is_optional; | ||||
1404 | static int hf_rtps_type_object_v2_member_flag_try_construct; | ||||
1405 | static int hf_rtps_type_object_v2_member_flags; | ||||
1406 | static int hf_rtps_type_object_v2_member_id; | ||||
1407 | static int hf_rtps_type_object_v2_member_name; | ||||
1408 | static int hf_rtps_type_object_v2_member_name_hash; | ||||
1409 | static int hf_rtps_type_object_v2_type_flag_is_appendable; | ||||
1410 | static int hf_rtps_type_object_v2_type_flag_is_autoid_hash; | ||||
1411 | static int hf_rtps_type_object_v2_type_flag_is_final; | ||||
1412 | static int hf_rtps_type_object_v2_type_flag_is_mutable; | ||||
1413 | static int hf_rtps_type_object_v2_type_flag_is_nested; | ||||
1414 | static int hf_rtps_type_object_v2_type_flags; | ||||
1415 | static int hf_rtps_type_object_v2_type_name; | ||||
1416 | static int hf_rtps_type_object_v2_union_label; | ||||
1417 | static int hf_rtps_xcdr2_delimited_header; | ||||
1418 | static int hf_rtps_xcdr2_enhanced_mutable_header; | ||||
1419 | static int hf_rtps_xcdr2_length_code; | ||||
1420 | static int hf_rtps_xcdr2_member_id; | ||||
1421 | static int hf_rtps_xcdr2_must_understand; | ||||
1422 | static int hf_rtps_xcdr2_nextint; | ||||
1423 | static int hf_rtps_type_object_type_id_disc; | ||||
1424 | static int hf_rtps_type_object_type_id; | ||||
1425 | static int hf_rtps_type_object_primitive_type_id; | ||||
1426 | static int hf_rtps_type_object_base_type; | ||||
1427 | static int hf_rtps_type_object_base_primitive_type_id; | ||||
1428 | static int hf_rtps_type_object_element_raw; | ||||
1429 | static int hf_rtps_type_object_type_property_name; | ||||
1430 | static int hf_rtps_type_object_flags; | ||||
1431 | static int hf_rtps_type_object_member_id; | ||||
1432 | static int hf_rtps_type_object_annotation_value_d; | ||||
1433 | static int hf_rtps_type_object_annotation_value_16; | ||||
1434 | static int hf_rtps_type_object_union_label; | ||||
1435 | static int hf_rtps_type_object_bound; | ||||
1436 | static int hf_rtps_type_object_enum_constant_name; | ||||
1437 | static int hf_rtps_type_object_enum_constant_value; | ||||
1438 | static int hf_rtps_type_object_element_shared; | ||||
1439 | static int hf_rtps_type_object_name; | ||||
1440 | static int hf_rtps_type_object_element_module_name; | ||||
1441 | static int hf_rtps_uncompressed_serialized_length; | ||||
1442 | static int hf_rtps_compression_plugin_class_id; | ||||
1443 | static int hf_rtps_compressed_serialized_type_object; | ||||
1444 | static int hf_rtps_pl_cdr_member; | ||||
1445 | static int hf_rtps_pl_cdr_member_id; | ||||
1446 | static int hf_rtps_pl_cdr_member_length; | ||||
1447 | static int hf_rtps_pl_cdr_member_id_ext; | ||||
1448 | static int hf_rtps_pl_cdr_member_length_ext; | ||||
1449 | static int hf_rtps_dcps_publication_data_frame_number; | ||||
1450 | static int hf_rtps_udpv4_wan_locator_flags; | ||||
1451 | static int hf_rtps_uuid; | ||||
1452 | static int hf_rtps_udpv4_wan_locator_public_ip; | ||||
1453 | static int hf_rtps_udpv4_wan_locator_public_port; | ||||
1454 | static int hf_rtps_udpv4_wan_locator_local_ip; | ||||
1455 | static int hf_rtps_udpv4_wan_locator_local_port; | ||||
1456 | static int hf_rtps_udpv4_wan_binding_ping_port; | ||||
1457 | static int hf_rtps_udpv4_wan_binding_ping_flags; | ||||
1458 | static int hf_rtps_long_address; | ||||
1459 | static int hf_rtps_param_group_coherent_set; | ||||
1460 | static int hf_rtps_param_end_group_coherent_set; | ||||
1461 | static int hf_rtps_param_mig_end_coherent_set_sample_count; | ||||
1462 | static int hf_rtps_encapsulation_options_compression_plugin_class_id; | ||||
1463 | static int hf_rtps_padding_bytes; | ||||
1464 | static int hf_rtps_topic_query_selection_kind; | ||||
1465 | static int hf_rtps_data_session_intermediate; | ||||
1466 | |||||
1467 | /* Flag bits */ | ||||
1468 | static int hf_rtps_flag_reserved80; | ||||
1469 | static int hf_rtps_flag_reserved40; | ||||
1470 | static int hf_rtps_flag_reserved20; | ||||
1471 | static int hf_rtps_flag_reserved10; | ||||
1472 | static int hf_rtps_flag_reserved08; | ||||
1473 | static int hf_rtps_flag_reserved04; | ||||
1474 | static int hf_rtps_flag_reserved02; | ||||
1475 | static int hf_rtps_flag_reserved8000; | ||||
1476 | static int hf_rtps_flag_reserved4000; | ||||
1477 | static int hf_rtps_flag_reserved2000; | ||||
1478 | static int hf_rtps_flag_reserved1000; | ||||
1479 | static int hf_rtps_flag_reserved0800; | ||||
1480 | static int hf_rtps_flag_reserved0400; | ||||
1481 | static int hf_rtps_flag_reserved0200; | ||||
1482 | static int hf_rtps_flag_reserved0100; | ||||
1483 | static int hf_rtps_flag_reserved0080; | ||||
1484 | static int hf_rtps_flag_reserved0040; | ||||
1485 | |||||
1486 | static int hf_rtps_flag_builtin_endpoint_set_reserved; | ||||
1487 | static int hf_rtps_flag_unregister; | ||||
1488 | static int hf_rtps_flag_inline_qos_v1; | ||||
1489 | static int hf_rtps_flag_hash_key; | ||||
1490 | static int hf_rtps_flag_alive; | ||||
1491 | static int hf_rtps_flag_data_present_v1; | ||||
1492 | static int hf_rtps_flag_multisubmessage; | ||||
1493 | static int hf_rtps_flag_endianness; | ||||
1494 | static int hf_rtps_flag_additional_authenticated_data; | ||||
1495 | static int hf_rtps_flag_protected_with_psk; | ||||
1496 | static int hf_rtps_flag_vendor_specific_content; | ||||
1497 | static int hf_rtps_flag_status_info; | ||||
1498 | static int hf_rtps_flag_data_present_v2; | ||||
1499 | static int hf_rtps_flag_inline_qos_v2; | ||||
1500 | static int hf_rtps_flag_final; | ||||
1501 | static int hf_rtps_flag_hash_key_rti; | ||||
1502 | static int hf_rtps_flag_liveliness; | ||||
1503 | static int hf_rtps_flag_multicast; | ||||
1504 | static int hf_rtps_flag_data_serialized_key; | ||||
1505 | static int hf_rtps_flag_data_frag_serialized_key; | ||||
1506 | static int hf_rtps_flag_timestamp; | ||||
1507 | static int hf_rtps_flag_no_virtual_guids; | ||||
1508 | static int hf_rtps_flag_multiple_writers; | ||||
1509 | static int hf_rtps_flag_multiple_virtual_guids; | ||||
1510 | static int hf_rtps_flag_serialize_key16; | ||||
1511 | static int hf_rtps_flag_invalid_sample; | ||||
1512 | static int hf_rtps_flag_data_present16; | ||||
1513 | static int hf_rtps_flag_offsetsn_present; | ||||
1514 | static int hf_rtps_flag_inline_qos16_v2; | ||||
1515 | static int hf_rtps_flag_timestamp_present; | ||||
1516 | static int hf_rtps_flag_unregistered; | ||||
1517 | static int hf_rtps_flag_disposed; | ||||
1518 | static int hf_rtps_param_status_info_flags; | ||||
1519 | |||||
1520 | static int hf_rtps_flag_participant_announcer; | ||||
1521 | static int hf_rtps_flag_participant_detector; | ||||
1522 | static int hf_rtps_flag_publication_announcer; | ||||
1523 | static int hf_rtps_flag_publication_detector; | ||||
1524 | static int hf_rtps_flag_subscription_announcer; | ||||
1525 | static int hf_rtps_flag_subscription_detector; | ||||
1526 | static int hf_rtps_flag_participant_proxy_announcer; | ||||
1527 | static int hf_rtps_flag_participant_proxy_detector; | ||||
1528 | static int hf_rtps_flag_participant_state_announcer; | ||||
1529 | static int hf_rtps_flag_participant_state_detector; | ||||
1530 | static int hf_rtps_flag_participant_message_datawriter; | ||||
1531 | static int hf_rtps_flag_participant_message_datareader; | ||||
1532 | static int hf_rtps_flag_typelookup_request_datawriter; | ||||
1533 | static int hf_rtps_flag_typelookup_request_datareader; | ||||
1534 | static int hf_rtps_flag_typelookup_reply_datawriter; | ||||
1535 | static int hf_rtps_flag_typelookup_reply_datareader; | ||||
1536 | static int hf_rtps_flag_typelookup_request_secure_datawriter; | ||||
1537 | static int hf_rtps_flag_typelookup_request_secure_datareader; | ||||
1538 | static int hf_rtps_flag_typelookup_reply_secure_datawriter; | ||||
1539 | static int hf_rtps_flag_typelookup_reply_secure_datareader; | ||||
1540 | static int hf_rtps_flag_secure_publication_writer; | ||||
1541 | static int hf_rtps_flag_secure_publication_reader; | ||||
1542 | static int hf_rtps_flag_secure_subscription_writer; | ||||
1543 | static int hf_rtps_flag_secure_subscription_reader; | ||||
1544 | static int hf_rtps_flag_secure_participant_message_writer; | ||||
1545 | static int hf_rtps_flag_secure_participant_message_reader; | ||||
1546 | static int hf_rtps_flag_participant_stateless_message_writer; | ||||
1547 | static int hf_rtps_flag_participant_stateless_message_reader; | ||||
1548 | static int hf_rtps_flag_secure_participant_volatile_message_writer; | ||||
1549 | static int hf_rtps_flag_secure_participant_volatile_message_reader; | ||||
1550 | static int hf_rtps_flag_participant_secure_writer; | ||||
1551 | static int hf_rtps_flag_participant_secure_reader; | ||||
1552 | static int hf_rtps_flag_typeflag_final; | ||||
1553 | static int hf_rtps_flag_typeflag_mutable; | ||||
1554 | static int hf_rtps_flag_typeflag_nested; | ||||
1555 | static int hf_rtps_flag_memberflag_key; | ||||
1556 | static int hf_rtps_flag_memberflag_optional; | ||||
1557 | static int hf_rtps_flag_memberflag_shareable; | ||||
1558 | static int hf_rtps_flag_memberflag_union_default; | ||||
1559 | static int hf_rtps_flag_service_request_writer; | ||||
1560 | static int hf_rtps_flag_service_request_reader; | ||||
1561 | static int hf_rtps_flag_locator_ping_writer; | ||||
1562 | static int hf_rtps_flag_locator_ping_reader; | ||||
1563 | static int hf_rtps_flag_secure_service_request_writer; | ||||
1564 | static int hf_rtps_flag_cloud_discovery_service_announcer; | ||||
1565 | static int hf_rtps_flag_participant_config_writer; | ||||
1566 | static int hf_rtps_flag_participant_config_reader; | ||||
1567 | static int hf_rtps_flag_participant_config_secure_writer; | ||||
1568 | static int hf_rtps_flag_participant_config_secure_reader; | ||||
1569 | static int hf_rtps_flag_participant_bootstrap_writer; | ||||
1570 | static int hf_rtps_flag_participant_bootstrap_reader; | ||||
1571 | static int hf_rtps_flag_monitoring_periodic_writer; | ||||
1572 | static int hf_rtps_flag_monitoring_periodic_reader; | ||||
1573 | static int hf_rtps_flag_monitoring_event_writer; | ||||
1574 | static int hf_rtps_flag_monitoring_event_reader; | ||||
1575 | static int hf_rtps_flag_monitoring_logging_writer; | ||||
1576 | static int hf_rtps_flag_monitoring_logging_reader; | ||||
1577 | static int hf_rtps_flag_secure_service_request_reader; | ||||
1578 | static int hf_rtps_flag_security_access_protected; | ||||
1579 | static int hf_rtps_flag_security_discovery_protected; | ||||
1580 | static int hf_rtps_flag_security_submessage_protected; | ||||
1581 | static int hf_rtps_param_participant_security_symmetric_cipher_algorithms_builtin_endpoints_required_mask; | ||||
1582 | static int hf_rtps_param_participant_security_symmetric_cipher_algorithms_builtin_endpoints_key_exchange_used_bit; | ||||
1583 | static int hf_rtps_param_participant_security_symmetric_cipher_algorithms_supported_mask; | ||||
1584 | static int hf_rtps_param_participant_security_symmetric_cipher_algorithms_user_endpoints_default_required_mask; | ||||
1585 | static int hf_rtps_flag_security_supported; | ||||
1586 | static int hf_rtps_flag_security_required; | ||||
1587 | static int hf_rtps_flag_security_symmetric_cipher_mask_aes128_gcm; | ||||
1588 | static int hf_rtps_flag_security_symmetric_cipher_mask_aes256_gcm; | ||||
1589 | static int hf_rtps_flag_security_symmetric_cipher_mask_vendor_rti_aes192_gcm; | ||||
1590 | static int hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm01; | ||||
1591 | static int hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm02; | ||||
1592 | static int hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm03; | ||||
1593 | static int hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm04; | ||||
1594 | static int hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm05; | ||||
1595 | static int hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm06; | ||||
1596 | static int hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm07; | ||||
1597 | static int hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm08; | ||||
1598 | static int hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm09; | ||||
1599 | static int hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm10; | ||||
1600 | static int hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm11; | ||||
1601 | static int hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm12; | ||||
1602 | static int hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm13; | ||||
1603 | static int hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm14; | ||||
1604 | static int hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm15; | ||||
1605 | static int hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm16; | ||||
1606 | static int hf_rtps_param_compression_id_mask; | ||||
1607 | static int hf_rtps_flag_compression_id_zlib; | ||||
1608 | static int hf_rtps_flag_compression_id_bzip2; | ||||
1609 | static int hf_rtps_flag_compression_id_lz4; | ||||
1610 | static int hf_rtps_param_crypto_algorithm_requirements_trust_chain; | ||||
1611 | static int hf_rtps_param_crypto_algorithm_requirements_message_auth; | ||||
1612 | static int hf_rtps_flag_security_digital_signature_mask_rsassapssmgf1sha256_2048_sha256; | ||||
1613 | static int hf_rtps_flag_security_digital_signature_mask_rsassapkcs1v15_2048_sha256; | ||||
1614 | static int hf_rtps_flag_security_digital_signature_mask_ecdsa_p256_sha256; | ||||
1615 | static int hf_rtps_flag_security_digital_signature_mask_ecdsa_p384_sha384; | ||||
1616 | static int hf_rtps_flag_security_digital_signature_mask_ecdsa_ed25519_sha512; | ||||
1617 | static int hf_rtps_flag_security_digital_signature_mask_ecdsa_ed448_shake256; | ||||
1618 | static int hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm01; | ||||
1619 | static int hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm02; | ||||
1620 | static int hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm03; | ||||
1621 | static int hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm04; | ||||
1622 | static int hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm05; | ||||
1623 | static int hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm06; | ||||
1624 | static int hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm07; | ||||
1625 | static int hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm08; | ||||
1626 | static int hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm09; | ||||
1627 | static int hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm10; | ||||
1628 | static int hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm11; | ||||
1629 | static int hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm12; | ||||
1630 | static int hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm13; | ||||
1631 | static int hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm14; | ||||
1632 | static int hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm15; | ||||
1633 | static int hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm16; | ||||
1634 | static int hf_rtps_flag_security_key_establishment_mask_dhe_modp2048256; | ||||
1635 | static int hf_rtps_flag_security_key_establishment_mask_ecdheceum_p256; | ||||
1636 | static int hf_rtps_flag_security_key_establishment_mask_ecdheceum_p384; | ||||
1637 | static int hf_rtps_flag_security_key_establishment_mask_ecdheceum_x25519; | ||||
1638 | static int hf_rtps_flag_security_key_establishment_mask_ecdheceum_x448; | ||||
1639 | static int hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm01; | ||||
1640 | static int hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm02; | ||||
1641 | static int hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm03; | ||||
1642 | static int hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm04; | ||||
1643 | static int hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm05; | ||||
1644 | static int hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm06; | ||||
1645 | static int hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm07; | ||||
1646 | static int hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm08; | ||||
1647 | static int hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm09; | ||||
1648 | static int hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm10; | ||||
1649 | static int hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm11; | ||||
1650 | static int hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm12; | ||||
1651 | static int hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm13; | ||||
1652 | static int hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm14; | ||||
1653 | static int hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm15; | ||||
1654 | static int hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm16; | ||||
1655 | static int hf_rtps_flag_security_algorithm_compatibility_mode; | ||||
1656 | static int hf_rtps_flag_security_payload_protected; | ||||
1657 | static int hf_rtps_flag_endpoint_security_attribute_flag_is_read_protected; | ||||
1658 | static int hf_rtps_flag_endpoint_security_attribute_flag_is_write_protected; | ||||
1659 | static int hf_rtps_flag_endpoint_security_attribute_flag_is_discovery_protected; | ||||
1660 | static int hf_rtps_flag_endpoint_security_attribute_flag_is_submessage_protected; | ||||
1661 | static int hf_rtps_flag_endpoint_security_attribute_flag_is_payload_protected; | ||||
1662 | static int hf_rtps_flag_endpoint_security_attribute_flag_is_key_protected; | ||||
1663 | static int hf_rtps_flag_endpoint_security_attribute_flag_is_liveliness_protected; | ||||
1664 | static int hf_rtps_flag_endpoint_security_attribute_flag_is_valid; | ||||
1665 | static int hf_rtps_param_endpoint_security_attributes_mask; | ||||
1666 | static int hf_rtps_flag_plugin_endpoint_security_attribute_flag_is_payload_encrypted; | ||||
1667 | static int hf_rtps_flag_plugin_endpoint_security_attribute_flag_is_key_encrypted; | ||||
1668 | static int hf_rtps_flag_plugin_endpoint_security_attribute_flag_is_liveliness_encrypted; | ||||
1669 | static int hf_rtps_flag_plugin_endpoint_security_attribute_flag_is_valid; | ||||
1670 | static int hf_rtps_param_plugin_endpoint_security_attributes_mask; | ||||
1671 | static int hf_rtps_flag_participant_security_attribute_flag_key_psk_protected; | ||||
1672 | static int hf_rtps_flag_participant_security_attribute_flag_is_rtps_protected; | ||||
1673 | static int hf_rtps_flag_participant_security_attribute_flag_is_discovery_protected; | ||||
1674 | static int hf_rtps_flag_participant_security_attribute_flag_is_liveliness_protected; | ||||
1675 | static int hf_rtps_flag_participant_security_attribute_flag_key_revisions_enabled; | ||||
1676 | static int hf_rtps_flag_participant_security_attribute_flag_is_valid; | ||||
1677 | static int hf_rtps_param_participant_security_attributes_mask; | ||||
1678 | static int hf_rtps_flag_plugin_participant_security_attribute_flag_is_psk_encrypted; | ||||
1679 | static int hf_rtps_flag_plugin_participant_security_attribute_flag_is_rtps_encrypted; | ||||
1680 | static int hf_rtps_flag_plugin_participant_security_attribute_flag_is_discovery_encrypted; | ||||
1681 | static int hf_rtps_flag_plugin_participant_security_attribute_flag_is_liveliness_encrypted; | ||||
1682 | static int hf_rtps_flag_plugin_participant_security_attribute_flag_is_rtps_origin_encrypted; | ||||
1683 | static int hf_rtps_flag_plugin_participant_security_attribute_flag_is_discovery_origin_encrypted; | ||||
1684 | static int hf_rtps_flag_plugin_participant_security_attribute_flag_is_liveliness_origin_encrypted; | ||||
1685 | static int hf_rtps_flag_plugin_participant_security_attribute_flag_is_valid; | ||||
1686 | static int hf_rtps_param_plugin_participant_security_attributes_mask; | ||||
1687 | static int hf_rtps_sm_rti_crc_number; | ||||
1688 | static int hf_rtps_sm_rti_crc_result; | ||||
1689 | static int hf_rtps_data_tag_name; | ||||
1690 | static int hf_rtps_data_tag_value; | ||||
1691 | static int hf_rtps_flag_udpv4_wan_locator_u; | ||||
1692 | static int hf_rtps_flag_udpv4_wan_locator_p; | ||||
1693 | static int hf_rtps_flag_udpv4_wan_locator_b; | ||||
1694 | static int hf_rtps_flag_udpv4_wan_locator_r; | ||||
1695 | static int hf_rtps_flag_udpv4_wan_binding_ping_e; | ||||
1696 | static int hf_rtps_flag_udpv4_wan_binding_ping_l; | ||||
1697 | static int hf_rtps_flag_udpv4_wan_binding_ping_b; | ||||
1698 | static int hf_rtps_header_extension_flags; | ||||
1699 | static int hf_rtps_flag_header_extension_message_length; | ||||
1700 | static int hf_rtps_flag_header_extension_uextension; | ||||
1701 | static int hf_rtps_flag_header_extension_wextension; | ||||
1702 | static int hf_rtps_flag_header_extension_checksum1; | ||||
1703 | static int hf_rtps_flag_header_extension_checksum2; | ||||
1704 | static int hf_rtps_flag_header_extension_parameters; | ||||
1705 | static int hf_rtps_flag_header_extension_timestamp; | ||||
1706 | |||||
1707 | static int hf_rtps_fragments; | ||||
1708 | static int hf_rtps_fragment; | ||||
1709 | static int hf_rtps_fragment_overlap; | ||||
1710 | static int hf_rtps_fragment_overlap_conflict; | ||||
1711 | static int hf_rtps_fragment_multiple_tails; | ||||
1712 | static int hf_rtps_fragment_too_long_fragment; | ||||
1713 | static int hf_rtps_fragment_error; | ||||
1714 | static int hf_rtps_fragment_count; | ||||
1715 | static int hf_rtps_reassembled_in; | ||||
1716 | static int hf_rtps_reassembled_length; | ||||
1717 | static int hf_rtps_reassembled_data; | ||||
1718 | static int hf_rtps_encapsulation_extended_compression_options; | ||||
1719 | static int hf_rtps_message_length; | ||||
1720 | static int hf_rtps_header_extension_checksum_crc32c; | ||||
1721 | static int hf_rtps_header_extension_checksum_crc64; | ||||
1722 | static int hf_rtps_header_extension_checksum_md5; | ||||
1723 | static int hf_rtps_uextension; | ||||
1724 | static int hf_rtps_wextension; | ||||
1725 | static int hf_rtps_writer_group_oid; | ||||
1726 | static int hf_rtps_reader_group_oid; | ||||
1727 | static int hf_rtps_writer_session_id; | ||||
1728 | |||||
1729 | /* Subtree identifiers */ | ||||
1730 | static int ett_rtps_dissection_tree; | ||||
1731 | static int ett_rtps; | ||||
1732 | static int ett_rtps_default_mapping; | ||||
1733 | static int ett_rtps_proto_version; | ||||
1734 | static int ett_rtps_submessage; | ||||
1735 | static int ett_rtps_parameter_sequence; | ||||
1736 | static int ett_rtps_parameter; | ||||
1737 | static int ett_rtps_flags; | ||||
1738 | static int ett_rtps_entity; | ||||
1739 | static int ett_rtps_generic_guid; | ||||
1740 | static int ett_rtps_rdentity; | ||||
1741 | static int ett_rtps_wrentity; | ||||
1742 | static int ett_rtps_guid_prefix; | ||||
1743 | static int ett_rtps_app_id; | ||||
1744 | static int ett_rtps_locator_udp_v4; | ||||
1745 | static int ett_rtps_locator; | ||||
1746 | static int ett_rtps_locator_list; | ||||
1747 | static int ett_rtps_timestamp; | ||||
1748 | static int ett_rtps_bitmap; | ||||
1749 | static int ett_rtps_seq_string; | ||||
1750 | static int ett_rtps_seq_ulong; | ||||
1751 | static int ett_rtps_resource_limit; | ||||
1752 | static int ett_rtps_durability_service; | ||||
1753 | static int ett_rtps_liveliness; | ||||
1754 | static int ett_rtps_manager_key; | ||||
1755 | static int ett_rtps_serialized_data; | ||||
1756 | static int ett_rtps_locator_filter_channel; | ||||
1757 | static int ett_rtps_part_message_data; | ||||
1758 | static int ett_rtps_sample_info_list; | ||||
1759 | static int ett_rtps_sample_info; | ||||
1760 | static int ett_rtps_sample_batch_list; | ||||
1761 | static int ett_rtps_locator_filter_locator; | ||||
1762 | static int ett_rtps_writer_heartbeat_virtual_list; | ||||
1763 | static int ett_rtps_writer_heartbeat_virtual; | ||||
1764 | static int ett_rtps_virtual_guid_heartbeat_virtual_list; | ||||
1765 | static int ett_rtps_virtual_guid_heartbeat_virtual; | ||||
1766 | static int ett_rtps_app_ack_virtual_writer_interval_list; | ||||
1767 | static int ett_rtps_app_ack_virtual_writer_interval; | ||||
1768 | static int ett_rtps_transport_info; | ||||
1769 | static int ett_rtps_app_ack_virtual_writer_list; | ||||
1770 | static int ett_rtps_app_ack_virtual_writer; | ||||
1771 | static int ett_rtps_product_version; | ||||
1772 | static int ett_rtps_property_list; | ||||
1773 | static int ett_rtps_property; | ||||
1774 | static int ett_rtps_topic_info; | ||||
1775 | static int ett_rtps_topic_info_dw_qos; | ||||
1776 | static int ett_rtps_type_bound_seq; | ||||
1777 | static int ett_rtps_type_dep; | ||||
1778 | static int ett_rtps_type_id; | ||||
1779 | static int ett_rtps_type_object_v2; | ||||
1780 | static int ett_rtps_type_object_v2_complete_type_detail; | ||||
1781 | static int ett_rtps_type_object_v2_alias; | ||||
1782 | static int ett_rtps_type_object_v2_alias_body; | ||||
1783 | static int ett_rtps_type_object_v2_struct; | ||||
1784 | static int ett_rtps_type_object_v2_struct_header; | ||||
1785 | static int ett_rtps_type_object_v2_member_seq; | ||||
1786 | static int ett_rtps_type_object_v2_member; | ||||
1787 | static int ett_rtps_type_object_v2_union; | ||||
1788 | static int ett_rtps_type_object_v2_union_header; | ||||
1789 | static int ett_rtps_type_object_v2_union_discriminator; | ||||
1790 | static int ett_rtps_type_object_v2_union_label_seq; | ||||
1791 | static int ett_rtps_type_object_v2_enum; | ||||
1792 | static int ett_rtps_type_object_v2_enum_header; | ||||
1793 | static int ett_rtps_type_object_v2_enum_literal; | ||||
1794 | static int ett_rtps_type_deps_seq; | ||||
1795 | static int ett_rtps_type_id_w_deps; | ||||
1796 | static int ett_rtps_type_id_w_size; | ||||
1797 | static int ett_rtps_type_information; | ||||
1798 | static int ett_rtps_type_lookup_request; | ||||
1799 | static int ett_rtps_type_lookup_reply; | ||||
1800 | static int ett_rtps_type_lookup_request_id; | ||||
1801 | static int ett_rtps_type_lookup_request_header; | ||||
1802 | static int ett_rtps_type_lookup_request_data; | ||||
1803 | static int ett_rtps_type_lookup_reply_header; | ||||
1804 | static int ett_rtps_type_lookup_reply_data; | ||||
1805 | static int ett_rtps_type_lookup_deps_seq; | ||||
1806 | static int ett_rtps_instance_name; | ||||
1807 | static int ett_rtps_type_information_minimal; | ||||
1808 | static int ett_rtps_type_information_complete; | ||||
1809 | static int ett_rtps_type_object; | ||||
1810 | static int ett_rtps_type_library; | ||||
1811 | static int ett_rtps_type_element; | ||||
1812 | static int ett_rtps_type_annotation_usage_list; | ||||
1813 | static int ett_rtps_type_enum_constant; | ||||
1814 | static int ett_rtps_type_bound_list; | ||||
1815 | static int ett_rtps_secure_payload_tree; | ||||
1816 | static int ett_rtps_secure_dataheader_tree; | ||||
1817 | static int ett_rtps_secure_transformation_kind; | ||||
1818 | static int ett_rtps_pgm_data; | ||||
1819 | static int ett_rtps_message_identity; | ||||
1820 | static int ett_rtps_related_message_identity; | ||||
1821 | static int ett_rtps_data_holder_seq; | ||||
1822 | static int ett_rtps_data_holder; | ||||
1823 | static int ett_rtps_data_holder_properties; | ||||
1824 | static int ett_rtps_property_tree; | ||||
1825 | static int ett_rtps_param_header_tree; | ||||
1826 | static int ett_rtps_service_request_tree; | ||||
1827 | static int ett_rtps_locator_ping_tree; | ||||
1828 | static int ett_rtps_locator_reachability_tree; | ||||
1829 | static int ett_rtps_custom_dissection_info; | ||||
1830 | static int ett_rtps_locator_list_tree; | ||||
1831 | static int ett_rtps_topic_query_tree; | ||||
1832 | static int ett_rtps_topic_query_selection_tree; | ||||
1833 | static int ett_rtps_topic_query_filter_params_tree; | ||||
1834 | static int ett_rtps_data_member; | ||||
1835 | static int ett_rtps_data_tag_seq; | ||||
1836 | static int ett_rtps_data_tag_item; | ||||
1837 | static int ett_rtps_fragment; | ||||
1838 | static int ett_rtps_fragments; | ||||
1839 | static int ett_rtps_data_representation; | ||||
1840 | static int ett_rtps_decompressed_type_object; | ||||
1841 | static int ett_rtps_info_remaining_items; | ||||
1842 | static int ett_rtps_data_encapsulation_options; | ||||
1843 | static int ett_rtps_decompressed_serialized_data; | ||||
1844 | static int ett_rtps_instance_transition_data; | ||||
1845 | static int ett_rtps_crypto_algorithm_requirements; | ||||
1846 | static int ett_rtps_decrypted_payload; | ||||
1847 | static int ett_rtps_secure_postfix_tag_list_item; | ||||
1848 | |||||
1849 | static expert_field ei_rtps_sm_octets_to_next_header_error; | ||||
1850 | static expert_field ei_rtps_checksum_check_error; | ||||
1851 | static expert_field ei_rtps_port_invalid; | ||||
1852 | static expert_field ei_rtps_ip_invalid; | ||||
1853 | static expert_field ei_rtps_parameter_value_invalid; | ||||
1854 | static expert_field ei_rtps_extra_bytes; | ||||
1855 | static expert_field ei_rtps_missing_bytes; | ||||
1856 | static expert_field ei_rtps_locator_port; | ||||
1857 | static expert_field ei_rtps_more_samples_available; | ||||
1858 | static expert_field ei_rtps_parameter_not_decoded; | ||||
1859 | static expert_field ei_rtps_sm_octets_to_next_header_not_zero; | ||||
1860 | static expert_field ei_rtps_pid_type_csonsistency_invalid_size; | ||||
1861 | static expert_field ei_rtps_uncompression_error; | ||||
1862 | static expert_field ei_rtps_value_too_large; | ||||
1863 | static expert_field ei_rtps_invalid_psk; | ||||
1864 | static expert_field ei_rtps_invalid_fragment_size; | ||||
1865 | |||||
1866 | /***************************************************************************/ | ||||
1867 | /* Value-to-String Tables */ | ||||
1868 | static 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 | |||||
1893 | static 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 | |||||
1950 | static 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 | |||||
1990 | static 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 | |||||
1999 | static 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 | |||||
2006 | static 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 | |||||
2022 | static 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 | |||||
2037 | static 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 | |||||
2075 | static 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 | ||||
2083 | static 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 | |||||
2110 | static 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 | |||||
2181 | static 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 | |||||
2192 | static 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 | |||||
2299 | static 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 | }; | ||||
2327 | static 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 | |||||
2333 | static 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 | |||||
2362 | static 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 | |||||
2369 | static 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 | |||||
2377 | static 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 | |||||
2383 | static 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 | |||||
2390 | static 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 | |||||
2396 | static 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 | |||||
2402 | static 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 | |||||
2408 | static 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 | |||||
2424 | static 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 | |||||
2431 | static 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 | |||||
2437 | static const value_string service_kind_vals[] = { | ||||
2438 | { 0x00000000, "NO_SERVICE_QOS" }, | ||||
2439 | { 0x00000001, "PERSISTENCE_SERVICE_QOS" }, | ||||
2440 | { 0, NULL((void*)0) } | ||||
2441 | }; | ||||
2442 | |||||
2443 | static 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 | |||||
2452 | static 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 */ | ||||
2460 | static 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 | |||||
2466 | static 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 */ | ||||
2473 | static 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 | |||||
2481 | static 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 | |||||
2488 | static 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 | |||||
2496 | static 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 | |||||
2508 | static 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 */ | ||||
2521 | static 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 | |||||
2539 | static 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 | |||||
2547 | static 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 | |||||
2553 | static 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 | |||||
2565 | static 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 | |||||
2577 | static 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 | |||||
2589 | static 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 | |||||
2601 | static 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 | |||||
2613 | static 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 | |||||
2625 | static 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 | |||||
2637 | static 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 | |||||
2649 | static 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 | |||||
2661 | static 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 | |||||
2673 | static 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 | |||||
2685 | static 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 | |||||
2697 | static 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 | |||||
2709 | static 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 | |||||
2721 | static 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 | |||||
2741 | static 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 | |||||
2753 | static 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 | |||||
2765 | static 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 | |||||
2777 | static 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 | |||||
2789 | static 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 | |||||
2801 | static 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 */ | ||||
2813 | static 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 | |||||
2825 | static 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 | |||||
2834 | static 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 | |||||
2844 | static 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 | |||||
2851 | static 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 | |||||
2859 | static 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 | |||||
2891 | static 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 | |||||
2903 | static 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 | |||||
2915 | static 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 | |||||
2927 | static 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 | |||||
2939 | static 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 | }; | ||||
2947 | static 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 | |||||
2957 | static 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 */ | ||||
2969 | static 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 */ | ||||
2981 | static 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 */ | ||||
2993 | static 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 */ | ||||
3005 | static 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 */ | ||||
3018 | static 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 | |||||
3031 | static 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 | |||||
3054 | static 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 | |||||
3063 | static 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 | |||||
3086 | static 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 | |||||
3109 | static 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 | |||||
3116 | static 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 | |||||
3140 | static 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 | |||||
3164 | static 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 | |||||
3189 | static 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 | |||||
3214 | static 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 | |||||
3244 | typedef struct _participant_info { | ||||
3245 | int domainId; | ||||
3246 | } participant_info; | ||||
3247 | |||||
3248 | typedef 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 | ||||
3255 | typedef 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 */ | ||||
3266 | typedef 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 | |||||
3273 | typedef 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 */ | ||||
3279 | typedef 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*/ | ||||
3286 | typedef struct _coherent_set_end { | ||||
3287 | uint64_t writer_seq_number; | ||||
3288 | coherent_set_key coherent_set_id; | ||||
3289 | } coherent_set_end; | ||||
3290 | |||||
3291 | typedef struct _coherent_set_track { | ||||
3292 | wmem_map_t *entities_using_map; | ||||
3293 | wmem_map_t *coherent_set_registry_map; | ||||
3294 | } coherent_set_track; | ||||
3295 | |||||
3296 | static coherent_set_track coherent_set_tracking; | ||||
3297 | static wmem_map_t * registry; | ||||
3298 | static reassembly_table rtps_reassembly_table; | ||||
3299 | static wmem_map_t *discovered_participants_domain_ids; | ||||
3300 | |||||
3301 | |||||
3302 | typedef struct { | ||||
3303 | type_mapping instance_state_data_response_type_mapping; | ||||
3304 | } builtin_types_type_mappings; | ||||
3305 | |||||
3306 | typedef 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 */ | ||||
3324 | typedef struct { | ||||
3325 | builtin_types_type_mappings type_mappings; | ||||
3326 | builtin_types_dissection_infos dissection_infos; | ||||
3327 | } builtin_types_dissection_data_t; | ||||
3328 | |||||
3329 | static builtin_types_dissection_data_t builtin_types_dissection_data; | ||||
3330 | |||||
3331 | /* | ||||
3332 | static type_mapping instance_state_data_response_type_mapping; | ||||
3333 | static dissection_info instance_state_data_response_dissection_info; | ||||
3334 | static dissection_info alive_instances_dissection_info; | ||||
3335 | static dissection_info disposed_instances_dissection_info; | ||||
3336 | static dissection_info unregistered_instances_dissection_info; | ||||
3337 | static dissection_info writer_guid_dissection_info; | ||||
3338 | static dissection_info reader_guid_dissection_info; | ||||
3339 | static dissection_info value_dissection_info; | ||||
3340 | */ | ||||
3341 | |||||
3342 | static 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 | |||||
3364 | typedef struct { | ||||
3365 | uint32_t host_id; | ||||
3366 | uint32_t app_id; | ||||
3367 | uint32_t instance_id; | ||||
3368 | } rtps_guid_prefix_t; | ||||
3369 | |||||
3370 | typedef 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 | ||||
3379 | typedef 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 | |||||
3394 | typedef struct { | ||||
3395 | uint32_t value; | ||||
3396 | bool_Bool ignore; | ||||
3397 | } rtps_psk_options_entry_uint32_string_t; | ||||
3398 | |||||
3399 | typedef 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 */ | ||||
3417 | typedef struct { | ||||
3418 | rtps_psk_options_entry_t *entries; | ||||
3419 | unsigned size; | ||||
3420 | } rtps_psk_options_t; | ||||
3421 | |||||
3422 | static 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 | */ | ||||
3434 | UAT_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; } } | ||||
3437 | UAT_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; } } | ||||
3440 | UAT_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; } } | ||||
3443 | UAT_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; } } | ||||
3446 | UAT_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 | |||||
3450 | static 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 | |||||
3478 | static 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 | |||||
3503 | static 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 | |||||
3524 | static 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 | |||||
3544 | static 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 | |||||
3611 | static 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 | */ | ||||
3677 | static 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 | |||||
3685 | static 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 | */ | ||||
3698 | static 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 | |||||
3772 | static 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 | */ | ||||
3784 | static 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 | |||||
3821 | static 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 | */ | ||||
3835 | static 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 | */ | ||||
3873 | static 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 | */ | ||||
3904 | static 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 | */ | ||||
3950 | static 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 | |||||
3977 | static 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 | */ | ||||
4081 | static 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 | |||||
4140 | static 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 */ | ||||
4143 | static 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 | |||||
4150 | static 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 | |||||
4160 | static 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 | */ | ||||
4181 | static 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 | |||||
4198 | static 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 | |||||
4217 | static 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 | |||||
4220 | static 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 | |||||
4279 | static 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 | |||||
4337 | static 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 | |||||
4346 | static 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 | |||||
4354 | static 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) | ||||
4367 | static 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) | ||||
4847 | static 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 | */ | ||||
4904 | static 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 | */ | ||||
5062 | static 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 | ®ister_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 | */ | ||||
5156 | static 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 | |||||
5181 | static 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 | */ | ||||
5206 | static 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 | */ | ||||
5235 | static 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 | */ | ||||
5462 | static 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 | |||||
5483 | static 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 | */ | ||||
5504 | static 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 | */ | ||||
5539 | static 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 | */ | ||||
5599 | static 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 | */ | ||||
5621 | static 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 | */ | ||||
5647 | static 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 | */ | ||||
5695 | static 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 | */ | ||||
5738 | static 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 | */ | ||||
5787 | static 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 | */ | ||||
5822 | static 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 | */ | ||||
5869 | static 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 | */ | ||||
5891 | static 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 | |||||
5908 | static 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 | */ | ||||
5956 | static 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 | */ | ||||
6002 | static 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 | */ | ||||
6022 | static 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 | */ | ||||
6050 | static 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 | */ | ||||
6066 | static 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 | */ | ||||
6105 | static 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 | */ | ||||
6120 | static 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 | */ | ||||
6140 | static 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 | */ | ||||
6154 | static 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 | */ | ||||
6223 | static 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 | */ | ||||
6264 | static 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 | /* ------------------------------------------------------------------------- */ | ||||
6286 | static 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) | ||||
6322 | static 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 | |||||
6907 | static 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 | |||||
6962 | static 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 | |||||
6989 | static 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 | |||||
7044 | static 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 | |||||
7081 | static 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 | |||||
7101 | static 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 | |||||
7120 | static 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 | |||||
7155 | static 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 | |||||
7165 | static 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 | |||||
7236 | static 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 | |||||
7311 | static 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 | |||||
7345 | static 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 | |||||
7389 | static 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) | ||||
7393 | static 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) | ||||
7405 | static 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) | ||||
7479 | static 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 | |||||
7495 | static 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 | */ | ||||
7543 | static 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 | */ | ||||
7577 | static 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) | ||||
7637 | static 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 | */ | ||||
7901 | static 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 | */ | ||||
7966 | static 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 | */ | ||||
8042 | static 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 | */ | ||||
8125 | static 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 | */ | ||||
8250 | static 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 | */ | ||||
8432 | static 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 | */ | ||||
8543 | static 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 | */ | ||||
8623 | static 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 | */ | ||||
8656 | static 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 | */ | ||||
8722 | static 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 | */ | ||||
8754 | static 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 | */ | ||||
8809 | static 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 | */ | ||||
8880 | static 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 | */ | ||||
8984 | static 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 | */ | ||||
9037 | static 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 | */ | ||||
9123 | static 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) | ||||
9236 | static 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 | ||||
9258 | static 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 | */ | ||||
9272 | static 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 | |||||
9293 | static 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 | |||||
9347 | static 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 | */ | ||||
9374 | static 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 | */ | ||||
9477 | static 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 | |||||
9561 | static 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 | |||||
9575 | static 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 | |||||
9610 | static 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 | |||||
9619 | static 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 | |||||
9625 | static 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 | |||||
9629 | static 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 | |||||
9635 | static 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 | |||||
9640 | static 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 | |||||
9644 | static 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 | |||||
9648 | static 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 | |||||
9667 | static 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 | */ | ||||
9683 | static 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 | */ | ||||
9736 | static | ||||
9737 | tvbuff_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 | */ | ||||
9780 | static | ||||
9781 | int 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 | |||||
9856 | static 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 | |||||
9889 | static 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, ¶m_id, ¶m_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, ¶m_id, ¶m_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, ¶m_id, ¶m_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, ¶m_id, ¶m_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, ¶m_id, ¶m_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, ¶m_id, ¶m_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, ¶m_id, ¶m_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 | |||||
10020 | static 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, ¶m_id, ¶m_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 | |||||
10053 | static 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 | |||||
10083 | static 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 | |||||
10135 | static 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 | |||||
10927 | static 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 | |||||
10967 | static 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 | |||||
11053 | static 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 | |||||
12026 | static 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 | |||||
12511 | static 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, ¶m_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, ¶m_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, ¶m_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, ¶m_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, ¶m_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, ¶m_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 | |||||
12693 | static 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 | /* *********************************************************************** */ | ||||
12709 | static 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 | |||||
12840 | static void dissect_parameterized_serialized_data(proto_tree *tree, tvbuff_t *tvb, | ||||
12841 | int offset_input, int size, const unsigned encoding) | ||||
12842 | { | ||||
12843 | proto_item* ti; | ||||
12844 | proto_tree* member_tree; | ||||
12845 | int offset = offset_input; | ||||
12846 | int deserialized_size = 0; | ||||
12847 | proto_tree* data_tree = proto_tree_add_subtree_format(tree, tvb, offset, -1, | ||||
12848 | ett_rtps_serialized_data, &ti, "serializedData"); | ||||
12849 | while (deserialized_size < size) { | ||||
12850 | /* PL_CDR/ParameterList style fields are 4-byte aligned relative to the | ||||
12851 | * encapsulation start. */ | ||||
12852 | ALIGN_ZERO(offset, 4, offset_input)(offset -= offset_input, offset = (((offset) + ((4) - 1)) & ~((4) - 1)), offset += offset_input); | ||||
12853 | |||||
12854 | /* Read the 4-byte short header candidate */ | ||||
12855 | uint32_t member_id = tvb_get_uint16(tvb, offset, encoding); | ||||
12856 | uint32_t member_length = tvb_get_uint16(tvb, offset + 2, encoding); | ||||
12857 | |||||
12858 | if ((member_id & PID_EXTENDED(0x3f01)) == PID_EXTENDED(0x3f01)) { | ||||
12859 | /* Extended 12-byte header: | ||||
12860 | * [0..1]: PID_EXTENDED | ||||
12861 | * [2..3]: length of extended payload in bytes (should be 8 for [ext_id(4) + ext_len(4)]) | ||||
12862 | * [4..7]: extended member id (uint32) | ||||
12863 | * [8..11]: extended member length (uint32) | ||||
12864 | */ | ||||
12865 | member_id = tvb_get_uint32(tvb, offset+4, encoding); | ||||
12866 | member_length = tvb_get_uint32(tvb, offset+8, encoding); | ||||
12867 | member_tree = proto_tree_add_subtree_format(data_tree, tvb, offset, member_length + 12, | ||||
12868 | ett_rtps_data_member, NULL((void*)0), "Member (id = %u, len = %u)", member_id, member_length); | ||||
12869 | proto_tree_add_item(member_tree, hf_rtps_pl_cdr_member_id_ext, tvb, offset+4, 4, encoding); | ||||
12870 | proto_tree_add_item(member_tree, hf_rtps_pl_cdr_member_length_ext, tvb, offset+8, 4, encoding); | ||||
12871 | offset += 12; | ||||
12872 | deserialized_size += 12; | ||||
12873 | } else if ((member_id & PID_LIST_END(0x3f02)) == PID_LIST_END(0x3f02)){ | ||||
12874 | /* If this is the end of the list, don't add a tree. | ||||
12875 | * If we add more logic here in the future, take into account that | ||||
12876 | * offset is incremented by 4 */ | ||||
12877 | deserialized_size += 4; | ||||
12878 | break; | ||||
12879 | } else { | ||||
12880 | member_tree = proto_tree_add_subtree_format(data_tree, tvb, offset, member_length + 4, | ||||
12881 | ett_rtps_data_member, NULL((void*)0), "Member (id = %u, len = %u)", member_id, member_length); | ||||
12882 | proto_tree_add_item(member_tree, hf_rtps_pl_cdr_member_id, tvb, offset, 2, encoding); | ||||
12883 | proto_tree_add_item(member_tree, hf_rtps_pl_cdr_member_length, tvb, offset+2, 2, encoding); | ||||
12884 | offset += 4; | ||||
12885 | deserialized_size += 4; | ||||
12886 | } | ||||
12887 | |||||
12888 | proto_tree_add_item(member_tree, hf_rtps_pl_cdr_member, tvb, offset, | ||||
12889 | member_length, encoding); | ||||
12890 | offset = check_offset_addition(offset, member_length, tree, NULL((void*)0), tvb); | ||||
12891 | deserialized_size += member_length; | ||||
12892 | } | ||||
12893 | proto_item_set_len(ti, deserialized_size); | ||||
12894 | } | ||||
12895 | |||||
12896 | /************************************************************************ */ | ||||
12897 | /* Encapsulated data * */ | ||||
12898 | /* ********************************************************************** */ | ||||
12899 | /* | ||||
12900 | * Note: the encapsulation header is ALWAYS big endian, then the encapsulation | ||||
12901 | * type specified the type of endianness of the payload. | ||||
12902 | * 0...2...........8...............16..............24..............32 | ||||
12903 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
12904 | *| representation_identifier | X X X X X X X X X X X | C C C P P | | ||||
12905 | *+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
12906 | *~ ~ | ||||
12907 | * ~... Bytes of data representation using a format that ... ~ | ||||
12908 | * ~... depends on the RepresentationIdentifier and options ... ~ | ||||
12909 | * ~ ~ | ||||
12910 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
12911 | * | ||||
12912 | * X = Unused options bits | ||||
12913 | * C = Compression bits | ||||
12914 | * P = Padding bits | ||||
12915 | * | ||||
12916 | * If compressed: | ||||
12917 | * 0...2...........8...............16..............24..............32 | ||||
12918 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
12919 | * | representation_identifier | X X X X X X X X X X X | C C C P P | | ||||
12920 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
12921 | * ~ Uncompressed Length ~ | ||||
12922 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
12923 | * ~ *Extended Compression Options ~ | ||||
12924 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
12925 | * ~ Compressed User Data ... ~ | ||||
12926 | * ~ ~ | ||||
12927 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
12928 | * | ||||
12929 | * C = 0b111 would be extended compression options which would come in as an | ||||
12930 | * additional header before the payload. | ||||
12931 | * C = 0b000 to indicate no compression | ||||
12932 | * | ||||
12933 | * This options field would be used for future enhancements.For example, | ||||
12934 | * could be used to define a custom compressor plugin for matching purposes. | ||||
12935 | */ | ||||
12936 | |||||
12937 | /* Dissects the encapsultaion header and uncompress the serialized | ||||
12938 | * data if is is compressed and it is compressed in using Zlib. | ||||
12939 | * | ||||
12940 | * @param[in] tree | ||||
12941 | * @param[in] packet info. | ||||
12942 | * @param[in] tvb | ||||
12943 | * @param[in] offset offset at the beginning of the encapsulation id. | ||||
12944 | * @param[in] size in bytes from the initial offset to the end of the serialized data | ||||
12945 | * @param[in] uncompress_if_compressed true for uncompressing if the data should be uncompressed. | ||||
12946 | * @param[out] encapsulation_id_out If not null it will contain the encapsultaion_id | ||||
12947 | * @param[out] compression_option_out If not null it will contain the compression option | ||||
12948 | * @param[out] padding_bytes_out If not null it will contain the padding bytes | ||||
12949 | * @param[out] extended_compression_options_out If not null it will contain the extended compression options | ||||
12950 | * @param[out] extended_header_bits_out If not null it will contain the extended header bits | ||||
12951 | * @param[out] is_compressed_out If not null it will indicate if the serielized data is compressed | ||||
12952 | * @param[out] uncompressed_ok_out If not null it will indicate if the serizlized data has been successfully uncompressed | ||||
12953 | * @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. | ||||
12954 | * @param[out] compressed_data_tree_out If not null it will contain the subtree of the uncompressed data. | ||||
12955 | * | ||||
12956 | * @return the offset after the at the beginining of the serialized data | ||||
12957 | * @note All output parameters are optional. | ||||
12958 | */ | ||||
12959 | static | ||||
12960 | int rtps_prepare_encapsulated_data( | ||||
12961 | proto_tree *tree, | ||||
12962 | packet_info *pinfo, | ||||
12963 | tvbuff_t *tvb, | ||||
12964 | int offset, | ||||
12965 | int size, | ||||
12966 | bool_Bool uncompress_if_compressed, | ||||
12967 | uint16_t *encapsulation_id_out, | ||||
12968 | uint8_t *compression_option_out, | ||||
12969 | uint8_t *padding_bytes_out, | ||||
12970 | uint32_t *extended_compression_options_out, | ||||
12971 | uint8_t *extended_header_bits_out, | ||||
12972 | bool_Bool *is_compressed_out, | ||||
12973 | bool_Bool *uncompressed_ok_out, | ||||
12974 | tvbuff_t **uncompressed_tvb_out, | ||||
12975 | proto_tree **compressed_data_tree_out) { | ||||
12976 | int initial_offset = offset; | ||||
12977 | int16_t encapsulation_options = 0; | ||||
12978 | uint32_t compressed_size = 0; | ||||
12979 | uint32_t uncompressed_size = 0; | ||||
12980 | uint16_t encapsulation_id = 0; | ||||
12981 | uint8_t compression_option = 0; | ||||
12982 | uint8_t padding_bytes = 0; | ||||
12983 | uint32_t extended_compression_options = 0; | ||||
12984 | uint8_t extended_header_bits = 0; | ||||
12985 | bool_Bool is_compressed = 0; | ||||
12986 | bool_Bool uncompressed_ok = 0; | ||||
12987 | tvbuff_t *uncompressed_tvb = NULL((void*)0); | ||||
12988 | |||||
12989 | /* This logic applies to data that is not a fragment (-1) or is the first fragment */ | ||||
12990 | /* Encapsulation ID */ | ||||
12991 | encapsulation_id = tvb_get_ntohs(tvb, offset); /* Always big endian */ | ||||
12992 | proto_tree_add_uint(tree, | ||||
12993 | hf_rtps_param_serialize_encap_kind, tvb, offset, 2, encapsulation_id); | ||||
12994 | offset += 2; | ||||
12995 | |||||
12996 | offset = rtps_util_dissect_encapsulation_options( | ||||
12997 | tree, | ||||
12998 | tvb, | ||||
12999 | offset, | ||||
13000 | &encapsulation_options, | ||||
13001 | &compression_option, | ||||
13002 | &padding_bytes, | ||||
13003 | &extended_header_bits); | ||||
13004 | /* If compressed on a supported format we have to uncompress it on a new tvb | ||||
13005 | * and reset the offset */ | ||||
13006 | is_compressed = (encapsulation_options & ENCAPSULATION_OPTIONS_COMPRESSION_BYTES_MASK(0x1C)) != 0; | ||||
13007 | if (is_compressed) { | ||||
13008 | uncompressed_size = tvb_get_int32(tvb, offset, ENC_BIG_ENDIAN0x00000000); | ||||
13009 | proto_tree_add_item( | ||||
13010 | tree, | ||||
13011 | hf_rtps_uncompressed_serialized_length, | ||||
13012 | tvb, | ||||
13013 | offset, | ||||
13014 | 4, | ||||
13015 | ENC_BIG_ENDIAN0x00000000); | ||||
13016 | offset += 4; | ||||
13017 | /* Get the compression extended options if required */ | ||||
13018 | if (extended_header_bits == ENCAPSULATION_OPTIONS_COMPRESSION_EXTENDED_HEADER_VALUE(0x1C)) { | ||||
13019 | extended_compression_options = tvb_get_int32(tvb, offset, ENC_BIG_ENDIAN0x00000000); | ||||
13020 | proto_tree_add_item( | ||||
13021 | tree, | ||||
13022 | hf_rtps_encapsulation_extended_compression_options, | ||||
13023 | tvb, | ||||
13024 | offset, | ||||
13025 | 4, | ||||
13026 | ENC_BIG_ENDIAN0x00000000); | ||||
13027 | offset += 4; | ||||
13028 | } | ||||
13029 | /* Get the compressed size. Padding bytes are the padding at the end of the compressed data */ | ||||
13030 | compressed_size = size - (offset - initial_offset) - padding_bytes; | ||||
13031 | } | ||||
13032 | |||||
13033 | /* Only decompress if it is compressed with ZLIB */ | ||||
13034 | if (uncompress_if_compressed && (compression_option == RTI_OSAPI_COMPRESSION_CLASS_ID_ZLIB(1))) { | ||||
13035 | bool_Bool tried_to_uncompress = false0; | ||||
13036 | proto_item *uncompressed_data_item = NULL((void*)0); | ||||
13037 | |||||
13038 | /* Try to uncompress the data */ | ||||
13039 | uncompressed_tvb = rtps_util_get_uncompressed_tvb_zlib( | ||||
13040 | tvb, | ||||
13041 | offset, | ||||
13042 | compressed_size, | ||||
13043 | &tried_to_uncompress); | ||||
13044 | /* The uncompressed data size must be the same as it is in the "Uncompressed Length" field */ | ||||
13045 | uncompressed_ok = (uncompressed_tvb != NULL((void*)0) | ||||
13046 | && (uncompressed_size == (uint32_t)tvb_reported_length(uncompressed_tvb))); | ||||
13047 | |||||
13048 | /* If uncompression went well we have a new tvb that holds the uncompressed data */ | ||||
13049 | if (tried_to_uncompress) { | ||||
13050 | tvbuff_t *child_tvb = NULL((void*)0); | ||||
13051 | int child_size = 0; | ||||
13052 | int child_offset = 0; | ||||
13053 | |||||
13054 | /* If the tvb is not uncompressed we add use the ovb, offset and size | ||||
13055 | * of the original tvb */ | ||||
13056 | if (uncompressed_tvb != NULL((void*)0)) { | ||||
13057 | child_tvb = uncompressed_tvb; | ||||
13058 | child_size = -1; | ||||
13059 | child_offset = 0; | ||||
13060 | } else { | ||||
13061 | child_tvb = tvb; | ||||
13062 | child_size = compressed_size; | ||||
13063 | child_offset = offset; | ||||
13064 | } | ||||
13065 | /* Uncompressed sample hangs from a different subtree */ | ||||
13066 | *compressed_data_tree_out = proto_tree_add_subtree( | ||||
13067 | tree, | ||||
13068 | child_tvb, | ||||
13069 | child_offset, | ||||
13070 | child_size, | ||||
13071 | ett_rtps_decompressed_serialized_data, | ||||
13072 | &uncompressed_data_item, | ||||
13073 | "[Decompressed data]"); | ||||
13074 | /* If we tried to decompress we need to add hf_rtps_uncompression_ok set to true or false*/ | ||||
13075 | if (!(uncompressed_ok)) { | ||||
13076 | expert_add_info_format( | ||||
13077 | pinfo, | ||||
13078 | uncompressed_data_item, | ||||
13079 | &ei_rtps_uncompression_error, | ||||
13080 | "Error: unable to uncompress payload"); | ||||
13081 | } | ||||
13082 | } | ||||
13083 | } | ||||
13084 | |||||
13085 | /* Set the optional output parameters */ | ||||
13086 | if (encapsulation_id_out != NULL((void*)0)) { | ||||
13087 | *encapsulation_id_out = encapsulation_id; | ||||
13088 | } | ||||
13089 | if (compression_option_out != NULL((void*)0)) { | ||||
13090 | *compression_option_out = compression_option; | ||||
13091 | } | ||||
13092 | if (padding_bytes_out != NULL((void*)0)) { | ||||
13093 | *padding_bytes_out = padding_bytes; | ||||
13094 | } | ||||
13095 | if (extended_compression_options_out != NULL((void*)0)) { | ||||
13096 | *extended_compression_options_out = extended_compression_options; | ||||
13097 | } | ||||
13098 | if (extended_header_bits_out != NULL((void*)0)) { | ||||
13099 | *extended_header_bits_out = extended_header_bits; | ||||
13100 | } | ||||
13101 | if (is_compressed_out != NULL((void*)0)) { | ||||
13102 | *is_compressed_out = is_compressed; | ||||
13103 | } | ||||
13104 | if (uncompressed_ok_out != NULL((void*)0)) { | ||||
13105 | *uncompressed_ok_out = uncompressed_ok; | ||||
13106 | } | ||||
13107 | if (uncompressed_tvb_out != NULL((void*)0)) { | ||||
13108 | *uncompressed_tvb_out = uncompressed_tvb; | ||||
13109 | } | ||||
13110 | return offset; | ||||
13111 | } | ||||
13112 | |||||
13113 | |||||
13114 | |||||
13115 | /* *********************************************************************** */ | ||||
13116 | /* * Serialized data dissector * */ | ||||
13117 | /* *********************************************************************** */ | ||||
13118 | /* Note: the encapsulation header is ALWAYS big endian, then the encapsulation | ||||
13119 | * type specified the type of endianness of the payload. | ||||
13120 | * | ||||
13121 | * Fragmentation : Options only appear on first fragment | ||||
13122 | * Serieaized data might be compressed or uncompressed. Depending on that the | ||||
13123 | * header contains more elements. This is indicated in the encapsulation | ||||
13124 | * options where: | ||||
13125 | * | ||||
13126 | * X = Unused options bits | ||||
13127 | * C = Compression bits | ||||
13128 | * P = Padding bits | ||||
13129 | * | ||||
13130 | * 0...2...........8...............16..............24..............32 | ||||
13131 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
13132 | * | representation_identifier |X X X X X X X X X X X|C C C P P| | ||||
13133 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
13134 | * ~ ~ | ||||
13135 | * ~ ... Bytes of data representation using a format that ... ~ | ||||
13136 | * ~ ... depends on the RepresentationIdentifier and options ... ~ | ||||
13137 | * ~ ~ | ||||
13138 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
13139 | * | ||||
13140 | * If compressed: | ||||
13141 | * | ||||
13142 | * 0...2...........8...............16..............24..............32 | ||||
13143 | * + -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
13144 | * | representation_identifier | X X X X X X X X X X X | C C C P P | | ||||
13145 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
13146 | * ~ Uncompressed Length ~ | ||||
13147 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
13148 | * ~ *Extended Compression Options ~ | ||||
13149 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
13150 | * ~ Compressed User Data ... ~ | ||||
13151 | * ~ ~ | ||||
13152 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
13153 | * | ||||
13154 | * C = 0b111 would be extended compression options which would come in as an | ||||
13155 | * additional header before the payload. | ||||
13156 | * C = 0b000 to indicate no compression | ||||
13157 | * | ||||
13158 | * *This options field would be used for future enhancements.For example, | ||||
13159 | * could be used to define a custom compressor plugin for matching purposes. | ||||
13160 | * | ||||
13161 | */ | ||||
13162 | |||||
13163 | static void dissect_serialized_data(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, int offset, | ||||
13164 | int size, const char *label, uint16_t vendor_id, bool_Bool is_discovery_data, | ||||
13165 | endpoint_guid * guid, int32_t frag_number /* -1 if no fragmentation */) { | ||||
13166 | proto_item *ti; | ||||
13167 | proto_tree *rtps_parameter_sequence_tree; | ||||
13168 | uint16_t encapsulation_id; | ||||
13169 | bool_Bool try_dissection_from_type_object = false0; | ||||
13170 | unsigned encapsulation_encoding = ENC_BIG_ENDIAN0x00000000; | ||||
13171 | rtps_dissector_data * data = wmem_new(pinfo->pool, rtps_dissector_data)((rtps_dissector_data*)wmem_alloc((pinfo->pool), sizeof(rtps_dissector_data ))); | ||||
13172 | tvbuff_t *data_holder_tvb = tvb; | ||||
13173 | tvbuff_t *compressed_tvb = NULL((void*)0); | ||||
13174 | proto_tree *dissected_data_holder_tree = NULL((void*)0); | ||||
13175 | bool_Bool is_compressed = false0; | ||||
13176 | bool_Bool uncompressed_ok = false0; | ||||
13177 | proto_tree *compressed_subtree = NULL((void*)0); | ||||
13178 | |||||
13179 | data->encapsulation_id = 0; | ||||
13180 | data->position_in_batch = -1; | ||||
13181 | /* Creates the sub-tree */ | ||||
13182 | rtps_parameter_sequence_tree = proto_tree_add_subtree(tree, tvb, offset, size, | ||||
13183 | ett_rtps_serialized_data, &ti, label); | ||||
13184 | |||||
13185 | /* We store this value for using later */ | ||||
13186 | dissected_data_holder_tree = rtps_parameter_sequence_tree; | ||||
13187 | |||||
13188 | if (frag_number > 1) { | ||||
13189 | /* if the data is a fragment and not the first fragment, simply dissect the | ||||
13190 | content as raw bytes */ | ||||
13191 | proto_tree_add_item(rtps_parameter_sequence_tree, hf_rtps_issue_data, tvb, | ||||
13192 | offset, size, ENC_NA0x00000000); | ||||
13193 | } else { | ||||
13194 | /* Dissects the encapsulation header options and uncompress the tvb if it is | ||||
13195 | * compressed and can be uncompressed */ | ||||
13196 | offset = rtps_prepare_encapsulated_data( | ||||
13197 | rtps_parameter_sequence_tree, | ||||
13198 | pinfo, | ||||
13199 | tvb, | ||||
13200 | offset, | ||||
13201 | size, | ||||
13202 | true1, | ||||
13203 | &encapsulation_id, | ||||
13204 | NULL((void*)0), | ||||
13205 | NULL((void*)0), | ||||
13206 | NULL((void*)0), | ||||
13207 | NULL((void*)0), | ||||
13208 | &is_compressed, | ||||
13209 | &uncompressed_ok, | ||||
13210 | &compressed_tvb, | ||||
13211 | &compressed_subtree); | ||||
13212 | data->encapsulation_id = encapsulation_id; | ||||
13213 | if (is_compressed && uncompressed_ok) { | ||||
13214 | data_holder_tvb = compressed_tvb; | ||||
13215 | offset = 0; | ||||
13216 | dissected_data_holder_tree = compressed_subtree; | ||||
13217 | } | ||||
13218 | |||||
13219 | /* Sets the correct values for encapsulation_encoding */ | ||||
13220 | encapsulation_encoding = get_encapsulation_endianness(encapsulation_id); | ||||
13221 | |||||
13222 | if (encapsulation_id == ENCAPSULATION_CDR_LE(0x0001) || | ||||
13223 | encapsulation_id == ENCAPSULATION_CDR_BE(0x0000) || | ||||
13224 | encapsulation_id == ENCAPSULATION_CDR2_LE(0x0007) || | ||||
13225 | encapsulation_id == ENCAPSULATION_CDR2_BE(0x0006) || | ||||
13226 | encapsulation_id == ENCAPSULATION_PL_CDR_LE(0x0003) || | ||||
13227 | encapsulation_id == ENCAPSULATION_PL_CDR_BE(0x0002)) { | ||||
13228 | try_dissection_from_type_object = true1; | ||||
13229 | } | ||||
13230 | |||||
13231 | /* In case it is compressed only try to dissect the type object if it is correctly uncompressed */ | ||||
13232 | try_dissection_from_type_object = try_dissection_from_type_object | ||||
13233 | && ((is_compressed == uncompressed_ok)); | ||||
13234 | |||||
13235 | /* At this point: | ||||
13236 | * - uncompressed_tvb contains the uncompressed tvb or the packet tvb | ||||
13237 | * - compressed_data_tree points to the tree of the uncompressed data | ||||
13238 | * or the rtps_parameter_sequence_tree. | ||||
13239 | * - offset points to 0 of the uncompressed tvb or the offseet of the packet | ||||
13240 | * tvb if it is not decompressed. | ||||
13241 | * Only try to dissect the user data if it is not compressed or it is compressed and correctly uncompressed */ | ||||
13242 | if (is_compressed == uncompressed_ok) { | ||||
13243 | if (rtps_util_try_dissector(dissected_data_holder_tree, | ||||
13244 | pinfo, data_holder_tvb, offset, guid, data, encapsulation_encoding, | ||||
13245 | get_encapsulation_version(encapsulation_id), try_dissection_from_type_object)) { | ||||
13246 | return; | ||||
13247 | } | ||||
13248 | /* The payload */ | ||||
13249 | size -= 4; | ||||
13250 | switch (encapsulation_id) { | ||||
13251 | /* CDR_LE and CDR_BE data should be dissected like this if it is a fragment or | ||||
13252 | if it is not */ | ||||
13253 | case ENCAPSULATION_CDR_LE(0x0001): | ||||
13254 | case ENCAPSULATION_CDR_BE(0x0000): | ||||
13255 | proto_tree_add_item(dissected_data_holder_tree, hf_rtps_issue_data, data_holder_tvb, | ||||
13256 | offset, size, ENC_NA0x00000000); | ||||
13257 | break; | ||||
13258 | |||||
13259 | case ENCAPSULATION_PL_CDR_LE(0x0003): | ||||
13260 | case ENCAPSULATION_PL_CDR_BE(0x0002): | ||||
13261 | if (is_discovery_data) { | ||||
13262 | dissect_parameter_sequence(dissected_data_holder_tree, pinfo, data_holder_tvb, offset, | ||||
13263 | encapsulation_encoding, size, "serializedData", 0x0200, NULL((void*)0), vendor_id, false0, NULL((void*)0)); | ||||
13264 | } | ||||
13265 | else if (frag_number != NOT_A_FRAGMENT(-1)) { | ||||
13266 | /* fragments should be dissected as raw bytes (not parameterized) */ | ||||
13267 | proto_tree_add_item(dissected_data_holder_tree, hf_rtps_issue_data, data_holder_tvb, | ||||
13268 | offset, size, ENC_NA0x00000000); | ||||
13269 | break; | ||||
13270 | } | ||||
13271 | else { | ||||
13272 | /* Instead of showing a warning like before, we now dissect the data as | ||||
13273 | * (id - length - value) members */ | ||||
13274 | dissect_parameterized_serialized_data(dissected_data_holder_tree, | ||||
13275 | data_holder_tvb, offset, size, encapsulation_encoding); | ||||
13276 | } | ||||
13277 | break; | ||||
13278 | case ENCAPSULATION_CDR2_LE(0x0007): | ||||
13279 | if (guid != NULL((void*)0) && guid->entity_id == ENTITYID_TL_SVC_REQ_WRITER(0x000300c3)) { | ||||
13280 | rtps_util_dissect_type_lookup_request(dissected_data_holder_tree, | ||||
13281 | pinfo, tvb, offset); | ||||
13282 | } else if (guid != NULL((void*)0) && guid->entity_id == ENTITYID_TL_SVC_REPLY_WRITER(0x000301c3)) { | ||||
13283 | rtps_util_dissect_type_lookup_reply(dissected_data_holder_tree, | ||||
13284 | pinfo, tvb, offset); | ||||
13285 | } else { | ||||
13286 | proto_tree_add_item(dissected_data_holder_tree, | ||||
13287 | hf_rtps_data_serialize_data, tvb, offset, size, ENC_NA0x00000000); | ||||
13288 | } | ||||
13289 | break; | ||||
13290 | default: | ||||
13291 | proto_tree_add_item(dissected_data_holder_tree, hf_rtps_data_serialize_data, tvb, | ||||
13292 | offset, size, ENC_NA0x00000000); | ||||
13293 | } | ||||
13294 | } | ||||
13295 | } | ||||
13296 | } | ||||
13297 | |||||
13298 | /* *********************************************************************** */ | ||||
13299 | /* * A P P_ A C K * */ | ||||
13300 | /* *********************************************************************** */ | ||||
13301 | static void dissect_APP_ACK(tvbuff_t *tvb, | ||||
13302 | packet_info *pinfo, | ||||
13303 | int offset, | ||||
13304 | uint8_t flags, | ||||
13305 | const unsigned encoding, | ||||
13306 | int octets_to_next_header, | ||||
13307 | proto_tree *tree, | ||||
13308 | proto_item *item, | ||||
13309 | endpoint_guid * guid) | ||||
13310 | { | ||||
13311 | /* | ||||
13312 | * 0...2...........7...............15.............23...............31 | ||||
13313 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
13314 | * | APP_ACK |X|X|X|X|X|X|X|E| octetsToNextHeader | | ||||
13315 | * +---------------+---------------+---------------+---------------+ | ||||
13316 | * | EntityId readerEntityId | | ||||
13317 | * +---------------+---------------+---------------+---------------+ | ||||
13318 | * | EntityId writerEntityId | | ||||
13319 | * +---------------+---------------+---------------+---------------+ | ||||
13320 | * + unsigned long virtualWriterCount + | ||||
13321 | * +---------------+---------------+---------------+---------------+ | ||||
13322 | * | GuidPrefix virtualWriterGuidPrefix | | ||||
13323 | * +---------------+---------------+---------------+---------------+ | ||||
13324 | * EntityId virtualWriterObjectId | ||||
13325 | * unsigned short intervalCount | unsigned short bytesToNextVirtualWriter | ||||
13326 | * | ||||
13327 | * SequenceNumber intervalFirstSn | ||||
13328 | * SequenceNumber intervalLastSn | ||||
13329 | * unsigned short intervalFlags | unsigned short payloadLength | ||||
13330 | * | ||||
13331 | * (after last interval) unsigned long virtualWriterEpoch | ||||
13332 | * | ||||
13333 | */ | ||||
13334 | int original_offset; /* Offset to the readerEntityId */ | ||||
13335 | int32_t virtual_writer_count; | ||||
13336 | uint32_t wid; /* Writer EntityID */ | ||||
13337 | proto_item *octet_item; | ||||
13338 | proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, APP_ACK_FLAGS, flags); | ||||
13339 | |||||
13340 | octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb, | ||||
13341 | offset + 2, 2, encoding); | ||||
13342 | |||||
13343 | if (octets_to_next_header < 56) { | ||||
13344 | expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", 56); | ||||
13345 | return; | ||||
13346 | } | ||||
13347 | |||||
13348 | offset += 4; | ||||
13349 | original_offset = offset; | ||||
13350 | |||||
13351 | /* readerEntityId */ | ||||
13352 | rtps_util_add_entity_id(tree, | ||||
13353 | pinfo, tvb, | ||||
13354 | offset, | ||||
13355 | hf_rtps_sm_rdentity_id, | ||||
13356 | hf_rtps_sm_rdentity_id_key, | ||||
13357 | hf_rtps_sm_rdentity_id_kind, | ||||
13358 | ett_rtps_rdentity, | ||||
13359 | "readerEntityId", | ||||
13360 | &wid); | ||||
13361 | offset += 4; | ||||
13362 | guid->entity_id = wid; | ||||
13363 | rtps_util_add_topic_info(tree, pinfo, tvb, offset, guid); | ||||
13364 | |||||
13365 | /* writerEntityId */ | ||||
13366 | rtps_util_add_entity_id(tree, | ||||
13367 | pinfo, tvb, | ||||
13368 | offset, | ||||
13369 | hf_rtps_sm_wrentity_id, | ||||
13370 | hf_rtps_sm_wrentity_id_key, | ||||
13371 | hf_rtps_sm_wrentity_id_kind, | ||||
13372 | ett_rtps_wrentity, | ||||
13373 | "writerEntityId", | ||||
13374 | &wid); | ||||
13375 | offset += 4; | ||||
13376 | |||||
13377 | /* virtualWriterCount */ | ||||
13378 | proto_tree_add_item_ret_int(tree, hf_rtps_param_app_ack_virtual_writer_count, tvb, offset, 4, encoding, &virtual_writer_count); | ||||
13379 | offset += 4; | ||||
13380 | |||||
13381 | |||||
13382 | { | ||||
13383 | /* Deserialize Virtual Writers */ | ||||
13384 | proto_tree *sil_tree_writer_list; | ||||
13385 | |||||
13386 | int32_t current_writer_index; | ||||
13387 | int32_t current_interval_count; | ||||
13388 | /* uint16_t interval_flags = 0; */ | ||||
13389 | /* uint32_t current_virtual_guid_index = 0;*/ | ||||
13390 | |||||
13391 | /** Writer list **/ | ||||
13392 | sil_tree_writer_list = proto_tree_add_subtree_format(tree, tvb, offset, -1, | ||||
13393 | ett_rtps_app_ack_virtual_writer_list, NULL((void*)0), "Virtual Writer List"); | ||||
13394 | |||||
13395 | current_writer_index = 0; | ||||
13396 | |||||
13397 | while (current_writer_index < virtual_writer_count) { | ||||
13398 | proto_tree *sil_tree_writer; | ||||
13399 | proto_tree *sil_tree_interval_list; | ||||
13400 | int32_t interval_count; | ||||
13401 | |||||
13402 | sil_tree_writer = proto_tree_add_subtree_format(sil_tree_writer_list, tvb, offset, -1, | ||||
13403 | ett_rtps_app_ack_virtual_writer, NULL((void*)0), "virtualWriter[%d]", current_writer_index); | ||||
13404 | |||||
13405 | /* Virtual Writer Guid */ | ||||
13406 | #if 0 | ||||
13407 | rtps_util_add_generic_guid(sil_tree_writer, | ||||
13408 | tvb, | ||||
13409 | offset, | ||||
13410 | "virtualGUID", | ||||
13411 | buffer, | ||||
13412 | MAX_GUID_SIZE(160)); | ||||
13413 | #endif | ||||
13414 | offset += 16; | ||||
13415 | |||||
13416 | |||||
13417 | /* Interval count */ | ||||
13418 | proto_tree_add_item_ret_int(sil_tree_writer, hf_rtps_param_app_ack_interval_count, | ||||
13419 | tvb, offset, 2, encoding, &interval_count); | ||||
13420 | offset += 2; | ||||
13421 | |||||
13422 | /* bytes to next virtual writer */ | ||||
13423 | proto_tree_add_item(sil_tree_writer, hf_rtps_param_app_ack_octets_to_next_virtual_writer, | ||||
13424 | tvb, offset, 2, encoding); | ||||
13425 | offset += 2; | ||||
13426 | |||||
13427 | /* Interval list */ | ||||
13428 | sil_tree_interval_list = proto_tree_add_subtree_format(sil_tree_writer, tvb, offset, -1, | ||||
13429 | ett_rtps_app_ack_virtual_writer_interval_list, NULL((void*)0), "Interval List"); | ||||
13430 | |||||
13431 | current_interval_count = 0; | ||||
13432 | while (current_interval_count < interval_count) { | ||||
13433 | proto_tree *sil_tree_interval; | ||||
13434 | int32_t interval_payload_length; | ||||
13435 | |||||
13436 | sil_tree_interval = proto_tree_add_subtree_format(sil_tree_interval_list, tvb, offset, -1, | ||||
13437 | ett_rtps_app_ack_virtual_writer_interval, NULL((void*)0), "Interval[%d]", current_interval_count); | ||||
13438 | |||||
13439 | /* firstVirtualSN */ | ||||
13440 | rtps_util_add_seq_number(sil_tree_interval, | ||||
13441 | tvb, | ||||
13442 | offset, | ||||
13443 | encoding, | ||||
13444 | "firstVirtualSN"); | ||||
13445 | offset += 8; | ||||
13446 | |||||
13447 | /* lastVirtualSN */ | ||||
13448 | rtps_util_add_seq_number(sil_tree_interval, | ||||
13449 | tvb, | ||||
13450 | offset, | ||||
13451 | encoding, | ||||
13452 | "lastVirtualSN"); | ||||
13453 | offset += 8; | ||||
13454 | |||||
13455 | /* interval flags */ | ||||
13456 | proto_tree_add_item(sil_tree_interval, hf_rtps_param_app_ack_interval_flags, | ||||
13457 | tvb, offset, 2, encoding); | ||||
13458 | offset += 2; | ||||
13459 | |||||
13460 | /* interval payload length */ | ||||
13461 | proto_tree_add_item_ret_int(sil_tree_interval, hf_rtps_param_app_ack_interval_payload_length, | ||||
13462 | tvb, offset, 2, encoding, &interval_payload_length); | ||||
13463 | offset += 2; | ||||
13464 | |||||
13465 | if (interval_payload_length > 0) { | ||||
13466 | proto_tree_add_item(sil_tree_interval, hf_rtps_serialized_data, tvb, offset, | ||||
13467 | interval_payload_length, ENC_NA0x00000000); | ||||
13468 | offset += ((interval_payload_length + 3) & 0xfffffffc); | ||||
13469 | } | ||||
13470 | |||||
13471 | ++current_interval_count; | ||||
13472 | |||||
13473 | } /* interval list */ | ||||
13474 | |||||
13475 | /* Count */ | ||||
13476 | proto_tree_add_item(tree, hf_rtps_param_app_ack_count, tvb, offset, 4, encoding); | ||||
13477 | offset += 4; | ||||
13478 | |||||
13479 | current_writer_index++; | ||||
13480 | |||||
13481 | } /* virtual_writer_count */ | ||||
13482 | } | ||||
13483 | |||||
13484 | |||||
13485 | if (offset < original_offset + octets_to_next_header) | ||||
13486 | { | ||||
13487 | /* In this case there must be something wrong in the bitmap: there | ||||
13488 | * are some extra bytes that we don't know how to decode | ||||
13489 | */ | ||||
13490 | 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); | ||||
13491 | } | ||||
13492 | else if (offset > original_offset + octets_to_next_header) | ||||
13493 | { | ||||
13494 | /* Decoding the bitmap went over the end of this submessage. | ||||
13495 | * Enter an item in the protocol tree that spans over the entire | ||||
13496 | * submessage. | ||||
13497 | */ | ||||
13498 | expert_add_info(pinfo, item, &ei_rtps_missing_bytes); | ||||
13499 | } | ||||
13500 | } | ||||
13501 | |||||
13502 | /* *********************************************************************** */ | ||||
13503 | /* * P A D * */ | ||||
13504 | /* *********************************************************************** */ | ||||
13505 | static void dissect_PAD(tvbuff_t *tvb, | ||||
13506 | packet_info *pinfo, | ||||
13507 | int offset, | ||||
13508 | uint8_t flags, | ||||
13509 | const unsigned encoding, | ||||
13510 | int octets_to_next_header, | ||||
13511 | proto_tree *tree) { | ||||
13512 | /* 0...2...........7...............15.............23...............31 | ||||
13513 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
13514 | * | PAD |X|X|X|X|X|X|X|E| octetsToNextHeader | | ||||
13515 | * +---------------+---------------+---------------+---------------+ | ||||
13516 | */ | ||||
13517 | proto_item *item; | ||||
13518 | |||||
13519 | proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, PAD_FLAGS, flags); | ||||
13520 | |||||
13521 | item = proto_tree_add_item(tree, | ||||
13522 | hf_rtps_sm_octets_to_next_header, | ||||
13523 | tvb, | ||||
13524 | offset + 2, | ||||
13525 | 2, | ||||
13526 | encoding); | ||||
13527 | if (octets_to_next_header != 0) { | ||||
13528 | expert_add_info(pinfo, item, &ei_rtps_sm_octets_to_next_header_not_zero); | ||||
13529 | } | ||||
13530 | } | ||||
13531 | |||||
13532 | |||||
13533 | |||||
13534 | |||||
13535 | |||||
13536 | /* *********************************************************************** */ | ||||
13537 | /* * D A T A * */ | ||||
13538 | /* *********************************************************************** */ | ||||
13539 | static void dissect_DATA_v1(tvbuff_t *tvb, packet_info *pinfo, int offset, uint8_t flags, | ||||
13540 | const unsigned encoding, int octets_to_next_header, proto_tree *tree) { | ||||
13541 | /* RTPS 1.0/1.1: | ||||
13542 | * 0...2...........7...............15.............23...............31 | ||||
13543 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
13544 | * | DATA |X|X|X|U|H|A|P|E| octetsToNextHeader | | ||||
13545 | * +---------------+---------------+---------------+---------------+ | ||||
13546 | * | ObjectId readerObjectId | | ||||
13547 | * +---------------+---------------+---------------+---------------+ | ||||
13548 | * | ObjectId writerObjectId | | ||||
13549 | * +---------------+---------------+---------------+---------------+ | ||||
13550 | * | HostId hostId (iff H==1) | | ||||
13551 | * +---------------+---------------+---------------+---------------+ | ||||
13552 | * | AppId appId (iff H==1) | | ||||
13553 | * +---------------+---------------+---------------+---------------+ | ||||
13554 | * | ObjectId objectId | | ||||
13555 | * +---------------+---------------+---------------+---------------+ | ||||
13556 | * | | | ||||
13557 | * + SequenceNumber writerSeqNumber + | ||||
13558 | * | | | ||||
13559 | * +---------------+---------------+---------------+---------------+ | ||||
13560 | * | | | ||||
13561 | * ~ ParameterSequence parameters [only if P==1] ~ | ||||
13562 | * | | | ||||
13563 | * +---------------+---------------+---------------+---------------+ | ||||
13564 | * Note: on RTPS 1.0, flag U is not present | ||||
13565 | * | ||||
13566 | * RTPS 1.2: | ||||
13567 | * 0...2...........7...............15.............23...............31 | ||||
13568 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
13569 | * | DATA |X|X|U|Q|H|A|D|E| octetsToNextHeader | | ||||
13570 | * +---------------+---------------+---------------+---------------+ | ||||
13571 | * | EntityId readerEntityId | | ||||
13572 | * +---------------+---------------+---------------+---------------+ | ||||
13573 | * | EntityId writerEntityId | | ||||
13574 | * +---------------+---------------+---------------+---------------+ | ||||
13575 | * | | | ||||
13576 | * + KeyHashPrefix keyHashPrefix [only if H==1] + | ||||
13577 | * | | | ||||
13578 | * +---------------+---------------+---------------+---------------+ | ||||
13579 | * | KeyHashSuffix keyHashSuffix | | ||||
13580 | * +---------------+---------------+---------------+---------------+ | ||||
13581 | * | | | ||||
13582 | * + SequenceNumber writerSeqNum + | ||||
13583 | * | | | ||||
13584 | * +---------------+---------------+---------------+---------------+ | ||||
13585 | * | | | ||||
13586 | * ~ ParameterList inlineQos [only if Q==1] ~ | ||||
13587 | * | | | ||||
13588 | * +---------------+---------------+---------------+---------------+ | ||||
13589 | * | | | ||||
13590 | * ~ SerializedData serializedData [only if D==1] ~ | ||||
13591 | * | | | ||||
13592 | * +---------------+---------------+---------------+---------------+ | ||||
13593 | * Notes: | ||||
13594 | * - inlineQos is NEW | ||||
13595 | * - serializedData is equivalent to the old 'parameters' | ||||
13596 | */ | ||||
13597 | int min_len; | ||||
13598 | bool_Bool is_builtin_entity = false0; /* true=entityId.entityKind = built-in */ | ||||
13599 | int old_offset = offset; | ||||
13600 | uint32_t wid; /* Writer EntityID */ | ||||
13601 | proto_item *octet_item; | ||||
13602 | |||||
13603 | proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, DATA_FLAGSv1, flags); | ||||
13604 | |||||
13605 | octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb, | ||||
13606 | offset + 2, 2, encoding); | ||||
13607 | |||||
13608 | /* Calculates the minimum length for this submessage */ | ||||
13609 | min_len = 20; | ||||
13610 | if ((flags & FLAG_DATA_H(0x08)) != 0) min_len += 8; | ||||
13611 | if ((flags & FLAG_DATA_Q(0x10)) != 0) min_len += 4; | ||||
13612 | if ((flags & FLAG_DATA_D(0x02)) != 0) min_len += 4; | ||||
13613 | |||||
13614 | if (octets_to_next_header < min_len) { | ||||
13615 | expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", min_len); | ||||
13616 | return; | ||||
13617 | } | ||||
13618 | |||||
13619 | offset += 4; | ||||
13620 | |||||
13621 | /* readerEntityId */ | ||||
13622 | is_builtin_entity |= rtps_util_add_entity_id(tree, pinfo, tvb, offset, | ||||
13623 | hf_rtps_sm_rdentity_id, hf_rtps_sm_rdentity_id_key, hf_rtps_sm_rdentity_id_kind, | ||||
13624 | ett_rtps_rdentity, "readerEntityId", NULL((void*)0)); | ||||
13625 | offset += 4; | ||||
13626 | |||||
13627 | /* writerEntityId */ | ||||
13628 | is_builtin_entity |= rtps_util_add_entity_id(tree, pinfo, tvb, offset, | ||||
13629 | hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key, hf_rtps_sm_wrentity_id_kind, | ||||
13630 | ett_rtps_wrentity, "writerEntityId", &wid); | ||||
13631 | offset += 4; | ||||
13632 | |||||
13633 | /* Checks for predefined declarations | ||||
13634 | * | ||||
13635 | * writerEntityId value | A flag | Extra | ||||
13636 | * -------------------------------------------|--------|------------- | ||||
13637 | * ENTITYID_BUILTIN_SUBSCRIPTIONS_WRITER | 1 | r+ | ||||
13638 | * ENTITYID_BUILTIN_SUBSCRIPTIONS_WRITER | 0 | r- | ||||
13639 | * ENTITYID_BUILTIN_PUBLICATIONS_WRITER | 1 | w+ | ||||
13640 | * ENTITYID_BUILTIN_PUBLICATIONS_WRITER | 0 | w- | ||||
13641 | * ENTITYID_BUILTIN_PARTICIPANT_WRITER | 1 | p+ | ||||
13642 | * ENTITYID_BUILTIN_PARTICIPANT_WRITER | 0 | p- (*) | ||||
13643 | * ENTITYID_BUILTIN_TOPIC_WRITER | 1 | t+ (*) | ||||
13644 | * ENTITYID_BUILTIN_TOPIC_WRITER | 0 | t- (*) | ||||
13645 | * | ||||
13646 | * Note (*): Currently NDDS does not publish those values | ||||
13647 | */ | ||||
13648 | if (wid == ENTITYID_BUILTIN_PUBLICATIONS_WRITER(0x000003c2) && (flags & FLAG_DATA_A(0x04)) != 0) { | ||||
13649 | col_append_str(pinfo->cinfo, COL_INFO, SM_EXTRA_WPLUS); | ||||
13650 | } else if (wid == ENTITYID_BUILTIN_PUBLICATIONS_WRITER(0x000003c2) && (flags & FLAG_DATA_A(0x04)) == 0) { | ||||
13651 | col_append_str(pinfo->cinfo, COL_INFO, SM_EXTRA_WMINUS); | ||||
13652 | } else if (wid == ENTITYID_BUILTIN_SUBSCRIPTIONS_WRITER(0x000004c2) && (flags & FLAG_DATA_A(0x04)) != 0) { | ||||
13653 | col_append_str(pinfo->cinfo, COL_INFO, SM_EXTRA_RPLUS); | ||||
13654 | } else if (wid == ENTITYID_BUILTIN_SUBSCRIPTIONS_WRITER(0x000004c2) && (flags & FLAG_DATA_A(0x04)) == 0) { | ||||
13655 | col_append_str(pinfo->cinfo, COL_INFO, SM_EXTRA_RMINUS); | ||||
13656 | } else if (wid == ENTITYID_BUILTIN_PARTICIPANT_WRITER(0x000100c2) && (flags & FLAG_DATA_A(0x04)) != 0) { | ||||
13657 | col_append_str(pinfo->cinfo, COL_INFO, SM_EXTRA_PPLUS); | ||||
13658 | } else if (wid == ENTITYID_BUILTIN_PARTICIPANT_WRITER(0x000100c2) && (flags & FLAG_DATA_A(0x04)) == 0) { | ||||
13659 | col_append_str(pinfo->cinfo, COL_INFO, SM_EXTRA_PMINUS); | ||||
13660 | } else if (wid == ENTITYID_BUILTIN_TOPIC_WRITER(0x000002c2) && (flags & FLAG_DATA_A(0x04)) != 0) { | ||||
13661 | col_append_str(pinfo->cinfo, COL_INFO, SM_EXTRA_TPLUS); | ||||
13662 | } else if (wid == ENTITYID_BUILTIN_TOPIC_WRITER(0x000002c2) && (flags & FLAG_DATA_A(0x04)) == 0) { | ||||
13663 | col_append_str(pinfo->cinfo, COL_INFO, SM_EXTRA_TMINUS); | ||||
13664 | } | ||||
13665 | |||||
13666 | /* If flag H is defined, read the HostId and AppId fields */ | ||||
13667 | if ((flags & FLAG_DATA_H(0x08)) != 0) { | ||||
13668 | rtps_util_add_guid_prefix_v1(tree, pinfo, tvb, offset, | ||||
13669 | hf_rtps_sm_guid_prefix_v1, hf_rtps_sm_host_id, hf_rtps_sm_app_id, | ||||
13670 | hf_rtps_sm_instance_id_v1, hf_rtps_sm_app_kind, | ||||
13671 | "keyHashPrefix"); | ||||
13672 | |||||
13673 | offset += 8; | ||||
13674 | } else { | ||||
13675 | /* Flag H not set, use hostId, appId from the packet header */ | ||||
13676 | } | ||||
13677 | |||||
13678 | /* Complete the GUID by reading the Object ID */ | ||||
13679 | rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_entity_id, hf_rtps_sm_entity_id_key, | ||||
13680 | hf_rtps_sm_entity_id_kind, ett_rtps_entity, "keyHashSuffix", NULL((void*)0)); | ||||
13681 | offset += 4; | ||||
13682 | |||||
13683 | /* Sequence number */ | ||||
13684 | rtps_util_add_seq_number(tree, tvb, offset, encoding, "writerSeqNumber"); | ||||
13685 | offset += 8; | ||||
13686 | |||||
13687 | /* InlineQos */ | ||||
13688 | if ((flags & FLAG_DATA_Q(0x10)) != 0) { | ||||
13689 | bool_Bool is_inline_qos = true1; | ||||
13690 | offset = dissect_parameter_sequence(tree, pinfo, tvb, offset, | ||||
13691 | encoding, octets_to_next_header, "inlineQos", | ||||
13692 | 0x0102, NULL((void*)0), 0, is_inline_qos, NULL((void*)0)); | ||||
13693 | } | ||||
13694 | |||||
13695 | /* SerializedData */ | ||||
13696 | if ((flags & FLAG_DATA_D(0x02)) != 0) { | ||||
13697 | if (is_builtin_entity) { | ||||
13698 | dissect_parameter_sequence(tree, pinfo, tvb, offset, | ||||
13699 | encoding, octets_to_next_header, "serializedData", | ||||
13700 | 0x0102, NULL((void*)0), 0, false0, NULL((void*)0)); | ||||
13701 | } else { | ||||
13702 | proto_tree_add_item(tree, hf_rtps_issue_data, tvb, offset, | ||||
13703 | octets_to_next_header - (offset - old_offset) + 4, | ||||
13704 | ENC_NA0x00000000); | ||||
13705 | } | ||||
13706 | } | ||||
13707 | } | ||||
13708 | |||||
13709 | static void dissect_DATA_v2(tvbuff_t *tvb, packet_info *pinfo, int offset, uint8_t flags, | ||||
13710 | const unsigned encoding, int octets_to_next_header, proto_tree *tree, | ||||
13711 | uint16_t vendor_id, endpoint_guid *guid) { | ||||
13712 | /* | ||||
13713 | * | ||||
13714 | * 0...2...........7...............15.............23...............31 | ||||
13715 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
13716 | * | DATA |X|X|X|I|H|D|Q|E| octetsToNextHeader | | ||||
13717 | * +---------------+---------------+---------------+---------------+ | ||||
13718 | * | EntityId readerEntityId | | ||||
13719 | * +---------------+---------------+---------------+---------------+ | ||||
13720 | * | EntityId writerEntityId | | ||||
13721 | * +---------------+---------------+---------------+---------------+ | ||||
13722 | * | | | ||||
13723 | * + SequenceNumber writerSeqNum + | ||||
13724 | * | | | ||||
13725 | * +---------------+---------------+---------------+---------------+ | ||||
13726 | * | | | ||||
13727 | * + + | ||||
13728 | * | KeyHashPrefix keyHashPrefix [only if H==1] | | ||||
13729 | * + + | ||||
13730 | * | | | ||||
13731 | * +---------------+---------------+---------------+---------------+ | ||||
13732 | * | KeyHashSuffix keyHashSuffix | | ||||
13733 | * +---------------+---------------+---------------+---------------+ | ||||
13734 | * | StatusInfo statusInfo [only if I==1] | | ||||
13735 | * +---------------+---------------+---------------+---------------+ | ||||
13736 | * | | | ||||
13737 | * ~ ParameterList inlineQos [only if Q==1] ~ | ||||
13738 | * | | | ||||
13739 | * +---------------+---------------+---------------+---------------+ | ||||
13740 | * | | | ||||
13741 | * ~ SerializedData serializedData [only if D==1] ~ | ||||
13742 | * | | | ||||
13743 | * +---------------+---------------+---------------+---------------+ | ||||
13744 | */ | ||||
13745 | int min_len; | ||||
13746 | int old_offset = offset; | ||||
13747 | uint32_t wid; /* Writer EntityID */ | ||||
13748 | uint32_t status_info = 0xffffffff; | ||||
13749 | proto_item *octet_item; | ||||
13750 | bool_Bool from_builtin_writer; | ||||
13751 | |||||
13752 | proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, DATA_FLAGSv2, flags); | ||||
13753 | |||||
13754 | octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb, | ||||
13755 | offset + 2, 2, encoding); | ||||
13756 | |||||
13757 | /* Calculates the minimum length for this submessage */ | ||||
13758 | min_len = 20; | ||||
13759 | if ((flags & FLAG_DATA_Q_v2(0x02)) != 0) min_len += 4; | ||||
13760 | if ((flags & FLAG_DATA_D_v2(0x04)) != 0) min_len += 4; | ||||
13761 | if ((flags & FLAG_DATA_H(0x08)) != 0) min_len += 12; | ||||
13762 | |||||
13763 | if (octets_to_next_header < min_len) { | ||||
13764 | expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", min_len); | ||||
13765 | return; | ||||
13766 | } | ||||
13767 | |||||
13768 | offset += 4; | ||||
13769 | |||||
13770 | |||||
13771 | /* readerEntityId */ | ||||
13772 | rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_rdentity_id, hf_rtps_sm_rdentity_id_key, | ||||
13773 | hf_rtps_sm_rdentity_id_kind, ett_rtps_rdentity, "readerEntityId", NULL((void*)0)); | ||||
13774 | offset += 4; | ||||
13775 | |||||
13776 | /* writerEntityId */ | ||||
13777 | rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key, | ||||
13778 | hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", &wid); | ||||
13779 | offset += 4; | ||||
13780 | guid->entity_id = wid; | ||||
13781 | guid->fields_present |= GUID_HAS_ENTITY_ID0x00000008; | ||||
13782 | rtps_util_add_topic_info(tree, pinfo, tvb, offset, guid); | ||||
13783 | |||||
13784 | /* Sequence number */ | ||||
13785 | rtps_util_add_seq_number(tree, tvb, offset, encoding, "writerSeqNumber"); | ||||
13786 | offset += 8; | ||||
13787 | |||||
13788 | /* If flag H is defined, read the GUID Prefix */ | ||||
13789 | if ((flags & FLAG_DATA_H(0x08)) != 0) { | ||||
13790 | rtps_util_add_guid_prefix_v2(tree, tvb, offset, hf_rtps_sm_guid_prefix, hf_rtps_sm_host_id, | ||||
13791 | hf_rtps_sm_app_id, hf_rtps_sm_instance_id, 0); | ||||
13792 | |||||
13793 | offset += 12; | ||||
13794 | } else { | ||||
13795 | /* Flag H not set, use hostId, appId from the packet header */ | ||||
13796 | } | ||||
13797 | |||||
13798 | /* Complete the GUID by reading the Object ID */ | ||||
13799 | rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_entity_id, hf_rtps_sm_entity_id_key, | ||||
13800 | hf_rtps_sm_entity_id_kind, ett_rtps_entity, "keyHashSuffix", NULL((void*)0)); | ||||
13801 | offset += 4; | ||||
13802 | |||||
13803 | if ((flags & FLAG_DATA_I(0x10)) != 0) { | ||||
13804 | proto_tree_add_item(tree, hf_rtps_data_status_info, tvb, offset, 4, encoding); | ||||
13805 | offset += 4; | ||||
13806 | } | ||||
13807 | |||||
13808 | /* InlineQos */ | ||||
13809 | if ((flags & FLAG_DATA_Q_v2(0x02)) != 0) { | ||||
13810 | bool_Bool is_inline_qos = true1; | ||||
13811 | offset = dissect_parameter_sequence(tree, pinfo, tvb, offset, encoding, | ||||
13812 | octets_to_next_header - (offset - old_offset) + 4, | ||||
13813 | "inlineQos", 0x0200, NULL((void*)0), vendor_id, is_inline_qos, NULL((void*)0)); | ||||
13814 | } | ||||
13815 | |||||
13816 | /* SerializedData */ | ||||
13817 | if ((flags & FLAG_DATA_D_v2(0x04)) != 0) { | ||||
13818 | from_builtin_writer = (((wid & ENTITYKIND_BUILTIN_WRITER_WITH_KEY(0xc2)) == ENTITYKIND_BUILTIN_WRITER_WITH_KEY(0xc2)) | ||||
13819 | || ((wid & ENTITYKIND_BUILTIN_WRITER_NO_KEY(0xc3)) == ENTITYKIND_BUILTIN_WRITER_NO_KEY(0xc3)) | ||||
13820 | || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_BOOTSTRAP_WRITER(0x00010082)) | ||||
13821 | || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_WRITER(0x00010182))) | ||||
13822 | || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_WRITER(0xff010182)) | ||||
13823 | || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_READER(0xff010187)) ? true1 : false0; | ||||
13824 | dissect_serialized_data(tree, pinfo, tvb, offset, | ||||
13825 | octets_to_next_header - (offset - old_offset) + 4, | ||||
13826 | "serializedData", vendor_id, from_builtin_writer, guid, NOT_A_FRAGMENT(-1)); | ||||
13827 | } | ||||
13828 | generate_status_info(pinfo, wid, status_info); | ||||
13829 | } | ||||
13830 | |||||
13831 | |||||
13832 | static void dissect_HEADER_EXTENSION(tvbuff_t* tvb, packet_info* pinfo, int offset, uint8_t flags, | ||||
13833 | const unsigned encoding, proto_tree* tree, int octets_to_next_header, uint16_t vendor_id) { | ||||
13834 | /* | ||||
13835 | * 0...2...........7...............15.............23...............31 | ||||
13836 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
13837 | * | DATA_HE |P|C|C|W|U|T|L|E| octetsToNextHeader | | ||||
13838 | * +---------------+---------------+---------------+---------------+ | ||||
13839 | * | MessageLength messageLength (Only if L == 1 ) | | ||||
13840 | * +---------------+---------------+---------------+---------------+ | ||||
13841 | * | | | ||||
13842 | * + TimeStamp rtpsSendTimestamp (Only if T == 1 ) + | ||||
13843 | * | | | ||||
13844 | * +---------------+---------------+---------------+---------------+ | ||||
13845 | * | UExtension4 uExtension (Only if U == 1 ) | | ||||
13846 | * +---------------+---------------+---------------+---------------+ | ||||
13847 | * | | | ||||
13848 | * + WExtension8 wExtension8 (Only if W == 1 ) + | ||||
13849 | * | | | ||||
13850 | * +---------------+---------------+---------------+---------------+ | ||||
13851 | * | | | ||||
13852 | * + Checksum messageChecksum (Only if CC != 00 ) + | ||||
13853 | * | | | ||||
13854 | * +---------------+---------------+---------------+---------------+ | ||||
13855 | * | | | ||||
13856 | * + ParameterList parameters (Only if P != 0 ) + | ||||
13857 | * | | | ||||
13858 | * +---------------+---------------+---------------+---------------+ | ||||
13859 | * C1,C2 == 01 -> 4 bytes checksum | ||||
13860 | * C1,C2 == 10 -> 8 bytes checksum | ||||
13861 | * C1,C2 == 11 -> 16 bytes checksum | ||||
13862 | */ | ||||
13863 | #define RTPS_HE_ENDIANESS_FLAG(0x01) (0x01) | ||||
13864 | #define RTPS_HE_MESSAGE_LENGTH_FLAG(0x02) (0x02) | ||||
13865 | #define RTPS_HE_TIMESTAMP_FLAG(0x04) (0x04) | ||||
13866 | #define RTPS_HE_UEXTENSION_FLAG(0x08) (0x08) | ||||
13867 | #define RTPS_HE_WEXTENSION_FLAG(0x10) (0x10) | ||||
13868 | #define RTPS_HE_CHECKSUM_2_FLAG(0x20) (0x20) | ||||
13869 | #define RTPS_HE_CHECKSUM_1_FLAG(0x40) (0x40) | ||||
13870 | #define RTPS_HE_PARAMETERS_FLAG(0x80) (0x80) | ||||
13871 | |||||
13872 | #define RTPS_HE_CHECKSUM_CRC32(0x20) RTPS_HE_CHECKSUM_2_FLAG(0x20) | ||||
13873 | #define RTPS_HE_CHECKSUM_CRC64(0x40) RTPS_HE_CHECKSUM_1_FLAG(0x40) | ||||
13874 | #define RTPS_HE_CHECKSUM_MD5((0x40) | (0x20)) (RTPS_HE_CHECKSUM_1_FLAG(0x40) | RTPS_HE_CHECKSUM_2_FLAG(0x20)) | ||||
13875 | |||||
13876 | uint8_t checksum_type = 0; | ||||
13877 | int initial_offset = offset; | ||||
13878 | unsigned checksum_flags = PROTO_CHECKSUM_NO_FLAGS0x00; | ||||
13879 | bool_Bool is_crc_supported = true1; | ||||
13880 | /*Checksum can be CRC32, CRC64 and MD5 */ | ||||
13881 | union _calculated_checksum { | ||||
13882 | uint8_t md5[RTPS_CHECKSUM_MAX_LEN16]; | ||||
13883 | uint32_t crc32c; | ||||
13884 | uint64_t crc64; | ||||
13885 | } calculated_checksum = {0}, he_checksum = {0}; | ||||
13886 | int16_t header_extension_length = 0; | ||||
13887 | int offsetToHeaderExtensionData = 24; | ||||
13888 | rtps_current_packet_decryption_info_t *decryption_info = NULL((void*)0); | ||||
13889 | |||||
13890 | ++offset; | ||||
13891 | proto_tree_add_bitmask_value( | ||||
13892 | tree, | ||||
13893 | tvb, | ||||
13894 | offset, | ||||
13895 | hf_rtps_header_extension_flags, | ||||
13896 | ett_rtps_flags, | ||||
13897 | HEADER_EXTENSION_MASK_FLAGS, | ||||
13898 | flags); | ||||
13899 | ++offset; | ||||
13900 | header_extension_length = tvb_get_int16(tvb, offset, encoding); | ||||
13901 | proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb, offset, 2, encoding); | ||||
13902 | offset += 2; | ||||
13903 | |||||
13904 | if (enable_rtps_psk_decryption) { | ||||
13905 | /* | ||||
13906 | * Let's update the additional authenticated data, so that it includes the | ||||
13907 | * Header Extension. | ||||
13908 | */ | ||||
13909 | const uint8_t *additional_authenticated_data; | ||||
13910 | rtps_tvb_field *rtps_root = (rtps_tvb_field*) | ||||
13911 | p_get_proto_data( | ||||
13912 | pinfo->pool, | ||||
13913 | pinfo, proto_rtps, | ||||
13914 | RTPS_ROOT_MESSAGE_KEY4); | ||||
13915 | |||||
13916 | decryption_info = (rtps_current_packet_decryption_info_t *) | ||||
13917 | p_get_proto_data( | ||||
13918 | pinfo->pool, pinfo, proto_rtps, RTPS_DECRYPTION_INFO_KEY5); | ||||
13919 | |||||
13920 | decryption_info->aad_length = | ||||
13921 | 20 /* rtps header size. */ | ||||
13922 | + 4 /* header extension submessage id, flags, octetsToNextHeader */ | ||||
13923 | + header_extension_length; | ||||
13924 | |||||
13925 | additional_authenticated_data = tvb_get_ptr( | ||||
13926 | rtps_root->tvb, | ||||
13927 | rtps_root->tvb_offset, | ||||
13928 | (int) decryption_info->aad_length); | ||||
13929 | |||||
13930 | /* Do a copy of the bytes, so that we can later zero the necessary parts. */ | ||||
13931 | decryption_info->additional_authenticated_data_allocated = true1; | ||||
13932 | decryption_info->additional_authenticated_data = g_memdup2( | ||||
13933 | additional_authenticated_data, | ||||
13934 | decryption_info->aad_length); | ||||
13935 | } | ||||
13936 | |||||
13937 | if ((flags & RTPS_HE_MESSAGE_LENGTH_FLAG(0x02)) == RTPS_HE_MESSAGE_LENGTH_FLAG(0x02)) { | ||||
13938 | proto_tree_add_item(tree, hf_rtps_message_length, tvb, offset, 4, encoding); | ||||
13939 | offset += 4; | ||||
13940 | |||||
13941 | if (enable_rtps_psk_decryption) { | ||||
13942 | memset( | ||||
13943 | decryption_info->additional_authenticated_data | ||||
| |||||
13944 | + offsetToHeaderExtensionData, | ||||
13945 | 0, | ||||
13946 | RTPS_HE_MESSAGE_LENGTH_FLAG(0x02)); | ||||
13947 | offsetToHeaderExtensionData += 4; | ||||
13948 | } | ||||
13949 | } | ||||
13950 | |||||
13951 | if ((flags & RTPS_HE_TIMESTAMP_FLAG(0x04)) == RTPS_HE_TIMESTAMP_FLAG(0x04)) { | ||||
13952 | rtps_util_add_timestamp(tree, | ||||
13953 | tvb, offset, | ||||
13954 | encoding, | ||||
13955 | hf_rtps_timestamp); | ||||
13956 | offset += 8; | ||||
13957 | |||||
13958 | if (enable_rtps_psk_decryption) { | ||||
13959 | /* No need to zero for AAD. */ | ||||
13960 | offsetToHeaderExtensionData += 8; | ||||
13961 | } | ||||
13962 | } | ||||
13963 | |||||
13964 | if ((flags & RTPS_HE_UEXTENSION_FLAG(0x08)) == RTPS_HE_UEXTENSION_FLAG(0x08)) { | ||||
13965 | proto_tree_add_item(tree, hf_rtps_uextension, tvb, offset, 4, encoding); | ||||
13966 | offset += 4; | ||||
13967 | |||||
13968 | if (enable_rtps_psk_decryption) { | ||||
13969 | /* No need to zero for AAD. */ | ||||
13970 | offsetToHeaderExtensionData += 4; | ||||
13971 | } | ||||
13972 | } | ||||
13973 | |||||
13974 | if ((flags & RTPS_HE_WEXTENSION_FLAG(0x10)) == RTPS_HE_WEXTENSION_FLAG(0x10)) { | ||||
13975 | proto_tree_add_item(tree, hf_rtps_wextension, tvb, offset, 8, encoding); | ||||
13976 | offset += 8; | ||||
13977 | |||||
13978 | if (enable_rtps_psk_decryption) { | ||||
13979 | /* No need to zero for AAD. */ | ||||
13980 | offsetToHeaderExtensionData += 8; | ||||
13981 | } | ||||
13982 | } | ||||
13983 | |||||
13984 | checksum_type = (flags & (RTPS_HE_CHECKSUM_2_FLAG(0x20) | RTPS_HE_CHECKSUM_1_FLAG(0x40))); | ||||
13985 | if (checksum_type != 0) { | ||||
13986 | int checksum_len = 0; | ||||
13987 | |||||
13988 | /* Adds the CRC of the RTPS message */ | ||||
13989 | switch (checksum_type) { | ||||
13990 | /* 32-bit checksum */ | ||||
13991 | case RTPS_HE_CHECKSUM_CRC32(0x20): | ||||
13992 | checksum_len = 4; | ||||
13993 | break; | ||||
13994 | |||||
13995 | /* 64-bit checksum */ | ||||
13996 | case RTPS_HE_CHECKSUM_CRC64(0x40): | ||||
13997 | checksum_len = 8; | ||||
13998 | is_crc_supported = false0; | ||||
13999 | break; | ||||
14000 | |||||
14001 | /* 128-bit checksum */ | ||||
14002 | case RTPS_HE_CHECKSUM_MD5((0x40) | (0x20)): | ||||
14003 | checksum_len = 16; | ||||
14004 | break; | ||||
14005 | default: | ||||
14006 | break; | ||||
14007 | } | ||||
14008 | |||||
14009 | if (enable_rtps_psk_decryption && decryption_info != NULL((void*)0)) { | ||||
14010 | memset( | ||||
14011 | decryption_info->additional_authenticated_data | ||||
14012 | + offsetToHeaderExtensionData, | ||||
14013 | 0, | ||||
14014 | checksum_len); | ||||
14015 | } | ||||
14016 | |||||
14017 | /* If the check CRC feature is enabled */ | ||||
14018 | if (enable_rtps_crc_check && is_crc_supported) { | ||||
14019 | char* tvb_zero_checksum = NULL((void*)0); | ||||
14020 | rtps_tvb_field *rtps_root = NULL((void*)0); | ||||
14021 | |||||
14022 | checksum_flags = PROTO_CHECKSUM_VERIFY0x01; | ||||
14023 | rtps_root = (rtps_tvb_field*)p_get_proto_data(pinfo->pool, pinfo, proto_rtps, RTPS_ROOT_MESSAGE_KEY4); | ||||
14024 | if (rtps_root != NULL((void*)0)) { | ||||
14025 | /* The checksum in the wire is the checksum of the RTPS message with the | ||||
14026 | * checksum field set to 0. To calculate the checksum of the RTPS message | ||||
14027 | * we need to set those bytes to 0 in a separate buffer. | ||||
14028 | */ | ||||
14029 | 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)))))); | ||||
14030 | tvb_memcpy( | ||||
14031 | rtps_root->tvb, | ||||
14032 | tvb_zero_checksum, | ||||
14033 | rtps_root->tvb_offset, | ||||
14034 | rtps_root->tvb_len); | ||||
14035 | |||||
14036 | /* Set checksum bytes to 0 */ | ||||
14037 | memset(tvb_zero_checksum + offset, 0, checksum_len); | ||||
14038 | switch (checksum_type) { | ||||
14039 | case RTPS_HE_CHECKSUM_CRC32(0x20): | ||||
14040 | /* Checksum is always big endian */ | ||||
14041 | he_checksum.crc32c = tvb_get_uint32(tvb, offset, ENC_BIG_ENDIAN0x00000000); | ||||
14042 | calculated_checksum.crc32c = crc32c_calculate_no_swap( | ||||
14043 | tvb_zero_checksum, | ||||
14044 | rtps_root->tvb_len, | ||||
14045 | CRC32C_PRELOAD0xffffffff); | ||||
14046 | calculated_checksum.crc32c ^= CRC32C_PRELOAD0xffffffff; | ||||
14047 | break; | ||||
14048 | |||||
14049 | case RTPS_HE_CHECKSUM_CRC64(0x40): | ||||
14050 | /* CRC64 is not supported yet */ | ||||
14051 | break; | ||||
14052 | |||||
14053 | case RTPS_HE_CHECKSUM_MD5((0x40) | (0x20)): | ||||
14054 | tvb_memcpy( | ||||
14055 | tvb, | ||||
14056 | &he_checksum.md5, | ||||
14057 | offset, | ||||
14058 | checksum_len); | ||||
14059 | gcry_md_hash_buffer( | ||||
14060 | GCRY_MD_MD5, | ||||
14061 | calculated_checksum.md5, | ||||
14062 | tvb_zero_checksum, | ||||
14063 | rtps_root->tvb_len); | ||||
14064 | break; | ||||
14065 | |||||
14066 | default: | ||||
14067 | break; | ||||
14068 | } | ||||
14069 | } | ||||
14070 | } | ||||
14071 | switch (checksum_type) { | ||||
14072 | case RTPS_HE_CHECKSUM_CRC32(0x20): | ||||
14073 | proto_tree_add_checksum( | ||||
14074 | tree, | ||||
14075 | tvb, | ||||
14076 | offset, | ||||
14077 | hf_rtps_header_extension_checksum_crc32c, | ||||
14078 | -1, | ||||
14079 | &ei_rtps_checksum_check_error, | ||||
14080 | pinfo, | ||||
14081 | calculated_checksum.crc32c, | ||||
14082 | ENC_BIG_ENDIAN0x00000000, | ||||
14083 | checksum_flags); | ||||
14084 | break; | ||||
14085 | case RTPS_HE_CHECKSUM_MD5((0x40) | (0x20)): | ||||
14086 | proto_tree_add_checksum_bytes( | ||||
14087 | tree, | ||||
14088 | tvb, | ||||
14089 | offset, | ||||
14090 | hf_rtps_header_extension_checksum_md5, | ||||
14091 | -1, | ||||
14092 | &ei_rtps_checksum_check_error, | ||||
14093 | pinfo, | ||||
14094 | calculated_checksum.md5, | ||||
14095 | checksum_len, | ||||
14096 | checksum_flags); | ||||
14097 | break; | ||||
14098 | |||||
14099 | case RTPS_HE_CHECKSUM_CRC64(0x40): | ||||
14100 | default: | ||||
14101 | break; | ||||
14102 | } | ||||
14103 | offset += checksum_len; | ||||
14104 | } | ||||
14105 | if ((flags & RTPS_HE_PARAMETERS_FLAG(0x80)) == RTPS_HE_PARAMETERS_FLAG(0x80)) { | ||||
14106 | unsigned parameter_endianess = ((flags & RTPS_HE_ENDIANESS_FLAG(0x01)) == RTPS_HE_ENDIANESS_FLAG(0x01)) | ||||
14107 | ? ENC_LITTLE_ENDIAN0x80000000 | ||||
14108 | : ENC_BIG_ENDIAN0x00000000; | ||||
14109 | dissect_parameter_sequence(tree, pinfo, tvb, offset, parameter_endianess, | ||||
14110 | octets_to_next_header - (offset - initial_offset), | ||||
14111 | "Parameters", 0x0200, NULL((void*)0), vendor_id, false0, NULL((void*)0)); | ||||
14112 | } | ||||
14113 | } | ||||
14114 | |||||
14115 | static void dissect_DATA_FRAG(tvbuff_t *tvb, packet_info *pinfo, int offset, uint8_t flags, | ||||
14116 | const unsigned encoding, int octets_to_next_header, proto_tree *tree, | ||||
14117 | uint16_t vendor_id, endpoint_guid *guid) { | ||||
14118 | /* | ||||
14119 | * 0...2...........7...............15.............23...............31 | ||||
14120 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
14121 | * | DATA_FRAG |X|X|X|X|X|H|Q|E| octetsToNextHeader | | ||||
14122 | * +---------------+---------------+---------------+---------------+ | ||||
14123 | * | EntityId readerEntityId | | ||||
14124 | * +---------------+---------------+---------------+---------------+ | ||||
14125 | * | EntityId writerEntityId | | ||||
14126 | * +---------------+---------------+---------------+---------------+ | ||||
14127 | * | | | ||||
14128 | * + SequenceNumber writerSeqNum + | ||||
14129 | * | | | ||||
14130 | * +---------------+---------------+---------------+---------------+ | ||||
14131 | * | | | ||||
14132 | * + + | ||||
14133 | * | KeyHashPrefix keyHashPrefix [only if H==1] | | ||||
14134 | * + + | ||||
14135 | * | | | ||||
14136 | * +---------------+---------------+---------------+---------------+ | ||||
14137 | * | KeyHashSuffix keyHashSuffix | | ||||
14138 | * +---------------+---------------+---------------+---------------+ | ||||
14139 | * | FragmentNumber fragmentStartingNum | | ||||
14140 | * +---------------+---------------+---------------+---------------+ | ||||
14141 | * | ushort fragmentsInSubmessage | ushort fragmentSize | | ||||
14142 | * +---------------+---------------+---------------+---------------+ | ||||
14143 | * | unsigned long sampleSize | | ||||
14144 | * +---------------+---------------+---------------+---------------+ | ||||
14145 | * | | | ||||
14146 | * ~ ParameterList inlineQos [only if Q==1] ~ | ||||
14147 | * | | | ||||
14148 | * +---------------+---------------+---------------+---------------+ | ||||
14149 | * | | | ||||
14150 | * ~ SerializedData serializedData ~ | ||||
14151 | * | | | ||||
14152 | * +---------------+---------------+---------------+---------------+ | ||||
14153 | */ | ||||
14154 | |||||
14155 | int min_len; | ||||
14156 | int old_offset = offset; | ||||
14157 | uint32_t frag_number = 0; | ||||
14158 | proto_item *octet_item; | ||||
14159 | uint32_t wid; | ||||
14160 | bool_Bool from_builtin_writer; | ||||
14161 | |||||
14162 | proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, DATA_FRAG_FLAGS, flags); | ||||
14163 | |||||
14164 | octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb, | ||||
14165 | offset + 2, 2, encoding); | ||||
14166 | |||||
14167 | /* Calculates the minimum length for this submessage */ | ||||
14168 | min_len = 32; | ||||
14169 | if ((flags & FLAG_DATA_FRAG_Q(0x02)) != 0) min_len += 4; | ||||
14170 | if ((flags & FLAG_DATA_FRAG_H(0x04)) != 0) min_len += 12; | ||||
14171 | |||||
14172 | if (octets_to_next_header < min_len) { | ||||
14173 | expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", min_len); | ||||
14174 | return; | ||||
14175 | } | ||||
14176 | |||||
14177 | offset += 4; | ||||
14178 | |||||
14179 | /* readerEntityId */ | ||||
14180 | rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_rdentity_id, hf_rtps_sm_rdentity_id_key, | ||||
14181 | hf_rtps_sm_rdentity_id_kind, ett_rtps_rdentity, "readerEntityId", NULL((void*)0)); | ||||
14182 | offset += 4; | ||||
14183 | |||||
14184 | /* writerEntityId */ | ||||
14185 | rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key, | ||||
14186 | hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", &wid); | ||||
14187 | offset += 4; | ||||
14188 | guid->entity_id = wid; | ||||
14189 | guid->fields_present |= GUID_HAS_ENTITY_ID0x00000008; | ||||
14190 | rtps_util_add_topic_info(tree, pinfo, tvb, offset, guid); | ||||
14191 | |||||
14192 | /* Sequence number */ | ||||
14193 | rtps_util_add_seq_number(tree, tvb, offset, encoding, "writerSeqNumber"); | ||||
14194 | offset += 8; | ||||
14195 | |||||
14196 | /* If flag H is defined, read the GUID Prefix */ | ||||
14197 | if ((flags & FLAG_DATA_H(0x08)) != 0) { | ||||
14198 | rtps_util_add_guid_prefix_v2(tree, tvb, offset, hf_rtps_sm_guid_prefix, | ||||
14199 | hf_rtps_sm_host_id, hf_rtps_sm_app_id, hf_rtps_sm_instance_id, 0); | ||||
14200 | offset += 12; | ||||
14201 | } else { | ||||
14202 | /* Flag H not set, use hostId, appId from the packet header */ | ||||
14203 | } | ||||
14204 | |||||
14205 | /* Complete the GUID by reading the Object ID */ | ||||
14206 | rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_entity_id, hf_rtps_sm_entity_id_key, | ||||
14207 | hf_rtps_sm_entity_id_kind, ett_rtps_entity, "keyHashSuffix", NULL((void*)0)); | ||||
14208 | offset += 4; | ||||
14209 | |||||
14210 | |||||
14211 | /* Fragment number */ | ||||
14212 | proto_tree_add_item_ret_uint(tree, hf_rtps_data_frag_number, tvb, offset, 4, encoding, &frag_number); | ||||
14213 | offset += 4; | ||||
14214 | |||||
14215 | /* Fragments in submessage */ | ||||
14216 | proto_tree_add_item(tree, hf_rtps_data_frag_num_fragments, tvb, offset, 2, encoding); | ||||
14217 | offset += 2; | ||||
14218 | |||||
14219 | /* Fragment size */ | ||||
14220 | proto_tree_add_item(tree, hf_rtps_data_frag_size, tvb, offset, 2, encoding); | ||||
14221 | offset += 2; | ||||
14222 | |||||
14223 | /* sampleSize */ | ||||
14224 | proto_tree_add_item(tree, hf_rtps_data_frag_sample_size, tvb, offset, 4, encoding); | ||||
14225 | offset += 4; | ||||
14226 | |||||
14227 | /* InlineQos */ | ||||
14228 | if ((flags & FLAG_DATA_Q_v2(0x02)) != 0) { | ||||
14229 | bool_Bool is_inline_qos = true1; | ||||
14230 | offset = dissect_parameter_sequence(tree, pinfo, tvb, offset, encoding, | ||||
14231 | octets_to_next_header - (offset - old_offset) + 4, | ||||
14232 | "inlineQos", 0x0200, NULL((void*)0), vendor_id, is_inline_qos, NULL((void*)0)); | ||||
14233 | } | ||||
14234 | |||||
14235 | /* SerializedData */ | ||||
14236 | if ((flags & FLAG_DATA_D_v2(0x04)) != 0) { | ||||
14237 | from_builtin_writer = (((wid & ENTITYKIND_BUILTIN_WRITER_WITH_KEY(0xc2)) == ENTITYKIND_BUILTIN_WRITER_WITH_KEY(0xc2)) | ||||
14238 | || ((wid & ENTITYKIND_BUILTIN_WRITER_NO_KEY(0xc3)) == ENTITYKIND_BUILTIN_WRITER_NO_KEY(0xc3)) | ||||
14239 | || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_BOOTSTRAP_WRITER(0x00010082)) | ||||
14240 | || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_WRITER(0x00010182))) | ||||
14241 | || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_WRITER(0xff010182)) | ||||
14242 | || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_READER(0xff010187)) ? true1 : false0; | ||||
14243 | dissect_serialized_data(tree, pinfo, tvb, offset, | ||||
14244 | octets_to_next_header - (offset - old_offset) + 4, | ||||
14245 | "serializedData", vendor_id, from_builtin_writer, NULL((void*)0), (int32_t)frag_number); | ||||
14246 | } | ||||
14247 | } | ||||
14248 | |||||
14249 | |||||
14250 | /* *********************************************************************** */ | ||||
14251 | /* * N O K E Y _ D A T A * */ | ||||
14252 | /* *********************************************************************** */ | ||||
14253 | static void dissect_NOKEY_DATA(tvbuff_t *tvb, packet_info *pinfo, int offset, uint8_t flags, | ||||
14254 | const unsigned encoding, int octets_to_next_header, proto_tree *tree, | ||||
14255 | uint16_t version, uint16_t vendor_id) { | ||||
14256 | /* RTPS 1.0/1.1: | ||||
14257 | * 0...2...........7...............15.............23...............31 | ||||
14258 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
14259 | * | ISSUE |X|X|X|X|X|X|P|E| octetsToNextHeader | | ||||
14260 | * +---------------+---------------+---------------+---------------+ | ||||
14261 | * | ObjectId readerObjectId | | ||||
14262 | * +---------------+---------------+---------------+---------------+ | ||||
14263 | * | ObjectId writerObjectId | | ||||
14264 | * +---------------+---------------+---------------+---------------+ | ||||
14265 | * | | | ||||
14266 | * + SequenceNumber writerSeqNumber + | ||||
14267 | * | | | ||||
14268 | * +---------------+---------------+---------------+---------------+ | ||||
14269 | * | | | ||||
14270 | * ~ ParameterSequence parameters [only if P==1] ~ | ||||
14271 | * | | | ||||
14272 | * +---------------+---------------+---------------+---------------+ | ||||
14273 | * | | | ||||
14274 | * ~ UserData issueData ~ | ||||
14275 | * | | | ||||
14276 | * +---------------+---------------+---------------+---------------+ | ||||
14277 | * | ||||
14278 | * RTPS 1.2: | ||||
14279 | * 0...2...........7...............15.............23...............31 | ||||
14280 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
14281 | * | NOKEY_DATA |X|X|X|X|X|D|Q|E| octetsToNextHeader | | ||||
14282 | * +---------------+---------------+---------------+---------------+ | ||||
14283 | * | EntityId readerEntityId | | ||||
14284 | * +---------------+---------------+---------------+---------------+ | ||||
14285 | * | EntityId writerEntityId | | ||||
14286 | * +---------------+---------------+---------------+---------------+ | ||||
14287 | * | | | ||||
14288 | * + SequenceNumber writerSeqNum + | ||||
14289 | * | | | ||||
14290 | * +---------------+---------------+---------------+---------------+ | ||||
14291 | * | | | ||||
14292 | * ~ ParameterList inlineQos [only if Q==1] ~ | ||||
14293 | * | | | ||||
14294 | * +---------------+---------------+---------------+---------------+ | ||||
14295 | * | | | ||||
14296 | * ~ SerializedData serializedData [only if D==0] ~ | ||||
14297 | * | | | ||||
14298 | * +---------------+---------------+---------------+---------------+ | ||||
14299 | * | ||||
14300 | * RTPS 2.0: | ||||
14301 | * 0...2...........7...............15.............23...............31 | ||||
14302 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
14303 | * | NOKEY_DATA |X|X|X|X|X|D|Q|E| octetsToNextHeader | | ||||
14304 | * +---------------+---------------+---------------+---------------+ | ||||
14305 | * | EntityId readerEntityId | | ||||
14306 | * +---------------+---------------+---------------+---------------+ | ||||
14307 | * | EntityId writerEntityId | | ||||
14308 | * +---------------+---------------+---------------+---------------+ | ||||
14309 | * | | | ||||
14310 | * + SequenceNumber writerSeqNum + | ||||
14311 | * | | | ||||
14312 | * +---------------+---------------+---------------+---------------+ | ||||
14313 | * | | | ||||
14314 | * ~ ParameterList inlineQos [only if Q==1] ~ | ||||
14315 | * | | | ||||
14316 | * +---------------+---------------+---------------+---------------+ | ||||
14317 | * | | | ||||
14318 | * ~ SerializedData serializedData [only if D==1] ~ | ||||
14319 | * | | | ||||
14320 | * +---------------+---------------+---------------+---------------+ | ||||
14321 | * Notes: | ||||
14322 | * - inlineQos is equivalent to the old 'parameters' | ||||
14323 | * - serializedData is equivalent to the old 'issueData' | ||||
14324 | */ | ||||
14325 | |||||
14326 | int min_len; | ||||
14327 | uint32_t wid; /* Writer EntityID */ | ||||
14328 | bool_Bool from_builtin_writer; | ||||
14329 | int old_offset = offset; | ||||
14330 | proto_item *octet_item; | ||||
14331 | |||||
14332 | proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, NOKEY_DATA_FLAGS, flags); | ||||
14333 | |||||
14334 | octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb, | ||||
14335 | offset + 2, 2, encoding); | ||||
14336 | |||||
14337 | /* Calculates the minimum length for this submessage */ | ||||
14338 | min_len = 16; | ||||
14339 | if ((flags & FLAG_NOKEY_DATA_Q(0x02)) != 0) min_len += 4; | ||||
14340 | |||||
14341 | if (octets_to_next_header < min_len) { | ||||
14342 | expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", min_len); | ||||
14343 | return; | ||||
14344 | } | ||||
14345 | |||||
14346 | offset += 4; | ||||
14347 | |||||
14348 | /* readerEntityId */ | ||||
14349 | rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_rdentity_id, hf_rtps_sm_rdentity_id_key, | ||||
14350 | hf_rtps_sm_rdentity_id_kind, ett_rtps_rdentity, "readerEntityId", NULL((void*)0)); | ||||
14351 | offset += 4; | ||||
14352 | |||||
14353 | /* writerEntityId */ | ||||
14354 | rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key, | ||||
14355 | hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", &wid); | ||||
14356 | offset += 4; | ||||
14357 | |||||
14358 | /* Sequence number */ | ||||
14359 | rtps_util_add_seq_number(tree, tvb, offset, encoding, "writerSeqNumber"); | ||||
14360 | offset += 8; | ||||
14361 | |||||
14362 | /* Parameters */ | ||||
14363 | if ((flags & FLAG_NOKEY_DATA_Q(0x02)) != 0) { | ||||
14364 | bool_Bool is_inline_qos = true1; | ||||
14365 | offset = dissect_parameter_sequence(tree, pinfo, tvb, offset, | ||||
14366 | encoding, octets_to_next_header, "inlineQos", | ||||
14367 | version, NULL((void*)0), vendor_id, is_inline_qos, NULL((void*)0)); | ||||
14368 | |||||
14369 | } | ||||
14370 | |||||
14371 | /* Issue Data */ | ||||
14372 | if ((version < 0x0200) && (flags & FLAG_NOKEY_DATA_D(0x04)) == 0) { | ||||
14373 | proto_tree_add_item(tree, hf_rtps_issue_data, tvb, offset, | ||||
14374 | octets_to_next_header - (offset - old_offset) + 4, | ||||
14375 | ENC_NA0x00000000); | ||||
14376 | } | ||||
14377 | |||||
14378 | if ((version >= 0x0200) && (flags & FLAG_DATA_D_v2(0x04)) != 0) { | ||||
14379 | from_builtin_writer = (((wid & ENTITYKIND_BUILTIN_WRITER_WITH_KEY(0xc2)) == ENTITYKIND_BUILTIN_WRITER_WITH_KEY(0xc2)) | ||||
14380 | || ((wid & ENTITYKIND_BUILTIN_WRITER_NO_KEY(0xc3)) == ENTITYKIND_BUILTIN_WRITER_NO_KEY(0xc3)) | ||||
14381 | || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_BOOTSTRAP_WRITER(0x00010082)) | ||||
14382 | || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_WRITER(0x00010182))) | ||||
14383 | || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_WRITER(0xff010182)) | ||||
14384 | || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_READER(0xff010187)) ? true1 : false0; | ||||
14385 | dissect_serialized_data(tree, pinfo, tvb, offset, | ||||
14386 | octets_to_next_header - (offset - old_offset) + 4, | ||||
14387 | "serializedData", vendor_id, from_builtin_writer, NULL((void*)0), NOT_A_FRAGMENT(-1)); | ||||
14388 | } | ||||
14389 | |||||
14390 | } | ||||
14391 | |||||
14392 | /* *********************************************************************** */ | ||||
14393 | /* * N O K E Y _ D A T A _ F R A G * */ | ||||
14394 | /* *********************************************************************** */ | ||||
14395 | static void dissect_NOKEY_DATA_FRAG(tvbuff_t *tvb, packet_info *pinfo, int offset, | ||||
14396 | uint8_t flags, const unsigned encoding, int octets_to_next_header, proto_tree *tree, | ||||
14397 | uint16_t vendor_id) { | ||||
14398 | /* | ||||
14399 | * 0...2...........7...............15.............23...............31 | ||||
14400 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
14401 | * |NOKEY_DATA_FRAG|X|X|X|X|X|X|Q|E| octetsToNextHeader | | ||||
14402 | * +---------------+---------------+---------------+---------------+ | ||||
14403 | * | EntityId readerEntityId | | ||||
14404 | * +---------------+---------------+---------------+---------------+ | ||||
14405 | * | EntityId writerEntityId | | ||||
14406 | * +---------------+---------------+---------------+---------------+ | ||||
14407 | * | | | ||||
14408 | * + SequenceNumber writerSeqNum + | ||||
14409 | * | | | ||||
14410 | * +---------------+---------------+---------------+---------------+ | ||||
14411 | * | FragmentNumber fragmentStartingNum | | ||||
14412 | * +---------------+---------------+---------------+---------------+ | ||||
14413 | * | ushort fragmentsInSubmessage | ushort fragmentSize | | ||||
14414 | * +---------------+---------------+---------------+---------------+ | ||||
14415 | * | unsigned long sampleSize | | ||||
14416 | * +---------------+---------------+---------------+---------------+ | ||||
14417 | * | | | ||||
14418 | * ~ ParameterList inlineQos [only if Q==1] ~ | ||||
14419 | * | | | ||||
14420 | * +---------------+---------------+---------------+---------------+ | ||||
14421 | * | | | ||||
14422 | * ~ SerializedData serializedData ~ | ||||
14423 | * | | | ||||
14424 | * +---------------+---------------+---------------+---------------+ | ||||
14425 | */ | ||||
14426 | |||||
14427 | int min_len; | ||||
14428 | uint32_t wid; /* Writer EntityID */ | ||||
14429 | bool_Bool from_builtin_writer; | ||||
14430 | int old_offset = offset; | ||||
14431 | uint32_t frag_number = 0; | ||||
14432 | proto_item *octet_item; | ||||
14433 | proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, NOKEY_DATA_FRAG_FLAGS, flags); | ||||
14434 | |||||
14435 | octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb, | ||||
14436 | offset + 2, 2, encoding); | ||||
14437 | |||||
14438 | /* Calculates the minimum length for this submessage */ | ||||
14439 | min_len = 28; | ||||
14440 | if ((flags & FLAG_NOKEY_DATA_Q(0x02)) != 0) min_len += 4; | ||||
14441 | |||||
14442 | if (octets_to_next_header < min_len) { | ||||
14443 | expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", min_len); | ||||
14444 | return; | ||||
14445 | } | ||||
14446 | |||||
14447 | offset += 4; | ||||
14448 | |||||
14449 | /* readerEntityId */ | ||||
14450 | rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_rdentity_id, hf_rtps_sm_rdentity_id_key, | ||||
14451 | hf_rtps_sm_rdentity_id_kind, ett_rtps_rdentity, "readerEntityId", NULL((void*)0)); | ||||
14452 | offset += 4; | ||||
14453 | |||||
14454 | /* writerEntityId */ | ||||
14455 | rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key, | ||||
14456 | hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", &wid); | ||||
14457 | offset += 4; | ||||
14458 | |||||
14459 | /* Sequence number */ | ||||
14460 | rtps_util_add_seq_number(tree, tvb, offset, encoding, "writerSeqNumber"); | ||||
14461 | offset += 8; | ||||
14462 | |||||
14463 | /* Fragment number */ | ||||
14464 | proto_tree_add_item_ret_uint(tree, hf_rtps_nokey_data_frag_number, tvb, | ||||
14465 | offset, 4, encoding, &frag_number); | ||||
14466 | offset += 4; | ||||
14467 | |||||
14468 | /* Fragments in submessage */ | ||||
14469 | proto_tree_add_item(tree, hf_rtps_nokey_data_frag_num_fragments, tvb, | ||||
14470 | offset, 2, encoding); | ||||
14471 | offset += 2; | ||||
14472 | |||||
14473 | /* Fragment size */ | ||||
14474 | proto_tree_add_item(tree, hf_rtps_nokey_data_frag_size, tvb, | ||||
14475 | offset, 2, encoding); | ||||
14476 | offset += 2; | ||||
14477 | |||||
14478 | /* InlineQos */ | ||||
14479 | if ((flags & FLAG_DATA_Q_v2(0x02)) != 0) { | ||||
14480 | bool_Bool is_inline_qos = true1; | ||||
14481 | offset = dissect_parameter_sequence(tree, pinfo, tvb, offset, encoding, | ||||
14482 | octets_to_next_header - (offset - old_offset) + 4, | ||||
14483 | "inlineQos", 0x0200, NULL((void*)0), vendor_id, is_inline_qos, NULL((void*)0)); | ||||
14484 | } | ||||
14485 | |||||
14486 | /* SerializedData */ | ||||
14487 | if ((flags & FLAG_DATA_D_v2(0x04)) != 0) { | ||||
14488 | from_builtin_writer = (((wid & ENTITYKIND_BUILTIN_WRITER_WITH_KEY(0xc2)) == ENTITYKIND_BUILTIN_WRITER_WITH_KEY(0xc2)) | ||||
14489 | || ((wid & ENTITYKIND_BUILTIN_WRITER_NO_KEY(0xc3)) == ENTITYKIND_BUILTIN_WRITER_NO_KEY(0xc3)) | ||||
14490 | || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_BOOTSTRAP_WRITER(0x00010082)) | ||||
14491 | || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_WRITER(0x00010182))) | ||||
14492 | || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_WRITER(0xff010182)) | ||||
14493 | || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_READER(0xff010187)) ? true1 : false0; | ||||
14494 | dissect_serialized_data(tree, pinfo, tvb,offset, | ||||
14495 | octets_to_next_header - (offset - old_offset) + 4, | ||||
14496 | "serializedData", vendor_id, from_builtin_writer, NULL((void*)0), (int32_t)frag_number); | ||||
14497 | } | ||||
14498 | } | ||||
14499 | |||||
14500 | static void dissect_PING(tvbuff_t* tvb, int offset, const unsigned encoding, int octets_to_next_header, proto_tree* tree) { | ||||
14501 | proto_tree_add_item(tree, hf_rtps_ping,tvb, offset, octets_to_next_header, encoding); | ||||
14502 | } | ||||
14503 | |||||
14504 | /* *********************************************************************** */ | ||||
14505 | /* * A C K N A C K * */ | ||||
14506 | /* *********************************************************************** */ | ||||
14507 | static void dissect_ACKNACK(tvbuff_t *tvb, packet_info *pinfo, int offset, uint8_t flags, | ||||
14508 | const unsigned encoding, int octets_to_next_header, proto_tree *tree, | ||||
14509 | proto_item *item, endpoint_guid *guid) { | ||||
14510 | /* RTPS 1.0/1.1: | ||||
14511 | * 0...2...........7...............15.............23...............31 | ||||
14512 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
14513 | * | ACK |X|X|X|X|X|X|F|E| octetsToNextHeader | | ||||
14514 | * +---------------+---------------+---------------+---------------+ | ||||
14515 | * | ObjectId readerObjectId | | ||||
14516 | * +---------------+---------------+---------------+---------------+ | ||||
14517 | * | ObjectId writerObjectId | | ||||
14518 | * +---------------+---------------+---------------+---------------+ | ||||
14519 | * | | | ||||
14520 | * + Bitmap bitmap + | ||||
14521 | * | | | ||||
14522 | * +---------------+---------------+---------------+---------------+ | ||||
14523 | * | Counter count | | ||||
14524 | * +---------------+---------------+---------------+---------------+ | ||||
14525 | * | ||||
14526 | * RTPS 1.2/2.0: | ||||
14527 | * 0...2...........7...............15.............23...............31 | ||||
14528 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
14529 | * | ACKNACK |X|X|X|X|X|X|F|E| octetsToNextHeader | | ||||
14530 | * +---------------+---------------+---------------+---------------+ | ||||
14531 | * | EntityId readerEntityId | | ||||
14532 | * +---------------+---------------+---------------+---------------+ | ||||
14533 | * | EntityId writerEntityId | | ||||
14534 | * +---------------+---------------+---------------+---------------+ | ||||
14535 | * | | | ||||
14536 | * + SequenceNumberSet readerSNState + | ||||
14537 | * | | | ||||
14538 | * +---------------+---------------+---------------+---------------+ | ||||
14539 | * | Counter count | | ||||
14540 | * +---------------+---------------+---------------+---------------+ | ||||
14541 | */ | ||||
14542 | int original_offset; /* Offset to the readerEntityId */ | ||||
14543 | proto_item *octet_item; | ||||
14544 | uint32_t wid; | ||||
14545 | |||||
14546 | proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, ACKNACK_FLAGS, flags); | ||||
14547 | octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb, offset + 2, 2, encoding); | ||||
14548 | if (octets_to_next_header < 20) { | ||||
14549 | expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= 20)"); | ||||
14550 | return; | ||||
14551 | } | ||||
14552 | |||||
14553 | offset += 4; | ||||
14554 | original_offset = offset; | ||||
14555 | |||||
14556 | /* readerEntityId */ | ||||
14557 | rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_rdentity_id, hf_rtps_sm_rdentity_id_key, | ||||
14558 | hf_rtps_sm_rdentity_id_kind, ett_rtps_rdentity, "readerEntityId", NULL((void*)0)); | ||||
14559 | offset += 4; | ||||
14560 | |||||
14561 | /* writerEntityId */ | ||||
14562 | rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key, | ||||
14563 | hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", &wid); | ||||
14564 | offset += 4; | ||||
14565 | guid->entity_id = wid; | ||||
14566 | guid->fields_present |= GUID_HAS_ENTITY_ID0x00000008; | ||||
14567 | rtps_util_add_topic_info(tree, pinfo, tvb, offset, guid); | ||||
14568 | |||||
14569 | /* Bitmap */ | ||||
14570 | offset = rtps_util_add_bitmap(tree, pinfo, tvb, offset, encoding, "readerSNState", true1); | ||||
14571 | |||||
14572 | /* RTPS 1.0 didn't have count: make sure we don't decode it wrong | ||||
14573 | * in this case | ||||
14574 | */ | ||||
14575 | if (offset + 4 == original_offset + octets_to_next_header) { | ||||
14576 | /* Count is present */ | ||||
14577 | proto_tree_add_item(tree, hf_rtps_acknack_count, tvb, offset, 4, encoding); | ||||
14578 | } else if (offset < original_offset + octets_to_next_header) { | ||||
14579 | /* In this case there must be something wrong in the bitmap: there | ||||
14580 | * are some extra bytes that we don't know how to decode | ||||
14581 | */ | ||||
14582 | 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); | ||||
14583 | } else if (offset > original_offset + octets_to_next_header) { | ||||
14584 | /* Decoding the bitmap went over the end of this submessage. | ||||
14585 | * Enter an item in the protocol tree that spans over the entire | ||||
14586 | * submessage. | ||||
14587 | */ | ||||
14588 | expert_add_info(pinfo, item, &ei_rtps_missing_bytes); | ||||
14589 | } | ||||
14590 | |||||
14591 | } | ||||
14592 | |||||
14593 | /* *********************************************************************** */ | ||||
14594 | /* * N A C K _ F R A G * */ | ||||
14595 | /* *********************************************************************** */ | ||||
14596 | static void dissect_NACK_FRAG(tvbuff_t *tvb, packet_info *pinfo, int offset, uint8_t flags, | ||||
14597 | const unsigned encoding, int octets_to_next_header, proto_tree *tree) { | ||||
14598 | /* | ||||
14599 | * 0...2...........7...............15.............23...............31 | ||||
14600 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
14601 | * | NACK_FRAG |X|X|X|X|X|X|X|E| octetsToNextHeader | | ||||
14602 | * +---------------+---------------+---------------+---------------+ | ||||
14603 | * | EntityId readerEntityId | | ||||
14604 | * +---------------+---------------+---------------+---------------+ | ||||
14605 | * | EntityId writerEntityId | | ||||
14606 | * +---------------+---------------+---------------+---------------+ | ||||
14607 | * | | | ||||
14608 | * + SequenceNumberSet writerSN + | ||||
14609 | * | | | ||||
14610 | * +---------------+---------------+---------------+---------------+ | ||||
14611 | * | | | ||||
14612 | * ~ FragmentNumberSet fragmentNumberState + | ||||
14613 | * | | | ||||
14614 | * +---------------+---------------+---------------+---------------+ | ||||
14615 | * | Counter count | | ||||
14616 | * +---------------+---------------+---------------+---------------+ | ||||
14617 | */ | ||||
14618 | proto_item *octet_item; | ||||
14619 | |||||
14620 | proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, NACK_FRAG_FLAGS, flags); | ||||
14621 | |||||
14622 | octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb, | ||||
14623 | offset + 2, 2, encoding); | ||||
14624 | |||||
14625 | if (octets_to_next_header < 24) { | ||||
14626 | expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= 24)"); | ||||
14627 | return; | ||||
14628 | } | ||||
14629 | |||||
14630 | offset += 4; | ||||
14631 | |||||
14632 | /* readerEntityId */ | ||||
14633 | rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_rdentity_id, hf_rtps_sm_rdentity_id_key, | ||||
14634 | hf_rtps_sm_rdentity_id_kind, ett_rtps_rdentity, "readerEntityId", NULL((void*)0)); | ||||
14635 | offset += 4; | ||||
14636 | |||||
14637 | /* writerEntityId */ | ||||
14638 | rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key, | ||||
14639 | hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", NULL((void*)0)); | ||||
14640 | offset += 4; | ||||
14641 | |||||
14642 | /* Writer sequence number */ | ||||
14643 | rtps_util_add_seq_number(tree, tvb, offset, encoding, "writerSN"); | ||||
14644 | offset += 8; | ||||
14645 | |||||
14646 | /* FragmentNumberSet */ | ||||
14647 | offset = rtps_util_add_fragment_number_set(tree, pinfo, tvb, offset, encoding, | ||||
14648 | "fragmentNumberState", octets_to_next_header - 20); | ||||
14649 | |||||
14650 | if (offset == -1) { | ||||
14651 | return; | ||||
14652 | } | ||||
14653 | /* Count */ | ||||
14654 | proto_tree_add_item(tree, hf_rtps_nack_frag_count, tvb, offset, 4, encoding); | ||||
14655 | } | ||||
14656 | |||||
14657 | /* *********************************************************************** */ | ||||
14658 | /* * H E A R T B E A T * */ | ||||
14659 | /* *********************************************************************** */ | ||||
14660 | static void dissect_HEARTBEAT(tvbuff_t *tvb, packet_info *pinfo, int offset, uint8_t flags, | ||||
14661 | const unsigned encoding, int octets_to_next_header, proto_tree *tree, | ||||
14662 | uint16_t version, endpoint_guid *guid) { | ||||
14663 | /* RTPS 1.0/1.1: | ||||
14664 | * 0...2...........7...............15.............23...............31 | ||||
14665 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
14666 | * | HEARTBEAT |X|X|X|X|X|L|F|E| octetsToNextHeader | | ||||
14667 | * +---------------+---------------+---------------+---------------+ | ||||
14668 | * | ObjectId readerObjectId | | ||||
14669 | * +---------------+---------------+---------------+---------------+ | ||||
14670 | * | ObjectId writerObjectId | | ||||
14671 | * +---------------+---------------+---------------+---------------+ | ||||
14672 | * | | | ||||
14673 | * + SequenceNumber firstAvailableSeqNumber + | ||||
14674 | * | | | ||||
14675 | * +---------------+---------------+---------------+---------------+ | ||||
14676 | * | | | ||||
14677 | * + SequenceNumber lastSeqNumber + | ||||
14678 | * | | | ||||
14679 | * +---------------+---------------+---------------+---------------+ | ||||
14680 | * | long counter | | ||||
14681 | * +---------------+---------------+---------------+---------------+ | ||||
14682 | * | ||||
14683 | * Notes: | ||||
14684 | * - on RTPS 1.0, counter is not present | ||||
14685 | * - on RTPS 1.0, L flag is not present | ||||
14686 | * | ||||
14687 | * RTPS 1.2/2.0: | ||||
14688 | * 0...2...........7...............15.............23...............31 | ||||
14689 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
14690 | * | HEARTBEAT |X|X|X|X|X|X|F|E| octetsToNextHeader | | ||||
14691 | * +---------------+---------------+---------------+---------------+ | ||||
14692 | * | EntityId readerEntityId | | ||||
14693 | * +---------------+---------------+---------------+---------------+ | ||||
14694 | * | EntityId writerEntityId | | ||||
14695 | * +---------------+---------------+---------------+---------------+ | ||||
14696 | * | | | ||||
14697 | * + SequenceNumber firstAvailableSeqNumber + | ||||
14698 | * | | | ||||
14699 | * +---------------+---------------+---------------+---------------+ | ||||
14700 | * | | | ||||
14701 | * + SequenceNumber lastSeqNumber + | ||||
14702 | * | | | ||||
14703 | * +---------------+---------------+---------------+---------------+ | ||||
14704 | * | Counter count | | ||||
14705 | * +---------------+---------------+---------------+---------------+ | ||||
14706 | */ | ||||
14707 | proto_item *octet_item; | ||||
14708 | uint32_t wid; | ||||
14709 | proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, HEARTBEAT_FLAGS, flags); | ||||
14710 | |||||
14711 | octet_item = proto_tree_add_item(tree, | ||||
14712 | hf_rtps_sm_octets_to_next_header, | ||||
14713 | tvb, | ||||
14714 | offset + 2, | ||||
14715 | 2, | ||||
14716 | encoding); | ||||
14717 | |||||
14718 | if ((octets_to_next_header < 24) && (version <= 0x0101)) { | ||||
14719 | expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= 24)"); | ||||
14720 | return; | ||||
14721 | } | ||||
14722 | else if (octets_to_next_header < 28) { | ||||
14723 | expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= 28)"); | ||||
14724 | return; | ||||
14725 | } | ||||
14726 | |||||
14727 | offset += 4; | ||||
14728 | |||||
14729 | /* readerEntityId */ | ||||
14730 | rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_rdentity_id, hf_rtps_sm_rdentity_id_key, | ||||
14731 | hf_rtps_sm_rdentity_id_kind, ett_rtps_rdentity, "readerEntityId", NULL((void*)0)); | ||||
14732 | offset += 4; | ||||
14733 | |||||
14734 | /* writerEntityId */ | ||||
14735 | rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key, | ||||
14736 | hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", &wid); | ||||
14737 | offset += 4; | ||||
14738 | guid->entity_id = wid; | ||||
14739 | guid->fields_present |= GUID_HAS_ENTITY_ID0x00000008; | ||||
14740 | rtps_util_add_topic_info(tree, pinfo, tvb, offset, guid); | ||||
14741 | |||||
14742 | /* First available Sequence Number */ | ||||
14743 | rtps_util_add_seq_number(tree, tvb, offset, encoding, "firstAvailableSeqNumber"); | ||||
14744 | offset += 8; | ||||
14745 | |||||
14746 | /* Last Sequence Number */ | ||||
14747 | rtps_util_add_seq_number(tree, tvb, offset, encoding, "lastSeqNumber"); | ||||
14748 | offset += 8; | ||||
14749 | |||||
14750 | /* Counter: it was not present in RTPS 1.0 */ | ||||
14751 | if (version >= 0x0101) { | ||||
14752 | proto_tree_add_item(tree, hf_rtps_heartbeat_count, tvb, offset, 4, encoding); | ||||
14753 | } | ||||
14754 | } | ||||
14755 | |||||
14756 | /* *********************************************************************** */ | ||||
14757 | /* * H E A R T B E A T _ B A T C H * */ | ||||
14758 | /* *********************************************************************** */ | ||||
14759 | static void dissect_HEARTBEAT_BATCH(tvbuff_t *tvb, packet_info *pinfo, int offset, | ||||
14760 | uint8_t flags, const unsigned encoding, int octets_to_next_header, | ||||
14761 | proto_tree *tree, endpoint_guid *guid) { | ||||
14762 | /* | ||||
14763 | * 0...2...........7...............15.............23...............31 | ||||
14764 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
14765 | * |HEARTBEAT_BATCH|X|X|X|X|X|L|F|E| octetsToNextHeader | | ||||
14766 | * +---------------+---------------+---------------+---------------+ | ||||
14767 | * | EntityId readerId | | ||||
14768 | * +---------------+---------------+---------------+---------------+ | ||||
14769 | * | EntityId writerId | | ||||
14770 | * +---------------+---------------+---------------+---------------+ | ||||
14771 | * | | | ||||
14772 | * + SequenceNumber firstBatchSN + | ||||
14773 | * | | | ||||
14774 | * +---------------+---------------+---------------+---------------+ | ||||
14775 | * | | | ||||
14776 | * + SequenceNumber lastBatchSN + | ||||
14777 | * | | | ||||
14778 | * +---------------+---------------+---------------+---------------+ | ||||
14779 | * | | | ||||
14780 | * + SequenceNumber firstSN + | ||||
14781 | * | | | ||||
14782 | * +---------------+---------------+---------------+---------------+ | ||||
14783 | * | | | ||||
14784 | * + SequenceNumber lastSN + | ||||
14785 | * | | | ||||
14786 | * +---------------+---------------+---------------+---------------+ | ||||
14787 | * | Count count | | ||||
14788 | * +---------------+---------------+---------------+---------------+ | ||||
14789 | */ | ||||
14790 | proto_item *octet_item; | ||||
14791 | uint32_t wid; | ||||
14792 | proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, HEARTBEAT_BATCH_FLAGS, flags); | ||||
14793 | |||||
14794 | octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb, | ||||
14795 | offset + 2, 2, encoding); | ||||
14796 | |||||
14797 | if (octets_to_next_header < 36) { | ||||
14798 | expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= 36)"); | ||||
14799 | return; | ||||
14800 | } | ||||
14801 | |||||
14802 | /* Skip decoding the entire packet if (tree == NULL) */ | ||||
14803 | if (tree == NULL((void*)0)) { | ||||
14804 | return; | ||||
14805 | } | ||||
14806 | |||||
14807 | offset += 4; | ||||
14808 | |||||
14809 | /* readerEntityId */ | ||||
14810 | rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_rdentity_id, hf_rtps_sm_rdentity_id_key, | ||||
14811 | hf_rtps_sm_rdentity_id_kind, ett_rtps_rdentity, "readerEntityId", NULL((void*)0)); | ||||
14812 | offset += 4; | ||||
14813 | |||||
14814 | /* writerEntityId */ | ||||
14815 | rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key, | ||||
14816 | hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", &wid); | ||||
14817 | offset += 4; | ||||
14818 | guid->entity_id = wid; | ||||
14819 | guid->fields_present |= GUID_HAS_ENTITY_ID0x00000008; | ||||
14820 | rtps_util_add_topic_info(tree, pinfo, tvb, offset, guid); | ||||
14821 | |||||
14822 | /* First available Batch Sequence Number */ | ||||
14823 | rtps_util_add_seq_number(tree, tvb, offset, encoding, "firstBatchSN"); | ||||
14824 | offset += 8; | ||||
14825 | |||||
14826 | /* Last Batch Sequence Number */ | ||||
14827 | rtps_util_add_seq_number(tree, tvb, offset, encoding, "lastBatchSN"); | ||||
14828 | offset += 8; | ||||
14829 | |||||
14830 | /* First available Sequence Number */ | ||||
14831 | rtps_util_add_seq_number(tree, tvb, offset, encoding, "firstSeqNumber"); | ||||
14832 | offset += 8; | ||||
14833 | |||||
14834 | /* Last Sequence Number */ | ||||
14835 | rtps_util_add_seq_number(tree, tvb, offset, encoding, "lastSeqNumber"); | ||||
14836 | offset += 8; | ||||
14837 | |||||
14838 | /* Counter */ | ||||
14839 | proto_tree_add_item(tree, hf_rtps_heartbeat_batch_count, tvb, offset, 4, encoding); | ||||
14840 | } | ||||
14841 | |||||
14842 | /* *********************************************************************** */ | ||||
14843 | /* * H E A R T B E A T _ V I R T U A L * */ | ||||
14844 | /* *********************************************************************** */ | ||||
14845 | |||||
14846 | static void dissect_HEARTBEAT_VIRTUAL(tvbuff_t *tvb, packet_info *pinfo _U___attribute__((unused)), int offset, | ||||
14847 | uint8_t flags, const unsigned encoding, int octets_to_next_header, proto_tree *tree, | ||||
14848 | uint16_t vendor_id _U___attribute__((unused)), endpoint_guid *guid) { | ||||
14849 | |||||
14850 | /* | ||||
14851 | * VIRTUAL_HB: | ||||
14852 | * | ||||
14853 | * 0...2...........7...............15.............23...............31 | ||||
14854 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
14855 | * | VIRTUAL_HB |X|X|X|X|N|W|V|E| octetsToNextHeader | | ||||
14856 | * +---------------+---------------+---------------+---------------+ | ||||
14857 | * | EntityId readerId | | ||||
14858 | * +---------------+---------------+---------------+---------------+ | ||||
14859 | * | EntityId writerId | | ||||
14860 | * +---------------+---------------+---------------+---------------+ | ||||
14861 | * | Guid_t virtualGUID (V=0 & N=0) | | ||||
14862 | * + + | ||||
14863 | * | | | ||||
14864 | * + + | ||||
14865 | * | | | ||||
14866 | * + + | ||||
14867 | * | | | ||||
14868 | * +---------------+---------------+---------------+---------------+ | ||||
14869 | * | unsigned long numWriters (W=1) | | ||||
14870 | * +---------------+---------------+---------------+---------------+ | ||||
14871 | * | | | ||||
14872 | * ~ WriterVirtualHBList writerVirtualHBList ~ | ||||
14873 | * | | | ||||
14874 | * +---------------+---------------+---------------+---------------+ | ||||
14875 | * | unsigned long count | | ||||
14876 | * +---------------+---------------+---------------+---------------+ | ||||
14877 | |||||
14878 | * WRITER_VIRTUAL_HB: | ||||
14879 | * | ||||
14880 | * 0...2...........7...............15.............23...............31 | ||||
14881 | * +---------------+---------------+---------------+---------------+ | ||||
14882 | * | EntityId writerId (W=1) | | ||||
14883 | * +---------------+---------------+---------------+---------------+ | ||||
14884 | * | unsigned long numVirtualGUIDs (N=0) | | ||||
14885 | * +---------------+---------------+---------------+---------------+ | ||||
14886 | * | | | ||||
14887 | * ~ VirtualGUIDHBList virtualGUIDHBList ~ | ||||
14888 | * | | | ||||
14889 | * +---------------+---------------+---------------+---------------+ | ||||
14890 | * | ||||
14891 | * VIRTUAL_GUID_HB: | ||||
14892 | * | ||||
14893 | * 0...2...........7...............15.............23...............31 | ||||
14894 | * +---------------+---------------+---------------+---------------+ | ||||
14895 | * | Guid_t virtualGUID (V=1) | | ||||
14896 | * + + | ||||
14897 | * | | | ||||
14898 | * + + | ||||
14899 | * | | | ||||
14900 | * + + | ||||
14901 | * | | | ||||
14902 | * +---------------+---------------+---------------+---------------+ | ||||
14903 | * | | | ||||
14904 | * + SequenceNumber firstVirtualSN + | ||||
14905 | * | | | ||||
14906 | * +---------------+---------------+---------------+---------------+ | ||||
14907 | * | | | ||||
14908 | * + SequenceNumber lastVirtualSN + | ||||
14909 | * | | | ||||
14910 | * +---------------+---------------+---------------+---------------+ | ||||
14911 | * | | | ||||
14912 | * + SequenceNumber firstRTPSSN + | ||||
14913 | * | | | ||||
14914 | * +---------------+---------------+---------------+---------------+ | ||||
14915 | * | | | ||||
14916 | * + SequenceNumber lastRTPSSN + | ||||
14917 | * | | | ||||
14918 | * +---------------+---------------+---------------+---------------+ | ||||
14919 | */ | ||||
14920 | |||||
14921 | uint32_t num_writers, num_virtual_guids, wid; | ||||
14922 | int writer_id_offset, virtual_guid_offset = 0, old_offset; | ||||
14923 | proto_item *octet_item, *ti; | ||||
14924 | |||||
14925 | proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, HEARTBEAT_VIRTUAL_FLAGS, flags); | ||||
14926 | |||||
14927 | octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb, | ||||
14928 | offset + 2, 2, encoding); | ||||
14929 | |||||
14930 | if (octets_to_next_header < 12) { | ||||
14931 | expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", 12); | ||||
14932 | return; | ||||
14933 | } | ||||
14934 | offset += 4; | ||||
14935 | |||||
14936 | /* readerEntityId */ | ||||
14937 | rtps_util_add_entity_id(tree, | ||||
14938 | pinfo, tvb, | ||||
14939 | offset, | ||||
14940 | hf_rtps_sm_rdentity_id, | ||||
14941 | hf_rtps_sm_rdentity_id_key, | ||||
14942 | hf_rtps_sm_rdentity_id_kind, | ||||
14943 | ett_rtps_rdentity, | ||||
14944 | "readerEntityId", | ||||
14945 | NULL((void*)0)); | ||||
14946 | offset += 4; | ||||
14947 | |||||
14948 | /* writerEntityId */ | ||||
14949 | rtps_util_add_entity_id(tree, | ||||
14950 | pinfo, tvb, | ||||
14951 | offset, | ||||
14952 | hf_rtps_sm_wrentity_id, | ||||
14953 | hf_rtps_sm_wrentity_id_key, | ||||
14954 | hf_rtps_sm_wrentity_id_kind, | ||||
14955 | ett_rtps_wrentity, | ||||
14956 | "writerEntityId", | ||||
14957 | &wid); | ||||
14958 | writer_id_offset = offset; | ||||
14959 | offset += 4; | ||||
14960 | guid->entity_id = wid; | ||||
14961 | guid->fields_present |= GUID_HAS_ENTITY_ID0x00000008; | ||||
14962 | rtps_util_add_topic_info(tree, pinfo, tvb, offset, guid); | ||||
14963 | |||||
14964 | /* virtualGUID */ | ||||
14965 | if (!(flags & FLAG_VIRTUAL_HEARTBEAT_V(0x02)) && !(flags & FLAG_VIRTUAL_HEARTBEAT_N(0x08))) { | ||||
14966 | /*rtps_util_add_generic_guid(tree, | ||||
14967 | tvb, | ||||
14968 | offset, | ||||
14969 | "virtualGUID", | ||||
14970 | buffer, | ||||
14971 | MAX_GUID_SIZE);*/ | ||||
14972 | virtual_guid_offset = offset; | ||||
14973 | offset += 16; | ||||
14974 | } | ||||
14975 | |||||
14976 | /* num_writers */ | ||||
14977 | ti = proto_tree_add_item(tree, hf_rtps_virtual_heartbeat_num_writers, tvb, | ||||
14978 | offset, 4, encoding); | ||||
14979 | if (flags & FLAG_VIRTUAL_HEARTBEAT_W(0x04)) { | ||||
14980 | num_writers = tvb_get_uint32(tvb, offset, encoding); | ||||
14981 | offset += 4; | ||||
14982 | } else { | ||||
14983 | proto_item_set_text(ti, "numWriters: 1"); | ||||
14984 | num_writers = 1; | ||||
14985 | } | ||||
14986 | |||||
14987 | { | ||||
14988 | /* Deserialize Writers */ | ||||
14989 | proto_tree *sil_tree_writer_list; | ||||
14990 | uint32_t current_writer_index; | ||||
14991 | |||||
14992 | /** Writer list **/ | ||||
14993 | sil_tree_writer_list = proto_tree_add_subtree_format(tree, tvb, offset, -1, | ||||
14994 | ett_rtps_writer_heartbeat_virtual_list, NULL((void*)0), "Writer List"); | ||||
14995 | |||||
14996 | current_writer_index = 0; | ||||
14997 | |||||
14998 | while (current_writer_index < num_writers) { | ||||
14999 | proto_tree *sil_tree_writer; | ||||
15000 | sil_tree_writer = proto_tree_add_subtree_format(sil_tree_writer_list, tvb, offset, -1, | ||||
15001 | ett_rtps_writer_heartbeat_virtual, NULL((void*)0), "writer[%d]", current_writer_index); | ||||
15002 | |||||
15003 | if (num_writers == 1) { | ||||
15004 | old_offset = offset; | ||||
15005 | offset = writer_id_offset; | ||||
15006 | } | ||||
15007 | |||||
15008 | rtps_util_add_entity_id(sil_tree_writer, | ||||
15009 | pinfo, tvb, | ||||
15010 | offset, | ||||
15011 | hf_rtps_sm_wrentity_id, | ||||
15012 | hf_rtps_sm_wrentity_id_key, | ||||
15013 | hf_rtps_sm_wrentity_id_kind, | ||||
15014 | ett_rtps_wrentity, | ||||
15015 | "writerEntityId", | ||||
15016 | NULL((void*)0)); | ||||
15017 | |||||
15018 | if (num_writers == 1) { | ||||
15019 | offset = old_offset; | ||||
15020 | } else { | ||||
15021 | offset += 4; | ||||
15022 | } | ||||
15023 | |||||
15024 | if (!(flags & FLAG_VIRTUAL_HEARTBEAT_N(0x08))) { | ||||
15025 | proto_tree_add_item(sil_tree_writer, hf_rtps_virtual_heartbeat_num_virtual_guids, tvb, | ||||
15026 | offset, 4, encoding); | ||||
15027 | num_virtual_guids = tvb_get_uint32(tvb, offset, encoding); | ||||
15028 | offset += 4; | ||||
15029 | } else { | ||||
15030 | num_virtual_guids = 0; | ||||
15031 | } | ||||
15032 | |||||
15033 | /** Virtual GUID list **/ | ||||
15034 | if (num_virtual_guids != 0) { | ||||
15035 | proto_tree *sil_tree_virtual_guid_list; | ||||
15036 | uint32_t current_virtual_guid_index; | ||||
15037 | |||||
15038 | sil_tree_virtual_guid_list = proto_tree_add_subtree_format(sil_tree_writer, tvb, offset, -1, | ||||
15039 | ett_rtps_virtual_guid_heartbeat_virtual_list, NULL((void*)0), "Virtual GUID List"); | ||||
15040 | |||||
15041 | current_virtual_guid_index = 0; | ||||
15042 | |||||
15043 | while (current_virtual_guid_index < num_virtual_guids) { | ||||
15044 | proto_tree *sil_tree_virtual_guid; | ||||
15045 | sil_tree_virtual_guid = proto_tree_add_subtree_format(sil_tree_virtual_guid_list, tvb, offset, -1, | ||||
15046 | ett_rtps_virtual_guid_heartbeat_virtual, NULL((void*)0), "virtualGUID[%d]", current_virtual_guid_index); | ||||
15047 | |||||
15048 | if (!(flags & FLAG_VIRTUAL_HEARTBEAT_V(0x02))) { | ||||
15049 | old_offset = offset; | ||||
15050 | offset = virtual_guid_offset; | ||||
15051 | } | ||||
15052 | |||||
15053 | /*rtps_util_add_generic_guid_v2(sil_tree_virtual_guid, | ||||
15054 | tvb, | ||||
15055 | offset, | ||||
15056 | "virtualGUID", | ||||
15057 | buffer, | ||||
15058 | MAX_GUID_SIZE);*/ | ||||
15059 | |||||
15060 | if (!(flags & FLAG_VIRTUAL_HEARTBEAT_V(0x02))) { | ||||
15061 | offset = old_offset; | ||||
15062 | } else { | ||||
15063 | offset += 16; | ||||
15064 | } | ||||
15065 | |||||
15066 | /* firstVirtualSN */ | ||||
15067 | rtps_util_add_seq_number(sil_tree_virtual_guid, | ||||
15068 | tvb, | ||||
15069 | offset, | ||||
15070 | encoding, | ||||
15071 | "firstVirtualSN"); | ||||
15072 | offset += 8; | ||||
15073 | |||||
15074 | /* lastVirtualSN */ | ||||
15075 | rtps_util_add_seq_number(sil_tree_virtual_guid, | ||||
15076 | tvb, | ||||
15077 | offset, | ||||
15078 | encoding, | ||||
15079 | "lastVirtualSN"); | ||||
15080 | offset += 8; | ||||
15081 | |||||
15082 | /* firstRTPSSN */ | ||||
15083 | rtps_util_add_seq_number(sil_tree_virtual_guid, | ||||
15084 | tvb, | ||||
15085 | offset, | ||||
15086 | encoding, | ||||
15087 | "firstRTPSSN"); | ||||
15088 | offset += 8; | ||||
15089 | |||||
15090 | /* lastRTPSSN */ | ||||
15091 | rtps_util_add_seq_number(sil_tree_virtual_guid, | ||||
15092 | tvb, | ||||
15093 | offset, | ||||
15094 | encoding, | ||||
15095 | "lastRTPSSN"); | ||||
15096 | offset += 8; | ||||
15097 | |||||
15098 | current_virtual_guid_index++; | ||||
15099 | } | ||||
15100 | } | ||||
15101 | |||||
15102 | current_writer_index++; | ||||
15103 | } | ||||
15104 | } | ||||
15105 | |||||
15106 | /* Count */ | ||||
15107 | proto_tree_add_item(tree, hf_rtps_virtual_heartbeat_count, tvb, offset, 4, encoding); | ||||
15108 | } | ||||
15109 | |||||
15110 | |||||
15111 | /* *********************************************************************** */ | ||||
15112 | /* * H E A R T B E A T _ F R A G * */ | ||||
15113 | /* *********************************************************************** */ | ||||
15114 | static void dissect_HEARTBEAT_FRAG(tvbuff_t *tvb, packet_info *pinfo, int offset, uint8_t flags, | ||||
15115 | const unsigned encoding, int octets_to_next_header, proto_tree *tree, endpoint_guid *guid) { | ||||
15116 | /* | ||||
15117 | * 0...2...........7...............15.............23...............31 | ||||
15118 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
15119 | * |HEARTBEAT_FRAG |X|X|X|X|X|X|X|E| octetsToNextHeader | | ||||
15120 | * +---------------+---------------+---------------+---------------+ | ||||
15121 | * | EntityId readerEntityId | | ||||
15122 | * +---------------+---------------+---------------+---------------+ | ||||
15123 | * | EntityId writerEntityId | | ||||
15124 | * +---------------+---------------+---------------+---------------+ | ||||
15125 | * | | | ||||
15126 | * + SequenceNumber writerSeqNumber + | ||||
15127 | * | | | ||||
15128 | * +---------------+---------------+---------------+---------------+ | ||||
15129 | * | FragmentNumber lastFragmentNum | | ||||
15130 | * +---------------+---------------+---------------+---------------+ | ||||
15131 | * | Counter count | | ||||
15132 | * +---------------+---------------+---------------+---------------+ | ||||
15133 | */ | ||||
15134 | proto_item *octet_item; | ||||
15135 | uint32_t wid; | ||||
15136 | proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, HEARTBEAT_FRAG_FLAGS, flags); | ||||
15137 | |||||
15138 | octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb, | ||||
15139 | offset + 2, 2, encoding); | ||||
15140 | |||||
15141 | if (octets_to_next_header < 24) { | ||||
15142 | expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= 24)"); | ||||
15143 | return; | ||||
15144 | } | ||||
15145 | |||||
15146 | /* Skip decoding the entire packet if (tree == NULL) */ | ||||
15147 | if (tree == NULL((void*)0)) { | ||||
15148 | return; | ||||
15149 | } | ||||
15150 | |||||
15151 | offset += 4; | ||||
15152 | |||||
15153 | /* readerEntityId */ | ||||
15154 | rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_rdentity_id, hf_rtps_sm_rdentity_id_key, | ||||
15155 | hf_rtps_sm_rdentity_id_kind, ett_rtps_rdentity, "readerEntityId", NULL((void*)0)); | ||||
15156 | offset += 4; | ||||
15157 | |||||
15158 | /* writerEntityId */ | ||||
15159 | rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key, | ||||
15160 | hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", &wid); | ||||
15161 | offset += 4; | ||||
15162 | guid->entity_id = wid; | ||||
15163 | guid->fields_present |= GUID_HAS_ENTITY_ID0x00000008; | ||||
15164 | rtps_util_add_topic_info(tree, pinfo, tvb, offset, guid); | ||||
15165 | |||||
15166 | /* First available Sequence Number */ | ||||
15167 | rtps_util_add_seq_number(tree, tvb, offset, encoding, "writerSeqNumber"); | ||||
15168 | offset += 8; | ||||
15169 | |||||
15170 | /* Fragment number */ | ||||
15171 | proto_tree_add_item(tree, hf_rtps_heartbeat_frag_number, tvb, offset, 4, encoding); | ||||
15172 | offset += 4; | ||||
15173 | |||||
15174 | /* Counter */ | ||||
15175 | proto_tree_add_item(tree, hf_rtps_heartbeat_frag_count, tvb, offset, 4, encoding); | ||||
15176 | } | ||||
15177 | |||||
15178 | /* *********************************************************************** */ | ||||
15179 | /* * R T P S _ D A T A * */ | ||||
15180 | /* * A N D * */ | ||||
15181 | /* * R T P S _ D A T A _ S E S S I O N * */ | ||||
15182 | /* *********************************************************************** */ | ||||
15183 | static void dissect_RTPS_DATA(tvbuff_t *tvb, packet_info *pinfo, int offset, uint8_t flags, | ||||
15184 | unsigned encoding, int octets_to_next_header, proto_tree *tree, | ||||
15185 | uint16_t vendor_id, bool_Bool is_session, endpoint_guid *guid) { | ||||
15186 | /* | ||||
15187 | * | ||||
15188 | * 0...2...........7...............15.............23...............31 | ||||
15189 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
15190 | * | RTPS_DATA |X|X|X|X|K|D|Q|E| octetsToNextHeader | | ||||
15191 | * +---------------+---------------+---------------+---------------+ | ||||
15192 | * | Flags extraFlags | octetsToInlineQos | | ||||
15193 | * +---------------+---------------+---------------+---------------+ | ||||
15194 | * | EntityId readerEntityId | | ||||
15195 | * +---------------+---------------+---------------+---------------+ | ||||
15196 | * | EntityId writerEntityId | | ||||
15197 | * +---------------+---------------+---------------+---------------+ | ||||
15198 | * | | | ||||
15199 | * + SequenceNumber writerSeqNum + | ||||
15200 | * | | | ||||
15201 | * +---------------+---------------+---------------+---------------+ | ||||
15202 | * | | | ||||
15203 | * ~ ParameterList inlineQos [only if Q==1] ~ | ||||
15204 | * | | | ||||
15205 | * +---------------+---------------+---------------+---------------+ | ||||
15206 | * | | | ||||
15207 | * ~ SerializedData serializedData [only if D==1 || K==1] ~ | ||||
15208 | * | | | ||||
15209 | * +---------------+---------------+---------------+---------------+ | ||||
15210 | * | ||||
15211 | * 0...2...........7...............15.............23...............31 | ||||
15212 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
15213 | * |RTPS_DATA_SESSI|X|X|X|X|K|D|Q|E| octetsToNextHeader | | ||||
15214 | * +---------------+---------------+---------------+---------------+ | ||||
15215 | * | Flags extraFlags | octetsToInlineQos | | ||||
15216 | * +---------------+---------------+---------------+---------------+ | ||||
15217 | * | EntityId readerEntityId | | ||||
15218 | * +---------------+---------------+---------------+---------------+ | ||||
15219 | * | EntityId writerEntityId | | ||||
15220 | * +---------------+---------------+---------------+---------------+ | ||||
15221 | * | | | ||||
15222 | * + SequenceNumber writerSessionSeqNum + | ||||
15223 | * | | | ||||
15224 | * +---------------+---------------+---------------+---------------+ | ||||
15225 | * | | | ||||
15226 | * + SequenceNumber writerVirtualSeqNum + | ||||
15227 | * | | | ||||
15228 | * +---------------+---------------+---------------+---------------+ | ||||
15229 | * | | | ||||
15230 | * ~ ParameterList inlineQos [only if Q==1] ~ | ||||
15231 | * | | | ||||
15232 | * +---------------+---------------+---------------+---------------+ | ||||
15233 | * | | | ||||
15234 | * ~ SerializedData serializedData [only if D==1 || K==1] ~ | ||||
15235 | * | | | ||||
15236 | * +---------------+---------------+---------------+---------------+ | ||||
15237 | */ | ||||
15238 | int min_len; | ||||
15239 | int old_offset = offset; | ||||
15240 | uint32_t writer_wid; /* Writer EntityID */ | ||||
15241 | uint32_t reader_wid = 0; | ||||
15242 | uint32_t status_info = 0xffffffff; | ||||
15243 | bool_Bool from_builtin_writer; | ||||
15244 | proto_item *octet_item; | ||||
15245 | coherent_set_entity_info coherent_set_entity_info_object = {0}; | ||||
15246 | |||||
15247 | proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, RTPS_DATA_FLAGS, flags); | ||||
15248 | |||||
15249 | octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb, | ||||
15250 | offset + 2, 2, encoding); | ||||
15251 | |||||
15252 | /* Calculates the minimum length for this submessage */ | ||||
15253 | min_len = 20; | ||||
15254 | if (is_session) { | ||||
15255 | min_len += 8; | ||||
15256 | bool_Bool* is_data_session_final = wmem_alloc(pinfo->pool, sizeof(bool_Bool)); | ||||
15257 | *is_data_session_final = false0; | ||||
15258 | p_add_proto_data(pinfo->pool, pinfo, proto_rtps, RTPS_DATA_SESSION_FINAL_PROTODATA_KEY2, is_data_session_final); | ||||
15259 | } | ||||
15260 | if ((flags & FLAG_RTPS_DATA_Q(0x02)) != 0) min_len += 4; | ||||
15261 | if ((flags & FLAG_RTPS_DATA_D(0x04)) != 0) min_len += 4; | ||||
15262 | if ((flags & FLAG_RTPS_DATA_K(0x08)) != 0) min_len += 4; | ||||
15263 | |||||
15264 | if (octets_to_next_header < min_len) { | ||||
15265 | expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", min_len); | ||||
15266 | return; | ||||
15267 | } | ||||
15268 | |||||
15269 | offset += 4; | ||||
15270 | |||||
15271 | /* extraFlags */ | ||||
15272 | proto_tree_add_item(tree, hf_rtps_extra_flags, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000); | ||||
15273 | offset += 2; | ||||
15274 | |||||
15275 | /* octetsToInlineQos */ | ||||
15276 | proto_tree_add_item(tree, hf_rtps_octets_to_inline_qos, tvb, offset, 2, encoding); | ||||
15277 | offset += 2; | ||||
15278 | |||||
15279 | /* readerEntityId */ | ||||
15280 | rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_rdentity_id, hf_rtps_sm_rdentity_id_key, | ||||
15281 | hf_rtps_sm_rdentity_id_kind, ett_rtps_rdentity, "readerEntityId", &reader_wid); | ||||
15282 | offset += 4; | ||||
15283 | |||||
15284 | /* writerEntityId */ | ||||
15285 | rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key, | ||||
15286 | hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", &writer_wid); | ||||
15287 | offset += 4; | ||||
15288 | guid->entity_id = writer_wid; | ||||
15289 | guid->fields_present |= GUID_HAS_ENTITY_ID0x00000008; | ||||
15290 | rtps_util_add_topic_info(tree, pinfo, tvb, offset, guid); | ||||
15291 | |||||
15292 | /* Sequence number */ | ||||
15293 | if (is_session) { | ||||
15294 | rtps_util_add_seq_number(tree, tvb, offset, encoding, "writerSessionSeqNumber"); | ||||
15295 | offset += 8; | ||||
15296 | |||||
15297 | rtps_util_add_seq_number(tree, tvb, offset, encoding, "writerVirtualSeqNumber"); | ||||
15298 | offset += 8; | ||||
15299 | } else { | ||||
15300 | coherent_set_entity_info_object.writer_seq_number = rtps_util_add_seq_number(tree, tvb, offset, | ||||
15301 | encoding, "writerSeqNumber"); | ||||
15302 | coherent_set_entity_info_object.guid = *guid; | ||||
15303 | offset += 8; | ||||
15304 | } | ||||
15305 | |||||
15306 | /* InlineQos */ | ||||
15307 | if ((flags & FLAG_RTPS_DATA_Q(0x02)) != 0) { | ||||
15308 | bool_Bool is_inline_qos = true1; | ||||
15309 | offset = dissect_parameter_sequence(tree, pinfo, tvb, offset, encoding, | ||||
15310 | octets_to_next_header - (offset - old_offset) + 4, | ||||
15311 | "inlineQos", 0x0200, &status_info, vendor_id, is_inline_qos, &coherent_set_entity_info_object); | ||||
15312 | } | ||||
15313 | |||||
15314 | /* SerializedData */ | ||||
15315 | if (((flags & FLAG_RTPS_DATA_D(0x04)) != 0) || ((flags & FLAG_RTPS_DATA_K(0x08)) != 0)) { | ||||
15316 | if (writer_wid == ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_WRITER(0x000200c2)) { | ||||
15317 | /* Dissect the serialized data as ParticipantMessageData: | ||||
15318 | * struct ParticipantMessageData { | ||||
15319 | * KeyHashPrefix_t participantGuidPrefix; | ||||
15320 | * KeyHashSuffix_t kind; | ||||
15321 | * sequence<octet> data; | ||||
15322 | * } | ||||
15323 | */ | ||||
15324 | proto_tree *rtps_pm_tree; | ||||
15325 | proto_tree *guid_tree; | ||||
15326 | uint32_t kind; | ||||
15327 | uint32_t encapsulation_id, encapsulation_len; | ||||
15328 | proto_item *ti; | ||||
15329 | rtps_pm_tree = proto_tree_add_subtree(tree, tvb, offset, | ||||
15330 | octets_to_next_header - (offset - old_offset) + 4, | ||||
15331 | ett_rtps_part_message_data, &ti, "ParticipantMessageData"); | ||||
15332 | |||||
15333 | /* Encapsulation ID */ | ||||
15334 | proto_tree_add_item_ret_uint(rtps_pm_tree, hf_rtps_param_serialize_encap_kind, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &encapsulation_id); | ||||
15335 | offset += 2; | ||||
15336 | |||||
15337 | encoding = get_encapsulation_endianness(encapsulation_id); | ||||
15338 | |||||
15339 | /* Encapsulation length (or option) */ | ||||
15340 | proto_tree_add_item_ret_uint(rtps_pm_tree, hf_rtps_param_serialize_encap_len, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &encapsulation_len); | ||||
15341 | offset += 2; | ||||
15342 | |||||
15343 | guid_tree = proto_item_add_subtree(ti, ett_rtps_part_message_data); | ||||
15344 | |||||
15345 | rtps_util_add_guid_prefix_v2(guid_tree, tvb, offset, hf_rtps_sm_guid_prefix, hf_rtps_sm_host_id, | ||||
15346 | hf_rtps_sm_app_id, hf_rtps_sm_instance_id, 0); | ||||
15347 | offset += 12; | ||||
15348 | |||||
15349 | /* Kind */ | ||||
15350 | proto_tree_add_item_ret_uint(guid_tree, hf_rtps_encapsulation_kind, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000, &kind); | ||||
15351 | offset += 4; | ||||
15352 | |||||
15353 | rtps_util_add_seq_octets(rtps_pm_tree, pinfo, tvb, offset, encoding, | ||||
15354 | octets_to_next_header - (offset - old_offset) + 4, hf_rtps_data_serialize_data); | ||||
15355 | |||||
15356 | } else if (writer_wid == ENTITYID_P2P_BUILTIN_PARTICIPANT_STATELESS_WRITER(0x000201c3) || writer_wid == ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_WRITER(0xff0202c3)) { | ||||
15357 | /* PGM stands for Participant Generic Message */ | ||||
15358 | proto_tree * rtps_pgm_tree, * guid_tree, * message_identity_tree; | ||||
15359 | proto_item *ti; | ||||
15360 | uint32_t encapsulation_id, encapsulation_opt; | ||||
15361 | int32_t alignment_zero; | ||||
15362 | uint64_t sequence_number; | ||||
15363 | |||||
15364 | ti = proto_tree_add_boolean_format(tree, hf_rtps_pgm, tvb, offset, | ||||
15365 | octets_to_next_header - (offset - old_offset) + 4, true1, "Participant Generic Message"); | ||||
15366 | rtps_pgm_tree = proto_item_add_subtree(ti, ett_rtps_pgm_data); | ||||
15367 | |||||
15368 | proto_tree_add_item_ret_uint(rtps_pgm_tree, hf_rtps_param_serialize_encap_kind, | ||||
15369 | tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &encapsulation_id); | ||||
15370 | encoding = get_encapsulation_endianness(encapsulation_id); | ||||
15371 | |||||
15372 | offset += 2; | ||||
15373 | proto_tree_add_item_ret_uint(rtps_pgm_tree, hf_rtps_param_serialize_encap_len, | ||||
15374 | tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &encapsulation_opt); | ||||
15375 | |||||
15376 | offset += 2; | ||||
15377 | alignment_zero = offset; | ||||
15378 | /* Message Identity */ | ||||
15379 | message_identity_tree = proto_tree_add_subtree(rtps_pgm_tree, tvb, offset, | ||||
15380 | 24 , ett_rtps_message_identity, &ti, "Message Identity"); | ||||
15381 | |||||
15382 | guid_tree = proto_item_add_subtree(ti, ett_rtps_message_identity); | ||||
15383 | proto_item_append_text(guid_tree, " ("); | ||||
15384 | rtps_util_add_generic_guid_v2(guid_tree, tvb, offset, | ||||
15385 | hf_rtps_message_identity_source_guid, hf_rtps_param_host_id, hf_rtps_param_app_id, | ||||
15386 | hf_rtps_param_instance_id, hf_rtps_param_entity, hf_rtps_param_entity_key, | ||||
15387 | hf_rtps_param_entity_kind, guid_tree); | ||||
15388 | offset += 16; | ||||
15389 | |||||
15390 | proto_tree_add_item(message_identity_tree, hf_rtps_sm_seq_number, tvb, offset, 8, encoding); | ||||
15391 | |||||
15392 | /* This snippet shows the sequence number in the parent tree */ | ||||
15393 | sequence_number = tvb_get_uint64(tvb, offset, encoding); | ||||
15394 | proto_item_append_text(guid_tree, ", sn: %" PRIu64"l" "u" ")", | ||||
15395 | sequence_number); | ||||
15396 | offset += 8; | ||||
15397 | |||||
15398 | /* Related Message Identity */ | ||||
15399 | message_identity_tree = proto_tree_add_subtree(rtps_pgm_tree, tvb, offset, | ||||
15400 | 24 , ett_rtps_related_message_identity, &ti, "Related Message Identity"); | ||||
15401 | |||||
15402 | guid_tree = proto_item_add_subtree(ti, ett_rtps_related_message_identity); | ||||
15403 | proto_item_append_text(guid_tree, " ("); | ||||
15404 | rtps_util_add_generic_guid_v2(guid_tree, tvb, offset, | ||||
15405 | hf_rtps_message_identity_source_guid, hf_rtps_param_host_id, hf_rtps_param_app_id, | ||||
15406 | hf_rtps_param_instance_id, hf_rtps_param_entity, hf_rtps_param_entity_key, | ||||
15407 | hf_rtps_param_entity_kind, guid_tree); | ||||
15408 | offset += 16; | ||||
15409 | |||||
15410 | proto_tree_add_item(message_identity_tree, hf_rtps_sm_seq_number, tvb, | ||||
15411 | offset, 8, encoding); | ||||
15412 | |||||
15413 | /* This snippet shows the sequence number in the parent tree */ | ||||
15414 | sequence_number = tvb_get_uint64(tvb, offset, encoding); | ||||
15415 | proto_item_append_text(guid_tree, ", sn: %" PRIu64"l" "u" ")", | ||||
15416 | sequence_number); | ||||
15417 | offset += 8; | ||||
15418 | |||||
15419 | guid_tree = proto_item_add_subtree(rtps_pgm_tree, ett_rtps_pgm_data); | ||||
15420 | rtps_util_add_generic_guid_v2(guid_tree, tvb, offset, | ||||
15421 | hf_rtps_pgm_dst_participant_guid, hf_rtps_param_host_id, hf_rtps_param_app_id, | ||||
15422 | hf_rtps_param_instance_id, hf_rtps_param_entity, hf_rtps_param_entity_key, | ||||
15423 | hf_rtps_param_entity_kind, NULL((void*)0)); | ||||
15424 | offset += 16; | ||||
15425 | |||||
15426 | guid_tree = proto_item_add_subtree(rtps_pgm_tree, ett_rtps_pgm_data); | ||||
15427 | rtps_util_add_generic_guid_v2(guid_tree, tvb, offset, | ||||
15428 | hf_rtps_pgm_dst_endpoint_guid, hf_rtps_param_host_id, hf_rtps_param_app_id, | ||||
15429 | hf_rtps_param_instance_id, hf_rtps_param_entity, hf_rtps_param_entity_key, | ||||
15430 | hf_rtps_param_entity_kind, NULL((void*)0)); | ||||
15431 | offset += 16; | ||||
15432 | |||||
15433 | guid_tree = proto_item_add_subtree(rtps_pgm_tree, ett_rtps_pgm_data); | ||||
15434 | rtps_util_add_generic_guid_v2(guid_tree, tvb, offset, | ||||
15435 | hf_rtps_pgm_src_endpoint_guid, hf_rtps_param_host_id, hf_rtps_param_app_id, | ||||
15436 | hf_rtps_param_instance_id, hf_rtps_param_entity, hf_rtps_param_entity_key, | ||||
15437 | hf_rtps_param_entity_kind, NULL((void*)0)); | ||||
15438 | offset += 16; | ||||
15439 | |||||
15440 | offset = rtps_util_add_string(rtps_pgm_tree, tvb, offset, hf_rtps_pgm_message_class_id, encoding); | ||||
15441 | |||||
15442 | rtps_util_add_data_holder_seq(rtps_pgm_tree, tvb, pinfo, offset, | ||||
15443 | encoding, alignment_zero); | ||||
15444 | } else if (writer_wid == ENTITYID_RTI_BUILTIN_LOCATOR_PING_WRITER(0x00020182)) { | ||||
15445 | proto_tree * locator_ping_tree, *guid_tree; | ||||
15446 | proto_item *ti; | ||||
15447 | uint32_t encapsulation_id, encapsulation_opt; | ||||
15448 | |||||
15449 | locator_ping_tree = proto_tree_add_subtree(tree, tvb, offset, | ||||
15450 | octets_to_next_header - (offset - old_offset) + 4, | ||||
15451 | ett_rtps_locator_ping_tree, &ti, "Locator Ping Message"); | ||||
15452 | |||||
15453 | /* Encapsulation Id */ | ||||
15454 | proto_tree_add_item_ret_uint(locator_ping_tree, hf_rtps_encapsulation_id, | ||||
15455 | tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &encapsulation_id); | ||||
15456 | offset += 2; | ||||
15457 | encoding = get_encapsulation_endianness(encapsulation_id); | ||||
15458 | |||||
15459 | /* Encapsulation length (or option) */ | ||||
15460 | proto_tree_add_item_ret_uint(locator_ping_tree, hf_rtps_encapsulation_options, | ||||
15461 | tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &encapsulation_opt); | ||||
15462 | offset += 2; | ||||
15463 | |||||
15464 | guid_tree = proto_item_add_subtree(ti, ett_rtps_generic_guid); | ||||
15465 | rtps_util_add_generic_guid_v2(guid_tree, tvb, offset, | ||||
15466 | hf_rtps_source_participant_guid, hf_rtps_param_host_id, hf_rtps_param_app_id, | ||||
15467 | hf_rtps_param_instance_id, hf_rtps_param_entity, hf_rtps_param_entity_key, | ||||
15468 | hf_rtps_param_entity_kind, NULL((void*)0)); | ||||
15469 | offset += 16; | ||||
15470 | rtps_util_add_locator_t(locator_ping_tree, pinfo, tvb, offset, encoding, | ||||
15471 | "Destination Locator"); | ||||
15472 | |||||
15473 | } else if (writer_wid == ENTITYID_RTI_BUILTIN_SERVICE_REQUEST_WRITER(0x00020082)) { | ||||
15474 | /* | ||||
15475 | struct ServiceRequest { | ||||
15476 | long service_id; //@key | ||||
15477 | GUID_t instance_id; //@key | ||||
15478 | sequence<octet> request_body; | ||||
15479 | }; //@Extensibility EXTENSIBLE_EXTENSIBILITY | ||||
15480 | */ | ||||
15481 | proto_tree * service_request_tree, * guid_tree; | ||||
15482 | proto_item *ti; | ||||
15483 | uint32_t encapsulation_id, encapsulation_opt; | ||||
15484 | int32_t service_id; | ||||
15485 | |||||
15486 | ti = proto_tree_add_boolean_format(tree, hf_rtps_srm, tvb, offset, | ||||
15487 | octets_to_next_header - (offset - old_offset) + 4, | ||||
15488 | true1, "Service Request Message"); | ||||
15489 | service_request_tree = proto_item_add_subtree(ti, ett_rtps_service_request_tree); | ||||
15490 | |||||
15491 | /* Encapsulation Id */ | ||||
15492 | proto_tree_add_item_ret_uint(service_request_tree, hf_rtps_encapsulation_id, | ||||
15493 | tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &encapsulation_id); | ||||
15494 | offset += 2; | ||||
15495 | encoding = get_encapsulation_endianness(encapsulation_id); | ||||
15496 | /* Encapsulation length (or option) */ | ||||
15497 | proto_tree_add_item_ret_uint(service_request_tree, hf_rtps_encapsulation_options, tvb, | ||||
15498 | offset, 2, ENC_BIG_ENDIAN0x00000000, &encapsulation_opt); | ||||
15499 | offset += 2; | ||||
15500 | |||||
15501 | proto_tree_add_item_ret_int(service_request_tree, hf_rtps_srm_service_id, tvb, | ||||
15502 | offset, 4, encoding, &service_id); | ||||
15503 | offset += 4; | ||||
15504 | guid_tree = proto_item_add_subtree(ti, ett_rtps_generic_guid); | ||||
15505 | rtps_util_add_generic_guid_v2(guid_tree, tvb, offset, | ||||
15506 | hf_rtps_srm_instance_id, hf_rtps_param_host_id, hf_rtps_param_app_id, | ||||
15507 | hf_rtps_param_instance_id, hf_rtps_param_entity, hf_rtps_param_entity_key, | ||||
15508 | hf_rtps_param_entity_kind, NULL((void*)0)); | ||||
15509 | offset += 16; | ||||
15510 | rtps_util_add_rti_service_request(service_request_tree, pinfo, tvb, offset, | ||||
15511 | encoding, service_id); | ||||
15512 | |||||
15513 | } else { | ||||
15514 | const char *label; | ||||
15515 | if (((flags & FLAG_RTPS_DATA_D(0x04)) != 0) || ((flags & FLAG_RTPS_DATA_K(0x08)) == 0)) { | ||||
15516 | label = "serializedData"; | ||||
15517 | } else if (((flags & FLAG_RTPS_DATA_D(0x04)) == 0) || ((flags & FLAG_RTPS_DATA_K(0x08)) != 0)) { | ||||
15518 | label = "serializedKey"; | ||||
15519 | } else { | ||||
15520 | /* D==1 && K==1 */ | ||||
15521 | label = "<invalid or unknown data type>"; | ||||
15522 | } | ||||
15523 | |||||
15524 | from_builtin_writer = (((writer_wid & ENTITYKIND_BUILTIN_WRITER_WITH_KEY(0xc2)) == ENTITYKIND_BUILTIN_WRITER_WITH_KEY(0xc2)) | ||||
15525 | || ((writer_wid & ENTITYKIND_BUILTIN_WRITER_NO_KEY(0xc3)) == ENTITYKIND_BUILTIN_WRITER_NO_KEY(0xc3)) | ||||
15526 | || (writer_wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_BOOTSTRAP_WRITER(0x00010082)) | ||||
15527 | || (writer_wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_WRITER(0x00010182))) | ||||
15528 | || (writer_wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_WRITER(0xff010182)) | ||||
15529 | || (writer_wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_READER(0xff010187)) ? true1 : false0; | ||||
15530 | /* At the end still dissect the rest of the bytes as raw data */ | ||||
15531 | dissect_serialized_data(tree, pinfo, tvb, offset, | ||||
15532 | octets_to_next_header - (offset - old_offset) + 4, | ||||
15533 | label, vendor_id, from_builtin_writer, guid, NOT_A_FRAGMENT(-1)); | ||||
15534 | } | ||||
15535 | } | ||||
15536 | rtps_util_detect_coherent_set_end_empty_data_case(&coherent_set_entity_info_object); | ||||
15537 | generate_status_info(pinfo, writer_wid, status_info); | ||||
15538 | } | ||||
15539 | |||||
15540 | static void dissect_RTPS_DATA_SESSION(tvbuff_t* tvb, packet_info* pinfo, int offset, uint8_t flags, | ||||
15541 | unsigned encoding, int octets_to_next_header, proto_tree* tree, | ||||
15542 | uint16_t vendor_id, endpoint_guid* guid) { | ||||
15543 | bool_Bool is_data_session_intermediate = false0; | ||||
15544 | proto_item* ti = NULL((void*)0); | ||||
15545 | |||||
15546 | p_set_proto_data(pinfo->pool, pinfo, proto_rtps, RTPS_DATA_SESSION_FINAL_PROTODATA_KEY2, &is_data_session_intermediate); | ||||
15547 | dissect_RTPS_DATA(tvb, pinfo, offset, flags, encoding, octets_to_next_header, | ||||
15548 | tree, vendor_id, true1, guid); | ||||
15549 | ti = proto_tree_add_boolean(tree, hf_rtps_data_session_intermediate, tvb, offset, 0, is_data_session_intermediate); | ||||
15550 | proto_item_set_generated(ti); | ||||
15551 | } | ||||
15552 | |||||
15553 | /* *********************************************************************** */ | ||||
15554 | /* * R T P S _ D A T A _ F R A G _ [SESSION] * */ | ||||
15555 | /* *********************************************************************** */ | ||||
15556 | static void dissect_RTPS_DATA_FRAG_kind(tvbuff_t *tvb, packet_info *pinfo, int offset, uint8_t flags, | ||||
15557 | const unsigned encoding, int octets_to_next_header, proto_tree *tree, | ||||
15558 | uint16_t vendor_id, bool_Bool is_session, endpoint_guid *guid) { | ||||
15559 | /* | ||||
15560 | * There are two kinds of DATA_FRAG, RTPS_DATA_FRAG and RTPS_DATA_FRAG_SESSION | ||||
15561 | * the only difference is that RTPS_DATA_FRAG_SESSION has an extra sequence number after | ||||
15562 | * writerSeqNum. | ||||
15563 | * | ||||
15564 | * RTPS_DATA_FRAG: | ||||
15565 | * 0...2...........7...............15.............23...............31 | ||||
15566 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
15567 | * |RTPS_DATA_FRAG |X|X|X|X|X|K|Q|E| octetsToNextHeader | | ||||
15568 | * +---------------+---------------+---------------+---------------+ | ||||
15569 | * | Flags extraFlags | octetsToInlineQos | | ||||
15570 | * +---------------+---------------+---------------+---------------+ | ||||
15571 | * | EntityId readerEntityId | | ||||
15572 | * +---------------+---------------+---------------+---------------+ | ||||
15573 | * | EntityId writerEntityId | | ||||
15574 | * +---------------+---------------+---------------+---------------+ | ||||
15575 | * | | | ||||
15576 | * + SequenceNumber writerSeqNum + | ||||
15577 | * | | | ||||
15578 | * +---------------+---------------+---------------+---------------+ | ||||
15579 | * | FragmentNumber fragmentStartingNum | | ||||
15580 | * +---------------+---------------+---------------+---------------+ | ||||
15581 | * | ushort fragmentsInSubmessage | ushort fragmentSize | | ||||
15582 | * +---------------+---------------+---------------+---------------+ | ||||
15583 | * | unsigned long sampleSize | | ||||
15584 | * +---------------+---------------+---------------+---------------+ | ||||
15585 | * | | | ||||
15586 | * ~ ParameterList inlineQos [only if Q==1] ~ | ||||
15587 | * | | | ||||
15588 | * +---------------+---------------+---------------+---------------+ | ||||
15589 | * | | | ||||
15590 | * ~ SerializedData serializedData ~ | ||||
15591 | * | | | ||||
15592 | * +---------------+---------------+---------------+---------------+ | ||||
15593 | * | ||||
15594 | * | ||||
15595 | * RTPS_DATA_FRAG_SESSION: | ||||
15596 | * 0...2...........7...............15.............23...............31 | ||||
15597 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
15598 | * |RTPS.._SESSION |X|X|X|X|X|K|Q|E| octetsToNextHeader | | ||||
15599 | * +---------------+---------------+---------------+---------------+ | ||||
15600 | * | Flags extraFlags | octetsToInlineQos | | ||||
15601 | * +---------------+---------------+---------------+---------------+ | ||||
15602 | * | EntityId readerEntityId | | ||||
15603 | * +---------------+---------------+---------------+---------------+ | ||||
15604 | * | EntityId writerEntityId | | ||||
15605 | * +---------------+---------------+---------------+---------------+ | ||||
15606 | * | | | ||||
15607 | * + SequenceNumber writerSeqNum + | ||||
15608 | * | | | ||||
15609 | * +---------------+---------------+---------------+---------------+ | ||||
15610 | * | | | ||||
15611 | * + SequenceNumber virtualSeqNum + | ||||
15612 | * | | | ||||
15613 | * +---------------+---------------+---------------+---------------+ | ||||
15614 | * | FragmentNumber fragmentStartingNum | | ||||
15615 | * +---------------+---------------+---------------+---------------+ | ||||
15616 | * | ushort fragmentsInSubmessage | ushort fragmentSize | | ||||
15617 | * +---------------+---------------+---------------+---------------+ | ||||
15618 | * | unsigned long sampleSize | | ||||
15619 | * +---------------+---------------+---------------+---------------+ | ||||
15620 | * | | | ||||
15621 | * ~ ParameterList inlineQos [only if Q==1] ~ | ||||
15622 | * | | | ||||
15623 | * +---------------+---------------+---------------+---------------+ | ||||
15624 | * | | | ||||
15625 | * ~ SerializedData serializedData ~ | ||||
15626 | * | | | ||||
15627 | * +---------------+---------------+---------------+---------------+ | ||||
15628 | |||||
15629 | |||||
15630 | */ | ||||
15631 | int min_len; | ||||
15632 | int old_offset = offset; | ||||
15633 | uint64_t sample_seq_number = 0; | ||||
15634 | uint32_t frag_number = 0, frag_size = 0, sample_size = 0, num_frags = 0; | ||||
15635 | uint32_t wid; /* Writer EntityID */ | ||||
15636 | bool_Bool from_builtin_writer; | ||||
15637 | uint32_t status_info = 0xffffffff; | ||||
15638 | proto_item *octet_item; | ||||
15639 | coherent_set_entity_info coherent_set_entity_info_object = {0}; | ||||
15640 | |||||
15641 | proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, RTPS_DATA_FRAG_FLAGS, flags); | ||||
15642 | |||||
15643 | octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb, | ||||
15644 | offset + 2, 2, encoding); | ||||
15645 | |||||
15646 | /* Calculates the minimum length for this submessage | ||||
15647 | * RTPS_DATA_FRAG_SESSION len = RTPS_DATA_FRAG len + 8 (extra virtualSequenceNum field). | ||||
15648 | */ | ||||
15649 | min_len = (is_session) | ||||
15650 | ? 44 | ||||
15651 | : 36; | ||||
15652 | if ((flags & FLAG_RTPS_DATA_FRAG_Q(0x02)) != 0) min_len += 4; | ||||
15653 | |||||
15654 | if (octets_to_next_header < min_len) { | ||||
15655 | expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", min_len); | ||||
15656 | return; | ||||
15657 | } | ||||
15658 | |||||
15659 | offset += 4; | ||||
15660 | |||||
15661 | /* extraFlags */ | ||||
15662 | proto_tree_add_item(tree, hf_rtps_extra_flags, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000); | ||||
15663 | offset += 2; | ||||
15664 | |||||
15665 | /* octetsToInlineQos */ | ||||
15666 | proto_tree_add_item(tree, hf_rtps_octets_to_inline_qos, tvb, offset, 2, encoding); | ||||
15667 | offset += 2; | ||||
15668 | |||||
15669 | /* readerEntityId */ | ||||
15670 | rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_rdentity_id, hf_rtps_sm_rdentity_id_key, | ||||
15671 | hf_rtps_sm_rdentity_id_kind, ett_rtps_rdentity, "readerEntityId", NULL((void*)0)); | ||||
15672 | offset += 4; | ||||
15673 | |||||
15674 | /* writerEntityId */ | ||||
15675 | rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key, | ||||
15676 | hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", &wid); | ||||
15677 | offset += 4; | ||||
15678 | guid->entity_id = wid; | ||||
15679 | guid->fields_present |= GUID_HAS_ENTITY_ID0x00000008; | ||||
15680 | rtps_util_add_topic_info(tree, pinfo, tvb, offset, guid); | ||||
15681 | |||||
15682 | |||||
15683 | /* Sequence number */ | ||||
15684 | coherent_set_entity_info_object.writer_seq_number = rtps_util_add_seq_number(tree, tvb, offset, | ||||
15685 | encoding, "writerSeqNumber"); | ||||
15686 | coherent_set_entity_info_object.guid = *guid; | ||||
15687 | offset += 8; | ||||
15688 | |||||
15689 | /* virtual Sequence Number (Only in RTPS_DATA_FRAG_SESSION)*/ | ||||
15690 | if (is_session) { | ||||
15691 | rtps_util_add_seq_number(tree, tvb, offset, encoding, "virtualSeqNumber"); | ||||
15692 | offset += 8; | ||||
15693 | } | ||||
15694 | /* Fragment number */ | ||||
15695 | proto_tree_add_item_ret_uint(tree, hf_rtps_data_frag_number, tvb, offset, 4, encoding, &frag_number); | ||||
15696 | offset += 4; | ||||
15697 | |||||
15698 | /* Fragments in submessage */ | ||||
15699 | proto_tree_add_item_ret_uint(tree, hf_rtps_data_frag_num_fragments, tvb, offset, 2, encoding, &num_frags); | ||||
15700 | offset += 2; | ||||
15701 | |||||
15702 | /* Fragment size */ | ||||
15703 | proto_tree_add_item_ret_uint(tree, hf_rtps_data_frag_size, tvb, offset, 2, encoding, &frag_size); | ||||
15704 | if (frag_size == 0) { | ||||
15705 | // A zero fragment size means we don't advance our offset in loops, so | ||||
15706 | // treat that as invalid. | ||||
15707 | proto_tree_add_expert_format(tree, pinfo, &ei_rtps_invalid_fragment_size, tvb, offset, 2, | ||||
15708 | "Invalid fragment size: %u", frag_size); | ||||
15709 | } | ||||
15710 | offset += 2; | ||||
15711 | |||||
15712 | /* sampleSize */ | ||||
15713 | proto_tree_add_item_ret_uint(tree, hf_rtps_data_frag_sample_size, tvb, offset, 4, encoding, &sample_size); | ||||
15714 | offset += 4; | ||||
15715 | |||||
15716 | /* InlineQos */ | ||||
15717 | if ((flags & FLAG_RTPS_DATA_FRAG_Q(0x02)) != 0) { | ||||
15718 | bool_Bool is_inline_qos = true1; | ||||
15719 | offset = dissect_parameter_sequence(tree, pinfo, tvb, offset, encoding, | ||||
15720 | octets_to_next_header - (offset - old_offset) + 4, | ||||
15721 | "inlineQos", 0x0200, &status_info, vendor_id, is_inline_qos, &coherent_set_entity_info_object); | ||||
15722 | } | ||||
15723 | |||||
15724 | /* SerializedData */ | ||||
15725 | if (frag_size > 0) { | ||||
15726 | char label[20]; | ||||
15727 | snprintf(label, 9, "fragment"); | ||||
15728 | if ((flags & FLAG_RTPS_DATA_FRAG_K(0x04)) != 0) { | ||||
15729 | snprintf(label, 14, "serializedKey"); | ||||
15730 | } | ||||
15731 | from_builtin_writer = (((wid & ENTITYKIND_BUILTIN_WRITER_WITH_KEY(0xc2)) == ENTITYKIND_BUILTIN_WRITER_WITH_KEY(0xc2)) | ||||
15732 | || ((wid & ENTITYKIND_BUILTIN_WRITER_NO_KEY(0xc3)) == ENTITYKIND_BUILTIN_WRITER_NO_KEY(0xc3)) | ||||
15733 | || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_BOOTSTRAP_WRITER(0x00010082)) | ||||
15734 | || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_WRITER(0x00010182))) | ||||
15735 | || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_WRITER(0xff010182)) | ||||
15736 | || (wid == ENTITYID_RTI_BUILTIN_PARTICIPANT_CONFIG_SECURE_READER(0xff010187)) ? true1 : false0; | ||||
15737 | |||||
15738 | uint32_t frag_index_in_submessage = 0, this_frag_number = 0, this_frag_size = 0, fragment_offset = 0; | ||||
15739 | bool_Bool more_fragments = false0; | ||||
15740 | if (enable_rtps_reassembly) { | ||||
15741 | tvbuff_t* new_tvb = NULL((void*)0); | ||||
15742 | fragment_head *frag_msg = NULL((void*)0); | ||||
15743 | while(frag_index_in_submessage < num_frags) { | ||||
15744 | this_frag_number = frag_number + frag_index_in_submessage; | ||||
15745 | more_fragments = (this_frag_number * frag_size < sample_size); | ||||
15746 | this_frag_size = more_fragments ? frag_size : (sample_size - ((this_frag_number - 1) * frag_size)); | ||||
15747 | fragment_offset = this_frag_number == 1 ? 0 : (((this_frag_number - 1) * frag_size)); | ||||
15748 | pinfo->fragmented = true1; | ||||
15749 | frag_msg = fragment_add_check(&rtps_reassembly_table, | ||||
15750 | tvb, offset, pinfo, | ||||
15751 | (uint32_t)sample_seq_number, /* ID for fragments belonging together */ | ||||
15752 | (void *)guid, /* make sure only fragments from the same writer are considered for reassembly */ | ||||
15753 | fragment_offset, /* fragment offset */ | ||||
15754 | this_frag_size, /* fragment length */ | ||||
15755 | more_fragments); /* More fragments? */ | ||||
15756 | |||||
15757 | new_tvb = process_reassembled_data(tvb, offset + (frag_index_in_submessage * frag_size), pinfo, | ||||
15758 | "Reassembled sample", frag_msg, &rtps_frag_items, | ||||
15759 | NULL((void*)0), tree); | ||||
15760 | |||||
15761 | if (frag_index_in_submessage == 0) { | ||||
15762 | generate_status_info(pinfo, wid, status_info); | ||||
15763 | if (frag_msg) { /* Reassembled */ | ||||
15764 | col_append_str(pinfo->cinfo, COL_INFO, " [Reassembled]"); | ||||
15765 | } else { /* Not last packet of reassembled Short Message */ | ||||
15766 | col_append_str(pinfo->cinfo, COL_INFO," [RTPS fragment]"); | ||||
15767 | } | ||||
15768 | } | ||||
15769 | |||||
15770 | if (new_tvb) { | ||||
15771 | snprintf(label, 19, "reassembled sample"); | ||||
15772 | dissect_serialized_data(tree, pinfo, new_tvb, 0, | ||||
15773 | sample_size, label, vendor_id, from_builtin_writer, guid, NOT_A_FRAGMENT(-1)); | ||||
15774 | break; | ||||
15775 | } else { | ||||
15776 | snprintf(label, 15, "fragment [%d]", frag_index_in_submessage); | ||||
15777 | dissect_serialized_data(tree, pinfo, tvb, offset + (frag_index_in_submessage * frag_size), | ||||
15778 | this_frag_size, label, vendor_id, from_builtin_writer, NULL((void*)0), this_frag_number); | ||||
15779 | } | ||||
15780 | frag_index_in_submessage++; | ||||
15781 | } | ||||
15782 | } else { | ||||
15783 | while (frag_index_in_submessage < num_frags) { | ||||
15784 | this_frag_number = frag_number + frag_index_in_submessage; | ||||
15785 | more_fragments = (this_frag_number * frag_size < sample_size); | ||||
15786 | this_frag_size = more_fragments ? frag_size : (sample_size - ((this_frag_number - 1) * frag_size)); | ||||
15787 | fragment_offset = frag_index_in_submessage * frag_size; | ||||
15788 | snprintf(label, 20, "fragment [%d]", frag_index_in_submessage); | ||||
15789 | dissect_serialized_data(tree, pinfo, tvb, offset + fragment_offset, | ||||
15790 | this_frag_size, label, vendor_id, from_builtin_writer, NULL((void*)0), this_frag_number); | ||||
15791 | frag_index_in_submessage++; | ||||
15792 | } | ||||
15793 | generate_status_info(pinfo, wid, status_info); | ||||
15794 | } | ||||
15795 | } | ||||
15796 | rtps_util_detect_coherent_set_end_empty_data_case(&coherent_set_entity_info_object); | ||||
15797 | } | ||||
15798 | |||||
15799 | /* *********************************************************************** */ | ||||
15800 | /* * R T P S _ D A T A _ B A T C H * */ | ||||
15801 | /* *********************************************************************** */ | ||||
15802 | static void dissect_RTPS_DATA_BATCH(tvbuff_t *tvb, packet_info *pinfo, int offset, | ||||
15803 | uint8_t flags, const unsigned encoding, int octets_to_next_header, | ||||
15804 | proto_tree *tree, uint16_t vendor_id, endpoint_guid *guid) { | ||||
15805 | /* | ||||
15806 | * | ||||
15807 | * 0...2...........7...............15.............23...............31 | ||||
15808 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
15809 | * |RTPS_DATA_BATCH|X|X|X|X|X|X|Q|E| octetsToNextHeader | | ||||
15810 | * +---------------+---------------+---------------+---------------+ | ||||
15811 | * | Flags extraFlags | octetsToInlineQos | | ||||
15812 | * +---------------+---------------+---------------+---------------+ | ||||
15813 | * | EntityId readerId | | ||||
15814 | * +---------------+---------------+---------------+---------------+ | ||||
15815 | * | EntityId writerId | | ||||
15816 | * +---------------+---------------+---------------+---------------+ | ||||
15817 | * | | | ||||
15818 | * + SequenceNumber batchSN + | ||||
15819 | * | | | ||||
15820 | * +---------------+---------------+---------------+---------------+ | ||||
15821 | * | | | ||||
15822 | * + SequenceNumber firstSampleSN + | ||||
15823 | * | | | ||||
15824 | * +---------------+---------------+---------------+---------------+ | ||||
15825 | * | SequenceNumberOffset offsetToLastSampleSN | | ||||
15826 | * +---------------+---------------+---------------+---------------+ | ||||
15827 | * | unsigned long batchSampleCount | | ||||
15828 | * +---------------+---------------+---------------+---------------+ | ||||
15829 | * | | | ||||
15830 | * ~ ParameterList batchInlineQos [only if Q==1] ~ | ||||
15831 | * | | | ||||
15832 | * +---------------+---------------+---------------+---------------+ | ||||
15833 | * | unsigned long octetsToSLEncapsulationId | | ||||
15834 | * +---------------+---------------+---------------+---------------+ | ||||
15835 | * | | | ||||
15836 | * ~ SampleInfoList sampleInfoList ~ | ||||
15837 | * | | | ||||
15838 | * +---------------+---------------+---------------+---------------+ | ||||
15839 | * | SampleListEncapsulationId | | | ||||
15840 | * +---------------+---------------+---------------+---------------+ | ||||
15841 | * | | | ||||
15842 | * ~ SampleList sampleList ~ | ||||
15843 | * | | | ||||
15844 | * +---------------+---------------+---------------+---------------+ | ||||
15845 | * | ||||
15846 | * | ||||
15847 | * SampleInfo: | ||||
15848 | * 0...............8..............16..............24..............32 | ||||
15849 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
15850 | * |X|X|X|X|X|X|X|X|X|X|K|I|D|O|Q|T| octetsToInlineQoS | | ||||
15851 | * +---------------+---------------+---------------+---------------+ | ||||
15852 | * | unsigned long serializedDataLength | | ||||
15853 | * +---------------+---------------+---------------+---------------+ | ||||
15854 | * | | | ||||
15855 | * + Timestamp timestamp [only if T==1] + | ||||
15856 | * | | | ||||
15857 | * +---------------+---------------+---------------+---------------+ | ||||
15858 | * | SequenceNumberOffset offsetSN [only if O==1] | | ||||
15859 | * +---------------+---------------+---------------+---------------+ | ||||
15860 | * | | | ||||
15861 | * ~ ParameterList sampleInlineQos [only if Q==1] ~ | ||||
15862 | * | | | ||||
15863 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
15864 | * | ||||
15865 | * | ||||
15866 | * Sample: | ||||
15867 | * 0...............8..............16..............24..............32 | ||||
15868 | * +---------------+---------------+---------------+---------------+ | ||||
15869 | * | | | ||||
15870 | * ~ SerializedData serializedData [sampleInfo D==1 || K==1] ~ | ||||
15871 | * | | | ||||
15872 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
15873 | */ | ||||
15874 | |||||
15875 | int min_len; | ||||
15876 | int old_offset = offset; | ||||
15877 | uint32_t wid; /* Writer EntityID */ | ||||
15878 | uint32_t status_info = 0xffffffff; | ||||
15879 | int32_t octetsToSLEncapsulationId; | ||||
15880 | int32_t sampleListOffset; | ||||
15881 | uint16_t encapsulation_id; | ||||
15882 | bool_Bool try_dissection_from_type_object = false0; | ||||
15883 | uint16_t *sample_info_flags = NULL((void*)0); | ||||
15884 | uint32_t *sample_info_length = NULL((void*)0); | ||||
15885 | int32_t sample_info_count = 0, | ||||
15886 | sample_info_max = rtps_max_batch_samples_dissected; | ||||
15887 | proto_item *octet_item; | ||||
15888 | rtps_dissector_data * data = NULL((void*)0); | ||||
15889 | bool_Bool is_compressed = false0; | ||||
15890 | bool_Bool uncompressed_ok = false0; | ||||
15891 | proto_tree *compressed_subtree = NULL((void*)0); | ||||
15892 | tvbuff_t *data_holder_tvb = tvb; | ||||
15893 | tvbuff_t *compressed_tvb = NULL((void*)0); | ||||
15894 | proto_tree *dissected_data_holder_tree = tree; | ||||
15895 | |||||
15896 | |||||
15897 | data = wmem_new(pinfo->pool, rtps_dissector_data)((rtps_dissector_data*)wmem_alloc((pinfo->pool), sizeof(rtps_dissector_data ))); | ||||
15898 | data->encapsulation_id = 0; | ||||
15899 | |||||
15900 | proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, RTPS_DATA_BATCH_FLAGS, flags); | ||||
15901 | |||||
15902 | octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb, | ||||
15903 | offset + 2, 2, encoding); | ||||
15904 | |||||
15905 | /* Calculates the minimum length for this submessage */ | ||||
15906 | min_len = 44; | ||||
15907 | if ((flags & FLAG_RTPS_DATA_BATCH_Q(0x02)) != 0) min_len += 4; | ||||
15908 | |||||
15909 | if (octets_to_next_header < min_len) { | ||||
15910 | expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", min_len); | ||||
15911 | return; | ||||
15912 | } | ||||
15913 | |||||
15914 | offset += 4; | ||||
15915 | |||||
15916 | /* extraFlags */ | ||||
15917 | proto_tree_add_item(tree, hf_rtps_extra_flags, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000); | ||||
15918 | offset += 2; | ||||
15919 | |||||
15920 | /* octetsToInlineQos */ | ||||
15921 | proto_tree_add_item(tree, hf_rtps_octets_to_inline_qos, tvb, offset, 2, encoding); | ||||
15922 | offset += 2; | ||||
15923 | |||||
15924 | |||||
15925 | /* readerEntityId */ | ||||
15926 | rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_rdentity_id, hf_rtps_sm_rdentity_id_key, | ||||
15927 | hf_rtps_sm_rdentity_id_kind, ett_rtps_rdentity, "readerEntityId", NULL((void*)0)); | ||||
15928 | offset += 4; | ||||
15929 | |||||
15930 | /* writerEntityId */ | ||||
15931 | rtps_util_add_entity_id(tree, pinfo, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key, | ||||
15932 | hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", &wid); | ||||
15933 | offset += 4; | ||||
15934 | guid->entity_id = wid; | ||||
15935 | guid->fields_present |= GUID_HAS_ENTITY_ID0x00000008; | ||||
15936 | rtps_util_add_topic_info(tree, pinfo, tvb, offset, guid); | ||||
15937 | |||||
15938 | |||||
15939 | /* Batch sequence number */ | ||||
15940 | rtps_util_add_seq_number(tree, tvb, offset, encoding, "batchSeqNumber"); | ||||
15941 | offset += 8; | ||||
15942 | |||||
15943 | /* First sample sequence number */ | ||||
15944 | rtps_util_add_seq_number(tree, tvb, offset, encoding, "firstSampleSeqNumber"); | ||||
15945 | offset += 8; | ||||
15946 | |||||
15947 | /* offsetToLastSampleSN */ | ||||
15948 | proto_tree_add_item(tree, hf_rtps_data_batch_offset_to_last_sample_sn, tvb, offset, 4, encoding); | ||||
15949 | offset += 4; | ||||
15950 | |||||
15951 | /* batchSampleCount */ | ||||
15952 | proto_tree_add_item(tree, hf_rtps_data_batch_sample_count, tvb, offset, 4, encoding); | ||||
15953 | offset += 4; | ||||
15954 | |||||
15955 | /* Parameter list (if Q==1) */ | ||||
15956 | /* InlineQos */ | ||||
15957 | if ((flags & FLAG_RTPS_DATA_BATCH_Q(0x02)) != 0) { | ||||
15958 | offset = dissect_parameter_sequence(tree, pinfo, tvb, offset, encoding, | ||||
15959 | octets_to_next_header - (offset - old_offset) + 4, | ||||
15960 | "batchInlineQos", 0x0200, &status_info, vendor_id, false0, NULL((void*)0)); | ||||
15961 | } | ||||
15962 | |||||
15963 | /* octetsToSLEncapsulationId */ | ||||
15964 | proto_tree_add_item_ret_uint(tree, hf_rtps_data_batch_octets_to_sl_encap_id, tvb, | ||||
15965 | offset, 4, encoding, &octetsToSLEncapsulationId); | ||||
15966 | offset += 4; | ||||
15967 | sampleListOffset = offset + octetsToSLEncapsulationId; | ||||
15968 | |||||
15969 | |||||
15970 | /* Sample info list */ | ||||
15971 | { | ||||
15972 | proto_item *ti, *list_item; | ||||
15973 | proto_tree *sil_tree; | ||||
15974 | sample_info_count = 0; | ||||
15975 | |||||
15976 | sil_tree = proto_tree_add_subtree(tree, tvb, offset, octetsToSLEncapsulationId, | ||||
15977 | ett_rtps_sample_info_list, &list_item, "Sample Info List"); | ||||
15978 | |||||
15979 | /* Allocate sample_info_flags and sample_info_length | ||||
15980 | * to store a copy of the flags for each sample info */ | ||||
15981 | if (rtps_max_batch_samples_dissected == 0) { | ||||
15982 | sample_info_max = 1024; /* Max size of sampleInfo shown */ | ||||
15983 | } | ||||
15984 | sample_info_flags = (uint16_t *)wmem_alloc(pinfo->pool, sizeof(uint16_t) *sample_info_max); | ||||
15985 | sample_info_length = (uint32_t *)wmem_alloc(pinfo->pool, sizeof(uint32_t) *sample_info_max); | ||||
15986 | |||||
15987 | /* Sample Info List: start decoding the sample info list until the offset | ||||
15988 | * is greater or equal than 'sampleListOffset' */ | ||||
15989 | while (offset < sampleListOffset) { | ||||
15990 | uint16_t flags2; | ||||
15991 | /*uint16_t octetsToInlineQos;*/ | ||||
15992 | int min_length; | ||||
15993 | proto_tree *si_tree; | ||||
15994 | int offset_begin_sampleinfo = offset; | ||||
15995 | |||||
15996 | if (rtps_max_batch_samples_dissected > 0 && (unsigned)sample_info_count >= rtps_max_batch_samples_dissected) { | ||||
15997 | expert_add_info(pinfo, list_item, &ei_rtps_more_samples_available); | ||||
15998 | offset = sampleListOffset; | ||||
15999 | break; | ||||
16000 | } | ||||
16001 | |||||
16002 | si_tree = proto_tree_add_subtree_format(sil_tree, tvb, offset, -1, ett_rtps_sample_info, &ti, "sampleInfo[%d]", sample_info_count); | ||||
16003 | |||||
16004 | flags2 = tvb_get_ntohs(tvb, offset); /* Flags are always big endian */ | ||||
16005 | sample_info_flags[sample_info_count] = flags2; | ||||
16006 | proto_tree_add_bitmask_value(si_tree, tvb, offset, hf_rtps_sm_flags2, ett_rtps_flags, RTPS_SAMPLE_INFO_FLAGS16, flags2); | ||||
16007 | offset += 2; | ||||
16008 | proto_tree_add_item(si_tree, hf_rtps_data_batch_octets_to_inline_qos, tvb, | ||||
16009 | offset, 2, encoding); | ||||
16010 | offset += 2; | ||||
16011 | |||||
16012 | min_length = 4; | ||||
16013 | if ((flags2 & FLAG_SAMPLE_INFO_T(0x01)) != 0) min_len += 8; | ||||
16014 | if ((flags2 & FLAG_SAMPLE_INFO_Q(0x02)) != 0) min_len += 4; | ||||
16015 | if ((flags2 & FLAG_SAMPLE_INFO_O(0x04)) != 0) min_len += 4; | ||||
16016 | |||||
16017 | /* Ensure there are enough bytes to decode */ | ||||
16018 | if (sampleListOffset - offset < min_length) { | ||||
16019 | expert_add_info_format(pinfo, ti, &ei_rtps_parameter_value_invalid, "Error: not enough bytes to dissect sample info"); | ||||
16020 | return; | ||||
16021 | } | ||||
16022 | |||||
16023 | /* Serialized data length */ | ||||
16024 | proto_tree_add_item_ret_uint(si_tree, hf_rtps_data_batch_serialized_data_length, tvb, | ||||
16025 | offset, 4, encoding, &sample_info_length[sample_info_count]); | ||||
16026 | offset += 4; | ||||
16027 | |||||
16028 | /* Timestamp [only if T==1] */ | ||||
16029 | if ((flags2 & FLAG_SAMPLE_INFO_T(0x01)) != 0) { | ||||
16030 | rtps_util_add_timestamp(si_tree, tvb, offset, encoding, hf_rtps_data_batch_timestamp); | ||||
16031 | offset += 8; | ||||
16032 | } | ||||
16033 | |||||
16034 | /* Offset SN [only if O==1] */ | ||||
16035 | if ((flags2 & FLAG_SAMPLE_INFO_O(0x04)) != 0) { | ||||
16036 | proto_tree_add_item(si_tree, hf_rtps_data_batch_offset_sn, tvb, offset, 4, encoding); | ||||
16037 | offset += 4; | ||||
16038 | } | ||||
16039 | |||||
16040 | /* Parameter list [only if Q==1] */ | ||||
16041 | if ((flags2 & FLAG_SAMPLE_INFO_Q(0x02)) != 0) { | ||||
16042 | offset = dissect_parameter_sequence(si_tree, pinfo, tvb, offset, encoding, | ||||
16043 | octets_to_next_header - (offset - old_offset) + 4, | ||||
16044 | "sampleInlineQos", 0x0200, &status_info, vendor_id, false0, NULL((void*)0)); | ||||
16045 | } | ||||
16046 | proto_item_set_len(ti, offset - offset_begin_sampleinfo); | ||||
16047 | sample_info_count++; | ||||
16048 | } /* while (offset < sampleListOffset) */ | ||||
16049 | } | ||||
16050 | |||||
16051 | /* Dissects the encapsulated data heder and uncompress the tvb if it is compressed and | ||||
16052 | it can be uncompressed */ | ||||
16053 | offset = rtps_prepare_encapsulated_data( | ||||
16054 | tree, | ||||
16055 | pinfo, | ||||
16056 | tvb, | ||||
16057 | offset, | ||||
16058 | tvb_reported_length(tvb) - offset, | ||||
16059 | true1, | ||||
16060 | &encapsulation_id, | ||||
16061 | NULL((void*)0), | ||||
16062 | NULL((void*)0), | ||||
16063 | NULL((void*)0), | ||||
16064 | NULL((void*)0), | ||||
16065 | &is_compressed, | ||||
16066 | &uncompressed_ok, | ||||
16067 | &compressed_tvb, | ||||
16068 | &compressed_subtree); | ||||
16069 | data->encapsulation_id = encapsulation_id; | ||||
16070 | if (is_compressed && uncompressed_ok) { | ||||
16071 | data_holder_tvb = compressed_tvb; | ||||
16072 | offset = 0; | ||||
16073 | dissected_data_holder_tree = compressed_subtree; | ||||
16074 | octets_to_next_header = tvb_reported_length(data_holder_tvb); | ||||
16075 | old_offset = 0; | ||||
16076 | } | ||||
16077 | |||||
16078 | /* If it is compressed but not uncompressed don't try to dissect */ | ||||
16079 | if (is_compressed == uncompressed_ok) { | ||||
16080 | /* Now the list of serialized data: | ||||
16081 | * Serialized data is allocated one after another one. | ||||
16082 | * We need to use the data previously stored in the sampleInfo to detect the | ||||
16083 | * kind and size. | ||||
16084 | * - sample_info_flags -> Array of uint16_t holding the flags for this sample info | ||||
16085 | * - sample_info_length -> Array of uint32_t with the size of this sample info | ||||
16086 | * - sample_info_count -> size of the above arrays | ||||
16087 | * This section will NEVER dissect more than 'sample_info_count'. | ||||
16088 | * Note, if there are not enough bytes in the buffer, don't dissect it (this | ||||
16089 | * can happen for example when a DISPOSE message is sent, there are sample | ||||
16090 | * info records, but the payload size is zero for all of them) | ||||
16091 | */ | ||||
16092 | if ((octets_to_next_header - (offset - old_offset) > 0)) { | ||||
16093 | proto_item *ti; | ||||
16094 | proto_tree *sil_tree; | ||||
16095 | int count = 0; | ||||
16096 | |||||
16097 | sil_tree = proto_tree_add_subtree( | ||||
16098 | dissected_data_holder_tree, | ||||
16099 | data_holder_tvb, | ||||
16100 | offset, | ||||
16101 | -1, | ||||
16102 | ett_rtps_sample_batch_list, | ||||
16103 | &ti, | ||||
16104 | "Serialized Sample List"); | ||||
16105 | for (count = 0; count < sample_info_count; ++count) { | ||||
16106 | /* Ensure there are enough bytes in the buffer to dissect the next sample */ | ||||
16107 | if (octets_to_next_header - (offset - old_offset) + 4 < (int)sample_info_length[count]) { | ||||
16108 | expert_add_info_format(pinfo, ti, &ei_rtps_parameter_value_invalid, "Error: not enough bytes to dissect sample"); | ||||
16109 | return; | ||||
16110 | } | ||||
16111 | /* We have enough bytes to dissect the next sample, so we update the rtps_dissector_data | ||||
16112 | * "position in the batch" value and dissect the sample | ||||
16113 | */ | ||||
16114 | data->position_in_batch = count; | ||||
16115 | if (encapsulation_id == ENCAPSULATION_CDR_LE(0x0001) || | ||||
16116 | encapsulation_id == ENCAPSULATION_CDR_BE(0x0000) || | ||||
16117 | encapsulation_id == ENCAPSULATION_CDR2_LE(0x0007) || | ||||
16118 | encapsulation_id == ENCAPSULATION_CDR2_BE(0x0006) || | ||||
16119 | encapsulation_id == ENCAPSULATION_PL_CDR_LE(0x0003) || | ||||
16120 | encapsulation_id == ENCAPSULATION_PL_CDR_BE(0x0002)) { | ||||
16121 | try_dissection_from_type_object = true1; | ||||
16122 | } | ||||
16123 | if ((sample_info_flags[count] & FLAG_SAMPLE_INFO_K(0x20)) != 0) { | ||||
16124 | proto_tree_add_bytes_format(sil_tree, hf_rtps_serialized_key, | ||||
16125 | data_holder_tvb, offset, sample_info_length[count], NULL((void*)0), "serializedKey[%d]", count); | ||||
16126 | } else { | ||||
16127 | if (!rtps_util_try_dissector( | ||||
16128 | sil_tree, pinfo, data_holder_tvb, offset, guid, data, get_encapsulation_endianness(encapsulation_id), get_encapsulation_version(encapsulation_id), try_dissection_from_type_object)) { | ||||
16129 | proto_tree_add_bytes_format(sil_tree, hf_rtps_serialized_data, | ||||
16130 | data_holder_tvb, offset, sample_info_length[count], NULL((void*)0), "serializedData[%d]", count); | ||||
16131 | } | ||||
16132 | } | ||||
16133 | offset += sample_info_length[count]; | ||||
16134 | } | ||||
16135 | } | ||||
16136 | } | ||||
16137 | generate_status_info(pinfo, wid, status_info); | ||||
16138 | } | ||||
16139 | |||||
16140 | /* *********************************************************************** */ | ||||
16141 | /* * G A P * */ | ||||
16142 | /* *********************************************************************** */ | ||||
16143 | static void dissect_GAP(tvbuff_t *tvb, packet_info *pinfo, int offset, | ||||
16144 | uint8_t flags, const unsigned encoding, int octets_to_next_header, | ||||
16145 | proto_tree *tree, endpoint_guid *guid) { | ||||
16146 | /* RTPS 1.0/1.1: | ||||
16147 | * 0...2...........7...............15.............23...............31 | ||||
16148 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
16149 | * | GAP |X|X|X|X|X|X|X|E| octetsToNextHeader | | ||||
16150 | * +---------------+---------------+---------------+---------------+ | ||||
16151 | * | ObjectId readerObjectId | | ||||
16152 | * +---------------+---------------+---------------+---------------+ | ||||
16153 | * | ObjectId writerObjectId | | ||||
16154 | * +---------------+---------------+---------------+---------------+ | ||||
16155 | * | | | ||||
16156 | * + SequenceNumber firstSeqNumber + | ||||
16157 | * | | | ||||
16158 | * +---------------+---------------+---------------+---------------+ | ||||
16159 | * | | | ||||
16160 | * + Bitmap bitmap + | ||||
16161 | * | | | ||||
16162 | * +---------------+---------------+---------------+---------------+ | ||||
16163 | * | ||||
16164 | * RTPS 1.2/2.0 | ||||
16165 | * 0...2...........7...............15.............23...............31 | ||||
16166 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
16167 | * | GAP |X|X|X|X|X|X|F|E| octetsToNextHeader | | ||||
16168 | * +---------------+---------------+---------------+---------------+ | ||||
16169 | * | EntityId readerEntityId | | ||||
16170 | * +---------------+---------------+---------------+---------------+ | ||||
16171 | * | EntityId writerEntityId | | ||||
16172 | * +---------------+---------------+---------------+---------------+ | ||||
16173 | * | | | ||||
16174 | * + SequenceNumber gapStart + | ||||
16175 | * | | | ||||
16176 | * +---------------+---------------+---------------+---------------+ | ||||
16177 | * | | | ||||
16178 | * ~ SequenceNumberSet gapList ~ | ||||
16179 | * | | | ||||
16180 | * +---------------+---------------+---------------+---------------+ | ||||
16181 | */ | ||||
16182 | proto_item *octet_item; | ||||
16183 | uint32_t wid; | ||||
16184 | proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, GAP_FLAGS, flags); | ||||
16185 | |||||
16186 | octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb, | ||||
16187 | offset + 2, 2, encoding); | ||||
16188 | |||||
16189 | if (octets_to_next_header < 24) { | ||||
16190 | expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= 24)"); | ||||
16191 | return; | ||||
16192 | } | ||||
16193 | |||||
16194 | offset += 4; | ||||
16195 | |||||
16196 | /* readerEntityId */ | ||||
16197 | rtps_util_add_entity_id(tree, pinfo, tvb, offset, | ||||
16198 | hf_rtps_sm_rdentity_id, hf_rtps_sm_rdentity_id_key, hf_rtps_sm_rdentity_id_kind, | ||||
16199 | ett_rtps_rdentity, "readerEntityId", NULL((void*)0)); | ||||
16200 | offset += 4; | ||||
16201 | |||||
16202 | /* writerEntityId */ | ||||
16203 | rtps_util_add_entity_id(tree, pinfo, tvb, offset, | ||||
16204 | hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key, hf_rtps_sm_wrentity_id_kind, | ||||
16205 | ett_rtps_wrentity, "writerEntityId", &wid); | ||||
16206 | offset += 4; | ||||
16207 | guid->entity_id = wid; | ||||
16208 | guid->fields_present |= GUID_HAS_ENTITY_ID0x00000008; | ||||
16209 | rtps_util_add_topic_info(tree, pinfo, tvb, offset, guid); | ||||
16210 | |||||
16211 | |||||
16212 | /* First Sequence Number */ | ||||
16213 | rtps_util_add_seq_number(tree, tvb, offset, encoding, "gapStart"); | ||||
16214 | offset += 8; | ||||
16215 | |||||
16216 | /* Bitmap */ | ||||
16217 | rtps_util_add_bitmap(tree, pinfo, tvb, offset, encoding, "gapList", false0); | ||||
16218 | } | ||||
16219 | |||||
16220 | |||||
16221 | /* *********************************************************************** */ | ||||
16222 | /* * I N F O _ T S * */ | ||||
16223 | /* *********************************************************************** */ | ||||
16224 | static void dissect_INFO_TS(tvbuff_t *tvb, packet_info *pinfo, int offset, uint8_t flags, | ||||
16225 | const unsigned encoding, int octets_to_next_header, proto_tree *tree) { | ||||
16226 | /* RTPS 1.0/1.1: | ||||
16227 | * 0...2...........7...............15.............23...............31 | ||||
16228 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
16229 | * | INFO_TS |X|X|X|X|X|X|I|E| octetsToNextHeader | | ||||
16230 | * +---------------+---------------+---------------+---------------+ | ||||
16231 | * | | | ||||
16232 | * + NtpTime ntpTimestamp [only if I==0] + | ||||
16233 | * | | | ||||
16234 | * +---------------+---------------+---------------+---------------+ | ||||
16235 | * | ||||
16236 | * RTPS 1.2/2.0: | ||||
16237 | * 0...2...........7...............15.............23...............31 | ||||
16238 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
16239 | * | INFO_TS |X|X|X|X|X|X|T|E| octetsToNextHeader | | ||||
16240 | * +---------------+---------------+---------------+---------------+ | ||||
16241 | * | | | ||||
16242 | * + Timestamp timestamp [only if T==1] + | ||||
16243 | * | | | ||||
16244 | * +---------------+---------------+---------------+---------------+ | ||||
16245 | */ | ||||
16246 | |||||
16247 | int min_len; | ||||
16248 | proto_item *octet_item; | ||||
16249 | |||||
16250 | proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, INFO_TS_FLAGS, flags); | ||||
16251 | |||||
16252 | octet_item = proto_tree_add_item(tree, | ||||
16253 | hf_rtps_sm_octets_to_next_header, | ||||
16254 | tvb, | ||||
16255 | offset + 2, | ||||
16256 | 2, | ||||
16257 | encoding); | ||||
16258 | |||||
16259 | min_len = 0; | ||||
16260 | if ((flags & FLAG_INFO_TS_T(0x02)) == 0) min_len += 8; | ||||
16261 | |||||
16262 | if (octets_to_next_header != min_len) { | ||||
16263 | expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be == %u)", min_len); | ||||
16264 | return; | ||||
16265 | } | ||||
16266 | |||||
16267 | offset += 4; | ||||
16268 | |||||
16269 | if ((flags & FLAG_INFO_TS_T(0x02)) == 0) { | ||||
16270 | rtps_util_add_timestamp(tree, | ||||
16271 | tvb, | ||||
16272 | offset, | ||||
16273 | encoding, | ||||
16274 | hf_rtps_info_ts_timestamp); | ||||
16275 | } | ||||
16276 | } | ||||
16277 | |||||
16278 | |||||
16279 | /* *********************************************************************** */ | ||||
16280 | /* * I N F O _ S R C * */ | ||||
16281 | /* *********************************************************************** */ | ||||
16282 | static void dissect_INFO_SRC(tvbuff_t *tvb, packet_info *pinfo, int offset, uint8_t flags, | ||||
16283 | const unsigned encoding, int octets_to_next_header, proto_tree *tree, uint16_t rtps_version) { | ||||
16284 | /* RTPS 1.0/1.1: | ||||
16285 | * 0...2...........7...............15.............23...............31 | ||||
16286 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
16287 | * | INFO_SRC |X|X|X|X|X|X|X|E| octetsToNextHeader | | ||||
16288 | * +---------------+---------------+---------------+---------------+ | ||||
16289 | * | IPAddress appIpAddress | | ||||
16290 | * +---------------+---------------+---------------+---------------+ | ||||
16291 | * | ProtocolVersion version | VendorId vendor | | ||||
16292 | * +---------------+---------------+---------------+---------------+ | ||||
16293 | * | HostId hostId | | ||||
16294 | * +---------------+---------------+---------------+---------------+ | ||||
16295 | * | AppId appId | | ||||
16296 | * +---------------+---------------+---------------+---------------+ | ||||
16297 | * | ||||
16298 | * RTPS 1.2/2.0: | ||||
16299 | * 0...2...........7...............15.............23...............31 | ||||
16300 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
16301 | * | INFO_SRC |X|X|X|X|X|X|X|E| octetsToNextHeader | | ||||
16302 | * +---------------+---------------+---------------+---------------+ | ||||
16303 | * | long unused | | ||||
16304 | * +---------------+---------------+---------------+---------------+ | ||||
16305 | * | ProtocolVersion version | VendorId vendor | | ||||
16306 | * +---------------+---------------+---------------+---------------+ | ||||
16307 | * | | | ||||
16308 | * + GuidPrefix guidPrefix + | ||||
16309 | * | | | ||||
16310 | * +---------------+---------------+---------------+---------------+ | ||||
16311 | */ | ||||
16312 | proto_item *octet_item; | ||||
16313 | uint16_t version; | ||||
16314 | |||||
16315 | proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, INFO_SRC_FLAGS, flags); | ||||
16316 | |||||
16317 | octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb, | ||||
16318 | offset + 2, 2, encoding); | ||||
16319 | |||||
16320 | if (rtps_version < 0x0200) { | ||||
16321 | if (octets_to_next_header != 16) { | ||||
16322 | expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be == 16)"); | ||||
16323 | return; | ||||
16324 | } | ||||
16325 | } else { | ||||
16326 | if (octets_to_next_header != 20) { | ||||
16327 | expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be == 20)"); | ||||
16328 | return; | ||||
16329 | } | ||||
16330 | } | ||||
16331 | |||||
16332 | offset += 4; | ||||
16333 | |||||
16334 | /* Use version field to determine what to display */ | ||||
16335 | version = tvb_get_ntohs(tvb, offset+4); | ||||
16336 | if (version < 0x102) { | ||||
16337 | proto_tree_add_item(tree, hf_rtps_info_src_ip, tvb, offset, 4, encoding); | ||||
16338 | } else { | ||||
16339 | proto_tree_add_item(tree, hf_rtps_info_src_unused, tvb, offset, 4, encoding); | ||||
16340 | } | ||||
16341 | |||||
16342 | offset += 4; | ||||
16343 | |||||
16344 | rtps_util_add_protocol_version(tree, tvb, offset); | ||||
16345 | offset += 2; | ||||
16346 | |||||
16347 | /* Vendor ID */ | ||||
16348 | rtps_util_add_vendor_id(tree, tvb, offset); | ||||
16349 | offset += 2; | ||||
16350 | |||||
16351 | if (rtps_version < 0x0200) { | ||||
16352 | rtps_util_add_guid_prefix_v1(tree, pinfo, tvb, offset, | ||||
16353 | hf_rtps_sm_guid_prefix_v1, hf_rtps_sm_host_id, hf_rtps_sm_app_id, | ||||
16354 | hf_rtps_sm_instance_id_v1, hf_rtps_sm_app_kind, | ||||
16355 | NULL((void*)0)); /* Use default 'guidPrefix' */ | ||||
16356 | } else { | ||||
16357 | rtps_util_add_guid_prefix_v2(tree, tvb, offset, hf_rtps_guid_prefix_src, | ||||
16358 | hf_rtps_host_id, hf_rtps_app_id, hf_rtps_sm_instance_id, hf_rtps_guid_prefix); | ||||
16359 | } | ||||
16360 | } | ||||
16361 | |||||
16362 | |||||
16363 | /* *********************************************************************** */ | ||||
16364 | /* * I N F O _ R E P L Y _ I P 4 * */ | ||||
16365 | /* *********************************************************************** */ | ||||
16366 | static void dissect_INFO_REPLY_IP4(tvbuff_t *tvb, packet_info *pinfo, int offset, uint8_t flags, | ||||
16367 | const unsigned encoding, int octets_to_next_header, proto_tree *tree) { | ||||
16368 | /* RTPS 1.0/1.1: | ||||
16369 | * 0...2...........7...............15.............23...............31 | ||||
16370 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
16371 | * | INFO_REPLY |X|X|X|X|X|X|M|E| octetsToNextHeader | | ||||
16372 | * +---------------+---------------+---------------+---------------+ | ||||
16373 | * | IPAddress unicastReplyIpAddress | | ||||
16374 | * +---------------+---------------+---------------+---------------+ | ||||
16375 | * | Port unicastReplyPort | | ||||
16376 | * +---------------+---------------+---------------+---------------+ | ||||
16377 | * | IPAddress multicastReplyIpAddress [ only if M==1 ] | | ||||
16378 | * +---------------+---------------+---------------+---------------+ | ||||
16379 | * | Port multicastReplyPort [ only if M==1 ] | | ||||
16380 | * +---------------+---------------+---------------+---------------+ | ||||
16381 | * | ||||
16382 | * RTPS 1.2/2.0: | ||||
16383 | * 0...2...........7...............15.............23...............31 | ||||
16384 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
16385 | * |INFO_REPLY_IP4 |X|X|X|X|X|X|M|E| octetsToNextHeader | | ||||
16386 | * +---------------+---------------+---------------+---------------+ | ||||
16387 | * | | | ||||
16388 | * + LocatorUDPv4 unicastReplyLocator + | ||||
16389 | * | | | ||||
16390 | * +---------------+---------------+---------------+---------------+ | ||||
16391 | * | | | ||||
16392 | * + LocatorUDPv4 multicastReplyLocator [only if M==1] + | ||||
16393 | * | | | ||||
16394 | * +---------------+---------------+---------------+---------------+ | ||||
16395 | */ | ||||
16396 | int min_len; | ||||
16397 | proto_item *octet_item; | ||||
16398 | |||||
16399 | proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, INFO_REPLY_IP4_FLAGS, flags); | ||||
16400 | |||||
16401 | octet_item = proto_tree_add_item(tree, | ||||
16402 | hf_rtps_sm_octets_to_next_header, | ||||
16403 | tvb, | ||||
16404 | offset + 2, | ||||
16405 | 2, | ||||
16406 | encoding); | ||||
16407 | |||||
16408 | min_len = 8; | ||||
16409 | if ((flags & FLAG_INFO_REPLY_IP4_M(0x02)) != 0) min_len += 8; | ||||
16410 | |||||
16411 | if (octets_to_next_header != min_len) { | ||||
16412 | expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be == %u)", min_len); | ||||
16413 | return; | ||||
16414 | } | ||||
16415 | |||||
16416 | offset += 4; | ||||
16417 | |||||
16418 | |||||
16419 | /* unicastReplyLocator */ | ||||
16420 | rtps_util_add_locator_udp_v4(tree, pinfo, tvb, offset, | ||||
16421 | "unicastReplyLocator", encoding); | ||||
16422 | |||||
16423 | offset += 8; | ||||
16424 | |||||
16425 | /* multicastReplyLocator */ | ||||
16426 | if ((flags & FLAG_INFO_REPLY_IP4_M(0x02)) != 0) { | ||||
16427 | rtps_util_add_locator_udp_v4(tree, pinfo, tvb, offset, | ||||
16428 | "multicastReplyLocator", encoding); | ||||
16429 | /*offset += 8;*/ | ||||
16430 | } | ||||
16431 | } | ||||
16432 | |||||
16433 | /* *********************************************************************** */ | ||||
16434 | /* * I N F O _ D S T * */ | ||||
16435 | /* *********************************************************************** */ | ||||
16436 | static void dissect_INFO_DST(tvbuff_t *tvb, packet_info *pinfo, int offset, uint8_t flags, | ||||
16437 | const unsigned encoding, int octets_to_next_header, proto_tree *tree, | ||||
16438 | uint16_t version, endpoint_guid *dst_guid) { | ||||
16439 | /* RTPS 1.0/1.1: | ||||
16440 | * 0...2...........7...............15.............23...............31 | ||||
16441 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
16442 | * | INFO_DST |X|X|X|X|X|X|X|E| octetsToNextHeader | | ||||
16443 | * +---------------+---------------+---------------+---------------+ | ||||
16444 | * | HostId hostId | | ||||
16445 | * +---------------+---------------+---------------+---------------+ | ||||
16446 | * | AppId appId | | ||||
16447 | * +---------------+---------------+---------------+---------------+ | ||||
16448 | * | ||||
16449 | * RTPS 1.2/2.0: | ||||
16450 | * 0...2...........7...............15.............23...............31 | ||||
16451 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
16452 | * | INFO_DST |X|X|X|X|X|X|X|E| octetsToNextHeader | | ||||
16453 | * +---------------+---------------+---------------+---------------+ | ||||
16454 | * | | | ||||
16455 | * + GuidPrefix guidPrefix + | ||||
16456 | * | | | ||||
16457 | * +---------------+---------------+---------------+---------------+ | ||||
16458 | */ | ||||
16459 | proto_item *octet_item; | ||||
16460 | |||||
16461 | proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, INFO_DST_FLAGS, flags); | ||||
16462 | |||||
16463 | octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb, | ||||
16464 | offset + 2, 2, encoding); | ||||
16465 | |||||
16466 | if (version < 0x0200) { | ||||
16467 | if (octets_to_next_header != 8) { | ||||
16468 | expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be == 8)"); | ||||
16469 | return; | ||||
16470 | } | ||||
16471 | } else { | ||||
16472 | if (octets_to_next_header != 12) { | ||||
16473 | expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be == 12)"); | ||||
16474 | return; | ||||
16475 | } | ||||
16476 | } | ||||
16477 | |||||
16478 | offset += 4; | ||||
16479 | |||||
16480 | if (version < 0x0200) { | ||||
16481 | rtps_util_add_guid_prefix_v1(tree, pinfo, tvb, offset, | ||||
16482 | hf_rtps_sm_guid_prefix_v1, hf_rtps_sm_host_id, hf_rtps_sm_app_id, | ||||
16483 | hf_rtps_sm_instance_id_v1, hf_rtps_sm_app_kind, | ||||
16484 | NULL((void*)0)); | ||||
16485 | } else { | ||||
16486 | rtps_util_add_guid_prefix_v2(tree, tvb, offset, hf_rtps_guid_prefix_dst, | ||||
16487 | hf_rtps_host_id, hf_rtps_app_id, hf_rtps_sm_instance_id, hf_rtps_guid_prefix); | ||||
16488 | |||||
16489 | dst_guid->host_id = tvb_get_ntohl(tvb, offset); | ||||
16490 | dst_guid->app_id = tvb_get_ntohl(tvb, offset + 4); | ||||
16491 | dst_guid->instance_id = tvb_get_ntohl(tvb, offset + 8); | ||||
16492 | dst_guid->fields_present |= GUID_HAS_HOST_ID0x00000001|GUID_HAS_APP_ID0x00000002|GUID_HAS_INSTANCE_ID0x00000004; | ||||
16493 | } | ||||
16494 | } | ||||
16495 | |||||
16496 | /* *********************************************************************** */ | ||||
16497 | /* * I N F O _ R E P L Y * */ | ||||
16498 | /* *********************************************************************** */ | ||||
16499 | static void dissect_INFO_REPLY(tvbuff_t *tvb, packet_info *pinfo, int offset, uint8_t flags, | ||||
16500 | const unsigned encoding, int octets_to_next_header, proto_tree *tree) { | ||||
16501 | /* RTPS 1.0/1.1: | ||||
16502 | * INFO_REPLY is *NOT* the same thing as the old INFO_REPLY. | ||||
16503 | * | ||||
16504 | * RTPS 1.2/2.0: | ||||
16505 | * 0...2...........7...............15.............23...............31 | ||||
16506 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
16507 | * | INFO_REPLY |X|X|X|X|X|X|M|E| octetsToNextHeader | | ||||
16508 | * +---------------+---------------+---------------+---------------+ | ||||
16509 | * | | | ||||
16510 | * ~ LocatorList unicastReplyLocatorList ~ | ||||
16511 | * | | | ||||
16512 | * +---------------+---------------+---------------+---------------+ | ||||
16513 | * | | | ||||
16514 | * ~ LocatorList multicastReplyLocatorList [only if M==1] ~ | ||||
16515 | * | | | ||||
16516 | * +---------------+---------------+---------------+---------------+ | ||||
16517 | */ | ||||
16518 | |||||
16519 | int min_len; | ||||
16520 | proto_item *octet_item; | ||||
16521 | |||||
16522 | proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, INFO_REPLY_FLAGS, flags); | ||||
16523 | |||||
16524 | octet_item = proto_tree_add_item(tree, | ||||
16525 | hf_rtps_sm_octets_to_next_header, | ||||
16526 | tvb, | ||||
16527 | offset + 2, | ||||
16528 | 2, | ||||
16529 | encoding); | ||||
16530 | |||||
16531 | min_len = 4; | ||||
16532 | if ((flags & FLAG_INFO_REPLY_M(0x02)) != 0) min_len += 4; | ||||
16533 | |||||
16534 | if (octets_to_next_header < min_len) { | ||||
16535 | expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", min_len); | ||||
16536 | return; | ||||
16537 | } | ||||
16538 | |||||
16539 | offset += 4; | ||||
16540 | |||||
16541 | /* unicastReplyLocatorList */ | ||||
16542 | offset = rtps_util_add_locator_list(tree, pinfo, tvb, offset, "unicastReplyLocatorList", encoding); | ||||
16543 | |||||
16544 | /* multicastReplyLocatorList */ | ||||
16545 | if ((flags & FLAG_INFO_REPLY_M(0x02)) != 0) { | ||||
16546 | /*offset = */rtps_util_add_locator_list(tree, pinfo, tvb, offset, "multicastReplyLocatorList", encoding); | ||||
16547 | } | ||||
16548 | } | ||||
16549 | |||||
16550 | /* *********************************************************************** */ | ||||
16551 | /* * RTI CRC * */ | ||||
16552 | /* *********************************************************************** */ | ||||
16553 | static void dissect_RTI_CRC(tvbuff_t *tvb, packet_info *pinfo, int offset, uint8_t flags, | ||||
16554 | const unsigned encoding, int octets_to_next_header,proto_tree *tree) { | ||||
16555 | /* | ||||
16556 | * 0...2...........7...............15.............23...............31 | ||||
16557 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
16558 | * | RTI_CRC |X|X|X|X|X|X|X|E| octetsToNextHeader | | ||||
16559 | * +---------------+---------------+---------------+---------------+ | ||||
16560 | * | RTPS Message length (without the 20 bytes header) | | ||||
16561 | * +---------------+---------------+---------------+---------------+ | ||||
16562 | * | CRC32 | | ||||
16563 | * +---------------+---------------+---------------+---------------+ | ||||
16564 | Total 12 bytes */ | ||||
16565 | proto_item *octet_item; | ||||
16566 | |||||
16567 | proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, RTI_CRC_FLAGS, flags); | ||||
16568 | |||||
16569 | octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb, | ||||
16570 | offset + 2, 2, encoding); | ||||
16571 | |||||
16572 | if (octets_to_next_header != 8) { | ||||
16573 | expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be == 8)"); | ||||
16574 | return; | ||||
16575 | } | ||||
16576 | |||||
16577 | offset += 4; | ||||
16578 | proto_tree_add_item(tree, hf_rtps_sm_rti_crc_number, tvb, offset, 4, encoding); | ||||
16579 | |||||
16580 | offset += 4; | ||||
16581 | proto_tree_add_item(tree, hf_rtps_sm_rti_crc_result, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000); | ||||
16582 | } | ||||
16583 | |||||
16584 | /** | ||||
16585 | * @brief Do a forward search for the begining of the tags section in the | ||||
16586 | * SRTPS POSTFIX/SEC POSTFIX submessage. | ||||
16587 | */ | ||||
16588 | static int rtps_util_look_for_secure_tag( | ||||
16589 | tvbuff_t *tvb, | ||||
16590 | int offset) | ||||
16591 | { | ||||
16592 | int submessage_offset = offset; | ||||
16593 | uint8_t submessage_id = 0; | ||||
16594 | int tvb_remaining_len = tvb_reported_length_remaining(tvb, offset); | ||||
16595 | int submessage_len = 0; | ||||
16596 | |||||
16597 | while (tvb_remaining_len > 4) { | ||||
16598 | submessage_id = tvb_get_uint8(tvb, submessage_offset); | ||||
16599 | submessage_len = tvb_get_uint16( | ||||
16600 | tvb, | ||||
16601 | submessage_offset + 2, | ||||
16602 | ENC_LITTLE_ENDIAN0x80000000); | ||||
16603 | tvb_remaining_len -= submessage_len; | ||||
16604 | if (submessage_id == SUBMESSAGE_SRTPS_POSTFIX(0x34) | ||||
16605 | || submessage_id == SUBMESSAGE_SEC_POSTFIX(0x32)) { | ||||
16606 | return submessage_offset + 4; | ||||
16607 | } | ||||
16608 | submessage_offset += submessage_len; | ||||
16609 | tvb_remaining_len -= submessage_len; | ||||
16610 | } | ||||
16611 | return -1; | ||||
16612 | } | ||||
16613 | |||||
16614 | // NOLINTNEXTLINE(misc-no-recursion) | ||||
16615 | static void dissect_SECURE( | ||||
16616 | tvbuff_t *tvb, | ||||
16617 | packet_info *pinfo, | ||||
16618 | int offset, | ||||
16619 | uint8_t flags, | ||||
16620 | const unsigned encoding _U___attribute__((unused)), | ||||
16621 | int octets_to_next_header, | ||||
16622 | proto_tree *tree, | ||||
16623 | uint16_t vendor_id _U___attribute__((unused)), | ||||
16624 | endpoint_guid *guid, | ||||
16625 | bool_Bool dissecting_encrypted_submessage) | ||||
16626 | { | ||||
16627 | /* *********************************************************************** */ | ||||
16628 | /* * SECURE SUBMESSAGE * */ | ||||
16629 | /* *********************************************************************** */ | ||||
16630 | /* 0...2...........7...............15.............23...............31 | ||||
16631 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
16632 | * | SECURE SUBMSG |X|X|X|X|X|X|S|E| octetsToNextHeader | | ||||
16633 | * +---------------+---------------+---------------+---------------+ | ||||
16634 | * | long transformationKind | | ||||
16635 | * +---------------+---------------+---------------+---------------+ | ||||
16636 | * | | | ||||
16637 | * + octet transformationId[8] + | ||||
16638 | * | | | ||||
16639 | * +---------------+---------------+---------------+---------------+ | ||||
16640 | * | | | ||||
16641 | * + octet secure_data[] + | ||||
16642 | * | | | ||||
16643 | * +---------------+---------------+---------------+---------------+ | ||||
16644 | */ | ||||
16645 | proto_tree * payload_tree; | ||||
16646 | unsigned local_encoding; | ||||
16647 | int secure_body_len = 0; | ||||
16648 | rtps_current_packet_decryption_info_t *decryption_info; | ||||
16649 | int initial_offset = offset; | ||||
16650 | |||||
16651 | proto_tree_add_bitmask_value( | ||||
16652 | tree, | ||||
16653 | tvb, | ||||
16654 | offset + 1, | ||||
16655 | hf_rtps_sm_flags, | ||||
16656 | ett_rtps_flags, | ||||
16657 | SECURE_FLAGS, | ||||
16658 | flags); | ||||
16659 | local_encoding = ((flags & FLAG_E(0x01)) != 0) ? ENC_LITTLE_ENDIAN0x80000000 : ENC_BIG_ENDIAN0x00000000; | ||||
16660 | |||||
16661 | proto_tree_add_item( | ||||
16662 | tree, | ||||
16663 | hf_rtps_sm_octets_to_next_header, | ||||
16664 | tvb, | ||||
16665 | offset + 2, | ||||
16666 | 2, | ||||
16667 | local_encoding); | ||||
16668 | offset += 4; | ||||
16669 | |||||
16670 | payload_tree = proto_tree_add_subtree_format( | ||||
16671 | tree, | ||||
16672 | tvb, | ||||
16673 | offset, | ||||
16674 | octets_to_next_header, | ||||
16675 | ett_rtps_secure_payload_tree, | ||||
16676 | NULL((void*)0), | ||||
16677 | "Secured payload"); | ||||
16678 | |||||
16679 | proto_tree_add_item( | ||||
16680 | payload_tree, | ||||
16681 | hf_rtps_secure_secure_data_length, | ||||
16682 | tvb, | ||||
16683 | offset, | ||||
16684 | 4, | ||||
16685 | ENC_BIG_ENDIAN0x00000000); | ||||
16686 | offset += 4; | ||||
16687 | |||||
16688 | secure_body_len = octets_to_next_header - 4; | ||||
16689 | proto_tree_add_item( | ||||
16690 | payload_tree, | ||||
16691 | hf_rtps_secure_secure_data, | ||||
16692 | tvb, | ||||
16693 | offset, | ||||
16694 | octets_to_next_header - 4, | ||||
16695 | local_encoding); | ||||
16696 | |||||
16697 | decryption_info = (rtps_current_packet_decryption_info_t *) | ||||
16698 | p_get_proto_data( | ||||
16699 | pinfo->pool, | ||||
16700 | pinfo, | ||||
16701 | proto_rtps, | ||||
16702 | RTPS_DECRYPTION_INFO_KEY5); | ||||
16703 | |||||
16704 | if (!enable_rtps_psk_decryption | ||||
16705 | || decryption_info == NULL((void*)0) | ||||
16706 | || !decryption_info->try_psk_decryption) { | ||||
16707 | return; | ||||
16708 | } | ||||
16709 | |||||
16710 | if (dissecting_encrypted_submessage) { | ||||
16711 | /* | ||||
16712 | * This should never happen. | ||||
16713 | * If an RTPS message is encrypted with a pre-shared key, then the dissector | ||||
16714 | * will use this function to decrypt the SEC_BODY submessage and attempt to | ||||
16715 | * dissect it by calling dissect_rtps_submessages. The | ||||
16716 | * dissecting_encrypted_submessage parameter makes sure that the recursion | ||||
16717 | * is not infinite. However, this is not really possible because pre-shared | ||||
16718 | * key encryption takes only place at the RTPS message level; there | ||||
16719 | * shouldn't be another pre-shared key encoded SEC_BODY submessage at this | ||||
16720 | * point. Clang complains about the recursion because it doesn't have the | ||||
16721 | * information about the RTPS protocol. We ignore the warning with the | ||||
16722 | * NOLINTNEXTLINE suppression (misc-no-recursion argument) above each | ||||
16723 | * affected function. | ||||
16724 | */ | ||||
16725 | return; | ||||
16726 | } | ||||
16727 | |||||
16728 | for (unsigned entry_idx = 0; entry_idx < rtps_psk_options.size; entry_idx++) { | ||||
16729 | uint8_t *decrypted_data = NULL((void*)0); | ||||
16730 | uint8_t session_key[RTPS_HMAC_256_BUFFER_SIZE_BYTES32]; | ||||
16731 | size_t session_key_len = RTPS_HMAC_256_BUFFER_SIZE_BYTES32; | ||||
16732 | uint8_t *tag = NULL((void*)0); | ||||
16733 | int tag_offset = 0; | ||||
16734 | gcry_error_t error = GPG_ERR_NO_ERROR; | ||||
16735 | /* Iterate all entries in the PSK table of the RTPS protocol options */ | ||||
16736 | rtps_psk_options_entry_t *entry = &rtps_psk_options.entries[entry_idx]; | ||||
16737 | /* Check if each field is equal or the ignore options are enabled */ | ||||
16738 | bool_Bool host_id_mismatch = !entry->host_id.ignore | ||||
16739 | && entry->host_id.value != decryption_info->guid_prefix.host_id; | ||||
16740 | bool_Bool host_app_mismatch = !entry->app_id.ignore | ||||
16741 | && entry->app_id.value != decryption_info->guid_prefix.app_id; | ||||
16742 | bool_Bool host_instance_mismatch = !entry->instance_id.ignore | ||||
16743 | && entry->instance_id.value != decryption_info->guid_prefix.instance_id; | ||||
16744 | bool_Bool psk_index_mismatch = !entry->passphrase_id.ignore | ||||
16745 | && entry->passphrase_id.value != decryption_info->psk_index; | ||||
16746 | |||||
16747 | /* | ||||
16748 | * We proceed to decryption only if host, app and instance ids are equals | ||||
16749 | * (or ignored). | ||||
16750 | */ | ||||
16751 | if (host_id_mismatch | ||||
16752 | || host_app_mismatch | ||||
16753 | || host_instance_mismatch | ||||
16754 | || psk_index_mismatch) { | ||||
16755 | continue; | ||||
16756 | } | ||||
16757 | |||||
16758 | /* | ||||
16759 | * When decrypting with PSKs there is only one tag in the SRTPS POSTFIX/SEC | ||||
16760 | * POSTFIX submessage. The offset is the one until the next submessage. | ||||
16761 | * The 4 constant is the sum of submessage_id(1 byte) | ||||
16762 | * + flags (1 byte) + octects to the next submessage(2 bytes) | ||||
16763 | */ | ||||
16764 | tag_offset = rtps_util_look_for_secure_tag( | ||||
16765 | tvb, | ||||
16766 | initial_offset + octets_to_next_header + 4); | ||||
16767 | if (tag_offset > 0) { | ||||
16768 | tag = tvb_memdup( | ||||
16769 | pinfo->pool, | ||||
16770 | tvb, | ||||
16771 | tag_offset, | ||||
16772 | SECURE_TAG_COMMON_AND_SPECIFIC_MAC_LENGTH16); | ||||
16773 | } | ||||
16774 | |||||
16775 | /* Decrypt the payload */ | ||||
16776 | decrypted_data = rtps_decrypt_secure_payload( | ||||
16777 | session_key, /* output*/ | ||||
16778 | &session_key_len, /* output */ | ||||
16779 | tvb, | ||||
16780 | pinfo, | ||||
16781 | offset, | ||||
16782 | (size_t) secure_body_len, | ||||
16783 | entry->passphrase_secret, | ||||
16784 | decryption_info, | ||||
16785 | tag, | ||||
16786 | &error, | ||||
16787 | pinfo->pool); | ||||
16788 | error = gpg_err_code(error); | ||||
16789 | if (error == GPG_ERR_NO_ERROR) { | ||||
16790 | tvbuff_t *decrypted_tvb = NULL((void*)0); | ||||
16791 | /* | ||||
16792 | * Each byte becomes two hexadecimal characters. | ||||
16793 | * We also add one for the NUL terminator, which we will add manually | ||||
16794 | * because bytes_to_hexstr does not add it. | ||||
16795 | */ | ||||
16796 | char session_key_hexadecimal_representation[ | ||||
16797 | RTPS_HMAC_256_BUFFER_SIZE_BYTES32 * 2 + 1]; | ||||
16798 | char *session_key_nul_terminator_ptr = NULL((void*)0); | ||||
16799 | rtps_guid_prefix_t guid_backup = decryption_info->guid_prefix; | ||||
16800 | |||||
16801 | /* Add the decrypted payload as a generated tvb */ | ||||
16802 | decrypted_tvb = tvb_new_real_data( | ||||
16803 | decrypted_data, | ||||
16804 | (unsigned) secure_body_len, | ||||
16805 | secure_body_len); | ||||
16806 | tvb_set_child_real_data_tvbuff(tvb, decrypted_tvb); | ||||
16807 | session_key_nul_terminator_ptr = bytes_to_hexstr( | ||||
16808 | session_key_hexadecimal_representation, | ||||
16809 | session_key, | ||||
16810 | session_key_len); | ||||
16811 | *session_key_nul_terminator_ptr = '\0'; | ||||
16812 | |||||
16813 | proto_tree* decrypted_subtree = NULL((void*)0); | ||||
16814 | decrypted_subtree = proto_tree_add_subtree_format( | ||||
16815 | payload_tree, | ||||
16816 | decrypted_tvb, | ||||
16817 | offset, | ||||
16818 | secure_body_len, | ||||
16819 | ett_rtps_decrypted_payload, | ||||
16820 | NULL((void*)0), | ||||
16821 | "Decrypted Payload (Passphrase Secret: \"%s\", " | ||||
16822 | "Passphrase ID: %d Session Key: %s)", | ||||
16823 | entry->passphrase_secret, | ||||
16824 | entry->passphrase_id.value, | ||||
16825 | session_key_hexadecimal_representation); | ||||
16826 | add_new_data_source(pinfo, decrypted_tvb, "Decrypted Data"); | ||||
16827 | proto_item_set_generated(decrypted_subtree); | ||||
16828 | |||||
16829 | /* | ||||
16830 | * Reset the content of the decryption info except the guid. | ||||
16831 | * We are already decrypting the secure body submessage encrypted with a | ||||
16832 | * pre-shared key. The contents may contain more submessages, but none of | ||||
16833 | * them can be encrypted. Pre-shared key protection works at the RTPS | ||||
16834 | * protection level. | ||||
16835 | */ | ||||
16836 | rtps_current_packet_decryption_info_reset(decryption_info); | ||||
16837 | decryption_info->guid_prefix = guid_backup; | ||||
16838 | |||||
16839 | dissect_rtps_submessages( | ||||
16840 | decrypted_tvb, | ||||
16841 | 0, | ||||
16842 | pinfo, | ||||
16843 | decrypted_subtree, | ||||
16844 | 0x0200, | ||||
16845 | vendor_id, | ||||
16846 | guid, | ||||
16847 | true1 /* dissecting_encrypted_submessage. */); | ||||
16848 | break; | ||||
16849 | } else if (error == GPG_ERR_CHECKSUM) { | ||||
16850 | /* Wrong PSK */ | ||||
16851 | proto_tree_add_expert_format( | ||||
16852 | payload_tree, | ||||
16853 | pinfo, | ||||
16854 | &ei_rtps_invalid_psk, | ||||
16855 | tvb, | ||||
16856 | offset, | ||||
16857 | octets_to_next_header, | ||||
16858 | "Bad %s tag check. " \ | ||||
16859 | "Possibly wrong passphrase secret (\"%s\") or malformed packet", | ||||
16860 | val_to_str(pinfo->pool, | ||||
16861 | decryption_info->algorithm, | ||||
16862 | secure_transformation_kind, | ||||
16863 | "Unknown algorithm"), | ||||
16864 | entry->passphrase_secret); | ||||
16865 | break; | ||||
16866 | } else { | ||||
16867 | /* General error. Displaying GCRY error output */ | ||||
16868 | proto_tree_add_expert_format( | ||||
16869 | payload_tree, | ||||
16870 | pinfo, | ||||
16871 | &ei_rtps_invalid_psk, | ||||
16872 | tvb, | ||||
16873 | offset, | ||||
16874 | octets_to_next_header, | ||||
16875 | "Unable to decrypt content with passphrase secret (\"%s\"). %s: %s", | ||||
16876 | entry->passphrase_secret, | ||||
16877 | gcry_strsource(error), | ||||
16878 | gcry_strerror(error)); | ||||
16879 | break; | ||||
16880 | } | ||||
16881 | } | ||||
16882 | } | ||||
16883 | |||||
16884 | static void dissect_SECURE_PREFIX(tvbuff_t *tvb, packet_info *pinfo _U___attribute__((unused)), int offset, | ||||
16885 | uint8_t flags, const unsigned encoding, int octets_to_next_header, | ||||
16886 | proto_tree *tree, uint16_t vendor_id _U___attribute__((unused))) { | ||||
16887 | /* | ||||
16888 | * MIG_RTPS_SECURE_RTPS_PREFIX and MIG_RTPS_SECURE_PREFIX share same serialization: | ||||
16889 | * 0...2...........8...............16.............24...............32 | ||||
16890 | * +---------------+---------------+---------------+---------------+ | ||||
16891 | * | 0x33 / 0x31 |X|X|X|X|X|X|X|E| octetsToNextHeader | | ||||
16892 | * +---------------+---------------+---------------+---------------+ | ||||
16893 | * | | | ||||
16894 | * + SecureDataHeader sec_data_header + | ||||
16895 | * | | | ||||
16896 | * +---------------+---------------+---------------+---------------+ | ||||
16897 | * | ||||
16898 | * where SecureDataHeader is: | ||||
16899 | * | ||||
16900 | * SecureDataHeader: TransformationIdentifier (kind + key) + plugin_sec_header | ||||
16901 | * 0...2...........8...............16.............24...............32 | ||||
16902 | * +---------------+---------------+---------------+---------------+ | ||||
16903 | * | Revision_id |tran...on_kind | | ||||
16904 | * +---------------+---------------+---------------+---------------+ | ||||
16905 | * | | | ||||
16906 | * + octet transformation_key_id[4] + | ||||
16907 | * | | | ||||
16908 | * +---------------+---------------+---------------+---------------+ | ||||
16909 | * | sesion_id | | ||||
16910 | * +---------------+---------------+---------------+---------------+ | ||||
16911 | * | init_vector_suffix[8] | | ||||
16912 | * +---------------+---------------+---------------+---------------+ | ||||
16913 | */ | ||||
16914 | proto_tree * sec_data_header_tree; | ||||
16915 | int flags_offset = offset + 1; | ||||
16916 | int session_id_offset = 0; | ||||
16917 | int transformation_key_offset = 0; | ||||
16918 | int algorithm_offset = 0; | ||||
16919 | int init_vector_offset = 0; | ||||
16920 | int psk_index_offset_three_bytes = 0; | ||||
16921 | int psk_index_offset_fourth_byte = 0; | ||||
16922 | uint32_t psk_index = 0; | ||||
16923 | proto_item *passphrase_id_item = NULL((void*)0); | ||||
16924 | unsigned flags_byte = 0; | ||||
16925 | bool_Bool is_psk_protected = false0; | ||||
16926 | bool_Bool is_aad_enabled = false0; | ||||
16927 | proto_item *transformation_kind_item = NULL((void*)0); | ||||
16928 | |||||
16929 | proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, | ||||
16930 | ett_rtps_flags, SECURE_PREFIX_FLAGS, flags); | ||||
16931 | |||||
16932 | flags_byte = tvb_get_uint8(tvb, flags_offset); | ||||
16933 | is_psk_protected = (flags_byte & 0x04) != 0; | ||||
16934 | is_aad_enabled = (flags_byte & 0x02) != 0; | ||||
16935 | proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb, offset + 2, | ||||
16936 | 2, encoding); | ||||
16937 | offset += 4; | ||||
16938 | |||||
16939 | sec_data_header_tree = proto_tree_add_subtree_format(tree, tvb, offset, octets_to_next_header, | ||||
16940 | ett_rtps_secure_dataheader_tree, NULL((void*)0), "Secure Data Header"); | ||||
16941 | |||||
16942 | /* Transformation Kind field used to be 4 bytes. Now it is splitted: | ||||
16943 | * - 3 bytes: Transformation Key Revision | ||||
16944 | * - 1 byte: Transformation Kind | ||||
16945 | * A single byte is enough for Transformation Kind since it only has five possible values (0-4). | ||||
16946 | */ | ||||
16947 | psk_index_offset_three_bytes = offset; | ||||
16948 | proto_tree_add_item(sec_data_header_tree, hf_rtps_secure_dataheader_transformation_key_revision_id, tvb, | ||||
16949 | offset, 3, ENC_BIG_ENDIAN0x00000000); | ||||
16950 | offset += 3; | ||||
16951 | |||||
16952 | algorithm_offset = offset; | ||||
16953 | proto_tree_add_item(sec_data_header_tree, hf_rtps_secure_dataheader_transformation_kind, tvb, | ||||
16954 | offset, 1, ENC_BIG_ENDIAN0x00000000); | ||||
16955 | |||||
16956 | offset += 1; | ||||
16957 | transformation_key_offset = offset; | ||||
16958 | proto_tree_add_item(sec_data_header_tree, hf_rtps_secure_dataheader_transformation_key_id, tvb, | ||||
16959 | offset, 4, ENC_NA0x00000000); | ||||
16960 | |||||
16961 | offset += 3; | ||||
16962 | if (is_psk_protected) { | ||||
16963 | proto_tree *transformation_kind_tree; | ||||
16964 | /* PSK index is the last byte of the transformation kind */ | ||||
16965 | psk_index_offset_fourth_byte = offset; | ||||
16966 | transformation_kind_tree = proto_item_add_subtree( | ||||
16967 | transformation_kind_item, | ||||
16968 | ett_rtps_secure_transformation_kind); | ||||
16969 | proto_tree_add_item( | ||||
16970 | transformation_kind_tree, | ||||
16971 | hf_rtps_secure_dataheader_passphrase_key_id, | ||||
16972 | tvb, | ||||
16973 | psk_index_offset_fourth_byte, | ||||
16974 | 1, | ||||
16975 | ENC_NA0x00000000); | ||||
16976 | } | ||||
16977 | offset += 1; | ||||
16978 | session_id_offset = offset; | ||||
16979 | proto_tree_add_item(sec_data_header_tree, hf_rtps_secure_dataheader_session_id, tvb, | ||||
16980 | offset, 4, ENC_BIG_ENDIAN0x00000000); | ||||
16981 | offset += 4; | ||||
16982 | |||||
16983 | init_vector_offset = session_id_offset; | ||||
16984 | proto_tree_add_item(sec_data_header_tree, hf_rtps_secure_dataheader_init_vector_suffix, tvb, | ||||
16985 | offset, octets_to_next_header-12, ENC_NA0x00000000); | ||||
16986 | |||||
16987 | if (is_psk_protected) { | ||||
16988 | uint8_t *psk_index_bytes = (uint8_t*) &psk_index; | ||||
16989 | tvb_memcpy(tvb, &psk_index_bytes[1], psk_index_offset_three_bytes, 3); | ||||
16990 | tvb_memcpy(tvb, psk_index_bytes, psk_index_offset_fourth_byte, 1); | ||||
16991 | passphrase_id_item = proto_tree_add_uint( | ||||
16992 | sec_data_header_tree, | ||||
16993 | hf_rtps_secure_dataheader_passphrase_id, | ||||
16994 | tvb, | ||||
16995 | 0, | ||||
16996 | 0, | ||||
16997 | psk_index); | ||||
16998 | proto_item_set_generated(passphrase_id_item); | ||||
16999 | } | ||||
17000 | |||||
17001 | /* | ||||
17002 | * If PSK decryption is enabled, then store the session id, init vector and | ||||
17003 | * transformation key for using them later during the session key generation. | ||||
17004 | */ | ||||
17005 | if (is_psk_protected && enable_rtps_psk_decryption) { | ||||
17006 | rtps_current_packet_decryption_info_t *decryption_info = | ||||
17007 | (rtps_current_packet_decryption_info_t *) p_get_proto_data( | ||||
17008 | pinfo->pool, | ||||
17009 | pinfo, | ||||
17010 | proto_rtps, | ||||
17011 | RTPS_DECRYPTION_INFO_KEY5); | ||||
17012 | if (decryption_info == NULL((void*)0)) { | ||||
17013 | return; | ||||
17014 | } | ||||
17015 | |||||
17016 | decryption_info->try_psk_decryption = true1; | ||||
17017 | decryption_info->is_aad_enabled = is_aad_enabled; | ||||
17018 | decryption_info->algorithm = tvb_get_uint8(tvb, algorithm_offset); | ||||
17019 | |||||
17020 | /* Copy the bytes as they are. Without considering the endianness */ | ||||
17021 | tvb_memcpy( | ||||
17022 | tvb, | ||||
17023 | &decryption_info->session_id, | ||||
17024 | session_id_offset, | ||||
17025 | sizeof(uint32_t)); | ||||
17026 | tvb_memcpy( | ||||
17027 | tvb, | ||||
17028 | &decryption_info->init_vector, | ||||
17029 | init_vector_offset, | ||||
17030 | RTPS_SECURITY_INIT_VECTOR_LEN12); | ||||
17031 | tvb_memcpy( | ||||
17032 | tvb, | ||||
17033 | &decryption_info->transformation_key, | ||||
17034 | transformation_key_offset, | ||||
17035 | sizeof(uint32_t)); | ||||
17036 | |||||
17037 | /* | ||||
17038 | * PSK index is the composition of the three bytes of the transformation key | ||||
17039 | * revision Id and the byte of the transformation id. | ||||
17040 | */ | ||||
17041 | decryption_info->psk_index = psk_index; | ||||
17042 | } | ||||
17043 | } | ||||
17044 | |||||
17045 | static void dissect_SECURE_POSTFIX( | ||||
17046 | tvbuff_t *tvb, | ||||
17047 | packet_info *pinfo _U___attribute__((unused)), | ||||
17048 | int offset, | ||||
17049 | uint8_t flags, | ||||
17050 | const unsigned encoding, | ||||
17051 | int octets_to_next_header, | ||||
17052 | proto_tree *tree, | ||||
17053 | uint16_t vendor_id _U___attribute__((unused))) | ||||
17054 | { | ||||
17055 | /* | ||||
17056 | * MIG_RTPS_SECURE_RTPS_POSTFIX and MIG_RTPS_SECURE_POSTFIX share the same | ||||
17057 | * serialization: | ||||
17058 | * 0...2...........8...............16.............24...............32 | ||||
17059 | * +---------------+---------------+---------------+---------------+ | ||||
17060 | * | 0x34 / 0x32 |X|X|X|X|X|X|X|E| octetsToNextHeader | | ||||
17061 | * +---------------+---------------+---------------+---------------+ | ||||
17062 | * | | | ||||
17063 | * + SecureDataTag sec_data_tag + | ||||
17064 | * | | | ||||
17065 | * +---------------+---------------+---------------+---------------+ | ||||
17066 | * | ||||
17067 | * where SecureDataTag is: | ||||
17068 | * 0...2...........8...............16.............24...............32 | ||||
17069 | * +---------------+---------------+---------------+---------------+ | ||||
17070 | * | | | ||||
17071 | * ~ octet plugin_sec_tag[] ~ | ||||
17072 | * | | | ||||
17073 | * +---------------+---------------+---------------+---------------+ | ||||
17074 | * | ||||
17075 | * and plugin_sec_tag is: | ||||
17076 | * 0...2...........8...............16.............24...............32 | ||||
17077 | * +---------------+---------------+---------------+---------------+ | ||||
17078 | * ~ octet[16] plugin_sec_tag.common_mac ~ | ||||
17079 | * +---------------+---------------+---------------+---------------+ | ||||
17080 | * + plugin_sec_tag.receiver_specific_macs: | | ||||
17081 | * | long plugin_sec_tag.receiver_specific_macs.length = N | | ||||
17082 | * +---------------+---------------+---------------+---------------+ | ||||
17083 | * | octet[4] receiver_specific_macs[0].receiver_mac_key_id | | ||||
17084 | * | octet[16] receiver_specific_macs[0].receiver_mac | | ||||
17085 | * +---------------+---------------+---------------+---------------+ | ||||
17086 | * | . . . | | ||||
17087 | * +---------------+---------------+---------------+---------------+ | ||||
17088 | * | octet[4] receiver_specific_macs[N-1].receiver_mac_key_id | | ||||
17089 | * | octet[16] receiver_specific_macs[N-1].receiver_mac | | ||||
17090 | * +---------------+---------------+---------------+---------------+ | ||||
17091 | */ | ||||
17092 | int specific_macs_num = 0; | ||||
17093 | |||||
17094 | ++offset; | ||||
17095 | proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, | ||||
17096 | ett_rtps_flags, SECURE_POSTFIX_FLAGS, flags); | ||||
17097 | |||||
17098 | ++offset; | ||||
17099 | proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb, offset, | ||||
17100 | 2, encoding); | ||||
17101 | offset += 2; | ||||
17102 | proto_tree_add_item( | ||||
17103 | tree, | ||||
17104 | hf_rtps_secure_datatag_plugin_sec_tag_common_mac, | ||||
17105 | tvb, | ||||
17106 | offset, | ||||
17107 | SECURE_TAG_COMMON_AND_SPECIFIC_MAC_LENGTH16, | ||||
17108 | encoding); | ||||
17109 | offset += SECURE_TAG_COMMON_AND_SPECIFIC_MAC_LENGTH16; | ||||
17110 | |||||
17111 | if (octets_to_next_header <= SECURE_TAG_COMMON_AND_SPECIFIC_MAC_LENGTH16) { | ||||
17112 | /* There are no receiver-specific MACs. */ | ||||
17113 | return; | ||||
17114 | } | ||||
17115 | |||||
17116 | /* | ||||
17117 | * The receiver-specific mac length is encoded in big endian (regardless of | ||||
17118 | * the submessage flags), as per the Security specification. | ||||
17119 | */ | ||||
17120 | proto_tree_add_item( | ||||
17121 | tree, | ||||
17122 | hf_rtps_secure_datatag_plugin_specific_macs_len, | ||||
17123 | tvb, | ||||
17124 | offset, | ||||
17125 | 4, | ||||
17126 | ENC_BIG_ENDIAN0x00000000); | ||||
17127 | specific_macs_num = tvb_get_int32(tvb, offset, ENC_BIG_ENDIAN0x00000000); | ||||
17128 | offset += 4; | ||||
17129 | |||||
17130 | /* Dissect specific macs */ | ||||
17131 | if (specific_macs_num > 0) { | ||||
17132 | int RECEIVER_SPECIFIC_MAC_KEY_LENGTH = 4; /* bytes. */ | ||||
17133 | int secure_tags_list_member_size = | ||||
17134 | RECEIVER_SPECIFIC_MAC_KEY_LENGTH + SECURE_TAG_COMMON_AND_SPECIFIC_MAC_LENGTH16; | ||||
17135 | |||||
17136 | proto_tree *sec_data_tag_tree = NULL((void*)0); | ||||
17137 | sec_data_tag_tree = proto_tree_add_subtree_format( | ||||
17138 | tree, | ||||
17139 | tvb, | ||||
17140 | offset, | ||||
17141 | octets_to_next_header, | ||||
17142 | ett_rtps_secure_dataheader_tree, | ||||
17143 | NULL((void*)0), | ||||
17144 | "Receiver Specific Macs"); | ||||
17145 | for (int tag_counter = 0; tag_counter < specific_macs_num; tag_counter++) { | ||||
17146 | proto_tree *tag_tree = NULL((void*)0); | ||||
17147 | int tag_offset = tag_counter * secure_tags_list_member_size; | ||||
17148 | |||||
17149 | tag_tree = proto_tree_add_subtree_format( | ||||
17150 | sec_data_tag_tree, | ||||
17151 | tvb, | ||||
17152 | offset + tag_offset, | ||||
17153 | secure_tags_list_member_size, | ||||
17154 | ett_rtps_secure_postfix_tag_list_item, | ||||
17155 | NULL((void*)0), | ||||
17156 | "Receiver Specific Mac[%d]", | ||||
17157 | tag_counter); | ||||
17158 | proto_tree_add_item( | ||||
17159 | tag_tree, | ||||
17160 | hf_rtps_secure_datatag_plugin_sec_tag, | ||||
17161 | tvb, | ||||
17162 | offset + tag_offset, | ||||
17163 | SECURE_TAG_COMMON_AND_SPECIFIC_MAC_LENGTH16, | ||||
17164 | encoding); | ||||
17165 | proto_tree_add_item( | ||||
17166 | tag_tree, | ||||
17167 | hf_rtps_secure_datatag_plugin_sec_tag_key, | ||||
17168 | tvb, | ||||
17169 | offset + tag_offset + SECURE_TAG_COMMON_AND_SPECIFIC_MAC_LENGTH16, | ||||
17170 | RECEIVER_SPECIFIC_MAC_KEY_LENGTH, | ||||
17171 | encoding); | ||||
17172 | } | ||||
17173 | } | ||||
17174 | } | ||||
17175 | /* | ||||
17176 | * 0...2...........7...............15.............23...............31 | ||||
17177 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
17178 | * | BINDING_PING |X|X|X|X|X|B|L|E| octetsToNextHeader | | ||||
17179 | * +---------------+---------------+---------------+---------------+ | ||||
17180 | * | DDS_UnsignedLong rtps_port | | ||||
17181 | * +---------------+---------------+---------------+---------------+ | ||||
17182 | * | | | ||||
17183 | * + DDS_Octet address[12][If L = 0] + | ||||
17184 | * | | | ||||
17185 | * + + | ||||
17186 | * | | | ||||
17187 | * +---------------+---------------+---------------+---------------+ | ||||
17188 | * | | | ||||
17189 | * + DDS_Octet address[16][If L = 1] + | ||||
17190 | * | | | ||||
17191 | * + + | ||||
17192 | * | | | ||||
17193 | * + + | ||||
17194 | * | | | ||||
17195 | * +---------------+---------------+---------------+---------------+ | ||||
17196 | * | ||||
17197 | */ | ||||
17198 | static void dissect_UDP_WAN_BINDING_PING(tvbuff_t *tvb, packet_info *pinfo _U___attribute__((unused)), int offset, | ||||
17199 | uint8_t flags, const unsigned encoding, int octets_to_next_header _U___attribute__((unused)), | ||||
17200 | proto_tree *tree, uint16_t vendor_id _U___attribute__((unused))) { | ||||
17201 | |||||
17202 | const unsigned flags_offset = offset + 1; | ||||
17203 | const unsigned next_header_offset = flags_offset + 1; | ||||
17204 | const unsigned port_offset = next_header_offset + 2; | ||||
17205 | const unsigned address_offset = port_offset + 4; | ||||
17206 | |||||
17207 | proto_tree_add_bitmask_value(tree, tvb, flags_offset, hf_rtps_udpv4_wan_binding_ping_flags, | ||||
17208 | ett_rtps_flags, UDPV4_WAN_BINDING_PING_FLAGS, flags); | ||||
17209 | proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb, next_header_offset, | ||||
17210 | 2, encoding); | ||||
17211 | proto_tree_add_item(tree, hf_rtps_udpv4_wan_binding_ping_port, tvb, port_offset, | ||||
17212 | 4, encoding); | ||||
17213 | /* | ||||
17214 | * Address[12] [If L=0] is the only one we currently support, and it maps to: | ||||
17215 | * DDS_Octet UUID[9] + 3 bytes of padding. | ||||
17216 | */ | ||||
17217 | if (flags & FLAG_UDPV4_WAN_BINDING_PING_FLAG_L(0x02)) { | ||||
17218 | proto_tree_add_item( | ||||
17219 | tree, | ||||
17220 | hf_rtps_long_address, | ||||
17221 | tvb, | ||||
17222 | address_offset, | ||||
17223 | LONG_ADDRESS_SIZE(16), | ||||
17224 | encoding); | ||||
17225 | } else { | ||||
17226 | proto_tree_add_item( | ||||
17227 | tree, | ||||
17228 | hf_rtps_uuid, | ||||
17229 | tvb, | ||||
17230 | address_offset, | ||||
17231 | UUID_SIZE(9), | ||||
17232 | encoding); | ||||
17233 | } | ||||
17234 | } | ||||
17235 | |||||
17236 | // NOLINTNEXTLINE(misc-no-recursion) | ||||
17237 | static bool_Bool dissect_rtps_submessage_v2( | ||||
17238 | tvbuff_t *tvb, | ||||
17239 | packet_info *pinfo, | ||||
17240 | int offset, | ||||
17241 | uint8_t flags, | ||||
17242 | const unsigned encoding, | ||||
17243 | uint8_t submessageId, | ||||
17244 | uint16_t vendor_id, | ||||
17245 | int octets_to_next_header, | ||||
17246 | proto_tree *rtps_submessage_tree, | ||||
17247 | proto_item *submessage_item, | ||||
17248 | endpoint_guid *guid, | ||||
17249 | endpoint_guid *dst_guid, | ||||
17250 | bool_Bool dissecting_encrypted_submessage) | ||||
17251 | { | ||||
17252 | switch (submessageId) | ||||
17253 | { | ||||
17254 | case SUBMESSAGE_HEADER_EXTENSION(0x0): | ||||
17255 | dissect_HEADER_EXTENSION(tvb, pinfo, offset, flags, encoding, rtps_submessage_tree, octets_to_next_header, vendor_id); | ||||
17256 | break; | ||||
17257 | case SUBMESSAGE_DATA_FRAG(0x10): | ||||
17258 | dissect_DATA_FRAG(tvb, pinfo, offset, flags, encoding, | ||||
17259 | octets_to_next_header, rtps_submessage_tree, vendor_id, guid); | ||||
17260 | break; | ||||
17261 | |||||
17262 | case SUBMESSAGE_NOKEY_DATA_FRAG(0x11): | ||||
17263 | dissect_NOKEY_DATA_FRAG(tvb, pinfo, offset, flags, encoding, octets_to_next_header, rtps_submessage_tree, vendor_id); | ||||
17264 | break; | ||||
17265 | |||||
17266 | case SUBMESSAGE_NACK_FRAG(0x12): | ||||
17267 | dissect_NACK_FRAG(tvb, pinfo, offset, flags, encoding, octets_to_next_header, rtps_submessage_tree); | ||||
17268 | break; | ||||
17269 | |||||
17270 | case SUBMESSAGE_ACKNACK_SESSION(0x1a): | ||||
17271 | case SUBMESSAGE_ACKNACK_BATCH(0x17): | ||||
17272 | dissect_ACKNACK(tvb, pinfo, offset, flags, encoding, | ||||
17273 | octets_to_next_header, rtps_submessage_tree, submessage_item, dst_guid); | ||||
17274 | break; | ||||
17275 | |||||
17276 | case SUBMESSAGE_APP_ACK(0x1c): | ||||
17277 | dissect_APP_ACK(tvb, pinfo, offset, flags, encoding, octets_to_next_header, rtps_submessage_tree, submessage_item, guid); | ||||
17278 | break; | ||||
17279 | |||||
17280 | case SUBMESSAGE_APP_ACK_CONF(0x1d): | ||||
17281 | dissect_APP_ACK_CONF(tvb, pinfo, offset, flags, encoding, octets_to_next_header, rtps_submessage_tree, submessage_item, guid); | ||||
17282 | break; | ||||
17283 | |||||
17284 | case SUBMESSAGE_HEARTBEAT_SESSION(0x1b): | ||||
17285 | case SUBMESSAGE_HEARTBEAT_BATCH(0x19): | ||||
17286 | dissect_HEARTBEAT_BATCH(tvb, pinfo, offset, flags, encoding, | ||||
17287 | octets_to_next_header, rtps_submessage_tree, guid); | ||||
17288 | break; | ||||
17289 | |||||
17290 | case SUBMESSAGE_HEARTBEAT_FRAG(0x13): | ||||
17291 | dissect_HEARTBEAT_FRAG(tvb, pinfo, offset, flags, encoding, | ||||
17292 | octets_to_next_header, rtps_submessage_tree, guid); | ||||
17293 | break; | ||||
17294 | |||||
17295 | case SUBMESSAGE_HEARTBEAT_VIRTUAL(0x1e): | ||||
17296 | dissect_HEARTBEAT_VIRTUAL(tvb, pinfo, offset, flags, encoding, | ||||
17297 | octets_to_next_header, rtps_submessage_tree, vendor_id, guid); | ||||
17298 | break; | ||||
17299 | |||||
17300 | case SUBMESSAGE_RTPS_DATA_SESSION(0x14): { | ||||
17301 | dissect_RTPS_DATA_SESSION(tvb, pinfo, offset, flags, encoding, octets_to_next_header, | ||||
17302 | rtps_submessage_tree, vendor_id, guid); | ||||
17303 | break; | ||||
17304 | } | ||||
17305 | case SUBMESSAGE_RTPS_DATA(0x15): | ||||
17306 | dissect_RTPS_DATA(tvb, pinfo, offset, flags, encoding, octets_to_next_header, | ||||
17307 | rtps_submessage_tree, vendor_id, false0, guid); | ||||
17308 | |||||
17309 | break; | ||||
17310 | |||||
17311 | case SUBMESSAGE_RTI_DATA_FRAG_SESSION(0x81): | ||||
17312 | case SUBMESSAGE_RTPS_DATA_FRAG(0x16): | ||||
17313 | dissect_RTPS_DATA_FRAG_kind(tvb, pinfo, offset, flags, encoding, octets_to_next_header, | ||||
17314 | rtps_submessage_tree, vendor_id, (submessageId == SUBMESSAGE_RTI_DATA_FRAG_SESSION(0x81)), guid); | ||||
17315 | break; | ||||
17316 | |||||
17317 | case SUBMESSAGE_RTPS_DATA_BATCH(0x18): | ||||
17318 | dissect_RTPS_DATA_BATCH(tvb, pinfo, offset, flags, encoding, octets_to_next_header, | ||||
17319 | rtps_submessage_tree, vendor_id, guid); | ||||
17320 | break; | ||||
17321 | |||||
17322 | case SUBMESSAGE_RTI_CRC(0x80): | ||||
17323 | if (vendor_id == RTPS_VENDOR_RTI_DDS(0x0101)) { | ||||
17324 | dissect_RTI_CRC(tvb, pinfo, offset, flags, encoding, octets_to_next_header, | ||||
17325 | rtps_submessage_tree); | ||||
17326 | } | ||||
17327 | break; | ||||
17328 | case SUBMESSAGE_SEC_BODY(0x30): | ||||
17329 | dissect_SECURE( | ||||
17330 | tvb, | ||||
17331 | pinfo, | ||||
17332 | offset, | ||||
17333 | flags, | ||||
17334 | encoding, | ||||
17335 | octets_to_next_header, | ||||
17336 | rtps_submessage_tree, | ||||
17337 | vendor_id, | ||||
17338 | guid, | ||||
17339 | dissecting_encrypted_submessage); | ||||
17340 | break; | ||||
17341 | case SUBMESSAGE_SEC_PREFIX(0x31): | ||||
17342 | case SUBMESSAGE_SRTPS_PREFIX(0x33): | ||||
17343 | dissect_SECURE_PREFIX(tvb, pinfo, offset, flags, encoding, octets_to_next_header, | ||||
17344 | rtps_submessage_tree, vendor_id); | ||||
17345 | break; | ||||
17346 | case SUBMESSAGE_SEC_POSTFIX(0x32): | ||||
17347 | case SUBMESSAGE_SRTPS_POSTFIX(0x34): | ||||
17348 | dissect_SECURE_POSTFIX(tvb, pinfo, offset, flags, encoding, octets_to_next_header, | ||||
17349 | rtps_submessage_tree, vendor_id); | ||||
17350 | break; | ||||
17351 | case SUBMESSAGE_RTI_UDP_WAN_BINDING_PING(0x82): | ||||
17352 | dissect_UDP_WAN_BINDING_PING(tvb, pinfo, offset, flags, encoding, octets_to_next_header, | ||||
17353 | rtps_submessage_tree, vendor_id); | ||||
17354 | break; | ||||
17355 | |||||
17356 | default: | ||||
17357 | return false0; | ||||
17358 | } | ||||
17359 | |||||
17360 | return true1; | ||||
17361 | } | ||||
17362 | |||||
17363 | static bool_Bool dissect_rtps_submessage_v1(tvbuff_t *tvb, packet_info *pinfo, int offset, uint8_t flags, const unsigned encoding, | ||||
17364 | uint8_t submessageId, uint16_t version, uint16_t vendor_id, int octets_to_next_header, | ||||
17365 | proto_tree *rtps_submessage_tree, proto_item *submessage_item, | ||||
17366 | endpoint_guid * guid, endpoint_guid * dst_guid) | ||||
17367 | { | ||||
17368 | switch (submessageId) | ||||
17369 | { | ||||
17370 | case SUBMESSAGE_PAD(0x01): | ||||
17371 | dissect_PAD(tvb, pinfo, offset, flags, encoding, octets_to_next_header, rtps_submessage_tree); | ||||
17372 | break; | ||||
17373 | |||||
17374 | case SUBMESSAGE_DATA(0x02): | ||||
17375 | if (version < 0x0200) { | ||||
17376 | dissect_DATA_v1(tvb, pinfo, offset, flags, encoding, | ||||
17377 | octets_to_next_header, rtps_submessage_tree); | ||||
17378 | } else { | ||||
17379 | dissect_DATA_v2(tvb, pinfo, offset, flags, encoding, | ||||
17380 | octets_to_next_header, rtps_submessage_tree, vendor_id, guid); | ||||
17381 | } | ||||
17382 | break; | ||||
17383 | |||||
17384 | case SUBMESSAGE_NOKEY_DATA(0x03): | ||||
17385 | dissect_NOKEY_DATA(tvb, pinfo, offset, flags, encoding, octets_to_next_header, rtps_submessage_tree, | ||||
17386 | version, vendor_id); | ||||
17387 | break; | ||||
17388 | |||||
17389 | case SUBMESSAGE_ACKNACK(0x06): | ||||
17390 | dissect_ACKNACK(tvb, pinfo, offset, flags, encoding, | ||||
17391 | octets_to_next_header, rtps_submessage_tree, submessage_item, dst_guid); | ||||
17392 | break; | ||||
17393 | |||||
17394 | case SUBMESSAGE_HEARTBEAT(0x07): | ||||
17395 | dissect_HEARTBEAT(tvb, pinfo, offset, flags, encoding, | ||||
17396 | octets_to_next_header, rtps_submessage_tree, version, guid); | ||||
17397 | break; | ||||
17398 | |||||
17399 | case SUBMESSAGE_GAP(0x08): | ||||
17400 | dissect_GAP(tvb, pinfo, offset, flags, encoding, | ||||
17401 | octets_to_next_header, rtps_submessage_tree, guid); | ||||
17402 | break; | ||||
17403 | |||||
17404 | case SUBMESSAGE_INFO_TS(0x09): | ||||
17405 | dissect_INFO_TS(tvb, pinfo, offset, flags, encoding, octets_to_next_header, rtps_submessage_tree); | ||||
17406 | break; | ||||
17407 | |||||
17408 | case SUBMESSAGE_INFO_SRC(0x0c): | ||||
17409 | dissect_INFO_SRC(tvb, pinfo, offset, flags, encoding, octets_to_next_header, rtps_submessage_tree, version); | ||||
17410 | break; | ||||
17411 | |||||
17412 | case SUBMESSAGE_INFO_REPLY_IP4(0x0d): | ||||
17413 | dissect_INFO_REPLY_IP4(tvb, pinfo, offset, flags, encoding, octets_to_next_header, rtps_submessage_tree); | ||||
17414 | break; | ||||
17415 | |||||
17416 | case SUBMESSAGE_INFO_DST(0x0e): | ||||
17417 | dissect_INFO_DST(tvb, pinfo, offset, flags, encoding, | ||||
17418 | octets_to_next_header, rtps_submessage_tree, version, dst_guid); | ||||
17419 | break; | ||||
17420 | |||||
17421 | case SUBMESSAGE_INFO_REPLY(0x0f): | ||||
17422 | dissect_INFO_REPLY(tvb, pinfo, offset, flags, encoding, octets_to_next_header, rtps_submessage_tree); | ||||
17423 | break; | ||||
17424 | |||||
17425 | default: | ||||
17426 | return false0; | ||||
17427 | } | ||||
17428 | |||||
17429 | return true1; | ||||
17430 | } | ||||
17431 | |||||
17432 | /***************************************************************************/ | ||||
17433 | /* The main packet dissector function | ||||
17434 | */ | ||||
17435 | static bool_Bool dissect_rtps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) | ||||
17436 | { | ||||
17437 | proto_item *ti; | ||||
17438 | proto_tree *rtps_tree; | ||||
17439 | uint8_t majorRev; | ||||
17440 | uint16_t version, vendor_id; | ||||
17441 | bool_Bool is_ping; | ||||
17442 | endpoint_guid guid = {0}; | ||||
17443 | endpoint_guid *guid_copy; | ||||
17444 | uint32_t magic_number; | ||||
17445 | char domain_id_str[RTPS_UNKNOWN_DOMAIN_ID_STR_LENsizeof("Unknown")] = RTPS_UNKNOWN_DOMAIN_ID_STR"Unknown"; | ||||
17446 | bool_Bool is_domain_id_calculated = false0; | ||||
17447 | const char* not_accuracy_str = ""; | ||||
17448 | int length_remaining = 0; | ||||
17449 | rtps_tvb_field rtps_root; | ||||
17450 | rtps_current_packet_decryption_info_t *decryption_info = NULL((void*)0); | ||||
17451 | |||||
17452 | /* Check 'RTPS' signature: | ||||
17453 | * A header is invalid if it has less than 16 octets | ||||
17454 | */ | ||||
17455 | length_remaining = tvb_reported_length_remaining(tvb, offset); | ||||
17456 | if (length_remaining < 16) | ||||
17457 | return false0; | ||||
17458 | |||||
17459 | magic_number = tvb_get_ntohl(tvb, offset); | ||||
17460 | if (magic_number != RTPX_MAGIC_NUMBER0x52545058 && | ||||
17461 | magic_number != RTPS_MAGIC_NUMBER0x52545053) { | ||||
17462 | return false0; | ||||
17463 | } | ||||
17464 | /* Distinguish between RTPS 1.x and 2.x here */ | ||||
17465 | majorRev = tvb_get_uint8(tvb,offset+4); | ||||
17466 | if ((majorRev != 1) && (majorRev != 2)) | ||||
17467 | return false0; | ||||
17468 | |||||
17469 | /* Save the beginning of the RTPS message */ | ||||
17470 | rtps_root.tvb = tvb; | ||||
17471 | rtps_root.tvb_offset = offset; | ||||
17472 | rtps_root.tvb_len = tvb_reported_length_remaining(tvb, offset); | ||||
17473 | p_set_proto_data(pinfo->pool, pinfo, proto_rtps, RTPS_ROOT_MESSAGE_KEY4, (void **)&rtps_root); | ||||
17474 | col_set_str(pinfo->cinfo, COL_PROTOCOL, "RTPS"); | ||||
17475 | col_clear(pinfo->cinfo, COL_INFO); | ||||
17476 | |||||
17477 | /* create display subtree for the protocol */ | ||||
17478 | ti = proto_tree_add_item(tree, proto_rtps, tvb, 0, -1, ENC_NA0x00000000); | ||||
17479 | rtps_tree = proto_item_add_subtree(ti, ett_rtps); | ||||
17480 | |||||
17481 | /* magic */ | ||||
17482 | proto_tree_add_item(rtps_tree, hf_rtps_magic, tvb, 0, 4, ENC_ASCII0x00000000); | ||||
17483 | |||||
17484 | /* Protocol Version */ | ||||
17485 | version = rtps_util_add_protocol_version(rtps_tree, tvb, offset+4); | ||||
17486 | |||||
17487 | /* Vendor Id */ | ||||
17488 | vendor_id = rtps_util_add_vendor_id(rtps_tree, tvb, offset+6); | ||||
17489 | |||||
17490 | is_ping = rtps_is_ping(tvb, pinfo, offset+8); | ||||
17491 | |||||
17492 | if (is_ping
| ||||
17493 | dissect_PING(tvb, offset + 8, ENC_BIG_ENDIAN0x00000000, length_remaining - 8, rtps_tree); | ||||
17494 | } else { | ||||
17495 | if (version < 0x0200) | ||||
17496 | rtps_util_add_guid_prefix_v1(rtps_tree, pinfo, tvb, offset+8, | ||||
17497 | hf_rtps_guid_prefix_v1, hf_rtps_host_id, hf_rtps_app_id, | ||||
17498 | hf_rtps_app_id_instance_id, hf_rtps_app_id_app_kind, NULL((void*)0)); | ||||
17499 | else | ||||
17500 | rtps_util_add_guid_prefix_v2(rtps_tree, tvb, offset+8, hf_rtps_guid_prefix_src, | ||||
17501 | hf_rtps_host_id, hf_rtps_app_id, hf_rtps_sm_instance_id, hf_rtps_guid_prefix); | ||||
17502 | |||||
17503 | guid.host_id = tvb_get_ntohl(tvb, offset+8); | ||||
17504 | guid.app_id = tvb_get_ntohl(tvb, offset+12); | ||||
17505 | guid.instance_id = tvb_get_ntohl(tvb, offset+16); | ||||
17506 | |||||
17507 | /* | ||||
17508 | * If decryption is enabled, store the guid prefix to be used later in the | ||||
17509 | * dissect_SECURE and dissect_SECURE_PREFIX functions. | ||||
17510 | */ | ||||
17511 | if (enable_rtps_psk_decryption) { | ||||
17512 | decryption_info = wmem_alloc( | ||||
17513 | pinfo->pool, | ||||
17514 | sizeof(rtps_current_packet_decryption_info_t)); | ||||
17515 | if (decryption_info == NULL((void*)0)) { | ||||
17516 | return false0; | ||||
17517 | } | ||||
17518 | decryption_info->additional_authenticated_data_allocated = false0; | ||||
17519 | |||||
17520 | rtps_current_packet_decryption_info_reset(decryption_info); | ||||
17521 | decryption_info->guid_prefix.host_id = guid.host_id; | ||||
17522 | decryption_info->guid_prefix.app_id = guid.app_id; | ||||
17523 | decryption_info->guid_prefix.instance_id = guid.instance_id; | ||||
17524 | |||||
17525 | decryption_info->aad_length = 20; /* rtps header size. */ | ||||
17526 | |||||
17527 | /* Let's cast to avoid an unnecessary copy when HE is disabled. */ | ||||
17528 | decryption_info->additional_authenticated_data = (uint8_t *) tvb_get_ptr( | ||||
17529 | rtps_root.tvb, | ||||
17530 | rtps_root.tvb_offset, | ||||
17531 | (int) decryption_info->aad_length); | ||||
17532 | |||||
17533 | p_set_proto_data( | ||||
17534 | pinfo->pool, | ||||
17535 | pinfo, | ||||
17536 | proto_rtps, | ||||
17537 | RTPS_DECRYPTION_INFO_KEY5, | ||||
17538 | (void **) decryption_info); | ||||
17539 | } | ||||
17540 | |||||
17541 | guid.fields_present = GUID_HAS_HOST_ID0x00000001|GUID_HAS_APP_ID0x00000002|GUID_HAS_INSTANCE_ID0x00000004; | ||||
17542 | /* If the packet uses TCP we need top store the participant GUID to get the domainId later | ||||
17543 | * For that operation the member fields_present is not required and is not affected by | ||||
17544 | * its changes. | ||||
17545 | */ | ||||
17546 | guid_copy = (endpoint_guid*)wmem_memdup(pinfo->pool, | ||||
17547 | (const void*)&guid, sizeof(endpoint_guid)); | ||||
17548 | p_add_proto_data(pinfo->pool, pinfo, proto_rtps, | ||||
17549 | RTPS_TCPMAP_DOMAIN_ID_PROTODATA_KEY0, (void *)guid_copy); | ||||
17550 | #ifdef RTI_BUILD | ||||
17551 | pinfo->guid_prefix_host = tvb_get_ntohl(tvb, offset + 8); | ||||
17552 | pinfo->guid_prefix_app = tvb_get_ntohl(tvb, offset + 12); | ||||
17553 | pinfo->guid_prefix_count = tvb_get_ntohl(tvb, offset + 16); | ||||
17554 | pinfo->guid_rtps2 = 1; | ||||
17555 | #endif | ||||
17556 | } | ||||
17557 | /* Extract the domain id and participant index */ | ||||
17558 | { | ||||
17559 | int domain_id, doffset, participant_idx = 0, nature; | ||||
17560 | proto_tree *mapping_tree; | ||||
17561 | /* For a complete description of these rules, see RTPS documentation | ||||
17562 | |||||
17563 | RTPS 1.2 mapping: | ||||
17564 | domain_id = ((pinfo->destport - PORT_BASE)/10) % 100; | ||||
17565 | participant_idx = (pinfo->destport - PORT_BASE) / 1000; | ||||
17566 | nature = (pinfo->destport % 10); | ||||
17567 | |||||
17568 | For Unicast, the port mapping formula is: | ||||
17569 | metatraffic_unicast_port = port_base + | ||||
17570 | (domain_id_gain * domain_id) + | ||||
17571 | (participant_id_gain * participant_id) + | ||||
17572 | builtin_unicast_port_offset | ||||
17573 | For Multicast, the port mapping is: | ||||
17574 | metatraffic_multicast_port = port_base + | ||||
17575 | (domain_id_gain * domain_id) + | ||||
17576 | builtin_multicast_port_offset | ||||
17577 | |||||
17578 | Where the constants are: | ||||
17579 | port_base = 7400 | ||||
17580 | domain_id_gain = 250 | ||||
17581 | participant_id_gain = 2 | ||||
17582 | builtin_multicast_port_offset = 0 | ||||
17583 | builtin_unicast_port_offset = 10 | ||||
17584 | user_multicast_port_offset = 1 | ||||
17585 | user_unicast_port_offset = 11 | ||||
17586 | |||||
17587 | |||||
17588 | To obtain the individual components from the port number, the reverse formulas are: | ||||
17589 | domain_id = (port - port_base) / 250 (valid both multicast / unicast) | ||||
17590 | Doffset = (port - port_Base - (domain_id * 250)); | ||||
17591 | participant_idx = (Doffset - 10) / 2; | ||||
17592 | |||||
17593 | */ | ||||
17594 | if (version
| ||||
17595 | /* If using TCP domainId cannot deduced from the port. It must be taken from the participant | ||||
17596 | * discovery packets or Unknown. | ||||
17597 | */ | ||||
17598 | domain_id = get_domain_id_from_tcp_discovered_participants(discovered_participants_domain_ids, &guid); | ||||
17599 | if (pinfo->ptype != PT_TCP && domain_id == RTPS_UNKNOWN_DOMAIN_ID_VAL-1) { | ||||
17600 | domain_id = ((pinfo->destport - PORT_BASE(7400)) / 10) % 100; | ||||
17601 | is_domain_id_calculated = true1; | ||||
17602 | } | ||||
17603 | participant_idx = (pinfo->destport - PORT_BASE(7400)) / 1000; | ||||
17604 | nature = (pinfo->destport % 10); | ||||
17605 | } else { | ||||
17606 | domain_id = get_domain_id_from_tcp_discovered_participants(discovered_participants_domain_ids, &guid); | ||||
17607 | if (pinfo->ptype != PT_TCP && pinfo->destport > PORT_BASE(7400) && domain_id == RTPS_UNKNOWN_DOMAIN_ID_VAL-1) { | ||||
17608 | domain_id = (pinfo->destport - PORT_BASE(7400)) / DOMAIN_GAIN(250); | ||||
17609 | is_domain_id_calculated = true1; | ||||
17610 | } | ||||
17611 | doffset = (pinfo->destport - PORT_BASE(7400) - domain_id * DOMAIN_GAIN(250)); | ||||
17612 | if (doffset == 0) { | ||||
17613 | nature = PORT_METATRAFFIC_MULTICAST(2); | ||||
17614 | } | ||||
17615 | else if (doffset == 1) { | ||||
17616 | nature = PORT_USERTRAFFIC_MULTICAST(1); | ||||
17617 | } | ||||
17618 | else { | ||||
17619 | participant_idx = (doffset - 10) / 2; | ||||
17620 | if ((doffset - 10) % 2 == 0) { | ||||
17621 | nature = PORT_METATRAFFIC_UNICAST(0); | ||||
17622 | } | ||||
17623 | else { | ||||
17624 | nature = PORT_USERTRAFFIC_UNICAST(3); | ||||
17625 | } | ||||
17626 | } | ||||
17627 | if (domain_id
| ||||
17628 | domain_id = RTPS_UNKNOWN_DOMAIN_ID_VAL-1; | ||||
17629 | } | ||||
17630 | } | ||||
17631 | /* Used string for the domain participant to show Unknown if the domainId is not known when using TCP*/ | ||||
17632 | if (domain_id != RTPS_UNKNOWN_DOMAIN_ID_VAL-1) { | ||||
17633 | snprintf(domain_id_str, RTPS_UNKNOWN_DOMAIN_ID_STR_LENsizeof("Unknown"), | ||||
17634 | "%"PRId32"d", domain_id); | ||||
17635 | if (is_domain_id_calculated) { | ||||
17636 | not_accuracy_str = " (Based on calculated domainId. Might not be accurate)"; | ||||
17637 | } | ||||
17638 | } | ||||
17639 | if ((nature
| ||||
17640 | (version < 0x0200)) { | ||||
17641 | mapping_tree = proto_tree_add_subtree_format(rtps_tree, tvb, 0, 0, | ||||
17642 | ett_rtps_default_mapping, NULL((void*)0), "Default port mapping%s: domainId=%s, " | ||||
17643 | "participantIdx=%d, nature=%s", | ||||
17644 | not_accuracy_str, | ||||
17645 | domain_id_str, | ||||
17646 | participant_idx, | ||||
17647 | val_to_str(pinfo->pool, nature, nature_type_vals, "%02x")); | ||||
17648 | } else { | ||||
17649 | mapping_tree = proto_tree_add_subtree_format(rtps_tree, tvb, 0, 0, | ||||
17650 | ett_rtps_default_mapping, NULL((void*)0), "Default port mapping%s: %s, domainId=%s", | ||||
17651 | not_accuracy_str, | ||||
17652 | val_to_str(pinfo->pool, nature, nature_type_vals, "%02x"), | ||||
17653 | domain_id_str); | ||||
17654 | } | ||||
17655 | |||||
17656 | ti = proto_tree_add_uint(mapping_tree, hf_rtps_domain_id, tvb, 0, 0, domain_id); | ||||
17657 | proto_item_set_generated(ti); | ||||
17658 | if ((nature
| ||||
17659 | (version < 0x0200)) { | ||||
17660 | ti = proto_tree_add_uint(mapping_tree, hf_rtps_participant_idx, tvb, 0, 0, participant_idx); | ||||
17661 | proto_item_set_generated(ti); | ||||
17662 | } | ||||
17663 | ti = proto_tree_add_uint(mapping_tree, hf_rtps_nature_type, tvb, 0, 0, nature); | ||||
17664 | proto_item_set_generated(ti); | ||||
17665 | } | ||||
17666 | |||||
17667 | /* offset behind RTPS's Header (need to be set in case tree=NULL)*/ | ||||
17668 | offset += ((version
| ||||
17669 | |||||
17670 | dissect_rtps_submessages( | ||||
17671 | tvb, | ||||
17672 | offset, | ||||
17673 | pinfo, | ||||
17674 | rtps_tree, | ||||
17675 | version, | ||||
17676 | vendor_id, | ||||
17677 | &guid, | ||||
17678 | false0 /* dissecting_encrypted_submessage. */); | ||||
17679 | |||||
17680 | if (decryption_info != NULL((void*)0)) { | ||||
17681 | rtps_current_packet_decryption_info_reset(decryption_info); | ||||
17682 | } | ||||
17683 | |||||
17684 | /* If TCP there's an extra OOB byte at the end of the message */ | ||||
17685 | /* TODO: What to do with it? */ | ||||
17686 | return true1; | ||||
17687 | |||||
17688 | } /* dissect_rtps(...) */ | ||||
17689 | |||||
17690 | static | ||||
17691 | void append_submessage_col_info(packet_info* pinfo, submessage_col_info* current_submessage_col_info) { | ||||
17692 | bool_Bool* is_data_session_intermediate = NULL((void*)0); | ||||
17693 | |||||
17694 | /* Status info column: (r),(p[U])...*/ | ||||
17695 | if (current_submessage_col_info->status_info != NULL((void*)0)) { | ||||
17696 | col_append_str(pinfo->cinfo, COL_INFO, current_submessage_col_info->status_info); | ||||
17697 | } | ||||
17698 | /* DATA_SESSION last package */ | ||||
17699 | is_data_session_intermediate = (bool_Bool*)p_get_proto_data(pinfo->pool, pinfo, proto_rtps, RTPS_DATA_SESSION_FINAL_PROTODATA_KEY2); | ||||
17700 | if (is_data_session_intermediate != NULL((void*)0) && !*is_data_session_intermediate) { | ||||
17701 | current_submessage_col_info->data_session_kind = "(Last)"; | ||||
17702 | col_append_str(pinfo->cinfo, COL_INFO, current_submessage_col_info->data_session_kind); | ||||
17703 | } | ||||
17704 | /* Topic name */ | ||||
17705 | if (current_submessage_col_info->topic_name != NULL((void*)0)) { | ||||
17706 | col_append_sep_str(pinfo->cinfo, COL_INFO, " -> ", current_submessage_col_info->topic_name); | ||||
17707 | } | ||||
17708 | } | ||||
17709 | |||||
17710 | // NOLINTNEXTLINE(misc-no-recursion) | ||||
17711 | void dissect_rtps_submessages( | ||||
17712 | tvbuff_t *tvb, | ||||
17713 | int offset, | ||||
17714 | packet_info *pinfo, | ||||
17715 | proto_tree *rtps_tree, | ||||
17716 | uint16_t version, | ||||
17717 | uint16_t vendor_id, | ||||
17718 | endpoint_guid *guid, | ||||
17719 | bool_Bool dissecting_encrypted_submessage) | ||||
17720 | { | ||||
17721 | uint8_t submessageId, flags; | ||||
17722 | int sub_hf; | ||||
17723 | const value_string *sub_vals; | ||||
17724 | proto_item *ti; | ||||
17725 | proto_tree *rtps_submessage_tree; | ||||
17726 | unsigned encoding; | ||||
17727 | int next_submsg, octets_to_next_header; | ||||
17728 | endpoint_guid dst_guid; | ||||
17729 | submessage_col_info current_submessage_col_info = {NULL((void*)0), NULL((void*)0), NULL((void*)0)}; | ||||
17730 | |||||
17731 | /* No fields have been set in GUID yet. */ | ||||
17732 | dst_guid.fields_present = 0; | ||||
17733 | while (tvb_reported_length_remaining(tvb, offset) > 0) { | ||||
17734 | submessageId = tvb_get_uint8(tvb, offset); | ||||
17735 | |||||
17736 | if (version
| ||||
17737 | sub_hf = hf_rtps_sm_id; | ||||
17738 | sub_vals = submessage_id_vals; | ||||
17739 | } else { | ||||
17740 | if ((submessageId & 0x80) && (vendor_id == RTPS_VENDOR_RTI_DDS(0x0101))) { | ||||
17741 | sub_hf = hf_rtps_sm_idv2; | ||||
17742 | sub_vals = submessage_id_rti; | ||||
17743 | } else { | ||||
17744 | sub_hf = hf_rtps_sm_idv2; | ||||
17745 | sub_vals = submessage_id_valsv2; | ||||
17746 | } | ||||
17747 | } | ||||
17748 | |||||
17749 | col_append_sep_str(pinfo->cinfo, COL_INFO, ", ", val_to_str(pinfo->pool, submessageId, sub_vals, "Unknown[%02x]")); | ||||
17750 | |||||
17751 | /* Creates the subtree 'Submessage: XXXX' */ | ||||
17752 | if (submessageId & 0x80) { | ||||
17753 | if (vendor_id == RTPS_VENDOR_RTI_DDS(0x0101)) { | ||||
17754 | ti = proto_tree_add_uint_format_value(rtps_tree, sub_hf, tvb, offset, 1, submessageId, "%s", | ||||
17755 | val_to_str(pinfo->pool, submessageId, submessage_id_rti, "Vendor-specific (0x%02x)")); | ||||
17756 | } else { | ||||
17757 | ti = proto_tree_add_uint_format_value(rtps_tree, sub_hf, tvb, offset, 1, | ||||
17758 | submessageId, "Vendor-specific (0x%02x)", submessageId); | ||||
17759 | } | ||||
17760 | } else { | ||||
17761 | ti = proto_tree_add_uint(rtps_tree, sub_hf, tvb, offset, 1, submessageId); | ||||
17762 | } | ||||
17763 | |||||
17764 | rtps_submessage_tree = proto_item_add_subtree(ti, ett_rtps_submessage); | ||||
17765 | |||||
17766 | /* Gets the flags */ | ||||
17767 | flags = tvb_get_uint8(tvb, offset + 1); | ||||
17768 | |||||
17769 | /* Gets the E (Little endian) flag */ | ||||
17770 | encoding = ((flags & FLAG_E(0x01)) != 0) ? ENC_LITTLE_ENDIAN0x80000000 : ENC_BIG_ENDIAN0x00000000; | ||||
17771 | |||||
17772 | /* Octets-to-next-header */ | ||||
17773 | octets_to_next_header = tvb_get_uint16(tvb, offset + 2, encoding); | ||||
17774 | if ((octets_to_next_header == 0) && (version >= 0x0200) | ||||
17775 | && (submessageId != SUBMESSAGE_PAD(0x01)) && (submessageId != SUBMESSAGE_INFO_TS(0x09))) { | ||||
17776 | octets_to_next_header = tvb_reported_length_remaining(tvb, offset + 4); | ||||
17777 | } | ||||
17778 | next_submsg = offset + octets_to_next_header + 4; | ||||
17779 | |||||
17780 | /* Set length of this item */ | ||||
17781 | proto_item_set_len(ti, octets_to_next_header + 4); | ||||
17782 | |||||
17783 | /* Now decode each single submessage | ||||
17784 | * The offset passed to the dissectors points to the start of the | ||||
17785 | * submessage (at the ID byte). | ||||
17786 | */ | ||||
17787 | p_set_proto_data(pinfo->pool, pinfo, proto_rtps, RTPS_CURRENT_SUBMESSAGE_COL_DATA_KEY3, (void **)¤t_submessage_col_info); | ||||
17788 | if (!dissect_rtps_submessage_v1(tvb, pinfo, offset, flags, encoding, | ||||
17789 | submessageId, version, vendor_id, | ||||
17790 | octets_to_next_header, rtps_submessage_tree, | ||||
17791 | ti, guid, &dst_guid)) { | ||||
17792 | if ((version
| ||||
17793 | !dissect_rtps_submessage_v2( | ||||
17794 | tvb, | ||||
17795 | pinfo, | ||||
17796 | offset, | ||||
17797 | flags, | ||||
17798 | encoding, | ||||
17799 | submessageId, | ||||
17800 | vendor_id, | ||||
17801 | octets_to_next_header, | ||||
17802 | rtps_submessage_tree, | ||||
17803 | ti, | ||||
17804 | guid, | ||||
17805 | &dst_guid, | ||||
17806 | dissecting_encrypted_submessage)) { | ||||
17807 | proto_tree_add_uint(rtps_submessage_tree, hf_rtps_sm_flags, | ||||
17808 | tvb, offset + 1, 1, flags); | ||||
17809 | proto_tree_add_uint(rtps_submessage_tree, | ||||
17810 | hf_rtps_sm_octets_to_next_header, | ||||
17811 | tvb, offset + 2, 2, octets_to_next_header); | ||||
17812 | } | ||||
17813 | } | ||||
17814 | append_submessage_col_info(pinfo, ¤t_submessage_col_info); | ||||
17815 | /* Reset the col info for the next submessage */ | ||||
17816 | current_submessage_col_info.data_session_kind = NULL((void*)0); | ||||
17817 | current_submessage_col_info.status_info = NULL((void*)0); | ||||
17818 | current_submessage_col_info.topic_name = NULL((void*)0); | ||||
17819 | /* next submessage's offset */ | ||||
17820 | offset = next_submsg; | ||||
17821 | } | ||||
17822 | } | ||||
17823 | |||||
17824 | static bool_Bool dissect_rtps_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U___attribute__((unused))) | ||||
17825 | { | ||||
17826 | int offset = 0; | ||||
17827 | |||||
17828 | return dissect_rtps(tvb, pinfo, tree, offset); | ||||
17829 | } | ||||
17830 | |||||
17831 | static bool_Bool dissect_rtps_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U___attribute__((unused))) | ||||
17832 | { | ||||
17833 | /* In RTPS over TCP the first 4 bytes are the packet length | ||||
17834 | * as 32-bit unsigned int coded as BIG ENDIAN | ||||
17835 | * uint32_t tcp_len = tvb_get_ntohl(tvb, offset); | ||||
17836 | */ | ||||
17837 | int offset = 4; | ||||
17838 | |||||
17839 | return dissect_rtps(tvb, pinfo, tree, offset); | ||||
17840 | } | ||||
17841 | |||||
17842 | static bool_Bool dissect_rtps_rtitcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U___attribute__((unused))) | ||||
17843 | { | ||||
17844 | int offset = 0; | ||||
17845 | |||||
17846 | return dissect_rtps(tvb, pinfo, tree, offset); | ||||
17847 | } | ||||
17848 | |||||
17849 | static int dissect_simple_rtps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U___attribute__((unused))) | ||||
17850 | { | ||||
17851 | int offset = 0; | ||||
17852 | |||||
17853 | if (dissect_rtps(tvb, pinfo, tree, offset) == false0) | ||||
| |||||
17854 | return 0; | ||||
17855 | |||||
17856 | return tvb_captured_length(tvb); | ||||
17857 | } | ||||
17858 | |||||
17859 | /* | ||||
17860 | * Type InstanceStateDataresponse is sent as user user data but there is no discovery data for it. | ||||
17861 | * So it is necessary to add it manually so Wireshark can dissect it | ||||
17862 | */ | ||||
17863 | static void initialize_instance_state_data_response_dissection_info(builtin_types_dissection_data_t *_builtin_types_dissection_data) { | ||||
17864 | uint32_t element = 0; | ||||
17865 | const uint64_t InstanceStateDataResponse_type_id = 0x9d6d4c879b0e6aa9; | ||||
17866 | const uint64_t sequence_100_InstanceTransitionData_type_id = 0x2dac07d5577caaf6; | ||||
17867 | const uint64_t guid_t_type_id = 0x36d940c4ed806097; | ||||
17868 | const uint64_t value_type_id = 0x974064b1120169ed; | ||||
17869 | const uint64_t instancetransitiondata_type_id = 0xceb6f5e405f4bde7; | ||||
17870 | const uint64_t KeyHashValue_type_id = 0x48725f37453310ed; | ||||
17871 | const uint64_t SerializedKey_type_id = 0x3fd77a8ff43c7e55; | ||||
17872 | const uint64_t payload_type_id = 0x0d0ecc8d34a5c3ab; | ||||
17873 | const uint64_t ntptime_t_type_id = 0x842c59af7e962a4c; | ||||
17874 | const uint64_t sequencenumber_t_type_id = 0xb933efe30d85453b; | ||||
17875 | /* | ||||
17876 | * @appendable @nested | ||||
17877 | * struct GUID_t { | ||||
17878 | * octet value[16]; | ||||
17879 | * }; | ||||
17880 | * @appendable @nested | ||||
17881 | * struct SequenceNumber_t { | ||||
17882 | * long high; | ||||
17883 | * unsigned long low; | ||||
17884 | * }; | ||||
17885 | * | ||||
17886 | * @final @nested | ||||
17887 | * struct NtpTime_t { | ||||
17888 | * int32 sec; | ||||
17889 | * uint32 frac; | ||||
17890 | * }; | ||||
17891 | * @final @nested | ||||
17892 | * struct SerializedKey { | ||||
17893 | * sequence<octet> payload; | ||||
17894 | * }; | ||||
17895 | * typedef octet KeyHashValue[16]; | ||||
17896 | * | ||||
17897 | * struct InstanceTransitionData { | ||||
17898 | * @optional KeyHashValue key_hash; | ||||
17899 | * @optional SerializedKey serialized_key; | ||||
17900 | * NtpTime_t last_update_timestamp; | ||||
17901 | * SequenceNumber_t transition_sequence_number; | ||||
17902 | * }; | ||||
17903 | */ | ||||
17904 | |||||
17905 | /* All dissection_infos are added to the "dissection_infos" map */ | ||||
17906 | |||||
17907 | /* value */ | ||||
17908 | g_strlcpy(_builtin_types_dissection_data->dissection_infos.value_dissection_info.member_name, "value", MAX_TOPIC_AND_TYPE_LENGTH256); | ||||
17909 | _builtin_types_dissection_data->dissection_infos.value_dissection_info.num_elements = VALUE_NUM_ELEMENTS16; | ||||
17910 | _builtin_types_dissection_data->dissection_infos.value_dissection_info.bound = VALUE_NUM_ELEMENTS16; | ||||
17911 | _builtin_types_dissection_data->dissection_infos.value_dissection_info.member_kind = RTI_CDR_TYPE_OBJECT_TYPE_KIND_ARRAY_TYPE; | ||||
17912 | _builtin_types_dissection_data->dissection_infos.value_dissection_info.base_type_id = RTI_CDR_TYPE_OBJECT_TYPE_KIND_BYTE_TYPE; | ||||
17913 | _builtin_types_dissection_data->dissection_infos.value_dissection_info.type_id = value_type_id; | ||||
17914 | _builtin_types_dissection_data->dissection_infos.value_dissection_info.bound = VALUE_NUM_ELEMENTS16; | ||||
17915 | _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)) )))); | ||||
17916 | wmem_map_insert( | ||||
17917 | builtin_dissection_infos, | ||||
17918 | &(_builtin_types_dissection_data->dissection_infos.value_dissection_info.type_id), | ||||
17919 | (void*)&(_builtin_types_dissection_data->dissection_infos.value_dissection_info)); | ||||
17920 | |||||
17921 | /* GUID_t */ | ||||
17922 | g_strlcpy(_builtin_types_dissection_data->dissection_infos.guid_t_dissection_info.member_name, "GUID_t", MAX_TOPIC_AND_TYPE_LENGTH256); | ||||
17923 | _builtin_types_dissection_data->dissection_infos.guid_t_dissection_info.num_elements = GUID_T_NUM_ELEMENTS1; | ||||
17924 | _builtin_types_dissection_data->dissection_infos.guid_t_dissection_info.member_kind = RTI_CDR_TYPE_OBJECT_TYPE_KIND_STRUCTURE_TYPE; | ||||
17925 | _builtin_types_dissection_data->dissection_infos.guid_t_dissection_info.type_id = guid_t_type_id; | ||||
17926 | _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)) )))); | ||||
17927 | /* octet value[16] */ | ||||
17928 | _builtin_types_dissection_data->dissection_infos.guid_t_dissection_info.elements[0].flags = 0; | ||||
17929 | _builtin_types_dissection_data->dissection_infos.guid_t_dissection_info.elements[0].member_id = 0; | ||||
17930 | _builtin_types_dissection_data->dissection_infos.guid_t_dissection_info.elements[0].type_id = value_type_id; | ||||
17931 | g_strlcpy(_builtin_types_dissection_data->dissection_infos.guid_t_dissection_info.elements[0].member_name, "value", MAX_TOPIC_AND_TYPE_LENGTH256); | ||||
17932 | wmem_map_insert( | ||||
17933 | builtin_dissection_infos, | ||||
17934 | &(_builtin_types_dissection_data->dissection_infos.guid_t_dissection_info.type_id), | ||||
17935 | (void*)&(_builtin_types_dissection_data->dissection_infos.guid_t_dissection_info)); | ||||
17936 | |||||
17937 | /* Payload */ | ||||
17938 | g_strlcpy(_builtin_types_dissection_data->dissection_infos.payload_dissection_info.member_name, "payload", MAX_TOPIC_AND_TYPE_LENGTH256); | ||||
17939 | _builtin_types_dissection_data->dissection_infos.payload_dissection_info.member_kind = RTI_CDR_TYPE_OBJECT_TYPE_KIND_SEQUENCE_TYPE; | ||||
17940 | _builtin_types_dissection_data->dissection_infos.payload_dissection_info.base_type_id = RTI_CDR_TYPE_OBJECT_TYPE_KIND_BYTE_TYPE; | ||||
17941 | _builtin_types_dissection_data->dissection_infos.payload_dissection_info.type_id = payload_type_id; | ||||
17942 | _builtin_types_dissection_data->dissection_infos.payload_dissection_info.bound = -1; | ||||
17943 | _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)) )))); | ||||
17944 | wmem_map_insert( | ||||
17945 | builtin_dissection_infos, | ||||
17946 | &(_builtin_types_dissection_data->dissection_infos.payload_dissection_info.type_id), | ||||
17947 | (void*)&(_builtin_types_dissection_data->dissection_infos.payload_dissection_info)); | ||||
17948 | |||||
17949 | /* KeyHashValue */ | ||||
17950 | g_strlcpy(_builtin_types_dissection_data->dissection_infos.key_hash_value_dissection_info.member_name, "KeyHashValue", MAX_TOPIC_AND_TYPE_LENGTH256); | ||||
17951 | _builtin_types_dissection_data->dissection_infos.key_hash_value_dissection_info.num_elements = KEY_HAS_VALUE_NUM_ELEMENTS16; | ||||
17952 | _builtin_types_dissection_data->dissection_infos.key_hash_value_dissection_info.bound = KEY_HAS_VALUE_NUM_ELEMENTS16; | ||||
17953 | _builtin_types_dissection_data->dissection_infos.key_hash_value_dissection_info.member_kind = RTI_CDR_TYPE_OBJECT_TYPE_KIND_ARRAY_TYPE; | ||||
17954 | _builtin_types_dissection_data->dissection_infos.key_hash_value_dissection_info.base_type_id = RTI_CDR_TYPE_OBJECT_TYPE_KIND_BYTE_TYPE; | ||||
17955 | _builtin_types_dissection_data->dissection_infos.key_hash_value_dissection_info.type_id = KeyHashValue_type_id; | ||||
17956 | _builtin_types_dissection_data->dissection_infos.key_hash_value_dissection_info.bound = KEY_HAS_VALUE_NUM_ELEMENTS16; | ||||
17957 | _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)) )))); | ||||
17958 | wmem_map_insert( | ||||
17959 | builtin_dissection_infos, | ||||
17960 | &(_builtin_types_dissection_data->dissection_infos.key_hash_value_dissection_info.type_id), | ||||
17961 | (void*)&(_builtin_types_dissection_data->dissection_infos.key_hash_value_dissection_info)); | ||||
17962 | |||||
17963 | /* SerializedKey */ | ||||
17964 | g_strlcpy(_builtin_types_dissection_data->dissection_infos.serialized_key_dissection_info.member_name, "SerializedKey", MAX_TOPIC_AND_TYPE_LENGTH256); | ||||
17965 | _builtin_types_dissection_data->dissection_infos.serialized_key_dissection_info.num_elements = GUID_T_NUM_ELEMENTS1; | ||||
17966 | _builtin_types_dissection_data->dissection_infos.serialized_key_dissection_info.member_kind = RTI_CDR_TYPE_OBJECT_TYPE_KIND_STRUCTURE_TYPE; | ||||
17967 | _builtin_types_dissection_data->dissection_infos.serialized_key_dissection_info.type_id = SerializedKey_type_id; | ||||
17968 | _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)) )))); | ||||
17969 | /* sequence<octet> payload */ | ||||
17970 | _builtin_types_dissection_data->dissection_infos.serialized_key_dissection_info.elements[0].flags = 0; | ||||
17971 | _builtin_types_dissection_data->dissection_infos.serialized_key_dissection_info.elements[0].member_id = 0; | ||||
17972 | _builtin_types_dissection_data->dissection_infos.serialized_key_dissection_info.elements[0].type_id = payload_type_id; | ||||
17973 | g_strlcpy(_builtin_types_dissection_data->dissection_infos.serialized_key_dissection_info.elements[0].member_name, "payload", MAX_TOPIC_AND_TYPE_LENGTH256); | ||||
17974 | wmem_map_insert( | ||||
17975 | builtin_dissection_infos, | ||||
17976 | &(_builtin_types_dissection_data->dissection_infos.serialized_key_dissection_info.type_id), | ||||
17977 | (void*)&(_builtin_types_dissection_data->dissection_infos.serialized_key_dissection_info)); | ||||
17978 | |||||
17979 | /* NtpTime_t */ | ||||
17980 | g_strlcpy(_builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info.member_name, "NtpTime_t", MAX_TOPIC_AND_TYPE_LENGTH256); | ||||
17981 | _builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info.num_elements = NTPTIME_T_NUM_ELEMENTS2; | ||||
17982 | _builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info.member_kind = RTI_CDR_TYPE_OBJECT_TYPE_KIND_STRUCTURE_TYPE; | ||||
17983 | _builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info.type_id = ntptime_t_type_id; | ||||
17984 | _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)) )))); | ||||
17985 | /* int32 sec */ | ||||
17986 | _builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info.elements[0].flags = 0; | ||||
17987 | _builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info.elements[0].member_id = 0; | ||||
17988 | _builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info.elements[0].type_id = RTI_CDR_TYPE_OBJECT_TYPE_KIND_INT_32_TYPE; | ||||
17989 | g_strlcpy(_builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info.elements[0].member_name, "sec", MAX_TOPIC_AND_TYPE_LENGTH256); | ||||
17990 | /* uint32 frac */ | ||||
17991 | _builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info.elements[1].flags = 0; | ||||
17992 | _builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info.elements[1].member_id = 1; | ||||
17993 | _builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info.elements[1].type_id = RTI_CDR_TYPE_OBJECT_TYPE_KIND_INT_32_TYPE; | ||||
17994 | g_strlcpy(_builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info.elements[1].member_name, "frac", MAX_TOPIC_AND_TYPE_LENGTH256); | ||||
17995 | wmem_map_insert( | ||||
17996 | builtin_dissection_infos, | ||||
17997 | &(_builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info.type_id), | ||||
17998 | (void*)&(_builtin_types_dissection_data->dissection_infos.ntptime_t_dissection_info)); | ||||
17999 | |||||
18000 | /* SequenceNumber_t */ | ||||
18001 | g_strlcpy(_builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info.member_name, "SequenceNumber_t", MAX_TOPIC_AND_TYPE_LENGTH256); | ||||
18002 | _builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info.num_elements = SEQUENCE_NUMBER_T_NUM_ELEMENTS2; | ||||
18003 | _builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info.member_kind = RTI_CDR_TYPE_OBJECT_TYPE_KIND_STRUCTURE_TYPE; | ||||
18004 | _builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info.type_id = sequencenumber_t_type_id; | ||||
18005 | _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)) )))); | ||||
18006 | _builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info.elements[0].flags = 0; | ||||
18007 | _builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info.elements[0].member_id = 0; | ||||
18008 | _builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info.elements[0].type_id = RTI_CDR_TYPE_OBJECT_TYPE_KIND_INT_32_TYPE; | ||||
18009 | g_strlcpy(_builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info.elements[0].member_name, "high", MAX_TOPIC_AND_TYPE_LENGTH256); | ||||
18010 | _builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info.elements[1].flags = 0; | ||||
18011 | _builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info.elements[1].member_id = 1; | ||||
18012 | _builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info.elements[1].type_id = RTI_CDR_TYPE_OBJECT_TYPE_KIND_UINT_32_TYPE; | ||||
18013 | g_strlcpy(_builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info.elements[1].member_name, "low", MAX_TOPIC_AND_TYPE_LENGTH256); | ||||
18014 | wmem_map_insert( | ||||
18015 | builtin_dissection_infos, | ||||
18016 | &(_builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info.type_id), | ||||
18017 | (void*)&(_builtin_types_dissection_data->dissection_infos.sequence_number_t_dissection_info)); | ||||
18018 | |||||
18019 | /* Instance transition Data */ | ||||
18020 | g_strlcpy(_builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.member_name, "InstanceTransitionData", MAX_TOPIC_AND_TYPE_LENGTH256); | ||||
18021 | _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.num_elements = INSTANCE_TRANSITION_DATA_NUM_ELEMENTS4; | ||||
18022 | _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.member_kind = RTI_CDR_TYPE_OBJECT_TYPE_KIND_STRUCTURE_TYPE; | ||||
18023 | _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.type_id = instancetransitiondata_type_id; | ||||
18024 | _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)) )))); | ||||
18025 | wmem_map_insert( | ||||
18026 | builtin_dissection_infos, | ||||
18027 | &(_builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.type_id), | ||||
18028 | (void*)&(_builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info)); | ||||
18029 | |||||
18030 | for (element = 0; element < _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.num_elements; ++element) { | ||||
18031 | switch (element) { | ||||
18032 | case 0: | ||||
18033 | /* @optional KeyHashValue key_hash */ | ||||
18034 | _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].flags = MEMBER_OPTIONAL(2); | ||||
18035 | _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].member_id = element; | ||||
18036 | _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].type_id = KeyHashValue_type_id; | ||||
18037 | g_strlcpy(_builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].member_name, "key_hash", MAX_TOPIC_AND_TYPE_LENGTH256); | ||||
18038 | break; | ||||
18039 | case 1: | ||||
18040 | /* @optional SerializedKey serialized_key */ | ||||
18041 | _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].flags = MEMBER_OPTIONAL(2); | ||||
18042 | _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].member_id = element; | ||||
18043 | _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].type_id = SerializedKey_type_id; | ||||
18044 | g_strlcpy(_builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].member_name, "serialized_key", MAX_TOPIC_AND_TYPE_LENGTH256); | ||||
18045 | break; | ||||
18046 | case 2: | ||||
18047 | /* NtpTime_t last_update_timestamp */ | ||||
18048 | _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].flags = 0; | ||||
18049 | _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].member_id = element; | ||||
18050 | _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].type_id = ntptime_t_type_id; | ||||
18051 | 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); | ||||
18052 | break; | ||||
18053 | case 3: | ||||
18054 | /* SequenceNumber_t transition_sequence_number */ | ||||
18055 | _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].flags = 0; | ||||
18056 | _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].member_id = element; | ||||
18057 | _builtin_types_dissection_data->dissection_infos.instance_transition_data_dissection_info.elements[element].type_id = sequencenumber_t_type_id; | ||||
18058 | 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); | ||||
18059 | break; | ||||
18060 | } | ||||
18061 | } | ||||
18062 | |||||
18063 | /* InstanceStateDataResponse | ||||
18064 | * struct InstanceStateDataResponse { | ||||
18065 | * @optional sequence<InstanceTransitionData> alive_instances; | ||||
18066 | * @optional sequence<InstanceTransitionData> disposed_instances; | ||||
18067 | * @optional sequence<InstanceTransitionData> unregistered_instances; | ||||
18068 | * GUID_t writer_guid; | ||||
18069 | * GUID_t reader_guid; | ||||
18070 | * uint32 reader_group_oid; | ||||
18071 | * boolean complete_snapshot; | ||||
18072 | * }; | ||||
18073 | */ | ||||
18074 | |||||
18075 | /* This type mapping is not available in the "registry" map. It is used in the function | ||||
18076 | * rtps_util_get_topic_info when the endopint GUID determines that the type is InstanceStateDataResponse | ||||
18077 | */ | ||||
18078 | _builtin_types_dissection_data->type_mappings.instance_state_data_response_type_mapping.type_id = InstanceStateDataResponse_type_id; | ||||
18079 | _builtin_types_dissection_data->type_mappings.instance_state_data_response_type_mapping.guid.entity_id = ENTITYID_NORMAL_META_GROUP_READER(0x8d); | ||||
18080 | _builtin_types_dissection_data->type_mappings.instance_state_data_response_type_mapping.guid.fields_present = GUID_HAS_ALL0x0000000F; | ||||
18081 | _builtin_types_dissection_data->type_mappings.instance_state_data_response_type_mapping.fields_visited = TOPIC_INFO_ALL_SET(0x07); | ||||
18082 | g_strlcpy(_builtin_types_dissection_data->type_mappings.instance_state_data_response_type_mapping.topic_name, "InstanceStateDataResponse", MAX_TOPIC_AND_TYPE_LENGTH256); | ||||
18083 | g_strlcpy(_builtin_types_dissection_data->type_mappings.instance_state_data_response_type_mapping.type_name, "InstanceStateDataResponse", MAX_TOPIC_AND_TYPE_LENGTH256); | ||||
18084 | |||||
18085 | g_strlcpy(_builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.member_name, "InstanceStateDataResponse", MAX_TOPIC_AND_TYPE_LENGTH256); | ||||
18086 | _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.num_elements = INSTANCE_STATE_DATA_RESPONSE_NUM_ELEMENTS7; | ||||
18087 | _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.bound = INSTANCE_STATE_DATA_RESPONSE_NUM_ELEMENTS7; | ||||
18088 | _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.member_kind = RTI_CDR_TYPE_OBJECT_TYPE_KIND_STRUCTURE_TYPE; | ||||
18089 | _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)) )))); | ||||
18090 | _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.base_type_id = 0; | ||||
18091 | _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.type_id = InstanceStateDataResponse_type_id; | ||||
18092 | wmem_map_insert( | ||||
18093 | builtin_dissection_infos, | ||||
18094 | &(_builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.type_id), | ||||
18095 | (void*)&(_builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info)); | ||||
18096 | |||||
18097 | /* sequence_100_InstanceTransitionData */ | ||||
18098 | g_strlcpy(_builtin_types_dissection_data->dissection_infos.alive_instances_dissection_info.member_name, "sequence_100_InstanceTransitionData", MAX_TOPIC_AND_TYPE_LENGTH256); | ||||
18099 | _builtin_types_dissection_data->dissection_infos.alive_instances_dissection_info.num_elements = INSTANCE_STATE_DATA_RESPONSE_NUM_ELEMENTS7; | ||||
18100 | _builtin_types_dissection_data->dissection_infos.alive_instances_dissection_info.bound = SEQUENCE_100_IINSTANCE_TRANSITION_DATA_BOUND100; | ||||
18101 | _builtin_types_dissection_data->dissection_infos.alive_instances_dissection_info.member_kind = RTI_CDR_TYPE_OBJECT_TYPE_KIND_SEQUENCE_TYPE; | ||||
18102 | _builtin_types_dissection_data->dissection_infos.alive_instances_dissection_info.base_type_id = instancetransitiondata_type_id; | ||||
18103 | _builtin_types_dissection_data->dissection_infos.alive_instances_dissection_info.type_id = sequence_100_InstanceTransitionData_type_id; | ||||
18104 | wmem_map_insert( | ||||
18105 | builtin_dissection_infos, | ||||
18106 | &(_builtin_types_dissection_data->dissection_infos.alive_instances_dissection_info.type_id), | ||||
18107 | (void*)&(_builtin_types_dissection_data->dissection_infos.alive_instances_dissection_info)); | ||||
18108 | |||||
18109 | /* @optional sequence<InstanceTransitionData> alive_instances */ | ||||
18110 | for (element = 0; element < _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.num_elements; ++element) { | ||||
18111 | switch (element) { | ||||
18112 | case 0: | ||||
18113 | /* @optional sequence<InstanceTransitionData> alive_instances */ | ||||
18114 | _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].flags = MEMBER_OPTIONAL(2); | ||||
18115 | g_strlcpy(_builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].member_name, "alive_instances", MAX_MEMBER_NAME(256)); | ||||
18116 | _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].type_id = sequence_100_InstanceTransitionData_type_id; | ||||
18117 | _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].member_id = element; | ||||
18118 | break; | ||||
18119 | case 1: | ||||
18120 | /* @optional sequence<InstanceTransitionData> disposed_instances */ | ||||
18121 | _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].flags = MEMBER_OPTIONAL(2); | ||||
18122 | g_strlcpy(_builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].member_name, "disposed_instances", MAX_MEMBER_NAME(256)); | ||||
18123 | _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].type_id = sequence_100_InstanceTransitionData_type_id; | ||||
18124 | _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].member_id = element; | ||||
18125 | break; | ||||
18126 | case 2: | ||||
18127 | /* @optional sequence<InstanceTransitionData> unregistered_instances */ | ||||
18128 | _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].flags = MEMBER_OPTIONAL(2); | ||||
18129 | g_strlcpy(_builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].member_name, "unregistered_instances", MAX_MEMBER_NAME(256)); | ||||
18130 | _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].type_id = sequence_100_InstanceTransitionData_type_id; | ||||
18131 | _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].member_id = element; | ||||
18132 | break; | ||||
18133 | case 3: | ||||
18134 | /* GUID_t writer_guid */ | ||||
18135 | _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].flags = 0; | ||||
18136 | g_strlcpy(_builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].member_name, "writer_gid", MAX_MEMBER_NAME(256)); | ||||
18137 | _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].type_id = guid_t_type_id; | ||||
18138 | _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].member_id = element; | ||||
18139 | break; | ||||
18140 | case 4: | ||||
18141 | /* GUID_t reader_guid */ | ||||
18142 | _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].flags = 0; | ||||
18143 | g_strlcpy(_builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].member_name, "reader_gid", MAX_MEMBER_NAME(256)); | ||||
18144 | _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].type_id = guid_t_type_id; | ||||
18145 | _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].member_id = element; | ||||
18146 | break; | ||||
18147 | case 5: | ||||
18148 | /* uint32 reader_group_oid */ | ||||
18149 | _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].flags = 0; | ||||
18150 | 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)); | ||||
18151 | _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; | ||||
18152 | _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].member_id = element; | ||||
18153 | break; | ||||
18154 | case 6: | ||||
18155 | /* boolean complete_snapshot */ | ||||
18156 | _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].flags = 0; | ||||
18157 | g_strlcpy(_builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].member_name, "complete_snapshot", MAX_MEMBER_NAME(256)); | ||||
18158 | _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].type_id = RTI_CDR_TYPE_OBJECT_TYPE_KIND_BOOLEAN_TYPE; | ||||
18159 | _builtin_types_dissection_data->dissection_infos.instance_state_data_response_dissection_info.elements[element].member_id = element; | ||||
18160 | break; | ||||
18161 | } | ||||
18162 | } | ||||
18163 | } | ||||
18164 | |||||
18165 | void proto_register_rtps(void) { | ||||
18166 | |||||
18167 | static hf_register_info hf[] = { | ||||
18168 | { &hf_rtps_ping, { | ||||
18169 | "Ping String", | ||||
18170 | "rtps.ping_str", | ||||
18171 | FT_STRING, | ||||
18172 | BASE_NONE, | ||||
18173 | NULL((void*)0), | ||||
18174 | 0, | ||||
18175 | "RTPS Ping String", | ||||
18176 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18177 | }, | ||||
18178 | { &hf_rtps_magic, { | ||||
18179 | "Magic", | ||||
18180 | "rtps.magic", | ||||
18181 | FT_STRING, | ||||
18182 | BASE_NONE, | ||||
18183 | NULL((void*)0), | ||||
18184 | 0, | ||||
18185 | "RTPS magic", | ||||
18186 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18187 | }, | ||||
18188 | /* Protocol Version (composed as major.minor) -------------------------- */ | ||||
18189 | { &hf_rtps_protocol_version, { | ||||
18190 | "version", | ||||
18191 | "rtps.version", | ||||
18192 | FT_UINT16, | ||||
18193 | BASE_HEX, | ||||
18194 | NULL((void*)0), | ||||
18195 | 0, | ||||
18196 | "RTPS protocol version number", | ||||
18197 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18198 | }, | ||||
18199 | { &hf_rtps_protocol_version_major, { | ||||
18200 | "major", | ||||
18201 | "rtps.version.major", | ||||
18202 | FT_INT8, | ||||
18203 | BASE_DEC, | ||||
18204 | NULL((void*)0), | ||||
18205 | 0, | ||||
18206 | "RTPS major protocol version number", | ||||
18207 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18208 | }, | ||||
18209 | { &hf_rtps_protocol_version_minor, { | ||||
18210 | "minor", | ||||
18211 | "rtps.version.minor", | ||||
18212 | FT_INT8, | ||||
18213 | BASE_DEC, | ||||
18214 | NULL((void*)0), | ||||
18215 | 0, | ||||
18216 | "RTPS minor protocol version number", | ||||
18217 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18218 | }, | ||||
18219 | |||||
18220 | /* Domain Participant and Participant Index ---------------------------- */ | ||||
18221 | { &hf_rtps_domain_id, { | ||||
18222 | "domain_id", | ||||
18223 | "rtps.domain_id", | ||||
18224 | FT_UINT32, | ||||
18225 | BASE_DEC, | ||||
18226 | NULL((void*)0), | ||||
18227 | 0, | ||||
18228 | "Domain ID", | ||||
18229 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18230 | }, | ||||
18231 | |||||
18232 | { &hf_rtps_domain_tag, { | ||||
18233 | "domain_tag", | ||||
18234 | "rtps.domain_tag", | ||||
18235 | FT_STRINGZ, | ||||
18236 | BASE_NONE, | ||||
18237 | NULL((void*)0), | ||||
18238 | 0, | ||||
18239 | "Domain Tag ID", | ||||
18240 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18241 | }, | ||||
18242 | |||||
18243 | { &hf_rtps_participant_idx, { | ||||
18244 | "participant_idx", | ||||
18245 | "rtps.participant_idx", | ||||
18246 | FT_UINT32, | ||||
18247 | BASE_DEC, | ||||
18248 | NULL((void*)0), | ||||
18249 | 0, | ||||
18250 | "Participant index", | ||||
18251 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18252 | }, | ||||
18253 | { &hf_rtps_nature_type, { | ||||
18254 | "traffic_nature", | ||||
18255 | "rtps.traffic_nature", | ||||
18256 | FT_UINT32, | ||||
18257 | BASE_DEC, | ||||
18258 | VALS(nature_type_vals)((0 ? (const struct _value_string*)0 : ((nature_type_vals)))), | ||||
18259 | 0, | ||||
18260 | "Nature of the traffic (meta/user-traffic uni/multi-cast)", | ||||
18261 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18262 | }, | ||||
18263 | |||||
18264 | /* Vendor ID ----------------------------------------------------------- */ | ||||
18265 | { &hf_rtps_vendor_id, { | ||||
18266 | "vendorId", | ||||
18267 | "rtps.vendorId", | ||||
18268 | FT_UINT16, | ||||
18269 | BASE_HEX, | ||||
18270 | NULL((void*)0), | ||||
18271 | 0, | ||||
18272 | "Unique identifier of the DDS vendor that generated this packet", | ||||
18273 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18274 | }, | ||||
18275 | |||||
18276 | /* Guid Prefix for the Packet ------------------------------------------ */ | ||||
18277 | { &hf_rtps_guid_prefix_v1, | ||||
18278 | { "guidPrefix", "rtps.guidPrefix_v1", | ||||
18279 | FT_UINT64, BASE_HEX, NULL((void*)0), 0, | ||||
18280 | "GuidPrefix of the RTPS packet", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18281 | }, | ||||
18282 | |||||
18283 | { &hf_rtps_guid_prefix, | ||||
18284 | { "guidPrefix", "rtps.guidPrefix", | ||||
18285 | FT_BYTES, BASE_NONE, NULL((void*)0), 0, | ||||
18286 | "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) } | ||||
18287 | }, | ||||
18288 | |||||
18289 | { &hf_rtps_guid_prefix_src, | ||||
18290 | { "guidPrefix", "rtps.guidPrefix.src", | ||||
18291 | FT_BYTES, BASE_NONE, NULL((void*)0), 0, | ||||
18292 | "the guidPrefix of the entity sending the sample", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18293 | }, | ||||
18294 | |||||
18295 | { &hf_rtps_guid_prefix_dst, | ||||
18296 | { "guidPrefix", "rtps.guidPrefix.dst", | ||||
18297 | FT_BYTES, BASE_NONE, NULL((void*)0), 0, | ||||
18298 | "the guidPrefix of the entity receiving the sample", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18299 | }, | ||||
18300 | |||||
18301 | /* Host ID ------------------------------------------------------------- */ | ||||
18302 | { &hf_rtps_host_id, { /* HIDDEN */ | ||||
18303 | "hostId", | ||||
18304 | "rtps.hostId", | ||||
18305 | FT_UINT32, | ||||
18306 | BASE_HEX, | ||||
18307 | NULL((void*)0), | ||||
18308 | 0, | ||||
18309 | "Sub-component 'hostId' of the GuidPrefix of the RTPS packet", | ||||
18310 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18311 | }, | ||||
18312 | |||||
18313 | /* AppID (composed as instanceId, appKind) ----------------------------- */ | ||||
18314 | { &hf_rtps_app_id, { | ||||
18315 | "appId", | ||||
18316 | "rtps.appId", | ||||
18317 | FT_UINT32, | ||||
18318 | BASE_HEX, | ||||
18319 | NULL((void*)0), | ||||
18320 | 0, | ||||
18321 | "Sub-component 'appId' of the GuidPrefix of the RTPS packet", | ||||
18322 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18323 | }, | ||||
18324 | { &hf_rtps_app_id_instance_id, { | ||||
18325 | "appId.instanceId", | ||||
18326 | "rtps.appId.instanceId", | ||||
18327 | FT_UINT24, | ||||
18328 | BASE_HEX, | ||||
18329 | NULL((void*)0), | ||||
18330 | 0, | ||||
18331 | "'instanceId' field of the 'AppId' structure", | ||||
18332 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18333 | }, | ||||
18334 | { &hf_rtps_app_id_app_kind, { | ||||
18335 | "appid.appKind", | ||||
18336 | "rtps.appId.appKind", | ||||
18337 | FT_UINT8, | ||||
18338 | BASE_HEX, | ||||
18339 | VALS(app_kind_vals)((0 ? (const struct _value_string*)0 : ((app_kind_vals)))), | ||||
18340 | 0, | ||||
18341 | "'appKind' field of the 'AppId' structure", | ||||
18342 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18343 | }, | ||||
18344 | |||||
18345 | |||||
18346 | |||||
18347 | /* Submessage ID ------------------------------------------------------- */ | ||||
18348 | { &hf_rtps_sm_id, { | ||||
18349 | "submessageId", | ||||
18350 | "rtps.sm.id", | ||||
18351 | FT_UINT8, | ||||
18352 | BASE_HEX, | ||||
18353 | VALS(submessage_id_vals)((0 ? (const struct _value_string*)0 : ((submessage_id_vals)) )), | ||||
18354 | 0, | ||||
18355 | "defines the type of submessage", | ||||
18356 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18357 | }, | ||||
18358 | |||||
18359 | { &hf_rtps_sm_idv2, { | ||||
18360 | "submessageId", | ||||
18361 | "rtps.sm.id", | ||||
18362 | FT_UINT8, | ||||
18363 | BASE_HEX, | ||||
18364 | VALS(submessage_id_valsv2)((0 ? (const struct _value_string*)0 : ((submessage_id_valsv2 )))), | ||||
18365 | 0, | ||||
18366 | "defines the type of submessage", | ||||
18367 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18368 | }, | ||||
18369 | |||||
18370 | /* Submessage flags ---------------------------------------------------- */ | ||||
18371 | { &hf_rtps_sm_flags, { | ||||
18372 | "Flags", | ||||
18373 | "rtps.sm.flags", | ||||
18374 | FT_UINT8, | ||||
18375 | BASE_HEX, | ||||
18376 | NULL((void*)0), | ||||
18377 | 0, | ||||
18378 | "bitmask representing the flags associated with a submessage", | ||||
18379 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18380 | }, | ||||
18381 | { &hf_rtps_sm_flags2, { | ||||
18382 | "Flags", | ||||
18383 | "rtps.sm.flags", | ||||
18384 | FT_UINT16, | ||||
18385 | BASE_HEX, | ||||
18386 | NULL((void*)0), | ||||
18387 | 0, | ||||
18388 | "bitmask representing the flags associated with a submessage", | ||||
18389 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18390 | }, | ||||
18391 | |||||
18392 | /* octets to next header ---------------------------------------------- */ | ||||
18393 | { &hf_rtps_sm_octets_to_next_header, { | ||||
18394 | "octetsToNextHeader", | ||||
18395 | "rtps.sm.octetsToNextHeader", | ||||
18396 | FT_UINT16, | ||||
18397 | BASE_DEC, | ||||
18398 | NULL((void*)0), | ||||
18399 | 0, | ||||
18400 | "Size of the submessage payload", | ||||
18401 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18402 | }, | ||||
18403 | |||||
18404 | /* GUID as {GuidPrefix, EntityId} ------------------------------------ */ | ||||
18405 | { &hf_rtps_sm_guid_prefix_v1, { | ||||
18406 | "guidPrefix", | ||||
18407 | "rtps.sm.guidPrefix_v1", | ||||
18408 | FT_UINT64, | ||||
18409 | BASE_HEX, | ||||
18410 | NULL((void*)0), | ||||
18411 | 0, | ||||
18412 | "a generic guidPrefix that is transmitted inside the submessage (this is NOT the guidPrefix described in the packet header)", | ||||
18413 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18414 | }, | ||||
18415 | |||||
18416 | { &hf_rtps_sm_guid_prefix, { | ||||
18417 | "guidPrefix", | ||||
18418 | "rtps.sm.guidPrefix", | ||||
18419 | FT_BYTES, | ||||
18420 | BASE_NONE, | ||||
18421 | NULL((void*)0), | ||||
18422 | 0, | ||||
18423 | "a generic guidPrefix that is transmitted inside the submessage (this is NOT the guidPrefix described in the packet header)", | ||||
18424 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18425 | }, | ||||
18426 | |||||
18427 | { &hf_rtps_sm_host_id, { | ||||
18428 | "host_id", | ||||
18429 | "rtps.sm.guidPrefix.hostId", | ||||
18430 | FT_UINT32, | ||||
18431 | BASE_HEX, | ||||
18432 | NULL((void*)0), | ||||
18433 | 0, | ||||
18434 | "The hostId component of the rtps.sm.guidPrefix", | ||||
18435 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18436 | }, | ||||
18437 | |||||
18438 | { &hf_rtps_sm_app_id, { | ||||
18439 | "appId", | ||||
18440 | "rtps.sm.guidPrefix.appId", | ||||
18441 | FT_UINT32, | ||||
18442 | BASE_HEX, | ||||
18443 | NULL((void*)0), | ||||
18444 | 0, | ||||
18445 | "AppId component of the rtps.sm.guidPrefix", | ||||
18446 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18447 | }, | ||||
18448 | { &hf_rtps_sm_instance_id_v1, { | ||||
18449 | "instanceId", | ||||
18450 | "rtps.sm.guidPrefix.appId.instanceId", | ||||
18451 | FT_UINT24, | ||||
18452 | BASE_HEX, | ||||
18453 | NULL((void*)0), | ||||
18454 | 0, | ||||
18455 | "instanceId component of the AppId of the rtps.sm.guidPrefix", | ||||
18456 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18457 | }, | ||||
18458 | { &hf_rtps_sm_app_kind, { | ||||
18459 | "appKind", | ||||
18460 | "rtps.sm.guidPrefix.appId.appKind", | ||||
18461 | FT_UINT8, | ||||
18462 | BASE_HEX, | ||||
18463 | NULL((void*)0), | ||||
18464 | 0, | ||||
18465 | "appKind component of the AppId of the rtps.sm.guidPrefix", | ||||
18466 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18467 | }, | ||||
18468 | { &hf_rtps_sm_instance_id, { | ||||
18469 | "instanceId", | ||||
18470 | "rtps.sm.guidPrefix.instanceId", | ||||
18471 | FT_UINT32, | ||||
18472 | BASE_HEX, | ||||
18473 | NULL((void*)0), | ||||
18474 | 0, | ||||
18475 | "instanceId component of the rtps.sm.guidPrefix", | ||||
18476 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18477 | }, | ||||
18478 | |||||
18479 | /* Entity ID (composed as entityKey, entityKind) ----------------------- */ | ||||
18480 | { &hf_rtps_sm_entity_id, { | ||||
18481 | "entityId", | ||||
18482 | "rtps.sm.entityId", | ||||
18483 | FT_UINT32, | ||||
18484 | BASE_HEX, | ||||
18485 | VALS(entity_id_vals)((0 ? (const struct _value_string*)0 : ((entity_id_vals)))), | ||||
18486 | 0, | ||||
18487 | "Object entity ID as it appears in a DATA submessage (keyHashSuffix)", | ||||
18488 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18489 | }, | ||||
18490 | { &hf_rtps_sm_entity_id_key, { | ||||
18491 | "entityKey", | ||||
18492 | "rtps.sm.entityId.entityKey", | ||||
18493 | FT_UINT24, | ||||
18494 | BASE_HEX, | ||||
18495 | NULL((void*)0), | ||||
18496 | 0, | ||||
18497 | "'entityKey' field of the object entity ID", | ||||
18498 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18499 | }, | ||||
18500 | { &hf_rtps_sm_entity_id_kind, { | ||||
18501 | "entityKind", | ||||
18502 | "rtps.sm.entityId.entityKind", | ||||
18503 | FT_UINT8, | ||||
18504 | BASE_HEX, | ||||
18505 | VALS(entity_kind_vals)((0 ? (const struct _value_string*)0 : ((entity_kind_vals)))), | ||||
18506 | 0, | ||||
18507 | "'entityKind' field of the object entity ID", | ||||
18508 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18509 | }, | ||||
18510 | |||||
18511 | { &hf_rtps_sm_rdentity_id, { | ||||
18512 | "readerEntityId", | ||||
18513 | "rtps.sm.rdEntityId", | ||||
18514 | FT_UINT32, | ||||
18515 | BASE_HEX, | ||||
18516 | VALS(entity_id_vals)((0 ? (const struct _value_string*)0 : ((entity_id_vals)))), | ||||
18517 | 0, | ||||
18518 | "Reader entity ID as it appears in a submessage", | ||||
18519 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18520 | }, | ||||
18521 | { &hf_rtps_sm_rdentity_id_key, { | ||||
18522 | "readerEntityKey", | ||||
18523 | "rtps.sm.rdEntityId.entityKey", | ||||
18524 | FT_UINT24, | ||||
18525 | BASE_HEX, | ||||
18526 | NULL((void*)0), | ||||
18527 | 0, | ||||
18528 | "'entityKey' field of the reader entity ID", | ||||
18529 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18530 | }, | ||||
18531 | { &hf_rtps_sm_rdentity_id_kind, { | ||||
18532 | "readerEntityKind", | ||||
18533 | "rtps.sm.rdEntityId.entityKind", | ||||
18534 | FT_UINT8, | ||||
18535 | BASE_HEX, | ||||
18536 | VALS(entity_kind_vals)((0 ? (const struct _value_string*)0 : ((entity_kind_vals)))), | ||||
18537 | 0, | ||||
18538 | "'entityKind' field of the reader entity ID", | ||||
18539 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18540 | }, | ||||
18541 | |||||
18542 | { &hf_rtps_sm_wrentity_id, { | ||||
18543 | "writerEntityId", | ||||
18544 | "rtps.sm.wrEntityId", | ||||
18545 | FT_UINT32, | ||||
18546 | BASE_HEX, | ||||
18547 | VALS(entity_id_vals)((0 ? (const struct _value_string*)0 : ((entity_id_vals)))), | ||||
18548 | 0, | ||||
18549 | "Writer entity ID as it appears in a submessage", | ||||
18550 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18551 | }, | ||||
18552 | { &hf_rtps_sm_wrentity_id_key, { | ||||
18553 | "writerEntityKey", | ||||
18554 | "rtps.sm.wrEntityId.entityKey", | ||||
18555 | FT_UINT24, | ||||
18556 | BASE_HEX, | ||||
18557 | NULL((void*)0), | ||||
18558 | 0, | ||||
18559 | "'entityKey' field of the writer entity ID", | ||||
18560 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18561 | }, | ||||
18562 | { &hf_rtps_sm_wrentity_id_kind, { | ||||
18563 | "writerEntityKind", | ||||
18564 | "rtps.sm.wrEntityId.entityKind", | ||||
18565 | FT_UINT8, | ||||
18566 | BASE_HEX, | ||||
18567 | VALS(entity_kind_vals)((0 ? (const struct _value_string*)0 : ((entity_kind_vals)))), | ||||
18568 | 0, | ||||
18569 | "'entityKind' field of the writer entity ID", | ||||
18570 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18571 | }, | ||||
18572 | |||||
18573 | |||||
18574 | |||||
18575 | /* Sequence number ----------------------------------------------------- */ | ||||
18576 | { &hf_rtps_sm_seq_number, { | ||||
18577 | "writerSeqNumber", | ||||
18578 | "rtps.sm.seqNumber", | ||||
18579 | FT_INT64, | ||||
18580 | BASE_DEC, | ||||
18581 | NULL((void*)0), | ||||
18582 | 0, | ||||
18583 | "Writer sequence number", | ||||
18584 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18585 | }, | ||||
18586 | |||||
18587 | { &hf_rtps_info_src_ip, { | ||||
18588 | "appIpAddress", | ||||
18589 | "rtps.info_src.ip", | ||||
18590 | FT_IPv4, | ||||
18591 | BASE_NONE, | ||||
18592 | NULL((void*)0), | ||||
18593 | 0, | ||||
18594 | NULL((void*)0), | ||||
18595 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18596 | }, | ||||
18597 | |||||
18598 | { &hf_rtps_info_src_unused, { | ||||
18599 | "Unused", | ||||
18600 | "rtps.info_src.unused", | ||||
18601 | FT_UINT32, | ||||
18602 | BASE_HEX, | ||||
18603 | NULL((void*)0), | ||||
18604 | 0, | ||||
18605 | NULL((void*)0), | ||||
18606 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18607 | }, | ||||
18608 | |||||
18609 | /* Parameter Id -------------------------------------------------------- */ | ||||
18610 | { &hf_rtps_parameter_id, { | ||||
18611 | "parameterId", | ||||
18612 | "rtps.param.id", | ||||
18613 | FT_UINT16, | ||||
18614 | BASE_HEX, | ||||
18615 | VALS(parameter_id_vals)((0 ? (const struct _value_string*)0 : ((parameter_id_vals))) ), | ||||
18616 | 0, | ||||
18617 | "Parameter Id", | ||||
18618 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18619 | }, | ||||
18620 | |||||
18621 | { &hf_rtps_parameter_id_v2, { | ||||
18622 | "parameterId", | ||||
18623 | "rtps.param.id", | ||||
18624 | FT_UINT16, | ||||
18625 | BASE_HEX, | ||||
18626 | VALS(parameter_id_v2_vals)((0 ? (const struct _value_string*)0 : ((parameter_id_v2_vals )))), | ||||
18627 | 0, | ||||
18628 | "Parameter Id", | ||||
18629 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18630 | }, | ||||
18631 | |||||
18632 | { &hf_rtps_parameter_id_inline_rti, { | ||||
18633 | "Parameter Id", "rtps.param.id", FT_UINT16, | ||||
18634 | 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) } | ||||
18635 | }, | ||||
18636 | |||||
18637 | { &hf_rtps_parameter_id_toc, { | ||||
18638 | "parameterId", | ||||
18639 | "rtps.param.id", | ||||
18640 | FT_UINT16, | ||||
18641 | BASE_HEX, | ||||
18642 | VALS(parameter_id_toc_vals)((0 ? (const struct _value_string*)0 : ((parameter_id_toc_vals )))), | ||||
18643 | 0, | ||||
18644 | "Parameter Id", | ||||
18645 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18646 | }, | ||||
18647 | |||||
18648 | { &hf_rtps_parameter_id_rti, { | ||||
18649 | "parameterId", | ||||
18650 | "rtps.param.id", | ||||
18651 | FT_UINT16, | ||||
18652 | BASE_HEX, | ||||
18653 | VALS(parameter_id_rti_vals)((0 ? (const struct _value_string*)0 : ((parameter_id_rti_vals )))), | ||||
18654 | 0, | ||||
18655 | "Parameter Id", | ||||
18656 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18657 | }, | ||||
18658 | |||||
18659 | { &hf_rtps_parameter_id_adl, { | ||||
18660 | "parameterId", | ||||
18661 | "rtps.param.id", | ||||
18662 | FT_UINT16, | ||||
18663 | BASE_HEX, | ||||
18664 | VALS(parameter_id_adl_vals)((0 ? (const struct _value_string*)0 : ((parameter_id_adl_vals )))), | ||||
18665 | 0, | ||||
18666 | "Parameter Id", | ||||
18667 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18668 | }, | ||||
18669 | |||||
18670 | /* Parameter Length ---------------------------------------------------- */ | ||||
18671 | { &hf_rtps_parameter_length, { | ||||
18672 | "parameterLength", | ||||
18673 | "rtps.param.length", | ||||
18674 | FT_UINT16, | ||||
18675 | BASE_DEC, | ||||
18676 | NULL((void*)0), | ||||
18677 | 0, | ||||
18678 | "Parameter Length", | ||||
18679 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18680 | }, | ||||
18681 | |||||
18682 | /* String Length ---------------------------------------------------- */ | ||||
18683 | { &hf_rtps_string_length, { | ||||
18684 | "String length", | ||||
18685 | "rtps.param.string.length", | ||||
18686 | FT_UINT32, | ||||
18687 | BASE_DEC, | ||||
18688 | NULL((void*)0), | ||||
18689 | 0, | ||||
18690 | NULL((void*)0), | ||||
18691 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18692 | }, | ||||
18693 | |||||
18694 | /* Parameter / Topic --------------------------------------------------- */ | ||||
18695 | { &hf_rtps_param_topic_name, { | ||||
18696 | "topic", | ||||
18697 | "rtps.param.topicName", | ||||
18698 | FT_STRINGZ, | ||||
18699 | BASE_NONE, | ||||
18700 | NULL((void*)0), | ||||
18701 | 0, | ||||
18702 | "String representing the value value of a PID_TOPIC parameter", | ||||
18703 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18704 | }, | ||||
18705 | |||||
18706 | /* Parameter / Strength ------------------------------------------------ */ | ||||
18707 | { &hf_rtps_param_strength, { | ||||
18708 | "strength", | ||||
18709 | "rtps.param.strength", | ||||
18710 | FT_INT32, | ||||
18711 | BASE_DEC, | ||||
18712 | NULL((void*)0), | ||||
18713 | 0, | ||||
18714 | "Decimal value representing the value of a PID_OWNERSHIP_STRENGTH parameter", | ||||
18715 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18716 | }, | ||||
18717 | |||||
18718 | /* Parameter / Type Name ----------------------------------------------- */ | ||||
18719 | { &hf_rtps_param_type_name, { | ||||
18720 | "typeName", | ||||
18721 | "rtps.param.typeName", | ||||
18722 | FT_STRINGZ, | ||||
18723 | BASE_NONE, | ||||
18724 | NULL((void*)0), | ||||
18725 | 0, | ||||
18726 | "String representing the value of a PID_TYPE_NAME parameter", | ||||
18727 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18728 | }, | ||||
18729 | |||||
18730 | /* Parameter / User Data ----------------------------------------------- */ | ||||
18731 | { &hf_rtps_param_user_data, { | ||||
18732 | "userData", | ||||
18733 | "rtps.param.userData", | ||||
18734 | FT_BYTES, | ||||
18735 | BASE_NONE, | ||||
18736 | NULL((void*)0), | ||||
18737 | 0, | ||||
18738 | "The user data sent in a PID_USER_DATA parameter", | ||||
18739 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18740 | }, | ||||
18741 | |||||
18742 | /* Parameter / Group Data ---------------------------------------------- */ | ||||
18743 | { &hf_rtps_param_group_data, { | ||||
18744 | "groupData", | ||||
18745 | "rtps.param.groupData", | ||||
18746 | FT_BYTES, | ||||
18747 | BASE_NONE, | ||||
18748 | NULL((void*)0), | ||||
18749 | 0, | ||||
18750 | "The user data sent in a PID_GROUP_DATA parameter", | ||||
18751 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18752 | }, | ||||
18753 | |||||
18754 | { &hf_rtps_transportInfo_classId, { | ||||
18755 | "classID", | ||||
18756 | "rtps.transportInfo.classID", | ||||
18757 | FT_INT32, | ||||
18758 | BASE_DEC, | ||||
18759 | NULL((void*)0), | ||||
18760 | 0, | ||||
18761 | "Class ID of transport", | ||||
18762 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18763 | }, | ||||
18764 | |||||
18765 | { &hf_rtps_transportInfo_messageSizeMax, { | ||||
18766 | "messageSizeMax", | ||||
18767 | "rtps.transportInfo.messageSizeMax", | ||||
18768 | FT_INT32, | ||||
18769 | BASE_DEC, | ||||
18770 | NULL((void*)0), | ||||
18771 | 0, | ||||
18772 | "Maximum message size of transport", | ||||
18773 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18774 | }, | ||||
18775 | { &hf_rtps_coherent_set_start, { | ||||
18776 | "Coherent set start", | ||||
18777 | "rtps.coherent_set.start", | ||||
18778 | FT_UINT64, | ||||
18779 | BASE_DEC, | ||||
18780 | NULL((void*)0), | ||||
18781 | 0, | ||||
18782 | "Start of a coherent set", | ||||
18783 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18784 | }, | ||||
18785 | |||||
18786 | { &hf_rtps_coherent_set_end, { | ||||
18787 | "End of coherent set sequence", | ||||
18788 | "rtps.coherent_set.end", | ||||
18789 | FT_UINT64, | ||||
18790 | BASE_DEC, | ||||
18791 | NULL((void*)0), | ||||
18792 | 0, | ||||
18793 | "End of a coherent set", | ||||
18794 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18795 | }, | ||||
18796 | |||||
18797 | /* Parameter / Topic Data ---------------------------------------------- */ | ||||
18798 | { &hf_rtps_param_topic_data, { | ||||
18799 | "topicData", | ||||
18800 | "rtps.param.topicData", | ||||
18801 | FT_BYTES, | ||||
18802 | BASE_NONE, | ||||
18803 | NULL((void*)0), | ||||
18804 | 0, | ||||
18805 | "The user data sent in a PID_TOPIC_DATA parameter", | ||||
18806 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18807 | }, | ||||
18808 | |||||
18809 | |||||
18810 | /* Parameter / Content Filter Name ------------------------------------- */ | ||||
18811 | { &hf_rtps_param_content_filter_topic_name, { | ||||
18812 | "contentFilterTopicName", | ||||
18813 | "rtps.param.contentFilterTopicName", | ||||
18814 | FT_STRINGZ, | ||||
18815 | BASE_NONE, | ||||
18816 | NULL((void*)0), | ||||
18817 | 0, | ||||
18818 | "Value of the content filter topic name as sent in a PID_CONTENT_FILTER_PROPERTY parameter", | ||||
18819 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18820 | }, | ||||
18821 | { &hf_rtps_param_related_topic_name, { | ||||
18822 | "relatedTopicName", | ||||
18823 | "rtps.param.relatedTopicName", | ||||
18824 | FT_STRINGZ, | ||||
18825 | BASE_NONE, | ||||
18826 | NULL((void*)0), | ||||
18827 | 0, | ||||
18828 | "Value of the related topic name as sent in a PID_CONTENT_FILTER_PROPERTY parameter", | ||||
18829 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18830 | }, | ||||
18831 | { &hf_rtps_param_filter_class_name, { | ||||
18832 | "filterClassName", | ||||
18833 | "rtps.param.filterClassName", | ||||
18834 | FT_STRINGZ, | ||||
18835 | BASE_NONE, | ||||
18836 | NULL((void*)0), | ||||
18837 | 0, | ||||
18838 | "Value of the filter class name as sent in a PID_CONTENT_FILTER_PROPERTY parameter", | ||||
18839 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18840 | }, | ||||
18841 | |||||
18842 | { &hf_rtps_durability_service_cleanup_delay, | ||||
18843 | { "Service Cleanup Delay", "rtps.durability.service_cleanup_delay", | ||||
18844 | FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL((void*)0), 0, | ||||
18845 | "Time using the RTPS time_t standard format", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18846 | }, | ||||
18847 | |||||
18848 | { &hf_rtps_liveliness_lease_duration, | ||||
18849 | { "Lease Duration", "rtps.liveliness.lease_duration", | ||||
18850 | FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL((void*)0), 0, | ||||
18851 | "Time using the RTPS time_t standard format", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18852 | }, | ||||
18853 | |||||
18854 | { &hf_rtps_participant_lease_duration, | ||||
18855 | { "Duration", "rtps.participant_lease_duration", | ||||
18856 | FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL((void*)0), 0, | ||||
18857 | "Time using the RTPS time_t standard format", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18858 | }, | ||||
18859 | |||||
18860 | { &hf_rtps_time_based_filter_minimum_separation, | ||||
18861 | { "Minimum Separation", "rtps.time_based_filter.minimum_separation", | ||||
18862 | FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL((void*)0), 0, | ||||
18863 | "Time using the RTPS time_t standard format", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18864 | }, | ||||
18865 | |||||
18866 | { &hf_rtps_reliability_max_blocking_time, | ||||
18867 | { "Max Blocking Time", "rtps.reliability.max_blocking_time", | ||||
18868 | FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL((void*)0), 0, | ||||
18869 | "Time using the RTPS time_t standard format", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18870 | }, | ||||
18871 | |||||
18872 | { &hf_rtps_deadline_period, | ||||
18873 | { "Period", "rtps.deadline_period", | ||||
18874 | FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL((void*)0), 0, | ||||
18875 | "Time using the RTPS time_t standard format", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18876 | }, | ||||
18877 | |||||
18878 | { &hf_rtps_latency_budget_duration, | ||||
18879 | { "Duration", "rtps.latency_budget.duration", | ||||
18880 | FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL((void*)0), 0, | ||||
18881 | "Time using the RTPS time_t standard format", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18882 | }, | ||||
18883 | |||||
18884 | { &hf_rtps_lifespan_duration, | ||||
18885 | { "Duration", "rtps.lifespan", | ||||
18886 | FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL((void*)0), 0, | ||||
18887 | "Time using the RTPS time_t standard format", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18888 | }, | ||||
18889 | |||||
18890 | { &hf_rtps_persistence, | ||||
18891 | { "Persistence", "rtps.persistence", | ||||
18892 | FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL((void*)0), 0, | ||||
18893 | "Time using the RTPS time_t standard format", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18894 | }, | ||||
18895 | |||||
18896 | { &hf_rtps_info_ts_timestamp, | ||||
18897 | { "Timestamp", "rtps.info_ts.timestamp", | ||||
18898 | FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL((void*)0), 0, | ||||
18899 | "Time using the RTPS time_t standard format", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18900 | }, | ||||
18901 | |||||
18902 | { &hf_rtps_timestamp, | ||||
18903 | { "Timestamp", "rtps.timestamp", | ||||
18904 | FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL((void*)0), 0, | ||||
18905 | "Time using the RTPS time_t standard format", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18906 | }, | ||||
18907 | |||||
18908 | { &hf_rtps_locator_kind, | ||||
18909 | { "Kind", "rtps.locator.kind", | ||||
18910 | FT_UINT32, BASE_HEX, VALS(rtps_locator_kind_vals)((0 ? (const struct _value_string*)0 : ((rtps_locator_kind_vals )))), 0, | ||||
18911 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18912 | }, | ||||
18913 | |||||
18914 | { &hf_rtps_locator_port, | ||||
18915 | { "Port", "rtps.locator.port", | ||||
18916 | FT_UINT32, BASE_DEC, NULL((void*)0), 0, | ||||
18917 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18918 | }, | ||||
18919 | #if 0 | ||||
18920 | { &hf_rtps_logical_port, | ||||
18921 | { "RTPS Logical Port", "rtps.locator.port", | ||||
18922 | FT_INT32, BASE_DEC, NULL((void*)0), 0, | ||||
18923 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18924 | }, | ||||
18925 | #endif | ||||
18926 | { &hf_rtps_locator_public_address_port, | ||||
18927 | { "Public Address Port", "rtps.locator.public_address_port", | ||||
18928 | FT_INT32, BASE_DEC, NULL((void*)0), 0, | ||||
18929 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18930 | }, | ||||
18931 | |||||
18932 | { &hf_rtps_locator_ipv4, | ||||
18933 | { "Address", "rtps.locator.ipv4", | ||||
18934 | FT_IPv4, BASE_NONE, NULL((void*)0), 0, | ||||
18935 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18936 | }, | ||||
18937 | |||||
18938 | { &hf_rtps_locator_ipv6, | ||||
18939 | { "Address", "rtps.locator.ipv6", | ||||
18940 | FT_IPv6, BASE_NONE, NULL((void*)0), 0, | ||||
18941 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18942 | }, | ||||
18943 | |||||
18944 | { &hf_rtps_participant_builtin_endpoints, | ||||
18945 | { "BuiltIn Endpoint", "rtps.participant_builtin_endpoints", | ||||
18946 | FT_UINT32, BASE_HEX, NULL((void*)0), 0, | ||||
18947 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18948 | }, | ||||
18949 | |||||
18950 | { &hf_rtps_participant_manual_liveliness_count, | ||||
18951 | { "Manual Liveliness Count", "rtps.participant_manual_liveliness_count", | ||||
18952 | FT_UINT32, BASE_HEX, NULL((void*)0), 0, | ||||
18953 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18954 | }, | ||||
18955 | |||||
18956 | { &hf_rtps_history_depth, | ||||
18957 | { "Depth", "rtps.history_depth", | ||||
18958 | FT_INT32, BASE_DEC, NULL((void*)0), 0, | ||||
18959 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18960 | }, | ||||
18961 | |||||
18962 | { &hf_rtps_resource_limit_max_samples, | ||||
18963 | { "Max Samples", "rtps.resource_limit.max_samples", | ||||
18964 | FT_INT32, BASE_DEC, NULL((void*)0), 0, | ||||
18965 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18966 | }, | ||||
18967 | |||||
18968 | { &hf_rtps_resource_limit_max_instances, | ||||
18969 | { "Max Instances", "rtps.resource_limit.max_instances", | ||||
18970 | FT_INT32, BASE_DEC, NULL((void*)0), 0, | ||||
18971 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18972 | }, | ||||
18973 | |||||
18974 | { &hf_rtps_resource_limit_max_samples_per_instances, | ||||
18975 | { "Max Samples Per Instance", "rtps.resource_limit.max_samples_per_instance", | ||||
18976 | FT_INT32, BASE_DEC, NULL((void*)0), 0, | ||||
18977 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18978 | }, | ||||
18979 | |||||
18980 | { &hf_rtps_filter_bitmap, | ||||
18981 | { "Filter Bitmap", "rtps.filter_bitmap", | ||||
18982 | FT_UINT32, BASE_HEX, NULL((void*)0), 0, | ||||
18983 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18984 | }, | ||||
18985 | |||||
18986 | { &hf_rtps_type_checksum, | ||||
18987 | { "Checksum", "rtps.type_checksum", | ||||
18988 | FT_UINT32, BASE_HEX, NULL((void*)0), 0, | ||||
18989 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18990 | }, | ||||
18991 | |||||
18992 | { &hf_rtps_queue_size, | ||||
18993 | { "queueSize", "rtps.queue_size", | ||||
18994 | FT_UINT32, BASE_HEX, NULL((void*)0), 0, | ||||
18995 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
18996 | }, | ||||
18997 | |||||
18998 | { &hf_rtps_acknack_count, | ||||
18999 | { "Count", "rtps.acknack.count", | ||||
19000 | FT_INT32, BASE_DEC, NULL((void*)0), 0, | ||||
19001 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19002 | }, | ||||
19003 | |||||
19004 | { &hf_rtps_param_app_ack_virtual_writer_count, | ||||
19005 | { "virtualWriterCount", "rtps.app_ack.virtual_writer_count", | ||||
19006 | FT_INT32, BASE_DEC, NULL((void*)0), 0, | ||||
19007 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19008 | }, | ||||
19009 | |||||
19010 | { &hf_rtps_param_app_ack_count, | ||||
19011 | { "count", "rtps.app_ack.count", | ||||
19012 | FT_INT32, BASE_DEC, NULL((void*)0), 0, | ||||
19013 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19014 | }, | ||||
19015 | |||||
19016 | { &hf_rtps_param_app_ack_conf_virtual_writer_count, | ||||
19017 | { "virtualWriterCount", "rtps.app_ack_conf.virtual_writer_count", | ||||
19018 | FT_UINT32, BASE_DEC, NULL((void*)0), 0, | ||||
19019 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19020 | }, | ||||
19021 | |||||
19022 | { &hf_rtps_param_app_ack_conf_count, | ||||
19023 | { "count", "rtps.app_ack_conf.count", | ||||
19024 | FT_INT32, BASE_DEC, NULL((void*)0), 0, | ||||
19025 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19026 | }, | ||||
19027 | |||||
19028 | { &hf_rtps_param_app_ack_interval_payload_length, | ||||
19029 | { "intervalPayloadLength", "rtps.app_ack.interval_payload_length", | ||||
19030 | FT_INT16, BASE_DEC, NULL((void*)0), 0, | ||||
19031 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19032 | }, | ||||
19033 | |||||
19034 | { &hf_rtps_param_app_ack_interval_flags, | ||||
19035 | { "intervalFlags", "rtps.app_ack.interval_flags", | ||||
19036 | FT_INT16, BASE_DEC, NULL((void*)0), 0, | ||||
19037 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19038 | }, | ||||
19039 | |||||
19040 | { &hf_rtps_param_app_ack_interval_count, | ||||
19041 | { "intervalCount", "rtps.app_ack.interval_count", | ||||
19042 | FT_INT16, BASE_DEC, NULL((void*)0), 0, | ||||
19043 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19044 | }, | ||||
19045 | |||||
19046 | { &hf_rtps_param_app_ack_octets_to_next_virtual_writer, | ||||
19047 | { "octetsToNextVirtualWriter", "rtps.app_ack.octets_to_next_virtual_writer", | ||||
19048 | FT_INT16, BASE_DEC, NULL((void*)0), 0, | ||||
19049 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19050 | }, | ||||
19051 | |||||
19052 | { &hf_rtps_durability_service_history_kind, | ||||
19053 | { "History Kind", "rtps.durability_service.history_kind", | ||||
19054 | FT_UINT32, BASE_HEX, VALS(history_qos_vals)((0 ? (const struct _value_string*)0 : ((history_qos_vals)))), 0, | ||||
19055 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19056 | }, | ||||
19057 | |||||
19058 | { &hf_rtps_durability_service_history_depth, | ||||
19059 | { "History Depth", "rtps.durability_service.history_depth", | ||||
19060 | FT_INT32, BASE_DEC, NULL((void*)0), 0, | ||||
19061 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19062 | }, | ||||
19063 | |||||
19064 | { &hf_rtps_durability_service_max_samples, | ||||
19065 | { "Max Samples", "rtps.durability_service.max_samples", | ||||
19066 | FT_INT32, BASE_DEC, NULL((void*)0), 0, | ||||
19067 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19068 | }, | ||||
19069 | |||||
19070 | { &hf_rtps_durability_service_max_instances, | ||||
19071 | { "Max Instances", "rtps.durability_service.max_instances", | ||||
19072 | FT_INT32, BASE_DEC, NULL((void*)0), 0, | ||||
19073 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19074 | }, | ||||
19075 | |||||
19076 | { &hf_rtps_durability_service_max_samples_per_instances, | ||||
19077 | { "Max Samples Per Instance", "rtps.durability_service.max_samples_per_instance", | ||||
19078 | FT_INT32, BASE_DEC, NULL((void*)0), 0, | ||||
19079 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19080 | }, | ||||
19081 | |||||
19082 | { &hf_rtps_liveliness_kind, | ||||
19083 | { "Kind", "rtps.liveliness.kind", | ||||
19084 | FT_UINT32, BASE_HEX, VALS(liveliness_qos_vals)((0 ? (const struct _value_string*)0 : ((liveliness_qos_vals) ))), 0, | ||||
19085 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19086 | }, | ||||
19087 | |||||
19088 | { &hf_rtps_manager_key, | ||||
19089 | { "Key", "rtps.manager_key", | ||||
19090 | FT_UINT32, BASE_HEX, NULL((void*)0), 0, | ||||
19091 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19092 | }, | ||||
19093 | |||||
19094 | { &hf_rtps_locator_udp_v4, | ||||
19095 | { "Address", "rtps.locator_udp_v4.ip", | ||||
19096 | FT_IPv4, BASE_NONE, NULL((void*)0), 0, | ||||
19097 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19098 | }, | ||||
19099 | |||||
19100 | { &hf_rtps_locator_udp_v4_port, | ||||
19101 | { "Port", "rtps.locator_udp_v4.port", | ||||
19102 | FT_UINT32, BASE_HEX, NULL((void*)0), 0, | ||||
19103 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19104 | }, | ||||
19105 | |||||
19106 | { &hf_param_ip_address, | ||||
19107 | { "Address", "rtps.param.ip_address", | ||||
19108 | FT_IPv4, BASE_NONE, NULL((void*)0), 0, | ||||
19109 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19110 | }, | ||||
19111 | |||||
19112 | { &hf_rtps_param_port, | ||||
19113 | { "Port", "rtps.param.port", | ||||
19114 | FT_UINT32, BASE_HEX, NULL((void*)0), 0, | ||||
19115 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19116 | }, | ||||
19117 | |||||
19118 | { &hf_rtps_expects_inline_qos, | ||||
19119 | { "Inline QoS", "rtps.expects_inline_qos", | ||||
19120 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0, | ||||
19121 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19122 | }, | ||||
19123 | |||||
19124 | { &hf_rtps_presentation_coherent_access, | ||||
19125 | { "Coherent Access", "rtps.presentation.coherent_access", | ||||
19126 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0, | ||||
19127 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19128 | }, | ||||
19129 | |||||
19130 | { &hf_rtps_presentation_ordered_access, | ||||
19131 | { "Ordered Access", "rtps.presentation.ordered_access", | ||||
19132 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0, | ||||
19133 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19134 | }, | ||||
19135 | |||||
19136 | { &hf_rtps_direct_communication, | ||||
19137 | { "Direct Communication", "rtps.direct_communication", | ||||
19138 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0, | ||||
19139 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19140 | }, | ||||
19141 | |||||
19142 | { &hf_rtps_expects_ack, | ||||
19143 | { "expectsAck", "rtps.expects_ack", | ||||
19144 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0, | ||||
19145 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19146 | }, | ||||
19147 | |||||
19148 | { &hf_rtps_expects_virtual_heartbeat, | ||||
19149 | { "expectsVirtualHB", "rtps.expects_virtual_heartbeat", | ||||
19150 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0, | ||||
19151 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19152 | }, | ||||
19153 | |||||
19154 | { &hf_rtps_reliability_kind, | ||||
19155 | { "Kind", "rtps.reliability_kind", | ||||
19156 | FT_UINT32, BASE_HEX, VALS(reliability_qos_vals)((0 ? (const struct _value_string*)0 : ((reliability_qos_vals )))), 0, | ||||
19157 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19158 | }, | ||||
19159 | |||||
19160 | { &hf_rtps_durability, | ||||
19161 | { "Durability", "rtps.durability", | ||||
19162 | FT_UINT32, BASE_HEX, VALS(durability_qos_vals)((0 ? (const struct _value_string*)0 : ((durability_qos_vals) ))), 0, | ||||
19163 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19164 | }, | ||||
19165 | |||||
19166 | { &hf_rtps_ownership, | ||||
19167 | { "Kind", "rtps.ownership", | ||||
19168 | FT_UINT32, BASE_HEX, VALS(ownership_qos_vals)((0 ? (const struct _value_string*)0 : ((ownership_qos_vals)) )), 0, | ||||
19169 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19170 | }, | ||||
19171 | |||||
19172 | { &hf_rtps_presentation_access_scope, | ||||
19173 | { "Access Scope", "rtps.presentation.access_scope", | ||||
19174 | FT_UINT32, BASE_HEX, VALS(presentation_qos_vals)((0 ? (const struct _value_string*)0 : ((presentation_qos_vals )))), 0, | ||||
19175 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19176 | }, | ||||
19177 | |||||
19178 | { &hf_rtps_destination_order, | ||||
19179 | { "Kind", "rtps.destination_order", | ||||
19180 | FT_UINT32, BASE_HEX, VALS(destination_order_qos_vals)((0 ? (const struct _value_string*)0 : ((destination_order_qos_vals )))), 0, | ||||
19181 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19182 | }, | ||||
19183 | |||||
19184 | { &hf_rtps_history_kind, | ||||
19185 | { "Kind", "rtps.history.kind", | ||||
19186 | FT_UINT32, BASE_HEX, VALS(history_qos_vals)((0 ? (const struct _value_string*)0 : ((history_qos_vals)))), 0, | ||||
19187 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19188 | }, | ||||
19189 | |||||
19190 | { &hf_rtps_data_status_info, | ||||
19191 | { "statusInfo", "rtps.data.status_info", | ||||
19192 | FT_UINT32, BASE_HEX, NULL((void*)0), 0, | ||||
19193 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19194 | }, | ||||
19195 | |||||
19196 | { &hf_rtps_param_serialize_encap_kind, | ||||
19197 | { "encapsulation kind", "rtps.param.serialize.encap_kind", | ||||
19198 | FT_UINT16, BASE_HEX, VALS(encapsulation_id_vals)((0 ? (const struct _value_string*)0 : ((encapsulation_id_vals )))), 0, | ||||
19199 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19200 | }, | ||||
19201 | |||||
19202 | { &hf_rtps_param_serialize_encap_len, | ||||
19203 | { "encapsulation options", "rtps.param.serialize.encap_len", | ||||
19204 | FT_UINT16, BASE_HEX, NULL((void*)0), 0, | ||||
19205 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19206 | }, | ||||
19207 | |||||
19208 | /* Parameter / NtpTime ------------------------------------------------- */ | ||||
19209 | { &hf_rtps_param_timestamp_sec, { | ||||
19210 | "seconds", "rtps.param.ntpTime.sec", | ||||
19211 | FT_INT32, BASE_DEC, NULL((void*)0), 0, | ||||
19212 | "The 'second' component of an RTPS time_t", | ||||
19213 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19214 | }, | ||||
19215 | |||||
19216 | { &hf_rtps_param_timestamp_fraction, { | ||||
19217 | "fraction", "rtps.param.ntpTime.fraction", | ||||
19218 | FT_UINT32, BASE_DEC, NULL((void*)0), 0, | ||||
19219 | "The 'fraction' component of an RTPS time_t", | ||||
19220 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19221 | }, | ||||
19222 | |||||
19223 | { &hf_rtps_param_transport_priority, | ||||
19224 | { "Value", "rtps.param.transport_priority", | ||||
19225 | FT_UINT32, BASE_DEC, NULL((void*)0), 0, | ||||
19226 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19227 | }, | ||||
19228 | |||||
19229 | { &hf_rtps_param_type_max_size_serialized, | ||||
19230 | { "Value", "rtps.param.type_max_size_serialized", | ||||
19231 | FT_UINT32, BASE_DEC, NULL((void*)0), 0, | ||||
19232 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19233 | }, | ||||
19234 | |||||
19235 | { &hf_rtps_param_peer_host_epoch, | ||||
19236 | { "Peer Host Epoch", "rtps.param.peer_host_epoch", | ||||
19237 | FT_UINT32, BASE_DEC, NULL((void*)0), 0, | ||||
19238 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19239 | }, | ||||
19240 | |||||
19241 | { &hf_rtps_param_endpoint_property_change_epoch, | ||||
19242 | { "Endpoint Property Change Epoch", "rtps.param.endpoint_property_change_epoch", | ||||
19243 | FT_INT64, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19244 | }, | ||||
19245 | |||||
19246 | { &hf_rtps_param_entity_name, | ||||
19247 | { "entityName", "rtps.param.entityName", | ||||
19248 | FT_STRINGZ, BASE_NONE, NULL((void*)0), 0, | ||||
19249 | "String representing the name of the entity addressed by the submessage", | ||||
19250 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19251 | }, | ||||
19252 | |||||
19253 | { &hf_rtps_param_role_name, | ||||
19254 | { "roleName", "rtps.param.roleName", | ||||
19255 | FT_STRINGZ, BASE_NONE, NULL((void*)0), 0, | ||||
19256 | "String representing the role name of the entity addressed by the submessage", | ||||
19257 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19258 | }, | ||||
19259 | |||||
19260 | { &hf_rtps_disable_positive_ack, | ||||
19261 | { "disablePositiveAcks", "rtps.disable_positive_ack", | ||||
19262 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0, | ||||
19263 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19264 | }, | ||||
19265 | |||||
19266 | { &hf_rtps_participant_guid_v1, | ||||
19267 | { "Participant GUID", "rtps.param.participant_guid_v1", | ||||
19268 | FT_UINT64, BASE_HEX, NULL((void*)0), 0, | ||||
19269 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19270 | }, | ||||
19271 | |||||
19272 | { &hf_rtps_participant_guid, | ||||
19273 | { "Participant GUID", "rtps.param.participant_guid", | ||||
19274 | FT_BYTES, BASE_NONE, NULL((void*)0), 0, | ||||
19275 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19276 | }, | ||||
19277 | |||||
19278 | { &hf_rtps_group_guid_v1, | ||||
19279 | { "Group GUID", "rtps.param.group_guid_v1", | ||||
19280 | FT_UINT64, BASE_HEX, NULL((void*)0), 0, | ||||
19281 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19282 | }, | ||||
19283 | |||||
19284 | { &hf_rtps_group_guid, | ||||
19285 | { "Group GUID", "rtps.param.group_guid", | ||||
19286 | FT_BYTES, BASE_NONE, NULL((void*)0), 0, | ||||
19287 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19288 | }, | ||||
19289 | |||||
19290 | { &hf_rtps_endpoint_guid, | ||||
19291 | { "Endpoint GUID", "rtps.param.endpoint_guid", | ||||
19292 | FT_BYTES, BASE_NONE, NULL((void*)0), 0, | ||||
19293 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19294 | }, | ||||
19295 | |||||
19296 | { &hf_rtps_param_host_id, | ||||
19297 | { "hostId", "rtps.param.guid.hostId", | ||||
19298 | FT_UINT32, BASE_HEX, NULL((void*)0), 0, | ||||
19299 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19300 | }, | ||||
19301 | |||||
19302 | { &hf_rtps_param_app_id, | ||||
19303 | { "appId", "rtps.param.guid.appId", | ||||
19304 | FT_UINT32, BASE_HEX, NULL((void*)0), 0, | ||||
19305 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19306 | }, | ||||
19307 | |||||
19308 | { &hf_rtps_param_instance_id_v1, | ||||
19309 | { "instanceId", "rtps.param.guid.instanceId", | ||||
19310 | FT_UINT24, BASE_HEX, NULL((void*)0), 0, | ||||
19311 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19312 | }, | ||||
19313 | |||||
19314 | { &hf_rtps_param_instance_id, | ||||
19315 | { "instanceId", "rtps.param.guid.instanceId", | ||||
19316 | FT_UINT32, BASE_HEX, NULL((void*)0), 0, | ||||
19317 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19318 | }, | ||||
19319 | |||||
19320 | { &hf_rtps_param_app_kind, | ||||
19321 | { "instanceId", "rtps.param.guid.appKind", | ||||
19322 | FT_UINT8, BASE_HEX, NULL((void*)0), 0, | ||||
19323 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19324 | }, | ||||
19325 | |||||
19326 | { &hf_rtps_param_entity, | ||||
19327 | { "entityId", "rtps.param.guid.entityId", | ||||
19328 | FT_UINT32, BASE_HEX, VALS(entity_id_vals)((0 ? (const struct _value_string*)0 : ((entity_id_vals)))), 0, | ||||
19329 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19330 | }, | ||||
19331 | |||||
19332 | { &hf_rtps_param_entity_key, | ||||
19333 | { "entityKey", "rtps.param.guid.entityKey", | ||||
19334 | FT_UINT24, BASE_HEX, NULL((void*)0), 0, | ||||
19335 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19336 | }, | ||||
19337 | |||||
19338 | { &hf_rtps_param_entity_kind, | ||||
19339 | { "entityKind", "rtps.param.guid.entityKind", | ||||
19340 | FT_UINT8, BASE_HEX, VALS(entity_kind_vals)((0 ? (const struct _value_string*)0 : ((entity_kind_vals)))), 0, | ||||
19341 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19342 | }, | ||||
19343 | |||||
19344 | { &hf_rtps_param_extended_pid_length, | ||||
19345 | { "Extended Length", "rtps.param.extended_pid_length", | ||||
19346 | FT_UINT32, BASE_HEX, NULL((void*)0), 0, | ||||
19347 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19348 | }, | ||||
19349 | |||||
19350 | { &hf_rtps_param_extended_parameter, | ||||
19351 | { "Extended Parameter", "rtps.param.extended_parameter", | ||||
19352 | FT_UINT32, BASE_HEX, NULL((void*)0), 0, | ||||
19353 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19354 | }, | ||||
19355 | |||||
19356 | { &hf_rtps_data_frag_number, | ||||
19357 | { "fragmentStartingNum", "rtps.data_frag.number", | ||||
19358 | FT_UINT32, BASE_DEC, NULL((void*)0), 0, | ||||
19359 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19360 | }, | ||||
19361 | |||||
19362 | { &hf_rtps_data_frag_sample_size, | ||||
19363 | { "sampleSize", "rtps.data_frag.sample_size", | ||||
19364 | FT_UINT32, BASE_DEC, NULL((void*)0), 0, | ||||
19365 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19366 | }, | ||||
19367 | |||||
19368 | { &hf_rtps_data_frag_num_fragments, | ||||
19369 | { "fragmentsInSubmessage", "rtps.data_frag.num_fragments", | ||||
19370 | FT_UINT16, BASE_DEC, NULL((void*)0), 0, | ||||
19371 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19372 | }, | ||||
19373 | |||||
19374 | { &hf_rtps_data_frag_size, | ||||
19375 | { "fragmentSize", "rtps.data_frag.size", | ||||
19376 | FT_UINT16, BASE_DEC, NULL((void*)0), 0, | ||||
19377 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19378 | }, | ||||
19379 | |||||
19380 | { &hf_rtps_nokey_data_frag_number, | ||||
19381 | { "fragmentStartingNum", "rtps.nokey_data_frag.number", | ||||
19382 | FT_UINT32, BASE_DEC, NULL((void*)0), 0, | ||||
19383 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19384 | }, | ||||
19385 | |||||
19386 | { &hf_rtps_nokey_data_frag_num_fragments, | ||||
19387 | { "fragmentsInSubmessage", "rtps.nokey_data_frag.num_fragments", | ||||
19388 | FT_UINT16, BASE_DEC, NULL((void*)0), 0, | ||||
19389 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19390 | }, | ||||
19391 | |||||
19392 | { &hf_rtps_nokey_data_frag_size, | ||||
19393 | { "fragmentSize", "rtps.nokey_data_frag.size", | ||||
19394 | FT_UINT16, BASE_DEC, NULL((void*)0), 0, | ||||
19395 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19396 | }, | ||||
19397 | |||||
19398 | { &hf_rtps_nack_frag_count, | ||||
19399 | { "Count", "rtps.nack_frag.count", | ||||
19400 | FT_INT32, BASE_DEC, NULL((void*)0), 0, | ||||
19401 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19402 | }, | ||||
19403 | |||||
19404 | { &hf_rtps_heartbeat_frag_number, | ||||
19405 | { "lastFragmentNum", "rtps.heartbeat_frag.number", | ||||
19406 | FT_UINT32, BASE_DEC, NULL((void*)0), 0, | ||||
19407 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19408 | }, | ||||
19409 | |||||
19410 | { &hf_rtps_heartbeat_frag_count, | ||||
19411 | { "Count", "rtps.heartbeat_frag.count", | ||||
19412 | FT_UINT32, BASE_DEC, NULL((void*)0), 0, | ||||
19413 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19414 | }, | ||||
19415 | |||||
19416 | { &hf_rtps_heartbeat_batch_count, | ||||
19417 | { "Count", "rtps.heartbeat_batch.count", | ||||
19418 | FT_UINT32, BASE_DEC, NULL((void*)0), 0, | ||||
19419 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19420 | }, | ||||
19421 | |||||
19422 | { &hf_rtps_virtual_heartbeat_count, | ||||
19423 | { "Count", "rtps.virtual_heartbeat.count", | ||||
19424 | FT_UINT32, BASE_DEC, NULL((void*)0), 0, | ||||
19425 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19426 | }, | ||||
19427 | |||||
19428 | { &hf_rtps_virtual_heartbeat_num_virtual_guids, | ||||
19429 | { "numVirtualGUIDs", "rtps.virtual_heartbeat.num_virtual_guids", | ||||
19430 | FT_UINT32, BASE_DEC, NULL((void*)0), 0, | ||||
19431 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19432 | }, | ||||
19433 | |||||
19434 | { &hf_rtps_virtual_heartbeat_num_writers, | ||||
19435 | { "numWriters", "rtps.virtual_heartbeat.num_writers", | ||||
19436 | FT_UINT32, BASE_DEC, NULL((void*)0), 0, | ||||
19437 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19438 | }, | ||||
19439 | |||||
19440 | { &hf_rtps_data_serialize_data, { | ||||
19441 | "serializedData", "rtps.data.serialize_data", | ||||
19442 | FT_BYTES, BASE_NONE, NULL((void*)0), 0, | ||||
19443 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19444 | }, | ||||
19445 | |||||
19446 | { &hf_rtps_parameter_data, { | ||||
19447 | "parameterData", "rtps.parameter_data", | ||||
19448 | FT_BYTES, BASE_NONE, NULL((void*)0), 0, | ||||
19449 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19450 | }, | ||||
19451 | |||||
19452 | { &hf_rtps_data_batch_timestamp, | ||||
19453 | { "Timestamp", "rtps.data_batch.timestamp", | ||||
19454 | FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL((void*)0), 0, | ||||
19455 | "Time using the RTPS time_t standard format", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19456 | }, | ||||
19457 | |||||
19458 | { &hf_rtps_data_batch_offset_to_last_sample_sn, | ||||
19459 | { "offsetToLastSampleSN", "rtps.data_batch.offset_to_last_sample_sn", | ||||
19460 | FT_UINT32, BASE_DEC, NULL((void*)0), 0, | ||||
19461 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19462 | }, | ||||
19463 | |||||
19464 | { &hf_rtps_data_batch_sample_count, | ||||
19465 | { "batchSampleCount", "rtps.data_batch.sample_count", | ||||
19466 | FT_UINT32, BASE_DEC, NULL((void*)0), 0, | ||||
19467 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19468 | }, | ||||
19469 | |||||
19470 | { &hf_rtps_data_batch_offset_sn, | ||||
19471 | { "offsetSN", "rtps.data_batch.offset_sn", | ||||
19472 | FT_UINT32, BASE_DEC, NULL((void*)0), 0, | ||||
19473 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19474 | }, | ||||
19475 | |||||
19476 | { &hf_rtps_data_batch_octets_to_sl_encap_id, | ||||
19477 | { "octetsToSLEncapsulationId", "rtps.data_batch.octets_to_sl_encap_id", | ||||
19478 | FT_UINT32, BASE_DEC, NULL((void*)0), 0, | ||||
19479 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19480 | }, | ||||
19481 | |||||
19482 | { &hf_rtps_data_batch_serialized_data_length, | ||||
19483 | { "serializedDataLength", "rtps.data_batch.serialized_data_length", | ||||
19484 | FT_UINT32, BASE_DEC, NULL((void*)0), 0, | ||||
19485 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19486 | }, | ||||
19487 | |||||
19488 | { &hf_rtps_data_batch_octets_to_inline_qos, | ||||
19489 | { "octetsToInlineQos", "rtps.data_batch.octets_to_inline_qos", | ||||
19490 | FT_UINT16, BASE_DEC, NULL((void*)0), 0, | ||||
19491 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19492 | }, | ||||
19493 | |||||
19494 | { &hf_rtps_fragment_number_base64, | ||||
19495 | { "bitmapBase", "rtps.fragment_number.base64", | ||||
19496 | FT_UINT64, BASE_DEC, NULL((void*)0), 0, | ||||
19497 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19498 | }, | ||||
19499 | |||||
19500 | { &hf_rtps_fragment_number_base, | ||||
19501 | { "bitmapBase", "rtps.fragment_number.base32", | ||||
19502 | FT_UINT32, BASE_DEC, NULL((void*)0), 0, | ||||
19503 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19504 | }, | ||||
19505 | |||||
19506 | { &hf_rtps_fragment_number_num_bits, | ||||
19507 | { "numBits", "rtps.fragment_number.num_bits", | ||||
19508 | FT_UINT32, BASE_DEC, NULL((void*)0), 0, | ||||
19509 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19510 | }, | ||||
19511 | |||||
19512 | { &hf_rtps_bitmap_num_bits, | ||||
19513 | { "numBits", "rtps.bitmap.num_bits", | ||||
19514 | FT_UINT32, BASE_DEC, NULL((void*)0), 0, | ||||
19515 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19516 | }, | ||||
19517 | |||||
19518 | { &hf_rtps_acknack_analysis, | ||||
19519 | { "Acknack Analysis", "rtps.sm.acknack_analysis", | ||||
19520 | FT_UINT32, BASE_DEC, NULL((void*)0), 0, | ||||
19521 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19522 | }, | ||||
19523 | |||||
19524 | { &hf_rtps_param_partition_num, | ||||
19525 | { "Number of partition names", "rtps.param.partition_num", | ||||
19526 | FT_INT32, BASE_DEC, NULL((void*)0), 0, | ||||
19527 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19528 | }, | ||||
19529 | |||||
19530 | { &hf_rtps_param_topic_alias_num, | ||||
19531 | { "Number of topic aliases", "rtps.param.topic_alias_num", | ||||
19532 | FT_INT32, BASE_DEC, NULL((void*)0), 0, | ||||
19533 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19534 | }, | ||||
19535 | |||||
19536 | { &hf_rtps_param_type_alias_num, | ||||
19537 | { "Number of type aliases", "rtps.param.type_alias_num", | ||||
19538 | FT_INT32, BASE_DEC, NULL((void*)0), 0, | ||||
19539 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19540 | }, | ||||
19541 | |||||
19542 | { &hf_rtps_param_expression_parameters_num, | ||||
19543 | { "Number of expression params", "rtps.param.expression_parameters_num", | ||||
19544 | FT_INT32, BASE_DEC, NULL((void*)0), 0, | ||||
19545 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19546 | }, | ||||
19547 | |||||
19548 | { &hf_rtps_param_partition, | ||||
19549 | { "name", "rtps.param.partition", | ||||
19550 | FT_STRING, BASE_NONE, NULL((void*)0), 0, | ||||
19551 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19552 | }, | ||||
19553 | |||||
19554 | { &hf_rtps_param_topic_alias, | ||||
19555 | { "Topic alias", "rtps.param.topic_alias", | ||||
19556 | FT_STRING, BASE_NONE, NULL((void*)0), 0, | ||||
19557 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19558 | }, | ||||
19559 | |||||
19560 | { &hf_rtps_param_type_alias, | ||||
19561 | { "Type alias", "rtps.param.type_alias", | ||||
19562 | FT_STRING, BASE_NONE, NULL((void*)0), 0, | ||||
19563 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19564 | }, | ||||
19565 | |||||
19566 | { &hf_rtps_param_filter_expression, | ||||
19567 | { "filterExpression", "rtps.param.filter_expression", | ||||
19568 | FT_STRING, BASE_NONE, NULL((void*)0), 0, | ||||
19569 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19570 | }, | ||||
19571 | |||||
19572 | { &hf_rtps_param_expression_parameters, | ||||
19573 | { "expressionParameters", "rtps.param.expression_parameters", | ||||
19574 | FT_STRING, BASE_NONE, NULL((void*)0), 0, | ||||
19575 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19576 | }, | ||||
19577 | |||||
19578 | { &hf_rtps_locator_filter_list_num_channels, | ||||
19579 | { "numberOfChannels", "rtps.param.locator_filter_list.num_channels", | ||||
19580 | FT_INT32, BASE_DEC, NULL((void*)0), 0, | ||||
19581 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19582 | }, | ||||
19583 | |||||
19584 | { &hf_rtps_locator_filter_list_filter_name, | ||||
19585 | { "filterName", "rtps.param.locator_filter_list.filter_name", | ||||
19586 | FT_STRING, BASE_NONE, NULL((void*)0), 0, | ||||
19587 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19588 | }, | ||||
19589 | |||||
19590 | { &hf_rtps_locator_filter_list_filter_exp, | ||||
19591 | { "filterExpression", "rtps.param.locator_filter_list.filter_exp", | ||||
19592 | FT_STRING, BASE_NONE, NULL((void*)0), 0, | ||||
19593 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19594 | }, | ||||
19595 | |||||
19596 | { &hf_rtps_extra_flags, | ||||
19597 | { "Extra flags", "rtps.extra_flags", | ||||
19598 | FT_UINT16, BASE_HEX, NULL((void*)0), 0xFFFF, | ||||
19599 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19600 | }, | ||||
19601 | |||||
19602 | { &hf_rtps_param_builtin_endpoint_set_flags, | ||||
19603 | { "Flags", "rtps.param.builtin_endpoint_set", | ||||
19604 | FT_UINT32, BASE_HEX, NULL((void*)0), 0, | ||||
19605 | "bitmask representing the flags in PID_BUILTIN_ENDPOINT_SET", | ||||
19606 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19607 | }, | ||||
19608 | |||||
19609 | { &hf_rtps_param_vendor_builtin_endpoint_set_flags, | ||||
19610 | { "Flags", "rtps.param.vendor_builtin_endpoint_set", | ||||
19611 | FT_UINT32, BASE_HEX, NULL((void*)0), 0, | ||||
19612 | "bitmask representing the flags in PID_VENDOR_BUILTIN_ENDPOINT_SET", | ||||
19613 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19614 | }, | ||||
19615 | |||||
19616 | { &hf_rtps_param_builtin_endpoint_ext_set_flags, | ||||
19617 | { "Flags", "rtps.param.builtin_endpoint_ext_set", | ||||
19618 | FT_UINT32, BASE_HEX, NULL((void*)0), 0, | ||||
19619 | "bitmask representing the flags in PID_AVAILABLE_BUILTIN_ENDPOINTS_EXT", | ||||
19620 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19621 | }, | ||||
19622 | |||||
19623 | { &hf_rtps_param_endpoint_security_attributes, | ||||
19624 | { "Flags", "rtps.param.endpoint_security_attributes", | ||||
19625 | FT_UINT32, BASE_HEX, NULL((void*)0), 0, | ||||
19626 | "bitmask representing the flags in PID_ENDPOINT_SECURITY_ATTRIBUTES", | ||||
19627 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19628 | }, | ||||
19629 | |||||
19630 | { &hf_rtps_param_plugin_promiscuity_kind, { | ||||
19631 | "promiscuityKind", "rtps.param.plugin_promiscuity_kind", | ||||
19632 | 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) } | ||||
19633 | }, | ||||
19634 | |||||
19635 | { &hf_rtps_param_service_kind, { | ||||
19636 | "serviceKind", "rtps.param.service_kind", | ||||
19637 | 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) } | ||||
19638 | }, | ||||
19639 | |||||
19640 | { &hf_rtps_param_data_representation,{ | ||||
19641 | "Data Representation Kind", "rtps.param.data_representation", | ||||
19642 | 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) } | ||||
19643 | }, | ||||
19644 | |||||
19645 | { &hf_rtps_param_type_consistency_kind, { | ||||
19646 | "Type Consistency Kind", "rtps.param.type_consistency_kind", | ||||
19647 | 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) } | ||||
19648 | }, | ||||
19649 | |||||
19650 | { &hf_rtps_param_ignore_sequence_bounds, { | ||||
19651 | "Ignore Sequence Bounds", "rtps.param.ignore_sequence_bounds", | ||||
19652 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19653 | }, | ||||
19654 | |||||
19655 | { &hf_rtps_param_ignore_string_bounds, { | ||||
19656 | "Ignore String Bounds", "rtps.param.ignore_string_bounds", | ||||
19657 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19658 | }, | ||||
19659 | |||||
19660 | { &hf_rtps_param_ignore_member_names, { | ||||
19661 | "Ignore Member Names", "rtps.param.ignore_member_names", | ||||
19662 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19663 | }, | ||||
19664 | |||||
19665 | { &hf_rtps_param_prevent_type_widening, { | ||||
19666 | "Prevent Type Widening", "rtps.param.prevent_type_widening", | ||||
19667 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19668 | }, | ||||
19669 | |||||
19670 | { &hf_rtps_param_force_type_validation, { | ||||
19671 | "Force Type Validation", "rtps.param.force_type_validation", | ||||
19672 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19673 | }, | ||||
19674 | |||||
19675 | { &hf_rtps_param_ignore_enum_literal_names, { | ||||
19676 | "Ignore Enum Literal Names", "rtps.param.ignore_enum_literal_names", | ||||
19677 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19678 | }, | ||||
19679 | |||||
19680 | { &hf_rtps_param_acknowledgment_kind, { | ||||
19681 | "Acknowledgment Kind", "rtps.param.acknowledgment_kind", | ||||
19682 | 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) } | ||||
19683 | }, | ||||
19684 | |||||
19685 | /* Finally the raw issue data ------------------------------------------ */ | ||||
19686 | { &hf_rtps_issue_data, { | ||||
19687 | "serializedData", "rtps.issueData", | ||||
19688 | 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) } | ||||
19689 | }, | ||||
19690 | |||||
19691 | { &hf_rtps_param_product_version_major, { | ||||
19692 | "Major", "rtps.param.product_version.major", | ||||
19693 | FT_UINT8, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19694 | }, | ||||
19695 | |||||
19696 | { &hf_rtps_param_product_version_minor, { | ||||
19697 | "Minor", "rtps.param.product_version.minor", | ||||
19698 | FT_UINT8, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19699 | }, | ||||
19700 | |||||
19701 | { &hf_rtps_param_product_version_release, { | ||||
19702 | "Release", "rtps.param.product_version.release", | ||||
19703 | FT_UINT8, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19704 | }, | ||||
19705 | |||||
19706 | { &hf_rtps_param_product_version_release_as_char, { | ||||
19707 | "Release", "rtps.param.product_version.release_string", | ||||
19708 | FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19709 | }, | ||||
19710 | |||||
19711 | { &hf_rtps_param_product_version_revision, { | ||||
19712 | "Revision", "rtps.param.product_version.revision", | ||||
19713 | FT_UINT8, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19714 | }, | ||||
19715 | |||||
19716 | { &hf_rtps_encapsulation_id, { | ||||
19717 | "encapsulation id", "rtps.encapsulation_id", | ||||
19718 | 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) } | ||||
19719 | }, | ||||
19720 | |||||
19721 | { &hf_rtps_encapsulation_kind, { | ||||
19722 | "kind", "rtps.encapsulation_kind", | ||||
19723 | 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) } | ||||
19724 | }, | ||||
19725 | |||||
19726 | { &hf_rtps_octets_to_inline_qos, { | ||||
19727 | "Octets to inline QoS", "rtps.octets_to_inline_qos", | ||||
19728 | FT_UINT16, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19729 | }, | ||||
19730 | |||||
19731 | { &hf_rtps_filter_signature, { | ||||
19732 | "filterSignature", "rtps.filter_signature", | ||||
19733 | FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19734 | }, | ||||
19735 | |||||
19736 | { &hf_rtps_bitmap, { | ||||
19737 | "bitmap", "rtps.bitmap", | ||||
19738 | FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19739 | }, | ||||
19740 | |||||
19741 | { &hf_rtps_property_name, { | ||||
19742 | "Property Name", "rtps.property_name", | ||||
19743 | FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19744 | }, | ||||
19745 | |||||
19746 | { &hf_rtps_property_value, { | ||||
19747 | "Value", "rtps.property_value", | ||||
19748 | FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19749 | }, | ||||
19750 | |||||
19751 | { &hf_rtps_union, { | ||||
19752 | "union", "rtps.union", | ||||
19753 | FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19754 | }, | ||||
19755 | |||||
19756 | { &hf_rtps_union_case, { | ||||
19757 | "case", "rtps.union_case", | ||||
19758 | FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19759 | }, | ||||
19760 | |||||
19761 | { &hf_rtps_struct, { | ||||
19762 | "struct", "rtps.struct", | ||||
19763 | FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19764 | }, | ||||
19765 | |||||
19766 | { &hf_rtps_member_name, { | ||||
19767 | "member_name", "rtps.member_name", | ||||
19768 | FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19769 | }, | ||||
19770 | |||||
19771 | { &hf_rtps_sequence, { | ||||
19772 | "sequence", "rtps.sequence", | ||||
19773 | FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19774 | }, | ||||
19775 | |||||
19776 | { &hf_rtps_array, { | ||||
19777 | "array", "rtps.array", | ||||
19778 | FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19779 | }, | ||||
19780 | |||||
19781 | { &hf_rtps_bitfield, { | ||||
19782 | "bitfield", "rtps.bitfield", | ||||
19783 | FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19784 | }, | ||||
19785 | |||||
19786 | { &hf_rtps_datatype, { | ||||
19787 | "datatype", "rtps.datatype", | ||||
19788 | FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19789 | }, | ||||
19790 | |||||
19791 | { &hf_rtps_sequence_size, { | ||||
19792 | "sequenceSize", "rtps.sequence_size", | ||||
19793 | 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) } | ||||
19794 | }, | ||||
19795 | |||||
19796 | { &hf_rtps_guid, { | ||||
19797 | "guid", "rtps.guid", | ||||
19798 | FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19799 | }, | ||||
19800 | |||||
19801 | { &hf_rtps_heartbeat_count, { | ||||
19802 | "count", "rtps.heartbeat_count", | ||||
19803 | FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19804 | }, | ||||
19805 | |||||
19806 | { &hf_rtps_encapsulation_options, { | ||||
19807 | "Encapsulation options", "rtps.encapsulation_options", | ||||
19808 | FT_UINT16, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19809 | }, | ||||
19810 | |||||
19811 | { &hf_rtps_serialized_key, { | ||||
19812 | "serializedKey", "rtps.serialized_key", | ||||
19813 | FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19814 | }, | ||||
19815 | |||||
19816 | { &hf_rtps_serialized_data, { | ||||
19817 | "serializedData", "rtps.serialized_data", | ||||
19818 | FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19819 | }, | ||||
19820 | |||||
19821 | { &hf_rtps_sm_rti_crc_number, { | ||||
19822 | "RTPS Message Length", "rtps.sm.rti_crc.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 | { &hf_rtps_sm_rti_crc_result, { | ||||
19827 | "CRC", "rtps.sm.rti_crc", | ||||
19828 | FT_UINT32, BASE_HEX, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19829 | }, | ||||
19830 | { &hf_rtps_message_length, { | ||||
19831 | "RTPS Message Length", "rtps.message_length", | ||||
19832 | FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
19833 | }, | ||||
19834 | |||||
19835 | /* Flag bits */ | ||||
19836 | { &hf_rtps_flag_reserved80, { | ||||
19837 | "Reserved", "rtps.flag.reserved", | ||||
19838 | 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) } | ||||
19839 | }, | ||||
19840 | { &hf_rtps_flag_reserved40, { | ||||
19841 | "Reserved", "rtps.flag.reserved", | ||||
19842 | 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) } | ||||
19843 | }, | ||||
19844 | { &hf_rtps_flag_reserved20, { | ||||
19845 | "Reserved", "rtps.flag.reserved", | ||||
19846 | 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) } | ||||
19847 | }, | ||||
19848 | { &hf_rtps_flag_reserved10, { | ||||
19849 | "Reserved", "rtps.flag.reserved", | ||||
19850 | 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) } | ||||
19851 | }, | ||||
19852 | { &hf_rtps_flag_reserved08, { | ||||
19853 | "Reserved", "rtps.flag.reserved", | ||||
19854 | 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) } | ||||
19855 | }, | ||||
19856 | { &hf_rtps_flag_reserved04, { | ||||
19857 | "Reserved", "rtps.flag.reserved", | ||||
19858 | 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) } | ||||
19859 | }, | ||||
19860 | { &hf_rtps_flag_reserved02, { | ||||
19861 | "Reserved", "rtps.flag.reserved", | ||||
19862 | 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) } | ||||
19863 | }, | ||||
19864 | { &hf_rtps_flag_reserved8000, { | ||||
19865 | "Reserved", "rtps.flag.reserved", | ||||
19866 | 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) } | ||||
19867 | }, | ||||
19868 | { &hf_rtps_flag_reserved4000, { | ||||
19869 | "Reserved", "rtps.flag.reserved", | ||||
19870 | 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) } | ||||
19871 | }, | ||||
19872 | { &hf_rtps_flag_reserved2000, { | ||||
19873 | "Reserved", "rtps.flag.reserved", | ||||
19874 | 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) } | ||||
19875 | }, | ||||
19876 | { &hf_rtps_flag_reserved1000, { | ||||
19877 | "Reserved", "rtps.flag.reserved", | ||||
19878 | 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) } | ||||
19879 | }, | ||||
19880 | { &hf_rtps_flag_reserved0800, { | ||||
19881 | "Reserved", "rtps.flag.reserved", | ||||
19882 | 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) } | ||||
19883 | }, | ||||
19884 | { &hf_rtps_flag_reserved0400, { | ||||
19885 | "Reserved", "rtps.flag.reserved", | ||||
19886 | 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) } | ||||
19887 | }, | ||||
19888 | { &hf_rtps_flag_reserved0200, { | ||||
19889 | "Reserved", "rtps.flag.reserved", | ||||
19890 | 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) } | ||||
19891 | }, | ||||
19892 | { &hf_rtps_flag_reserved0100, { | ||||
19893 | "Reserved", "rtps.flag.reserved", | ||||
19894 | 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) } | ||||
19895 | }, | ||||
19896 | { &hf_rtps_flag_reserved0080, { | ||||
19897 | "Reserved", "rtps.flag.reserved", | ||||
19898 | 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) } | ||||
19899 | }, | ||||
19900 | { &hf_rtps_flag_reserved0040, { | ||||
19901 | "Reserved", "rtps.flag.reserved", | ||||
19902 | 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) } | ||||
19903 | }, | ||||
19904 | { &hf_rtps_flag_builtin_endpoint_set_reserved, { | ||||
19905 | "Reserved", "rtps.flag.reserved", | ||||
19906 | 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) } | ||||
19907 | }, | ||||
19908 | { &hf_rtps_flag_unregister, { | ||||
19909 | "Unregister flag", "rtps.flag.unregister", | ||||
19910 | 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) } | ||||
19911 | }, | ||||
19912 | { &hf_rtps_flag_inline_qos_v1, { | ||||
19913 | "Inline QoS", "rtps.flag.inline_qos", | ||||
19914 | 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) } | ||||
19915 | }, | ||||
19916 | { &hf_rtps_flag_hash_key, { | ||||
19917 | "Hash key flag", "rtps.flag.hash_key", | ||||
19918 | 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) } | ||||
19919 | }, | ||||
19920 | { &hf_rtps_flag_hash_key_rti, { | ||||
19921 | "Hash key flag", "rtps.flag.hash_key", | ||||
19922 | 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) } | ||||
19923 | }, | ||||
19924 | { &hf_rtps_flag_alive, { | ||||
19925 | "Alive flag", "rtps.flag.alive", | ||||
19926 | 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) } | ||||
19927 | }, | ||||
19928 | { &hf_rtps_flag_data_present_v1, { | ||||
19929 | "Data present", "rtps.flag.data_present", | ||||
19930 | 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) } | ||||
19931 | }, | ||||
19932 | { &hf_rtps_flag_multisubmessage, { | ||||
19933 | "Multi-submessage", "rtps.flag.multisubmessage", | ||||
19934 | 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) } | ||||
19935 | }, | ||||
19936 | { &hf_rtps_flag_endianness, { | ||||
19937 | "Endianness", "rtps.flag.endianness", | ||||
19938 | 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) } | ||||
19939 | }, | ||||
19940 | { &hf_rtps_flag_additional_authenticated_data, { | ||||
19941 | "Additional Authenticated Data", "rtps.flag.additional_authenticated_data", | ||||
19942 | 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) } | ||||
19943 | }, | ||||
19944 | { &hf_rtps_flag_protected_with_psk, { | ||||
19945 | "Message protected with PSK", "rtps.flag.message_protected_with_psk", | ||||
19946 | 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) } | ||||
19947 | }, | ||||
19948 | { &hf_rtps_flag_vendor_specific_content, { | ||||
19949 | "Vendor-Specific Content", "rtps.flag.vendor_specific_content", | ||||
19950 | 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) } | ||||
19951 | }, | ||||
19952 | { &hf_rtps_flag_inline_qos_v2, { | ||||
19953 | "Inline QoS", "rtps.flag.inline_qos", | ||||
19954 | 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) } | ||||
19955 | }, | ||||
19956 | { &hf_rtps_flag_data_present_v2, { | ||||
19957 | "Data present", "rtps.flag.data_present", | ||||
19958 | 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) } | ||||
19959 | }, | ||||
19960 | { &hf_rtps_flag_status_info, { | ||||
19961 | "Status info flag", "rtps.flag.status_info", | ||||
19962 | 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) } | ||||
19963 | }, | ||||
19964 | { &hf_rtps_flag_final, { | ||||
19965 | "Final flag", "rtps.flag.final", | ||||
19966 | 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) } | ||||
19967 | }, | ||||
19968 | { &hf_rtps_flag_liveliness, { | ||||
19969 | "Liveliness flag", "rtps.flag.liveliness", | ||||
19970 | 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) } | ||||
19971 | }, | ||||
19972 | { &hf_rtps_flag_multicast, { | ||||
19973 | "Multicast flag", "rtps.flag.multicast", | ||||
19974 | 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) } | ||||
19975 | }, | ||||
19976 | { &hf_rtps_flag_data_serialized_key, { | ||||
19977 | "Serialized Key", "rtps.flag.data.serialized_key", | ||||
19978 | 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) } | ||||
19979 | }, | ||||
19980 | { &hf_rtps_flag_data_frag_serialized_key, { | ||||
19981 | "Serialized Key", "rtps.flag.data_frag.serialized_key", | ||||
19982 | 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) } | ||||
19983 | }, | ||||
19984 | { &hf_rtps_flag_timestamp, { | ||||
19985 | "Timestamp flag", "rtps.flag.timestamp", | ||||
19986 | 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) } | ||||
19987 | }, | ||||
19988 | { &hf_rtps_flag_no_virtual_guids, { | ||||
19989 | "No virtual GUIDs flag", "rtps.flag.no_virtual_guids", | ||||
19990 | 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) } | ||||
19991 | }, | ||||
19992 | { &hf_rtps_flag_multiple_writers, { | ||||
19993 | "Multiple writers flag", "rtps.flag.multiple_writers", | ||||
19994 | 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) } | ||||
19995 | }, | ||||
19996 | { &hf_rtps_flag_multiple_virtual_guids, { | ||||
19997 | "Multiple virtual GUIDs flag", "rtps.flag.multiple_virtual_guids", | ||||
19998 | 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) } | ||||
19999 | }, | ||||
20000 | { &hf_rtps_flag_serialize_key16, { | ||||
20001 | "Serialized Key", "rtps.flag.serialize_key", | ||||
20002 | 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) } | ||||
20003 | }, | ||||
20004 | { &hf_rtps_flag_invalid_sample, { | ||||
20005 | "Invalid sample", "rtps.flag.invalid_sample", | ||||
20006 | 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) } | ||||
20007 | }, | ||||
20008 | { &hf_rtps_flag_data_present16, { | ||||
20009 | "Data present", "rtps.flag.data_present", | ||||
20010 | 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) } | ||||
20011 | }, | ||||
20012 | { &hf_rtps_flag_offsetsn_present, { | ||||
20013 | "OffsetSN present", "rtps.flag.offsetsn_present", | ||||
20014 | 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) } | ||||
20015 | }, | ||||
20016 | { &hf_rtps_flag_inline_qos16_v2, { | ||||
20017 | "Inline QoS", "rtps.flag.inline_qos", | ||||
20018 | 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) } | ||||
20019 | }, | ||||
20020 | { &hf_rtps_flag_timestamp_present, { | ||||
20021 | "Timestamp present", "rtps.flag.timestamp_present", | ||||
20022 | 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) } | ||||
20023 | }, | ||||
20024 | { &hf_rtps_param_status_info_flags, | ||||
20025 | { "Flags", "rtps.param.status_info", | ||||
20026 | 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) } | ||||
20027 | }, | ||||
20028 | { &hf_rtps_header_extension_flags, | ||||
20029 | { "Flags", "rtps.header_extension_flags", | ||||
20030 | FT_UINT8, BASE_HEX, NULL((void*)0), 0, "bitmask representing header extension flags", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20031 | }, | ||||
20032 | { &hf_rtps_flag_header_extension_parameters, { | ||||
20033 | "Header Extension Parameter List Present", "rtps.flag.header_extension.parameter_list", | ||||
20034 | 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) } | ||||
20035 | }, | ||||
20036 | { &hf_rtps_flag_header_extension_checksum2, { | ||||
20037 | "Header Extension Message Checksum 2", "rtps.flag.header_extension.message_checksum2", | ||||
20038 | 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) } | ||||
20039 | }, | ||||
20040 | { &hf_rtps_flag_header_extension_checksum1, { | ||||
20041 | "Header Extension Message Checksum 1", "rtps.flag.header_extension.message_checksum1", | ||||
20042 | 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) } | ||||
20043 | }, | ||||
20044 | { &hf_rtps_flag_header_extension_wextension, { | ||||
20045 | "Header Extension W Extension Present", "rtps.flag.header_extension.wextension", | ||||
20046 | 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) } | ||||
20047 | }, | ||||
20048 | { &hf_rtps_flag_header_extension_uextension, { | ||||
20049 | "Header Extension U Extension Present", "rtps.flag.header_extension.uextension", | ||||
20050 | 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) } | ||||
20051 | }, | ||||
20052 | { &hf_rtps_flag_header_extension_timestamp, { | ||||
20053 | "Header Extension Timestamp Present", "rtps.flag.header_extension.timestamp", | ||||
20054 | 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) } | ||||
20055 | }, | ||||
20056 | { &hf_rtps_flag_header_extension_message_length, { | ||||
20057 | "Header Extension Message Length", "rtps.flag.header_extension.message_length", | ||||
20058 | 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) } | ||||
20059 | }, | ||||
20060 | { &hf_rtps_header_extension_checksum_crc32c, { | ||||
20061 | "Header Extension Checksum CRC-32C", "rtps.header_extension.checksum_crc32c", | ||||
20062 | FT_UINT32, BASE_HEX, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20063 | }, | ||||
20064 | { &hf_rtps_header_extension_checksum_crc64, { | ||||
20065 | "Header Extension Checksum CRC64", "rtps.header_extension.checksum_crc64", | ||||
20066 | FT_UINT64, BASE_HEX, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20067 | }, | ||||
20068 | { &hf_rtps_header_extension_checksum_md5, { | ||||
20069 | "Header Extension Checksum MD5", "rtps.header_extension.checksum_md5", | ||||
20070 | FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20071 | }, | ||||
20072 | { &hf_rtps_uextension, { | ||||
20073 | "Header Extension uExtension", "rtps.uextension", | ||||
20074 | FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20075 | }, | ||||
20076 | { &hf_rtps_wextension, { | ||||
20077 | "Header Extension wExtension", "rtps.wextension", | ||||
20078 | FT_UINT64, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20079 | }, | ||||
20080 | { &hf_rtps_flag_unregistered, { | ||||
20081 | "Unregistered", "rtps.flag.unregistered", | ||||
20082 | 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) } | ||||
20083 | }, | ||||
20084 | { &hf_rtps_flag_disposed, { | ||||
20085 | "Disposed", "rtps.flag.undisposed", | ||||
20086 | 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) } | ||||
20087 | }, | ||||
20088 | { &hf_rtps_flag_participant_announcer, { | ||||
20089 | "Participant Announcer", "rtps.flag.participant_announcer", | ||||
20090 | 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) } | ||||
20091 | }, | ||||
20092 | { &hf_rtps_flag_participant_detector, { | ||||
20093 | "Participant Detector", "rtps.flag.participant_detector", | ||||
20094 | 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) } | ||||
20095 | }, | ||||
20096 | { &hf_rtps_flag_publication_announcer, { | ||||
20097 | "Publication Announcer", "rtps.flag.publication_announcer", | ||||
20098 | 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) } | ||||
20099 | }, | ||||
20100 | { &hf_rtps_flag_publication_detector, { | ||||
20101 | "Publication Detector", "rtps.flag.publication_detector", | ||||
20102 | 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) } | ||||
20103 | }, | ||||
20104 | { &hf_rtps_flag_subscription_announcer, { | ||||
20105 | "Subscription Announcer", "rtps.flag.subscription_announcer", | ||||
20106 | 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) } | ||||
20107 | }, | ||||
20108 | { &hf_rtps_flag_subscription_detector, { | ||||
20109 | "Subscription Detector", "rtps.flag.subscription_detector", | ||||
20110 | 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) } | ||||
20111 | }, | ||||
20112 | { &hf_rtps_flag_participant_proxy_announcer, { | ||||
20113 | "Participant Proxy Announcer", "rtps.flag.participant_proxy_announcer", | ||||
20114 | 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) } | ||||
20115 | }, | ||||
20116 | { &hf_rtps_flag_participant_proxy_detector, { | ||||
20117 | "Participant Proxy Detector", "rtps.flag.participant_proxy_detector", | ||||
20118 | 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) } | ||||
20119 | }, | ||||
20120 | { &hf_rtps_flag_participant_state_announcer, { | ||||
20121 | "Participant State Announcer", "rtps.flag.participant_state_announcer", | ||||
20122 | 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) } | ||||
20123 | }, | ||||
20124 | { &hf_rtps_flag_participant_state_detector, { | ||||
20125 | "Participant State Detector", "rtps.flag.participant_state_detector", | ||||
20126 | 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) } | ||||
20127 | }, | ||||
20128 | { &hf_rtps_flag_participant_message_datawriter, { | ||||
20129 | "Participant Message DataWriter", "rtps.flag.participant_message_datawriter", | ||||
20130 | 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) } | ||||
20131 | }, | ||||
20132 | { &hf_rtps_flag_participant_message_datareader, { | ||||
20133 | "Participant Message DataReader", "rtps.flag.participant_message_datareader", | ||||
20134 | 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) } | ||||
20135 | }, | ||||
20136 | { &hf_rtps_flag_typelookup_request_datawriter, { | ||||
20137 | "TypeLookup Service Request DataWriter", "rtps.flag.typelookup_request_datawriter", | ||||
20138 | 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) } | ||||
20139 | }, | ||||
20140 | { &hf_rtps_flag_typelookup_request_datareader, { | ||||
20141 | "TypeLookup Service Request DataReader", "rtps.flag.typelookup_request_datareader", | ||||
20142 | 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) } | ||||
20143 | }, | ||||
20144 | { &hf_rtps_flag_typelookup_reply_datawriter, { | ||||
20145 | "TypeLookup Service Reply DataWriter", "rtps.flag.typelookup_reply_datawriter", | ||||
20146 | 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) } | ||||
20147 | }, | ||||
20148 | { &hf_rtps_flag_typelookup_reply_datareader, { | ||||
20149 | "TypeLookup Service Reply DataReader", "rtps.flag.typelookup_reply_datareader", | ||||
20150 | 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) } | ||||
20151 | }, | ||||
20152 | { &hf_rtps_flag_typelookup_request_secure_datawriter, { | ||||
20153 | "TypeLookup Service Request Secure DataWriter", "rtps.flag.typelookup_request_secure_datawriter", | ||||
20154 | 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) } | ||||
20155 | }, | ||||
20156 | { &hf_rtps_flag_typelookup_request_secure_datareader, { | ||||
20157 | "TypeLookup Service Request Secure DataReader", "rtps.flag.typelookup_request_secure_datareader", | ||||
20158 | 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) } | ||||
20159 | }, | ||||
20160 | { &hf_rtps_flag_typelookup_reply_secure_datawriter, { | ||||
20161 | "TypeLookup Service Reply Secure DataWriter", "rtps.flag.typelookup_reply_secure_datawriter", | ||||
20162 | 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) } | ||||
20163 | }, | ||||
20164 | { &hf_rtps_flag_typelookup_reply_secure_datareader, { | ||||
20165 | "TypeLookup Service Reply Secure DataReader", "rtps.flag.typelookup_reply_secure_datareader", | ||||
20166 | 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) } | ||||
20167 | }, | ||||
20168 | { &hf_rtps_flag_secure_publication_writer, { | ||||
20169 | "Secure Publication Writer", "rtps.flag.secure_publication_writer", | ||||
20170 | 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) } | ||||
20171 | }, | ||||
20172 | { &hf_rtps_flag_secure_publication_reader, { | ||||
20173 | "Secure Publication Reader", "rtps.flag.secure_publication_reader", | ||||
20174 | 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) } | ||||
20175 | }, | ||||
20176 | { &hf_rtps_flag_secure_subscription_writer, { | ||||
20177 | "Secure Subscription Writer", "rtps.flag.secure_subscription_writer", | ||||
20178 | 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) } | ||||
20179 | }, | ||||
20180 | { &hf_rtps_flag_secure_subscription_reader, { | ||||
20181 | "Secure Subscription Reader", "rtps.flag.secure_subscription_reader", | ||||
20182 | 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) } | ||||
20183 | }, | ||||
20184 | { &hf_rtps_flag_secure_participant_message_writer, { | ||||
20185 | "Secure Participant Message Writer", "rtps.flag.secure_participant_message_writer", | ||||
20186 | 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) } | ||||
20187 | }, | ||||
20188 | { &hf_rtps_flag_secure_participant_message_reader, { | ||||
20189 | "Secure Participant Message Reader", "rtps.flag.secure_participant_message_reader", | ||||
20190 | 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) } | ||||
20191 | }, | ||||
20192 | { &hf_rtps_flag_participant_stateless_message_writer, { | ||||
20193 | "Participant Stateless Message Writer", "rtps.flag.participant_stateless_message_writer", | ||||
20194 | 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) } | ||||
20195 | }, | ||||
20196 | { &hf_rtps_flag_participant_stateless_message_reader, { | ||||
20197 | "Participant Stateless Message Reader", "rtps.flag.participant_stateless_message_reader", | ||||
20198 | 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) } | ||||
20199 | }, | ||||
20200 | { &hf_rtps_flag_secure_participant_volatile_message_writer,{ | ||||
20201 | "Secure Participant Volatile Message Writer", "rtps.flag.secure_participant_volatile_message_writer", | ||||
20202 | 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) } | ||||
20203 | }, | ||||
20204 | { &hf_rtps_flag_secure_participant_volatile_message_reader,{ | ||||
20205 | "Secure Participant Volatile Message Reader", "rtps.flag.secure_participant_volatile_message_reader", | ||||
20206 | 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) } | ||||
20207 | }, | ||||
20208 | { &hf_rtps_flag_participant_secure_writer,{ | ||||
20209 | "Participant Secure Writer", "rtps.flag.participant_secure_writer", | ||||
20210 | 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) } | ||||
20211 | }, | ||||
20212 | { &hf_rtps_flag_participant_secure_reader,{ | ||||
20213 | "Participant Secure Reader", "rtps.flag.participant_secure_reader", | ||||
20214 | 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) } | ||||
20215 | }, | ||||
20216 | { &hf_rtps_type_object_v2, { | ||||
20217 | "Type Object V2", "rtps.type_object_v2", | ||||
20218 | FT_NONE, BASE_NONE, NULL((void*)0), 0, | ||||
20219 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20220 | }, | ||||
20221 | { &hf_rtps_xcdr2_delimited_header, { | ||||
20222 | "DHEADER", "rtps.xcdr2.dheader", | ||||
20223 | FT_UINT32, BASE_DEC, NULL((void*)0), 0, | ||||
20224 | "XCDR2 Delimited Header", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20225 | }, | ||||
20226 | { &hf_rtps_xcdr2_enhanced_mutable_header, { | ||||
20227 | "EMHEADER", "rtps.xcdr2.emheader", | ||||
20228 | FT_UINT32, BASE_HEX, NULL((void*)0), 0, | ||||
20229 | "XCDR2 Enhanced Mutable Header", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20230 | }, | ||||
20231 | { &hf_rtps_xcdr2_must_understand, { | ||||
20232 | "Must Understand", "rtps.xcdr2.must_understand", | ||||
20233 | FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset )))), 0x80000000, | ||||
20234 | "XCDR2 Must Understand", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20235 | }, | ||||
20236 | { &hf_rtps_xcdr2_length_code, { | ||||
20237 | "Length Code", "rtps.xcdr2.length_code", | ||||
20238 | FT_UINT32, BASE_DEC, NULL((void*)0), 0x70000000, | ||||
20239 | "XCDR2 Length Code", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20240 | }, | ||||
20241 | { &hf_rtps_xcdr2_member_id, { | ||||
20242 | "Member Id", "rtps.xcdr2.member_id", | ||||
20243 | FT_UINT32, BASE_HEX, NULL((void*)0), 0x0fffffff, | ||||
20244 | "XCDR2 Member Id", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20245 | }, | ||||
20246 | { &hf_rtps_xcdr2_nextint, { | ||||
20247 | "NEXTINT", "rtps.xcdr2.nextint", | ||||
20248 | FT_UINT32, BASE_DEC, NULL((void*)0), 0, | ||||
20249 | "XCDR2 NEXTINT", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20250 | }, | ||||
20251 | { &hf_rtps_type_object_v2_type_flags, { | ||||
20252 | "Type Flags", "rtps.type_object_v2.type_flags", | ||||
20253 | FT_UINT16, BASE_HEX, NULL((void*)0), 0, | ||||
20254 | "Type Object V2 Type Flags", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20255 | }, | ||||
20256 | { &hf_rtps_type_object_v2_type_flag_is_final, { | ||||
20257 | "Final", "rtps.type_object_v2.is_final", | ||||
20258 | FT_BOOLEAN, 16, NULL((void*)0), 0x0001, | ||||
20259 | "Type Object V2 Type Flag Is Final", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20260 | }, | ||||
20261 | { &hf_rtps_type_object_v2_type_flag_is_appendable, { | ||||
20262 | "Appendable", "rtps.type_object_v2.is_appendable", | ||||
20263 | FT_BOOLEAN, 16, NULL((void*)0), 0x0002, | ||||
20264 | "Type Object V2 Type Flag Is Appendable", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20265 | }, | ||||
20266 | { &hf_rtps_type_object_v2_type_flag_is_mutable, { | ||||
20267 | "Mutable", "rtps.type_object_v2.is_mutable", | ||||
20268 | FT_BOOLEAN, 16, NULL((void*)0), 0x0004, | ||||
20269 | "Type Object V2 Type Flag Is Mutable", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20270 | }, | ||||
20271 | { &hf_rtps_type_object_v2_type_flag_is_nested, { | ||||
20272 | "Nested", "rtps.type_object_v2.is_nested", | ||||
20273 | FT_BOOLEAN, 16, NULL((void*)0), 0x0008, | ||||
20274 | "Type Object V2 Type Flag Is Nested", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20275 | }, | ||||
20276 | { &hf_rtps_type_object_v2_type_flag_is_autoid_hash, { | ||||
20277 | "Autoid Hash", "rtps.type_object_v2.is_autoid_hash", | ||||
20278 | FT_BOOLEAN, 16, NULL((void*)0), 0x0010, | ||||
20279 | "Type Object V2 Type Flag Is Autoid Hash", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20280 | }, | ||||
20281 | { &hf_rtps_type_object_v2_type_name, { | ||||
20282 | "Type Name", "rtps.type_object_v2.type_name", | ||||
20283 | FT_STRING, BASE_NONE, NULL((void*)0), 0, | ||||
20284 | "Type Object V2", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20285 | }, | ||||
20286 | { &hf_rtps_type_object_v2_has_ann_builtin, { | ||||
20287 | "Has Builtin Annotation", "rtps.type_object_v2.has_ann_builtin", | ||||
20288 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0, | ||||
20289 | "Type Object V2", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20290 | }, | ||||
20291 | { &hf_rtps_type_object_v2_ann_builtin, { | ||||
20292 | "Builtin Annotation", "rtps.type_object_v2.ann_builtin", | ||||
20293 | FT_NONE, BASE_NONE, NULL((void*)0), 0, | ||||
20294 | "Type Object V2", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20295 | }, | ||||
20296 | { &hf_rtps_type_object_v2_has_ann_custom, { | ||||
20297 | "Has Custom Annotation", "rtps.type_object_v2.has_ann_custom", | ||||
20298 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0, | ||||
20299 | "Type Object V2", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20300 | }, | ||||
20301 | { &hf_rtps_type_object_v2_member_id, { | ||||
20302 | "Member ID", "rtps.type_object_v2.member_id", | ||||
20303 | FT_UINT32, BASE_DEC, NULL((void*)0), 0, | ||||
20304 | "Type Object V2 Member ID", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20305 | }, | ||||
20306 | { &hf_rtps_type_object_v2_member_flags, { | ||||
20307 | "Member Flags", "rtps.type_object_v2.member_flags", | ||||
20308 | FT_UINT16, BASE_HEX, NULL((void*)0), 0, | ||||
20309 | "Type Object V2 Member Flags", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20310 | }, | ||||
20311 | { &hf_rtps_type_object_v2_member_flag_try_construct, { | ||||
20312 | "Try Construct", "rtps.type_object_v2.member_flag.try_construct", | ||||
20313 | FT_UINT16, BASE_DEC, VALS(try_construct_vals)((0 ? (const struct _value_string*)0 : ((try_construct_vals)) )), 0x0003, | ||||
20314 | "Type Object V2 Member Flag Try Construct", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20315 | }, | ||||
20316 | { &hf_rtps_type_object_v2_member_flag_is_external, { | ||||
20317 | "Is External", "rtps.type_object_v2.member_flag.is_external", | ||||
20318 | FT_BOOLEAN, 16, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset )))), 0x0004, | ||||
20319 | "Type Object V2 Member Flag Is External", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20320 | }, | ||||
20321 | { &hf_rtps_type_object_v2_member_flag_is_optional, { | ||||
20322 | "Is Optional", "rtps.type_object_v2.member_flag.is_optional", | ||||
20323 | FT_BOOLEAN, 16, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset )))), 0x0008, | ||||
20324 | "Type Object V2 Member Flag Is Optional", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20325 | }, | ||||
20326 | { &hf_rtps_type_object_v2_member_flag_is_must_understand, { | ||||
20327 | "Is Must Understand", "rtps.type_object_v2.member_flag.is_must_understand", | ||||
20328 | FT_BOOLEAN, 16, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset )))), 0x0010, | ||||
20329 | "Type Object V2 Member Flag Is Must Understand", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20330 | }, | ||||
20331 | { &hf_rtps_type_object_v2_member_flag_is_key, { | ||||
20332 | "Is Key", "rtps.type_object_v2.member_flag.is_key", | ||||
20333 | FT_BOOLEAN, 16, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset )))), 0x0020, | ||||
20334 | "Type Object V2 Member Flag Is Key", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20335 | }, | ||||
20336 | { &hf_rtps_type_object_v2_member_flag_is_default, { | ||||
20337 | "Is Default", "rtps.type_object_v2.member_flag.is_default", | ||||
20338 | FT_BOOLEAN, 16, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset )))), 0x0040, | ||||
20339 | "Type Object V2 Member Flag Is Default", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20340 | }, | ||||
20341 | { &hf_rtps_type_object_v2_member_name, { | ||||
20342 | "Member Name", "rtps.type_object_v2.member_name", | ||||
20343 | FT_STRING, BASE_NONE, NULL((void*)0), 0, | ||||
20344 | "Type Object V2 Member Name", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20345 | }, | ||||
20346 | { &hf_rtps_type_object_v2_member_name_hash, { | ||||
20347 | "Member Name Hash", "rtps.type_object_v2.member_name_hash", | ||||
20348 | FT_UINT32, BASE_HEX, NULL((void*)0), 0, | ||||
20349 | "Type Object V2 Member Name Hash", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20350 | }, | ||||
20351 | { &hf_rtps_type_object_v2_union_label, { | ||||
20352 | "Union Label", "rtps.type_object_v2.union_label", | ||||
20353 | FT_INT32, BASE_DEC, NULL((void*)0), 0, | ||||
20354 | "Type Object V2 Union Label", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20355 | }, | ||||
20356 | { &hf_rtps_type_object_v2_enum_bit_bound, { | ||||
20357 | "Enum Bit Bound", "rtps.type_object_v2.enum_bit_bound", | ||||
20358 | FT_UINT16, BASE_DEC, NULL((void*)0), 0, | ||||
20359 | "Type Object V2 Enum Bit Bound", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20360 | }, | ||||
20361 | { &hf_rtps_type_object_v2_enum_literal_value, { | ||||
20362 | "Value", "rtps.type_object_v2.enum_literal_value", | ||||
20363 | FT_INT32, BASE_DEC, NULL((void*)0), 0, | ||||
20364 | "Type Object V2 Enum Literal Value", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20365 | }, | ||||
20366 | { &hf_rtps_type_id_discriminator, { | ||||
20367 | "Type Id Discriminator", "rtps.type_id.discriminator", | ||||
20368 | FT_UINT8, BASE_HEX, VALS(type_id_discriminator_vals)((0 ? (const struct _value_string*)0 : ((type_id_discriminator_vals )))), 0, | ||||
20369 | "Type Identifier Discriminator", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20370 | }, | ||||
20371 | { &hf_rtps_type_kind_discriminator, { | ||||
20372 | "Type Kind Discriminator", "rtps.type_kind.discriminator", | ||||
20373 | FT_UINT8, BASE_HEX, VALS(type_id_discriminator_vals)((0 ? (const struct _value_string*)0 : ((type_id_discriminator_vals )))), 0, | ||||
20374 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20375 | }, | ||||
20376 | { &hf_rtps_base_type_id_discriminator, { | ||||
20377 | "Base Type Id Discriminator", "rtps.base_type_id.discriminator", | ||||
20378 | FT_UINT8, BASE_HEX, VALS(type_id_discriminator_vals)((0 ? (const struct _value_string*)0 : ((type_id_discriminator_vals )))), 0, | ||||
20379 | "Base Type Identifier Discriminator", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20380 | }, | ||||
20381 | { &hf_rtps_remote_exception_code, { | ||||
20382 | "Remote Exception Code", "rtps.remote_exception_code", | ||||
20383 | FT_UINT32, BASE_HEX, VALS(remote_exception_code_vals)((0 ? (const struct _value_string*)0 : ((remote_exception_code_vals )))), 0, | ||||
20384 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20385 | }, | ||||
20386 | { &hf_rtps_type_bound, { | ||||
20387 | "Bound", "rtps.type.bound", | ||||
20388 | FT_UINT32, BASE_DEC, NULL((void*)0), 0, | ||||
20389 | "Collection Type Bound", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20390 | }, | ||||
20391 | { &hf_rtps_type_element_flags, { | ||||
20392 | "Element Flags", "rtps.type.element_flags", | ||||
20393 | FT_UINT16, BASE_HEX, NULL((void*)0), 0, | ||||
20394 | "Collection Element Flags", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20395 | }, | ||||
20396 | { &hf_rtps_type_equiv_kind, { | ||||
20397 | "Equivalence Kind", "rtps.type.equiv_kind", | ||||
20398 | FT_UINT8, BASE_HEX, VALS(type_id_discriminator_vals)((0 ? (const struct _value_string*)0 : ((type_id_discriminator_vals )))), 0, | ||||
20399 | "Type Equivalence Kind", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20400 | }, | ||||
20401 | { &hf_rtps_type_hash, { | ||||
20402 | "Equivalence Hash", "rtps.type.hash", | ||||
20403 | FT_BYTES, BASE_NONE, NULL((void*)0), 0, | ||||
20404 | "Type Equivalence Hash", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20405 | }, | ||||
20406 | { &hf_rtps_type_extended, { | ||||
20407 | "Extended Type Definition", "rtps.type.extended", | ||||
20408 | FT_BYTES, BASE_NONE, NULL((void*)0), 0, | ||||
20409 | "Extended Type Data", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20410 | }, | ||||
20411 | { &hf_rtps_type_id_w_size, { | ||||
20412 | "Type Id With Size", "rtps.type_id_w_size", | ||||
20413 | FT_NONE, BASE_NONE, NULL((void*)0), 0, | ||||
20414 | "Type Identifier With Size", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20415 | }, | ||||
20416 | { &hf_rtps_type_deps_count, { | ||||
20417 | "Dependent Type Count", "rtps.type.deps_count", | ||||
20418 | FT_INT32, BASE_DEC, NULL((void*)0), 0, | ||||
20419 | "Number of Dependent Types", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20420 | }, | ||||
20421 | { &hf_rtps_type_deps_result, { | ||||
20422 | "Result Discriminator", "rtps.type.deps_result", | ||||
20423 | FT_UINT32, BASE_DEC, NULL((void*)0), 0, | ||||
20424 | "GetTypeDependencies Result Discriminator", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20425 | }, | ||||
20426 | { &hf_rtps_type_lookup_discriminator, { | ||||
20427 | "Discriminator", "rtps.type_lookup_discriminator", | ||||
20428 | FT_UINT32, BASE_HEX, VALS(type_lookup_discriminator_vals)((0 ? (const struct _value_string*)0 : ((type_lookup_discriminator_vals )))), 0, | ||||
20429 | "DDS XTypes Type Lookup Discriminator", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20430 | }, | ||||
20431 | { &hf_rtps_type_lookup_deps_seq, { | ||||
20432 | "Dependencies Seq", "rtps.type_lookup_deps_seq", | ||||
20433 | FT_NONE, BASE_NONE, NULL((void*)0), 0, | ||||
20434 | "DDS XTypes Type Lookup Dependencies Sequence", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20435 | }, | ||||
20436 | { &hf_rtps_instance_name, { | ||||
20437 | "Instance Name", "rtps.instance_name", | ||||
20438 | FT_STRING, BASE_NONE, NULL((void*)0), 0, | ||||
20439 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20440 | }, | ||||
20441 | { &hf_rtps_type_object_serialized_size, { | ||||
20442 | "Serialized Size", "rtps.type.serialized_size", | ||||
20443 | FT_UINT32, BASE_DEC, NULL((void*)0), 0, | ||||
20444 | "Type Object Serialized Size", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20445 | }, | ||||
20446 | { &hf_rtps_type_object_type_id_disc, | ||||
20447 | { "TypeId (_d)", "rtps.type_object.type_id.discr", | ||||
20448 | FT_INT16, BASE_DEC, 0x0, 0, | ||||
20449 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20450 | }, | ||||
20451 | { &hf_rtps_type_object_primitive_type_id, | ||||
20452 | { "Type Id", "rtps.type_object.primitive_type_id", | ||||
20453 | FT_UINT16, BASE_HEX, VALS(type_object_kind)((0 ? (const struct _value_string*)0 : ((type_object_kind)))), 0, | ||||
20454 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20455 | }, | ||||
20456 | { &hf_rtps_type_object_base_primitive_type_id, | ||||
20457 | { "Base Id", "rtps.type_object.base_primitive_type_id", | ||||
20458 | FT_UINT16, BASE_HEX, VALS(type_object_kind)((0 ? (const struct _value_string*)0 : ((type_object_kind)))), 0, | ||||
20459 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20460 | }, | ||||
20461 | { &hf_rtps_type_object_type_id, | ||||
20462 | { "Type Id", "rtps.type_object.type_id", | ||||
20463 | FT_UINT64, BASE_HEX, 0x0, 0, | ||||
20464 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20465 | }, | ||||
20466 | { &hf_rtps_type_object_base_type, | ||||
20467 | { "Base Type Id", "rtps.type_object.base_type_id", | ||||
20468 | FT_UINT64, BASE_HEX, 0x0, 0, | ||||
20469 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20470 | }, | ||||
20471 | { &hf_rtps_type_object_element_raw, { | ||||
20472 | "Type Element Content", "rtps.type_object.element", | ||||
20473 | FT_BYTES, BASE_NONE, NULL((void*)0), 0, | ||||
20474 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20475 | }, | ||||
20476 | { &hf_rtps_type_object_type_property_name, | ||||
20477 | { "Name", "rtps.type_object.property.name", | ||||
20478 | FT_STRING, BASE_NONE, 0x0, 0, | ||||
20479 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20480 | }, | ||||
20481 | { &hf_rtps_type_object_member_id, | ||||
20482 | { "Member Id", "rtps.type_object.annotation.member_id", | ||||
20483 | FT_UINT32, BASE_DEC, 0x0, 0, | ||||
20484 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20485 | }, | ||||
20486 | { &hf_rtps_type_object_name, | ||||
20487 | { "Name", "rtps.type_object.member.name", | ||||
20488 | FT_STRING, BASE_NONE, 0x0, 0, | ||||
20489 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20490 | }, | ||||
20491 | { &hf_rtps_type_object_annotation_value_d, | ||||
20492 | { "Annotation Member (_d)", "rtps.type_object.annotation.value_d", | ||||
20493 | FT_UINT16, BASE_DEC, 0x0, 0, | ||||
20494 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20495 | }, | ||||
20496 | { &hf_rtps_type_object_annotation_value_16, | ||||
20497 | { "16 bits type", "rtps.type_object.annotation.value", | ||||
20498 | FT_UINT16, BASE_DEC, 0x0, 0, | ||||
20499 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20500 | }, | ||||
20501 | { &hf_rtps_type_object_union_label, | ||||
20502 | { "Label", "rtps.type_object.union.label", | ||||
20503 | FT_UINT32, BASE_DEC, 0x0, 0, | ||||
20504 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20505 | }, | ||||
20506 | { &hf_rtps_type_object_bound, | ||||
20507 | { "Bound", "rtps.type_object.bound", | ||||
20508 | FT_UINT32, BASE_DEC, 0x0, 0, | ||||
20509 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20510 | }, | ||||
20511 | { &hf_rtps_type_object_enum_constant_name, | ||||
20512 | { "Enum name", "rtps.type_object.enum.name", | ||||
20513 | FT_STRING, BASE_NONE, 0x0, 0, | ||||
20514 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20515 | }, | ||||
20516 | { &hf_rtps_type_object_enum_constant_value, | ||||
20517 | { "Enum value", "rtps.type_object.enum.value", | ||||
20518 | FT_INT32, BASE_DEC, 0x0, 0, | ||||
20519 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20520 | }, | ||||
20521 | { &hf_rtps_type_object_element_shared, | ||||
20522 | { "Element shared", "rtps.type_object.shared", | ||||
20523 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0, | ||||
20524 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20525 | }, | ||||
20526 | { &hf_rtps_flag_typeflag_final, { | ||||
20527 | "FINAL", "rtps.flag.typeflags.final", | ||||
20528 | 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) } | ||||
20529 | }, | ||||
20530 | { &hf_rtps_flag_typeflag_mutable, { | ||||
20531 | "MUTABLE", "rtps.flag.typeflags.mutable", | ||||
20532 | 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) } | ||||
20533 | }, | ||||
20534 | { &hf_rtps_flag_typeflag_nested, { | ||||
20535 | "NESTED", "rtps.flag.typeflags.nested", | ||||
20536 | 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) } | ||||
20537 | }, | ||||
20538 | { &hf_rtps_type_object_flags, { | ||||
20539 | "Flags", "rtps.flag.typeflags", | ||||
20540 | FT_UINT16, BASE_HEX, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20541 | }, | ||||
20542 | { &hf_rtps_flag_memberflag_key, { | ||||
20543 | "Key", "rtps.flag.typeflags.key", | ||||
20544 | 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) } | ||||
20545 | }, | ||||
20546 | { &hf_rtps_flag_memberflag_optional, { | ||||
20547 | "Optional", "rtps.flag.typeflags.optional", | ||||
20548 | 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) } | ||||
20549 | }, | ||||
20550 | { &hf_rtps_flag_memberflag_shareable, { | ||||
20551 | "Shareable", "rtps.flag.typeflags.shareable", | ||||
20552 | 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) } | ||||
20553 | }, | ||||
20554 | { &hf_rtps_flag_memberflag_union_default, { | ||||
20555 | "Union default", "rtps.flag.typeflags.union_default", | ||||
20556 | 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) } | ||||
20557 | }, | ||||
20558 | { &hf_rtps_type_object_element_module_name, | ||||
20559 | { "Module name", "rtps.type_object.module_name", | ||||
20560 | FT_STRINGZ, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20561 | }, | ||||
20562 | { &hf_rtps_flag_service_request_writer, { | ||||
20563 | "Service Request Writer", "rtps.flag.service_request_writer", | ||||
20564 | 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) } | ||||
20565 | }, | ||||
20566 | { &hf_rtps_flag_service_request_reader, { | ||||
20567 | "Service Request Reader", "rtps.flag.service_request_reader", | ||||
20568 | 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) } | ||||
20569 | }, | ||||
20570 | { &hf_rtps_flag_locator_ping_writer, { | ||||
20571 | "Locator Ping Writer", "rtps.flag.locator_ping_writer", | ||||
20572 | 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) } | ||||
20573 | }, | ||||
20574 | { &hf_rtps_flag_locator_ping_reader, { | ||||
20575 | "Locator Ping Reader", "rtps.flag.locator_ping_reader", | ||||
20576 | 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) } | ||||
20577 | }, | ||||
20578 | { &hf_rtps_flag_secure_service_request_writer, { | ||||
20579 | "Secure Service Request Writer", "rtps.flag.secure_service_request_writer", | ||||
20580 | 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) } | ||||
20581 | }, | ||||
20582 | { &hf_rtps_flag_secure_service_request_reader, { | ||||
20583 | "Secure Service Request Reader", "rtps.flag.secure_service_request_reader", | ||||
20584 | 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) } | ||||
20585 | }, | ||||
20586 | { &hf_rtps_flag_security_access_protected, { | ||||
20587 | "Access Protected", "rtps.flag.security.access_protected", | ||||
20588 | 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) } | ||||
20589 | }, | ||||
20590 | { &hf_rtps_flag_security_discovery_protected, { | ||||
20591 | "Discovery Protected", "rtps.flag.security.discovery_protected", | ||||
20592 | 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) } | ||||
20593 | }, | ||||
20594 | { &hf_rtps_flag_security_submessage_protected, { | ||||
20595 | "Submessage Protected", "rtps.flag.security.submessage_protected", | ||||
20596 | 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) } | ||||
20597 | }, | ||||
20598 | { &hf_rtps_flag_security_payload_protected, { | ||||
20599 | "Payload Protected", "rtps.flag.security.payload_protected", | ||||
20600 | 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) } | ||||
20601 | }, | ||||
20602 | { &hf_rtps_flag_endpoint_security_attribute_flag_is_read_protected,{ | ||||
20603 | "Read Protected", "rtps.flag.security.info.read_protected", | ||||
20604 | 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) } | ||||
20605 | }, | ||||
20606 | { &hf_rtps_flag_endpoint_security_attribute_flag_is_write_protected,{ | ||||
20607 | "Write Protected", "rtps.flag.security.info.write_protected", | ||||
20608 | 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) } | ||||
20609 | }, | ||||
20610 | { &hf_rtps_flag_endpoint_security_attribute_flag_is_discovery_protected,{ | ||||
20611 | "Discovery Protected", "rtps.flag.security.info.discovery_protected", | ||||
20612 | 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) } | ||||
20613 | }, | ||||
20614 | { &hf_rtps_flag_endpoint_security_attribute_flag_is_submessage_protected,{ | ||||
20615 | "Submessage Protected", "rtps.flag.security.info.submessage_protected", | ||||
20616 | 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) } | ||||
20617 | }, | ||||
20618 | { &hf_rtps_flag_endpoint_security_attribute_flag_is_payload_protected,{ | ||||
20619 | "Payload Protected", "rtps.flag.security.info.payload_protected", | ||||
20620 | 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) } | ||||
20621 | }, | ||||
20622 | { &hf_rtps_flag_endpoint_security_attribute_flag_is_key_protected,{ | ||||
20623 | "Key Protected", "rtps.flag.security.info.key_protected", | ||||
20624 | 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) } | ||||
20625 | }, | ||||
20626 | { &hf_rtps_flag_endpoint_security_attribute_flag_is_liveliness_protected,{ | ||||
20627 | "Liveliness Protected", "rtps.flag.security.info.liveliness_protected", | ||||
20628 | 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) } | ||||
20629 | }, | ||||
20630 | { &hf_rtps_flag_endpoint_security_attribute_flag_is_valid,{ | ||||
20631 | "Mask Valid", "rtps.flag.security.info.valid", | ||||
20632 | 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) } | ||||
20633 | }, | ||||
20634 | { &hf_rtps_param_endpoint_security_attributes_mask,{ | ||||
20635 | "EndpointSecurityAttributesMask", "rtps.param.endpoint_security_attributes", | ||||
20636 | FT_UINT32, BASE_HEX, NULL((void*)0), 0, | ||||
20637 | "Bitmask representing the EndpointSecurityAttributes flags in PID_ENDPOINT_SECURITY_INFO", | ||||
20638 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20639 | }, | ||||
20640 | { &hf_rtps_param_participant_security_symmetric_cipher_algorithms_builtin_endpoints_required_mask, { | ||||
20641 | "Builtin Endpoints Required Mask", "rtps.param.participant_security_symmetric_cipher_algorithms.builtin_endpoints_used_bit", | ||||
20642 | FT_UINT32, BASE_HEX, NULL((void*)0), 0, | ||||
20643 | "Bitmask representing the Symmetric Cipher algorithm the builtin endpoints use", | ||||
20644 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20645 | }, | ||||
20646 | { &hf_rtps_param_participant_security_symmetric_cipher_algorithms_builtin_endpoints_key_exchange_used_bit, { | ||||
20647 | "Key Exchange Builtin Endpoints Required Mask", "rtps.param.participant_security_symmetric_cipher_algorithms.builtin_endpoints_key_exchange_required_mask", | ||||
20648 | FT_UINT32, BASE_HEX, NULL((void*)0), 0, | ||||
20649 | "Bitmask representing the Symmetric Cipher algorithm the key exchange builtin endpoints require", | ||||
20650 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20651 | }, | ||||
20652 | { &hf_rtps_param_participant_security_symmetric_cipher_algorithms_user_endpoints_default_required_mask, { | ||||
20653 | "User Endpoints Default Required Mask", "rtps.param.participant_security_symmetric_cipher_algorithms.user_endpoints_default_required_mask", | ||||
20654 | FT_UINT32, BASE_HEX, 0, 0, | ||||
20655 | "Bitmask representing the default algorithm that endpoints use to protect data", | ||||
20656 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20657 | }, | ||||
20658 | { &hf_rtps_param_participant_security_symmetric_cipher_algorithms_supported_mask, { | ||||
20659 | "Supported Mask", "rtps.param.security_symmetric_cipher_algorithms.supported_mask", | ||||
20660 | FT_UINT32, BASE_HEX, 0, 0, "Bitmask representing supported Symmetric Cipher algorithms", | ||||
20661 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20662 | }, | ||||
20663 | { &hf_rtps_param_compression_id_mask, { | ||||
20664 | "Compression Id Mask", "rtps.param.compression_id_mask", | ||||
20665 | FT_UINT32, BASE_HEX, 0, 0, "Bitmask representing compression id.", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20666 | }, | ||||
20667 | { &hf_rtps_flag_compression_id_zlib, { | ||||
20668 | "ZLIB", "rtps.flag.compression_id_zlib", | ||||
20669 | 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) } | ||||
20670 | }, | ||||
20671 | { &hf_rtps_flag_compression_id_bzip2, { | ||||
20672 | "BZIP2", "rtps.flag.compression_id_bzip2", | ||||
20673 | 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) } | ||||
20674 | }, | ||||
20675 | { &hf_rtps_flag_compression_id_lz4, { | ||||
20676 | "LZ4", "rtps.flag.compression_id_lz4", | ||||
20677 | 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) } | ||||
20678 | }, | ||||
20679 | { &hf_rtps_flag_security_supported, { | ||||
20680 | "Supported", "rtps.security.supported", | ||||
20681 | FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20682 | }, | ||||
20683 | { &hf_rtps_flag_security_required, { | ||||
20684 | "Required", "rtps.security.required", | ||||
20685 | FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20686 | }, | ||||
20687 | { &hf_rtps_flag_security_symmetric_cipher_mask_aes128_gcm, { | ||||
20688 | "AES128 GCM", "rtps.flag.security_symmetric_cipher_mask.aes128_gcm", | ||||
20689 | 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) } | ||||
20690 | }, | ||||
20691 | { &hf_rtps_flag_security_symmetric_cipher_mask_aes256_gcm, { | ||||
20692 | "AES256 GCM", "rtps.flag.security_symmetric_cipher_mask.aes256_gcm", | ||||
20693 | 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) } | ||||
20694 | }, | ||||
20695 | { &hf_rtps_flag_security_symmetric_cipher_mask_vendor_rti_aes192_gcm, { | ||||
20696 | "AES192 GCM (RTI)", "rtps.flag.security_symmetric_cipher_mask.vendor_rti_aes192_gcm", | ||||
20697 | 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) } | ||||
20698 | }, | ||||
20699 | { &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm01, { | ||||
20700 | "Vendor Specific Algorithm", "rtps.flag.security_symmetric_cipher_mask.vendor_specific_algorithm_01", | ||||
20701 | 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) } | ||||
20702 | }, | ||||
20703 | { &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm02, { | ||||
20704 | "Vendor Specific Algorithm", "rtps.flag.security_symmetric_cipher_mask.vendor_specific_algorithm_02", | ||||
20705 | 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) } | ||||
20706 | }, | ||||
20707 | { &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm03, { | ||||
20708 | "Vendor Specific Algorithm", "rtps.flag.security_symmetric_cipher_mask.vendor_specific_algorithm_03", | ||||
20709 | 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) } | ||||
20710 | }, | ||||
20711 | { &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm04, { | ||||
20712 | "Vendor Specific Algorithm", "rtps.flag.security_symmetric_cipher_mask.vendor_specific_algorithm_04", | ||||
20713 | 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) } | ||||
20714 | }, | ||||
20715 | { &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm05, { | ||||
20716 | "Vendor Specific Algorithm", "rtps.flag.security_symmetric_cipher_mask.vendor_specific_algorithm_05", | ||||
20717 | 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) } | ||||
20718 | }, | ||||
20719 | { &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm06, { | ||||
20720 | "Vendor Specific Algorithm", "rtps.flag.security_symmetric_cipher_mask.vendor_specific_algorithm_06", | ||||
20721 | 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) } | ||||
20722 | }, | ||||
20723 | { &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm07, { | ||||
20724 | "Vendor Specific Algorithm", "rtps.flag.security_symmetric_cipher_mask.vendor_specific_algorithm_07", | ||||
20725 | 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) } | ||||
20726 | }, | ||||
20727 | { &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm08, { | ||||
20728 | "Vendor Specific Algorithm", "rtps.flag.security_symmetric_cipher_mask.vendor_specific_algorithm_08", | ||||
20729 | 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) } | ||||
20730 | }, | ||||
20731 | { &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm09, { | ||||
20732 | "Vendor Specific Algorithm", "rtps.flag.security_symmetric_cipher_mask.vendor_specific_algorithm_09", | ||||
20733 | 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) } | ||||
20734 | }, | ||||
20735 | { &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm10, { | ||||
20736 | "Vendor Specific Algorithm", "rtps.flag.security_symmetric_cipher_mask.vendor_specific_algorithm_10", | ||||
20737 | 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) } | ||||
20738 | }, | ||||
20739 | { &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm11, { | ||||
20740 | "Vendor Specific Algorithm", "rtps.flag.security_symmetric_cipher_mask.vendor_specific_algorithm_11", | ||||
20741 | 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) } | ||||
20742 | }, | ||||
20743 | { &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm12, { | ||||
20744 | "Vendor Specific Algorithm", "rtps.flag.security_symmetric_cipher_mask.vendor_specific_algorithm_12", | ||||
20745 | 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) } | ||||
20746 | }, | ||||
20747 | { &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm13, { | ||||
20748 | "Vendor Specific Algorithm", "rtps.flag.security_symmetric_cipher_mask.vendor_specific_algorithm_13", | ||||
20749 | 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) } | ||||
20750 | }, | ||||
20751 | { &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm14, { | ||||
20752 | "Vendor Specific Algorithm", "rtps.flag.security_symmetric_cipher_mask.vendor_specific_algorithm_14", | ||||
20753 | 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) } | ||||
20754 | }, | ||||
20755 | { &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm15, { | ||||
20756 | "Vendor Specific Algorithm", "rtps.flag.security_symmetric_cipher_mask.vendor_specific_algorithm_15", | ||||
20757 | 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) } | ||||
20758 | }, | ||||
20759 | { &hf_rtps_flag_security_symmetric_cipher_mask_vendor_specific_algorithm16, { | ||||
20760 | "Vendor Specific Algorithm", "rtps.flag.security_symmetric_cipher_mask.vendor_specific_algorithm_16", | ||||
20761 | 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) } | ||||
20762 | }, | ||||
20763 | { &hf_rtps_flag_security_key_establishment_mask_dhe_modp2048256, { | ||||
20764 | "DHE_MODP2048256", "rtps.flag.security_key_establishment_mask.dhe_modp2048256", | ||||
20765 | 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) } | ||||
20766 | }, | ||||
20767 | { &hf_rtps_flag_security_key_establishment_mask_ecdheceum_p256, { | ||||
20768 | "ECDHECEUM_P256", "rtps.flag.security_key_establishment_mask.ecdheceum_p256", | ||||
20769 | 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) } | ||||
20770 | }, | ||||
20771 | { &hf_rtps_flag_security_key_establishment_mask_ecdheceum_p384, { | ||||
20772 | "ECDHECEUM_P384", "rtps.flag.security_key_establishment_mask.ecdheceum_p384", | ||||
20773 | 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) } | ||||
20774 | }, | ||||
20775 | { &hf_rtps_flag_security_key_establishment_mask_ecdheceum_x25519, { | ||||
20776 | "ECDHECEUM_X25519 (RTI)", "rtps.flag.security_key_establishment_mask.vendor_rti_ecdheceum_x25519", | ||||
20777 | 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) } | ||||
20778 | }, | ||||
20779 | { &hf_rtps_flag_security_key_establishment_mask_ecdheceum_x448, { | ||||
20780 | "ECDHECEUM_X448 (RTI)", "rtps.flag.security_key_establishment_mask.vendor_rti_ecdheceum_x448", | ||||
20781 | 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) } | ||||
20782 | }, | ||||
20783 | { &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm01, { | ||||
20784 | "Vendor Specific Algorithm", "rtps.flag.security_key_establishment_mask.vendor_specific_algorithm_01", | ||||
20785 | 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) } | ||||
20786 | }, | ||||
20787 | { &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm02, { | ||||
20788 | "Vendor Specific Algorithm", "rtps.flag.security_key_establishment_mask.vendor_specific_algorithm_02", | ||||
20789 | 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) } | ||||
20790 | }, | ||||
20791 | { &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm03, { | ||||
20792 | "Vendor Specific Algorithm", "rtps.flag.security_key_establishment_mask.vendor_specific_algorithm_03", | ||||
20793 | 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) } | ||||
20794 | }, | ||||
20795 | { &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm04, { | ||||
20796 | "Vendor Specific Algorithm", "rtps.flag.security_key_establishment_mask.vendor_specific_algorithm_04", | ||||
20797 | 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) } | ||||
20798 | }, | ||||
20799 | { &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm05, { | ||||
20800 | "Vendor Specific Algorithm", "rtps.flag.security_key_establishment_mask.vendor_specific_algorithm_05", | ||||
20801 | 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) } | ||||
20802 | }, | ||||
20803 | { &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm06, { | ||||
20804 | "Vendor Specific Algorithm", "rtps.flag.security_key_establishment_mask.vendor_specific_algorithm_06", | ||||
20805 | 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) } | ||||
20806 | }, | ||||
20807 | { &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm07, { | ||||
20808 | "Vendor Specific Algorithm", "rtps.flag.security_key_establishment_mask.vendor_specific_algorithm_07", | ||||
20809 | 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) } | ||||
20810 | }, | ||||
20811 | { &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm08, { | ||||
20812 | "Vendor Specific Algorithm", "rtps.flag.security_key_establishment_mask.vendor_specific_algorithm_08", | ||||
20813 | 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) } | ||||
20814 | }, | ||||
20815 | { &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm09, { | ||||
20816 | "Vendor Specific Algorithm", "rtps.flag.security_key_establishment_mask.vendor_specific_algorithm_09", | ||||
20817 | 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) } | ||||
20818 | }, | ||||
20819 | { &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm10, { | ||||
20820 | "Vendor Specific Algorithm", "rtps.flag.security_key_establishment_mask.vendor_specific_algorithm_10", | ||||
20821 | 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) } | ||||
20822 | }, | ||||
20823 | { &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm11, { | ||||
20824 | "Vendor Specific Algorithm", "rtps.flag.security_key_establishment_mask.vendor_specific_algorithm_11", | ||||
20825 | 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) } | ||||
20826 | }, | ||||
20827 | { &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm12, { | ||||
20828 | "Vendor Specific Algorithm", "rtps.flag.security_key_establishment_mask.vendor_specific_algorithm_12", | ||||
20829 | 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) } | ||||
20830 | }, | ||||
20831 | { &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm13, { | ||||
20832 | "Vendor Specific Algorithm", "rtps.flag.security_key_establishment_mask.vendor_specific_algorithm_13", | ||||
20833 | 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) } | ||||
20834 | }, | ||||
20835 | { &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm14, { | ||||
20836 | "Vendor Specific Algorithm", "rtps.flag.security_key_establishment_mask.vendor_specific_algorithm_14", | ||||
20837 | 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) } | ||||
20838 | }, | ||||
20839 | { &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm15, { | ||||
20840 | "Vendor Specific Algorithm", "rtps.flag.security_key_establishment_mask.vendor_specific_algorithm_15", | ||||
20841 | 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) } | ||||
20842 | }, | ||||
20843 | { &hf_rtps_flag_security_key_establishment_mask_vendor_specific_algorithm16, { | ||||
20844 | "Vendor Specific Algorithm", "rtps.flag.security_key_establishment_mask.vendor_specific_algorithm_16", | ||||
20845 | 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) } | ||||
20846 | }, | ||||
20847 | { &hf_rtps_flag_security_algorithm_compatibility_mode, { | ||||
20848 | "Compatibility Mode", "rtps.flag.security_algorithm_compatibility_mode", | ||||
20849 | 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) } | ||||
20850 | }, | ||||
20851 | { &hf_rtps_flag_plugin_endpoint_security_attribute_flag_is_payload_encrypted, { | ||||
20852 | "Submessage Encrypted", "rtps.flag.security.info.plugin_submessage_encrypted", | ||||
20853 | 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) } | ||||
20854 | }, | ||||
20855 | { &hf_rtps_param_crypto_algorithm_requirements_trust_chain, { | ||||
20856 | "Supported", "rtps.param.crypto_algorithm_requirements.supported", | ||||
20857 | FT_UINT32, BASE_HEX, 0, 0, "Bitmask representing the trust chain", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20858 | }, | ||||
20859 | { &hf_rtps_param_crypto_algorithm_requirements_message_auth, { | ||||
20860 | "Required", "rtps.param.crypto_algorithm_requirements.required", | ||||
20861 | FT_UINT32, BASE_HEX, 0, 0, "Bitmask representing the message authentication", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20862 | }, | ||||
20863 | { &hf_rtps_flag_security_digital_signature_mask_rsassapssmgf1sha256_2048_sha256, { | ||||
20864 | "RSASSAPSSMGF1SHA256_2048_SHA256", "rtps.flag.security_digital_signature_mask.rsassapssmgf1sha256_2048_sha256", | ||||
20865 | 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) } | ||||
20866 | }, | ||||
20867 | { &hf_rtps_flag_security_digital_signature_mask_rsassapkcs1v15_2048_sha256, { | ||||
20868 | "RSASSAPKCS1V15_2048_SHA256", "rtps.flag.security_digital_signature_mask.rsassapkcs1v15_2048_sha256", | ||||
20869 | 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) } | ||||
20870 | }, | ||||
20871 | { &hf_rtps_flag_security_digital_signature_mask_ecdsa_p256_sha256, { | ||||
20872 | "ECDSA_P256_SHA256", "rtps.flag.security_digital_signature_mask.ecdsa_p256_sha256", | ||||
20873 | 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) } | ||||
20874 | }, | ||||
20875 | { &hf_rtps_flag_security_digital_signature_mask_ecdsa_p384_sha384, { | ||||
20876 | "ECDSA_P384_SHA384", "rtps.flag.security_digital_signature_mask.ecdsa_p384_sha384", | ||||
20877 | 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) } | ||||
20878 | }, | ||||
20879 | { &hf_rtps_flag_security_digital_signature_mask_ecdsa_ed25519_sha512, { | ||||
20880 | "EDDSA_ED25519_SHA512 (RTI)", "rtps.flag.security_digital_signature_mask.vendor_rti_ecdsa_ed25519_sha512", | ||||
20881 | 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) } | ||||
20882 | }, | ||||
20883 | { &hf_rtps_flag_security_digital_signature_mask_ecdsa_ed448_shake256, { | ||||
20884 | "EDDSA_ED448_SHAKE256 (RTI)", "rtps.flag.security_digital_signature_mask.vendor_rti_ecdsa_ed448_shake256", | ||||
20885 | 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) } | ||||
20886 | }, | ||||
20887 | { &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm01, { | ||||
20888 | "Vendor Specific Algorithm", "rtps.flag.security_digital_signature_mask.vendor_specific_algorithm_01", | ||||
20889 | 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) } | ||||
20890 | }, | ||||
20891 | { &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm02, { | ||||
20892 | "Vendor Specific Algorithm", "rtps.flag.security_digital_signature_mask.vendor_specific_algorithm_02", | ||||
20893 | 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) } | ||||
20894 | }, | ||||
20895 | { &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm03, { | ||||
20896 | "Vendor Specific Algorithm", "rtps.flag.security_digital_signature_mask.vendor_specific_algorithm_03", | ||||
20897 | 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) } | ||||
20898 | }, | ||||
20899 | { &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm04, { | ||||
20900 | "Vendor Specific Algorithm", "rtps.flag.security_digital_signature_mask.vendor_specific_algorithm_04", | ||||
20901 | 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) } | ||||
20902 | }, | ||||
20903 | { &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm05, { | ||||
20904 | "Vendor Specific Algorithm", "rtps.flag.security_digital_signature_mask.vendor_specific_algorithm_05", | ||||
20905 | 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) } | ||||
20906 | }, | ||||
20907 | { &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm06, { | ||||
20908 | "Vendor Specific Algorithm", "rtps.flag.security_digital_signature_mask.vendor_specific_algorithm_06", | ||||
20909 | 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) } | ||||
20910 | }, | ||||
20911 | { &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm07, { | ||||
20912 | "Vendor Specific Algorithm", "rtps.flag.security_digital_signature_mask.vendor_specific_algorithm_07", | ||||
20913 | 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) } | ||||
20914 | }, | ||||
20915 | { &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm08, { | ||||
20916 | "Vendor Specific Algorithm", "rtps.flag.security_digital_signature_mask.vendor_specific_algorithm_08", | ||||
20917 | 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) } | ||||
20918 | }, | ||||
20919 | { &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm09, { | ||||
20920 | "Vendor Specific Algorithm", "rtps.flag.security_digital_signature_mask.vendor_specific_algorithm_09", | ||||
20921 | 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) } | ||||
20922 | }, | ||||
20923 | { &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm10, { | ||||
20924 | "Vendor Specific Algorithm", "rtps.flag.security_digital_signature_mask.vendor_specific_algorithm_10", | ||||
20925 | 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) } | ||||
20926 | }, | ||||
20927 | { &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm11, { | ||||
20928 | "Vendor Specific Algorithm", "rtps.flag.security_digital_signature_mask.vendor_specific_algorithm_11", | ||||
20929 | 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) } | ||||
20930 | }, | ||||
20931 | { &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm12, { | ||||
20932 | "Vendor Specific Algorithm", "rtps.flag.security_digital_signature_mask.vendor_specific_algorithm_12", | ||||
20933 | 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) } | ||||
20934 | }, | ||||
20935 | { &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm13, { | ||||
20936 | "Vendor Specific Algorithm", "rtps.flag.security_digital_signature_mask.vendor_specific_algorithm_13", | ||||
20937 | 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) } | ||||
20938 | }, | ||||
20939 | { &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm14, { | ||||
20940 | "Vendor Specific Algorithm", "rtps.flag.security_digital_signature_mask.vendor_specific_algorithm_14", | ||||
20941 | 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) } | ||||
20942 | }, | ||||
20943 | { &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm15, { | ||||
20944 | "Vendor Specific Algorithm", "rtps.flag.security_digital_signature_mask.vendor_specific_algorithm_15", | ||||
20945 | 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) } | ||||
20946 | }, | ||||
20947 | { &hf_rtps_flag_security_digital_signature_mask_vendor_specific_algorithm16, { | ||||
20948 | "Vendor Specific Algorithm", "rtps.flag.security_digital_signature_mask.vendor_specific_algorithm_16", | ||||
20949 | 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) } | ||||
20950 | }, | ||||
20951 | { &hf_rtps_flag_plugin_endpoint_security_attribute_flag_is_key_encrypted,{ | ||||
20952 | "Payload Encrypted", "rtps.flag.security.info.plugin_payload_encrypted", | ||||
20953 | 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) } | ||||
20954 | }, | ||||
20955 | { &hf_rtps_flag_plugin_endpoint_security_attribute_flag_is_liveliness_encrypted,{ | ||||
20956 | "Submessage Origin Encrypted", "rtps.flag.security.info.plugin_liveliness_encrypted", | ||||
20957 | 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) } | ||||
20958 | }, | ||||
20959 | { &hf_rtps_flag_plugin_endpoint_security_attribute_flag_is_valid,{ | ||||
20960 | "Mask Valid", "rtps.flag.security.info.plugin_valid", | ||||
20961 | 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) } | ||||
20962 | }, | ||||
20963 | { &hf_rtps_param_plugin_endpoint_security_attributes_mask,{ | ||||
20964 | "PluginEndpointSecurityAttributesMask (valid dissection if using the Specification Builtin Plugins)", | ||||
20965 | "rtps.param.plugin_endpoint_security_attributes", | ||||
20966 | FT_UINT32, BASE_HEX, NULL((void*)0), 0, | ||||
20967 | "bitmask representing the PluginEndpointSecurityAttributes flags in PID_ENDPOINT_SECURITY_INFO", | ||||
20968 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
20969 | }, | ||||
20970 | { &hf_rtps_flag_participant_security_attribute_flag_is_rtps_protected,{ | ||||
20971 | "RTPS Protected", "rtps.flag.security.info.participant_rtps_protected", | ||||
20972 | 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) } | ||||
20973 | }, | ||||
20974 | { &hf_rtps_flag_participant_security_attribute_flag_is_discovery_protected,{ | ||||
20975 | "Discovery Protected", "rtps.flag.security.info.participant_discovery_protected", | ||||
20976 | 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) } | ||||
20977 | }, | ||||
20978 | { &hf_rtps_flag_participant_security_attribute_flag_is_liveliness_protected,{ | ||||
20979 | "Liveliness Protected", "rtps.flag.security.info.participant_liveliness_protected", | ||||
20980 | 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) } | ||||
20981 | }, | ||||
20982 | { &hf_rtps_flag_participant_security_attribute_flag_key_revisions_enabled,{ | ||||
20983 | "Key Revisions Enabled", "rtps.flag.security.info.key_revisions_enabled", | ||||
20984 | 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) } | ||||
20985 | }, | ||||
20986 | { &hf_rtps_flag_participant_security_attribute_flag_key_psk_protected,{ | ||||
20987 | "RTPS Pre-Shared Key Protected", "rtps.flag.security.info.participant_psk_protected", | ||||
20988 | 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) } | ||||
20989 | }, | ||||
20990 | { &hf_rtps_flag_participant_security_attribute_flag_is_valid,{ | ||||
20991 | "Mask Valid", "rtps.flag.security.info.participant_mask_valid", | ||||
20992 | 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) } | ||||
20993 | }, | ||||
20994 | { &hf_rtps_param_participant_security_attributes_mask,{ | ||||
20995 | "ParticipantSecurityAttributesMask", | ||||
20996 | "rtps.param.participant_security_attributes", | ||||
20997 | FT_UINT32, BASE_HEX, NULL((void*)0), 0, | ||||
20998 | "bitmask representing the ParticipantSecurityAttributes flags in PID_PARTICIPANT_SECURITY_INFO", | ||||
20999 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21000 | }, | ||||
21001 | { &hf_rtps_flag_plugin_participant_security_attribute_flag_is_rtps_encrypted,{ | ||||
21002 | "RTPS Encrypted", "rtps.flag.security.info.plugin_participant_rtps_encrypted", | ||||
21003 | 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) } | ||||
21004 | }, | ||||
21005 | { &hf_rtps_flag_plugin_participant_security_attribute_flag_is_discovery_encrypted,{ | ||||
21006 | "Discovery Encrypted", "rtps.flag.security.info.plugin_participant_discovery_encrypted", | ||||
21007 | 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) } | ||||
21008 | }, | ||||
21009 | { &hf_rtps_flag_plugin_participant_security_attribute_flag_is_liveliness_encrypted,{ | ||||
21010 | "Liveliness Encrypted", "rtps.flag.security.info.plugin_participant_liveliness_encrypted", | ||||
21011 | 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) } | ||||
21012 | }, | ||||
21013 | { &hf_rtps_flag_plugin_participant_security_attribute_flag_is_rtps_origin_encrypted,{ | ||||
21014 | "RTPS Origin Encrypted", "rtps.flag.security.info.plugin_participant_rtps_origin_encrypted", | ||||
21015 | 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) } | ||||
21016 | }, | ||||
21017 | { &hf_rtps_flag_plugin_participant_security_attribute_flag_is_discovery_origin_encrypted,{ | ||||
21018 | "Discovery Origin Encrypted", "rtps.flag.security.info.plugin_participant_discovery_origin_encrypted", | ||||
21019 | 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) } | ||||
21020 | }, | ||||
21021 | { &hf_rtps_flag_plugin_participant_security_attribute_flag_is_liveliness_origin_encrypted,{ | ||||
21022 | "Liveliness Origin Encrypted", "rtps.flag.security.info.plugin_participant_liveliness_origin_encrypted", | ||||
21023 | 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) } | ||||
21024 | }, | ||||
21025 | { &hf_rtps_flag_plugin_participant_security_attribute_flag_is_psk_encrypted,{ | ||||
21026 | "RTPS Pre-Shared Key Encrypted", "rtps.flag.security.info.plugin_participant_psk_encrypted", | ||||
21027 | 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) } | ||||
21028 | }, | ||||
21029 | { &hf_rtps_flag_plugin_participant_security_attribute_flag_is_valid,{ | ||||
21030 | "Mask Valid", "rtps.flag.security.info.plugin_participant_mask_valid", | ||||
21031 | 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) } | ||||
21032 | }, | ||||
21033 | { &hf_rtps_param_plugin_participant_security_attributes_mask,{ | ||||
21034 | "PluginParticipantSecurityAttributesMask (valid dissection if using the Specification Builtin Plugins)", | ||||
21035 | "rtps.param.plugin_participant_security_attributes", | ||||
21036 | FT_UINT32, BASE_HEX, NULL((void*)0), 0, | ||||
21037 | "bitmask representing the PluginParticipantSecurityAttributes flags in PID_PARTICIPANT_SECURITY_INFO", | ||||
21038 | HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21039 | }, | ||||
21040 | { &hf_rtps_param_enable_authentication, | ||||
21041 | { "Authentication enabled", "rtps.secure.enable_authentication", | ||||
21042 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21043 | }, | ||||
21044 | { &hf_rtps_param_builtin_endpoint_qos, | ||||
21045 | { "Built-in Endpoint QoS", "rtps.param.builtin_endpoint_qos", | ||||
21046 | FT_UINT32, BASE_HEX, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21047 | }, | ||||
21048 | { &hf_rtps_param_sample_signature_epoch, | ||||
21049 | { "Epoch", "rtps.sample_signature.epoch", | ||||
21050 | FT_UINT64, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21051 | }, | ||||
21052 | { &hf_rtps_param_sample_signature_nonce, | ||||
21053 | { "Nonce", "rtps.sample_signature.nonce", | ||||
21054 | FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21055 | }, | ||||
21056 | { &hf_rtps_param_sample_signature_length, | ||||
21057 | {"Signature Length", "rtps.sample_signature.signature_length", | ||||
21058 | FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21059 | }, | ||||
21060 | { &hf_rtps_param_sample_signature_signature, | ||||
21061 | { "Signature", "rtps.sample_signature.signature", | ||||
21062 | FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21063 | }, | ||||
21064 | { &hf_rtps_secure_dataheader_transformation_kind, { | ||||
21065 | "Transformation Kind", "rtps.secure.data_header.transformation_kind", | ||||
21066 | FT_INT8, BASE_DEC, VALS(secure_transformation_kind)((0 ? (const struct _value_string*)0 : ((secure_transformation_kind )))), 0, | ||||
21067 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21068 | }, | ||||
21069 | { &hf_rtps_secure_dataheader_transformation_key_revision_id, { | ||||
21070 | "Transformation Key Revision Id", "rtps.secure.data_header.transformation_key_revision_id", | ||||
21071 | FT_INT24, BASE_DEC, NULL((void*)0), 0, | ||||
21072 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21073 | }, | ||||
21074 | { &hf_rtps_secure_dataheader_transformation_key_id, { | ||||
21075 | "Transformation Key Id", "rtps.secure.data_header.transformation_key", | ||||
21076 | FT_BYTES, BASE_NONE, NULL((void*)0), 0, | ||||
21077 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21078 | }, | ||||
21079 | { &hf_rtps_secure_dataheader_passphrase_id, { | ||||
21080 | "Passphrase Id", "rtps.secure.data_header.passphrase_id", | ||||
21081 | FT_UINT32, BASE_DEC, NULL((void*)0), 0, | ||||
21082 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21083 | }, | ||||
21084 | { &hf_rtps_secure_dataheader_passphrase_key_id, { | ||||
21085 | "Passphrase Key Id", "rtps.secure.data_header.passphrase_key_id", | ||||
21086 | FT_UINT8, BASE_HEX, NULL((void*)0), 0, | ||||
21087 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21088 | }, | ||||
21089 | { &hf_rtps_secure_dataheader_init_vector_suffix, { | ||||
21090 | "Plugin Secure Header", "rtps.secure.data_header.init_vector_suffix", | ||||
21091 | FT_BYTES, BASE_NONE, NULL((void*)0), 0, | ||||
21092 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21093 | }, | ||||
21094 | { &hf_rtps_secure_dataheader_session_id, { | ||||
21095 | "Session Id", "rtps.secure.data_header.session_id", | ||||
21096 | FT_UINT32, BASE_HEX, NULL((void*)0), 0, | ||||
21097 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21098 | }, | ||||
21099 | { &hf_rtps_secure_datatag_plugin_sec_tag, { | ||||
21100 | "Receiver-Specific Mac", | ||||
21101 | "rtps.secure.data_tag.receiver_specific_mac", | ||||
21102 | FT_BYTES, BASE_NONE, NULL((void*)0), 0, | ||||
21103 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21104 | }, | ||||
21105 | { &hf_rtps_secure_datatag_plugin_sec_tag_key, { | ||||
21106 | "Receiver-Specific Mac Key Id", | ||||
21107 | "rtps.secure.data_tag.receiver_specific_macs_key_id", | ||||
21108 | FT_BYTES, BASE_NONE, NULL((void*)0), 0, | ||||
21109 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21110 | }, | ||||
21111 | { &hf_rtps_secure_datatag_plugin_sec_tag_common_mac, { | ||||
21112 | "Plugin Secure Tag Common Mac", "rtps.secure.data_tag.common_mac", | ||||
21113 | FT_BYTES, BASE_NONE, NULL((void*)0), 0, | ||||
21114 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21115 | }, | ||||
21116 | { &hf_rtps_secure_datatag_plugin_specific_macs_len, { | ||||
21117 | "Plugin Secure Tag Receiver-Specific Macs Length", "rtps.secure.data_tag.specific_macs_len", | ||||
21118 | FT_UINT32, BASE_DEC, NULL((void*)0), 0, | ||||
21119 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21120 | }, | ||||
21121 | { &hf_rtps_srm_service_id, | ||||
21122 | { "Service Id", "rtps.srm.service_id", | ||||
21123 | 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) } | ||||
21124 | }, | ||||
21125 | { &hf_rtps_srm_request_body, { | ||||
21126 | "Request Body", "rtps.srm.request_body", | ||||
21127 | FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21128 | }, | ||||
21129 | { &hf_rtps_srm_instance_id, { | ||||
21130 | "Instance Id", "rtps.srm.instance_id", | ||||
21131 | FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21132 | }, | ||||
21133 | { &hf_rtps_topic_query_selection_filter_class_name, | ||||
21134 | { "Class Name", "rtps.srm.topic_query.class_name", | ||||
21135 | FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21136 | }, | ||||
21137 | { &hf_rtps_topic_query_selection_filter_expression, | ||||
21138 | { "Filter Expression", "rtps.srm.topic_query.filter_expression", | ||||
21139 | FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21140 | }, | ||||
21141 | { &hf_rtps_topic_query_selection_filter_parameter, | ||||
21142 | { "Filter Parameter", "rtps.srm.topic_query.filter_parameter", | ||||
21143 | FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21144 | }, | ||||
21145 | { &hf_rtps_topic_query_selection_num_parameters, | ||||
21146 | { "Number of Filter Parameters", "rtps.srm.topic_query.num_filter_parameters", | ||||
21147 | FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21148 | }, | ||||
21149 | { &hf_rtps_topic_query_topic_name, | ||||
21150 | { "Topic Name", "rtps.srm.topic_query.topic_name", | ||||
21151 | FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21152 | }, | ||||
21153 | { &hf_rtps_topic_query_original_related_reader_guid, | ||||
21154 | { "Original Related Reader GUID", "rtps.srm.topic_query.original_related_reader_guid", | ||||
21155 | FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21156 | }, | ||||
21157 | { &hf_rtps_topic_query_selection_kind, | ||||
21158 | { "Topic Query Selection Kind", "rtps.srm.topic_query.kind", | ||||
21159 | 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) } | ||||
21160 | }, | ||||
21161 | { &hf_rtps_data_session_intermediate, | ||||
21162 | { "Data Session Intermediate Packet", "rtps.data_session.intermediate", | ||||
21163 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x00, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21164 | }, | ||||
21165 | { &hf_rtps_secure_secure_data_length, | ||||
21166 | { "Secure Data Length", "rtps.secure.secure_data_length", | ||||
21167 | FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21168 | }, | ||||
21169 | { &hf_rtps_secure_secure_data, | ||||
21170 | { "Secure Data", "rtps.secure.secure_data", | ||||
21171 | 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) } | ||||
21172 | }, | ||||
21173 | { &hf_rtps_secure_session_key, | ||||
21174 | { "[Session Key]", "rtps.secure.session_key", | ||||
21175 | 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) } | ||||
21176 | }, | ||||
21177 | { &hf_rtps_pgm, { | ||||
21178 | "Participant Generic Message", "rtps.pgm", | ||||
21179 | 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) } | ||||
21180 | }, | ||||
21181 | { &hf_rtps_srm, { | ||||
21182 | "Service Request Message", "rtps.srm", | ||||
21183 | 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) } | ||||
21184 | }, | ||||
21185 | { &hf_rtps_pgm_dst_participant_guid, | ||||
21186 | { "Destination Participant GUID", "rtps.pgm.dst_participant_guid", | ||||
21187 | FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21188 | }, | ||||
21189 | { &hf_rtps_source_participant_guid, | ||||
21190 | { "Source Participant GUID", "rtps.pgm.source_participant_guid", | ||||
21191 | FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21192 | }, | ||||
21193 | { &hf_rtps_pgm_dst_endpoint_guid, | ||||
21194 | { "Destination Endpoint GUID", "rtps.pgm.dst_endpoint_guid", | ||||
21195 | FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21196 | }, | ||||
21197 | { &hf_rtps_pgm_src_endpoint_guid, | ||||
21198 | { "Source Endpoint GUID", "rtps.pgm.src_endpoint_guid", | ||||
21199 | FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21200 | }, | ||||
21201 | { &hf_rtps_message_identity_source_guid, | ||||
21202 | { "Source GUID", "rtps.pgm.message_identity.source_guid", | ||||
21203 | FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21204 | }, | ||||
21205 | { &hf_rtps_pgm_message_class_id, | ||||
21206 | { "Message class id", "rtps.pgm.data_holder.message_class_id", | ||||
21207 | FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21208 | }, | ||||
21209 | { &hf_rtps_pgm_data_holder_class_id, | ||||
21210 | { "Class Id", "rtps.pgm.data_holder.class_id", | ||||
21211 | FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21212 | }, | ||||
21213 | #if 0 | ||||
21214 | { &hf_rtps_pgm_data_holder_stringseq_size, | ||||
21215 | { "Size", "rtps.pgm.data_holder.string_seq_size", | ||||
21216 | FT_INT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21217 | }, | ||||
21218 | { &hf_rtps_pgm_data_holder_stringseq_name, | ||||
21219 | { "Name", "rtps.pgm.data_holder.string_seq_name", | ||||
21220 | FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21221 | }, | ||||
21222 | { &hf_rtps_pgm_data_holder_long_long, | ||||
21223 | { "Long long", "rtps.pgm.data_holder.long_long", | ||||
21224 | FT_INT64, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21225 | }, | ||||
21226 | #endif | ||||
21227 | { &hf_rtps_param_topic_query_publication_enable, | ||||
21228 | { "Enable", "rtps.param.topic_query_publication_enable", | ||||
21229 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21230 | }, | ||||
21231 | { &hf_rtps_param_topic_query_publication_sessions, | ||||
21232 | { "Number of sessions", "rtps.param.topic_query_publication_sessions", | ||||
21233 | FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21234 | }, | ||||
21235 | { &hf_rtps_pl_cdr_member, | ||||
21236 | { "Member value", "rtps.data.value", | ||||
21237 | FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21238 | }, | ||||
21239 | { &hf_rtps_pl_cdr_member_id, | ||||
21240 | { "Member ID", "rtps.data.member_id", | ||||
21241 | FT_UINT16, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21242 | }, | ||||
21243 | { &hf_rtps_pl_cdr_member_length, | ||||
21244 | { "Member length", "rtps.data.member_length", | ||||
21245 | FT_UINT16, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21246 | }, | ||||
21247 | { &hf_rtps_pl_cdr_member_id_ext, | ||||
21248 | { "Member ID", "rtps.data.member_id", | ||||
21249 | FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21250 | }, | ||||
21251 | { &hf_rtps_pl_cdr_member_length_ext, | ||||
21252 | { "Member length", "rtps.data.member_length", | ||||
21253 | FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21254 | }, | ||||
21255 | { &hf_rtps_dcps_publication_data_frame_number,{ | ||||
21256 | "DCPSPublicationData In", "rtps.dcps_publication_data_frame_number", | ||||
21257 | FT_FRAMENUM, BASE_NONE, NULL((void*)0), 0x0, | ||||
21258 | "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) } | ||||
21259 | }, | ||||
21260 | { &hf_rtps_data_tag_name, | ||||
21261 | { "Name", "rtps.param.data_tag.name", | ||||
21262 | FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21263 | }, | ||||
21264 | { &hf_rtps_data_tag_value, | ||||
21265 | { "Value", "rtps.param.data_tag.value", | ||||
21266 | FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21267 | }, | ||||
21268 | { &hf_rtps_fragments, | ||||
21269 | { "Message fragments", "rtps.fragments", | ||||
21270 | FT_NONE, BASE_NONE, NULL((void*)0), 0x00, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21271 | }, | ||||
21272 | { &hf_rtps_fragment, | ||||
21273 | { "Message fragment", "rtps.fragment", | ||||
21274 | FT_FRAMENUM, BASE_NONE, NULL((void*)0), 0x00, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21275 | }, | ||||
21276 | { &hf_rtps_fragment_overlap, | ||||
21277 | { "Message fragment overlap", "rtps.fragment.overlap", | ||||
21278 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x00, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21279 | }, | ||||
21280 | { &hf_rtps_fragment_overlap_conflict, | ||||
21281 | { "Message fragment overlapping with conflicting data", "rtps.fragment.overlap.conflicts", | ||||
21282 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x00, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21283 | }, | ||||
21284 | { &hf_rtps_fragment_multiple_tails, | ||||
21285 | { "Message has multiple tail fragments", "rtps.fragment.multiple_tails", | ||||
21286 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x00, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21287 | }, | ||||
21288 | { &hf_rtps_fragment_too_long_fragment, | ||||
21289 | { "Message fragment too long", "rtps.fragment.too_long_fragment", | ||||
21290 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x00, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21291 | }, | ||||
21292 | { &hf_rtps_fragment_error, | ||||
21293 | { "Message defragmentation error", "rtps.fragment.error", | ||||
21294 | FT_FRAMENUM, BASE_NONE, NULL((void*)0), 0x00, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21295 | }, | ||||
21296 | { &hf_rtps_fragment_count, | ||||
21297 | { "Message fragment count", "rtps.fragment.count", | ||||
21298 | FT_UINT32, BASE_DEC, NULL((void*)0), 0x00, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21299 | }, | ||||
21300 | { &hf_rtps_reassembled_in, | ||||
21301 | { "Reassembled in", "rtps.reassembled.in", | ||||
21302 | FT_FRAMENUM, BASE_NONE, NULL((void*)0), 0x00, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21303 | }, | ||||
21304 | { &hf_rtps_reassembled_length, | ||||
21305 | { "Reassembled length", "rtps.reassembled.length", | ||||
21306 | FT_UINT32, BASE_DEC, NULL((void*)0), 0x00, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21307 | }, | ||||
21308 | { &hf_rtps_reassembled_data, | ||||
21309 | { "Reassembled RTPS data", "rtps.reassembled.data", FT_BYTES, BASE_NONE, | ||||
21310 | NULL((void*)0), 0x0, "The reassembled payload", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21311 | }, | ||||
21312 | { &hf_rtps_compression_plugin_class_id, | ||||
21313 | { "Compression class Id", "rtps.param.compression_class_id", FT_UINT32, BASE_DEC, | ||||
21314 | 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) } | ||||
21315 | }, | ||||
21316 | { &hf_rtps_encapsulation_options_compression_plugin_class_id, | ||||
21317 | { "Compression class Id", "rtps.param.plugin.compression_class_id", FT_INT8, BASE_DEC, | ||||
21318 | 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) } | ||||
21319 | }, | ||||
21320 | { &hf_rtps_padding_bytes, | ||||
21321 | { "Padding bytes", "rtps.padding_bytes", FT_INT8, BASE_DEC, | ||||
21322 | NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21323 | }, | ||||
21324 | { &hf_rtps_uncompressed_serialized_length, | ||||
21325 | { "Uncompressed serialized length", "rtps.param.uncompressed_serialized_length", FT_UINT32, BASE_DEC, | ||||
21326 | NULL((void*)0), 0x0, "The reassembled payload", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21327 | }, | ||||
21328 | |||||
21329 | { &hf_rtps_encapsulation_extended_compression_options, | ||||
21330 | { "Uncompressed serialized length", "rtps.extended_compression_options", FT_UINT32, BASE_DEC, | ||||
21331 | NULL((void*)0), 0x0, "Extended compression options", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21332 | }, | ||||
21333 | { &hf_rtps_compressed_serialized_type_object, | ||||
21334 | { "Compressed serialized type object", "rtps.param.compressed_serialized_typeobject", FT_BYTES, BASE_NONE, | ||||
21335 | NULL((void*)0), 0x0, "The reassembled payload", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21336 | }, | ||||
21337 | |||||
21338 | { &hf_rtps_dissection_boolean, | ||||
21339 | {"BOOLEAN", "rtps.dissection.boolean", | ||||
21340 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21341 | }, | ||||
21342 | |||||
21343 | { &hf_rtps_dissection_byte, | ||||
21344 | {"BYTE", "rtps.dissection.byte", | ||||
21345 | FT_UINT8, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21346 | }, | ||||
21347 | |||||
21348 | { &hf_rtps_dissection_int16, | ||||
21349 | {"INT16", "rtps.dissection.int16", | ||||
21350 | FT_INT16, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21351 | }, | ||||
21352 | |||||
21353 | { &hf_rtps_dissection_uint16, | ||||
21354 | {"UINT16", "rtps.dissection.uint16", | ||||
21355 | FT_UINT16, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21356 | }, | ||||
21357 | |||||
21358 | { &hf_rtps_dissection_int32, | ||||
21359 | {"INT32", "rtps.dissection.int32", | ||||
21360 | FT_INT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21361 | }, | ||||
21362 | |||||
21363 | { &hf_rtps_dissection_uint32, | ||||
21364 | {"UINT32", "rtps.dissection.uint32", | ||||
21365 | FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21366 | }, | ||||
21367 | |||||
21368 | { &hf_rtps_dissection_int64, | ||||
21369 | {"INT64", "rtps.dissection.int64", | ||||
21370 | FT_INT64, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21371 | }, | ||||
21372 | |||||
21373 | { &hf_rtps_dissection_uint64, | ||||
21374 | {"UINT64", "rtps.dissection.uint64", | ||||
21375 | FT_UINT64, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21376 | }, | ||||
21377 | |||||
21378 | { &hf_rtps_dissection_float, | ||||
21379 | {"FLOAT", "rtps.dissection.float", | ||||
21380 | FT_FLOAT, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21381 | }, | ||||
21382 | |||||
21383 | { &hf_rtps_dissection_double, | ||||
21384 | {"DOUBLE", "rtps.dissection.double", | ||||
21385 | FT_DOUBLE, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21386 | }, | ||||
21387 | |||||
21388 | { &hf_rtps_dissection_int128, | ||||
21389 | {"INT128", "rtps.dissection.int128", | ||||
21390 | FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21391 | }, | ||||
21392 | |||||
21393 | { &hf_rtps_dissection_string, | ||||
21394 | { "STRING", "rtps.dissection.string", | ||||
21395 | FT_STRINGZ, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21396 | }, | ||||
21397 | { &hf_rtps_flag_udpv4_wan_locator_u, { | ||||
21398 | "UUID Locator", "rtps.flag.udpv4_wan_locator.u", | ||||
21399 | 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) } | ||||
21400 | }, | ||||
21401 | { &hf_rtps_flag_udpv4_wan_locator_p, { | ||||
21402 | "Public Locator", "rtps.flag.udpv4_wan_locator.p", | ||||
21403 | 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) } | ||||
21404 | }, | ||||
21405 | { &hf_rtps_flag_udpv4_wan_locator_b, { | ||||
21406 | "Bidirectional Locator", "rtps.flag.udpv4_wan_locator.b", | ||||
21407 | 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) } | ||||
21408 | }, | ||||
21409 | { &hf_rtps_flag_udpv4_wan_locator_r, { | ||||
21410 | "Relay Locator", "rtps.flag.udpv4_wan_locator.r", | ||||
21411 | 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) } | ||||
21412 | }, | ||||
21413 | { &hf_rtps_udpv4_wan_locator_flags, { | ||||
21414 | "Flags", "rtps.flag.udpv4_wan_locator", | ||||
21415 | 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) } | ||||
21416 | }, | ||||
21417 | { &hf_rtps_uuid,{ | ||||
21418 | "UUID", "rtps.uuid", | ||||
21419 | FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21420 | }, | ||||
21421 | { &hf_rtps_udpv4_wan_locator_public_ip, { | ||||
21422 | "Public IP", "rtps.udpv4_wan_locator.public_ip", | ||||
21423 | FT_IPv4, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21424 | }, | ||||
21425 | { &hf_rtps_udpv4_wan_locator_public_port, { | ||||
21426 | "Public port", "rtps.udpv4_wan_locator.public_port", | ||||
21427 | FT_UINT16, BASE_PT_UDP, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21428 | }, | ||||
21429 | { &hf_rtps_udpv4_wan_locator_local_ip,{ | ||||
21430 | "Local IP", "rtps.udpv4_wan_locator.local_ip", | ||||
21431 | FT_IPv4, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21432 | }, | ||||
21433 | { &hf_rtps_udpv4_wan_locator_local_port,{ | ||||
21434 | "Local port", "rtps.udpv4_wan_locator.local_port", | ||||
21435 | FT_UINT16, BASE_PT_UDP, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21436 | }, | ||||
21437 | { &hf_rtps_flag_udpv4_wan_binding_ping_e, { | ||||
21438 | "Endianness", "rtps.flag.udpv4_wan_binding_ping.e", | ||||
21439 | 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) } | ||||
21440 | }, | ||||
21441 | { &hf_rtps_flag_udpv4_wan_binding_ping_l, { | ||||
21442 | "Long address", "rtps.flag.udpv4_wan_binding_ping.l", | ||||
21443 | 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) } | ||||
21444 | }, | ||||
21445 | { &hf_rtps_flag_udpv4_wan_binding_ping_b,{ | ||||
21446 | "Bidirectional", "rtps.flag.udpv4_wan_binding_ping.b", | ||||
21447 | 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) } | ||||
21448 | }, | ||||
21449 | { &hf_rtps_udpv4_wan_binding_ping_flags, { | ||||
21450 | "Flags", "rtps.flag.udpv4_wan_binding_ping", | ||||
21451 | 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) } | ||||
21452 | }, | ||||
21453 | { &hf_rtps_udpv4_wan_binding_ping_port, { | ||||
21454 | "RTPS port", "rtps.flag.udpv4_wan_binding_rtps_port", | ||||
21455 | FT_UINT32, BASE_DEC, NULL((void*)0), 0, "UDPv4 WAN binding ping RTPS port", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21456 | }, | ||||
21457 | { &hf_rtps_long_address, { | ||||
21458 | "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) } | ||||
21459 | }, | ||||
21460 | { &hf_rtps_param_group_coherent_set, { | ||||
21461 | "Group coherent set sequence number", "rtps.param.group_coherent_set", | ||||
21462 | 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) } | ||||
21463 | }, | ||||
21464 | { &hf_rtps_param_end_group_coherent_set, { | ||||
21465 | "End group coherent set sequence number", "rtps.param.end_group_coherent_set", | ||||
21466 | 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) } | ||||
21467 | }, | ||||
21468 | { &hf_rtps_param_mig_end_coherent_set_sample_count, { | ||||
21469 | "Ended coherent set sample count", "rtps.param.mig_end_coherent_set_sample_count", | ||||
21470 | 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) } | ||||
21471 | }, | ||||
21472 | { &hf_rtps_flag_cloud_discovery_service_announcer,{ | ||||
21473 | "Cloud Discovery Service Announcer", "rtps.flag.cloud_discovery_service_announcer", | ||||
21474 | 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) } | ||||
21475 | }, | ||||
21476 | { &hf_rtps_writer_group_oid, { | ||||
21477 | "Writer Group OID", "rtps.writer_group_oid", | ||||
21478 | FT_UINT32, BASE_DEC, NULL((void*)0), 0, "Decimal representing the writer group OID", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21479 | }, | ||||
21480 | { &hf_rtps_reader_group_oid, { | ||||
21481 | "Reader Group OID", "rtps.reader_group_oid", | ||||
21482 | FT_UINT32, BASE_DEC, NULL((void*)0), 0, "Decimal representing the reader group OID", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21483 | }, | ||||
21484 | { &hf_rtps_writer_session_id,{ | ||||
21485 | "Writer Session ID", "rtps.writer_session_id", | ||||
21486 | FT_UINT32, BASE_DEC, NULL((void*)0), 0, "Decimal representing the writer session ID", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } | ||||
21487 | }, | ||||
21488 | { &hf_rtps_flag_participant_config_writer,{ | ||||
21489 | "Participant Config Writer", "rtps.flag.participant_config_writer", | ||||
21490 | 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) } | ||||
21491 | }, | ||||
21492 | { &hf_rtps_flag_participant_config_reader,{ | ||||
21493 | "Participant Config Reader", "rtps.flag.participant_config_reader", | ||||
21494 | 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) } | ||||
21495 | }, | ||||
21496 | { &hf_rtps_flag_participant_config_secure_writer,{ | ||||
21497 | "Participant Config Secure Writer", "rtps.flag.participant_config_secure_writer", | ||||
21498 | 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) } | ||||
21499 | }, | ||||
21500 | { &hf_rtps_flag_participant_config_secure_reader,{ | ||||
21501 | "Participant Config Secure Reader", "rtps.flag.participant_config_secure_reader", | ||||
21502 | 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) } | ||||
21503 | }, | ||||
21504 | { &hf_rtps_flag_participant_bootstrap_writer,{ | ||||
21505 | "Participant Bootstrap Writer", "rtps.flag.participant_bootstrap_writer", | ||||
21506 | 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) } | ||||
21507 | }, | ||||
21508 | { &hf_rtps_flag_participant_bootstrap_reader,{ | ||||
21509 | "Participant Bootstrap Reader", "rtps.flag.participant_bootstrap_reader", | ||||
21510 | 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) } | ||||
21511 | }, | ||||
21512 | { &hf_rtps_flag_monitoring_periodic_writer,{ | ||||
21513 | "Monitoring Periodic Writer", "rtps.flag.monitoring_periodic_writer", | ||||
21514 | 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) } | ||||
21515 | }, | ||||
21516 | { &hf_rtps_flag_monitoring_periodic_reader,{ | ||||
21517 | "Monitoring Periodic Reader", "rtps.flag.monitoring_periodic_reader", | ||||
21518 | 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) } | ||||
21519 | }, | ||||
21520 | { &hf_rtps_flag_monitoring_event_writer,{ | ||||
21521 | "Monitoring Event Writer", "rtps.flag.monitoring_event_writer", | ||||
21522 | 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) } | ||||
21523 | }, | ||||
21524 | { &hf_rtps_flag_monitoring_event_reader,{ | ||||
21525 | "Monitoring Event Reader", "rtps.flag.monitoring_event_reader", | ||||
21526 | 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) } | ||||
21527 | }, | ||||
21528 | { &hf_rtps_flag_monitoring_logging_writer,{ | ||||
21529 | "Monitoring Logging Writer", "rtps.flag.monitoring_logging_writer", | ||||
21530 | 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) } | ||||
21531 | }, | ||||
21532 | { &hf_rtps_flag_monitoring_logging_reader,{ | ||||
21533 | "Monitoring Logging Reader", "rtps.flag.monitoring_logging_reader", | ||||
21534 | 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) } | ||||
21535 | } | ||||
21536 | }; | ||||
21537 | |||||
21538 | static int *ett[] = { | ||||
21539 | &ett_rtps, | ||||
21540 | &ett_rtps_default_mapping, | ||||
21541 | &ett_rtps_proto_version, | ||||
21542 | &ett_rtps_product_version, | ||||
21543 | &ett_rtps_submessage, | ||||
21544 | &ett_rtps_parameter_sequence, | ||||
21545 | &ett_rtps_parameter, | ||||
21546 | &ett_rtps_flags, | ||||
21547 | &ett_rtps_entity, | ||||
21548 | &ett_rtps_generic_guid, | ||||
21549 | &ett_rtps_rdentity, | ||||
21550 | &ett_rtps_wrentity, | ||||
21551 | &ett_rtps_guid_prefix, | ||||
21552 | &ett_rtps_app_id, | ||||
21553 | &ett_rtps_locator_udp_v4, | ||||
21554 | &ett_rtps_locator, | ||||
21555 | &ett_rtps_locator_list, | ||||
21556 | &ett_rtps_timestamp, | ||||
21557 | &ett_rtps_bitmap, | ||||
21558 | &ett_rtps_seq_string, | ||||
21559 | &ett_rtps_seq_ulong, | ||||
21560 | &ett_rtps_resource_limit, | ||||
21561 | &ett_rtps_durability_service, | ||||
21562 | &ett_rtps_liveliness, | ||||
21563 | &ett_rtps_manager_key, | ||||
21564 | &ett_rtps_serialized_data, | ||||
21565 | &ett_rtps_locator_filter_channel, | ||||
21566 | &ett_rtps_part_message_data, | ||||
21567 | &ett_rtps_sample_info_list, | ||||
21568 | &ett_rtps_sample_info, | ||||
21569 | &ett_rtps_sample_batch_list, | ||||
21570 | &ett_rtps_locator_filter_locator, | ||||
21571 | &ett_rtps_writer_heartbeat_virtual_list, | ||||
21572 | &ett_rtps_writer_heartbeat_virtual, | ||||
21573 | &ett_rtps_virtual_guid_heartbeat_virtual_list, | ||||
21574 | &ett_rtps_virtual_guid_heartbeat_virtual, | ||||
21575 | &ett_rtps_app_ack_virtual_writer_list, | ||||
21576 | &ett_rtps_app_ack_virtual_writer, | ||||
21577 | &ett_rtps_app_ack_virtual_writer_interval_list, | ||||
21578 | &ett_rtps_app_ack_virtual_writer_interval, | ||||
21579 | &ett_rtps_transport_info, | ||||
21580 | &ett_rtps_property_list, | ||||
21581 | &ett_rtps_property, | ||||
21582 | &ett_rtps_topic_info, | ||||
21583 | &ett_rtps_topic_info_dw_qos, | ||||
21584 | &ett_rtps_type_bound_seq, | ||||
21585 | &ett_rtps_type_dep, | ||||
21586 | &ett_rtps_type_id, | ||||
21587 | &ett_rtps_type_object_v2, | ||||
21588 | &ett_rtps_type_object_v2_complete_type_detail, | ||||
21589 | &ett_rtps_type_object_v2_alias, | ||||
21590 | &ett_rtps_type_object_v2_alias_body, | ||||
21591 | &ett_rtps_type_object_v2_struct, | ||||
21592 | &ett_rtps_type_object_v2_struct_header, | ||||
21593 | &ett_rtps_type_object_v2_member_seq, | ||||
21594 | &ett_rtps_type_object_v2_member, | ||||
21595 | &ett_rtps_type_object_v2_union, | ||||
21596 | &ett_rtps_type_object_v2_union_header, | ||||
21597 | &ett_rtps_type_object_v2_union_discriminator, | ||||
21598 | &ett_rtps_type_object_v2_union_label_seq, | ||||
21599 | &ett_rtps_type_object_v2_enum, | ||||
21600 | &ett_rtps_type_object_v2_enum_header, | ||||
21601 | &ett_rtps_type_object_v2_enum_literal, | ||||
21602 | &ett_rtps_type_deps_seq, | ||||
21603 | &ett_rtps_type_id_w_deps, | ||||
21604 | &ett_rtps_type_id_w_size, | ||||
21605 | &ett_rtps_type_object, | ||||
21606 | &ett_rtps_type_information, | ||||
21607 | &ett_rtps_type_lookup_request, | ||||
21608 | &ett_rtps_type_lookup_reply, | ||||
21609 | &ett_rtps_type_lookup_request_id, | ||||
21610 | &ett_rtps_type_lookup_request_header, | ||||
21611 | &ett_rtps_type_lookup_reply_header, | ||||
21612 | &ett_rtps_type_lookup_reply_data, | ||||
21613 | &ett_rtps_type_lookup_deps_seq, | ||||
21614 | &ett_rtps_type_lookup_request_data, | ||||
21615 | &ett_rtps_instance_name, | ||||
21616 | &ett_rtps_type_information_minimal, | ||||
21617 | &ett_rtps_type_information_complete, | ||||
21618 | &ett_rtps_type_library, | ||||
21619 | &ett_rtps_type_element, | ||||
21620 | &ett_rtps_type_annotation_usage_list, | ||||
21621 | &ett_rtps_type_enum_constant, | ||||
21622 | &ett_rtps_type_bound_list, | ||||
21623 | &ett_rtps_secure_payload_tree, | ||||
21624 | &ett_rtps_secure_dataheader_tree, | ||||
21625 | &ett_rtps_secure_transformation_kind, | ||||
21626 | &ett_rtps_pgm_data, | ||||
21627 | &ett_rtps_message_identity, | ||||
21628 | &ett_rtps_related_message_identity, | ||||
21629 | &ett_rtps_data_holder_seq, | ||||
21630 | &ett_rtps_data_holder, | ||||
21631 | &ett_rtps_data_holder_properties, | ||||
21632 | &ett_rtps_property_tree, | ||||
21633 | &ett_rtps_param_header_tree, | ||||
21634 | &ett_rtps_custom_dissection_info, | ||||
21635 | &ett_rtps_service_request_tree, | ||||
21636 | &ett_rtps_locator_ping_tree, | ||||
21637 | &ett_rtps_locator_reachability_tree, | ||||
21638 | &ett_rtps_locator_list_tree, | ||||
21639 | &ett_rtps_topic_query_tree, | ||||
21640 | &ett_rtps_topic_query_selection_tree, | ||||
21641 | &ett_rtps_topic_query_filter_params_tree, | ||||
21642 | &ett_rtps_data_member, | ||||
21643 | &ett_rtps_data_tag_seq, | ||||
21644 | &ett_rtps_data_tag_item, | ||||
21645 | &ett_rtps_fragment, | ||||
21646 | &ett_rtps_fragments, | ||||
21647 | &ett_rtps_data_representation, | ||||
21648 | &ett_rtps_decompressed_type_object, | ||||
21649 | &ett_rtps_dissection_tree, | ||||
21650 | &ett_rtps_info_remaining_items, | ||||
21651 | &ett_rtps_data_encapsulation_options, | ||||
21652 | &ett_rtps_decompressed_serialized_data, | ||||
21653 | &ett_rtps_instance_transition_data, | ||||
21654 | &ett_rtps_crypto_algorithm_requirements, | ||||
21655 | &ett_rtps_decrypted_payload, | ||||
21656 | &ett_rtps_secure_postfix_tag_list_item | ||||
21657 | }; | ||||
21658 | |||||
21659 | static ei_register_info ei[] = { | ||||
21660 | { &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)}} }}, | ||||
21661 | { &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)}} }}, | ||||
21662 | { &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)}} }}, | ||||
21663 | { &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)}} }}, | ||||
21664 | { &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)}} }}, | ||||
21665 | { &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)}} }}, | ||||
21666 | { &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)}} }}, | ||||
21667 | { &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)}} }}, | ||||
21668 | { &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)}} }}, | ||||
21669 | { &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)}} }}, | ||||
21670 | { &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)}} }}, | ||||
21671 | { &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)}} }}, | ||||
21672 | { &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)}} }}, | ||||
21673 | { &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)}} }}, | ||||
21674 | { &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)}} }}, | ||||
21675 | { &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)}} }}, | ||||
21676 | }; | ||||
21677 | |||||
21678 | module_t *rtps_module; | ||||
21679 | expert_module_t *expert_rtps; | ||||
21680 | uat_t * rtps_psk_uat; | ||||
21681 | |||||
21682 | proto_rtps = proto_register_protocol("Real-Time Publish-Subscribe Wire Protocol", "RTPS", "rtps"); | ||||
21683 | proto_register_field_array(proto_rtps, hf, array_length(hf)(sizeof (hf) / sizeof (hf)[0])); | ||||
21684 | proto_register_subtree_array(ett, array_length(ett)(sizeof (ett) / sizeof (ett)[0])); | ||||
21685 | expert_rtps = expert_register_protocol(proto_rtps); | ||||
21686 | expert_register_field_array(expert_rtps, ei, array_length(ei)(sizeof (ei) / sizeof (ei)[0])); | ||||
21687 | |||||
21688 | /* Registers the control in the preference panel */ | ||||
21689 | rtps_module = prefs_register_protocol(proto_rtps, NULL((void*)0)); | ||||
21690 | prefs_register_uint_preference( | ||||
21691 | rtps_module, | ||||
21692 | "max_batch_samples_dissected", | ||||
21693 | "Max samples dissected for DATA_BATCH", | ||||
21694 | "Specifies the maximum number of samples dissected in a DATA_BATCH " | ||||
21695 | "submessage. Increasing this value may affect performance if the " | ||||
21696 | "trace has a lot of big batched samples.", | ||||
21697 | 10, | ||||
21698 | &rtps_max_batch_samples_dissected); | ||||
21699 | |||||
21700 | prefs_register_bool_preference( | ||||
21701 | rtps_module, | ||||
21702 | "enable_max_dissection_info_elements", | ||||
21703 | "Limit the number of elements dissected in structs", | ||||
21704 | "Enabling this option may affect performance if the trace has messages " | ||||
21705 | "with large Data Types.", | ||||
21706 | &enable_max_data_type_elements); | ||||
21707 | |||||
21708 | prefs_register_uint_preference( | ||||
21709 | rtps_module, | ||||
21710 | "max_dissection_info_elements", | ||||
21711 | "Max Dissection info elements shown in structs", | ||||
21712 | "Specifies the maximum number of Data Type elements dissected. " | ||||
21713 | "Increasing this value may affect performance if the trace has " | ||||
21714 | "messages with large Data Types.", | ||||
21715 | 10, | ||||
21716 | &rtps_max_data_type_elements); | ||||
21717 | |||||
21718 | prefs_register_bool_preference( | ||||
21719 | rtps_module, | ||||
21720 | "enable_max_dissection_array_elements", | ||||
21721 | "Limit the number of elements dissected in arrays or sequences", | ||||
21722 | "Disabling this option may affect performance if the trace has messages " | ||||
21723 | "with large arrays or sequences.", | ||||
21724 | &enable_max_array_data_type_elements); | ||||
21725 | |||||
21726 | prefs_register_uint_preference( | ||||
21727 | rtps_module, | ||||
21728 | "max_dissection_array_elements", | ||||
21729 | "Max Dissection elements shown in arrays or sequences", | ||||
21730 | "Specifies the maximum number of Data Type elements dissected in arrays or sequences. " | ||||
21731 | "Increasing this value may affect " | ||||
21732 | "performance if the trace has messages with large Data Types.", | ||||
21733 | 10, | ||||
21734 | &rtps_max_array_data_type_elements); | ||||
21735 | |||||
21736 | prefs_register_bool_preference( | ||||
21737 | rtps_module, | ||||
21738 | "enable_topic_info", | ||||
21739 | "Enable Topic Information", | ||||
21740 | "Shows the Topic Name and Type Name of the samples. " | ||||
21741 | "Note: this can considerably increase the dissection time.", | ||||
21742 | &enable_topic_info); | ||||
21743 | |||||
21744 | prefs_register_bool_preference( | ||||
21745 | rtps_module, | ||||
21746 | "enable_debug_info", | ||||
21747 | "Enable Debug Information", | ||||
21748 | "Shows debug information such XCDR2 headers and string sizes", | ||||
21749 | &enable_debug_info); | ||||
21750 | |||||
21751 | prefs_register_bool_preference( | ||||
21752 | rtps_module, | ||||
21753 | "enable_user_data_dissection", | ||||
21754 | "Enable User Data Dissection (based on Type Object V1)", | ||||
21755 | "Dissects the user data if the Type Object V1 is propagated in Discovery.", | ||||
21756 | &enable_user_data_dissection); | ||||
21757 | |||||
21758 | prefs_register_bool_preference( | ||||
21759 | rtps_module, | ||||
21760 | "enable_rtps_reassembly", | ||||
21761 | "Enable RTPS Reassembly", | ||||
21762 | "Enables the reassembly of DATA_FRAG submessages.", | ||||
21763 | &enable_rtps_reassembly); | ||||
21764 | |||||
21765 | prefs_register_bool_preference( | ||||
21766 | rtps_module, | ||||
21767 | "enable_rtps_checksum_check", | ||||
21768 | "Enable RTPS Checksum check (Only CRC-32C and MD5 supported)", | ||||
21769 | "Detects the RTPS packets with invalid checksums (Only CRC-32C and MD5 " | ||||
21770 | "supported)", | ||||
21771 | &enable_rtps_crc_check); | ||||
21772 | |||||
21773 | prefs_register_bool_preference( | ||||
21774 | rtps_module, | ||||
21775 | "enable_rtps_psk_decryption", | ||||
21776 | "Enable RTPS PSK decryption", | ||||
21777 | "Decode RTPS messages protected with a pre-shared key", | ||||
21778 | &enable_rtps_psk_decryption); | ||||
21779 | |||||
21780 | rtps_psk_uat = uat_new( | ||||
21781 | "RTPS GUID-PSK", | ||||
21782 | sizeof(rtps_psk_options_entry_t), | ||||
21783 | "RTPS PSK Keys", | ||||
21784 | true1, | ||||
21785 | &rtps_psk_options.entries, | ||||
21786 | &rtps_psk_options.size, | ||||
21787 | 0x00000001, | ||||
21788 | NULL((void*)0), | ||||
21789 | rtps_psk_options_copy_entry, | ||||
21790 | rtps_psk_options_update_entry, | ||||
21791 | rtps_psk_options_free_entry, | ||||
21792 | NULL((void*)0), | ||||
21793 | NULL((void*)0), | ||||
21794 | rtps_psk_table_field_array); | ||||
21795 | |||||
21796 | prefs_register_uat_preference( | ||||
21797 | rtps_module, | ||||
21798 | "psk_keys", | ||||
21799 | "Pre-shared keys", | ||||
21800 | "List of pre-shared keys that will be used to decode RTPS messages if" | ||||
21801 | " the previous option is enabled", | ||||
21802 | rtps_psk_uat); | ||||
21803 | |||||
21804 | rtps_type_name_table = register_dissector_table("rtps.type_name", "RTPS Type Name", | ||||
21805 | proto_rtps, FT_STRING, STRING_CASE_SENSITIVE0); | ||||
21806 | |||||
21807 | registry = wmem_map_new_autoreset(wmem_epan_scope(), wmem_file_scope(), hash_by_guid, compare_by_guid); | ||||
21808 | dissection_infos = wmem_map_new_autoreset(wmem_epan_scope(), wmem_file_scope(), g_int64_hash, g_int64_equal); | ||||
21809 | union_member_mappings = wmem_map_new_autoreset(wmem_epan_scope(), wmem_file_scope(), g_int64_hash, g_int64_equal); | ||||
21810 | mutable_member_mappings = wmem_map_new_autoreset(wmem_epan_scope(), wmem_file_scope(), g_int64_hash, g_int64_equal); | ||||
21811 | coherent_set_tracking.entities_using_map = wmem_map_new_autoreset(wmem_epan_scope(), wmem_file_scope(), hash_by_guid, compare_by_guid); | ||||
21812 | 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); | ||||
21813 | builtin_dissection_infos = wmem_map_new_autoreset(wmem_epan_scope(), wmem_epan_scope(), g_int64_hash, g_int64_equal); | ||||
21814 | |||||
21815 | coherent_set_tracking.entities_using_map = wmem_map_new_autoreset(wmem_epan_scope(), wmem_file_scope(), hash_by_guid, compare_by_guid); | ||||
21816 | discovered_participants_domain_ids = wmem_map_new_autoreset(wmem_epan_scope(), wmem_file_scope(), hash_by_participant_guid, compare_by_participant_guid); | ||||
21817 | /* In order to get this dissector from other dissectors */ | ||||
21818 | register_dissector("rtps", dissect_simple_rtps, proto_rtps); | ||||
21819 | |||||
21820 | initialize_instance_state_data_response_dissection_info(&builtin_types_dissection_data); | ||||
21821 | |||||
21822 | reassembly_table_register(&rtps_reassembly_table, | ||||
21823 | &addresses_reassembly_table_functions); | ||||
21824 | } | ||||
21825 | |||||
21826 | void proto_reg_handoff_rtps(void) { | ||||
21827 | heur_dissector_add("rtitcp", dissect_rtps_rtitcp, "RTPS over RTITCP", "rtps_rtitcp", proto_rtps, HEURISTIC_ENABLE); | ||||
21828 | heur_dissector_add("udp", dissect_rtps_udp, "RTPS over UDP", "rtps_udp", proto_rtps, HEURISTIC_ENABLE); | ||||
21829 | heur_dissector_add("tcp", dissect_rtps_tcp, "RTPS over TCP", "rtps_tcp", proto_rtps, HEURISTIC_ENABLE); | ||||
21830 | } | ||||
21831 | |||||
21832 | /* | ||||
21833 | * Editor modelines | ||||
21834 | * | ||||
21835 | * Local Variables: | ||||
21836 | * c-basic-offset: 2 | ||||
21837 | * tab-width: 8 | ||||
21838 | * indent-tabs-mode: nil | ||||
21839 | * End: | ||||
21840 | * | ||||
21841 | * ex: set shiftwidth=2 tabstop=8 expandtab: | ||||
21842 | * :indentSize=2:tabSize=8:noTabs=true: | ||||
21843 | */ |