/src/wireshark/epan/dissectors/packet-openwire.c
Line | Count | Source |
1 | | /* packet-openwire.c |
2 | | * Routines for ActiveMQ OpenWire protocol |
3 | | * |
4 | | * metatech <metatechbe@gmail.com> |
5 | | * |
6 | | * Wireshark - Network traffic analyzer |
7 | | * By Gerald Combs <gerald@wireshark.org> |
8 | | * Copyright 1998 Gerald Combs |
9 | | * |
10 | | * SPDX-License-Identifier: GPL-2.0-or-later |
11 | | */ |
12 | | |
13 | | /* |
14 | | OpenWire has two wire formats : |
15 | | - "loose" : more verbose, less CPU-intensive, less network-intensive (1-pass) |
16 | | - "tight" : more compact, more CPU-intensive, more network-intensive (2-pass) |
17 | | This dissector only supports the "loose" syntax, which is not the default. |
18 | | This dissector only supports version 6 of the protocol. |
19 | | It can be changed on the broker in the activemq.xml file by specifying "tightEncodingEnabled=false" : |
20 | | |
21 | | <transportConnectors> |
22 | | <transportConnector name="tcp-connector" uri="tcp://0.0.0.0:61616?wireFormat.tightEncodingEnabled=false&wireFormat.cacheEnabled=false"/> |
23 | | </transportConnectors> |
24 | | |
25 | | Note : The WIREFORMAT_INFO command is always sent in "loose" format. |
26 | | |
27 | | */ |
28 | | #include "config.h" |
29 | | |
30 | | #include <epan/packet.h> |
31 | | #include <epan/exceptions.h> |
32 | | #include <epan/prefs.h> |
33 | | #include <epan/expert.h> |
34 | | #include "packet-tcp.h" |
35 | | |
36 | | void proto_register_openwire(void); |
37 | | void proto_reg_handoff_openwire(void); |
38 | | |
39 | | static int proto_openwire; |
40 | | static int hf_openwire_none; |
41 | | static int hf_openwire_length; |
42 | | static int hf_openwire_command; |
43 | | |
44 | | static int hf_openwire_command_id; |
45 | | static int hf_openwire_command_response_required; |
46 | | |
47 | | static int hf_openwire_response_correlationid; |
48 | | |
49 | | static int hf_openwire_dataresponse_data; |
50 | | |
51 | | static int hf_openwire_exceptionresponse_exception; |
52 | | |
53 | | static int hf_openwire_connectionerror_exception; |
54 | | static int hf_openwire_connectionerror_connectionid; |
55 | | |
56 | | static int hf_openwire_controlcommand_command; |
57 | | |
58 | | static int hf_openwire_wireformatinfo_magic; |
59 | | static int hf_openwire_wireformatinfo_version; |
60 | | static int hf_openwire_wireformatinfo_data; |
61 | | static int hf_openwire_wireformatinfo_length; |
62 | | |
63 | | static int hf_openwire_sessioninfo_sessionid; |
64 | | |
65 | | static int hf_openwire_connectioninfo_connectionid; |
66 | | static int hf_openwire_connectioninfo_clientid; |
67 | | static int hf_openwire_connectioninfo_password; |
68 | | static int hf_openwire_connectioninfo_username; |
69 | | static int hf_openwire_connectioninfo_brokerpath; |
70 | | static int hf_openwire_connectioninfo_brokermasterconnector; |
71 | | static int hf_openwire_connectioninfo_manageable; |
72 | | static int hf_openwire_connectioninfo_clientmaster; |
73 | | static int hf_openwire_connectioninfo_faulttolerant; |
74 | | static int hf_openwire_connectioninfo_failoverreconnect; |
75 | | |
76 | | static int hf_openwire_destinationinfo_connectionid; |
77 | | static int hf_openwire_destinationinfo_destination; |
78 | | static int hf_openwire_destinationinfo_operationtype; |
79 | | static int hf_openwire_destinationinfo_timeout; |
80 | | static int hf_openwire_destinationinfo_brokerpath; |
81 | | |
82 | | static int hf_openwire_brokerinfo_brokerid; |
83 | | static int hf_openwire_brokerinfo_brokerurl; |
84 | | static int hf_openwire_brokerinfo_peerbrokerinfos; |
85 | | static int hf_openwire_brokerinfo_brokername; |
86 | | static int hf_openwire_brokerinfo_slavebroker; |
87 | | static int hf_openwire_brokerinfo_masterbroker; |
88 | | static int hf_openwire_brokerinfo_faulttolerantconfiguration; |
89 | | static int hf_openwire_brokerinfo_duplexconnection; |
90 | | static int hf_openwire_brokerinfo_networkconnection; |
91 | | static int hf_openwire_brokerinfo_connectionid; |
92 | | static int hf_openwire_brokerinfo_brokeruploadurl; |
93 | | static int hf_openwire_brokerinfo_networkproperties; |
94 | | |
95 | | static int hf_openwire_connectioncontrol_close; |
96 | | static int hf_openwire_connectioncontrol_exit; |
97 | | static int hf_openwire_connectioncontrol_faulttolerant; |
98 | | static int hf_openwire_connectioncontrol_resume; |
99 | | static int hf_openwire_connectioncontrol_suspend; |
100 | | static int hf_openwire_connectioncontrol_connectedbrokers; |
101 | | static int hf_openwire_connectioncontrol_reconnectto; |
102 | | static int hf_openwire_connectioncontrol_rebalanceconnection; |
103 | | |
104 | | static int hf_openwire_consumercontrol_destination; |
105 | | static int hf_openwire_consumercontrol_close; |
106 | | static int hf_openwire_consumercontrol_consumerid; |
107 | | static int hf_openwire_consumercontrol_prefetch; |
108 | | static int hf_openwire_consumercontrol_flush; |
109 | | static int hf_openwire_consumercontrol_start; |
110 | | static int hf_openwire_consumercontrol_stop; |
111 | | |
112 | | static int hf_openwire_consumerinfo_consumerid; |
113 | | static int hf_openwire_consumerinfo_browser; |
114 | | static int hf_openwire_consumerinfo_destination; |
115 | | static int hf_openwire_consumerinfo_prefetchsize; |
116 | | static int hf_openwire_consumerinfo_maximumpendingmessagelimit; |
117 | | static int hf_openwire_consumerinfo_dispatchasync; |
118 | | static int hf_openwire_consumerinfo_selector; |
119 | | static int hf_openwire_consumerinfo_subscriptionname; |
120 | | static int hf_openwire_consumerinfo_nolocal; |
121 | | static int hf_openwire_consumerinfo_exclusive; |
122 | | static int hf_openwire_consumerinfo_retroactive; |
123 | | static int hf_openwire_consumerinfo_priority; |
124 | | static int hf_openwire_consumerinfo_brokerpath; |
125 | | static int hf_openwire_consumerinfo_additionalpredicate; |
126 | | static int hf_openwire_consumerinfo_networksubscription; |
127 | | static int hf_openwire_consumerinfo_optimizedacknowledge; |
128 | | static int hf_openwire_consumerinfo_norangeacks; |
129 | | static int hf_openwire_consumerinfo_networkconsumerpath; |
130 | | |
131 | | static int hf_openwire_producerinfo_producerid; |
132 | | static int hf_openwire_producerinfo_destination; |
133 | | static int hf_openwire_producerinfo_brokerpath; |
134 | | static int hf_openwire_producerinfo_dispatchasync; |
135 | | static int hf_openwire_producerinfo_windowsize; |
136 | | |
137 | | static int hf_openwire_removeinfo_objectid; |
138 | | static int hf_openwire_removeinfo_lastdeliveredsequenceid; |
139 | | |
140 | | static int hf_openwire_removesubscriptioninfo_connectionid; |
141 | | static int hf_openwire_removesubscriptioninfo_subscriptionname; |
142 | | static int hf_openwire_removesubscriptioninfo_clientid; |
143 | | |
144 | | static int hf_openwire_transactioninfo_connectionid; |
145 | | static int hf_openwire_transactioninfo_transactionid; |
146 | | static int hf_openwire_transactioninfo_type; |
147 | | |
148 | | static int hf_openwire_producerack_producerid; |
149 | | static int hf_openwire_producerack_size; |
150 | | |
151 | | |
152 | | static int hf_openwire_messagedispatch_consumerid; |
153 | | static int hf_openwire_messagedispatch_destination; |
154 | | static int hf_openwire_messagedispatch_message; |
155 | | static int hf_openwire_messagedispatch_redeliverycounter; |
156 | | |
157 | | static int hf_openwire_messageack_destination; |
158 | | static int hf_openwire_messageack_transactionid; |
159 | | static int hf_openwire_messageack_consumerid; |
160 | | static int hf_openwire_messageack_acktype; |
161 | | static int hf_openwire_messageack_firstmessageid; |
162 | | static int hf_openwire_messageack_lastmessageid; |
163 | | static int hf_openwire_messageack_messagecount; |
164 | | |
165 | | static int hf_openwire_messagepull_consumerid; |
166 | | static int hf_openwire_messagepull_destinationid; |
167 | | static int hf_openwire_messagepull_timeout; |
168 | | static int hf_openwire_messagepull_correlationid; |
169 | | static int hf_openwire_messagepull_messageid; |
170 | | |
171 | | static int hf_openwire_message_producerid; |
172 | | static int hf_openwire_message_destination; |
173 | | static int hf_openwire_message_transactionid; |
174 | | static int hf_openwire_message_originaldestination; |
175 | | static int hf_openwire_message_messageid; |
176 | | static int hf_openwire_message_originaldestinationid; |
177 | | static int hf_openwire_message_groupid; |
178 | | static int hf_openwire_message_groupsequence; |
179 | | static int hf_openwire_message_correlationid; |
180 | | static int hf_openwire_message_persistent; |
181 | | static int hf_openwire_message_expiration; |
182 | | static int hf_openwire_message_priority; |
183 | | static int hf_openwire_message_replyto; |
184 | | static int hf_openwire_message_timestamp; |
185 | | static int hf_openwire_message_type; |
186 | | static int hf_openwire_message_body; |
187 | | static int hf_openwire_message_properties; |
188 | | static int hf_openwire_message_datastructure; |
189 | | static int hf_openwire_message_targetconsumerid; |
190 | | static int hf_openwire_message_compressed; |
191 | | static int hf_openwire_message_redeliverycount; |
192 | | static int hf_openwire_message_brokerpath; |
193 | | static int hf_openwire_message_arrival; |
194 | | static int hf_openwire_message_userid; |
195 | | static int hf_openwire_message_receivedbydfbridge; |
196 | | static int hf_openwire_message_droppable; |
197 | | static int hf_openwire_message_cluster; |
198 | | static int hf_openwire_message_brokerintime; |
199 | | static int hf_openwire_message_brokerouttime; |
200 | | |
201 | | static int hf_openwire_producerid_connectionid; |
202 | | static int hf_openwire_producerid_value; |
203 | | static int hf_openwire_producerid_sessionid; |
204 | | |
205 | | static int hf_openwire_consumerid_connectionid; |
206 | | static int hf_openwire_consumerid_value; |
207 | | static int hf_openwire_consumerid_sessionid; |
208 | | |
209 | | static int hf_openwire_destination_name; |
210 | | |
211 | | static int hf_openwire_messageid_producerid; |
212 | | static int hf_openwire_messageid_producersequenceid; |
213 | | static int hf_openwire_messageid_brokersequenceid; |
214 | | |
215 | | static int hf_openwire_connectionid_value; |
216 | | |
217 | | static int hf_openwire_sessionid_connectionid; |
218 | | static int hf_openwire_sessionid_value; |
219 | | |
220 | | static int hf_openwire_brokerid_value; |
221 | | |
222 | | static int hf_openwire_localtransactionid_value; |
223 | | static int hf_openwire_localtransactionid_connectionid; |
224 | | |
225 | | static int hf_openwire_xatransactionid_formatid; |
226 | | static int hf_openwire_xatransactionid_globaltransactionid; |
227 | | static int hf_openwire_xatransactionid_branchqualifier; |
228 | | |
229 | | static int hf_openwire_map_length; |
230 | | static int hf_openwire_map_key; |
231 | | static int hf_openwire_map_entry; |
232 | | |
233 | | static int hf_openwire_throwable_class; |
234 | | static int hf_openwire_throwable_message; |
235 | | static int hf_openwire_throwable_element; |
236 | | static int hf_openwire_throwable_classname; |
237 | | static int hf_openwire_throwable_methodname; |
238 | | static int hf_openwire_throwable_filename; |
239 | | static int hf_openwire_throwable_linenumber; |
240 | | |
241 | | static int hf_openwire_type_integer; |
242 | | static int hf_openwire_type_short; |
243 | | static int hf_openwire_type_string; |
244 | | static int hf_openwire_type_bytes; |
245 | | static int hf_openwire_type_boolean; |
246 | | static int hf_openwire_type_byte; |
247 | | static int hf_openwire_type_char; |
248 | | static int hf_openwire_type_notnull; |
249 | | static int hf_openwire_type_long; |
250 | | static int hf_openwire_type_float; |
251 | | static int hf_openwire_type_double; |
252 | | static int hf_openwire_type_object; |
253 | | static int hf_openwire_type; |
254 | | |
255 | | static int hf_openwire_cached_inlined; |
256 | | static int hf_openwire_cached_id; |
257 | | static int hf_openwire_cached_enabled; |
258 | | |
259 | | static int ett_openwire; |
260 | | static int ett_openwire_type; |
261 | | |
262 | | static expert_field ei_openwire_tight_encoding_not_supported; |
263 | | static expert_field ei_openwire_encoding_not_supported; |
264 | | static expert_field ei_openwire_type_not_supported; |
265 | | static expert_field ei_openwire_command_not_supported; |
266 | | static expert_field ei_openwire_body_type_not_supported; |
267 | | |
268 | | static dissector_handle_t openwire_tcp_handle; |
269 | | |
270 | | static bool openwire_desegment = true; |
271 | | static bool openwire_verbose_type; |
272 | | |
273 | | #define OPENWIRE_PORT_TCP 61616 |
274 | | |
275 | 88 | #define OPENWIRE_MAGIC_PART_1 0x41637469 /* "Acti" */ |
276 | 0 | #define OPENWIRE_MAGIC_PART_2 0x76654D51 /* "veMQ" */ |
277 | | |
278 | 2.20k | #define OPENWIRE_WIREFORMAT_INFO 1 |
279 | 0 | #define OPENWIRE_BROKER_INFO 2 |
280 | 0 | #define OPENWIRE_CONNECTION_INFO 3 |
281 | 0 | #define OPENWIRE_SESSION_INFO 4 |
282 | 0 | #define OPENWIRE_CONSUMER_INFO 5 |
283 | 0 | #define OPENWIRE_PRODUCER_INFO 6 |
284 | 0 | #define OPENWIRE_TRANSACTION_INFO 7 |
285 | 0 | #define OPENWIRE_DESTINATION_INFO 8 |
286 | 0 | #define OPENWIRE_REMOVE_SUBSCRIPTION_INFO 9 |
287 | 141 | #define OPENWIRE_KEEP_ALIVE_INFO 10 |
288 | 0 | #define OPENWIRE_SHUTDOWN_INFO 11 |
289 | 0 | #define OPENWIRE_REMOVE_INFO 12 |
290 | 0 | #define OPENWIRE_CONTROL_COMMAND 14 |
291 | 0 | #define OPENWIRE_FLUSH_COMMAND 15 |
292 | 0 | #define OPENWIRE_CONNECTION_ERROR 16 |
293 | 0 | #define OPENWIRE_CONSUMER_CONTROL 17 |
294 | 0 | #define OPENWIRE_CONNECTION_CONTROL 18 |
295 | 0 | #define OPENWIRE_PRODUCER_ACK 19 |
296 | 0 | #define OPENWIRE_MESSAGE_PULL 20 |
297 | 0 | #define OPENWIRE_MESSAGE_DISPATCH 21 |
298 | 0 | #define OPENWIRE_MESSAGE_ACK 22 |
299 | 0 | #define OPENWIRE_ACTIVEMQ_MESSAGE 23 |
300 | 0 | #define OPENWIRE_ACTIVEMQ_BYTES_MESSAGE 24 |
301 | 0 | #define OPENWIRE_ACTIVEMQ_MAP_MESSAGE 25 |
302 | 0 | #define OPENWIRE_ACTIVEMQ_OBJECT_MESSAGE 26 |
303 | 0 | #define OPENWIRE_ACTIVEMQ_STREAM_MESSAGE 27 |
304 | 0 | #define OPENWIRE_ACTIVEMQ_TEXT_MESSAGE 28 |
305 | 0 | #define OPENWIRE_ACTIVEMQ_BLOB_MESSAGE 29 |
306 | 102 | #define OPENWIRE_RESPONSE 30 |
307 | 0 | #define OPENWIRE_EXCEPTION_RESPONSE 31 |
308 | 0 | #define OPENWIRE_DATA_RESPONSE 32 |
309 | | #define OPENWIRE_DATA_ARRAY_RESPONSE 33 |
310 | | #define OPENWIRE_INTEGER_RESPONSE 34 |
311 | | #define OPENWIRE_DISCOVERY_EVENT 40 |
312 | | #define OPENWIRE_JOURNAL_ACK 50 |
313 | | #define OPENWIRE_JOURNAL_REMOVE 52 |
314 | | #define OPENWIRE_JOURNAL_TRACE 53 |
315 | | #define OPENWIRE_JOURNAL_TRANSACTION 54 |
316 | | #define OPENWIRE_DURABLE_SUBSCRIPTION_INFO 55 |
317 | | #define OPENWIRE_PARTIAL_COMMAND 60 |
318 | | #define OPENWIRE_PARTIAL_LAST_COMMAND 61 |
319 | | #define OPENWIRE_REPLAY 65 |
320 | | #define OPENWIRE_BYTE_TYPE 70 |
321 | | #define OPENWIRE_CHAR_TYPE 71 |
322 | | #define OPENWIRE_SHORT_TYPE 72 |
323 | | #define OPENWIRE_INTEGER_TYPE 73 |
324 | | #define OPENWIRE_LONG_TYPE 74 |
325 | | #define OPENWIRE_DOUBLE_TYPE 75 |
326 | | #define OPENWIRE_FLOAT_TYPE 76 |
327 | | #define OPENWIRE_STRING_TYPE 77 |
328 | | #define OPENWIRE_BOOLEAN_TYPE 78 |
329 | | #define OPENWIRE_BYTE_ARRAY_TYPE 79 |
330 | | #define OPENWIRE_MESSAGE_DISPATCH_NOTIFICATION 90 |
331 | | #define OPENWIRE_NETWORK_BRIDGE_FILTER 91 |
332 | 0 | #define OPENWIRE_ACTIVEMQ_QUEUE 100 |
333 | 0 | #define OPENWIRE_ACTIVEMQ_TOPIC 101 |
334 | 0 | #define OPENWIRE_ACTIVEMQ_TEMP_QUEUE 102 |
335 | 0 | #define OPENWIRE_ACTIVEMQ_TEMP_TOPIC 103 |
336 | 0 | #define OPENWIRE_MESSAGE_ID 110 |
337 | 0 | #define OPENWIRE_ACTIVEMQ_LOCAL_TRANSACTION_ID 111 |
338 | 0 | #define OPENWIRE_ACTIVEMQ_XA_TRANSACTION_ID 112 |
339 | 0 | #define OPENWIRE_CONNECTION_ID 120 |
340 | 0 | #define OPENWIRE_SESSION_ID 121 |
341 | 0 | #define OPENWIRE_CONSUMER_ID 122 |
342 | 0 | #define OPENWIRE_PRODUCER_ID 123 |
343 | 0 | #define OPENWIRE_BROKER_ID 124 |
344 | | |
345 | | static const value_string openwire_opcode_vals[] = { |
346 | | { OPENWIRE_WIREFORMAT_INFO, "WireFormatInfo" }, |
347 | | { OPENWIRE_BROKER_INFO, "BrokerInfo" }, |
348 | | { OPENWIRE_CONNECTION_INFO, "ConnectionInfo" }, |
349 | | { OPENWIRE_SESSION_INFO, "SessionInfo" }, |
350 | | { OPENWIRE_CONSUMER_INFO, "ConsumerInfo" }, |
351 | | { OPENWIRE_PRODUCER_INFO, "ProducerInfo" }, |
352 | | { OPENWIRE_TRANSACTION_INFO, "TransactionInfo" }, |
353 | | { OPENWIRE_DESTINATION_INFO, "DestinationInfo" }, |
354 | | { OPENWIRE_REMOVE_SUBSCRIPTION_INFO, "RemoveSubscriptionInfo" }, |
355 | | { OPENWIRE_KEEP_ALIVE_INFO, "KeepAliveInfo" }, |
356 | | { OPENWIRE_SHUTDOWN_INFO, "ShutdownInfo" }, |
357 | | { OPENWIRE_REMOVE_INFO, "RemoveInfo" }, |
358 | | { OPENWIRE_CONTROL_COMMAND, "ControlCommand" }, |
359 | | { OPENWIRE_FLUSH_COMMAND, "FlushCommand" }, |
360 | | { OPENWIRE_CONNECTION_ERROR, "ConnectionError" }, |
361 | | { OPENWIRE_CONSUMER_CONTROL, "ConsumerControl" }, |
362 | | { OPENWIRE_CONNECTION_CONTROL, "ConnectionControl" }, |
363 | | { OPENWIRE_PRODUCER_ACK, "ProducerAck" }, |
364 | | { OPENWIRE_MESSAGE_PULL, "MessagePull" }, |
365 | | { OPENWIRE_MESSAGE_DISPATCH, "MessageDispatch" }, |
366 | | { OPENWIRE_MESSAGE_ACK, "MessageAck" }, |
367 | | { OPENWIRE_ACTIVEMQ_MESSAGE, "ActiveMQMessage" }, |
368 | | { OPENWIRE_ACTIVEMQ_BYTES_MESSAGE, "ActiveMQBytesMessage" }, |
369 | | { OPENWIRE_ACTIVEMQ_MAP_MESSAGE, "ActiveMQMapMessage" }, |
370 | | { OPENWIRE_ACTIVEMQ_OBJECT_MESSAGE, "ActiveMQObjectMessage" }, |
371 | | { OPENWIRE_ACTIVEMQ_STREAM_MESSAGE, "ActiveMQStreamMessage" }, |
372 | | { OPENWIRE_ACTIVEMQ_TEXT_MESSAGE, "ActiveMQTextMessage" }, |
373 | | { OPENWIRE_ACTIVEMQ_BLOB_MESSAGE, "ActiveMQBlobMessage" }, |
374 | | { OPENWIRE_RESPONSE, "Response" }, |
375 | | { OPENWIRE_EXCEPTION_RESPONSE, "ExceptionResponse" }, |
376 | | { OPENWIRE_DATA_RESPONSE, "DataResponse" }, |
377 | | { OPENWIRE_DATA_ARRAY_RESPONSE, "DataArrayResponse" }, |
378 | | { OPENWIRE_INTEGER_RESPONSE, "IntegerResponse" }, |
379 | | { OPENWIRE_DISCOVERY_EVENT, "DiscoveryEvent" }, |
380 | | { OPENWIRE_JOURNAL_ACK, "JournalTopicAck" }, |
381 | | { OPENWIRE_JOURNAL_REMOVE, "JournalQueueAck" }, |
382 | | { OPENWIRE_JOURNAL_TRACE, "JournalTrace" }, |
383 | | { OPENWIRE_JOURNAL_TRANSACTION, "JournalTransaction" }, |
384 | | { OPENWIRE_DURABLE_SUBSCRIPTION_INFO, "SubscriptionInfo" }, |
385 | | { OPENWIRE_PARTIAL_COMMAND, "PartialCommand" }, |
386 | | { OPENWIRE_PARTIAL_LAST_COMMAND, "LastPartialCommand" }, |
387 | | { OPENWIRE_REPLAY, "ReplayCommand" }, |
388 | | { OPENWIRE_BYTE_TYPE, "Byte" }, |
389 | | { OPENWIRE_CHAR_TYPE, "Char" }, |
390 | | { OPENWIRE_SHORT_TYPE, "Short" }, |
391 | | { OPENWIRE_INTEGER_TYPE, "Integer" }, |
392 | | { OPENWIRE_LONG_TYPE, "Long" }, |
393 | | { OPENWIRE_DOUBLE_TYPE, "Double" }, |
394 | | { OPENWIRE_FLOAT_TYPE, "Float" }, |
395 | | { OPENWIRE_STRING_TYPE, "String" }, |
396 | | { OPENWIRE_BOOLEAN_TYPE, "Boolean" }, |
397 | | { OPENWIRE_BYTE_ARRAY_TYPE, "ByteArray" }, |
398 | | { OPENWIRE_MESSAGE_DISPATCH_NOTIFICATION, "MessageDispatchNotification" }, |
399 | | { OPENWIRE_NETWORK_BRIDGE_FILTER, "NetworkBridgeFilter" }, |
400 | | { OPENWIRE_ACTIVEMQ_QUEUE, "ActiveMQQueue" }, |
401 | | { OPENWIRE_ACTIVEMQ_TOPIC, "ActiveMQTopic" }, |
402 | | { OPENWIRE_ACTIVEMQ_TEMP_QUEUE, "ActiveMQTempQueue" }, |
403 | | { OPENWIRE_ACTIVEMQ_TEMP_TOPIC, "ActiveMQTempTopic" }, |
404 | | { OPENWIRE_MESSAGE_ID, "MessageId" }, |
405 | | { OPENWIRE_ACTIVEMQ_LOCAL_TRANSACTION_ID, "LocalTransactionId" }, |
406 | | { OPENWIRE_ACTIVEMQ_XA_TRANSACTION_ID, "XATransactionId" }, |
407 | | { OPENWIRE_CONNECTION_ID, "ConnectionId" }, |
408 | | { OPENWIRE_SESSION_ID, "SessionId" }, |
409 | | { OPENWIRE_CONSUMER_ID, "ConsumerId" }, |
410 | | { OPENWIRE_PRODUCER_ID, "ProducerId" }, |
411 | | { OPENWIRE_BROKER_ID, "BrokerId" }, |
412 | | { 0, NULL } |
413 | | }; |
414 | | |
415 | | static value_string_ext openwire_opcode_vals_ext = VALUE_STRING_EXT_INIT(openwire_opcode_vals); |
416 | | |
417 | 0 | #define OPENWIRE_COMMAND_INNER -5 |
418 | 0 | #define OPENWIRE_TYPE_OBJECT_ARRAY -4 |
419 | 0 | #define OPENWIRE_TYPE_CACHED -3 |
420 | 0 | #define OPENWIRE_TYPE_NESTED -2 |
421 | 0 | #define OPENWIRE_TYPE_THROWABLE -1 |
422 | 0 | #define OPENWIRE_TYPE_NULL 0 |
423 | 0 | #define OPENWIRE_TYPE_BOOLEAN 1 |
424 | 0 | #define OPENWIRE_TYPE_BYTE 2 |
425 | 0 | #define OPENWIRE_TYPE_CHAR 3 |
426 | 0 | #define OPENWIRE_TYPE_SHORT 4 |
427 | 0 | #define OPENWIRE_TYPE_INTEGER 5 |
428 | 0 | #define OPENWIRE_TYPE_LONG 6 |
429 | 0 | #define OPENWIRE_TYPE_DOUBLE 7 |
430 | 0 | #define OPENWIRE_TYPE_FLOAT 8 |
431 | 0 | #define OPENWIRE_TYPE_STRING 9 |
432 | 0 | #define OPENWIRE_TYPE_BYTE_ARRAY 10 |
433 | 0 | #define OPENWIRE_TYPE_MAP 11 |
434 | 0 | #define OPENWIRE_TYPE_LIST 12 |
435 | 0 | #define OPENWIRE_TYPE_BIG_STRING 13 |
436 | | |
437 | | static const value_string openwire_type_vals[] = { |
438 | | { OPENWIRE_TYPE_NULL, "Null" }, |
439 | | { OPENWIRE_TYPE_BOOLEAN, "Boolean" }, |
440 | | { OPENWIRE_TYPE_BYTE, "Byte" }, |
441 | | { OPENWIRE_TYPE_CHAR, "Char" }, |
442 | | { OPENWIRE_TYPE_SHORT, "Short" }, |
443 | | { OPENWIRE_TYPE_INTEGER, "Integer" }, |
444 | | { OPENWIRE_TYPE_LONG, "Long" }, |
445 | | { OPENWIRE_TYPE_DOUBLE, "Double" }, |
446 | | { OPENWIRE_TYPE_FLOAT, "Float" }, |
447 | | { OPENWIRE_TYPE_STRING, "String" }, |
448 | | { OPENWIRE_TYPE_BYTE_ARRAY, "ByteArray" }, |
449 | | { OPENWIRE_TYPE_MAP, "Map" }, |
450 | | { OPENWIRE_TYPE_LIST, "List" }, |
451 | | { OPENWIRE_TYPE_BIG_STRING, "BigString" }, |
452 | | { OPENWIRE_ACTIVEMQ_MESSAGE, "ActiveMQMessage" }, |
453 | | { OPENWIRE_ACTIVEMQ_BYTES_MESSAGE, "ActiveMQBytesMessage" }, |
454 | | { OPENWIRE_ACTIVEMQ_MAP_MESSAGE, "ActiveMQMapMessage" }, |
455 | | { OPENWIRE_ACTIVEMQ_OBJECT_MESSAGE, "ActiveMQObjectMessage" }, |
456 | | { OPENWIRE_ACTIVEMQ_STREAM_MESSAGE, "ActiveMQStreamMessage" }, |
457 | | { OPENWIRE_ACTIVEMQ_TEXT_MESSAGE, "ActiveMQTextMessage" }, |
458 | | { OPENWIRE_ACTIVEMQ_BLOB_MESSAGE, "ActiveMQBlobMessage" }, |
459 | | { OPENWIRE_ACTIVEMQ_QUEUE, "ActiveMQQueue" }, |
460 | | { OPENWIRE_ACTIVEMQ_TOPIC, "ActiveMQTopic" }, |
461 | | { OPENWIRE_ACTIVEMQ_TEMP_QUEUE, "ActiveMQTempQueue" }, |
462 | | { OPENWIRE_ACTIVEMQ_TEMP_TOPIC, "ActiveMQTempTopic" }, |
463 | | { OPENWIRE_MESSAGE_ID, "MessageId" }, |
464 | | { OPENWIRE_ACTIVEMQ_LOCAL_TRANSACTION_ID, "LocalTransactionId" }, |
465 | | { OPENWIRE_ACTIVEMQ_XA_TRANSACTION_ID, "XATransactionId" }, |
466 | | { OPENWIRE_CONNECTION_ID, "ConnectionId" }, |
467 | | { OPENWIRE_SESSION_ID, "SessionId" }, |
468 | | { OPENWIRE_CONSUMER_ID, "ConsumerId" }, |
469 | | { OPENWIRE_PRODUCER_ID, "ProducerId" }, |
470 | | { OPENWIRE_BROKER_ID, "BrokerId" }, |
471 | | { OPENWIRE_TYPE_OBJECT_ARRAY, "ObjectArray" }, |
472 | | { OPENWIRE_TYPE_THROWABLE, "Throwable" }, |
473 | | { 0, NULL } |
474 | | }; |
475 | | |
476 | | static value_string_ext openwire_type_vals_ext = VALUE_STRING_EXT_INIT(openwire_type_vals); |
477 | | |
478 | | #define OPENWIRE_TRANSACTIONTYPE_BEGIN 0 |
479 | | #define OPENWIRE_TRANSACTIONTYPE_PREPARE 1 |
480 | | #define OPENWIRE_TRANSACTIONTYPE_COMMIT_ONE_PHASE 2 |
481 | | #define OPENWIRE_TRANSACTIONTYPE_COMMIT_TWO_PHASE 3 |
482 | | #define OPENWIRE_TRANSACTIONTYPE_ROLLBACK 4 |
483 | | #define OPENWIRE_TRANSACTIONTYPE_RECOVER 5 |
484 | | #define OPENWIRE_TRANSACTIONTYPE_FORGET 6 |
485 | | #define OPENWIRE_TRANSACTIONTYPE_END 7 |
486 | | |
487 | | static const value_string openwire_transaction_type_vals[] = { |
488 | | { OPENWIRE_TRANSACTIONTYPE_BEGIN, "Begin" }, |
489 | | { OPENWIRE_TRANSACTIONTYPE_PREPARE, "Prepare" }, |
490 | | { OPENWIRE_TRANSACTIONTYPE_COMMIT_ONE_PHASE, "CommitOnePhase" }, |
491 | | { OPENWIRE_TRANSACTIONTYPE_COMMIT_TWO_PHASE, "CommitTwoPhase" }, |
492 | | { OPENWIRE_TRANSACTIONTYPE_ROLLBACK, "Rollback" }, |
493 | | { OPENWIRE_TRANSACTIONTYPE_RECOVER, "Recover" }, |
494 | | { OPENWIRE_TRANSACTIONTYPE_FORGET, "Forget" }, |
495 | | { OPENWIRE_TRANSACTIONTYPE_END, "End" }, |
496 | | { 0, NULL } |
497 | | }; |
498 | | |
499 | | static value_string_ext openwire_transaction_type_vals_ext = VALUE_STRING_EXT_INIT(openwire_transaction_type_vals); |
500 | | |
501 | | #define OPENWIRE_MESSAGE_ACK_TYPE_DELIVERED 0 |
502 | | #define OPENWIRE_MESSAGE_ACK_TYPE_POISON 1 |
503 | | #define OPENWIRE_MESSAGE_ACK_TYPE_STANDARD 2 |
504 | | #define OPENWIRE_MESSAGE_ACK_TYPE_REDELIVERED 3 |
505 | | #define OPENWIRE_MESSAGE_ACK_TYPE_INDIVIDUAL 4 |
506 | | #define OPENWIRE_MESSAGE_ACK_TYPE_UNMATCHED 5 |
507 | | |
508 | | static const value_string openwire_message_ack_type_vals[] = { |
509 | | { OPENWIRE_MESSAGE_ACK_TYPE_DELIVERED, "Delivered" }, |
510 | | { OPENWIRE_MESSAGE_ACK_TYPE_POISON, "Poison" }, |
511 | | { OPENWIRE_MESSAGE_ACK_TYPE_STANDARD, "Standard" }, |
512 | | { OPENWIRE_MESSAGE_ACK_TYPE_REDELIVERED, "Redelivered" }, |
513 | | { OPENWIRE_MESSAGE_ACK_TYPE_INDIVIDUAL, "Individual" }, |
514 | | { OPENWIRE_MESSAGE_ACK_TYPE_UNMATCHED, "Unmatched" }, |
515 | | { 0, NULL } |
516 | | }; |
517 | | |
518 | | #define OPENWIRE_OPERATION_TYPE_ADD 0 |
519 | | #define OPENWIRE_OPERATION_TYPE_REMOVE 1 |
520 | | |
521 | | static const value_string openwire_operation_type_vals[] = { |
522 | | { OPENWIRE_OPERATION_TYPE_ADD, "Add" }, |
523 | | { OPENWIRE_OPERATION_TYPE_REMOVE, "Remove" }, |
524 | | { 0, NULL } |
525 | | }; |
526 | | |
527 | | typedef struct openwire_conv_data { |
528 | | bool caching; |
529 | | bool tight; |
530 | | } openwire_conv_data; |
531 | | |
532 | | static void |
533 | | validate_boolean(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree _U_, int offset, proto_item *boolean_item) |
534 | 0 | { |
535 | | /* Sanity check of boolean : must be 0x00 or 0x01 */ |
536 | 0 | uint8_t booleanByte; |
537 | 0 | booleanByte = tvb_get_uint8(tvb, offset); |
538 | 0 | if (booleanByte != false && booleanByte != true) |
539 | 0 | { |
540 | 0 | expert_add_info(pinfo, boolean_item, &ei_openwire_encoding_not_supported); |
541 | 0 | } |
542 | 0 | } |
543 | | |
544 | | static int |
545 | | particularize(int specificField, int genericField) |
546 | 0 | { |
547 | 0 | return (specificField == hf_openwire_none ? genericField : specificField); |
548 | 0 | } |
549 | | |
550 | | static void |
551 | | detect_protocol_options(tvbuff_t *tvb, packet_info *pinfo, int offset, int iCommand) |
552 | 0 | { |
553 | | /* This function is level-2 heuristic to detect the protocol options, after the level-1 heuristic to detect the protocol. |
554 | | The WireFormatInfo structure reliably declares whether tight encoding and/or caching are used. |
555 | | However, only the response must be used, which is the result of the "negotiation" handshake with the server. |
556 | | However, if the capture is started after the connection initial handshake, it must be deduced in a heuristic way. |
557 | | For the sake of generality, we do not consider the handshake, but only the heuristic way. |
558 | | */ |
559 | 0 | if (tvb_captured_length_remaining(tvb, offset) >= 12) |
560 | 0 | { |
561 | | /* Only check commands which start with a "OPENWIRE_TYPE_CACHED" object */ |
562 | 0 | if (iCommand == OPENWIRE_SESSION_INFO |
563 | 0 | || iCommand == OPENWIRE_DESTINATION_INFO |
564 | 0 | || iCommand == OPENWIRE_CONNECTION_INFO |
565 | 0 | || iCommand == OPENWIRE_CONSUMER_INFO |
566 | 0 | || iCommand == OPENWIRE_PRODUCER_INFO |
567 | 0 | || iCommand == OPENWIRE_BROKER_INFO |
568 | 0 | || iCommand == OPENWIRE_TRANSACTION_INFO |
569 | 0 | || iCommand == OPENWIRE_REMOVE_SUBSCRIPTION_INFO |
570 | 0 | || iCommand == OPENWIRE_MESSAGE_DISPATCH |
571 | 0 | || iCommand == OPENWIRE_MESSAGE_ACK |
572 | 0 | || iCommand == OPENWIRE_MESSAGE_PULL) |
573 | 0 | { |
574 | 0 | conversation_t *conv = NULL; |
575 | 0 | openwire_conv_data *cd = NULL; |
576 | 0 | conv = find_or_create_conversation(pinfo); |
577 | 0 | cd = (openwire_conv_data*)conversation_get_proto_data(conv, proto_openwire); |
578 | 0 | if (!cd) |
579 | 0 | { |
580 | 0 | uint8_t present, type; |
581 | 0 | int command_id = 0; |
582 | |
|
583 | 0 | present = tvb_get_uint8(tvb, offset + 10); |
584 | 0 | type = tvb_get_uint8(tvb, offset + 11); |
585 | 0 | command_id = tvb_get_ntohl(tvb, offset + 5); |
586 | |
|
587 | 0 | cd = wmem_new(wmem_file_scope(), openwire_conv_data); |
588 | 0 | cd->caching = false; |
589 | 0 | cd->tight = false; |
590 | 0 | if (command_id > (1 << 24)) |
591 | 0 | { |
592 | | /* If "tight" encoding is enabled, the command_id first byte is non-zero. |
593 | | This can be misdetected with "loose" encoding if the capture is started after 16 millions commands on the connection, |
594 | | which we will assume that it happens very rarely. */ |
595 | 0 | cd->tight = true; |
596 | 0 | } |
597 | 0 | else |
598 | 0 | { |
599 | 0 | if (present == true && type == OPENWIRE_TYPE_NULL) |
600 | 0 | { |
601 | | /* If a cached object is not-null, it should be the "NULL" object. |
602 | | This can be misdetected with "loose" encoding if the capture is started after 256 cached objects on the connection, |
603 | | which we will assume that it happens rarely. */ |
604 | 0 | cd->caching = true; |
605 | 0 | } |
606 | 0 | } |
607 | 0 | conversation_add_proto_data(conv, proto_openwire, cd); |
608 | 0 | } |
609 | 0 | } |
610 | 0 | } |
611 | 0 | else if ((tvb_get_uint8(tvb, 4) == OPENWIRE_KEEP_ALIVE_INFO) |
612 | 0 | && (tvb_captured_length(tvb) == 11)) |
613 | 0 | { |
614 | | /* If the capture is started after a long-lived connection is started, |
615 | | a keep-alive command of 11 bytes detects tight encoding (not caching stays unknown). |
616 | | */ |
617 | 0 | conversation_t *conv = NULL; |
618 | 0 | openwire_conv_data *cd = NULL; |
619 | 0 | conv = find_or_create_conversation(pinfo); |
620 | 0 | cd = (openwire_conv_data*)conversation_get_proto_data(conv, proto_openwire); |
621 | 0 | if (!cd) |
622 | 0 | { |
623 | 0 | cd = wmem_new(wmem_file_scope(), openwire_conv_data); |
624 | 0 | cd->tight = true; |
625 | 0 | cd->caching = false; /* Dummy value */ |
626 | 0 | conversation_add_proto_data(conv, proto_openwire, cd); |
627 | 0 | } |
628 | 0 | } |
629 | 0 | } |
630 | | |
631 | | static bool |
632 | | retrieve_caching(packet_info *pinfo) |
633 | 0 | { |
634 | 0 | conversation_t *conv; |
635 | 0 | openwire_conv_data *cd; |
636 | |
|
637 | 0 | conv = find_or_create_conversation(pinfo); |
638 | 0 | cd = (openwire_conv_data*)conversation_get_proto_data(conv, proto_openwire); |
639 | 0 | if (cd) return cd->caching; |
640 | | /* Default : non-caching is recommended */ |
641 | 0 | return false; |
642 | 0 | } |
643 | | |
644 | | static bool |
645 | | retrieve_tight(packet_info *pinfo) |
646 | 0 | { |
647 | 0 | conversation_t *conv; |
648 | 0 | openwire_conv_data *cd; |
649 | |
|
650 | 0 | conv = find_or_create_conversation(pinfo); |
651 | 0 | cd = (openwire_conv_data*)conversation_get_proto_data(conv, proto_openwire); |
652 | 0 | if (cd && cd->tight) return true; |
653 | 0 | return false; |
654 | 0 | } |
655 | | |
656 | | static int |
657 | | dissect_openwire_command(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, int parentType); |
658 | | |
659 | | static unsigned |
660 | | // NOLINTNEXTLINE(misc-no-recursion) |
661 | | dissect_openwire_type(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset, int field, int type, int parentType, bool nullable) |
662 | 0 | { |
663 | 0 | unsigned startOffset = offset; |
664 | 0 | proto_item *boolean_item = NULL; |
665 | 0 | const char *cache_str = ""; |
666 | |
|
667 | 0 | if (type == OPENWIRE_TYPE_CACHED && retrieve_caching(pinfo) == true && tvb_reported_length_remaining(tvb, offset) >= 3) |
668 | 0 | { |
669 | 0 | uint8_t inlined = 0; |
670 | 0 | int cachedID = 0; |
671 | 0 | proto_item * cached_item = NULL; |
672 | 0 | inlined = tvb_get_uint8(tvb, offset + 0) == true ? true : false; |
673 | 0 | cachedID = tvb_get_ntohs(tvb, offset + 1); |
674 | 0 | cache_str = wmem_strdup_printf(pinfo->pool, " (CachedID: %d)", cachedID); |
675 | 0 | if (openwire_verbose_type) |
676 | 0 | { |
677 | 0 | proto_tree_add_item(tree, hf_openwire_cached_inlined, tvb, offset, 1, ENC_BIG_ENDIAN); |
678 | 0 | } |
679 | 0 | cached_item = proto_tree_add_item(tree, hf_openwire_cached_id, tvb, offset + 1, 2, ENC_BIG_ENDIAN); |
680 | 0 | if (!openwire_verbose_type) |
681 | 0 | { |
682 | | /* Hide it but allow it in search filters */ |
683 | 0 | proto_item_set_hidden(cached_item); |
684 | 0 | } |
685 | 0 | if (inlined == false) |
686 | 0 | { |
687 | 0 | proto_item *ti; |
688 | 0 | ti = proto_tree_add_item(tree, particularize(field, hf_openwire_type_object), tvb, startOffset, 3, ENC_NA); |
689 | 0 | proto_item_append_text(ti, "%s", cache_str); |
690 | 0 | return 3; |
691 | 0 | } |
692 | 0 | else |
693 | 0 | { |
694 | 0 | offset += 3; |
695 | 0 | } |
696 | 0 | } |
697 | 0 | if (nullable == true && (type == OPENWIRE_TYPE_NESTED || type == OPENWIRE_TYPE_CACHED || type == OPENWIRE_COMMAND_INNER) && tvb_reported_length_remaining(tvb, offset) >= 1) |
698 | 0 | { |
699 | 0 | nullable = tvb_get_uint8(tvb, offset + 0) == false ? true : false; |
700 | 0 | if (openwire_verbose_type) |
701 | 0 | { |
702 | 0 | boolean_item = proto_tree_add_item(tree, hf_openwire_type_notnull, tvb, offset, 1, ENC_BIG_ENDIAN); |
703 | 0 | } |
704 | 0 | validate_boolean(tvb, pinfo, tree, offset, boolean_item); |
705 | 0 | if (nullable == true) |
706 | 0 | { |
707 | 0 | proto_tree_add_item(tree, particularize(field, hf_openwire_none), tvb, offset, 1, ENC_NA); |
708 | 0 | return offset - startOffset + 1; |
709 | 0 | } |
710 | 0 | offset += 1; |
711 | 0 | } |
712 | 0 | if (type == OPENWIRE_COMMAND_INNER && tvb_reported_length_remaining(tvb, offset) >= 1) |
713 | 0 | { |
714 | 0 | proto_item * inner_item = NULL; |
715 | 0 | proto_tree * object_tree = NULL; |
716 | 0 | uint8_t iCommand = parentType; |
717 | 0 | iCommand = tvb_get_uint8(tvb, offset + 0); |
718 | 0 | inner_item = proto_tree_add_item(tree, particularize(field, hf_openwire_none), tvb, startOffset, -1, ENC_NA); |
719 | 0 | proto_item_append_text(inner_item, ": %s", val_to_str_ext(pinfo->pool, iCommand, &openwire_opcode_vals_ext, "Unknown (0x%02x)")); |
720 | 0 | object_tree = proto_item_add_subtree(inner_item, ett_openwire_type); |
721 | 0 | increment_dissection_depth(pinfo); |
722 | 0 | int command_offset = 1 + dissect_openwire_command(tvb, pinfo, object_tree, offset, parentType); |
723 | 0 | decrement_dissection_depth(pinfo); |
724 | 0 | return command_offset; |
725 | |
|
726 | 0 | } |
727 | 0 | if ((type == OPENWIRE_TYPE_NESTED || type == OPENWIRE_TYPE_CACHED) && tvb_reported_length_remaining(tvb, offset) >= 1) |
728 | 0 | { |
729 | 0 | type = tvb_get_uint8(tvb, offset + 0); |
730 | 0 | if (openwire_verbose_type) |
731 | 0 | { |
732 | 0 | proto_tree_add_item(tree, hf_openwire_type, tvb, offset, 1, ENC_BIG_ENDIAN); |
733 | 0 | } |
734 | 0 | offset += 1; |
735 | 0 | } |
736 | 0 | if (nullable == true && tvb_reported_length_remaining(tvb, offset) >= 1) |
737 | 0 | { |
738 | 0 | nullable = tvb_get_uint8(tvb, offset + 0) == false ? true : false; |
739 | 0 | if (openwire_verbose_type) |
740 | 0 | { |
741 | 0 | boolean_item = proto_tree_add_item(tree, hf_openwire_type_notnull, tvb, offset, 1, ENC_BIG_ENDIAN); |
742 | 0 | } |
743 | 0 | validate_boolean(tvb, pinfo, tree, offset, boolean_item); |
744 | 0 | if (nullable == true) |
745 | 0 | { |
746 | 0 | proto_tree_add_item(tree, particularize(field, hf_openwire_none), tvb, offset, 1, ENC_NA); |
747 | 0 | return offset - startOffset + 1; |
748 | 0 | } |
749 | 0 | offset += 1; |
750 | 0 | } |
751 | | |
752 | | /* First check for primitives types */ |
753 | 0 | if (type == OPENWIRE_TYPE_NULL) |
754 | 0 | { |
755 | 0 | offset += 0; |
756 | 0 | } |
757 | 0 | else if (type == OPENWIRE_TYPE_INTEGER && tvb_reported_length_remaining(tvb, offset) >= 4) |
758 | 0 | { |
759 | 0 | proto_tree_add_item(tree, particularize(field, hf_openwire_type_integer), tvb, offset, 4, ENC_BIG_ENDIAN); |
760 | 0 | offset += 4; |
761 | 0 | } |
762 | 0 | else if (type == OPENWIRE_TYPE_SHORT && tvb_reported_length_remaining(tvb, offset) >= 2) |
763 | 0 | { |
764 | 0 | proto_tree_add_item(tree, particularize(field, hf_openwire_type_short), tvb, offset, 2, ENC_BIG_ENDIAN); |
765 | 0 | offset += 2; |
766 | 0 | } |
767 | 0 | else if (type == OPENWIRE_TYPE_LONG && tvb_reported_length_remaining(tvb, offset) >= 8) |
768 | 0 | { |
769 | 0 | proto_tree_add_item(tree, particularize(field, hf_openwire_type_long), tvb, offset, 8, ENC_BIG_ENDIAN); |
770 | 0 | offset += 8; |
771 | 0 | } |
772 | 0 | else if (type == OPENWIRE_TYPE_BOOLEAN && tvb_reported_length_remaining(tvb, offset) >= 1) |
773 | 0 | { |
774 | 0 | boolean_item = proto_tree_add_item(tree, particularize(field, hf_openwire_type_boolean), tvb, offset, 1, ENC_BIG_ENDIAN); |
775 | 0 | validate_boolean(tvb, pinfo, tree, offset, boolean_item); |
776 | 0 | offset += 1; |
777 | 0 | } |
778 | 0 | else if (type == OPENWIRE_TYPE_BYTE && tvb_reported_length_remaining(tvb, offset) >= 1) |
779 | 0 | { |
780 | 0 | proto_tree_add_item(tree, particularize(field, hf_openwire_type_byte), tvb, offset, 1, ENC_NA); |
781 | 0 | offset += 1; |
782 | 0 | } |
783 | 0 | else if (type == OPENWIRE_TYPE_CHAR && tvb_reported_length_remaining(tvb, offset) >= 2) |
784 | 0 | { |
785 | 0 | proto_tree_add_item(tree, particularize(field, hf_openwire_type_char), tvb, offset, 2, ENC_NA); |
786 | 0 | offset += 2; |
787 | 0 | } |
788 | 0 | else if (type == OPENWIRE_TYPE_FLOAT && tvb_reported_length_remaining(tvb, offset) >= 4) |
789 | 0 | { |
790 | 0 | proto_tree_add_item(tree, particularize(field, hf_openwire_type_float), tvb, offset, 4, ENC_BIG_ENDIAN); |
791 | 0 | offset += 4; |
792 | 0 | } |
793 | 0 | else if (type == OPENWIRE_TYPE_DOUBLE && tvb_reported_length_remaining(tvb, offset) >= 8) |
794 | 0 | { |
795 | 0 | proto_tree_add_item(tree, particularize(field, hf_openwire_type_double), tvb, offset, 8, ENC_BIG_ENDIAN); |
796 | 0 | offset += 8; |
797 | 0 | } |
798 | 0 | else if (type == OPENWIRE_TYPE_STRING && tvb_reported_length_remaining(tvb, offset) >= 2) |
799 | 0 | { |
800 | 0 | unsigned iStringLength = 0; |
801 | 0 | iStringLength = tvb_get_ntohs(tvb, offset); |
802 | 0 | if (openwire_verbose_type) |
803 | 0 | { |
804 | 0 | proto_tree_add_item(tree, hf_openwire_type_short, tvb, offset, 2, ENC_BIG_ENDIAN); |
805 | 0 | } |
806 | 0 | offset += 2; |
807 | 0 | if (tvb_reported_length_remaining(tvb, offset) >= iStringLength) |
808 | 0 | { |
809 | 0 | proto_tree_add_item(tree, particularize(field, hf_openwire_type_string), tvb, offset, iStringLength, ENC_NA); |
810 | 0 | offset += iStringLength; |
811 | 0 | } |
812 | 0 | } |
813 | 0 | else if (type == OPENWIRE_TYPE_BIG_STRING && tvb_reported_length_remaining(tvb, offset) >= 4) |
814 | 0 | { |
815 | 0 | unsigned iStringLength = 0; |
816 | 0 | iStringLength = tvb_get_ntohl(tvb, offset); |
817 | 0 | if (openwire_verbose_type) |
818 | 0 | { |
819 | 0 | proto_tree_add_item(tree, hf_openwire_type_integer, tvb, offset, 4, ENC_BIG_ENDIAN); |
820 | 0 | } |
821 | 0 | offset += 4; |
822 | 0 | if (tvb_reported_length_remaining(tvb, offset) >= iStringLength) |
823 | 0 | { |
824 | 0 | proto_tree_add_item(tree, particularize(field, hf_openwire_type_string), tvb, offset, iStringLength, ENC_NA); |
825 | 0 | offset += iStringLength; |
826 | 0 | } |
827 | 0 | } |
828 | 0 | else if (type == OPENWIRE_TYPE_BYTE_ARRAY && tvb_reported_length_remaining(tvb, offset) >= 4) |
829 | 0 | { |
830 | 0 | unsigned iArrayLength = 0; |
831 | 0 | iArrayLength = tvb_get_ntohl(tvb, offset); |
832 | 0 | if (openwire_verbose_type) |
833 | 0 | { |
834 | 0 | proto_tree_add_item(tree, hf_openwire_type_integer, tvb, offset, 4, ENC_BIG_ENDIAN); |
835 | 0 | } |
836 | 0 | offset += 4; |
837 | 0 | if (tvb_reported_length_remaining(tvb, offset) >= iArrayLength) |
838 | 0 | { |
839 | 0 | proto_item * array_item = NULL; |
840 | 0 | proto_tree * object_tree = NULL; |
841 | 0 | array_item = proto_tree_add_item(tree, particularize(field, hf_openwire_type_bytes), tvb, offset, iArrayLength, ENC_NA); |
842 | 0 | object_tree = proto_item_add_subtree(array_item, ett_openwire_type); |
843 | 0 | if (field == hf_openwire_message_body) |
844 | 0 | { |
845 | 0 | tvbuff_t* next_tvb = NULL; |
846 | 0 | if (parentType == OPENWIRE_ACTIVEMQ_TEXT_MESSAGE) |
847 | 0 | { |
848 | 0 | dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_none, OPENWIRE_TYPE_BIG_STRING, type, false); |
849 | 0 | next_tvb = tvb_new_subset_length(tvb, offset, iArrayLength); |
850 | 0 | add_new_data_source(pinfo, next_tvb, "Body"); |
851 | 0 | } |
852 | 0 | else if (parentType == OPENWIRE_ACTIVEMQ_MAP_MESSAGE) |
853 | 0 | { |
854 | 0 | dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_none, OPENWIRE_TYPE_MAP, type, false); |
855 | 0 | } |
856 | 0 | else if (parentType == OPENWIRE_ACTIVEMQ_STREAM_MESSAGE) |
857 | 0 | { |
858 | 0 | next_tvb = tvb_new_subset_length(tvb, offset, iArrayLength); |
859 | 0 | unsigned streamOffset = 0; |
860 | 0 | while (tvb_reported_length_remaining(next_tvb, streamOffset)) |
861 | 0 | { |
862 | 0 | streamOffset += dissect_openwire_type(next_tvb, pinfo, object_tree, streamOffset, hf_openwire_none, OPENWIRE_TYPE_NESTED, type, false); |
863 | 0 | } |
864 | 0 | } |
865 | 0 | else if (parentType == OPENWIRE_ACTIVEMQ_BYTES_MESSAGE |
866 | 0 | || parentType == OPENWIRE_ACTIVEMQ_OBJECT_MESSAGE |
867 | 0 | || parentType == OPENWIRE_ACTIVEMQ_BLOB_MESSAGE) |
868 | 0 | { |
869 | 0 | next_tvb = tvb_new_subset_length(tvb, offset, iArrayLength); |
870 | 0 | add_new_data_source(pinfo, next_tvb, "Body"); |
871 | 0 | expert_add_info(pinfo, array_item, &ei_openwire_body_type_not_supported); |
872 | 0 | } |
873 | 0 | } |
874 | 0 | else if (field == hf_openwire_message_properties) |
875 | 0 | { |
876 | 0 | dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_none, OPENWIRE_TYPE_MAP, type, false); |
877 | 0 | } |
878 | 0 | offset += iArrayLength; |
879 | 0 | } |
880 | 0 | } |
881 | 0 | else if (tvb_reported_length_remaining(tvb, offset) >= 1) |
882 | 0 | { |
883 | | /* Check for complex types */ |
884 | 0 | proto_tree *object_tree; |
885 | 0 | proto_item *ti; |
886 | 0 | ti = proto_tree_add_item(tree, particularize(field, hf_openwire_type_object), tvb, startOffset, -1, ENC_NA); |
887 | 0 | proto_item_append_text(ti, ": %s", val_to_str_ext(pinfo->pool, type, &openwire_type_vals_ext, "Unknown (0x%02x)")); |
888 | 0 | proto_item_append_text(ti, "%s", cache_str); |
889 | |
|
890 | 0 | object_tree = proto_item_add_subtree(ti, ett_openwire_type); |
891 | |
|
892 | 0 | if (type == OPENWIRE_TYPE_OBJECT_ARRAY && tvb_reported_length_remaining(tvb, offset) >= 2) |
893 | 0 | { |
894 | 0 | unsigned iArrayLength; |
895 | 0 | iArrayLength = tvb_get_ntohs(tvb, offset); |
896 | 0 | if (openwire_verbose_type) |
897 | 0 | { |
898 | 0 | proto_tree_add_item(object_tree, hf_openwire_type_short, tvb, offset + 0, 2, ENC_BIG_ENDIAN); |
899 | 0 | } |
900 | 0 | proto_item_append_text(ti, " (Size : %d)", iArrayLength); |
901 | 0 | offset += 2; |
902 | 0 | for (unsigned iArrayItem = 0; iArrayItem < iArrayLength; iArrayItem++) |
903 | 0 | { |
904 | 0 | offset += dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_none, OPENWIRE_TYPE_NESTED, type, true); |
905 | 0 | } |
906 | 0 | } |
907 | 0 | else if (type == OPENWIRE_TYPE_MAP && tvb_reported_length_remaining(tvb, offset) >= 4) |
908 | 0 | { |
909 | 0 | unsigned iMapLength = 0; |
910 | 0 | iMapLength = tvb_get_ntohl(tvb, offset); |
911 | 0 | if (openwire_verbose_type) |
912 | 0 | { |
913 | 0 | proto_tree_add_item(object_tree, hf_openwire_map_length, tvb, offset, 4, ENC_BIG_ENDIAN); |
914 | 0 | } |
915 | 0 | proto_item_append_text(ti, " (Size : %d)", iMapLength); |
916 | 0 | offset += 4; |
917 | 0 | for (unsigned iMapItem = 0; (iMapItem < iMapLength) && (tvb_reported_length_remaining(tvb, offset) > 0); iMapItem++) |
918 | 0 | { |
919 | 0 | proto_item * map_entry; |
920 | 0 | proto_tree * entry_tree; |
921 | 0 | int entryStartOffset = offset; |
922 | |
|
923 | 0 | map_entry = proto_tree_add_item(object_tree, hf_openwire_map_entry, tvb, offset, 0, ENC_NA); |
924 | 0 | entry_tree = proto_item_add_subtree(map_entry, ett_openwire_type); |
925 | | |
926 | | /* Key */ |
927 | 0 | offset += dissect_openwire_type(tvb, pinfo, entry_tree, offset, hf_openwire_map_key, OPENWIRE_TYPE_STRING, type, false); |
928 | | /* Value */ |
929 | 0 | offset += dissect_openwire_type(tvb, pinfo, entry_tree, offset, hf_openwire_none, OPENWIRE_TYPE_NESTED, type, false); |
930 | 0 | proto_item_set_len(map_entry, offset - entryStartOffset); |
931 | 0 | } |
932 | 0 | } |
933 | 0 | else if (type == OPENWIRE_TYPE_THROWABLE && tvb_reported_length_remaining(tvb, offset) >= 2) |
934 | 0 | { |
935 | 0 | unsigned iStackTraceDepth; |
936 | 0 | offset += dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_throwable_class, OPENWIRE_TYPE_STRING, type, true); |
937 | 0 | offset += dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_throwable_message, OPENWIRE_TYPE_STRING, type, true); |
938 | 0 | iStackTraceDepth = tvb_get_ntohs(tvb, offset); |
939 | 0 | if (openwire_verbose_type) |
940 | 0 | { |
941 | 0 | proto_tree_add_item(tree, hf_openwire_type_short, tvb, offset, 2, ENC_BIG_ENDIAN); |
942 | 0 | } |
943 | 0 | offset += 2; |
944 | 0 | if (iStackTraceDepth > 0) |
945 | 0 | { |
946 | 0 | for (unsigned iStackTraceItem = 0; iStackTraceItem < iStackTraceDepth; iStackTraceItem++) |
947 | 0 | { |
948 | 0 | proto_item *element; |
949 | 0 | proto_tree *element_tree; |
950 | 0 | int startElementOffset = offset; |
951 | 0 | element = proto_tree_add_item(object_tree, hf_openwire_throwable_element, tvb, startElementOffset, -1, ENC_NA); |
952 | 0 | element_tree = proto_item_add_subtree(element, ett_openwire_type); |
953 | |
|
954 | 0 | offset += dissect_openwire_type(tvb, pinfo, element_tree, offset, hf_openwire_throwable_classname, OPENWIRE_TYPE_STRING, type, true); |
955 | 0 | offset += dissect_openwire_type(tvb, pinfo, element_tree, offset, hf_openwire_throwable_methodname, OPENWIRE_TYPE_STRING, type, true); |
956 | 0 | offset += dissect_openwire_type(tvb, pinfo, element_tree, offset, hf_openwire_throwable_filename, OPENWIRE_TYPE_STRING, type, true); |
957 | 0 | offset += dissect_openwire_type(tvb, pinfo, element_tree, offset, hf_openwire_throwable_linenumber, OPENWIRE_TYPE_INTEGER, type, false); |
958 | 0 | proto_item_set_len(element, offset - startElementOffset); |
959 | 0 | } |
960 | 0 | offset += dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_exceptionresponse_exception, OPENWIRE_TYPE_THROWABLE, type, true); |
961 | 0 | } |
962 | 0 | } |
963 | 0 | else if (type == OPENWIRE_TYPE_LIST && tvb_reported_length_remaining(tvb, offset) >= 4) |
964 | 0 | { |
965 | | /* TODO (unused) */ |
966 | 0 | } |
967 | 0 | else if (type == OPENWIRE_CONNECTION_ID && tvb_reported_length_remaining(tvb, offset) >= 1) |
968 | 0 | { |
969 | 0 | offset += dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_connectionid_value, OPENWIRE_TYPE_STRING, type, true); |
970 | 0 | } |
971 | 0 | else if (type == OPENWIRE_SESSION_ID && tvb_reported_length_remaining(tvb, offset) >= 2) |
972 | 0 | { |
973 | 0 | offset += dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_sessionid_connectionid, OPENWIRE_TYPE_STRING, type, true); |
974 | 0 | offset += dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_sessionid_value, OPENWIRE_TYPE_LONG, type, false); |
975 | 0 | } |
976 | 0 | else if (type == OPENWIRE_CONSUMER_ID && tvb_reported_length_remaining(tvb, offset) >= 3) |
977 | 0 | { |
978 | 0 | offset += dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_consumerid_connectionid, OPENWIRE_TYPE_STRING, type, true); |
979 | 0 | offset += dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_consumerid_value, OPENWIRE_TYPE_LONG, type, false); |
980 | 0 | offset += dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_consumerid_sessionid, OPENWIRE_TYPE_LONG, type, false); |
981 | 0 | } |
982 | 0 | else if (type == OPENWIRE_PRODUCER_ID && tvb_reported_length_remaining(tvb, offset) >= 3) |
983 | 0 | { |
984 | 0 | offset += dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_producerid_connectionid, OPENWIRE_TYPE_STRING, type, true); |
985 | 0 | offset += dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_producerid_value, OPENWIRE_TYPE_LONG, type, false); |
986 | 0 | offset += dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_producerid_sessionid, OPENWIRE_TYPE_LONG, type, false); |
987 | 0 | } |
988 | 0 | else if (type == OPENWIRE_BROKER_ID && tvb_reported_length_remaining(tvb, offset) >= 1) |
989 | 0 | { |
990 | 0 | offset += dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_brokerid_value, OPENWIRE_TYPE_STRING, type, true); |
991 | 0 | } |
992 | 0 | else if (type == OPENWIRE_MESSAGE_ID && tvb_reported_length_remaining(tvb, offset) >= 3) |
993 | 0 | { |
994 | 0 | offset += dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_messageid_producerid, OPENWIRE_TYPE_CACHED, type, true); |
995 | 0 | offset += dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_messageid_producersequenceid, OPENWIRE_TYPE_LONG, type, false); |
996 | 0 | offset += dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_messageid_brokersequenceid, OPENWIRE_TYPE_LONG, type, false); |
997 | 0 | } |
998 | 0 | else if (type == OPENWIRE_ACTIVEMQ_LOCAL_TRANSACTION_ID && tvb_reported_length_remaining(tvb, offset) >= 2) |
999 | 0 | { |
1000 | 0 | offset += dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_localtransactionid_value, OPENWIRE_TYPE_LONG, type, false); |
1001 | 0 | offset += dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_localtransactionid_connectionid, OPENWIRE_TYPE_CACHED, type, true); |
1002 | 0 | } |
1003 | 0 | else if (type == OPENWIRE_ACTIVEMQ_XA_TRANSACTION_ID && tvb_reported_length_remaining(tvb, offset) >= 3) |
1004 | 0 | { |
1005 | 0 | offset += dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_xatransactionid_formatid, OPENWIRE_TYPE_INTEGER, type, false); |
1006 | 0 | offset += dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_xatransactionid_globaltransactionid, OPENWIRE_TYPE_BYTE_ARRAY, type, true); |
1007 | 0 | offset += dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_xatransactionid_branchqualifier, OPENWIRE_TYPE_BYTE_ARRAY, type, true); |
1008 | 0 | } |
1009 | 0 | else if ((type == OPENWIRE_ACTIVEMQ_QUEUE |
1010 | 0 | || type == OPENWIRE_ACTIVEMQ_TOPIC |
1011 | 0 | || type == OPENWIRE_ACTIVEMQ_TEMP_QUEUE |
1012 | 0 | || type == OPENWIRE_ACTIVEMQ_TEMP_TOPIC) |
1013 | 0 | && tvb_reported_length_remaining(tvb, offset) >= 1) |
1014 | 0 | { |
1015 | 0 | offset += dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_destination_name, OPENWIRE_TYPE_STRING, type, true); |
1016 | 0 | } |
1017 | 0 | else if (type == OPENWIRE_ACTIVEMQ_MESSAGE |
1018 | 0 | || type == OPENWIRE_ACTIVEMQ_BYTES_MESSAGE |
1019 | 0 | || type == OPENWIRE_ACTIVEMQ_MAP_MESSAGE |
1020 | 0 | || type == OPENWIRE_ACTIVEMQ_OBJECT_MESSAGE |
1021 | 0 | || type == OPENWIRE_ACTIVEMQ_STREAM_MESSAGE |
1022 | 0 | || type == OPENWIRE_ACTIVEMQ_TEXT_MESSAGE |
1023 | 0 | || type == OPENWIRE_ACTIVEMQ_BLOB_MESSAGE) |
1024 | 0 | { |
1025 | 0 | if (parentType != type) |
1026 | 0 | { |
1027 | 0 | offset += dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_command_id, OPENWIRE_TYPE_INTEGER, type, false); |
1028 | 0 | offset += dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_command_response_required, OPENWIRE_TYPE_BOOLEAN, type, false); |
1029 | 0 | } |
1030 | 0 | offset += dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_message_producerid, OPENWIRE_TYPE_CACHED, type, true); |
1031 | 0 | offset += dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_message_destination, OPENWIRE_TYPE_CACHED, type, true); |
1032 | 0 | offset += dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_message_transactionid, OPENWIRE_TYPE_CACHED, type, true); |
1033 | 0 | offset += dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_message_originaldestination, OPENWIRE_TYPE_CACHED, type, true); |
1034 | 0 | offset += dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_message_messageid, OPENWIRE_TYPE_NESTED, type, true); |
1035 | 0 | offset += dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_message_originaldestinationid, OPENWIRE_TYPE_CACHED, type, true); |
1036 | 0 | offset += dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_message_groupid, OPENWIRE_TYPE_STRING, type, true); |
1037 | 0 | offset += dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_message_groupsequence, OPENWIRE_TYPE_INTEGER, type, false); |
1038 | 0 | offset += dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_message_correlationid, OPENWIRE_TYPE_STRING, type, true); |
1039 | 0 | offset += dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_message_persistent, OPENWIRE_TYPE_BOOLEAN, type, false); |
1040 | 0 | offset += dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_message_expiration, OPENWIRE_TYPE_LONG, type, false); |
1041 | 0 | offset += dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_message_priority, OPENWIRE_TYPE_BYTE, type, false); |
1042 | 0 | offset += dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_message_replyto, OPENWIRE_TYPE_NESTED, type, true); |
1043 | 0 | offset += dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_message_timestamp, OPENWIRE_TYPE_LONG, type, false); |
1044 | 0 | offset += dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_message_type, OPENWIRE_TYPE_STRING, type, true); |
1045 | 0 | offset += dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_message_body, OPENWIRE_TYPE_BYTE_ARRAY, type, true); |
1046 | 0 | offset += dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_message_properties, OPENWIRE_TYPE_BYTE_ARRAY, type, true); |
1047 | 0 | offset += dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_message_datastructure, OPENWIRE_COMMAND_INNER, type, true); |
1048 | 0 | offset += dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_message_targetconsumerid, OPENWIRE_TYPE_CACHED, type, true); |
1049 | 0 | offset += dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_message_compressed, OPENWIRE_TYPE_BOOLEAN, type, false); |
1050 | 0 | offset += dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_message_redeliverycount, OPENWIRE_TYPE_INTEGER, type, false); |
1051 | 0 | offset += dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_message_brokerpath, OPENWIRE_TYPE_OBJECT_ARRAY, type, true); |
1052 | 0 | offset += dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_message_arrival, OPENWIRE_TYPE_LONG, type, false); |
1053 | 0 | offset += dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_message_userid, OPENWIRE_TYPE_STRING, type, true); |
1054 | 0 | offset += dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_message_receivedbydfbridge, OPENWIRE_TYPE_BOOLEAN, type, false); |
1055 | 0 | offset += dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_message_droppable, OPENWIRE_TYPE_BOOLEAN, type, false); |
1056 | 0 | offset += dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_message_cluster, OPENWIRE_TYPE_OBJECT_ARRAY, type, true); |
1057 | 0 | offset += dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_message_brokerintime, OPENWIRE_TYPE_LONG, type, false); |
1058 | 0 | offset += dissect_openwire_type(tvb, pinfo, object_tree, offset, hf_openwire_message_brokerouttime, OPENWIRE_TYPE_LONG, type, false); |
1059 | 0 | } |
1060 | 0 | else if (tvb_reported_length_remaining(tvb, offset) > 0) |
1061 | 0 | { |
1062 | 0 | expert_add_info_format(pinfo, object_tree, &ei_openwire_type_not_supported, "OpenWire type not supported by Wireshark : %d", type); |
1063 | 0 | offset += tvb_captured_length_remaining(tvb, offset); |
1064 | 0 | } |
1065 | 0 | proto_item_set_len(ti, offset - startOffset); |
1066 | |
|
1067 | 0 | } |
1068 | 0 | return (offset - startOffset); |
1069 | 0 | } |
1070 | | |
1071 | | static int |
1072 | | // NOLINTNEXTLINE(misc-no-recursion) |
1073 | | dissect_openwire_command(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, int parentType) |
1074 | 0 | { |
1075 | 0 | int startOffset = offset; |
1076 | 0 | uint8_t iCommand; |
1077 | |
|
1078 | 0 | iCommand = tvb_get_uint8(tvb, offset + 0); |
1079 | |
|
1080 | 0 | proto_tree_add_item(tree, hf_openwire_command, tvb, offset + 0, 1, ENC_BIG_ENDIAN); |
1081 | 0 | offset += 1; |
1082 | |
|
1083 | 0 | if (iCommand == OPENWIRE_WIREFORMAT_INFO) |
1084 | 0 | { |
1085 | 0 | if (tvb_reported_length_remaining(tvb, offset) >= 17) |
1086 | 0 | { |
1087 | 0 | proto_tree_add_item(tree, hf_openwire_wireformatinfo_magic, tvb, offset + 0, 8, ENC_ASCII); |
1088 | 0 | proto_tree_add_item(tree, hf_openwire_wireformatinfo_version, tvb, offset + 8, 4, ENC_BIG_ENDIAN); |
1089 | 0 | proto_tree_add_item(tree, hf_openwire_wireformatinfo_data, tvb, offset + 12, 1, ENC_BIG_ENDIAN); |
1090 | 0 | proto_tree_add_item(tree, hf_openwire_wireformatinfo_length, tvb, offset + 13, 4, ENC_BIG_ENDIAN); |
1091 | 0 | offset += 17; |
1092 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_none, OPENWIRE_TYPE_MAP, iCommand, false); |
1093 | 0 | } |
1094 | 0 | } |
1095 | 0 | else |
1096 | 0 | { |
1097 | 0 | if (tvb_reported_length_remaining(tvb, offset) >= 5) |
1098 | 0 | { |
1099 | 0 | proto_tree_add_item(tree, hf_openwire_command_id, tvb, offset, 4, ENC_BIG_ENDIAN); |
1100 | 0 | proto_tree_add_item(tree, hf_openwire_command_response_required, tvb, offset + 4, 1, ENC_BIG_ENDIAN); |
1101 | 0 | offset += 5; |
1102 | 0 | if (iCommand == OPENWIRE_SHUTDOWN_INFO || iCommand == OPENWIRE_KEEP_ALIVE_INFO || iCommand == OPENWIRE_FLUSH_COMMAND) |
1103 | 0 | { |
1104 | | /* No additional fields */ |
1105 | 0 | } |
1106 | 0 | else if (iCommand == OPENWIRE_SESSION_INFO) |
1107 | 0 | { |
1108 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_sessioninfo_sessionid, OPENWIRE_TYPE_CACHED, iCommand, true); |
1109 | 0 | } |
1110 | 0 | else if (iCommand == OPENWIRE_DESTINATION_INFO) |
1111 | 0 | { |
1112 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_destinationinfo_connectionid, OPENWIRE_TYPE_CACHED, iCommand, true); |
1113 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_destinationinfo_destination, OPENWIRE_TYPE_CACHED, iCommand, true); |
1114 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_destinationinfo_operationtype, OPENWIRE_TYPE_BYTE, iCommand, false); |
1115 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_destinationinfo_timeout, OPENWIRE_TYPE_LONG, iCommand, false); |
1116 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_destinationinfo_brokerpath, OPENWIRE_TYPE_OBJECT_ARRAY, iCommand, true); |
1117 | 0 | } |
1118 | 0 | else if (iCommand == OPENWIRE_CONNECTION_INFO) |
1119 | 0 | { |
1120 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_connectioninfo_connectionid, OPENWIRE_TYPE_CACHED, iCommand, true); |
1121 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_connectioninfo_clientid, OPENWIRE_TYPE_STRING, iCommand, true); |
1122 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_connectioninfo_password, OPENWIRE_TYPE_STRING, iCommand, true); |
1123 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_connectioninfo_username, OPENWIRE_TYPE_STRING, iCommand, true); |
1124 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_connectioninfo_brokerpath, OPENWIRE_TYPE_OBJECT_ARRAY, iCommand, true); |
1125 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_connectioninfo_brokermasterconnector, OPENWIRE_TYPE_BOOLEAN, iCommand, false); |
1126 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_connectioninfo_manageable, OPENWIRE_TYPE_BOOLEAN, iCommand, false); |
1127 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_connectioninfo_clientmaster, OPENWIRE_TYPE_BOOLEAN, iCommand, false); |
1128 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_connectioninfo_faulttolerant, OPENWIRE_TYPE_BOOLEAN, iCommand, false); |
1129 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_connectioninfo_failoverreconnect, OPENWIRE_TYPE_BOOLEAN, iCommand, false); |
1130 | 0 | } |
1131 | 0 | else if (iCommand == OPENWIRE_CONNECTION_CONTROL) |
1132 | 0 | { |
1133 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_connectioncontrol_close, OPENWIRE_TYPE_BOOLEAN, iCommand, true); |
1134 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_connectioncontrol_exit, OPENWIRE_TYPE_BOOLEAN, iCommand, false); |
1135 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_connectioncontrol_faulttolerant, OPENWIRE_TYPE_BOOLEAN, iCommand, false); |
1136 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_connectioncontrol_resume, OPENWIRE_TYPE_BOOLEAN, iCommand, false); |
1137 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_connectioncontrol_suspend, OPENWIRE_TYPE_BOOLEAN, iCommand, false); |
1138 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_connectioncontrol_connectedbrokers, OPENWIRE_TYPE_STRING, iCommand, true); |
1139 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_connectioncontrol_reconnectto, OPENWIRE_TYPE_STRING, iCommand, true); |
1140 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_connectioncontrol_rebalanceconnection, OPENWIRE_TYPE_BOOLEAN, iCommand, false); |
1141 | 0 | } |
1142 | 0 | else if (iCommand == OPENWIRE_CONSUMER_INFO) |
1143 | 0 | { |
1144 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_consumerinfo_consumerid, OPENWIRE_TYPE_CACHED, iCommand, true); |
1145 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_consumerinfo_browser, OPENWIRE_TYPE_BOOLEAN, iCommand, false); |
1146 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_consumerinfo_destination, OPENWIRE_TYPE_CACHED, iCommand, true); |
1147 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_consumerinfo_prefetchsize, OPENWIRE_TYPE_INTEGER, iCommand, false); |
1148 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_consumerinfo_maximumpendingmessagelimit, OPENWIRE_TYPE_INTEGER, iCommand, false); |
1149 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_consumerinfo_dispatchasync, OPENWIRE_TYPE_BOOLEAN, iCommand, false); |
1150 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_consumerinfo_selector, OPENWIRE_TYPE_STRING, iCommand, true); |
1151 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_consumerinfo_subscriptionname, OPENWIRE_TYPE_STRING, iCommand, true); |
1152 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_consumerinfo_nolocal, OPENWIRE_TYPE_BOOLEAN, iCommand, false); |
1153 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_consumerinfo_exclusive, OPENWIRE_TYPE_BOOLEAN, iCommand, false); |
1154 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_consumerinfo_retroactive, OPENWIRE_TYPE_BOOLEAN, iCommand, false); |
1155 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_consumerinfo_priority, OPENWIRE_TYPE_BYTE, iCommand, true); |
1156 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_consumerinfo_brokerpath, OPENWIRE_TYPE_OBJECT_ARRAY, iCommand, true); |
1157 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_consumerinfo_additionalpredicate, OPENWIRE_TYPE_NESTED, iCommand, true); |
1158 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_consumerinfo_networksubscription, OPENWIRE_TYPE_BOOLEAN, iCommand, false); |
1159 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_consumerinfo_optimizedacknowledge, OPENWIRE_TYPE_BOOLEAN, iCommand, false); |
1160 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_consumerinfo_norangeacks, OPENWIRE_TYPE_BOOLEAN, iCommand, false); |
1161 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_consumerinfo_networkconsumerpath, OPENWIRE_TYPE_OBJECT_ARRAY, iCommand, true); |
1162 | 0 | } |
1163 | 0 | else if (iCommand == OPENWIRE_PRODUCER_INFO) |
1164 | 0 | { |
1165 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_producerinfo_producerid, OPENWIRE_TYPE_CACHED, iCommand, true); |
1166 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_producerinfo_destination, OPENWIRE_TYPE_CACHED, iCommand, true); |
1167 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_producerinfo_brokerpath, OPENWIRE_TYPE_OBJECT_ARRAY, iCommand, true); |
1168 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_producerinfo_dispatchasync, OPENWIRE_TYPE_BOOLEAN, iCommand, false); |
1169 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_producerinfo_windowsize, OPENWIRE_TYPE_INTEGER, iCommand, false); |
1170 | 0 | } |
1171 | 0 | else if (iCommand == OPENWIRE_CONSUMER_CONTROL) |
1172 | 0 | { |
1173 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_consumercontrol_destination, OPENWIRE_TYPE_NESTED, iCommand, true); |
1174 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_consumercontrol_close, OPENWIRE_TYPE_BOOLEAN, iCommand, false); |
1175 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_consumercontrol_consumerid, OPENWIRE_TYPE_NESTED, iCommand, true); |
1176 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_consumercontrol_prefetch, OPENWIRE_TYPE_INTEGER, iCommand, false); |
1177 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_consumercontrol_flush, OPENWIRE_TYPE_BOOLEAN, iCommand, false); |
1178 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_consumercontrol_start, OPENWIRE_TYPE_BOOLEAN, iCommand, false); |
1179 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_consumercontrol_stop, OPENWIRE_TYPE_BOOLEAN, iCommand, false); |
1180 | 0 | } |
1181 | 0 | else if (iCommand == OPENWIRE_BROKER_INFO) |
1182 | 0 | { |
1183 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_brokerinfo_brokerid, OPENWIRE_TYPE_CACHED, iCommand, true); |
1184 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_brokerinfo_brokerurl, OPENWIRE_TYPE_STRING, iCommand, true); |
1185 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_brokerinfo_peerbrokerinfos, OPENWIRE_TYPE_OBJECT_ARRAY, iCommand, true); |
1186 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_brokerinfo_brokername, OPENWIRE_TYPE_STRING, iCommand, true); |
1187 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_brokerinfo_slavebroker, OPENWIRE_TYPE_BOOLEAN, iCommand, false); |
1188 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_brokerinfo_masterbroker, OPENWIRE_TYPE_BOOLEAN, iCommand, false); |
1189 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_brokerinfo_faulttolerantconfiguration, OPENWIRE_TYPE_BOOLEAN, iCommand, false); |
1190 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_brokerinfo_duplexconnection, OPENWIRE_TYPE_BOOLEAN, iCommand, false); |
1191 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_brokerinfo_networkconnection, OPENWIRE_TYPE_BOOLEAN, iCommand, false); |
1192 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_brokerinfo_connectionid, OPENWIRE_TYPE_LONG, iCommand, false); |
1193 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_brokerinfo_brokeruploadurl, OPENWIRE_TYPE_STRING, iCommand, true); |
1194 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_brokerinfo_networkproperties, OPENWIRE_TYPE_STRING, iCommand, true); |
1195 | 0 | } |
1196 | 0 | else if (iCommand == OPENWIRE_TRANSACTION_INFO) |
1197 | 0 | { |
1198 | 0 | uint8_t iTransactionType; |
1199 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_transactioninfo_connectionid, OPENWIRE_TYPE_CACHED, iCommand, true); |
1200 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_transactioninfo_transactionid, OPENWIRE_TYPE_CACHED, iCommand, true); |
1201 | 0 | if (tvb_reported_length_remaining(tvb, offset) >= 1) |
1202 | 0 | { |
1203 | 0 | iTransactionType = tvb_get_uint8(tvb, offset); |
1204 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_transactioninfo_type, OPENWIRE_TYPE_BYTE, iCommand, false); |
1205 | 0 | proto_item_append_text(tree, " (%s)", val_to_str_ext(pinfo->pool, iTransactionType, &openwire_transaction_type_vals_ext, "Unknown (0x%02x)")); |
1206 | 0 | } |
1207 | 0 | } |
1208 | 0 | else if (iCommand == OPENWIRE_PRODUCER_ACK) |
1209 | 0 | { |
1210 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_producerack_producerid, OPENWIRE_TYPE_NESTED, iCommand, true); |
1211 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_producerack_size, OPENWIRE_TYPE_INTEGER, iCommand, false); |
1212 | 0 | } |
1213 | 0 | else if (iCommand == OPENWIRE_REMOVE_INFO) |
1214 | 0 | { |
1215 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_removeinfo_objectid, OPENWIRE_TYPE_CACHED, iCommand, true); |
1216 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_removeinfo_lastdeliveredsequenceid, OPENWIRE_TYPE_LONG, iCommand, false); |
1217 | 0 | } |
1218 | 0 | else if (iCommand == OPENWIRE_REMOVE_SUBSCRIPTION_INFO) |
1219 | 0 | { |
1220 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_removesubscriptioninfo_connectionid, OPENWIRE_TYPE_CACHED, iCommand, true); |
1221 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_removesubscriptioninfo_subscriptionname, OPENWIRE_TYPE_STRING, iCommand, true); |
1222 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_removesubscriptioninfo_clientid, OPENWIRE_TYPE_STRING, iCommand, true); |
1223 | 0 | } |
1224 | 0 | else if (iCommand == OPENWIRE_MESSAGE_DISPATCH) |
1225 | 0 | { |
1226 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_messagedispatch_consumerid, OPENWIRE_TYPE_CACHED, iCommand, true); |
1227 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_messagedispatch_destination, OPENWIRE_TYPE_CACHED, iCommand, true); |
1228 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_messagedispatch_message, OPENWIRE_TYPE_NESTED, iCommand, true); |
1229 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_messagedispatch_redeliverycounter, OPENWIRE_TYPE_INTEGER, iCommand, false); |
1230 | 0 | } |
1231 | 0 | else if (iCommand == OPENWIRE_MESSAGE_ACK) |
1232 | 0 | { |
1233 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_messageack_destination, OPENWIRE_TYPE_CACHED, iCommand, true); |
1234 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_messageack_transactionid, OPENWIRE_TYPE_CACHED, iCommand, true); |
1235 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_messageack_consumerid, OPENWIRE_TYPE_CACHED, iCommand, true); |
1236 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_messageack_acktype, OPENWIRE_TYPE_BYTE, iCommand, false); |
1237 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_messageack_firstmessageid, OPENWIRE_TYPE_NESTED, iCommand, true); |
1238 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_messageack_lastmessageid, OPENWIRE_TYPE_NESTED, iCommand, true); |
1239 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_messageack_messagecount, OPENWIRE_TYPE_INTEGER, iCommand, false); |
1240 | 0 | } |
1241 | 0 | else if (iCommand == OPENWIRE_MESSAGE_PULL) |
1242 | 0 | { |
1243 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_messagepull_consumerid, OPENWIRE_TYPE_CACHED, iCommand, true); |
1244 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_messagepull_destinationid, OPENWIRE_TYPE_CACHED, iCommand, true); |
1245 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_messagepull_timeout, OPENWIRE_TYPE_LONG, iCommand, false); |
1246 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_messagepull_correlationid, OPENWIRE_TYPE_STRING, iCommand, true); |
1247 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_messagepull_messageid, OPENWIRE_TYPE_NESTED, iCommand, true); |
1248 | 0 | } |
1249 | 0 | else if (iCommand == OPENWIRE_RESPONSE) |
1250 | 0 | { |
1251 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_response_correlationid, OPENWIRE_TYPE_INTEGER, iCommand, false); |
1252 | 0 | } |
1253 | 0 | else if (iCommand == OPENWIRE_DATA_RESPONSE) |
1254 | 0 | { |
1255 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_response_correlationid, OPENWIRE_TYPE_INTEGER, iCommand, false); |
1256 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_dataresponse_data, OPENWIRE_COMMAND_INNER, iCommand, true); |
1257 | 0 | } |
1258 | 0 | else if (iCommand == OPENWIRE_CONNECTION_ERROR) |
1259 | 0 | { |
1260 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_connectionerror_exception, OPENWIRE_TYPE_THROWABLE, iCommand, true); |
1261 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_connectionerror_connectionid, OPENWIRE_TYPE_NESTED, iCommand, true); |
1262 | 0 | } |
1263 | 0 | else if (iCommand == OPENWIRE_EXCEPTION_RESPONSE) |
1264 | 0 | { |
1265 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_response_correlationid, OPENWIRE_TYPE_INTEGER, iCommand, false); |
1266 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_exceptionresponse_exception, OPENWIRE_TYPE_THROWABLE, iCommand, true); |
1267 | 0 | } |
1268 | 0 | else if (iCommand == OPENWIRE_CONTROL_COMMAND) |
1269 | 0 | { |
1270 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_controlcommand_command, OPENWIRE_TYPE_STRING, iCommand, true); |
1271 | 0 | } |
1272 | 0 | else if (iCommand == OPENWIRE_ACTIVEMQ_MESSAGE |
1273 | 0 | || iCommand == OPENWIRE_ACTIVEMQ_BYTES_MESSAGE |
1274 | 0 | || iCommand == OPENWIRE_ACTIVEMQ_MAP_MESSAGE |
1275 | 0 | || iCommand == OPENWIRE_ACTIVEMQ_OBJECT_MESSAGE |
1276 | 0 | || iCommand == OPENWIRE_ACTIVEMQ_STREAM_MESSAGE |
1277 | 0 | || iCommand == OPENWIRE_ACTIVEMQ_TEXT_MESSAGE |
1278 | 0 | || iCommand == OPENWIRE_ACTIVEMQ_BLOB_MESSAGE) |
1279 | 0 | { |
1280 | 0 | offset += dissect_openwire_type(tvb, pinfo, tree, offset, hf_openwire_none, iCommand, parentType, false); |
1281 | 0 | } |
1282 | 0 | else if (tvb_reported_length_remaining(tvb, offset) > 0) |
1283 | 0 | { |
1284 | 0 | expert_add_info_format(pinfo, tree, &ei_openwire_command_not_supported, "OpenWire command not supported by Wireshark: %d", iCommand); |
1285 | 0 | } |
1286 | 0 | } |
1287 | 0 | } |
1288 | 0 | return (offset - startOffset); |
1289 | 0 | } |
1290 | | |
1291 | | static int |
1292 | | dissect_openwire(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
1293 | 0 | { |
1294 | 0 | int offset = 0; |
1295 | |
|
1296 | 0 | col_set_str(pinfo->cinfo, COL_PROTOCOL, "OpenWire"); |
1297 | 0 | col_clear(pinfo->cinfo, COL_INFO); |
1298 | |
|
1299 | 0 | if (tvb_reported_length_remaining(tvb, offset) >= 5) |
1300 | 0 | { |
1301 | 0 | uint8_t iCommand; |
1302 | 0 | proto_tree *openwireroot_tree; |
1303 | 0 | proto_item *ti; |
1304 | 0 | bool caching; |
1305 | |
|
1306 | 0 | iCommand = tvb_get_uint8(tvb, offset + 4); |
1307 | |
|
1308 | 0 | col_append_sep_str(pinfo->cinfo, COL_INFO, " | ", |
1309 | 0 | val_to_str_ext(pinfo->pool, iCommand, &openwire_opcode_vals_ext, "Unknown (0x%02x)")); |
1310 | 0 | col_set_fence(pinfo->cinfo, COL_INFO); |
1311 | |
|
1312 | 0 | detect_protocol_options(tvb, pinfo, offset, iCommand); |
1313 | |
|
1314 | 0 | ti = proto_tree_add_item(tree, proto_openwire, tvb, offset, -1, ENC_NA); |
1315 | 0 | proto_item_append_text(ti, " (%s)", val_to_str_ext(pinfo->pool, iCommand, &openwire_opcode_vals_ext, "Unknown (0x%02x)")); |
1316 | 0 | openwireroot_tree = proto_item_add_subtree(ti, ett_openwire); |
1317 | |
|
1318 | 0 | proto_tree_add_item(openwireroot_tree, hf_openwire_length, tvb, offset + 0, 4, ENC_BIG_ENDIAN); |
1319 | | |
1320 | | /* Abort dissection if tight encoding is enabled*/ |
1321 | 0 | if (iCommand != OPENWIRE_WIREFORMAT_INFO && retrieve_tight(pinfo) == true) |
1322 | 0 | { |
1323 | 0 | proto_tree_add_item(openwireroot_tree, hf_openwire_command, tvb, offset + 4, 1, ENC_BIG_ENDIAN); |
1324 | 0 | expert_add_info(pinfo, openwireroot_tree, &ei_openwire_tight_encoding_not_supported); |
1325 | 0 | return tvb_captured_length(tvb); |
1326 | 0 | } |
1327 | | |
1328 | 0 | caching = retrieve_caching(pinfo); |
1329 | 0 | if (caching) |
1330 | 0 | { |
1331 | 0 | proto_tree_add_boolean(openwireroot_tree, hf_openwire_cached_enabled, tvb, offset, 0, caching); |
1332 | 0 | } |
1333 | |
|
1334 | 0 | offset += 4; |
1335 | 0 | offset += dissect_openwire_command(tvb, pinfo, openwireroot_tree, offset, iCommand); |
1336 | 0 | if (tvb_reported_length_remaining(tvb, offset) > 0) |
1337 | 0 | { |
1338 | 0 | expert_add_info_format(pinfo, tree, &ei_openwire_command_not_supported, "OpenWire command fields unknown to Wireshark: %d", iCommand); |
1339 | 0 | } |
1340 | 0 | } |
1341 | | |
1342 | 0 | return tvb_captured_length(tvb); |
1343 | 0 | } |
1344 | | |
1345 | | static unsigned |
1346 | | get_openwire_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset, void *data _U_) |
1347 | 0 | { |
1348 | 0 | return (tvb_get_ntohl(tvb, offset) + 4); |
1349 | 0 | } |
1350 | | |
1351 | | static int |
1352 | | dissect_openwire_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) |
1353 | 0 | { |
1354 | 0 | tcp_dissect_pdus(tvb, pinfo, tree, openwire_desegment, 5, get_openwire_pdu_len, dissect_openwire, data); |
1355 | 0 | return tvb_captured_length(tvb); |
1356 | 0 | } |
1357 | | |
1358 | | |
1359 | | static bool |
1360 | | dissect_openwire_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) |
1361 | 2.93k | { |
1362 | 2.93k | conversation_t *conversation; |
1363 | 2.93k | bool detected = false; |
1364 | | |
1365 | 2.93k | if (tvb_reported_length(tvb) == 10 || tvb_reported_length(tvb) == 11) |
1366 | 141 | { |
1367 | | /* KeepAlive is sent by default every 30 second. It is 10 bytes (loose) or 11 bytes (tight) long. */ |
1368 | 141 | if ((tvb_get_uint8(tvb, 4) == OPENWIRE_KEEP_ALIVE_INFO) |
1369 | 4 | && (tvb_get_ntohl(tvb, 0) + 4 == tvb_reported_length(tvb))) |
1370 | 0 | { |
1371 | 0 | detected = true; |
1372 | 0 | } |
1373 | 141 | } |
1374 | 2.79k | else if (tvb_reported_length(tvb) == 14 || tvb_reported_length(tvb) == 15) |
1375 | 102 | { |
1376 | | /* Response is sent after several commands. It is 14 bytes (loose) or 15 bytes (tight) long. */ |
1377 | 102 | if ((tvb_get_uint8(tvb, 4) == OPENWIRE_RESPONSE) |
1378 | 1 | && (tvb_get_ntohl(tvb, 0) + 4 == tvb_reported_length(tvb))) |
1379 | 0 | { |
1380 | 0 | detected = true; |
1381 | 0 | } |
1382 | 102 | } |
1383 | 2.68k | else if (tvb_reported_length(tvb) >= 13) |
1384 | 2.20k | { |
1385 | | /* Only the WIREFORMAT_INFO command contains a "magic". It is the first command sent on a connection. |
1386 | | If the capture was started after this command, a manual "Decode As..." might be required. |
1387 | | */ |
1388 | 2.20k | if (tvb_captured_length(tvb) >= 10 |
1389 | 2.20k | && (tvb_get_uint8(tvb, 4) == OPENWIRE_WIREFORMAT_INFO) |
1390 | 88 | && (tvb_get_ntohl(tvb, 5) == OPENWIRE_MAGIC_PART_1) |
1391 | 0 | && (tvb_get_ntohl(tvb, 9) == OPENWIRE_MAGIC_PART_2)) |
1392 | 0 | { |
1393 | 0 | detected = true; |
1394 | 0 | } |
1395 | 2.20k | } |
1396 | 2.93k | if (detected) |
1397 | 0 | { |
1398 | | /* Register this dissector for this conversation */ |
1399 | 0 | conversation = find_or_create_conversation(pinfo); |
1400 | 0 | conversation_set_dissector(conversation, openwire_tcp_handle); |
1401 | | |
1402 | | /* Dissect the packet */ |
1403 | 0 | dissect_openwire(tvb, pinfo, tree, data); |
1404 | 0 | return true; |
1405 | 0 | } |
1406 | 2.93k | return false; |
1407 | 2.93k | } |
1408 | | |
1409 | | void |
1410 | | proto_register_openwire(void) |
1411 | 16 | { |
1412 | 16 | static hf_register_info hf[] = { |
1413 | 16 | { &hf_openwire_length, |
1414 | 16 | { "Length", "openwire.length", FT_UINT32, BASE_DEC, NULL, 0x0, "OpenWire length", HFILL }}, |
1415 | | |
1416 | 16 | { &hf_openwire_command, |
1417 | 16 | { "Command", "openwire.command", FT_UINT8, BASE_DEC, VALS(openwire_opcode_vals), 0x0, "Openwire command", HFILL }}, |
1418 | | |
1419 | 16 | { &hf_openwire_command_id, |
1420 | 16 | { "Command Id", "openwire.command.id", FT_UINT32, BASE_DEC, NULL, 0x0, "Openwire command id", HFILL }}, |
1421 | | |
1422 | 16 | { &hf_openwire_command_response_required, |
1423 | 16 | { "Command response required", "openwire.command.response_required", FT_UINT8, BASE_DEC, NULL, 0x0, "Openwire command response required", HFILL }}, |
1424 | | |
1425 | 16 | { &hf_openwire_response_correlationid, |
1426 | 16 | { "CorrelationId", "openwire.response.correlationid", FT_INT32, BASE_DEC, NULL, 0x0, "Openwire Response CorrelationId", HFILL }}, |
1427 | | |
1428 | 16 | { &hf_openwire_dataresponse_data, |
1429 | 16 | { "Data", "openwire.responsedata.data", FT_NONE, BASE_NONE, NULL, 0x0, "Openwire ResponseData Data", HFILL }}, |
1430 | | |
1431 | 16 | { &hf_openwire_exceptionresponse_exception, |
1432 | 16 | { "Exception", "openwire.exceptionresponse.exception", FT_NONE, BASE_NONE, NULL, 0x0, "Openwire ExceptionResponse Exception", HFILL }}, |
1433 | | |
1434 | 16 | { &hf_openwire_connectionerror_exception, |
1435 | 16 | { "Exception", "openwire.connectionerror.exception", FT_NONE, BASE_NONE, NULL, 0x0, "Openwire ConnectionError Exception", HFILL }}, |
1436 | | |
1437 | 16 | { &hf_openwire_connectionerror_connectionid, |
1438 | 16 | { "ConnectionId", "openwire.connectionerror.connectionid", FT_NONE, BASE_NONE, NULL, 0x0, "Openwire ConnectionError ConnectionId", HFILL }}, |
1439 | | |
1440 | 16 | { &hf_openwire_controlcommand_command, |
1441 | 16 | { "Command", "openwire.controlcommand.command", FT_STRINGZ, BASE_NONE, NULL, 0x0, "Openwire ControlCommand Command", HFILL }}, |
1442 | | |
1443 | 16 | { &hf_openwire_wireformatinfo_magic, |
1444 | 16 | { "Magic", "openwire.wireformatinfo.magic", FT_STRINGZ, BASE_NONE, NULL, 0x0, "Openwire WireFormatInfo Magic", HFILL }}, |
1445 | | |
1446 | 16 | { &hf_openwire_wireformatinfo_version, |
1447 | 16 | { "Version", "openwire.wireformatinfo.version", FT_UINT32, BASE_DEC, NULL, 0x0, "Openwire WireFormatInfo Version", HFILL }}, |
1448 | | |
1449 | 16 | { &hf_openwire_wireformatinfo_data, |
1450 | 16 | { "Data", "openwire.wireformatinfo.data", FT_UINT8, BASE_DEC, NULL, 0x0, "Openwire WireFormatInfo Data", HFILL }}, |
1451 | | |
1452 | 16 | { &hf_openwire_wireformatinfo_length, |
1453 | 16 | { "Length", "openwire.wireformatinfo.length", FT_UINT32, BASE_DEC, NULL, 0x0, "Openwire WireFormatInfo Length", HFILL }}, |
1454 | | |
1455 | 16 | { &hf_openwire_sessioninfo_sessionid, |
1456 | 16 | { "SessionId", "openwire.sessioninfo.sessionid", FT_NONE, BASE_NONE, NULL, 0x0, "Openwire SessionInfo SessionId", HFILL }}, |
1457 | | |
1458 | 16 | { &hf_openwire_destinationinfo_connectionid, |
1459 | 16 | { "ConnectionId", "openwire.destinationinfo.connectionid", FT_NONE, BASE_NONE, NULL, 0x0, "Openwire DestinationInfo ConnectionId", HFILL }}, |
1460 | | |
1461 | 16 | { &hf_openwire_destinationinfo_destination, |
1462 | 16 | { "Destination", "openwire.destinationinfo.destination", FT_NONE, BASE_NONE, NULL, 0x0, "Openwire DestinationInfo Destination", HFILL }}, |
1463 | | |
1464 | 16 | { &hf_openwire_destinationinfo_operationtype, |
1465 | 16 | { "OperationType", "openwire.destinationinfo.operationtype", FT_UINT8, BASE_DEC, VALS(openwire_operation_type_vals), 0x0, "Openwire DestinationInfo OperationType", HFILL }}, |
1466 | | |
1467 | 16 | { &hf_openwire_destinationinfo_timeout, |
1468 | 16 | { "Timeout", "openwire.destinationinfo.timeout", FT_INT64, BASE_DEC, NULL, 0x0, "Openwire DestinationInfo Timeout", HFILL }}, |
1469 | | |
1470 | 16 | { &hf_openwire_destinationinfo_brokerpath, |
1471 | 16 | { "BrokerPath", "openwire.destinationinfo.brokerpath", FT_NONE, BASE_NONE, NULL, 0x0, "Openwire DestinationInfo BrokerPath", HFILL }}, |
1472 | | |
1473 | 16 | { &hf_openwire_brokerinfo_brokerid, |
1474 | 16 | { "BrokerId", "openwire.brokerinfo.brokerid", FT_NONE, BASE_NONE, NULL, 0x0, "Openwire BrokerInfo BrokerId", HFILL }}, |
1475 | | |
1476 | 16 | { &hf_openwire_brokerinfo_brokerurl, |
1477 | 16 | { "BrokerURL", "openwire.brokerinfo.brokerurl", FT_STRINGZ, BASE_NONE, NULL, 0x0, "Openwire BrokerInfo BrokerURL", HFILL }}, |
1478 | | |
1479 | 16 | { &hf_openwire_brokerinfo_peerbrokerinfos, |
1480 | 16 | { "PeerBrokerInfos", "openwire.brokerinfo.peerbrokerinfos", FT_NONE, BASE_NONE, NULL, 0x0, "Openwire BrokerInfo PeerBrokerInfos", HFILL }}, |
1481 | | |
1482 | 16 | { &hf_openwire_brokerinfo_brokername, |
1483 | 16 | { "BrokerName", "openwire.brokerinfo.brokername", FT_STRINGZ, BASE_NONE, NULL, 0x0, "Openwire BrokerInfo BrokerName", HFILL }}, |
1484 | | |
1485 | 16 | { &hf_openwire_brokerinfo_slavebroker, |
1486 | 16 | { "SlaveBroker", "openwire.brokerinfo.slavebroker", FT_UINT8, BASE_DEC, NULL, 0x0, "Openwire BrokerInfo SlaveBroker", HFILL }}, |
1487 | | |
1488 | 16 | { &hf_openwire_brokerinfo_masterbroker, |
1489 | 16 | { "MasterBroker", "openwire.brokerinfo.masterbroker", FT_UINT8, BASE_DEC, NULL, 0x0, "Openwire BrokerInfo MasterBroker", HFILL }}, |
1490 | | |
1491 | 16 | { &hf_openwire_brokerinfo_faulttolerantconfiguration, |
1492 | 16 | { "FaultTolerantConfiguration", "openwire.brokerinfo.faulttolerantconfiguration", FT_UINT8, BASE_DEC, NULL, 0x0, "Openwire BrokerInfo FaultTolerantConfiguration", HFILL }}, |
1493 | | |
1494 | 16 | { &hf_openwire_brokerinfo_duplexconnection, |
1495 | 16 | { "DuplexConnection", "openwire.brokerinfo.duplexconnection", FT_UINT8, BASE_DEC, NULL, 0x0, "Openwire BrokerInfo DuplexConnection", HFILL }}, |
1496 | | |
1497 | 16 | { &hf_openwire_brokerinfo_networkconnection, |
1498 | 16 | { "NetworkConnection", "openwire.brokerinfo.networkconnection", FT_UINT8, BASE_DEC, NULL, 0x0, "Openwire BrokerInfo NetworkConnection", HFILL }}, |
1499 | | |
1500 | 16 | { &hf_openwire_brokerinfo_connectionid, |
1501 | 16 | { "ConnectionId", "openwire.brokerinfo.connectionid", FT_INT64, BASE_DEC, NULL, 0x0, "Openwire BrokerInfo ConnectionId", HFILL }}, |
1502 | | |
1503 | 16 | { &hf_openwire_brokerinfo_brokeruploadurl, |
1504 | 16 | { "BrokerUploadUrl", "openwire.brokerinfo.brokeruploadurl", FT_STRINGZ, BASE_NONE, NULL, 0x0, "Openwire BrokerInfo BrokerUploadUrl", HFILL }}, |
1505 | | |
1506 | 16 | { &hf_openwire_brokerinfo_networkproperties, |
1507 | 16 | { "NetworkProperties", "openwire.brokerinfo.networkproperties", FT_STRINGZ, BASE_NONE, NULL, 0x0, "Openwire BrokerInfo NetworkProperties", HFILL }}, |
1508 | | |
1509 | 16 | { &hf_openwire_connectioninfo_connectionid, |
1510 | 16 | { "ConnectionId", "openwire.connectioninfo.connectionid", FT_NONE, BASE_NONE, NULL, 0x0, "Openwire ConnectionInfo ConnectionId", HFILL }}, |
1511 | | |
1512 | 16 | { &hf_openwire_connectioninfo_clientid, |
1513 | 16 | { "ClientId", "openwire.connectioninfo.clientid", FT_STRINGZ, BASE_NONE, NULL, 0x0, "Openwire ConnectionInfo ClientId", HFILL }}, |
1514 | | |
1515 | 16 | { &hf_openwire_connectioninfo_password, |
1516 | 16 | { "Password", "openwire.connectioninfo.password", FT_STRINGZ, BASE_NONE, NULL, 0x0, "Openwire ConnectionInfo Password", HFILL }}, |
1517 | | |
1518 | 16 | { &hf_openwire_connectioninfo_username, |
1519 | 16 | { "UserName", "openwire.connectioninfo.username", FT_STRINGZ, BASE_NONE, NULL, 0x0, "Openwire ConnectionInfo UserName", HFILL }}, |
1520 | | |
1521 | 16 | { &hf_openwire_connectioninfo_brokerpath, |
1522 | 16 | { "BrokerPath", "openwire.connectioninfo.brokerpath", FT_BYTES, BASE_NONE, NULL, 0x0, "Openwire ConnectionInfo BrokerPath", HFILL }}, |
1523 | | |
1524 | 16 | { &hf_openwire_connectioninfo_brokermasterconnector, |
1525 | 16 | { "BrokerMasterConnector", "openwire.connectioninfo.brokermasterconnector", FT_UINT8, BASE_DEC, NULL, 0x0, "Openwire ConnectionInfo BrokerMasterConnector", HFILL }}, |
1526 | | |
1527 | 16 | { &hf_openwire_connectioninfo_manageable, |
1528 | 16 | { "Manageable", "openwire.connectioninfo.manageable", FT_UINT8, BASE_DEC, NULL, 0x0, "Openwire ConnectionInfo Manageable", HFILL }}, |
1529 | | |
1530 | 16 | { &hf_openwire_connectioninfo_clientmaster, |
1531 | 16 | { "ClientMaster", "openwire.connectioninfo.clientmaster", FT_UINT8, BASE_DEC, NULL, 0x0, "Openwire ConnectionInfo ClientMaster", HFILL }}, |
1532 | | |
1533 | 16 | { &hf_openwire_connectioninfo_faulttolerant, |
1534 | 16 | { "FaultTolerant", "openwire.connectioninfo.faulttolerant", FT_UINT8, BASE_DEC, NULL, 0x0, "Openwire ConnectionInfo FaultTolerant", HFILL }}, |
1535 | | |
1536 | 16 | { &hf_openwire_connectioninfo_failoverreconnect, |
1537 | 16 | { "FailoverReconnect", "openwire.connectioninfo.failoverreconnect", FT_UINT8, BASE_DEC, NULL, 0x0, "Openwire ConnectionInfo FailoverReconnect", HFILL } }, |
1538 | | |
1539 | 16 | { &hf_openwire_consumerinfo_consumerid, |
1540 | 16 | { "ConsumerId", "openwire.consumerinfo.consumerid", FT_NONE, BASE_NONE, NULL, 0x0, "Openwire ConsumerInfo ConsumerId", HFILL }}, |
1541 | | |
1542 | 16 | { &hf_openwire_consumerinfo_browser, |
1543 | 16 | { "Browser", "openwire.consumerinfo.browser", FT_UINT8, BASE_DEC, NULL, 0x0, "Openwire ConsumerInfo Browser", HFILL }}, |
1544 | | |
1545 | 16 | { &hf_openwire_consumerinfo_destination, |
1546 | 16 | { "Destination", "openwire.consumerinfo.destination", FT_NONE, BASE_NONE, NULL, 0x0, "Openwire ConsumerInfo Destination", HFILL }}, |
1547 | | |
1548 | 16 | { &hf_openwire_consumerinfo_prefetchsize, |
1549 | 16 | { "PrefetchSize", "openwire.consumerinfo.prefetchsize", FT_INT32, BASE_DEC, NULL, 0x0, "Openwire ConsumerInfo PrefetchSize", HFILL }}, |
1550 | | |
1551 | 16 | { &hf_openwire_consumerinfo_maximumpendingmessagelimit, |
1552 | 16 | { "MaximumPendingMessageLimit", "openwire.consumerinfo.maximumpendingmessagelimit", FT_INT32, BASE_DEC, NULL, 0x0, "Openwire ConsumerInfo MaximumPendingMessageLimit", HFILL }}, |
1553 | | |
1554 | 16 | { &hf_openwire_consumerinfo_dispatchasync, |
1555 | 16 | { "DispatchAsync", "openwire.consumerinfo.dispatchasync", FT_UINT8, BASE_DEC, NULL, 0x0, "Openwire ConsumerInfo DispatchAsync", HFILL }}, |
1556 | | |
1557 | 16 | { &hf_openwire_consumerinfo_selector, |
1558 | 16 | { "Selector", "openwire.consumerinfo.selector", FT_STRINGZ, BASE_NONE, NULL, 0x0, "Openwire ConsumerInfo Selector", HFILL }}, |
1559 | | |
1560 | 16 | { &hf_openwire_consumerinfo_subscriptionname, |
1561 | 16 | { "SubscriptionName", "openwire.consumerinfo.subscriptionname", FT_STRINGZ, BASE_NONE, NULL, 0x0, "Openwire ConsumerInfo SubscriptionName", HFILL }}, |
1562 | | |
1563 | 16 | { &hf_openwire_consumerinfo_nolocal, |
1564 | 16 | { "NoLocal", "openwire.consumerinfo.nolocal", FT_UINT8, BASE_DEC, NULL, 0x0, "Openwire ConsumerInfo NoLocal", HFILL }}, |
1565 | | |
1566 | 16 | { &hf_openwire_consumerinfo_exclusive, |
1567 | 16 | { "Exclusive", "openwire.consumerinfo.exclusive", FT_UINT8, BASE_DEC, NULL, 0x0, "Openwire ConsumerInfo Exclusive", HFILL }}, |
1568 | | |
1569 | 16 | { &hf_openwire_consumerinfo_retroactive, |
1570 | 16 | { "RetroActive", "openwire.consumerinfo.retroactive", FT_UINT8, BASE_DEC, NULL, 0x0, "Openwire ConsumerInfo RetroActive", HFILL }}, |
1571 | | |
1572 | 16 | { &hf_openwire_consumerinfo_priority, |
1573 | 16 | { "Priority", "openwire.consumerinfo.priority", FT_UINT8, BASE_DEC, NULL, 0x0, "Openwire ConsumerInfo Priority", HFILL }}, |
1574 | | |
1575 | 16 | { &hf_openwire_consumerinfo_brokerpath, |
1576 | 16 | { "BrokerPath", "openwire.consumerinfo.brokerpath", FT_NONE, BASE_NONE, NULL, 0x0, "Openwire ConsumerInfo BrokerPath", HFILL }}, |
1577 | | |
1578 | 16 | { &hf_openwire_consumerinfo_additionalpredicate, |
1579 | 16 | { "AdditionalPredicate", "openwire.consumerinfo.additionalpredicate", FT_NONE, BASE_NONE, NULL, 0x0, "Openwire ConsumerInfo AdditionalPredicate", HFILL }}, |
1580 | | |
1581 | 16 | { &hf_openwire_consumerinfo_networksubscription, |
1582 | 16 | { "NetworkSubscription", "openwire.consumerinfo.networksubscription", FT_UINT8, BASE_DEC, NULL, 0x0, "Openwire ConsumerInfo NetworkSubscription", HFILL }}, |
1583 | | |
1584 | 16 | { &hf_openwire_consumerinfo_optimizedacknowledge, |
1585 | 16 | { "OptimizedAcknowledge", "openwire.consumerinfo.optimizedacknowledge", FT_UINT8, BASE_DEC, NULL, 0x0, "Openwire ConsumerInfo OptimizedAcknowledge", HFILL }}, |
1586 | | |
1587 | 16 | { &hf_openwire_consumerinfo_norangeacks, |
1588 | 16 | { "NoRangeAcks", "openwire.consumerinfo.norangeacks", FT_UINT8, BASE_DEC, NULL, 0x0, "Openwire ConsumerInfo NoRangeAcks", HFILL }}, |
1589 | | |
1590 | 16 | { &hf_openwire_consumerinfo_networkconsumerpath, |
1591 | 16 | { "NetworkConsumerPath", "openwire.consumerinfo.networkconsumerpath", FT_NONE, BASE_NONE, NULL, 0x0, "Openwire ConsumerInfo NetworkConsumerPath", HFILL }}, |
1592 | | |
1593 | 16 | { &hf_openwire_consumercontrol_destination, |
1594 | 16 | { "Destination", "openwire.consumercontrol.destination", FT_NONE, BASE_NONE, NULL, 0x0, "Openwire ConsumerControl Destination", HFILL }}, |
1595 | | |
1596 | 16 | { &hf_openwire_consumercontrol_close, |
1597 | 16 | { "Close", "openwire.consumercontrol.close", FT_UINT8, BASE_DEC, NULL, 0x0, "Openwire ConsumerControl Close", HFILL }}, |
1598 | | |
1599 | 16 | { &hf_openwire_consumercontrol_consumerid, |
1600 | 16 | { "ConsumerId", "openwire.consumercontrol.consumerid", FT_NONE, BASE_NONE, NULL, 0x0, "Openwire ConsumerControl ConsumerId", HFILL }}, |
1601 | | |
1602 | 16 | { &hf_openwire_consumercontrol_prefetch, |
1603 | 16 | { "Prefetch", "openwire.consumercontrol.prefetch", FT_INT32, BASE_DEC, NULL, 0x0, "Openwire ConsumerControl Prefetch", HFILL }}, |
1604 | | |
1605 | 16 | { &hf_openwire_consumercontrol_flush, |
1606 | 16 | { "Flush", "openwire.consumercontrol.flush", FT_UINT8, BASE_DEC, NULL, 0x0, "Openwire ConsumerControl Flush", HFILL }}, |
1607 | | |
1608 | 16 | { &hf_openwire_consumercontrol_start, |
1609 | 16 | { "Start", "openwire.consumercontrol.start", FT_UINT8, BASE_DEC, NULL, 0x0, "Openwire ConsumerControl Start", HFILL }}, |
1610 | | |
1611 | 16 | { &hf_openwire_consumercontrol_stop, |
1612 | 16 | { "Stop", "openwire.consumercontrol.stop", FT_UINT8, BASE_DEC, NULL, 0x0, "Openwire ConsumerControl Stop", HFILL }}, |
1613 | | |
1614 | 16 | { &hf_openwire_connectioncontrol_close, |
1615 | 16 | { "Close", "openwire.connectioncontrol.close", FT_UINT8, BASE_DEC, NULL, 0x0, "Openwire ConnectionControl Close", HFILL }}, |
1616 | | |
1617 | 16 | { &hf_openwire_connectioncontrol_exit, |
1618 | 16 | { "Exit", "openwire.connectioncontrol.exit", FT_UINT8, BASE_DEC, NULL, 0x0, "Openwire ConnectionControl Exit", HFILL }}, |
1619 | | |
1620 | 16 | { &hf_openwire_connectioncontrol_faulttolerant, |
1621 | 16 | { "FaultTolerant", "openwire.connectioncontrol.faulttolerant", FT_UINT8, BASE_DEC, NULL, 0x0, "Openwire ConnectionControl FaultTolerant", HFILL }}, |
1622 | | |
1623 | 16 | { &hf_openwire_connectioncontrol_resume, |
1624 | 16 | { "Resume", "openwire.connectioncontrol.resume", FT_UINT8, BASE_DEC, NULL, 0x0, "Openwire ConnectionControl Resume", HFILL }}, |
1625 | | |
1626 | 16 | { &hf_openwire_connectioncontrol_suspend, |
1627 | 16 | { "Suspend", "openwire.connectioncontrol.suspend", FT_UINT8, BASE_DEC, NULL, 0x0, "Openwire ConnectionControl Suspend", HFILL }}, |
1628 | | |
1629 | 16 | { &hf_openwire_connectioncontrol_connectedbrokers, |
1630 | 16 | { "ConnectedBrokers", "openwire.connectioncontrol.connectedbrokers", FT_STRINGZ, BASE_NONE, NULL, 0x0, "Openwire ConnectionControl ConnectedBrokers", HFILL }}, |
1631 | | |
1632 | 16 | { &hf_openwire_connectioncontrol_reconnectto, |
1633 | 16 | { "ReconnectTo", "openwire.connectioncontrol.reconnectto", FT_STRINGZ, BASE_NONE, NULL, 0x0, "Openwire ConnectionControl ReconnectTo", HFILL }}, |
1634 | | |
1635 | 16 | { &hf_openwire_connectioncontrol_rebalanceconnection, |
1636 | 16 | { "RebalanceConnection", "openwire.connectioncontrol.rebalanceconnection", FT_UINT8, BASE_DEC, NULL, 0x0, "Openwire ConnectionControl RebalanceConnection", HFILL }}, |
1637 | | |
1638 | 16 | { &hf_openwire_removeinfo_objectid, |
1639 | 16 | { "ObjectId", "openwire.removeinfo.objectid", FT_NONE, BASE_NONE, NULL, 0x0, "Openwire RemoveInfo ObjectId", HFILL }}, |
1640 | | |
1641 | 16 | { &hf_openwire_removeinfo_lastdeliveredsequenceid, |
1642 | 16 | { "LastDeliveredSequenceId", "openwire.removeinfo.lastdeliveredsequenceid", FT_INT64, BASE_DEC, NULL, 0x0, "Openwire RemoveInfo LastDeliveredSequenceId" , HFILL }}, |
1643 | | |
1644 | 16 | { &hf_openwire_removesubscriptioninfo_connectionid, |
1645 | 16 | { "ConnectionId", "openwire.removesubscriptioninfo.connectionid", FT_NONE, BASE_NONE, NULL, 0x0, "Openwire RemoveSubscriptionInfo ConnectionId", HFILL } }, |
1646 | | |
1647 | 16 | { &hf_openwire_removesubscriptioninfo_subscriptionname, |
1648 | 16 | { "SubscriptionName", "openwire.removesubscriptioninfo.subscriptionname", FT_STRINGZ, BASE_NONE, NULL, 0x0, "Openwire RemoveSubscriptionInfo SubscriptionName", HFILL }}, |
1649 | | |
1650 | 16 | { &hf_openwire_removesubscriptioninfo_clientid, |
1651 | 16 | { "ClientId", "openwire.removesubscriptioninfo.clientid", FT_STRINGZ, BASE_NONE, NULL, 0x0, "Openwire RemoveSubscriptionInfo ClientId", HFILL }}, |
1652 | | |
1653 | 16 | { &hf_openwire_producerinfo_producerid, |
1654 | 16 | { "ProducerId", "openwire.producerinfo.producerid", FT_NONE, BASE_NONE, NULL, 0x0, "Openwire ProducerInfo ProducerId", HFILL }}, |
1655 | | |
1656 | 16 | { &hf_openwire_producerinfo_destination, |
1657 | 16 | { "Destination", "openwire.producerinfo.destination", FT_NONE, BASE_NONE, NULL, 0x0, "Openwire ProducerInfo Destination", HFILL }}, |
1658 | | |
1659 | 16 | { &hf_openwire_producerinfo_brokerpath, |
1660 | 16 | { "BrokerPath", "openwire.producerinfo.brokerpath", FT_NONE, BASE_NONE, NULL, 0x0, "Openwire ProducerInfo BrokerPath", HFILL }}, |
1661 | | |
1662 | 16 | { &hf_openwire_producerinfo_dispatchasync, |
1663 | 16 | { "DispatchAsync", "openwire.producerinfo.dispatchasync", FT_UINT8, BASE_DEC, NULL, 0x0, "Openwire ProducerInfo DispatchAsync", HFILL }}, |
1664 | | |
1665 | 16 | { &hf_openwire_producerinfo_windowsize, |
1666 | 16 | { "WindowSize", "openwire.producerinfo.windowsize", FT_INT32, BASE_DEC, NULL, 0x0, "Openwire ProducerInfo WindowSize", HFILL }}, |
1667 | | |
1668 | 16 | { &hf_openwire_transactioninfo_connectionid, |
1669 | 16 | { "ConnectionId", "openwire.transactioninfo.connectionid", FT_NONE, BASE_NONE, NULL, 0x0, "Openwire TransactionInfo ConnectionId", HFILL }}, |
1670 | | |
1671 | 16 | { &hf_openwire_transactioninfo_transactionid, |
1672 | 16 | { "TransactionId", "openwire.transactioninfo.transactionid", FT_NONE, BASE_NONE, NULL, 0x0, "Openwire TransactionInfo TransactionId", HFILL }}, |
1673 | | |
1674 | 16 | { &hf_openwire_transactioninfo_type, |
1675 | 16 | { "Type", "openwire.transactioninfo.type", FT_UINT8, BASE_DEC, VALS(openwire_transaction_type_vals), 0x0, "Openwire TransactionInfo Type", HFILL }}, |
1676 | | |
1677 | 16 | { &hf_openwire_producerack_producerid, |
1678 | 16 | { "ProducerId", "openwire.producerack.producerid", FT_NONE, BASE_NONE, NULL, 0x0, "Openwire ProducerAck ProducerId", HFILL }}, |
1679 | | |
1680 | 16 | { &hf_openwire_producerack_size, |
1681 | 16 | { "Size", "openwire.producerack.size", FT_INT32, BASE_DEC, NULL, 0x0, "Openwire ProducerAck Size", HFILL }}, |
1682 | | |
1683 | 16 | { &hf_openwire_messagedispatch_consumerid, |
1684 | 16 | { "ConsumerId", "openwire.messagedispatch.consumerid", FT_NONE, BASE_NONE, NULL, 0x0, "Openwire MessageDispatch ConsumerId", HFILL }}, |
1685 | | |
1686 | 16 | { &hf_openwire_messagedispatch_destination, |
1687 | 16 | { "Destination", "openwire.messagedispatch.destination", FT_NONE, BASE_NONE, NULL, 0x0, "Openwire MessageDispatch Destination", HFILL }}, |
1688 | | |
1689 | 16 | { &hf_openwire_messagedispatch_message, |
1690 | 16 | { "Message", "openwire.messagedispatch.message", FT_NONE, BASE_NONE, NULL, 0x0, "Openwire MessageDispatch Message", HFILL }}, |
1691 | | |
1692 | 16 | { &hf_openwire_messagedispatch_redeliverycounter, |
1693 | 16 | { "RedeliveryCounter", "openwire.messagedispatch.redeliverycounter", FT_INT32, BASE_DEC, NULL, 0x0, "Openwire MessageDispatch RedeliveryCounter", HFILL }}, |
1694 | | |
1695 | 16 | { &hf_openwire_messageack_destination, |
1696 | 16 | { "Destination", "openwire.messageack.destination", FT_NONE, BASE_NONE, NULL, 0x0, "Openwire MessageAck Destination", HFILL }}, |
1697 | | |
1698 | 16 | { &hf_openwire_messageack_transactionid, |
1699 | 16 | { "TransactionId", "openwire.messageack.transactionid", FT_NONE, BASE_NONE, NULL, 0x0, "Openwire MessageAck TransactionId", HFILL }}, |
1700 | | |
1701 | 16 | { &hf_openwire_messageack_consumerid, |
1702 | 16 | { "ConsumerId", "openwire.messageack.consumerid", FT_NONE, BASE_NONE, NULL, 0x0, "Openwire MessageAck ConsumerId", HFILL }}, |
1703 | | |
1704 | 16 | { &hf_openwire_messageack_acktype, |
1705 | 16 | { "AckType", "openwire.messageack.acktype", FT_UINT8, BASE_DEC, VALS(openwire_message_ack_type_vals), 0x0, "Openwire MessageAck AckType", HFILL }}, |
1706 | | |
1707 | 16 | { &hf_openwire_messageack_firstmessageid, |
1708 | 16 | { "FirstMessageId", "openwire.messageack.firstmessageid", FT_NONE, BASE_NONE, NULL, 0x0, "Openwire MessageAck FirstMessageId", HFILL }}, |
1709 | | |
1710 | 16 | { &hf_openwire_messageack_lastmessageid, |
1711 | 16 | { "LastMessageId", "openwire.messageack.lastmessageid", FT_NONE, BASE_NONE, NULL, 0x0, "Openwire MessageAck LastMessageId", HFILL }}, |
1712 | | |
1713 | 16 | { &hf_openwire_messageack_messagecount, |
1714 | 16 | { "MessageCount", "openwire.messageack.messagecount", FT_INT32, BASE_DEC, NULL, 0x0, "Openwire MessageAck MessageCount", HFILL }}, |
1715 | | |
1716 | 16 | { &hf_openwire_messagepull_consumerid, |
1717 | 16 | { "ConsumerId", "openwire.messagepull.consumerid", FT_NONE, BASE_NONE, NULL, 0x0, "Openwire MessagePull ConsumerId", HFILL }}, |
1718 | | |
1719 | 16 | { &hf_openwire_messagepull_destinationid, |
1720 | 16 | { "DestinationId", "openwire.messagepull.destinationid", FT_NONE, BASE_NONE, NULL, 0x0, "Openwire MessagePull DestinationId", HFILL }}, |
1721 | | |
1722 | 16 | { &hf_openwire_messagepull_timeout, |
1723 | 16 | { "Timeout", "openwire.messagepull.timeout", FT_INT64, BASE_DEC, NULL, 0x0, "Openwire MessagePull Timeout", HFILL }}, |
1724 | | |
1725 | 16 | { &hf_openwire_messagepull_correlationid, |
1726 | 16 | { "CorrelationId", "openwire.messagepull.correlationid", FT_STRINGZ, BASE_NONE, NULL, 0x0, "Openwire MessagePull CorrelationId", HFILL }}, |
1727 | | |
1728 | 16 | { &hf_openwire_messagepull_messageid, |
1729 | 16 | { "MessageId", "openwire.messagepull.messageid", FT_NONE, BASE_NONE, NULL, 0x0, "Openwire MessagePull MessageId", HFILL }}, |
1730 | | |
1731 | 16 | { &hf_openwire_message_producerid, |
1732 | 16 | { "ProducerId", "openwire.message.producerid", FT_NONE, BASE_NONE, NULL, 0x0, "Openwire message ProducerID", HFILL }}, |
1733 | | |
1734 | 16 | { &hf_openwire_message_destination, |
1735 | 16 | { "Destination", "openwire.message.destination", FT_NONE, BASE_NONE, NULL, 0x0, "Openwire message Destination", HFILL }}, |
1736 | | |
1737 | 16 | { &hf_openwire_message_transactionid, |
1738 | 16 | { "TransactionId", "openwire.message.transactionid", FT_NONE, BASE_NONE, NULL, 0x0, "Openwire message TransactionId", HFILL }}, |
1739 | | |
1740 | 16 | { &hf_openwire_message_originaldestination, |
1741 | 16 | { "OriginalDestination", "openwire.message.originaldestination", FT_NONE, BASE_NONE, NULL, 0x0, "Openwire message OriginalDestination", HFILL }}, |
1742 | | |
1743 | 16 | { &hf_openwire_message_messageid, |
1744 | 16 | { "MessageId", "openwire.message.messageid", FT_NONE, BASE_NONE, NULL, 0x0, "Openwire message MessageId", HFILL }}, |
1745 | | |
1746 | 16 | { &hf_openwire_message_originaldestinationid, |
1747 | 16 | { "OriginalDestinationId", "openwire.message.originaldestinationid", FT_NONE, BASE_NONE, NULL, 0x0, "Openwire message OriginalDestinationId", HFILL }}, |
1748 | | |
1749 | 16 | { &hf_openwire_message_groupid, |
1750 | 16 | { "GroupID", "openwire.message.groupid", FT_STRINGZ, BASE_NONE, NULL, 0x0, "Openwire message GroupID", HFILL }}, |
1751 | | |
1752 | 16 | { &hf_openwire_message_groupsequence, |
1753 | 16 | { "GroupSequence", "openwire.message.groupsequence", FT_INT32, BASE_DEC, NULL, 0x0, "Openwire message GroupSequence", HFILL }}, |
1754 | | |
1755 | 16 | { &hf_openwire_message_correlationid, |
1756 | 16 | { "CorrelationId", "openwire.message.correlationid", FT_STRINGZ, BASE_NONE, NULL, 0x0, "Openwire message CorrelationID", HFILL }}, |
1757 | | |
1758 | 16 | { &hf_openwire_message_persistent, |
1759 | 16 | { "Persistent", "openwire.message.persistent", FT_UINT8, BASE_DEC, NULL, 0x0, "Openwire message Persistent", HFILL }}, |
1760 | | |
1761 | 16 | { &hf_openwire_message_expiration, |
1762 | 16 | { "Expiration", "openwire.message.expiration", FT_INT64, BASE_DEC, NULL, 0x0, "Openwire message Expiration", HFILL }}, |
1763 | | |
1764 | 16 | { &hf_openwire_message_priority, |
1765 | 16 | { "Priority", "openwire.message.priority", FT_UINT8, BASE_DEC, NULL, 0x0, "Openwire message Priority", HFILL }}, |
1766 | | |
1767 | 16 | { &hf_openwire_message_replyto, |
1768 | 16 | { "ReplyTo", "openwire.message.replyto", FT_NONE, BASE_NONE, NULL, 0x0, "Openwire message ReplyTo", HFILL }}, |
1769 | | |
1770 | 16 | { &hf_openwire_message_timestamp, |
1771 | 16 | { "Timestamp", "openwire.message.timestamp", FT_INT64, BASE_DEC, NULL, 0x0, "Openwire message Timestamp", HFILL }}, |
1772 | | |
1773 | 16 | { &hf_openwire_message_type, |
1774 | 16 | { "Type", "openwire.message.type", FT_STRINGZ, BASE_NONE, NULL, 0x0, "Openwire message Type", HFILL }}, |
1775 | | |
1776 | 16 | { &hf_openwire_message_body, |
1777 | 16 | { "Body", "openwire.message.body", FT_BYTES, BASE_NONE, NULL, 0x0, "Openwire message Body", HFILL }}, |
1778 | | |
1779 | 16 | { &hf_openwire_message_properties, |
1780 | 16 | { "Properties", "openwire.message.properties", FT_BYTES, BASE_NONE, NULL, 0x0, "Openwire message Properties", HFILL }}, |
1781 | | |
1782 | 16 | { &hf_openwire_message_datastructure, |
1783 | 16 | { "DataStructure", "openwire.message.datastructure", FT_NONE, BASE_NONE, NULL, 0x0, "Openwire message DataStructure", HFILL }}, |
1784 | | |
1785 | 16 | { &hf_openwire_message_targetconsumerid, |
1786 | 16 | { "TargetConsumerId", "openwire.message.targetconsumerid", FT_NONE, BASE_NONE, NULL, 0x0, "Openwire message TargetConsumerId", HFILL }}, |
1787 | | |
1788 | 16 | { &hf_openwire_message_compressed, |
1789 | 16 | { "Compressed", "openwire.message.compressed", FT_UINT8, BASE_DEC, NULL, 0x0, "Openwire message Compressed", HFILL }}, |
1790 | | |
1791 | 16 | { &hf_openwire_message_redeliverycount, |
1792 | 16 | { "RedeliveryCount", "openwire.message.redeliverycount", FT_INT32, BASE_DEC, NULL, 0x0, "Openwire message RedeliveryCount", HFILL }}, |
1793 | | |
1794 | 16 | { &hf_openwire_message_brokerpath, |
1795 | 16 | { "BrokerPath", "openwire.message.brokerpath", FT_NONE, BASE_NONE, NULL, 0x0, "Openwire message BrokerPath", HFILL }}, |
1796 | | |
1797 | 16 | { &hf_openwire_message_arrival, |
1798 | 16 | { "Arrival", "openwire.message.arrival", FT_INT64, BASE_DEC, NULL, 0x0, "Openwire message Arrival", HFILL }}, |
1799 | | |
1800 | 16 | { &hf_openwire_message_userid, |
1801 | 16 | { "UserID", "openwire.message.userid", FT_STRINGZ, BASE_NONE, NULL, 0x0, "Openwire message UserID", HFILL }}, |
1802 | | |
1803 | 16 | { &hf_openwire_message_receivedbydfbridge, |
1804 | 16 | { "ReceivedByDFBridge", "openwire.message.receivedbydfbridge", FT_UINT8, BASE_DEC, NULL, 0x0, "Openwire message ReceivedByDFBridge", HFILL }}, |
1805 | | |
1806 | 16 | { &hf_openwire_message_droppable, |
1807 | 16 | { "Droppable", "openwire.message.droppable", FT_UINT8, BASE_DEC, NULL, 0x0, "Openwire message Droppable", HFILL }}, |
1808 | | |
1809 | 16 | { &hf_openwire_message_cluster, |
1810 | 16 | { "Cluster", "openwire.message.cluster", FT_NONE, BASE_NONE, NULL, 0x0, "Openwire message Cluster", HFILL }}, |
1811 | | |
1812 | 16 | { &hf_openwire_message_brokerintime, |
1813 | 16 | { "BrokerInTime", "openwire.message.brokerintime", FT_INT64, BASE_DEC, NULL, 0x0, "Openwire message BrokerInTime", HFILL }}, |
1814 | | |
1815 | 16 | { &hf_openwire_message_brokerouttime, |
1816 | 16 | { "BrokerOutTime", "openwire.message.brokerouttime", FT_INT64, BASE_DEC, NULL, 0x0, "Openwire message BrokerOutTime", HFILL }}, |
1817 | | |
1818 | 16 | { &hf_openwire_producerid_connectionid, |
1819 | 16 | { "ConnectionId", "openwire.producerid.connectionid", FT_STRINGZ, BASE_NONE, NULL, 0x0, "Openwire ProducerId ConnectionId", HFILL }}, |
1820 | | |
1821 | 16 | { &hf_openwire_producerid_value, |
1822 | 16 | { "Value", "openwire.producerid.value", FT_INT64, BASE_DEC, NULL, 0x0, "Openwire ProducerId Value", HFILL }}, |
1823 | | |
1824 | 16 | { &hf_openwire_producerid_sessionid, |
1825 | 16 | { "SessionId", "openwire.producerid.sessionid", FT_INT64, BASE_DEC, NULL, 0x0, "Openwire ProducerId SessionId", HFILL }}, |
1826 | | |
1827 | 16 | { &hf_openwire_consumerid_connectionid, |
1828 | 16 | { "ConnectionId", "openwire.consumerid.connectionid", FT_STRINGZ, BASE_NONE, NULL, 0x0, "Openwire ConsumerId ConnectionId", HFILL }}, |
1829 | | |
1830 | 16 | { &hf_openwire_consumerid_value, |
1831 | 16 | { "Value", "openwire.consumerid.value", FT_INT64, BASE_DEC, NULL, 0x0, "Openwire ConsumerId Value", HFILL }}, |
1832 | | |
1833 | 16 | { &hf_openwire_consumerid_sessionid, |
1834 | 16 | { "SessionId", "openwire.consumerid.sessionid", FT_INT64, BASE_DEC, NULL, 0x0, "Openwire ConsumerId SessionId", HFILL }}, |
1835 | | |
1836 | 16 | { &hf_openwire_destination_name, |
1837 | 16 | { "Name", "openwire.destination.name", FT_STRINGZ, BASE_NONE, NULL, 0x0, "Openwire Destination Name", HFILL }}, |
1838 | | |
1839 | 16 | { &hf_openwire_messageid_producerid, |
1840 | 16 | { "ProducerId", "openwire.messageid.producerid", FT_NONE, BASE_NONE, NULL, 0x0, "Openwire MessageId ProducerId", HFILL }}, |
1841 | | |
1842 | 16 | { &hf_openwire_messageid_producersequenceid, |
1843 | 16 | { "ProducerSequenceId", "openwire.messageid.producersequenceid", FT_INT64, BASE_DEC, NULL, 0x0, "Openwire MessageId ProducerSequenceId", HFILL }}, |
1844 | | |
1845 | 16 | { &hf_openwire_messageid_brokersequenceid, |
1846 | 16 | { "BrokerSequenceId", "openwire.messageid.brokersequenceid", FT_INT64, BASE_DEC, NULL, 0x0, "Openwire MessageId BrokerSequenceId", HFILL }}, |
1847 | | |
1848 | 16 | { &hf_openwire_connectionid_value, |
1849 | 16 | { "Value", "openwire.connectionid.value", FT_STRINGZ, BASE_NONE, NULL, 0x0, "Openwire ConnectionId Value", HFILL }}, |
1850 | | |
1851 | 16 | { &hf_openwire_sessionid_connectionid, |
1852 | 16 | { "ConnectionId", "openwire.sessionid.connectionid", FT_STRINGZ, BASE_NONE, NULL, 0x0, "Openwire SessionId ConnectionId", HFILL }}, |
1853 | | |
1854 | 16 | { &hf_openwire_sessionid_value, |
1855 | 16 | { "Value", "openwire.sessionid.value", FT_INT64, BASE_DEC, NULL, 0x0, "Openwire SessionId Value", HFILL }}, |
1856 | | |
1857 | 16 | { &hf_openwire_brokerid_value, |
1858 | 16 | { "Value", "openwire.brokerid.value", FT_STRINGZ, BASE_NONE, NULL, 0x0, "Openwire BrokerId Value", HFILL }}, |
1859 | | |
1860 | 16 | { &hf_openwire_localtransactionid_value, |
1861 | 16 | { "Value", "openwire.localtransactionid.value", FT_INT64, BASE_DEC, NULL, 0x0, "Openwire LocalTransactionId Value", HFILL }}, |
1862 | | |
1863 | 16 | { &hf_openwire_localtransactionid_connectionid, |
1864 | 16 | { "ConnectionId", "openwire.localtransactionid.connectionid", FT_NONE, BASE_NONE, NULL, 0x0, "Openwire LocalTransactionId ConnecctionId", HFILL }}, |
1865 | | |
1866 | 16 | { &hf_openwire_xatransactionid_formatid, |
1867 | 16 | { "FormatId", "openwire.xatransactionid.formatid", FT_INT32, BASE_DEC, NULL, 0x0, "Openwire XATransactionId FormatId", HFILL }}, |
1868 | | |
1869 | 16 | { &hf_openwire_xatransactionid_globaltransactionid, |
1870 | 16 | { "GlobalTransactionId", "openwire.xatransactionid.globaltransactionid", FT_STRINGZ, BASE_NONE, NULL, 0x0, "Openwire XATransactionId GlobalTransactionId", HFILL }}, |
1871 | | |
1872 | 16 | { &hf_openwire_xatransactionid_branchqualifier, |
1873 | 16 | { "BranchQualifier", "openwire.xatransactionid.branchqualifier", FT_STRINGZ, BASE_NONE, NULL, 0x0, "Openwire XATransactionId BranchQualifier", HFILL }}, |
1874 | | |
1875 | 16 | { &hf_openwire_none, |
1876 | 16 | { "Generic field", "openwire.generic", FT_BYTES, BASE_NONE, NULL, 0x0, "Openwire integer type", HFILL }}, |
1877 | | |
1878 | 16 | { &hf_openwire_map_length, |
1879 | 16 | { "Length", "openwire.map.length", FT_INT32, BASE_DEC, NULL, 0x0, "Openwire map length", HFILL }}, |
1880 | | |
1881 | 16 | { &hf_openwire_map_key, |
1882 | 16 | { "Key", "openwire.map.key", FT_STRINGZ, BASE_NONE, NULL, 0x0, "Openwire map Key", HFILL }}, |
1883 | | |
1884 | 16 | { &hf_openwire_map_entry, |
1885 | 16 | { "Entry", "openwire.map.entry", FT_NONE, BASE_NONE, NULL, 0x0, "Openwire map Entry", HFILL }}, |
1886 | | |
1887 | 16 | { &hf_openwire_throwable_class, |
1888 | 16 | { "Class", "openwire.throwable.class", FT_STRINGZ, BASE_NONE, NULL, 0x0, "Openwire Throwable Class", HFILL }}, |
1889 | | |
1890 | 16 | { &hf_openwire_throwable_message, |
1891 | 16 | { "Message", "openwire.throwable.message", FT_STRINGZ, BASE_NONE, NULL, 0x0, "Openwire Throwable Message", HFILL }}, |
1892 | | |
1893 | 16 | { &hf_openwire_throwable_element, |
1894 | 16 | { "Element", "openwire.throwable.element", FT_NONE, BASE_NONE, NULL, 0x0, "Openwire Throwable Element", HFILL }}, |
1895 | | |
1896 | 16 | { &hf_openwire_throwable_classname, |
1897 | 16 | { "ClassName", "openwire.throwable.classname", FT_STRINGZ, BASE_NONE, NULL, 0x0, "Openwire Throwable ClassName", HFILL }}, |
1898 | | |
1899 | 16 | { &hf_openwire_throwable_methodname, |
1900 | 16 | { "MethodName", "openwire.throwable.methodname", FT_STRINGZ, BASE_NONE, NULL, 0x0, "Openwire Throwable MethodName", HFILL }}, |
1901 | | |
1902 | 16 | { &hf_openwire_throwable_filename, |
1903 | 16 | { "FileName", "openwire.throwable.filename", FT_STRINGZ, BASE_NONE, NULL, 0x0, "Openwire Throwable FileName", HFILL }}, |
1904 | | |
1905 | 16 | { &hf_openwire_throwable_linenumber, |
1906 | 16 | { "LineNumber", "openwire.throwable.linenumber", FT_UINT32, BASE_DEC, NULL, 0x0, "Openwire Throwable LineNumber", HFILL }}, |
1907 | | |
1908 | 16 | { &hf_openwire_type_integer, |
1909 | 16 | { "Integer", "openwire.type.integer", FT_INT32, BASE_DEC, NULL, 0x0, "Openwire Integer type", HFILL }}, |
1910 | | |
1911 | 16 | { &hf_openwire_type_short, |
1912 | 16 | { "Short", "openwire.type.short", FT_INT32, BASE_DEC, NULL, 0x0, "Openwire Short type", HFILL }}, |
1913 | | |
1914 | 16 | { &hf_openwire_type_string, |
1915 | 16 | { "String", "openwire.type.string", FT_STRINGZ, BASE_NONE, NULL, 0x0, "Openwire String type", HFILL }}, |
1916 | | |
1917 | 16 | { &hf_openwire_type_bytes, |
1918 | 16 | { "Bytes", "openwire.type.bytes", FT_BYTES, BASE_NONE, NULL, 0x0, "Openwire Bytes type", HFILL }}, |
1919 | | |
1920 | 16 | { &hf_openwire_type_boolean, |
1921 | 16 | { "Boolean", "openwire.type.boolean", FT_UINT8, BASE_DEC, NULL, 0x0, "Openwire Boolean type", HFILL }}, |
1922 | | |
1923 | 16 | { &hf_openwire_type_byte, |
1924 | 16 | { "Byte", "openwire.type.byte", FT_UINT8, BASE_DEC, NULL, 0x0, "Openwire Byte type", HFILL }}, |
1925 | | |
1926 | 16 | { &hf_openwire_type_char, |
1927 | 16 | { "Char", "openwire.type.char", FT_UINT16, BASE_DEC, NULL, 0x0, "Openwire Char type", HFILL }}, |
1928 | | |
1929 | 16 | { &hf_openwire_type_long, |
1930 | 16 | { "Long", "openwire.type.long", FT_INT64, BASE_DEC, NULL, 0x0, "Openwire Cong type", HFILL }}, |
1931 | | |
1932 | 16 | { &hf_openwire_type_float, |
1933 | 16 | { "Float", "openwire.type.float", FT_FLOAT, BASE_NONE, NULL, 0x0, "Openwire Float type", HFILL }}, |
1934 | | |
1935 | 16 | { &hf_openwire_type_double, |
1936 | 16 | { "Double", "openwire.type.double", FT_DOUBLE, BASE_NONE, NULL, 0x0, "Openwire Double type", HFILL }}, |
1937 | | |
1938 | 16 | { &hf_openwire_type_notnull, |
1939 | 16 | { "NotNull", "openwire.type.notnull", FT_UINT8, BASE_DEC, NULL, 0x0, "Openwire NotNull type", HFILL }}, |
1940 | | |
1941 | 16 | { &hf_openwire_cached_inlined, |
1942 | 16 | { "Inlined", "openwire.cached.inlined", FT_UINT8, BASE_DEC, NULL, 0x0, "Openwire Cached Inlined", HFILL }}, |
1943 | | |
1944 | 16 | { &hf_openwire_cached_id, |
1945 | 16 | { "CachedID", "openwire.cached.id", FT_UINT16, BASE_DEC, NULL, 0x0, "Openwire Cached ID", HFILL }}, |
1946 | | |
1947 | 16 | { &hf_openwire_cached_enabled, |
1948 | 16 | { "CachedEnabled", "openwire.cached.enabled", FT_BOOLEAN, BASE_NONE, NULL, 0x0, "Openwire Cached Enabled", HFILL }}, |
1949 | | |
1950 | 16 | { &hf_openwire_type_object, |
1951 | 16 | { "Object", "openwire.type.object", FT_NONE, BASE_NONE, NULL, 0x0, "Openwire object", HFILL }}, |
1952 | | |
1953 | 16 | { &hf_openwire_type, |
1954 | 16 | { "Type", "openwire.type", FT_UINT8, BASE_DEC, VALS(openwire_type_vals), 0x0, "Openwire type", HFILL }} |
1955 | | |
1956 | 16 | }; |
1957 | 16 | static int *ett[] = { |
1958 | 16 | &ett_openwire, |
1959 | 16 | &ett_openwire_type |
1960 | 16 | }; |
1961 | | |
1962 | 16 | static ei_register_info ei[] = { |
1963 | 16 | { &ei_openwire_encoding_not_supported, { "openwire.encoding_not_supported", PI_PROTOCOL, PI_WARN, "OpenWire encoding not supported by Wireshark or dissector bug", EXPFILL }}, |
1964 | 16 | { &ei_openwire_body_type_not_supported, { "openwire.body_type_not_supported", PI_UNDECODED, PI_NOTE, "OpenWire body type not supported by Wireshark", EXPFILL }}, |
1965 | 16 | { &ei_openwire_type_not_supported, { "openwire.type.not_supported", PI_UNDECODED, PI_NOTE, "OpenWire type not supported by Wireshark", EXPFILL }}, |
1966 | 16 | { &ei_openwire_command_not_supported, { "openwire.command.not_supported", PI_UNDECODED, PI_NOTE, "OpenWire command not supported by Wireshark", EXPFILL }}, |
1967 | 16 | { &ei_openwire_tight_encoding_not_supported, { "openwire.tight_encoding_not_supported", PI_UNDECODED, PI_NOTE, "OpenWire tight encoding not supported by Wireshark", EXPFILL }}, |
1968 | 16 | }; |
1969 | | |
1970 | 16 | module_t *openwire_module; |
1971 | 16 | expert_module_t* expert_openwire; |
1972 | | |
1973 | 16 | proto_openwire = proto_register_protocol("OpenWire", "OpenWire", "openwire"); |
1974 | 16 | proto_register_field_array(proto_openwire, hf, array_length(hf)); |
1975 | 16 | proto_register_subtree_array(ett, array_length(ett)); |
1976 | 16 | expert_openwire = expert_register_protocol(proto_openwire); |
1977 | 16 | expert_register_field_array(expert_openwire, ei, array_length(ei)); |
1978 | | |
1979 | 16 | openwire_tcp_handle = register_dissector("openwire", dissect_openwire_tcp, proto_openwire); |
1980 | | |
1981 | 16 | openwire_module = prefs_register_protocol(proto_openwire, NULL); |
1982 | 16 | prefs_register_bool_preference(openwire_module, "desegment", |
1983 | 16 | "Reassemble Openwire messages spanning multiple TCP segments", |
1984 | 16 | "Whether the Openwire dissector should reassemble messages spanning multiple TCP segments." |
1985 | 16 | " To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.", |
1986 | 16 | &openwire_desegment); |
1987 | 16 | prefs_register_bool_preference(openwire_module, "verbose_type", |
1988 | 16 | "Show verbose type information", |
1989 | 16 | "Whether verbose type and length information are displayed in the protocol tree", |
1990 | 16 | &openwire_verbose_type); |
1991 | 16 | } |
1992 | | |
1993 | | void |
1994 | | proto_reg_handoff_openwire(void) |
1995 | 16 | { |
1996 | 16 | heur_dissector_add("tcp", dissect_openwire_heur, "OpenWire over TCP", "openwire_tcp", proto_openwire, HEURISTIC_ENABLE); |
1997 | 16 | dissector_add_for_decode_as_with_preference("tcp.port", openwire_tcp_handle); |
1998 | 16 | } |
1999 | | |
2000 | | /* |
2001 | | * Editor modelines - https://www.wireshark.org/tools/modelines.html |
2002 | | * |
2003 | | * Local variables: |
2004 | | * c-basic-offset: 4 |
2005 | | * tab-width: 8 |
2006 | | * indent-tabs-mode: nil |
2007 | | * End: |
2008 | | * |
2009 | | * vi: set shiftwidth=4 tabstop=8 expandtab: |
2010 | | * :indentSize=4:tabSize=8:noTabs=true: |
2011 | | */ |