Wireshark  2.9.0-477-g68ec514b
The Wireshark network protocol analyzer
packet-rtps.h
1 /* packet-rtps.h
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 <maskis@seznam.cz>
12  * PETR SMOLIK <petr.smolik@wo.cz>
13  * ZDENEK SEBEK <sebek@fel.cvut.cz>
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 <gerald@wireshark.org>
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  * Full OMG DDS Standard Specification:
33  * http://www.omg.org/cgi-bin/doc?ptc/2003-07-07
34  *
35  * NDDS and RTPS information: http://www.rti.com/resources.html
36  *
37  */
38 
39 #ifndef _TYPEDEFS_DEFINES_RTPS_H
40 #define _TYPEDEFS_DEFINES_RTPS_H
41 
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45 
46 
47 typedef enum {
48  RTI_CDR_TK_NULL = 0,
49  RTI_CDR_TK_SHORT,
50  RTI_CDR_TK_LONG,
51  RTI_CDR_TK_USHORT,
52  RTI_CDR_TK_ULONG,
53  RTI_CDR_TK_FLOAT,
54  RTI_CDR_TK_DOUBLE,
55  RTI_CDR_TK_BOOLEAN,
56  RTI_CDR_TK_CHAR,
57  RTI_CDR_TK_OCTET,
58  RTI_CDR_TK_STRUCT,
59  RTI_CDR_TK_UNION,
60  RTI_CDR_TK_ENUM,
61  RTI_CDR_TK_STRING,
62  RTI_CDR_TK_SEQUENCE,
63  RTI_CDR_TK_ARRAY,
64  RTI_CDR_TK_ALIAS,
65  RTI_CDR_TK_LONGLONG,
66  RTI_CDR_TK_ULONGLONG,
67  RTI_CDR_TK_LONGDOUBLE,
68  RTI_CDR_TK_WCHAR,
69  RTI_CDR_TK_WSTRING,
70  RTI_CDR_TK_VALUE,
71  RTI_CDR_TK_VALUE_PARAM
72 } RTICdrTCKind;
73 
74 typedef enum {
75  RTI_CDR_TYPE_OBJECT_TYPE_KIND_NO_TYPE=0,
76  RTI_CDR_TYPE_OBJECT_TYPE_KIND_BOOLEAN_TYPE=1,
77  RTI_CDR_TYPE_OBJECT_TYPE_KIND_BYTE_TYPE=2,
78  RTI_CDR_TYPE_OBJECT_TYPE_KIND_INT_16_TYPE=3,
79  RTI_CDR_TYPE_OBJECT_TYPE_KIND_UINT_16_TYPE=4,
80  RTI_CDR_TYPE_OBJECT_TYPE_KIND_INT_32_TYPE=5,
81  RTI_CDR_TYPE_OBJECT_TYPE_KIND_UINT_32_TYPE=6,
82  RTI_CDR_TYPE_OBJECT_TYPE_KIND_INT_64_TYPE=7,
83  RTI_CDR_TYPE_OBJECT_TYPE_KIND_UINT_64_TYPE=8,
84  RTI_CDR_TYPE_OBJECT_TYPE_KIND_FLOAT_32_TYPE=9,
85  RTI_CDR_TYPE_OBJECT_TYPE_KIND_FLOAT_64_TYPE=10,
86  RTI_CDR_TYPE_OBJECT_TYPE_KIND_FLOAT_128_TYPE=11,
87  RTI_CDR_TYPE_OBJECT_TYPE_KIND_CHAR_8_TYPE=12,
88  RTI_CDR_TYPE_OBJECT_TYPE_KIND_CHAR_32_TYPE=13,
89  RTI_CDR_TYPE_OBJECT_TYPE_KIND_ENUMERATION_TYPE=14,
90  RTI_CDR_TYPE_OBJECT_TYPE_KIND_BITSET_TYPE=15,
91  RTI_CDR_TYPE_OBJECT_TYPE_KIND_ALIAS_TYPE=16,
92  RTI_CDR_TYPE_OBJECT_TYPE_KIND_ARRAY_TYPE=17,
93  RTI_CDR_TYPE_OBJECT_TYPE_KIND_SEQUENCE_TYPE=18,
94  RTI_CDR_TYPE_OBJECT_TYPE_KIND_STRING_TYPE=19,
95  RTI_CDR_TYPE_OBJECT_TYPE_KIND_MAP_TYPE=20,
96  RTI_CDR_TYPE_OBJECT_TYPE_KIND_UNION_TYPE=21,
97  RTI_CDR_TYPE_OBJECT_TYPE_KIND_STRUCTURE_TYPE=22,
98  RTI_CDR_TYPE_OBJECT_TYPE_KIND_ANNOTATION_TYPE=23
99 } RTICdrTypeObjectTypeKind;
100 
101 typedef struct _rtps_dissector_data {
102  guint16 encapsulation_id;
103  gboolean info_displayed;
104  /* Represents the position of a sample within a batch. Since the
105  position can be 0, we use -1 as not valid (not a batch) */
106  gint position_in_batch;
108 
109 
110 #define RTPS_MAGIC_NUMBER 0x52545053 /* RTPS */
111 #define RTPX_MAGIC_NUMBER 0x52545058 /* RTPX */
112 
113 /* Traffic type */
114 #define PORT_BASE (7400)
115 #define PORT_METATRAFFIC_UNICAST (0)
116 #define PORT_USERTRAFFIC_MULTICAST (1)
117 #define PORT_METATRAFFIC_MULTICAST (2)
118 #define PORT_USERTRAFFIC_UNICAST (3)
119 
120 /* Flags defined in the 'flag' bitmask of a submessage */
121 #define FLAG_E (0x01) /* Common to all the submessages */
122 #define FLAG_DATA_D (0x02)
123 #define FLAG_DATA_D_v2 (0x04)
124 #define FLAG_DATA_A (0x04)
125 #define FLAG_DATA_H (0x08)
126 #define FLAG_DATA_Q (0x10)
127 #define FLAG_DATA_Q_v2 (0x02)
128 #define FLAG_DATA_FRAG_Q (0x02)
129 #define FLAG_DATA_FRAG_H (0x04)
130 #define FLAG_DATA_I (0x10)
131 #define FLAG_DATA_U (0x20)
132 #define FLAG_NOKEY_DATA_Q (0x02)
133 #define FLAG_NOKEY_DATA_D (0x04)
134 #define FLAG_ACKNACK_F (0x02)
135 #define FLAG_HEARTBEAT_F (0x02)
136 #define FLAG_GAP_F (0x02)
137 #define FLAG_INFO_TS_T (0x02)
138 #define FLAG_INFO_REPLY_IP4_M (0x02)
139 #define FLAG_INFO_REPLY_M (0x02)
140 #define FLAG_RTPS_DATA_Q (0x02)
141 #define FLAG_RTPS_DATA_D (0x04)
142 #define FLAG_RTPS_DATA_K (0x08)
143 #define FLAG_RTPS_DATA_FRAG_Q (0x02)
144 #define FLAG_RTPS_DATA_FRAG_K (0x04)
145 #define FLAG_RTPS_DATA_BATCH_Q (0x02)
146 #define FLAG_SAMPLE_INFO_T (0x01)
147 #define FLAG_SAMPLE_INFO_Q (0x02)
148 #define FLAG_SAMPLE_INFO_O (0x04)
149 #define FLAG_SAMPLE_INFO_D (0x08)
150 #define FLAG_SAMPLE_INFO_I (0x10)
151 #define FLAG_SAMPLE_INFO_K (0x20)
152 
153 #define FLAG_VIRTUAL_HEARTBEAT_V (0x02)
154 #define FLAG_VIRTUAL_HEARTBEAT_W (0x04)
155 #define FLAG_VIRTUAL_HEARTBEAT_N (0x08)
156 
157 /* The following PIDs are defined since RTPS 1.0 */
158 #define PID_PAD (0x00)
159 #define PID_SENTINEL (0x01)
160 #define PID_PARTICIPANT_LEASE_DURATION (0x02)
161 #define PID_TIME_BASED_FILTER (0x04)
162 #define PID_TOPIC_NAME (0x05)
163 #define PID_OWNERSHIP_STRENGTH (0x06)
164 #define PID_TYPE_NAME (0x07)
165 #define PID_METATRAFFIC_MULTICAST_IPADDRESS (0x0b)
166 #define PID_DEFAULT_UNICAST_IPADDRESS (0x0c)
167 #define PID_METATRAFFIC_UNICAST_PORT (0x0d)
168 #define PID_DEFAULT_UNICAST_PORT (0x0e)
169 #define PID_MULTICAST_IPADDRESS (0x11)
170 #define PID_PROTOCOL_VERSION (0x15)
171 #define PID_VENDOR_ID (0x16)
172 #define PID_RELIABILITY (0x1a)
173 #define PID_LIVELINESS (0x1b)
174 #define PID_DURABILITY (0x1d)
175 #define PID_DURABILITY_SERVICE (0x1e)
176 #define PID_OWNERSHIP (0x1f)
177 #define PID_PRESENTATION (0x21)
178 #define PID_DEADLINE (0x23)
179 #define PID_DESTINATION_ORDER (0x25)
180 #define PID_LATENCY_BUDGET (0x27)
181 #define PID_PARTITION (0x29)
182 #define PID_LIFESPAN (0x2b)
183 #define PID_USER_DATA (0x2c)
184 #define PID_GROUP_DATA (0x2d)
185 #define PID_TOPIC_DATA (0x2e)
186 #define PID_UNICAST_LOCATOR (0x2f)
187 #define PID_MULTICAST_LOCATOR (0x30)
188 #define PID_DEFAULT_UNICAST_LOCATOR (0x31)
189 #define PID_METATRAFFIC_UNICAST_LOCATOR (0x32)
190 #define PID_METATRAFFIC_MULTICAST_LOCATOR (0x33)
191 #define PID_PARTICIPANT_MANUAL_LIVELINESS_COUNT (0x34)
192 #define PID_CONTENT_FILTER_PROPERTY (0x35)
193 #define PID_PROPERTY_LIST_OLD (0x36) /* For compatibility between 4.2d and 4.2e */
194 #define PID_HISTORY (0x40)
195 #define PID_RESOURCE_LIMIT (0x41)
196 #define PID_EXPECTS_INLINE_QOS (0x43)
197 #define PID_PARTICIPANT_BUILTIN_ENDPOINTS (0x44)
198 #define PID_METATRAFFIC_UNICAST_IPADDRESS (0x45)
199 #define PID_METATRAFFIC_MULTICAST_PORT (0x46)
200 #define PID_TYPECODE (0x47)
201 #define PID_PARTICIPANT_GUID (0x50)
202 #define PID_PARTICIPANT_ENTITY_ID (0x51)
203 #define PID_GROUP_GUID (0x52)
204 #define PID_GROUP_ENTITY_ID (0x53)
205 #define PID_FILTER_SIGNATURE (0x55)
206 #define PID_COHERENT_SET (0x56)
207 
208 /* The following QoS are deprecated */
209 #define PID_PERSISTENCE (0x03)
210 #define PID_TYPE_CHECKSUM (0x08)
211 #define PID_TYPE2_NAME (0x09)
212 #define PID_TYPE2_CHECKSUM (0x0a)
213 #define PID_IS_RELIABLE (0x0f)
214 #define PID_EXPECTS_ACK (0x10)
215 #define PID_MANAGER_KEY (0x12)
216 #define PID_SEND_QUEUE_SIZE (0x13)
217 #define PID_RELIABILITY_ENABLED (0x14)
218 #define PID_RECV_QUEUE_SIZE (0x18)
219 #define PID_VARGAPPS_SEQUENCE_NUMBER_LAST (0x17)
220 #define PID_RELIABILITY_OFFERED (0x19)
221 #define PID_LIVELINESS_OFFERED (0x1c)
222 #define PID_OWNERSHIP_OFFERED (0x20)
223 #define PID_PRESENTATION_OFFERED (0x22)
224 #define PID_DEADLINE_OFFERED (0x24)
225 #define PID_DESTINATION_ORDER_OFFERED (0x26)
226 #define PID_LATENCY_BUDGET_OFFERED (0x28)
227 #define PID_PARTITION_OFFERED (0x2a)
228 
229 /* The following PIDs are defined since RTPS 2.0 */
230 #define PID_DEFAULT_MULTICAST_LOCATOR (0x0048)
231 #define PID_TRANSPORT_PRIORITY (0x0049)
232 #define PID_CONTENT_FILTER_INFO (0x0055)
233 #define PID_DIRECTED_WRITE (0x0057)
234 #define PID_BUILTIN_ENDPOINT_SET (0x0058)
235 #define PID_PROPERTY_LIST (0x0059) /* RTI DDS 4.2e and newer */
236 #define PID_ENDPOINT_GUID (0x005a)
237 #define PID_TYPE_MAX_SIZE_SERIALIZED (0x0060)
238 #define PID_ORIGINAL_WRITER_INFO (0x0061)
239 #define PID_ENTITY_NAME (0x0062)
240 #define PID_KEY_HASH (0x0070)
241 #define PID_STATUS_INFO (0x0071)
242 #define PID_TYPE_OBJECT (0x0072)
243 #define PID_TYPE_CONSISTENCY (0x0074)
244 #define PID_EQUIVALENT_TYPE_NAME (0x0075)
245 #define PID_BASE_TYPE_NAME (0x0076)
246 #define PID_ENABLE_ENCRYPTION (0x0077)
247 #define PID_ENABLE_AUTHENTICATION (0x0078)
248 
249 /* Vendor-specific: RTI */
250 #define PID_PRODUCT_VERSION (0x8000)
251 #define PID_PLUGIN_PROMISCUITY_KIND (0x8001)
252 #define PID_ENTITY_VIRTUAL_GUID (0x8002)
253 #define PID_SERVICE_KIND (0x8003)
254 #define PID_TYPECODE_RTPS2 (0x8004) /* Was: 0x47 in RTPS 1.2 */
255 #define PID_DISABLE_POSITIVE_ACKS (0x8005)
256 #define PID_LOCATOR_FILTER_LIST (0x8006)
257 #define PID_EXPECTS_VIRTUAL_HB (0x8009)
258 #define PID_ROLE_NAME (0x800a)
259 #define PID_ACK_KIND (0x800b)
260 #define PID_PEER_HOST_EPOCH (0x800e)
261 #define PID_RELATED_ORIGINAL_WRITER_INFO (0x800f)/* inline QoS */
262 #define PID_DOMAIN_ID (0x800f)
263 #define PID_RELATED_READER_GUID (0x8010)/* inline QoS */
264 #define PID_TRANSPORT_INFO_LIST (0x8010)
265 #define PID_SOURCE_GUID (0x8011)/* inline QoS */
266 #define PID_DIRECT_COMMUNICATION (0x8011)
267 #define PID_RELATED_SOURCE_GUID (0x8012)/* inline QoS */
268 #define PID_TOPIC_QUERY_GUID (0x8013)/* inline QoS */
269 #define PID_TOPIC_QUERY_PUBLICATION (0x8014)
270 #define PID_ENDPOINT_PROPERTY_CHANGE_EPOCH (0x8015)
271 #define PID_REACHABILITY_LEASE_DURATION (0x8016)
272 #define PID_VENDOR_BUILTIN_ENDPOINT_SET (0x8017)
273 #define PID_ENDPOINT_SECURITY_ATTRIBUTES (0x8018)
274 #define PID_SAMPLE_SIGNATURE (0x8019)/* inline QoS */
275 #define PID_EXTENDED (0x3f01)
276 #define PID_LIST_END (0x3f02)
277 
278 #define PID_IDENTITY_TOKEN (0x1001)
279 #define PID_PERMISSIONS_TOKEN (0x1002)
280 #define PID_DATA_TAGS (0x1003)
281 #define PID_ENDPOINT_SECURITY_INFO (0x1004)
282 #define PID_PARTICIPANT_SECURITY_INFO (0x1005)
283 
284 /* Vendor-specific: PT */
285 #define PID_PRISMTECH_WRITER_INFO (0x8001)
286 #define PID_PRISMTECH_READER_DATA_LIFECYCLE (0x8002)
287 #define PID_PRISMTECH_WRITER_DATA_LIFECYCLE (0x8003)
288 #define PID_PRISMTECH_ENDPOINT_GUID (0x8004)
289 #define PID_PRISMTECH_SYNCHRONOUS_ENDPOINT (0x8005)
290 #define PID_PRISMTECH_RELAXED_QOS_MATCHING (0x8006)
291 #define PID_PRISMTECH_PARTICIPANT_VERSION_INFO (0x8007)
292 #define PID_PRISMTECH_NODE_NAME (0x8008)
293 #define PID_PRISMTECH_EXEC_NAME (0x8009)
294 #define PID_PRISMTECH_PROCESS_ID (0x800a)
295 #define PID_PRISMTECH_SERVICE_TYPE (0x800b)
296 #define PID_PRISMTECH_ENTITY_FACTORY (0x800c)
297 #define PID_PRISMTECH_WATCHDOG_SCHEDULING (0x800d)
298 #define PID_PRISMTECH_LISTENER_SCHEDULING (0x800e)
299 #define PID_PRISMTECH_SUBSCRIPTION_KEYS (0x800f)
300 #define PID_PRISMTECH_READER_LIFESPAN (0x8010)
301 #define PID_PRISMTECH_SHARE (0x8011)
302 #define PID_PRISMTECH_TYPE_DESCRIPTION (0x8012)
303 #define PID_PRISMTECH_LAN_ID (0x8013)
304 #define PID_PRISMTECH_ENDPOINT_GID (0x8014)
305 #define PID_PRISMTECH_GROUP_GID (0x8015)
306 #define PID_PRISMTECH_EOTINFO (0x8016)
307 #define PID_PRISMTECH_PART_CERT_NAME (0x8017)
308 #define PID_PRISMTECH_LAN_CERT_NAME (0x8018)
309 
310 /* appId.appKind possible values */
311 #define APPKIND_UNKNOWN (0x00)
312 #define APPKIND_MANAGED_APPLICATION (0x01)
313 #define APPKIND_MANAGER (0x02)
314 
315 #define RTI_SERVICE_REQUEST_ID_UNKNOWN 0
316 #define RTI_SERVICE_REQUEST_ID_TOPIC_QUERY 1
317 #define RTI_SERVICE_REQUEST_ID_LOCATOR_REACHABILITY 2
318 
319 /* Predefined EntityId */
320 #define ENTITYID_UNKNOWN (0x00000000)
321 #define ENTITYID_PARTICIPANT (0x000001c1)
322 #define ENTITYID_BUILTIN_TOPIC_WRITER (0x000002c2)
323 #define ENTITYID_BUILTIN_TOPIC_READER (0x000002c7)
324 #define ENTITYID_BUILTIN_PUBLICATIONS_WRITER (0x000003c2)
325 #define ENTITYID_BUILTIN_PUBLICATIONS_READER (0x000003c7)
326 #define ENTITYID_BUILTIN_SUBSCRIPTIONS_WRITER (0x000004c2)
327 #define ENTITYID_BUILTIN_SUBSCRIPTIONS_READER (0x000004c7)
328 #define ENTITYID_BUILTIN_SDP_PARTICIPANT_WRITER (0x000100c2)
329 #define ENTITYID_BUILTIN_SDP_PARTICIPANT_READER (0x000100c7)
330 #define ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_WRITER (0x000200c2)
331 #define ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_READER (0x000200c7)
332 
333 /* Secure DDS */
334 #define ENTITYID_P2P_BUILTIN_PARTICIPANT_STATELESS_WRITER (0x000201c3)
335 #define ENTITYID_P2P_BUILTIN_PARTICIPANT_STATELESS_READER (0x000201c4)
336 #define ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_WRITER (0xff0003c2)
337 #define ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_READER (0xff0003c7)
338 #define ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_WRITER (0xff0004c2)
339 #define ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_READER (0xff0004c7)
340 #define ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_SECURE_WRITER (0xff0200c2)
341 #define ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_SECURE_READER (0xff0200c7)
342 #define ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_WRITER (0xff0202c2)
343 #define ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_READER (0xff0202c7)
344 #define ENTITYID_SPDP_RELIABLE_BUILTIN_PARTICIPANT_SECURE_WRITER (0xff0101c2)
345 #define ENTITYID_SPDP_RELIABLE_BUILTIN_PARTICIPANT_SECURE_READER (0xff0101c7)
346 
347 /* Vendor-specific: RTI */
348 #define ENTITYID_RTI_BUILTIN_SERVICE_REQUEST_WRITER (0x00020082)
349 #define ENTITYID_RTI_BUILTIN_SERVICE_REQUEST_READER (0x00020087)
350 #define ENTITYID_RTI_BUILTIN_LOCATOR_PING_WRITER (0x00020182)
351 #define ENTITYID_RTI_BUILTIN_LOCATOR_PING_READER (0x00020187)
352 
353 /* Deprecated EntityId */
354 #define ENTITYID_APPLICATIONS_WRITER (0x000001c2)
355 #define ENTITYID_APPLICATIONS_READER (0x000001c7)
356 #define ENTITYID_CLIENTS_WRITER (0x000005c2)
357 #define ENTITYID_CLIENTS_READER (0x000005c7)
358 #define ENTITYID_SERVICES_WRITER (0x000006c2)
359 #define ENTITYID_SERVICES_READER (0x000006c7)
360 #define ENTITYID_MANAGERS_WRITER (0x000007c2)
361 #define ENTITYID_MANAGERS_READER (0x000007c7)
362 #define ENTITYID_APPLICATION_SELF (0x000008c1)
363 #define ENTITYID_APPLICATION_SELF_WRITER (0x000008c2)
364 #define ENTITYID_APPLICATION_SELF_READER (0x000008c7)
365 
366 /* Predefined Entity Kind */
367 #define ENTITYKIND_APPDEF_UNKNOWN (0x00)
368 #define ENTITYKIND_APPDEF_PARTICIPANT (0x01)
369 #define ENTITYKIND_APPDEF_WRITER_WITH_KEY (0x02)
370 #define ENTITYKIND_APPDEF_WRITER_NO_KEY (0x03)
371 #define ENTITYKIND_APPDEF_READER_NO_KEY (0x04)
372 #define ENTITYKIND_APPDEF_READER_WITH_KEY (0x07)
373 #define ENTITYKIND_BUILTIN_PARTICIPANT (0xc1)
374 #define ENTITYKIND_BUILTIN_WRITER_WITH_KEY (0xc2)
375 #define ENTITYKIND_BUILTIN_WRITER_NO_KEY (0xc3)
376 #define ENTITYKIND_BUILTIN_READER_NO_KEY (0xc4)
377 #define ENTITYKIND_BUILTIN_READER_WITH_KEY (0xc7)
378 
379 /* vendor specific RTI */
380 #define ENTITYKIND_RTI_BUILTIN_WRITER_WITH_KEY (0x82)
381 #define ENTITYKIND_RTI_BUILTIN_WRITER_NO_KEY (0x83)
382 #define ENTITYKIND_RTI_BUILTIN_READER_NO_KEY (0x84)
383 #define ENTITYKIND_RTI_BUILTIN_READER_WITH_KEY (0x87)
384 
385 /* Submessage Type */
386 #define SUBMESSAGE_PAD (0x01)
387 #define SUBMESSAGE_DATA (0x02)
388 #define SUBMESSAGE_NOKEY_DATA (0x03)
389 #define SUBMESSAGE_ACKNACK (0x06)
390 #define SUBMESSAGE_HEARTBEAT (0x07)
391 #define SUBMESSAGE_GAP (0x08)
392 #define SUBMESSAGE_INFO_TS (0x09)
393 #define SUBMESSAGE_INFO_SRC (0x0c)
394 #define SUBMESSAGE_INFO_REPLY_IP4 (0x0d)
395 #define SUBMESSAGE_INFO_DST (0x0e)
396 #define SUBMESSAGE_INFO_REPLY (0x0f)
397 
398 #define SUBMESSAGE_DATA_FRAG (0x10) /* RTPS 2.0 Only */
399 #define SUBMESSAGE_NOKEY_DATA_FRAG (0x11) /* RTPS 2.0 Only */
400 #define SUBMESSAGE_NACK_FRAG (0x12) /* RTPS 2.0 Only */
401 #define SUBMESSAGE_HEARTBEAT_FRAG (0x13) /* RTPS 2.0 Only */
402 
403 #define SUBMESSAGE_RTPS_DATA_SESSION (0x14) /* RTPS 2.1 only */
404 #define SUBMESSAGE_RTPS_DATA (0x15) /* RTPS 2.1 only */
405 #define SUBMESSAGE_RTPS_DATA_FRAG (0x16) /* RTPS 2.1 only */
406 #define SUBMESSAGE_ACKNACK_BATCH (0x17) /* RTPS 2.1 only */
407 #define SUBMESSAGE_RTPS_DATA_BATCH (0x18) /* RTPS 2.1 Only */
408 #define SUBMESSAGE_HEARTBEAT_BATCH (0x19) /* RTPS 2.1 only */
409 #define SUBMESSAGE_ACKNACK_SESSION (0x1a) /* RTPS 2.1 only */
410 #define SUBMESSAGE_HEARTBEAT_SESSION (0x1b) /* RTPS 2.1 only */
411 #define SUBMESSAGE_APP_ACK (0x1c)
412 #define SUBMESSAGE_APP_ACK_CONF (0x1d)
413 #define SUBMESSAGE_HEARTBEAT_VIRTUAL (0x1e)
414 #define SUBMESSAGE_SEC_BODY (0x30)
415 #define SUBMESSAGE_SEC_PREFIX (0x31)
416 #define SUBMESSAGE_SEC_POSTFIX (0x32)
417 #define SUBMESSAGE_SRTPS_PREFIX (0x33)
418 #define SUBMESSAGE_SRTPS_POSTFIX (0x34)
419 
420 #define SUBMESSAGE_RTI_CRC (0x80)
421 
422 /* An invalid IP Address:
423  * Make sure the _STRING macro is bigger than a normal IP
424  */
425 #define IPADDRESS_INVALID (0)
426 #define IPADDRESS_INVALID_STRING "ADDRESS_INVALID"
427 
428 /* Identifies the value of an invalid port number:
429  * Make sure the _STRING macro is bigger than a normal port
430  */
431 #define PORT_INVALID (0)
432 #define PORT_INVALID_STRING "PORT_INVALID"
433 
434 /* Protocol Vendor Information (guint16) */
435 #define RTPS_VENDOR_UNKNOWN (0x0000)
436 #define RTPS_VENDOR_UNKNOWN_STRING "VENDOR_ID_UNKNOWN (0x0000)"
437 #define RTPS_VENDOR_RTI_DDS (0x0101)
438 #define RTPS_VENDOR_RTI_DDS_STRING "Real-Time Innovations, Inc. - Connext DDS"
439 #define RTPS_VENDOR_PT_DDS (0x0102)
440 #define RTPS_VENDOR_PT_DDS_STRING "PrismTech Inc. - OpenSplice DDS"
441 #define RTPS_VENDOR_OCI (0x0103)
442 #define RTPS_VENDOR_OCI_STRING "Object Computing Incorporated, Inc. (OCI) - OpenDDS"
443 #define RTPS_VENDOR_MILSOFT (0x0104)
444 #define RTPS_VENDOR_MILSOFT_STRING "MilSoft"
445 #define RTPS_VENDOR_GALLIUM (0x0105)
446 #define RTPS_VENDOR_GALLIUM_STRING "Gallium Visual Systems Inc. - InterCOM DDS"
447 #define RTPS_VENDOR_TOC (0x0106)
448 #define RTPS_VENDOR_TOC_STRING "TwinOaks Computing, Inc. - CoreDX DDS"
449 #define RTPS_VENDOR_LAKOTA_TSI (0x0107)
450 #define RTPS_VENDOR_LAKOTA_TSI_STRING "Lakota Technical Solutions, Inc."
451 #define RTPS_VENDOR_ICOUP (0x0108)
452 #define RTPS_VENDOR_ICOUP_STRING "ICOUP Consulting"
453 #define RTPS_VENDOR_ETRI (0x0109)
454 #define RTPS_VENDOR_ETRI_STRING "ETRI Electronics and Telecommunication Research Institute"
455 #define RTPS_VENDOR_RTI_DDS_MICRO (0x010A)
456 #define RTPS_VENDOR_RTI_DDS_MICRO_STRING "Real-Time Innovations, Inc. (RTI) - Connext DDS Micro"
457 #define RTPS_VENDOR_PT_MOBILE (0x010B)
458 #define RTPS_VENDOR_PT_MOBILE_STRING "PrismTech - OpenSplice Mobile"
459 #define RTPS_VENDOR_PT_GATEWAY (0x010C)
460 #define RTPS_VENDOR_PT_GATEWAY_STRING "PrismTech - OpenSplice Gateway"
461 #define RTPS_VENDOR_PT_LITE (0x010D)
462 #define RTPS_VENDOR_PT_LITE_STRING "PrismTech - OpenSplice Lite"
463 #define RTPS_VENDOR_TECHNICOLOR (0x010E)
464 #define RTPS_VENDOR_TECHNICOLOR_STRING "Technicolor Inc. - Qeo"
465 
466 /* Data encapsulation */
467 #define ENCAPSULATION_CDR_BE (0x0000)
468 #define ENCAPSULATION_CDR_LE (0x0001)
469 #define ENCAPSULATION_PL_CDR_BE (0x0002)
470 #define ENCAPSULATION_PL_CDR_LE (0x0003)
471 
472 /* Parameter Liveliness */
473 #define LIVELINESS_AUTOMATIC (0)
474 #define LIVELINESS_BY_PARTICIPANT (1)
475 #define LIVELINESS_BY_TOPIC (2)
476 
477 /* Parameter Durability */
478 #define DURABILITY_VOLATILE (0)
479 #define DURABILITY_TRANSIENT_LOCAL (1)
480 #define DURABILITY_TRANSIENT (2)
481 #define DURABILITY_PERSISTENT (3)
482 
483 /* Parameter Ownership */
484 #define OWNERSHIP_SHARED (0)
485 #define OWNERSHIP_EXCLUSIVE (1)
486 
487 /* Parameter Presentation */
488 #define PRESENTATION_INSTANCE (0)
489 #define PRESENTATION_TOPIC (1)
490 #define PRESENTATION_GROUP (2)
491 
492 #define LOCATOR_KIND_INVALID (-1)
493 #define LOCATOR_KIND_RESERVED (0)
494 #define LOCATOR_KIND_UDPV4 (1)
495 #define LOCATOR_KIND_UDPV6 (2)
496 /* Vendor specific - rti */
497 #define LOCATOR_KIND_DTLS (6)
498 #define LOCATOR_KIND_TCPV4_LAN (8)
499 #define LOCATOR_KIND_TCPV4_WAN (9)
500 #define LOCATOR_KIND_TLSV4_LAN (10)
501 #define LOCATOR_KIND_TLSV4_WAN (11)
502 #define LOCATOR_KIND_SHMEM (0x01000000)
503 #define LOCATOR_KIND_TUDPV4 (0x01001001)
504 
505 /* History Kind */
506 #define HISTORY_KIND_KEEP_LAST (0)
507 #define HISTORY_KIND_KEEP_ALL (1)
508 
509 /* Reliability Values */
510 #define RELIABILITY_BEST_EFFORT (1)
511 #define RELIABILITY_RELIABLE (2)
512 
513 /* Destination Order */
514 #define BY_RECEPTION_TIMESTAMP (0)
515 #define BY_SOURCE_TIMESTAMP (1)
516 
517 /* Participant message data kind */
518 #define PARTICIPANT_MESSAGE_DATA_KIND_UNKNOWN (0x00000000)
519 #define PARTICIPANT_MESSAGE_DATA_KIND_AUTOMATIC_LIVELINESS_UPDATE (0x00000001)
520 #define PARTICIPANT_MESSAGE_DATA_KIND_MANUAL_LIVELINESS_UPDATE (0x00000002)
521 
522 /* Type Consistency Kinds */
523 #define DISALLOW_TYPE_COERCION (0)
524 #define ALLOW_TYPE_COERCION (1)
525 
526 /* Ack kind */
527 #define PROTOCOL_ACKNOWLEDGMENT (0)
528 #define APPLICATION_AUTO_ACKNOWLEDGMENT (1)
529 #define APPLICATION_ORDERED_ACKNOWLEDGMENT (2)
530 #define APPLICATION_EXPLICIT_ACKNOWLEDGMENT (3)
531 
532 #define CRYPTO_TRANSFORMATION_KIND_NONE (0)
533 #define CRYPTO_TRANSFORMATION_KIND_AES128_GMAC (1)
534 #define CRYPTO_TRANSFORMATION_KIND_AES128_GCM (2)
535 #define CRYPTO_TRANSFORMATION_KIND_AES256_GMAC (3)
536 #define CRYPTO_TRANSFORMATION_KIND_AES256_GCM (4)
537 
538 /* Vendor specific - rti */
539 #define NDDS_TRANSPORT_CLASSID_ANY (0)
540 #define NDDS_TRANSPORT_CLASSID_UDPv4 (1)
541 #define NDDS_TRANSPORT_CLASSID_UDPv6 (2)
542 #define NDDS_TRANSPORT_CLASSID_INTRA (3)
543 #define NDDS_TRANSPORT_CLASSID_DTLS (6)
544 #define NDDS_TRANSPORT_CLASSID_WAN (7)
545 #define NDDS_TRANSPORT_CLASSID_TCPV4_LAN (8)
546 #define NDDS_TRANSPORT_CLASSID_TCPV4_WAN (9)
547 #define NDDS_TRANSPORT_CLASSID_TLSV4_LAN (10)
548 #define NDDS_TRANSPORT_CLASSID_TLSV4_WAN (11)
549 #define NDDS_TRANSPORT_CLASSID_PCIE (12)
550 #define NDDS_TRANSPORT_CLASSID_ITP (13)
551 #define NDDS_TRANSPORT_CLASSID_SHMEM (0x01000000)
552 
553 #define TOPIC_INFO_ADD_GUID (0x01)
554 #define TOPIC_INFO_ADD_TYPE_NAME (0x02)
555 #define TOPIC_INFO_ADD_TOPIC_NAME (0x04)
556 #define TOPIC_INFO_ADD_RELIABILITY (0x08)
557 #define TOPIC_INFO_ADD_DURABILITY (0x10)
558 #define TOPIC_INFO_ADD_OWNERSHIP (0x20)
559 #define TOPIC_INFO_ALL_SET (0x3f)
560 
561 /* Utilities to add elements to the protocol tree for packet-rtps.h and packet-rtps2.h */
562 extern guint16 rtps_util_add_protocol_version(proto_tree *tree, tvbuff_t* tvb, gint offset);
563 extern guint16 rtps_util_add_vendor_id(proto_tree *tree, tvbuff_t * tvb, gint offset);
564 extern void rtps_util_add_locator_t(proto_tree *tree, packet_info *pinfo, tvbuff_t * tvb, gint offset,
565  const guint encoding, const guint8 * label);
566 extern int rtps_util_add_locator_list(proto_tree *tree, packet_info *pinfo, tvbuff_t * tvb,
567  gint offset, const guint8* label, const guint encoding);
568 extern void rtps_util_add_ipv4_address_t(proto_tree *tree, packet_info *pinfo, tvbuff_t * tvb, gint offset,
569  const guint encoding, int hf_item);
570 extern void rtps_util_add_locator_udp_v4(proto_tree *tree, packet_info *pinfo, tvbuff_t * tvb,
571  gint offset, const guint8 * label, const guint encoding);
572 extern int rtps_util_add_entity_id(proto_tree *tree, tvbuff_t * tvb, gint offset,
573  int hf_item, int hf_item_entity_key, int hf_item_entity_kind,
574  int subtree_entity_id, const char *label, guint32* entity_id_out);
575 extern void rtps_util_add_generic_entity_id(proto_tree *tree, tvbuff_t * tvb, gint offset, const char* label,
576  int hf_item, int hf_item_entity_key, int hf_item_entity_kind,
577  int subtree_entity_id);
578 extern guint64 rtps_util_add_seq_number(proto_tree *tree, tvbuff_t *tvb, gint offset, const guint encoding,
579  const char *label);
580 extern void rtps_util_add_ntp_time(proto_tree *tree, tvbuff_t * tvb, gint offset,
581  const guint encoding, int hf_time);
582 extern gint rtps_util_add_string(proto_tree *tree, tvbuff_t* tvb, gint offset,
583  int hf_item, const guint encoding);
584 extern void rtps_util_add_port(proto_tree *tree, packet_info *pinfo, tvbuff_t * tvb,
585  gint offset, const guint encoding, int hf_item);
586 extern void rtps_util_add_durability_service_qos(proto_tree *tree, tvbuff_t * tvb,
587  gint offset, const guint encoding);
588 extern void rtps_util_add_liveliness_qos(proto_tree *tree, tvbuff_t * tvb, gint offset,
589  const guint encoding);
590 extern gint rtps_util_add_seq_string(proto_tree *tree, tvbuff_t* tvb, gint offset,
591  const guint encoding, int hf_numstring,
592  int hf_string, const char *label);
593 extern gint rtps_util_add_seq_octets(proto_tree *tree, packet_info *pinfo, tvbuff_t* tvb,
594  gint offset, const guint encoding, int param_length, int hf_id);
595 extern gint rtps_util_add_seq_ulong(proto_tree *tree, tvbuff_t * tvb, gint offset, int hf_item,
596  const guint encoding, int param_length, const char *label);
597 
598 extern gboolean rtps_is_ping(tvbuff_t *tvb, packet_info *pinfo, gint offset);
599 
600 /* Shared submessage dissection */
601 extern void dissect_PAD(tvbuff_t *tvb, packet_info *pinfo, gint offset, guint8 flags,
602  const guint encoding, int octects_to_next_header, proto_tree *tree);
603 extern void dissect_INFO_SRC(tvbuff_t *tvb, packet_info *pinfo, gint offset, guint8 flags,
604  const guint encoding, int octets_to_next_header, proto_tree *tree, guint16 rtps_version);
605 extern void dissect_INFO_TS(tvbuff_t *tvb, packet_info *pinfo, gint offset, guint8 flags,
606  const guint encoding, int octets_to_next_header, proto_tree *tree);
607 
608 
609 #ifdef __cplusplus
610 } /* extern "C"*/
611 #endif
612 
613 #endif /* _TYPEDEFS_DEFINES_RTPS_H */
614 
615 /*
616  * Editor modelines
617  *
618  * Local Variables:
619  * c-basic-offset: 2
620  * tab-width: 8
621  * indent-tabs-mode: nil
622  * End:
623  *
624  * ex: set shiftwidth=2 tabstop=8 expandtab:
625  * :indentSize=2:tabSize=8:noTabs=true:
626  */
Definition: packet_info.h:44
Definition: tvbuff-int.h:35
Definition: proto.h:759
Definition: packet-rtps.h:101