3 * AMQP 0-9, 0-9-1, 0-10 and AMQP 1.0 Wireshark dissector
5 * Author: Martin Sustrik <sustrik@imatix.com> (AMQP 0-9)
6 * Author: Steve Huston <shuston@riverace.com> (extended for AMQP 0-10)
7 * Author: Pavel Moravec <pmoravec@redhat.com> (extended for AMQP 1.0)
9 * Copyright (c) 1996-2007 iMatix Corporation
11 * Wireshark - Network traffic analyzer
12 * By Gerald Combs <gerald@wireshark.org>
13 * Copyright 1998 Gerald Combs
15 * SPDX-License-Identifier: GPL-2.0-or-later
20 * http://www.amqp.org/resources/download
21 * http://www.rabbitmq.com/protocol.html
23 * for specifications for various versions of the AMQP protocol.
30 #include <epan/packet.h>
31 #include <epan/expert.h>
32 #include <epan/prefs.h>
33 #include <epan/decode_as.h>
34 #include <epan/to_str.h>
35 #include <epan/proto_data.h>
37 #include <wsutil/str_util.h>
39 #include "packet-tcp.h"
40 #include "packet-tls.h"
43 void proto_register_amqp(void);
44 void proto_reg_handoff_amqp(void);
47 #define AMQP_PORT 5672
48 static unsigned amqps_port
= 5671; /* AMQP over SSL/TLS */
51 * This dissector handles AMQP 0-9, 0-10 and 1.0. The conversation structure
52 * contains the version being run - it's only really reliably detected at
53 * protocol init. If this dissector starts in the middle of a conversation
54 * it will try to figure it out, but conversation start is the best.
57 /* #define AMQP_V0_8 1 */
59 /* #define AMQP_V0_91 3 */
64 wmem_map_t
*channels
; /* maps channel_num to amqp_channel_t */
67 static dissector_table_t version_table
;
68 static dissector_table_t media_type_subdissector_table
;
71 typedef struct amqp_delivery amqp_delivery
;
73 struct amqp_delivery
{
74 uint64_t delivery_tag
; /* message number or delivery tag */
75 uint32_t msg_framenum
; /* basic.publish or basic.deliver frame */
76 uint32_t ack_framenum
; /* basic.ack or basic.nack frame */
81 char *type
; /* content type */
82 char *encoding
; /* content encoding. Not used in subdissector now */
83 } amqp_content_params
;
85 typedef struct _amqp_channel_t
{
87 bool confirms
; /* true if publisher confirms are enabled */
88 uint16_t channel_num
; /* channel number */
89 uint64_t publish_count
; /* number of messages published so far */
90 amqp_delivery
*last_delivery1
; /* list of unacked messages on tcp flow1 */
91 amqp_delivery
*last_delivery2
; /* list of unacked messages on tcp flow2 */
92 amqp_content_params
*content_params
; /* parameters of content */
95 typedef struct _amqp_message_decode_t
{
96 uint32_t match_criteria
;
99 char *payload_proto_name
;
100 dissector_handle_t payload_proto
;
101 char *topic_more_info
;
102 } amqp_message_decode_t
;
104 #define MATCH_CRITERIA_EQUAL 0
105 #define MATCH_CRITERIA_CONTAINS 1
106 #define MATCH_CRITERIA_STARTS_WITH 2
107 #define MATCH_CRITERIA_ENDS_WITH 3
108 #define MATCH_CRITERIA_REGEX 4
110 static const value_string match_criteria
[] = {
111 { MATCH_CRITERIA_EQUAL
, "Equal to" },
112 { MATCH_CRITERIA_CONTAINS
, "Contains" },
113 { MATCH_CRITERIA_STARTS_WITH
, "Starts with" },
114 { MATCH_CRITERIA_ENDS_WITH
, "Ends with" },
115 { MATCH_CRITERIA_REGEX
, "Regular Expression" },
119 #define MAX_BUFFER 256
121 /* 0-9 and 0-9-1 defines */
123 #define AMQP_0_9_FRAME_TYPE_METHOD 1
124 #define AMQP_0_9_FRAME_TYPE_CONTENT_HEADER 2
125 #define AMQP_0_9_FRAME_TYPE_CONTENT_BODY 3
126 #define AMQP_0_9_FRAME_TYPE_OOB_METHOD 4
127 #define AMQP_0_9_FRAME_TYPE_OOB_CONTENT_HEADER 5
128 #define AMQP_0_9_FRAME_TYPE_OOB_CONTENT_BODY 6
129 #define AMQP_0_9_FRAME_TYPE_TRACE 7
130 #define AMQP_0_9_FRAME_TYPE_HEARTBEAT 8
132 #define AMQP_0_9_CLASS_CONNECTION 10
133 #define AMQP_0_9_CLASS_CHANNEL 20
134 #define AMQP_0_9_CLASS_ACCESS 30
135 #define AMQP_0_9_CLASS_EXCHANGE 40
136 #define AMQP_0_9_CLASS_QUEUE 50
137 #define AMQP_0_9_CLASS_BASIC 60
138 #define AMQP_0_9_CLASS_FILE 70
139 #define AMQP_0_9_CLASS_STREAM 80
140 #define AMQP_0_9_CLASS_TX 90
141 #define AMQP_0_9_CLASS_DTX 100
142 #define AMQP_0_9_CLASS_TUNNEL 110
143 #define AMQP_0_9_CLASS_CONFIRM 85
145 #define AMQP_0_9_METHOD_CONNECTION_START 10
146 #define AMQP_0_9_METHOD_CONNECTION_START_OK 11
147 #define AMQP_0_9_METHOD_CONNECTION_SECURE 20
148 #define AMQP_0_9_METHOD_CONNECTION_SECURE_OK 21
149 #define AMQP_0_9_METHOD_CONNECTION_TUNE 30
150 #define AMQP_0_9_METHOD_CONNECTION_TUNE_OK 31
151 #define AMQP_0_9_METHOD_CONNECTION_OPEN 40
152 #define AMQP_0_9_METHOD_CONNECTION_OPEN_OK 41
153 #define AMQP_0_9_METHOD_CONNECTION_REDIRECT 42
154 #define AMQP_0_9_METHOD_CONNECTION_CLOSE 50
155 #define AMQP_0_9_METHOD_CONNECTION_CLOSE_OK 51
156 #define AMQP_0_9_METHOD_CONNECTION_BLOCKED 60
157 #define AMQP_0_9_METHOD_CONNECTION_UNBLOCKED 61
159 #define AMQP_0_9_METHOD_CHANNEL_OPEN 10
160 #define AMQP_0_9_METHOD_CHANNEL_OPEN_OK 11
161 #define AMQP_0_9_METHOD_CHANNEL_FLOW 20
162 #define AMQP_0_9_METHOD_CHANNEL_FLOW_OK 21
163 #define AMQP_0_9_METHOD_CHANNEL_CLOSE 40
164 #define AMQP_0_9_METHOD_CHANNEL_CLOSE_OK 41
165 #define AMQP_0_9_METHOD_CHANNEL_RESUME 50
166 #define AMQP_0_9_METHOD_CHANNEL_PING 60
167 #define AMQP_0_9_METHOD_CHANNEL_PONG 70
168 #define AMQP_0_9_METHOD_CHANNEL_OK 80
170 #define AMQP_0_9_METHOD_ACCESS_REQUEST 10
171 #define AMQP_0_9_METHOD_ACCESS_REQUEST_OK 11
173 #define AMQP_0_9_METHOD_EXCHANGE_DECLARE 10
174 #define AMQP_0_9_METHOD_EXCHANGE_DECLARE_OK 11
175 #define AMQP_0_9_METHOD_EXCHANGE_DELETE 20
176 #define AMQP_0_9_METHOD_EXCHANGE_DELETE_OK 21
177 #define AMQP_0_9_METHOD_EXCHANGE_BIND 30
178 #define AMQP_0_9_METHOD_EXCHANGE_BIND_OK 31
179 #define AMQP_0_9_METHOD_EXCHANGE_UNBIND 40
180 #define AMQP_0_9_METHOD_EXCHANGE_UNBIND_OK 51
182 #define AMQP_0_9_METHOD_QUEUE_DECLARE 10
183 #define AMQP_0_9_METHOD_QUEUE_DECLARE_OK 11
184 #define AMQP_0_9_METHOD_QUEUE_BIND 20
185 #define AMQP_0_9_METHOD_QUEUE_BIND_OK 21
186 #define AMQP_0_9_METHOD_QUEUE_UNBIND 50
187 #define AMQP_0_9_METHOD_QUEUE_UNBIND_OK 51
188 #define AMQP_0_9_METHOD_QUEUE_PURGE 30
189 #define AMQP_0_9_METHOD_QUEUE_PURGE_OK 31
190 #define AMQP_0_9_METHOD_QUEUE_DELETE 40
191 #define AMQP_0_9_METHOD_QUEUE_DELETE_OK 41
193 #define AMQP_0_9_METHOD_BASIC_QOS 10
194 #define AMQP_0_9_METHOD_BASIC_QOS_OK 11
195 #define AMQP_0_9_METHOD_BASIC_CONSUME 20
196 #define AMQP_0_9_METHOD_BASIC_CONSUME_OK 21
197 #define AMQP_0_9_METHOD_BASIC_CANCEL 30
198 #define AMQP_0_9_METHOD_BASIC_CANCEL_OK 31
199 #define AMQP_0_9_METHOD_BASIC_PUBLISH 40
200 #define AMQP_0_9_METHOD_BASIC_RETURN 50
201 #define AMQP_0_9_METHOD_BASIC_DELIVER 60
202 #define AMQP_0_9_METHOD_BASIC_GET 70
203 #define AMQP_0_9_METHOD_BASIC_GET_OK 71
204 #define AMQP_0_9_METHOD_BASIC_GET_EMPTY 72
205 #define AMQP_0_9_METHOD_BASIC_ACK 80
206 #define AMQP_0_9_METHOD_BASIC_REJECT 90
207 /* basic(100) is in 0-9 called Recover and in 0-9-1 Recover.Async,
208 * we will use the more recent 0-9-1 terminology */
209 #define AMQP_0_9_METHOD_BASIC_RECOVER_ASYNC 100
210 #define AMQP_0_9_METHOD_BASIC_RECOVER 110
211 #define AMQP_0_9_METHOD_BASIC_RECOVER_OK 111
212 #define AMQP_0_9_METHOD_BASIC_NACK 120
214 #define AMQP_0_9_METHOD_FILE_QOS 10
215 #define AMQP_0_9_METHOD_FILE_QOS_OK 11
216 #define AMQP_0_9_METHOD_FILE_CONSUME 20
217 #define AMQP_0_9_METHOD_FILE_CONSUME_OK 21
218 #define AMQP_0_9_METHOD_FILE_CANCEL 30
219 #define AMQP_0_9_METHOD_FILE_CANCEL_OK 31
220 #define AMQP_0_9_METHOD_FILE_OPEN 40
221 #define AMQP_0_9_METHOD_FILE_OPEN_OK 41
222 #define AMQP_0_9_METHOD_FILE_STAGE 50
223 #define AMQP_0_9_METHOD_FILE_PUBLISH 60
224 #define AMQP_0_9_METHOD_FILE_RETURN 70
225 #define AMQP_0_9_METHOD_FILE_DELIVER 80
226 #define AMQP_0_9_METHOD_FILE_ACK 90
227 #define AMQP_0_9_METHOD_FILE_REJECT 100
229 #define AMQP_0_9_METHOD_STREAM_QOS 10
230 #define AMQP_0_9_METHOD_STREAM_QOS_OK 11
231 #define AMQP_0_9_METHOD_STREAM_CONSUME 20
232 #define AMQP_0_9_METHOD_STREAM_CONSUME_OK 21
233 #define AMQP_0_9_METHOD_STREAM_CANCEL 30
234 #define AMQP_0_9_METHOD_STREAM_CANCEL_OK 31
235 #define AMQP_0_9_METHOD_STREAM_PUBLISH 40
236 #define AMQP_0_9_METHOD_STREAM_RETURN 50
237 #define AMQP_0_9_METHOD_STREAM_DELIVER 60
239 #define AMQP_0_9_METHOD_TX_SELECT 10
240 #define AMQP_0_9_METHOD_TX_SELECT_OK 11
241 #define AMQP_0_9_METHOD_TX_COMMIT 20
242 #define AMQP_0_9_METHOD_TX_COMMIT_OK 21
243 #define AMQP_0_9_METHOD_TX_ROLLBACK 30
244 #define AMQP_0_9_METHOD_TX_ROLLBACK_OK 31
246 #define AMQP_0_9_METHOD_DTX_SELECT 10
247 #define AMQP_0_9_METHOD_DTX_SELECT_OK 11
248 #define AMQP_0_9_METHOD_DTX_START 20
249 #define AMQP_0_9_METHOD_DTX_START_OK 21
251 #define AMQP_0_9_METHOD_TUNNEL_REQUEST 10
253 #define AMQP_0_9_METHOD_CONFIRM_SELECT 10
254 #define AMQP_0_9_METHOD_CONFIRM_SELECT_OK 11
256 /* AMQP 1.0 values */
258 #define AMQP_1_0_AMQP_FRAME 0
259 #define AMQP_1_0_SASL_FRAME 1
260 #define AMQP_1_0_TLS_FRAME 2
262 #define AMQP_1_0_AMQP_OPEN 0x10
263 #define AMQP_1_0_AMQP_BEGIN 0x11
264 #define AMQP_1_0_AMQP_ATTACH 0x12
265 #define AMQP_1_0_AMQP_FLOW 0x13
266 #define AMQP_1_0_AMQP_TRANSFER 0x14
267 #define AMQP_1_0_AMQP_DISPOSITION 0x15
268 #define AMQP_1_0_AMQP_DETACH 0x16
269 #define AMQP_1_0_AMQP_END 0x17
270 #define AMQP_1_0_AMQP_CLOSE 0x18
272 #define AMQP_1_0_SASL_MECHANISMS 0x40
273 #define AMQP_1_0_SASL_INIT 0x41
274 #define AMQP_1_0_SASL_CHALLENGE 0x42
275 #define AMQP_1_0_SASL_RESPONSE 0x43
276 #define AMQP_1_0_SASL_OUTCOME 0x44
278 #define AMQP_1_0_AMQP_TYPE_ERROR 0x1d
279 #define AMQP_1_0_AMQP_TYPE_HEADER 0x70
280 #define AMQP_1_0_AMQP_TYPE_DELIVERY_ANNOTATIONS 0x71
281 #define AMQP_1_0_AMQP_TYPE_MESSAGE_ANNOTATIONS 0x72
282 #define AMQP_1_0_AMQP_TYPE_PROPERTIES 0x73
283 #define AMQP_1_0_AMQP_TYPE_APPLICATION_PROPERTIES 0x74
284 #define AMQP_1_0_AMQP_TYPE_DATA 0x75
285 #define AMQP_1_0_AMQP_TYPE_AMQP_SEQUENCE 0x76
286 #define AMQP_1_0_AMQP_TYPE_AMQP_VALUE 0x77
287 #define AMQP_1_0_AMQP_TYPE_FOOTER 0x78
288 #define AMQP_1_0_AMQP_TYPE_RECEIVED 0x23
289 #define AMQP_1_0_AMQP_TYPE_ACCEPTED 0x24
290 #define AMQP_1_0_AMQP_TYPE_REJECTED 0x25
291 #define AMQP_1_0_AMQP_TYPE_RELEASED 0x26
292 #define AMQP_1_0_AMQP_TYPE_MODIFIED 0x27
293 #define AMQP_1_0_AMQP_TYPE_SOURCE 0x28
294 #define AMQP_1_0_AMQP_TYPE_TARGET 0x29
295 #define AMQP_1_0_AMQP_TYPE_DELETE_ON_CLOSE 0x2b
296 #define AMQP_1_0_AMQP_TYPE_DELETE_ON_NO_LINKS 0x2c
297 #define AMQP_1_0_AMQP_TYPE_DELETE_ON_NO_MESSAGE 0x2d
298 #define AMQP_1_0_AMQP_TYPE_DELETE_ON_NO_LINKS_OR_MESSAGE 0x2e
299 #define AMQP_1_0_AMQP_TYPE_COORDINATOR 0x30
300 #define AMQP_1_0_AMQP_TYPE_DECLARE 0x31
301 #define AMQP_1_0_AMQP_TYPE_DISCHARGE 0x32
302 #define AMQP_1_0_AMQP_TYPE_DECLARED 0x33
303 #define AMQP_1_0_AMQP_TYPE_TRANSACTIONAL_STATE 0x34
305 #define AMQP_1_0_TYPE_DESCRIPTOR_CONSTRUCTOR 0x00
307 #define AMQP_1_0_TYPE_NULL 0x40
308 #define AMQP_1_0_TYPE_LIST0 0x45
309 #define AMQP_1_0_TYPE_LIST8 0xc0
310 #define AMQP_1_0_TYPE_LIST32 0xd0
311 #define AMQP_1_0_TYPE_MAP8 0xc1
312 #define AMQP_1_0_TYPE_MAP32 0xd1
313 #define AMQP_1_0_TYPE_ARRAY8 0xe0
314 #define AMQP_1_0_TYPE_ARRAY32 0xf0
316 /* AMQP 0-10 values */
318 #define AMQP_0_10_FRAME_CONTROL 0
319 #define AMQP_0_10_FRAME_COMMAND 1
320 #define AMQP_0_10_FRAME_HEADER 2
321 #define AMQP_0_10_FRAME_BODY 3
323 #define AMQP_0_10_TYPE_STR16 0x95
324 #define AMQP_0_10_TYPE_MAP 0xa8
325 #define AMQP_0_10_TYPE_LIST 0xa9
326 #define AMQP_0_10_TYPE_ARRAY 0xaa
327 #define AMQP_0_10_TYPE_STRUCT32 0xab
329 #define AMQP_0_10_CLASS_CONNECTION 0x01
330 #define AMQP_0_10_METHOD_CONNECTION_START 0x01
331 #define AMQP_0_10_METHOD_CONNECTION_START_OK 0x02
332 #define AMQP_0_10_METHOD_CONNECTION_SECURE 0x03
333 #define AMQP_0_10_METHOD_CONNECTION_SECURE_OK 0x04
334 #define AMQP_0_10_METHOD_CONNECTION_TUNE 0x05
335 #define AMQP_0_10_METHOD_CONNECTION_TUNE_OK 0x06
336 #define AMQP_0_10_METHOD_CONNECTION_OPEN 0x07
337 #define AMQP_0_10_METHOD_CONNECTION_OPEN_OK 0x08
338 #define AMQP_0_10_METHOD_CONNECTION_REDIRECT 0x09
339 #define AMQP_0_10_METHOD_CONNECTION_HEARTBEAT 0x0a
340 #define AMQP_0_10_METHOD_CONNECTION_CLOSE 0x0b
341 #define AMQP_0_10_METHOD_CONNECTION_CLOSE_OK 0x0c
343 #define AMQP_0_10_CLASS_SESSION 0x02
344 #define AMQP_0_10_METHOD_SESSION_ATTACH 0x01
345 #define AMQP_0_10_METHOD_SESSION_ATTACHED 0x02
346 #define AMQP_0_10_METHOD_SESSION_DETACH 0x03
347 #define AMQP_0_10_METHOD_SESSION_DETACHED 0x04
348 #define AMQP_0_10_METHOD_SESSION_REQUEST_TIMEOUT 0x05
349 #define AMQP_0_10_METHOD_SESSION_TIMEOUT 0x06
350 #define AMQP_0_10_METHOD_SESSION_COMMAND_POINT 0x07
351 #define AMQP_0_10_METHOD_SESSION_EXPECTED 0x08
352 #define AMQP_0_10_METHOD_SESSION_CONFIRMED 0x09
353 #define AMQP_0_10_METHOD_SESSION_COMPLETED 0x0a
354 #define AMQP_0_10_METHOD_SESSION_KNOWN_COMPLETED 0x0b
355 #define AMQP_0_10_METHOD_SESSION_FLUSH 0x0c
356 #define AMQP_0_10_METHOD_SESSION_GAP 0x0d
358 #define AMQP_0_10_CLASS_EXECUTION 0x03
359 #define AMQP_0_10_METHOD_EXECUTION_SYNC 0x01
360 #define AMQP_0_10_METHOD_EXECUTION_RESULT 0x02
361 #define AMQP_0_10_METHOD_EXECUTION_EXCEPTION 0x03
363 #define AMQP_0_10_CLASS_MESSAGE 0x04
364 #define AMQP_0_10_STRUCT_MESSAGE_DELIVERY_PROPERTIES 0x01
365 #define AMQP_0_10_STRUCT_MESSAGE_FRAGMENT_PROPERTIES 0x02
366 #define AMQP_0_10_STRUCT_MESSAGE_MESSAGE_PROPERTIES 0x03
367 #define AMQP_0_10_STRUCT_MESSAGE_ACQUIRED 0x04
368 #define AMQP_0_10_STRUCT_MESSAGE_RESUME_RESULT 0x05
369 #define AMQP_0_10_METHOD_MESSAGE_TRANSFER 0x01
370 #define AMQP_0_10_METHOD_MESSAGE_ACCEPT 0x02
371 #define AMQP_0_10_METHOD_MESSAGE_REJECT 0x03
372 #define AMQP_0_10_METHOD_MESSAGE_RELEASE 0x04
373 #define AMQP_0_10_METHOD_MESSAGE_ACQUIRE 0x05
374 #define AMQP_0_10_METHOD_MESSAGE_RESUME 0x06
375 #define AMQP_0_10_METHOD_MESSAGE_SUBSCRIBE 0x07
376 #define AMQP_0_10_METHOD_MESSAGE_CANCEL 0x08
377 #define AMQP_0_10_METHOD_MESSAGE_SET_FLOW_MODE 0x09
378 #define AMQP_0_10_METHOD_MESSAGE_FLOW 0x0a
379 #define AMQP_0_10_METHOD_MESSAGE_FLUSH 0x0b
380 #define AMQP_0_10_METHOD_MESSAGE_STOP 0x0c
382 #define AMQP_0_10_CLASS_TX 0x05
383 #define AMQP_0_10_METHOD_TX_SELECT 0x01
384 #define AMQP_0_10_METHOD_TX_COMMIT 0x02
385 #define AMQP_0_10_METHOD_TX_ROLLBACK 0x03
387 #define AMQP_0_10_CLASS_DTX 0x06
388 #define AMQP_0_10_STRUCT_DTX_XA_RESULT 0x01
389 #define AMQP_0_10_STRUCT_DTX_RECOVER_RESULT 0x03
390 #define AMQP_0_10_METHOD_DTX_SELECT 0x01
391 #define AMQP_0_10_METHOD_DTX_START 0x02
392 #define AMQP_0_10_METHOD_DTX_END 0x03
393 #define AMQP_0_10_METHOD_DTX_COMMIT 0x04
394 #define AMQP_0_10_METHOD_DTX_FORGET 0x05
395 #define AMQP_0_10_METHOD_DTX_GET_TIMEOUT 0x06
396 #define AMQP_0_10_METHOD_DTX_PREPARE 0x07
397 #define AMQP_0_10_METHOD_DTX_RECOVER 0x08
398 #define AMQP_0_10_METHOD_DTX_ROLLBACK 0x09
399 #define AMQP_0_10_METHOD_DTX_SET_TIMEOUT 0x0a
401 #define AMQP_0_10_CLASS_EXCHANGE 0x07
402 #define AMQP_0_10_STRUCT_EXCHANGE_QUERY_RESULT 0x01
403 #define AMQP_0_10_STRUCT_EXCHANGE_BOUND_RESULT 0x02
404 #define AMQP_0_10_METHOD_EXCHANGE_DECLARE 0x01
405 #define AMQP_0_10_METHOD_EXCHANGE_DELETE 0x02
406 #define AMQP_0_10_METHOD_EXCHANGE_QUERY 0x03
407 #define AMQP_0_10_METHOD_EXCHANGE_BIND 0x04
408 #define AMQP_0_10_METHOD_EXCHANGE_UNBIND 0x05
409 #define AMQP_0_10_METHOD_EXCHANGE_BOUND 0x06
411 #define AMQP_0_10_CLASS_QUEUE 0x08
412 #define AMQP_0_10_STRUCT_QUEUE_QUERY_RESULT 0x01
413 #define AMQP_0_10_METHOD_QUEUE_DECLARE 0x01
414 #define AMQP_0_10_METHOD_QUEUE_DELETE 0x02
415 #define AMQP_0_10_METHOD_QUEUE_PURGE 0x03
416 #define AMQP_0_10_METHOD_QUEUE_QUERY 0x04
418 #define AMQP_0_10_CLASS_FILE 0x09
419 #define AMQP_0_10_STRUCT_FILE_PROPERTIES 0x01
420 #define AMQP_0_10_METHOD_FILE_QOS 0x01
421 #define AMQP_0_10_METHOD_FILE_QOS_OK 0x02
422 #define AMQP_0_10_METHOD_FILE_CONSUME 0x03
423 #define AMQP_0_10_METHOD_FILE_CONSUME_OK 0x04
424 #define AMQP_0_10_METHOD_FILE_CANCEL 0x05
425 #define AMQP_0_10_METHOD_FILE_OPEN 0x06
426 #define AMQP_0_10_METHOD_FILE_OPEN_OK 0x07
427 #define AMQP_0_10_METHOD_FILE_STAGE 0x08
428 #define AMQP_0_10_METHOD_FILE_PUBLISH 0x09
429 #define AMQP_0_10_METHOD_FILE_RETURN 0x0a
430 #define AMQP_0_10_METHOD_FILE_DELIVER 0x0b
431 #define AMQP_0_10_METHOD_FILE_ACK 0x0c
432 #define AMQP_0_10_METHOD_FILE_REJECT 0x0d
434 #define AMQP_0_10_CLASS_STREAM 0x0a
435 #define AMQP_0_10_STRUCT_STREAM_PROPERTIES 0x01
436 #define AMQP_0_10_METHOD_STREAM_QOS 0x01
437 #define AMQP_0_10_METHOD_STREAM_QOS_OK 0x02
438 #define AMQP_0_10_METHOD_STREAM_CONSUME 0x03
439 #define AMQP_0_10_METHOD_STREAM_CONSUME_OK 0x04
440 #define AMQP_0_10_METHOD_STREAM_CANCEL 0x05
441 #define AMQP_0_10_METHOD_STREAM_PUBLISH 0x06
442 #define AMQP_0_10_METHOD_STREAM_RETURN 0x07
443 #define AMQP_0_10_METHOD_STREAM_DELIVER 0x08
445 /* Private functions */
448 dissect_amqp_0_9_field_value(tvbuff_t
*tvb
, packet_info
*pinfo
, int offset
, unsigned length
,
449 const char *name
, proto_tree
*field_table_tree
);
452 dissect_amqp_0_10_struct32(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_item
*ti
);
454 static amqp_channel_t
*
455 get_conversation_channel(conversation_t
*conv
, uint16_t channel_num
);
458 record_msg_delivery(tvbuff_t
*tvb
, packet_info
*pinfo
, uint16_t channel_num
,
459 uint64_t delivery_tag
);
462 record_msg_delivery_c(conversation_t
*conv
, amqp_channel_t
*channel
,
463 tvbuff_t
*tvb
, packet_info
*pinfo
, uint64_t delivery_tag
);
466 record_delivery_ack(tvbuff_t
*tvb
, packet_info
*pinfo
, uint16_t channel_num
,
467 uint64_t delivery_tag
, bool multiple
);
470 record_delivery_ack_c(conversation_t
*conv
, amqp_channel_t
*channel
,
471 tvbuff_t
*tvb
, packet_info
*pinfo
, uint64_t delivery_tag
, bool multiple
);
474 generate_msg_reference(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*prop_tree
);
477 generate_ack_reference(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*prop_tree
);
479 /* AMQP 0-10 type decoding information */
481 typedef int (*type_formatter
)(tvbuff_t
*tvb
,
482 unsigned offset
, /* In tvb where data starts */
483 unsigned length
, /* Length of data, if known */
484 const char **value
); /* Receive formatted val */
485 struct amqp_typeinfo
{
486 uint8_t typecode
; /* From AMQP 0-10 spec */
487 const char *amqp_typename
;
488 type_formatter formatter
;
492 /* AMQP 1-0 type decoding information */
494 typedef int (*type_dissector
)(tvbuff_t
*tvb
,
496 unsigned offset
, /* In tvb where data starts */
497 unsigned length
, /* Length of data, if known */
501 struct amqp1_typeinfo
{
502 uint8_t typecode
; /* From AMQP 0-10 spec */
503 const char *amqp_typename
;
506 type_dissector dissector
;
507 type_formatter formatter
;
510 struct amqp_synonym_types_t
{
511 const int *hf_none
; /* Must be of type FT_NONE */
512 const int *hf_uint
; /* FT_UINT */
513 const int *hf_str
; /* FT_STRING */
514 const int *hf_bin
; /* FT_BYTES */
515 const int *hf_guid
; /* FT_GUID */
518 /* struct for field interpreting format code (i.e. 0x70 for msg.header) to relevant hf_* variable
519 * (here hf_amqp_1_0_messageHeader). If the type is list, next 2 struct items specify how to
520 * interpret list items (in terms of hf_* variable)
522 struct amqp_defined_types_t
{
523 const int format_code
;
525 uint32_t hf_amqp_subtype_count
;
526 int * const *hf_amqp_subtypes
;
529 /* functions for decoding 1.0 type and/or value */
532 static const struct amqp1_typeinfo
* decode_fixed_type(uint8_t code
);
535 get_amqp_1_0_value_formatter(tvbuff_t
*tvb
,
541 uint32_t hf_amqp_subtype_count
,
542 int * const *hf_amqp_subtypes
,
543 unsigned *length_size
,
547 get_amqp_1_0_type_formatter(tvbuff_t
*tvb
,
551 uint32_t *hf_amqp_subtype_count
,
552 int * const **hf_amqp_subtypes
,
553 unsigned *length_size
);
556 get_amqp_1_0_type_value_formatter(tvbuff_t
*tvb
,
561 unsigned *length_size
,
564 /* functions for decoding particular primitive types */
567 dissect_amqp_1_0_fixed(tvbuff_t
*tvb
, packet_info
*pinfo
,
568 unsigned offset
, unsigned length
,
569 proto_item
*item
, int hf_amqp_type
);
572 dissect_amqp_1_0_variable(tvbuff_t
*tvb
, packet_info
*pinfo
,
573 unsigned offset
, unsigned length
,
574 proto_item
*item
, int hf_amqp_type
);
577 dissect_amqp_1_0_timestamp(tvbuff_t
*tvb
, packet_info
*pinfo _U_
,
578 unsigned offset
, unsigned length
,
579 proto_item
*item
, int hf_amqp_type
);
582 dissect_amqp_1_0_skip(tvbuff_t
*tvb _U_
, packet_info
*pinfo _U_
,
583 unsigned offset _U_
, unsigned length _U_
,
584 proto_item
*item _U_
, int hf_amqp_type _U_
);
587 dissect_amqp_1_0_zero(tvbuff_t
*tvb
, packet_info
*pinfo
,
588 unsigned offset
, unsigned length _U_
,
589 proto_item
*item
, int hf_amqp_type
);
592 dissect_amqp_1_0_true(tvbuff_t
*tvb
, packet_info
*pinfo
,
593 unsigned offset
, unsigned length _U_
,
594 proto_item
*item
, int hf_amqp_type
);
597 dissect_amqp_1_0_false(tvbuff_t
*tvb
, packet_info
*pinfo
,
598 unsigned offset
, unsigned length _U_
,
599 proto_item
*item
, int hf_amqp_type
);
602 format_amqp_1_0_null(tvbuff_t
*tvb _U_
,
603 unsigned offset _U_
, unsigned length _U_
,
607 format_amqp_1_0_boolean_true(tvbuff_t
*tvb
, unsigned offset
, unsigned length _U_
,
611 format_amqp_1_0_boolean_false(tvbuff_t
*tvb
, unsigned offset
, unsigned length _U_
,
615 format_amqp_1_0_boolean(tvbuff_t
*tvb
, unsigned offset
, unsigned length _U_
,
619 format_amqp_1_0_uint(tvbuff_t
*tvb
, unsigned offset
, unsigned length
,
623 format_amqp_1_0_int(tvbuff_t
*tvb
, unsigned offset
, unsigned length
,
627 format_amqp_1_0_float(tvbuff_t
*tvb
, unsigned offset
, unsigned length _U_
,
631 format_amqp_1_0_double(tvbuff_t
*tvb
, unsigned offset
, unsigned length _U_
,
635 format_amqp_1_0_decimal(tvbuff_t
*tvb _U_
, unsigned offset _U_
, unsigned length
,
639 format_amqp_1_0_char(tvbuff_t
*tvb
, unsigned offset
, unsigned length _U_
,
643 format_amqp_1_0_timestamp(tvbuff_t
*tvb
, unsigned offset
, unsigned length _U_
,
647 format_amqp_1_0_uuid(tvbuff_t
*tvb
, unsigned offset
, unsigned length _U_
,
651 format_amqp_1_0_bin(tvbuff_t
*tvb
, unsigned offset
, unsigned length
,
655 format_amqp_1_0_str(tvbuff_t
*tvb
, unsigned offset
, unsigned length
,
659 format_amqp_1_0_symbol(tvbuff_t
*tvb
, unsigned offset
, unsigned length
,
663 get_amqp_0_10_type_formatter(uint8_t code
,
665 type_formatter
*decoder
,
666 unsigned *length_size
);
669 format_amqp_0_10_bin(tvbuff_t
*tvb
,
670 unsigned offset
, unsigned length
,
674 format_amqp_0_10_int(tvbuff_t
*tvb
,
675 unsigned offset
, unsigned length
,
679 format_amqp_0_10_uint(tvbuff_t
*tvb
,
680 unsigned offset
, unsigned length
,
684 format_amqp_0_10_char(tvbuff_t
*tvb
,
685 unsigned offset
, unsigned length
,
689 format_amqp_0_10_boolean(tvbuff_t
*tvb
,
690 unsigned offset
, unsigned length
,
694 format_amqp_0_10_vbin(tvbuff_t
*tvb
,
695 unsigned offset
, unsigned length
,
699 format_amqp_0_10_str(tvbuff_t
*tvb
,
700 unsigned offset
, unsigned length
,
704 format_amqp_0_10_sequence_set(tvbuff_t
*tvb
, unsigned offset
, unsigned length
,
707 /* Various handles */
709 static int proto_amqp
;
710 static int proto_amqpv0_9
;
711 static int proto_amqpv0_10
;
712 static int proto_amqpv1_0
;
716 static int hf_amqp_1_0_size
;
717 static int hf_amqp_1_0_doff
;
718 static int hf_amqp_1_0_type
;
719 static int hf_amqp_1_0_containerId
;
720 static int hf_amqp_1_0_hostname
;
721 static int hf_amqp_1_0_maxFrameSize
;
722 static int hf_amqp_1_0_channelMax
;
723 static int hf_amqp_1_0_idleTimeOut
;
724 static int hf_amqp_1_0_outgoingLocales
;
725 static int hf_amqp_1_0_incomingLocales
;
726 static int hf_amqp_1_0_offeredCapabilities
;
727 static int hf_amqp_1_0_desiredCapabilities
;
728 static int hf_amqp_1_0_properties
;
729 static int hf_amqp_1_0_remoteChannel
;
730 static int hf_amqp_1_0_nextOutgoingId
;
731 static int hf_amqp_1_0_incomingWindow
;
732 static int hf_amqp_1_0_outgoingWindow
;
733 static int hf_amqp_1_0_handleMax
;
734 static int hf_amqp_1_0_name
;
735 static int hf_amqp_1_0_handle
;
736 static int hf_amqp_1_0_role
;
737 static int hf_amqp_1_0_sndSettleMode
;
738 static int hf_amqp_1_0_rcvSettleMode
;
739 static int hf_amqp_1_0_source
;
740 static int hf_amqp_1_0_target
;
741 static int hf_amqp_1_0_deleteOnClose
;
742 static int hf_amqp_1_0_deleteOnNoLinks
;
743 static int hf_amqp_1_0_deleteOnNoMessages
;
744 static int hf_amqp_1_0_deleteOnNoLinksOrMessages
;
745 static int hf_amqp_1_0_coordinator
;
746 static int hf_amqp_1_0_declare
;
747 static int hf_amqp_1_0_globalId
;
748 static int hf_amqp_1_0_discharge
;
749 static int hf_amqp_1_0_txnId
;
750 static int hf_amqp_1_0_fail
;
751 static int hf_amqp_1_0_declared
;
752 static int hf_amqp_1_0_transactionalState
;
753 static int hf_amqp_1_0_outcome
;
754 static int hf_amqp_1_0_unsettled
;
755 static int hf_amqp_1_0_incompleteUnsettled
;
756 static int hf_amqp_1_0_initialDeliveryCount
;
757 static int hf_amqp_1_0_maxMessageSize
;
758 static int hf_amqp_1_0_nextIncomingId
;
759 static int hf_amqp_1_0_deliveryCount
;
760 static int hf_amqp_1_0_sectionNumber
;
761 static int hf_amqp_1_0_sectionOffset
;
762 static int hf_amqp_1_0_deliveryFailed
;
763 static int hf_amqp_1_0_undeliverableHere
;
764 static int hf_amqp_1_0_linkCredit
;
765 static int hf_amqp_1_0_available
;
766 static int hf_amqp_1_0_drain
;
767 static int hf_amqp_1_0_echo
;
768 static int hf_amqp_1_0_deliveryId
;
769 static int hf_amqp_1_0_deliveryTag
;
770 static int hf_amqp_1_0_messageFormat
;
771 static int hf_amqp_1_0_settled
;
772 static int hf_amqp_1_0_more
;
773 static int hf_amqp_1_0_state
;
774 static int hf_amqp_1_0_resume
;
775 static int hf_amqp_1_0_aborted
;
776 static int hf_amqp_1_0_batchable
;
777 static int hf_amqp_1_0_first
;
778 static int hf_amqp_1_0_last
;
779 static int hf_amqp_1_0_closed
;
780 static int hf_amqp_1_0_amqp_performative
;
781 static int hf_amqp_1_0_error
;
782 static int hf_amqp_1_0_messageHeader
;
783 static int hf_amqp_1_0_deliveryAnnotations
;
784 static int hf_amqp_1_0_messageAnnotations
;
785 static int hf_amqp_1_0_messageProperties
;
786 static int hf_amqp_1_0_applicationProperties
;
787 static int hf_amqp_1_0_data
;
788 static int hf_amqp_1_0_amqp_sequence
;
789 static int hf_amqp_1_0_amqp_value
;
790 static int hf_amqp_1_0_footer
;
791 static int hf_amqp_1_0_received
;
792 static int hf_amqp_1_0_accepted
;
793 static int hf_amqp_1_0_rejected
;
794 static int hf_amqp_1_0_released
;
795 static int hf_amqp_1_0_modified
;
796 static int hf_amqp_1_0_condition
;
797 static int hf_amqp_1_0_description
;
798 static int hf_amqp_1_0_info
;
799 static int hf_amqp_1_0_address
;
800 static int hf_amqp_1_0_durable
;
801 static int hf_amqp_1_0_terminusDurable
;
802 static int hf_amqp_1_0_priority
;
803 static int hf_amqp_1_0_ttl
;
804 static int hf_amqp_1_0_firstAcquirer
;
805 static int hf_amqp_1_0_expiryPolicy
;
806 static int hf_amqp_1_0_timeout
;
807 static int hf_amqp_1_0_dynamic
;
808 static int hf_amqp_1_0_dynamicNodeProperties
;
809 static int hf_amqp_1_0_distributionMode
;
810 static int hf_amqp_1_0_filter
;
811 static int hf_amqp_1_0_defaultOutcome
;
812 static int hf_amqp_1_0_outcomes
;
813 static int hf_amqp_1_0_capabilities
;
814 static int hf_amqp_1_0_messageId
;
815 static int hf_amqp_1_0_userId
;
816 static int hf_amqp_1_0_to
;
817 static int hf_amqp_1_0_subject
;
818 static int hf_amqp_1_0_replyTo
;
819 static int hf_amqp_1_0_correlationId
;
820 static int hf_amqp_1_0_contentType
;
821 static int hf_amqp_1_0_contentEncoding
;
822 static int hf_amqp_1_0_absoluteExpiryTime
;
823 static int hf_amqp_1_0_creationTime
;
824 static int hf_amqp_1_0_groupId
;
825 static int hf_amqp_1_0_groupSequence
;
826 static int hf_amqp_1_0_replyToGroupId
;
827 static int hf_amqp_1_0_sasl_method
;
828 static int hf_amqp_1_0_mechanisms
;
829 static int hf_amqp_1_0_mechanism
;
830 static int hf_amqp_1_0_initResponse
;
831 static int hf_amqp_1_0_saslChallenge
;
832 static int hf_amqp_1_0_saslResponse
;
833 static int hf_amqp_1_0_saslCode
;
834 static int hf_amqp_1_0_saslAdditionalData
;
835 static int hf_amqp_1_0_list
;
836 static int hf_amqp_1_0_map
;
837 /* variables for variant sub-types (see amqp_synonym_types)
838 * - fields of type="*" can be of any type
839 * - fields with multiple="true" may contain the type or an array */
840 static int hf_amqp_1_0_outgoingLocales_sym
;
841 static int hf_amqp_1_0_incomingLocales_sym
;
842 static int hf_amqp_1_0_offeredCapabilities_sym
;
843 static int hf_amqp_1_0_desiredCapabilities_sym
;
844 static int hf_amqp_1_0_address_str
;
845 static int hf_amqp_1_0_source_str
;
846 static int hf_amqp_1_0_target_str
;
847 static int hf_amqp_1_0_outcomes_sym
;
848 static int hf_amqp_1_0_capabilities_sym
;
849 static int hf_amqp_1_0_messageId_uint
;
850 static int hf_amqp_1_0_messageId_str
;
851 static int hf_amqp_1_0_messageId_bin
;
852 static int hf_amqp_1_0_messageId_uuid
;
853 static int hf_amqp_1_0_correlationId_uint
;
854 static int hf_amqp_1_0_correlationId_str
;
855 static int hf_amqp_1_0_correlationId_bin
;
856 static int hf_amqp_1_0_correlationId_uuid
;
857 static int hf_amqp_1_0_to_str
;
858 static int hf_amqp_1_0_replyTo_str
;
859 static int hf_amqp_1_0_mechanisms_sym
;
861 /* Several field can be of multiple types. To distinguish it among hf_amqp_1_0_* variables,
862 * table below "translates" original hf_amqp_1_0_* variable to the type-specific one.
863 * Each row contains synonym fields for {FT_NONE, FT_UINT, FT_STRING, FT_BYTES, FT_GUID}
864 * NULL indicates no synonym of a given type
865 * FT_NONE field must be always present
867 static const struct amqp_synonym_types_t amqp_synonym_types
[] = {
868 {&hf_amqp_1_0_outgoingLocales
, NULL
, &hf_amqp_1_0_outgoingLocales_sym
, NULL
, NULL
},
869 {&hf_amqp_1_0_incomingLocales
, NULL
, &hf_amqp_1_0_incomingLocales_sym
, NULL
, NULL
},
870 {&hf_amqp_1_0_offeredCapabilities
, NULL
, &hf_amqp_1_0_offeredCapabilities_sym
, NULL
, NULL
},
871 {&hf_amqp_1_0_desiredCapabilities
, NULL
, &hf_amqp_1_0_desiredCapabilities_sym
, NULL
, NULL
},
872 {&hf_amqp_1_0_address
, NULL
, &hf_amqp_1_0_address_str
, NULL
, NULL
},
873 {&hf_amqp_1_0_source
, NULL
, &hf_amqp_1_0_source_str
, NULL
, NULL
},
874 {&hf_amqp_1_0_target
, NULL
, &hf_amqp_1_0_target_str
, NULL
, NULL
},
875 {&hf_amqp_1_0_outcomes
, NULL
, &hf_amqp_1_0_outcomes_sym
, NULL
, NULL
},
876 {&hf_amqp_1_0_capabilities
, NULL
, &hf_amqp_1_0_capabilities_sym
, NULL
, NULL
},
877 {&hf_amqp_1_0_messageId
, &hf_amqp_1_0_messageId_uint
, &hf_amqp_1_0_messageId_str
, &hf_amqp_1_0_messageId_bin
, &hf_amqp_1_0_messageId_uuid
},
878 {&hf_amqp_1_0_messageId
, &hf_amqp_1_0_messageId_uint
, &hf_amqp_1_0_messageId_str
, &hf_amqp_1_0_messageId_bin
, &hf_amqp_1_0_messageId_uuid
},
879 {&hf_amqp_1_0_correlationId
, &hf_amqp_1_0_correlationId_uint
, &hf_amqp_1_0_correlationId_str
, &hf_amqp_1_0_correlationId_bin
, &hf_amqp_1_0_correlationId_uuid
},
880 {&hf_amqp_1_0_to
, NULL
, &hf_amqp_1_0_to_str
, NULL
, NULL
},
881 {&hf_amqp_1_0_replyTo
, NULL
, &hf_amqp_1_0_replyTo_str
, NULL
, NULL
},
882 {&hf_amqp_1_0_mechanisms
, NULL
, &hf_amqp_1_0_mechanisms_sym
, NULL
, NULL
},
883 {NULL
, NULL
, NULL
, NULL
, NULL
}
886 /* fields with hf_* types for list items;
887 * i.e. sasl.init method has 3 arguments in a list (mechanism, init.response, hostname)
888 * so when dissecting sasl.init arguments list, identify the list items with
889 * corresponding hf_* variable */
890 static int * const amqp_1_0_sasl_mechanisms_items
[] = { &hf_amqp_1_0_mechanisms
};
891 static int * const amqp_1_0_sasl_init_items
[] = { &hf_amqp_1_0_mechanism
,
892 &hf_amqp_1_0_initResponse
,
893 &hf_amqp_1_0_hostname
};
894 static int * const amqp_1_0_sasl_challenge_items
[] = { &hf_amqp_1_0_saslChallenge
};
895 static int * const amqp_1_0_sasl_response_items
[] = { &hf_amqp_1_0_saslResponse
};
896 static int * const amqp_1_0_sasl_outcome_items
[] = { &hf_amqp_1_0_saslCode
,
897 &hf_amqp_1_0_saslAdditionalData
};
898 static int * const amqp_1_0_amqp_open_items
[] = { &hf_amqp_1_0_containerId
,
899 &hf_amqp_1_0_hostname
,
900 &hf_amqp_1_0_maxFrameSize
,
901 &hf_amqp_1_0_channelMax
,
902 &hf_amqp_1_0_idleTimeOut
,
903 &hf_amqp_1_0_outgoingLocales
,
904 &hf_amqp_1_0_incomingLocales
,
905 &hf_amqp_1_0_offeredCapabilities
,
906 &hf_amqp_1_0_desiredCapabilities
,
907 &hf_amqp_1_0_properties
};
908 static int * const amqp_1_0_amqp_begin_items
[] = { &hf_amqp_1_0_remoteChannel
,
909 &hf_amqp_1_0_nextOutgoingId
,
910 &hf_amqp_1_0_incomingWindow
,
911 &hf_amqp_1_0_outgoingWindow
,
912 &hf_amqp_1_0_handleMax
,
913 &hf_amqp_1_0_offeredCapabilities
,
914 &hf_amqp_1_0_desiredCapabilities
,
915 &hf_amqp_1_0_properties
};
916 static int * const amqp_1_0_amqp_attach_items
[] = { &hf_amqp_1_0_name
,
919 &hf_amqp_1_0_sndSettleMode
,
920 &hf_amqp_1_0_rcvSettleMode
,
923 &hf_amqp_1_0_unsettled
,
924 &hf_amqp_1_0_incompleteUnsettled
,
925 &hf_amqp_1_0_initialDeliveryCount
,
926 &hf_amqp_1_0_maxMessageSize
,
927 &hf_amqp_1_0_offeredCapabilities
,
928 &hf_amqp_1_0_desiredCapabilities
,
929 &hf_amqp_1_0_properties
};
930 static int * const amqp_1_0_amqp_flow_items
[] = { &hf_amqp_1_0_nextIncomingId
,
931 &hf_amqp_1_0_incomingWindow
,
932 &hf_amqp_1_0_nextOutgoingId
,
933 &hf_amqp_1_0_outgoingWindow
,
935 &hf_amqp_1_0_deliveryCount
,
936 &hf_amqp_1_0_linkCredit
,
937 &hf_amqp_1_0_available
,
940 &hf_amqp_1_0_properties
};
941 static int * const amqp_1_0_amqp_transfer_items
[] = { &hf_amqp_1_0_handle
,
942 &hf_amqp_1_0_deliveryId
,
943 &hf_amqp_1_0_deliveryTag
,
944 &hf_amqp_1_0_messageFormat
,
945 &hf_amqp_1_0_settled
,
947 &hf_amqp_1_0_rcvSettleMode
,
950 &hf_amqp_1_0_aborted
,
951 &hf_amqp_1_0_batchable
};
952 static int * const amqp_1_0_amqp_disposition_items
[] = { &hf_amqp_1_0_role
,
955 &hf_amqp_1_0_settled
,
957 &hf_amqp_1_0_batchable
};
958 static int * const amqp_1_0_amqp_detach_items
[] = { &hf_amqp_1_0_handle
,
960 &hf_amqp_1_0_error
};
961 static int * const amqp_1_0_amqp_end_items
[] = { &hf_amqp_1_0_error
};
962 static int * const amqp_1_0_amqp_close_items
[] = { &hf_amqp_1_0_error
};
963 static int * const amqp_1_0_error_items
[] = { &hf_amqp_1_0_condition
,
964 &hf_amqp_1_0_description
,
966 static int * const amqp_1_0_messageHeader_items
[] = { &hf_amqp_1_0_durable
,
967 &hf_amqp_1_0_priority
,
969 &hf_amqp_1_0_firstAcquirer
,
970 &hf_amqp_1_0_deliveryCount
};
971 static int * const amqp_1_0_received_items
[] = { &hf_amqp_1_0_sectionNumber
,
972 &hf_amqp_1_0_sectionOffset
};
973 static int * const amqp_1_0_rejected_items
[] = { &hf_amqp_1_0_error
};
974 static int * const amqp_1_0_modified_items
[] = { &hf_amqp_1_0_deliveryFailed
,
975 &hf_amqp_1_0_undeliverableHere
,
976 &hf_amqp_1_0_messageAnnotations
};
977 static int * const amqp_1_0_source_items
[] = { &hf_amqp_1_0_address
,
978 &hf_amqp_1_0_terminusDurable
,
979 &hf_amqp_1_0_expiryPolicy
,
980 &hf_amqp_1_0_timeout
,
981 &hf_amqp_1_0_dynamic
,
982 &hf_amqp_1_0_dynamicNodeProperties
,
983 &hf_amqp_1_0_distributionMode
,
985 &hf_amqp_1_0_defaultOutcome
,
986 &hf_amqp_1_0_outcomes
,
987 &hf_amqp_1_0_capabilities
};
988 static int * const amqp_1_0_target_items
[] = { &hf_amqp_1_0_address
,
989 &hf_amqp_1_0_terminusDurable
,
990 &hf_amqp_1_0_expiryPolicy
,
991 &hf_amqp_1_0_timeout
,
992 &hf_amqp_1_0_dynamic
,
993 &hf_amqp_1_0_dynamicNodeProperties
,
994 &hf_amqp_1_0_capabilities
};
995 static int * const amqp_1_0_messageProperties_items
[] = { &hf_amqp_1_0_messageId
,
998 &hf_amqp_1_0_subject
,
999 &hf_amqp_1_0_replyTo
,
1000 &hf_amqp_1_0_correlationId
,
1001 &hf_amqp_1_0_contentType
,
1002 &hf_amqp_1_0_contentEncoding
,
1003 &hf_amqp_1_0_absoluteExpiryTime
,
1004 &hf_amqp_1_0_creationTime
,
1005 &hf_amqp_1_0_groupId
,
1006 &hf_amqp_1_0_groupSequence
,
1007 &hf_amqp_1_0_replyToGroupId
};
1008 static int * const amqp_1_0_coordinator_items
[] = { &hf_amqp_1_0_capabilities
};
1009 static int * const amqp_1_0_declare_items
[] = { &hf_amqp_1_0_globalId
};
1010 static int * const amqp_1_0_discharge_items
[] = { &hf_amqp_1_0_txnId
,
1011 &hf_amqp_1_0_fail
};
1012 static int * const amqp_1_0_declared_items
[] = { &hf_amqp_1_0_txnId
};
1013 static int * const amqp_1_0_transactionalState_items
[] = { &hf_amqp_1_0_txnId
,
1014 &hf_amqp_1_0_outcome
};
1018 static int hf_amqp_0_10_format
;
1019 static int hf_amqp_0_10_position
;
1020 static int hf_amqp_0_10_type
;
1021 static int hf_amqp_0_10_size
;
1022 static int hf_amqp_0_10_track
;
1023 static int hf_amqp_0_10_class
;
1024 static int hf_amqp_0_10_connection_method
;
1025 static int hf_amqp_0_10_session_method
;
1026 static int hf_amqp_0_10_execution_method
;
1027 static int hf_amqp_0_10_message_method
;
1028 static int hf_amqp_0_10_tx_method
;
1029 static int hf_amqp_0_10_dtx_method
;
1030 static int hf_amqp_0_10_exchange_method
;
1031 static int hf_amqp_0_10_queue_method
;
1032 static int hf_amqp_0_10_file_method
;
1033 static int hf_amqp_0_10_stream_method
;
1034 static int hf_amqp_0_10_argument_packing_flags
;
1035 static int hf_amqp_0_10_session_header
;
1036 static int hf_amqp_0_10_session_header_sync
;
1037 static int hf_amqp_0_10_struct32_size
;
1038 static int hf_amqp_0_10_struct32
;
1039 static int hf_amqp_0_10_struct32_padding
;
1040 static int hf_amqp_0_10_struct32_class
;
1041 static int hf_amqp_0_10_struct32_struct
;
1042 static int hf_amqp_0_10_array_type
;
1043 static int hf_amqp_0_10_array_element_count
;
1044 static int hf_amqp_0_10_array_string
;
1045 static int hf_amqp_0_10_message_body
;
1046 static int hf_amqp_0_10_dtx_xid
;
1047 static int hf_amqp_0_10_dtx_xid_format
;
1048 static int hf_amqp_0_10_dtx_xid_global_id
;
1049 static int hf_amqp_0_10_dtx_xid_branch_id
;
1050 static int hf_amqp_0_10_struct_delivery_properties_discard_unroutable
;
1051 static int hf_amqp_0_10_struct_delivery_properties_immediate
;
1052 static int hf_amqp_0_10_struct_delivery_properties_redelivered
;
1053 static int hf_amqp_0_10_struct_delivery_properties_priority
;
1054 static int hf_amqp_0_10_struct_delivery_properties_mode
;
1055 static int hf_amqp_0_10_struct_delivery_properties_ttl
;
1056 static int hf_amqp_0_10_struct_delivery_properties_timestamp
;
1057 static int hf_amqp_0_10_struct_delivery_properties_expiration
;
1058 static int hf_amqp_0_10_struct_delivery_properties_exchange
;
1059 static int hf_amqp_0_10_struct_delivery_properties_routing_key
;
1060 static int hf_amqp_0_10_struct_delivery_properties_resume_ttl
;
1061 static int hf_amqp_0_10_struct_fragment_properties_first
;
1062 static int hf_amqp_0_10_struct_fragment_properties_last
;
1063 static int hf_amqp_0_10_struct_fragment_properties_size
;
1064 /* static int hf_amqp_0_10_struct_message_properties; */
1065 static int hf_amqp_0_10_struct_message_properties_content_len
;
1066 static int hf_amqp_0_10_struct_message_properties_message_id
;
1067 static int hf_amqp_0_10_struct_message_properties_correlation
;
1068 static int hf_amqp_0_10_struct_message_properties_reply_to
;
1069 static int hf_amqp_0_10_struct_message_properties_content_type
;
1070 static int hf_amqp_0_10_struct_message_properties_content_encoding
;
1071 static int hf_amqp_0_10_struct_message_properties_user_id
;
1072 static int hf_amqp_0_10_struct_message_properties_app_id
;
1073 static int hf_amqp_0_10_struct_message_properties_application_headers
;
1074 static int hf_amqp_0_10_struct_reply_to_exchange
;
1075 static int hf_amqp_0_10_struct_reply_to_routing_key
;
1076 static int hf_amqp_0_10_struct_acquired_transfers
;
1077 static int hf_amqp_0_10_struct_resume_result_offset
;
1078 static int hf_amqp_0_10_struct_exchange_query_result_durable
;
1079 static int hf_amqp_0_10_struct_exchange_query_result_not_found
;
1080 static int hf_amqp_0_10_struct_exchange_bound_result_exchange_not_found
;
1081 static int hf_amqp_0_10_struct_exchange_bound_result_queue_not_found
;
1082 static int hf_amqp_0_10_struct_exchange_bound_result_queue_not_matched
;
1083 static int hf_amqp_0_10_struct_exchange_bound_result_key_not_matched
;
1084 static int hf_amqp_0_10_struct_exchange_bound_result_args_not_matched
;
1085 static int hf_amqp_0_10_struct_queue_query_result_durable
;
1086 static int hf_amqp_0_10_struct_queue_query_result_exclusive
;
1087 static int hf_amqp_0_10_struct_queue_query_result_auto_delete
;
1088 static int hf_amqp_0_10_struct_queue_query_result_message_count
;
1089 static int hf_amqp_0_10_struct_queue_query_result_subscriber_count
;
1090 static int hf_amqp_0_10_struct_file_properties_content_type
;
1091 static int hf_amqp_0_10_struct_file_properties_content_encoding
;
1092 static int hf_amqp_0_10_struct_file_properties_headers
;
1093 static int hf_amqp_0_10_struct_file_properties_priority
;
1094 static int hf_amqp_0_10_struct_file_properties_reply_to
;
1095 static int hf_amqp_0_10_struct_file_properties_message_id
;
1096 static int hf_amqp_0_10_struct_file_properties_filename
;
1097 static int hf_amqp_0_10_struct_file_properties_timestamp
;
1098 static int hf_amqp_0_10_struct_file_properties_cluster_id
;
1099 static int hf_amqp_0_10_struct_stream_properties_content_type
;
1100 static int hf_amqp_0_10_struct_stream_properties_content_encoding
;
1101 static int hf_amqp_0_10_struct_stream_properties_headers
;
1102 static int hf_amqp_0_10_struct_stream_properties_priority
;
1103 static int hf_amqp_0_10_struct_stream_properties_timestamp
;
1104 static int hf_amqp_0_10_method_session_attach_name
;
1105 static int hf_amqp_0_10_method_session_attach_name_size
;
1106 static int hf_amqp_0_10_method_session_attach_force
;
1107 static int hf_amqp_0_10_method_session_detached_code
;
1108 static int hf_amqp_0_10_method_session_timeout
;
1109 static int hf_amqp_0_10_method_session_completed_timely
;
1110 static int hf_amqp_0_10_method_session_flush_expected
;
1111 static int hf_amqp_0_10_method_session_flush_confirmed
;
1112 static int hf_amqp_0_10_method_session_flush_completed
;
1113 static int hf_amqp_0_10_method_session_command_point_id
;
1114 static int hf_amqp_0_10_method_session_command_point_offset
;
1115 static int hf_amqp_0_10_method_session_commands
;
1116 static int hf_amqp_0_10_method_session_fragments
;
1117 static int hf_amqp_0_10_method_execution_command_id
;
1118 static int hf_amqp_0_10_method_execution_exception_error
;
1119 static int hf_amqp_0_10_method_execution_field_index
;
1120 static int hf_amqp_0_10_method_execution_description
;
1121 static int hf_amqp_0_10_method_execution_error_info
;
1122 static int hf_amqp_0_10_method_message_transfer_destination
;
1123 static int hf_amqp_0_10_method_message_transfer_accept_mode
;
1124 static int hf_amqp_0_10_method_message_transfer_acquire_mode
;
1125 static int hf_amqp_0_10_method_message_accept_transfers
;
1126 static int hf_amqp_0_10_method_message_transfer_reject_code
;
1127 static int hf_amqp_0_10_method_message_reject_text
;
1128 static int hf_amqp_0_10_method_message_release_set_redelivered
;
1129 static int hf_amqp_0_10_method_message_dest
;
1130 static int hf_amqp_0_10_method_message_resume_id
;
1131 static int hf_amqp_0_10_method_message_subscribe_queue
;
1132 static int hf_amqp_0_10_method_message_subscribe_exclusive
;
1133 static int hf_amqp_0_10_method_message_subscribe_resume_ttl
;
1134 static int hf_amqp_0_10_method_message_subscribe_args
;
1135 static int hf_amqp_0_10_method_message_flow_mode
;
1136 static int hf_amqp_0_10_method_message_credit_unit
;
1137 static int hf_amqp_0_10_method_message_credit_value
;
1138 static int hf_amqp_0_10_method_dtx_start_join
;
1139 static int hf_amqp_0_10_method_dtx_start_resume
;
1140 static int hf_amqp_0_10_method_dtx_end_fail
;
1141 static int hf_amqp_0_10_method_dtx_end_suspend
;
1142 static int hf_amqp_0_10_method_dtx_commit_one_phase
;
1143 static int hf_amqp_0_10_method_dtx_set_timeout_timeout
;
1144 static int hf_amqp_0_10_method_exchange_declare_exchange
;
1145 static int hf_amqp_0_10_method_exchange_declare_type
;
1146 static int hf_amqp_0_10_method_exchange_declare_alt_exchange
;
1147 static int hf_amqp_0_10_method_exchange_declare_passive
;
1148 static int hf_amqp_0_10_method_exchange_declare_durable
;
1149 static int hf_amqp_0_10_method_exchange_declare_auto_delete
;
1150 static int hf_amqp_0_10_method_exchange_declare_arguments
;
1151 static int hf_amqp_0_10_method_exchange_delete_if_unused
;
1152 static int hf_amqp_0_10_method_exchange_bind_queue
;
1153 static int hf_amqp_0_10_method_exchange_binding_key
;
1154 static int hf_amqp_0_10_method_queue_name
;
1155 static int hf_amqp_0_10_method_queue_alt_exchange
;
1156 static int hf_amqp_0_10_method_queue_declare_passive
;
1157 static int hf_amqp_0_10_method_queue_declare_durable
;
1158 static int hf_amqp_0_10_method_queue_declare_exclusive
;
1159 static int hf_amqp_0_10_method_queue_declare_auto_delete
;
1160 static int hf_amqp_0_10_method_queue_declare_arguments
;
1161 static int hf_amqp_0_10_method_queue_delete_if_unused
;
1162 static int hf_amqp_0_10_method_queue_delete_if_empty
;
1163 static int hf_amqp_0_10_method_file_qos_prefetch_size
;
1164 static int hf_amqp_0_10_method_file_qos_prefetch_count
;
1165 static int hf_amqp_0_10_method_file_qos_global
;
1166 static int hf_amqp_0_10_method_file_consumer_tag
;
1167 static int hf_amqp_0_10_method_file_consume_no_local
;
1168 static int hf_amqp_0_10_method_file_consume_no_ack
;
1169 static int hf_amqp_0_10_method_file_consume_exclusive
;
1170 static int hf_amqp_0_10_method_file_consume_nowait
;
1171 static int hf_amqp_0_10_method_file_consume_arguments
;
1172 static int hf_amqp_0_10_method_file_identifier
;
1173 static int hf_amqp_0_10_method_file_open_content_size
;
1174 static int hf_amqp_0_10_method_file_open_ok_staged_size
;
1175 static int hf_amqp_0_10_method_file_publish_exchange
;
1176 static int hf_amqp_0_10_method_file_publish_routing_key
;
1177 static int hf_amqp_0_10_method_file_publish_mandatory
;
1178 static int hf_amqp_0_10_method_file_publish_immediate
;
1179 static int hf_amqp_0_10_method_file_return_reply_code
;
1180 static int hf_amqp_0_10_method_file_return_reply_text
;
1181 static int hf_amqp_0_10_method_file_return_exchange
;
1182 static int hf_amqp_0_10_method_file_return_routing_key
;
1183 static int hf_amqp_0_10_method_file_deliver_consumer_tag
;
1184 static int hf_amqp_0_10_method_file_deliver_delivery_tag
;
1185 static int hf_amqp_0_10_method_file_deliver_redelivered
;
1186 static int hf_amqp_0_10_method_file_deliver_exchange
;
1187 static int hf_amqp_0_10_method_file_deliver_routing_key
;
1188 static int hf_amqp_0_10_method_file_ack_delivery_tag
;
1189 static int hf_amqp_0_10_method_file_ack_multiple
;
1190 static int hf_amqp_0_10_method_file_reject_delivery_tag
;
1191 static int hf_amqp_0_10_method_file_reject_requeue
;
1192 static int hf_amqp_0_10_method_stream_qos_prefetch_size
;
1193 static int hf_amqp_0_10_method_stream_qos_prefetch_count
;
1194 /* static int hf_amqp_0_10_method_stream_qos_consume_rate; */
1195 static int hf_amqp_0_10_method_stream_qos_global
;
1196 static int hf_amqp_0_10_method_stream_consumer_tag
;
1197 static int hf_amqp_0_10_method_stream_consume_no_local
;
1198 static int hf_amqp_0_10_method_stream_consume_exclusive
;
1199 static int hf_amqp_0_10_method_stream_consume_nowait
;
1200 static int hf_amqp_0_10_method_stream_consume_arguments
;
1201 static int hf_amqp_0_10_method_stream_publish_exchange
;
1202 static int hf_amqp_0_10_method_stream_publish_routing_key
;
1203 static int hf_amqp_0_10_method_stream_publish_mandatory
;
1204 static int hf_amqp_0_10_method_stream_publish_immediate
;
1205 static int hf_amqp_0_10_method_stream_return_reply_code
;
1206 static int hf_amqp_0_10_method_stream_return_reply_text
;
1207 static int hf_amqp_0_10_method_stream_return_exchange
;
1208 static int hf_amqp_0_10_method_stream_return_routing_key
;
1209 static int hf_amqp_0_10_method_stream_deliver_consumer_tag
;
1210 static int hf_amqp_0_10_method_stream_deliver_delivery_tag
;
1211 static int hf_amqp_0_10_method_stream_deliver_exchange
;
1212 static int hf_amqp_0_10_method_stream_deliver_queue
;
1213 static int hf_amqp_channel
;
1214 static int hf_amqp_reserved
;
1215 static int hf_amqp_0_9_type
;
1216 static int hf_amqp_0_9_length
;
1217 static int hf_amqp_0_9_method_class_id
;
1218 static int hf_amqp_method_connection_method_id
;
1219 static int hf_amqp_method_channel_method_id
;
1220 static int hf_amqp_method_access_method_id
;
1221 static int hf_amqp_method_exchange_method_id
;
1222 static int hf_amqp_method_queue_method_id
;
1223 static int hf_amqp_method_basic_method_id
;
1224 static int hf_amqp_method_file_method_id
;
1225 static int hf_amqp_method_stream_method_id
;
1226 static int hf_amqp_method_tx_method_id
;
1227 static int hf_amqp_method_dtx_method_id
;
1228 static int hf_amqp_method_tunnel_method_id
;
1229 static int hf_amqp_method_confirm_method_id
;
1230 static int hf_amqp_method_arguments
;
1231 static int hf_amqp_method_connection_start_version_major
;
1232 static int hf_amqp_method_connection_start_version_minor
;
1233 static int hf_amqp_method_connection_start_server_properties
;
1234 static int hf_amqp_0_9_method_connection_start_mechanisms
;
1235 static int hf_amqp_0_10_method_connection_start_mechanisms
;
1236 static int hf_amqp_0_9_method_connection_start_locales
;
1237 static int hf_amqp_0_10_method_connection_start_locales
;
1238 static int hf_amqp_method_connection_start_ok_client_properties
;
1239 static int hf_amqp_method_connection_start_ok_mechanism
;
1240 static int hf_amqp_method_connection_start_ok_response
;
1241 static int hf_amqp_method_connection_start_ok_locale
;
1242 static int hf_amqp_method_connection_secure_challenge
;
1243 static int hf_amqp_method_connection_secure_ok_response
;
1244 static int hf_amqp_method_connection_tune_channel_max
;
1245 static int hf_amqp_0_9_method_connection_tune_frame_max
;
1246 static int hf_amqp_0_10_method_connection_tune_frame_max
;
1247 static int hf_amqp_0_9_method_connection_tune_heartbeat
;
1248 static int hf_amqp_0_10_method_connection_tune_heartbeat_min
;
1249 static int hf_amqp_0_10_method_connection_tune_heartbeat_max
;
1250 static int hf_amqp_method_connection_tune_ok_channel_max
;
1251 static int hf_amqp_0_9_method_connection_tune_ok_frame_max
;
1252 static int hf_amqp_0_10_method_connection_tune_ok_frame_max
;
1253 static int hf_amqp_method_connection_tune_ok_heartbeat
;
1254 static int hf_amqp_method_connection_open_virtual_host
;
1255 static int hf_amqp_0_9_method_connection_open_capabilities
;
1256 static int hf_amqp_0_10_method_connection_open_capabilities
;
1257 static int hf_amqp_0_9_method_connection_open_insist
;
1258 static int hf_amqp_0_10_method_connection_open_insist
;
1259 static int hf_amqp_0_9_method_connection_open_ok_known_hosts
;
1260 static int hf_amqp_0_10_method_connection_open_ok_known_hosts
;
1261 static int hf_amqp_method_connection_redirect_host
;
1262 static int hf_amqp_0_9_method_connection_redirect_known_hosts
;
1263 static int hf_amqp_0_10_method_connection_redirect_known_hosts
;
1264 static int hf_amqp_0_9_method_connection_close_reply_code
;
1265 static int hf_amqp_0_10_method_connection_close_reply_code
;
1266 static int hf_amqp_method_connection_close_reply_text
;
1267 static int hf_amqp_method_connection_close_class_id
;
1268 static int hf_amqp_method_connection_close_method_id
;
1269 static int hf_amqp_method_connection_blocked_reason
;
1270 static int hf_amqp_method_channel_open_out_of_band
;
1271 static int hf_amqp_method_channel_open_ok_channel_id
;
1272 static int hf_amqp_method_channel_flow_active
;
1273 static int hf_amqp_method_channel_flow_ok_active
;
1274 static int hf_amqp_method_channel_close_reply_code
;
1275 static int hf_amqp_method_channel_close_reply_text
;
1276 static int hf_amqp_method_channel_close_class_id
;
1277 static int hf_amqp_method_channel_close_method_id
;
1278 static int hf_amqp_method_channel_resume_channel_id
;
1279 static int hf_amqp_method_access_request_realm
;
1280 static int hf_amqp_method_access_request_exclusive
;
1281 static int hf_amqp_method_access_request_passive
;
1282 static int hf_amqp_method_access_request_active
;
1283 static int hf_amqp_method_access_request_write
;
1284 static int hf_amqp_method_access_request_read
;
1285 static int hf_amqp_method_access_request_ok_ticket
;
1286 static int hf_amqp_method_exchange_declare_ticket
;
1287 static int hf_amqp_method_exchange_declare_exchange
;
1288 static int hf_amqp_method_exchange_declare_type
;
1289 static int hf_amqp_method_exchange_declare_passive
;
1290 static int hf_amqp_method_exchange_declare_durable
;
1291 static int hf_amqp_method_exchange_declare_auto_delete
;
1292 static int hf_amqp_method_exchange_declare_internal
;
1293 static int hf_amqp_method_exchange_declare_nowait
;
1294 static int hf_amqp_method_exchange_declare_arguments
;
1295 static int hf_amqp_method_exchange_bind_destination
;
1296 static int hf_amqp_method_exchange_bind_source
;
1297 static int hf_amqp_method_exchange_bind_routing_key
;
1298 static int hf_amqp_method_exchange_bind_nowait
;
1299 static int hf_amqp_method_exchange_bind_arguments
;
1300 static int hf_amqp_method_exchange_delete_ticket
;
1301 static int hf_amqp_method_exchange_delete_exchange
;
1302 static int hf_amqp_method_exchange_delete_if_unused
;
1303 static int hf_amqp_method_exchange_delete_nowait
;
1304 static int hf_amqp_method_queue_declare_ticket
;
1305 static int hf_amqp_method_queue_declare_queue
;
1306 static int hf_amqp_method_queue_declare_passive
;
1307 static int hf_amqp_method_queue_declare_durable
;
1308 static int hf_amqp_method_queue_declare_exclusive
;
1309 static int hf_amqp_method_queue_declare_auto_delete
;
1310 static int hf_amqp_method_queue_declare_nowait
;
1311 static int hf_amqp_method_queue_declare_arguments
;
1312 static int hf_amqp_method_queue_declare_ok_queue
;
1313 static int hf_amqp_method_queue_declare_ok_message_count
;
1314 static int hf_amqp_method_queue_declare_ok_consumer_count
;
1315 static int hf_amqp_method_queue_bind_ticket
;
1316 static int hf_amqp_method_queue_bind_queue
;
1317 static int hf_amqp_method_queue_bind_exchange
;
1318 static int hf_amqp_method_queue_bind_routing_key
;
1319 static int hf_amqp_method_queue_bind_nowait
;
1320 static int hf_amqp_method_queue_bind_arguments
;
1321 static int hf_amqp_method_queue_unbind_ticket
;
1322 static int hf_amqp_method_queue_unbind_queue
;
1323 static int hf_amqp_method_queue_unbind_exchange
;
1324 static int hf_amqp_method_queue_unbind_routing_key
;
1325 static int hf_amqp_method_queue_unbind_arguments
;
1326 static int hf_amqp_method_queue_purge_ticket
;
1327 static int hf_amqp_method_queue_purge_queue
;
1328 static int hf_amqp_method_queue_purge_nowait
;
1329 static int hf_amqp_method_queue_purge_ok_message_count
;
1330 static int hf_amqp_method_queue_delete_ticket
;
1331 static int hf_amqp_method_queue_delete_queue
;
1332 static int hf_amqp_method_queue_delete_if_unused
;
1333 static int hf_amqp_method_queue_delete_if_empty
;
1334 static int hf_amqp_method_queue_delete_nowait
;
1335 static int hf_amqp_method_queue_delete_ok_message_count
;
1336 static int hf_amqp_method_basic_qos_prefetch_size
;
1337 static int hf_amqp_method_basic_qos_prefetch_count
;
1338 static int hf_amqp_method_basic_qos_global
;
1339 static int hf_amqp_method_basic_consume_ticket
;
1340 static int hf_amqp_method_basic_consume_queue
;
1341 static int hf_amqp_method_basic_consume_consumer_tag
;
1342 static int hf_amqp_method_basic_consume_no_local
;
1343 static int hf_amqp_method_basic_consume_no_ack
;
1344 static int hf_amqp_method_basic_consume_exclusive
;
1345 static int hf_amqp_method_basic_consume_nowait
;
1346 static int hf_amqp_method_basic_consume_filter
;
1347 static int hf_amqp_method_basic_consume_ok_consumer_tag
;
1348 static int hf_amqp_method_basic_cancel_consumer_tag
;
1349 static int hf_amqp_method_basic_cancel_nowait
;
1350 static int hf_amqp_method_basic_cancel_ok_consumer_tag
;
1351 static int hf_amqp_method_basic_publish_number
;
1352 static int hf_amqp_method_basic_publish_ticket
;
1353 static int hf_amqp_method_basic_publish_exchange
;
1354 static int hf_amqp_method_basic_publish_routing_key
;
1355 static int hf_amqp_method_basic_publish_mandatory
;
1356 static int hf_amqp_method_basic_publish_immediate
;
1357 static int hf_amqp_method_basic_return_reply_code
;
1358 static int hf_amqp_method_basic_return_reply_text
;
1359 static int hf_amqp_method_basic_return_exchange
;
1360 static int hf_amqp_method_basic_return_routing_key
;
1361 static int hf_amqp_method_basic_deliver_consumer_tag
;
1362 static int hf_amqp_method_basic_deliver_delivery_tag
;
1363 static int hf_amqp_method_basic_deliver_redelivered
;
1364 static int hf_amqp_method_basic_deliver_exchange
;
1365 static int hf_amqp_method_basic_deliver_routing_key
;
1366 static int hf_amqp_method_basic_get_ticket
;
1367 static int hf_amqp_method_basic_get_queue
;
1368 static int hf_amqp_method_basic_get_no_ack
;
1369 static int hf_amqp_method_basic_get_ok_delivery_tag
;
1370 static int hf_amqp_method_basic_get_ok_redelivered
;
1371 static int hf_amqp_method_basic_get_ok_exchange
;
1372 static int hf_amqp_method_basic_get_ok_routing_key
;
1373 static int hf_amqp_method_basic_get_ok_message_count
;
1374 static int hf_amqp_method_basic_get_empty_cluster_id
;
1375 static int hf_amqp_method_basic_ack_delivery_tag
;
1376 static int hf_amqp_method_basic_ack_multiple
;
1377 static int hf_amqp_method_basic_reject_delivery_tag
;
1378 static int hf_amqp_method_basic_reject_requeue
;
1379 static int hf_amqp_method_basic_recover_requeue
;
1380 static int hf_amqp_method_basic_nack_delivery_tag
;
1381 static int hf_amqp_method_basic_nack_multiple
;
1382 static int hf_amqp_method_basic_nack_requeue
;
1383 static int hf_amqp_method_file_qos_prefetch_size
;
1384 static int hf_amqp_method_file_qos_prefetch_count
;
1385 static int hf_amqp_method_file_qos_global
;
1386 static int hf_amqp_method_file_consume_ticket
;
1387 static int hf_amqp_method_file_consume_queue
;
1388 static int hf_amqp_method_file_consume_consumer_tag
;
1389 static int hf_amqp_method_file_consume_no_local
;
1390 static int hf_amqp_method_file_consume_no_ack
;
1391 static int hf_amqp_method_file_consume_exclusive
;
1392 static int hf_amqp_method_file_consume_nowait
;
1393 static int hf_amqp_method_file_consume_filter
;
1394 static int hf_amqp_method_file_consume_ok_consumer_tag
;
1395 static int hf_amqp_method_file_cancel_consumer_tag
;
1396 static int hf_amqp_method_file_cancel_nowait
;
1397 static int hf_amqp_method_file_cancel_ok_consumer_tag
;
1398 static int hf_amqp_method_file_open_identifier
;
1399 static int hf_amqp_method_file_open_content_size
;
1400 static int hf_amqp_method_file_open_ok_staged_size
;
1401 static int hf_amqp_method_file_publish_ticket
;
1402 static int hf_amqp_method_file_publish_exchange
;
1403 static int hf_amqp_method_file_publish_routing_key
;
1404 static int hf_amqp_method_file_publish_mandatory
;
1405 static int hf_amqp_method_file_publish_immediate
;
1406 static int hf_amqp_method_file_publish_identifier
;
1407 static int hf_amqp_method_file_return_reply_code
;
1408 static int hf_amqp_method_file_return_reply_text
;
1409 static int hf_amqp_method_file_return_exchange
;
1410 static int hf_amqp_method_file_return_routing_key
;
1411 static int hf_amqp_method_file_deliver_consumer_tag
;
1412 static int hf_amqp_method_file_deliver_delivery_tag
;
1413 static int hf_amqp_method_file_deliver_redelivered
;
1414 static int hf_amqp_method_file_deliver_exchange
;
1415 static int hf_amqp_method_file_deliver_routing_key
;
1416 static int hf_amqp_method_file_deliver_identifier
;
1417 static int hf_amqp_method_file_ack_delivery_tag
;
1418 static int hf_amqp_method_file_ack_multiple
;
1419 static int hf_amqp_method_file_reject_delivery_tag
;
1420 static int hf_amqp_method_file_reject_requeue
;
1421 static int hf_amqp_method_stream_qos_prefetch_size
;
1422 static int hf_amqp_method_stream_qos_prefetch_count
;
1423 static int hf_amqp_method_stream_qos_consume_rate
;
1424 static int hf_amqp_method_stream_qos_global
;
1425 static int hf_amqp_method_stream_consume_ticket
;
1426 static int hf_amqp_method_stream_consume_queue
;
1427 static int hf_amqp_method_stream_consume_consumer_tag
;
1428 static int hf_amqp_method_stream_consume_no_local
;
1429 static int hf_amqp_method_stream_consume_exclusive
;
1430 static int hf_amqp_method_stream_consume_nowait
;
1431 static int hf_amqp_method_stream_consume_filter
;
1432 static int hf_amqp_method_stream_consume_ok_consumer_tag
;
1433 static int hf_amqp_method_stream_cancel_consumer_tag
;
1434 static int hf_amqp_method_stream_cancel_nowait
;
1435 static int hf_amqp_method_stream_cancel_ok_consumer_tag
;
1436 static int hf_amqp_method_stream_publish_ticket
;
1437 static int hf_amqp_method_stream_publish_exchange
;
1438 static int hf_amqp_method_stream_publish_routing_key
;
1439 static int hf_amqp_method_stream_publish_mandatory
;
1440 static int hf_amqp_method_stream_publish_immediate
;
1441 static int hf_amqp_method_stream_return_reply_code
;
1442 static int hf_amqp_method_stream_return_reply_text
;
1443 static int hf_amqp_method_stream_return_exchange
;
1444 static int hf_amqp_method_stream_return_routing_key
;
1445 static int hf_amqp_method_stream_deliver_consumer_tag
;
1446 static int hf_amqp_method_stream_deliver_delivery_tag
;
1447 static int hf_amqp_method_stream_deliver_exchange
;
1448 static int hf_amqp_method_stream_deliver_queue
;
1449 static int hf_amqp_method_dtx_start_dtx_identifier
;
1450 static int hf_amqp_method_tunnel_request_meta_data
;
1451 static int hf_amqp_method_confirm_select_nowait
;
1452 static int hf_amqp_field
;
1453 static int hf_amqp_field_name
;
1454 static int hf_amqp_field_type
;
1455 static int hf_amqp_field_integer
;
1456 static int hf_amqp_field_unsigned_integer
;
1457 static int hf_amqp_field_string
;
1458 static int hf_amqp_field_boolean
;
1459 static int hf_amqp_field_byte
;
1460 static int hf_amqp_field_unsigned_byte
;
1461 static int hf_amqp_field_short_int
;
1462 static int hf_amqp_field_short_uint
;
1463 static int hf_amqp_field_long_int
;
1464 static int hf_amqp_field_float
;
1465 static int hf_amqp_field_double
;
1466 static int hf_amqp_field_decimal
;
1467 static int hf_amqp_field_timestamp
;
1468 static int hf_amqp_field_byte_array
;
1469 static int hf_amqp_header_class_id
;
1470 static int hf_amqp_header_weight
;
1471 static int hf_amqp_header_body_size
;
1472 static int hf_amqp_header_property_flags
;
1473 static int hf_amqp_header_properties
;
1474 static int hf_amqp_header_basic_content_type
;
1475 static int hf_amqp_header_basic_content_encoding
;
1476 static int hf_amqp_header_basic_headers
;
1477 static int hf_amqp_header_basic_delivery_mode
;
1478 static int hf_amqp_header_basic_priority
;
1479 static int hf_amqp_header_basic_correlation_id
;
1480 static int hf_amqp_header_basic_reply_to
;
1481 static int hf_amqp_header_basic_expiration
;
1482 static int hf_amqp_header_basic_message_id
;
1483 static int hf_amqp_header_basic_timestamp
;
1484 static int hf_amqp_header_basic_type
;
1485 static int hf_amqp_header_basic_user_id
;
1486 static int hf_amqp_header_basic_app_id
;
1487 static int hf_amqp_header_basic_cluster_id
;
1488 static int hf_amqp_header_file_content_type
;
1489 static int hf_amqp_header_file_content_encoding
;
1490 static int hf_amqp_header_file_headers
;
1491 static int hf_amqp_header_file_priority
;
1492 static int hf_amqp_header_file_reply_to
;
1493 static int hf_amqp_header_file_message_id
;
1494 static int hf_amqp_header_file_filename
;
1495 static int hf_amqp_header_file_timestamp
;
1496 static int hf_amqp_header_file_cluster_id
;
1497 static int hf_amqp_header_stream_content_type
;
1498 static int hf_amqp_header_stream_content_encoding
;
1499 static int hf_amqp_header_stream_headers
;
1500 static int hf_amqp_header_stream_priority
;
1501 static int hf_amqp_header_stream_timestamp
;
1502 static int hf_amqp_header_tunnel_headers
;
1503 static int hf_amqp_header_tunnel_proxy_name
;
1504 static int hf_amqp_header_tunnel_data_name
;
1505 static int hf_amqp_header_tunnel_durable
;
1506 static int hf_amqp_header_tunnel_broadcast
;
1507 static int hf_amqp_0_10_dtx_xa_status
;
1508 static int hf_amqp_payload
;
1509 static int hf_amqp_init_protocol
;
1510 static int hf_amqp_init_id
;
1511 static int hf_amqp_init_id_major
;
1512 static int hf_amqp_init_id_minor
;
1513 static int hf_amqp_init_version_major
;
1514 static int hf_amqp_init_version_minor
;
1515 static int hf_amqp_init_version_revision
;
1516 static int hf_amqp_message_in
;
1517 static int hf_amqp_ack_in
;
1518 static int hf_amqp_method_connection_start_server_properties_size
;
1519 static int hf_amqp_0_10_method_connection_start_mechanisms_size
;
1520 static int hf_amqp_0_10_method_connection_start_locales_size
;
1521 static int hf_amqp_method_connection_start_ok_client_properties_size
;
1522 static int hf_amqp_0_10_method_connection_open_capabilities_size
;
1523 static int hf_amqp_0_10_method_connection_open_ok_known_hosts_size
;
1524 static int hf_amqp_0_10_method_connection_redirect_known_hosts_size
;
1525 static int hf_amqp_0_10_method_execution_error_info_size
;
1526 static int hf_amqp_0_10_method_exchange_declare_arguments_size
;
1527 static int hf_amqp_0_10_method_queue_declare_arguments_size
;
1528 static int hf_amqp_0_10_method_file_consume_arguments_size
;
1529 static int hf_amqp_0_10_method_stream_consume_arguments_size
;
1530 static int hf_amqp_0_10_struct_message_properties_application_headers_size
;
1531 static int hf_amqp_0_10_struct_file_properties_headers_size
;
1532 static int hf_amqp_0_10_struct_stream_properties_headers_size
;
1533 static int hf_amqp_0_10_struct_dtx_recover_result_size
;
1535 static int ett_amqp
;
1536 static int ett_header
;
1537 static int ett_args
;
1538 static int ett_props
;
1539 static int ett_field_table
;
1540 static int ett_amqp_init
;
1541 static int ett_amqp_0_9_field
;
1542 static int ett_amqp_0_10_map
;
1543 static int ett_amqp_0_10_array
;
1544 static int ett_amqp_0_10_struct
;
1545 static int ett_amqp_1_0_list
;
1546 static int ett_amqp_1_0_array
;
1547 static int ett_amqp_1_0_map
;
1549 static expert_field ei_amqp_connection_error
;
1550 static expert_field ei_amqp_channel_error
;
1551 static expert_field ei_amqp_message_undeliverable
;
1552 static expert_field ei_amqp_bad_flag_value
;
1553 static expert_field ei_amqp_unknown_stream_method
;
1554 static expert_field ei_amqp_unknown_basic_method
;
1555 static expert_field ei_amqp_unknown_frame_type
;
1556 static expert_field ei_amqp_field_short
;
1557 static expert_field ei_amqp_bad_length
;
1558 static expert_field ei_amqp_unknown_command_class
;
1559 static expert_field ei_amqp_unknown_tunnel_method
;
1560 static expert_field ei_amqp_unknown_confirm_method
;
1561 static expert_field ei_amqp_invalid_class_code
;
1562 static expert_field ei_amqp_unknown_access_method
;
1563 static expert_field ei_amqp_unknown_tx_method
;
1564 static expert_field ei_amqp_unknown_header_class
;
1565 static expert_field ei_amqp_unknown_connection_method
;
1566 static expert_field ei_amqp_unknown_queue_method
;
1567 static expert_field ei_amqp_unknown_channel_method
;
1568 static expert_field ei_amqp_unknown_dtx_method
;
1569 static expert_field ei_amqp_unknown_method_class
;
1570 static expert_field ei_amqp_unknown_file_method
;
1571 static expert_field ei_amqp_unknown_exchange_method
;
1572 static expert_field ei_amqp_unknown_sasl_command
;
1573 static expert_field ei_amqp_unknown_amqp_command
;
1574 static expert_field ei_amqp_unknown_amqp_type
;
1575 static expert_field ei_amqp_invalid_number_of_params
;
1576 static expert_field ei_amqp_size_exceeds_65K
;
1577 static expert_field ei_amqp_array_type_unknown
;
1579 static dissector_handle_t amqp_tcp_handle
;
1581 static amqp_message_decode_t
*amqp_message_decodes
;
1582 static unsigned num_amqp_message_decodes
;
1584 static void *amqp_message_decode_copy_cb(void *dest
, const void *orig
, size_t len _U_
)
1586 const amqp_message_decode_t
*o
= (const amqp_message_decode_t
*)orig
;
1587 amqp_message_decode_t
*d
= (amqp_message_decode_t
*)dest
;
1589 d
->match_criteria
= o
->match_criteria
;
1590 d
->topic_pattern
= g_strdup(o
->topic_pattern
);
1591 d
->payload_proto_name
= g_strdup(o
->payload_proto_name
);
1592 d
->payload_proto
= o
->payload_proto
;
1593 d
->topic_more_info
= g_strdup(o
->topic_more_info
);
1598 static bool amqp_message_decode_update_cb(void *record
, char **error
)
1600 amqp_message_decode_t
*u
= (amqp_message_decode_t
*)record
;
1602 if (u
->topic_pattern
== NULL
|| strlen(u
->topic_pattern
) == 0) {
1603 *error
= g_strdup("Missing topic pattern");
1607 if (u
->payload_proto_name
== NULL
|| strlen(u
->payload_proto_name
) == 0) {
1608 *error
= g_strdup("Missing payload protocol");
1612 if (u
->match_criteria
== MATCH_CRITERIA_REGEX
) {
1613 u
->topic_regex
= g_regex_new(u
->topic_pattern
, (GRegexCompileFlags
) G_REGEX_OPTIMIZE
, (GRegexMatchFlags
) 0, NULL
);
1614 if (!u
->topic_regex
) {
1615 *error
= g_strdup_printf("Invalid regex: %s", u
->topic_pattern
);
1623 static void amqp_message_decode_free_cb(void *record
)
1625 amqp_message_decode_t
*u
= (amqp_message_decode_t
*)record
;
1627 g_free(u
->topic_pattern
);
1628 if (u
->topic_regex
) {
1629 g_regex_unref(u
->topic_regex
);
1631 g_free(u
->payload_proto_name
);
1632 g_free(u
->topic_more_info
);
1635 UAT_VS_DEF(message_decode
, match_criteria
, amqp_message_decode_t
, uint32_t, MATCH_CRITERIA_EQUAL
, "Equal to")
1636 UAT_CSTRING_CB_DEF(message_decode
, topic_pattern
, amqp_message_decode_t
)
1637 UAT_DISSECTOR_DEF(message_decode
, payload_proto
, payload_proto
, payload_proto_name
, amqp_message_decode_t
)
1638 UAT_CSTRING_CB_DEF(message_decode
, topic_more_info
, amqp_message_decode_t
)
1641 /* Various enumerations */
1643 static const value_string amqp_1_0_SASL_code_value
[] = {
1652 static const true_false_string amqp_1_0_role_value
= {
1657 static const value_string amqp_1_0_sndSettleMode_value
[] = {
1664 static const value_string amqp_1_0_rcvSettleMode_value
[] = {
1670 static const value_string amqp_1_0_terminus_durable_value
[] = {
1672 {1, "configuration"},
1673 {2, "unsettled-state"},
1677 static const value_string amqp_1_0_AMQP_performatives
[] = {
1678 {AMQP_1_0_AMQP_OPEN
, "open"},
1679 {AMQP_1_0_AMQP_BEGIN
, "begin"},
1680 {AMQP_1_0_AMQP_ATTACH
, "attach"},
1681 {AMQP_1_0_AMQP_FLOW
, "flow"},
1682 {AMQP_1_0_AMQP_TRANSFER
, "transfer"},
1683 {AMQP_1_0_AMQP_DISPOSITION
, "disposition"},
1684 {AMQP_1_0_AMQP_DETACH
, "detach"},
1685 {AMQP_1_0_AMQP_END
, "end"},
1686 {AMQP_1_0_AMQP_CLOSE
, "close"},
1690 static const value_string amqp_1_0_SASL_methods
[] = {
1691 {AMQP_1_0_SASL_MECHANISMS
, "sasl.mechanisms"},
1692 {AMQP_1_0_SASL_INIT
, "sasl.init"},
1693 {AMQP_1_0_SASL_CHALLENGE
, "sasl.challenge"},
1694 {AMQP_1_0_SASL_RESPONSE
, "sasl.response"},
1695 {AMQP_1_0_SASL_OUTCOME
, "sasl.outcome"},
1699 static const value_string amqp_1_0_type
[] = {
1700 {AMQP_1_0_AMQP_FRAME
, "AMQP"},
1701 {AMQP_1_0_SASL_FRAME
, "SASL"},
1702 {AMQP_1_0_TLS_FRAME
, "TLS"},
1706 static const value_string amqp_0_10_frame_position
[] = {
1726 static const value_string amqp_0_10_frame_types
[] = {
1734 static const value_string amqp_0_10_frame_tracks
[] = {
1740 static const value_string amqp_0_10_class
[] = {
1741 {AMQP_0_10_CLASS_CONNECTION
, "Connection"},
1742 {AMQP_0_10_CLASS_SESSION
, "Session"},
1743 {AMQP_0_10_CLASS_EXECUTION
, "Execution"},
1744 {AMQP_0_10_CLASS_MESSAGE
, "Message"},
1745 {AMQP_0_10_CLASS_TX
, "Tx"},
1746 {AMQP_0_10_CLASS_DTX
, "Dtx"},
1747 {AMQP_0_10_CLASS_EXCHANGE
, "Exchange"},
1748 {AMQP_0_10_CLASS_QUEUE
, "Queue"},
1749 {AMQP_0_10_CLASS_FILE
, "File"},
1750 {AMQP_0_10_CLASS_STREAM
, "Stream"},
1754 static const value_string amqp_0_10_connection_methods
[] = {
1755 {AMQP_0_10_METHOD_CONNECTION_START
, "connection.start"},
1756 {AMQP_0_10_METHOD_CONNECTION_START_OK
, "connection.start-ok"},
1757 {AMQP_0_10_METHOD_CONNECTION_SECURE
, "connection.secure"},
1758 {AMQP_0_10_METHOD_CONNECTION_SECURE_OK
, "connection.secure-ok"},
1759 {AMQP_0_10_METHOD_CONNECTION_TUNE
, "connection.tune"},
1760 {AMQP_0_10_METHOD_CONNECTION_TUNE_OK
, "connection.tune-ok"},
1761 {AMQP_0_10_METHOD_CONNECTION_OPEN
, "connection.open"},
1762 {AMQP_0_10_METHOD_CONNECTION_OPEN_OK
, "connection.open-ok"},
1763 {AMQP_0_10_METHOD_CONNECTION_REDIRECT
, "connection.redirect"},
1764 {AMQP_0_10_METHOD_CONNECTION_HEARTBEAT
, "connection.heartbeat"},
1765 {AMQP_0_10_METHOD_CONNECTION_CLOSE
, "connection.close"},
1766 {AMQP_0_10_METHOD_CONNECTION_CLOSE_OK
, "connection.close-ok"},
1770 static const value_string amqp_0_10_session_methods
[] = {
1771 {AMQP_0_10_METHOD_SESSION_ATTACH
, "session.attach"},
1772 {AMQP_0_10_METHOD_SESSION_ATTACHED
, "session.attached"},
1773 {AMQP_0_10_METHOD_SESSION_DETACH
, "session.detach"},
1774 {AMQP_0_10_METHOD_SESSION_DETACHED
, "session.detached"},
1775 {AMQP_0_10_METHOD_SESSION_REQUEST_TIMEOUT
, "session.request-timeout"},
1776 {AMQP_0_10_METHOD_SESSION_TIMEOUT
, "session.timeout"},
1777 {AMQP_0_10_METHOD_SESSION_COMMAND_POINT
, "session.command-point"},
1778 {AMQP_0_10_METHOD_SESSION_EXPECTED
, "session.expected"},
1779 {AMQP_0_10_METHOD_SESSION_CONFIRMED
, "session.confirmed"},
1780 {AMQP_0_10_METHOD_SESSION_COMPLETED
, "session.completed"},
1781 {AMQP_0_10_METHOD_SESSION_KNOWN_COMPLETED
, "session.known-completed"},
1782 {AMQP_0_10_METHOD_SESSION_FLUSH
, "session.flush"},
1783 {AMQP_0_10_METHOD_SESSION_GAP
, "session.gap"},
1787 static const value_string amqp_0_10_execution_methods
[] = {
1788 {AMQP_0_10_METHOD_EXECUTION_SYNC
, "execution.sync"},
1789 {AMQP_0_10_METHOD_EXECUTION_RESULT
, "execution.result"},
1790 {AMQP_0_10_METHOD_EXECUTION_EXCEPTION
, "execution.exception"},
1794 static const value_string amqp_0_10_message_methods
[] = {
1795 {AMQP_0_10_METHOD_MESSAGE_TRANSFER
, "message.transfer"},
1796 {AMQP_0_10_METHOD_MESSAGE_ACCEPT
, "message.accept"},
1797 {AMQP_0_10_METHOD_MESSAGE_REJECT
, "message.reject"},
1798 {AMQP_0_10_METHOD_MESSAGE_RELEASE
, "message.release"},
1799 {AMQP_0_10_METHOD_MESSAGE_ACQUIRE
, "message.acquire"},
1800 {AMQP_0_10_METHOD_MESSAGE_RESUME
, "message.resume"},
1801 {AMQP_0_10_METHOD_MESSAGE_SUBSCRIBE
, "message.subscribe"},
1802 {AMQP_0_10_METHOD_MESSAGE_CANCEL
, "message.cancel"},
1803 {AMQP_0_10_METHOD_MESSAGE_SET_FLOW_MODE
, "message.set-flow-mode"},
1804 {AMQP_0_10_METHOD_MESSAGE_FLOW
, "message.flow"},
1805 {AMQP_0_10_METHOD_MESSAGE_FLUSH
, "message.flush"},
1806 {AMQP_0_10_METHOD_MESSAGE_STOP
, "message.stop"},
1810 static const value_string amqp_0_10_tx_methods
[] = {
1811 {AMQP_0_10_METHOD_TX_SELECT
, "tx.select"},
1812 {AMQP_0_10_METHOD_TX_COMMIT
, "tx.commit"},
1813 {AMQP_0_10_METHOD_TX_ROLLBACK
, "tx.rollback"},
1817 static const value_string amqp_0_10_dtx_methods
[] = {
1818 {AMQP_0_10_METHOD_DTX_SELECT
, "dtx.select"},
1819 {AMQP_0_10_METHOD_DTX_START
, "dtx.start"},
1820 {AMQP_0_10_METHOD_DTX_END
, "dtx.end"},
1821 {AMQP_0_10_METHOD_DTX_COMMIT
, "dtx.commit"},
1822 {AMQP_0_10_METHOD_DTX_FORGET
, "dtx.forget"},
1823 {AMQP_0_10_METHOD_DTX_GET_TIMEOUT
, "dtx.get-timeout"},
1824 {AMQP_0_10_METHOD_DTX_PREPARE
, "dtx.prepare"},
1825 {AMQP_0_10_METHOD_DTX_RECOVER
, "dtx.recover"},
1826 {AMQP_0_10_METHOD_DTX_ROLLBACK
, "dtx.rollback"},
1827 {AMQP_0_10_METHOD_DTX_SET_TIMEOUT
, "dtx.set-timeout"},
1831 static const value_string amqp_0_10_exchange_methods
[] = {
1832 {AMQP_0_10_METHOD_EXCHANGE_DECLARE
, "exchange.declare"},
1833 {AMQP_0_10_METHOD_EXCHANGE_DELETE
, "exchange.delete"},
1834 {AMQP_0_10_METHOD_EXCHANGE_QUERY
, "exchange.query"},
1835 {AMQP_0_10_METHOD_EXCHANGE_BIND
, "exchange.bind"},
1836 {AMQP_0_10_METHOD_EXCHANGE_UNBIND
, "exchange.unbind"},
1837 {AMQP_0_10_METHOD_EXCHANGE_BOUND
, "exchange.bound"},
1841 static const value_string amqp_0_10_queue_methods
[] = {
1842 {AMQP_0_10_METHOD_QUEUE_DECLARE
, "queue.declare"},
1843 {AMQP_0_10_METHOD_QUEUE_DELETE
, "queue.delete"},
1844 {AMQP_0_10_METHOD_QUEUE_PURGE
, "queue.purge"},
1845 {AMQP_0_10_METHOD_QUEUE_QUERY
, "queue.query"},
1849 static const value_string amqp_0_10_file_methods
[] = {
1850 {AMQP_0_10_METHOD_FILE_QOS
, "file.qos"},
1851 {AMQP_0_10_METHOD_FILE_QOS_OK
, "file.qos-ok"},
1852 {AMQP_0_10_METHOD_FILE_CONSUME
, "file.consume"},
1853 {AMQP_0_10_METHOD_FILE_CONSUME_OK
, "file.consume-ok"},
1854 {AMQP_0_10_METHOD_FILE_CANCEL
, "file.cancel"},
1855 {AMQP_0_10_METHOD_FILE_OPEN
, "file.open"},
1856 {AMQP_0_10_METHOD_FILE_OPEN_OK
, "file.open-ok"},
1857 {AMQP_0_10_METHOD_FILE_STAGE
, "file.stage"},
1858 {AMQP_0_10_METHOD_FILE_PUBLISH
, "file.publish"},
1859 {AMQP_0_10_METHOD_FILE_RETURN
, "file.return"},
1860 {AMQP_0_10_METHOD_FILE_DELIVER
, "file.deliver"},
1861 {AMQP_0_10_METHOD_FILE_ACK
, "file.ack"},
1862 {AMQP_0_10_METHOD_FILE_REJECT
, "file.reject"},
1866 static const value_string amqp_0_10_stream_methods
[] = {
1867 {AMQP_0_10_METHOD_STREAM_QOS
, "stream.qos"},
1868 {AMQP_0_10_METHOD_STREAM_QOS_OK
, "stream.qos-ok"},
1869 {AMQP_0_10_METHOD_STREAM_CONSUME
, "stream.consume"},
1870 {AMQP_0_10_METHOD_STREAM_CONSUME_OK
, "stream.consume-ok"},
1871 {AMQP_0_10_METHOD_STREAM_CANCEL
, "stream.cancel"},
1872 {AMQP_0_10_METHOD_STREAM_PUBLISH
, "stream.publish"},
1873 {AMQP_0_10_METHOD_STREAM_RETURN
, "stream.return"},
1874 {AMQP_0_10_METHOD_STREAM_DELIVER
, "stream.deliver"},
1878 static const value_string amqp_0_10_method_connection_close_reply_codes
[] = {
1880 {320, "connection-forced"},
1881 {402, "invalid-path"},
1882 {501, "framing-error"},
1886 static const true_false_string amqp_0_10_session_header_sync
= {
1887 "notification requested", "notification NOT requested"
1890 static const value_string amqp_0_10_method_session_detached_codes
[] = {
1892 {1, "session-busy"},
1893 {2, "transport-busy"},
1894 {3, "not-attached"},
1899 static const value_string amqp_0_10_method_execution_exception_errors
[] = {
1900 {403, "unauthorized-access"},
1902 {405, "resource-locked"},
1903 {406, "precondition-failed"},
1904 {408, "resource-deleted"},
1905 {409, "illegal-state"},
1906 {503, "command-invalid"},
1907 {506, "resource-limit-exceeded"},
1908 {530, "not-allowed"},
1909 {531, "illegal-argument"},
1910 {540, "not-implemented"},
1911 {541, "internal-error"},
1912 {542, "invalid-argument"},
1916 static const value_string amqp_0_10_message_transfer_accept_modes
[] = {
1922 static const value_string amqp_0_10_message_transfer_acquire_modes
[] = {
1923 {0, "pre-acquired"},
1924 {1, "not-acquired"},
1928 static const value_string amqp_0_10_message_transfer_reject_codes
[] = {
1935 static const value_string amqp_0_10_message_flow_modes
[] = {
1941 static const value_string amqp_0_10_message_credit_units
[] = {
1947 static const value_string amqp_0_10_xa_status
[] = {
1948 {0, "Normal execution completion. (xa-ok)"},
1949 {1, "The rollback was caused for an unspecified reason. (xa-rbrollback)"},
1950 {2, "A transaction branch took too long. (xa-rbtimeout)"},
1951 {3, "The transaction branch may have been heuristically completed. (xa-heurhaz)"},
1952 {4, "The transaction branch has been heuristically committed. (xa-heurcom)"},
1953 {5, "The transaction branch has been heuristically rolled back. (xa-heurrb)"},
1954 {6, "The transaction branch has been heuristically committed and rolled back. (xa-heurmix)"},
1955 {7, "The transaction branch was read-only and has been committed. (xa-rdonly)"},
1959 static const value_string amqp_0_10_struct_delivery_properties_priorities
[] = {
1963 {3, "below-average"},
1965 {5, "above-average"},
1973 static const value_string amqp_0_10_struct_delivery_properties_modes
[] = {
1974 {1, "non-persistent"},
1979 static const value_string amqp_0_10_file_return_codes
[] = {
1980 {311, "content-too-large"},
1982 {313, "no-consumers"},
1986 static const value_string amqp_0_10_stream_return_codes
[] = {
1987 {311, "content-too-large"},
1989 {313, "no-consumers"},
1993 static const value_string amqp_0_10_struct32_vals
[] = {
1994 { ((AMQP_0_10_CLASS_MESSAGE
<< 8) | (AMQP_0_10_STRUCT_MESSAGE_DELIVERY_PROPERTIES
)), "message.delivery-properties" },
1995 { ((AMQP_0_10_CLASS_MESSAGE
<< 8) | (AMQP_0_10_STRUCT_MESSAGE_FRAGMENT_PROPERTIES
)), "message.fragment-properties" },
1996 { ((AMQP_0_10_CLASS_MESSAGE
<< 8) | (AMQP_0_10_STRUCT_MESSAGE_MESSAGE_PROPERTIES
)), "message.message-properties" },
1997 { ((AMQP_0_10_CLASS_MESSAGE
<< 8) | (AMQP_0_10_STRUCT_MESSAGE_ACQUIRED
)), "message.acquired" },
1998 { ((AMQP_0_10_CLASS_MESSAGE
<< 8) | (AMQP_0_10_STRUCT_MESSAGE_RESUME_RESULT
)), "message.resume-result" },
1999 { ((AMQP_0_10_CLASS_DTX
<< 8) | (AMQP_0_10_STRUCT_DTX_XA_RESULT
)), "dtx.xa-status" },
2000 { ((AMQP_0_10_CLASS_DTX
<< 8) | (AMQP_0_10_STRUCT_DTX_RECOVER_RESULT
)), "dtx.recover-result" },
2001 { ((AMQP_0_10_CLASS_EXCHANGE
<< 8) | (AMQP_0_10_STRUCT_EXCHANGE_QUERY_RESULT
)), "exchange.exchange-query-result" },
2002 { ((AMQP_0_10_CLASS_EXCHANGE
<< 8) | (AMQP_0_10_STRUCT_EXCHANGE_BOUND_RESULT
)), "exchange.exchange-bound-result" },
2003 { ((AMQP_0_10_CLASS_QUEUE
<< 8) | (AMQP_0_10_STRUCT_QUEUE_QUERY_RESULT
)), "queue.queue-query-result" },
2004 { ((AMQP_0_10_CLASS_FILE
<< 8) | (AMQP_0_10_STRUCT_FILE_PROPERTIES
)), "file.file-properties" },
2005 { ((AMQP_0_10_CLASS_STREAM
<< 8) | (AMQP_0_10_STRUCT_STREAM_PROPERTIES
)), "stream.stream-properties" },
2009 static const value_string amqp_0_9_frame_types
[] = {
2010 {AMQP_0_9_FRAME_TYPE_METHOD
, "Method"},
2011 {AMQP_0_9_FRAME_TYPE_CONTENT_HEADER
, "Content header"},
2012 {AMQP_0_9_FRAME_TYPE_CONTENT_BODY
, "Content body"},
2013 {AMQP_0_9_FRAME_TYPE_OOB_METHOD
, "OOB Method"},
2014 {AMQP_0_9_FRAME_TYPE_OOB_CONTENT_HEADER
, "OOB Content header"},
2015 {AMQP_0_9_FRAME_TYPE_OOB_CONTENT_BODY
, "OOB Content body"},
2016 {AMQP_0_9_FRAME_TYPE_TRACE
, "Trace"},
2017 {AMQP_0_9_FRAME_TYPE_HEARTBEAT
, "Heartbeat"},
2021 static const value_string amqp_0_9_method_classes
[] = {
2022 {AMQP_0_9_CLASS_CONNECTION
, "Connection"},
2023 {AMQP_0_9_CLASS_CHANNEL
, "Channel"},
2024 {AMQP_0_9_CLASS_ACCESS
, "Access"},
2025 {AMQP_0_9_CLASS_EXCHANGE
, "Exchange"},
2026 {AMQP_0_9_CLASS_QUEUE
, "Queue"},
2027 {AMQP_0_9_CLASS_BASIC
, "Basic"},
2028 {AMQP_0_9_CLASS_FILE
, "File"},
2029 {AMQP_0_9_CLASS_STREAM
, "Stream"},
2030 {AMQP_0_9_CLASS_TX
, "Tx"},
2031 {AMQP_0_9_CLASS_DTX
, "Dtx"},
2032 {AMQP_0_9_CLASS_TUNNEL
, "Tunnel"},
2033 {AMQP_0_9_CLASS_CONFIRM
, "Confirm"},
2037 static const value_string amqp_method_connection_methods
[] = {
2054 static const value_string amqp_method_channel_methods
[] = {
2068 static const value_string amqp_method_access_methods
[] = {
2074 static const value_string amqp_method_exchange_methods
[] = {
2086 static const value_string amqp_method_queue_methods
[] = {
2100 static const value_string amqp_method_basic_methods
[] = {
2115 /* basic(100) is in 0-9 called Recover and in 0-9-1 Recover.Async,
2116 * we will use the more recent 0-9-1 terminology */
2117 {100, "Recover-Async"},
2119 {111, "Recover-Ok"},
2124 static const value_string amqp_method_file_methods
[] = {
2142 static const value_string amqp_method_stream_methods
[] = {
2155 static const value_string amqp_method_tx_methods
[] = {
2161 {31, "Rollback-Ok"},
2165 static const value_string amqp_method_dtx_methods
[] = {
2173 static const value_string amqp_method_tunnel_methods
[] = {
2178 static const value_string amqp_0_10_array_type_vals
[] = {
2179 {AMQP_0_10_TYPE_STR16
, "str16"},
2180 {AMQP_0_10_TYPE_STRUCT32
, "struct32"},
2184 static const value_string amqp_method_confirm_methods
[] = {
2190 /* AMQP 0-10 Type Info */
2191 static const struct amqp_typeinfo amqp_0_10_fixed_types
[] = {
2192 { 0x00, "bin8", format_amqp_0_10_bin
, 1 },
2193 { 0x01, "int8", format_amqp_0_10_int
, 1 },
2194 { 0x02, "uint8", format_amqp_0_10_uint
, 1 },
2195 { 0x04, "char", format_amqp_0_10_char
, 1 },
2196 { 0x08, "boolean", format_amqp_0_10_boolean
, 1 },
2197 { 0x10, "bin16", format_amqp_0_10_bin
, 2 },
2198 { 0x11, "int16", format_amqp_0_10_int
, 2 },
2199 { 0x12, "uint16", format_amqp_0_10_uint
, 2 },
2200 { 0x20, "bin32", format_amqp_0_10_bin
, 4 },
2201 { 0x21, "int32", format_amqp_0_10_int
, 4 },
2202 { 0x22, "uint32", format_amqp_0_10_uint
, 4 },
2203 { 0xff, "end", 0, 0 }
2206 static const struct amqp_typeinfo amqp_0_10_var_types
[] = {
2207 { 0x80, "vbin8", format_amqp_0_10_vbin
, 1 },
2208 { 0x95, "str16", format_amqp_0_10_str
, 2 },
2209 { 0xff, "end", 0, 0 }
2212 /* AMQP 1.0 Type Info */
2213 static const struct amqp1_typeinfo amqp_1_0_fixed_types
[] = {
2214 { 0x40, "null", FT_NONE
, 0, dissect_amqp_1_0_skip
, format_amqp_1_0_null
},
2215 { 0x41, "bool", FT_BOOLEAN
, 0, dissect_amqp_1_0_true
, format_amqp_1_0_boolean_true
},
2216 { 0x42, "bool", FT_BOOLEAN
, 0, dissect_amqp_1_0_false
, format_amqp_1_0_boolean_false
},
2217 { 0x56, "bool", FT_BOOLEAN
, 1, dissect_amqp_1_0_fixed
, format_amqp_1_0_boolean
},
2218 { 0x50, "ubyte", FT_UINT8
, 1, dissect_amqp_1_0_fixed
, format_amqp_1_0_uint
},
2219 { 0x60, "ushort", FT_UINT16
, 2, dissect_amqp_1_0_fixed
, format_amqp_1_0_uint
},
2220 { 0x70, "uint", FT_UINT32
, 4, dissect_amqp_1_0_fixed
, format_amqp_1_0_uint
},
2221 { 0x52, "smalluint", FT_UINT8
, 1, dissect_amqp_1_0_fixed
, format_amqp_1_0_uint
},
2222 { 0x43, "uint0", FT_UINT8
, 0, dissect_amqp_1_0_zero
, format_amqp_1_0_uint
},
2223 { 0x80, "ulong", FT_UINT64
, 8, dissect_amqp_1_0_fixed
, format_amqp_1_0_uint
},
2224 { 0x53, "smallulong", FT_UINT8
, 1, dissect_amqp_1_0_fixed
, format_amqp_1_0_uint
},
2225 { 0x44, "ulong0", FT_UINT8
, 0, dissect_amqp_1_0_zero
, format_amqp_1_0_uint
},
2226 { 0x51, "byte", FT_INT8
, 1, dissect_amqp_1_0_fixed
, format_amqp_1_0_int
},
2227 { 0x61, "short", FT_INT16
, 2, dissect_amqp_1_0_fixed
, format_amqp_1_0_int
},
2228 { 0x71, "int", FT_INT32
, 4, dissect_amqp_1_0_fixed
, format_amqp_1_0_int
},
2229 { 0x54, "smallint", FT_INT8
, 1, dissect_amqp_1_0_fixed
, format_amqp_1_0_int
},
2230 { 0x81, "long", FT_INT64
, 8, dissect_amqp_1_0_fixed
, format_amqp_1_0_int
},
2231 { 0x55, "smalllong", FT_INT8
, 1, dissect_amqp_1_0_fixed
, format_amqp_1_0_int
},
2232 { 0x72, "float", FT_FLOAT
, 4, dissect_amqp_1_0_fixed
, format_amqp_1_0_float
},
2233 { 0x82, "double", FT_DOUBLE
, 8, dissect_amqp_1_0_fixed
, format_amqp_1_0_double
},
2234 { 0x74, "decimal32", FT_BYTES
, 4, dissect_amqp_1_0_fixed
, format_amqp_1_0_decimal
},
2235 { 0x84, "decimal64", FT_BYTES
, 8, dissect_amqp_1_0_fixed
, format_amqp_1_0_decimal
},
2236 { 0x94, "decimal128", FT_BYTES
, 16, dissect_amqp_1_0_fixed
, format_amqp_1_0_decimal
},
2237 { 0x73, "char", FT_STRING
, 4, dissect_amqp_1_0_fixed
, format_amqp_1_0_char
},
2238 { 0x83, "timestamp", FT_ABSOLUTE_TIME
, 8, dissect_amqp_1_0_timestamp
, format_amqp_1_0_timestamp
},
2239 { 0x98, "uuid", FT_GUID
, 16, dissect_amqp_1_0_fixed
, format_amqp_1_0_uuid
},
2240 { 0xa0, "vbin8", FT_BYTES
, 1, dissect_amqp_1_0_variable
, format_amqp_1_0_bin
},
2241 { 0xb0, "vbin32", FT_BYTES
, 4, dissect_amqp_1_0_variable
, format_amqp_1_0_bin
},
2242 { 0xa1, "str8-utf8", FT_STRING
, 1, dissect_amqp_1_0_variable
, format_amqp_1_0_str
},
2243 { 0xb1, "str32-utf8", FT_STRING
, 4, dissect_amqp_1_0_variable
, format_amqp_1_0_str
},
2244 { 0xa3, "sym8", FT_STRING
, 1, dissect_amqp_1_0_variable
, format_amqp_1_0_symbol
},
2245 { 0xb3, "sym32", FT_STRING
, 4, dissect_amqp_1_0_variable
, format_amqp_1_0_symbol
},
2246 { 0xff, "end", 0, 0, 0, 0 }
2249 /* see explanation at declaration of amqp_defined_types_t */
2250 static const struct amqp_defined_types_t amqp_1_0_defined_types
[] = {
2251 {AMQP_1_0_AMQP_TYPE_ERROR
, &hf_amqp_1_0_error
, 3, amqp_1_0_error_items
},
2252 {AMQP_1_0_AMQP_TYPE_HEADER
, &hf_amqp_1_0_messageHeader
, 5, amqp_1_0_messageHeader_items
},
2253 {AMQP_1_0_AMQP_TYPE_DELIVERY_ANNOTATIONS
, &hf_amqp_1_0_deliveryAnnotations
, 0, NULL
},
2254 {AMQP_1_0_AMQP_TYPE_MESSAGE_ANNOTATIONS
, &hf_amqp_1_0_messageAnnotations
, 0, NULL
},
2255 {AMQP_1_0_AMQP_TYPE_PROPERTIES
, &hf_amqp_1_0_messageProperties
, 13, amqp_1_0_messageProperties_items
},
2256 {AMQP_1_0_AMQP_TYPE_APPLICATION_PROPERTIES
, &hf_amqp_1_0_applicationProperties
, 0, NULL
},
2257 {AMQP_1_0_AMQP_TYPE_DATA
, &hf_amqp_1_0_data
, 0, NULL
},
2258 {AMQP_1_0_AMQP_TYPE_AMQP_SEQUENCE
, &hf_amqp_1_0_amqp_sequence
, 0, NULL
},
2259 {AMQP_1_0_AMQP_TYPE_AMQP_VALUE
, &hf_amqp_1_0_amqp_value
, 0, NULL
},
2260 {AMQP_1_0_AMQP_TYPE_FOOTER
, &hf_amqp_1_0_footer
, 0, NULL
},
2261 {AMQP_1_0_AMQP_TYPE_RECEIVED
, &hf_amqp_1_0_received
, 2, amqp_1_0_received_items
},
2262 {AMQP_1_0_AMQP_TYPE_ACCEPTED
, &hf_amqp_1_0_accepted
, 0, NULL
},
2263 {AMQP_1_0_AMQP_TYPE_REJECTED
, &hf_amqp_1_0_rejected
, 1, amqp_1_0_rejected_items
},
2264 {AMQP_1_0_AMQP_TYPE_RELEASED
, &hf_amqp_1_0_released
, 0, NULL
},
2265 {AMQP_1_0_AMQP_TYPE_MODIFIED
, &hf_amqp_1_0_modified
, 3, amqp_1_0_modified_items
},
2266 {AMQP_1_0_AMQP_TYPE_SOURCE
, &hf_amqp_1_0_source
, 11, amqp_1_0_source_items
},
2267 {AMQP_1_0_AMQP_TYPE_TARGET
, &hf_amqp_1_0_target
, 7, amqp_1_0_target_items
},
2268 {AMQP_1_0_AMQP_TYPE_DELETE_ON_CLOSE
, &hf_amqp_1_0_deleteOnClose
, 0, NULL
},
2269 {AMQP_1_0_AMQP_TYPE_DELETE_ON_NO_LINKS
, &hf_amqp_1_0_deleteOnNoLinks
, 0, NULL
},
2270 {AMQP_1_0_AMQP_TYPE_DELETE_ON_NO_MESSAGE
, &hf_amqp_1_0_deleteOnNoMessages
, 0, NULL
},
2271 {AMQP_1_0_AMQP_TYPE_DELETE_ON_NO_LINKS_OR_MESSAGE
, &hf_amqp_1_0_deleteOnNoLinksOrMessages
, 0, NULL
},
2272 {AMQP_1_0_AMQP_TYPE_COORDINATOR
, &hf_amqp_1_0_coordinator
, 1, amqp_1_0_coordinator_items
},
2273 {AMQP_1_0_AMQP_TYPE_DECLARE
, &hf_amqp_1_0_declare
, 1, amqp_1_0_declare_items
},
2274 {AMQP_1_0_AMQP_TYPE_DISCHARGE
, &hf_amqp_1_0_discharge
, 2, amqp_1_0_discharge_items
},
2275 {AMQP_1_0_AMQP_TYPE_DECLARED
, &hf_amqp_1_0_declared
, 1, amqp_1_0_declared_items
},
2276 {AMQP_1_0_AMQP_TYPE_TRANSACTIONAL_STATE
, &hf_amqp_1_0_transactionalState
, 2, amqp_1_0_transactionalState_items
},
2277 { 0, NULL
, 0, NULL
}
2281 check_amqp_version(tvbuff_t
*tvb
, amqp_conv
*conn
)
2283 uint32_t f0_9_length
;
2286 * If we already know and the version and this isn't a protocol header,
2287 * return ok. 0-10 and up can run protocol headers in each direction,
2288 * so if it looks like a protocol header, snag the version even if one
2289 * is already recorded. Multi-protocol brokers can negotiate down.
2291 if ((conn
->version
!= 0) && (tvb_get_uint8(tvb
, 0) != 'A'))
2294 if (tvb_memeql(tvb
, 0, (const uint8_t*)"AMQP", 4) == 0) {
2295 /* AMQP 0-* has protocol major/minor in 6th/7th byte, while AMQP 1.0
2296 * has it in 5th/6th byte (7th is revision)
2300 uint8_t seventh_byte
;
2302 fivth_byte
= tvb_get_uint8(tvb
, 5);
2303 sixth_byte
= tvb_get_uint8(tvb
, 6);
2304 seventh_byte
= tvb_get_uint8(tvb
, 7);
2305 if ((fivth_byte
== 1) && (sixth_byte
== 0) && (seventh_byte
== 0))
2306 conn
->version
= AMQP_V1_0
;
2307 else if (sixth_byte
== 0) {
2308 if (seventh_byte
== 9)
2309 conn
->version
= AMQP_V0_9
;
2310 else if (seventh_byte
== 10)
2311 conn
->version
= AMQP_V0_10
;
2317 * It's not a protocol header and the AMQP version isn't known. Try to
2318 * deduce it from the content.
2320 * First indicator is the frame length. 0-9 has a 32-bit length in
2321 * octets 3-7. In 0-10, those are the second octet of the segment type,
2322 * one reserved octet that should always be zero, a four-bit track number
2323 * (high bits zero), and the first octet of the 16-bit channel number.
2324 * In 1.0, those are the lowest-value octet of the 32-bit frame size,
2325 * an octet for data offset (at least 2), a type code octet (0x00 for
2326 * an AMQP frame, 0x01 for a SASL frame), and the first of two
2327 * type-specific octets in the frame header.
2329 * If the frame fits within the PDU, and there's a frame end byte (0xCE)
2330 * where it should be, this is almost certainly 0-9. (Compare with "less
2331 * than or equal to", as there may be more than one frame in a PDU.)
2333 * Else, higher version. 0-10 has 5th octet 0x00 while 1.0
2334 * has there at least 2 (DOFF) - use this fact to determine.
2336 f0_9_length
= tvb_get_ntohl(tvb
, 3) + 7 + 1; /* Add header and end */
2337 if ((f0_9_length
<= tvb_reported_length(tvb
)) &&
2338 (tvb_get_uint8(tvb
, f0_9_length
- 1) == 0xCE))
2339 conn
->version
= AMQP_V0_9
;
2340 else if (tvb_get_uint8(tvb
, 4) == 0x00)
2341 conn
->version
= AMQP_V0_10
;
2343 conn
->version
= AMQP_V1_0
;
2349 get_amqp_1_0_message_len(packet_info
*pinfo _U_
, tvbuff_t
*tvb
,
2350 int offset
, void *data _U_
)
2352 /* Heuristic - protocol initialisation frame starts with 'AMQP' */
2353 if (tvb_memeql(tvb
, offset
, (const uint8_t*)"AMQP", 4) == 0)
2355 return (unsigned) tvb_get_ntohl(tvb
, offset
);
2359 get_amqp_0_10_message_len(packet_info
*pinfo _U_
, tvbuff_t
*tvb
,
2360 int offset
, void *data _U_
)
2362 /* Heuristic - protocol initialisation frame starts with 'AMQP' */
2363 if (tvb_memeql(tvb
, offset
, (const uint8_t*)"AMQP", 4) == 0)
2366 return (unsigned) tvb_get_ntohs(tvb
, offset
+ 2); /* Max *frame* length = 65K; */
2370 get_amqp_0_9_message_len(packet_info
*pinfo _U_
, tvbuff_t
*tvb
,
2371 int offset
, void *data _U_
)
2375 /* Heuristic - protocol initialisation frame starts with 'AMQP' */
2376 if (tvb_memeql(tvb
, offset
, (const uint8_t*)"AMQP", 4) == 0)
2380 * XXX - the location of the length differs from protocol version to
2381 * protocol version; for now, we only handle version 0-9, and we
2382 * clamp the length at 1MB so we don't go nuts if we get a bogus
2383 * length due to dissecting the wrong version (or getting a malformed
2386 length
= tvb_get_ntohl(tvb
, offset
+ 3);
2387 if (length
> 1048576) /* [0x100000] */
2393 /* Dissection routine for AMQP 0-9 field tables */
2396 // NOLINTNEXTLINE(misc-no-recursion)
2397 dissect_amqp_0_9_field_table(tvbuff_t
*tvb
, packet_info
*pinfo
, int offset
, unsigned length
, proto_item
*item
)
2399 proto_tree
*field_table_tree
, *field_item_tree
;
2400 proto_item
*field_item
;
2401 unsigned namelen
, vallen
;
2402 const uint8_t *name
;
2405 field_table_tree
= proto_item_add_subtree(item
, ett_amqp
);
2407 while (length
!= 0) {
2408 field_start
= offset
;
2409 field_item
= proto_tree_add_item(field_table_tree
, hf_amqp_field
, tvb
,
2411 namelen
= tvb_get_uint8(tvb
, offset
);
2414 if (length
< namelen
)
2416 field_item_tree
= proto_item_add_subtree(field_item
, ett_amqp_0_9_field
);
2417 proto_tree_add_item_ret_string(field_item_tree
, hf_amqp_field_name
, tvb
, offset
, namelen
, ENC_UTF_8
, pinfo
->pool
, &name
);
2418 proto_item_set_text(field_item
, "%s", name
);
2422 increment_dissection_depth(pinfo
);
2423 vallen
= dissect_amqp_0_9_field_value(tvb
, pinfo
, offset
, length
, name
, field_item_tree
);
2424 decrement_dissection_depth(pinfo
);
2433 proto_tree_add_expert(field_table_tree
, pinfo
, &ei_amqp_field_short
, tvb
, field_start
, offset
- field_start
);
2437 /* Dissection routine for AMQP 0-9 field arrays */
2440 // NOLINTNEXTLINE(misc-no-recursion)
2441 dissect_amqp_0_9_field_array(tvbuff_t
*tvb
, packet_info
*pinfo
, int offset
, unsigned length
, proto_item
*item
)
2443 proto_tree
*field_table_tree
, *field_item_tree
;
2444 proto_item
*field_item
;
2445 int field_start
, idx
;
2449 field_table_tree
= proto_item_add_subtree(item
, ett_amqp
);
2452 while (length
!= 0) {
2453 field_start
= offset
;
2454 field_item
= proto_tree_add_none_format(field_table_tree
, hf_amqp_field
, tvb
,
2455 offset
, 0, "[%i]", idx
);
2456 field_item_tree
= proto_item_add_subtree(field_item
, ett_amqp_0_9_field
);
2457 name
= wmem_strdup_printf(pinfo
->pool
, "[%i]", idx
);
2459 increment_dissection_depth(pinfo
);
2460 vallen
= dissect_amqp_0_9_field_value(tvb
, pinfo
, offset
, length
, name
, field_item_tree
);
2461 decrement_dissection_depth(pinfo
);
2472 proto_tree_add_expert(field_table_tree
, pinfo
, &ei_amqp_field_short
, tvb
, field_start
, offset
- field_start
);
2476 /* The common practice of AMQP 0-9-1 brokers and clients differs to what has
2477 * been described in the AMQP 0-9-1 standard.
2479 * Here's a tabular summary of the state of things:
2480 * See also https://www.rabbitmq.com/amqp-0-9-1-errata.html
2482 * 0-9 0-9-1 Industry Type
2483 * --------------------------------------------
2489 * I I I Signed 32-bit
2499 * T T T Timestamp (u64)
2500 * F F F Nested Table
2504 * This dissector conforms to the common practice rather than to the standard
2505 * and uses the tags in the third column. We don't *think* there is a vendor
2506 * who follows the 0-9-1 spec for this bit.
2509 static const value_string amqp_0_9_field_type_vals
[] = {
2511 { 'B', "unsigned byte" },
2513 { 'F', "field table" },
2516 { 'T', "timestamp" },
2521 { 'i', "unsigned integer" },
2522 { 'l', "long int" },
2523 { 's', "short int" },
2525 { 'u', "short uint" },
2526 { 'x', "byte array" },
2531 // NOLINTNEXTLINE(misc-no-recursion)
2532 dissect_amqp_0_9_field_value(tvbuff_t
*tvb
, packet_info
*pinfo
, int offset
, unsigned length
,
2533 const char *name _U_
, proto_tree
*field_tree
)
2535 proto_item
*field_item
, *type_item
, *ti
= NULL
;
2538 const char *amqp_typename
;
2541 value_start
= offset
;
2543 return 0; /* too short */
2544 type
= tvb_get_uint8(tvb
, offset
);
2545 amqp_typename
= char_val_to_str(type
, amqp_0_9_field_type_vals
, "unknown type");
2546 field_item
= proto_tree_get_parent(field_tree
);
2547 proto_item_append_text(field_item
, " (%s)", amqp_typename
);
2548 type_item
= proto_tree_add_item(field_tree
, hf_amqp_field_type
, tvb
, offset
, 1, ENC_NA
);
2552 case 'I': /* signed 32-bit */
2554 return 0; /* too short */
2555 ti
= proto_tree_add_item(field_tree
, hf_amqp_field_integer
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
2558 case 'D': /* 40-bit decimal floating point, biased towards small numbers */
2561 return 0; /* too short */
2562 double decimal
= tvb_get_ntohl(tvb
, offset
+ 1) / pow(10, tvb_get_uint8(tvb
, offset
));
2563 ti
= proto_tree_add_double(field_tree
, hf_amqp_field_decimal
, tvb
, offset
, 5, decimal
);
2567 case 'S': /* long string, UTF-8 encoded */
2569 return 0; /* too short */
2570 ti
= proto_tree_add_item_ret_length(field_tree
, hf_amqp_field_string
, tvb
, offset
, 4, ENC_BIG_ENDIAN
|ENC_UTF_8
, &vallen
);
2573 case 'T': /* timestamp (u64) */
2575 return 0; /* too short */
2576 ti
= proto_tree_add_item(field_tree
, hf_amqp_field_timestamp
, tvb
,
2577 offset
, 8, ENC_TIME_SECS
|ENC_BIG_ENDIAN
);
2580 case 'F': /* nested table */
2582 return 0; /* too short */
2583 vallen
= tvb_get_ntohl(tvb
, offset
);
2586 if (length
< vallen
)
2587 return 0; /* too short */
2588 dissect_amqp_0_9_field_table(tvb
, pinfo
, offset
, vallen
, field_tree
);
2593 /* AMQP 0-9-1 types */
2594 case 't': /* boolean */
2596 return 0; /* too short */
2597 ti
= proto_tree_add_item(field_tree
, hf_amqp_field_boolean
, tvb
, offset
, 1, ENC_NA
);
2600 case 'b': /* signed 8-bit */
2602 return 0; /* too short */
2603 ti
= proto_tree_add_item(field_tree
, hf_amqp_field_byte
, tvb
, offset
, 1, ENC_NA
);
2606 case 'B': /* unsigned 8-bit */
2608 return 0; /* too short */
2609 ti
= proto_tree_add_item(field_tree
, hf_amqp_field_unsigned_byte
, tvb
, offset
, 1, ENC_NA
);
2612 case 's': /* signed 16-bit */
2614 return 0; /* too short */
2615 ti
= proto_tree_add_item(field_tree
, hf_amqp_field_short_int
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2618 case 'u': /* unsigned 16-bit */
2620 return 0; /* too short */
2621 ti
= proto_tree_add_item(field_tree
, hf_amqp_field_short_uint
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2624 case 'i': /* unsigned 32-bit */
2626 return 0; /* too short */
2627 ti
= proto_tree_add_item(field_tree
, hf_amqp_field_unsigned_integer
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
2630 case 'l': /* signed 64-bit */
2632 return 0; /* too short */
2633 ti
= proto_tree_add_item(field_tree
, hf_amqp_field_long_int
, tvb
, offset
, 8, ENC_BIG_ENDIAN
);
2636 case 'f': /* 32-bit float */
2638 return 0; /* too short */
2639 ti
= proto_tree_add_item(field_tree
, hf_amqp_field_float
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
2642 case 'd': /* 64-bit float */
2644 return 0; /* too short */
2645 ti
= proto_tree_add_item(field_tree
, hf_amqp_field_double
, tvb
, offset
, 8, ENC_BIG_ENDIAN
);
2648 case 'A': /* array */
2650 return 0; /* too short */
2651 vallen
= tvb_get_ntohl(tvb
, offset
);
2654 if (length
< vallen
)
2655 return 0; /* too short */
2656 dissect_amqp_0_9_field_array(tvb
, pinfo
, offset
, vallen
, ti
);
2659 case 'x': /* byte array */
2661 return 0; /* too short */
2662 ti
= proto_tree_add_item_ret_length(field_tree
, hf_amqp_field_byte_array
, tvb
,
2663 offset
, 4, ENC_NA
, &vallen
);
2667 expert_add_info(pinfo
, type_item
, &ei_amqp_array_type_unknown
);
2668 /* Without knowing the type, we don't know how much to increment
2669 * the offset, so break out. */
2673 proto_item_set_end(field_item
, tvb
, offset
);
2675 proto_item_append_text(field_item
, ": %s", proto_item_get_display_repr(pinfo
->pool
, ti
));
2677 return offset
- value_start
;
2680 /* Get amqp_0_10 32bit size field from a PDU */
2682 /* XXX: This is a hack.
2683 * The issue: there are numerous places in the amqp_0_10 code
2684 * where a 32bit size field is fetched from the PDU and
2685 * then used as the size of the following data field and
2686 * to advance 'offset' & etc with the potential
2687 * to cause an overflow (using 32bit arithmetic).
2688 * The hack: limit the size to 65K.
2689 * Strictly speaking this is not OK since field sizes
2690 * presumably can be larger than 65K.
2691 * However: the code, as written, assumes that a field
2692 * fits within an AMQP_0_10 "frame" which has, by definition, a
2693 * maximum size of 65K.
2696 #define AMQP_0_10_SIZE_MAX(s) (((unsigned)(s) < (1U << 16)) ? (unsigned)s : (1U << 16))
2698 amqp_0_10_get_32bit_size(tvbuff_t
*tvb
, int offset
) {
2699 unsigned size
= tvb_get_ntohl(tvb
, offset
);
2700 return AMQP_0_10_SIZE_MAX(size
);
2704 amqp_0_10_get_32bit_size_new(proto_tree
* tree
, packet_info
* pinfo
, tvbuff_t
*tvb
, int hf
, int offset
) {
2708 ti
= proto_tree_add_item_ret_uint(tree
, hf
, tvb
, offset
, 4, ENC_BIG_ENDIAN
, &size
);
2711 expert_add_info(pinfo
, ti
, &ei_amqp_size_exceeds_65K
);
2718 /* Dissection routine for AMQP 0-10 maps */
2721 dissect_amqp_0_10_map(tvbuff_t
*tvb
, proto_item
*item
)
2723 proto_item
*map_tree
;
2724 unsigned namelen
, size
;
2727 const char *amqp_typename
;
2729 uint32_t i
, field_count
;
2731 type_formatter formatter
;
2733 map_tree
= proto_item_add_subtree(item
, ett_amqp_0_10_map
);
2734 field_count
= tvb_get_ntohl(tvb
, offset
);
2736 proto_item_append_text(item
, " (%u %s)", field_count
, plurality(field_count
, "entry", "entries"));
2737 for (i
= 0; ((i
< field_count
) && (tvb_reported_length_remaining(tvb
, offset
) > 0)); i
++) {
2738 unsigned field_length
= 0;
2739 unsigned field_start
= offset
;
2740 namelen
= tvb_get_uint8(tvb
, offset
);
2742 name
= (char*) tvb_get_string_enc(wmem_packet_scope(), tvb
, offset
, namelen
, ENC_UTF_8
|ENC_NA
);
2744 type
= tvb_get_uint8(tvb
, offset
);
2746 if (get_amqp_0_10_type_formatter(type
, &amqp_typename
, &formatter
, &size
)) {
2747 field_length
= formatter(tvb
, offset
, size
, &value
); /* includes var 'length' field if var field */
2748 field_length
= AMQP_0_10_SIZE_MAX(field_length
);
2749 proto_tree_add_none_format(map_tree
,
2753 1 + namelen
+ 1 + field_length
,
2755 name
, amqp_typename
, value
);
2756 offset
+= field_length
;
2758 else { /* type not found in table: Do special processing */
2759 unsigned size_field_len
= 0;
2762 case AMQP_0_10_TYPE_MAP
:
2763 case AMQP_0_10_TYPE_LIST
:
2764 case AMQP_0_10_TYPE_ARRAY
:
2765 field_length
= amqp_0_10_get_32bit_size(tvb
, offset
);
2767 proto_tree_add_none_format(map_tree
, hf_amqp_field
,
2768 tvb
, field_start
, (1 + namelen
+ 1 + 4 + field_length
),
2769 "%s (composite): %d bytes",
2770 name
, field_length
);
2773 default: { /* Determine total field length from the type */
2774 unsigned temp
= 1U << ((type
& 0x70) >> 4); /* Map type to a length value */
2775 amqp_typename
= "unimplemented type";
2777 /* fixed length cases */
2778 if ((type
& 0x80) == 0) {
2779 field_length
= temp
; /* Actual length of the field */
2781 else if ((type
& 0xc0) == 0xc0) {
2784 else if ((type
& 0xd0) == 0xd0) {
2787 else if ((type
& 0xf0) == 0xf0) {
2791 /* variable length/reserved cases */
2792 else if ((type
& 0x80) == 0x80) {
2793 size_field_len
= temp
;
2794 switch (size_field_len
) {
2796 field_length
= tvb_get_uint8(tvb
, offset
);
2799 field_length
= tvb_get_ntohs(tvb
, offset
);
2802 field_length
= amqp_0_10_get_32bit_size(tvb
, offset
);
2805 field_length
= 1; /* Reserved... skip 1 */
2806 amqp_typename
= "reserved";
2811 DISSECTOR_ASSERT_NOT_REACHED();
2813 proto_tree_add_none_format(map_tree
, hf_amqp_field
,
2814 tvb
, field_start
, 1 + namelen
+ 1 + size_field_len
+ field_length
,
2815 "%s (%s): (value field length: %d bytes)",
2816 name
, amqp_typename
, field_length
);
2818 } /* switch (type) */
2820 offset
+= (size_field_len
+ field_length
);
2825 /* Dissection routine for AMQP 0-10 maps */
2827 // NOLINTNEXTLINE(misc-no-recursion)
2828 dissect_amqp_0_10_array(tvbuff_t
*tvb
,
2830 int offset
, /* Start of array in tvb */
2833 proto_item
*type_item
, *struct_item
;
2834 proto_tree
*array_tree
;
2836 uint32_t type
, i
, element_count
;
2837 uint32_t struct_length
;
2840 element_count
= tvb_get_ntohl(tvb
, offset
+1);
2841 array_tree
= proto_item_add_subtree(item
, ett_amqp_0_10_array
);
2842 proto_item_append_text(item
, " (array of %u element%s)", element_count
, plurality(element_count
, "", "s"));
2843 type_item
= proto_tree_add_item_ret_uint(array_tree
, hf_amqp_0_10_array_type
, tvb
, offset
, 1, ENC_NA
, &type
);
2845 proto_tree_add_item_ret_uint(array_tree
, hf_amqp_0_10_array_element_count
, tvb
, offset
, 4, ENC_BIG_ENDIAN
, &element_count
);
2848 for (i
= 0; ((i
< element_count
) && (tvb_reported_length_remaining(tvb
, offset
) > 0)); i
++) {
2850 case AMQP_0_10_TYPE_STR16
:
2851 len16
= tvb_get_ntohs(tvb
, offset
);
2852 proto_tree_add_item(array_tree
, hf_amqp_0_10_array_string
, tvb
, offset
, 2, ENC_UTF_8
|ENC_BIG_ENDIAN
);
2853 offset
+= (2 + len16
);
2856 case AMQP_0_10_TYPE_STRUCT32
:
2857 struct_length
= amqp_0_10_get_32bit_size_new(array_tree
, pinfo
, tvb
, hf_amqp_0_10_struct32_size
, offset
);
2860 struct_item
= proto_tree_add_item(array_tree
,
2861 hf_amqp_0_10_struct32
,
2862 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2863 proto_item_set_len(struct_item
, struct_length
);
2865 if (struct_length
> (uint32_t)tvb_reported_length_remaining(tvb
, offset
))
2867 next_tvb
= tvb_new_subset_remaining(tvb
, offset
);
2871 next_tvb
= tvb_new_subset_length(tvb
, offset
, struct_length
);
2873 dissect_amqp_0_10_struct32(next_tvb
, pinfo
, struct_item
);
2874 offset
+= struct_length
;
2878 expert_add_info(pinfo
, type_item
, &ei_amqp_array_type_unknown
);
2879 /* Don't bother continuing through the loop: we don't know how
2880 * much to increment the offset by and the type doesn't change
2881 * so there's nothing interesting to do...
2889 dissect_amqp_0_10_xid (tvbuff_t
*tvb
,
2893 proto_item
*xid_tree
;
2894 uint8_t flag1
/*, flag2*/;
2896 xid_tree
= proto_item_add_subtree(ti
, ett_args
);
2897 flag1
= tvb_get_uint8(tvb
, offset
);
2898 /*flag2 = tvb_get_uint8(tvb, offset+1);*/
2899 proto_tree_add_item(xid_tree
, hf_amqp_0_10_argument_packing_flags
,
2900 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2903 /* format (uint32) */
2904 proto_tree_add_item(xid_tree
,
2905 hf_amqp_0_10_dtx_xid_format
,
2906 tvb
, offset
, 4, ENC_BIG_ENDIAN
);
2910 /* global-id (vbin8) */
2911 proto_tree_add_item(xid_tree
,
2912 hf_amqp_0_10_dtx_xid_global_id
,
2913 tvb
, offset
, 1, ENC_NA
);
2914 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
2917 /* branch-id (vbin8) */
2918 proto_tree_add_item(xid_tree
,
2919 hf_amqp_0_10_dtx_xid_branch_id
,
2920 tvb
, offset
, 1, ENC_NA
);
2921 /* offset += (1 + tvb_get_uint8(tvb, offset)); */
2925 /* Dissection routine for AMQP 0-10 frames */
2928 dissect_amqp_0_10_connection(tvbuff_t
*tvb
,
2932 proto_item
*args_tree
;
2934 proto_item
*flags_item
;
2936 uint8_t flag1
, flag2
; /* args struct packing flags */
2937 uint32_t arg_length
;
2939 const char *method_name
;
2943 method
= tvb_get_uint8(tvb
, offset
+1);
2944 method_name
= val_to_str_const(method
, amqp_0_10_connection_methods
,
2945 "<invalid connection method>");
2946 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "%s ", method_name
);
2947 col_set_fence(pinfo
->cinfo
, COL_INFO
);
2949 proto_tree_add_item(tree
, hf_amqp_0_10_connection_method
,
2950 tvb
, offset
+1, 1, ENC_BIG_ENDIAN
);
2952 ti
= proto_tree_add_item(tree
, hf_amqp_method_arguments
,
2953 tvb
, offset
, -1, ENC_NA
);
2954 args_tree
= proto_item_add_subtree(ti
, ett_args
);
2956 * The flag bits are a simple bit string, not a net-byte-order
2957 * field. tvb_get_bits16() doesn't know how to do little-endian
2958 * at this time, so just pick out two bytes.
2960 flags_offset
= offset
;
2961 flag1
= tvb_get_uint8(tvb
, offset
);
2962 flag2
= tvb_get_uint8(tvb
, offset
+1);
2963 flags_item
= proto_tree_add_item(args_tree
,
2964 hf_amqp_0_10_argument_packing_flags
,
2965 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2968 case AMQP_0_10_METHOD_CONNECTION_START
:
2969 if ((flag1
& ~0x07) || (flag2
!= 0))
2970 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
2972 /* server-properties (map) */
2973 arg_length
= amqp_0_10_get_32bit_size_new(args_tree
, pinfo
, tvb
, hf_amqp_method_connection_start_server_properties_size
, offset
);
2975 ti
= proto_tree_add_item(args_tree
,
2976 hf_amqp_method_connection_start_server_properties
,
2979 arg_length
, ENC_NA
);
2980 if (arg_length
> (uint32_t)tvb_reported_length_remaining(tvb
, offset
))
2982 next_tvb
= tvb_new_subset_remaining(tvb
, offset
);
2986 next_tvb
= tvb_new_subset_length(tvb
, offset
, arg_length
);
2988 dissect_amqp_0_10_map (next_tvb
, ti
);
2989 offset
+= arg_length
;
2992 /* mechanisms (str16-array) */
2993 arg_length
= amqp_0_10_get_32bit_size_new(args_tree
, pinfo
, tvb
, hf_amqp_0_10_method_connection_start_mechanisms_size
, offset
);
2995 ti
= proto_tree_add_item(args_tree
,
2996 hf_amqp_0_10_method_connection_start_mechanisms
,
2999 arg_length
, ENC_NA
);
3000 dissect_amqp_0_10_array (tvb
,
3004 offset
+= arg_length
;
3007 /* locales (str16-array) */
3008 arg_length
= amqp_0_10_get_32bit_size_new(args_tree
, pinfo
, tvb
, hf_amqp_0_10_method_connection_start_locales_size
, offset
);
3010 ti
= proto_tree_add_item(args_tree
,
3011 hf_amqp_0_10_method_connection_start_locales
,
3014 arg_length
, ENC_NA
);
3015 dissect_amqp_0_10_array (tvb
,
3019 /* offset += arg_length; */
3023 case AMQP_0_10_METHOD_CONNECTION_START_OK
:
3024 if ((flag1
& ~0x0f) || (flag2
!= 0))
3025 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
3027 /* client-properties (map) */
3028 arg_length
= amqp_0_10_get_32bit_size_new(args_tree
, pinfo
, tvb
, hf_amqp_method_connection_start_ok_client_properties_size
, offset
);
3030 ti
= proto_tree_add_item(args_tree
,
3031 hf_amqp_method_connection_start_ok_client_properties
,
3034 arg_length
, ENC_NA
);
3035 if (arg_length
> (uint32_t)tvb_reported_length_remaining(tvb
, offset
))
3037 next_tvb
= tvb_new_subset_remaining(tvb
, offset
);
3041 next_tvb
= tvb_new_subset_length(tvb
, offset
, arg_length
);
3043 dissect_amqp_0_10_map (next_tvb
, ti
);
3044 offset
+= arg_length
;
3047 /* mechanism (str8) */
3048 proto_tree_add_item(args_tree
,
3049 hf_amqp_method_connection_start_ok_mechanism
,
3051 ENC_ASCII
|ENC_BIG_ENDIAN
);
3052 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
3055 /* response (vbin32) */
3056 proto_tree_add_item(args_tree
,
3057 hf_amqp_method_connection_start_ok_response
,
3060 offset
+= (4 + tvb_get_ntohl(tvb
, offset
));
3064 proto_tree_add_item(args_tree
,
3065 hf_amqp_method_connection_start_ok_locale
,
3066 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
3067 /* offset += (1 + tvb_get_uint8(tvb, offset)); */
3071 case AMQP_0_10_METHOD_CONNECTION_SECURE
:
3072 if ((flag1
& ~0x01) || (flag2
!= 0))
3073 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
3075 /* challenge (vbin32) */
3076 proto_tree_add_item(args_tree
,
3077 hf_amqp_method_connection_secure_challenge
,
3080 /* offset += (4 + tvb_get_ntohl(tvb, offset)); */
3084 case AMQP_0_10_METHOD_CONNECTION_SECURE_OK
:
3085 if ((flag1
& ~0x01) || (flag2
!= 0))
3086 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
3088 /* response (vbin32) */
3089 proto_tree_add_item(args_tree
,
3090 hf_amqp_method_connection_secure_ok_response
,
3093 /* offset += (4 + tvb_get_ntohl(tvb, offset)); */
3097 case AMQP_0_10_METHOD_CONNECTION_TUNE
:
3098 if ((flag1
& ~0x0f) || (flag2
!= 0))
3099 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
3101 /* channel-max (uint16) */
3102 proto_tree_add_item(args_tree
,
3103 hf_amqp_method_connection_tune_channel_max
,
3104 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3108 /* max-frame-size (uint16) */
3109 proto_tree_add_item(args_tree
,
3110 hf_amqp_0_10_method_connection_tune_frame_max
,
3111 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3115 /* heartbeat-min (uint16) */
3116 proto_tree_add_item(args_tree
,
3117 hf_amqp_0_10_method_connection_tune_heartbeat_min
,
3118 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3122 /* heartbeat-max (uint16) */
3123 proto_tree_add_item(args_tree
,
3124 hf_amqp_0_10_method_connection_tune_heartbeat_max
,
3125 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3130 case AMQP_0_10_METHOD_CONNECTION_TUNE_OK
:
3131 if ((flag1
& ~0x07) || (flag2
!= 0))
3132 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
3134 /* channel-max (uint16) */
3135 proto_tree_add_item(args_tree
,
3136 hf_amqp_method_connection_tune_ok_channel_max
,
3137 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3141 /* max-frame-size (uint16) */
3142 proto_tree_add_item(args_tree
,
3143 hf_amqp_0_10_method_connection_tune_ok_frame_max
,
3144 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3148 /* heartbeat (uint16) */
3149 proto_tree_add_item(args_tree
,
3150 hf_amqp_method_connection_tune_ok_heartbeat
,
3151 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3156 case AMQP_0_10_METHOD_CONNECTION_OPEN
:
3157 if ((flag1
& ~0x07) || (flag2
!= 0))
3158 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
3160 /* virtual-host (str8) */
3161 proto_tree_add_item(args_tree
,
3162 hf_amqp_method_connection_open_virtual_host
,
3165 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
3166 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
3169 /* capabilities (str16-array) */
3170 arg_length
= amqp_0_10_get_32bit_size_new(args_tree
, pinfo
, tvb
, hf_amqp_0_10_method_connection_open_capabilities_size
, offset
);
3172 ti
= proto_tree_add_item(args_tree
,
3173 hf_amqp_0_10_method_connection_open_capabilities
,
3176 arg_length
, ENC_ASCII
);
3177 dissect_amqp_0_10_array (tvb
,
3181 /* offset += arg_length; */
3184 * 3rd argument is an optional bit, insist.
3186 proto_tree_add_item(args_tree
,
3187 hf_amqp_0_10_method_connection_open_insist
,
3188 tvb
, flags_offset
, 1, ENC_BIG_ENDIAN
);
3191 case AMQP_0_10_METHOD_CONNECTION_OPEN_OK
:
3192 if ((flag1
& ~0x01) || (flag2
!= 0))
3193 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
3195 /* known-hosts (amqp-host-array) */
3196 arg_length
= amqp_0_10_get_32bit_size_new(args_tree
, pinfo
, tvb
, hf_amqp_0_10_method_connection_open_ok_known_hosts_size
, offset
);
3198 ti
= proto_tree_add_item(args_tree
,
3199 hf_amqp_0_10_method_connection_open_ok_known_hosts
,
3202 arg_length
, ENC_NA
);
3203 dissect_amqp_0_10_array (tvb
,
3207 /* offset += arg_length; */
3211 case AMQP_0_10_METHOD_CONNECTION_REDIRECT
:
3212 if ((flag1
& ~0x03) || (flag2
!= 0))
3213 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
3215 /* host (amqp-host-url [str16]) */
3216 proto_tree_add_item(args_tree
,
3217 hf_amqp_method_connection_redirect_host
,
3219 ENC_ASCII
|ENC_BIG_ENDIAN
);
3220 offset
+= (2 + tvb_get_ntohs(tvb
, offset
));
3223 /* known-hosts (amqp-host-array) */
3224 arg_length
= amqp_0_10_get_32bit_size_new(args_tree
, pinfo
, tvb
, hf_amqp_0_10_method_connection_redirect_known_hosts_size
, offset
);
3226 ti
= proto_tree_add_item(args_tree
,
3227 hf_amqp_0_10_method_connection_redirect_known_hosts
,
3230 arg_length
, ENC_NA
);
3231 dissect_amqp_0_10_array (tvb
,
3235 /* offset += arg_length; */
3239 case AMQP_0_10_METHOD_CONNECTION_HEARTBEAT
:
3242 case AMQP_0_10_METHOD_CONNECTION_CLOSE
:
3243 if ((flag1
& ~0x03) || (flag2
!= 0))
3244 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
3246 /* reply-code (uint16) */
3247 proto_tree_add_item(args_tree
,
3248 hf_amqp_0_10_method_connection_close_reply_code
,
3249 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3253 /* reply-text (str8) */
3254 proto_tree_add_item(args_tree
,
3255 hf_amqp_method_connection_close_reply_text
,
3256 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
3257 /* offset + (1 + tvb_get_uint8(tvb, offset)); */
3261 case AMQP_0_10_METHOD_CONNECTION_CLOSE_OK
:
3267 dissect_amqp_0_10_session(tvbuff_t
*tvb
,
3271 proto_item
*args_tree
;
3273 proto_item
*flags_item
;
3275 uint8_t flag1
, flag2
;
3277 uint32_t array_size
;
3279 const char *method_name
;
3282 method
= tvb_get_uint8(tvb
, offset
+1);
3283 method_name
= val_to_str_const(method
, amqp_0_10_session_methods
,
3284 "<invalid session method>");
3285 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "%s ", method_name
);
3286 col_set_fence(pinfo
->cinfo
, COL_INFO
);
3288 proto_tree_add_item(tree
, hf_amqp_0_10_session_method
,
3289 tvb
, offset
+1, 1, ENC_BIG_ENDIAN
);
3292 ti
= proto_tree_add_item(tree
, hf_amqp_method_arguments
,
3293 tvb
, offset
, -1, ENC_NA
);
3294 args_tree
= proto_item_add_subtree(ti
, ett_args
);
3296 * The flag bits are a simple bit string, not a net-byte-order
3297 * field. tvb_get_bits16() doesn't know how to do little-endian
3298 * at this time, so just pick out two bytes.
3300 flags_offset
= offset
;
3301 flag1
= tvb_get_uint8(tvb
, offset
);
3302 flag2
= tvb_get_uint8(tvb
, offset
+1);
3303 flags_item
= proto_tree_add_item(args_tree
,
3304 hf_amqp_0_10_argument_packing_flags
,
3305 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3308 case AMQP_0_10_METHOD_SESSION_ATTACH
:
3309 if ((flag1
& ~0x03) || ((flag2
!= 0)))
3310 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
3313 proto_tree_add_item_ret_uint(args_tree
, hf_amqp_0_10_method_session_attach_name_size
,
3314 tvb
, offset
, 2, ENC_BIG_ENDIAN
, &size
);
3316 proto_tree_add_item(args_tree
,
3317 hf_amqp_0_10_method_session_attach_name
,
3318 tvb
, offset
, size
, ENC_NA
);
3319 /* offset += size; */
3322 * 2nd argument is an optional bit, force.
3324 proto_tree_add_item(args_tree
,
3325 hf_amqp_0_10_method_session_attach_force
,
3326 tvb
, flags_offset
, 1, ENC_BIG_ENDIAN
);
3329 case AMQP_0_10_METHOD_SESSION_ATTACHED
:
3330 case AMQP_0_10_METHOD_SESSION_DETACH
:
3331 if ((flag1
!= 0x01) || (flag2
!= 0))
3332 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
3335 proto_tree_add_item_ret_uint(args_tree
, hf_amqp_0_10_method_session_attach_name_size
,
3336 tvb
, offset
, 2, ENC_BIG_ENDIAN
, &size
);
3338 proto_tree_add_item(args_tree
,
3339 hf_amqp_0_10_method_session_attach_name
,
3340 tvb
, offset
, size
, ENC_NA
);
3341 /* offset += size; */
3345 case AMQP_0_10_METHOD_SESSION_DETACHED
:
3346 if ((flag1
& ~0x03) || (flag2
!= 0))
3347 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
3350 proto_tree_add_item_ret_uint(args_tree
, hf_amqp_0_10_method_session_attach_name_size
,
3351 tvb
, offset
, 2, ENC_BIG_ENDIAN
, &size
);
3353 proto_tree_add_item(args_tree
,
3354 hf_amqp_0_10_method_session_attach_name
,
3355 tvb
, offset
, size
, ENC_NA
);
3359 /* code (detach-code [uint8]) */
3360 proto_tree_add_item(args_tree
,
3361 hf_amqp_0_10_method_session_detached_code
,
3362 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3367 case AMQP_0_10_METHOD_SESSION_REQUEST_TIMEOUT
:
3368 case AMQP_0_10_METHOD_SESSION_TIMEOUT
:
3369 if ((flag1
& ~0x01) || (flag2
!= 0))
3370 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
3372 /* timeout (uint32) */
3373 proto_tree_add_item(args_tree
,
3374 hf_amqp_0_10_method_session_timeout
,
3375 tvb
, offset
, 4, ENC_BIG_ENDIAN
);
3380 case AMQP_0_10_METHOD_SESSION_COMMAND_POINT
:
3381 if ((flag1
& ~0x03) || (flag2
!= 0))
3382 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
3384 /* command-id (sequence-no [uint32]) */
3385 proto_tree_add_item(args_tree
,
3386 hf_amqp_0_10_method_session_command_point_id
,
3387 tvb
, offset
, 4, ENC_BIG_ENDIAN
);
3391 /* command-offset (uint64) */
3392 proto_tree_add_item(args_tree
,
3393 hf_amqp_0_10_method_session_command_point_offset
,
3394 tvb
, offset
, 8, ENC_BIG_ENDIAN
);
3399 case AMQP_0_10_METHOD_SESSION_EXPECTED
:
3400 if ((flag1
& ~0x03) || (flag2
!= 0))
3401 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
3403 /* commands (commands [sequence-set]) */
3404 size
= tvb_get_ntohs(tvb
, offset
);
3405 ti
= proto_tree_add_item(args_tree
,
3406 hf_amqp_0_10_method_session_commands
,
3407 tvb
, offset
, size
+ 2, ENC_NA
);
3409 format_amqp_0_10_sequence_set(tvb
, offset
, size
, ti
);
3413 /* fragments (command-fragments [array of command-fragment]) */
3414 array_size
= amqp_0_10_get_32bit_size(tvb
, offset
);
3415 ti
= proto_tree_add_item(args_tree
,
3416 hf_amqp_0_10_method_session_fragments
,
3417 tvb
, offset
, array_size
+ 4, ENC_NA
);
3419 dissect_amqp_0_10_array(tvb
,
3423 /* offset += array_size; */
3427 case AMQP_0_10_METHOD_SESSION_CONFIRMED
:
3428 if ((flag1
& ~0x03) || (flag2
!= 0))
3429 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
3431 /* commands (commands [sequence-set]) */
3432 size
= tvb_get_ntohs(tvb
, offset
);
3433 ti
= proto_tree_add_item(args_tree
,
3434 hf_amqp_0_10_method_session_commands
,
3435 tvb
, offset
, size
+ 2, ENC_NA
);
3437 format_amqp_0_10_sequence_set(tvb
, offset
, size
, ti
);
3441 /* fragments (command-fragments [array of command-fragment]) */
3442 array_size
= amqp_0_10_get_32bit_size(tvb
, offset
);
3443 ti
= proto_tree_add_item(args_tree
,
3444 hf_amqp_0_10_method_session_fragments
,
3445 tvb
, offset
, array_size
+ 4, ENC_NA
);
3447 dissect_amqp_0_10_array(tvb
,
3451 /* offset += array_size; */
3455 case AMQP_0_10_METHOD_SESSION_COMPLETED
:
3456 if ((flag1
& ~0x03) || (flag2
!= 0))
3457 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
3459 /* commands (commands [sequence-set]) */
3460 size
= tvb_get_ntohs(tvb
, offset
);
3461 ti
= proto_tree_add_item(args_tree
,
3462 hf_amqp_0_10_method_session_commands
,
3463 tvb
, offset
, size
+ 2, ENC_NA
);
3465 format_amqp_0_10_sequence_set(tvb
, offset
, size
, ti
);
3466 /* offset += size; */
3469 * 2nd argument is an optional bit, timely-reply.
3471 proto_tree_add_item(args_tree
,
3472 hf_amqp_0_10_method_session_completed_timely
,
3473 tvb
, flags_offset
, 1, ENC_BIG_ENDIAN
);
3476 case AMQP_0_10_METHOD_SESSION_KNOWN_COMPLETED
:
3477 if ((flag1
& ~0x01) || (flag2
!= 0))
3478 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
3480 /* commands (commands [sequence-set]) */
3481 size
= tvb_get_ntohs(tvb
, offset
);
3482 ti
= proto_tree_add_item(args_tree
,
3483 hf_amqp_0_10_method_session_commands
,
3484 tvb
, offset
, size
+ 2, ENC_NA
);
3486 format_amqp_0_10_sequence_set(tvb
, offset
, size
, ti
);
3487 /* offset += size; */
3491 case AMQP_0_10_METHOD_SESSION_FLUSH
:
3492 if ((flag1
& ~0x07) || (flag2
!= 0))
3493 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
3494 proto_tree_add_item(args_tree
,
3495 hf_amqp_0_10_method_session_flush_expected
,
3496 tvb
, flags_offset
, 1, ENC_BIG_ENDIAN
);
3497 proto_tree_add_item(args_tree
,
3498 hf_amqp_0_10_method_session_flush_confirmed
,
3499 tvb
, flags_offset
, 1, ENC_BIG_ENDIAN
);
3500 proto_tree_add_item(args_tree
,
3501 hf_amqp_0_10_method_session_flush_completed
,
3502 tvb
, flags_offset
, 1, ENC_BIG_ENDIAN
);
3505 case AMQP_0_10_METHOD_SESSION_GAP
:
3506 if ((flag1
& ~0x01) || (flag2
!= 0))
3507 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
3509 /* commands (commands [sequence-set]) */
3510 size
= tvb_get_ntohs(tvb
, offset
);
3511 ti
= proto_tree_add_item(args_tree
,
3512 hf_amqp_0_10_method_session_commands
,
3513 tvb
, offset
, size
+ 2, ENC_NA
);
3515 format_amqp_0_10_sequence_set(tvb
, offset
, size
, ti
);
3516 /* offset += size; */
3524 dissect_amqp_0_10_execution(tvbuff_t
*tvb
,
3528 proto_item
*args_tree
;
3530 proto_item
*flags_item
;
3531 uint8_t amqp_class
= 0, method
;
3532 uint8_t flag1
, flag2
;
3533 uint32_t struct_size
;
3535 const char *method_name
;
3539 method
= tvb_get_uint8(tvb
, offset
+1);
3540 method_name
= val_to_str_const(method
, amqp_0_10_execution_methods
,
3541 "<invalid execution method>");
3542 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "%s ", method_name
);
3543 col_set_fence(pinfo
->cinfo
, COL_INFO
);
3545 proto_tree_add_item(tree
, hf_amqp_0_10_execution_method
,
3546 tvb
, offset
+1, 1, ENC_BIG_ENDIAN
);
3549 * Session header is 2 bytes; one that tells that it's 1 byte long, then
3550 * the byte itself. Bit 0 is sync.
3552 flag1
= tvb_get_uint8(tvb
, offset
);
3553 flag2
= tvb_get_uint8(tvb
, offset
+1);
3554 ti
= proto_tree_add_item(tree
, hf_amqp_0_10_session_header
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3555 if ((flag1
!= 1) || ((flag2
& 0xfe) != 0))
3556 proto_item_append_text(ti
, " (Invalid)");
3558 proto_tree_add_item(tree
, hf_amqp_0_10_session_header_sync
,
3559 tvb
, offset
+ 1, 1, ENC_BIG_ENDIAN
);
3562 ti
= proto_tree_add_item(tree
, hf_amqp_method_arguments
,
3563 tvb
, offset
, -1, ENC_NA
);
3564 args_tree
= proto_item_add_subtree(ti
, ett_args
);
3566 * The flag bits are a simple bit string, not a net-byte-order
3567 * field. tvb_get_bits16() doesn't know how to do little-endian
3568 * at this time, so just pick out two bytes.
3570 flag1
= tvb_get_uint8(tvb
, offset
);
3571 flag2
= tvb_get_uint8(tvb
, offset
+1);
3572 flags_item
= proto_tree_add_item(args_tree
,
3573 hf_amqp_0_10_argument_packing_flags
,
3574 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3577 case AMQP_0_10_METHOD_EXECUTION_SYNC
:
3578 if ((flag1
!= 0) || (flag2
!= 0))
3579 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
3582 case AMQP_0_10_METHOD_EXECUTION_RESULT
:
3583 if ((flag1
& ~0x03) || (flag2
!= 0))
3584 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
3586 /* command-id (sequence-no [uint32]) */
3587 proto_tree_add_item(args_tree
,
3588 hf_amqp_0_10_method_execution_command_id
,
3589 tvb
, offset
, 4, ENC_BIG_ENDIAN
);
3593 /* value (struct32) */
3594 struct_size
= amqp_0_10_get_32bit_size_new(args_tree
, pinfo
, tvb
, hf_amqp_0_10_struct32_size
, offset
);
3597 ti
= proto_tree_add_item(args_tree
,
3598 hf_amqp_0_10_struct32
,
3599 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3600 proto_item_set_len(ti
, struct_size
);
3601 if (struct_size
> (uint32_t)tvb_reported_length_remaining(tvb
, offset
))
3603 next_tvb
= tvb_new_subset_remaining(tvb
, offset
);
3607 next_tvb
= tvb_new_subset_length(tvb
, offset
, struct_size
);
3609 dissect_amqp_0_10_struct32(next_tvb
, pinfo
, ti
);
3610 /* offset += struct_size; */
3614 case AMQP_0_10_METHOD_EXECUTION_EXCEPTION
:
3615 if ((flag1
& ~0x7f) || (flag2
!= 0))
3616 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
3618 /* error-code (error-code [uint16]) */
3619 proto_tree_add_item(args_tree
,
3620 hf_amqp_0_10_method_execution_exception_error
,
3621 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3625 /* command-id (sequence-no [uint32]) */
3626 proto_tree_add_item(args_tree
,
3627 hf_amqp_0_10_method_execution_command_id
,
3628 tvb
, offset
, 4, ENC_BIG_ENDIAN
);
3632 /* class-code (uint8) */
3633 amqp_class
= tvb_get_uint8(tvb
, offset
);
3634 proto_tree_add_item(args_tree
, hf_amqp_0_10_class
,
3635 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3639 /* command-code (uint8) */
3640 switch(amqp_class
) {
3641 case AMQP_0_10_CLASS_CONNECTION
:
3642 class_hf
= hf_amqp_0_10_connection_method
;
3644 case AMQP_0_10_CLASS_SESSION
:
3645 class_hf
= hf_amqp_0_10_session_method
;
3647 case AMQP_0_10_CLASS_EXECUTION
:
3648 class_hf
= hf_amqp_0_10_execution_method
;
3650 case AMQP_0_10_CLASS_MESSAGE
:
3651 class_hf
= hf_amqp_0_10_message_method
;
3653 case AMQP_0_10_CLASS_TX
:
3654 class_hf
= hf_amqp_0_10_tx_method
;
3656 case AMQP_0_10_CLASS_DTX
:
3657 class_hf
= hf_amqp_0_10_dtx_method
;
3659 case AMQP_0_10_CLASS_EXCHANGE
:
3660 class_hf
= hf_amqp_0_10_exchange_method
;
3662 case AMQP_0_10_CLASS_QUEUE
:
3663 class_hf
= hf_amqp_0_10_queue_method
;
3665 case AMQP_0_10_CLASS_FILE
:
3666 class_hf
= hf_amqp_0_10_file_method
;
3668 case AMQP_0_10_CLASS_STREAM
:
3669 class_hf
= hf_amqp_0_10_stream_method
;
3676 proto_tree_add_item(args_tree
, class_hf
,
3677 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3679 expert_add_info_format(pinfo
, args_tree
, &ei_amqp_invalid_class_code
, "Invalid class code %x", amqp_class
);
3683 /* field-index (uint8) */
3684 proto_tree_add_item(args_tree
, hf_amqp_0_10_method_execution_field_index
,
3685 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3689 /* description (str16) */
3690 proto_tree_add_item(args_tree
, hf_amqp_0_10_method_execution_description
,
3691 tvb
, offset
, 2, ENC_ASCII
|ENC_BIG_ENDIAN
);
3692 offset
+= (2 + tvb_get_ntohs(tvb
, offset
));
3695 /* error-info (map) */
3696 struct_size
= amqp_0_10_get_32bit_size_new(args_tree
, pinfo
, tvb
, hf_amqp_0_10_method_execution_error_info_size
, offset
);
3698 ti
= proto_tree_add_item(args_tree
,
3699 hf_amqp_0_10_method_execution_error_info
,
3702 struct_size
, ENC_NA
);
3703 if (struct_size
> (uint32_t)tvb_reported_length_remaining(tvb
, offset
))
3705 next_tvb
= tvb_new_subset_remaining(tvb
, offset
);
3709 next_tvb
= tvb_new_subset_length(tvb
, offset
, struct_size
);
3711 dissect_amqp_0_10_map (next_tvb
, ti
);
3712 /* offset += struct_size; */
3719 dissect_amqp_0_10_message(tvbuff_t
*tvb
,
3723 proto_item
*args_tree
;
3725 proto_item
*flags_item
;
3727 uint8_t flag1
, flag2
;
3731 const char *method_name
;
3735 method
= tvb_get_uint8(tvb
, offset
+1);
3736 method_name
= val_to_str_const(method
, amqp_0_10_message_methods
,
3737 "<invalid message method>");
3738 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "%s ", method_name
);
3739 col_set_fence(pinfo
->cinfo
, COL_INFO
);
3741 proto_tree_add_item(tree
, hf_amqp_0_10_message_method
,
3742 tvb
, offset
+1, 1, ENC_BIG_ENDIAN
);
3746 * Session header is 2 bytes; one that tells that it's 1 byte long, then
3747 * the byte itself. Bit 0 is sync.
3749 flag1
= tvb_get_uint8(tvb
, offset
);
3750 flag2
= tvb_get_uint8(tvb
, offset
+1);
3751 ti
= proto_tree_add_item(tree
, hf_amqp_0_10_session_header
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3752 if ((flag1
!= 1) || ((flag2
& 0xfe) != 0))
3753 proto_item_append_text(ti
, " (Invalid)");
3755 proto_tree_add_item(tree
, hf_amqp_0_10_session_header_sync
,
3756 tvb
, offset
+ 1, 1, ENC_BIG_ENDIAN
);
3759 ti
= proto_tree_add_item(tree
, hf_amqp_method_arguments
,
3760 tvb
, offset
, -1, ENC_NA
);
3761 args_tree
= proto_item_add_subtree(ti
, ett_args
);
3763 * The flag bits are a simple bit string, not a net-byte-order
3764 * field. tvb_get_bits16() doesn't know how to do little-endian
3765 * at this time, so just pick out two bytes.
3767 flags_offset
= offset
;
3768 flag1
= tvb_get_uint8(tvb
, offset
);
3769 flag2
= tvb_get_uint8(tvb
, offset
+1);
3770 flags_item
= proto_tree_add_item(args_tree
,
3771 hf_amqp_0_10_argument_packing_flags
,
3772 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3775 case AMQP_0_10_METHOD_MESSAGE_TRANSFER
:
3776 if ((flag1
& ~0x07) || (flag2
!= 0))
3777 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
3778 if (flag1
& 0x01) { /* destination (str8) */
3779 proto_tree_add_item(args_tree
,
3780 hf_amqp_0_10_method_message_transfer_destination
,
3781 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
3782 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
3784 if (flag1
& 0x02) { /* accept-mode (accept-mode [uint8]) */
3785 proto_tree_add_item(args_tree
,
3786 hf_amqp_0_10_method_message_transfer_accept_mode
,
3787 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3790 if (flag1
& 0x04) { /* acquire-mode (acquire-mode [uint8]) */
3791 proto_tree_add_item(args_tree
,
3792 hf_amqp_0_10_method_message_transfer_acquire_mode
,
3793 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3798 case AMQP_0_10_METHOD_MESSAGE_ACCEPT
:
3799 if ((flag1
& ~0x01) || (flag2
!= 0))
3800 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
3802 /* transfers (session.commands [sequence-set]) */
3803 size
= tvb_get_ntohs(tvb
, offset
);
3804 ti
= proto_tree_add_item(args_tree
,
3805 hf_amqp_0_10_method_message_accept_transfers
,
3806 tvb
, offset
, size
+ 2, ENC_NA
);
3808 format_amqp_0_10_sequence_set(tvb
, offset
, size
, ti
);
3809 /* offset += size; */
3813 case AMQP_0_10_METHOD_MESSAGE_REJECT
:
3814 if ((flag1
& ~0x07) || (flag2
!= 0))
3815 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
3817 /* transfers (session.commands [sequence-set]) */
3818 size
= tvb_get_ntohs(tvb
, offset
);
3819 ti
= proto_tree_add_item(args_tree
,
3820 hf_amqp_0_10_method_message_accept_transfers
,
3821 tvb
, offset
, size
+ 2, ENC_NA
);
3823 format_amqp_0_10_sequence_set(tvb
, offset
, size
, ti
);
3826 if (flag1
& 0x02) { /* reject-code (reject-code [uint16]) */
3827 proto_tree_add_item(args_tree
,
3828 hf_amqp_0_10_method_message_transfer_reject_code
,
3829 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3832 if (flag1
& 0x04) { /* text (str8) */
3833 proto_tree_add_item(args_tree
,
3834 hf_amqp_0_10_method_message_reject_text
,
3835 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
3836 /* offset += (1 + tvb_get_uint8(tvb, offset)); */
3840 case AMQP_0_10_METHOD_MESSAGE_RELEASE
:
3841 if ((flag1
& ~0x03) || (flag2
!= 0))
3842 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
3844 /* transfers (session.commands [sequence-set]) */
3845 size
= tvb_get_ntohs(tvb
, offset
);
3846 proto_tree_add_item(args_tree
,
3847 hf_amqp_0_10_method_message_accept_transfers
,
3848 tvb
, offset
, size
+ 2, ENC_NA
);
3850 format_amqp_0_10_sequence_set(tvb
, offset
, size
, ti
);
3851 /* offset += size; */
3854 * 2nd argument is an optional bit, set-redelivered.
3856 proto_tree_add_item(args_tree
,
3857 hf_amqp_0_10_method_message_release_set_redelivered
,
3858 tvb
, flags_offset
, 1, ENC_BIG_ENDIAN
);
3861 case AMQP_0_10_METHOD_MESSAGE_ACQUIRE
:
3862 if ((flag1
& ~0x01) || (flag2
!= 0))
3863 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
3865 /* transfers (session.commands [sequence-set]) */
3866 size
= tvb_get_ntohs(tvb
, offset
);
3867 proto_tree_add_item(args_tree
,
3868 hf_amqp_0_10_method_message_accept_transfers
,
3869 tvb
, offset
, size
+ 2, ENC_NA
);
3871 format_amqp_0_10_sequence_set(tvb
, offset
, size
, ti
);
3872 /* offset += size; */
3876 case AMQP_0_10_METHOD_MESSAGE_RESUME
:
3877 if ((flag1
& ~0x03) || (flag2
!= 0))
3878 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
3880 /* destination (destination [str8]) */
3881 proto_tree_add_item(args_tree
,
3882 hf_amqp_0_10_method_message_dest
,
3883 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
3884 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
3887 /* resume-id (resume-id [str16]) */
3888 proto_tree_add_item(args_tree
,
3889 hf_amqp_0_10_method_message_resume_id
,
3890 tvb
, offset
, 2, ENC_ASCII
|ENC_BIG_ENDIAN
);
3891 /* offset += (2 + tvb_get_ntohs(tvb, offset)); */
3895 case AMQP_0_10_METHOD_MESSAGE_SUBSCRIBE
:
3897 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
3899 /* queue (queue.name [str8]) */
3900 proto_tree_add_item(args_tree
,
3901 hf_amqp_0_10_method_message_subscribe_queue
,
3902 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
3903 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
3906 /* destination (destination [str8]) */
3907 proto_tree_add_item(args_tree
,
3908 hf_amqp_0_10_method_message_dest
,
3909 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
3910 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
3912 if (flag1
& 0x04) { /* accept-mode (accept-mode [uint8]) */
3913 proto_tree_add_item(args_tree
,
3914 hf_amqp_0_10_method_message_transfer_accept_mode
,
3915 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3918 if (flag1
& 0x08) { /* acquire-mode (acquire-mode [uint8]) */
3919 proto_tree_add_item(args_tree
,
3920 hf_amqp_0_10_method_message_transfer_acquire_mode
,
3921 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3925 * 5th argument is an optional bit, exclusive.
3927 proto_tree_add_item(args_tree
,
3928 hf_amqp_0_10_method_message_subscribe_exclusive
,
3929 tvb
, flags_offset
, 1, ENC_BIG_ENDIAN
);
3931 /* resume-id (resume-id [str16]) */
3932 proto_tree_add_item(args_tree
,
3933 hf_amqp_0_10_method_message_resume_id
,
3934 tvb
, offset
, 2, ENC_ASCII
|ENC_BIG_ENDIAN
);
3935 offset
+= (2 + tvb_get_ntohs(tvb
, offset
));
3938 /* resume-ttl (uint64) */
3939 proto_tree_add_item(args_tree
,
3940 hf_amqp_0_10_method_message_subscribe_resume_ttl
,
3941 tvb
, offset
, 8, ENC_BIG_ENDIAN
);
3945 /* arguments (map) */
3946 map_size
= amqp_0_10_get_32bit_size(tvb
, offset
);
3947 ti
= proto_tree_add_item(args_tree
,
3948 hf_amqp_0_10_method_message_subscribe_args
,
3951 4 + map_size
, ENC_NA
);
3952 if (map_size
> (uint32_t)tvb_reported_length_remaining(tvb
, offset
))
3954 next_tvb
= tvb_new_subset_remaining(tvb
, offset
);
3958 next_tvb
= tvb_new_subset_length(tvb
, offset
, map_size
);
3960 dissect_amqp_0_10_map (next_tvb
, ti
);
3961 /* offset += (4 + map_size); */
3965 case AMQP_0_10_METHOD_MESSAGE_CANCEL
:
3966 if ((flag1
& ~0x01) || (flag2
!= 0))
3967 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
3969 /* destination (destination [str8]) */
3970 proto_tree_add_item(args_tree
,
3971 hf_amqp_0_10_method_message_dest
,
3972 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
3973 /* offset += (1 + tvb_get_uint8(tvb, offset)); */
3977 case AMQP_0_10_METHOD_MESSAGE_SET_FLOW_MODE
:
3978 if ((flag1
& ~0x03) || (flag2
!= 0))
3979 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
3981 /* destination (destination [str8]) */
3982 proto_tree_add_item(args_tree
,
3983 hf_amqp_0_10_method_message_dest
,
3984 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
3985 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
3988 /* flow-mode (flow-mode [uint8]) */
3989 proto_tree_add_item(args_tree
,
3990 hf_amqp_0_10_method_message_flow_mode
,
3991 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3996 case AMQP_0_10_METHOD_MESSAGE_FLOW
:
3997 if ((flag1
& ~0x07) || (flag2
!= 0))
3998 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
4000 /* destination (destination [str8]) */
4001 proto_tree_add_item(args_tree
,
4002 hf_amqp_0_10_method_message_dest
,
4003 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
4004 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
4007 /* unit (credit-unit [uint8]) */
4008 proto_tree_add_item(args_tree
,
4009 hf_amqp_0_10_method_message_credit_unit
,
4010 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
4014 /* value (uint32) */
4015 proto_tree_add_item(args_tree
,
4016 hf_amqp_0_10_method_message_credit_value
,
4017 tvb
, offset
, 4, ENC_BIG_ENDIAN
);
4022 case AMQP_0_10_METHOD_MESSAGE_FLUSH
:
4023 if ((flag1
& ~0x01) || (flag2
!= 0))
4024 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
4026 /* destination (destination [str8]) */
4027 proto_tree_add_item(args_tree
,
4028 hf_amqp_0_10_method_message_dest
,
4029 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
4030 /* offset += (1 + tvb_get_uint8(tvb, offset)); */
4034 case AMQP_0_10_METHOD_MESSAGE_STOP
:
4035 if ((flag1
& ~0x01) || (flag2
!= 0))
4036 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
4038 /* destination (destination [str8]) */
4039 proto_tree_add_item(args_tree
,
4040 hf_amqp_0_10_method_message_dest
,
4041 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
4042 /* offset += (1 + tvb_get_uint8(tvb, offset)); */
4049 dissect_amqp_0_10_tx(tvbuff_t
*tvb
,
4054 uint8_t flag1
, flag2
;
4055 const char *method_name
;
4059 method
= tvb_get_uint8(tvb
, offset
+1);
4060 method_name
= val_to_str_const(method
, amqp_0_10_tx_methods
,
4061 "<invalid tx method>");
4062 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "%s ", method_name
);
4063 col_set_fence(pinfo
->cinfo
, COL_INFO
);
4065 proto_tree_add_item(tree
, hf_amqp_0_10_tx_method
,
4066 tvb
, offset
+1, 1, ENC_BIG_ENDIAN
);
4069 * Session header is 2 bytes; one that tells that it's 1 byte long, then
4070 * the byte itself. Bit 0 is sync.
4072 flag1
= tvb_get_uint8(tvb
, offset
);
4073 flag2
= tvb_get_uint8(tvb
, offset
+1);
4074 ti
= proto_tree_add_item(tree
, hf_amqp_0_10_session_header
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
4075 if ((flag1
!= 1) || ((flag2
& 0xfe) != 0))
4076 proto_item_append_text(ti
, " (Invalid)");
4078 proto_tree_add_item(tree
, hf_amqp_0_10_session_header_sync
,
4079 tvb
, offset
+ 1, 1, ENC_BIG_ENDIAN
);
4082 /* No args on any method in this class */
4086 dissect_amqp_0_10_dtx(tvbuff_t
*tvb
,
4090 proto_item
*args_tree
;
4092 proto_item
*flags_item
;
4094 uint8_t flag1
, flag2
;
4095 uint16_t xid_length
;
4097 const char *method_name
;
4100 method
= tvb_get_uint8(tvb
, offset
+1);
4101 method_name
= val_to_str_const(method
, amqp_0_10_dtx_methods
,
4102 "<invalid dtx method>");
4103 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "%s ", method_name
);
4104 col_set_fence(pinfo
->cinfo
, COL_INFO
);
4106 proto_tree_add_item(tree
, hf_amqp_0_10_dtx_method
,
4107 tvb
, offset
+1, 1, ENC_BIG_ENDIAN
);
4110 * Session header is 2 bytes; one that tells that it's 1 byte long, then
4111 * the byte itself. Bit 0 is sync.
4113 flag1
= tvb_get_uint8(tvb
, offset
);
4114 flag2
= tvb_get_uint8(tvb
, offset
+1);
4115 ti
= proto_tree_add_item(tree
, hf_amqp_0_10_session_header
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
4116 if ((flag1
!= 1) || ((flag2
& 0xfe) != 0))
4117 proto_item_append_text(ti
, " (Invalid)");
4119 proto_tree_add_item(tree
, hf_amqp_0_10_session_header_sync
,
4120 tvb
, offset
+ 1, 1, ENC_BIG_ENDIAN
);
4123 /* No args for dtx.select or dtx.recover */
4124 if ((method
== AMQP_0_10_METHOD_DTX_SELECT
) ||
4125 (method
== AMQP_0_10_METHOD_DTX_RECOVER
))
4128 ti
= proto_tree_add_item(tree
, hf_amqp_method_arguments
,
4129 tvb
, offset
, -1, ENC_NA
);
4130 args_tree
= proto_item_add_subtree(ti
, ett_args
);
4133 * The flag bits are a simple bit string, not a net-byte-order
4134 * field. tvb_get_bits16() doesn't know how to do little-endian
4135 * at this time, so just pick out two bytes.
4137 flags_offset
= offset
;
4138 flag1
= tvb_get_uint8(tvb
, offset
);
4139 flag2
= tvb_get_uint8(tvb
, offset
+1);
4140 flags_item
= proto_tree_add_item(args_tree
,
4141 hf_amqp_0_10_argument_packing_flags
,
4142 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
4145 case AMQP_0_10_METHOD_DTX_START
:
4146 if ((flag1
& ~0x07) || (flag2
!= 0))
4147 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
4148 if (flag1
& 0x01) { /* xid (xid) */
4149 xid_length
= tvb_get_ntohs(tvb
, offset
);
4151 ti
= proto_tree_add_item(args_tree
,
4152 hf_amqp_0_10_dtx_xid
,
4155 xid_length
+ 2, ENC_NA
);
4156 dissect_amqp_0_10_xid (tvb
,
4159 /* offset += xid_length; */
4162 * 2nd, 3rd arguments are optional bits.
4164 proto_tree_add_item(args_tree
,
4165 hf_amqp_0_10_method_dtx_start_join
,
4166 tvb
, flags_offset
, 1, ENC_BIG_ENDIAN
);
4167 proto_tree_add_item(args_tree
,
4168 hf_amqp_0_10_method_dtx_start_resume
,
4169 tvb
, flags_offset
, 1, ENC_BIG_ENDIAN
);
4173 case AMQP_0_10_METHOD_DTX_END
:
4174 if ((flag1
& ~0x07) || (flag2
!= 0))
4175 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
4176 if (flag1
& 0x01) { /* xid (xid) */
4177 xid_length
= tvb_get_ntohs(tvb
, offset
);
4179 ti
= proto_tree_add_item(args_tree
,
4180 hf_amqp_0_10_dtx_xid
,
4183 xid_length
+ 2, ENC_NA
);
4184 dissect_amqp_0_10_xid (tvb
,
4187 /* offset += xid_length; */
4190 * 2nd, 3rd arguments are optional bits.
4192 proto_tree_add_item(args_tree
,
4193 hf_amqp_0_10_method_dtx_end_fail
,
4194 tvb
, flags_offset
, 1, ENC_BIG_ENDIAN
);
4195 proto_tree_add_item(args_tree
,
4196 hf_amqp_0_10_method_dtx_end_suspend
,
4197 tvb
, flags_offset
, 1, ENC_BIG_ENDIAN
);
4200 case AMQP_0_10_METHOD_DTX_COMMIT
:
4201 if ((flag1
& ~0x03) || (flag2
!= 0))
4202 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
4203 if (flag1
& 0x01) { /* xid (xid) */
4204 xid_length
= tvb_get_ntohs(tvb
, offset
);
4206 ti
= proto_tree_add_item(args_tree
,
4207 hf_amqp_0_10_dtx_xid
,
4210 xid_length
+ 2, ENC_NA
);
4211 dissect_amqp_0_10_xid (tvb
,
4214 /* offset += xid_length; */
4217 * 2nd argument is an optional bit.
4219 proto_tree_add_item(args_tree
,
4220 hf_amqp_0_10_method_dtx_commit_one_phase
,
4221 tvb
, flags_offset
, 1, ENC_BIG_ENDIAN
);
4224 case AMQP_0_10_METHOD_DTX_FORGET
:
4225 case AMQP_0_10_METHOD_DTX_GET_TIMEOUT
:
4226 case AMQP_0_10_METHOD_DTX_PREPARE
:
4227 case AMQP_0_10_METHOD_DTX_ROLLBACK
:
4228 if ((flag1
& ~0x01) || (flag2
!= 0))
4229 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
4230 if (flag1
& 0x01) { /* xid (xid) */
4231 xid_length
= tvb_get_ntohs(tvb
, offset
);
4233 ti
= proto_tree_add_item(args_tree
,
4234 hf_amqp_0_10_dtx_xid
,
4237 xid_length
+ 2, ENC_NA
);
4238 dissect_amqp_0_10_xid (tvb
,
4241 /* offset += xid_length; */
4245 case AMQP_0_10_METHOD_DTX_SET_TIMEOUT
:
4246 if ((flag1
& ~0x03) || (flag2
!= 0))
4247 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
4248 if (flag1
& 0x01) { /* xid (xid) */
4249 xid_length
= tvb_get_ntohs(tvb
, offset
);
4251 ti
= proto_tree_add_item(args_tree
,
4252 hf_amqp_0_10_dtx_xid
,
4255 xid_length
+ 2, ENC_NA
);
4256 dissect_amqp_0_10_xid (tvb
,
4259 offset
+= xid_length
;
4261 if (flag1
& 0x02) { /* timeout (uint32) */
4262 proto_tree_add_item(args_tree
,
4263 hf_amqp_0_10_method_dtx_set_timeout_timeout
,
4264 tvb
, offset
, 4, ENC_BIG_ENDIAN
);
4273 dissect_amqp_0_10_exchange(tvbuff_t
*tvb
,
4277 proto_item
*args_tree
;
4279 proto_item
*flags_item
;
4281 uint8_t flag1
, flag2
;
4282 uint32_t map_length
;
4284 const char *method_name
;
4288 method
= tvb_get_uint8(tvb
, offset
+1);
4289 method_name
= val_to_str_const(method
, amqp_0_10_exchange_methods
,
4290 "<invalid exchange method>");
4291 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "%s ", method_name
);
4292 col_set_fence(pinfo
->cinfo
, COL_INFO
);
4294 proto_tree_add_item(tree
, hf_amqp_0_10_exchange_method
,
4295 tvb
, offset
+1, 1, ENC_BIG_ENDIAN
);
4298 * Session header is 2 bytes; one that tells that it's 1 byte long, then
4299 * the byte itself. Bit 0 is sync.
4301 flag1
= tvb_get_uint8(tvb
, offset
);
4302 flag2
= tvb_get_uint8(tvb
, offset
+1);
4303 ti
= proto_tree_add_item(tree
, hf_amqp_0_10_session_header
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
4304 if ((flag1
!= 1) || ((flag2
& 0xfe) != 0))
4305 proto_item_append_text(ti
, " (Invalid)");
4307 proto_tree_add_item(tree
, hf_amqp_0_10_session_header_sync
,
4308 tvb
, offset
+ 1, 1, ENC_BIG_ENDIAN
);
4311 ti
= proto_tree_add_item(tree
, hf_amqp_method_arguments
,
4312 tvb
, offset
, -1, ENC_NA
);
4313 args_tree
= proto_item_add_subtree(ti
, ett_args
);
4316 * The flag bits are a simple bit string, not a net-byte-order
4317 * field. tvb_get_bits16() doesn't know how to do little-endian
4318 * at this time, so just pick out two bytes.
4320 flags_offset
= offset
;
4321 flag1
= tvb_get_uint8(tvb
, offset
);
4322 flag2
= tvb_get_uint8(tvb
, offset
+1);
4323 flags_item
= proto_tree_add_item(args_tree
,
4324 hf_amqp_0_10_argument_packing_flags
,
4325 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
4328 case AMQP_0_10_METHOD_EXCHANGE_DECLARE
:
4329 if ((flag1
& ~0x7f) || (flag2
!= 0))
4330 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
4331 if (flag1
& 0x01) { /* exchange (name [str8]) */
4332 proto_tree_add_item(args_tree
,
4333 hf_amqp_0_10_method_exchange_declare_exchange
,
4334 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
4335 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
4337 if (flag1
& 0x02) { /* type (str8) */
4338 proto_tree_add_item(args_tree
,
4339 hf_amqp_0_10_method_exchange_declare_type
,
4340 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
4341 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
4343 if (flag1
& 0x04) { /* alternate-exchange (name [str8]) */
4344 proto_tree_add_item(args_tree
,
4345 hf_amqp_0_10_method_exchange_declare_alt_exchange
,
4346 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
4347 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
4350 * 4th-6th arguments are optional bits.
4352 proto_tree_add_item(args_tree
,
4353 hf_amqp_0_10_method_exchange_declare_passive
,
4354 tvb
, flags_offset
, 1, ENC_BIG_ENDIAN
);
4355 proto_tree_add_item(args_tree
,
4356 hf_amqp_0_10_method_exchange_declare_durable
,
4357 tvb
, flags_offset
, 1, ENC_BIG_ENDIAN
);
4358 proto_tree_add_item(args_tree
,
4359 hf_amqp_0_10_method_exchange_declare_auto_delete
,
4360 tvb
, flags_offset
, 1, ENC_BIG_ENDIAN
);
4361 if (flag1
& 0x40) { /* arguments (map) */
4362 map_length
= amqp_0_10_get_32bit_size_new(args_tree
, pinfo
, tvb
, hf_amqp_0_10_method_exchange_declare_arguments_size
, offset
);
4364 ti
= proto_tree_add_item(args_tree
,
4365 hf_amqp_0_10_method_exchange_declare_arguments
,
4368 map_length
, ENC_NA
);
4369 if (map_length
> (uint32_t)tvb_reported_length_remaining(tvb
, offset
))
4371 next_tvb
= tvb_new_subset_remaining(tvb
, offset
);
4375 next_tvb
= tvb_new_subset_length(tvb
, offset
, map_length
);
4377 dissect_amqp_0_10_map (next_tvb
, ti
);
4378 /* offset += map_length; */
4382 case AMQP_0_10_METHOD_EXCHANGE_DELETE
:
4383 if ((flag1
& ~0x03) || (flag2
!= 0))
4384 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
4385 if (flag1
& 0x01) { /* exchange (name [str8]) */
4386 proto_tree_add_item(args_tree
,
4387 hf_amqp_0_10_method_exchange_declare_exchange
,
4388 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
4389 /* offset += (1 + tvb_get_uint8(tvb, offset)); */
4392 * 2nd argument is an optional bit.
4394 proto_tree_add_item(args_tree
,
4395 hf_amqp_0_10_method_exchange_delete_if_unused
,
4396 tvb
, flags_offset
, 1, ENC_BIG_ENDIAN
);
4399 case AMQP_0_10_METHOD_EXCHANGE_QUERY
:
4400 if ((flag1
& ~0x01) || (flag2
!= 0))
4401 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
4402 if (flag1
& 0x01) { /* exchange (name [str8]) */
4403 proto_tree_add_item(args_tree
,
4404 hf_amqp_0_10_method_exchange_declare_exchange
,
4405 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
4406 /* offset += (1 + tvb_get_uint8(tvb, offset)); */
4410 case AMQP_0_10_METHOD_EXCHANGE_BIND
:
4411 if ((flag1
& ~0x0f) || (flag2
!= 0))
4412 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
4413 if (flag1
& 0x01) { /* queue (queue.name [str8]) */
4414 proto_tree_add_item(args_tree
,
4415 hf_amqp_0_10_method_exchange_bind_queue
,
4416 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
4417 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
4419 if (flag1
& 0x02) { /* exchange (name [str8]) */
4420 proto_tree_add_item(args_tree
,
4421 hf_amqp_0_10_method_exchange_declare_exchange
,
4422 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
4423 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
4425 if (flag1
& 0x04) { /* binding-key (str8) */
4426 proto_tree_add_item(args_tree
,
4427 hf_amqp_0_10_method_exchange_binding_key
,
4428 tvb
, offset
, 1, ENC_ASCII
);
4429 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
4431 if (flag1
& 0x08) { /* arguments (map) */
4432 map_length
= amqp_0_10_get_32bit_size_new(args_tree
, pinfo
, tvb
, hf_amqp_0_10_method_exchange_declare_arguments_size
, offset
);
4434 ti
= proto_tree_add_item(args_tree
,
4435 hf_amqp_0_10_method_exchange_declare_arguments
,
4438 map_length
, ENC_NA
);
4439 if (map_length
> (uint32_t)tvb_reported_length_remaining(tvb
, offset
))
4441 next_tvb
= tvb_new_subset_remaining(tvb
, offset
);
4445 next_tvb
= tvb_new_subset_length(tvb
, offset
, map_length
);
4447 dissect_amqp_0_10_map (next_tvb
, ti
);
4448 /* offset += map_length; */
4452 case AMQP_0_10_METHOD_EXCHANGE_UNBIND
:
4453 if ((flag1
& ~0x07) || (flag2
!= 0))
4454 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
4455 if (flag1
& 0x01) { /* queue (queue.name [str8]) */
4456 proto_tree_add_item(args_tree
,
4457 hf_amqp_0_10_method_exchange_bind_queue
,
4458 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
4459 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
4461 if (flag1
& 0x02) { /* exchange (name [str8]) */
4462 proto_tree_add_item(args_tree
,
4463 hf_amqp_0_10_method_exchange_declare_exchange
,
4464 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
4465 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
4467 if (flag1
& 0x04) { /* binding-key (str8) */
4468 proto_tree_add_item(args_tree
,
4469 hf_amqp_0_10_method_exchange_binding_key
,
4470 tvb
, offset
, 1, ENC_ASCII
);
4471 /* offset += (1 + tvb_get_uint8(tvb, offset)); */
4475 case AMQP_0_10_METHOD_EXCHANGE_BOUND
:
4476 if ((flag1
& ~0x0f) || (flag2
!= 0))
4477 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
4478 if (flag1
& 0x01) { /* exchange (name [str8]) */
4479 proto_tree_add_item(args_tree
,
4480 hf_amqp_0_10_method_exchange_declare_exchange
,
4481 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
4482 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
4484 if (flag1
& 0x02) { /* queue (queue.name [str8]) */
4485 proto_tree_add_item(args_tree
,
4486 hf_amqp_0_10_method_exchange_bind_queue
,
4487 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
4488 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
4490 if (flag1
& 0x04) { /* binding-key (str8) */
4491 proto_tree_add_item(args_tree
,
4492 hf_amqp_0_10_method_exchange_binding_key
,
4493 tvb
, offset
, 1, ENC_ASCII
);
4494 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
4496 if (flag1
& 0x08) { /* arguments (map) */
4497 map_length
= amqp_0_10_get_32bit_size_new(args_tree
, pinfo
, tvb
, hf_amqp_0_10_method_exchange_declare_arguments_size
, offset
);
4499 ti
= proto_tree_add_item(args_tree
,
4500 hf_amqp_0_10_method_exchange_declare_arguments
,
4503 map_length
, ENC_NA
);
4504 if (map_length
> (uint32_t)tvb_reported_length_remaining(tvb
, offset
))
4506 next_tvb
= tvb_new_subset_remaining(tvb
, offset
);
4510 next_tvb
= tvb_new_subset_length(tvb
, offset
, map_length
);
4512 dissect_amqp_0_10_map (next_tvb
, ti
);
4513 /* offset += map_length; */
4520 dissect_amqp_0_10_queue(tvbuff_t
*tvb
,
4524 proto_item
*args_tree
;
4526 proto_item
*flags_item
;
4528 uint8_t flag1
, flag2
;
4529 uint32_t map_length
;
4531 const char *method_name
;
4535 method
= tvb_get_uint8(tvb
, offset
+1);
4536 method_name
= val_to_str_const(method
, amqp_0_10_queue_methods
,
4537 "<invalid queue method>");
4538 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "%s ", method_name
);
4539 col_set_fence(pinfo
->cinfo
, COL_INFO
);
4541 proto_tree_add_item(tree
, hf_amqp_0_10_queue_method
,
4542 tvb
, offset
+1, 1, ENC_BIG_ENDIAN
);
4545 * Session header is 2 bytes; one that tells that it's 1 byte long, then
4546 * the byte itself. Bit 0 is sync.
4548 flag1
= tvb_get_uint8(tvb
, offset
);
4549 flag2
= tvb_get_uint8(tvb
, offset
+1);
4550 ti
= proto_tree_add_item(tree
, hf_amqp_0_10_session_header
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
4551 if ((flag1
!= 1) || ((flag2
& 0xfe) != 0))
4552 proto_item_append_text(ti
, " (Invalid)");
4554 proto_tree_add_item(tree
, hf_amqp_0_10_session_header_sync
,
4555 tvb
, offset
+ 1, 1, ENC_BIG_ENDIAN
);
4558 ti
= proto_tree_add_item(tree
, hf_amqp_method_arguments
,
4559 tvb
, offset
, -1, ENC_NA
);
4560 args_tree
= proto_item_add_subtree(ti
, ett_args
);
4563 * The flag bits are a simple bit string, not a net-byte-order
4564 * field. tvb_get_bits16() doesn't know how to do little-endian
4565 * at this time, so just pick out two bytes.
4567 flags_offset
= offset
;
4568 flag1
= tvb_get_uint8(tvb
, offset
);
4569 flag2
= tvb_get_uint8(tvb
, offset
+1);
4570 flags_item
= proto_tree_add_item(args_tree
,
4571 hf_amqp_0_10_argument_packing_flags
,
4572 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
4575 case AMQP_0_10_METHOD_QUEUE_DECLARE
:
4576 if ((flag1
& ~0x7f) || (flag2
!= 0))
4577 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
4578 if (flag1
& 0x01) { /* queue (name [str8]) */
4579 proto_tree_add_item(args_tree
,
4580 hf_amqp_0_10_method_queue_name
,
4581 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
4582 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
4584 if (flag1
& 0x02) { /* alternate-exchange (exchange.name [str8]) */
4585 proto_tree_add_item(args_tree
,
4586 hf_amqp_0_10_method_queue_alt_exchange
,
4587 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
4588 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
4591 * 3rd-6th arguments are optional bits.
4593 proto_tree_add_item(args_tree
,
4594 hf_amqp_0_10_method_queue_declare_passive
,
4595 tvb
, flags_offset
, 1, ENC_BIG_ENDIAN
);
4596 proto_tree_add_item(args_tree
,
4597 hf_amqp_0_10_method_queue_declare_durable
,
4598 tvb
, flags_offset
, 1, ENC_BIG_ENDIAN
);
4599 proto_tree_add_item(args_tree
,
4600 hf_amqp_0_10_method_queue_declare_exclusive
,
4601 tvb
, flags_offset
, 1, ENC_BIG_ENDIAN
);
4602 proto_tree_add_item(args_tree
,
4603 hf_amqp_0_10_method_queue_declare_auto_delete
,
4604 tvb
, flags_offset
, 1, ENC_BIG_ENDIAN
);
4605 if (flag1
& 0x40) { /* arguments (map) */
4606 map_length
= amqp_0_10_get_32bit_size_new(args_tree
, pinfo
, tvb
, hf_amqp_0_10_method_queue_declare_arguments_size
, offset
);
4608 ti
= proto_tree_add_item(args_tree
,
4609 hf_amqp_0_10_method_queue_declare_arguments
,
4612 map_length
, ENC_NA
);
4613 if (map_length
> (uint32_t)tvb_reported_length_remaining(tvb
, offset
))
4615 next_tvb
= tvb_new_subset_remaining(tvb
, offset
);
4619 next_tvb
= tvb_new_subset_length(tvb
, offset
, map_length
);
4621 dissect_amqp_0_10_map (next_tvb
, ti
);
4622 /* offset += map_length; */
4626 case AMQP_0_10_METHOD_QUEUE_DELETE
:
4627 if ((flag1
& ~0x07) || (flag2
!= 0))
4628 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
4629 if (flag1
& 0x01) { /* queue (name [str8]) */
4630 proto_tree_add_item(args_tree
,
4631 hf_amqp_0_10_method_queue_name
,
4632 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
4633 /* offset += (1 + tvb_get_uint8(tvb, offset)); */
4636 * 2nd-3rd arguments are optional bits.
4638 proto_tree_add_item(args_tree
,
4639 hf_amqp_0_10_method_queue_delete_if_unused
,
4640 tvb
, flags_offset
, 1, ENC_BIG_ENDIAN
);
4641 proto_tree_add_item(args_tree
,
4642 hf_amqp_0_10_method_queue_delete_if_empty
,
4643 tvb
, flags_offset
, 1, ENC_BIG_ENDIAN
);
4646 case AMQP_0_10_METHOD_QUEUE_PURGE
:
4647 if ((flag1
& ~0x01) || (flag2
!= 0))
4648 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
4649 if (flag1
& 0x01) { /* queue (name [str8]) */
4650 proto_tree_add_item(args_tree
,
4651 hf_amqp_0_10_method_queue_name
,
4652 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
4653 /* offset += (1 + tvb_get_uint8(tvb, offset)); */
4657 case AMQP_0_10_METHOD_QUEUE_QUERY
:
4658 if ((flag1
& ~0x01) || (flag2
!= 0))
4659 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
4660 if (flag1
& 0x01) { /* queue (name [str8]) */
4661 proto_tree_add_item(args_tree
,
4662 hf_amqp_0_10_method_queue_name
,
4663 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
4664 /* offset += (1 + tvb_get_uint8(tvb, offset)); */
4671 dissect_amqp_0_10_file(tvbuff_t
*tvb
,
4675 proto_item
*args_tree
;
4677 proto_item
*flags_item
;
4679 uint8_t flag1
, flag2
;
4680 uint32_t map_length
;
4682 const char *method_name
;
4686 method
= tvb_get_uint8(tvb
, offset
+1);
4687 method_name
= val_to_str_const(method
, amqp_0_10_file_methods
,
4688 "<invalid file method>");
4689 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "%s ", method_name
);
4690 col_set_fence(pinfo
->cinfo
, COL_INFO
);
4692 proto_tree_add_item(tree
, hf_amqp_0_10_file_method
,
4693 tvb
, offset
+1, 1, ENC_BIG_ENDIAN
);
4696 * Session header is 2 bytes; one that tells that it's 1 byte long, then
4697 * the byte itself. Bit 0 is sync.
4699 flag1
= tvb_get_uint8(tvb
, offset
);
4700 flag2
= tvb_get_uint8(tvb
, offset
+1);
4701 ti
= proto_tree_add_item(tree
, hf_amqp_0_10_session_header
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
4702 if ((flag1
!= 1) || ((flag2
& 0xfe) != 0))
4703 proto_item_append_text(ti
, " (Invalid)");
4705 proto_tree_add_item(tree
, hf_amqp_0_10_session_header_sync
,
4706 tvb
, offset
+ 1, 1, ENC_BIG_ENDIAN
);
4709 ti
= proto_tree_add_item(tree
, hf_amqp_method_arguments
,
4710 tvb
, offset
, -1, ENC_NA
);
4711 args_tree
= proto_item_add_subtree(ti
, ett_args
);
4714 * The flag bits are a simple bit string, not a net-byte-order
4715 * field. tvb_get_bits16() doesn't know how to do little-endian
4716 * at this time, so just pick out two bytes.
4718 flags_offset
= offset
;
4719 flag1
= tvb_get_uint8(tvb
, offset
);
4720 flag2
= tvb_get_uint8(tvb
, offset
+1);
4721 flags_item
= proto_tree_add_item(args_tree
,
4722 hf_amqp_0_10_argument_packing_flags
,
4723 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
4726 case AMQP_0_10_METHOD_FILE_QOS
:
4727 if ((flag1
& ~0x07) || (flag2
!= 0))
4728 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
4729 if (flag1
& 0x01) { /* prefetch-size (uint32) */
4730 proto_tree_add_item(args_tree
,
4731 hf_amqp_0_10_method_file_qos_prefetch_size
,
4732 tvb
, offset
, 4, ENC_BIG_ENDIAN
);
4735 if (flag1
& 0x02) { /* prefetch-count (uint16) */
4736 proto_tree_add_item(args_tree
,
4737 hf_amqp_0_10_method_file_qos_prefetch_count
,
4738 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
4742 * 3rd argument is an optional bit.
4744 proto_tree_add_item(args_tree
,
4745 hf_amqp_0_10_method_file_qos_global
,
4746 tvb
, flags_offset
, 1, ENC_BIG_ENDIAN
);
4749 case AMQP_0_10_METHOD_FILE_QOS_OK
:
4750 case AMQP_0_10_METHOD_FILE_STAGE
:
4754 case AMQP_0_10_METHOD_FILE_CONSUME
:
4755 if ((flag1
& ~0x7f) || (flag2
!= 0))
4756 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
4757 if (flag1
& 0x01) { /* queue (queue.name [str8]) */
4758 proto_tree_add_item(args_tree
,
4759 hf_amqp_0_10_method_queue_name
,
4760 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
4761 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
4763 if (flag1
& 0x02) { /* consumer-tag (str8) */
4764 proto_tree_add_item(args_tree
,
4765 hf_amqp_0_10_method_file_consumer_tag
,
4766 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
4767 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
4770 * 3rd-6th arguments are optional bits.
4772 proto_tree_add_item(args_tree
,
4773 hf_amqp_0_10_method_file_consume_no_local
,
4774 tvb
, flags_offset
, 1, ENC_BIG_ENDIAN
);
4775 proto_tree_add_item(args_tree
,
4776 hf_amqp_0_10_method_file_consume_no_ack
,
4777 tvb
, flags_offset
, 1, ENC_BIG_ENDIAN
);
4778 proto_tree_add_item(args_tree
,
4779 hf_amqp_0_10_method_file_consume_exclusive
,
4780 tvb
, flags_offset
, 1, ENC_BIG_ENDIAN
);
4781 proto_tree_add_item(args_tree
,
4782 hf_amqp_0_10_method_file_consume_nowait
,
4783 tvb
, flags_offset
, 1, ENC_BIG_ENDIAN
);
4784 if (flag1
& 0x40) { /* arguments (map) */
4785 map_length
= amqp_0_10_get_32bit_size_new(args_tree
, pinfo
, tvb
, hf_amqp_0_10_method_file_consume_arguments_size
, offset
);
4787 ti
= proto_tree_add_item(args_tree
,
4788 hf_amqp_0_10_method_file_consume_arguments
,
4791 map_length
, ENC_NA
);
4792 if (map_length
> (uint32_t)tvb_reported_length_remaining(tvb
, offset
))
4794 next_tvb
= tvb_new_subset_remaining(tvb
, offset
);
4798 next_tvb
= tvb_new_subset_length(tvb
, offset
, map_length
);
4800 dissect_amqp_0_10_map (next_tvb
, ti
);
4801 /* offset += map_length; */
4805 case AMQP_0_10_METHOD_FILE_CONSUME_OK
:
4806 case AMQP_0_10_METHOD_FILE_CANCEL
:
4807 if ((flag1
& ~0x01) || (flag2
!= 0))
4808 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
4809 if (flag1
& 0x01) { /* consumer-tag (str8) */
4810 proto_tree_add_item(args_tree
,
4811 hf_amqp_0_10_method_file_consumer_tag
,
4812 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
4813 /* offset += (1 + tvb_get_uint8(tvb, offset)); */
4817 case AMQP_0_10_METHOD_FILE_OPEN
:
4818 if ((flag1
& ~0x03) || (flag2
!= 0))
4819 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
4820 if (flag1
& 0x01) { /* identifier (str8) */
4821 proto_tree_add_item(args_tree
,
4822 hf_amqp_0_10_method_file_identifier
,
4823 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
4824 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
4826 if (flag1
& 0x02) { /* content-size (uint64) */
4827 proto_tree_add_item(args_tree
,
4828 hf_amqp_0_10_method_file_open_content_size
,
4829 tvb
, offset
, 8, ENC_BIG_ENDIAN
);
4834 case AMQP_0_10_METHOD_FILE_OPEN_OK
:
4835 if ((flag1
& ~0x01) || (flag2
!= 0))
4836 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
4837 if (flag1
& 0x01) { /* staged-size (uint64) */
4838 proto_tree_add_item(args_tree
,
4839 hf_amqp_0_10_method_file_open_ok_staged_size
,
4840 tvb
, offset
, 8, ENC_BIG_ENDIAN
);
4845 case AMQP_0_10_METHOD_FILE_PUBLISH
:
4846 if ((flag1
& ~0x1f) || (flag2
!= 0))
4847 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
4848 if (flag1
& 0x01) { /* exchange (exchange.name [str8]) */
4849 proto_tree_add_item(args_tree
,
4850 hf_amqp_0_10_method_file_publish_exchange
,
4851 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
4852 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
4854 if (flag1
& 0x02) { /* routing-key (str8) */
4855 proto_tree_add_item(args_tree
,
4856 hf_amqp_0_10_method_file_publish_routing_key
,
4857 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
4858 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
4861 * 3rd-4th arguments are optional bits.
4863 proto_tree_add_item(args_tree
,
4864 hf_amqp_0_10_method_file_publish_mandatory
,
4865 tvb
, flags_offset
, 1, ENC_BIG_ENDIAN
);
4866 proto_tree_add_item(args_tree
,
4867 hf_amqp_0_10_method_file_publish_immediate
,
4868 tvb
, flags_offset
, 1, ENC_BIG_ENDIAN
);
4869 if (flag1
& 0x10) { /* identifier (str8) */
4870 proto_tree_add_item(args_tree
,
4871 hf_amqp_0_10_method_file_identifier
,
4872 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
4873 /* offset += (1 + tvb_get_uint8(tvb, offset)); */
4877 case AMQP_0_10_METHOD_FILE_RETURN
:
4878 if ((flag1
& ~0x0f) || (flag2
!= 0))
4879 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
4880 if (flag1
& 0x01) { /* reply-code (return-code [uint16]) */
4881 proto_tree_add_item(args_tree
,
4882 hf_amqp_0_10_method_file_return_reply_code
,
4883 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
4886 if (flag1
& 0x02) { /* reply-text (str8) */
4887 proto_tree_add_item(args_tree
,
4888 hf_amqp_0_10_method_file_return_reply_text
,
4889 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
4890 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
4892 if (flag1
& 0x04) { /* exchange (exchange.name [str8]) */
4893 proto_tree_add_item(args_tree
,
4894 hf_amqp_0_10_method_file_return_exchange
,
4895 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
4896 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
4898 if (flag1
& 0x08) { /* routing-key (str8) */
4899 proto_tree_add_item(args_tree
,
4900 hf_amqp_0_10_method_file_return_routing_key
,
4901 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
4902 /* offset += (1 + tvb_get_uint8(tvb, offset)); */
4906 case AMQP_0_10_METHOD_FILE_DELIVER
:
4907 if ((flag1
& ~0x3f) || (flag2
!= 0))
4908 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
4909 if (flag1
& 0x01) { /* consumer-tag (str8) */
4910 proto_tree_add_item(args_tree
,
4911 hf_amqp_0_10_method_file_deliver_consumer_tag
,
4912 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
4913 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
4915 if (flag1
& 0x02) { /* delivery-tag (uint64) */
4916 proto_tree_add_item(args_tree
,
4917 hf_amqp_0_10_method_file_deliver_delivery_tag
,
4918 tvb
, offset
, 8, ENC_BIG_ENDIAN
);
4922 * 3rd argument is an optional bit.
4924 proto_tree_add_item(args_tree
,
4925 hf_amqp_0_10_method_file_deliver_redelivered
,
4926 tvb
, flags_offset
, 1, ENC_BIG_ENDIAN
);
4927 if (flag1
& 0x08) { /* exchange (exchange.name [str8]) */
4928 proto_tree_add_item(args_tree
,
4929 hf_amqp_0_10_method_file_deliver_exchange
,
4930 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
4931 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
4933 if (flag1
& 0x10) { /* routing-key (str8) */
4934 proto_tree_add_item(args_tree
,
4935 hf_amqp_0_10_method_file_deliver_routing_key
,
4936 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
4937 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
4939 if (flag1
& 0x20) { /* identifier (str8) */
4940 proto_tree_add_item(args_tree
,
4941 hf_amqp_0_10_method_file_identifier
,
4942 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
4943 /* offset += (1 + tvb_get_uint8(tvb, offset)); */
4947 case AMQP_0_10_METHOD_FILE_ACK
:
4948 if ((flag1
& ~0x03) || (flag2
!= 0))
4949 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
4950 if (flag1
& 0x01) { /* delivery-tag (uint64) */
4951 proto_tree_add_item(args_tree
,
4952 hf_amqp_0_10_method_file_ack_delivery_tag
,
4953 tvb
, offset
, 8, ENC_BIG_ENDIAN
);
4957 * 2nd argument is an optional bit.
4959 proto_tree_add_item(args_tree
,
4960 hf_amqp_0_10_method_file_ack_multiple
,
4961 tvb
, flags_offset
, 1, ENC_BIG_ENDIAN
);
4964 case AMQP_0_10_METHOD_FILE_REJECT
:
4965 if ((flag1
& ~0x03) || (flag2
!= 0))
4966 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
4967 if (flag1
& 0x01) { /* delivery-tag (uint64) */
4968 proto_tree_add_item(args_tree
,
4969 hf_amqp_0_10_method_file_reject_delivery_tag
,
4970 tvb
, offset
, 8, ENC_BIG_ENDIAN
);
4974 * 2nd argument is an optional bit.
4976 proto_tree_add_item(args_tree
,
4977 hf_amqp_0_10_method_file_reject_requeue
,
4978 tvb
, flags_offset
, 1, ENC_BIG_ENDIAN
);
4984 dissect_amqp_0_10_stream(tvbuff_t
*tvb
,
4988 proto_item
*args_tree
;
4990 proto_item
*flags_item
;
4992 uint8_t flag1
, flag2
;
4993 uint32_t map_length
;
4995 const char *method_name
;
4999 method
= tvb_get_uint8(tvb
, offset
+1);
5000 method_name
= val_to_str_const(method
, amqp_0_10_stream_methods
,
5001 "<invalid stream method>");
5002 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "%s ", method_name
);
5003 col_set_fence(pinfo
->cinfo
, COL_INFO
);
5005 proto_tree_add_item(tree
, hf_amqp_0_10_stream_method
,
5006 tvb
, offset
+1, 1, ENC_BIG_ENDIAN
);
5009 * Session header is 2 bytes; one that tells that it's 1 byte long, then
5010 * the byte itself. Bit 0 is sync.
5012 flag1
= tvb_get_uint8(tvb
, offset
);
5013 flag2
= tvb_get_uint8(tvb
, offset
+1);
5014 ti
= proto_tree_add_item(tree
, hf_amqp_0_10_session_header
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
5015 if ((flag1
!= 1) || ((flag2
& 0xfe) != 0))
5016 proto_item_append_text(ti
, " (Invalid)");
5018 proto_tree_add_item(tree
, hf_amqp_0_10_session_header_sync
,
5019 tvb
, offset
+ 1, 1, ENC_BIG_ENDIAN
);
5022 ti
= proto_tree_add_item(tree
, hf_amqp_method_arguments
,
5023 tvb
, offset
, -1, ENC_NA
);
5024 args_tree
= proto_item_add_subtree(ti
, ett_args
);
5027 * The flag bits are a simple bit string, not a net-byte-order
5028 * field. tvb_get_bits16() doesn't know how to do little-endian
5029 * at this time, so just pick out two bytes.
5031 flags_offset
= offset
;
5032 flag1
= tvb_get_uint8(tvb
, offset
);
5033 flag2
= tvb_get_uint8(tvb
, offset
+1);
5034 flags_item
= proto_tree_add_item(args_tree
,
5035 hf_amqp_0_10_argument_packing_flags
,
5036 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
5039 case AMQP_0_10_METHOD_STREAM_QOS
:
5040 if ((flag1
& ~0x0f) || (flag2
!= 0))
5041 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
5042 if (flag1
& 0x01) { /* prefetch-size (uint32) */
5043 proto_tree_add_item(args_tree
,
5044 hf_amqp_0_10_method_stream_qos_prefetch_size
,
5045 tvb
, offset
, 4, ENC_BIG_ENDIAN
);
5048 if (flag1
& 0x02) { /* prefetch-count (uint16) */
5049 proto_tree_add_item(args_tree
,
5050 hf_amqp_0_10_method_stream_qos_prefetch_count
,
5051 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
5054 if (flag1
& 0x04) { /* consume-rate (uint32) */
5055 proto_tree_add_item(args_tree
,
5056 hf_amqp_0_10_method_stream_qos_prefetch_size
,
5057 tvb
, offset
, 4, ENC_BIG_ENDIAN
);
5061 * 4th argument is an optional bit.
5063 proto_tree_add_item(args_tree
,
5064 hf_amqp_0_10_method_stream_qos_global
,
5065 tvb
, flags_offset
, 1, ENC_BIG_ENDIAN
);
5068 case AMQP_0_10_METHOD_STREAM_QOS_OK
:
5072 case AMQP_0_10_METHOD_STREAM_CONSUME
:
5073 if ((flag1
& ~0x3f) || (flag2
!= 0))
5074 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
5075 if (flag1
& 0x01) { /* queue (queue.name [str8]) */
5076 proto_tree_add_item(args_tree
,
5077 hf_amqp_0_10_method_queue_name
,
5078 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
5079 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
5081 if (flag1
& 0x02) { /* consumer-tag (str8) */
5082 proto_tree_add_item(args_tree
,
5083 hf_amqp_0_10_method_stream_consumer_tag
,
5084 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
5085 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
5088 * 3rd-5th arguments are optional bits.
5090 proto_tree_add_item(args_tree
,
5091 hf_amqp_0_10_method_stream_consume_no_local
,
5092 tvb
, flags_offset
, 1, ENC_BIG_ENDIAN
);
5093 proto_tree_add_item(args_tree
,
5094 hf_amqp_0_10_method_stream_consume_exclusive
,
5095 tvb
, flags_offset
, 1, ENC_BIG_ENDIAN
);
5096 proto_tree_add_item(args_tree
,
5097 hf_amqp_0_10_method_stream_consume_nowait
,
5098 tvb
, flags_offset
, 1, ENC_BIG_ENDIAN
);
5099 if (flag1
& 0x20) { /* arguments (map) */
5100 map_length
= amqp_0_10_get_32bit_size_new(args_tree
, pinfo
, tvb
, hf_amqp_0_10_method_stream_consume_arguments_size
, offset
);
5102 ti
= proto_tree_add_item(args_tree
,
5103 hf_amqp_0_10_method_stream_consume_arguments
,
5106 map_length
, ENC_NA
);
5107 if (map_length
> (uint32_t)tvb_reported_length_remaining(tvb
, offset
))
5109 next_tvb
= tvb_new_subset_remaining(tvb
, offset
);
5113 next_tvb
= tvb_new_subset_length(tvb
, offset
, map_length
);
5115 dissect_amqp_0_10_map (next_tvb
, ti
);
5116 /* offset += map_length; */
5120 case AMQP_0_10_METHOD_STREAM_CONSUME_OK
:
5121 case AMQP_0_10_METHOD_STREAM_CANCEL
:
5122 if ((flag1
& ~0x01) || (flag2
!= 0))
5123 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
5124 if (flag1
& 0x01) { /* consumer-tag (str8) */
5125 proto_tree_add_item(args_tree
,
5126 hf_amqp_0_10_method_stream_consumer_tag
,
5127 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
5128 /* offset += (1 + tvb_get_uint8(tvb, offset)); */
5132 case AMQP_0_10_METHOD_STREAM_PUBLISH
:
5133 if ((flag1
& ~0x0f) || (flag2
!= 0))
5134 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
5135 if (flag1
& 0x01) { /* exchange (exchange.name [str8]) */
5136 proto_tree_add_item(args_tree
,
5137 hf_amqp_0_10_method_stream_publish_exchange
,
5138 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
5139 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
5141 if (flag1
& 0x02) { /* routing-key (str8) */
5142 proto_tree_add_item(args_tree
,
5143 hf_amqp_0_10_method_stream_publish_routing_key
,
5144 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
5145 /* offset += (1 + tvb_get_uint8(tvb, offset)); */
5148 * 3rd-4th arguments are optional bits.
5150 proto_tree_add_item(args_tree
,
5151 hf_amqp_0_10_method_stream_publish_mandatory
,
5152 tvb
, flags_offset
, 1, ENC_BIG_ENDIAN
);
5153 proto_tree_add_item(args_tree
,
5154 hf_amqp_0_10_method_stream_publish_immediate
,
5155 tvb
, flags_offset
, 1, ENC_BIG_ENDIAN
);
5158 case AMQP_0_10_METHOD_STREAM_RETURN
:
5159 if ((flag1
& ~0x0f) || (flag2
!= 0))
5160 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
5161 if (flag1
& 0x01) { /* reply-code (return-code [uint16]) */
5162 proto_tree_add_item(args_tree
,
5163 hf_amqp_0_10_method_stream_return_reply_code
,
5164 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
5167 if (flag1
& 0x02) { /* reply-text (str8) */
5168 proto_tree_add_item(args_tree
,
5169 hf_amqp_0_10_method_stream_return_reply_text
,
5170 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
5171 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
5173 if (flag1
& 0x04) { /* exchange (exchange.name [str8]) */
5174 proto_tree_add_item(args_tree
,
5175 hf_amqp_0_10_method_stream_return_exchange
,
5176 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
5177 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
5179 if (flag1
& 0x08) { /* routing-key (str8) */
5180 proto_tree_add_item(args_tree
,
5181 hf_amqp_0_10_method_stream_return_routing_key
,
5182 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
5183 /* offset += (1 + tvb_get_uint8(tvb, offset)); */
5187 case AMQP_0_10_METHOD_STREAM_DELIVER
:
5188 if ((flag1
& ~0x0f) || (flag2
!= 0))
5189 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
5190 if (flag1
& 0x01) { /* consumer-tag (str8) */
5191 proto_tree_add_item(args_tree
,
5192 hf_amqp_0_10_method_stream_deliver_consumer_tag
,
5193 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
5194 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
5196 if (flag1
& 0x02) { /* delivery-tag (uint64) */
5197 proto_tree_add_item(args_tree
,
5198 hf_amqp_0_10_method_stream_deliver_delivery_tag
,
5199 tvb
, offset
, 8, ENC_BIG_ENDIAN
);
5202 if (flag1
& 0x04) { /* exchange (exchange.name [str8]) */
5203 proto_tree_add_item(args_tree
,
5204 hf_amqp_0_10_method_stream_deliver_exchange
,
5205 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
5206 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
5208 if (flag1
& 0x08) { /* queue (queue.name [str8]) */
5209 proto_tree_add_item(args_tree
,
5210 hf_amqp_0_10_method_stream_deliver_queue
,
5211 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
5212 /* offset += (1 + tvb_get_uint8(tvb, offset)); */
5219 dissect_amqp_0_10_struct_delivery_properties(tvbuff_t
*tvb
,
5223 proto_item
*args_tree
;
5224 proto_item
*flags_item
;
5225 uint8_t flag1
, flag2
;
5231 args_tree
= proto_item_add_subtree(tree
, ett_args
);
5232 offset
+= 2; /* Skip class and struct codes */
5233 flags_offset
= offset
;
5234 flag1
= tvb_get_uint8(tvb
, offset
);
5235 flag2
= tvb_get_uint8(tvb
, offset
+1);
5236 flags_item
= proto_tree_add_item(args_tree
,
5237 hf_amqp_0_10_argument_packing_flags
,
5238 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
5240 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
5243 /* First 3 fields are bits */
5244 proto_tree_add_item(args_tree
,
5245 hf_amqp_0_10_struct_delivery_properties_discard_unroutable
,
5246 tvb
, flags_offset
, 1, ENC_BIG_ENDIAN
);
5247 proto_tree_add_item(args_tree
,
5248 hf_amqp_0_10_struct_delivery_properties_immediate
,
5249 tvb
, flags_offset
, 1, ENC_BIG_ENDIAN
);
5250 proto_tree_add_item(args_tree
,
5251 hf_amqp_0_10_struct_delivery_properties_redelivered
,
5252 tvb
, flags_offset
, 1, ENC_BIG_ENDIAN
);
5254 /* delivery-priority (delivery-priority [uint8]) */
5255 proto_tree_add_item(args_tree
,
5256 hf_amqp_0_10_struct_delivery_properties_priority
,
5257 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
5261 /* delivery-mode (delivery-mode [uint8]) */
5262 proto_tree_add_item(args_tree
,
5263 hf_amqp_0_10_struct_delivery_properties_mode
,
5264 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
5269 proto_tree_add_item(args_tree
,
5270 hf_amqp_0_10_struct_delivery_properties_ttl
,
5271 tvb
, offset
, 8, ENC_BIG_ENDIAN
);
5275 /* timestamp (datetime [uint64]) */
5276 timestamp
= tvb_get_ntoh64(tvb
, offset
);
5277 tv
.secs
= (time_t)timestamp
;
5279 proto_tree_add_time(args_tree
,
5280 hf_amqp_0_10_struct_delivery_properties_timestamp
,
5281 tvb
, offset
, 8, &tv
);
5285 /* expiration (datetime [uint64]) */
5286 timestamp
= tvb_get_ntoh64(tvb
, offset
);
5287 tv
.secs
= (time_t)timestamp
;
5289 proto_tree_add_time(args_tree
,
5290 hf_amqp_0_10_struct_delivery_properties_expiration
,
5291 tvb
, offset
, 8, &tv
);
5295 /* exchange (exchange.name [str8]) */
5296 proto_tree_add_item(args_tree
,
5297 hf_amqp_0_10_struct_delivery_properties_exchange
,
5298 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
5299 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
5302 /* routing-key (str8) */
5303 proto_tree_add_item(args_tree
,
5304 hf_amqp_0_10_struct_delivery_properties_routing_key
,
5305 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
5306 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
5309 /* resume-id (resume-id [str16]) */
5310 proto_tree_add_item(args_tree
,
5311 hf_amqp_0_10_method_message_resume_id
,
5312 tvb
, offset
, 2, ENC_ASCII
|ENC_BIG_ENDIAN
);
5313 offset
+= (2 + tvb_get_ntohs(tvb
, offset
));
5316 /* resume-ttl (uint64) */
5317 proto_tree_add_item(args_tree
,
5318 hf_amqp_0_10_struct_delivery_properties_resume_ttl
,
5319 tvb
, offset
, 8, ENC_BIG_ENDIAN
);
5325 dissect_amqp_0_10_struct_fragment_properties(tvbuff_t
*tvb
,
5329 proto_item
*args_tree
;
5330 proto_item
*flags_item
;
5331 uint8_t flag1
, flag2
;
5335 args_tree
= proto_item_add_subtree(tree
, ett_args
);
5336 offset
+= 2; /* Skip class and struct codes */
5337 flags_offset
= offset
;
5338 flag1
= tvb_get_uint8(tvb
, offset
);
5339 flag2
= tvb_get_uint8(tvb
, offset
+1);
5340 flags_item
= proto_tree_add_item(args_tree
,
5341 hf_amqp_0_10_argument_packing_flags
,
5342 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
5343 if ((flag1
& ~0x07) || (flag2
!= 0))
5344 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
5347 /* First 2 fields are bits */
5348 proto_tree_add_item(args_tree
,
5349 hf_amqp_0_10_struct_fragment_properties_first
,
5350 tvb
, flags_offset
, 1, ENC_BIG_ENDIAN
);
5351 proto_tree_add_item(args_tree
,
5352 hf_amqp_0_10_struct_fragment_properties_last
,
5353 tvb
, flags_offset
, 1, ENC_BIG_ENDIAN
);
5355 /* fragment-size (uint64) */
5356 proto_tree_add_item(args_tree
,
5357 hf_amqp_0_10_struct_fragment_properties_size
,
5358 tvb
, offset
, 8, ENC_BIG_ENDIAN
);
5364 dissect_amqp_0_10_struct_message_properties(tvbuff_t
*tvb
,
5370 proto_item
*args_tree
;
5371 proto_item
*flags_item
, *subflags_item
;
5372 uint8_t flag1
, flag2
;
5373 uint8_t subflag1
, subflag2
;
5375 uint32_t map_length
;
5379 frag
= proto_item_add_subtree(tree
, ett_args
);
5380 offset
+= 2; /* Skip class and struct codes */
5381 flag1
= tvb_get_uint8(tvb
, offset
);
5382 flag2
= tvb_get_uint8(tvb
, offset
+1);
5383 flags_item
= proto_tree_add_item(frag
,
5384 hf_amqp_0_10_argument_packing_flags
,
5385 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
5387 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
5390 /* content-length (uint64) */
5391 proto_tree_add_item(frag
,
5392 hf_amqp_0_10_struct_message_properties_content_len
,
5393 tvb
, offset
, 8, ENC_BIG_ENDIAN
);
5397 /* message-id (uuid) */
5398 proto_tree_add_item(frag
,
5399 hf_amqp_0_10_struct_message_properties_message_id
,
5400 tvb
, offset
, 16, ENC_BIG_ENDIAN
);
5404 /* correlation-id (vbin16) */
5405 proto_tree_add_item(frag
,
5406 hf_amqp_0_10_struct_message_properties_correlation
,
5407 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
5408 offset
+= (2 + tvb_get_ntohs(tvb
, offset
));
5411 /* reply-to (reply-to) */
5412 /* This is another struct, length 2, packing 2 */
5413 len16
= tvb_get_ntohs(tvb
, offset
);
5415 ti
= proto_tree_add_item(frag
,
5416 hf_amqp_0_10_struct_message_properties_reply_to
,
5417 tvb
, offset
, len16
, ENC_NA
);
5418 args_tree
= proto_item_add_subtree(ti
, ett_args
);
5419 subflags_item
= proto_tree_add_item(args_tree
,
5420 hf_amqp_0_10_argument_packing_flags
,
5421 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
5422 subflag1
= tvb_get_uint8(tvb
, offset
);
5423 subflag2
= tvb_get_uint8(tvb
, offset
+ 1);
5424 if ((subflag1
& ~0x03) || (subflag2
!= 0))
5425 expert_add_info(pinfo
, subflags_item
, &ei_amqp_bad_flag_value
);
5427 if (subflag1
& 0x01) {
5428 /* exchange (str8) */
5429 proto_tree_add_item(args_tree
,
5430 hf_amqp_0_10_struct_reply_to_exchange
,
5431 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
5432 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
5434 if (subflag1
& 0x02) {
5435 /* routing-key (str8) */
5436 proto_tree_add_item(args_tree
,
5437 hf_amqp_0_10_struct_reply_to_routing_key
,
5438 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
5439 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
5443 /* content-type (str8) */
5444 proto_tree_add_item(frag
,
5445 hf_amqp_0_10_struct_message_properties_content_type
,
5446 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
5447 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
5450 /* content-encoding (str8) */
5451 proto_tree_add_item(frag
,
5452 hf_amqp_0_10_struct_message_properties_content_encoding
,
5453 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
5454 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
5457 /* user-id (vbin16 ) */
5458 proto_tree_add_item(frag
,
5459 hf_amqp_0_10_struct_message_properties_user_id
,
5460 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
5461 offset
+= (2 + tvb_get_ntohs(tvb
, offset
));
5464 /* app-id (vbin16 ) */
5465 proto_tree_add_item(frag
,
5466 hf_amqp_0_10_struct_message_properties_app_id
,
5467 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
5468 offset
+= (2 + tvb_get_ntohs(tvb
, offset
));
5471 /* application-headers (map) */
5472 map_length
= amqp_0_10_get_32bit_size_new(frag
, pinfo
, tvb
, hf_amqp_0_10_struct_message_properties_application_headers_size
, offset
);
5474 ti
= proto_tree_add_item(frag
,
5475 hf_amqp_0_10_struct_message_properties_application_headers
,
5478 map_length
, ENC_NA
);
5479 if (map_length
> (uint32_t)tvb_reported_length_remaining(tvb
, offset
))
5481 next_tvb
= tvb_new_subset_remaining(tvb
, offset
);
5485 next_tvb
= tvb_new_subset_length(tvb
, offset
, map_length
);
5487 dissect_amqp_0_10_map (next_tvb
, ti
);
5488 /* offset += map_length; */
5493 dissect_amqp_0_10_struct_exchange_query_result(tvbuff_t
*tvb
,
5499 proto_item
*flags_item
;
5500 uint8_t flag1
, flag2
;
5501 uint32_t map_length
;
5506 result
= proto_item_add_subtree(tree
, ett_args
);
5507 offset
+= 2; /* Skip class and struct codes */
5508 flags_offset
= offset
;
5509 flag1
= tvb_get_uint8(tvb
, offset
);
5510 flag2
= tvb_get_uint8(tvb
, offset
+1);
5511 flags_item
= proto_tree_add_item(result
,
5512 hf_amqp_0_10_argument_packing_flags
,
5513 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
5515 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
5519 proto_tree_add_item(result
,
5520 hf_amqp_0_10_method_exchange_declare_type
,
5521 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
5522 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
5524 proto_tree_add_item(result
,
5525 hf_amqp_0_10_struct_exchange_query_result_durable
,
5526 tvb
, flags_offset
, 1, ENC_BIG_ENDIAN
);
5527 proto_tree_add_item(result
,
5528 hf_amqp_0_10_struct_exchange_query_result_not_found
,
5529 tvb
, flags_offset
, 1, ENC_BIG_ENDIAN
);
5531 /* arguments (map) */
5532 map_length
= amqp_0_10_get_32bit_size_new(result
, pinfo
, tvb
, hf_amqp_0_10_method_exchange_declare_arguments_size
, offset
);
5534 ti
= proto_tree_add_item(result
,
5535 hf_amqp_0_10_method_exchange_declare_arguments
,
5538 map_length
, ENC_NA
);
5539 if (map_length
> (uint32_t)tvb_reported_length_remaining(tvb
, offset
))
5541 next_tvb
= tvb_new_subset_remaining(tvb
, offset
);
5545 next_tvb
= tvb_new_subset_length(tvb
, offset
, map_length
);
5547 dissect_amqp_0_10_map (next_tvb
, ti
);
5548 /* offset += map_length; */
5553 dissect_amqp_0_10_struct_queue_query_result(tvbuff_t
*tvb
,
5559 proto_item
*flags_item
;
5560 uint8_t flag1
, flag2
;
5561 uint32_t map_length
;
5566 result
= proto_item_add_subtree(tree
, ett_args
);
5567 offset
+= 2; /* Skip class and struct codes */
5568 flags_offset
= offset
;
5569 flag1
= tvb_get_uint8(tvb
, offset
);
5570 flag2
= tvb_get_uint8(tvb
, offset
+1);
5571 flags_item
= proto_tree_add_item(result
,
5572 hf_amqp_0_10_argument_packing_flags
,
5573 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
5576 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
5579 /* queue (name [str8]) */
5580 proto_tree_add_item(result
,
5581 hf_amqp_0_10_method_queue_name
,
5582 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
5583 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
5585 if (flag1
& 0x02) { /* alternate-exchange (exchange.name [str8]) */
5586 proto_tree_add_item(result
,
5587 hf_amqp_0_10_method_queue_alt_exchange
,
5588 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
5589 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
5592 * 3rd-5th arguments are optional bits.
5594 proto_tree_add_item(result
,
5595 hf_amqp_0_10_struct_queue_query_result_durable
,
5596 tvb
, flags_offset
, 1, ENC_BIG_ENDIAN
);
5597 proto_tree_add_item(result
,
5598 hf_amqp_0_10_struct_queue_query_result_exclusive
,
5599 tvb
, flags_offset
, 1, ENC_BIG_ENDIAN
);
5600 proto_tree_add_item(result
,
5601 hf_amqp_0_10_struct_queue_query_result_auto_delete
,
5602 tvb
, flags_offset
, 1, ENC_BIG_ENDIAN
);
5603 if (flag1
& 0x20) { /* arguments (map) */
5604 map_length
= amqp_0_10_get_32bit_size_new(result
, pinfo
, tvb
, hf_amqp_0_10_method_queue_declare_arguments_size
, offset
);
5606 ti
= proto_tree_add_item(result
,
5607 hf_amqp_0_10_method_queue_declare_arguments
,
5610 map_length
, ENC_NA
);
5611 if (map_length
> (uint32_t)tvb_reported_length_remaining(tvb
, offset
))
5613 next_tvb
= tvb_new_subset_remaining(tvb
, offset
);
5617 next_tvb
= tvb_new_subset_length(tvb
, offset
, map_length
);
5619 dissect_amqp_0_10_map (next_tvb
, ti
);
5620 offset
+= map_length
;
5622 if (flag1
& 0x40) { /* message-count (uint32) */
5623 proto_tree_add_item(result
,
5624 hf_amqp_0_10_struct_queue_query_result_message_count
,
5625 tvb
, offset
, 4, ENC_BIG_ENDIAN
);
5628 if (flag1
& 0x80) { /* subscriber-count (uint32) */
5629 proto_tree_add_item(result
,
5630 hf_amqp_0_10_struct_queue_query_result_subscriber_count
,
5631 tvb
, offset
, 4, ENC_BIG_ENDIAN
);
5637 dissect_amqp_0_10_struct_file_properties(tvbuff_t
*tvb
,
5643 proto_item
*flags_item
;
5644 uint8_t flag1
, flag2
;
5645 uint32_t map_length
;
5651 props
= proto_item_add_subtree(tree
, ett_args
);
5652 offset
+= 2; /* Skip class and struct codes */
5653 flag1
= tvb_get_uint8(tvb
, offset
);
5654 flag2
= tvb_get_uint8(tvb
, offset
+1);
5655 flags_item
= proto_tree_add_item(props
,
5656 hf_amqp_0_10_argument_packing_flags
,
5657 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
5659 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
5662 /* content-type (str8) */
5663 proto_tree_add_item(props
,
5664 hf_amqp_0_10_struct_file_properties_content_type
,
5665 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
5666 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
5669 /* content-encoding (str8) */
5670 proto_tree_add_item(props
,
5671 hf_amqp_0_10_struct_file_properties_content_encoding
,
5672 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
5673 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
5677 map_length
= amqp_0_10_get_32bit_size_new(props
, pinfo
, tvb
, hf_amqp_0_10_struct_file_properties_headers_size
, offset
);
5679 ti
= proto_tree_add_item(props
,
5680 hf_amqp_0_10_struct_file_properties_headers
,
5683 map_length
, ENC_NA
);
5684 if (map_length
> (uint32_t)tvb_reported_length_remaining(tvb
, offset
))
5686 next_tvb
= tvb_new_subset_remaining(tvb
, offset
);
5690 next_tvb
= tvb_new_subset_length(tvb
, offset
, map_length
);
5692 dissect_amqp_0_10_map (next_tvb
, ti
);
5693 offset
+= map_length
;
5696 /* priority (uint8) */
5697 proto_tree_add_item(props
,
5698 hf_amqp_0_10_struct_file_properties_priority
,
5699 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
5703 /* reply-to (str8) */
5704 proto_tree_add_item(props
,
5705 hf_amqp_0_10_struct_file_properties_reply_to
,
5706 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
5707 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
5710 /* message-id (str8) */
5711 proto_tree_add_item(props
,
5712 hf_amqp_0_10_struct_file_properties_message_id
,
5713 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
5714 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
5717 /* filename (str8) */
5718 proto_tree_add_item(props
,
5719 hf_amqp_0_10_struct_file_properties_filename
,
5720 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
5721 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
5724 /* timestamp (datetime [uint64]) */
5725 timestamp
= tvb_get_ntoh64(tvb
, offset
);
5726 tv
.secs
= (time_t)timestamp
;
5728 proto_tree_add_time(props
,
5729 hf_amqp_0_10_struct_file_properties_timestamp
,
5730 tvb
, offset
, 8, &tv
);
5734 /* cluster-id (str8) */
5735 proto_tree_add_item(props
,
5736 hf_amqp_0_10_struct_file_properties_cluster_id
,
5737 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
5738 /* offset += (1 + tvb_get_uint8(tvb, offset)); */
5743 dissect_amqp_0_10_struct_stream_properties(tvbuff_t
*tvb
,
5749 proto_item
*flags_item
;
5750 uint8_t flag1
, flag2
;
5751 uint32_t map_length
;
5757 props
= proto_item_add_subtree(tree
, ett_args
);
5758 offset
+= 2; /* Skip class and struct codes */
5759 flag1
= tvb_get_uint8(tvb
, offset
);
5760 flag2
= tvb_get_uint8(tvb
, offset
+1);
5761 flags_item
= proto_tree_add_item(props
,
5762 hf_amqp_0_10_argument_packing_flags
,
5763 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
5764 if ((flag1
& ~0x1f) || (flag2
!= 0))
5765 expert_add_info(pinfo
, flags_item
, &ei_amqp_bad_flag_value
);
5768 /* content-type (str8) */
5769 proto_tree_add_item(props
,
5770 hf_amqp_0_10_struct_stream_properties_content_type
,
5771 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
5772 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
5775 /* content-encoding (str8) */
5776 proto_tree_add_item(props
,
5777 hf_amqp_0_10_struct_stream_properties_content_encoding
,
5778 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
5779 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
5783 map_length
= amqp_0_10_get_32bit_size_new(props
, pinfo
, tvb
, hf_amqp_0_10_struct_stream_properties_headers_size
, offset
);
5785 ti
= proto_tree_add_item(props
,
5786 hf_amqp_0_10_struct_stream_properties_headers
,
5789 map_length
, ENC_NA
);
5790 if (map_length
> (uint32_t)tvb_reported_length_remaining(tvb
, offset
))
5792 next_tvb
= tvb_new_subset_remaining(tvb
, offset
);
5796 next_tvb
= tvb_new_subset_length(tvb
, offset
, map_length
);
5798 dissect_amqp_0_10_map (next_tvb
, ti
);
5799 offset
+= map_length
;
5802 /* priority (uint8) */
5803 proto_tree_add_item(props
,
5804 hf_amqp_0_10_struct_stream_properties_priority
,
5805 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
5809 /* timestamp (datetime [uint64]) */
5810 timestamp
= tvb_get_ntoh64(tvb
, offset
);
5811 tv
.secs
= (time_t)timestamp
;
5813 proto_tree_add_time(props
,
5814 hf_amqp_0_10_struct_stream_properties_timestamp
,
5815 tvb
, offset
, 8, &tv
);
5821 // NOLINTNEXTLINE(misc-no-recursion)
5822 dissect_amqp_0_10_struct32(tvbuff_t
*tvb
,
5826 uint32_t class_code
, struct_code
;
5829 proto_item
*ti2
, *result
;
5833 tree
= proto_item_add_subtree(ti
, ett_args
);
5835 proto_tree_add_item_ret_uint(tree
, hf_amqp_0_10_struct32_class
, tvb
, offset
, 1, ENC_NA
, &class_code
);
5836 proto_tree_add_item_ret_uint(tree
, hf_amqp_0_10_struct32_struct
, tvb
, offset
+1, 1, ENC_NA
, &struct_code
);
5838 increment_dissection_depth(pinfo
);
5840 switch(class_code
) {
5841 case AMQP_0_10_CLASS_MESSAGE
:
5842 switch (struct_code
) {
5843 case AMQP_0_10_STRUCT_MESSAGE_DELIVERY_PROPERTIES
:
5844 dissect_amqp_0_10_struct_delivery_properties(tvb
,
5848 case AMQP_0_10_STRUCT_MESSAGE_FRAGMENT_PROPERTIES
:
5849 dissect_amqp_0_10_struct_fragment_properties(tvb
,
5853 case AMQP_0_10_STRUCT_MESSAGE_MESSAGE_PROPERTIES
:
5854 dissect_amqp_0_10_struct_message_properties(tvb
,
5858 case AMQP_0_10_STRUCT_MESSAGE_ACQUIRED
:
5859 result
= proto_item_add_subtree(tree
, ett_args
);
5860 offset
+= 2; /* Class/type codes */
5861 flag1
= tvb_get_uint8(tvb
, offset
);
5862 proto_tree_add_item(result
, hf_amqp_0_10_argument_packing_flags
,
5863 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
5866 /* transfers (commands [sequence-set]) */
5867 size
= tvb_get_ntohs(tvb
, offset
);
5868 ti2
= proto_tree_add_item(result
,
5869 hf_amqp_0_10_struct_acquired_transfers
,
5870 tvb
, offset
, size
+ 2, ENC_NA
);
5871 format_amqp_0_10_sequence_set(tvb
, offset
+ 2, size
, ti2
);
5874 case AMQP_0_10_STRUCT_MESSAGE_RESUME_RESULT
:
5875 result
= proto_item_add_subtree(tree
, ett_args
);
5876 offset
+= 2; /* Class/type codes */
5877 flag1
= tvb_get_uint8(tvb
, offset
);
5878 proto_tree_add_item(result
, hf_amqp_0_10_argument_packing_flags
,
5879 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
5882 /* offset (uint64) */
5883 proto_tree_add_item(result
,
5884 hf_amqp_0_10_struct_resume_result_offset
,
5885 tvb
, offset
, 8, ENC_BIG_ENDIAN
);
5891 case AMQP_0_10_CLASS_DTX
:
5892 switch (struct_code
) {
5893 case AMQP_0_10_STRUCT_DTX_XA_RESULT
:
5894 offset
+= 2; /* Class/type codes */
5895 /*flag1 = tvb_get_uint8(tvb, offset);*/
5896 proto_tree_add_item(tree
, hf_amqp_0_10_struct32_padding
, tvb
, offset
, 2, ENC_NA
);
5898 proto_tree_add_item(tree
, hf_amqp_0_10_dtx_xa_status
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
5901 case AMQP_0_10_STRUCT_DTX_RECOVER_RESULT
:
5902 offset
+= 2; /* Class/type codes */
5903 proto_tree_add_item(tree
, hf_amqp_0_10_struct32_padding
, tvb
, offset
, 2, ENC_NA
);
5905 amqp_0_10_get_32bit_size_new(tree
, pinfo
, tvb
, hf_amqp_0_10_struct_dtx_recover_result_size
, offset
);
5907 dissect_amqp_0_10_array(tvb
,
5915 case AMQP_0_10_CLASS_EXCHANGE
:
5916 switch (struct_code
) {
5917 case AMQP_0_10_STRUCT_EXCHANGE_QUERY_RESULT
:
5918 dissect_amqp_0_10_struct_exchange_query_result(tvb
,
5923 case AMQP_0_10_STRUCT_EXCHANGE_BOUND_RESULT
:
5924 result
= proto_item_add_subtree(tree
, ett_args
);
5925 offset
+= 2; /* Class/type codes */
5926 proto_tree_add_item(result
,
5927 hf_amqp_0_10_struct_exchange_bound_result_exchange_not_found
,
5928 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
5929 proto_tree_add_item(result
,
5930 hf_amqp_0_10_struct_exchange_bound_result_queue_not_found
,
5931 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
5932 proto_tree_add_item(result
,
5933 hf_amqp_0_10_struct_exchange_bound_result_queue_not_matched
,
5934 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
5935 proto_tree_add_item(result
,
5936 hf_amqp_0_10_struct_exchange_bound_result_key_not_matched
,
5937 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
5938 proto_tree_add_item(result
,
5939 hf_amqp_0_10_struct_exchange_bound_result_args_not_matched
,
5940 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
5945 case AMQP_0_10_CLASS_QUEUE
:
5946 switch (struct_code
) {
5947 case AMQP_0_10_STRUCT_QUEUE_QUERY_RESULT
:
5948 dissect_amqp_0_10_struct_queue_query_result(tvb
, pinfo
, tree
);
5953 case AMQP_0_10_CLASS_FILE
:
5954 switch (struct_code
) {
5955 case AMQP_0_10_STRUCT_FILE_PROPERTIES
:
5956 dissect_amqp_0_10_struct_file_properties(tvb
, pinfo
, tree
);
5961 case AMQP_0_10_CLASS_STREAM
:
5962 switch (struct_code
) {
5963 case AMQP_0_10_STRUCT_STREAM_PROPERTIES
:
5964 dissect_amqp_0_10_struct_stream_properties(tvb
, pinfo
, tree
);
5969 decrement_dissection_depth(pinfo
);
5972 /* decodes AMQP 1.0 list
5977 * bound: boundary within that the list has to end
5979 * hf_amqp_type: what hf_* type is the list itself
5980 * hf_amqp_subtype_count: length of hf_amqp_subtypes
5981 * hf_amqp_subtypes: what hf_* types are the list items
5982 * name: what to show for unformatted content
5985 // NOLINTNEXTLINE(misc-no-recursion)
5986 dissect_amqp_1_0_list(tvbuff_t
*tvb
,
5991 uint32_t hf_amqp_subtype_count
,
5992 int * const *hf_amqp_subtypes
,
5995 proto_item
*list_tree
;
5998 uint32_t i
, element_count
;
5999 uint32_t element_size
;
6000 uint32_t decoded_element_size
;
6001 uint32_t orig_offset
;
6002 uint32_t decoded_elements
;
6006 decoded_elements
= 0;
6007 orig_offset
= offset
;
6009 type
= tvb_get_uint8(tvb
, offset
);
6012 case AMQP_1_0_TYPE_LIST0
:
6017 case AMQP_1_0_TYPE_LIST8
:
6019 element_size
= tvb_get_uint8(tvb
, offset
);
6020 element_count
= tvb_get_uint8(tvb
, offset
+count_len
);
6022 case AMQP_1_0_TYPE_LIST32
:
6024 element_size
= tvb_get_ntohl(tvb
, offset
);
6025 element_count
= tvb_get_ntohl(tvb
, offset
+count_len
);
6028 proto_tree_add_none_format(list_tree
, hf_amqp_1_0_list
, tvb
,
6031 "(unknown type %d)",
6033 expert_add_info_format(pinfo
,
6035 &ei_amqp_unknown_amqp_type
,
6036 "Unknown AMQP list type %d",
6041 list_tree
= proto_tree_add_item(item
,
6045 element_size
+1+count_len
,
6047 proto_item_set_text(list_tree
, "%s", name
? name
: proto_registrar_get_name(hf_amqp_type
));
6048 offset
+= (count_len
*2);
6050 if (element_count
> 0)
6051 list_tree
= proto_item_add_subtree(list_tree
, ett_amqp_1_0_list
);
6052 /* display the item count for custom lists only
6053 * standard structures contain NULL items, so the real element count is different */
6054 if (hf_amqp_subtype_count
== 0)
6055 proto_item_append_text(list_tree
, " (list of %d element%s)", element_count
, plurality(element_count
, "", "s"));
6057 if (element_count
> element_size
)
6059 expert_add_info_format(pinfo
,
6061 &ei_amqp_invalid_number_of_params
,
6062 "Number of list elements (%d) bigger than list size (%d)",
6063 element_count
, element_size
);
6067 for (i
= 0; ((i
< element_count
) && (tvb_reported_length_remaining(tvb
, offset
) > 0)); i
++) {
6068 decoded_element_size
= 0;
6069 if (decoded_elements
<hf_amqp_subtype_count
)
6070 hf_amqp_item
= *(hf_amqp_subtypes
[decoded_elements
]);
6072 hf_amqp_item
= hf_amqp_1_0_list
; /* dynamic item */
6073 get_amqp_1_0_type_value_formatter(tvb
,
6078 &decoded_element_size
,
6080 decoded_elements
+= 1;
6081 offset
+= decoded_element_size
;
6083 if (i
!= element_count
)
6084 expert_add_info_format(pinfo
,
6086 &ei_amqp_invalid_number_of_params
,
6087 "Number of list elements (%d) not matching number of decoded elements (%d)",
6088 element_count
+decoded_elements
, decoded_elements
);
6089 return offset
-orig_offset
;
6092 /* decodes AMQP 1.0 map
6093 * arguments: see dissect_amqp_1_0_list
6096 // NOLINTNEXTLINE(misc-no-recursion)
6097 dissect_amqp_1_0_map(tvbuff_t
*tvb
,
6104 proto_item
*map_tree
;
6107 uint32_t element_count
;
6108 uint32_t element_size
;
6109 const struct amqp1_typeinfo
* element_type
;
6110 uint32_t decoded_element_size
;
6111 uint32_t orig_offset
;
6112 const char *value
= NULL
;
6115 orig_offset
= offset
;
6117 type
= tvb_get_uint8(tvb
, offset
);
6120 case AMQP_1_0_TYPE_MAP8
:
6122 element_size
= tvb_get_uint8(tvb
, offset
);
6123 element_count
= tvb_get_uint8(tvb
, offset
+count_len
);
6125 case AMQP_1_0_TYPE_MAP32
:
6127 element_size
= tvb_get_ntohl(tvb
, offset
);
6128 element_count
= tvb_get_ntohl(tvb
, offset
+count_len
);
6131 proto_tree_add_none_format(map_tree
, hf_amqp_1_0_map
, tvb
,
6134 "(unknown type %d)",
6136 expert_add_info_format(pinfo
,
6138 &ei_amqp_unknown_amqp_type
,
6139 "Unknown AMQP map type %d",
6141 return tvb_reported_length_remaining(tvb
, orig_offset
);
6144 if (proto_registrar_get_ftype(hf_amqp_type
) != FT_NONE
) {
6145 map_tree
= proto_tree_add_item(item
,
6149 element_size
+1+count_len
,
6152 map_tree
= proto_tree_add_none_format(item
,
6156 element_size
+1+count_len
,
6158 name
? name
: proto_registrar_get_name(hf_amqp_type
));
6160 offset
+= (count_len
*2);
6162 if (element_count
> 0)
6163 map_tree
= proto_item_add_subtree(map_tree
, ett_amqp_1_0_map
);
6164 if (element_count
%2==1) {
6165 expert_add_info_format(pinfo
,
6167 &ei_amqp_invalid_number_of_params
,
6168 "Odd number of map items: %d",
6170 return tvb_reported_length_remaining(tvb
, orig_offset
);
6173 if (element_count
> element_size
)
6175 expert_add_info_format(pinfo
,
6177 &ei_amqp_invalid_number_of_params
,
6178 "Number of map elements (%d) bigger than map size (%d)",
6179 element_count
, element_size
);
6180 return tvb_reported_length_remaining(tvb
, orig_offset
);
6183 proto_item_append_text(map_tree
,
6184 " (map of %d element%s)",
6186 plurality(element_count
/2, "", "s"));
6188 while ((element_count
> 0) && (tvb_reported_length_remaining(tvb
, offset
) > 0)) {
6189 if (element_count
%2 == 0) { /* decode key */
6190 element_type
= decode_fixed_type(tvb_get_uint8(tvb
, offset
));
6193 decoded_element_size
=element_type
->formatter(tvb
, offset
+1, element_type
->known_size
, &value
);
6194 offset
+= (decoded_element_size
+1);
6197 { /* can't decode key type */
6198 proto_tree_add_none_format(map_tree
, hf_amqp_1_0_map
, tvb
,
6201 "(unknown map key type %d)",
6202 tvb_get_uint8(tvb
, offset
));
6203 expert_add_info_format(pinfo
,
6205 &ei_amqp_unknown_amqp_type
,
6206 "Unknown AMQP map key type %d",
6207 tvb_get_uint8(tvb
, offset
));
6211 else { /* decode value */
6212 get_amqp_1_0_type_value_formatter(tvb
,
6215 hf_amqp_1_0_list
, /* dynamic item */
6217 &decoded_element_size
,
6219 offset
+= decoded_element_size
;
6223 return offset
-orig_offset
;
6226 /* decodes AMQP 1.0 array
6227 * arguments: see dissect_amqp_1_0_list
6230 // NOLINTNEXTLINE(misc-no-recursion)
6231 dissect_amqp_1_0_array(tvbuff_t
*tvb
,
6236 uint32_t hf_amqp_subtype_count
,
6237 int * const *hf_amqp_subtypes
,
6240 proto_item
*array_tree
;
6243 uint32_t i
, element_count
;
6244 uint32_t element_size
;
6245 uint32_t element_type
;
6246 uint32_t decoded_element_size
;
6247 uint32_t orig_offset
;
6248 uint32_t decoded_elements
;
6250 uint32_t hf_amqp_subtype_count_array
= 0;
6251 int * const *hf_amqp_subtypes_array
= NULL
;
6252 const char *type_name_array
= NULL
;
6255 decoded_elements
= 0;
6256 orig_offset
= offset
;
6258 type
= tvb_get_uint8(tvb
, offset
);
6261 case AMQP_1_0_TYPE_ARRAY8
:
6263 element_size
= tvb_get_uint8(tvb
, offset
);
6264 element_count
= tvb_get_uint8(tvb
, offset
+count_len
);
6266 case AMQP_1_0_TYPE_ARRAY32
:
6268 element_size
= tvb_get_ntohl(tvb
, offset
);
6269 element_count
= tvb_get_ntohl(tvb
, offset
+count_len
);
6272 proto_tree_add_none_format(array_tree
, hf_amqp_1_0_list
, tvb
,
6275 "(unknown type %d)",
6277 expert_add_info_format(pinfo
,
6279 &ei_amqp_unknown_amqp_type
,
6280 "Unknown AMQP array type %d",
6282 return tvb_reported_length_remaining(tvb
, orig_offset
);
6285 element_type
= get_amqp_1_0_type_formatter(tvb
,
6289 &hf_amqp_subtype_count_array
,
6290 &hf_amqp_subtypes_array
,
6291 &decoded_element_size
);
6293 array_tree
= proto_tree_add_item(item
,
6297 element_size
+1+count_len
,
6299 proto_item_set_text(array_tree
, "%s", name
? name
: proto_registrar_get_name(hf_amqp_type
));
6300 offset
+= (count_len
*2+decoded_element_size
);
6302 if (element_count
> 0)
6303 array_tree
= proto_item_add_subtree(array_tree
, ett_amqp_1_0_array
);
6304 /* display the item count for custom arrays only
6305 * standard structures contain NULL items, so the real element count is different */
6306 if (hf_amqp_subtype_count
== 0)
6307 proto_item_append_text(array_tree
, " (array of %d element%s)", element_count
, plurality(element_count
, "", "s"));
6309 if (element_count
> element_size
)
6311 expert_add_info_format(pinfo
,
6313 &ei_amqp_invalid_number_of_params
,
6314 "Number of array elements (%d) bigger than array size (%d)",
6315 element_count
, element_size
);
6316 return tvb_reported_length_remaining(tvb
, orig_offset
);
6319 for (i
= 0; ((i
< element_count
) && (tvb_reported_length_remaining(tvb
, offset
) > 0)); i
++) {
6320 decoded_element_size
= 0;
6321 if (decoded_elements
<hf_amqp_subtype_count
)
6322 hf_amqp_item
= *(hf_amqp_subtypes
[decoded_elements
]);
6324 hf_amqp_item
= hf_amqp_1_0_list
; /* dynamic item */
6325 get_amqp_1_0_value_formatter(tvb
,
6327 element_type
, /* code */
6330 (proto_registrar_get_nth(hf_amqp_type
))->name
, /* name */
6331 hf_amqp_subtype_count_array
, /* subitem list count */
6332 hf_amqp_subtypes_array
, /* subitem list hf_.. list */
6333 &decoded_element_size
,
6335 decoded_elements
+= 1;
6336 if (decoded_element_size
==0)
6337 decoded_element_size
=1; /* necessary for 0x40 or similar values where value_formatter returns size of _value_ 0 (type=1 not counted) */
6338 offset
+= decoded_element_size
;
6340 if (i
!= element_count
)
6341 expert_add_info_format(pinfo
,
6343 &ei_amqp_invalid_number_of_params
,
6344 "Number of array elements (%d) not matching number of decoded elements (%d)",
6345 element_count
+decoded_elements
, decoded_elements
);
6346 return offset
-orig_offset
;
6349 /* decodes AMQP 1.0 AMQP performative (open, attach, transfer or so)
6351 * tvb, offset, length, amqp_tree, pinfo: obvious
6352 * method_name: what to print to col_append_str method in dissect_amqp_1_0_frame
6355 dissect_amqp_1_0_AMQP_frame(tvbuff_t
*tvb
,
6356 proto_item
*amqp_item
,
6359 proto_item
*args_tree
;
6360 uint32_t arg_length
= 0;
6365 args_tree
= proto_item_add_subtree(amqp_item
, ett_args
);
6367 if (tvb_reported_length(tvb
) == 0) { /* empty keepalive sent */
6368 col_append_str(pinfo
->cinfo
, COL_INFO
, "(empty)");
6369 col_set_fence(pinfo
->cinfo
, COL_INFO
);
6373 ti
= proto_tree_add_item_ret_uint(args_tree
, hf_amqp_1_0_amqp_performative
, tvb
, offset
+2, 1, ENC_BIG_ENDIAN
, &method
);
6374 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "%s ", val_to_str_const(method
, amqp_1_0_AMQP_performatives
, "<invalid AMQP performative>"));
6375 col_set_fence(pinfo
->cinfo
, COL_INFO
);
6377 offset
+= 3; /* descriptor-constructor & fixed_one length & AMQP performative code */
6379 case AMQP_1_0_AMQP_OPEN
:
6380 dissect_amqp_1_0_list(tvb
,
6384 hf_amqp_method_arguments
,
6385 10, amqp_1_0_amqp_open_items
, NULL
);
6387 case AMQP_1_0_AMQP_BEGIN
:
6388 dissect_amqp_1_0_list(tvb
,
6392 hf_amqp_method_arguments
,
6393 8, amqp_1_0_amqp_begin_items
, NULL
);
6395 case AMQP_1_0_AMQP_ATTACH
:
6396 dissect_amqp_1_0_list(tvb
,
6400 hf_amqp_method_arguments
,
6401 14, amqp_1_0_amqp_attach_items
, NULL
);
6403 case AMQP_1_0_AMQP_FLOW
:
6404 dissect_amqp_1_0_list(tvb
,
6408 hf_amqp_method_arguments
,
6409 11, amqp_1_0_amqp_flow_items
, NULL
);
6411 case AMQP_1_0_AMQP_TRANSFER
:
6412 arg_length
= dissect_amqp_1_0_list(tvb
,
6416 hf_amqp_method_arguments
,
6417 11, amqp_1_0_amqp_transfer_items
, NULL
);
6419 /* now decode message header, annotations, properties and data */
6420 while ((arg_length
> 0) && (tvb_reported_length_remaining(tvb
, offset
+ arg_length
) > 0)) {
6421 offset
+= arg_length
;
6422 get_amqp_1_0_type_value_formatter(tvb
,
6425 hf_amqp_1_0_list
, /* dynamic item */
6431 case AMQP_1_0_AMQP_DISPOSITION
:
6432 dissect_amqp_1_0_list(tvb
,
6436 hf_amqp_method_arguments
,
6437 6, amqp_1_0_amqp_disposition_items
, NULL
);
6439 case AMQP_1_0_AMQP_DETACH
:
6440 dissect_amqp_1_0_list(tvb
,
6444 hf_amqp_method_arguments
,
6445 3, amqp_1_0_amqp_detach_items
, NULL
);
6447 case AMQP_1_0_AMQP_END
:
6448 dissect_amqp_1_0_list(tvb
,
6452 hf_amqp_method_arguments
,
6453 1, amqp_1_0_amqp_end_items
, NULL
);
6455 case AMQP_1_0_AMQP_CLOSE
:
6456 dissect_amqp_1_0_list(tvb
,
6460 hf_amqp_method_arguments
,
6461 1, amqp_1_0_amqp_close_items
, NULL
);
6464 expert_add_info_format(pinfo
,
6466 &ei_amqp_unknown_amqp_command
,
6467 "Unknown AMQP performative %d",
6472 /* decodes AMQP 1.0 SASL methods (mechanisms offer, challenge, response,..)
6473 * arguments: see dissect_amqp_1_0_AMQP_frame
6476 dissect_amqp_1_0_SASL_frame(tvbuff_t
*tvb
,
6477 proto_item
*amqp_item
,
6480 proto_item
*args_tree
;
6485 args_tree
= proto_item_add_subtree(amqp_item
, ett_args
);
6486 ti
= proto_tree_add_item_ret_uint(args_tree
, hf_amqp_1_0_sasl_method
, tvb
, offset
+2, 1, ENC_BIG_ENDIAN
, &method
);
6488 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "%s ", val_to_str_const(method
, amqp_1_0_SASL_methods
, "<invalid SASL method>"));
6489 col_set_fence(pinfo
->cinfo
, COL_INFO
);
6491 offset
+= 3; /* descriptor-constructor & fixed_one length & SASL method code */
6493 case AMQP_1_0_SASL_MECHANISMS
:
6494 dissect_amqp_1_0_list(tvb
,
6498 hf_amqp_method_arguments
,
6499 1, amqp_1_0_sasl_mechanisms_items
, NULL
);
6501 case AMQP_1_0_SASL_INIT
:
6502 dissect_amqp_1_0_list(tvb
,
6506 hf_amqp_method_arguments
,
6507 3, amqp_1_0_sasl_init_items
, NULL
);
6509 case AMQP_1_0_SASL_CHALLENGE
:
6510 dissect_amqp_1_0_list(tvb
,
6514 hf_amqp_method_arguments
,
6515 1, amqp_1_0_sasl_challenge_items
, NULL
);
6517 case AMQP_1_0_SASL_RESPONSE
:
6518 dissect_amqp_1_0_list(tvb
,
6522 hf_amqp_method_arguments
,
6523 1, amqp_1_0_sasl_response_items
, NULL
);
6525 case AMQP_1_0_SASL_OUTCOME
:
6526 dissect_amqp_1_0_list(tvb
,
6530 hf_amqp_method_arguments
,
6531 2, amqp_1_0_sasl_outcome_items
, NULL
);
6534 expert_add_info_format(pinfo
,
6536 &ei_amqp_unknown_sasl_command
,
6537 "Unknown SASL command %d",
6543 dissect_amqp_1_0_frame(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data _U_
)
6545 proto_item
*ti
, *size_item
;
6546 proto_tree
*amqp_tree
;
6552 col_clear(pinfo
->cinfo
, COL_INFO
);
6554 /* Heuristic - protocol initialisation frame starts with 'AMQP' followed by 0x0 */
6555 if (tvb_memeql(tvb
, 0, "AMQP", 4) == 0) {
6556 uint8_t proto_major
;
6557 uint8_t proto_minor
;
6558 uint8_t proto_revision
;
6560 proto_major
= tvb_get_uint8(tvb
, 5);
6561 proto_minor
= tvb_get_uint8(tvb
, 6);
6562 proto_revision
= tvb_get_uint8(tvb
, 7);
6563 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "Protocol-Header%s %d-%d-%d ",
6564 (tvb_get_uint8(tvb
, 4)==0x2) ? "(TLS)" : "", /* frame type = 2 => TLS */
6568 col_set_fence(pinfo
->cinfo
, COL_INFO
);
6571 ti
= proto_tree_add_item(tree
, proto_amqp
, tvb
, 0, -1, ENC_NA
);
6572 amqp_tree
= proto_item_add_subtree(ti
, ett_amqp_init
);
6573 proto_tree_add_item(amqp_tree
, hf_amqp_init_protocol
, tvb
, 0, 4, ENC_ASCII
);
6574 proto_tree_add_item(amqp_tree
, hf_amqp_init_id
, tvb
, 4, 1, ENC_BIG_ENDIAN
);
6575 proto_tree_add_item(amqp_tree
, hf_amqp_init_version_major
, tvb
, 5, 1, ENC_BIG_ENDIAN
);
6576 proto_tree_add_item(amqp_tree
, hf_amqp_init_version_minor
, tvb
, 6, 1, ENC_BIG_ENDIAN
);
6577 proto_tree_add_item(amqp_tree
, hf_amqp_init_version_revision
, tvb
, 7, 1, ENC_BIG_ENDIAN
);
6582 /* Protocol frame */
6585 ti
= proto_tree_add_item(tree
, proto_amqp
, tvb
, 0, -1, ENC_NA
);
6586 amqp_tree
= proto_item_add_subtree(ti
, ett_amqp
);
6587 size_item
= proto_tree_add_item_ret_uint(amqp_tree
, hf_amqp_1_0_size
, tvb
, 0, 4, ENC_BIG_ENDIAN
, &length
);
6588 proto_tree_add_item(amqp_tree
, hf_amqp_1_0_doff
, tvb
, 4, 1, ENC_BIG_ENDIAN
);
6589 proto_tree_add_item(amqp_tree
, hf_amqp_1_0_type
, tvb
, 5, 1, ENC_BIG_ENDIAN
);
6590 proto_tree_add_item(amqp_tree
, hf_amqp_channel
, tvb
, 6, 2, ENC_BIG_ENDIAN
);
6592 offset
= 4*tvb_get_uint8(tvb
,4); /* i.e. 4*DOFF */
6593 frame_type
= tvb_get_uint8(tvb
, 5);
6594 if (length
< offset
) {
6595 expert_add_info(pinfo
, size_item
, &ei_amqp_bad_length
);
6599 if (length
> (uint32_t)tvb_reported_length_remaining(tvb
, offset
))
6601 next_tvb
= tvb_new_subset_remaining(tvb
, offset
);
6605 next_tvb
= tvb_new_subset_length(tvb
, offset
, length
);
6608 switch(frame_type
) {
6609 case AMQP_1_0_AMQP_FRAME
:
6610 dissect_amqp_1_0_AMQP_frame(next_tvb
, amqp_tree
, pinfo
);
6612 case AMQP_1_0_SASL_FRAME
:
6613 dissect_amqp_1_0_SASL_frame(next_tvb
, amqp_tree
, pinfo
);
6615 case AMQP_1_0_TLS_FRAME
:
6616 /* should not occur, this is handled in '(tvb_memeql(tvb, 0, (const uint8_t*)"AMQP", 4) == 0)' test above */
6619 expert_add_info_format(pinfo
, amqp_tree
, &ei_amqp_unknown_frame_type
, "Unknown frame type %d", frame_type
);
6622 return tvb_reported_length(tvb
);
6626 dissect_amqp_0_10_frame(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data _U_
)
6629 proto_item
*amqp_tree
= NULL
;
6632 uint32_t struct_length
;
6636 /* Heuristic - protocol initialisation frame starts with 'AMQP' */
6637 if (tvb_memeql(tvb
, 0, (const uint8_t*)"AMQP", 4) == 0) {
6638 uint8_t proto_major
;
6639 uint8_t proto_minor
;
6641 proto_major
= tvb_get_uint8(tvb
, 6);
6642 proto_minor
= tvb_get_uint8(tvb
, 7);
6643 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "Protocol-Header %d-%d ",
6646 col_set_fence(pinfo
->cinfo
, COL_INFO
);
6649 ti
= proto_tree_add_item(tree
, proto_amqp
, tvb
, 0, -1, ENC_NA
);
6650 amqp_tree
= proto_item_add_subtree(ti
, ett_amqp_init
);
6651 proto_tree_add_item(amqp_tree
, hf_amqp_init_protocol
, tvb
, 0, 4, ENC_ASCII
);
6652 proto_tree_add_item(amqp_tree
, hf_amqp_init_id_major
, tvb
, 4, 1, ENC_BIG_ENDIAN
);
6653 proto_tree_add_item(amqp_tree
, hf_amqp_init_id_minor
, tvb
, 5, 1, ENC_BIG_ENDIAN
);
6654 proto_tree_add_item(amqp_tree
, hf_amqp_init_version_major
, tvb
, 6, 1, ENC_BIG_ENDIAN
);
6655 proto_tree_add_item(amqp_tree
, hf_amqp_init_version_minor
, tvb
, 7, 1, ENC_BIG_ENDIAN
);
6660 /* Protocol frame */
6662 ti
= proto_tree_add_item(tree
, proto_amqp
, tvb
, 0, -1, ENC_NA
);
6663 amqp_tree
= proto_item_add_subtree(ti
, ett_amqp
);
6664 proto_tree_add_item(amqp_tree
, hf_amqp_0_10_format
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
6665 proto_tree_add_item(amqp_tree
, hf_amqp_0_10_position
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
6666 proto_tree_add_item(amqp_tree
, hf_amqp_0_10_type
, tvb
, 1, 1, ENC_BIG_ENDIAN
);
6667 proto_tree_add_item(amqp_tree
, hf_amqp_0_10_size
, tvb
, 2, 2, ENC_BIG_ENDIAN
);
6668 proto_tree_add_item(amqp_tree
, hf_amqp_0_10_track
, tvb
, 5, 1, ENC_BIG_ENDIAN
);
6669 proto_tree_add_item(amqp_tree
, hf_amqp_channel
, tvb
, 6, 2, ENC_BIG_ENDIAN
);
6670 proto_tree_add_item(amqp_tree
, hf_amqp_reserved
, tvb
, 8, 4, ENC_BIG_ENDIAN
);
6673 frame_type
= tvb_get_uint8(tvb
, 1);
6674 length
= tvb_get_ntohs(tvb
, 2);
6676 next_tvb
= tvb_new_subset_remaining(tvb
, offset
);
6678 switch(frame_type
) {
6679 case AMQP_0_10_FRAME_COMMAND
:
6681 case AMQP_0_10_FRAME_CONTROL
:
6682 proto_tree_add_item(amqp_tree
, hf_amqp_0_10_class
, tvb
, offset
+0, 1, ENC_BIG_ENDIAN
);
6683 switch(tvb_get_uint8(tvb
, offset
+ 0)) {
6684 case AMQP_0_10_CLASS_CONNECTION
:
6685 dissect_amqp_0_10_connection(next_tvb
, pinfo
, amqp_tree
);
6687 case AMQP_0_10_CLASS_SESSION
:
6688 dissect_amqp_0_10_session(next_tvb
, pinfo
, amqp_tree
);
6690 case AMQP_0_10_CLASS_EXECUTION
:
6691 dissect_amqp_0_10_execution(next_tvb
, pinfo
, amqp_tree
);
6693 case AMQP_0_10_CLASS_MESSAGE
:
6694 dissect_amqp_0_10_message(next_tvb
, pinfo
, amqp_tree
);
6696 case AMQP_0_10_CLASS_TX
:
6697 dissect_amqp_0_10_tx(next_tvb
, pinfo
, amqp_tree
);
6699 case AMQP_0_10_CLASS_DTX
:
6700 dissect_amqp_0_10_dtx(next_tvb
, pinfo
, amqp_tree
);
6702 case AMQP_0_10_CLASS_EXCHANGE
:
6703 dissect_amqp_0_10_exchange(next_tvb
, pinfo
, amqp_tree
);
6705 case AMQP_0_10_CLASS_QUEUE
:
6706 dissect_amqp_0_10_queue(next_tvb
, pinfo
, amqp_tree
);
6708 case AMQP_0_10_CLASS_FILE
:
6709 dissect_amqp_0_10_file(next_tvb
, pinfo
, amqp_tree
);
6711 case AMQP_0_10_CLASS_STREAM
:
6712 dissect_amqp_0_10_stream(next_tvb
, pinfo
, amqp_tree
);
6715 expert_add_info_format(pinfo
, amqp_tree
, &ei_amqp_unknown_command_class
, "Unknown command/control class %d", tvb_get_uint8(tvb
, offset
+ 0));
6719 case AMQP_0_10_FRAME_HEADER
:
6720 col_append_str(pinfo
->cinfo
, COL_INFO
, "header ");
6721 col_set_fence(pinfo
->cinfo
, COL_INFO
);
6722 while (tvb_reported_length_remaining(tvb
, offset
) > 0)
6724 struct_length
= amqp_0_10_get_32bit_size_new(amqp_tree
, pinfo
, tvb
, hf_amqp_0_10_struct32_size
, offset
);
6727 ti
= proto_tree_add_item(amqp_tree
,
6728 hf_amqp_0_10_struct32
,
6729 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
6730 proto_item_set_len(ti
, struct_length
);
6731 if (struct_length
> (uint32_t)tvb_reported_length_remaining(tvb
, offset
))
6733 next_tvb
= tvb_new_subset_remaining(tvb
, offset
);
6737 next_tvb
= tvb_new_subset_length(tvb
, offset
, struct_length
);
6739 dissect_amqp_0_10_struct32(next_tvb
, pinfo
, ti
);
6740 offset
+= struct_length
;
6744 case AMQP_0_10_FRAME_BODY
:
6745 col_append_str(pinfo
->cinfo
, COL_INFO
, "message-body ");
6746 col_set_fence(pinfo
->cinfo
, COL_INFO
);
6747 proto_tree_add_item(amqp_tree
,
6748 hf_amqp_0_10_message_body
,
6749 tvb
, offset
, length
- 12, ENC_NA
);
6753 expert_add_info_format(pinfo
, amqp_tree
, &ei_amqp_unknown_frame_type
, "Unknown frame type %d", frame_type
);
6756 return tvb_reported_length(tvb
);
6760 /* Dissection routine for method Connection.Start */
6763 dissect_amqp_0_9_method_connection_start(tvbuff_t
*tvb
, packet_info
*pinfo
,
6764 int offset
, proto_tree
*args_tree
)
6768 /* version-major (octet) */
6769 proto_tree_add_item(args_tree
, hf_amqp_method_connection_start_version_major
,
6770 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
6773 /* version-minor (octet) */
6774 proto_tree_add_item(args_tree
, hf_amqp_method_connection_start_version_minor
,
6775 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
6778 /* server-properties (table) */
6779 ti
= proto_tree_add_item(
6780 args_tree
, hf_amqp_method_connection_start_server_properties
,
6781 tvb
, offset
+ 4, tvb_get_ntohl(tvb
, offset
), ENC_NA
);
6782 dissect_amqp_0_9_field_table(tvb
, pinfo
, offset
+ 4, tvb_get_ntohl(tvb
, offset
), ti
);
6783 offset
+= 4 + tvb_get_ntohl(tvb
, offset
);
6785 /* mechanisms (longstr) */
6786 proto_tree_add_item(args_tree
, hf_amqp_0_9_method_connection_start_mechanisms
,
6787 tvb
, offset
+ 4, tvb_get_ntohl(tvb
, offset
), ENC_NA
);
6788 offset
+= 4 + tvb_get_ntohl(tvb
, offset
);
6790 /* locales (longstr) */
6791 proto_tree_add_item(args_tree
, hf_amqp_0_9_method_connection_start_locales
,
6792 tvb
, offset
+ 4, tvb_get_ntohl(tvb
, offset
), ENC_NA
);
6793 offset
+= 4 + tvb_get_ntohl(tvb
, offset
);
6798 /* Dissection routine for method Connection.Start-Ok */
6801 dissect_amqp_0_9_method_connection_start_ok(tvbuff_t
*tvb
, packet_info
*pinfo
,
6802 int offset
, proto_tree
*args_tree
)
6806 /* client-properties (table) */
6807 ti
= proto_tree_add_item(
6808 args_tree
, hf_amqp_method_connection_start_ok_client_properties
,
6809 tvb
, offset
+ 4, tvb_get_ntohl(tvb
, offset
), ENC_NA
);
6810 dissect_amqp_0_9_field_table(tvb
, pinfo
, offset
+ 4, tvb_get_ntohl(tvb
, offset
), ti
);
6811 offset
+= 4 + tvb_get_ntohl(tvb
, offset
);
6813 /* mechanism (shortstr) */
6814 proto_tree_add_item(args_tree
, hf_amqp_method_connection_start_ok_mechanism
,
6815 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
6816 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
6818 /* response (longstr) */
6819 proto_tree_add_item(args_tree
, hf_amqp_method_connection_start_ok_response
,
6820 tvb
, offset
, 4, ENC_BIG_ENDIAN
);
6821 offset
+= (4 + tvb_get_ntohl(tvb
, offset
));
6823 /* locale (shortstr) */
6824 proto_tree_add_item(args_tree
, hf_amqp_method_connection_start_ok_locale
,
6825 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
6826 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
6831 /* Dissection routine for method Connection.Secure */
6834 dissect_amqp_0_9_method_connection_secure(tvbuff_t
*tvb
,
6835 int offset
, proto_tree
*args_tree
)
6837 /* challenge (longstr) */
6838 proto_tree_add_item(args_tree
, hf_amqp_method_connection_secure_challenge
,
6839 tvb
, offset
, 4, ENC_BIG_ENDIAN
);
6840 offset
+= (4 + tvb_get_ntohl(tvb
, offset
));
6845 /* Dissection routine for method Connection.Secure-Ok */
6848 dissect_amqp_0_9_method_connection_secure_ok(tvbuff_t
*tvb
,
6849 int offset
, proto_tree
*args_tree
)
6851 /* response (longstr) */
6852 proto_tree_add_item(args_tree
, hf_amqp_method_connection_secure_ok_response
,
6853 tvb
, offset
, 4, ENC_BIG_ENDIAN
);
6854 offset
+= (4 + tvb_get_ntohl(tvb
, offset
));
6859 /* Dissection routine for method Connection.Tune */
6862 dissect_amqp_0_9_method_connection_tune(tvbuff_t
*tvb
,
6863 int offset
, proto_tree
*args_tree
)
6865 /* channel-max (short) */
6866 proto_tree_add_item(args_tree
, hf_amqp_method_connection_tune_channel_max
,
6867 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
6870 /* frame-max (long) */
6871 proto_tree_add_item(args_tree
, hf_amqp_0_9_method_connection_tune_frame_max
,
6872 tvb
, offset
, 4, ENC_BIG_ENDIAN
);
6875 /* heartbeat (short) */
6876 proto_tree_add_item(args_tree
, hf_amqp_0_9_method_connection_tune_heartbeat
,
6877 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
6883 /* Dissection routine for method Connection.Tune-Ok */
6886 dissect_amqp_0_9_method_connection_tune_ok(tvbuff_t
*tvb
,
6887 int offset
, proto_tree
*args_tree
)
6889 /* channel-max (short) */
6890 proto_tree_add_item(args_tree
, hf_amqp_method_connection_tune_ok_channel_max
,
6891 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
6894 /* frame-max (long) */
6895 proto_tree_add_item(args_tree
, hf_amqp_0_9_method_connection_tune_ok_frame_max
,
6896 tvb
, offset
, 4, ENC_BIG_ENDIAN
);
6899 /* heartbeat (short) */
6900 proto_tree_add_item(args_tree
, hf_amqp_method_connection_tune_ok_heartbeat
,
6901 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
6907 /* Dissection routine for method Connection.Open */
6910 dissect_amqp_0_9_method_connection_open(tvbuff_t
*tvb
, packet_info
*pinfo
,
6911 int offset
, proto_tree
*args_tree
)
6913 const uint8_t* vhost
;
6914 /* virtual-host (shortstr) */
6915 proto_tree_add_item_ret_string(args_tree
, hf_amqp_method_connection_open_virtual_host
,
6916 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
, pinfo
->pool
, &vhost
);
6917 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "vhost=%s ", vhost
);
6918 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
6920 /* capabilities (shortstr) */
6921 proto_tree_add_item(args_tree
, hf_amqp_0_9_method_connection_open_capabilities
,
6922 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
6923 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
6926 proto_tree_add_item(args_tree
, hf_amqp_0_9_method_connection_open_insist
,
6927 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
6932 /* Dissection routine for method Connection.Open-Ok */
6935 dissect_amqp_0_9_method_connection_open_ok(tvbuff_t
*tvb
,
6936 int offset
, proto_tree
*args_tree
)
6938 /* known-hosts (shortstr) */
6939 proto_tree_add_item(args_tree
, hf_amqp_0_9_method_connection_open_ok_known_hosts
,
6940 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
6941 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
6946 /* Dissection routine for method Connection.Redirect */
6949 dissect_amqp_0_9_method_connection_redirect(tvbuff_t
*tvb
,
6950 int offset
, proto_tree
*args_tree
)
6952 /* host (shortstr) */
6953 proto_tree_add_item(args_tree
, hf_amqp_method_connection_redirect_host
,
6954 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
);
6955 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
6957 /* known-hosts (shortstr) */
6958 proto_tree_add_item(args_tree
, hf_amqp_0_9_method_connection_redirect_known_hosts
,
6959 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
6960 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
6965 /* Dissection routine for method Connection.Close */
6968 dissect_amqp_0_9_method_connection_close(tvbuff_t
*tvb
, packet_info
*pinfo
,
6969 int offset
, proto_tree
*args_tree
)
6971 proto_item
*tf_code
;
6972 const uint8_t* reply
;
6974 /* reply-code (short) */
6975 tf_code
= proto_tree_add_item(args_tree
, hf_amqp_0_9_method_connection_close_reply_code
,
6976 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
6977 if (tvb_get_ntohs(tvb
, offset
) > 200)
6978 expert_add_info(pinfo
, tf_code
, &ei_amqp_connection_error
);
6981 /* reply-text (shortstr) */
6982 proto_tree_add_item_ret_string(args_tree
, hf_amqp_method_connection_close_reply_text
,
6983 tvb
, offset
, 1, ENC_ASCII
|ENC_BIG_ENDIAN
, pinfo
->pool
, &reply
);
6984 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "reply=%s ", reply
);
6985 offset
+= (1 + tvb_get_uint8(tvb
, offset
));
6987 /* class-id (short) */
6988 proto_tree_add_item(args_tree
, hf_amqp_method_connection_close_class_id
,
6989 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
6992 /* method-id (short) */
6993 proto_tree_add_item(args_tree
, hf_amqp_method_connection_close_method_id
,
6994 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
7000 /* Dissection routine for method Connection.Close-Ok */
7003 dissect_amqp_0_9_method_connection_close_ok(tvbuff_t
*tvb _U_
,
7004 int offset
, proto_tree
*args_tree _U_
)
7009 /* Dissection routine for method Connection.Blocked */
7012 dissect_amqp_0_9_method_connection_blocked(tvbuff_t
*tvb
,
7013 int offset
, proto_tree
*args_tree
)
7015 /* reason (shortstr) */
7016 proto_tree_add_item(args_tree
, hf_amqp_method_connection_blocked_reason
,
7017 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
7018 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
7023 /* Dissection routine for method Connection.Unblocked */
7026 dissect_amqp_0_9_method_connection_unblocked(tvbuff_t
*tvb _U_
,
7027 int offset
, proto_tree
*args_tree _U_
)
7032 /* Dissection routine for method Channel.Open */
7035 dissect_amqp_0_9_method_channel_open(tvbuff_t
*tvb
,
7036 int offset
, proto_tree
*args_tree
)
7038 /* out-of-band (shortstr) */
7039 proto_tree_add_item(args_tree
, hf_amqp_method_channel_open_out_of_band
,
7040 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
7041 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
7046 /* Dissection routine for method Channel.Open-Ok */
7049 dissect_amqp_0_9_method_channel_open_ok(tvbuff_t
*tvb
,
7050 int offset
, proto_tree
*args_tree
)
7052 /* channel-id (longstr) */
7053 proto_tree_add_item(args_tree
, hf_amqp_method_channel_open_ok_channel_id
,
7054 tvb
, offset
+ 4, tvb_get_ntohl(tvb
, offset
), ENC_NA
);
7055 offset
+= 4 + tvb_get_ntohl(tvb
, offset
);
7060 /* Dissection routine for method Channel.Flow */
7063 dissect_amqp_0_9_method_channel_flow(tvbuff_t
*tvb
,
7064 int offset
, proto_tree
*args_tree
)
7067 proto_tree_add_item(args_tree
, hf_amqp_method_channel_flow_active
,
7068 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
7073 /* Dissection routine for method Channel.Flow-Ok */
7076 dissect_amqp_0_9_method_channel_flow_ok(tvbuff_t
*tvb
,
7077 int offset
, proto_tree
*args_tree
)
7080 proto_tree_add_item(args_tree
, hf_amqp_method_channel_flow_ok_active
,
7081 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
7086 /* Dissection routine for method Channel.Close */
7089 dissect_amqp_0_9_method_channel_close(uint16_t channel_num
, tvbuff_t
*tvb
,
7090 packet_info
*pinfo
, int offset
, proto_tree
*args_tree
)
7092 proto_item
*tf_code
;
7093 const uint8_t* reply
;
7095 /* reply-code (short) */
7096 tf_code
= proto_tree_add_item(args_tree
, hf_amqp_method_channel_close_reply_code
,
7097 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
7098 if (tvb_get_ntohs(tvb
, offset
) > 200)
7099 expert_add_info(pinfo
, tf_code
, &ei_amqp_channel_error
);
7102 /* reply-text (shortstr) */
7103 proto_tree_add_item_ret_string(args_tree
, hf_amqp_method_channel_close_reply_text
,
7104 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
|ENC_NA
, pinfo
->pool
, &reply
);
7105 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "reply=%s ", reply
);
7106 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
7108 /* class-id (short) */
7109 proto_tree_add_item(args_tree
, hf_amqp_method_channel_close_class_id
,
7110 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
7113 /* method-id (short) */
7114 proto_tree_add_item(args_tree
, hf_amqp_method_channel_close_method_id
,
7115 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
7118 /* delete channel */
7119 if(!PINFO_FD_VISITED(pinfo
))
7121 conversation_t
*conv
;
7124 conv
= find_or_create_conversation(pinfo
);
7125 conn
= (amqp_conv
*)conversation_get_proto_data(conv
, proto_amqp
);
7127 wmem_map_remove(conn
->channels
, GUINT_TO_POINTER((uint32_t)channel_num
));
7133 /* Dissection routine for method Channel.Close-Ok */
7136 dissect_amqp_0_9_method_channel_close_ok(tvbuff_t
*tvb _U_
,
7137 int offset
, proto_tree
*args_tree _U_
)
7142 /* Dissection routine for method Channel.Resume */
7145 dissect_amqp_0_9_method_channel_resume(tvbuff_t
*tvb
,
7146 int offset
, proto_tree
*args_tree
)
7148 /* channel-id (longstr) */
7149 proto_tree_add_item(args_tree
, hf_amqp_method_channel_resume_channel_id
,
7150 tvb
, offset
+ 4, tvb_get_ntohl(tvb
, offset
), ENC_NA
);
7151 offset
+= 4 + tvb_get_ntohl(tvb
, offset
);
7156 /* Dissection routine for method Channel.Ping */
7159 dissect_amqp_0_9_method_channel_ping(tvbuff_t
*tvb _U_
,
7160 int offset
, proto_tree
*args_tree _U_
)
7165 /* Dissection routine for method Channel.Pong */
7168 dissect_amqp_0_9_method_channel_pong(tvbuff_t
*tvb _U_
,
7169 int offset
, proto_tree
*args_tree _U_
)
7174 /* Dissection routine for method Channel.Ok */
7177 dissect_amqp_0_9_method_channel_ok(tvbuff_t
*tvb _U_
,
7178 int offset
, proto_tree
*args_tree _U_
)
7183 /* Dissection routine for method Access.Request */
7186 dissect_amqp_0_9_method_access_request(tvbuff_t
*tvb
,
7187 int offset
, proto_tree
*args_tree
)
7189 /* realm (shortstr) */
7190 proto_tree_add_item(args_tree
, hf_amqp_method_access_request_realm
,
7191 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
7192 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
7194 /* exclusive (bit) */
7195 proto_tree_add_item(args_tree
, hf_amqp_method_access_request_exclusive
,
7196 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
7199 proto_tree_add_item(args_tree
, hf_amqp_method_access_request_passive
,
7200 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
7203 proto_tree_add_item(args_tree
, hf_amqp_method_access_request_active
,
7204 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
7207 proto_tree_add_item(args_tree
, hf_amqp_method_access_request_write
,
7208 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
7211 proto_tree_add_item(args_tree
, hf_amqp_method_access_request_read
,
7212 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
7217 /* Dissection routine for method Access.Request-Ok */
7220 dissect_amqp_0_9_method_access_request_ok(tvbuff_t
*tvb
,
7221 int offset
, proto_tree
*args_tree
)
7223 /* ticket (short) */
7224 proto_tree_add_item(args_tree
, hf_amqp_method_access_request_ok_ticket
,
7225 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
7231 /* Dissection routine for method Exchange.Declare */
7234 dissect_amqp_0_9_method_exchange_declare(tvbuff_t
*tvb
, packet_info
*pinfo
,
7235 int offset
, proto_tree
*args_tree
)
7238 const uint8_t* exchange
;
7240 /* ticket (short) */
7241 proto_tree_add_item(args_tree
, hf_amqp_method_exchange_declare_ticket
,
7242 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
7245 /* exchange (shortstr) */
7246 proto_tree_add_item_ret_string(args_tree
, hf_amqp_method_exchange_declare_exchange
,
7247 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
|ENC_NA
, pinfo
->pool
, &exchange
);
7248 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "x=%s ", exchange
);
7249 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
7251 /* type (shortstr) */
7252 proto_tree_add_item(args_tree
, hf_amqp_method_exchange_declare_type
,
7253 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
7254 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
7257 proto_tree_add_item(args_tree
, hf_amqp_method_exchange_declare_passive
,
7258 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
7261 proto_tree_add_item(args_tree
, hf_amqp_method_exchange_declare_durable
,
7262 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
7264 /* auto-delete (bit) */
7265 proto_tree_add_item(args_tree
, hf_amqp_method_exchange_declare_auto_delete
,
7266 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
7268 /* internal (bit) */
7269 proto_tree_add_item(args_tree
, hf_amqp_method_exchange_declare_internal
,
7270 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
7273 proto_tree_add_item(args_tree
, hf_amqp_method_exchange_declare_nowait
,
7274 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
7277 /* arguments (table) */
7278 ti
= proto_tree_add_item(
7279 args_tree
, hf_amqp_method_exchange_declare_arguments
,
7280 tvb
, offset
+ 4, tvb_get_ntohl(tvb
, offset
), ENC_NA
);
7281 dissect_amqp_0_9_field_table(tvb
, pinfo
, offset
+ 4, tvb_get_ntohl(tvb
, offset
), ti
);
7282 offset
+= 4 + tvb_get_ntohl(tvb
, offset
);
7287 /* Dissection routine for method Exchange.Declare-Ok */
7290 dissect_amqp_0_9_method_exchange_declare_ok(tvbuff_t
*tvb _U_
,
7291 int offset
, proto_tree
*args_tree _U_
)
7296 /* Dissection routine for method Exchange.Bind */
7299 dissect_amqp_0_9_method_exchange_bind(tvbuff_t
*tvb
, packet_info
*pinfo
,
7300 int offset
, proto_tree
*args_tree
)
7305 /* ticket (short) */
7306 proto_tree_add_item(args_tree
, hf_amqp_method_exchange_declare_ticket
,
7307 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
7310 /* destination (shortstr) */
7311 proto_tree_add_item_ret_string(args_tree
, hf_amqp_method_exchange_bind_destination
,
7312 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
|ENC_NA
, pinfo
->pool
, &str
);
7313 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "dx=%s ", str
);
7314 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
7316 /* source (shortstr) */
7317 proto_tree_add_item_ret_string(args_tree
, hf_amqp_method_exchange_bind_source
,
7318 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
|ENC_NA
, pinfo
->pool
, &str
);
7319 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "sx=%s ", str
);
7320 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
7322 /* routing-key (shortstr) */
7323 proto_tree_add_item_ret_string(args_tree
, hf_amqp_method_exchange_bind_routing_key
,
7324 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
|ENC_NA
, pinfo
->pool
, &str
);
7325 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "bk=%s ", str
);
7326 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
7329 proto_tree_add_item(args_tree
, hf_amqp_method_exchange_bind_nowait
,
7330 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
7333 /* arguments (table) */
7334 ti
= proto_tree_add_item(
7335 args_tree
, hf_amqp_method_exchange_bind_arguments
,
7336 tvb
, offset
+ 4, tvb_get_ntohl(tvb
, offset
), ENC_NA
);
7337 dissect_amqp_0_9_field_table(tvb
, pinfo
, offset
+ 4, tvb_get_ntohl(tvb
, offset
), ti
);
7338 offset
+= 4 + tvb_get_ntohl(tvb
, offset
);
7343 /* Dissection routine for method Exchange.Bind-Ok */
7346 dissect_amqp_0_9_method_exchange_bind_ok(tvbuff_t
*tvb _U_
,
7347 int offset
, proto_tree
*args_tree _U_
)
7352 /* Dissection routine for method Exchange.Delete */
7355 dissect_amqp_0_9_method_exchange_delete(tvbuff_t
*tvb
, packet_info
*pinfo
,
7356 int offset
, proto_tree
*args_tree
)
7358 const uint8_t* exchange
;
7360 /* ticket (short) */
7361 proto_tree_add_item(args_tree
, hf_amqp_method_exchange_delete_ticket
,
7362 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
7365 /* exchange (shortstr) */
7366 proto_tree_add_item_ret_string(args_tree
, hf_amqp_method_exchange_delete_exchange
,
7367 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
|ENC_NA
, pinfo
->pool
, &exchange
);
7368 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "x=%s ", exchange
);
7369 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
7371 /* if-unused (bit) */
7372 proto_tree_add_item(args_tree
, hf_amqp_method_exchange_delete_if_unused
,
7373 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
7376 proto_tree_add_item(args_tree
, hf_amqp_method_exchange_delete_nowait
,
7377 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
7382 /* Dissection routine for method Exchange.Delete-Ok */
7385 dissect_amqp_0_9_method_exchange_delete_ok(tvbuff_t
*tvb _U_
,
7386 int offset
, proto_tree
*args_tree _U_
)
7391 /* Dissection routine for method Queue.Declare */
7394 dissect_amqp_0_9_method_queue_declare(tvbuff_t
*tvb
, packet_info
*pinfo
,
7395 int offset
, proto_tree
*args_tree
)
7398 const uint8_t* queue
;
7400 /* ticket (short) */
7401 proto_tree_add_item(args_tree
, hf_amqp_method_queue_declare_ticket
,
7402 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
7405 /* queue (shortstr) */
7406 proto_tree_add_item_ret_string(args_tree
, hf_amqp_method_queue_declare_queue
,
7407 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
|ENC_NA
, pinfo
->pool
, &queue
);
7408 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "q=%s ", queue
);
7409 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
7412 proto_tree_add_item(args_tree
, hf_amqp_method_queue_declare_passive
,
7413 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
7416 proto_tree_add_item(args_tree
, hf_amqp_method_queue_declare_durable
,
7417 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
7419 /* exclusive (bit) */
7420 proto_tree_add_item(args_tree
, hf_amqp_method_queue_declare_exclusive
,
7421 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
7423 /* auto-delete (bit) */
7424 proto_tree_add_item(args_tree
, hf_amqp_method_queue_declare_auto_delete
,
7425 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
7428 proto_tree_add_item(args_tree
, hf_amqp_method_queue_declare_nowait
,
7429 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
7432 /* arguments (table) */
7433 ti
= proto_tree_add_item(
7434 args_tree
, hf_amqp_method_queue_declare_arguments
,
7435 tvb
, offset
+ 4, tvb_get_ntohl(tvb
, offset
), ENC_NA
);
7436 dissect_amqp_0_9_field_table(tvb
, pinfo
, offset
+ 4, tvb_get_ntohl(tvb
, offset
), ti
);
7437 offset
+= 4 + tvb_get_ntohl(tvb
, offset
);
7442 /* Dissection routine for method Queue.Declare-Ok */
7445 dissect_amqp_0_9_method_queue_declare_ok(tvbuff_t
*tvb
, packet_info
*pinfo
,
7446 int offset
, proto_tree
*args_tree
)
7448 const uint8_t* queue
;
7450 /* queue (shortstr) */
7451 proto_tree_add_item_ret_string(args_tree
, hf_amqp_method_queue_declare_ok_queue
,
7452 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
|ENC_NA
, pinfo
->pool
, &queue
);
7453 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "q=%s ", queue
);
7454 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
7456 /* message-count (long) */
7457 proto_tree_add_item(args_tree
, hf_amqp_method_queue_declare_ok_message_count
,
7458 tvb
, offset
, 4, ENC_BIG_ENDIAN
);
7461 /* consumer-count (long) */
7462 proto_tree_add_item(args_tree
, hf_amqp_method_queue_declare_ok_consumer_count
,
7463 tvb
, offset
, 4, ENC_BIG_ENDIAN
);
7469 /* Dissection routine for method Queue.Bind */
7472 dissect_amqp_0_9_method_queue_bind(tvbuff_t
*tvb
, packet_info
*pinfo
,
7473 int offset
, proto_tree
*args_tree
)
7478 /* ticket (short) */
7479 proto_tree_add_item(args_tree
, hf_amqp_method_queue_bind_ticket
,
7480 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
7483 /* queue (shortstr) */
7484 proto_tree_add_item_ret_string(args_tree
, hf_amqp_method_queue_bind_queue
,
7485 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
|ENC_NA
, pinfo
->pool
, &str
);
7486 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "q=%s ", str
);
7487 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
7489 /* exchange (shortstr) */
7490 proto_tree_add_item_ret_string(args_tree
, hf_amqp_method_queue_bind_exchange
,
7491 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
|ENC_NA
, pinfo
->pool
, &str
);
7492 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "x=%s ", str
);
7493 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
7495 /* routing-key (shortstr) */
7496 proto_tree_add_item_ret_string(args_tree
, hf_amqp_method_queue_bind_routing_key
,
7497 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
|ENC_NA
, pinfo
->pool
, &str
);
7498 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "bk=%s ", str
);
7499 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
7502 proto_tree_add_item(args_tree
, hf_amqp_method_queue_bind_nowait
,
7503 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
7506 /* arguments (table) */
7507 ti
= proto_tree_add_item(
7508 args_tree
, hf_amqp_method_queue_bind_arguments
,
7509 tvb
, offset
+ 4, tvb_get_ntohl(tvb
, offset
), ENC_NA
);
7510 dissect_amqp_0_9_field_table(tvb
, pinfo
, offset
+ 4, tvb_get_ntohl(tvb
, offset
), ti
);
7511 offset
+= 4 + tvb_get_ntohl(tvb
, offset
);
7516 /* Dissection routine for method Queue.Bind-Ok */
7519 dissect_amqp_0_9_method_queue_bind_ok(tvbuff_t
*tvb _U_
,
7520 int offset
, proto_tree
*args_tree _U_
)
7525 /* Dissection routine for method Queue.Unbind */
7528 dissect_amqp_0_9_method_queue_unbind(tvbuff_t
*tvb
, packet_info
*pinfo
,
7529 int offset
, proto_tree
*args_tree
)
7534 /* ticket (short) */
7535 proto_tree_add_item(args_tree
, hf_amqp_method_queue_unbind_ticket
,
7536 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
7539 /* queue (shortstr) */
7540 proto_tree_add_item_ret_string(args_tree
, hf_amqp_method_queue_unbind_queue
,
7541 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
|ENC_NA
, pinfo
->pool
, &str
);
7542 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "q=%s ", str
);
7543 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
7545 /* exchange (shortstr) */
7546 proto_tree_add_item_ret_string(args_tree
, hf_amqp_method_queue_unbind_exchange
,
7547 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
|ENC_NA
, pinfo
->pool
, &str
);
7548 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "x=%s ", str
);
7549 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
7551 /* routing-key (shortstr) */
7552 proto_tree_add_item_ret_string(args_tree
, hf_amqp_method_queue_unbind_routing_key
,
7553 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
|ENC_NA
, pinfo
->pool
, &str
);
7554 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "rk=%s ", str
);
7555 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
7557 /* arguments (table) */
7558 ti
= proto_tree_add_item(
7559 args_tree
, hf_amqp_method_queue_unbind_arguments
,
7560 tvb
, offset
+ 4, tvb_get_ntohl(tvb
, offset
), ENC_NA
);
7561 dissect_amqp_0_9_field_table(tvb
, pinfo
, offset
+ 4, tvb_get_ntohl(tvb
, offset
), ti
);
7562 offset
+= 4 + tvb_get_ntohl(tvb
, offset
);
7567 /* Dissection routine for method Queue.Unbind-Ok */
7570 dissect_amqp_0_9_method_queue_unbind_ok(tvbuff_t
*tvb _U_
,
7571 int offset
, proto_tree
*args_tree _U_
)
7576 /* Dissection routine for method Queue.Purge */
7579 dissect_amqp_0_9_method_queue_purge(tvbuff_t
*tvb
, packet_info
*pinfo
,
7580 int offset
, proto_tree
*args_tree
)
7582 const uint8_t* queue
;
7584 /* ticket (short) */
7585 proto_tree_add_item(args_tree
, hf_amqp_method_queue_purge_ticket
,
7586 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
7589 /* queue (shortstr) */
7590 proto_tree_add_item_ret_string(args_tree
, hf_amqp_method_queue_purge_queue
,
7591 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
|ENC_NA
, pinfo
->pool
, &queue
);
7592 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "q=%s ", queue
);
7593 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
7596 proto_tree_add_item(args_tree
, hf_amqp_method_queue_purge_nowait
,
7597 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
7602 /* Dissection routine for method Queue.Purge-Ok */
7605 dissect_amqp_0_9_method_queue_purge_ok(tvbuff_t
*tvb
,
7606 int offset
, proto_tree
*args_tree
)
7608 /* message-count (long) */
7609 proto_tree_add_item(args_tree
, hf_amqp_method_queue_purge_ok_message_count
,
7610 tvb
, offset
, 4, ENC_BIG_ENDIAN
);
7616 /* Dissection routine for method Queue.Delete */
7619 dissect_amqp_0_9_method_queue_delete(tvbuff_t
*tvb
, packet_info
*pinfo
,
7620 int offset
, proto_tree
*args_tree
)
7622 const uint8_t* queue
;
7624 /* ticket (short) */
7625 proto_tree_add_item(args_tree
, hf_amqp_method_queue_delete_ticket
,
7626 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
7629 /* queue (shortstr) */
7630 proto_tree_add_item_ret_string(args_tree
, hf_amqp_method_queue_delete_queue
,
7631 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
|ENC_NA
, pinfo
->pool
, &queue
);
7632 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "q=%s ", queue
);
7633 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
7635 /* if-unused (bit) */
7636 proto_tree_add_item(args_tree
, hf_amqp_method_queue_delete_if_unused
,
7637 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
7639 /* if-empty (bit) */
7640 proto_tree_add_item(args_tree
, hf_amqp_method_queue_delete_if_empty
,
7641 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
7644 proto_tree_add_item(args_tree
, hf_amqp_method_queue_delete_nowait
,
7645 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
7650 /* Dissection routine for method Queue.Delete-Ok */
7653 dissect_amqp_0_9_method_queue_delete_ok(tvbuff_t
*tvb
,
7654 int offset
, proto_tree
*args_tree
)
7656 /* message-count (long) */
7657 proto_tree_add_item(args_tree
, hf_amqp_method_queue_delete_ok_message_count
,
7658 tvb
, offset
, 4, ENC_BIG_ENDIAN
);
7664 /* Dissection routine for method Basic.Qos */
7667 dissect_amqp_0_9_method_basic_qos(tvbuff_t
*tvb
,
7668 int offset
, proto_tree
*args_tree
)
7670 /* prefetch-size (long) */
7671 proto_tree_add_item(args_tree
, hf_amqp_method_basic_qos_prefetch_size
,
7672 tvb
, offset
, 4, ENC_BIG_ENDIAN
);
7675 /* prefetch-count (short) */
7676 proto_tree_add_item(args_tree
, hf_amqp_method_basic_qos_prefetch_count
,
7677 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
7681 proto_tree_add_item(args_tree
, hf_amqp_method_basic_qos_global
,
7682 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
7687 /* Dissection routine for method Basic.Qos-Ok */
7690 dissect_amqp_0_9_method_basic_qos_ok(tvbuff_t
*tvb _U_
,
7691 int offset
, proto_tree
*args_tree _U_
)
7696 /* Dissection routine for method Basic.Consume */
7699 dissect_amqp_0_9_method_basic_consume(tvbuff_t
*tvb
, packet_info
*pinfo
,
7700 int offset
, proto_tree
*args_tree
)
7703 const uint8_t* queue
;
7705 /* ticket (short) */
7706 proto_tree_add_item(args_tree
, hf_amqp_method_basic_consume_ticket
,
7707 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
7710 /* queue (shortstr) */
7711 proto_tree_add_item_ret_string(args_tree
, hf_amqp_method_basic_consume_queue
,
7712 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
|ENC_NA
, pinfo
->pool
, &queue
);
7713 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "q=%s ", queue
);
7714 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
7716 /* consumer-tag (shortstr) */
7717 proto_tree_add_item(args_tree
, hf_amqp_method_basic_consume_consumer_tag
,
7718 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
7719 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
7721 /* no-local (bit) */
7722 proto_tree_add_item(args_tree
, hf_amqp_method_basic_consume_no_local
,
7723 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
7726 proto_tree_add_item(args_tree
, hf_amqp_method_basic_consume_no_ack
,
7727 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
7729 /* exclusive (bit) */
7730 proto_tree_add_item(args_tree
, hf_amqp_method_basic_consume_exclusive
,
7731 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
7734 proto_tree_add_item(args_tree
, hf_amqp_method_basic_consume_nowait
,
7735 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
7738 /* filter (table) */
7739 ti
= proto_tree_add_item(
7740 args_tree
, hf_amqp_method_basic_consume_filter
,
7741 tvb
, offset
+ 4, tvb_get_ntohl(tvb
, offset
), ENC_NA
);
7742 dissect_amqp_0_9_field_table(tvb
, pinfo
, offset
+ 4, tvb_get_ntohl(tvb
, offset
), ti
);
7743 offset
+= 4 + tvb_get_ntohl(tvb
, offset
);
7748 /* Dissection routine for method Basic.Consume-Ok */
7751 dissect_amqp_0_9_method_basic_consume_ok(tvbuff_t
*tvb
,
7752 int offset
, proto_tree
*args_tree
)
7754 /* consumer-tag (shortstr) */
7755 proto_tree_add_item(args_tree
, hf_amqp_method_basic_consume_ok_consumer_tag
,
7756 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
7757 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
7762 /* Dissection routine for method Basic.Cancel */
7765 dissect_amqp_0_9_method_basic_cancel(tvbuff_t
*tvb
,
7766 int offset
, proto_tree
*args_tree
)
7768 /* consumer-tag (shortstr) */
7769 proto_tree_add_item(args_tree
, hf_amqp_method_basic_cancel_consumer_tag
,
7770 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
7771 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
7774 proto_tree_add_item(args_tree
, hf_amqp_method_basic_cancel_nowait
,
7775 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
7780 /* Dissection routine for method Basic.Cancel-Ok */
7783 dissect_amqp_0_9_method_basic_cancel_ok(tvbuff_t
*tvb
,
7784 int offset
, proto_tree
*args_tree
)
7786 /* consumer-tag (shortstr) */
7787 proto_tree_add_item(args_tree
, hf_amqp_method_basic_cancel_ok_consumer_tag
,
7788 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
7789 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
7794 /* Dissection routine for method Basic.Publish */
7797 dissect_amqp_0_9_method_basic_publish(uint16_t channel_num
,
7798 tvbuff_t
*tvb
, packet_info
*pinfo
, int offset
, proto_tree
*args_tree
)
7800 amqp_delivery
*delivery
;
7804 /* message number (long long) */
7805 if(!PINFO_FD_VISITED(pinfo
))
7807 conversation_t
*conv
;
7808 amqp_channel_t
*channel
;
7810 conv
= find_or_create_conversation(pinfo
);
7811 channel
= get_conversation_channel(conv
, channel_num
);
7813 record_msg_delivery_c(conv
, channel
, tvb
, pinfo
, ++channel
->publish_count
);
7816 delivery
= (amqp_delivery
*)p_get_proto_data(pinfo
->pool
, pinfo
, proto_amqp
,
7817 (uint32_t)tvb_raw_offset(tvb
));
7820 pi
= proto_tree_add_uint64(args_tree
, hf_amqp_method_basic_publish_number
,
7821 tvb
, offset
-2, 2, delivery
->delivery_tag
);
7822 proto_item_set_generated(pi
);
7825 /* ticket (short) */
7826 proto_tree_add_item(args_tree
, hf_amqp_method_basic_publish_ticket
,
7827 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
7830 /* exchange (shortstr) */
7831 proto_tree_add_item_ret_string(args_tree
, hf_amqp_method_basic_publish_exchange
,
7832 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
|ENC_NA
, pinfo
->pool
, &str
);
7833 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "x=%s ", str
);
7834 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
7836 /* routing-key (shortstr) */
7837 proto_tree_add_item_ret_string(args_tree
, hf_amqp_method_basic_publish_routing_key
,
7838 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
|ENC_NA
, pinfo
->pool
, &str
);
7839 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "rk=%s ", str
);
7840 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
7842 /* mandatory (bit) */
7843 proto_tree_add_item(args_tree
, hf_amqp_method_basic_publish_mandatory
,
7844 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
7846 /* immediate (bit) */
7847 proto_tree_add_item(args_tree
, hf_amqp_method_basic_publish_immediate
,
7848 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
7853 /* Dissection routine for method Basic.Return */
7856 dissect_amqp_0_9_method_basic_return(tvbuff_t
*tvb
, packet_info
*pinfo
,
7857 int offset
, proto_tree
*args_tree
)
7859 proto_item
*tf_code
;
7861 /* reply-code (short) */
7862 tf_code
= proto_tree_add_item(args_tree
, hf_amqp_method_basic_return_reply_code
,
7863 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
7864 if (tvb_get_ntohs(tvb
, offset
) > 200)
7865 expert_add_info(pinfo
, tf_code
, &ei_amqp_message_undeliverable
);
7868 /* reply-text (shortstr) */
7869 proto_tree_add_item(args_tree
, hf_amqp_method_basic_return_reply_text
,
7870 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
7871 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
7873 /* exchange (shortstr) */
7874 proto_tree_add_item(args_tree
, hf_amqp_method_basic_return_exchange
,
7875 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
7876 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
7878 /* routing-key (shortstr) */
7879 proto_tree_add_item(args_tree
, hf_amqp_method_basic_return_routing_key
,
7880 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
7881 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
7886 /* Dissection routine for method Basic.Deliver */
7889 dissect_amqp_0_9_method_basic_deliver(uint16_t channel_num
,
7890 tvbuff_t
*tvb
, packet_info
*pinfo
, int offset
, proto_tree
*args_tree
)
7892 uint64_t delivery_tag
;
7895 /* consumer-tag (shortstr) */
7896 proto_tree_add_item(args_tree
, hf_amqp_method_basic_deliver_consumer_tag
,
7897 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
7898 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
7900 /* delivery-tag (longlong) */
7901 proto_tree_add_item(args_tree
, hf_amqp_method_basic_deliver_delivery_tag
,
7902 tvb
, offset
, 8, ENC_BIG_ENDIAN
);
7903 delivery_tag
= tvb_get_ntoh64(tvb
, offset
);
7906 /* redelivered (bit) */
7907 proto_tree_add_item(args_tree
, hf_amqp_method_basic_deliver_redelivered
,
7908 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
7911 /* exchange (shortstr) */
7912 proto_tree_add_item_ret_string(args_tree
, hf_amqp_method_basic_deliver_exchange
,
7913 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
|ENC_NA
, pinfo
->pool
, &str
);
7914 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "x=%s ", str
);
7915 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
7917 /* routing-key (shortstr) */
7918 proto_tree_add_item_ret_string(args_tree
, hf_amqp_method_basic_deliver_routing_key
,
7919 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
|ENC_NA
, pinfo
->pool
, &str
);
7920 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "rk=%s ", str
);
7921 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
7923 if(!PINFO_FD_VISITED(pinfo
))
7924 record_msg_delivery(tvb
, pinfo
, channel_num
, delivery_tag
);
7929 /* Dissection routine for method Basic.Get */
7932 dissect_amqp_0_9_method_basic_get(tvbuff_t
*tvb
, packet_info
*pinfo
,
7933 int offset
, proto_tree
*args_tree
)
7935 const uint8_t* queue
;
7937 /* ticket (short) */
7938 proto_tree_add_item(args_tree
, hf_amqp_method_basic_get_ticket
,
7939 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
7942 /* queue (shortstr) */
7943 proto_tree_add_item_ret_string(args_tree
, hf_amqp_method_basic_get_queue
,
7944 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
|ENC_NA
, pinfo
->pool
, &queue
);
7945 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "q=%s ", queue
);
7946 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
7949 proto_tree_add_item(args_tree
, hf_amqp_method_basic_get_no_ack
,
7950 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
7955 /* Dissection routine for method Basic.Get-Ok */
7958 dissect_amqp_0_9_method_basic_get_ok(uint16_t channel_num
,
7959 tvbuff_t
*tvb
, packet_info
*pinfo
, int offset
, proto_tree
*args_tree
)
7961 uint64_t delivery_tag
;
7964 /* delivery-tag (longlong) */
7965 proto_tree_add_item(args_tree
, hf_amqp_method_basic_get_ok_delivery_tag
,
7966 tvb
, offset
, 8, ENC_BIG_ENDIAN
);
7967 delivery_tag
= tvb_get_ntoh64(tvb
, offset
);
7970 /* redelivered (bit) */
7971 proto_tree_add_item(args_tree
, hf_amqp_method_basic_get_ok_redelivered
,
7972 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
7975 /* exchange (shortstr) */
7976 proto_tree_add_item_ret_string(args_tree
, hf_amqp_method_basic_get_ok_exchange
,
7977 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
|ENC_NA
, pinfo
->pool
, &str
);
7978 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "x=%s ", str
);
7979 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
7981 /* routing-key (shortstr) */
7982 proto_tree_add_item_ret_string(args_tree
, hf_amqp_method_basic_get_ok_routing_key
,
7983 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
|ENC_NA
, pinfo
->pool
, &str
);
7984 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "rk=%s ", str
);
7985 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
7987 /* message-count (long) */
7988 proto_tree_add_item(args_tree
, hf_amqp_method_basic_get_ok_message_count
,
7989 tvb
, offset
, 4, ENC_BIG_ENDIAN
);
7992 if(!PINFO_FD_VISITED(pinfo
))
7993 record_msg_delivery(tvb
, pinfo
, channel_num
, delivery_tag
);
7998 /* Dissection routine for method Basic.Get-Empty */
8001 dissect_amqp_0_9_method_basic_get_empty(tvbuff_t
*tvb
,
8002 int offset
, proto_tree
*args_tree
)
8004 /* cluster-id (shortstr) */
8005 proto_tree_add_item(args_tree
, hf_amqp_method_basic_get_empty_cluster_id
,
8006 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
8007 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
8012 /* Dissection routine for method Basic.Ack */
8015 dissect_amqp_0_9_method_basic_ack(uint16_t channel_num
,
8016 tvbuff_t
*tvb
, packet_info
*pinfo
, int offset
, proto_tree
*args_tree
)
8018 uint64_t delivery_tag
;
8021 /* delivery-tag (longlong) */
8022 proto_tree_add_item(args_tree
, hf_amqp_method_basic_ack_delivery_tag
,
8023 tvb
, offset
, 8, ENC_BIG_ENDIAN
);
8024 delivery_tag
= tvb_get_ntoh64(tvb
, offset
);
8027 /* multiple (bit) */
8028 proto_tree_add_item(args_tree
, hf_amqp_method_basic_ack_multiple
,
8029 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
8030 multiple
= tvb_get_uint8(tvb
, offset
) & 0x01;
8032 if(!PINFO_FD_VISITED(pinfo
))
8033 record_delivery_ack(tvb
, pinfo
, channel_num
, delivery_tag
, multiple
);
8038 /* Dissection routine for method Basic.Reject */
8041 dissect_amqp_0_9_method_basic_reject(uint16_t channel_num
,
8042 tvbuff_t
*tvb
, packet_info
*pinfo
, int offset
, proto_tree
*args_tree
)
8044 uint64_t delivery_tag
;
8046 /* delivery-tag (longlong) */
8047 proto_tree_add_item(args_tree
, hf_amqp_method_basic_reject_delivery_tag
,
8048 tvb
, offset
, 8, ENC_BIG_ENDIAN
);
8049 delivery_tag
= tvb_get_ntoh64(tvb
, offset
);
8053 proto_tree_add_item(args_tree
, hf_amqp_method_basic_reject_requeue
,
8054 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
8056 if(!PINFO_FD_VISITED(pinfo
))
8057 record_delivery_ack(tvb
, pinfo
, channel_num
, delivery_tag
, false);
8062 /* Dissection routine for method Basic.Recover-Async */
8065 dissect_amqp_0_9_method_basic_recover_async(tvbuff_t
*tvb
,
8066 int offset
, proto_tree
*args_tree
)
8069 proto_tree_add_item(args_tree
, hf_amqp_method_basic_recover_requeue
,
8070 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
8075 /* Dissection routine for method Basic.Recover */
8078 dissect_amqp_0_9_method_basic_recover(tvbuff_t
*tvb
,
8079 int offset
, proto_tree
*args_tree
)
8082 proto_tree_add_item(args_tree
, hf_amqp_method_basic_recover_requeue
,
8083 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
8088 /* Dissection routine for method Basic.Recover-Ok */
8091 dissect_amqp_0_9_method_basic_recover_ok(tvbuff_t
*tvb _U_
,
8092 int offset
, proto_tree
*args_tree _U_
)
8097 /* Dissection routine for method Basic.Nack */
8100 dissect_amqp_0_9_method_basic_nack(uint16_t channel_num
,
8101 tvbuff_t
*tvb
, packet_info
*pinfo
, int offset
, proto_tree
*args_tree
)
8103 uint64_t delivery_tag
;
8106 /* delivery-tag (longlong) */
8107 proto_tree_add_item(args_tree
, hf_amqp_method_basic_nack_delivery_tag
,
8108 tvb
, offset
, 8, ENC_BIG_ENDIAN
);
8109 delivery_tag
= tvb_get_ntoh64(tvb
, offset
);
8112 /* multiple (bit) */
8113 proto_tree_add_item(args_tree
, hf_amqp_method_basic_nack_multiple
,
8114 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
8115 multiple
= tvb_get_uint8(tvb
, offset
) & 0x01;
8118 proto_tree_add_item(args_tree
, hf_amqp_method_basic_nack_requeue
,
8119 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
8121 if(!PINFO_FD_VISITED(pinfo
))
8122 record_delivery_ack(tvb
, pinfo
, channel_num
, delivery_tag
, multiple
);
8127 /* Dissection routine for method File.Qos */
8130 dissect_amqp_0_9_method_file_qos(tvbuff_t
*tvb
,
8131 int offset
, proto_tree
*args_tree
)
8133 /* prefetch-size (long) */
8134 proto_tree_add_item(args_tree
, hf_amqp_method_file_qos_prefetch_size
,
8135 tvb
, offset
, 4, ENC_BIG_ENDIAN
);
8138 /* prefetch-count (short) */
8139 proto_tree_add_item(args_tree
, hf_amqp_method_file_qos_prefetch_count
,
8140 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
8144 proto_tree_add_item(args_tree
, hf_amqp_method_file_qos_global
,
8145 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
8150 /* Dissection routine for method File.Qos-Ok */
8153 dissect_amqp_0_9_method_file_qos_ok(tvbuff_t
*tvb _U_
,
8154 int offset
, proto_tree
*args_tree _U_
)
8159 /* Dissection routine for method File.Consume */
8162 dissect_amqp_0_9_method_file_consume(tvbuff_t
*tvb
, packet_info
*pinfo
,
8163 int offset
, proto_tree
*args_tree
)
8167 /* ticket (short) */
8168 proto_tree_add_item(args_tree
, hf_amqp_method_file_consume_ticket
,
8169 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
8172 /* queue (shortstr) */
8173 proto_tree_add_item(args_tree
, hf_amqp_method_file_consume_queue
,
8174 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
8175 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
8177 /* consumer-tag (shortstr) */
8178 proto_tree_add_item(args_tree
, hf_amqp_method_file_consume_consumer_tag
,
8179 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
8180 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
8182 /* no-local (bit) */
8183 proto_tree_add_item(args_tree
, hf_amqp_method_file_consume_no_local
,
8184 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
8187 proto_tree_add_item(args_tree
, hf_amqp_method_file_consume_no_ack
,
8188 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
8190 /* exclusive (bit) */
8191 proto_tree_add_item(args_tree
, hf_amqp_method_file_consume_exclusive
,
8192 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
8195 proto_tree_add_item(args_tree
, hf_amqp_method_file_consume_nowait
,
8196 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
8199 /* filter (table) */
8200 ti
= proto_tree_add_item(
8201 args_tree
, hf_amqp_method_file_consume_filter
,
8202 tvb
, offset
+ 4, tvb_get_ntohl(tvb
, offset
), ENC_NA
);
8203 dissect_amqp_0_9_field_table(tvb
, pinfo
, offset
+ 4, tvb_get_ntohl(tvb
, offset
), ti
);
8204 offset
+= 4 + tvb_get_ntohl(tvb
, offset
);
8209 /* Dissection routine for method File.Consume-Ok */
8212 dissect_amqp_0_9_method_file_consume_ok(tvbuff_t
*tvb
,
8213 int offset
, proto_tree
*args_tree
)
8215 /* consumer-tag (shortstr) */
8216 proto_tree_add_item(args_tree
, hf_amqp_method_file_consume_ok_consumer_tag
,
8217 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
8218 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
8223 /* Dissection routine for method File.Cancel */
8226 dissect_amqp_0_9_method_file_cancel(tvbuff_t
*tvb
,
8227 int offset
, proto_tree
*args_tree
)
8229 /* consumer-tag (shortstr) */
8230 proto_tree_add_item(args_tree
, hf_amqp_method_file_cancel_consumer_tag
,
8231 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
8232 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
8235 proto_tree_add_item(args_tree
, hf_amqp_method_file_cancel_nowait
,
8236 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
8241 /* Dissection routine for method File.Cancel-Ok */
8244 dissect_amqp_0_9_method_file_cancel_ok(tvbuff_t
*tvb
,
8245 int offset
, proto_tree
*args_tree
)
8247 /* consumer-tag (shortstr) */
8248 proto_tree_add_item(args_tree
, hf_amqp_method_file_cancel_ok_consumer_tag
,
8249 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
8250 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
8255 /* Dissection routine for method File.Open */
8258 dissect_amqp_0_9_method_file_open(tvbuff_t
*tvb
,
8259 int offset
, proto_tree
*args_tree
)
8261 /* identifier (shortstr) */
8262 proto_tree_add_item(args_tree
, hf_amqp_method_file_open_identifier
,
8263 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
8264 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
8266 /* content-size (longlong) */
8267 proto_tree_add_item(args_tree
, hf_amqp_method_file_open_content_size
,
8268 tvb
, offset
, 8, ENC_BIG_ENDIAN
);
8274 /* Dissection routine for method File.Open-Ok */
8277 dissect_amqp_0_9_method_file_open_ok(tvbuff_t
*tvb
,
8278 int offset
, proto_tree
*args_tree
)
8280 /* staged-size (longlong) */
8281 proto_tree_add_item(args_tree
, hf_amqp_method_file_open_ok_staged_size
,
8282 tvb
, offset
, 8, ENC_BIG_ENDIAN
);
8288 /* Dissection routine for method File.Stage */
8291 dissect_amqp_0_9_method_file_stage(tvbuff_t
*tvb _U_
,
8292 int offset
, proto_tree
*args_tree _U_
)
8297 /* Dissection routine for method File.Publish */
8300 dissect_amqp_0_9_method_file_publish(tvbuff_t
*tvb
,
8301 int offset
, proto_tree
*args_tree
)
8303 /* ticket (short) */
8304 proto_tree_add_item(args_tree
, hf_amqp_method_file_publish_ticket
,
8305 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
8308 /* exchange (shortstr) */
8309 proto_tree_add_item(args_tree
, hf_amqp_method_file_publish_exchange
,
8310 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
8311 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
8313 /* routing-key (shortstr) */
8314 proto_tree_add_item(args_tree
, hf_amqp_method_file_publish_routing_key
,
8315 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
8316 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
8318 /* mandatory (bit) */
8319 proto_tree_add_item(args_tree
, hf_amqp_method_file_publish_mandatory
,
8320 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
8322 /* immediate (bit) */
8323 proto_tree_add_item(args_tree
, hf_amqp_method_file_publish_immediate
,
8324 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
8327 /* identifier (shortstr) */
8328 proto_tree_add_item(args_tree
, hf_amqp_method_file_publish_identifier
,
8329 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
8330 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
8335 /* Dissection routine for method File.Return */
8338 dissect_amqp_0_9_method_file_return(tvbuff_t
*tvb
,
8339 int offset
, proto_tree
*args_tree
)
8341 /* reply-code (short) */
8342 proto_tree_add_item(args_tree
, hf_amqp_method_file_return_reply_code
,
8343 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
8346 /* reply-text (shortstr) */
8347 proto_tree_add_item(args_tree
, hf_amqp_method_file_return_reply_text
,
8348 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
8349 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
8351 /* exchange (shortstr) */
8352 proto_tree_add_item(args_tree
, hf_amqp_method_file_return_exchange
,
8353 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
8354 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
8356 /* routing-key (shortstr) */
8357 proto_tree_add_item(args_tree
, hf_amqp_method_file_return_routing_key
,
8358 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
8359 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
8364 /* Dissection routine for method File.Deliver */
8367 dissect_amqp_0_9_method_file_deliver(tvbuff_t
*tvb
,
8368 int offset
, proto_tree
*args_tree
)
8370 /* consumer-tag (shortstr) */
8371 proto_tree_add_item(args_tree
, hf_amqp_method_file_deliver_consumer_tag
,
8372 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
8373 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
8375 /* delivery-tag (longlong) */
8376 proto_tree_add_item(args_tree
, hf_amqp_method_file_deliver_delivery_tag
,
8377 tvb
, offset
, 8, ENC_BIG_ENDIAN
);
8380 /* redelivered (bit) */
8381 proto_tree_add_item(args_tree
, hf_amqp_method_file_deliver_redelivered
,
8382 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
8385 /* exchange (shortstr) */
8386 proto_tree_add_item(args_tree
, hf_amqp_method_file_deliver_exchange
,
8387 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
8388 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
8390 /* routing-key (shortstr) */
8391 proto_tree_add_item(args_tree
, hf_amqp_method_file_deliver_routing_key
,
8392 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
8393 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
8395 /* identifier (shortstr) */
8396 proto_tree_add_item(args_tree
, hf_amqp_method_file_deliver_identifier
,
8397 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
8398 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
8403 /* Dissection routine for method File.Ack */
8406 dissect_amqp_0_9_method_file_ack(tvbuff_t
*tvb
,
8407 int offset
, proto_tree
*args_tree
)
8409 /* delivery-tag (longlong) */
8410 proto_tree_add_item(args_tree
, hf_amqp_method_file_ack_delivery_tag
,
8411 tvb
, offset
, 8, ENC_BIG_ENDIAN
);
8414 /* multiple (bit) */
8415 proto_tree_add_item(args_tree
, hf_amqp_method_file_ack_multiple
,
8416 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
8421 /* Dissection routine for method File.Reject */
8424 dissect_amqp_0_9_method_file_reject(tvbuff_t
*tvb
,
8425 int offset
, proto_tree
*args_tree
)
8427 /* delivery-tag (longlong) */
8428 proto_tree_add_item(args_tree
, hf_amqp_method_file_reject_delivery_tag
,
8429 tvb
, offset
, 8, ENC_BIG_ENDIAN
);
8433 proto_tree_add_item(args_tree
, hf_amqp_method_file_reject_requeue
,
8434 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
8439 /* Dissection routine for method Stream.Qos */
8442 dissect_amqp_0_9_method_stream_qos(tvbuff_t
*tvb
,
8443 int offset
, proto_tree
*args_tree
)
8445 /* prefetch-size (long) */
8446 proto_tree_add_item(args_tree
, hf_amqp_method_stream_qos_prefetch_size
,
8447 tvb
, offset
, 4, ENC_BIG_ENDIAN
);
8450 /* prefetch-count (short) */
8451 proto_tree_add_item(args_tree
, hf_amqp_method_stream_qos_prefetch_count
,
8452 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
8455 /* consume-rate (long) */
8456 proto_tree_add_item(args_tree
, hf_amqp_method_stream_qos_consume_rate
,
8457 tvb
, offset
, 4, ENC_BIG_ENDIAN
);
8461 proto_tree_add_item(args_tree
, hf_amqp_method_stream_qos_global
,
8462 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
8467 /* Dissection routine for method Stream.Qos-Ok */
8470 dissect_amqp_0_9_method_stream_qos_ok(tvbuff_t
*tvb _U_
,
8471 int offset
, proto_tree
*args_tree _U_
)
8476 /* Dissection routine for method Stream.Consume */
8479 dissect_amqp_0_9_method_stream_consume(tvbuff_t
*tvb
, packet_info
*pinfo
,
8480 int offset
, proto_tree
*args_tree
)
8484 /* ticket (short) */
8485 proto_tree_add_item(args_tree
, hf_amqp_method_stream_consume_ticket
,
8486 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
8489 /* queue (shortstr) */
8490 proto_tree_add_item(args_tree
, hf_amqp_method_stream_consume_queue
,
8491 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
8492 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
8494 /* consumer-tag (shortstr) */
8495 proto_tree_add_item(args_tree
, hf_amqp_method_stream_consume_consumer_tag
,
8496 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
8497 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
8499 /* no-local (bit) */
8500 proto_tree_add_item(args_tree
, hf_amqp_method_stream_consume_no_local
,
8501 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
8503 /* exclusive (bit) */
8504 proto_tree_add_item(args_tree
, hf_amqp_method_stream_consume_exclusive
,
8505 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
8508 proto_tree_add_item(args_tree
, hf_amqp_method_stream_consume_nowait
,
8509 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
8512 /* filter (table) */
8513 ti
= proto_tree_add_item(
8514 args_tree
, hf_amqp_method_stream_consume_filter
,
8515 tvb
, offset
+ 4, tvb_get_ntohl(tvb
, offset
), ENC_NA
);
8516 dissect_amqp_0_9_field_table(tvb
, pinfo
, offset
+ 4, tvb_get_ntohl(tvb
, offset
), ti
);
8517 offset
+= 4 + tvb_get_ntohl(tvb
, offset
);
8522 /* Dissection routine for method Stream.Consume-Ok */
8525 dissect_amqp_0_9_method_stream_consume_ok(tvbuff_t
*tvb
,
8526 int offset
, proto_tree
*args_tree
)
8528 /* consumer-tag (shortstr) */
8529 proto_tree_add_item(args_tree
, hf_amqp_method_stream_consume_ok_consumer_tag
,
8530 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
8531 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
8536 /* Dissection routine for method Stream.Cancel */
8539 dissect_amqp_0_9_method_stream_cancel(tvbuff_t
*tvb
,
8540 int offset
, proto_tree
*args_tree
)
8542 /* consumer-tag (shortstr) */
8543 proto_tree_add_item(args_tree
, hf_amqp_method_stream_cancel_consumer_tag
,
8544 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
8545 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
8548 proto_tree_add_item(args_tree
, hf_amqp_method_stream_cancel_nowait
,
8549 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
8554 /* Dissection routine for method Stream.Cancel-Ok */
8557 dissect_amqp_0_9_method_stream_cancel_ok(tvbuff_t
*tvb
,
8558 int offset
, proto_tree
*args_tree
)
8560 /* consumer-tag (shortstr) */
8561 proto_tree_add_item(args_tree
, hf_amqp_method_stream_cancel_ok_consumer_tag
,
8562 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
8563 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
8568 /* Dissection routine for method Stream.Publish */
8571 dissect_amqp_0_9_method_stream_publish(tvbuff_t
*tvb
,
8572 int offset
, proto_tree
*args_tree
)
8574 /* ticket (short) */
8575 proto_tree_add_item(args_tree
, hf_amqp_method_stream_publish_ticket
,
8576 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
8579 /* exchange (shortstr) */
8580 proto_tree_add_item(args_tree
, hf_amqp_method_stream_publish_exchange
,
8581 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
8582 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
8584 /* routing-key (shortstr) */
8585 proto_tree_add_item(args_tree
, hf_amqp_method_stream_publish_routing_key
,
8586 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
8587 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
8589 /* mandatory (bit) */
8590 proto_tree_add_item(args_tree
, hf_amqp_method_stream_publish_mandatory
,
8591 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
8593 /* immediate (bit) */
8594 proto_tree_add_item(args_tree
, hf_amqp_method_stream_publish_immediate
,
8595 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
8600 /* Dissection routine for method Stream.Return */
8603 dissect_amqp_0_9_method_stream_return(tvbuff_t
*tvb
,
8604 int offset
, proto_tree
*args_tree
)
8606 /* reply-code (short) */
8607 proto_tree_add_item(args_tree
, hf_amqp_method_stream_return_reply_code
,
8608 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
8611 /* reply-text (shortstr) */
8612 proto_tree_add_item(args_tree
, hf_amqp_method_stream_return_reply_text
,
8613 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
8614 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
8616 /* exchange (shortstr) */
8617 proto_tree_add_item(args_tree
, hf_amqp_method_stream_return_exchange
,
8618 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
8619 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
8621 /* routing-key (shortstr) */
8622 proto_tree_add_item(args_tree
, hf_amqp_method_stream_return_routing_key
,
8623 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
8624 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
8629 /* Dissection routine for method Stream.Deliver */
8632 dissect_amqp_0_9_method_stream_deliver(tvbuff_t
*tvb
,
8633 int offset
, proto_tree
*args_tree
)
8635 /* consumer-tag (shortstr) */
8636 proto_tree_add_item(args_tree
, hf_amqp_method_stream_deliver_consumer_tag
,
8637 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
8638 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
8640 /* delivery-tag (longlong) */
8641 proto_tree_add_item(args_tree
, hf_amqp_method_stream_deliver_delivery_tag
,
8642 tvb
, offset
, 8, ENC_BIG_ENDIAN
);
8645 /* exchange (shortstr) */
8646 proto_tree_add_item(args_tree
, hf_amqp_method_stream_deliver_exchange
,
8647 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
8648 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
8650 /* queue (shortstr) */
8651 proto_tree_add_item(args_tree
, hf_amqp_method_stream_deliver_queue
,
8652 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
8653 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
8658 /* Dissection routine for method Tx.Select */
8661 dissect_amqp_0_9_method_tx_select(tvbuff_t
*tvb _U_
,
8662 int offset
, proto_tree
*args_tree _U_
)
8667 /* Dissection routine for method Tx.Select-Ok */
8670 dissect_amqp_0_9_method_tx_select_ok(tvbuff_t
*tvb _U_
,
8671 int offset
, proto_tree
*args_tree _U_
)
8676 /* Dissection routine for method Tx.Commit */
8679 dissect_amqp_0_9_method_tx_commit(tvbuff_t
*tvb _U_
,
8680 int offset
, proto_tree
*args_tree _U_
)
8685 /* Dissection routine for method Tx.Commit-Ok */
8688 dissect_amqp_0_9_method_tx_commit_ok(tvbuff_t
*tvb _U_
,
8689 int offset
, proto_tree
*args_tree _U_
)
8694 /* Dissection routine for method Tx.Rollback */
8697 dissect_amqp_0_9_method_tx_rollback(tvbuff_t
*tvb _U_
,
8698 int offset
, proto_tree
*args_tree _U_
)
8703 /* Dissection routine for method Tx.Rollback-Ok */
8706 dissect_amqp_0_9_method_tx_rollback_ok(tvbuff_t
*tvb _U_
,
8707 int offset
, proto_tree
*args_tree _U_
)
8712 /* Dissection routine for method Dtx.Select */
8715 dissect_amqp_0_9_method_dtx_select(tvbuff_t
*tvb _U_
,
8716 int offset
, proto_tree
*args_tree _U_
)
8721 /* Dissection routine for method Dtx.Select-Ok */
8724 dissect_amqp_0_9_method_dtx_select_ok(tvbuff_t
*tvb _U_
,
8725 int offset
, proto_tree
*args_tree _U_
)
8730 /* Dissection routine for method Dtx.Start */
8733 dissect_amqp_0_9_method_dtx_start(tvbuff_t
*tvb
,
8734 int offset
, proto_tree
*args_tree
)
8736 /* dtx-identifier (shortstr) */
8737 proto_tree_add_item(args_tree
, hf_amqp_method_dtx_start_dtx_identifier
,
8738 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
8739 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
8744 /* Dissection routine for method Dtx.Start-Ok */
8747 dissect_amqp_0_9_method_dtx_start_ok(tvbuff_t
*tvb _U_
,
8748 int offset
, proto_tree
*args_tree _U_
)
8753 /* Dissection routine for method Tunnel.Request */
8756 dissect_amqp_0_9_method_tunnel_request(tvbuff_t
*tvb
, packet_info
*pinfo
,
8757 int offset
, proto_tree
*args_tree
)
8761 /* meta-data (table) */
8762 ti
= proto_tree_add_item(
8763 args_tree
, hf_amqp_method_tunnel_request_meta_data
,
8764 tvb
, offset
+ 4, tvb_get_ntohl(tvb
, offset
), ENC_NA
);
8765 dissect_amqp_0_9_field_table(tvb
, pinfo
, offset
+ 4, tvb_get_ntohl(tvb
, offset
), ti
);
8766 offset
+= 4 + tvb_get_ntohl(tvb
, offset
);
8771 /* Dissection routine for method Confirm.Select */
8774 dissect_amqp_0_9_method_confirm_select(tvbuff_t
*tvb
,
8775 int offset
, proto_tree
*args_tree
)
8778 proto_tree_add_item(args_tree
, hf_amqp_method_confirm_select_nowait
,
8779 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
8784 /* Dissection routine for method Confirm.Select-Ok */
8787 dissect_amqp_0_9_method_confirm_select_ok(uint16_t channel_num
,
8788 tvbuff_t
*tvb _U_
, packet_info
*pinfo
, int offset
, proto_tree
*args_tree _U_
)
8790 if(!PINFO_FD_VISITED(pinfo
))
8792 amqp_channel_t
*channel
;
8793 channel
= get_conversation_channel(find_or_create_conversation(pinfo
), channel_num
);
8794 channel
->confirms
= true;
8801 /* Dissection routine for content headers of class basic */
8804 dissect_amqp_0_9_content_header_basic(tvbuff_t
*tvb
, packet_info
*pinfo
,
8805 int offset
, proto_tree
*prop_tree
, amqp_content_params
*eh_ptr
)
8808 uint16_t prop_flags
;
8810 const uint8_t *content
;
8812 prop_flags
= tvb_get_ntohs(tvb
, 19);
8814 if (prop_flags
& 0x8000) {
8815 /* content-type (shortstr) */
8816 proto_tree_add_item_ret_string(prop_tree
, hf_amqp_header_basic_content_type
,
8817 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
|ENC_NA
, pinfo
->pool
, &content
);
8818 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "type=%s ", content
);
8820 eh_ptr
->type
= ascii_strdown_inplace(
8821 (char*)tvb_get_string_enc(wmem_file_scope(), tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
));
8823 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
8827 if (prop_flags
& 0x8000) {
8828 /* content-encoding (shortstr) */
8829 proto_tree_add_item(prop_tree
, hf_amqp_header_basic_content_encoding
,
8830 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
8832 eh_ptr
->encoding
= ascii_strdown_inplace(
8833 tvb_get_string_enc(wmem_file_scope(), tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
));
8835 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
8839 if (prop_flags
& 0x8000) {
8840 /* headers (table) */
8841 ti
= proto_tree_add_item(
8842 prop_tree
, hf_amqp_header_basic_headers
,
8843 tvb
, offset
+ 4, tvb_get_ntohl(tvb
, offset
), ENC_NA
);
8844 dissect_amqp_0_9_field_table(tvb
, pinfo
, offset
+ 4, tvb_get_ntohl(tvb
, offset
), ti
);
8845 offset
+= 4 + tvb_get_ntohl(tvb
, offset
);
8849 if (prop_flags
& 0x8000) {
8850 /* delivery-mode (octet) */
8851 proto_tree_add_item(prop_tree
, hf_amqp_header_basic_delivery_mode
,
8852 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
8857 if (prop_flags
& 0x8000) {
8858 /* priority (octet) */
8859 proto_tree_add_item(prop_tree
, hf_amqp_header_basic_priority
,
8860 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
8865 if (prop_flags
& 0x8000) {
8866 /* correlation-id (shortstr) */
8867 proto_tree_add_item(prop_tree
, hf_amqp_header_basic_correlation_id
,
8868 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
8869 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
8873 if (prop_flags
& 0x8000) {
8874 /* reply-to (shortstr) */
8875 proto_tree_add_item(prop_tree
, hf_amqp_header_basic_reply_to
,
8876 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
8877 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
8881 if (prop_flags
& 0x8000) {
8882 /* expiration (shortstr) */
8883 proto_tree_add_item(prop_tree
, hf_amqp_header_basic_expiration
,
8884 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
8885 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
8889 if (prop_flags
& 0x8000) {
8890 /* message-id (shortstr) */
8891 proto_tree_add_item(prop_tree
, hf_amqp_header_basic_message_id
,
8892 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
8893 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
8897 if (prop_flags
& 0x8000) {
8898 /* timestamp (timestamp) */
8899 tv
.secs
= (time_t)tvb_get_ntoh64(tvb
, offset
);
8901 proto_tree_add_time(prop_tree
, hf_amqp_header_basic_timestamp
,
8902 tvb
, offset
, 8, &tv
);
8907 if (prop_flags
& 0x8000) {
8908 /* type (shortstr) */
8909 proto_tree_add_item(prop_tree
, hf_amqp_header_basic_type
,
8910 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
8911 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
8915 if (prop_flags
& 0x8000) {
8916 /* user-id (shortstr) */
8917 proto_tree_add_item(prop_tree
, hf_amqp_header_basic_user_id
,
8918 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
8919 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
8923 if (prop_flags
& 0x8000) {
8924 /* app-id (shortstr) */
8925 proto_tree_add_item(prop_tree
, hf_amqp_header_basic_app_id
,
8926 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
8927 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
8931 if (prop_flags
& 0x8000) {
8932 /* cluster-id (shortstr) */
8933 proto_tree_add_item(prop_tree
, hf_amqp_header_basic_cluster_id
,
8934 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
8935 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
8937 /*prop_flags <<= 1;*/
8941 /* Dissection routine for content headers of class file */
8944 dissect_amqp_0_9_content_header_file(tvbuff_t
*tvb
, packet_info
*pinfo
,
8945 int offset
, proto_tree
*prop_tree
)
8948 uint16_t prop_flags
;
8950 const uint8_t *content
;
8952 prop_flags
= tvb_get_ntohs(tvb
, 19);
8954 if (prop_flags
& 0x8000) {
8955 /* content-type (shortstr) */
8956 proto_tree_add_item_ret_string(prop_tree
, hf_amqp_header_file_content_type
,
8957 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
|ENC_NA
, pinfo
->pool
, &content
);
8958 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "type=%s ", content
);
8959 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
8963 if (prop_flags
& 0x8000) {
8964 /* content-encoding (shortstr) */
8965 proto_tree_add_item(prop_tree
, hf_amqp_header_file_content_encoding
,
8966 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
8967 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
8971 if (prop_flags
& 0x8000) {
8972 /* headers (table) */
8973 ti
= proto_tree_add_item(prop_tree
, hf_amqp_header_file_headers
,
8974 tvb
, offset
+ 4, tvb_get_ntohl(tvb
, offset
), ENC_NA
);
8975 dissect_amqp_0_9_field_table(tvb
, pinfo
, offset
+ 4, tvb_get_ntohl(tvb
, offset
), ti
);
8976 offset
+= 4 + tvb_get_ntohl(tvb
, offset
);
8980 if (prop_flags
& 0x8000) {
8981 /* priority (octet) */
8982 proto_tree_add_item(prop_tree
, hf_amqp_header_file_priority
,
8983 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
8988 if (prop_flags
& 0x8000) {
8989 /* reply-to (shortstr) */
8990 proto_tree_add_item(prop_tree
, hf_amqp_header_file_reply_to
,
8991 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
8992 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
8996 if (prop_flags
& 0x8000) {
8997 /* message-id (shortstr) */
8998 proto_tree_add_item(prop_tree
, hf_amqp_header_file_message_id
,
8999 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
9000 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
9004 if (prop_flags
& 0x8000) {
9005 /* filename (shortstr) */
9006 proto_tree_add_item(prop_tree
, hf_amqp_header_file_filename
,
9007 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
9008 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
9012 if (prop_flags
& 0x8000) {
9013 /* timestamp (timestamp) */
9014 tv
.secs
= (time_t)tvb_get_ntoh64(tvb
, offset
);
9016 proto_tree_add_time(prop_tree
, hf_amqp_header_file_timestamp
,
9017 tvb
, offset
, 8, &tv
);
9022 if (prop_flags
& 0x8000) {
9023 /* cluster-id (shortstr) */
9024 proto_tree_add_item(prop_tree
, hf_amqp_header_file_cluster_id
,
9025 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
9026 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
9028 /*prop_flags <<= 1;*/
9032 /* Dissection routine for content headers of class stream */
9035 dissect_amqp_0_9_content_header_stream(tvbuff_t
*tvb
, packet_info
*pinfo
,
9036 int offset
, proto_tree
*prop_tree
)
9039 uint16_t prop_flags
;
9041 const uint8_t *content
;
9043 prop_flags
= tvb_get_ntohs(tvb
, 19);
9045 if (prop_flags
& 0x8000) {
9046 /* content-type (shortstr) */
9047 proto_tree_add_item_ret_string(prop_tree
, hf_amqp_header_stream_content_type
,
9048 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
|ENC_NA
, pinfo
->pool
, &content
);
9049 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "type=%s ", content
);
9050 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
9054 if (prop_flags
& 0x8000) {
9055 /* content-encoding (shortstr) */
9056 proto_tree_add_item(prop_tree
, hf_amqp_header_stream_content_encoding
,
9057 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
9058 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
9062 if (prop_flags
& 0x8000) {
9063 /* headers (table) */
9064 ti
= proto_tree_add_item(prop_tree
, hf_amqp_header_stream_headers
,
9065 tvb
, offset
+ 4, tvb_get_ntohl(tvb
, offset
), ENC_NA
);
9066 dissect_amqp_0_9_field_table(tvb
, pinfo
, offset
+ 4, tvb_get_ntohl(tvb
, offset
), ti
);
9067 offset
+= 4 + tvb_get_ntohl(tvb
, offset
);
9071 if (prop_flags
& 0x8000) {
9072 /* priority (octet) */
9073 proto_tree_add_item(prop_tree
, hf_amqp_header_stream_priority
,
9074 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
9079 if (prop_flags
& 0x8000) {
9080 /* timestamp (timestamp) */
9081 tv
.secs
= (time_t)tvb_get_ntoh64(tvb
, offset
);
9083 proto_tree_add_time(prop_tree
, hf_amqp_header_stream_timestamp
,
9084 tvb
, offset
, 8, &tv
);
9087 /*prop_flags <<= 1;*/
9092 /* Dissection routine for content headers of class tunnel */
9095 dissect_amqp_0_9_content_header_tunnel(tvbuff_t
*tvb
, packet_info
*pinfo
,
9096 int offset
, proto_tree
*prop_tree
)
9099 uint16_t prop_flags
;
9101 prop_flags
= tvb_get_ntohs(tvb
, 19);
9103 if (prop_flags
& 0x8000) {
9104 /* headers (table) */
9105 ti
= proto_tree_add_item(prop_tree
, hf_amqp_header_tunnel_headers
,
9106 tvb
, offset
+ 4, tvb_get_ntohl(tvb
, offset
), ENC_NA
);
9107 dissect_amqp_0_9_field_table(tvb
, pinfo
, offset
+ 4, tvb_get_ntohl(tvb
, offset
), ti
);
9108 offset
+= 4 + tvb_get_ntohl(tvb
, offset
);
9112 if (prop_flags
& 0x8000) {
9113 /* proxy-name (shortstr) */
9114 proto_tree_add_item(prop_tree
, hf_amqp_header_tunnel_proxy_name
,
9115 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
9116 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
9120 if (prop_flags
& 0x8000) {
9121 /* data-name (shortstr) */
9122 proto_tree_add_item(prop_tree
, hf_amqp_header_tunnel_data_name
,
9123 tvb
, offset
+ 1, tvb_get_uint8(tvb
, offset
), ENC_ASCII
);
9124 offset
+= 1 + tvb_get_uint8(tvb
, offset
);
9128 if (prop_flags
& 0x8000) {
9129 /* durable (octet) */
9130 proto_tree_add_item(prop_tree
, hf_amqp_header_tunnel_durable
,
9131 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
9136 if (prop_flags
& 0x8000) {
9137 /* broadcast (octet) */
9138 proto_tree_add_item(prop_tree
, hf_amqp_header_tunnel_broadcast
,
9139 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
9142 /*prop_flags <<= 1;*/
9147 /* Dissection routine for AMQP 0-9 frames */
9150 dissect_amqp_0_9_frame(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data _U_
)
9153 proto_item
*amqp_tree
= NULL
;
9154 proto_item
*args_tree
;
9155 proto_item
*prop_tree
;
9158 uint16_t channel_num
, class_id
, method_id
;
9160 /* Heuristic - protocol initialisation frame starts with 'AMQP' */
9161 if (tvb_memeql(tvb
, 0, (const uint8_t*)"AMQP", 4) == 0) {
9162 uint8_t proto_id
, proto_major
, proto_minor
;
9164 proto_id
= tvb_get_uint8(tvb
, 5);
9165 proto_major
= tvb_get_uint8(tvb
, 6);
9166 proto_minor
= tvb_get_uint8(tvb
, 7);
9167 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "Protocol-Header %u-%u-%u",
9171 col_set_fence(pinfo
->cinfo
, COL_INFO
);
9174 ti
= proto_tree_add_item(tree
, proto_amqp
, tvb
, 0, -1, ENC_NA
);
9175 amqp_tree
= proto_item_add_subtree(ti
, ett_amqp_init
);
9176 proto_tree_add_item(amqp_tree
, hf_amqp_init_protocol
, tvb
, 0, 4, ENC_ASCII
);
9177 proto_tree_add_item(amqp_tree
, hf_amqp_init_id_major
, tvb
, 4, 1, ENC_BIG_ENDIAN
);
9178 proto_tree_add_item(amqp_tree
, hf_amqp_init_id_minor
, tvb
, 5, 1, ENC_BIG_ENDIAN
);
9179 proto_tree_add_item(amqp_tree
, hf_amqp_init_version_major
, tvb
, 6, 1, ENC_BIG_ENDIAN
);
9180 proto_tree_add_item(amqp_tree
, hf_amqp_init_version_minor
, tvb
, 7, 1, ENC_BIG_ENDIAN
);
9186 ti
= proto_tree_add_item(tree
, proto_amqp
, tvb
, 0, -1, ENC_NA
);
9187 amqp_tree
= proto_item_add_subtree(ti
, ett_amqp
);
9188 proto_tree_add_item(amqp_tree
, hf_amqp_0_9_type
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
9189 proto_tree_add_item(amqp_tree
, hf_amqp_channel
, tvb
, 1, 2, ENC_BIG_ENDIAN
);
9190 proto_tree_add_item(amqp_tree
, hf_amqp_0_9_length
, tvb
, 3, 4, ENC_BIG_ENDIAN
);
9193 frame_type
= tvb_get_uint8(tvb
, 0);
9194 channel_num
= tvb_get_ntohs(tvb
, 1);
9195 length
= tvb_get_ntohl(tvb
, 3);
9197 switch (frame_type
) {
9198 case AMQP_0_9_FRAME_TYPE_METHOD
:
9199 class_id
= tvb_get_ntohs(tvb
, 7);
9200 proto_tree_add_item(amqp_tree
, hf_amqp_0_9_method_class_id
,
9201 tvb
, 7, 2, ENC_BIG_ENDIAN
);
9203 case AMQP_0_9_CLASS_CONNECTION
:
9204 method_id
= tvb_get_ntohs(tvb
, 9);
9205 proto_tree_add_item(amqp_tree
, hf_amqp_method_connection_method_id
,
9206 tvb
, 9, 2, ENC_BIG_ENDIAN
);
9207 ti
= proto_tree_add_item(amqp_tree
, hf_amqp_method_arguments
,
9208 tvb
, 11, length
- 4, ENC_NA
);
9209 args_tree
= proto_item_add_subtree(ti
, ett_args
);
9210 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "Connection.%s ",
9211 val_to_str( method_id
, amqp_method_connection_methods
, "Unknown (%u)"));
9212 switch (method_id
) {
9213 case AMQP_0_9_METHOD_CONNECTION_START
:
9214 dissect_amqp_0_9_method_connection_start(tvb
,
9215 pinfo
, 11, args_tree
);
9217 case AMQP_0_9_METHOD_CONNECTION_START_OK
:
9218 dissect_amqp_0_9_method_connection_start_ok(tvb
,
9219 pinfo
, 11, args_tree
);
9221 case AMQP_0_9_METHOD_CONNECTION_SECURE
:
9222 dissect_amqp_0_9_method_connection_secure(tvb
,
9225 case AMQP_0_9_METHOD_CONNECTION_SECURE_OK
:
9226 dissect_amqp_0_9_method_connection_secure_ok(tvb
,
9229 case AMQP_0_9_METHOD_CONNECTION_TUNE
:
9230 dissect_amqp_0_9_method_connection_tune(tvb
,
9233 case AMQP_0_9_METHOD_CONNECTION_TUNE_OK
:
9234 dissect_amqp_0_9_method_connection_tune_ok(tvb
,
9237 case AMQP_0_9_METHOD_CONNECTION_OPEN
:
9238 dissect_amqp_0_9_method_connection_open(tvb
,
9239 pinfo
, 11, args_tree
);
9241 case AMQP_0_9_METHOD_CONNECTION_OPEN_OK
:
9242 dissect_amqp_0_9_method_connection_open_ok(tvb
,
9245 case AMQP_0_9_METHOD_CONNECTION_REDIRECT
:
9246 dissect_amqp_0_9_method_connection_redirect(tvb
,
9249 case AMQP_0_9_METHOD_CONNECTION_CLOSE
:
9250 dissect_amqp_0_9_method_connection_close(tvb
,
9251 pinfo
, 11, args_tree
);
9253 case AMQP_0_9_METHOD_CONNECTION_CLOSE_OK
:
9254 dissect_amqp_0_9_method_connection_close_ok(tvb
,
9257 case AMQP_0_9_METHOD_CONNECTION_BLOCKED
:
9258 dissect_amqp_0_9_method_connection_blocked(tvb
,
9261 case AMQP_0_9_METHOD_CONNECTION_UNBLOCKED
:
9262 dissect_amqp_0_9_method_connection_unblocked(tvb
,
9266 expert_add_info_format(pinfo
, amqp_tree
, &ei_amqp_unknown_connection_method
, "Unknown connection method %u", method_id
);
9269 case AMQP_0_9_CLASS_CHANNEL
:
9270 method_id
= tvb_get_ntohs(tvb
, 9);
9271 proto_tree_add_item(amqp_tree
, hf_amqp_method_channel_method_id
,
9272 tvb
, 9, 2, ENC_BIG_ENDIAN
);
9273 ti
= proto_tree_add_item(amqp_tree
, hf_amqp_method_arguments
,
9274 tvb
, 11, length
- 4, ENC_NA
);
9275 args_tree
= proto_item_add_subtree(ti
, ett_args
);
9277 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "Channel.%s ",
9278 val_to_str( method_id
, amqp_method_channel_methods
, "Unknown (%u)"));
9280 switch (method_id
) {
9281 case AMQP_0_9_METHOD_CHANNEL_OPEN
:
9282 dissect_amqp_0_9_method_channel_open(tvb
,
9285 case AMQP_0_9_METHOD_CHANNEL_OPEN_OK
:
9286 dissect_amqp_0_9_method_channel_open_ok(tvb
,
9289 case AMQP_0_9_METHOD_CHANNEL_FLOW
:
9290 dissect_amqp_0_9_method_channel_flow(tvb
,
9293 case AMQP_0_9_METHOD_CHANNEL_FLOW_OK
:
9294 dissect_amqp_0_9_method_channel_flow_ok(tvb
,
9297 case AMQP_0_9_METHOD_CHANNEL_CLOSE
:
9298 dissect_amqp_0_9_method_channel_close(channel_num
, tvb
,
9299 pinfo
, 11, args_tree
);
9301 case AMQP_0_9_METHOD_CHANNEL_CLOSE_OK
:
9302 dissect_amqp_0_9_method_channel_close_ok(tvb
,
9305 case AMQP_0_9_METHOD_CHANNEL_RESUME
:
9306 dissect_amqp_0_9_method_channel_resume(tvb
,
9309 case AMQP_0_9_METHOD_CHANNEL_PING
:
9310 dissect_amqp_0_9_method_channel_ping(tvb
,
9313 case AMQP_0_9_METHOD_CHANNEL_PONG
:
9314 dissect_amqp_0_9_method_channel_pong(tvb
,
9317 case AMQP_0_9_METHOD_CHANNEL_OK
:
9318 dissect_amqp_0_9_method_channel_ok(tvb
,
9322 expert_add_info_format(pinfo
, amqp_tree
, &ei_amqp_unknown_channel_method
, "Unknown channel method %u", method_id
);
9325 case AMQP_0_9_CLASS_ACCESS
:
9326 method_id
= tvb_get_ntohs(tvb
, 9);
9327 proto_tree_add_item(amqp_tree
, hf_amqp_method_access_method_id
,
9328 tvb
, 9, 2, ENC_BIG_ENDIAN
);
9329 ti
= proto_tree_add_item(amqp_tree
, hf_amqp_method_arguments
,
9330 tvb
, 11, length
- 4, ENC_NA
);
9331 args_tree
= proto_item_add_subtree(ti
, ett_args
);
9332 switch (method_id
) {
9333 case AMQP_0_9_METHOD_ACCESS_REQUEST
:
9334 dissect_amqp_0_9_method_access_request(tvb
,
9336 col_append_str(pinfo
->cinfo
, COL_INFO
,
9339 case AMQP_0_9_METHOD_ACCESS_REQUEST_OK
:
9340 dissect_amqp_0_9_method_access_request_ok(tvb
,
9342 col_append_str(pinfo
->cinfo
, COL_INFO
,
9343 "Access.Request-Ok ");
9346 expert_add_info_format(pinfo
, amqp_tree
, &ei_amqp_unknown_access_method
, "Unknown access method %u", method_id
);
9349 case AMQP_0_9_CLASS_EXCHANGE
:
9350 method_id
= tvb_get_ntohs(tvb
, 9);
9351 proto_tree_add_item(amqp_tree
, hf_amqp_method_exchange_method_id
,
9352 tvb
, 9, 2, ENC_BIG_ENDIAN
);
9353 ti
= proto_tree_add_item(amqp_tree
, hf_amqp_method_arguments
,
9354 tvb
, 11, length
- 4, ENC_NA
);
9355 args_tree
= proto_item_add_subtree(ti
, ett_args
);
9356 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "Exchange.%s ",
9357 val_to_str( method_id
, amqp_method_exchange_methods
, "Unknown (%u)"));
9358 switch (method_id
) {
9359 case AMQP_0_9_METHOD_EXCHANGE_DECLARE
:
9360 dissect_amqp_0_9_method_exchange_declare(tvb
,
9361 pinfo
, 11, args_tree
);
9363 case AMQP_0_9_METHOD_EXCHANGE_DECLARE_OK
:
9364 dissect_amqp_0_9_method_exchange_declare_ok(tvb
,
9367 case AMQP_0_9_METHOD_EXCHANGE_BIND
:
9368 dissect_amqp_0_9_method_exchange_bind(tvb
,
9369 pinfo
, 11, args_tree
);
9371 case AMQP_0_9_METHOD_EXCHANGE_BIND_OK
:
9372 dissect_amqp_0_9_method_exchange_bind_ok(tvb
,
9375 case AMQP_0_9_METHOD_EXCHANGE_DELETE
:
9376 dissect_amqp_0_9_method_exchange_delete(tvb
,
9377 pinfo
, 11, args_tree
);
9379 case AMQP_0_9_METHOD_EXCHANGE_DELETE_OK
:
9380 dissect_amqp_0_9_method_exchange_delete_ok(tvb
,
9383 case AMQP_0_9_METHOD_EXCHANGE_UNBIND
:
9384 /* the same parameters as in bind */
9385 dissect_amqp_0_9_method_exchange_bind(tvb
,
9386 pinfo
, 11, args_tree
);
9388 case AMQP_0_9_METHOD_EXCHANGE_UNBIND_OK
:
9389 /* the same parameters as in bind-ok */
9390 dissect_amqp_0_9_method_exchange_bind_ok(tvb
,
9394 expert_add_info_format(pinfo
, amqp_tree
, &ei_amqp_unknown_exchange_method
, "Unknown exchange method %u", method_id
);
9397 case AMQP_0_9_CLASS_QUEUE
:
9398 method_id
= tvb_get_ntohs(tvb
, 9);
9399 proto_tree_add_item(amqp_tree
, hf_amqp_method_queue_method_id
,
9400 tvb
, 9, 2, ENC_BIG_ENDIAN
);
9401 ti
= proto_tree_add_item(amqp_tree
, hf_amqp_method_arguments
,
9402 tvb
, 11, length
- 4, ENC_NA
);
9403 args_tree
= proto_item_add_subtree(ti
, ett_args
);
9404 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "Queue.%s ",
9405 val_to_str( method_id
, amqp_method_queue_methods
, "Unknown (%u)"));
9407 switch (method_id
) {
9408 case AMQP_0_9_METHOD_QUEUE_DECLARE
:
9409 dissect_amqp_0_9_method_queue_declare(tvb
,
9410 pinfo
, 11, args_tree
);
9412 case AMQP_0_9_METHOD_QUEUE_DECLARE_OK
:
9413 dissect_amqp_0_9_method_queue_declare_ok(tvb
,
9414 pinfo
, 11, args_tree
);
9416 case AMQP_0_9_METHOD_QUEUE_BIND
:
9417 dissect_amqp_0_9_method_queue_bind(tvb
,
9418 pinfo
, 11, args_tree
);
9420 case AMQP_0_9_METHOD_QUEUE_BIND_OK
:
9421 dissect_amqp_0_9_method_queue_bind_ok(tvb
,
9424 case AMQP_0_9_METHOD_QUEUE_UNBIND
:
9425 dissect_amqp_0_9_method_queue_unbind(tvb
,
9426 pinfo
, 11, args_tree
);
9428 case AMQP_0_9_METHOD_QUEUE_UNBIND_OK
:
9429 dissect_amqp_0_9_method_queue_unbind_ok(tvb
,
9432 case AMQP_0_9_METHOD_QUEUE_PURGE
:
9433 dissect_amqp_0_9_method_queue_purge(tvb
,
9434 pinfo
, 11, args_tree
);
9436 case AMQP_0_9_METHOD_QUEUE_PURGE_OK
:
9437 dissect_amqp_0_9_method_queue_purge_ok(tvb
,
9440 case AMQP_0_9_METHOD_QUEUE_DELETE
:
9441 dissect_amqp_0_9_method_queue_delete(tvb
,
9442 pinfo
, 11, args_tree
);
9444 case AMQP_0_9_METHOD_QUEUE_DELETE_OK
:
9445 dissect_amqp_0_9_method_queue_delete_ok(tvb
,
9449 expert_add_info_format(pinfo
, amqp_tree
, &ei_amqp_unknown_queue_method
, "Unknown queue method %u", method_id
);
9452 case AMQP_0_9_CLASS_BASIC
:
9453 method_id
= tvb_get_ntohs(tvb
, 9);
9454 proto_tree_add_item(amqp_tree
, hf_amqp_method_basic_method_id
,
9455 tvb
, 9, 2, ENC_BIG_ENDIAN
);
9456 ti
= proto_tree_add_item(amqp_tree
, hf_amqp_method_arguments
,
9457 tvb
, 11, length
- 4, ENC_NA
);
9458 args_tree
= proto_item_add_subtree(ti
, ett_args
);
9460 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "Basic.%s ",
9461 val_to_str( method_id
, amqp_method_basic_methods
, "Unknown (%u)"));
9463 switch (method_id
) {
9464 case AMQP_0_9_METHOD_BASIC_QOS
:
9465 dissect_amqp_0_9_method_basic_qos(tvb
,
9468 case AMQP_0_9_METHOD_BASIC_QOS_OK
:
9469 dissect_amqp_0_9_method_basic_qos_ok(tvb
,
9472 case AMQP_0_9_METHOD_BASIC_CONSUME
:
9473 dissect_amqp_0_9_method_basic_consume(tvb
,
9474 pinfo
, 11, args_tree
);
9476 case AMQP_0_9_METHOD_BASIC_CONSUME_OK
:
9477 dissect_amqp_0_9_method_basic_consume_ok(tvb
,
9480 case AMQP_0_9_METHOD_BASIC_CANCEL
:
9481 dissect_amqp_0_9_method_basic_cancel(tvb
,
9484 case AMQP_0_9_METHOD_BASIC_CANCEL_OK
:
9485 dissect_amqp_0_9_method_basic_cancel_ok(tvb
,
9488 case AMQP_0_9_METHOD_BASIC_PUBLISH
:
9489 dissect_amqp_0_9_method_basic_publish(channel_num
, tvb
,
9490 pinfo
, 11, args_tree
);
9491 generate_ack_reference(tvb
, pinfo
, amqp_tree
);
9493 case AMQP_0_9_METHOD_BASIC_RETURN
:
9494 dissect_amqp_0_9_method_basic_return(tvb
,
9495 pinfo
, 11, args_tree
);
9497 case AMQP_0_9_METHOD_BASIC_DELIVER
:
9498 dissect_amqp_0_9_method_basic_deliver(channel_num
, tvb
,
9499 pinfo
, 11, args_tree
);
9500 generate_ack_reference(tvb
, pinfo
, amqp_tree
);
9502 case AMQP_0_9_METHOD_BASIC_GET
:
9503 dissect_amqp_0_9_method_basic_get(tvb
,
9504 pinfo
, 11, args_tree
);
9506 case AMQP_0_9_METHOD_BASIC_GET_OK
:
9507 dissect_amqp_0_9_method_basic_get_ok(channel_num
, tvb
,
9508 pinfo
, 11, args_tree
);
9509 generate_ack_reference(tvb
, pinfo
, amqp_tree
);
9511 case AMQP_0_9_METHOD_BASIC_GET_EMPTY
:
9512 dissect_amqp_0_9_method_basic_get_empty(tvb
,
9515 case AMQP_0_9_METHOD_BASIC_ACK
:
9516 dissect_amqp_0_9_method_basic_ack(channel_num
, tvb
,
9517 pinfo
, 11, args_tree
);
9518 generate_msg_reference(tvb
, pinfo
, amqp_tree
);
9520 case AMQP_0_9_METHOD_BASIC_REJECT
:
9521 dissect_amqp_0_9_method_basic_reject(channel_num
, tvb
,
9522 pinfo
, 11, args_tree
);
9523 generate_msg_reference(tvb
, pinfo
, amqp_tree
);
9525 case AMQP_0_9_METHOD_BASIC_RECOVER_ASYNC
:
9526 dissect_amqp_0_9_method_basic_recover_async(tvb
,
9529 case AMQP_0_9_METHOD_BASIC_RECOVER
:
9530 dissect_amqp_0_9_method_basic_recover(tvb
,
9533 case AMQP_0_9_METHOD_BASIC_RECOVER_OK
:
9534 dissect_amqp_0_9_method_basic_recover_ok(tvb
,
9537 case AMQP_0_9_METHOD_BASIC_NACK
:
9538 dissect_amqp_0_9_method_basic_nack(channel_num
, tvb
,
9539 pinfo
, 11, args_tree
);
9540 generate_msg_reference(tvb
, pinfo
, amqp_tree
);
9543 expert_add_info_format(pinfo
, amqp_tree
, &ei_amqp_unknown_basic_method
, "Unknown basic method %u", method_id
);
9546 case AMQP_0_9_CLASS_FILE
:
9547 method_id
= tvb_get_ntohs(tvb
, 9);
9548 proto_tree_add_item(amqp_tree
, hf_amqp_method_file_method_id
,
9549 tvb
, 9, 2, ENC_BIG_ENDIAN
);
9550 ti
= proto_tree_add_item(amqp_tree
, hf_amqp_method_arguments
,
9551 tvb
, 11, length
- 4, ENC_NA
);
9552 args_tree
= proto_item_add_subtree(ti
, ett_args
);
9554 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "File.%s ",
9555 val_to_str( method_id
, amqp_method_file_methods
, "Unknown (%u)"));
9557 switch (method_id
) {
9558 case AMQP_0_9_METHOD_FILE_QOS
:
9559 dissect_amqp_0_9_method_file_qos(tvb
,
9562 case AMQP_0_9_METHOD_FILE_QOS_OK
:
9563 dissect_amqp_0_9_method_file_qos_ok(tvb
,
9566 case AMQP_0_9_METHOD_FILE_CONSUME
:
9567 dissect_amqp_0_9_method_file_consume(tvb
,
9568 pinfo
, 11, args_tree
);
9570 case AMQP_0_9_METHOD_FILE_CONSUME_OK
:
9571 dissect_amqp_0_9_method_file_consume_ok(tvb
,
9574 case AMQP_0_9_METHOD_FILE_CANCEL
:
9575 dissect_amqp_0_9_method_file_cancel(tvb
,
9578 case AMQP_0_9_METHOD_FILE_CANCEL_OK
:
9579 dissect_amqp_0_9_method_file_cancel_ok(tvb
,
9582 case AMQP_0_9_METHOD_FILE_OPEN
:
9583 dissect_amqp_0_9_method_file_open(tvb
,
9586 case AMQP_0_9_METHOD_FILE_OPEN_OK
:
9587 dissect_amqp_0_9_method_file_open_ok(tvb
,
9590 case AMQP_0_9_METHOD_FILE_STAGE
:
9591 dissect_amqp_0_9_method_file_stage(tvb
,
9594 case AMQP_0_9_METHOD_FILE_PUBLISH
:
9595 dissect_amqp_0_9_method_file_publish(tvb
,
9598 case AMQP_0_9_METHOD_FILE_RETURN
:
9599 dissect_amqp_0_9_method_file_return(tvb
,
9602 case AMQP_0_9_METHOD_FILE_DELIVER
:
9603 dissect_amqp_0_9_method_file_deliver(tvb
,
9606 case AMQP_0_9_METHOD_FILE_ACK
:
9607 dissect_amqp_0_9_method_file_ack(tvb
,
9610 case AMQP_0_9_METHOD_FILE_REJECT
:
9611 dissect_amqp_0_9_method_file_reject(tvb
,
9615 expert_add_info_format(pinfo
, amqp_tree
, &ei_amqp_unknown_file_method
, "Unknown file method %u", method_id
);
9618 case AMQP_0_9_CLASS_STREAM
:
9619 method_id
= tvb_get_ntohs(tvb
, 9);
9620 proto_tree_add_item(amqp_tree
, hf_amqp_method_stream_method_id
,
9621 tvb
, 9, 2, ENC_BIG_ENDIAN
);
9622 ti
= proto_tree_add_item(amqp_tree
, hf_amqp_method_arguments
,
9623 tvb
, 11, length
- 4, ENC_NA
);
9624 args_tree
= proto_item_add_subtree(ti
, ett_args
);
9626 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "Stream.%s ",
9627 val_to_str( method_id
, amqp_method_stream_methods
, "Unknown (%u)"));
9629 switch (method_id
) {
9630 case AMQP_0_9_METHOD_STREAM_QOS
:
9631 dissect_amqp_0_9_method_stream_qos(tvb
,
9634 case AMQP_0_9_METHOD_STREAM_QOS_OK
:
9635 dissect_amqp_0_9_method_stream_qos_ok(tvb
,
9638 case AMQP_0_9_METHOD_STREAM_CONSUME
:
9639 dissect_amqp_0_9_method_stream_consume(tvb
,
9640 pinfo
, 11, args_tree
);
9642 case AMQP_0_9_METHOD_STREAM_CONSUME_OK
:
9643 dissect_amqp_0_9_method_stream_consume_ok(tvb
,
9646 case AMQP_0_9_METHOD_STREAM_CANCEL
:
9647 dissect_amqp_0_9_method_stream_cancel(tvb
,
9650 case AMQP_0_9_METHOD_STREAM_CANCEL_OK
:
9651 dissect_amqp_0_9_method_stream_cancel_ok(tvb
,
9654 case AMQP_0_9_METHOD_STREAM_PUBLISH
:
9655 dissect_amqp_0_9_method_stream_publish(tvb
,
9658 case AMQP_0_9_METHOD_STREAM_RETURN
:
9659 dissect_amqp_0_9_method_stream_return(tvb
,
9662 case AMQP_0_9_METHOD_STREAM_DELIVER
:
9663 dissect_amqp_0_9_method_stream_deliver(tvb
,
9667 expert_add_info_format(pinfo
, amqp_tree
, &ei_amqp_unknown_stream_method
, "Unknown stream method %u", method_id
);
9670 case AMQP_0_9_CLASS_TX
:
9671 method_id
= tvb_get_ntohs(tvb
, 9);
9672 proto_tree_add_item(amqp_tree
, hf_amqp_method_tx_method_id
,
9673 tvb
, 9, 2, ENC_BIG_ENDIAN
);
9674 ti
= proto_tree_add_item(amqp_tree
, hf_amqp_method_arguments
,
9675 tvb
, 11, length
- 4, ENC_NA
);
9676 args_tree
= proto_item_add_subtree(ti
, ett_args
);
9678 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "Tx.%s ",
9679 val_to_str( method_id
, amqp_method_tx_methods
, "Unknown (%u)"));
9681 switch (method_id
) {
9682 case AMQP_0_9_METHOD_TX_SELECT
:
9683 dissect_amqp_0_9_method_tx_select(tvb
,
9686 case AMQP_0_9_METHOD_TX_SELECT_OK
:
9687 dissect_amqp_0_9_method_tx_select_ok(tvb
,
9690 case AMQP_0_9_METHOD_TX_COMMIT
:
9691 dissect_amqp_0_9_method_tx_commit(tvb
,
9694 case AMQP_0_9_METHOD_TX_COMMIT_OK
:
9695 dissect_amqp_0_9_method_tx_commit_ok(tvb
,
9698 case AMQP_0_9_METHOD_TX_ROLLBACK
:
9699 dissect_amqp_0_9_method_tx_rollback(tvb
,
9702 case AMQP_0_9_METHOD_TX_ROLLBACK_OK
:
9703 dissect_amqp_0_9_method_tx_rollback_ok(tvb
,
9707 expert_add_info_format(pinfo
, amqp_tree
, &ei_amqp_unknown_tx_method
, "Unknown tx method %u", method_id
);
9710 case AMQP_0_9_CLASS_DTX
:
9711 method_id
= tvb_get_ntohs(tvb
, 9);
9712 proto_tree_add_item(amqp_tree
, hf_amqp_method_dtx_method_id
,
9713 tvb
, 9, 2, ENC_BIG_ENDIAN
);
9714 ti
= proto_tree_add_item(amqp_tree
, hf_amqp_method_arguments
,
9715 tvb
, 11, length
- 4, ENC_NA
);
9716 args_tree
= proto_item_add_subtree(ti
, ett_args
);
9718 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "Dtx.%s ",
9719 val_to_str( method_id
, amqp_method_dtx_methods
, "Unknown (%u)"));
9721 switch (method_id
) {
9722 case AMQP_0_9_METHOD_DTX_SELECT
:
9723 dissect_amqp_0_9_method_dtx_select(tvb
,
9726 case AMQP_0_9_METHOD_DTX_SELECT_OK
:
9727 dissect_amqp_0_9_method_dtx_select_ok(tvb
,
9730 case AMQP_0_9_METHOD_DTX_START
:
9731 dissect_amqp_0_9_method_dtx_start(tvb
,
9734 case AMQP_0_9_METHOD_DTX_START_OK
:
9735 dissect_amqp_0_9_method_dtx_start_ok(tvb
,
9739 expert_add_info_format(pinfo
, amqp_tree
, &ei_amqp_unknown_dtx_method
, "Unknown dtx method %u", method_id
);
9742 case AMQP_0_9_CLASS_TUNNEL
:
9743 method_id
= tvb_get_ntohs(tvb
, 9);
9744 proto_tree_add_item(amqp_tree
, hf_amqp_method_tunnel_method_id
,
9745 tvb
, 9, 2, ENC_BIG_ENDIAN
);
9746 ti
= proto_tree_add_item(amqp_tree
, hf_amqp_method_arguments
,
9747 tvb
, 11, length
- 4, ENC_NA
);
9748 args_tree
= proto_item_add_subtree(ti
, ett_args
);
9749 switch (method_id
) {
9750 case AMQP_0_9_METHOD_TUNNEL_REQUEST
:
9751 dissect_amqp_0_9_method_tunnel_request(tvb
,
9752 pinfo
, 11, args_tree
);
9753 col_append_str(pinfo
->cinfo
, COL_INFO
,
9757 expert_add_info_format(pinfo
, amqp_tree
, &ei_amqp_unknown_tunnel_method
, "Unknown tunnel method %u", method_id
);
9760 case AMQP_0_9_CLASS_CONFIRM
:
9761 method_id
= tvb_get_ntohs(tvb
, 9);
9762 proto_tree_add_item(amqp_tree
, hf_amqp_method_confirm_method_id
,
9763 tvb
, 9, 2, ENC_BIG_ENDIAN
);
9764 ti
= proto_tree_add_item(amqp_tree
, hf_amqp_method_arguments
,
9765 tvb
, 11, length
- 4, ENC_NA
);
9766 args_tree
= proto_item_add_subtree(ti
, ett_args
);
9767 switch (method_id
) {
9768 case AMQP_0_9_METHOD_CONFIRM_SELECT
:
9769 dissect_amqp_0_9_method_confirm_select(tvb
,
9771 col_append_str(pinfo
->cinfo
, COL_INFO
,
9774 case AMQP_0_9_METHOD_CONFIRM_SELECT_OK
:
9775 dissect_amqp_0_9_method_confirm_select_ok(channel_num
, tvb
, pinfo
,
9777 col_append_str(pinfo
->cinfo
, COL_INFO
,
9778 "Confirm.Select-Ok ");
9781 expert_add_info_format(pinfo
, amqp_tree
, &ei_amqp_unknown_confirm_method
, "Unknown confirm method %u", method_id
);
9785 expert_add_info_format(pinfo
, amqp_tree
, &ei_amqp_unknown_method_class
, "Unknown method class %u", class_id
);
9788 case AMQP_0_9_FRAME_TYPE_CONTENT_HEADER
:
9789 class_id
= tvb_get_ntohs(tvb
, 7);
9790 proto_tree_add_item(amqp_tree
, hf_amqp_header_class_id
,
9791 tvb
, 7, 2, ENC_BIG_ENDIAN
);
9792 proto_tree_add_item(amqp_tree
, hf_amqp_header_weight
,
9793 tvb
, 9, 2, ENC_BIG_ENDIAN
);
9794 proto_tree_add_item(amqp_tree
, hf_amqp_header_body_size
,
9795 tvb
, 11, 8, ENC_BIG_ENDIAN
);
9796 proto_tree_add_item(amqp_tree
, hf_amqp_header_property_flags
,
9797 tvb
, 19, 2, ENC_BIG_ENDIAN
);
9798 ti
= proto_tree_add_item(amqp_tree
, hf_amqp_header_properties
,
9799 tvb
, 21, length
- 14, ENC_NA
);
9800 prop_tree
= proto_item_add_subtree(ti
, ett_props
);
9801 col_append_str(pinfo
->cinfo
, COL_INFO
, "Content-Header ");
9803 case AMQP_0_9_CLASS_BASIC
: {
9804 amqp_channel_t
*channel
;
9805 channel
= get_conversation_channel(find_or_create_conversation(pinfo
), channel_num
);
9806 channel
->content_params
= wmem_new0(wmem_file_scope(), amqp_content_params
);
9808 dissect_amqp_0_9_content_header_basic(tvb
,
9809 pinfo
, 21, prop_tree
, channel
->content_params
);
9812 case AMQP_0_9_CLASS_FILE
:
9813 dissect_amqp_0_9_content_header_file(tvb
,
9814 pinfo
, 21, prop_tree
);
9816 case AMQP_0_9_CLASS_STREAM
:
9817 dissect_amqp_0_9_content_header_stream(tvb
,
9818 pinfo
, 21, prop_tree
);
9820 case AMQP_0_9_CLASS_TUNNEL
:
9821 dissect_amqp_0_9_content_header_tunnel(tvb
,
9822 pinfo
, 21, prop_tree
);
9825 expert_add_info_format(pinfo
, amqp_tree
, &ei_amqp_unknown_header_class
, "Unknown header class %u", class_id
);
9828 case AMQP_0_9_FRAME_TYPE_CONTENT_BODY
:
9829 proto_tree_add_item(amqp_tree
, hf_amqp_payload
,
9830 tvb
, 7, length
, ENC_NA
);
9831 col_append_str(pinfo
->cinfo
, COL_INFO
, "Content-Body ");
9833 /* try to find dissector for content */
9834 amqp_channel_t
*channel
;
9836 amqp_content_params
*content_params
;
9838 channel
= get_conversation_channel(find_or_create_conversation(pinfo
), channel_num
);
9839 content_params
= channel
->content_params
;
9841 if (content_params
!= NULL
&& content_params
->type
!= NULL
) {
9842 body_tvb
= tvb_new_subset_length(tvb
, 7, length
);
9843 dissector_try_string_with_data(media_type_subdissector_table
, content_params
->type
, body_tvb
, pinfo
, amqp_tree
, true, NULL
);
9846 case AMQP_0_9_FRAME_TYPE_HEARTBEAT
:
9847 col_append_str(pinfo
->cinfo
, COL_INFO
,
9851 expert_add_info_format(pinfo
, amqp_tree
, &ei_amqp_unknown_frame_type
, "Unknown frame type %u", frame_type
);
9854 col_set_fence(pinfo
->cinfo
, COL_INFO
);
9855 return tvb_reported_length(tvb
);
9858 static amqp_channel_t
*
9859 get_conversation_channel(conversation_t
*conv
, uint16_t channel_num
)
9862 amqp_channel_t
*channel
;
9864 /* the amqp_conv structure was already created to record the AMQP version */
9865 conn
= (amqp_conv
*)conversation_get_proto_data(conv
, proto_amqp
);
9869 channel
= (amqp_channel_t
*)wmem_map_lookup(conn
->channels
, GUINT_TO_POINTER((uint32_t)channel_num
));
9872 channel
= wmem_new0(wmem_file_scope(), amqp_channel_t
);
9873 channel
->conn
= conn
;
9874 channel
->channel_num
= channel_num
;
9875 wmem_map_insert(conn
->channels
, GUINT_TO_POINTER((uint32_t)channel_num
), channel
);
9882 record_msg_delivery(tvbuff_t
*tvb
, packet_info
*pinfo
, uint16_t channel_num
,
9883 uint64_t delivery_tag
)
9885 conversation_t
*conv
;
9886 amqp_channel_t
*channel
;
9888 conv
= find_or_create_conversation(pinfo
);
9889 channel
= get_conversation_channel(conv
, channel_num
);
9890 record_msg_delivery_c(conv
, channel
, tvb
, pinfo
, delivery_tag
);
9894 record_msg_delivery_c(conversation_t
*conv
, amqp_channel_t
*channel
,
9895 tvbuff_t
*tvb
, packet_info
*pinfo
, uint64_t delivery_tag
)
9897 struct tcp_analysis
*tcpd
;
9898 amqp_delivery
**dptr
;
9899 amqp_delivery
*delivery
;
9901 tcpd
= get_tcp_conversation_data(conv
, pinfo
);
9902 /* separate messages sent in each direction */
9903 dptr
= tcpd
->fwd
== &(tcpd
->flow1
) ? &channel
->last_delivery1
: &channel
->last_delivery2
;
9905 delivery
= wmem_new0(wmem_file_scope(), amqp_delivery
);
9906 delivery
->delivery_tag
= delivery_tag
;
9907 delivery
->msg_framenum
= pinfo
->num
;
9908 /* append to the list of unacked deliveries */
9909 delivery
->prev
= (*dptr
);
9912 p_add_proto_data(pinfo
->pool
, pinfo
, proto_amqp
, (uint32_t)tvb_raw_offset(tvb
), delivery
);
9916 record_delivery_ack(tvbuff_t
*tvb
, packet_info
*pinfo
, uint16_t channel_num
,
9917 uint64_t delivery_tag
, bool multiple
)
9919 conversation_t
*conv
;
9920 amqp_channel_t
*channel
;
9922 conv
= find_or_create_conversation(pinfo
);
9923 channel
= get_conversation_channel(conv
, channel_num
);
9924 record_delivery_ack_c(conv
, channel
, tvb
, pinfo
, delivery_tag
, multiple
);
9928 record_delivery_ack_c(conversation_t
*conv
, amqp_channel_t
*channel
,
9929 tvbuff_t
*tvb
, packet_info
*pinfo
, uint64_t delivery_tag
, bool multiple
)
9931 struct tcp_analysis
*tcpd
;
9932 amqp_delivery
**dptr
;
9933 amqp_delivery
*last_acked
= NULL
;
9935 tcpd
= get_tcp_conversation_data(conv
, pinfo
);
9936 /* the basic.ack may be sent in both directions, but always opposite
9937 * to the basic.publish or basic.deliver */
9938 dptr
= tcpd
->rev
== &(tcpd
->flow1
) ? &channel
->last_delivery1
: &channel
->last_delivery2
;
9941 if((*dptr
)->delivery_tag
== delivery_tag
)
9945 amqp_delivery
*delivery
= (*dptr
);
9946 *dptr
= delivery
->prev
; /* remove from the list of unacked */
9948 delivery
->ack_framenum
= pinfo
->num
;
9949 /* append to the list of acked deliveries */
9950 delivery
->prev
= last_acked
;
9951 last_acked
= delivery
;
9953 while(multiple
&& *dptr
);
9956 dptr
= &(*dptr
)->prev
; /* goto next */
9959 p_add_proto_data(pinfo
->pool
, pinfo
, proto_amqp
,
9960 (uint32_t)tvb_raw_offset(tvb
), last_acked
);
9964 generate_msg_reference(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*amqp_tree
)
9966 amqp_delivery
*delivery
;
9969 delivery
= (amqp_delivery
*)p_get_proto_data(pinfo
->pool
, pinfo
, proto_amqp
,
9970 (uint32_t)tvb_raw_offset(tvb
));
9971 while(delivery
!= NULL
)
9973 if(delivery
->msg_framenum
)
9975 pi
= proto_tree_add_uint(amqp_tree
, hf_amqp_message_in
,
9976 tvb
, 0, 0, delivery
->msg_framenum
);
9977 proto_item_set_generated(pi
);
9980 delivery
= delivery
->prev
;
9985 generate_ack_reference(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*amqp_tree
)
9987 amqp_delivery
*delivery
;
9989 delivery
= (amqp_delivery
*)p_get_proto_data(pinfo
->pool
, pinfo
, proto_amqp
,
9990 (uint32_t)tvb_raw_offset(tvb
));
9991 if(delivery
&& delivery
->ack_framenum
)
9995 pi
= proto_tree_add_uint(amqp_tree
, hf_amqp_ack_in
, tvb
, 0, 0, delivery
->ack_framenum
);
9996 proto_item_set_generated(pi
);
10001 /* AMQP 1.0 Type Decoders */
10003 static const struct amqp1_typeinfo
* decode_fixed_type(uint8_t code
)
10007 for (i
= 0; amqp_1_0_fixed_types
[i
].typecode
!= 0xff; ++i
) {
10008 if (amqp_1_0_fixed_types
[i
].typecode
== code
)
10009 return &amqp_1_0_fixed_types
[i
];
10014 /* For given code, the routine decodes its value, format & print output.
10015 * If the code is compound type (array,list,map), it calls relevant
10016 * dissect_* routines for decoding its items
10018 * tvb, pinfo, code, offset, bound: obvious
10019 * hf_amqp_type: what hf_* variable corresponds to type of the code
10020 * name: name of type of this code (applicable to map items and type descriptor
10021 * hf_amqp_subtype_count: for format code to be list, expected number of list items
10022 * hf_amqp_subtypes: for format code to be list, field of hf_* variables of list items
10023 * length_size: decoded length
10026 // NOLINTNEXTLINE(misc-no-recursion)
10027 get_amqp_1_0_value_formatter(tvbuff_t
*tvb
,
10028 packet_info
*pinfo
,
10033 uint32_t hf_amqp_subtype_count
,
10034 int * const *hf_amqp_subtypes
,
10035 unsigned *length_size
,
10038 const struct amqp1_typeinfo
* element_type
;
10039 const char *value
= NULL
;
10041 increment_dissection_depth(pinfo
);
10042 element_type
= decode_fixed_type(code
);
10045 const struct amqp_synonym_types_t
*synonyms
;
10046 int shift_view
= 0;
10048 /* some AMQP fields can be of several types; by default we use FT_NONE,
10049 * but to enable filtering we try to find a field corresponding to
10050 * the actual type */
10051 if (proto_registrar_get_ftype(hf_amqp_type
) == FT_NONE
)
10053 for (synonyms
= amqp_synonym_types
; synonyms
->hf_none
!= NULL
; synonyms
++)
10055 if (*(synonyms
->hf_none
) == hf_amqp_type
)
10057 if (FT_IS_UINT(element_type
->ftype
) && synonyms
->hf_uint
!= NULL
)
10058 hf_amqp_type
= *(synonyms
->hf_uint
);
10059 else if (FT_IS_STRING(element_type
->ftype
) && synonyms
->hf_str
!= NULL
)
10060 hf_amqp_type
= *(synonyms
->hf_str
);
10061 else if (element_type
->ftype
== FT_BYTES
&& synonyms
->hf_bin
!= NULL
)
10062 hf_amqp_type
= *(synonyms
->hf_bin
);
10063 else if (element_type
->ftype
== FT_GUID
&& synonyms
->hf_guid
!= NULL
)
10064 hf_amqp_type
= *(synonyms
->hf_guid
);
10070 if (proto_registrar_get_ftype(hf_amqp_type
) != FT_NONE
)
10072 /* we know the field as well its type, use native dissectors */
10073 *length_size
= element_type
->dissector(tvb
, pinfo
,
10075 element_type
->known_size
,
10076 item
, hf_amqp_type
);
10078 else if(code
== AMQP_1_0_TYPE_NULL
)
10080 /* null value says that a particular field was optional and is omitted
10081 * the omitted fields of standard structures are not shown
10082 * however, we still display null values of custom lists, maps and arrays */
10084 if(hf_amqp_type
== hf_amqp_1_0_list
)
10086 proto_tree_add_none_format(item
, hf_amqp_type
,
10091 name
? name
: proto_registrar_get_name(hf_amqp_type
));
10096 /* multi-type and custom fields must be converted to a string */
10097 *length_size
= element_type
->formatter(tvb
, offset
, element_type
->known_size
, &value
);
10099 if (code
/16 > 0x9) /* variable width code is 0xa[0-9] or 0xb[0-9] */
10100 /* shift to right to skip the variable length indicator */
10101 shift_view
= element_type
->known_size
;
10102 else if(*length_size
== 0)
10103 /* shift to left to show at least the type code */
10106 proto_tree_add_none_format(item
, hf_amqp_type
,
10109 (*length_size
)-shift_view
,
10111 name
? name
: proto_registrar_get_name(hf_amqp_type
),
10112 element_type
->amqp_typename
, value
);
10115 else { /* no fixed code, i.e. compound (list, map, array) */
10117 case AMQP_1_0_TYPE_LIST0
:
10118 case AMQP_1_0_TYPE_LIST8
:
10119 case AMQP_1_0_TYPE_LIST32
:
10120 *length_size
= dissect_amqp_1_0_list(tvb
,
10122 offset
-1, /* "-1" due to decode type again in the method */
10125 hf_amqp_subtype_count
,
10126 hf_amqp_subtypes
, name
);
10127 if (*length_size
== 0) {
10128 /* something went wrong during list dissection; let's stop here */
10129 *length_size
= tvb_reported_length_remaining(tvb
, offset
);
10131 *length_size
-= 1; /* "-1" due to decode type again in the method */
10134 case AMQP_1_0_TYPE_MAP8
:
10135 case AMQP_1_0_TYPE_MAP32
:
10136 /* "-1" due to decode type again in the method */
10137 *length_size
= dissect_amqp_1_0_map(tvb
, pinfo
, offset
-1, item
, hf_amqp_type
, name
)-1;
10139 case AMQP_1_0_TYPE_ARRAY8
:
10140 case AMQP_1_0_TYPE_ARRAY32
:
10141 *length_size
= dissect_amqp_1_0_array(tvb
,
10143 offset
-1, /* "-1" due to decode type again in the method */
10146 hf_amqp_subtype_count
,
10147 hf_amqp_subtypes
, name
)-1; /* "-1" due to decode type again in the method */
10150 expert_add_info_format(pinfo
,
10152 &ei_amqp_unknown_amqp_type
,
10153 "Unknown AMQP type %d (0x%x) of field \"%s\"",
10155 name
? name
: proto_registrar_get_name(hf_amqp_type
));
10156 *length_size
= tvb_reported_length_remaining(tvb
, offset
); /* to stop dissecting */
10160 decrement_dissection_depth(pinfo
);
10163 /* It decodes 1.0 type, including type constructor
10164 * arguments: see get_amqp_1_0_value_formatter
10165 * return code: decoded format code of primitive type
10168 get_amqp_1_0_type_formatter(tvbuff_t
*tvb
,
10172 uint32_t *hf_amqp_subtype_count
,
10173 int * const **hf_amqp_subtypes
,
10174 unsigned *length_size
)
10178 int format_code_type
;
10179 unsigned format_len
= 0;
10180 unsigned orig_offset
= offset
;
10182 code
= tvb_get_uint8(tvb
, offset
);
10184 if (code
== AMQP_1_0_TYPE_DESCRIPTOR_CONSTRUCTOR
) {
10185 format_code_type
= tvb_get_uint8(tvb
, offset
);
10187 if (format_code_type
%16==0xf) { /* i.e. format codes like %x5F %x00-FF */
10190 switch (format_code_type
/16) {
10191 case 4: /* empty */
10194 case 5: /* fixed-one */
10196 code
= (int)tvb_get_uint8(tvb
, offset
);
10198 case 6: /* fixed-two */
10200 code
= (int)tvb_get_ntohs(tvb
, offset
);
10202 case 7: /* fixed-four */
10204 code
= (int)tvb_get_ntohl(tvb
, offset
);
10206 case 8: /* fixed-eight */
10208 code
= (int)tvb_get_ntoh64(tvb
, offset
);
10209 /* TODO: use a int64_t for 32-bit platforms? we never compare it to
10210 * anything bigger than an int anyways... */
10212 case 9: /* fixed-sixteen */
10214 /* TODO: somehow set code = next_128_bytes */
10216 case 0xa: /* variable-one */
10217 format_len
= format_amqp_1_0_str(tvb
, offset
, 1, name
);
10219 case 0xb: /* variable-four */
10220 format_len
= format_amqp_1_0_str(tvb
, offset
, 4, name
);
10222 /* TODO: could be type compound? or array? */
10224 offset
+= format_len
;
10225 for (i
= 0; amqp_1_0_defined_types
[i
].format_code
!= 0x00; ++i
) {
10226 if (amqp_1_0_defined_types
[i
].format_code
== code
) {
10227 *hf_amqp_type
= *(amqp_1_0_defined_types
[i
].hf_amqp_type
);
10228 *hf_amqp_subtype_count
= amqp_1_0_defined_types
[i
].hf_amqp_subtype_count
;
10229 *hf_amqp_subtypes
= amqp_1_0_defined_types
[i
].hf_amqp_subtypes
;
10233 /* now take the real primitive format code */
10234 code
= tvb_get_uint8(tvb
, offset
);
10237 *length_size
= (offset
-orig_offset
);
10241 /* It decodes both 1.0 type and its value, in fact it just calls
10242 * get_amqp_1_0_type_formatter and get_amqp_1_0_value_formatter methods
10243 * arguments: see get_amqp_1_0_value_formatter
10246 // NOLINTNEXTLINE(misc-no-recursion)
10247 get_amqp_1_0_type_value_formatter(tvbuff_t
*tvb
,
10248 packet_info
*pinfo
,
10250 int hf_amqp_type
, /* what to print in GUI if name==NULL */
10251 const char *name
, /* what to print in GUI */
10252 unsigned *length_size
, /* decoded length */
10256 uint32_t hf_amqp_subtype_count
= 0;
10257 int * const *hf_amqp_subtypes
= NULL
;
10258 const char *type_name
= NULL
;
10259 const char *format_name
= NULL
;
10260 unsigned type_length_size
;
10262 code
= get_amqp_1_0_type_formatter(tvb
,
10266 &hf_amqp_subtype_count
,
10268 &type_length_size
);
10269 if ((name
!= NULL
) || (type_name
!= NULL
))
10271 if (type_name
== NULL
)
10272 format_name
= name
;
10273 else if (name
== NULL
)
10274 format_name
= type_name
;
10277 format_name
= wmem_strdup_printf(pinfo
->pool
, "%s : %s", name
, type_name
);
10280 offset
+= type_length_size
;
10281 get_amqp_1_0_value_formatter(tvb
,
10287 hf_amqp_subtype_count
,
10291 *length_size
+= type_length_size
;
10295 get_amqp_timestamp(nstime_t
*nstime
, tvbuff_t
*tvb
, unsigned offset
)
10299 msec
= tvb_get_ntoh64(tvb
, offset
);
10300 nstime
->secs
= (time_t)(msec
/ 1000);
10301 nstime
->nsecs
= (int)(msec
% 1000)*1000000;
10305 dissect_amqp_1_0_fixed(tvbuff_t
*tvb
, packet_info
*pinfo _U_
,
10306 unsigned offset
, unsigned length
,
10307 proto_item
*item
, int hf_amqp_type
)
10309 proto_tree_add_item(item
, hf_amqp_type
, tvb
, offset
, length
, ENC_BIG_ENDIAN
);
10314 static bool find_data_dissector(tvbuff_t
*msg_tvb
, packet_info
*pinfo
, proto_tree
*item
)
10316 //get amqp to string field
10317 if (item
== NULL
) return false;
10319 GPtrArray
*array
= proto_find_finfo(item
, hf_amqp_1_0_to_str
);
10321 if (array
== NULL
) return false;
10322 if (array
->len
== 0) {
10323 g_ptr_array_free(array
, true);
10327 field_info
*fi
= (field_info
*)array
->pdata
[0];
10328 if (fi
== NULL
|| !FT_IS_STRING(fvalue_type_ftenum(fi
->value
))) {
10329 g_ptr_array_free(array
, true);
10333 const char* msg_to
= fvalue_get_string(fi
->value
);
10335 amqp_message_decode_t
*message_decode_entry
= NULL
;
10336 size_t topic_str_len
;
10337 size_t topic_pattern_len
;
10338 bool match_found
= false;
10340 //compare amqp to string field with uat entries
10341 for (unsigned i
= 0; i
< num_amqp_message_decodes
&& !match_found
; i
++) {
10342 message_decode_entry
= &amqp_message_decodes
[i
];
10343 switch (message_decode_entry
->match_criteria
) {
10345 case MATCH_CRITERIA_EQUAL
:
10346 match_found
= (strcmp(msg_to
, message_decode_entry
->topic_pattern
) == 0);
10349 case MATCH_CRITERIA_CONTAINS
:
10350 match_found
= (strstr(msg_to
, message_decode_entry
->topic_pattern
) != NULL
);
10353 case MATCH_CRITERIA_STARTS_WITH
:
10354 topic_str_len
= strlen(msg_to
);
10355 topic_pattern_len
= strlen(message_decode_entry
->topic_pattern
);
10356 match_found
= ((topic_str_len
>= topic_pattern_len
) &&
10357 (strncmp(msg_to
, message_decode_entry
->topic_pattern
, topic_pattern_len
) == 0));
10360 case MATCH_CRITERIA_ENDS_WITH
:
10361 topic_str_len
= strlen(msg_to
);
10362 topic_pattern_len
= strlen(message_decode_entry
->topic_pattern
);
10363 match_found
= ((topic_str_len
>= topic_pattern_len
) &&
10364 (strcmp(msg_to
+ (topic_str_len
- topic_pattern_len
), message_decode_entry
->topic_pattern
) == 0));
10367 case MATCH_CRITERIA_REGEX
:
10368 if (message_decode_entry
->topic_regex
) {
10369 GMatchInfo
*match_info
= NULL
;
10370 g_regex_match(message_decode_entry
->topic_regex
, msg_to
, (GRegexMatchFlags
) 0, &match_info
);
10371 match_found
= g_match_info_matches(match_info
);
10372 g_match_info_free(match_info
);
10377 /* Unknown match criteria */
10383 call_dissector_with_data(message_decode_entry
->payload_proto
, msg_tvb
, pinfo
, item
, message_decode_entry
->topic_more_info
);
10388 g_ptr_array_free(array
, true);
10390 return match_found
;
10394 dissect_amqp_1_0_variable(tvbuff_t
*tvb
, packet_info
*pinfo
,
10395 unsigned offset
, unsigned length
,
10396 proto_item
*item
, int hf_amqp_type
)
10398 unsigned bin_length
;
10401 bin_length
= tvb_get_uint8(tvb
, offset
);
10402 else if (length
== 4)
10403 bin_length
= tvb_get_ntohl(tvb
, offset
);
10405 expert_add_info_format(pinfo
, item
, &ei_amqp_unknown_amqp_type
,
10406 "Invalid size of length indicator %d!", length
);
10411 bool is_dissected
= false;
10412 if (hf_amqp_type
== hf_amqp_1_0_data
) {
10413 tvbuff_t
*msg_tvb
= tvb_new_subset_length(tvb
, offset
, bin_length
);
10414 is_dissected
= find_data_dissector(msg_tvb
, pinfo
, item
);
10417 if (!is_dissected
) {
10418 proto_tree_add_item(item
, hf_amqp_type
, tvb
, offset
, bin_length
, ENC_NA
);
10420 return length
+bin_length
;
10424 dissect_amqp_1_0_timestamp(tvbuff_t
*tvb
, packet_info
*pinfo _U_
,
10425 unsigned offset
, unsigned length
,
10426 proto_item
*item
, int hf_amqp_type
)
10429 get_amqp_timestamp(&nstime
, tvb
, offset
);
10431 proto_tree_add_time(item
, hf_amqp_type
, tvb
, offset
, length
, &nstime
);
10436 dissect_amqp_1_0_skip(tvbuff_t
*tvb _U_
, packet_info
*pinfo _U_
,
10437 unsigned offset _U_
, unsigned length _U_
,
10438 proto_item
*item _U_
, int hf_amqp_type _U_
)
10440 /* null value means the respective field is omitted */
10445 dissect_amqp_1_0_zero(tvbuff_t
*tvb
, packet_info
*pinfo
,
10446 unsigned offset
, unsigned length _U_
,
10447 proto_item
*item
, int hf_amqp_type
)
10449 switch(proto_registrar_get_ftype(hf_amqp_type
))
10455 proto_tree_add_uint(item
, hf_amqp_type
, tvb
, offset
-1, 1, 0);
10461 proto_tree_add_uint64(item
, hf_amqp_type
, tvb
, offset
-1, 1, 0L);
10467 proto_tree_add_int(item
, hf_amqp_type
, tvb
, offset
-1, 1, 0);
10473 proto_tree_add_int64(item
, hf_amqp_type
, tvb
, offset
-1, 1, 0L);
10476 expert_add_info_format(pinfo
, item
, &ei_amqp_unknown_amqp_type
,
10477 "Unexpected integer at frame position %d to list field \"%s\"",
10479 proto_registrar_get_name(hf_amqp_type
));
10486 dissect_amqp_1_0_true(tvbuff_t
*tvb
, packet_info
*pinfo _U_
,
10487 unsigned offset
, unsigned length _U_
,
10488 proto_item
*item
, int hf_amqp_type
)
10490 proto_tree_add_boolean(item
, hf_amqp_type
, tvb
, offset
-1, 1, true);
10495 dissect_amqp_1_0_false(tvbuff_t
*tvb
, packet_info
*pinfo _U_
,
10496 unsigned offset
, unsigned length _U_
,
10497 proto_item
*item
, int hf_amqp_type
)
10499 proto_tree_add_boolean(item
, hf_amqp_type
, tvb
, offset
-1, 1, false);
10504 format_amqp_1_0_null(tvbuff_t
*tvb _U_
,
10505 unsigned offset _U_
, unsigned length _U_
,
10506 const char **value
)
10513 format_amqp_1_0_boolean_true(tvbuff_t
*tvb _U_
,
10514 unsigned offset _U_
, unsigned length _U_
,
10515 const char **value
)
10517 *value
= wmem_strdup(wmem_packet_scope(), "true");
10522 format_amqp_1_0_boolean_false(tvbuff_t
*tvb _U_
,
10523 unsigned offset _U_
, unsigned length _U_
,
10524 const char **value
)
10526 *value
= wmem_strdup(wmem_packet_scope(), "false");
10531 format_amqp_1_0_boolean(tvbuff_t
*tvb
,
10532 unsigned offset
, unsigned length _U_
,
10533 const char **value
)
10537 val
= tvb_get_uint8(tvb
, offset
);
10538 *value
= wmem_strdup(wmem_packet_scope(), val
? "true" : "false");
10542 /* this covers ubyte, ushort, uint and ulong */
10544 format_amqp_1_0_uint(tvbuff_t
*tvb
,
10545 unsigned offset
, unsigned length
,
10546 const char **value
)
10552 else if (length
== 1)
10553 val
= tvb_get_uint8(tvb
, offset
);
10554 else if (length
== 2)
10555 val
= tvb_get_ntohs(tvb
, offset
);
10556 else if (length
== 4)
10557 val
= tvb_get_ntohl(tvb
, offset
);
10558 else if (length
== 8)
10559 val
= tvb_get_ntoh64(tvb
, offset
);
10561 *value
= wmem_strdup_printf(wmem_packet_scope(), "Invalid uint length %d!", length
);
10564 *value
= wmem_strdup_printf(wmem_packet_scope(), "%" PRIu64
, val
);
10568 /* this covers byte, short, int and long */
10570 format_amqp_1_0_int(tvbuff_t
*tvb
,
10571 unsigned offset
, unsigned length
,
10572 const char **value
)
10577 val
= tvb_get_int8(tvb
, offset
);
10578 else if (length
== 2)
10579 val
= tvb_get_ntohis(tvb
, offset
);
10580 else if (length
== 4)
10581 val
= tvb_get_ntohil(tvb
, offset
);
10582 else if (length
== 8)
10583 val
= tvb_get_ntohi64(tvb
, offset
);
10585 *value
= wmem_strdup_printf(wmem_packet_scope(), "Invalid int length %d!", length
);
10588 *value
= wmem_strdup_printf(wmem_packet_scope(), "%" PRIi64
, val
);
10593 format_amqp_1_0_float(tvbuff_t
*tvb
, unsigned offset
, unsigned length _U_
,
10594 const char **value
)
10597 floatval
= tvb_get_ntohieee_float(tvb
, offset
);
10598 *value
= wmem_strdup_printf(wmem_packet_scope(), "%f", floatval
);
10603 format_amqp_1_0_double(tvbuff_t
*tvb
, unsigned offset
, unsigned length _U_
,
10604 const char **value
)
10607 doubleval
= tvb_get_ntohieee_double(tvb
, offset
);
10608 *value
= wmem_strdup_printf(wmem_packet_scope(), "%f", doubleval
);
10613 format_amqp_1_0_decimal(tvbuff_t
*tvb _U_
, unsigned offset _U_
, unsigned length
,
10614 const char **value
)
10616 /* TODO: this requires the _Decimal32 datatype from ISO/IEC TR 24732
10617 * and corresponding support in printf and glib
10619 *value
= wmem_strdup_printf(wmem_packet_scope(), "(not supported)");
10624 format_amqp_1_0_char(tvbuff_t
*tvb
, unsigned offset
, unsigned length _U_
,
10625 const char **value
)
10627 /* one UTF-32BE encoded Unicode character */
10628 *value
= tvb_get_string_enc(wmem_packet_scope(), tvb
, offset
, 4, ENC_UCS_4
|ENC_BIG_ENDIAN
);
10633 format_amqp_1_0_timestamp(tvbuff_t
*tvb
, unsigned offset
, unsigned length _U_
,
10634 const char **value
)
10637 get_amqp_timestamp(&nstime
, tvb
, offset
);
10639 *value
= abs_time_to_str(wmem_packet_scope(), &nstime
, ABSOLUTE_TIME_UTC
, false);
10644 format_amqp_1_0_uuid(tvbuff_t
*tvb
, unsigned offset
, unsigned length _U_
,
10645 const char **value
)
10648 tvb_get_guid(tvb
, offset
, &uuid
, ENC_BIG_ENDIAN
);
10649 *value
= guid_to_str(wmem_packet_scope(), &uuid
);
10654 format_amqp_1_0_bin(tvbuff_t
*tvb
,
10655 unsigned offset
, unsigned length
,
10656 const char **value
)
10658 unsigned bin_length
;
10661 bin_length
= tvb_get_uint8(tvb
, offset
);
10662 else if (length
== 4)
10663 bin_length
= tvb_get_ntohl(tvb
, offset
);
10665 *value
= wmem_strdup_printf(wmem_packet_scope(), "Invalid binary length size %d!", length
);
10669 *value
= tvb_bytes_to_str(wmem_packet_scope(), tvb
, offset
, bin_length
);
10670 return (length
+bin_length
);
10674 format_amqp_1_0_str(tvbuff_t
*tvb
,
10675 unsigned offset
, unsigned length
,
10676 const char **value
)
10678 unsigned string_length
;
10681 string_length
= tvb_get_uint8(tvb
, offset
);
10682 else if (length
== 4)
10683 string_length
= tvb_get_ntohl(tvb
, offset
);
10685 *value
= wmem_strdup_printf(wmem_packet_scope(), "Invalid string length size %d!", length
);
10689 *value
= tvb_get_string_enc(wmem_packet_scope(), tvb
, offset
, string_length
, ENC_UTF_8
|ENC_NA
);
10690 /* offset += string_length; */
10691 return (string_length
+ length
);
10695 format_amqp_1_0_symbol(tvbuff_t
*tvb
,
10696 unsigned offset
, unsigned length
,
10697 const char **value
)
10699 unsigned symbol_length
;
10701 symbol_length
= tvb_get_uint8(tvb
, offset
);
10702 else if (length
== 4)
10703 symbol_length
= tvb_get_ntohl(tvb
, offset
);
10705 *value
= wmem_strdup_printf(wmem_packet_scope(), "Invalid symbol length size %d!", length
);
10709 *value
= tvb_get_string_enc(wmem_packet_scope(), tvb
, offset
, symbol_length
, ENC_ASCII
|ENC_NA
);
10710 /* offset += symbol_length; */
10711 return (symbol_length
+ length
);
10715 /* AMQP 0-10 Type Decoders */
10718 get_amqp_0_10_type_formatter(uint8_t code
,
10720 type_formatter
*formatter
,
10721 unsigned *length_size
)
10724 const struct amqp_typeinfo
*table
;
10727 table
= amqp_0_10_var_types
;
10729 table
= amqp_0_10_fixed_types
;
10730 for (i
= 0; table
[i
].typecode
!= 0xff; ++i
) {
10731 if (table
[i
].typecode
== code
) {
10732 *name
= wmem_strdup(wmem_packet_scope(), table
[i
].amqp_typename
);
10733 *formatter
= table
[i
].formatter
;
10734 *length_size
= table
[i
].known_size
;
10742 format_amqp_0_10_bin(tvbuff_t
*tvb
,
10743 unsigned offset
, unsigned length
,
10744 const char **value
)
10746 *value
= tvb_bytes_to_str(wmem_packet_scope(), tvb
, offset
, length
);
10751 format_amqp_0_10_int(tvbuff_t
*tvb
,
10752 unsigned offset
, unsigned length
,
10753 const char **value
)
10758 val
= tvb_get_int8(tvb
, offset
);
10759 else if (length
== 2)
10760 val
= tvb_get_ntohis(tvb
, offset
);
10761 else if (length
== 4)
10762 val
= tvb_get_ntohil(tvb
, offset
);
10764 *value
= wmem_strdup_printf(wmem_packet_scope(), "Invalid int length %d!", length
);
10767 *value
= wmem_strdup_printf(wmem_packet_scope(), "%d", val
);
10772 format_amqp_0_10_uint(tvbuff_t
*tvb
,
10773 unsigned offset
, unsigned length
,
10774 const char **value
)
10779 val
= tvb_get_uint8(tvb
, offset
);
10780 else if (length
== 2)
10781 val
= tvb_get_ntohs(tvb
, offset
);
10782 else if (length
== 4)
10783 val
= tvb_get_ntohl(tvb
, offset
);
10785 *value
= wmem_strdup_printf(wmem_packet_scope(), "Invalid uint length %d!", length
);
10788 *value
= wmem_strdup_printf(wmem_packet_scope(), "%u", val
);
10793 format_amqp_0_10_char(tvbuff_t
*tvb
,
10794 unsigned offset
, unsigned length _U_
,
10795 const char **value
)
10797 *value
= tvb_format_text(wmem_packet_scope(), tvb
, offset
, 1);
10802 format_amqp_0_10_boolean(tvbuff_t
*tvb
,
10803 unsigned offset
, unsigned length _U_
,
10804 const char **value
)
10808 val
= tvb_get_uint8(tvb
, offset
);
10809 *value
= wmem_strdup(wmem_packet_scope(), val
? "true" : "false");
10814 format_amqp_0_10_vbin(tvbuff_t
*tvb
,
10815 unsigned offset
, unsigned length
,
10816 const char **value
)
10818 unsigned bin_length
;
10821 bin_length
= tvb_get_uint8(tvb
, offset
);
10822 else if (length
== 2)
10823 bin_length
= tvb_get_ntohs(tvb
, offset
);
10824 else if (length
== 4)
10825 bin_length
= amqp_0_10_get_32bit_size(tvb
, offset
);
10827 *value
= wmem_strdup_printf(wmem_packet_scope(), "Invalid vbin length size %d!", length
);
10831 *value
= tvb_bytes_to_str(wmem_packet_scope(), tvb
, offset
, bin_length
);
10832 /* offset += bin_length; */
10833 return (bin_length
+ length
);
10837 format_amqp_0_10_str(tvbuff_t
*tvb
,
10838 unsigned offset
, unsigned length
,
10839 const char **value
)
10841 unsigned string_length
;
10844 string_length
= tvb_get_uint8(tvb
, offset
);
10845 else if (length
== 2)
10846 string_length
= tvb_get_ntohs(tvb
, offset
);
10847 else if (length
== 4)
10848 string_length
= amqp_0_10_get_32bit_size(tvb
, offset
);
10850 *value
= wmem_strdup_printf(wmem_packet_scope(), "Invalid string length size %d!", length
);
10854 *value
= tvb_get_string_enc(wmem_packet_scope(), tvb
, offset
, string_length
, ENC_UTF_8
|ENC_NA
);
10855 /* offset += string_length; */
10856 return (string_length
+ length
);
10860 format_amqp_0_10_sequence_set(tvbuff_t
*tvb
, unsigned offset
, unsigned length
,
10863 unsigned i
, values
;
10865 /* Must be 4-byte values */
10866 if ((length
% 4) != 0) {
10867 proto_item_append_text(item
, "Invalid sequence set length %u",
10871 values
= length
/ 4;
10872 /* There must be pairs of values */
10873 if ((values
% 2) != 0) {
10874 proto_item_append_text(item
, "Invalid sequence set value count %u",
10877 proto_item_append_text(item
, " [");
10878 for (i
= 0; i
< values
; i
+= 2) {
10879 proto_item_append_text(item
, "(%u, %u)%s",
10880 tvb_get_ntohl(tvb
, offset
),
10881 tvb_get_ntohl(tvb
, offset
+ 4),
10882 (i
< (values
- 2)) ? ", " : "");
10886 proto_item_append_text(item
, "]");
10889 static void amqp_prompt(packet_info
*pinfo _U_
, char* result
)
10891 snprintf(result
, MAX_DECODE_AS_PROMPT_LEN
, "AMQP version as");
10894 static void *amqp_value(packet_info
*pinfo
)
10896 unsigned version
= AMQP_V1_0
;
10897 conversation_t
*conv
= find_conversation_pinfo(pinfo
, 0);
10900 amqp_conv
*conn
= (amqp_conv
*)conversation_get_proto_data(conv
, proto_amqp
);
10902 version
= conn
->version
;
10905 return GUINT_TO_POINTER(version
);
10909 dissect_amqpv0_9(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data
)
10911 tcp_dissect_pdus(tvb
, pinfo
, tree
, true, 7, get_amqp_0_9_message_len
,
10912 dissect_amqp_0_9_frame
, data
);
10913 return tvb_captured_length(tvb
);
10917 dissect_amqpv0_10(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data
)
10919 tcp_dissect_pdus(tvb
, pinfo
, tree
, true, 8, get_amqp_0_10_message_len
,
10920 dissect_amqp_0_10_frame
, data
);
10921 return tvb_captured_length(tvb
);
10925 dissect_amqpv1_0(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data
)
10927 tcp_dissect_pdus(tvb
, pinfo
, tree
, true, 8, get_amqp_1_0_message_len
,
10928 dissect_amqp_1_0_frame
, data
);
10929 return tvb_captured_length(tvb
);
10932 /* Main dissection routine */
10935 dissect_amqp(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data
)
10937 conversation_t
*conv
;
10940 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "AMQP");
10941 col_clear(pinfo
->cinfo
, COL_INFO
);
10943 /* We need at least 8 bytes to check the protocol and get the frame size */
10944 if (tvb_reported_length (tvb
) < 8) {
10945 /* But at this moment we don't know how much we will need */
10946 pinfo
->desegment_len
= DESEGMENT_ONE_MORE_SEGMENT
;
10947 return -1; /* need more data */
10950 /* Find (or build) conversation to remember the protocol version */
10951 conv
= find_or_create_conversation(pinfo
);
10952 conn
= (amqp_conv
*)conversation_get_proto_data(conv
, proto_amqp
);
10953 if (conn
== NULL
) {
10954 conn
= wmem_new0(wmem_file_scope(), amqp_conv
);
10955 conn
->channels
= wmem_map_new(wmem_file_scope(), g_direct_hash
, g_direct_equal
);
10956 conversation_add_proto_data(conv
, proto_amqp
, conn
);
10958 check_amqp_version(tvb
, conn
);
10959 /* Restore can_desegment to whatever TCP set it to before calling the
10960 * subdissector (which will decrement it a second time) in order for
10961 * tcp_dissect_pdus() to work as expected.
10963 pinfo
->can_desegment
= pinfo
->saved_can_desegment
;
10964 if (!dissector_try_uint_with_data(version_table
, conn
->version
, tvb
, pinfo
, tree
, false, data
))
10966 col_append_str(pinfo
->cinfo
, COL_INFO
, "AMQP (unknown version)");
10967 col_set_fence(pinfo
->cinfo
, COL_INFO
);
10970 return tvb_captured_length(tvb
);
10973 /* Basic registration functions */
10976 proto_register_amqp(void)
10979 * Setup of field format array. A few of the 0-9 fields are reused
10980 * in 0-10, but there are many separate.
10982 static hf_register_info hf
[] = {
10983 {&hf_amqp_1_0_size
, {
10984 "Length", "amqp.length",
10985 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
10986 "Length of the frame", HFILL
}},
10987 {&hf_amqp_1_0_doff
, {
10988 "Doff", "amqp.doff",
10989 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
10990 "Data offset", HFILL
}},
10991 {&hf_amqp_1_0_type
, {
10992 "Type", "amqp.type",
10993 FT_UINT8
, BASE_DEC
, VALS(amqp_1_0_type
), 0x0,
10994 "Frame type", HFILL
}},
10995 {&hf_amqp_1_0_amqp_performative
, {
10996 "Performative", "amqp.performative",
10997 FT_UINT8
, BASE_DEC
, VALS(amqp_1_0_AMQP_performatives
), 0x0,
10999 {&hf_amqp_1_0_sasl_method
, {
11000 "SASL Method", "amqp.sasl.method",
11001 FT_UINT8
, BASE_DEC
, VALS(amqp_1_0_SASL_methods
), 0x0,
11003 {&hf_amqp_1_0_list
, {
11004 "list-item", "amqp.list",
11005 FT_NONE
, BASE_NONE
, NULL
, 0,
11007 {&hf_amqp_1_0_map
, {
11008 "map-item", "amqp.map",
11009 FT_NONE
, BASE_NONE
, NULL
, 0,
11011 {&hf_amqp_1_0_containerId
, {
11012 "Container-Id", "amqp.performative.arguments.containerId",
11013 FT_STRING
, BASE_NONE
, NULL
, 0,
11015 {&hf_amqp_1_0_hostname
, {
11016 "Hostname", "amqp.performative.arguments.hostname",
11017 FT_STRING
, BASE_NONE
, NULL
, 0,
11019 {&hf_amqp_1_0_maxFrameSize
, {
11020 "Max-Frame-Size", "amqp.performative.arguments.maxFrameSize",
11021 FT_UINT32
, BASE_DEC
, NULL
, 0,
11023 {&hf_amqp_1_0_channelMax
, {
11024 "Channel-Max", "amqp.performative.arguments.channelMax",
11025 FT_UINT16
, BASE_DEC
, NULL
, 0,
11027 {&hf_amqp_1_0_idleTimeOut
, {
11028 "Idle-Timeout", "amqp.performative.arguments.idleTimeout",
11029 FT_UINT32
, BASE_DEC
, NULL
, 0,
11031 {&hf_amqp_1_0_outgoingLocales
, {
11032 "Outgoing-Locales", "amqp.performative.arguments.outgoingLocales",
11033 FT_NONE
, BASE_NONE
, NULL
, 0,
11035 {&hf_amqp_1_0_incomingLocales
, {
11036 "Incoming-Locales", "amqp.performative.arguments.incomingLocales",
11037 FT_NONE
, BASE_NONE
, NULL
, 0,
11039 {&hf_amqp_1_0_offeredCapabilities
, {
11040 "Offered-Capabilities", "amqp.arguments.offeredCapabilities",
11041 FT_NONE
, BASE_NONE
, NULL
, 0,
11043 {&hf_amqp_1_0_desiredCapabilities
, {
11044 "Desired-Capabilities", "amqp.performative.arguments.desiredCapabilities",
11045 FT_NONE
, BASE_NONE
, NULL
, 0,
11047 {&hf_amqp_1_0_properties
, {
11048 "Properties", "amqp.performative.arguments.properties",
11049 FT_NONE
, BASE_NONE
, NULL
, 0,
11051 {&hf_amqp_1_0_nextIncomingId
, {
11052 "Next-Incoming-Id", "amqp.performative.arguments.nextIncomingId",
11053 FT_UINT32
, BASE_DEC
, NULL
, 0,
11055 {&hf_amqp_1_0_deliveryCount
, {
11056 "Delivery-Count", "amqp.performative.arguments.deliveryCount",
11057 FT_UINT32
, BASE_DEC
, NULL
, 0,
11059 {&hf_amqp_1_0_sectionNumber
, {
11060 "Section-Number", "amqp.received.sectionNumber",
11061 FT_UINT8
, BASE_DEC
, NULL
, 0,
11062 "Section number of received message", HFILL
}},
11063 {&hf_amqp_1_0_sectionOffset
, {
11064 "Section-Offset", "amqp.received.sectionOffset",
11065 FT_UINT8
, BASE_DEC
, NULL
, 0,
11066 "Section offset of received message", HFILL
}},
11067 {&hf_amqp_1_0_deliveryFailed
, {
11068 "Delivery-Failed", "amqp.modified.deliveryFailed",
11069 FT_BOOLEAN
, BASE_NONE
, NULL
, 0,
11071 {&hf_amqp_1_0_undeliverableHere
, {
11072 "Undeliverable-Here", "amqp.modified.undeliverableHere",
11073 FT_BOOLEAN
, BASE_NONE
, NULL
, 0,
11075 {&hf_amqp_1_0_linkCredit
, {
11076 "Link-Credit", "amqp.performative.arguments.linkCredit",
11077 FT_UINT32
, BASE_DEC
, NULL
, 0,
11079 {&hf_amqp_1_0_available
, {
11080 "Available", "amqp.performative.arguments.available",
11081 FT_UINT32
, BASE_DEC
, NULL
, 0,
11082 "The number of available messages", HFILL
}},
11083 {&hf_amqp_1_0_drain
, {
11084 "Drain", "amqp.performative.arguments.drain",
11085 FT_BOOLEAN
, BASE_NONE
, NULL
, 0,
11086 "Drain mode", HFILL
}},
11087 {&hf_amqp_1_0_echo
, {
11088 "Echo", "amqp.performative.arguments.echo",
11089 FT_BOOLEAN
, BASE_NONE
, NULL
, 0,
11090 "Request state from partner", HFILL
}},
11091 {&hf_amqp_1_0_deliveryId
, {
11092 "Delivery-Id", "amqp.performative.arguments.deliveryId",
11093 FT_UINT32
, BASE_DEC
, NULL
, 0,
11095 {&hf_amqp_1_0_deliveryTag
, {
11096 "Delivery-Tag", "amqp.performative.arguments.deliveryTag",
11097 FT_BYTES
, BASE_NONE
, NULL
, 0,
11099 {&hf_amqp_1_0_messageFormat
, {
11100 "Message-Format", "amqp.performative.arguments.messageFormat",
11101 FT_UINT32
, BASE_DEC
, NULL
, 0,
11103 {&hf_amqp_1_0_settled
, {
11104 "Settled", "amqp.performative.arguments.settled",
11105 FT_BOOLEAN
, BASE_NONE
, NULL
, 0,
11107 {&hf_amqp_1_0_more
, {
11108 "More", "amqp.performative.arguments.more",
11109 FT_BOOLEAN
, BASE_NONE
, NULL
, 0,
11110 "The message has more content", HFILL
}},
11111 {&hf_amqp_1_0_state
, {
11112 "State", "amqp.performative.arguments.state",
11113 FT_NONE
, BASE_NONE
, NULL
, 0,
11114 "State of the delivery at sender", HFILL
}},
11115 {&hf_amqp_1_0_resume
, {
11116 "Resume", "amqp.performative.arguments.resume",
11117 FT_BOOLEAN
, BASE_NONE
, NULL
, 0,
11118 "Resumed delivery", HFILL
}},
11119 {&hf_amqp_1_0_aborted
, {
11120 "Aborted", "amqp.performative.arguments.aborted",
11121 FT_BOOLEAN
, BASE_NONE
, NULL
, 0,
11122 "Message is aborted", HFILL
}},
11123 {&hf_amqp_1_0_batchable
, {
11124 "Batchable", "amqp.performative.arguments.batchable",
11125 FT_BOOLEAN
, BASE_NONE
, NULL
, 0,
11126 "Batchable hint", HFILL
}},
11127 {&hf_amqp_1_0_first
, {
11128 "First", "amqp.performative.arguments.first",
11129 FT_UINT32
, BASE_DEC
, NULL
, 0,
11130 "Lower bound of deliveries", HFILL
}},
11131 {&hf_amqp_1_0_last
, {
11132 "Last", "amqp.performative.arguments.last",
11133 FT_UINT32
, BASE_DEC
, NULL
, 0,
11134 "Upper bound of deliveries", HFILL
}},
11135 {&hf_amqp_1_0_closed
, {
11136 "Closed", "amqp.performative.arguments.closed",
11137 FT_BOOLEAN
, BASE_NONE
, NULL
, 0,
11138 "Sender closed the link", HFILL
}},
11139 {&hf_amqp_1_0_remoteChannel
, {
11140 "Remote-Channel", "amqp.performative.arguments.remoteChannel",
11141 FT_UINT16
, BASE_DEC
, NULL
, 0,
11143 {&hf_amqp_1_0_nextOutgoingId
, {
11144 "Next-Outgoing-Id", "amqp.performative.arguments.nextOutgoingId",
11145 FT_UINT32
, BASE_DEC
, NULL
, 0,
11147 {&hf_amqp_1_0_incomingWindow
, {
11148 "Incoming-Window", "amqp.performative.arguments.incomingWindow",
11149 FT_UINT32
, BASE_DEC
, NULL
, 0,
11151 {&hf_amqp_1_0_outgoingWindow
, {
11152 "Outgoing-Window", "amqp.performative.arguments.outgoingWindow",
11153 FT_UINT32
, BASE_DEC
, NULL
, 0,
11155 {&hf_amqp_1_0_handleMax
, {
11156 "Handle-Max", "amqp.performative.arguments.handleMax",
11157 FT_UINT32
, BASE_DEC
, NULL
, 0,
11159 {&hf_amqp_1_0_name
, {
11160 "Name", "amqp.performative.arguments.name",
11161 FT_STRING
, BASE_NONE
, NULL
, 0,
11162 "Name of the link", HFILL
}},
11163 {&hf_amqp_1_0_handle
, {
11164 "Handle", "amqp.performative.arguments.handle",
11165 FT_UINT32
, BASE_DEC
, NULL
, 0,
11166 "Handle for the link while attached", HFILL
}},
11167 {&hf_amqp_1_0_role
, {
11168 "Role", "amqp.performative.arguments.role",
11169 FT_BOOLEAN
, BASE_NONE
, TFS(&amqp_1_0_role_value
), 0,
11170 "Role of the link endpoint", HFILL
}},
11171 {&hf_amqp_1_0_sndSettleMode
, {
11172 "Send-Settle-Mode", "amqp.performative.arguments.sndSettleMode",
11173 FT_UINT8
, BASE_DEC
, VALS(amqp_1_0_sndSettleMode_value
), 0,
11175 {&hf_amqp_1_0_rcvSettleMode
, {
11176 "Receive-Settle-Mode", "amqp.performative.arguments.rcvSettleMode",
11177 FT_UINT8
, BASE_DEC
, VALS(amqp_1_0_rcvSettleMode_value
), 0,
11179 {&hf_amqp_1_0_source
, {
11180 "Source", "amqp.performative.arguments.source",
11181 FT_NONE
, BASE_NONE
, NULL
, 0,
11182 "Source for messages", HFILL
}},
11183 {&hf_amqp_1_0_target
, {
11184 "Target", "amqp.performative.arguments.target",
11185 FT_NONE
, BASE_NONE
, NULL
, 0,
11186 "Target for messages", HFILL
}},
11187 {&hf_amqp_1_0_deleteOnClose
, {
11188 "Delete-On-Close", "amqp.lifetime-policy.deleteOnClose",
11189 FT_NONE
, BASE_NONE
, NULL
, 0,
11191 {&hf_amqp_1_0_deleteOnNoLinks
, {
11192 "Delete-On-No-Links", "amqp.lifetime-policy.deleteOnNoLinks",
11193 FT_NONE
, BASE_NONE
, NULL
, 0,
11195 {&hf_amqp_1_0_deleteOnNoMessages
, {
11196 "Delete-On-No-Messages", "amqp.lifetime-policy.deleteOnNoMessages",
11197 FT_NONE
, BASE_NONE
, NULL
, 0,
11199 {&hf_amqp_1_0_deleteOnNoLinksOrMessages
, {
11200 "Delete-On-No-Links-Or-Messages", "amqp.lifetime-policy.deleteOnNoLinksOrMessages",
11201 FT_NONE
, BASE_NONE
, NULL
, 0,
11203 {&hf_amqp_1_0_coordinator
, {
11204 "Coordinator", "amqp.tx.coordinator",
11205 FT_NONE
, BASE_NONE
, NULL
, 0,
11206 "Transaction coordinator", HFILL
}},
11207 {&hf_amqp_1_0_declare
, {
11208 "Declare", "amqp.tx.declare",
11209 FT_NONE
, BASE_NONE
, NULL
, 0,
11210 "Declare transaction", HFILL
}},
11211 {&hf_amqp_1_0_globalId
, {
11212 "Global-Id", "amqp.tx.arguments.globalId",
11213 FT_NONE
, BASE_NONE
, NULL
, 0,
11214 "Global id of a transaction", HFILL
}},
11215 {&hf_amqp_1_0_discharge
, {
11216 "Discharge", "amqp.tx.discharge",
11217 FT_NONE
, BASE_NONE
, NULL
, 0,
11218 "Discharge transaction", HFILL
}},
11219 {&hf_amqp_1_0_txnId
, {
11220 "Txn-Id", "amqp.tx.arguments.txnId",
11221 FT_BYTES
, BASE_NONE
, NULL
, 0,
11222 "Transaction id", HFILL
}},
11223 {&hf_amqp_1_0_fail
, {
11224 "Fail", "amqp.tx.arguments.fail",
11225 FT_BOOLEAN
, BASE_NONE
, NULL
, 0,
11226 "Fail flag of transaction", HFILL
}},
11227 {&hf_amqp_1_0_declared
, {
11228 "Declared", "amqp.tx.declared",
11229 FT_NONE
, BASE_NONE
, NULL
, 0,
11230 "Declared transaction", HFILL
}},
11231 {&hf_amqp_1_0_transactionalState
, {
11232 "Transactional-State", "amqp.tx.transactionalState",
11233 FT_NONE
, BASE_NONE
, NULL
, 0,
11235 {&hf_amqp_1_0_outcome
, {
11236 "Outcome", "amqp.tx.arguments.outcome",
11237 FT_NONE
, BASE_NONE
, NULL
, 0,
11238 "Outcome of transaction", HFILL
}},
11239 {&hf_amqp_1_0_unsettled
, {
11240 "Unsettled", "amqp.performative.arguments.unsettled",
11241 FT_NONE
, BASE_NONE
, NULL
, 0,
11242 "Unsettled delivery state", HFILL
}},
11243 {&hf_amqp_1_0_incompleteUnsettled
, {
11244 "Incomplete-Unsettled", "amqp.performative.arguments.incompleteUnsettled",
11245 FT_BOOLEAN
, BASE_NONE
, NULL
, 0,
11247 {&hf_amqp_1_0_initialDeliveryCount
, {
11248 "Initial-Delivery-Count", "amqp.performative.arguments.initDeliveryCount",
11249 FT_UINT32
, BASE_DEC
, NULL
, 0,
11251 {&hf_amqp_1_0_maxMessageSize
, {
11252 "Max-Message-Size", "amqp.performative.arguments.maxMessageSize",
11253 FT_UINT64
, BASE_DEC
, NULL
, 0,
11255 {&hf_amqp_1_0_error
, {
11256 "Error", "amqp.performative.arguments.error",
11257 FT_NONE
, BASE_NONE
, NULL
, 0,
11258 "Error in a performative", HFILL
}},
11259 {&hf_amqp_1_0_messageHeader
, {
11260 "Message-Header", "amqp.header",
11261 FT_NONE
, BASE_NONE
, NULL
, 0,
11263 {&hf_amqp_1_0_messageProperties
, {
11264 "Message-Properties", "amqp.properties",
11265 FT_NONE
, BASE_NONE
, NULL
, 0,
11267 {&hf_amqp_1_0_deliveryAnnotations
, {
11268 "Delivery-Annotations", "amqp.deliveryAnnotations",
11269 FT_NONE
, BASE_NONE
, NULL
, 0,
11271 {&hf_amqp_1_0_messageAnnotations
, {
11272 "Message-Annotations", "amqp.messageAnnotations",
11273 FT_NONE
, BASE_NONE
, NULL
, 0,
11275 {&hf_amqp_1_0_applicationProperties
, {
11276 "Application-Properties", "amqp.applicationProperties",
11277 FT_NONE
, BASE_NONE
, NULL
, 0,
11279 {&hf_amqp_1_0_data
, {
11280 "Data", "amqp.data",
11281 FT_BYTES
, BASE_NONE
, NULL
, 0,
11282 "Opaque binary data", HFILL
}},
11283 {&hf_amqp_1_0_amqp_sequence
, {
11284 "AMQP-Sequence", "amqp.sequence",
11285 FT_NONE
, BASE_NONE
, NULL
, 0,
11287 {&hf_amqp_1_0_amqp_value
, {
11288 "AMQP-Value", "amqp.value",
11289 FT_NONE
, BASE_NONE
, NULL
, 0,
11291 {&hf_amqp_1_0_footer
, {
11292 "Footer", "amqp.footer",
11293 FT_NONE
, BASE_NONE
, NULL
, 0,
11294 "Message footer", HFILL
}},
11295 {&hf_amqp_1_0_received
, {
11296 "Received", "amqp.delivery-state.received",
11297 FT_NONE
, BASE_NONE
, NULL
, 0,
11298 "Received messages", HFILL
}},
11299 {&hf_amqp_1_0_accepted
, {
11300 "Accepted", "amqp.delivery-state.accepted",
11301 FT_NONE
, BASE_NONE
, NULL
, 0,
11302 "Accepted messages", HFILL
}},
11303 {&hf_amqp_1_0_rejected
, {
11304 "Rejected", "amqp.delivery-state.rejected",
11305 FT_NONE
, BASE_NONE
, NULL
, 0,
11306 "Rejected messages", HFILL
}},
11307 {&hf_amqp_1_0_released
, {
11308 "Released", "amqp.delivery-state.released",
11309 FT_NONE
, BASE_NONE
, NULL
, 0,
11310 "Released messages", HFILL
}},
11311 {&hf_amqp_1_0_modified
, {
11312 "Modified", "amqp.delivery-state.modified",
11313 FT_NONE
, BASE_NONE
, NULL
, 0,
11314 "Modified messages", HFILL
}},
11315 {&hf_amqp_1_0_condition
, {
11316 "Condition", "amqp.error.condition",
11317 FT_STRING
, BASE_NONE
, NULL
, 0,
11318 "Error condition", HFILL
}},
11319 {&hf_amqp_1_0_description
, {
11320 "Description", "amqp.error.description",
11321 FT_STRING
, BASE_NONE
, NULL
, 0,
11322 "Error description", HFILL
}},
11323 {&hf_amqp_1_0_info
, {
11324 "Info", "amqp.error.info",
11325 FT_NONE
, BASE_NONE
, NULL
, 0,
11326 "Error info", HFILL
}},
11327 {&hf_amqp_1_0_address
, {
11328 "Address", "amqp.performative.arguments.address",
11329 FT_NONE
, BASE_NONE
, NULL
, 0,
11330 "Address of a node", HFILL
}},
11331 {&hf_amqp_1_0_durable
, {
11332 "Durable", "amqp.message.durable",
11333 FT_BOOLEAN
, BASE_NONE
, NULL
, 0,
11334 "Message durability", HFILL
}},
11335 {&hf_amqp_1_0_terminusDurable
, {
11336 "Terminus-Durable", "amqp.performative.arguments.terminusDurable",
11337 FT_UINT8
, BASE_DEC
, VALS(amqp_1_0_terminus_durable_value
), 0,
11339 {&hf_amqp_1_0_priority
, {
11340 "Priority", "amqp.message.priority",
11341 FT_UINT8
, BASE_DEC
, NULL
, 0,
11342 "Message priority", HFILL
}},
11343 {&hf_amqp_1_0_ttl
, {
11344 "Ttl", "amqp.message.ttl",
11345 FT_UINT8
, BASE_DEC
, NULL
, 0,
11346 "Time to live", HFILL
}},
11347 {&hf_amqp_1_0_firstAcquirer
, {
11348 "First-Acquirer", "amqp.message.firstAcquirer",
11349 FT_BOOLEAN
, BASE_NONE
, NULL
, 0,
11351 {&hf_amqp_1_0_expiryPolicy
, {
11352 "Expiry-Policy", "amqp.properties.expiryPolicy",
11353 FT_STRING
, BASE_NONE
, NULL
, 0,
11355 {&hf_amqp_1_0_timeout
, {
11356 "Timeout", "amqp.properties.timeout",
11357 FT_UINT8
, BASE_DEC
, NULL
, 0,
11358 "Duration that an expiring target will be retained", HFILL
}},
11359 {&hf_amqp_1_0_dynamic
, {
11360 "Dynamic", "amqp.properties.dynamic",
11361 FT_BOOLEAN
, BASE_NONE
, NULL
, 0,
11362 "Dynamic creation of a remote node", HFILL
}},
11363 {&hf_amqp_1_0_dynamicNodeProperties
, {
11364 "Dynamic-Node-Properties", "amqp.properties.dynamicNodeProperties",
11365 FT_NONE
, BASE_NONE
, NULL
, 0,
11367 {&hf_amqp_1_0_distributionMode
, {
11368 "Distribution-Mode", "amqp.properties.distributionMode",
11369 FT_STRING
, BASE_NONE
, NULL
, 0,
11371 {&hf_amqp_1_0_filter
, {
11372 "Filter", "amqp.properties.filter",
11373 FT_NONE
, BASE_NONE
, NULL
, 0,
11374 "Predicates to filter messages admitted to the link", HFILL
}},
11375 {&hf_amqp_1_0_defaultOutcome
, {
11376 "Default-Outcome", "amqp.properties.defaultOutcome",
11377 FT_NONE
, BASE_NONE
, NULL
, 0,
11379 {&hf_amqp_1_0_outcomes
, {
11380 "Outcomes", "amqp.properties.outcomes",
11381 FT_NONE
, BASE_NONE
, NULL
, 0,
11382 "Outcomes descriptors for the link", HFILL
}},
11383 {&hf_amqp_1_0_capabilities
, {
11384 "Capabilities", "amqp.properties.capabilities",
11385 FT_NONE
, BASE_NONE
, NULL
, 0,
11386 "Extension capabilities of the sender", HFILL
}},
11387 {&hf_amqp_1_0_messageId
, {
11388 "Message-Id", "amqp.message.messageId",
11389 FT_NONE
, BASE_NONE
, NULL
, 0,
11391 {&hf_amqp_1_0_userId
, {
11392 "User-Id", "amqp.message.userId",
11393 FT_BYTES
, BASE_NONE
, NULL
, 0,
11395 {&hf_amqp_1_0_to
, {
11396 "To", "amqp.message.to",
11397 FT_NONE
, BASE_NONE
, NULL
, 0,
11398 "Destination address of the message", HFILL
}},
11399 {&hf_amqp_1_0_subject
, {
11400 "Subject", "amqp.message.subject",
11401 FT_STRING
, BASE_NONE
, NULL
, 0,
11402 "Message subject", HFILL
}},
11403 {&hf_amqp_1_0_replyTo
, {
11404 "Reply-To", "amqp.message.replyTo",
11405 FT_NONE
, BASE_NONE
, NULL
, 0,
11407 {&hf_amqp_1_0_correlationId
, {
11408 "Correlation-Id", "amqp.message.correlationId",
11409 FT_NONE
, BASE_NONE
, NULL
, 0,
11411 {&hf_amqp_1_0_contentType
, {
11412 "Content-Type", "amqp.message.contentType",
11413 FT_STRING
, BASE_NONE
, NULL
, 0,
11415 {&hf_amqp_1_0_contentEncoding
, {
11416 "Content-Encoding", "amqp.message.contentEncoding",
11417 FT_STRING
, BASE_NONE
, NULL
, 0,
11419 {&hf_amqp_1_0_absoluteExpiryTime
, {
11420 "Expiry-Time", "amqp.message.expiryTime",
11421 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_UTC
, NULL
, 0,
11422 "Absolute expiry time", HFILL
}},
11423 {&hf_amqp_1_0_creationTime
, {
11424 "Creation-Time", "amqp.message.creationTime",
11425 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_UTC
, NULL
, 0,
11427 {&hf_amqp_1_0_groupId
, {
11428 "Group-Id", "amqp.message.groupId",
11429 FT_STRING
, BASE_NONE
, NULL
, 0,
11431 {&hf_amqp_1_0_groupSequence
, {
11432 "Group-Sequence", "amqp.message.groupSequence",
11433 FT_UINT8
, BASE_DEC
, NULL
, 0,
11435 {&hf_amqp_1_0_replyToGroupId
, {
11436 "Reply-To-Group-Id", "amqp.message.replyToGroupId",
11437 FT_STRING
, BASE_NONE
, NULL
, 0,
11439 {&hf_amqp_1_0_mechanisms
, {
11440 "Mechanisms", "amqp.sasl.mechanisms",
11441 FT_NONE
, BASE_NONE
, NULL
, 0,
11442 "Supported security mechanisms", HFILL
}},
11443 {&hf_amqp_1_0_mechanism
, {
11444 "Mechanism", "amqp.sasl.mechanism",
11445 FT_STRING
, BASE_NONE
, NULL
, 0,
11446 "Chosen security mechanism", HFILL
}},
11447 {&hf_amqp_1_0_initResponse
, {
11448 "Init-Response", "amqp.sasl.initResponse",
11449 FT_BYTES
, BASE_NONE
, NULL
, 0,
11451 {&hf_amqp_1_0_saslChallenge
, {
11452 "Challenge", "amqp.sasl.challenge",
11453 FT_BYTES
, BASE_NONE
, NULL
, 0,
11454 "SASL challenge", HFILL
}},
11455 {&hf_amqp_1_0_saslResponse
, {
11456 "Response", "amqp.sasl.response",
11457 FT_BYTES
, BASE_NONE
, NULL
, 0,
11458 "SASL response", HFILL
}},
11459 {&hf_amqp_1_0_saslCode
, {
11460 "Code", "amqp.sasl.saslCode",
11461 FT_UINT8
, BASE_DEC
, VALS(amqp_1_0_SASL_code_value
), 0,
11462 "SASL outcome code", HFILL
}},
11463 {&hf_amqp_1_0_saslAdditionalData
, {
11464 "Additional-Data", "amqp.sasl.addData",
11465 FT_BYTES
, BASE_NONE
, NULL
, 0,
11466 "SASL outcome additional data", HFILL
}},
11467 {&hf_amqp_1_0_outgoingLocales_sym
, {
11468 "Outgoing-Locales", "amqp.performative.arguments.outgoingLocales_sym",
11469 FT_STRING
, BASE_NONE
, NULL
, 0,
11471 {&hf_amqp_1_0_incomingLocales_sym
, {
11472 "Incoming-Locales", "amqp.performative.arguments.incomingLocales_sym",
11473 FT_STRING
, BASE_NONE
, NULL
, 0,
11475 {&hf_amqp_1_0_offeredCapabilities_sym
, {
11476 "Offered-Capabilities", "amqp.arguments.offeredCapabilities_sym",
11477 FT_STRING
, BASE_NONE
, NULL
, 0,
11479 {&hf_amqp_1_0_desiredCapabilities_sym
, {
11480 "Desired-Capabilities", "amqp.performative.arguments.desiredCapabilities_sym",
11481 FT_STRING
, BASE_NONE
, NULL
, 0,
11483 {&hf_amqp_1_0_address_str
, {
11484 "Address", "amqp.performative.arguments.address.string",
11485 FT_STRING
, BASE_NONE
, NULL
, 0,
11486 "Address of a node", HFILL
}},
11487 {&hf_amqp_1_0_source_str
, {
11488 "Source", "amqp.performative.arguments.source.string",
11489 FT_STRING
, BASE_NONE
, NULL
, 0,
11490 "Source for messages", HFILL
}},
11491 {&hf_amqp_1_0_target_str
, {
11492 "Target", "amqp.performative.arguments.target.string",
11493 FT_STRING
, BASE_NONE
, NULL
, 0,
11494 "Target for messages", HFILL
}},
11495 {&hf_amqp_1_0_outcomes_sym
, {
11496 "Outcomes", "amqp.properties.outcomes_sym",
11497 FT_STRING
, BASE_NONE
, NULL
, 0,
11498 "Outcomes descriptors for the link", HFILL
}},
11499 {&hf_amqp_1_0_capabilities_sym
, {
11500 "Capabilities", "amqp.properties.capabilities_sym",
11501 FT_STRING
, BASE_NONE
, NULL
, 0,
11502 "Extension capabilities of the sender", HFILL
}},
11503 {&hf_amqp_1_0_messageId_uint
, {
11504 "Message-Id", "amqp.message.messageId.uint",
11505 FT_UINT8
, BASE_DEC
, NULL
, 0,
11507 {&hf_amqp_1_0_messageId_str
, {
11508 "Message-Id", "amqp.message.messageId.string",
11509 FT_STRING
, BASE_NONE
, NULL
, 0,
11511 {&hf_amqp_1_0_messageId_bin
, {
11512 "Message-Id", "amqp.message.messageId.bytes",
11513 FT_BYTES
, BASE_NONE
, NULL
, 0,
11515 {&hf_amqp_1_0_messageId_uuid
, {
11516 "Message-Id", "amqp.message.messageId.guid",
11517 FT_GUID
, BASE_NONE
, NULL
, 0,
11519 {&hf_amqp_1_0_correlationId_uint
, {
11520 "Correlation-Id", "amqp.message.correlationId.uint",
11521 FT_UINT8
, BASE_DEC
, NULL
, 0,
11523 {&hf_amqp_1_0_correlationId_str
, {
11524 "Correlation-Id", "amqp.message.correlationId.string",
11525 FT_STRING
, BASE_NONE
, NULL
, 0,
11527 {&hf_amqp_1_0_correlationId_bin
, {
11528 "Correlation-Id", "amqp.message.correlationId.bytes",
11529 FT_BYTES
, BASE_NONE
, NULL
, 0,
11531 {&hf_amqp_1_0_correlationId_uuid
, {
11532 "Correlation-Id", "amqp.message.correlationId.guid",
11533 FT_GUID
, BASE_NONE
, NULL
, 0,
11535 {&hf_amqp_1_0_to_str
, {
11536 "To", "amqp.message.to.string",
11537 FT_STRING
, BASE_NONE
, NULL
, 0,
11538 "Destination address of the message", HFILL
}},
11539 {&hf_amqp_1_0_replyTo_str
, {
11540 "Reply-To", "amqp.message.replyTo.string",
11541 FT_STRING
, BASE_NONE
, NULL
, 0,
11543 {&hf_amqp_1_0_mechanisms_sym
, {
11544 "Mechanisms", "amqp.sasl.mechanisms_sym",
11545 FT_STRING
, BASE_NONE
, NULL
, 0,
11546 "Supported security mechanisms", HFILL
}},
11547 {&hf_amqp_0_10_format
, {
11548 "Format", "amqp.format",
11549 FT_UINT8
, BASE_DEC
, NULL
, 0xc0,
11550 "Framing version", HFILL
}},
11551 {&hf_amqp_0_10_position
, {
11552 "Position", "amqp.frame-position",
11553 FT_UINT8
, BASE_DEC
, VALS(amqp_0_10_frame_position
), 0x0f,
11554 "Framing position", HFILL
}},
11555 {&hf_amqp_0_10_type
, {
11556 "Type", "amqp.type",
11557 FT_UINT8
, BASE_DEC
, VALS(amqp_0_10_frame_types
), 0x0,
11558 "Frame type", HFILL
}},
11559 {&hf_amqp_0_10_size
, {
11560 "Length", "amqp.length",
11561 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
11562 "Length of the frame", HFILL
}},
11563 {&hf_amqp_0_10_track
, {
11564 "Track", "amqp.track-number",
11565 FT_UINT8
, BASE_DEC
, VALS(amqp_0_10_frame_tracks
), 0x0,
11566 "Track number", HFILL
}},
11567 {&hf_amqp_0_10_class
, {
11568 "Class", "amqp.class",
11569 FT_UINT8
, BASE_DEC
, VALS(amqp_0_10_class
), 0x0,
11570 "Class ID", HFILL
}},
11571 {&hf_amqp_0_10_connection_method
, {
11572 "Method", "amqp.connection.method",
11573 FT_UINT8
, BASE_DEC
, VALS(amqp_0_10_connection_methods
), 0x0,
11574 "Connection Class Method", HFILL
}},
11575 {&hf_amqp_0_10_session_method
, {
11576 "Method", "amqp.session.method",
11577 FT_UINT8
, BASE_DEC
, VALS(amqp_0_10_session_methods
), 0x0,
11578 "Session Class Method", HFILL
}},
11579 {&hf_amqp_0_10_execution_method
, {
11580 "Method", "amqp.execution.method",
11581 FT_UINT8
, BASE_DEC
, VALS(amqp_0_10_execution_methods
), 0x0,
11582 "Execution Class Method", HFILL
}},
11583 {&hf_amqp_0_10_message_method
, {
11584 "Method", "amqp.message.method",
11585 FT_UINT8
, BASE_DEC
, VALS(amqp_0_10_message_methods
), 0x0,
11586 "Message Class Method", HFILL
}},
11587 {&hf_amqp_0_10_tx_method
, {
11588 "Method", "amqp.tx.method",
11589 FT_UINT8
, BASE_DEC
, VALS(amqp_0_10_tx_methods
), 0x0,
11590 "Tx Class Method", HFILL
}},
11591 {&hf_amqp_0_10_dtx_method
, {
11592 "Method", "amqp.dtx.method",
11593 FT_UINT8
, BASE_DEC
, VALS(amqp_0_10_dtx_methods
), 0x0,
11594 "Dtx Class Method", HFILL
}},
11595 {&hf_amqp_0_10_exchange_method
, {
11596 "Method", "amqp.exchange.method",
11597 FT_UINT8
, BASE_DEC
, VALS(amqp_0_10_exchange_methods
), 0x0,
11598 "Exchange Class Method", HFILL
}},
11599 {&hf_amqp_0_10_queue_method
, {
11600 "Method", "amqp.queue.method",
11601 FT_UINT8
, BASE_DEC
, VALS(amqp_0_10_queue_methods
), 0x0,
11602 "Queue Class Method", HFILL
}},
11603 {&hf_amqp_0_10_file_method
, {
11604 "Method", "amqp.file.method",
11605 FT_UINT8
, BASE_DEC
, VALS(amqp_0_10_file_methods
), 0x0,
11606 "File Class Method", HFILL
}},
11607 {&hf_amqp_0_10_stream_method
, {
11608 "Method", "amqp.stream.method",
11609 FT_UINT8
, BASE_DEC
, VALS(amqp_0_10_stream_methods
), 0x0,
11610 "Stream Class Method", HFILL
}},
11611 {&hf_amqp_0_10_message_body
, {
11612 "Message body", "amqp.message-body",
11613 FT_NONE
, BASE_NONE
, NULL
, 0x0,
11614 "Message body content", HFILL
}},
11615 {&hf_amqp_0_10_dtx_xid
, {
11616 "Xid", "amqp.dtx.xid",
11617 FT_NONE
, BASE_NONE
, NULL
, 0x0,
11618 "Dtx transaction id", HFILL
}},
11619 {&hf_amqp_0_10_dtx_xid_format
, {
11620 "Format", "amqp.dtx.xid.format",
11621 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
11622 "Implementation-specific xid format code", HFILL
}},
11623 {&hf_amqp_0_10_dtx_xid_global_id
, {
11624 "Global-id", "amqp.dtx.xid.global-id",
11625 FT_UINT_BYTES
, BASE_NONE
, NULL
, 0x0,
11626 "Global transaction id", HFILL
}},
11627 {&hf_amqp_0_10_dtx_xid_branch_id
, {
11628 "Branch-id", "amqp.dtx.xid.branch-id",
11629 FT_UINT_BYTES
, BASE_NONE
, NULL
, 0x0,
11630 "Transaction branch qualifier", HFILL
}},
11631 {&hf_amqp_0_10_struct32_size
, {
11632 "Size", "amqp.struct32_size",
11633 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
11635 {&hf_amqp_0_10_struct32
, {
11636 "struct", "amqp.struct32",
11637 FT_UINT16
, BASE_HEX
, VALS(amqp_0_10_struct32_vals
), 0x0,
11639 {&hf_amqp_0_10_struct32_class
, {
11640 "Class", "amqp.struct32.class",
11641 FT_UINT8
, BASE_DEC
, VALS(amqp_0_10_class
), 0x0,
11643 {&hf_amqp_0_10_struct32_struct
, {
11644 "Struct", "amqp.struct32.struct",
11645 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
11647 {&hf_amqp_0_10_struct32_padding
, {
11648 "Padding", "amqp.struct32.padding",
11649 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
11651 {&hf_amqp_0_10_array_type
, {
11652 "Type", "amqp.array.type",
11653 FT_UINT8
, BASE_DEC
, VALS(amqp_0_10_array_type_vals
), 0x0,
11655 {&hf_amqp_0_10_array_element_count
, {
11656 "Element count", "amqp.array.element_count",
11657 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
11659 {&hf_amqp_0_10_array_string
, {
11660 "String", "amqp.array.string",
11661 FT_UINT_STRING
, BASE_NONE
, NULL
, 0x0,
11663 {&hf_amqp_0_10_struct_delivery_properties_discard_unroutable
, {
11664 "Discard-unroutable", "amqp.message.delivery-properties.discard-unroutable",
11665 FT_BOOLEAN
, 8, TFS(&tfs_yes_no
), 0x01,
11666 "Discard message if unroutable", HFILL
}},
11667 {&hf_amqp_0_10_struct_delivery_properties_immediate
, {
11668 "Immediate", "amqp.message.delivery-properties.immediate",
11669 FT_BOOLEAN
, 8, TFS(&tfs_yes_no
), 0x02,
11670 "Consider unroutable if can't be routed immediately", HFILL
}},
11671 {&hf_amqp_0_10_struct_delivery_properties_redelivered
, {
11672 "Redelivered", "amqp.message.delivery-properties.redelivered",
11673 FT_BOOLEAN
, 8, TFS(&tfs_yes_no
), 0x04,
11674 "Message may have been previously delivered", HFILL
}},
11675 {&hf_amqp_0_10_struct_delivery_properties_priority
, {
11676 "Delivery-priority", "amqp.message.delivery-properties.delivery-priority",
11677 FT_UINT8
, BASE_DEC
, VALS(amqp_0_10_struct_delivery_properties_priorities
), 0x0,
11678 "Message delivery priority", HFILL
}},
11679 {&hf_amqp_0_10_struct_delivery_properties_mode
, {
11680 "Delivery-mode", "amqp.message.delivery-properties.delivery-mode",
11681 FT_UINT8
, BASE_DEC
, VALS(amqp_0_10_struct_delivery_properties_modes
), 0x0,
11682 "Message delivery persistence mode", HFILL
}},
11683 {&hf_amqp_0_10_struct_delivery_properties_ttl
, {
11684 "TTL", "amqp.message.delivery-properties.ttl",
11685 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
11686 "Message time-to-live in msec", HFILL
}},
11687 {&hf_amqp_0_10_struct_delivery_properties_timestamp
, {
11688 "Timestamp", "amqp.message.delivery-properties.timestamp",
11689 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_UTC
, NULL
, 0x0,
11690 "Time of arrival at broker", HFILL
}},
11691 {&hf_amqp_0_10_struct_delivery_properties_expiration
, {
11692 "Expiration", "amqp.message.delivery-properties.expiration",
11693 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_UTC
, NULL
, 0x0,
11694 "Expiration time calculated by broker", HFILL
}},
11695 {&hf_amqp_0_10_struct_delivery_properties_exchange
, {
11696 "Exchange", "amqp.message.delivery-properties.exchange",
11697 FT_UINT_STRING
, BASE_NONE
, NULL
, 0x0,
11698 "Originating exchange", HFILL
}},
11699 {&hf_amqp_0_10_struct_delivery_properties_routing_key
, {
11700 "Routing-key", "amqp.message.delivery-properties.routing-key",
11701 FT_UINT_STRING
, BASE_NONE
, NULL
, 0x0,
11702 "Message routing key", HFILL
}},
11703 {&hf_amqp_0_10_struct_delivery_properties_resume_ttl
, {
11704 "Resume-ttl", "amqp.message.delivery-properties.resume-ttl",
11705 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
11706 "TTL to use when resuming", HFILL
}},
11707 {&hf_amqp_0_10_struct_fragment_properties_first
, {
11708 "First", "amqp.message.fragment-properties.first",
11709 FT_BOOLEAN
, 8, TFS(&tfs_yes_no
), 0x01,
11710 "Fragment contains the start of the message", HFILL
}},
11711 {&hf_amqp_0_10_struct_fragment_properties_last
, {
11712 "Last", "amqp.message.fragment-properties.last",
11713 FT_BOOLEAN
, 8, TFS(&tfs_yes_no
), 0x02,
11714 "Fragment contains the end of the message", HFILL
}},
11715 {&hf_amqp_0_10_struct_fragment_properties_size
, {
11716 "Fragment-size", "amqp.message.fragment-properties.fragment-size",
11717 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
11718 "Size of the message fragment", HFILL
}},
11720 {&hf_amqp_0_10_struct_message_properties
, {
11721 "message.message-properties", "amqp.message.message-properties",
11722 FT_NONE
, BASE_NONE
, NULL
, 0x0,
11723 "Message properties struct", HFILL
}},
11725 {&hf_amqp_0_10_struct_message_properties_content_len
, {
11726 "Content-length", "amqp.message.message-properties.content-length",
11727 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
11728 "Length of associated message", HFILL
}},
11729 {&hf_amqp_0_10_struct_message_properties_message_id
, {
11730 "Message-id", "amqp.message.message-properties.message-id",
11731 FT_GUID
, BASE_NONE
, NULL
, 0x0,
11733 {&hf_amqp_0_10_struct_message_properties_correlation
, {
11734 "Correlation-id", "amqp.message.message-properties.correlation-id",
11735 FT_UINT_BYTES
, BASE_NONE
, NULL
, 0x0,
11737 {&hf_amqp_0_10_struct_message_properties_reply_to
, {
11738 "Reply-to", "amqp.message.message-properties.reply-to",
11739 FT_NONE
, BASE_NONE
, NULL
, 0x0,
11740 "Address to reply to", HFILL
}},
11741 {&hf_amqp_0_10_struct_message_properties_content_type
, {
11742 "Content-type", "amqp.message.message-properties.content-type",
11743 FT_UINT_STRING
, BASE_NONE
, NULL
, 0x0,
11744 "MIME content type", HFILL
}},
11745 {&hf_amqp_0_10_struct_message_properties_content_encoding
, {
11746 "Content-encoding", "amqp.message.message-properties.content-encoding",
11747 FT_UINT_STRING
, BASE_NONE
, NULL
, 0x0,
11748 "MIME content encoding method", HFILL
}},
11749 {&hf_amqp_0_10_struct_message_properties_user_id
, {
11750 "User-id", "amqp.message.message-properties.user-id",
11751 FT_UINT_BYTES
, BASE_NONE
, NULL
, 0x0,
11752 "Creating user id", HFILL
}},
11753 {&hf_amqp_0_10_struct_message_properties_app_id
, {
11754 "App-id", "amqp.message.message-properties.app-id",
11755 FT_UINT_BYTES
, BASE_NONE
, NULL
, 0x0,
11756 "Creating user id", HFILL
}},
11757 {&hf_amqp_0_10_struct_message_properties_application_headers
, {
11758 "Application-headers", "amqp.message.message-properties.application-headers",
11759 FT_NONE
, BASE_NONE
, NULL
, 0,
11760 "Application-private headers", HFILL
}},
11761 {&hf_amqp_0_10_struct_reply_to_exchange
, {
11762 "Exchange", "amqp.message.message-properties.reply-to.exchange",
11763 FT_UINT_STRING
, BASE_NONE
, NULL
, 0x0,
11764 "Exchange to reply to", HFILL
}},
11765 {&hf_amqp_0_10_struct_reply_to_routing_key
, {
11766 "Routing-key", "amqp.message.message-properties.reply-to.routing-key",
11767 FT_UINT_STRING
, BASE_NONE
, NULL
, 0x0,
11768 "Routing key to reply with", HFILL
}},
11769 {&hf_amqp_0_10_struct_acquired_transfers
, {
11770 "Transfers", "amqp.message.acquired.transfers",
11771 FT_NONE
, BASE_NONE
, NULL
, 0x0,
11772 "Command set", HFILL
}},
11773 {&hf_amqp_0_10_struct_resume_result_offset
, {
11774 "Offset", "amqp.message.resume-result.offset",
11775 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
11776 "Amount of data already transferred", HFILL
}},
11777 {&hf_amqp_0_10_struct_exchange_query_result_durable
, {
11778 "Durable", "amqp.exchange.exchange-query-result.durable",
11779 FT_BOOLEAN
, 8, TFS(&tfs_yes_no
), 0x02,
11780 "Exchange is durable", HFILL
}},
11781 {&hf_amqp_0_10_struct_exchange_query_result_not_found
, {
11782 "Not-found", "amqp.exchange.exchange-query-result.not-found",
11783 FT_BOOLEAN
, 8, NULL
, 0x04,
11784 "Exchange was not found", HFILL
}},
11785 {&hf_amqp_0_10_struct_exchange_bound_result_exchange_not_found
, {
11786 "Exchange-not-found", "amqp.exchange.exchange-bound-result.exchange-not-found",
11787 FT_BOOLEAN
, 8, NULL
, 0x01,
11789 {&hf_amqp_0_10_struct_exchange_bound_result_queue_not_found
, {
11790 "Queue-not-found", "amqp.exchange.exchange-bound-result.queue-not-found",
11791 FT_BOOLEAN
, 8, NULL
, 0x02,
11793 {&hf_amqp_0_10_struct_exchange_bound_result_queue_not_matched
, {
11794 "Queue-not-matched", "amqp.exchange.exchange-bound-result.queue-not-matched",
11795 FT_BOOLEAN
, 8, NULL
, 0x04,
11796 "No binding from exchange to queue", HFILL
}},
11797 {&hf_amqp_0_10_struct_exchange_bound_result_key_not_matched
, {
11798 "Key-not-matched", "amqp.exchange.exchange-bound-result.key-not-matched",
11799 FT_BOOLEAN
, 8, NULL
, 0x08,
11800 "No binding from exchange with binding-key", HFILL
}},
11801 {&hf_amqp_0_10_struct_exchange_bound_result_args_not_matched
, {
11802 "Args-not-matched", "amqp.exchange.exchange-bound-result.args-not-matched",
11803 FT_BOOLEAN
, 8, NULL
, 0x10,
11804 "No binding from exchange with specified arguments", HFILL
}},
11805 {&hf_amqp_0_10_struct_queue_query_result_durable
, {
11806 "Durable", "amqp.queue.queue-query-result.durable",
11807 FT_BOOLEAN
, 8, TFS(&tfs_yes_no
), 0x04,
11808 "Queue is durable", HFILL
}},
11809 {&hf_amqp_0_10_struct_queue_query_result_exclusive
, {
11810 "Exclusive", "amqp.queue.queue-query-result.exclusive",
11811 FT_BOOLEAN
, 8, TFS(&tfs_yes_no
), 0x08,
11812 "Queue created exclusive-use", HFILL
}},
11813 {&hf_amqp_0_10_struct_queue_query_result_auto_delete
, {
11814 "Auto-delete", "amqp.queue.queue-query-result.auto-delete",
11815 FT_BOOLEAN
, 8, TFS(&tfs_yes_no
), 0x10,
11816 "Queue created auto-delete", HFILL
}},
11817 {&hf_amqp_0_10_struct_queue_query_result_message_count
, {
11818 "Message-count", "amqp.queue.queue-query-result.message-count",
11819 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
11820 "Number of messages in the queue", HFILL
}},
11821 {&hf_amqp_0_10_struct_queue_query_result_subscriber_count
, {
11822 "Subscriber-count", "amqp.queue.queue-query-result.subscriber-count",
11823 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
11824 "Number of subscribers for the queue", HFILL
}},
11825 {&hf_amqp_0_10_struct_file_properties_content_type
, {
11826 "Content-type", "amqp.file.file-properties.content-type",
11827 FT_UINT_STRING
, BASE_NONE
, NULL
, 0x0,
11828 "MIME content type", HFILL
}},
11829 {&hf_amqp_0_10_struct_file_properties_content_encoding
, {
11830 "Content-encoding", "amqp.file.file-properties.content-encoding",
11831 FT_UINT_STRING
, BASE_NONE
, NULL
, 0x0,
11832 "MIME content encoding", HFILL
}},
11833 {&hf_amqp_0_10_struct_file_properties_headers
, {
11834 "Headers", "amqp.file.file-properties.headers",
11835 FT_NONE
, BASE_NONE
, NULL
, 0,
11836 "Message header fields", HFILL
}},
11837 {&hf_amqp_0_10_struct_file_properties_priority
, {
11838 "Priority", "amqp.file.file-properties.priority",
11839 FT_UINT8
, BASE_DEC
, NULL
, 0,
11840 "Message priority, 0 to 9", HFILL
}},
11841 {&hf_amqp_0_10_struct_file_properties_reply_to
, {
11842 "Reply-to", "amqp.file.file-properties.reply-to",
11843 FT_UINT_STRING
, BASE_NONE
, NULL
, 0x0,
11844 "Destination to reply to", HFILL
}},
11845 {&hf_amqp_0_10_struct_file_properties_message_id
, {
11846 "Message-id", "amqp.file.file-properties.message-id",
11847 FT_UINT_STRING
, BASE_NONE
, NULL
, 0x0,
11848 "Application message identifier", HFILL
}},
11849 {&hf_amqp_0_10_struct_file_properties_filename
, {
11850 "Filename", "amqp.file.file-properties.filename",
11851 FT_UINT_STRING
, BASE_NONE
, NULL
, 0x0,
11852 "Message filename", HFILL
}},
11853 {&hf_amqp_0_10_struct_file_properties_timestamp
, {
11854 "Timestamp", "amqp.file.file-properties.timestamp",
11855 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_UTC
, NULL
, 0x0,
11856 "Message timestamp", HFILL
}},
11857 {&hf_amqp_0_10_struct_file_properties_cluster_id
, {
11858 "Cluster-id", "amqp.file.file-properties.cluster-id",
11859 FT_UINT_STRING
, BASE_NONE
, NULL
, 0x0,
11860 "Intra-cluster routing identifier", HFILL
}},
11861 {&hf_amqp_0_10_struct_stream_properties_content_type
, {
11862 "Content-type", "amqp.stream.stream-properties.content-type",
11863 FT_UINT_STRING
, BASE_NONE
, NULL
, 0x0,
11864 "MIME content type", HFILL
}},
11865 {&hf_amqp_0_10_struct_stream_properties_content_encoding
, {
11866 "Content-encoding", "amqp.stream.stream-properties.content-encoding",
11867 FT_UINT_STRING
, BASE_NONE
, NULL
, 0x0,
11868 "MIME content encoding", HFILL
}},
11869 {&hf_amqp_0_10_struct_stream_properties_headers
, {
11870 "Headers", "amqp.stream.stream-properties.headers",
11871 FT_NONE
, BASE_NONE
, NULL
, 0,
11872 "Message header fields", HFILL
}},
11873 {&hf_amqp_0_10_struct_stream_properties_priority
, {
11874 "Priority", "amqp.stream.stream-properties.priority",
11875 FT_UINT8
, BASE_DEC
, NULL
, 0,
11876 "Message priority, 0 to 9", HFILL
}},
11877 {&hf_amqp_0_10_struct_stream_properties_timestamp
, {
11878 "Timestamp", "amqp.stream.stream-properties.timestamp",
11879 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_UTC
, NULL
, 0x0,
11880 "Message timestamp", HFILL
}},
11881 {&hf_amqp_0_10_argument_packing_flags
, {
11882 "Packing Flags", "amqp.struct.packing",
11883 FT_UINT16
, BASE_HEX
, NULL
, 0xffff,
11884 "Argument Struct Packing Flags", HFILL
}},
11885 {&hf_amqp_0_10_session_header
, {
11886 "Session header", "amqp.session.header",
11887 FT_UINT16
, BASE_HEX
, NULL
, 0x0,
11889 {&hf_amqp_0_10_session_header_sync
, {
11890 "Sync", "amqp.session.header.sync",
11891 FT_BOOLEAN
, 8, TFS(&amqp_0_10_session_header_sync
), 0x01,
11892 "Sync requested", HFILL
}},
11893 {&hf_amqp_0_10_method_session_attach_name
, {
11894 "Session Name", "amqp.session.attach.name",
11895 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
11897 {&hf_amqp_0_10_method_session_attach_name_size
, {
11898 "Size", "amqp.session.attach.name.size",
11899 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
11901 {&hf_amqp_0_10_method_session_attach_force
, {
11902 "Session forced", "amqp.session.attach.force",
11903 FT_BOOLEAN
, 8, TFS(&tfs_yes_no
), 0x02,
11905 {&hf_amqp_0_10_method_session_detached_code
, {
11906 "Code", "amqp.session.detached.code",
11907 FT_UINT8
, BASE_DEC
, VALS(amqp_0_10_method_session_detached_codes
), 0x0,
11908 "Reason for detach", HFILL
}},
11909 {&hf_amqp_0_10_method_session_timeout
, {
11910 "Timeout", "amqp.session.timeout",
11911 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
11912 "Session timeout (seconds)", HFILL
}},
11913 {&hf_amqp_0_10_method_session_completed_timely
, {
11914 "Timely-reply", "amqp.session.completed.timely-reply",
11915 FT_BOOLEAN
, 8, TFS(&tfs_yes_no
), 0x02,
11916 "Timely reply requested", HFILL
}},
11917 {&hf_amqp_0_10_method_session_flush_expected
, {
11918 "Expected", "amqp.session.flush.expected",
11919 FT_BOOLEAN
, 8, TFS(&tfs_set_notset
), 0x01,
11920 "Request notification of expected commands", HFILL
}},
11921 {&hf_amqp_0_10_method_session_flush_confirmed
, {
11922 "Confirmed", "amqp.session.flush.confirmed",
11923 FT_BOOLEAN
, 8, TFS(&tfs_set_notset
), 0x02,
11924 "Request notification of confirmed commands", HFILL
}},
11925 {&hf_amqp_0_10_method_session_flush_completed
, {
11926 "Completed", "amqp.session.flush.completed",
11927 FT_BOOLEAN
, 8, TFS(&tfs_set_notset
), 0x04,
11928 "Request notification of completed commands", HFILL
}},
11929 {&hf_amqp_0_10_method_session_command_point_id
, {
11930 "Command-id", "amqp.session.command_point.command_id",
11931 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
11932 "Next command's sequence number", HFILL
}},
11933 {&hf_amqp_0_10_method_session_command_point_offset
, {
11934 "Command-offset", "amqp.session.command_point.command_offset",
11935 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
11936 "Byte offset within command", HFILL
}},
11937 {&hf_amqp_0_10_method_session_commands
, {
11938 "Commands", "amqp.session.expected.commands",
11939 FT_NONE
, BASE_NONE
, NULL
, 0x0,
11940 "Command set", HFILL
}},
11941 {&hf_amqp_0_10_method_session_fragments
, {
11942 "Fragments", "amqp.session.expected.fragments",
11943 FT_NONE
, BASE_NONE
, NULL
, 0x0,
11944 "Command Fragments", HFILL
}},
11945 {&hf_amqp_0_10_method_execution_command_id
, {
11946 "Command-id", "amqp.execution.command_id",
11947 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
11948 "Command's sequence number", HFILL
}},
11949 {&hf_amqp_0_10_method_execution_exception_error
, {
11950 "Error-code", "amqp.execution.exception.error-code",
11951 FT_UINT16
, BASE_DEC
, VALS(amqp_0_10_method_execution_exception_errors
), 0x0,
11952 "Exception error code", HFILL
}},
11953 {&hf_amqp_0_10_method_execution_field_index
, {
11954 "Field-index", "amqp.execution.exception.field-index",
11955 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
11956 "0-based index of exceptional field", HFILL
}},
11957 {&hf_amqp_0_10_method_execution_description
, {
11958 "Description", "amqp.execution.exception.description",
11959 FT_UINT_STRING
, BASE_NONE
, NULL
, 0,
11960 "Description of exception", HFILL
}},
11961 {&hf_amqp_0_10_method_execution_error_info
, {
11962 "Error-info", "amqp.execution.exception.error-info",
11963 FT_NONE
, BASE_NONE
, NULL
, 0,
11964 "client-properties", HFILL
}},
11965 {&hf_amqp_0_10_method_message_transfer_destination
, {
11966 "Destination", "amqp.message.transfer.destination",
11967 FT_UINT_STRING
, BASE_NONE
, NULL
, 0,
11968 "Message destination", HFILL
}},
11969 {&hf_amqp_0_10_method_message_transfer_accept_mode
, {
11970 "Accept-mode", "amqp.message.transfer.accept-mode",
11971 FT_UINT8
, BASE_DEC
, VALS(amqp_0_10_message_transfer_accept_modes
), 0x0,
11972 "Message accept mode", HFILL
}},
11973 {&hf_amqp_0_10_method_message_transfer_acquire_mode
, {
11974 "Acquire-mode", "amqp.message.transfer.acquire-mode",
11975 FT_UINT8
, BASE_DEC
, VALS(amqp_0_10_message_transfer_acquire_modes
), 0x0,
11976 "Message acquire mode", HFILL
}},
11977 {&hf_amqp_0_10_method_message_accept_transfers
, {
11978 "Commands", "amqp.message.accept.transfers",
11979 FT_NONE
, BASE_NONE
, NULL
, 0x0,
11980 "Previously transferred messages", HFILL
}},
11981 {&hf_amqp_0_10_method_message_transfer_reject_code
, {
11982 "Reject-code", "amqp.message.reject.reject-code",
11983 FT_UINT16
, BASE_DEC
, VALS(amqp_0_10_message_transfer_reject_codes
), 0x0,
11984 "Message reject code", HFILL
}},
11985 {&hf_amqp_0_10_method_message_reject_text
, {
11986 "Text", "amqp.message.reject.text",
11987 FT_UINT_STRING
, BASE_NONE
, NULL
, 0,
11988 "Reject description", HFILL
}},
11989 {&hf_amqp_0_10_method_message_release_set_redelivered
, {
11990 "Set-redelivered", "amqp.message.release.set-redelivered",
11991 FT_BOOLEAN
, 8, TFS(&tfs_yes_no
), 0x02,
11992 "Mark redelivered on next transfer from queue", HFILL
}},
11993 {&hf_amqp_0_10_method_message_dest
, {
11994 "Destination", "amqp.message.destination",
11995 FT_UINT_STRING
, BASE_NONE
, NULL
, 0,
11996 "Message destination", HFILL
}},
11997 {&hf_amqp_0_10_method_message_resume_id
, {
11998 "Resume-Id", "amqp.message.resume.id",
11999 FT_UINT_STRING
, BASE_NONE
, NULL
, 0,
12000 "Message id to resume", HFILL
}},
12001 {&hf_amqp_0_10_method_message_subscribe_queue
, {
12002 "Queue", "amqp.message.subscribe.queue",
12003 FT_UINT_STRING
, BASE_NONE
, NULL
, 0,
12004 "Queue to subscribe to", HFILL
}},
12005 {&hf_amqp_0_10_method_message_subscribe_exclusive
, {
12006 "Exclusive", "amqp.message.subscribe.exclusive",
12007 FT_BOOLEAN
, 8, TFS(&tfs_yes_no
), 0x10,
12008 "Request exclusive subscription", HFILL
}},
12009 {&hf_amqp_0_10_method_message_subscribe_resume_ttl
, {
12010 "Resume-ttl", "amqp.message.subscribe.resume_ttl",
12011 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
12012 "TTL to use when resuming", HFILL
}},
12013 {&hf_amqp_0_10_method_message_subscribe_args
, {
12014 "Extended arguments", "amqp.message.subscribe.arguments",
12015 FT_NONE
, BASE_NONE
, NULL
, 0x0,
12016 "Implementation-specific arguments", HFILL
}},
12017 {&hf_amqp_0_10_method_message_flow_mode
, {
12018 "Flow-mode", "amqp.message.flow-mode",
12019 FT_UINT8
, BASE_DEC
, VALS(amqp_0_10_message_flow_modes
), 0x0,
12020 "Method for allocating message flow credit", HFILL
}},
12021 {&hf_amqp_0_10_method_message_credit_unit
, {
12022 "Credit-unit", "amqp.message.flow.credit-unit",
12023 FT_UINT8
, BASE_DEC
, VALS(amqp_0_10_message_credit_units
), 0x0,
12024 "Unit of message flow value", HFILL
}},
12025 {&hf_amqp_0_10_method_message_credit_value
, {
12026 "Value", "amqp.message.flow.value",
12027 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
12028 "Message flow value", HFILL
}},
12029 {&hf_amqp_0_10_method_dtx_start_join
, {
12030 "Join", "amqp.dtx.start.join",
12031 FT_BOOLEAN
, 8, TFS(&tfs_yes_no
), 0x02,
12032 "Join with existing xid", HFILL
}},
12033 {&hf_amqp_0_10_method_dtx_start_resume
, {
12034 "Resume", "amqp.dtx.start.resume",
12035 FT_BOOLEAN
, 8, TFS(&tfs_yes_no
), 0x04,
12036 "Resume suspended transaction", HFILL
}},
12037 {&hf_amqp_0_10_method_dtx_end_fail
, {
12038 "Fail", "amqp.dtx.end.fail",
12039 FT_BOOLEAN
, 8, TFS(&tfs_yes_no
), 0x02,
12040 "This portion of work has failed", HFILL
}},
12041 {&hf_amqp_0_10_method_dtx_end_suspend
, {
12042 "Suspend", "amqp.dtx.end.suspend",
12043 FT_BOOLEAN
, 8, TFS(&tfs_yes_no
), 0x04,
12044 "Temporarily suspending transaction", HFILL
}},
12045 {&hf_amqp_0_10_method_dtx_commit_one_phase
, {
12046 "One-phase", "amqp.dtx.commit.one-phase",
12047 FT_BOOLEAN
, 8, TFS(&tfs_yes_no
), 0x02,
12048 "Use one-phase optimization", HFILL
}},
12049 {&hf_amqp_0_10_method_dtx_set_timeout_timeout
, {
12050 "Timeout", "amqp.dtx.set-timeout.timeout",
12051 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
12052 "Transaction timeout value in seconds", HFILL
}},
12053 {&hf_amqp_0_10_method_exchange_declare_exchange
, {
12054 "Exchange", "amqp.exchange.declare.exchange",
12055 FT_UINT_STRING
, BASE_NONE
, NULL
, 0,
12056 "Exchange to declare", HFILL
}},
12057 {&hf_amqp_0_10_method_exchange_declare_type
, {
12058 "Type", "amqp.exchange.declare.type",
12059 FT_UINT_STRING
, BASE_NONE
, NULL
, 0,
12060 "Type of exchange to declare", HFILL
}},
12061 {&hf_amqp_0_10_method_exchange_declare_alt_exchange
, {
12062 "Alternate-exchange", "amqp.exchange.declare.alternate-exchange",
12063 FT_UINT_STRING
, BASE_NONE
, NULL
, 0,
12064 "Alternate exchange for unroutable messages", HFILL
}},
12065 {&hf_amqp_0_10_method_exchange_declare_passive
, {
12066 "Passive", "amqp.exchange.declare.passive",
12067 FT_BOOLEAN
, 8, TFS(&tfs_yes_no
), 0x08,
12068 "Do not create the exchange", HFILL
}},
12069 {&hf_amqp_0_10_method_exchange_declare_durable
, {
12070 "Durable", "amqp.exchange.declare.durable",
12071 FT_BOOLEAN
, 8, TFS(&tfs_yes_no
), 0x10,
12072 "Create a durable exchange", HFILL
}},
12073 {&hf_amqp_0_10_method_exchange_declare_auto_delete
, {
12074 "Auto-delete", "amqp.exchange.declare.auto-delete",
12075 FT_BOOLEAN
, 8, TFS(&tfs_yes_no
), 0x20,
12076 "Delete exchange when last binding removed", HFILL
}},
12077 {&hf_amqp_0_10_method_exchange_declare_arguments
, {
12078 "Arguments", "amqp.exchange.declare.arguments",
12079 FT_NONE
, BASE_NONE
, NULL
, 0,
12080 "Declaration arguments", HFILL
}},
12081 {&hf_amqp_0_10_method_exchange_delete_if_unused
, {
12082 "If-unused", "amqp.exchange.delete.if-unused",
12083 FT_BOOLEAN
, 8, TFS(&tfs_yes_no
), 0x02,
12084 "Delete exchange only if it has no queue bindings", HFILL
}},
12085 {&hf_amqp_0_10_method_exchange_bind_queue
, {
12086 "Queue", "amqp.exchange.bind.queue",
12087 FT_UINT_STRING
, BASE_NONE
, NULL
, 0,
12088 "Queue to bind to", HFILL
}},
12089 {&hf_amqp_0_10_method_exchange_binding_key
, {
12090 "Binding-key", "amqp.exchange.bind.binding-key",
12091 FT_STRING
, BASE_NONE
, NULL
, 0,
12092 "Binding between exchange and queue", HFILL
}},
12093 {&hf_amqp_0_10_method_queue_name
, {
12094 "Queue", "amqp.queue.declare.queue",
12095 FT_UINT_STRING
, BASE_NONE
, NULL
, 0,
12096 "Queue name", HFILL
}},
12097 {&hf_amqp_0_10_method_queue_alt_exchange
, {
12098 "Alternate-exchange", "amqp.queue.declare.alternate-exchange",
12099 FT_UINT_STRING
, BASE_NONE
, NULL
, 0,
12101 {&hf_amqp_0_10_method_queue_declare_passive
, {
12102 "Passive", "amqp.queue.declare.passive",
12103 FT_BOOLEAN
, 8, TFS(&tfs_yes_no
), 0x04,
12104 "Do not create the queue", HFILL
}},
12105 {&hf_amqp_0_10_method_queue_declare_durable
, {
12106 "Durable", "amqp.queue.declare.durable",
12107 FT_BOOLEAN
, 8, TFS(&tfs_yes_no
), 0x08,
12108 "Create a durable queue", HFILL
}},
12109 {&hf_amqp_0_10_method_queue_declare_exclusive
, {
12110 "Exclusive", "amqp.queue.declare.exclusive",
12111 FT_BOOLEAN
, 8, TFS(&tfs_yes_no
), 0x10,
12112 "Create a queue usable from only one session", HFILL
}},
12113 {&hf_amqp_0_10_method_queue_declare_auto_delete
, {
12114 "Auto-delete", "amqp.queue.declare.auto-delete",
12115 FT_BOOLEAN
, 8, TFS(&tfs_yes_no
), 0x20,
12116 "Delete queue when all uses completed", HFILL
}},
12117 {&hf_amqp_0_10_method_queue_declare_arguments
, {
12118 "Arguments", "amqp.queue.declare.arguments",
12119 FT_NONE
, BASE_NONE
, NULL
, 0,
12120 "Declaration arguments", HFILL
}},
12121 {&hf_amqp_0_10_method_queue_delete_if_unused
, {
12122 "If-unused", "amqp.queue.delete.if-unused",
12123 FT_BOOLEAN
, 8, NULL
, 0x02,
12124 "Delete the queue only if there are no consumers", HFILL
}},
12125 {&hf_amqp_0_10_method_queue_delete_if_empty
, {
12126 "If-empty", "amqp.queue.delete.if-empty",
12127 FT_BOOLEAN
, 8, NULL
, 0x04,
12128 "Delete queue only if empty", HFILL
}},
12129 {&hf_amqp_0_10_method_file_qos_prefetch_size
, {
12130 "Prefetch-size", "amqp.file.qos.prefetch-size",
12131 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
12132 "Pre-fetch window size in octets", HFILL
}},
12133 {&hf_amqp_0_10_method_file_qos_prefetch_count
, {
12134 "Prefetch-count", "amqp.file.qos.prefetch-count",
12135 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
12136 "Pre-fetch window size in messages", HFILL
}},
12137 {&hf_amqp_0_10_method_file_qos_global
, {
12138 "Global", "amqp.file.qos.global",
12139 FT_BOOLEAN
, 8, NULL
, 0x04,
12140 "Apply QoS to entire connection", HFILL
}},
12141 {&hf_amqp_0_10_method_file_consumer_tag
, {
12142 "Consumer-tag", "amqp.file.consumer-tag",
12143 FT_UINT_STRING
, BASE_NONE
, NULL
, 0,
12144 "Consumer tag", HFILL
}},
12145 {&hf_amqp_0_10_method_file_consume_no_local
, {
12146 "No-local", "amqp.file.consume.no-local",
12147 FT_BOOLEAN
, 8, NULL
, 0x04,
12148 "Don't send messages to connection that publishes them", HFILL
}},
12149 {&hf_amqp_0_10_method_file_consume_no_ack
, {
12150 "No-ack", "amqp.file.consume.no-ack",
12151 FT_BOOLEAN
, 8, NULL
, 0x08,
12152 "No acknowledgement needed", HFILL
}},
12153 {&hf_amqp_0_10_method_file_consume_exclusive
, {
12154 "Exclusive", "amqp.file.consume.exclusive",
12155 FT_BOOLEAN
, 8, NULL
, 0x10,
12156 "Request exclusive access", HFILL
}},
12157 {&hf_amqp_0_10_method_file_consume_nowait
, {
12158 "Nowait", "amqp.file.consume.nowait",
12159 FT_BOOLEAN
, 8, NULL
, 0x20,
12160 "Do not send a reply", HFILL
}},
12161 {&hf_amqp_0_10_method_file_consume_arguments
, {
12162 "Arguments", "amqp.file.consume.arguments",
12163 FT_NONE
, BASE_NONE
, NULL
, 0,
12164 "Arguments for consuming", HFILL
}},
12165 {&hf_amqp_0_10_method_file_identifier
, {
12166 "Identifier", "amqp.file.identifier",
12167 FT_UINT_STRING
, BASE_NONE
, NULL
, 0,
12168 "Staging identifier", HFILL
}},
12169 {&hf_amqp_0_10_method_file_open_content_size
, {
12170 "Content-size", "amqp.file.open.content-size",
12171 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
12172 "Message content size in octets", HFILL
}},
12173 {&hf_amqp_0_10_method_file_open_ok_staged_size
, {
12174 "Staged-size", "amqp.file.open_ok.staged-size",
12175 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
12176 "Amount of previously staged content in octets", HFILL
}},
12177 {&hf_amqp_0_10_method_file_publish_exchange
, {
12178 "Exchange", "amqp.file.publish.exchange",
12179 FT_UINT_STRING
, BASE_NONE
, NULL
, 0,
12180 "Exchange to publish to", HFILL
}},
12181 {&hf_amqp_0_10_method_file_publish_routing_key
, {
12182 "Routing-key", "amqp.file.publish.routing-key",
12183 FT_UINT_STRING
, BASE_NONE
, NULL
, 0,
12184 "Message routing key", HFILL
}},
12185 {&hf_amqp_0_10_method_file_publish_mandatory
, {
12186 "Mandatory", "amqp.file.publish.mandatory",
12187 FT_BOOLEAN
, 8, NULL
, 0x04,
12188 "Mandatory routing", HFILL
}},
12189 {&hf_amqp_0_10_method_file_publish_immediate
, {
12190 "Immediate", "amqp.file.publish.immediate",
12191 FT_BOOLEAN
, 8, NULL
, 0x08,
12192 "Request immediate delivery", HFILL
}},
12193 {&hf_amqp_0_10_method_file_return_reply_code
, {
12194 "Reply-code", "amqp.file.return.reply-code",
12195 FT_UINT16
, BASE_DEC
, VALS(amqp_0_10_file_return_codes
), 0x0,
12197 {&hf_amqp_0_10_method_file_return_reply_text
, {
12198 "Reply-text", "amqp.file.return.reply-text",
12199 FT_UINT_STRING
, BASE_NONE
, NULL
, 0,
12200 "Localized reply text", HFILL
}},
12201 {&hf_amqp_0_10_method_file_return_exchange
, {
12202 "Exchange", "amqp.file.return.exchange",
12203 FT_UINT_STRING
, BASE_NONE
, NULL
, 0,
12204 "Exchange the original message was published to", HFILL
}},
12205 {&hf_amqp_0_10_method_file_return_routing_key
, {
12206 "Routing-key", "amqp.file.return.routing-key",
12207 FT_UINT_STRING
, BASE_NONE
, NULL
, 0,
12208 "Message routing key", HFILL
}},
12209 {&hf_amqp_0_10_method_file_deliver_consumer_tag
, {
12210 "Consumer-tag", "amqp.file.deliver.consumer-tag",
12211 FT_UINT_STRING
, BASE_NONE
, NULL
, 0,
12213 {&hf_amqp_0_10_method_file_deliver_delivery_tag
, {
12214 "Delivery-tag", "amqp.file.deliver.delivery-tag",
12215 FT_UINT64
, BASE_HEX
, NULL
, 0,
12216 "Server-assigned, session-specific delivery tag", HFILL
}},
12217 {&hf_amqp_0_10_method_file_deliver_redelivered
, {
12218 "Redelivered", "amqp.file.deliver.redelivered",
12219 FT_BOOLEAN
, 8, TFS(&tfs_yes_no
), 0x04,
12220 "Possible duplicate delivery", HFILL
}},
12221 {&hf_amqp_0_10_method_file_deliver_exchange
, {
12222 "Exchange", "amqp.file.deliver.exchange",
12223 FT_UINT_STRING
, BASE_NONE
, NULL
, 0,
12224 "Exchange the original message was published to", HFILL
}},
12225 {&hf_amqp_0_10_method_file_deliver_routing_key
, {
12226 "Routing-key", "amqp.file.deliver.routing-key",
12227 FT_UINT_STRING
, BASE_NONE
, NULL
, 0,
12228 "Message routing key", HFILL
}},
12229 {&hf_amqp_0_10_method_file_ack_delivery_tag
, {
12230 "Delivery-tag", "amqp.file.ack.delivery-tag",
12231 FT_UINT64
, BASE_HEX
, NULL
, 0,
12232 "Identifier of message being acknowledged", HFILL
}},
12233 {&hf_amqp_0_10_method_file_ack_multiple
, {
12234 "Multiple", "amqp.file.ack.multiple",
12235 FT_BOOLEAN
, 8, NULL
, 0x02,
12236 "Acknowledge multiple messages", HFILL
}},
12237 {&hf_amqp_0_10_method_file_reject_delivery_tag
, {
12238 "Delivery-tag", "amqp.file.reject.delivery-tag",
12239 FT_UINT64
, BASE_HEX
, NULL
, 0,
12240 "Identifier of message to be rejected", HFILL
}},
12241 {&hf_amqp_0_10_method_file_reject_requeue
, {
12242 "Requeue", "amqp.file.reject.requeue",
12243 FT_BOOLEAN
, 8, TFS(&tfs_yes_no
), 0x02,
12244 "Requeue the message", HFILL
}},
12245 {&hf_amqp_0_10_method_stream_qos_prefetch_size
, {
12246 "Prefetch-size", "amqp.stream.qos.prefetch-size",
12247 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
12248 "Pre-fetch window size in octets", HFILL
}},
12249 {&hf_amqp_0_10_method_stream_qos_prefetch_count
, {
12250 "Prefetch-count", "amqp.stream.qos.prefetch-count",
12251 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
12252 "Pre-fetch window size in messages", HFILL
}},
12254 {&hf_amqp_0_10_method_stream_qos_consume_rate
, {
12255 "Prefetch-size", "amqp.stream.qos.consume_rate",
12256 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
12257 "Desired transfer rate in octets/second", HFILL
}},
12259 {&hf_amqp_0_10_method_stream_qos_global
, {
12260 "Global", "amqp.stream.qos.global",
12261 FT_BOOLEAN
, 8, NULL
, 0x08,
12262 "Apply QoS to entire connection", HFILL
}},
12263 {&hf_amqp_0_10_method_stream_consumer_tag
, {
12264 "Consumer-tag", "amqp.stream.consumer-tag",
12265 FT_UINT_STRING
, BASE_NONE
, NULL
, 0,
12267 {&hf_amqp_0_10_method_stream_consume_no_local
, {
12268 "No-local", "amqp.stream.consume.no-local",
12269 FT_BOOLEAN
, 8, NULL
, 0x04,
12270 "Don't send messages to connection that publishes them", HFILL
}},
12271 {&hf_amqp_0_10_method_stream_consume_exclusive
, {
12272 "Exclusive", "amqp.stream.consume.exclusive",
12273 FT_BOOLEAN
, 8, NULL
, 0x08,
12274 "Request exclusive access", HFILL
}},
12275 {&hf_amqp_0_10_method_stream_consume_nowait
, {
12276 "Nowait", "amqp.stream.consume.nowait",
12277 FT_BOOLEAN
, 8, NULL
, 0x10,
12278 "Do not send a reply", HFILL
}},
12279 {&hf_amqp_0_10_method_stream_consume_arguments
, {
12280 "Arguments", "amqp.stream.consume.arguments",
12281 FT_NONE
, BASE_NONE
, NULL
, 0,
12282 "Arguments for consuming", HFILL
}},
12283 {&hf_amqp_0_10_method_stream_publish_exchange
, {
12284 "Exchange", "amqp.stream.publish.exchange",
12285 FT_UINT_STRING
, BASE_NONE
, NULL
, 0,
12286 "Exchange to publish to", HFILL
}},
12287 {&hf_amqp_0_10_method_stream_publish_routing_key
, {
12288 "Routing-key", "amqp.stream.publish.routing-key",
12289 FT_UINT_STRING
, BASE_NONE
, NULL
, 0,
12290 "Message routing key", HFILL
}},
12291 {&hf_amqp_0_10_method_stream_publish_mandatory
, {
12292 "Mandatory", "amqp.stream.publish.mandatory",
12293 FT_BOOLEAN
, 8, NULL
, 0x04,
12294 "Mandatory routing", HFILL
}},
12295 {&hf_amqp_0_10_method_stream_publish_immediate
, {
12296 "Immediate", "amqp.stream.publish.immediate",
12297 FT_BOOLEAN
, 8, NULL
, 0x08,
12298 "Request immediate delivery", HFILL
}},
12299 {&hf_amqp_0_10_method_stream_return_reply_code
, {
12300 "Reply-code", "amqp.stream.return.reply-code",
12301 FT_UINT16
, BASE_DEC
, VALS(amqp_0_10_stream_return_codes
), 0x0,
12303 {&hf_amqp_0_10_method_stream_return_reply_text
, {
12304 "Reply-text", "amqp.stream.return.reply-text",
12305 FT_UINT_STRING
, BASE_NONE
, NULL
, 0,
12306 "Localized reply text", HFILL
}},
12307 {&hf_amqp_0_10_method_stream_return_exchange
, {
12308 "Exchange", "amqp.stream.return.exchange",
12309 FT_UINT_STRING
, BASE_NONE
, NULL
, 0,
12310 "Exchange the original message was published to", HFILL
}},
12311 {&hf_amqp_0_10_method_stream_return_routing_key
, {
12312 "Routing-key", "amqp.stream.return.routing-key",
12313 FT_UINT_STRING
, BASE_NONE
, NULL
, 0,
12314 "Message routing key", HFILL
}},
12315 {&hf_amqp_0_10_method_stream_deliver_consumer_tag
, {
12316 "Consumer-tag", "amqp.stream.deliver.consumer-tag",
12317 FT_UINT_STRING
, BASE_NONE
, NULL
, 0,
12319 {&hf_amqp_0_10_method_stream_deliver_delivery_tag
, {
12320 "Delivery-tag", "amqp.stream.deliver.delivery-tag",
12321 FT_UINT64
, BASE_HEX
, NULL
, 0,
12322 "Server-assigned, session-specific delivery tag", HFILL
}},
12323 {&hf_amqp_0_10_method_stream_deliver_exchange
, {
12324 "Exchange", "amqp.stream.deliver.exchange",
12325 FT_UINT_STRING
, BASE_NONE
, NULL
, 0,
12326 "Exchange the original message was published to", HFILL
}},
12327 {&hf_amqp_0_10_method_stream_deliver_queue
, {
12328 "Queue", "amqp.stream.deliver.queue",
12329 FT_UINT_STRING
, BASE_NONE
, NULL
, 0,
12330 "Name of the queue the message came from", HFILL
}},
12331 {&hf_amqp_channel
, {
12332 "Channel", "amqp.channel",
12333 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
12334 "Channel ID", HFILL
}},
12335 {&hf_amqp_reserved
, {
12336 "Reserved", "amqp.reserved",
12337 FT_UINT32
, BASE_HEX
, NULL
, 0x0,
12339 {&hf_amqp_0_9_type
, {
12340 "Type", "amqp.type",
12341 FT_UINT8
, BASE_DEC
, VALS(amqp_0_9_frame_types
), 0x0,
12342 "Frame type", HFILL
}},
12343 {&hf_amqp_0_9_length
, {
12344 "Length", "amqp.length",
12345 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
12346 "Length of the frame", HFILL
}},
12347 {&hf_amqp_0_9_method_class_id
, {
12348 "Class", "amqp.method.class",
12349 FT_UINT16
, BASE_DEC
, VALS(amqp_0_9_method_classes
), 0x0,
12350 "Class ID", HFILL
}},
12351 {&hf_amqp_method_connection_method_id
, {
12352 "Method", "amqp.method.method",
12353 FT_UINT16
, BASE_DEC
, VALS(amqp_method_connection_methods
), 0x0,
12354 "Method ID", HFILL
}},
12355 {&hf_amqp_method_channel_method_id
, {
12356 "Method", "amqp.method.method",
12357 FT_UINT16
, BASE_DEC
, VALS(amqp_method_channel_methods
), 0x0,
12358 "Method ID", HFILL
}},
12359 {&hf_amqp_method_access_method_id
, {
12360 "Method", "amqp.method.method",
12361 FT_UINT16
, BASE_DEC
, VALS(amqp_method_access_methods
), 0x0,
12362 "Method ID", HFILL
}},
12363 {&hf_amqp_method_exchange_method_id
, {
12364 "Method", "amqp.method.method",
12365 FT_UINT16
, BASE_DEC
, VALS(amqp_method_exchange_methods
), 0x0,
12366 "Method ID", HFILL
}},
12367 {&hf_amqp_method_queue_method_id
, {
12368 "Method", "amqp.method.method",
12369 FT_UINT16
, BASE_DEC
, VALS(amqp_method_queue_methods
), 0x0,
12370 "Method ID", HFILL
}},
12371 {&hf_amqp_method_basic_method_id
, {
12372 "Method", "amqp.method.method",
12373 FT_UINT16
, BASE_DEC
, VALS(amqp_method_basic_methods
), 0x0,
12374 "Method ID", HFILL
}},
12375 {&hf_amqp_method_file_method_id
, {
12376 "Method", "amqp.method.method",
12377 FT_UINT16
, BASE_DEC
, VALS(amqp_method_file_methods
), 0x0,
12378 "Method ID", HFILL
}},
12379 {&hf_amqp_method_stream_method_id
, {
12380 "Method", "amqp.method.method",
12381 FT_UINT16
, BASE_DEC
, VALS(amqp_method_stream_methods
), 0x0,
12382 "Method ID", HFILL
}},
12383 {&hf_amqp_method_tx_method_id
, {
12384 "Method", "amqp.method.method",
12385 FT_UINT16
, BASE_DEC
, VALS(amqp_method_tx_methods
), 0x0,
12386 "Method ID", HFILL
}},
12387 {&hf_amqp_method_dtx_method_id
, {
12388 "Method", "amqp.method.method",
12389 FT_UINT16
, BASE_DEC
, VALS(amqp_method_dtx_methods
), 0x0,
12390 "Method ID", HFILL
}},
12391 {&hf_amqp_method_tunnel_method_id
, {
12392 "Method", "amqp.method.method",
12393 FT_UINT16
, BASE_DEC
, VALS(amqp_method_tunnel_methods
), 0x0,
12394 "Method ID", HFILL
}},
12395 {&hf_amqp_method_confirm_method_id
, {
12396 "Method", "amqp.method.method",
12397 FT_UINT16
, BASE_DEC
, VALS(amqp_method_confirm_methods
), 0x0,
12398 "Method ID", HFILL
}},
12399 {&hf_amqp_method_arguments
, {
12400 "Arguments", "amqp.method.arguments",
12401 FT_NONE
, BASE_NONE
, NULL
, 0x0,
12402 "Method arguments", HFILL
}},
12403 {&hf_amqp_method_connection_start_version_major
, {
12404 "Version-Major", "amqp.method.arguments.version_major",
12405 FT_UINT8
, BASE_DEC
, NULL
, 0,
12407 {&hf_amqp_method_connection_start_version_minor
, {
12408 "Version-Minor", "amqp.method.arguments.version_minor",
12409 FT_UINT8
, BASE_DEC
, NULL
, 0,
12411 {&hf_amqp_method_connection_start_server_properties
, {
12412 "Server-Properties", "amqp.method.arguments.server_properties",
12413 FT_NONE
, BASE_NONE
, NULL
, 0,
12415 {&hf_amqp_0_9_method_connection_start_mechanisms
, {
12416 "Mechanisms", "amqp.method.arguments.mechanisms",
12417 FT_BYTES
, BASE_NONE
, NULL
, 0,
12419 {&hf_amqp_0_10_method_connection_start_mechanisms
, {
12420 "Mechanisms", "amqp.method.arguments.mechanisms",
12421 FT_BYTES
, BASE_NONE
, NULL
, 0,
12422 "Supported security mechanisms", HFILL
}},
12423 {&hf_amqp_0_9_method_connection_start_locales
, {
12424 "Locales", "amqp.method.arguments.locales",
12425 FT_BYTES
, BASE_NONE
, NULL
, 0,
12427 {&hf_amqp_0_10_method_connection_start_locales
, {
12428 "Locales", "amqp.method.arguments.locales",
12429 FT_BYTES
, BASE_NONE
, NULL
, 0,
12430 "Supported message locales", HFILL
}},
12431 {&hf_amqp_method_connection_start_ok_client_properties
, {
12432 "Client-Properties", "amqp.method.arguments.client_properties",
12433 FT_NONE
, BASE_NONE
, NULL
, 0,
12435 {&hf_amqp_method_connection_start_ok_mechanism
, {
12436 "Mechanism", "amqp.method.arguments.mechanism",
12437 FT_UINT_STRING
, BASE_NONE
, NULL
, 0,
12439 {&hf_amqp_method_connection_start_ok_response
, {
12440 "Response", "amqp.method.arguments.response",
12441 FT_UINT_BYTES
, BASE_NONE
, NULL
, 0,
12443 {&hf_amqp_method_connection_start_ok_locale
, {
12444 "Locale", "amqp.method.arguments.locale",
12445 FT_UINT_STRING
, BASE_NONE
, NULL
, 0,
12447 {&hf_amqp_method_connection_secure_challenge
, {
12448 "Challenge", "amqp.method.arguments.challenge",
12449 FT_UINT_BYTES
, BASE_NONE
, NULL
, 0,
12451 {&hf_amqp_method_connection_secure_ok_response
, {
12452 "Response", "amqp.method.arguments.response",
12453 FT_UINT_BYTES
, BASE_NONE
, NULL
, 0,
12455 {&hf_amqp_method_connection_tune_channel_max
, {
12456 "Channel-Max", "amqp.method.arguments.channel_max",
12457 FT_UINT16
, BASE_DEC
, NULL
, 0,
12459 {&hf_amqp_0_9_method_connection_tune_frame_max
, {
12460 "Frame-Max", "amqp.method.arguments.frame_max",
12461 FT_UINT32
, BASE_DEC
, NULL
, 0,
12463 {&hf_amqp_0_10_method_connection_tune_frame_max
, {
12464 "Frame-Max", "amqp.method.arguments.frame_max",
12465 FT_UINT16
, BASE_DEC
, NULL
, 0,
12466 "Server-proposed maximum frame size", HFILL
}},
12467 {&hf_amqp_0_9_method_connection_tune_heartbeat
, {
12468 "Heartbeat", "amqp.method.arguments.heartbeat",
12469 FT_UINT16
, BASE_DEC
, NULL
, 0,
12471 {&hf_amqp_0_10_method_connection_tune_heartbeat_min
, {
12472 "Heartbeat-Min", "amqp.method.arguments.heartbeat_min",
12473 FT_UINT16
, BASE_DEC
, NULL
, 0,
12474 "Minimum heartbeat delay (seconds)", HFILL
}},
12475 {&hf_amqp_0_10_method_connection_tune_heartbeat_max
, {
12476 "Heartbeat-Max", "amqp.method.arguments.heartbeat_max",
12477 FT_UINT16
, BASE_DEC
, NULL
, 0,
12478 "Maximum heartbeat delay (seconds)", HFILL
}},
12479 {&hf_amqp_method_connection_tune_ok_channel_max
, {
12480 "Channel-Max", "amqp.method.arguments.channel_max",
12481 FT_UINT16
, BASE_DEC
, NULL
, 0,
12483 {&hf_amqp_0_9_method_connection_tune_ok_frame_max
, {
12484 "Frame-Max", "amqp.method.arguments.frame_max",
12485 FT_UINT32
, BASE_DEC
, NULL
, 0,
12487 {&hf_amqp_0_10_method_connection_tune_ok_frame_max
, {
12488 "Frame-Max", "amqp.method.arguments.frame_max",
12489 FT_UINT16
, BASE_DEC
, NULL
, 0,
12490 "Negotiated maximum frame size", HFILL
}},
12491 {&hf_amqp_method_connection_tune_ok_heartbeat
, {
12492 "Heartbeat", "amqp.method.arguments.heartbeat",
12493 FT_UINT16
, BASE_DEC
, NULL
, 0,
12495 {&hf_amqp_method_connection_open_virtual_host
, {
12496 "Virtual-Host", "amqp.method.arguments.virtual_host",
12497 FT_UINT_STRING
, BASE_NONE
, NULL
, 0,
12499 {&hf_amqp_0_9_method_connection_open_capabilities
, {
12500 "Capabilities", "amqp.method.arguments.capabilities",
12501 FT_STRING
, BASE_NONE
, NULL
, 0,
12503 {&hf_amqp_0_10_method_connection_open_capabilities
, {
12504 "Capabilities", "amqp.method.arguments.capabilities",
12505 FT_STRING
, BASE_NONE
, NULL
, 0,
12506 "Required capabilities", HFILL
}},
12507 {&hf_amqp_0_9_method_connection_open_insist
, {
12508 "Insist", "amqp.method.arguments.insist",
12509 FT_BOOLEAN
, 8, NULL
, 0x01,
12511 {&hf_amqp_0_10_method_connection_open_insist
, {
12512 "Insist", "amqp.method.arguments.insist",
12513 FT_BOOLEAN
, 8, NULL
, 0x04,
12514 "Client insists on this server", HFILL
}},
12515 {&hf_amqp_0_9_method_connection_open_ok_known_hosts
, {
12516 "Known-Hosts", "amqp.method.arguments.known_hosts",
12517 FT_STRING
, BASE_NONE
, NULL
, 0,
12519 {&hf_amqp_0_10_method_connection_open_ok_known_hosts
, {
12520 "Known-Hosts", "amqp.method.arguments.known_hosts_bytes",
12521 FT_BYTES
, BASE_NONE
, NULL
, 0,
12522 "Equivalent or alternate hosts for reconnection", HFILL
}},
12523 {&hf_amqp_method_connection_redirect_host
, {
12524 "Host", "amqp.method.arguments.host",
12525 FT_UINT_STRING
, BASE_NONE
, NULL
, 0,
12527 {&hf_amqp_0_9_method_connection_redirect_known_hosts
, {
12528 "Known-Hosts", "amqp.method.arguments.known_hosts",
12529 FT_STRING
, BASE_NONE
, NULL
, 0,
12531 {&hf_amqp_0_10_method_connection_redirect_known_hosts
, {
12532 "Known-Hosts", "amqp.method.arguments.known_hosts_bytes",
12533 FT_BYTES
, BASE_NONE
, NULL
, 0,
12534 "Equivalent or alternate hosts to redirect to", HFILL
}},
12535 {&hf_amqp_0_9_method_connection_close_reply_code
, {
12536 "Reply-Code", "amqp.method.arguments.reply_code",
12537 FT_UINT16
, BASE_DEC
, NULL
, 0,
12539 {&hf_amqp_0_10_method_connection_close_reply_code
, {
12540 "Reply-Code", "amqp.method.arguments.reply_code",
12541 FT_UINT16
, BASE_DEC
,
12542 VALS(amqp_0_10_method_connection_close_reply_codes
), 0,
12543 "Close reason", HFILL
}},
12544 {&hf_amqp_method_connection_close_reply_text
, {
12545 "Reply-Text", "amqp.method.arguments.reply_text",
12546 FT_UINT_STRING
, BASE_NONE
, NULL
, 0,
12548 {&hf_amqp_method_connection_close_class_id
, {
12549 "Class-Id", "amqp.method.arguments.class_id",
12550 FT_UINT16
, BASE_DEC
, NULL
, 0,
12552 {&hf_amqp_method_connection_close_method_id
, {
12553 "Method-Id", "amqp.method.arguments.method_id",
12554 FT_UINT16
, BASE_DEC
, NULL
, 0,
12556 {&hf_amqp_method_connection_blocked_reason
, {
12557 "Reason", "amqp.method.arguments.reason",
12558 FT_STRING
, BASE_NONE
, NULL
, 0,
12560 {&hf_amqp_method_channel_open_out_of_band
, {
12561 "Out-Of-Band", "amqp.method.arguments.out_of_band",
12562 FT_STRING
, BASE_NONE
, NULL
, 0,
12564 {&hf_amqp_method_channel_open_ok_channel_id
, {
12565 "Channel-Id", "amqp.method.arguments.channel_id",
12566 FT_BYTES
, BASE_NONE
, NULL
, 0,
12568 {&hf_amqp_method_channel_flow_active
, {
12569 "Active", "amqp.method.arguments.active",
12570 FT_BOOLEAN
, 8, NULL
, 0x01,
12572 {&hf_amqp_method_channel_flow_ok_active
, {
12573 "Active", "amqp.method.arguments.active",
12574 FT_BOOLEAN
, 8, NULL
, 0x01,
12576 {&hf_amqp_method_channel_close_reply_code
, {
12577 "Reply-Code", "amqp.method.arguments.reply_code",
12578 FT_UINT16
, BASE_DEC
, NULL
, 0,
12580 {&hf_amqp_method_channel_close_reply_text
, {
12581 "Reply-Text", "amqp.method.arguments.reply_text",
12582 FT_STRING
, BASE_NONE
, NULL
, 0,
12584 {&hf_amqp_method_channel_close_class_id
, {
12585 "Class-Id", "amqp.method.arguments.class_id",
12586 FT_UINT16
, BASE_DEC
, NULL
, 0,
12588 {&hf_amqp_method_channel_close_method_id
, {
12589 "Method-Id", "amqp.method.arguments.method_id",
12590 FT_UINT16
, BASE_DEC
, NULL
, 0,
12592 {&hf_amqp_method_channel_resume_channel_id
, {
12593 "Channel-Id", "amqp.method.arguments.channel_id",
12594 FT_BYTES
, BASE_NONE
, NULL
, 0,
12596 {&hf_amqp_method_access_request_realm
, {
12597 "Realm", "amqp.method.arguments.realm",
12598 FT_STRING
, BASE_NONE
, NULL
, 0,
12600 {&hf_amqp_method_access_request_exclusive
, {
12601 "Exclusive", "amqp.method.arguments.exclusive",
12602 FT_BOOLEAN
, 8, NULL
, 0x01,
12604 {&hf_amqp_method_access_request_passive
, {
12605 "Passive", "amqp.method.arguments.passive",
12606 FT_BOOLEAN
, 8, NULL
, 0x02,
12608 {&hf_amqp_method_access_request_active
, {
12609 "Active", "amqp.method.arguments.active",
12610 FT_BOOLEAN
, 8, NULL
, 0x04,
12612 {&hf_amqp_method_access_request_write
, {
12613 "Write", "amqp.method.arguments.write",
12614 FT_BOOLEAN
, 8, NULL
, 0x08,
12616 {&hf_amqp_method_access_request_read
, {
12617 "Read", "amqp.method.arguments.read",
12618 FT_BOOLEAN
, 8, NULL
, 0x10,
12620 {&hf_amqp_method_access_request_ok_ticket
, {
12621 "Ticket", "amqp.method.arguments.ticket",
12622 FT_UINT16
, BASE_DEC
, NULL
, 0,
12624 {&hf_amqp_method_exchange_declare_ticket
, {
12625 "Ticket", "amqp.method.arguments.ticket",
12626 FT_UINT16
, BASE_DEC
, NULL
, 0,
12628 {&hf_amqp_method_exchange_declare_exchange
, {
12629 "Exchange", "amqp.method.arguments.exchange",
12630 FT_STRING
, BASE_NONE
, NULL
, 0,
12632 {&hf_amqp_method_exchange_declare_type
, {
12633 "Type", "amqp.method.arguments.type",
12634 FT_STRING
, BASE_NONE
, NULL
, 0,
12636 {&hf_amqp_method_exchange_declare_passive
, {
12637 "Passive", "amqp.method.arguments.passive",
12638 FT_BOOLEAN
, 8, NULL
, 0x01,
12640 {&hf_amqp_method_exchange_declare_durable
, {
12641 "Durable", "amqp.method.arguments.durable",
12642 FT_BOOLEAN
, 8, NULL
, 0x02,
12644 {&hf_amqp_method_exchange_declare_auto_delete
, {
12645 "Auto-Delete", "amqp.method.arguments.auto_delete",
12646 FT_BOOLEAN
, 8, NULL
, 0x04,
12648 {&hf_amqp_method_exchange_declare_internal
, {
12649 "Internal", "amqp.method.arguments.internal",
12650 FT_BOOLEAN
, 8, NULL
, 0x08,
12652 {&hf_amqp_method_exchange_declare_nowait
, {
12653 "Nowait", "amqp.method.arguments.nowait",
12654 FT_BOOLEAN
, 8, NULL
, 0x10,
12656 {&hf_amqp_method_exchange_declare_arguments
, {
12657 "Arguments", "amqp.method.arguments.arguments",
12658 FT_NONE
, BASE_NONE
, NULL
, 0,
12660 {&hf_amqp_method_exchange_bind_destination
, {
12661 "Destination", "amqp.method.arguments.destination",
12662 FT_STRING
, BASE_NONE
, NULL
, 0,
12664 {&hf_amqp_method_exchange_bind_source
, {
12665 "Destination", "amqp.method.arguments.source",
12666 FT_STRING
, BASE_NONE
, NULL
, 0,
12668 {&hf_amqp_method_exchange_bind_routing_key
, {
12669 "Routing-Key", "amqp.method.arguments.routing_key",
12670 FT_STRING
, BASE_NONE
, NULL
, 0,
12672 {&hf_amqp_method_exchange_bind_nowait
, {
12673 "Nowait", "amqp.method.arguments.nowait",
12674 FT_BOOLEAN
, 8, NULL
, 0x01,
12676 {&hf_amqp_method_exchange_bind_arguments
, {
12677 "Arguments", "amqp.method.arguments.arguments",
12678 FT_NONE
, BASE_NONE
, NULL
, 0,
12680 {&hf_amqp_method_exchange_delete_ticket
, {
12681 "Ticket", "amqp.method.arguments.ticket",
12682 FT_UINT16
, BASE_DEC
, NULL
, 0,
12684 {&hf_amqp_method_exchange_delete_exchange
, {
12685 "Exchange", "amqp.method.arguments.exchange",
12686 FT_STRING
, BASE_NONE
, NULL
, 0,
12688 {&hf_amqp_method_exchange_delete_if_unused
, {
12689 "If-Unused", "amqp.method.arguments.if_unused",
12690 FT_BOOLEAN
, 8, NULL
, 0x01,
12692 {&hf_amqp_method_exchange_delete_nowait
, {
12693 "Nowait", "amqp.method.arguments.nowait",
12694 FT_BOOLEAN
, 8, NULL
, 0x02,
12696 {&hf_amqp_method_queue_declare_ticket
, {
12697 "Ticket", "amqp.method.arguments.ticket",
12698 FT_UINT16
, BASE_DEC
, NULL
, 0,
12700 {&hf_amqp_method_queue_declare_queue
, {
12701 "Queue", "amqp.method.arguments.queue",
12702 FT_STRING
, BASE_NONE
, NULL
, 0,
12704 {&hf_amqp_method_queue_declare_passive
, {
12705 "Passive", "amqp.method.arguments.passive",
12706 FT_BOOLEAN
, 8, NULL
, 0x01,
12708 {&hf_amqp_method_queue_declare_durable
, {
12709 "Durable", "amqp.method.arguments.durable",
12710 FT_BOOLEAN
, 8, NULL
, 0x02,
12712 {&hf_amqp_method_queue_declare_exclusive
, {
12713 "Exclusive", "amqp.method.arguments.exclusive",
12714 FT_BOOLEAN
, 8, NULL
, 0x04,
12716 {&hf_amqp_method_queue_declare_auto_delete
, {
12717 "Auto-Delete", "amqp.method.arguments.auto_delete",
12718 FT_BOOLEAN
, 8, NULL
, 0x08,
12720 {&hf_amqp_method_queue_declare_nowait
, {
12721 "Nowait", "amqp.method.arguments.nowait",
12722 FT_BOOLEAN
, 8, NULL
, 0x10,
12724 {&hf_amqp_method_queue_declare_arguments
, {
12725 "Arguments", "amqp.method.arguments.arguments",
12726 FT_NONE
, BASE_NONE
, NULL
, 0,
12728 {&hf_amqp_method_queue_declare_ok_queue
, {
12729 "Queue", "amqp.method.arguments.queue",
12730 FT_STRING
, BASE_NONE
, NULL
, 0,
12732 {&hf_amqp_method_queue_declare_ok_message_count
, {
12733 "Message-Count", "amqp.method.arguments.message_count",
12734 FT_UINT32
, BASE_DEC
, NULL
, 0,
12736 {&hf_amqp_method_queue_declare_ok_consumer_count
, {
12737 "Consumer-Count", "amqp.method.arguments.consumer_count",
12738 FT_UINT32
, BASE_DEC
, NULL
, 0,
12740 {&hf_amqp_method_queue_bind_ticket
, {
12741 "Ticket", "amqp.method.arguments.ticket",
12742 FT_UINT16
, BASE_DEC
, NULL
, 0,
12744 {&hf_amqp_method_queue_bind_queue
, {
12745 "Queue", "amqp.method.arguments.queue",
12746 FT_STRING
, BASE_NONE
, NULL
, 0,
12748 {&hf_amqp_method_queue_bind_exchange
, {
12749 "Exchange", "amqp.method.arguments.exchange",
12750 FT_STRING
, BASE_NONE
, NULL
, 0,
12752 {&hf_amqp_method_queue_bind_routing_key
, {
12753 "Routing-Key", "amqp.method.arguments.routing_key",
12754 FT_STRING
, BASE_NONE
, NULL
, 0,
12756 {&hf_amqp_method_queue_bind_nowait
, {
12757 "Nowait", "amqp.method.arguments.nowait",
12758 FT_BOOLEAN
, 8, NULL
, 0x01,
12760 {&hf_amqp_method_queue_bind_arguments
, {
12761 "Arguments", "amqp.method.arguments.arguments",
12762 FT_NONE
, BASE_NONE
, NULL
, 0,
12764 {&hf_amqp_method_queue_unbind_ticket
, {
12765 "Ticket", "amqp.method.arguments.ticket",
12766 FT_UINT16
, BASE_DEC
, NULL
, 0,
12768 {&hf_amqp_method_queue_unbind_queue
, {
12769 "Queue", "amqp.method.arguments.queue",
12770 FT_STRING
, BASE_NONE
, NULL
, 0,
12772 {&hf_amqp_method_queue_unbind_exchange
, {
12773 "Exchange", "amqp.method.arguments.exchange",
12774 FT_STRING
, BASE_NONE
, NULL
, 0,
12776 {&hf_amqp_method_queue_unbind_routing_key
, {
12777 "Routing-Key", "amqp.method.arguments.routing_key",
12778 FT_STRING
, BASE_NONE
, NULL
, 0,
12780 {&hf_amqp_method_queue_unbind_arguments
, {
12781 "Arguments", "amqp.method.arguments.arguments",
12782 FT_NONE
, BASE_NONE
, NULL
, 0,
12784 {&hf_amqp_method_queue_purge_ticket
, {
12785 "Ticket", "amqp.method.arguments.ticket",
12786 FT_UINT16
, BASE_DEC
, NULL
, 0,
12788 {&hf_amqp_method_queue_purge_queue
, {
12789 "Queue", "amqp.method.arguments.queue",
12790 FT_STRING
, BASE_NONE
, NULL
, 0,
12792 {&hf_amqp_method_queue_purge_nowait
, {
12793 "Nowait", "amqp.method.arguments.nowait",
12794 FT_BOOLEAN
, 8, NULL
, 0x01,
12796 {&hf_amqp_method_queue_purge_ok_message_count
, {
12797 "Message-Count", "amqp.method.arguments.message_count",
12798 FT_UINT32
, BASE_DEC
, NULL
, 0,
12800 {&hf_amqp_method_queue_delete_ticket
, {
12801 "Ticket", "amqp.method.arguments.ticket",
12802 FT_UINT16
, BASE_DEC
, NULL
, 0,
12804 {&hf_amqp_method_queue_delete_queue
, {
12805 "Queue", "amqp.method.arguments.queue",
12806 FT_STRING
, BASE_NONE
, NULL
, 0,
12808 {&hf_amqp_method_queue_delete_if_unused
, {
12809 "If-Unused", "amqp.method.arguments.if_unused",
12810 FT_BOOLEAN
, 8, NULL
, 0x01,
12812 {&hf_amqp_method_queue_delete_if_empty
, {
12813 "If-Empty", "amqp.method.arguments.if_empty",
12814 FT_BOOLEAN
, 8, NULL
, 0x02,
12816 {&hf_amqp_method_queue_delete_nowait
, {
12817 "Nowait", "amqp.method.arguments.nowait",
12818 FT_BOOLEAN
, 8, NULL
, 0x04,
12820 {&hf_amqp_method_queue_delete_ok_message_count
, {
12821 "Message-Count", "amqp.method.arguments.message_count",
12822 FT_UINT32
, BASE_DEC
, NULL
, 0,
12824 {&hf_amqp_method_basic_qos_prefetch_size
, {
12825 "Prefetch-Size", "amqp.method.arguments.prefetch_size",
12826 FT_UINT32
, BASE_DEC
, NULL
, 0,
12828 {&hf_amqp_method_basic_qos_prefetch_count
, {
12829 "Prefetch-Count", "amqp.method.arguments.prefetch_count",
12830 FT_UINT16
, BASE_DEC
, NULL
, 0,
12832 {&hf_amqp_method_basic_qos_global
, {
12833 "Global", "amqp.method.arguments.global",
12834 FT_BOOLEAN
, 8, NULL
, 0x01,
12836 {&hf_amqp_method_basic_consume_ticket
, {
12837 "Ticket", "amqp.method.arguments.ticket",
12838 FT_UINT16
, BASE_DEC
, NULL
, 0,
12840 {&hf_amqp_method_basic_consume_queue
, {
12841 "Queue", "amqp.method.arguments.queue",
12842 FT_STRING
, BASE_NONE
, NULL
, 0,
12844 {&hf_amqp_method_basic_consume_consumer_tag
, {
12845 "Consumer-Tag", "amqp.method.arguments.consumer_tag",
12846 FT_STRING
, BASE_NONE
, NULL
, 0,
12848 {&hf_amqp_method_basic_consume_no_local
, {
12849 "No-Local", "amqp.method.arguments.no_local",
12850 FT_BOOLEAN
, 8, NULL
, 0x01,
12852 {&hf_amqp_method_basic_consume_no_ack
, {
12853 "No-Ack", "amqp.method.arguments.no_ack",
12854 FT_BOOLEAN
, 8, NULL
, 0x02,
12856 {&hf_amqp_method_basic_consume_exclusive
, {
12857 "Exclusive", "amqp.method.arguments.exclusive",
12858 FT_BOOLEAN
, 8, NULL
, 0x04,
12860 {&hf_amqp_method_basic_consume_nowait
, {
12861 "Nowait", "amqp.method.arguments.nowait",
12862 FT_BOOLEAN
, 8, NULL
, 0x08,
12864 {&hf_amqp_method_basic_consume_filter
, {
12865 "Filter", "amqp.method.arguments.filter",
12866 FT_NONE
, BASE_NONE
, NULL
, 0,
12868 {&hf_amqp_method_basic_consume_ok_consumer_tag
, {
12869 "Consumer-Tag", "amqp.method.arguments.consumer_tag",
12870 FT_STRING
, BASE_NONE
, NULL
, 0,
12872 {&hf_amqp_method_basic_cancel_consumer_tag
, {
12873 "Consumer-Tag", "amqp.method.arguments.consumer_tag",
12874 FT_STRING
, BASE_NONE
, NULL
, 0,
12876 {&hf_amqp_method_basic_cancel_nowait
, {
12877 "Nowait", "amqp.method.arguments.nowait",
12878 FT_BOOLEAN
, 8, NULL
, 0x01,
12880 {&hf_amqp_method_basic_cancel_ok_consumer_tag
, {
12881 "Consumer-Tag", "amqp.method.arguments.consumer_tag",
12882 FT_STRING
, BASE_NONE
, NULL
, 0,
12884 {&hf_amqp_method_basic_publish_number
, {
12885 "Publish-Number", "amqp.method.arguments.publish_number",
12886 FT_UINT64
, BASE_DEC
, NULL
, 0,
12888 {&hf_amqp_method_basic_publish_ticket
, {
12889 "Ticket", "amqp.method.arguments.ticket",
12890 FT_UINT16
, BASE_DEC
, NULL
, 0,
12892 {&hf_amqp_method_basic_publish_exchange
, {
12893 "Exchange", "amqp.method.arguments.exchange",
12894 FT_STRING
, BASE_NONE
, NULL
, 0,
12896 {&hf_amqp_method_basic_publish_routing_key
, {
12897 "Routing-Key", "amqp.method.arguments.routing_key",
12898 FT_STRING
, BASE_NONE
, NULL
, 0,
12900 {&hf_amqp_method_basic_publish_mandatory
, {
12901 "Mandatory", "amqp.method.arguments.mandatory",
12902 FT_BOOLEAN
, 8, NULL
, 0x01,
12904 {&hf_amqp_method_basic_publish_immediate
, {
12905 "Immediate", "amqp.method.arguments.immediate",
12906 FT_BOOLEAN
, 8, NULL
, 0x02,
12908 {&hf_amqp_method_basic_return_reply_code
, {
12909 "Reply-Code", "amqp.method.arguments.reply_code",
12910 FT_UINT16
, BASE_DEC
, NULL
, 0,
12912 {&hf_amqp_method_basic_return_reply_text
, {
12913 "Reply-Text", "amqp.method.arguments.reply_text",
12914 FT_STRING
, BASE_NONE
, NULL
, 0,
12916 {&hf_amqp_method_basic_return_exchange
, {
12917 "Exchange", "amqp.method.arguments.exchange",
12918 FT_STRING
, BASE_NONE
, NULL
, 0,
12920 {&hf_amqp_method_basic_return_routing_key
, {
12921 "Routing-Key", "amqp.method.arguments.routing_key",
12922 FT_STRING
, BASE_NONE
, NULL
, 0,
12924 {&hf_amqp_method_basic_deliver_consumer_tag
, {
12925 "Consumer-Tag", "amqp.method.arguments.consumer_tag",
12926 FT_STRING
, BASE_NONE
, NULL
, 0,
12928 {&hf_amqp_method_basic_deliver_delivery_tag
, {
12929 "Delivery-Tag", "amqp.method.arguments.delivery_tag",
12930 FT_UINT64
, BASE_DEC
, NULL
, 0,
12932 {&hf_amqp_method_basic_deliver_redelivered
, {
12933 "Redelivered", "amqp.method.arguments.redelivered",
12934 FT_BOOLEAN
, 8, NULL
, 0x01,
12936 {&hf_amqp_method_basic_deliver_exchange
, {
12937 "Exchange", "amqp.method.arguments.exchange",
12938 FT_STRING
, BASE_NONE
, NULL
, 0,
12940 {&hf_amqp_method_basic_deliver_routing_key
, {
12941 "Routing-Key", "amqp.method.arguments.routing_key",
12942 FT_STRING
, BASE_NONE
, NULL
, 0,
12944 {&hf_amqp_method_basic_get_ticket
, {
12945 "Ticket", "amqp.method.arguments.ticket",
12946 FT_UINT16
, BASE_DEC
, NULL
, 0,
12948 {&hf_amqp_method_basic_get_queue
, {
12949 "Queue", "amqp.method.arguments.queue",
12950 FT_STRING
, BASE_NONE
, NULL
, 0,
12952 {&hf_amqp_method_basic_get_no_ack
, {
12953 "No-Ack", "amqp.method.arguments.no_ack",
12954 FT_BOOLEAN
, 8, NULL
, 0x01,
12956 {&hf_amqp_method_basic_get_ok_delivery_tag
, {
12957 "Delivery-Tag", "amqp.method.arguments.delivery_tag",
12958 FT_UINT64
, BASE_DEC
, NULL
, 0,
12960 {&hf_amqp_method_basic_get_ok_redelivered
, {
12961 "Redelivered", "amqp.method.arguments.redelivered",
12962 FT_BOOLEAN
, 8, NULL
, 0x01,
12964 {&hf_amqp_method_basic_get_ok_exchange
, {
12965 "Exchange", "amqp.method.arguments.exchange",
12966 FT_STRING
, BASE_NONE
, NULL
, 0,
12968 {&hf_amqp_method_basic_get_ok_routing_key
, {
12969 "Routing-Key", "amqp.method.arguments.routing_key",
12970 FT_STRING
, BASE_NONE
, NULL
, 0,
12972 {&hf_amqp_method_basic_get_ok_message_count
, {
12973 "Message-Count", "amqp.method.arguments.message_count",
12974 FT_UINT32
, BASE_DEC
, NULL
, 0,
12976 {&hf_amqp_method_basic_get_empty_cluster_id
, {
12977 "Cluster-Id", "amqp.method.arguments.cluster_id",
12978 FT_STRING
, BASE_NONE
, NULL
, 0,
12980 {&hf_amqp_method_basic_ack_delivery_tag
, {
12981 "Delivery-Tag", "amqp.method.arguments.delivery_tag",
12982 FT_UINT64
, BASE_DEC
, NULL
, 0,
12984 {&hf_amqp_method_basic_ack_multiple
, {
12985 "Multiple", "amqp.method.arguments.multiple",
12986 FT_BOOLEAN
, 8, NULL
, 0x01,
12988 {&hf_amqp_method_basic_reject_delivery_tag
, {
12989 "Delivery-Tag", "amqp.method.arguments.delivery_tag",
12990 FT_UINT64
, BASE_DEC
, NULL
, 0,
12992 {&hf_amqp_method_basic_reject_requeue
, {
12993 "Requeue", "amqp.method.arguments.requeue",
12994 FT_BOOLEAN
, 8, NULL
, 0x01,
12996 {&hf_amqp_method_basic_recover_requeue
, {
12997 "Requeue", "amqp.method.arguments.requeue",
12998 FT_BOOLEAN
, 8, NULL
, 0x01,
13000 {&hf_amqp_method_basic_nack_delivery_tag
, {
13001 "Delivery-Tag", "amqp.method.arguments.delivery_tag",
13002 FT_UINT64
, BASE_DEC
, NULL
, 0,
13004 {&hf_amqp_method_basic_nack_multiple
, {
13005 "Multiple", "amqp.method.arguments.multiple",
13006 FT_BOOLEAN
, 8, NULL
, 0x01,
13008 {&hf_amqp_method_basic_nack_requeue
, {
13009 "Requeue", "amqp.method.arguments.requeue",
13010 FT_BOOLEAN
, 8, NULL
, 0x02,
13012 {&hf_amqp_method_file_qos_prefetch_size
, {
13013 "Prefetch-Size", "amqp.method.arguments.prefetch_size",
13014 FT_UINT32
, BASE_DEC
, NULL
, 0,
13016 {&hf_amqp_method_file_qos_prefetch_count
, {
13017 "Prefetch-Count", "amqp.method.arguments.prefetch_count",
13018 FT_UINT16
, BASE_DEC
, NULL
, 0,
13020 {&hf_amqp_method_file_qos_global
, {
13021 "Global", "amqp.method.arguments.global",
13022 FT_BOOLEAN
, 8, NULL
, 0x01,
13024 {&hf_amqp_method_file_consume_ticket
, {
13025 "Ticket", "amqp.method.arguments.ticket",
13026 FT_UINT16
, BASE_DEC
, NULL
, 0,
13028 {&hf_amqp_method_file_consume_queue
, {
13029 "Queue", "amqp.method.arguments.queue",
13030 FT_STRING
, BASE_NONE
, NULL
, 0,
13032 {&hf_amqp_method_file_consume_consumer_tag
, {
13033 "Consumer-Tag", "amqp.method.arguments.consumer_tag",
13034 FT_STRING
, BASE_NONE
, NULL
, 0,
13036 {&hf_amqp_method_file_consume_no_local
, {
13037 "No-Local", "amqp.method.arguments.no_local",
13038 FT_BOOLEAN
, 8, NULL
, 0x01,
13040 {&hf_amqp_method_file_consume_no_ack
, {
13041 "No-Ack", "amqp.method.arguments.no_ack",
13042 FT_BOOLEAN
, 8, NULL
, 0x02,
13044 {&hf_amqp_method_file_consume_exclusive
, {
13045 "Exclusive", "amqp.method.arguments.exclusive",
13046 FT_BOOLEAN
, 8, NULL
, 0x04,
13048 {&hf_amqp_method_file_consume_nowait
, {
13049 "Nowait", "amqp.method.arguments.nowait",
13050 FT_BOOLEAN
, 8, NULL
, 0x08,
13052 {&hf_amqp_method_file_consume_filter
, {
13053 "Filter", "amqp.method.arguments.filter",
13054 FT_NONE
, BASE_NONE
, NULL
, 0,
13056 {&hf_amqp_method_file_consume_ok_consumer_tag
, {
13057 "Consumer-Tag", "amqp.method.arguments.consumer_tag",
13058 FT_STRING
, BASE_NONE
, NULL
, 0,
13060 {&hf_amqp_method_file_cancel_consumer_tag
, {
13061 "Consumer-Tag", "amqp.method.arguments.consumer_tag",
13062 FT_STRING
, BASE_NONE
, NULL
, 0,
13064 {&hf_amqp_method_file_cancel_nowait
, {
13065 "Nowait", "amqp.method.arguments.nowait",
13066 FT_BOOLEAN
, 8, NULL
, 0x01,
13068 {&hf_amqp_method_file_cancel_ok_consumer_tag
, {
13069 "Consumer-Tag", "amqp.method.arguments.consumer_tag",
13070 FT_STRING
, BASE_NONE
, NULL
, 0,
13072 {&hf_amqp_method_file_open_identifier
, {
13073 "Identifier", "amqp.method.arguments.identifier",
13074 FT_STRING
, BASE_NONE
, NULL
, 0,
13076 {&hf_amqp_method_file_open_content_size
, {
13077 "Content-Size", "amqp.method.arguments.content_size",
13078 FT_UINT64
, BASE_DEC
, NULL
, 0,
13080 {&hf_amqp_method_file_open_ok_staged_size
, {
13081 "Staged-Size", "amqp.method.arguments.staged_size",
13082 FT_UINT64
, BASE_DEC
, NULL
, 0,
13084 {&hf_amqp_method_file_publish_ticket
, {
13085 "Ticket", "amqp.method.arguments.ticket",
13086 FT_UINT16
, BASE_DEC
, NULL
, 0,
13088 {&hf_amqp_method_file_publish_exchange
, {
13089 "Exchange", "amqp.method.arguments.exchange",
13090 FT_STRING
, BASE_NONE
, NULL
, 0,
13092 {&hf_amqp_method_file_publish_routing_key
, {
13093 "Routing-Key", "amqp.method.arguments.routing_key",
13094 FT_STRING
, BASE_NONE
, NULL
, 0,
13096 {&hf_amqp_method_file_publish_mandatory
, {
13097 "Mandatory", "amqp.method.arguments.mandatory",
13098 FT_BOOLEAN
, 8, NULL
, 0x01,
13100 {&hf_amqp_method_file_publish_immediate
, {
13101 "Immediate", "amqp.method.arguments.immediate",
13102 FT_BOOLEAN
, 8, NULL
, 0x02,
13104 {&hf_amqp_method_file_publish_identifier
, {
13105 "Identifier", "amqp.method.arguments.identifier",
13106 FT_STRING
, BASE_NONE
, NULL
, 0,
13108 {&hf_amqp_method_file_return_reply_code
, {
13109 "Reply-Code", "amqp.method.arguments.reply_code",
13110 FT_UINT16
, BASE_DEC
, NULL
, 0,
13112 {&hf_amqp_method_file_return_reply_text
, {
13113 "Reply-Text", "amqp.method.arguments.reply_text",
13114 FT_STRING
, BASE_NONE
, NULL
, 0,
13116 {&hf_amqp_method_file_return_exchange
, {
13117 "Exchange", "amqp.method.arguments.exchange",
13118 FT_STRING
, BASE_NONE
, NULL
, 0,
13120 {&hf_amqp_method_file_return_routing_key
, {
13121 "Routing-Key", "amqp.method.arguments.routing_key",
13122 FT_STRING
, BASE_NONE
, NULL
, 0,
13124 {&hf_amqp_method_file_deliver_consumer_tag
, {
13125 "Consumer-Tag", "amqp.method.arguments.consumer_tag",
13126 FT_STRING
, BASE_NONE
, NULL
, 0,
13128 {&hf_amqp_method_file_deliver_delivery_tag
, {
13129 "Delivery-Tag", "amqp.method.arguments.delivery_tag",
13130 FT_UINT64
, BASE_DEC
, NULL
, 0,
13132 {&hf_amqp_method_file_deliver_redelivered
, {
13133 "Redelivered", "amqp.method.arguments.redelivered",
13134 FT_BOOLEAN
, 8, NULL
, 0x01,
13136 {&hf_amqp_method_file_deliver_exchange
, {
13137 "Exchange", "amqp.method.arguments.exchange",
13138 FT_STRING
, BASE_NONE
, NULL
, 0,
13140 {&hf_amqp_method_file_deliver_routing_key
, {
13141 "Routing-Key", "amqp.method.arguments.routing_key",
13142 FT_STRING
, BASE_NONE
, NULL
, 0,
13144 {&hf_amqp_method_file_deliver_identifier
, {
13145 "Identifier", "amqp.method.arguments.identifier",
13146 FT_STRING
, BASE_NONE
, NULL
, 0,
13148 {&hf_amqp_method_file_ack_delivery_tag
, {
13149 "Delivery-Tag", "amqp.method.arguments.delivery_tag",
13150 FT_UINT64
, BASE_DEC
, NULL
, 0,
13152 {&hf_amqp_method_file_ack_multiple
, {
13153 "Multiple", "amqp.method.arguments.multiple",
13154 FT_BOOLEAN
, 8, NULL
, 0x01,
13156 {&hf_amqp_method_file_reject_delivery_tag
, {
13157 "Delivery-Tag", "amqp.method.arguments.delivery_tag",
13158 FT_UINT64
, BASE_DEC
, NULL
, 0,
13160 {&hf_amqp_method_file_reject_requeue
, {
13161 "Requeue", "amqp.method.arguments.requeue",
13162 FT_BOOLEAN
, 8, NULL
, 0x01,
13164 {&hf_amqp_method_stream_qos_prefetch_size
, {
13165 "Prefetch-Size", "amqp.method.arguments.prefetch_size",
13166 FT_UINT32
, BASE_DEC
, NULL
, 0,
13168 {&hf_amqp_method_stream_qos_prefetch_count
, {
13169 "Prefetch-Count", "amqp.method.arguments.prefetch_count",
13170 FT_UINT16
, BASE_DEC
, NULL
, 0,
13172 {&hf_amqp_method_stream_qos_consume_rate
, {
13173 "Consume-Rate", "amqp.method.arguments.consume_rate",
13174 FT_UINT32
, BASE_DEC
, NULL
, 0,
13176 {&hf_amqp_method_stream_qos_global
, {
13177 "Global", "amqp.method.arguments.global",
13178 FT_BOOLEAN
, 8, NULL
, 0x01,
13180 {&hf_amqp_method_stream_consume_ticket
, {
13181 "Ticket", "amqp.method.arguments.ticket",
13182 FT_UINT16
, BASE_DEC
, NULL
, 0,
13184 {&hf_amqp_method_stream_consume_queue
, {
13185 "Queue", "amqp.method.arguments.queue",
13186 FT_STRING
, BASE_NONE
, NULL
, 0,
13188 {&hf_amqp_method_stream_consume_consumer_tag
, {
13189 "Consumer-Tag", "amqp.method.arguments.consumer_tag",
13190 FT_STRING
, BASE_NONE
, NULL
, 0,
13192 {&hf_amqp_method_stream_consume_no_local
, {
13193 "No-Local", "amqp.method.arguments.no_local",
13194 FT_BOOLEAN
, 8, NULL
, 0x01,
13196 {&hf_amqp_method_stream_consume_exclusive
, {
13197 "Exclusive", "amqp.method.arguments.exclusive",
13198 FT_BOOLEAN
, 8, NULL
, 0x02,
13200 {&hf_amqp_method_stream_consume_nowait
, {
13201 "Nowait", "amqp.method.arguments.nowait",
13202 FT_BOOLEAN
, 8, NULL
, 0x04,
13204 {&hf_amqp_method_stream_consume_filter
, {
13205 "Filter", "amqp.method.arguments.filter",
13206 FT_NONE
, BASE_NONE
, NULL
, 0,
13208 {&hf_amqp_method_stream_consume_ok_consumer_tag
, {
13209 "Consumer-Tag", "amqp.method.arguments.consumer_tag",
13210 FT_STRING
, BASE_NONE
, NULL
, 0,
13212 {&hf_amqp_method_stream_cancel_consumer_tag
, {
13213 "Consumer-Tag", "amqp.method.arguments.consumer_tag",
13214 FT_STRING
, BASE_NONE
, NULL
, 0,
13216 {&hf_amqp_method_stream_cancel_nowait
, {
13217 "Nowait", "amqp.method.arguments.nowait",
13218 FT_BOOLEAN
, 8, NULL
, 0x01,
13220 {&hf_amqp_method_stream_cancel_ok_consumer_tag
, {
13221 "Consumer-Tag", "amqp.method.arguments.consumer_tag",
13222 FT_STRING
, BASE_NONE
, NULL
, 0,
13224 {&hf_amqp_method_stream_publish_ticket
, {
13225 "Ticket", "amqp.method.arguments.ticket",
13226 FT_UINT16
, BASE_DEC
, NULL
, 0,
13228 {&hf_amqp_method_stream_publish_exchange
, {
13229 "Exchange", "amqp.method.arguments.exchange",
13230 FT_STRING
, BASE_NONE
, NULL
, 0,
13232 {&hf_amqp_method_stream_publish_routing_key
, {
13233 "Routing-Key", "amqp.method.arguments.routing_key",
13234 FT_STRING
, BASE_NONE
, NULL
, 0,
13236 {&hf_amqp_method_stream_publish_mandatory
, {
13237 "Mandatory", "amqp.method.arguments.mandatory",
13238 FT_BOOLEAN
, 8, NULL
, 0x01,
13240 {&hf_amqp_method_stream_publish_immediate
, {
13241 "Immediate", "amqp.method.arguments.immediate",
13242 FT_BOOLEAN
, 8, NULL
, 0x02,
13244 {&hf_amqp_method_stream_return_reply_code
, {
13245 "Reply-Code", "amqp.method.arguments.reply_code",
13246 FT_UINT16
, BASE_DEC
, NULL
, 0,
13248 {&hf_amqp_method_stream_return_reply_text
, {
13249 "Reply-Text", "amqp.method.arguments.reply_text",
13250 FT_STRING
, BASE_NONE
, NULL
, 0,
13252 {&hf_amqp_method_stream_return_exchange
, {
13253 "Exchange", "amqp.method.arguments.exchange",
13254 FT_STRING
, BASE_NONE
, NULL
, 0,
13256 {&hf_amqp_method_stream_return_routing_key
, {
13257 "Routing-Key", "amqp.method.arguments.routing_key",
13258 FT_STRING
, BASE_NONE
, NULL
, 0,
13260 {&hf_amqp_method_stream_deliver_consumer_tag
, {
13261 "Consumer-Tag", "amqp.method.arguments.consumer_tag",
13262 FT_STRING
, BASE_NONE
, NULL
, 0,
13264 {&hf_amqp_method_stream_deliver_delivery_tag
, {
13265 "Delivery-Tag", "amqp.method.arguments.delivery_tag",
13266 FT_UINT64
, BASE_DEC
, NULL
, 0,
13268 {&hf_amqp_method_stream_deliver_exchange
, {
13269 "Exchange", "amqp.method.arguments.exchange",
13270 FT_STRING
, BASE_NONE
, NULL
, 0,
13272 {&hf_amqp_method_stream_deliver_queue
, {
13273 "Queue", "amqp.method.arguments.queue",
13274 FT_STRING
, BASE_NONE
, NULL
, 0,
13276 {&hf_amqp_method_dtx_start_dtx_identifier
, {
13277 "Dtx-Identifier", "amqp.method.arguments.dtx_identifier",
13278 FT_STRING
, BASE_NONE
, NULL
, 0,
13280 {&hf_amqp_method_tunnel_request_meta_data
, {
13281 "Meta-Data", "amqp.method.arguments.meta_data",
13282 FT_NONE
, BASE_NONE
, NULL
, 0,
13284 {&hf_amqp_method_confirm_select_nowait
, {
13285 "Nowait", "amqp.method.arguments.nowait",
13286 FT_BOOLEAN
, 8, NULL
, 0x01,
13289 "Field", "amqp.field",
13290 FT_NONE
, BASE_NONE
, NULL
, 0,
13292 {&hf_amqp_field_name
, {
13293 "Name", "amqp.field.name",
13294 FT_STRING
, BASE_NONE
, NULL
, 0,
13296 {&hf_amqp_field_type
, {
13297 "Type", "amqp.field.type",
13298 FT_CHAR
, BASE_HEX
, VALS(amqp_0_9_field_type_vals
), 0,
13300 {&hf_amqp_field_integer
, {
13301 "Value", "amqp.field.integer",
13302 FT_INT32
, BASE_DEC
, NULL
, 0,
13304 {&hf_amqp_field_unsigned_integer
, {
13305 "Value", "amqp.field.unsigned_integer",
13306 FT_UINT32
, BASE_DEC
, NULL
, 0,
13308 {&hf_amqp_field_string
, {
13309 "Value", "amqp.field.string",
13310 FT_UINT_STRING
, BASE_NONE
, NULL
, 0,
13312 {&hf_amqp_field_boolean
, {
13313 "Value", "amqp.field.boolean",
13314 FT_BOOLEAN
, BASE_NONE
, NULL
, 0,
13316 {&hf_amqp_field_byte
, {
13317 "Value", "amqp.field.byte",
13318 FT_INT8
, BASE_DEC
, NULL
, 0,
13320 {&hf_amqp_field_unsigned_byte
, {
13321 "Value", "amqp.field.unsigned_byte",
13322 FT_UINT8
, BASE_DEC
, NULL
, 0,
13324 {&hf_amqp_field_short_int
, {
13325 "Value", "amqp.field.short_int",
13326 FT_INT16
, BASE_DEC
, NULL
, 0,
13328 {&hf_amqp_field_short_uint
, {
13329 "Value", "amqp.field.short_uint",
13330 FT_UINT16
, BASE_DEC
, NULL
, 0,
13332 {&hf_amqp_field_long_int
, {
13333 "Value", "amqp.field.long_int",
13334 FT_INT64
, BASE_DEC
, NULL
, 0,
13336 {&hf_amqp_field_float
, {
13337 "Value", "amqp.field.float",
13338 FT_FLOAT
, BASE_NONE
, NULL
, 0,
13340 {&hf_amqp_field_double
, {
13341 "Value", "amqp.field.double",
13342 FT_DOUBLE
, BASE_NONE
, NULL
, 0,
13344 {&hf_amqp_field_decimal
, {
13345 "Value", "amqp.field.decimal",
13346 FT_DOUBLE
, BASE_NONE
, NULL
, 0,
13348 {&hf_amqp_field_timestamp
, {
13349 "Value", "amqp.field.timestamp",
13350 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_UTC
, NULL
, 0x0,
13352 {&hf_amqp_field_byte_array
, {
13353 "Value", "amqp.field.byte_array",
13354 FT_UINT_BYTES
, BASE_NONE
, NULL
, 0,
13356 {&hf_amqp_header_class_id
, {
13357 "Class ID", "amqp.header.class",
13358 FT_UINT16
, BASE_DEC
, VALS(amqp_0_9_method_classes
), 0,
13360 {&hf_amqp_header_weight
, {
13361 "Weight", "amqp.header.weight",
13362 FT_UINT16
, BASE_DEC
, NULL
, 0,
13364 {&hf_amqp_header_body_size
, {
13365 "Body size", "amqp.header.body-size",
13366 FT_UINT64
, BASE_DEC
, NULL
, 0,
13368 {&hf_amqp_header_property_flags
, {
13369 "Property flags", "amqp.header.property-flags",
13370 FT_UINT16
, BASE_HEX
, NULL
, 0,
13372 {&hf_amqp_header_properties
, {
13373 "Properties", "amqp.header.properties",
13374 FT_NONE
, BASE_NONE
, NULL
, 0x0,
13375 "Message properties", HFILL
}},
13376 {&hf_amqp_header_basic_content_type
, {
13377 "Content-Type", "amqp.method.properties.content_type",
13378 FT_STRING
, BASE_NONE
, NULL
, 0,
13380 {&hf_amqp_header_basic_content_encoding
, {
13381 "Content-Encoding", "amqp.method.properties.content_encoding",
13382 FT_STRING
, BASE_NONE
, NULL
, 0,
13384 {&hf_amqp_header_basic_headers
, {
13385 "Headers", "amqp.method.properties.headers",
13386 FT_NONE
, BASE_NONE
, NULL
, 0,
13388 {&hf_amqp_header_basic_delivery_mode
, {
13389 "Delivery-Mode", "amqp.method.properties.delivery_mode",
13390 FT_UINT8
, BASE_DEC
, NULL
, 0,
13392 {&hf_amqp_header_basic_priority
, {
13393 "Priority", "amqp.method.properties.priority",
13394 FT_UINT8
, BASE_DEC
, NULL
, 0,
13396 {&hf_amqp_header_basic_correlation_id
, {
13397 "Correlation-Id", "amqp.method.properties.correlation_id",
13398 FT_STRING
, BASE_NONE
, NULL
, 0,
13400 {&hf_amqp_header_basic_reply_to
, {
13401 "Reply-To", "amqp.method.properties.reply_to",
13402 FT_STRING
, BASE_NONE
, NULL
, 0,
13404 {&hf_amqp_header_basic_expiration
, {
13405 "Expiration", "amqp.method.properties.expiration",
13406 FT_STRING
, BASE_NONE
, NULL
, 0,
13408 {&hf_amqp_header_basic_message_id
, {
13409 "Message-Id", "amqp.method.properties.message_id",
13410 FT_STRING
, BASE_NONE
, NULL
, 0,
13412 {&hf_amqp_header_basic_timestamp
, {
13413 "Timestamp", "amqp.method.properties.timestamp",
13414 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_UTC
, NULL
, 0,
13416 {&hf_amqp_header_basic_type
, {
13417 "Type", "amqp.method.properties.type",
13418 FT_STRING
, BASE_NONE
, NULL
, 0,
13420 {&hf_amqp_header_basic_user_id
, {
13421 "User-Id", "amqp.method.properties.user_id",
13422 FT_STRING
, BASE_NONE
, NULL
, 0,
13424 {&hf_amqp_header_basic_app_id
, {
13425 "App-Id", "amqp.method.properties.app_id",
13426 FT_STRING
, BASE_NONE
, NULL
, 0,
13428 {&hf_amqp_header_basic_cluster_id
, {
13429 "Cluster-Id", "amqp.method.properties.cluster_id",
13430 FT_STRING
, BASE_NONE
, NULL
, 0,
13432 {&hf_amqp_header_file_content_type
, {
13433 "Content-Type", "amqp.method.properties.content_type",
13434 FT_STRING
, BASE_NONE
, NULL
, 0,
13436 {&hf_amqp_header_file_content_encoding
, {
13437 "Content-Encoding", "amqp.method.properties.content_encoding",
13438 FT_STRING
, BASE_NONE
, NULL
, 0,
13440 {&hf_amqp_header_file_headers
, {
13441 "Headers", "amqp.method.properties.headers",
13442 FT_NONE
, BASE_NONE
, NULL
, 0,
13444 {&hf_amqp_header_file_priority
, {
13445 "Priority", "amqp.method.properties.priority",
13446 FT_UINT8
, BASE_DEC
, NULL
, 0,
13448 {&hf_amqp_header_file_reply_to
, {
13449 "Reply-To", "amqp.method.properties.reply_to",
13450 FT_STRING
, BASE_NONE
, NULL
, 0,
13452 {&hf_amqp_header_file_message_id
, {
13453 "Message-Id", "amqp.method.properties.message_id",
13454 FT_STRING
, BASE_NONE
, NULL
, 0,
13456 {&hf_amqp_header_file_filename
, {
13457 "Filename", "amqp.method.properties.filename",
13458 FT_STRING
, BASE_NONE
, NULL
, 0,
13460 {&hf_amqp_header_file_timestamp
, {
13461 "Timestamp", "amqp.method.properties.timestamp",
13462 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_UTC
, NULL
, 0x0,
13464 {&hf_amqp_header_file_cluster_id
, {
13465 "Cluster-Id", "amqp.method.properties.cluster_id",
13466 FT_STRING
, BASE_NONE
, NULL
, 0,
13468 {&hf_amqp_header_stream_content_type
, {
13469 "Content-Type", "amqp.method.properties.content_type",
13470 FT_STRING
, BASE_NONE
, NULL
, 0,
13472 {&hf_amqp_header_stream_content_encoding
, {
13473 "Content-Encoding", "amqp.method.properties.content_encoding",
13474 FT_STRING
, BASE_NONE
, NULL
, 0,
13476 {&hf_amqp_header_stream_headers
, {
13477 "Headers", "amqp.method.properties.headers",
13478 FT_NONE
, BASE_NONE
, NULL
, 0,
13480 {&hf_amqp_header_stream_priority
, {
13481 "Priority", "amqp.method.properties.priority",
13482 FT_UINT8
, BASE_DEC
, NULL
, 0,
13484 {&hf_amqp_header_stream_timestamp
, {
13485 "Timestamp", "amqp.method.properties.timestamp",
13486 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_UTC
, NULL
, 0x0,
13488 {&hf_amqp_header_tunnel_headers
, {
13489 "Headers", "amqp.method.properties.headers",
13490 FT_NONE
, BASE_NONE
, NULL
, 0,
13492 {&hf_amqp_header_tunnel_proxy_name
, {
13493 "Proxy-Name", "amqp.method.properties.proxy_name",
13494 FT_STRING
, BASE_NONE
, NULL
, 0,
13496 {&hf_amqp_header_tunnel_data_name
, {
13497 "Data-Name", "amqp.method.properties.data_name",
13498 FT_STRING
, BASE_NONE
, NULL
, 0,
13500 {&hf_amqp_header_tunnel_durable
, {
13501 "Durable", "amqp.method.properties.durable",
13502 FT_UINT8
, BASE_DEC
, NULL
, 0,
13504 {&hf_amqp_header_tunnel_broadcast
, {
13505 "Broadcast", "amqp.method.properties.broadcast",
13506 FT_UINT8
, BASE_DEC
, NULL
, 0,
13508 {&hf_amqp_0_10_dtx_xa_status
, {
13509 "DTX xa-status", "amqp.dtx.xa-status",
13510 FT_UINT16
, BASE_DEC
, VALS(amqp_0_10_xa_status
), 0,
13512 {&hf_amqp_payload
, {
13513 "Payload", "amqp.payload",
13514 FT_BYTES
, BASE_NONE
, NULL
, 0,
13515 "Message payload", HFILL
}},
13516 {&hf_amqp_init_protocol
, {
13517 "Protocol", "amqp.init.protocol",
13518 FT_STRING
, BASE_NONE
, NULL
, 0,
13519 "Protocol name", HFILL
}},
13520 {&hf_amqp_init_id_major
, {
13521 "Protocol ID Major", "amqp.init.id_major",
13522 FT_UINT8
, BASE_DEC
, NULL
, 0,
13524 {&hf_amqp_init_id_minor
, {
13525 "Protocol ID Minor", "amqp.init.id_minor",
13526 FT_UINT8
, BASE_DEC
, NULL
, 0,
13528 {&hf_amqp_init_id
, {
13529 "Protocol-ID", "amqp.init.id",
13530 FT_UINT8
, BASE_DEC
, NULL
, 0,
13532 {&hf_amqp_init_version_major
, {
13533 "Version Major", "amqp.init.version_major",
13534 FT_UINT8
, BASE_DEC
, NULL
, 0,
13535 "Protocol version major", HFILL
}},
13536 {&hf_amqp_init_version_minor
, {
13537 "Version Minor", "amqp.init.version_minor",
13538 FT_UINT8
, BASE_DEC
, NULL
, 0,
13539 "Protocol version minor", HFILL
}},
13540 {&hf_amqp_init_version_revision
, {
13541 "Version-Revision", "amqp.init.version_revision",
13542 FT_UINT8
, BASE_DEC
, NULL
, 0,
13543 "Protocol version revision", HFILL
}},
13544 {&hf_amqp_message_in
, {
13545 "Message in frame", "amqp.message_in",
13546 FT_FRAMENUM
, BASE_NONE
, NULL
, 0,
13548 {&hf_amqp_ack_in
, {
13549 "Ack in frame", "amqp.ack_in",
13550 FT_FRAMENUM
, BASE_NONE
, NULL
, 0,
13552 {&hf_amqp_method_connection_start_server_properties_size
, {
13553 "Size", "amqp.method.connection_start.server_properties.size",
13554 FT_UINT32
, BASE_DEC
, NULL
, 0,
13556 {&hf_amqp_0_10_method_connection_start_mechanisms_size
, {
13557 "Size", "amqp.method.connection_start.server_properties.size",
13558 FT_UINT32
, BASE_DEC
, NULL
, 0,
13560 {&hf_amqp_0_10_method_connection_start_locales_size
, {
13561 "Size", "amqp.method.connection_start.locales.size",
13562 FT_UINT32
, BASE_DEC
, NULL
, 0,
13564 {&hf_amqp_method_connection_start_ok_client_properties_size
, {
13565 "Size", "amqp.method.connection_start.ok_client_properties.size",
13566 FT_UINT32
, BASE_DEC
, NULL
, 0,
13568 {&hf_amqp_0_10_method_connection_open_capabilities_size
, {
13569 "Size", "amqp.method.connection_open.capabilities.size",
13570 FT_UINT32
, BASE_DEC
, NULL
, 0,
13572 {&hf_amqp_0_10_method_connection_open_ok_known_hosts_size
, {
13573 "Size", "amqp.method.connection_open.ok_known_hosts.size",
13574 FT_UINT32
, BASE_DEC
, NULL
, 0,
13576 {&hf_amqp_0_10_method_connection_redirect_known_hosts_size
, {
13577 "Size", "amqp.method.connection_redirect.known_hosts.size",
13578 FT_UINT32
, BASE_DEC
, NULL
, 0,
13580 {&hf_amqp_0_10_method_execution_error_info_size
, {
13581 "Size", "amqp.method.execution.error_info.size",
13582 FT_UINT32
, BASE_DEC
, NULL
, 0,
13584 {&hf_amqp_0_10_method_exchange_declare_arguments_size
, {
13585 "Size", "amqp.method.exchange.declare_argument.size",
13586 FT_UINT32
, BASE_DEC
, NULL
, 0,
13588 {&hf_amqp_0_10_method_queue_declare_arguments_size
, {
13589 "Size", "amqp.method.queue.declare_argument.size",
13590 FT_UINT32
, BASE_DEC
, NULL
, 0,
13592 {&hf_amqp_0_10_method_file_consume_arguments_size
, {
13593 "Size", "amqp.method.file.consume_arguments.size",
13594 FT_UINT32
, BASE_DEC
, NULL
, 0,
13596 {&hf_amqp_0_10_method_stream_consume_arguments_size
, {
13597 "Size", "amqp.method.stream.consume_arguments.size",
13598 FT_UINT32
, BASE_DEC
, NULL
, 0,
13600 {&hf_amqp_0_10_struct_message_properties_application_headers_size
, {
13601 "Size", "amqp.struct.message_properties.application_headers.size",
13602 FT_UINT32
, BASE_DEC
, NULL
, 0,
13604 {&hf_amqp_0_10_struct_file_properties_headers_size
, {
13605 "Size", "amqp.struct.file.properties_headers.size",
13606 FT_UINT32
, BASE_DEC
, NULL
, 0,
13608 {&hf_amqp_0_10_struct_stream_properties_headers_size
, {
13609 "Size", "amqp.struct.stream.properties_headers.size",
13610 FT_UINT32
, BASE_DEC
, NULL
, 0,
13612 {&hf_amqp_0_10_struct_dtx_recover_result_size
, {
13613 "Size", "amqp.struct.dtx_recover.result.size",
13614 FT_UINT32
, BASE_DEC
, NULL
, 0,
13618 /* Setup of protocol subtree array */
13620 static int *ett
[] = {
13627 &ett_amqp_0_9_field
,
13628 &ett_amqp_0_10_map
,
13629 &ett_amqp_0_10_array
,
13630 &ett_amqp_0_10_struct
,
13631 &ett_amqp_1_0_array
,
13636 static ei_register_info ei
[] = {
13637 { &ei_amqp_connection_error
, { "amqp.connection.error", PI_RESPONSE_CODE
, PI_WARN
, "Connection error", EXPFILL
}},
13638 { &ei_amqp_channel_error
, { "amqp.channel.error", PI_RESPONSE_CODE
, PI_WARN
, "Channel error", EXPFILL
}},
13639 { &ei_amqp_message_undeliverable
, { "amqp.message.undeliverable", PI_RESPONSE_CODE
, PI_WARN
, "Message was not delivered", EXPFILL
}},
13640 { &ei_amqp_bad_flag_value
, { "amqp.bad_flag_value", PI_PROTOCOL
, PI_WARN
, "Bad flag value", EXPFILL
}},
13641 { &ei_amqp_bad_length
, { "amqp.bad_length", PI_MALFORMED
, PI_ERROR
, "Bad frame length", EXPFILL
}},
13642 { &ei_amqp_field_short
, { "amqp.field_short", PI_PROTOCOL
, PI_ERROR
, "Field is cut off by the end of the field table", EXPFILL
}},
13643 { &ei_amqp_invalid_class_code
, { "amqp.unknown.class_code", PI_PROTOCOL
, PI_WARN
, "Invalid class code", EXPFILL
}},
13644 { &ei_amqp_unknown_command_class
, { "amqp.unknown.command_class", PI_PROTOCOL
, PI_ERROR
, "Unknown command/control class", EXPFILL
}},
13645 { &ei_amqp_unknown_frame_type
, { "amqp.unknown.frame_type", PI_PROTOCOL
, PI_ERROR
, "Unknown frame type", EXPFILL
}},
13646 { &ei_amqp_unknown_connection_method
, { "amqp.unknown.method.connection", PI_PROTOCOL
, PI_ERROR
, "Unknown connection method", EXPFILL
}},
13647 { &ei_amqp_unknown_channel_method
, { "amqp.unknown.method.channel", PI_PROTOCOL
, PI_ERROR
, "Unknown channel method", EXPFILL
}},
13648 { &ei_amqp_unknown_access_method
, { "amqp.unknown.method.access", PI_PROTOCOL
, PI_ERROR
, "Unknown access method", EXPFILL
}},
13649 { &ei_amqp_unknown_exchange_method
, { "amqp.unknown.method.exchange", PI_PROTOCOL
, PI_ERROR
, "Unknown exchange method", EXPFILL
}},
13650 { &ei_amqp_unknown_queue_method
, { "amqp.unknown.method.queue", PI_PROTOCOL
, PI_ERROR
, "Unknown queue method", EXPFILL
}},
13651 { &ei_amqp_unknown_basic_method
, { "amqp.unknown.method.basic", PI_PROTOCOL
, PI_ERROR
, "Unknown basic method", EXPFILL
}},
13652 { &ei_amqp_unknown_file_method
, { "amqp.unknown.method.file", PI_PROTOCOL
, PI_ERROR
, "Unknown file method", EXPFILL
}},
13653 { &ei_amqp_unknown_stream_method
, { "amqp.unknown.method.stream", PI_PROTOCOL
, PI_ERROR
, "Unknown stream method", EXPFILL
}},
13654 { &ei_amqp_unknown_tx_method
, { "amqp.unknown.method.tx", PI_PROTOCOL
, PI_ERROR
, "Unknown tx method", EXPFILL
}},
13655 { &ei_amqp_unknown_dtx_method
, { "amqp.unknown.method.dtx", PI_PROTOCOL
, PI_ERROR
, "Unknown dtx method", EXPFILL
}},
13656 { &ei_amqp_unknown_tunnel_method
, { "amqp.unknown.method.tunnel", PI_PROTOCOL
, PI_ERROR
, "Unknown tunnel method", EXPFILL
}},
13657 { &ei_amqp_unknown_confirm_method
, { "amqp.unknown.method.confirm", PI_PROTOCOL
, PI_ERROR
, "Unknown confirm method", EXPFILL
}},
13658 { &ei_amqp_unknown_method_class
, { "amqp.unknown.method.class", PI_PROTOCOL
, PI_ERROR
, "Unknown method class", EXPFILL
}},
13659 { &ei_amqp_unknown_header_class
, { "amqp.unknown.header_class", PI_PROTOCOL
, PI_ERROR
, "Unknown header class", EXPFILL
}},
13660 { &ei_amqp_unknown_sasl_command
, { "amqp.unknown.sasl_command", PI_PROTOCOL
, PI_ERROR
, "Unknown SASL command", EXPFILL
}},
13661 { &ei_amqp_unknown_amqp_command
, { "amqp.unknown.amqp_command", PI_PROTOCOL
, PI_ERROR
, "Unknown AMQP command", EXPFILL
}},
13662 { &ei_amqp_unknown_amqp_type
, { "amqp.unknown.amqp_type", PI_PROTOCOL
, PI_ERROR
, "Unknown AMQP type", EXPFILL
}},
13663 { &ei_amqp_invalid_number_of_params
, { "amqp.invalid.params_number", PI_PROTOCOL
, PI_ERROR
, "Invalid number of parameters", EXPFILL
}},
13664 { &ei_amqp_size_exceeds_65K
, { "amqp.size_exceeds_65K", PI_PROTOCOL
, PI_WARN
, "Size field exceeds 65K; Dissection limited to 65K", EXPFILL
}},
13665 { &ei_amqp_array_type_unknown
, { "amqp.array_type_unknown", PI_PROTOCOL
, PI_WARN
, "Array type unknown", EXPFILL
}},
13669 static uat_field_t amqp_message_decode_flds
[] = {
13670 UAT_FLD_VS(message_decode
, match_criteria
, "Match criteria", match_criteria
, "Match criteria"),
13671 UAT_FLD_CSTRING(message_decode
, topic_pattern
, "Topic pattern", "Pattern to match for the topic"),
13672 UAT_FLD_DISSECTOR(message_decode
, payload_proto
, "Payload dissector",
13673 "Dissector to be used for the message part of the matching topic"),
13674 UAT_FLD_CSTRING(message_decode
, topic_more_info
, "Additional Data", "Additional Data to pass to the dissector"),
13678 uat_t
*message_uat
= uat_new("Message Decoding",
13679 sizeof(amqp_message_decode_t
),
13680 "amqp_message_decoding",
13682 &amqp_message_decodes
,
13683 &num_amqp_message_decodes
,
13684 UAT_AFFECTS_DISSECTION
, /* affects dissection of packets, but not set of named fields */
13685 "ChamqpMessageDecoding",
13686 amqp_message_decode_copy_cb
,
13687 amqp_message_decode_update_cb
,
13688 amqp_message_decode_free_cb
,
13691 amqp_message_decode_flds
);
13694 expert_module_t
* expert_amqp
;
13695 module_t
*amqp_module
;
13697 /* Decode As handling */
13698 static build_valid_func amqp_da_build_value
[1] = {amqp_value
};
13699 static decode_as_value_t amqp_da_values
= {amqp_prompt
, 1, amqp_da_build_value
};
13700 static decode_as_t amqp_da
= {"amqp", "amqp.version", 1, 0, &amqp_da_values
, NULL
, NULL
,
13701 decode_as_default_populate_list
, decode_as_default_reset
, decode_as_default_change
, NULL
};
13703 proto_amqp
= proto_register_protocol("Advanced Message Queuing Protocol", "AMQP", "amqp");
13705 /* Allows versions to be handled through Decode As */
13706 proto_amqpv0_9
= proto_register_protocol_in_name_only("AMQP Version 0.9", "Version 0.9", "amqp.version.v0_9", proto_amqp
, FT_BYTES
);
13707 proto_amqpv0_10
= proto_register_protocol_in_name_only("AMQP Version 0.10", "Version 0.10", "amqp.version.v0_10", proto_amqp
, FT_BYTES
);
13708 proto_amqpv1_0
= proto_register_protocol_in_name_only("AMQP Version 1.0", "Version 1.0", "amqp.version.v1_0", proto_amqp
, FT_BYTES
);
13710 amqp_tcp_handle
= register_dissector("amqp", dissect_amqp
, proto_amqp
);
13711 proto_register_field_array(proto_amqp
, hf
, array_length(hf
));
13712 proto_register_subtree_array(ett
, array_length(ett
));
13714 expert_amqp
= expert_register_protocol(proto_amqp
);
13715 expert_register_field_array(expert_amqp
, ei
, array_length(ei
));
13717 version_table
= register_dissector_table("amqp.version", "AMQP versions", proto_amqp
, FT_UINT8
, BASE_DEC
);
13719 amqp_module
= prefs_register_protocol(proto_amqp
, proto_reg_handoff_amqp
);
13721 prefs_register_uint_preference(amqp_module
, "tls.port",
13722 "AMQPS listening TCP Port",
13723 "Set the TCP port for AMQP over SSL/TLS"
13724 "(if other than the default of 5671)",
13726 prefs_register_obsolete_preference(amqp_module
, "ssl.port");
13728 register_decode_as(&amqp_da
);
13730 prefs_register_uat_preference(amqp_module
, "message_decode_table",
13731 "Message Decoding",
13732 "A table that enumerates custom message decodes to be used for a certain topic",
13737 proto_reg_handoff_amqp(void)
13739 static unsigned old_amqps_port
= 0;
13740 static bool initialize
= false;
13743 /* Register TCP port for dissection */
13744 dissector_add_uint_with_preference("tcp.port", AMQP_PORT
, amqp_tcp_handle
);
13746 dissector_add_uint("amqp.version", AMQP_V0_9
, create_dissector_handle( dissect_amqpv0_9
, proto_amqpv0_9
));
13747 dissector_add_uint("amqp.version", AMQP_V0_10
, create_dissector_handle( dissect_amqpv0_10
, proto_amqpv0_10
));
13748 dissector_add_uint("amqp.version", AMQP_V1_0
, create_dissector_handle( dissect_amqpv1_0
, proto_amqpv1_0
));
13750 media_type_subdissector_table
= find_dissector_table ("media_type");
13755 /* Register for SSL/TLS payload dissection */
13756 if (old_amqps_port
!= amqps_port
) {
13757 if (old_amqps_port
!= 0)
13758 ssl_dissector_delete(old_amqps_port
, amqp_tcp_handle
);
13759 ssl_dissector_add(amqps_port
, amqp_tcp_handle
);
13760 old_amqps_port
= amqps_port
;
13765 * Editor modelines - https://www.wireshark.org/tools/modelines.html
13768 * c-basic-offset: 4
13770 * indent-tabs-mode: nil
13773 * vi: set shiftwidth=4 tabstop=8 expandtab:
13774 * :indentSize=4:tabSize=8:noTabs=true: