Fix for bug 5422:
[obnox/wireshark/wip.git] / epan / dissectors / packet-amqp.c
1 /* packet-amqp.c
2  *
3  * AMQP v0-9 Wireshark dissector plug-in
4  *
5  * Author: Martin Sustrik <sustrik@imatix.com>
6  *
7  * Copyright (c) 1996-2007 iMatix Corporation
8  *
9  * $Id$
10  *
11  * Wireshark - Network traffic analyzer
12  * By Gerald Combs <gerald@wireshark.org>
13  * Copyright 1998 Gerald Combs
14  *
15  * This program is free software; you can redistribute it and/or
16  * modify it under the terms of the GNU General Public License
17  * as published by the Free Software Foundation; either version 2
18  * of the License, or (at your option) any later version.
19  *
20  * This program is distributed in the hope that it will be useful,
21  * but WITHOUT ANY WARRANTY; without even the implied warranty of
22  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23  * GNU General Public License for more details.
24  *
25  * You should have received a copy of the GNU General Public License
26  * along with this program; if not, write to the Free Software
27  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
28  */
29
30 #ifdef HAVE_CONFIG_H
31 #    include "config.h"
32 #endif
33
34 #include <gmodule.h>
35 #include <glib.h>
36 #include <epan/packet.h>
37 #include <epan/emem.h>
38 #include <epan/dissectors/packet-tcp.h>
39
40 /*  Generic data  */
41
42 static int amqp_port = 5672;
43
44 /*  Generic defines  */
45
46 #define AMQP_INCREMENT(offset, addend, bound) {\
47     int tmp;\
48     tmp = offset;\
49     offset += (addend);\
50     DISSECTOR_ASSERT(offset <= bound);\
51 }
52
53 #define AMQP_FRAME_TYPE_METHOD                                    1
54 #define AMQP_FRAME_TYPE_CONTENT_HEADER                            2
55 #define AMQP_FRAME_TYPE_CONTENT_BODY                              3
56 #define AMQP_FRAME_TYPE_OOB_METHOD                                4
57 #define AMQP_FRAME_TYPE_OOB_CONTENT_HEADER                        5
58 #define AMQP_FRAME_TYPE_OOB_CONTENT_BODY                          6
59 #define AMQP_FRAME_TYPE_TRACE                                     7
60 #define AMQP_FRAME_TYPE_HEARTBEAT                                 8
61
62 #define AMQP_CLASS_CONNECTION                                     10
63 #define AMQP_CLASS_CHANNEL                                        20
64 #define AMQP_CLASS_ACCESS                                         30
65 #define AMQP_CLASS_EXCHANGE                                       40
66 #define AMQP_CLASS_QUEUE                                          50
67 #define AMQP_CLASS_BASIC                                          60
68 #define AMQP_CLASS_FILE                                           70
69 #define AMQP_CLASS_STREAM                                         80
70 #define AMQP_CLASS_TX                                             90
71 #define AMQP_CLASS_DTX                                            100
72 #define AMQP_CLASS_TUNNEL                                         110
73
74 #define AMQP_METHOD_CONNECTION_START                              10
75 #define AMQP_METHOD_CONNECTION_START_OK                           11
76 #define AMQP_METHOD_CONNECTION_SECURE                             20
77 #define AMQP_METHOD_CONNECTION_SECURE_OK                          21
78 #define AMQP_METHOD_CONNECTION_TUNE                               30
79 #define AMQP_METHOD_CONNECTION_TUNE_OK                            31
80 #define AMQP_METHOD_CONNECTION_OPEN                               40
81 #define AMQP_METHOD_CONNECTION_OPEN_OK                            41
82 #define AMQP_METHOD_CONNECTION_REDIRECT                           42
83 #define AMQP_METHOD_CONNECTION_CLOSE                              50
84 #define AMQP_METHOD_CONNECTION_CLOSE_OK                           51
85
86 #define AMQP_METHOD_CHANNEL_OPEN                                  10
87 #define AMQP_METHOD_CHANNEL_OPEN_OK                               11
88 #define AMQP_METHOD_CHANNEL_FLOW                                  20
89 #define AMQP_METHOD_CHANNEL_FLOW_OK                               21
90 #define AMQP_METHOD_CHANNEL_CLOSE                                 40
91 #define AMQP_METHOD_CHANNEL_CLOSE_OK                              41
92 #define AMQP_METHOD_CHANNEL_RESUME                                50
93 #define AMQP_METHOD_CHANNEL_PING                                  60
94 #define AMQP_METHOD_CHANNEL_PONG                                  70
95 #define AMQP_METHOD_CHANNEL_OK                                    80
96
97 #define AMQP_METHOD_ACCESS_REQUEST                                10
98 #define AMQP_METHOD_ACCESS_REQUEST_OK                             11
99
100 #define AMQP_METHOD_EXCHANGE_DECLARE                              10
101 #define AMQP_METHOD_EXCHANGE_DECLARE_OK                           11
102 #define AMQP_METHOD_EXCHANGE_DELETE                               20
103 #define AMQP_METHOD_EXCHANGE_DELETE_OK                            21
104
105 #define AMQP_METHOD_QUEUE_DECLARE                                 10
106 #define AMQP_METHOD_QUEUE_DECLARE_OK                              11
107 #define AMQP_METHOD_QUEUE_BIND                                    20
108 #define AMQP_METHOD_QUEUE_BIND_OK                                 21
109 #define AMQP_METHOD_QUEUE_UNBIND                                  50
110 #define AMQP_METHOD_QUEUE_UNBIND_OK                               51
111 #define AMQP_METHOD_QUEUE_PURGE                                   30
112 #define AMQP_METHOD_QUEUE_PURGE_OK                                31
113 #define AMQP_METHOD_QUEUE_DELETE                                  40
114 #define AMQP_METHOD_QUEUE_DELETE_OK                               41
115
116 #define AMQP_METHOD_BASIC_QOS                                     10
117 #define AMQP_METHOD_BASIC_QOS_OK                                  11
118 #define AMQP_METHOD_BASIC_CONSUME                                 20
119 #define AMQP_METHOD_BASIC_CONSUME_OK                              21
120 #define AMQP_METHOD_BASIC_CANCEL                                  30
121 #define AMQP_METHOD_BASIC_CANCEL_OK                               31
122 #define AMQP_METHOD_BASIC_PUBLISH                                 40
123 #define AMQP_METHOD_BASIC_RETURN                                  50
124 #define AMQP_METHOD_BASIC_DELIVER                                 60
125 #define AMQP_METHOD_BASIC_GET                                     70
126 #define AMQP_METHOD_BASIC_GET_OK                                  71
127 #define AMQP_METHOD_BASIC_GET_EMPTY                               72
128 #define AMQP_METHOD_BASIC_ACK                                     80
129 #define AMQP_METHOD_BASIC_REJECT                                  90
130 #define AMQP_METHOD_BASIC_RECOVER                                 100
131
132 #define AMQP_METHOD_FILE_QOS                                      10
133 #define AMQP_METHOD_FILE_QOS_OK                                   11
134 #define AMQP_METHOD_FILE_CONSUME                                  20
135 #define AMQP_METHOD_FILE_CONSUME_OK                               21
136 #define AMQP_METHOD_FILE_CANCEL                                   30
137 #define AMQP_METHOD_FILE_CANCEL_OK                                31
138 #define AMQP_METHOD_FILE_OPEN                                     40
139 #define AMQP_METHOD_FILE_OPEN_OK                                  41
140 #define AMQP_METHOD_FILE_STAGE                                    50
141 #define AMQP_METHOD_FILE_PUBLISH                                  60
142 #define AMQP_METHOD_FILE_RETURN                                   70
143 #define AMQP_METHOD_FILE_DELIVER                                  80
144 #define AMQP_METHOD_FILE_ACK                                      90
145 #define AMQP_METHOD_FILE_REJECT                                   100
146
147 #define AMQP_METHOD_STREAM_QOS                                    10
148 #define AMQP_METHOD_STREAM_QOS_OK                                 11
149 #define AMQP_METHOD_STREAM_CONSUME                                20
150 #define AMQP_METHOD_STREAM_CONSUME_OK                             21
151 #define AMQP_METHOD_STREAM_CANCEL                                 30
152 #define AMQP_METHOD_STREAM_CANCEL_OK                              31
153 #define AMQP_METHOD_STREAM_PUBLISH                                40
154 #define AMQP_METHOD_STREAM_RETURN                                 50
155 #define AMQP_METHOD_STREAM_DELIVER                                60
156
157 #define AMQP_METHOD_TX_SELECT                                     10
158 #define AMQP_METHOD_TX_SELECT_OK                                  11
159 #define AMQP_METHOD_TX_COMMIT                                     20
160 #define AMQP_METHOD_TX_COMMIT_OK                                  21
161 #define AMQP_METHOD_TX_ROLLBACK                                   30
162 #define AMQP_METHOD_TX_ROLLBACK_OK                                31
163
164 #define AMQP_METHOD_DTX_SELECT                                    10
165 #define AMQP_METHOD_DTX_SELECT_OK                                 11
166 #define AMQP_METHOD_DTX_START                                     20
167 #define AMQP_METHOD_DTX_START_OK                                  21
168
169 #define AMQP_METHOD_TUNNEL_REQUEST                                10
170
171 /*  Private functions  */
172
173 static void
174 dissect_amqp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
175
176 static guint
177 get_amqp_message_len(packet_info *pinfo, tvbuff_t *tvb, int offset);
178
179 static void
180 dissect_amqp_field_table(tvbuff_t *tvb, int offset, int bound, int length, proto_item *item);
181
182 static void
183 dissect_amqp_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
184
185 static int
186 dissect_amqp_method_connection_start(tvbuff_t *tvb,
187     int offset, int bound, proto_tree *args_tree);
188
189 static int
190 dissect_amqp_method_connection_start_ok(tvbuff_t *tvb,
191     int offset, int bound, proto_tree *args_tree);
192
193 static int
194 dissect_amqp_method_connection_secure(tvbuff_t *tvb,
195     int offset, int bound, proto_tree *args_tree);
196
197 static int
198 dissect_amqp_method_connection_secure_ok(tvbuff_t *tvb,
199     int offset, int bound, proto_tree *args_tree);
200
201 static int
202 dissect_amqp_method_connection_tune(tvbuff_t *tvb,
203     int offset, int bound, proto_tree *args_tree);
204
205 static int
206 dissect_amqp_method_connection_tune_ok(tvbuff_t *tvb,
207     int offset, int bound, proto_tree *args_tree);
208
209 static int
210 dissect_amqp_method_connection_open(tvbuff_t *tvb,
211     int offset, int bound, proto_tree *args_tree);
212
213 static int
214 dissect_amqp_method_connection_open_ok(tvbuff_t *tvb,
215     int offset, int bound, proto_tree *args_tree);
216
217 static int
218 dissect_amqp_method_connection_redirect(tvbuff_t *tvb,
219     int offset, int bound, proto_tree *args_tree);
220
221 static int
222 dissect_amqp_method_connection_close(tvbuff_t *tvb,
223     int offset, int bound, proto_tree *args_tree);
224
225 static int
226 dissect_amqp_method_connection_close_ok(tvbuff_t *tvb,
227     int offset, int bound, proto_tree *args_tree);
228
229 static int
230 dissect_amqp_method_channel_open(tvbuff_t *tvb,
231     int offset, int bound, proto_tree *args_tree);
232
233 static int
234 dissect_amqp_method_channel_open_ok(tvbuff_t *tvb,
235     int offset, int bound, proto_tree *args_tree);
236
237 static int
238 dissect_amqp_method_channel_flow(tvbuff_t *tvb,
239     int offset, int bound, proto_tree *args_tree);
240
241 static int
242 dissect_amqp_method_channel_flow_ok(tvbuff_t *tvb,
243     int offset, int bound, proto_tree *args_tree);
244
245 static int
246 dissect_amqp_method_channel_close(tvbuff_t *tvb,
247     int offset, int bound, proto_tree *args_tree);
248
249 static int
250 dissect_amqp_method_channel_close_ok(tvbuff_t *tvb,
251     int offset, int bound, proto_tree *args_tree);
252
253 static int
254 dissect_amqp_method_channel_resume(tvbuff_t *tvb,
255     int offset, int bound, proto_tree *args_tree);
256
257 static int
258 dissect_amqp_method_channel_ping(tvbuff_t *tvb,
259     int offset, int bound, proto_tree *args_tree);
260
261 static int
262 dissect_amqp_method_channel_pong(tvbuff_t *tvb,
263     int offset, int bound, proto_tree *args_tree);
264
265 static int
266 dissect_amqp_method_channel_ok(tvbuff_t *tvb,
267     int offset, int bound, proto_tree *args_tree);
268
269 static int
270 dissect_amqp_method_access_request(tvbuff_t *tvb,
271     int offset, int bound, proto_tree *args_tree);
272
273 static int
274 dissect_amqp_method_access_request_ok(tvbuff_t *tvb,
275     int offset, int bound, proto_tree *args_tree);
276
277 static int
278 dissect_amqp_method_exchange_declare(tvbuff_t *tvb,
279     int offset, int bound, proto_tree *args_tree);
280
281 static int
282 dissect_amqp_method_exchange_declare_ok(tvbuff_t *tvb,
283     int offset, int bound, proto_tree *args_tree);
284
285 static int
286 dissect_amqp_method_exchange_delete(tvbuff_t *tvb,
287     int offset, int bound, proto_tree *args_tree);
288
289 static int
290 dissect_amqp_method_exchange_delete_ok(tvbuff_t *tvb,
291     int offset, int bound, proto_tree *args_tree);
292
293 static int
294 dissect_amqp_method_queue_declare(tvbuff_t *tvb,
295     int offset, int bound, proto_tree *args_tree);
296
297 static int
298 dissect_amqp_method_queue_declare_ok(tvbuff_t *tvb,
299     int offset, int bound, proto_tree *args_tree);
300
301 static int
302 dissect_amqp_method_queue_bind(tvbuff_t *tvb,
303     int offset, int bound, proto_tree *args_tree);
304
305 static int
306 dissect_amqp_method_queue_bind_ok(tvbuff_t *tvb,
307     int offset, int bound, proto_tree *args_tree);
308
309 static int
310 dissect_amqp_method_queue_unbind(tvbuff_t *tvb,
311     int offset, int bound, proto_tree *args_tree);
312
313 static int
314 dissect_amqp_method_queue_unbind_ok(tvbuff_t *tvb,
315     int offset, int bound, proto_tree *args_tree);
316
317 static int
318 dissect_amqp_method_queue_purge(tvbuff_t *tvb,
319     int offset, int bound, proto_tree *args_tree);
320
321 static int
322 dissect_amqp_method_queue_purge_ok(tvbuff_t *tvb,
323     int offset, int bound, proto_tree *args_tree);
324
325 static int
326 dissect_amqp_method_queue_delete(tvbuff_t *tvb,
327     int offset, int bound, proto_tree *args_tree);
328
329 static int
330 dissect_amqp_method_queue_delete_ok(tvbuff_t *tvb,
331     int offset, int bound, proto_tree *args_tree);
332
333 static int
334 dissect_amqp_method_basic_qos(tvbuff_t *tvb,
335     int offset, int bound, proto_tree *args_tree);
336
337 static int
338 dissect_amqp_method_basic_qos_ok(tvbuff_t *tvb,
339     int offset, int bound, proto_tree *args_tree);
340
341 static int
342 dissect_amqp_method_basic_consume(tvbuff_t *tvb,
343     int offset, int bound, proto_tree *args_tree);
344
345 static int
346 dissect_amqp_method_basic_consume_ok(tvbuff_t *tvb,
347     int offset, int bound, proto_tree *args_tree);
348
349 static int
350 dissect_amqp_method_basic_cancel(tvbuff_t *tvb,
351     int offset, int bound, proto_tree *args_tree);
352
353 static int
354 dissect_amqp_method_basic_cancel_ok(tvbuff_t *tvb,
355     int offset, int bound, proto_tree *args_tree);
356
357 static int
358 dissect_amqp_method_basic_publish(tvbuff_t *tvb,
359     int offset, int bound, proto_tree *args_tree);
360
361 static int
362 dissect_amqp_method_basic_return(tvbuff_t *tvb,
363     int offset, int bound, proto_tree *args_tree);
364
365 static int
366 dissect_amqp_method_basic_deliver(tvbuff_t *tvb,
367     int offset, int bound, proto_tree *args_tree);
368
369 static int
370 dissect_amqp_method_basic_get(tvbuff_t *tvb,
371     int offset, int bound, proto_tree *args_tree);
372
373 static int
374 dissect_amqp_method_basic_get_ok(tvbuff_t *tvb,
375     int offset, int bound, proto_tree *args_tree);
376
377 static int
378 dissect_amqp_method_basic_get_empty(tvbuff_t *tvb,
379     int offset, int bound, proto_tree *args_tree);
380
381 static int
382 dissect_amqp_method_basic_ack(tvbuff_t *tvb,
383     int offset, int bound, proto_tree *args_tree);
384
385 static int
386 dissect_amqp_method_basic_reject(tvbuff_t *tvb,
387     int offset, int bound, proto_tree *args_tree);
388
389 static int
390 dissect_amqp_method_basic_recover(tvbuff_t *tvb,
391     int offset, int bound, proto_tree *args_tree);
392
393 static int
394 dissect_amqp_method_file_qos(tvbuff_t *tvb,
395     int offset, int bound, proto_tree *args_tree);
396
397 static int
398 dissect_amqp_method_file_qos_ok(tvbuff_t *tvb,
399     int offset, int bound, proto_tree *args_tree);
400
401 static int
402 dissect_amqp_method_file_consume(tvbuff_t *tvb,
403     int offset, int bound, proto_tree *args_tree);
404
405 static int
406 dissect_amqp_method_file_consume_ok(tvbuff_t *tvb,
407     int offset, int bound, proto_tree *args_tree);
408
409 static int
410 dissect_amqp_method_file_cancel(tvbuff_t *tvb,
411     int offset, int bound, proto_tree *args_tree);
412
413 static int
414 dissect_amqp_method_file_cancel_ok(tvbuff_t *tvb,
415     int offset, int bound, proto_tree *args_tree);
416
417 static int
418 dissect_amqp_method_file_open(tvbuff_t *tvb,
419     int offset, int bound, proto_tree *args_tree);
420
421 static int
422 dissect_amqp_method_file_open_ok(tvbuff_t *tvb,
423     int offset, int bound, proto_tree *args_tree);
424
425 static int
426 dissect_amqp_method_file_stage(tvbuff_t *tvb,
427     int offset, int bound, proto_tree *args_tree);
428
429 static int
430 dissect_amqp_method_file_publish(tvbuff_t *tvb,
431     int offset, int bound, proto_tree *args_tree);
432
433 static int
434 dissect_amqp_method_file_return(tvbuff_t *tvb,
435     int offset, int bound, proto_tree *args_tree);
436
437 static int
438 dissect_amqp_method_file_deliver(tvbuff_t *tvb,
439     int offset, int bound, proto_tree *args_tree);
440
441 static int
442 dissect_amqp_method_file_ack(tvbuff_t *tvb,
443     int offset, int bound, proto_tree *args_tree);
444
445 static int
446 dissect_amqp_method_file_reject(tvbuff_t *tvb,
447     int offset, int bound, proto_tree *args_tree);
448
449 static int
450 dissect_amqp_method_stream_qos(tvbuff_t *tvb,
451     int offset, int bound, proto_tree *args_tree);
452
453 static int
454 dissect_amqp_method_stream_qos_ok(tvbuff_t *tvb,
455     int offset, int bound, proto_tree *args_tree);
456
457 static int
458 dissect_amqp_method_stream_consume(tvbuff_t *tvb,
459     int offset, int bound, proto_tree *args_tree);
460
461 static int
462 dissect_amqp_method_stream_consume_ok(tvbuff_t *tvb,
463     int offset, int bound, proto_tree *args_tree);
464
465 static int
466 dissect_amqp_method_stream_cancel(tvbuff_t *tvb,
467     int offset, int bound, proto_tree *args_tree);
468
469 static int
470 dissect_amqp_method_stream_cancel_ok(tvbuff_t *tvb,
471     int offset, int bound, proto_tree *args_tree);
472
473 static int
474 dissect_amqp_method_stream_publish(tvbuff_t *tvb,
475     int offset, int bound, proto_tree *args_tree);
476
477 static int
478 dissect_amqp_method_stream_return(tvbuff_t *tvb,
479     int offset, int bound, proto_tree *args_tree);
480
481 static int
482 dissect_amqp_method_stream_deliver(tvbuff_t *tvb,
483     int offset, int bound, proto_tree *args_tree);
484
485 static int
486 dissect_amqp_method_tx_select(tvbuff_t *tvb,
487     int offset, int bound, proto_tree *args_tree);
488
489 static int
490 dissect_amqp_method_tx_select_ok(tvbuff_t *tvb,
491     int offset, int bound, proto_tree *args_tree);
492
493 static int
494 dissect_amqp_method_tx_commit(tvbuff_t *tvb,
495     int offset, int bound, proto_tree *args_tree);
496
497 static int
498 dissect_amqp_method_tx_commit_ok(tvbuff_t *tvb,
499     int offset, int bound, proto_tree *args_tree);
500
501 static int
502 dissect_amqp_method_tx_rollback(tvbuff_t *tvb,
503     int offset, int bound, proto_tree *args_tree);
504
505 static int
506 dissect_amqp_method_tx_rollback_ok(tvbuff_t *tvb,
507     int offset, int bound, proto_tree *args_tree);
508
509 static int
510 dissect_amqp_method_dtx_select(tvbuff_t *tvb,
511     int offset, int bound, proto_tree *args_tree);
512
513 static int
514 dissect_amqp_method_dtx_select_ok(tvbuff_t *tvb,
515     int offset, int bound, proto_tree *args_tree);
516
517 static int
518 dissect_amqp_method_dtx_start(tvbuff_t *tvb,
519     int offset, int bound, proto_tree *args_tree);
520
521 static int
522 dissect_amqp_method_dtx_start_ok(tvbuff_t *tvb,
523     int offset, int bound, proto_tree *args_tree);
524
525 static int
526 dissect_amqp_method_tunnel_request(tvbuff_t *tvb,
527     int offset, int bound, proto_tree *args_tree);
528
529 static int
530 dissect_amqp_content_header_basic(tvbuff_t *tvb,
531     int offset, int bound, proto_tree *prop_tree);
532
533 static int
534 dissect_amqp_content_header_file(tvbuff_t *tvb,
535     int offset, int bound, proto_tree *prop_tree);
536
537 static int
538 dissect_amqp_content_header_stream(tvbuff_t *tvb,
539     int offset, int bound, proto_tree *prop_tree);
540
541 static int
542 dissect_amqp_content_header_tunnel(tvbuff_t *tvb,
543     int offset, int bound, proto_tree *prop_tree);
544
545 /*  Various handles  */
546
547 static int proto_amqp = -1;
548
549 static int hf_amqp_type = -1;
550 static int hf_amqp_channel = -1;
551 static int hf_amqp_length = -1;
552 static int hf_amqp_method_class_id = -1;
553 static int hf_amqp_method_connection_method_id = -1;
554 static int hf_amqp_method_channel_method_id = -1;
555 static int hf_amqp_method_access_method_id = -1;
556 static int hf_amqp_method_exchange_method_id = -1;
557 static int hf_amqp_method_queue_method_id = -1;
558 static int hf_amqp_method_basic_method_id = -1;
559 static int hf_amqp_method_file_method_id = -1;
560 static int hf_amqp_method_stream_method_id = -1;
561 static int hf_amqp_method_tx_method_id = -1;
562 static int hf_amqp_method_dtx_method_id = -1;
563 static int hf_amqp_method_tunnel_method_id = -1;
564 static int hf_amqp_method_arguments = -1;
565 static int hf_amqp_method_connection_start_version_major = -1;
566 static int hf_amqp_method_connection_start_version_minor = -1;
567 static int hf_amqp_method_connection_start_server_properties = -1;
568 static int hf_amqp_method_connection_start_mechanisms = -1;
569 static int hf_amqp_method_connection_start_locales = -1;
570 static int hf_amqp_method_connection_start_ok_client_properties = -1;
571 static int hf_amqp_method_connection_start_ok_mechanism = -1;
572 static int hf_amqp_method_connection_start_ok_response = -1;
573 static int hf_amqp_method_connection_start_ok_locale = -1;
574 static int hf_amqp_method_connection_secure_challenge = -1;
575 static int hf_amqp_method_connection_secure_ok_response = -1;
576 static int hf_amqp_method_connection_tune_channel_max = -1;
577 static int hf_amqp_method_connection_tune_frame_max = -1;
578 static int hf_amqp_method_connection_tune_heartbeat = -1;
579 static int hf_amqp_method_connection_tune_ok_channel_max = -1;
580 static int hf_amqp_method_connection_tune_ok_frame_max = -1;
581 static int hf_amqp_method_connection_tune_ok_heartbeat = -1;
582 static int hf_amqp_method_connection_open_virtual_host = -1;
583 static int hf_amqp_method_connection_open_capabilities = -1;
584 static int hf_amqp_method_connection_open_insist = -1;
585 static int hf_amqp_method_connection_open_ok_known_hosts = -1;
586 static int hf_amqp_method_connection_redirect_host = -1;
587 static int hf_amqp_method_connection_redirect_known_hosts = -1;
588 static int hf_amqp_method_connection_close_reply_code = -1;
589 static int hf_amqp_method_connection_close_reply_text = -1;
590 static int hf_amqp_method_connection_close_class_id = -1;
591 static int hf_amqp_method_connection_close_method_id = -1;
592 static int hf_amqp_method_channel_open_out_of_band = -1;
593 static int hf_amqp_method_channel_open_ok_channel_id = -1;
594 static int hf_amqp_method_channel_flow_active = -1;
595 static int hf_amqp_method_channel_flow_ok_active = -1;
596 static int hf_amqp_method_channel_close_reply_code = -1;
597 static int hf_amqp_method_channel_close_reply_text = -1;
598 static int hf_amqp_method_channel_close_class_id = -1;
599 static int hf_amqp_method_channel_close_method_id = -1;
600 static int hf_amqp_method_channel_resume_channel_id = -1;
601 static int hf_amqp_method_access_request_realm = -1;
602 static int hf_amqp_method_access_request_exclusive = -1;
603 static int hf_amqp_method_access_request_passive = -1;
604 static int hf_amqp_method_access_request_active = -1;
605 static int hf_amqp_method_access_request_write = -1;
606 static int hf_amqp_method_access_request_read = -1;
607 static int hf_amqp_method_access_request_ok_ticket = -1;
608 static int hf_amqp_method_exchange_declare_ticket = -1;
609 static int hf_amqp_method_exchange_declare_exchange = -1;
610 static int hf_amqp_method_exchange_declare_type = -1;
611 static int hf_amqp_method_exchange_declare_passive = -1;
612 static int hf_amqp_method_exchange_declare_durable = -1;
613 static int hf_amqp_method_exchange_declare_auto_delete = -1;
614 static int hf_amqp_method_exchange_declare_internal = -1;
615 static int hf_amqp_method_exchange_declare_nowait = -1;
616 static int hf_amqp_method_exchange_declare_arguments = -1;
617 static int hf_amqp_method_exchange_delete_ticket = -1;
618 static int hf_amqp_method_exchange_delete_exchange = -1;
619 static int hf_amqp_method_exchange_delete_if_unused = -1;
620 static int hf_amqp_method_exchange_delete_nowait = -1;
621 static int hf_amqp_method_queue_declare_ticket = -1;
622 static int hf_amqp_method_queue_declare_queue = -1;
623 static int hf_amqp_method_queue_declare_passive = -1;
624 static int hf_amqp_method_queue_declare_durable = -1;
625 static int hf_amqp_method_queue_declare_exclusive = -1;
626 static int hf_amqp_method_queue_declare_auto_delete = -1;
627 static int hf_amqp_method_queue_declare_nowait = -1;
628 static int hf_amqp_method_queue_declare_arguments = -1;
629 static int hf_amqp_method_queue_declare_ok_queue = -1;
630 static int hf_amqp_method_queue_declare_ok_message_count = -1;
631 static int hf_amqp_method_queue_declare_ok_consumer_count = -1;
632 static int hf_amqp_method_queue_bind_ticket = -1;
633 static int hf_amqp_method_queue_bind_queue = -1;
634 static int hf_amqp_method_queue_bind_exchange = -1;
635 static int hf_amqp_method_queue_bind_routing_key = -1;
636 static int hf_amqp_method_queue_bind_nowait = -1;
637 static int hf_amqp_method_queue_bind_arguments = -1;
638 static int hf_amqp_method_queue_unbind_ticket = -1;
639 static int hf_amqp_method_queue_unbind_queue = -1;
640 static int hf_amqp_method_queue_unbind_exchange = -1;
641 static int hf_amqp_method_queue_unbind_routing_key = -1;
642 static int hf_amqp_method_queue_unbind_arguments = -1;
643 static int hf_amqp_method_queue_purge_ticket = -1;
644 static int hf_amqp_method_queue_purge_queue = -1;
645 static int hf_amqp_method_queue_purge_nowait = -1;
646 static int hf_amqp_method_queue_purge_ok_message_count = -1;
647 static int hf_amqp_method_queue_delete_ticket = -1;
648 static int hf_amqp_method_queue_delete_queue = -1;
649 static int hf_amqp_method_queue_delete_if_unused = -1;
650 static int hf_amqp_method_queue_delete_if_empty = -1;
651 static int hf_amqp_method_queue_delete_nowait = -1;
652 static int hf_amqp_method_queue_delete_ok_message_count = -1;
653 static int hf_amqp_method_basic_qos_prefetch_size = -1;
654 static int hf_amqp_method_basic_qos_prefetch_count = -1;
655 static int hf_amqp_method_basic_qos_global = -1;
656 static int hf_amqp_method_basic_consume_ticket = -1;
657 static int hf_amqp_method_basic_consume_queue = -1;
658 static int hf_amqp_method_basic_consume_consumer_tag = -1;
659 static int hf_amqp_method_basic_consume_no_local = -1;
660 static int hf_amqp_method_basic_consume_no_ack = -1;
661 static int hf_amqp_method_basic_consume_exclusive = -1;
662 static int hf_amqp_method_basic_consume_nowait = -1;
663 static int hf_amqp_method_basic_consume_filter = -1;
664 static int hf_amqp_method_basic_consume_ok_consumer_tag = -1;
665 static int hf_amqp_method_basic_cancel_consumer_tag = -1;
666 static int hf_amqp_method_basic_cancel_nowait = -1;
667 static int hf_amqp_method_basic_cancel_ok_consumer_tag = -1;
668 static int hf_amqp_method_basic_publish_ticket = -1;
669 static int hf_amqp_method_basic_publish_exchange = -1;
670 static int hf_amqp_method_basic_publish_routing_key = -1;
671 static int hf_amqp_method_basic_publish_mandatory = -1;
672 static int hf_amqp_method_basic_publish_immediate = -1;
673 static int hf_amqp_method_basic_return_reply_code = -1;
674 static int hf_amqp_method_basic_return_reply_text = -1;
675 static int hf_amqp_method_basic_return_exchange = -1;
676 static int hf_amqp_method_basic_return_routing_key = -1;
677 static int hf_amqp_method_basic_deliver_consumer_tag = -1;
678 static int hf_amqp_method_basic_deliver_delivery_tag = -1;
679 static int hf_amqp_method_basic_deliver_redelivered = -1;
680 static int hf_amqp_method_basic_deliver_exchange = -1;
681 static int hf_amqp_method_basic_deliver_routing_key = -1;
682 static int hf_amqp_method_basic_get_ticket = -1;
683 static int hf_amqp_method_basic_get_queue = -1;
684 static int hf_amqp_method_basic_get_no_ack = -1;
685 static int hf_amqp_method_basic_get_ok_delivery_tag = -1;
686 static int hf_amqp_method_basic_get_ok_redelivered = -1;
687 static int hf_amqp_method_basic_get_ok_exchange = -1;
688 static int hf_amqp_method_basic_get_ok_routing_key = -1;
689 static int hf_amqp_method_basic_get_ok_message_count = -1;
690 static int hf_amqp_method_basic_get_empty_cluster_id = -1;
691 static int hf_amqp_method_basic_ack_delivery_tag = -1;
692 static int hf_amqp_method_basic_ack_multiple = -1;
693 static int hf_amqp_method_basic_reject_delivery_tag = -1;
694 static int hf_amqp_method_basic_reject_requeue = -1;
695 static int hf_amqp_method_basic_recover_requeue = -1;
696 static int hf_amqp_method_file_qos_prefetch_size = -1;
697 static int hf_amqp_method_file_qos_prefetch_count = -1;
698 static int hf_amqp_method_file_qos_global = -1;
699 static int hf_amqp_method_file_consume_ticket = -1;
700 static int hf_amqp_method_file_consume_queue = -1;
701 static int hf_amqp_method_file_consume_consumer_tag = -1;
702 static int hf_amqp_method_file_consume_no_local = -1;
703 static int hf_amqp_method_file_consume_no_ack = -1;
704 static int hf_amqp_method_file_consume_exclusive = -1;
705 static int hf_amqp_method_file_consume_nowait = -1;
706 static int hf_amqp_method_file_consume_filter = -1;
707 static int hf_amqp_method_file_consume_ok_consumer_tag = -1;
708 static int hf_amqp_method_file_cancel_consumer_tag = -1;
709 static int hf_amqp_method_file_cancel_nowait = -1;
710 static int hf_amqp_method_file_cancel_ok_consumer_tag = -1;
711 static int hf_amqp_method_file_open_identifier = -1;
712 static int hf_amqp_method_file_open_content_size = -1;
713 static int hf_amqp_method_file_open_ok_staged_size = -1;
714 static int hf_amqp_method_file_publish_ticket = -1;
715 static int hf_amqp_method_file_publish_exchange = -1;
716 static int hf_amqp_method_file_publish_routing_key = -1;
717 static int hf_amqp_method_file_publish_mandatory = -1;
718 static int hf_amqp_method_file_publish_immediate = -1;
719 static int hf_amqp_method_file_publish_identifier = -1;
720 static int hf_amqp_method_file_return_reply_code = -1;
721 static int hf_amqp_method_file_return_reply_text = -1;
722 static int hf_amqp_method_file_return_exchange = -1;
723 static int hf_amqp_method_file_return_routing_key = -1;
724 static int hf_amqp_method_file_deliver_consumer_tag = -1;
725 static int hf_amqp_method_file_deliver_delivery_tag = -1;
726 static int hf_amqp_method_file_deliver_redelivered = -1;
727 static int hf_amqp_method_file_deliver_exchange = -1;
728 static int hf_amqp_method_file_deliver_routing_key = -1;
729 static int hf_amqp_method_file_deliver_identifier = -1;
730 static int hf_amqp_method_file_ack_delivery_tag = -1;
731 static int hf_amqp_method_file_ack_multiple = -1;
732 static int hf_amqp_method_file_reject_delivery_tag = -1;
733 static int hf_amqp_method_file_reject_requeue = -1;
734 static int hf_amqp_method_stream_qos_prefetch_size = -1;
735 static int hf_amqp_method_stream_qos_prefetch_count = -1;
736 static int hf_amqp_method_stream_qos_consume_rate = -1;
737 static int hf_amqp_method_stream_qos_global = -1;
738 static int hf_amqp_method_stream_consume_ticket = -1;
739 static int hf_amqp_method_stream_consume_queue = -1;
740 static int hf_amqp_method_stream_consume_consumer_tag = -1;
741 static int hf_amqp_method_stream_consume_no_local = -1;
742 static int hf_amqp_method_stream_consume_exclusive = -1;
743 static int hf_amqp_method_stream_consume_nowait = -1;
744 static int hf_amqp_method_stream_consume_filter = -1;
745 static int hf_amqp_method_stream_consume_ok_consumer_tag = -1;
746 static int hf_amqp_method_stream_cancel_consumer_tag = -1;
747 static int hf_amqp_method_stream_cancel_nowait = -1;
748 static int hf_amqp_method_stream_cancel_ok_consumer_tag = -1;
749 static int hf_amqp_method_stream_publish_ticket = -1;
750 static int hf_amqp_method_stream_publish_exchange = -1;
751 static int hf_amqp_method_stream_publish_routing_key = -1;
752 static int hf_amqp_method_stream_publish_mandatory = -1;
753 static int hf_amqp_method_stream_publish_immediate = -1;
754 static int hf_amqp_method_stream_return_reply_code = -1;
755 static int hf_amqp_method_stream_return_reply_text = -1;
756 static int hf_amqp_method_stream_return_exchange = -1;
757 static int hf_amqp_method_stream_return_routing_key = -1;
758 static int hf_amqp_method_stream_deliver_consumer_tag = -1;
759 static int hf_amqp_method_stream_deliver_delivery_tag = -1;
760 static int hf_amqp_method_stream_deliver_exchange = -1;
761 static int hf_amqp_method_stream_deliver_queue = -1;
762 static int hf_amqp_method_dtx_start_dtx_identifier = -1;
763 static int hf_amqp_method_tunnel_request_meta_data = -1;
764 static int hf_amqp_field = -1;
765 static int hf_amqp_header_class_id = -1;
766 static int hf_amqp_header_weight = -1;
767 static int hf_amqp_header_body_size = -1;
768 static int hf_amqp_header_property_flags = -1;
769 static int hf_amqp_header_properties = -1;
770 static int hf_amqp_header_basic_content_type = -1;
771 static int hf_amqp_header_basic_content_encoding = -1;
772 static int hf_amqp_header_basic_headers = -1;
773 static int hf_amqp_header_basic_delivery_mode = -1;
774 static int hf_amqp_header_basic_priority = -1;
775 static int hf_amqp_header_basic_correlation_id = -1;
776 static int hf_amqp_header_basic_reply_to = -1;
777 static int hf_amqp_header_basic_expiration = -1;
778 static int hf_amqp_header_basic_message_id = -1;
779 static int hf_amqp_header_basic_timestamp = -1;
780 static int hf_amqp_header_basic_type = -1;
781 static int hf_amqp_header_basic_user_id = -1;
782 static int hf_amqp_header_basic_app_id = -1;
783 static int hf_amqp_header_basic_cluster_id = -1;
784 static int hf_amqp_header_file_content_type = -1;
785 static int hf_amqp_header_file_content_encoding = -1;
786 static int hf_amqp_header_file_headers = -1;
787 static int hf_amqp_header_file_priority = -1;
788 static int hf_amqp_header_file_reply_to = -1;
789 static int hf_amqp_header_file_message_id = -1;
790 static int hf_amqp_header_file_filename = -1;
791 static int hf_amqp_header_file_timestamp = -1;
792 static int hf_amqp_header_file_cluster_id = -1;
793 static int hf_amqp_header_stream_content_type = -1;
794 static int hf_amqp_header_stream_content_encoding = -1;
795 static int hf_amqp_header_stream_headers = -1;
796 static int hf_amqp_header_stream_priority = -1;
797 static int hf_amqp_header_stream_timestamp = -1;
798 static int hf_amqp_header_tunnel_headers = -1;
799 static int hf_amqp_header_tunnel_proxy_name = -1;
800 static int hf_amqp_header_tunnel_data_name = -1;
801 static int hf_amqp_header_tunnel_durable = -1;
802 static int hf_amqp_header_tunnel_broadcast = -1;
803 static int hf_amqp_payload = -1;
804 static int hf_amqp_init_protocol = -1;
805 static int hf_amqp_init_id_major = -1;
806 static int hf_amqp_init_id_minor = -1;
807 static int hf_amqp_init_version_major = -1;
808 static int hf_amqp_init_version_minor = -1;
809
810 static gint ett_amqp = -1;
811 static gint ett_args = -1;
812 static gint ett_props = -1;
813 static gint ett_field_table = -1;
814 static gint ett_amqp_init = -1;
815
816 /*  Various enumerations  */
817
818 static const value_string amqp_frame_types [] = {
819     {AMQP_FRAME_TYPE_METHOD,             "Method"},
820     {AMQP_FRAME_TYPE_CONTENT_HEADER,     "Content header"},
821     {AMQP_FRAME_TYPE_CONTENT_BODY,       "Content body"},
822     {AMQP_FRAME_TYPE_OOB_METHOD,         "OOB Method"},
823     {AMQP_FRAME_TYPE_OOB_CONTENT_HEADER, "OOB Content header"},
824     {AMQP_FRAME_TYPE_OOB_CONTENT_BODY,   "OOB Content body"},
825     {AMQP_FRAME_TYPE_TRACE ,             "Trace"},
826     {AMQP_FRAME_TYPE_HEARTBEAT,          "Heartbeat"},
827     {0, NULL}
828 };
829
830 static const value_string amqp_method_classes [] = {
831     {10, "Connection"},
832     {20, "Channel"},
833     {30, "Access"},
834     {40, "Exchange"},
835     {50, "Queue"},
836     {60, "Basic"},
837     {70, "File"},
838     {80, "Stream"},
839     {90, "Tx"},
840     {100, "Dtx"},
841     {110, "Tunnel"},
842     {0, NULL}
843 };
844
845 static const value_string amqp_method_connection_methods [] = {
846     {10, "Start"},
847     {11, "Start-Ok"},
848     {20, "Secure"},
849     {21, "Secure-Ok"},
850     {30, "Tune"},
851     {31, "Tune-Ok"},
852     {40, "Open"},
853     {41, "Open-Ok"},
854     {42, "Redirect"},
855     {50, "Close"},
856     {51, "Close-Ok"},
857     {0, NULL}
858 };
859
860 static const value_string amqp_method_channel_methods [] = {
861     {10, "Open"},
862     {11, "Open-Ok"},
863     {20, "Flow"},
864     {21, "Flow-Ok"},
865     {40, "Close"},
866     {41, "Close-Ok"},
867     {50, "Resume"},
868     {60, "Ping"},
869     {70, "Pong"},
870     {80, "Ok"},
871     {0, NULL}
872 };
873
874 static const value_string amqp_method_access_methods [] = {
875     {10, "Request"},
876     {11, "Request-Ok"},
877     {0, NULL}
878 };
879
880 static const value_string amqp_method_exchange_methods [] = {
881     {10, "Declare"},
882     {11, "Declare-Ok"},
883     {20, "Delete"},
884     {21, "Delete-Ok"},
885     {0, NULL}
886 };
887
888 static const value_string amqp_method_queue_methods [] = {
889     {10, "Declare"},
890     {11, "Declare-Ok"},
891     {20, "Bind"},
892     {21, "Bind-Ok"},
893     {50, "Unbind"},
894     {51, "Unbind-Ok"},
895     {30, "Purge"},
896     {31, "Purge-Ok"},
897     {40, "Delete"},
898     {41, "Delete-Ok"},
899     {0, NULL}
900 };
901
902 static const value_string amqp_method_basic_methods [] = {
903     {10, "Qos"},
904     {11, "Qos-Ok"},
905     {20, "Consume"},
906     {21, "Consume-Ok"},
907     {30, "Cancel"},
908     {31, "Cancel-Ok"},
909     {40, "Publish"},
910     {50, "Return"},
911     {60, "Deliver"},
912     {70, "Get"},
913     {71, "Get-Ok"},
914     {72, "Get-Empty"},
915     {80, "Ack"},
916     {90, "Reject"},
917     {100, "Recover"},
918     {0, NULL}
919 };
920
921 static const value_string amqp_method_file_methods [] = {
922     {10, "Qos"},
923     {11, "Qos-Ok"},
924     {20, "Consume"},
925     {21, "Consume-Ok"},
926     {30, "Cancel"},
927     {31, "Cancel-Ok"},
928     {40, "Open"},
929     {41, "Open-Ok"},
930     {50, "Stage"},
931     {60, "Publish"},
932     {70, "Return"},
933     {80, "Deliver"},
934     {90, "Ack"},
935     {100, "Reject"},
936     {0, NULL}
937 };
938
939 static const value_string amqp_method_stream_methods [] = {
940     {10, "Qos"},
941     {11, "Qos-Ok"},
942     {20, "Consume"},
943     {21, "Consume-Ok"},
944     {30, "Cancel"},
945     {31, "Cancel-Ok"},
946     {40, "Publish"},
947     {50, "Return"},
948     {60, "Deliver"},
949     {0, NULL}
950 };
951
952 static const value_string amqp_method_tx_methods [] = {
953     {10, "Select"},
954     {11, "Select-Ok"},
955     {20, "Commit"},
956     {21, "Commit-Ok"},
957     {30, "Rollback"},
958     {31, "Rollback-Ok"},
959     {0, NULL}
960 };
961
962 static const value_string amqp_method_dtx_methods [] = {
963     {10, "Select"},
964     {11, "Select-Ok"},
965     {20, "Start"},
966     {21, "Start-Ok"},
967     {0, NULL}
968 };
969
970 static const value_string amqp_method_tunnel_methods [] = {
971     {10, "Request"},
972     {0, NULL}
973 };
974
975 /*  Main dissection routine  */
976
977 static void
978 dissect_amqp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
979 {
980     /*  Minimal frame size is 8 bytes - smaller frames are malformed  */
981     DISSECTOR_ASSERT (tvb_length (tvb) >= 8);
982
983     tcp_dissect_pdus(tvb, pinfo, tree, TRUE, 7,
984         get_amqp_message_len, dissect_amqp_frame);
985 }
986
987 static guint
988 get_amqp_message_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset)
989 {
990     /*  Heuristic - protocol initialisation frame starts with 'AMQP'  */
991     if (tvb_get_guint8(tvb, 0) == 'A' &&
992           tvb_get_guint8(tvb, 1) == 'M' &&
993           tvb_get_guint8(tvb, 2) == 'Q' &&
994           tvb_get_guint8(tvb, 3) == 'P')
995         return 8;
996
997     return (guint) tvb_get_ntohl(tvb, offset + 3) + 8;
998 }
999
1000 /*  Dissection routine for AMQP field tables  */
1001
1002 static void
1003 dissect_amqp_field_table(tvbuff_t *tvb, int offset, int bound, int length, proto_item *item)
1004 {
1005     proto_item *field_table_tree;
1006     guint namelen, vallen;
1007     guint8 type;
1008     const char *name;
1009     const char *typename;
1010     const char *value;
1011     int field_start;
1012
1013     field_table_tree = proto_item_add_subtree(item, ett_amqp);
1014
1015     while (length > 0) {
1016         field_start = offset;
1017         namelen = tvb_get_guint8(tvb, offset);
1018         AMQP_INCREMENT(offset, 1, bound);
1019         length -= 1;
1020         name = (char*) tvb_get_ephemeral_string(tvb, offset, namelen);
1021         AMQP_INCREMENT(offset, namelen, bound);
1022         length -= namelen;
1023         type = tvb_get_guint8(tvb, offset);
1024         AMQP_INCREMENT(offset, 1, bound);
1025         length -= 1;
1026         switch (type) {
1027         case 'S':
1028             typename = "string";
1029             vallen = tvb_get_ntohl(tvb, offset);
1030             AMQP_INCREMENT(offset, 4, bound);
1031             length -= 4;
1032             value = (char*) tvb_get_ephemeral_string(tvb, offset, vallen);
1033             AMQP_INCREMENT(offset, vallen, bound);
1034             length -= vallen;
1035             break;
1036         case 'I':
1037             typename = "integer";
1038             value = ep_strdup_printf("%d", tvb_get_ntohl(tvb, offset));
1039             AMQP_INCREMENT(offset, 4, bound);
1040             length -= 4;
1041             break;
1042         case 'D':
1043             typename = "decimal";
1044             value = "...";
1045             AMQP_INCREMENT(offset, 5, bound);
1046             length -= 5;
1047             break;
1048         case 'T':
1049             typename =  "timestamp";
1050             value = "...";
1051             AMQP_INCREMENT(offset, 8, bound);
1052             length -= 8;
1053             break;
1054         case 'F':
1055             /*  TODO: make it recursive here  */
1056             typename =  "field table";
1057             vallen = tvb_get_ntohl(tvb, offset);
1058             AMQP_INCREMENT(offset, 4, bound);
1059             length -= 4;
1060             value = "...";
1061             AMQP_INCREMENT(offset, vallen, bound);
1062             length -= vallen;
1063             break;
1064         case 'V':
1065             typename = "void";
1066             value = "";
1067         default:
1068             typename = "";
1069             value = "";
1070             DISSECTOR_ASSERT(FALSE);
1071         }
1072
1073         proto_tree_add_none_format(field_table_tree, hf_amqp_field, tvb,
1074             field_start, offset - field_start, "%s (%s): %s", name, typename,
1075             value);
1076     }
1077 }
1078
1079 /*  Dissection routine for AMQP frames  */
1080
1081 static void
1082 dissect_amqp_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
1083 {
1084     proto_item *ti;
1085     proto_item *amqp_tree;
1086     proto_item *args_tree;
1087     proto_item *prop_tree;
1088     guint length;
1089     int offset;
1090
1091     col_set_str(pinfo->cinfo, COL_PROTOCOL, "AMQP");
1092     col_clear(pinfo->cinfo, COL_INFO);
1093
1094     if (tree) {
1095
1096         /*  Heuristic - protocol initialisation frame starts with 'AMQP'  */
1097         if (tvb_get_guint8(tvb, 0) == 'A' &&
1098               tvb_get_guint8(tvb, 1) == 'M' &&
1099               tvb_get_guint8(tvb, 2) == 'Q' &&
1100               tvb_get_guint8(tvb, 3) == 'P') {
1101
1102             if (check_col(pinfo->cinfo, COL_INFO)) {
1103                 col_append_str(pinfo->cinfo, COL_INFO, "Protocol-Header ");
1104                 col_set_fence(pinfo->cinfo, COL_INFO);
1105             }
1106
1107             ti = proto_tree_add_item(tree, proto_amqp, tvb, 0, -1, FALSE);
1108             amqp_tree = proto_item_add_subtree(ti, ett_amqp_init);
1109             proto_tree_add_item(amqp_tree, hf_amqp_init_protocol, tvb, 0, 4, FALSE);
1110             proto_tree_add_item(amqp_tree, hf_amqp_init_id_major, tvb, 4, 1, FALSE);
1111             proto_tree_add_item(amqp_tree, hf_amqp_init_id_minor, tvb, 5, 1, FALSE);
1112             proto_tree_add_item(amqp_tree, hf_amqp_init_version_major, tvb, 6, 1, FALSE);
1113             proto_tree_add_item(amqp_tree, hf_amqp_init_version_minor, tvb, 7, 1, FALSE);
1114
1115             return;
1116         }
1117
1118         ti = proto_tree_add_item(tree, proto_amqp, tvb, 0, -1, FALSE);
1119         amqp_tree = proto_item_add_subtree(ti, ett_amqp);
1120         proto_tree_add_item(amqp_tree, hf_amqp_type, tvb, 0, 1, FALSE);
1121         proto_tree_add_item(amqp_tree, hf_amqp_channel, tvb, 1, 2, FALSE);
1122         proto_tree_add_item(amqp_tree, hf_amqp_length, tvb, 3, 4, FALSE);
1123         length = tvb_get_ntohl(tvb, 3);
1124         switch (tvb_get_guint8(tvb, 0)) {
1125         case AMQP_FRAME_TYPE_METHOD:
1126             proto_tree_add_item(amqp_tree, hf_amqp_method_class_id,
1127                 tvb, 7, 2, FALSE);
1128             switch (tvb_get_ntohs(tvb, 7)) {
1129             case AMQP_CLASS_CONNECTION:
1130                 proto_tree_add_item(amqp_tree, hf_amqp_method_connection_method_id,
1131                     tvb, 9, 2, FALSE);
1132                 ti = proto_tree_add_item(amqp_tree, hf_amqp_method_arguments,
1133                     tvb, 11, length - 4, FALSE);
1134                 args_tree = proto_item_add_subtree(ti, ett_args);
1135                 switch (tvb_get_ntohs(tvb, 9)) {
1136                 case AMQP_METHOD_CONNECTION_START:
1137                     offset = dissect_amqp_method_connection_start(tvb,
1138                         11, tvb_length (tvb), args_tree);
1139                     if (check_col(pinfo->cinfo, COL_INFO)) {
1140                         col_append_str(pinfo->cinfo, COL_INFO,
1141                             "Connection.Start ");
1142                         col_set_fence(pinfo->cinfo, COL_INFO);
1143                     }
1144                     break;
1145                 case AMQP_METHOD_CONNECTION_START_OK:
1146                     offset = dissect_amqp_method_connection_start_ok(tvb,
1147                         11, tvb_length (tvb), args_tree);
1148                     if (check_col(pinfo->cinfo, COL_INFO)) {
1149                         col_append_str(pinfo->cinfo, COL_INFO,
1150                             "Connection.Start-Ok ");
1151                         col_set_fence(pinfo->cinfo, COL_INFO);
1152                     }
1153                     break;
1154                 case AMQP_METHOD_CONNECTION_SECURE:
1155                     offset = dissect_amqp_method_connection_secure(tvb,
1156                         11, tvb_length (tvb), args_tree);
1157                     if (check_col(pinfo->cinfo, COL_INFO)) {
1158                         col_append_str(pinfo->cinfo, COL_INFO,
1159                             "Connection.Secure ");
1160                         col_set_fence(pinfo->cinfo, COL_INFO);
1161                     }
1162                     break;
1163                 case AMQP_METHOD_CONNECTION_SECURE_OK:
1164                     offset = dissect_amqp_method_connection_secure_ok(tvb,
1165                         11, tvb_length (tvb), args_tree);
1166                     if (check_col(pinfo->cinfo, COL_INFO)) {
1167                         col_append_str(pinfo->cinfo, COL_INFO,
1168                             "Connection.Secure-Ok ");
1169                         col_set_fence(pinfo->cinfo, COL_INFO);
1170                     }
1171                     break;
1172                 case AMQP_METHOD_CONNECTION_TUNE:
1173                     offset = dissect_amqp_method_connection_tune(tvb,
1174                         11, tvb_length (tvb), args_tree);
1175                     if (check_col(pinfo->cinfo, COL_INFO)) {
1176                         col_append_str(pinfo->cinfo, COL_INFO,
1177                             "Connection.Tune ");
1178                         col_set_fence(pinfo->cinfo, COL_INFO);
1179                     }
1180                     break;
1181                 case AMQP_METHOD_CONNECTION_TUNE_OK:
1182                     offset = dissect_amqp_method_connection_tune_ok(tvb,
1183                         11, tvb_length (tvb), args_tree);
1184                     if (check_col(pinfo->cinfo, COL_INFO)) {
1185                         col_append_str(pinfo->cinfo, COL_INFO,
1186                             "Connection.Tune-Ok ");
1187                         col_set_fence(pinfo->cinfo, COL_INFO);
1188                     }
1189                     break;
1190                 case AMQP_METHOD_CONNECTION_OPEN:
1191                     offset = dissect_amqp_method_connection_open(tvb,
1192                         11, tvb_length (tvb), args_tree);
1193                     if (check_col(pinfo->cinfo, COL_INFO)) {
1194                         col_append_str(pinfo->cinfo, COL_INFO,
1195                             "Connection.Open ");
1196                         col_set_fence(pinfo->cinfo, COL_INFO);
1197                     }
1198                     break;
1199                 case AMQP_METHOD_CONNECTION_OPEN_OK:
1200                     offset = dissect_amqp_method_connection_open_ok(tvb,
1201                         11, tvb_length (tvb), args_tree);
1202                     if (check_col(pinfo->cinfo, COL_INFO)) {
1203                         col_append_str(pinfo->cinfo, COL_INFO,
1204                             "Connection.Open-Ok ");
1205                         col_set_fence(pinfo->cinfo, COL_INFO);
1206                     }
1207                     break;
1208                 case AMQP_METHOD_CONNECTION_REDIRECT:
1209                     offset = dissect_amqp_method_connection_redirect(tvb,
1210                         11, tvb_length (tvb), args_tree);
1211                     if (check_col(pinfo->cinfo, COL_INFO)) {
1212                         col_append_str(pinfo->cinfo, COL_INFO,
1213                             "Connection.Redirect ");
1214                         col_set_fence(pinfo->cinfo, COL_INFO);
1215                     }
1216                     break;
1217                 case AMQP_METHOD_CONNECTION_CLOSE:
1218                     offset = dissect_amqp_method_connection_close(tvb,
1219                         11, tvb_length (tvb), args_tree);
1220                     if (check_col(pinfo->cinfo, COL_INFO)) {
1221                         col_append_str(pinfo->cinfo, COL_INFO,
1222                             "Connection.Close ");
1223                         col_set_fence(pinfo->cinfo, COL_INFO);
1224                     }
1225                     break;
1226                 case AMQP_METHOD_CONNECTION_CLOSE_OK:
1227                     offset = dissect_amqp_method_connection_close_ok(tvb,
1228                         11, tvb_length (tvb), args_tree);
1229                     if (check_col(pinfo->cinfo, COL_INFO)) {
1230                         col_append_str(pinfo->cinfo, COL_INFO,
1231                             "Connection.Close-Ok ");
1232                         col_set_fence(pinfo->cinfo, COL_INFO);
1233                     }
1234                     break;
1235                 default:
1236                     DISSECTOR_ASSERT(FALSE);
1237                 }
1238                 break;
1239             case AMQP_CLASS_CHANNEL:
1240                 proto_tree_add_item(amqp_tree, hf_amqp_method_channel_method_id,
1241                     tvb, 9, 2, FALSE);
1242                 ti = proto_tree_add_item(amqp_tree, hf_amqp_method_arguments,
1243                     tvb, 11, length - 4, FALSE);
1244                 args_tree = proto_item_add_subtree(ti, ett_args);
1245                 switch (tvb_get_ntohs(tvb, 9)) {
1246                 case AMQP_METHOD_CHANNEL_OPEN:
1247                     offset = dissect_amqp_method_channel_open(tvb,
1248                         11, tvb_length (tvb), args_tree);
1249                     if (check_col(pinfo->cinfo, COL_INFO)) {
1250                         col_append_str(pinfo->cinfo, COL_INFO,
1251                             "Channel.Open ");
1252                         col_set_fence(pinfo->cinfo, COL_INFO);
1253                     }
1254                     break;
1255                 case AMQP_METHOD_CHANNEL_OPEN_OK:
1256                     offset = dissect_amqp_method_channel_open_ok(tvb,
1257                         11, tvb_length (tvb), args_tree);
1258                     if (check_col(pinfo->cinfo, COL_INFO)) {
1259                         col_append_str(pinfo->cinfo, COL_INFO,
1260                             "Channel.Open-Ok ");
1261                         col_set_fence(pinfo->cinfo, COL_INFO);
1262                     }
1263                     break;
1264                 case AMQP_METHOD_CHANNEL_FLOW:
1265                     offset = dissect_amqp_method_channel_flow(tvb,
1266                         11, tvb_length (tvb), args_tree);
1267                     if (check_col(pinfo->cinfo, COL_INFO)) {
1268                         col_append_str(pinfo->cinfo, COL_INFO,
1269                             "Channel.Flow ");
1270                         col_set_fence(pinfo->cinfo, COL_INFO);
1271                     }
1272                     break;
1273                 case AMQP_METHOD_CHANNEL_FLOW_OK:
1274                     offset = dissect_amqp_method_channel_flow_ok(tvb,
1275                         11, tvb_length (tvb), args_tree);
1276                     if (check_col(pinfo->cinfo, COL_INFO)) {
1277                         col_append_str(pinfo->cinfo, COL_INFO,
1278                             "Channel.Flow-Ok ");
1279                         col_set_fence(pinfo->cinfo, COL_INFO);
1280                     }
1281                     break;
1282                 case AMQP_METHOD_CHANNEL_CLOSE:
1283                     offset = dissect_amqp_method_channel_close(tvb,
1284                         11, tvb_length (tvb), args_tree);
1285                     if (check_col(pinfo->cinfo, COL_INFO)) {
1286                         col_append_str(pinfo->cinfo, COL_INFO,
1287                             "Channel.Close ");
1288                         col_set_fence(pinfo->cinfo, COL_INFO);
1289                     }
1290                     break;
1291                 case AMQP_METHOD_CHANNEL_CLOSE_OK:
1292                     offset = dissect_amqp_method_channel_close_ok(tvb,
1293                         11, tvb_length (tvb), args_tree);
1294                     if (check_col(pinfo->cinfo, COL_INFO)) {
1295                         col_append_str(pinfo->cinfo, COL_INFO,
1296                             "Channel.Close-Ok ");
1297                         col_set_fence(pinfo->cinfo, COL_INFO);
1298                     }
1299                     break;
1300                 case AMQP_METHOD_CHANNEL_RESUME:
1301                     offset = dissect_amqp_method_channel_resume(tvb,
1302                         11, tvb_length (tvb), args_tree);
1303                     if (check_col(pinfo->cinfo, COL_INFO)) {
1304                         col_append_str(pinfo->cinfo, COL_INFO,
1305                             "Channel.Resume ");
1306                         col_set_fence(pinfo->cinfo, COL_INFO);
1307                     }
1308                     break;
1309                 case AMQP_METHOD_CHANNEL_PING:
1310                     offset = dissect_amqp_method_channel_ping(tvb,
1311                         11, tvb_length (tvb), args_tree);
1312                     if (check_col(pinfo->cinfo, COL_INFO)) {
1313                         col_append_str(pinfo->cinfo, COL_INFO,
1314                             "Channel.Ping ");
1315                         col_set_fence(pinfo->cinfo, COL_INFO);
1316                     }
1317                     break;
1318                 case AMQP_METHOD_CHANNEL_PONG:
1319                     offset = dissect_amqp_method_channel_pong(tvb,
1320                         11, tvb_length (tvb), args_tree);
1321                     if (check_col(pinfo->cinfo, COL_INFO)) {
1322                         col_append_str(pinfo->cinfo, COL_INFO,
1323                             "Channel.Pong ");
1324                         col_set_fence(pinfo->cinfo, COL_INFO);
1325                     }
1326                     break;
1327                 case AMQP_METHOD_CHANNEL_OK:
1328                     offset = dissect_amqp_method_channel_ok(tvb,
1329                         11, tvb_length (tvb), args_tree);
1330                     if (check_col(pinfo->cinfo, COL_INFO)) {
1331                         col_append_str(pinfo->cinfo, COL_INFO,
1332                             "Channel.Ok ");
1333                         col_set_fence(pinfo->cinfo, COL_INFO);
1334                     }
1335                     break;
1336                 default:
1337                     DISSECTOR_ASSERT(FALSE);
1338                 }
1339                 break;
1340             case AMQP_CLASS_ACCESS:
1341                 proto_tree_add_item(amqp_tree, hf_amqp_method_access_method_id,
1342                     tvb, 9, 2, FALSE);
1343                 ti = proto_tree_add_item(amqp_tree, hf_amqp_method_arguments,
1344                     tvb, 11, length - 4, FALSE);
1345                 args_tree = proto_item_add_subtree(ti, ett_args);
1346                 switch (tvb_get_ntohs(tvb, 9)) {
1347                 case AMQP_METHOD_ACCESS_REQUEST:
1348                     offset = dissect_amqp_method_access_request(tvb,
1349                         11, tvb_length (tvb), args_tree);
1350                     if (check_col(pinfo->cinfo, COL_INFO)) {
1351                         col_append_str(pinfo->cinfo, COL_INFO,
1352                             "Access.Request ");
1353                         col_set_fence(pinfo->cinfo, COL_INFO);
1354                     }
1355                     break;
1356                 case AMQP_METHOD_ACCESS_REQUEST_OK:
1357                     offset = dissect_amqp_method_access_request_ok(tvb,
1358                         11, tvb_length (tvb), args_tree);
1359                     if (check_col(pinfo->cinfo, COL_INFO)) {
1360                         col_append_str(pinfo->cinfo, COL_INFO,
1361                             "Access.Request-Ok ");
1362                         col_set_fence(pinfo->cinfo, COL_INFO);
1363                     }
1364                     break;
1365                 default:
1366                     DISSECTOR_ASSERT(FALSE);
1367                 }
1368                 break;
1369             case AMQP_CLASS_EXCHANGE:
1370                 proto_tree_add_item(amqp_tree, hf_amqp_method_exchange_method_id,
1371                     tvb, 9, 2, FALSE);
1372                 ti = proto_tree_add_item(amqp_tree, hf_amqp_method_arguments,
1373                     tvb, 11, length - 4, FALSE);
1374                 args_tree = proto_item_add_subtree(ti, ett_args);
1375                 switch (tvb_get_ntohs(tvb, 9)) {
1376                 case AMQP_METHOD_EXCHANGE_DECLARE:
1377                     offset = dissect_amqp_method_exchange_declare(tvb,
1378                         11, tvb_length (tvb), args_tree);
1379                     if (check_col(pinfo->cinfo, COL_INFO)) {
1380                         col_append_str(pinfo->cinfo, COL_INFO,
1381                             "Exchange.Declare ");
1382                         col_set_fence(pinfo->cinfo, COL_INFO);
1383                     }
1384                     break;
1385                 case AMQP_METHOD_EXCHANGE_DECLARE_OK:
1386                     offset = dissect_amqp_method_exchange_declare_ok(tvb,
1387                         11, tvb_length (tvb), args_tree);
1388                     if (check_col(pinfo->cinfo, COL_INFO)) {
1389                         col_append_str(pinfo->cinfo, COL_INFO,
1390                             "Exchange.Declare-Ok ");
1391                         col_set_fence(pinfo->cinfo, COL_INFO);
1392                     }
1393                     break;
1394                 case AMQP_METHOD_EXCHANGE_DELETE:
1395                     offset = dissect_amqp_method_exchange_delete(tvb,
1396                         11, tvb_length (tvb), args_tree);
1397                     if (check_col(pinfo->cinfo, COL_INFO)) {
1398                         col_append_str(pinfo->cinfo, COL_INFO,
1399                             "Exchange.Delete ");
1400                         col_set_fence(pinfo->cinfo, COL_INFO);
1401                     }
1402                     break;
1403                 case AMQP_METHOD_EXCHANGE_DELETE_OK:
1404                     offset = dissect_amqp_method_exchange_delete_ok(tvb,
1405                         11, tvb_length (tvb), args_tree);
1406                     if (check_col(pinfo->cinfo, COL_INFO)) {
1407                         col_append_str(pinfo->cinfo, COL_INFO,
1408                             "Exchange.Delete-Ok ");
1409                         col_set_fence(pinfo->cinfo, COL_INFO);
1410                     }
1411                     break;
1412                 default:
1413                     DISSECTOR_ASSERT(FALSE);
1414                 }
1415                 break;
1416             case AMQP_CLASS_QUEUE:
1417                 proto_tree_add_item(amqp_tree, hf_amqp_method_queue_method_id,
1418                     tvb, 9, 2, FALSE);
1419                 ti = proto_tree_add_item(amqp_tree, hf_amqp_method_arguments,
1420                     tvb, 11, length - 4, FALSE);
1421                 args_tree = proto_item_add_subtree(ti, ett_args);
1422                 switch (tvb_get_ntohs(tvb, 9)) {
1423                 case AMQP_METHOD_QUEUE_DECLARE:
1424                     offset = dissect_amqp_method_queue_declare(tvb,
1425                         11, tvb_length (tvb), args_tree);
1426                     if (check_col(pinfo->cinfo, COL_INFO)) {
1427                         col_append_str(pinfo->cinfo, COL_INFO,
1428                             "Queue.Declare ");
1429                         col_set_fence(pinfo->cinfo, COL_INFO);
1430                     }
1431                     break;
1432                 case AMQP_METHOD_QUEUE_DECLARE_OK:
1433                     offset = dissect_amqp_method_queue_declare_ok(tvb,
1434                         11, tvb_length (tvb), args_tree);
1435                     if (check_col(pinfo->cinfo, COL_INFO)) {
1436                         col_append_str(pinfo->cinfo, COL_INFO,
1437                             "Queue.Declare-Ok ");
1438                         col_set_fence(pinfo->cinfo, COL_INFO);
1439                     }
1440                     break;
1441                 case AMQP_METHOD_QUEUE_BIND:
1442                     offset = dissect_amqp_method_queue_bind(tvb,
1443                         11, tvb_length (tvb), args_tree);
1444                     if (check_col(pinfo->cinfo, COL_INFO)) {
1445                         col_append_str(pinfo->cinfo, COL_INFO,
1446                             "Queue.Bind ");
1447                         col_set_fence(pinfo->cinfo, COL_INFO);
1448                     }
1449                     break;
1450                 case AMQP_METHOD_QUEUE_BIND_OK:
1451                     offset = dissect_amqp_method_queue_bind_ok(tvb,
1452                         11, tvb_length (tvb), args_tree);
1453                     if (check_col(pinfo->cinfo, COL_INFO)) {
1454                         col_append_str(pinfo->cinfo, COL_INFO,
1455                             "Queue.Bind-Ok ");
1456                         col_set_fence(pinfo->cinfo, COL_INFO);
1457                     }
1458                     break;
1459                 case AMQP_METHOD_QUEUE_UNBIND:
1460                     offset = dissect_amqp_method_queue_unbind(tvb,
1461                         11, tvb_length (tvb), args_tree);
1462                     if (check_col(pinfo->cinfo, COL_INFO)) {
1463                         col_append_str(pinfo->cinfo, COL_INFO,
1464                             "Queue.Unbind ");
1465                         col_set_fence(pinfo->cinfo, COL_INFO);
1466                     }
1467                     break;
1468                 case AMQP_METHOD_QUEUE_UNBIND_OK:
1469                     offset = dissect_amqp_method_queue_unbind_ok(tvb,
1470                         11, tvb_length (tvb), args_tree);
1471                     if (check_col(pinfo->cinfo, COL_INFO)) {
1472                         col_append_str(pinfo->cinfo, COL_INFO,
1473                             "Queue.Unbind-Ok ");
1474                         col_set_fence(pinfo->cinfo, COL_INFO);
1475                     }
1476                     break;
1477                 case AMQP_METHOD_QUEUE_PURGE:
1478                     offset = dissect_amqp_method_queue_purge(tvb,
1479                         11, tvb_length (tvb), args_tree);
1480                     if (check_col(pinfo->cinfo, COL_INFO)) {
1481                         col_append_str(pinfo->cinfo, COL_INFO,
1482                             "Queue.Purge ");
1483                         col_set_fence(pinfo->cinfo, COL_INFO);
1484                     }
1485                     break;
1486                 case AMQP_METHOD_QUEUE_PURGE_OK:
1487                     offset = dissect_amqp_method_queue_purge_ok(tvb,
1488                         11, tvb_length (tvb), args_tree);
1489                     if (check_col(pinfo->cinfo, COL_INFO)) {
1490                         col_append_str(pinfo->cinfo, COL_INFO,
1491                             "Queue.Purge-Ok ");
1492                         col_set_fence(pinfo->cinfo, COL_INFO);
1493                     }
1494                     break;
1495                 case AMQP_METHOD_QUEUE_DELETE:
1496                     offset = dissect_amqp_method_queue_delete(tvb,
1497                         11, tvb_length (tvb), args_tree);
1498                     if (check_col(pinfo->cinfo, COL_INFO)) {
1499                         col_append_str(pinfo->cinfo, COL_INFO,
1500                             "Queue.Delete ");
1501                         col_set_fence(pinfo->cinfo, COL_INFO);
1502                     }
1503                     break;
1504                 case AMQP_METHOD_QUEUE_DELETE_OK:
1505                     offset = dissect_amqp_method_queue_delete_ok(tvb,
1506                         11, tvb_length (tvb), args_tree);
1507                     if (check_col(pinfo->cinfo, COL_INFO)) {
1508                         col_append_str(pinfo->cinfo, COL_INFO,
1509                             "Queue.Delete-Ok ");
1510                         col_set_fence(pinfo->cinfo, COL_INFO);
1511                     }
1512                     break;
1513                 default:
1514                     DISSECTOR_ASSERT(FALSE);
1515                 }
1516                 break;
1517             case AMQP_CLASS_BASIC:
1518                 proto_tree_add_item(amqp_tree, hf_amqp_method_basic_method_id,
1519                     tvb, 9, 2, FALSE);
1520                 ti = proto_tree_add_item(amqp_tree, hf_amqp_method_arguments,
1521                     tvb, 11, length - 4, FALSE);
1522                 args_tree = proto_item_add_subtree(ti, ett_args);
1523                 switch (tvb_get_ntohs(tvb, 9)) {
1524                 case AMQP_METHOD_BASIC_QOS:
1525                     offset = dissect_amqp_method_basic_qos(tvb,
1526                         11, tvb_length (tvb), args_tree);
1527                     if (check_col(pinfo->cinfo, COL_INFO)) {
1528                         col_append_str(pinfo->cinfo, COL_INFO,
1529                             "Basic.Qos ");
1530                         col_set_fence(pinfo->cinfo, COL_INFO);
1531                     }
1532                     break;
1533                 case AMQP_METHOD_BASIC_QOS_OK:
1534                     offset = dissect_amqp_method_basic_qos_ok(tvb,
1535                         11, tvb_length (tvb), args_tree);
1536                     if (check_col(pinfo->cinfo, COL_INFO)) {
1537                         col_append_str(pinfo->cinfo, COL_INFO,
1538                             "Basic.Qos-Ok ");
1539                         col_set_fence(pinfo->cinfo, COL_INFO);
1540                     }
1541                     break;
1542                 case AMQP_METHOD_BASIC_CONSUME:
1543                     offset = dissect_amqp_method_basic_consume(tvb,
1544                         11, tvb_length (tvb), args_tree);
1545                     if (check_col(pinfo->cinfo, COL_INFO)) {
1546                         col_append_str(pinfo->cinfo, COL_INFO,
1547                             "Basic.Consume ");
1548                         col_set_fence(pinfo->cinfo, COL_INFO);
1549                     }
1550                     break;
1551                 case AMQP_METHOD_BASIC_CONSUME_OK:
1552                     offset = dissect_amqp_method_basic_consume_ok(tvb,
1553                         11, tvb_length (tvb), args_tree);
1554                     if (check_col(pinfo->cinfo, COL_INFO)) {
1555                         col_append_str(pinfo->cinfo, COL_INFO,
1556                             "Basic.Consume-Ok ");
1557                         col_set_fence(pinfo->cinfo, COL_INFO);
1558                     }
1559                     break;
1560                 case AMQP_METHOD_BASIC_CANCEL:
1561                     offset = dissect_amqp_method_basic_cancel(tvb,
1562                         11, tvb_length (tvb), args_tree);
1563                     if (check_col(pinfo->cinfo, COL_INFO)) {
1564                         col_append_str(pinfo->cinfo, COL_INFO,
1565                             "Basic.Cancel ");
1566                         col_set_fence(pinfo->cinfo, COL_INFO);
1567                     }
1568                     break;
1569                 case AMQP_METHOD_BASIC_CANCEL_OK:
1570                     offset = dissect_amqp_method_basic_cancel_ok(tvb,
1571                         11, tvb_length (tvb), args_tree);
1572                     if (check_col(pinfo->cinfo, COL_INFO)) {
1573                         col_append_str(pinfo->cinfo, COL_INFO,
1574                             "Basic.Cancel-Ok ");
1575                         col_set_fence(pinfo->cinfo, COL_INFO);
1576                     }
1577                     break;
1578                 case AMQP_METHOD_BASIC_PUBLISH:
1579                     offset = dissect_amqp_method_basic_publish(tvb,
1580                         11, tvb_length (tvb), args_tree);
1581                     if (check_col(pinfo->cinfo, COL_INFO)) {
1582                         col_append_str(pinfo->cinfo, COL_INFO,
1583                             "Basic.Publish ");
1584                         col_set_fence(pinfo->cinfo, COL_INFO);
1585                     }
1586                     break;
1587                 case AMQP_METHOD_BASIC_RETURN:
1588                     offset = dissect_amqp_method_basic_return(tvb,
1589                         11, tvb_length (tvb), args_tree);
1590                     if (check_col(pinfo->cinfo, COL_INFO)) {
1591                         col_append_str(pinfo->cinfo, COL_INFO,
1592                             "Basic.Return ");
1593                         col_set_fence(pinfo->cinfo, COL_INFO);
1594                     }
1595                     break;
1596                 case AMQP_METHOD_BASIC_DELIVER:
1597                     offset = dissect_amqp_method_basic_deliver(tvb,
1598                         11, tvb_length (tvb), args_tree);
1599                     if (check_col(pinfo->cinfo, COL_INFO)) {
1600                         col_append_str(pinfo->cinfo, COL_INFO,
1601                             "Basic.Deliver ");
1602                         col_set_fence(pinfo->cinfo, COL_INFO);
1603                     }
1604                     break;
1605                 case AMQP_METHOD_BASIC_GET:
1606                     offset = dissect_amqp_method_basic_get(tvb,
1607                         11, tvb_length (tvb), args_tree);
1608                     if (check_col(pinfo->cinfo, COL_INFO)) {
1609                         col_append_str(pinfo->cinfo, COL_INFO,
1610                             "Basic.Get ");
1611                         col_set_fence(pinfo->cinfo, COL_INFO);
1612                     }
1613                     break;
1614                 case AMQP_METHOD_BASIC_GET_OK:
1615                     offset = dissect_amqp_method_basic_get_ok(tvb,
1616                         11, tvb_length (tvb), args_tree);
1617                     if (check_col(pinfo->cinfo, COL_INFO)) {
1618                         col_append_str(pinfo->cinfo, COL_INFO,
1619                             "Basic.Get-Ok ");
1620                         col_set_fence(pinfo->cinfo, COL_INFO);
1621                     }
1622                     break;
1623                 case AMQP_METHOD_BASIC_GET_EMPTY:
1624                     offset = dissect_amqp_method_basic_get_empty(tvb,
1625                         11, tvb_length (tvb), args_tree);
1626                     if (check_col(pinfo->cinfo, COL_INFO)) {
1627                         col_append_str(pinfo->cinfo, COL_INFO,
1628                             "Basic.Get-Empty ");
1629                         col_set_fence(pinfo->cinfo, COL_INFO);
1630                     }
1631                     break;
1632                 case AMQP_METHOD_BASIC_ACK:
1633                     offset = dissect_amqp_method_basic_ack(tvb,
1634                         11, tvb_length (tvb), args_tree);
1635                     if (check_col(pinfo->cinfo, COL_INFO)) {
1636                         col_append_str(pinfo->cinfo, COL_INFO,
1637                             "Basic.Ack ");
1638                         col_set_fence(pinfo->cinfo, COL_INFO);
1639                     }
1640                     break;
1641                 case AMQP_METHOD_BASIC_REJECT:
1642                     offset = dissect_amqp_method_basic_reject(tvb,
1643                         11, tvb_length (tvb), args_tree);
1644                     if (check_col(pinfo->cinfo, COL_INFO)) {
1645                         col_append_str(pinfo->cinfo, COL_INFO,
1646                             "Basic.Reject ");
1647                         col_set_fence(pinfo->cinfo, COL_INFO);
1648                     }
1649                     break;
1650                 case AMQP_METHOD_BASIC_RECOVER:
1651                     offset = dissect_amqp_method_basic_recover(tvb,
1652                         11, tvb_length (tvb), args_tree);
1653                     if (check_col(pinfo->cinfo, COL_INFO)) {
1654                         col_append_str(pinfo->cinfo, COL_INFO,
1655                             "Basic.Recover ");
1656                         col_set_fence(pinfo->cinfo, COL_INFO);
1657                     }
1658                     break;
1659                 default:
1660                     DISSECTOR_ASSERT(FALSE);
1661                 }
1662                 break;
1663             case AMQP_CLASS_FILE:
1664                 proto_tree_add_item(amqp_tree, hf_amqp_method_file_method_id,
1665                     tvb, 9, 2, FALSE);
1666                 ti = proto_tree_add_item(amqp_tree, hf_amqp_method_arguments,
1667                     tvb, 11, length - 4, FALSE);
1668                 args_tree = proto_item_add_subtree(ti, ett_args);
1669                 switch (tvb_get_ntohs(tvb, 9)) {
1670                 case AMQP_METHOD_FILE_QOS:
1671                     offset = dissect_amqp_method_file_qos(tvb,
1672                         11, tvb_length (tvb), args_tree);
1673                     if (check_col(pinfo->cinfo, COL_INFO)) {
1674                         col_append_str(pinfo->cinfo, COL_INFO,
1675                             "File.Qos ");
1676                         col_set_fence(pinfo->cinfo, COL_INFO);
1677                     }
1678                     break;
1679                 case AMQP_METHOD_FILE_QOS_OK:
1680                     offset = dissect_amqp_method_file_qos_ok(tvb,
1681                         11, tvb_length (tvb), args_tree);
1682                     if (check_col(pinfo->cinfo, COL_INFO)) {
1683                         col_append_str(pinfo->cinfo, COL_INFO,
1684                             "File.Qos-Ok ");
1685                         col_set_fence(pinfo->cinfo, COL_INFO);
1686                     }
1687                     break;
1688                 case AMQP_METHOD_FILE_CONSUME:
1689                     offset = dissect_amqp_method_file_consume(tvb,
1690                         11, tvb_length (tvb), args_tree);
1691                     if (check_col(pinfo->cinfo, COL_INFO)) {
1692                         col_append_str(pinfo->cinfo, COL_INFO,
1693                             "File.Consume ");
1694                         col_set_fence(pinfo->cinfo, COL_INFO);
1695                     }
1696                     break;
1697                 case AMQP_METHOD_FILE_CONSUME_OK:
1698                     offset = dissect_amqp_method_file_consume_ok(tvb,
1699                         11, tvb_length (tvb), args_tree);
1700                     if (check_col(pinfo->cinfo, COL_INFO)) {
1701                         col_append_str(pinfo->cinfo, COL_INFO,
1702                             "File.Consume-Ok ");
1703                         col_set_fence(pinfo->cinfo, COL_INFO);
1704                     }
1705                     break;
1706                 case AMQP_METHOD_FILE_CANCEL:
1707                     offset = dissect_amqp_method_file_cancel(tvb,
1708                         11, tvb_length (tvb), args_tree);
1709                     if (check_col(pinfo->cinfo, COL_INFO)) {
1710                         col_append_str(pinfo->cinfo, COL_INFO,
1711                             "File.Cancel ");
1712                         col_set_fence(pinfo->cinfo, COL_INFO);
1713                     }
1714                     break;
1715                 case AMQP_METHOD_FILE_CANCEL_OK:
1716                     offset = dissect_amqp_method_file_cancel_ok(tvb,
1717                         11, tvb_length (tvb), args_tree);
1718                     if (check_col(pinfo->cinfo, COL_INFO)) {
1719                         col_append_str(pinfo->cinfo, COL_INFO,
1720                             "File.Cancel-Ok ");
1721                         col_set_fence(pinfo->cinfo, COL_INFO);
1722                     }
1723                     break;
1724                 case AMQP_METHOD_FILE_OPEN:
1725                     offset = dissect_amqp_method_file_open(tvb,
1726                         11, tvb_length (tvb), args_tree);
1727                     if (check_col(pinfo->cinfo, COL_INFO)) {
1728                         col_append_str(pinfo->cinfo, COL_INFO,
1729                             "File.Open ");
1730                         col_set_fence(pinfo->cinfo, COL_INFO);
1731                     }
1732                     break;
1733                 case AMQP_METHOD_FILE_OPEN_OK:
1734                     offset = dissect_amqp_method_file_open_ok(tvb,
1735                         11, tvb_length (tvb), args_tree);
1736                     if (check_col(pinfo->cinfo, COL_INFO)) {
1737                         col_append_str(pinfo->cinfo, COL_INFO,
1738                             "File.Open-Ok ");
1739                         col_set_fence(pinfo->cinfo, COL_INFO);
1740                     }
1741                     break;
1742                 case AMQP_METHOD_FILE_STAGE:
1743                     offset = dissect_amqp_method_file_stage(tvb,
1744                         11, tvb_length (tvb), args_tree);
1745                     if (check_col(pinfo->cinfo, COL_INFO)) {
1746                         col_append_str(pinfo->cinfo, COL_INFO,
1747                             "File.Stage ");
1748                         col_set_fence(pinfo->cinfo, COL_INFO);
1749                     }
1750                     break;
1751                 case AMQP_METHOD_FILE_PUBLISH:
1752                     offset = dissect_amqp_method_file_publish(tvb,
1753                         11, tvb_length (tvb), args_tree);
1754                     if (check_col(pinfo->cinfo, COL_INFO)) {
1755                         col_append_str(pinfo->cinfo, COL_INFO,
1756                             "File.Publish ");
1757                         col_set_fence(pinfo->cinfo, COL_INFO);
1758                     }
1759                     break;
1760                 case AMQP_METHOD_FILE_RETURN:
1761                     offset = dissect_amqp_method_file_return(tvb,
1762                         11, tvb_length (tvb), args_tree);
1763                     if (check_col(pinfo->cinfo, COL_INFO)) {
1764                         col_append_str(pinfo->cinfo, COL_INFO,
1765                             "File.Return ");
1766                         col_set_fence(pinfo->cinfo, COL_INFO);
1767                     }
1768                     break;
1769                 case AMQP_METHOD_FILE_DELIVER:
1770                     offset = dissect_amqp_method_file_deliver(tvb,
1771                         11, tvb_length (tvb), args_tree);
1772                     if (check_col(pinfo->cinfo, COL_INFO)) {
1773                         col_append_str(pinfo->cinfo, COL_INFO,
1774                             "File.Deliver ");
1775                         col_set_fence(pinfo->cinfo, COL_INFO);
1776                     }
1777                     break;
1778                 case AMQP_METHOD_FILE_ACK:
1779                     offset = dissect_amqp_method_file_ack(tvb,
1780                         11, tvb_length (tvb), args_tree);
1781                     if (check_col(pinfo->cinfo, COL_INFO)) {
1782                         col_append_str(pinfo->cinfo, COL_INFO,
1783                             "File.Ack ");
1784                         col_set_fence(pinfo->cinfo, COL_INFO);
1785                     }
1786                     break;
1787                 case AMQP_METHOD_FILE_REJECT:
1788                     offset = dissect_amqp_method_file_reject(tvb,
1789                         11, tvb_length (tvb), args_tree);
1790                     if (check_col(pinfo->cinfo, COL_INFO)) {
1791                         col_append_str(pinfo->cinfo, COL_INFO,
1792                             "File.Reject ");
1793                         col_set_fence(pinfo->cinfo, COL_INFO);
1794                     }
1795                     break;
1796                 default:
1797                     DISSECTOR_ASSERT(FALSE);
1798                 }
1799                 break;
1800             case AMQP_CLASS_STREAM:
1801                 proto_tree_add_item(amqp_tree, hf_amqp_method_stream_method_id,
1802                     tvb, 9, 2, FALSE);
1803                 ti = proto_tree_add_item(amqp_tree, hf_amqp_method_arguments,
1804                     tvb, 11, length - 4, FALSE);
1805                 args_tree = proto_item_add_subtree(ti, ett_args);
1806                 switch (tvb_get_ntohs(tvb, 9)) {
1807                 case AMQP_METHOD_STREAM_QOS:
1808                     offset = dissect_amqp_method_stream_qos(tvb,
1809                         11, tvb_length (tvb), args_tree);
1810                     if (check_col(pinfo->cinfo, COL_INFO)) {
1811                         col_append_str(pinfo->cinfo, COL_INFO,
1812                             "Stream.Qos ");
1813                         col_set_fence(pinfo->cinfo, COL_INFO);
1814                     }
1815                     break;
1816                 case AMQP_METHOD_STREAM_QOS_OK:
1817                     offset = dissect_amqp_method_stream_qos_ok(tvb,
1818                         11, tvb_length (tvb), args_tree);
1819                     if (check_col(pinfo->cinfo, COL_INFO)) {
1820                         col_append_str(pinfo->cinfo, COL_INFO,
1821                             "Stream.Qos-Ok ");
1822                         col_set_fence(pinfo->cinfo, COL_INFO);
1823                     }
1824                     break;
1825                 case AMQP_METHOD_STREAM_CONSUME:
1826                     offset = dissect_amqp_method_stream_consume(tvb,
1827                         11, tvb_length (tvb), args_tree);
1828                     if (check_col(pinfo->cinfo, COL_INFO)) {
1829                         col_append_str(pinfo->cinfo, COL_INFO,
1830                             "Stream.Consume ");
1831                         col_set_fence(pinfo->cinfo, COL_INFO);
1832                     }
1833                     break;
1834                 case AMQP_METHOD_STREAM_CONSUME_OK:
1835                     offset = dissect_amqp_method_stream_consume_ok(tvb,
1836                         11, tvb_length (tvb), args_tree);
1837                     if (check_col(pinfo->cinfo, COL_INFO)) {
1838                         col_append_str(pinfo->cinfo, COL_INFO,
1839                             "Stream.Consume-Ok ");
1840                         col_set_fence(pinfo->cinfo, COL_INFO);
1841                     }
1842                     break;
1843                 case AMQP_METHOD_STREAM_CANCEL:
1844                     offset = dissect_amqp_method_stream_cancel(tvb,
1845                         11, tvb_length (tvb), args_tree);
1846                     if (check_col(pinfo->cinfo, COL_INFO)) {
1847                         col_append_str(pinfo->cinfo, COL_INFO,
1848                             "Stream.Cancel ");
1849                         col_set_fence(pinfo->cinfo, COL_INFO);
1850                     }
1851                     break;
1852                 case AMQP_METHOD_STREAM_CANCEL_OK:
1853                     offset = dissect_amqp_method_stream_cancel_ok(tvb,
1854                         11, tvb_length (tvb), args_tree);
1855                     if (check_col(pinfo->cinfo, COL_INFO)) {
1856                         col_append_str(pinfo->cinfo, COL_INFO,
1857                             "Stream.Cancel-Ok ");
1858                         col_set_fence(pinfo->cinfo, COL_INFO);
1859                     }
1860                     break;
1861                 case AMQP_METHOD_STREAM_PUBLISH:
1862                     offset = dissect_amqp_method_stream_publish(tvb,
1863                         11, tvb_length (tvb), args_tree);
1864                     if (check_col(pinfo->cinfo, COL_INFO)) {
1865                         col_append_str(pinfo->cinfo, COL_INFO,
1866                             "Stream.Publish ");
1867                         col_set_fence(pinfo->cinfo, COL_INFO);
1868                     }
1869                     break;
1870                 case AMQP_METHOD_STREAM_RETURN:
1871                     offset = dissect_amqp_method_stream_return(tvb,
1872                         11, tvb_length (tvb), args_tree);
1873                     if (check_col(pinfo->cinfo, COL_INFO)) {
1874                         col_append_str(pinfo->cinfo, COL_INFO,
1875                             "Stream.Return ");
1876                         col_set_fence(pinfo->cinfo, COL_INFO);
1877                     }
1878                     break;
1879                 case AMQP_METHOD_STREAM_DELIVER:
1880                     offset = dissect_amqp_method_stream_deliver(tvb,
1881                         11, tvb_length (tvb), args_tree);
1882                     if (check_col(pinfo->cinfo, COL_INFO)) {
1883                         col_append_str(pinfo->cinfo, COL_INFO,
1884                             "Stream.Deliver ");
1885                         col_set_fence(pinfo->cinfo, COL_INFO);
1886                     }
1887                     break;
1888                 default:
1889                     DISSECTOR_ASSERT(FALSE);
1890                 }
1891                 break;
1892             case AMQP_CLASS_TX:
1893                 proto_tree_add_item(amqp_tree, hf_amqp_method_tx_method_id,
1894                     tvb, 9, 2, FALSE);
1895                 ti = proto_tree_add_item(amqp_tree, hf_amqp_method_arguments,
1896                     tvb, 11, length - 4, FALSE);
1897                 args_tree = proto_item_add_subtree(ti, ett_args);
1898                 switch (tvb_get_ntohs(tvb, 9)) {
1899                 case AMQP_METHOD_TX_SELECT:
1900                     offset = dissect_amqp_method_tx_select(tvb,
1901                         11, tvb_length (tvb), args_tree);
1902                     if (check_col(pinfo->cinfo, COL_INFO)) {
1903                         col_append_str(pinfo->cinfo, COL_INFO,
1904                             "Tx.Select ");
1905                         col_set_fence(pinfo->cinfo, COL_INFO);
1906                     }
1907                     break;
1908                 case AMQP_METHOD_TX_SELECT_OK:
1909                     offset = dissect_amqp_method_tx_select_ok(tvb,
1910                         11, tvb_length (tvb), args_tree);
1911                     if (check_col(pinfo->cinfo, COL_INFO)) {
1912                         col_append_str(pinfo->cinfo, COL_INFO,
1913                             "Tx.Select-Ok ");
1914                         col_set_fence(pinfo->cinfo, COL_INFO);
1915                     }
1916                     break;
1917                 case AMQP_METHOD_TX_COMMIT:
1918                     offset = dissect_amqp_method_tx_commit(tvb,
1919                         11, tvb_length (tvb), args_tree);
1920                     if (check_col(pinfo->cinfo, COL_INFO)) {
1921                         col_append_str(pinfo->cinfo, COL_INFO,
1922                             "Tx.Commit ");
1923                         col_set_fence(pinfo->cinfo, COL_INFO);
1924                     }
1925                     break;
1926                 case AMQP_METHOD_TX_COMMIT_OK:
1927                     offset = dissect_amqp_method_tx_commit_ok(tvb,
1928                         11, tvb_length (tvb), args_tree);
1929                     if (check_col(pinfo->cinfo, COL_INFO)) {
1930                         col_append_str(pinfo->cinfo, COL_INFO,
1931                             "Tx.Commit-Ok ");
1932                         col_set_fence(pinfo->cinfo, COL_INFO);
1933                     }
1934                     break;
1935                 case AMQP_METHOD_TX_ROLLBACK:
1936                     offset = dissect_amqp_method_tx_rollback(tvb,
1937                         11, tvb_length (tvb), args_tree);
1938                     if (check_col(pinfo->cinfo, COL_INFO)) {
1939                         col_append_str(pinfo->cinfo, COL_INFO,
1940                             "Tx.Rollback ");
1941                         col_set_fence(pinfo->cinfo, COL_INFO);
1942                     }
1943                     break;
1944                 case AMQP_METHOD_TX_ROLLBACK_OK:
1945                     offset = dissect_amqp_method_tx_rollback_ok(tvb,
1946                         11, tvb_length (tvb), args_tree);
1947                     if (check_col(pinfo->cinfo, COL_INFO)) {
1948                         col_append_str(pinfo->cinfo, COL_INFO,
1949                             "Tx.Rollback-Ok ");
1950                         col_set_fence(pinfo->cinfo, COL_INFO);
1951                     }
1952                     break;
1953                 default:
1954                     DISSECTOR_ASSERT(FALSE);
1955                 }
1956                 break;
1957             case AMQP_CLASS_DTX:
1958                 proto_tree_add_item(amqp_tree, hf_amqp_method_dtx_method_id,
1959                     tvb, 9, 2, FALSE);
1960                 ti = proto_tree_add_item(amqp_tree, hf_amqp_method_arguments,
1961                     tvb, 11, length - 4, FALSE);
1962                 args_tree = proto_item_add_subtree(ti, ett_args);
1963                 switch (tvb_get_ntohs(tvb, 9)) {
1964                 case AMQP_METHOD_DTX_SELECT:
1965                     offset = dissect_amqp_method_dtx_select(tvb,
1966                         11, tvb_length (tvb), args_tree);
1967                     if (check_col(pinfo->cinfo, COL_INFO)) {
1968                         col_append_str(pinfo->cinfo, COL_INFO,
1969                             "Dtx.Select ");
1970                         col_set_fence(pinfo->cinfo, COL_INFO);
1971                     }
1972                     break;
1973                 case AMQP_METHOD_DTX_SELECT_OK:
1974                     offset = dissect_amqp_method_dtx_select_ok(tvb,
1975                         11, tvb_length (tvb), args_tree);
1976                     if (check_col(pinfo->cinfo, COL_INFO)) {
1977                         col_append_str(pinfo->cinfo, COL_INFO,
1978                             "Dtx.Select-Ok ");
1979                         col_set_fence(pinfo->cinfo, COL_INFO);
1980                     }
1981                     break;
1982                 case AMQP_METHOD_DTX_START:
1983                     offset = dissect_amqp_method_dtx_start(tvb,
1984                         11, tvb_length (tvb), args_tree);
1985                     if (check_col(pinfo->cinfo, COL_INFO)) {
1986                         col_append_str(pinfo->cinfo, COL_INFO,
1987                             "Dtx.Start ");
1988                         col_set_fence(pinfo->cinfo, COL_INFO);
1989                     }
1990                     break;
1991                 case AMQP_METHOD_DTX_START_OK:
1992                     offset = dissect_amqp_method_dtx_start_ok(tvb,
1993                         11, tvb_length (tvb), args_tree);
1994                     if (check_col(pinfo->cinfo, COL_INFO)) {
1995                         col_append_str(pinfo->cinfo, COL_INFO,
1996                             "Dtx.Start-Ok ");
1997                         col_set_fence(pinfo->cinfo, COL_INFO);
1998                     }
1999                     break;
2000                 default:
2001                     DISSECTOR_ASSERT(FALSE);
2002                 }
2003                 break;
2004             case AMQP_CLASS_TUNNEL:
2005                 proto_tree_add_item(amqp_tree, hf_amqp_method_tunnel_method_id,
2006                     tvb, 9, 2, FALSE);
2007                 ti = proto_tree_add_item(amqp_tree, hf_amqp_method_arguments,
2008                     tvb, 11, length - 4, FALSE);
2009                 args_tree = proto_item_add_subtree(ti, ett_args);
2010                 switch (tvb_get_ntohs(tvb, 9)) {
2011                 case AMQP_METHOD_TUNNEL_REQUEST:
2012                     offset = dissect_amqp_method_tunnel_request(tvb,
2013                         11, tvb_length (tvb), args_tree);
2014                     if (check_col(pinfo->cinfo, COL_INFO)) {
2015                         col_append_str(pinfo->cinfo, COL_INFO,
2016                             "Tunnel.Request ");
2017                         col_set_fence(pinfo->cinfo, COL_INFO);
2018                     }
2019                     break;
2020                 default:
2021                     DISSECTOR_ASSERT(FALSE);
2022                 }
2023                 break;
2024             default:
2025                 DISSECTOR_ASSERT(FALSE);
2026             }
2027             break;
2028         case AMQP_FRAME_TYPE_CONTENT_HEADER:
2029             proto_tree_add_item(amqp_tree, hf_amqp_header_class_id,
2030                 tvb, 7, 2, FALSE);
2031             proto_tree_add_item(amqp_tree, hf_amqp_header_weight,
2032                 tvb, 9, 2, FALSE);
2033             proto_tree_add_item(amqp_tree, hf_amqp_header_body_size,
2034                 tvb, 11, 8, FALSE);
2035             proto_tree_add_item(amqp_tree, hf_amqp_header_property_flags,
2036                 tvb, 19, 2, FALSE);
2037             ti = proto_tree_add_item(amqp_tree, hf_amqp_header_properties,
2038                 tvb, 21, length - 14, FALSE);
2039             prop_tree = proto_item_add_subtree(ti, ett_props);
2040             offset = 21;
2041             switch (tvb_get_ntohs(tvb, 7)) {
2042             case AMQP_CLASS_BASIC:
2043                 offset = dissect_amqp_content_header_basic(tvb,
2044                     offset, tvb_length (tvb), prop_tree);
2045                 break;
2046             case AMQP_CLASS_FILE:
2047                 offset = dissect_amqp_content_header_file(tvb,
2048                     offset, tvb_length (tvb), prop_tree);
2049                 break;
2050             case AMQP_CLASS_STREAM:
2051                 offset = dissect_amqp_content_header_stream(tvb,
2052                     offset, tvb_length (tvb), prop_tree);
2053                 break;
2054             case AMQP_CLASS_TUNNEL:
2055                 offset = dissect_amqp_content_header_tunnel(tvb,
2056                     offset, tvb_length (tvb), prop_tree);
2057                 break;
2058             default:
2059                 DISSECTOR_ASSERT(FALSE);
2060             }
2061             if (check_col(pinfo->cinfo, COL_INFO)) {
2062                 col_append_str(pinfo->cinfo, COL_INFO, "Content-Header ");
2063                 col_set_fence(pinfo->cinfo, COL_INFO);
2064             }
2065             break;
2066         case AMQP_FRAME_TYPE_CONTENT_BODY:
2067             proto_tree_add_item(amqp_tree, hf_amqp_payload,
2068                 tvb, 7, length, FALSE);
2069             if (check_col(pinfo->cinfo, COL_INFO)) {
2070                 col_append_str(pinfo->cinfo, COL_INFO, "Content-Body ");
2071                 col_set_fence(pinfo->cinfo, COL_INFO);
2072             }
2073             break;
2074         default:
2075             DISSECTOR_ASSERT(FALSE);
2076         }
2077     }
2078 }
2079
2080 /*  Dissection routine for method Connection.Start                        */
2081
2082 static int
2083 dissect_amqp_method_connection_start(tvbuff_t *tvb,
2084     int offset, int bound, proto_tree *args_tree)
2085 {
2086     proto_item *ti;
2087     /*  version-major (octet)    */
2088     proto_tree_add_item(args_tree, hf_amqp_method_connection_start_version_major,
2089         tvb, offset, 1, FALSE);
2090     AMQP_INCREMENT(offset, 1, bound);
2091
2092     /*  version-minor (octet)    */
2093     proto_tree_add_item(args_tree, hf_amqp_method_connection_start_version_minor,
2094         tvb, offset, 1, FALSE);
2095     AMQP_INCREMENT(offset, 1, bound);
2096
2097     /*  server-properties (table)  */
2098     ti = proto_tree_add_item(
2099         args_tree, hf_amqp_method_connection_start_server_properties,
2100         tvb, offset + 4, tvb_get_ntohl(tvb, offset), FALSE);
2101     dissect_amqp_field_table (tvb, offset + 4,
2102         offset + 4 + tvb_get_ntohl(tvb, offset), tvb_get_ntohl(tvb, offset), ti);
2103     AMQP_INCREMENT(offset, 4 + tvb_get_ntohl(tvb, offset), bound);
2104
2105     /*  mechanisms (longstr)     */
2106     proto_tree_add_item(args_tree, hf_amqp_method_connection_start_mechanisms,
2107         tvb, offset + 4, tvb_get_ntohl(tvb, offset), FALSE);
2108     AMQP_INCREMENT(offset, 4 + tvb_get_ntohl(tvb, offset), bound);
2109
2110     /*  locales (longstr)        */
2111     proto_tree_add_item(args_tree, hf_amqp_method_connection_start_locales,
2112         tvb, offset + 4, tvb_get_ntohl(tvb, offset), FALSE);
2113     AMQP_INCREMENT(offset, 4 + tvb_get_ntohl(tvb, offset), bound);
2114
2115     return offset;
2116 }
2117
2118 /*  Dissection routine for method Connection.Start-Ok                     */
2119
2120 static int
2121 dissect_amqp_method_connection_start_ok(tvbuff_t *tvb,
2122     int offset, int bound, proto_tree *args_tree)
2123 {
2124     proto_item *ti;
2125     /*  client-properties (table)  */
2126     ti = proto_tree_add_item(
2127         args_tree, hf_amqp_method_connection_start_ok_client_properties,
2128         tvb, offset + 4, tvb_get_ntohl(tvb, offset), FALSE);
2129     dissect_amqp_field_table (tvb, offset + 4,
2130         offset + 4 + tvb_get_ntohl(tvb, offset), tvb_get_ntohl(tvb, offset), ti);
2131     AMQP_INCREMENT(offset, 4 + tvb_get_ntohl(tvb, offset), bound);
2132
2133     /*  mechanism (shortstr)     */
2134     proto_tree_add_item(args_tree, hf_amqp_method_connection_start_ok_mechanism,
2135         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
2136     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
2137
2138     /*  response (longstr)       */
2139     proto_tree_add_item(args_tree, hf_amqp_method_connection_start_ok_response,
2140         tvb, offset + 4, tvb_get_ntohl(tvb, offset), FALSE);
2141     AMQP_INCREMENT(offset, 4 + tvb_get_ntohl(tvb, offset), bound);
2142
2143     /*  locale (shortstr)        */
2144     proto_tree_add_item(args_tree, hf_amqp_method_connection_start_ok_locale,
2145         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
2146     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
2147
2148     return offset;
2149 }
2150
2151 /*  Dissection routine for method Connection.Secure                       */
2152
2153 static int
2154 dissect_amqp_method_connection_secure(tvbuff_t *tvb,
2155     int offset, int bound, proto_tree *args_tree)
2156 {
2157     /*  challenge (longstr)      */
2158     proto_tree_add_item(args_tree, hf_amqp_method_connection_secure_challenge,
2159         tvb, offset + 4, tvb_get_ntohl(tvb, offset), FALSE);
2160     AMQP_INCREMENT(offset, 4 + tvb_get_ntohl(tvb, offset), bound);
2161
2162     return offset;
2163 }
2164
2165 /*  Dissection routine for method Connection.Secure-Ok                    */
2166
2167 static int
2168 dissect_amqp_method_connection_secure_ok(tvbuff_t *tvb,
2169     int offset, int bound, proto_tree *args_tree)
2170 {
2171     /*  response (longstr)       */
2172     proto_tree_add_item(args_tree, hf_amqp_method_connection_secure_ok_response,
2173         tvb, offset + 4, tvb_get_ntohl(tvb, offset), FALSE);
2174     AMQP_INCREMENT(offset, 4 + tvb_get_ntohl(tvb, offset), bound);
2175
2176     return offset;
2177 }
2178
2179 /*  Dissection routine for method Connection.Tune                         */
2180
2181 static int
2182 dissect_amqp_method_connection_tune(tvbuff_t *tvb,
2183     int offset, int bound, proto_tree *args_tree)
2184 {
2185     /*  channel-max (short)      */
2186     proto_tree_add_item(args_tree, hf_amqp_method_connection_tune_channel_max,
2187         tvb, offset, 2, FALSE);
2188     AMQP_INCREMENT(offset, 2, bound);
2189
2190     /*  frame-max (long)         */
2191     proto_tree_add_item(args_tree, hf_amqp_method_connection_tune_frame_max,
2192         tvb, offset, 4, FALSE);
2193     AMQP_INCREMENT(offset, 4, bound);
2194
2195     /*  heartbeat (short)        */
2196     proto_tree_add_item(args_tree, hf_amqp_method_connection_tune_heartbeat,
2197         tvb, offset, 2, FALSE);
2198     AMQP_INCREMENT(offset, 2, bound);
2199
2200     return offset;
2201 }
2202
2203 /*  Dissection routine for method Connection.Tune-Ok                      */
2204
2205 static int
2206 dissect_amqp_method_connection_tune_ok(tvbuff_t *tvb,
2207     int offset, int bound, proto_tree *args_tree)
2208 {
2209     /*  channel-max (short)      */
2210     proto_tree_add_item(args_tree, hf_amqp_method_connection_tune_ok_channel_max,
2211         tvb, offset, 2, FALSE);
2212     AMQP_INCREMENT(offset, 2, bound);
2213
2214     /*  frame-max (long)         */
2215     proto_tree_add_item(args_tree, hf_amqp_method_connection_tune_ok_frame_max,
2216         tvb, offset, 4, FALSE);
2217     AMQP_INCREMENT(offset, 4, bound);
2218
2219     /*  heartbeat (short)        */
2220     proto_tree_add_item(args_tree, hf_amqp_method_connection_tune_ok_heartbeat,
2221         tvb, offset, 2, FALSE);
2222     AMQP_INCREMENT(offset, 2, bound);
2223
2224     return offset;
2225 }
2226
2227 /*  Dissection routine for method Connection.Open                         */
2228
2229 static int
2230 dissect_amqp_method_connection_open(tvbuff_t *tvb,
2231     int offset, int bound, proto_tree *args_tree)
2232 {
2233     /*  virtual-host (shortstr)  */
2234     proto_tree_add_item(args_tree, hf_amqp_method_connection_open_virtual_host,
2235         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
2236     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
2237
2238     /*  capabilities (shortstr)  */
2239     proto_tree_add_item(args_tree, hf_amqp_method_connection_open_capabilities,
2240         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
2241     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
2242
2243     /*  insist (bit)             */
2244     proto_tree_add_item(args_tree, hf_amqp_method_connection_open_insist,
2245         tvb, offset, 1, FALSE);
2246
2247     return offset;
2248 }
2249
2250 /*  Dissection routine for method Connection.Open-Ok                      */
2251
2252 static int
2253 dissect_amqp_method_connection_open_ok(tvbuff_t *tvb,
2254     int offset, int bound, proto_tree *args_tree)
2255 {
2256     /*  known-hosts (shortstr)   */
2257     proto_tree_add_item(args_tree, hf_amqp_method_connection_open_ok_known_hosts,
2258         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
2259     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
2260
2261     return offset;
2262 }
2263
2264 /*  Dissection routine for method Connection.Redirect                     */
2265
2266 static int
2267 dissect_amqp_method_connection_redirect(tvbuff_t *tvb _U_,
2268     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
2269 {
2270     /*  host (shortstr)          */
2271     proto_tree_add_item(args_tree, hf_amqp_method_connection_redirect_host,
2272         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
2273     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
2274
2275     /*  known-hosts (shortstr)   */
2276     proto_tree_add_item(args_tree, hf_amqp_method_connection_redirect_known_hosts,
2277         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
2278     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
2279
2280     return offset;
2281 }
2282
2283 /*  Dissection routine for method Connection.Close                        */
2284
2285 static int
2286 dissect_amqp_method_connection_close(tvbuff_t *tvb _U_,
2287     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
2288 {
2289     /*  reply-code (short)       */
2290     proto_tree_add_item(args_tree, hf_amqp_method_connection_close_reply_code,
2291         tvb, offset, 2, FALSE);
2292     AMQP_INCREMENT(offset, 2, bound);
2293
2294     /*  reply-text (shortstr)    */
2295     proto_tree_add_item(args_tree, hf_amqp_method_connection_close_reply_text,
2296         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
2297     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
2298
2299     /*  class-id (short)         */
2300     proto_tree_add_item(args_tree, hf_amqp_method_connection_close_class_id,
2301         tvb, offset, 2, FALSE);
2302     AMQP_INCREMENT(offset, 2, bound);
2303
2304     /*  method-id (short)        */
2305     proto_tree_add_item(args_tree, hf_amqp_method_connection_close_method_id,
2306         tvb, offset, 2, FALSE);
2307     AMQP_INCREMENT(offset, 2, bound);
2308
2309     return offset;
2310 }
2311
2312 /*  Dissection routine for method Connection.Close-Ok                     */
2313
2314 static int
2315 dissect_amqp_method_connection_close_ok(tvbuff_t *tvb _U_,
2316     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
2317 {
2318     return offset;
2319 }
2320
2321 /*  Dissection routine for method Channel.Open                            */
2322
2323 static int
2324 dissect_amqp_method_channel_open(tvbuff_t *tvb _U_,
2325     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
2326 {
2327     /*  out-of-band (shortstr)   */
2328     proto_tree_add_item(args_tree, hf_amqp_method_channel_open_out_of_band,
2329         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
2330     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
2331
2332     return offset;
2333 }
2334
2335 /*  Dissection routine for method Channel.Open-Ok                         */
2336
2337 static int
2338 dissect_amqp_method_channel_open_ok(tvbuff_t *tvb _U_,
2339     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
2340 {
2341     /*  channel-id (longstr)     */
2342     proto_tree_add_item(args_tree, hf_amqp_method_channel_open_ok_channel_id,
2343         tvb, offset + 4, tvb_get_ntohl(tvb, offset), FALSE);
2344     AMQP_INCREMENT(offset, 4 + tvb_get_ntohl(tvb, offset), bound);
2345
2346     return offset;
2347 }
2348
2349 /*  Dissection routine for method Channel.Flow                            */
2350
2351 static int
2352 dissect_amqp_method_channel_flow(tvbuff_t *tvb _U_,
2353     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
2354 {
2355     /*  active (bit)             */
2356     proto_tree_add_item(args_tree, hf_amqp_method_channel_flow_active,
2357         tvb, offset, 1, FALSE);
2358
2359     return offset;
2360 }
2361
2362 /*  Dissection routine for method Channel.Flow-Ok                         */
2363
2364 static int
2365 dissect_amqp_method_channel_flow_ok(tvbuff_t *tvb _U_,
2366     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
2367 {
2368     /*  active (bit)             */
2369     proto_tree_add_item(args_tree, hf_amqp_method_channel_flow_ok_active,
2370         tvb, offset, 1, FALSE);
2371
2372     return offset;
2373 }
2374
2375 /*  Dissection routine for method Channel.Close                           */
2376
2377 static int
2378 dissect_amqp_method_channel_close(tvbuff_t *tvb _U_,
2379     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
2380 {
2381     /*  reply-code (short)       */
2382     proto_tree_add_item(args_tree, hf_amqp_method_channel_close_reply_code,
2383         tvb, offset, 2, FALSE);
2384     AMQP_INCREMENT(offset, 2, bound);
2385
2386     /*  reply-text (shortstr)    */
2387     proto_tree_add_item(args_tree, hf_amqp_method_channel_close_reply_text,
2388         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
2389     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
2390
2391     /*  class-id (short)         */
2392     proto_tree_add_item(args_tree, hf_amqp_method_channel_close_class_id,
2393         tvb, offset, 2, FALSE);
2394     AMQP_INCREMENT(offset, 2, bound);
2395
2396     /*  method-id (short)        */
2397     proto_tree_add_item(args_tree, hf_amqp_method_channel_close_method_id,
2398         tvb, offset, 2, FALSE);
2399     AMQP_INCREMENT(offset, 2, bound);
2400
2401     return offset;
2402 }
2403
2404 /*  Dissection routine for method Channel.Close-Ok                        */
2405
2406 static int
2407 dissect_amqp_method_channel_close_ok(tvbuff_t *tvb _U_,
2408     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
2409 {
2410     return offset;
2411 }
2412
2413 /*  Dissection routine for method Channel.Resume                          */
2414
2415 static int
2416 dissect_amqp_method_channel_resume(tvbuff_t *tvb _U_,
2417     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
2418 {
2419     /*  channel-id (longstr)     */
2420     proto_tree_add_item(args_tree, hf_amqp_method_channel_resume_channel_id,
2421         tvb, offset + 4, tvb_get_ntohl(tvb, offset), FALSE);
2422     AMQP_INCREMENT(offset, 4 + tvb_get_ntohl(tvb, offset), bound);
2423
2424     return offset;
2425 }
2426
2427 /*  Dissection routine for method Channel.Ping                            */
2428
2429 static int
2430 dissect_amqp_method_channel_ping(tvbuff_t *tvb _U_,
2431     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
2432 {
2433     return offset;
2434 }
2435
2436 /*  Dissection routine for method Channel.Pong                            */
2437
2438 static int
2439 dissect_amqp_method_channel_pong(tvbuff_t *tvb _U_,
2440     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
2441 {
2442     return offset;
2443 }
2444
2445 /*  Dissection routine for method Channel.Ok                              */
2446
2447 static int
2448 dissect_amqp_method_channel_ok(tvbuff_t *tvb _U_,
2449     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
2450 {
2451     return offset;
2452 }
2453
2454 /*  Dissection routine for method Access.Request                          */
2455
2456 static int
2457 dissect_amqp_method_access_request(tvbuff_t *tvb _U_,
2458     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
2459 {
2460     /*  realm (shortstr)         */
2461     proto_tree_add_item(args_tree, hf_amqp_method_access_request_realm,
2462         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
2463     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
2464
2465     /*  exclusive (bit)          */
2466     proto_tree_add_item(args_tree, hf_amqp_method_access_request_exclusive,
2467         tvb, offset, 1, FALSE);
2468
2469     /*  passive (bit)            */
2470     proto_tree_add_item(args_tree, hf_amqp_method_access_request_passive,
2471         tvb, offset, 1, FALSE);
2472
2473     /*  active (bit)             */
2474     proto_tree_add_item(args_tree, hf_amqp_method_access_request_active,
2475         tvb, offset, 1, FALSE);
2476
2477     /*  write (bit)              */
2478     proto_tree_add_item(args_tree, hf_amqp_method_access_request_write,
2479         tvb, offset, 1, FALSE);
2480
2481     /*  read (bit)               */
2482     proto_tree_add_item(args_tree, hf_amqp_method_access_request_read,
2483         tvb, offset, 1, FALSE);
2484
2485     return offset;
2486 }
2487
2488 /*  Dissection routine for method Access.Request-Ok                       */
2489
2490 static int
2491 dissect_amqp_method_access_request_ok(tvbuff_t *tvb _U_,
2492     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
2493 {
2494     /*  ticket (short)           */
2495     proto_tree_add_item(args_tree, hf_amqp_method_access_request_ok_ticket,
2496         tvb, offset, 2, FALSE);
2497     AMQP_INCREMENT(offset, 2, bound);
2498
2499     return offset;
2500 }
2501
2502 /*  Dissection routine for method Exchange.Declare                        */
2503
2504 static int
2505 dissect_amqp_method_exchange_declare(tvbuff_t *tvb _U_,
2506     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
2507 {
2508     proto_item *ti;
2509     /*  ticket (short)           */
2510     proto_tree_add_item(args_tree, hf_amqp_method_exchange_declare_ticket,
2511         tvb, offset, 2, FALSE);
2512     AMQP_INCREMENT(offset, 2, bound);
2513
2514     /*  exchange (shortstr)      */
2515     proto_tree_add_item(args_tree, hf_amqp_method_exchange_declare_exchange,
2516         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
2517     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
2518
2519     /*  type (shortstr)          */
2520     proto_tree_add_item(args_tree, hf_amqp_method_exchange_declare_type,
2521         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
2522     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
2523
2524     /*  passive (bit)            */
2525     proto_tree_add_item(args_tree, hf_amqp_method_exchange_declare_passive,
2526         tvb, offset, 1, FALSE);
2527
2528     /*  durable (bit)            */
2529     proto_tree_add_item(args_tree, hf_amqp_method_exchange_declare_durable,
2530         tvb, offset, 1, FALSE);
2531
2532     /*  auto-delete (bit)        */
2533     proto_tree_add_item(args_tree, hf_amqp_method_exchange_declare_auto_delete,
2534         tvb, offset, 1, FALSE);
2535
2536     /*  internal (bit)           */
2537     proto_tree_add_item(args_tree, hf_amqp_method_exchange_declare_internal,
2538         tvb, offset, 1, FALSE);
2539
2540     /*  nowait (bit)             */
2541     proto_tree_add_item(args_tree, hf_amqp_method_exchange_declare_nowait,
2542         tvb, offset, 1, FALSE);
2543
2544     AMQP_INCREMENT(offset, 1, bound);
2545     /*  arguments (table)        */
2546     ti = proto_tree_add_item(
2547         args_tree, hf_amqp_method_exchange_declare_arguments,
2548         tvb, offset + 4, tvb_get_ntohl(tvb, offset), FALSE);
2549     dissect_amqp_field_table (tvb, offset + 4,
2550         offset + 4 + tvb_get_ntohl(tvb, offset), tvb_get_ntohl(tvb, offset), ti);
2551     AMQP_INCREMENT(offset, 4 + tvb_get_ntohl(tvb, offset), bound);
2552
2553     return offset;
2554 }
2555
2556 /*  Dissection routine for method Exchange.Declare-Ok                     */
2557
2558 static int
2559 dissect_amqp_method_exchange_declare_ok(tvbuff_t *tvb _U_,
2560     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
2561 {
2562     return offset;
2563 }
2564
2565 /*  Dissection routine for method Exchange.Delete                         */
2566
2567 static int
2568 dissect_amqp_method_exchange_delete(tvbuff_t *tvb _U_,
2569     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
2570 {
2571     /*  ticket (short)           */
2572     proto_tree_add_item(args_tree, hf_amqp_method_exchange_delete_ticket,
2573         tvb, offset, 2, FALSE);
2574     AMQP_INCREMENT(offset, 2, bound);
2575
2576     /*  exchange (shortstr)      */
2577     proto_tree_add_item(args_tree, hf_amqp_method_exchange_delete_exchange,
2578         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
2579     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
2580
2581     /*  if-unused (bit)          */
2582     proto_tree_add_item(args_tree, hf_amqp_method_exchange_delete_if_unused,
2583         tvb, offset, 1, FALSE);
2584
2585     /*  nowait (bit)             */
2586     proto_tree_add_item(args_tree, hf_amqp_method_exchange_delete_nowait,
2587         tvb, offset, 1, FALSE);
2588
2589     return offset;
2590 }
2591
2592 /*  Dissection routine for method Exchange.Delete-Ok                      */
2593
2594 static int
2595 dissect_amqp_method_exchange_delete_ok(tvbuff_t *tvb _U_,
2596     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
2597 {
2598     return offset;
2599 }
2600
2601 /*  Dissection routine for method Queue.Declare                           */
2602
2603 static int
2604 dissect_amqp_method_queue_declare(tvbuff_t *tvb _U_,
2605     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
2606 {
2607     proto_item *ti;
2608     /*  ticket (short)           */
2609     proto_tree_add_item(args_tree, hf_amqp_method_queue_declare_ticket,
2610         tvb, offset, 2, FALSE);
2611     AMQP_INCREMENT(offset, 2, bound);
2612
2613     /*  queue (shortstr)         */
2614     proto_tree_add_item(args_tree, hf_amqp_method_queue_declare_queue,
2615         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
2616     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
2617
2618     /*  passive (bit)            */
2619     proto_tree_add_item(args_tree, hf_amqp_method_queue_declare_passive,
2620         tvb, offset, 1, FALSE);
2621
2622     /*  durable (bit)            */
2623     proto_tree_add_item(args_tree, hf_amqp_method_queue_declare_durable,
2624         tvb, offset, 1, FALSE);
2625
2626     /*  exclusive (bit)          */
2627     proto_tree_add_item(args_tree, hf_amqp_method_queue_declare_exclusive,
2628         tvb, offset, 1, FALSE);
2629
2630     /*  auto-delete (bit)        */
2631     proto_tree_add_item(args_tree, hf_amqp_method_queue_declare_auto_delete,
2632         tvb, offset, 1, FALSE);
2633
2634     /*  nowait (bit)             */
2635     proto_tree_add_item(args_tree, hf_amqp_method_queue_declare_nowait,
2636         tvb, offset, 1, FALSE);
2637
2638     AMQP_INCREMENT(offset, 1, bound);
2639     /*  arguments (table)        */
2640     ti = proto_tree_add_item(
2641         args_tree, hf_amqp_method_queue_declare_arguments,
2642         tvb, offset + 4, tvb_get_ntohl(tvb, offset), FALSE);
2643     dissect_amqp_field_table (tvb, offset + 4,
2644         offset + 4 + tvb_get_ntohl(tvb, offset), tvb_get_ntohl(tvb, offset), ti);
2645     AMQP_INCREMENT(offset, 4 + tvb_get_ntohl(tvb, offset), bound);
2646
2647     return offset;
2648 }
2649
2650 /*  Dissection routine for method Queue.Declare-Ok                        */
2651
2652 static int
2653 dissect_amqp_method_queue_declare_ok(tvbuff_t *tvb _U_,
2654     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
2655 {
2656     /*  queue (shortstr)         */
2657     proto_tree_add_item(args_tree, hf_amqp_method_queue_declare_ok_queue,
2658         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
2659     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
2660
2661     /*  message-count (long)     */
2662     proto_tree_add_item(args_tree, hf_amqp_method_queue_declare_ok_message_count,
2663         tvb, offset, 4, FALSE);
2664     AMQP_INCREMENT(offset, 4, bound);
2665
2666     /*  consumer-count (long)    */
2667     proto_tree_add_item(args_tree, hf_amqp_method_queue_declare_ok_consumer_count,
2668         tvb, offset, 4, FALSE);
2669     AMQP_INCREMENT(offset, 4, bound);
2670
2671     return offset;
2672 }
2673
2674 /*  Dissection routine for method Queue.Bind                              */
2675
2676 static int
2677 dissect_amqp_method_queue_bind(tvbuff_t *tvb _U_,
2678     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
2679 {
2680     proto_item *ti;
2681     /*  ticket (short)           */
2682     proto_tree_add_item(args_tree, hf_amqp_method_queue_bind_ticket,
2683         tvb, offset, 2, FALSE);
2684     AMQP_INCREMENT(offset, 2, bound);
2685
2686     /*  queue (shortstr)         */
2687     proto_tree_add_item(args_tree, hf_amqp_method_queue_bind_queue,
2688         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
2689     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
2690
2691     /*  exchange (shortstr)      */
2692     proto_tree_add_item(args_tree, hf_amqp_method_queue_bind_exchange,
2693         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
2694     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
2695
2696     /*  routing-key (shortstr)   */
2697     proto_tree_add_item(args_tree, hf_amqp_method_queue_bind_routing_key,
2698         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
2699     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
2700
2701     /*  nowait (bit)             */
2702     proto_tree_add_item(args_tree, hf_amqp_method_queue_bind_nowait,
2703         tvb, offset, 1, FALSE);
2704
2705     AMQP_INCREMENT(offset, 1, bound);
2706     /*  arguments (table)        */
2707     ti = proto_tree_add_item(
2708         args_tree, hf_amqp_method_queue_bind_arguments,
2709         tvb, offset + 4, tvb_get_ntohl(tvb, offset), FALSE);
2710     dissect_amqp_field_table (tvb, offset + 4,
2711         offset + 4 + tvb_get_ntohl(tvb, offset), tvb_get_ntohl(tvb, offset), ti);
2712     AMQP_INCREMENT(offset, 4 + tvb_get_ntohl(tvb, offset), bound);
2713
2714     return offset;
2715 }
2716
2717 /*  Dissection routine for method Queue.Bind-Ok                           */
2718
2719 static int
2720 dissect_amqp_method_queue_bind_ok(tvbuff_t *tvb _U_,
2721     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
2722 {
2723     return offset;
2724 }
2725
2726 /*  Dissection routine for method Queue.Unbind                            */
2727
2728 static int
2729 dissect_amqp_method_queue_unbind(tvbuff_t *tvb _U_,
2730     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
2731 {
2732     proto_item *ti;
2733     /*  ticket (short)           */
2734     proto_tree_add_item(args_tree, hf_amqp_method_queue_unbind_ticket,
2735         tvb, offset, 2, FALSE);
2736     AMQP_INCREMENT(offset, 2, bound);
2737
2738     /*  queue (shortstr)         */
2739     proto_tree_add_item(args_tree, hf_amqp_method_queue_unbind_queue,
2740         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
2741     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
2742
2743     /*  exchange (shortstr)      */
2744     proto_tree_add_item(args_tree, hf_amqp_method_queue_unbind_exchange,
2745         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
2746     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
2747
2748     /*  routing-key (shortstr)   */
2749     proto_tree_add_item(args_tree, hf_amqp_method_queue_unbind_routing_key,
2750         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
2751     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
2752
2753     /*  arguments (table)        */
2754     ti = proto_tree_add_item(
2755         args_tree, hf_amqp_method_queue_unbind_arguments,
2756         tvb, offset + 4, tvb_get_ntohl(tvb, offset), FALSE);
2757     dissect_amqp_field_table (tvb, offset + 4,
2758         offset + 4 + tvb_get_ntohl(tvb, offset), tvb_get_ntohl(tvb, offset), ti);
2759     AMQP_INCREMENT(offset, 4 + tvb_get_ntohl(tvb, offset), bound);
2760
2761     return offset;
2762 }
2763
2764 /*  Dissection routine for method Queue.Unbind-Ok                         */
2765
2766 static int
2767 dissect_amqp_method_queue_unbind_ok(tvbuff_t *tvb _U_,
2768     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
2769 {
2770     return offset;
2771 }
2772
2773 /*  Dissection routine for method Queue.Purge                             */
2774
2775 static int
2776 dissect_amqp_method_queue_purge(tvbuff_t *tvb _U_,
2777     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
2778 {
2779     /*  ticket (short)           */
2780     proto_tree_add_item(args_tree, hf_amqp_method_queue_purge_ticket,
2781         tvb, offset, 2, FALSE);
2782     AMQP_INCREMENT(offset, 2, bound);
2783
2784     /*  queue (shortstr)         */
2785     proto_tree_add_item(args_tree, hf_amqp_method_queue_purge_queue,
2786         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
2787     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
2788
2789     /*  nowait (bit)             */
2790     proto_tree_add_item(args_tree, hf_amqp_method_queue_purge_nowait,
2791         tvb, offset, 1, FALSE);
2792
2793     return offset;
2794 }
2795
2796 /*  Dissection routine for method Queue.Purge-Ok                          */
2797
2798 static int
2799 dissect_amqp_method_queue_purge_ok(tvbuff_t *tvb _U_,
2800     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
2801 {
2802     /*  message-count (long)     */
2803     proto_tree_add_item(args_tree, hf_amqp_method_queue_purge_ok_message_count,
2804         tvb, offset, 4, FALSE);
2805     AMQP_INCREMENT(offset, 4, bound);
2806
2807     return offset;
2808 }
2809
2810 /*  Dissection routine for method Queue.Delete                            */
2811
2812 static int
2813 dissect_amqp_method_queue_delete(tvbuff_t *tvb _U_,
2814     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
2815 {
2816     /*  ticket (short)           */
2817     proto_tree_add_item(args_tree, hf_amqp_method_queue_delete_ticket,
2818         tvb, offset, 2, FALSE);
2819     AMQP_INCREMENT(offset, 2, bound);
2820
2821     /*  queue (shortstr)         */
2822     proto_tree_add_item(args_tree, hf_amqp_method_queue_delete_queue,
2823         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
2824     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
2825
2826     /*  if-unused (bit)          */
2827     proto_tree_add_item(args_tree, hf_amqp_method_queue_delete_if_unused,
2828         tvb, offset, 1, FALSE);
2829
2830     /*  if-empty (bit)           */
2831     proto_tree_add_item(args_tree, hf_amqp_method_queue_delete_if_empty,
2832         tvb, offset, 1, FALSE);
2833
2834     /*  nowait (bit)             */
2835     proto_tree_add_item(args_tree, hf_amqp_method_queue_delete_nowait,
2836         tvb, offset, 1, FALSE);
2837
2838     return offset;
2839 }
2840
2841 /*  Dissection routine for method Queue.Delete-Ok                         */
2842
2843 static int
2844 dissect_amqp_method_queue_delete_ok(tvbuff_t *tvb _U_,
2845     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
2846 {
2847     /*  message-count (long)     */
2848     proto_tree_add_item(args_tree, hf_amqp_method_queue_delete_ok_message_count,
2849         tvb, offset, 4, FALSE);
2850     AMQP_INCREMENT(offset, 4, bound);
2851
2852     return offset;
2853 }
2854
2855 /*  Dissection routine for method Basic.Qos                               */
2856
2857 static int
2858 dissect_amqp_method_basic_qos(tvbuff_t *tvb _U_,
2859     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
2860 {
2861     /*  prefetch-size (long)     */
2862     proto_tree_add_item(args_tree, hf_amqp_method_basic_qos_prefetch_size,
2863         tvb, offset, 4, FALSE);
2864     AMQP_INCREMENT(offset, 4, bound);
2865
2866     /*  prefetch-count (short)   */
2867     proto_tree_add_item(args_tree, hf_amqp_method_basic_qos_prefetch_count,
2868         tvb, offset, 2, FALSE);
2869     AMQP_INCREMENT(offset, 2, bound);
2870
2871     /*  global (bit)             */
2872     proto_tree_add_item(args_tree, hf_amqp_method_basic_qos_global,
2873         tvb, offset, 1, FALSE);
2874
2875     return offset;
2876 }
2877
2878 /*  Dissection routine for method Basic.Qos-Ok                            */
2879
2880 static int
2881 dissect_amqp_method_basic_qos_ok(tvbuff_t *tvb _U_,
2882     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
2883 {
2884     return offset;
2885 }
2886
2887 /*  Dissection routine for method Basic.Consume                           */
2888
2889 static int
2890 dissect_amqp_method_basic_consume(tvbuff_t *tvb _U_,
2891     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
2892 {
2893     proto_item *ti;
2894     /*  ticket (short)           */
2895     proto_tree_add_item(args_tree, hf_amqp_method_basic_consume_ticket,
2896         tvb, offset, 2, FALSE);
2897     AMQP_INCREMENT(offset, 2, bound);
2898
2899     /*  queue (shortstr)         */
2900     proto_tree_add_item(args_tree, hf_amqp_method_basic_consume_queue,
2901         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
2902     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
2903
2904     /*  consumer-tag (shortstr)  */
2905     proto_tree_add_item(args_tree, hf_amqp_method_basic_consume_consumer_tag,
2906         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
2907     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
2908
2909     /*  no-local (bit)           */
2910     proto_tree_add_item(args_tree, hf_amqp_method_basic_consume_no_local,
2911         tvb, offset, 1, FALSE);
2912
2913     /*  no-ack (bit)             */
2914     proto_tree_add_item(args_tree, hf_amqp_method_basic_consume_no_ack,
2915         tvb, offset, 1, FALSE);
2916
2917     /*  exclusive (bit)          */
2918     proto_tree_add_item(args_tree, hf_amqp_method_basic_consume_exclusive,
2919         tvb, offset, 1, FALSE);
2920
2921     /*  nowait (bit)             */
2922     proto_tree_add_item(args_tree, hf_amqp_method_basic_consume_nowait,
2923         tvb, offset, 1, FALSE);
2924
2925     AMQP_INCREMENT(offset, 1, bound);
2926     /*  filter (table)           */
2927     ti = proto_tree_add_item(
2928         args_tree, hf_amqp_method_basic_consume_filter,
2929         tvb, offset + 4, tvb_get_ntohl(tvb, offset), FALSE);
2930     dissect_amqp_field_table (tvb, offset + 4,
2931         offset + 4 + tvb_get_ntohl(tvb, offset), tvb_get_ntohl(tvb, offset), ti);
2932     AMQP_INCREMENT(offset, 4 + tvb_get_ntohl(tvb, offset), bound);
2933
2934     return offset;
2935 }
2936
2937 /*  Dissection routine for method Basic.Consume-Ok                        */
2938
2939 static int
2940 dissect_amqp_method_basic_consume_ok(tvbuff_t *tvb _U_,
2941     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
2942 {
2943     /*  consumer-tag (shortstr)  */
2944     proto_tree_add_item(args_tree, hf_amqp_method_basic_consume_ok_consumer_tag,
2945         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
2946     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
2947
2948     return offset;
2949 }
2950
2951 /*  Dissection routine for method Basic.Cancel                            */
2952
2953 static int
2954 dissect_amqp_method_basic_cancel(tvbuff_t *tvb _U_,
2955     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
2956 {
2957     /*  consumer-tag (shortstr)  */
2958     proto_tree_add_item(args_tree, hf_amqp_method_basic_cancel_consumer_tag,
2959         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
2960     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
2961
2962     /*  nowait (bit)             */
2963     proto_tree_add_item(args_tree, hf_amqp_method_basic_cancel_nowait,
2964         tvb, offset, 1, FALSE);
2965
2966     return offset;
2967 }
2968
2969 /*  Dissection routine for method Basic.Cancel-Ok                         */
2970
2971 static int
2972 dissect_amqp_method_basic_cancel_ok(tvbuff_t *tvb _U_,
2973     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
2974 {
2975     /*  consumer-tag (shortstr)  */
2976     proto_tree_add_item(args_tree, hf_amqp_method_basic_cancel_ok_consumer_tag,
2977         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
2978     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
2979
2980     return offset;
2981 }
2982
2983 /*  Dissection routine for method Basic.Publish                           */
2984
2985 static int
2986 dissect_amqp_method_basic_publish(tvbuff_t *tvb _U_,
2987     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
2988 {
2989     /*  ticket (short)           */
2990     proto_tree_add_item(args_tree, hf_amqp_method_basic_publish_ticket,
2991         tvb, offset, 2, FALSE);
2992     AMQP_INCREMENT(offset, 2, bound);
2993
2994     /*  exchange (shortstr)      */
2995     proto_tree_add_item(args_tree, hf_amqp_method_basic_publish_exchange,
2996         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
2997     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
2998
2999     /*  routing-key (shortstr)   */
3000     proto_tree_add_item(args_tree, hf_amqp_method_basic_publish_routing_key,
3001         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
3002     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
3003
3004     /*  mandatory (bit)          */
3005     proto_tree_add_item(args_tree, hf_amqp_method_basic_publish_mandatory,
3006         tvb, offset, 1, FALSE);
3007
3008     /*  immediate (bit)          */
3009     proto_tree_add_item(args_tree, hf_amqp_method_basic_publish_immediate,
3010         tvb, offset, 1, FALSE);
3011
3012     return offset;
3013 }
3014
3015 /*  Dissection routine for method Basic.Return                            */
3016
3017 static int
3018 dissect_amqp_method_basic_return(tvbuff_t *tvb _U_,
3019     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
3020 {
3021     /*  reply-code (short)       */
3022     proto_tree_add_item(args_tree, hf_amqp_method_basic_return_reply_code,
3023         tvb, offset, 2, FALSE);
3024     AMQP_INCREMENT(offset, 2, bound);
3025
3026     /*  reply-text (shortstr)    */
3027     proto_tree_add_item(args_tree, hf_amqp_method_basic_return_reply_text,
3028         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
3029     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
3030
3031     /*  exchange (shortstr)      */
3032     proto_tree_add_item(args_tree, hf_amqp_method_basic_return_exchange,
3033         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
3034     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
3035
3036     /*  routing-key (shortstr)   */
3037     proto_tree_add_item(args_tree, hf_amqp_method_basic_return_routing_key,
3038         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
3039     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
3040
3041     return offset;
3042 }
3043
3044 /*  Dissection routine for method Basic.Deliver                           */
3045
3046 static int
3047 dissect_amqp_method_basic_deliver(tvbuff_t *tvb _U_,
3048     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
3049 {
3050     /*  consumer-tag (shortstr)  */
3051     proto_tree_add_item(args_tree, hf_amqp_method_basic_deliver_consumer_tag,
3052         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
3053     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
3054
3055     /*  delivery-tag (longlong)  */
3056     proto_tree_add_item(args_tree, hf_amqp_method_basic_deliver_delivery_tag,
3057         tvb, offset, 8, FALSE);
3058     AMQP_INCREMENT(offset, 8, bound);
3059
3060     /*  redelivered (bit)        */
3061     proto_tree_add_item(args_tree, hf_amqp_method_basic_deliver_redelivered,
3062         tvb, offset, 1, FALSE);
3063
3064     AMQP_INCREMENT(offset, 1, bound);
3065     /*  exchange (shortstr)      */
3066     proto_tree_add_item(args_tree, hf_amqp_method_basic_deliver_exchange,
3067         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
3068     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
3069
3070     /*  routing-key (shortstr)   */
3071     proto_tree_add_item(args_tree, hf_amqp_method_basic_deliver_routing_key,
3072         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
3073     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
3074
3075     return offset;
3076 }
3077
3078 /*  Dissection routine for method Basic.Get                               */
3079
3080 static int
3081 dissect_amqp_method_basic_get(tvbuff_t *tvb _U_,
3082     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
3083 {
3084     /*  ticket (short)           */
3085     proto_tree_add_item(args_tree, hf_amqp_method_basic_get_ticket,
3086         tvb, offset, 2, FALSE);
3087     AMQP_INCREMENT(offset, 2, bound);
3088
3089     /*  queue (shortstr)         */
3090     proto_tree_add_item(args_tree, hf_amqp_method_basic_get_queue,
3091         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
3092     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
3093
3094     /*  no-ack (bit)             */
3095     proto_tree_add_item(args_tree, hf_amqp_method_basic_get_no_ack,
3096         tvb, offset, 1, FALSE);
3097
3098     return offset;
3099 }
3100
3101 /*  Dissection routine for method Basic.Get-Ok                            */
3102
3103 static int
3104 dissect_amqp_method_basic_get_ok(tvbuff_t *tvb _U_,
3105     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
3106 {
3107     /*  delivery-tag (longlong)  */
3108     proto_tree_add_item(args_tree, hf_amqp_method_basic_get_ok_delivery_tag,
3109         tvb, offset, 8, FALSE);
3110     AMQP_INCREMENT(offset, 8, bound);
3111
3112     /*  redelivered (bit)        */
3113     proto_tree_add_item(args_tree, hf_amqp_method_basic_get_ok_redelivered,
3114         tvb, offset, 1, FALSE);
3115
3116     AMQP_INCREMENT(offset, 1, bound);
3117     /*  exchange (shortstr)      */
3118     proto_tree_add_item(args_tree, hf_amqp_method_basic_get_ok_exchange,
3119         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
3120     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
3121
3122     /*  routing-key (shortstr)   */
3123     proto_tree_add_item(args_tree, hf_amqp_method_basic_get_ok_routing_key,
3124         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
3125     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
3126
3127     /*  message-count (long)     */
3128     proto_tree_add_item(args_tree, hf_amqp_method_basic_get_ok_message_count,
3129         tvb, offset, 4, FALSE);
3130     AMQP_INCREMENT(offset, 4, bound);
3131
3132     return offset;
3133 }
3134
3135 /*  Dissection routine for method Basic.Get-Empty                         */
3136
3137 static int
3138 dissect_amqp_method_basic_get_empty(tvbuff_t *tvb _U_,
3139     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
3140 {
3141     /*  cluster-id (shortstr)    */
3142     proto_tree_add_item(args_tree, hf_amqp_method_basic_get_empty_cluster_id,
3143         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
3144     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
3145
3146     return offset;
3147 }
3148
3149 /*  Dissection routine for method Basic.Ack                               */
3150
3151 static int
3152 dissect_amqp_method_basic_ack(tvbuff_t *tvb _U_,
3153     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
3154 {
3155     /*  delivery-tag (longlong)  */
3156     proto_tree_add_item(args_tree, hf_amqp_method_basic_ack_delivery_tag,
3157         tvb, offset, 8, FALSE);
3158     AMQP_INCREMENT(offset, 8, bound);
3159
3160     /*  multiple (bit)           */
3161     proto_tree_add_item(args_tree, hf_amqp_method_basic_ack_multiple,
3162         tvb, offset, 1, FALSE);
3163
3164     return offset;
3165 }
3166
3167 /*  Dissection routine for method Basic.Reject                            */
3168
3169 static int
3170 dissect_amqp_method_basic_reject(tvbuff_t *tvb _U_,
3171     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
3172 {
3173     /*  delivery-tag (longlong)  */
3174     proto_tree_add_item(args_tree, hf_amqp_method_basic_reject_delivery_tag,
3175         tvb, offset, 8, FALSE);
3176     AMQP_INCREMENT(offset, 8, bound);
3177
3178     /*  requeue (bit)            */
3179     proto_tree_add_item(args_tree, hf_amqp_method_basic_reject_requeue,
3180         tvb, offset, 1, FALSE);
3181
3182     return offset;
3183 }
3184
3185 /*  Dissection routine for method Basic.Recover                           */
3186
3187 static int
3188 dissect_amqp_method_basic_recover(tvbuff_t *tvb _U_,
3189     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
3190 {
3191     /*  requeue (bit)            */
3192     proto_tree_add_item(args_tree, hf_amqp_method_basic_recover_requeue,
3193         tvb, offset, 1, FALSE);
3194
3195     return offset;
3196 }
3197
3198 /*  Dissection routine for method File.Qos                                */
3199
3200 static int
3201 dissect_amqp_method_file_qos(tvbuff_t *tvb _U_,
3202     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
3203 {
3204     /*  prefetch-size (long)     */
3205     proto_tree_add_item(args_tree, hf_amqp_method_file_qos_prefetch_size,
3206         tvb, offset, 4, FALSE);
3207     AMQP_INCREMENT(offset, 4, bound);
3208
3209     /*  prefetch-count (short)   */
3210     proto_tree_add_item(args_tree, hf_amqp_method_file_qos_prefetch_count,
3211         tvb, offset, 2, FALSE);
3212     AMQP_INCREMENT(offset, 2, bound);
3213
3214     /*  global (bit)             */
3215     proto_tree_add_item(args_tree, hf_amqp_method_file_qos_global,
3216         tvb, offset, 1, FALSE);
3217
3218     return offset;
3219 }
3220
3221 /*  Dissection routine for method File.Qos-Ok                             */
3222
3223 static int
3224 dissect_amqp_method_file_qos_ok(tvbuff_t *tvb _U_,
3225     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
3226 {
3227     return offset;
3228 }
3229
3230 /*  Dissection routine for method File.Consume                            */
3231
3232 static int
3233 dissect_amqp_method_file_consume(tvbuff_t *tvb _U_,
3234     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
3235 {
3236     proto_item *ti;
3237     /*  ticket (short)           */
3238     proto_tree_add_item(args_tree, hf_amqp_method_file_consume_ticket,
3239         tvb, offset, 2, FALSE);
3240     AMQP_INCREMENT(offset, 2, bound);
3241
3242     /*  queue (shortstr)         */
3243     proto_tree_add_item(args_tree, hf_amqp_method_file_consume_queue,
3244         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
3245     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
3246
3247     /*  consumer-tag (shortstr)  */
3248     proto_tree_add_item(args_tree, hf_amqp_method_file_consume_consumer_tag,
3249         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
3250     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
3251
3252     /*  no-local (bit)           */
3253     proto_tree_add_item(args_tree, hf_amqp_method_file_consume_no_local,
3254         tvb, offset, 1, FALSE);
3255
3256     /*  no-ack (bit)             */
3257     proto_tree_add_item(args_tree, hf_amqp_method_file_consume_no_ack,
3258         tvb, offset, 1, FALSE);
3259
3260     /*  exclusive (bit)          */
3261     proto_tree_add_item(args_tree, hf_amqp_method_file_consume_exclusive,
3262         tvb, offset, 1, FALSE);
3263
3264     /*  nowait (bit)             */
3265     proto_tree_add_item(args_tree, hf_amqp_method_file_consume_nowait,
3266         tvb, offset, 1, FALSE);
3267
3268     AMQP_INCREMENT(offset, 1, bound);
3269     /*  filter (table)           */
3270     ti = proto_tree_add_item(
3271         args_tree, hf_amqp_method_file_consume_filter,
3272         tvb, offset + 4, tvb_get_ntohl(tvb, offset), FALSE);
3273     dissect_amqp_field_table (tvb, offset + 4,
3274         offset + 4 + tvb_get_ntohl(tvb, offset), tvb_get_ntohl(tvb, offset), ti);
3275     AMQP_INCREMENT(offset, 4 + tvb_get_ntohl(tvb, offset), bound);
3276
3277     return offset;
3278 }
3279
3280 /*  Dissection routine for method File.Consume-Ok                         */
3281
3282 static int
3283 dissect_amqp_method_file_consume_ok(tvbuff_t *tvb _U_,
3284     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
3285 {
3286     /*  consumer-tag (shortstr)  */
3287     proto_tree_add_item(args_tree, hf_amqp_method_file_consume_ok_consumer_tag,
3288         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
3289     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
3290
3291     return offset;
3292 }
3293
3294 /*  Dissection routine for method File.Cancel                             */
3295
3296 static int
3297 dissect_amqp_method_file_cancel(tvbuff_t *tvb _U_,
3298     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
3299 {
3300     /*  consumer-tag (shortstr)  */
3301     proto_tree_add_item(args_tree, hf_amqp_method_file_cancel_consumer_tag,
3302         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
3303     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
3304
3305     /*  nowait (bit)             */
3306     proto_tree_add_item(args_tree, hf_amqp_method_file_cancel_nowait,
3307         tvb, offset, 1, FALSE);
3308
3309     return offset;
3310 }
3311
3312 /*  Dissection routine for method File.Cancel-Ok                          */
3313
3314 static int
3315 dissect_amqp_method_file_cancel_ok(tvbuff_t *tvb _U_,
3316     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
3317 {
3318     /*  consumer-tag (shortstr)  */
3319     proto_tree_add_item(args_tree, hf_amqp_method_file_cancel_ok_consumer_tag,
3320         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
3321     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
3322
3323     return offset;
3324 }
3325
3326 /*  Dissection routine for method File.Open                               */
3327
3328 static int
3329 dissect_amqp_method_file_open(tvbuff_t *tvb _U_,
3330     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
3331 {
3332     /*  identifier (shortstr)    */
3333     proto_tree_add_item(args_tree, hf_amqp_method_file_open_identifier,
3334         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
3335     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
3336
3337     /*  content-size (longlong)  */
3338     proto_tree_add_item(args_tree, hf_amqp_method_file_open_content_size,
3339         tvb, offset, 8, FALSE);
3340     AMQP_INCREMENT(offset, 8, bound);
3341
3342     return offset;
3343 }
3344
3345 /*  Dissection routine for method File.Open-Ok                            */
3346
3347 static int
3348 dissect_amqp_method_file_open_ok(tvbuff_t *tvb _U_,
3349     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
3350 {
3351     /*  staged-size (longlong)   */
3352     proto_tree_add_item(args_tree, hf_amqp_method_file_open_ok_staged_size,
3353         tvb, offset, 8, FALSE);
3354     AMQP_INCREMENT(offset, 8, bound);
3355
3356     return offset;
3357 }
3358
3359 /*  Dissection routine for method File.Stage                              */
3360
3361 static int
3362 dissect_amqp_method_file_stage(tvbuff_t *tvb _U_,
3363     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
3364 {
3365     return offset;
3366 }
3367
3368 /*  Dissection routine for method File.Publish                            */
3369
3370 static int
3371 dissect_amqp_method_file_publish(tvbuff_t *tvb _U_,
3372     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
3373 {
3374     /*  ticket (short)           */
3375     proto_tree_add_item(args_tree, hf_amqp_method_file_publish_ticket,
3376         tvb, offset, 2, FALSE);
3377     AMQP_INCREMENT(offset, 2, bound);
3378
3379     /*  exchange (shortstr)      */
3380     proto_tree_add_item(args_tree, hf_amqp_method_file_publish_exchange,
3381         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
3382     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
3383
3384     /*  routing-key (shortstr)   */
3385     proto_tree_add_item(args_tree, hf_amqp_method_file_publish_routing_key,
3386         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
3387     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
3388
3389     /*  mandatory (bit)          */
3390     proto_tree_add_item(args_tree, hf_amqp_method_file_publish_mandatory,
3391         tvb, offset, 1, FALSE);
3392
3393     /*  immediate (bit)          */
3394     proto_tree_add_item(args_tree, hf_amqp_method_file_publish_immediate,
3395         tvb, offset, 1, FALSE);
3396
3397     AMQP_INCREMENT(offset, 1, bound);
3398     /*  identifier (shortstr)    */
3399     proto_tree_add_item(args_tree, hf_amqp_method_file_publish_identifier,
3400         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
3401     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
3402
3403     return offset;
3404 }
3405
3406 /*  Dissection routine for method File.Return                             */
3407
3408 static int
3409 dissect_amqp_method_file_return(tvbuff_t *tvb _U_,
3410     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
3411 {
3412     /*  reply-code (short)       */
3413     proto_tree_add_item(args_tree, hf_amqp_method_file_return_reply_code,
3414         tvb, offset, 2, FALSE);
3415     AMQP_INCREMENT(offset, 2, bound);
3416
3417     /*  reply-text (shortstr)    */
3418     proto_tree_add_item(args_tree, hf_amqp_method_file_return_reply_text,
3419         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
3420     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
3421
3422     /*  exchange (shortstr)      */
3423     proto_tree_add_item(args_tree, hf_amqp_method_file_return_exchange,
3424         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
3425     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
3426
3427     /*  routing-key (shortstr)   */
3428     proto_tree_add_item(args_tree, hf_amqp_method_file_return_routing_key,
3429         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
3430     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
3431
3432     return offset;
3433 }
3434
3435 /*  Dissection routine for method File.Deliver                            */
3436
3437 static int
3438 dissect_amqp_method_file_deliver(tvbuff_t *tvb _U_,
3439     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
3440 {
3441     /*  consumer-tag (shortstr)  */
3442     proto_tree_add_item(args_tree, hf_amqp_method_file_deliver_consumer_tag,
3443         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
3444     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
3445
3446     /*  delivery-tag (longlong)  */
3447     proto_tree_add_item(args_tree, hf_amqp_method_file_deliver_delivery_tag,
3448         tvb, offset, 8, FALSE);
3449     AMQP_INCREMENT(offset, 8, bound);
3450
3451     /*  redelivered (bit)        */
3452     proto_tree_add_item(args_tree, hf_amqp_method_file_deliver_redelivered,
3453         tvb, offset, 1, FALSE);
3454
3455     AMQP_INCREMENT(offset, 1, bound);
3456     /*  exchange (shortstr)      */
3457     proto_tree_add_item(args_tree, hf_amqp_method_file_deliver_exchange,
3458         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
3459     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
3460
3461     /*  routing-key (shortstr)   */
3462     proto_tree_add_item(args_tree, hf_amqp_method_file_deliver_routing_key,
3463         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
3464     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
3465
3466     /*  identifier (shortstr)    */
3467     proto_tree_add_item(args_tree, hf_amqp_method_file_deliver_identifier,
3468         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
3469     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
3470
3471     return offset;
3472 }
3473
3474 /*  Dissection routine for method File.Ack                                */
3475
3476 static int
3477 dissect_amqp_method_file_ack(tvbuff_t *tvb _U_,
3478     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
3479 {
3480     /*  delivery-tag (longlong)  */
3481     proto_tree_add_item(args_tree, hf_amqp_method_file_ack_delivery_tag,
3482         tvb, offset, 8, FALSE);
3483     AMQP_INCREMENT(offset, 8, bound);
3484
3485     /*  multiple (bit)           */
3486     proto_tree_add_item(args_tree, hf_amqp_method_file_ack_multiple,
3487         tvb, offset, 1, FALSE);
3488
3489     return offset;
3490 }
3491
3492 /*  Dissection routine for method File.Reject                             */
3493
3494 static int
3495 dissect_amqp_method_file_reject(tvbuff_t *tvb _U_,
3496     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
3497 {
3498     /*  delivery-tag (longlong)  */
3499     proto_tree_add_item(args_tree, hf_amqp_method_file_reject_delivery_tag,
3500         tvb, offset, 8, FALSE);
3501     AMQP_INCREMENT(offset, 8, bound);
3502
3503     /*  requeue (bit)            */
3504     proto_tree_add_item(args_tree, hf_amqp_method_file_reject_requeue,
3505         tvb, offset, 1, FALSE);
3506
3507     return offset;
3508 }
3509
3510 /*  Dissection routine for method Stream.Qos                              */
3511
3512 static int
3513 dissect_amqp_method_stream_qos(tvbuff_t *tvb _U_,
3514     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
3515 {
3516     /*  prefetch-size (long)     */
3517     proto_tree_add_item(args_tree, hf_amqp_method_stream_qos_prefetch_size,
3518         tvb, offset, 4, FALSE);
3519     AMQP_INCREMENT(offset, 4, bound);
3520
3521     /*  prefetch-count (short)   */
3522     proto_tree_add_item(args_tree, hf_amqp_method_stream_qos_prefetch_count,
3523         tvb, offset, 2, FALSE);
3524     AMQP_INCREMENT(offset, 2, bound);
3525
3526     /*  consume-rate (long)      */
3527     proto_tree_add_item(args_tree, hf_amqp_method_stream_qos_consume_rate,
3528         tvb, offset, 4, FALSE);
3529     AMQP_INCREMENT(offset, 4, bound);
3530
3531     /*  global (bit)             */
3532     proto_tree_add_item(args_tree, hf_amqp_method_stream_qos_global,
3533         tvb, offset, 1, FALSE);
3534
3535     return offset;
3536 }
3537
3538 /*  Dissection routine for method Stream.Qos-Ok                           */
3539
3540 static int
3541 dissect_amqp_method_stream_qos_ok(tvbuff_t *tvb _U_,
3542     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
3543 {
3544     return offset;
3545 }
3546
3547 /*  Dissection routine for method Stream.Consume                          */
3548
3549 static int
3550 dissect_amqp_method_stream_consume(tvbuff_t *tvb _U_,
3551     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
3552 {
3553     proto_item *ti;
3554     /*  ticket (short)           */
3555     proto_tree_add_item(args_tree, hf_amqp_method_stream_consume_ticket,
3556         tvb, offset, 2, FALSE);
3557     AMQP_INCREMENT(offset, 2, bound);
3558
3559     /*  queue (shortstr)         */
3560     proto_tree_add_item(args_tree, hf_amqp_method_stream_consume_queue,
3561         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
3562     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
3563
3564     /*  consumer-tag (shortstr)  */
3565     proto_tree_add_item(args_tree, hf_amqp_method_stream_consume_consumer_tag,
3566         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
3567     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
3568
3569     /*  no-local (bit)           */
3570     proto_tree_add_item(args_tree, hf_amqp_method_stream_consume_no_local,
3571         tvb, offset, 1, FALSE);
3572
3573     /*  exclusive (bit)          */
3574     proto_tree_add_item(args_tree, hf_amqp_method_stream_consume_exclusive,
3575         tvb, offset, 1, FALSE);
3576
3577     /*  nowait (bit)             */
3578     proto_tree_add_item(args_tree, hf_amqp_method_stream_consume_nowait,
3579         tvb, offset, 1, FALSE);
3580
3581     AMQP_INCREMENT(offset, 1, bound);
3582     /*  filter (table)           */
3583     ti = proto_tree_add_item(
3584         args_tree, hf_amqp_method_stream_consume_filter,
3585         tvb, offset + 4, tvb_get_ntohl(tvb, offset), FALSE);
3586     dissect_amqp_field_table (tvb, offset + 4,
3587         offset + 4 + tvb_get_ntohl(tvb, offset), tvb_get_ntohl(tvb, offset), ti);
3588     AMQP_INCREMENT(offset, 4 + tvb_get_ntohl(tvb, offset), bound);
3589
3590     return offset;
3591 }
3592
3593 /*  Dissection routine for method Stream.Consume-Ok                       */
3594
3595 static int
3596 dissect_amqp_method_stream_consume_ok(tvbuff_t *tvb _U_,
3597     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
3598 {
3599     /*  consumer-tag (shortstr)  */
3600     proto_tree_add_item(args_tree, hf_amqp_method_stream_consume_ok_consumer_tag,
3601         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
3602     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
3603
3604     return offset;
3605 }
3606
3607 /*  Dissection routine for method Stream.Cancel                           */
3608
3609 static int
3610 dissect_amqp_method_stream_cancel(tvbuff_t *tvb _U_,
3611     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
3612 {
3613     /*  consumer-tag (shortstr)  */
3614     proto_tree_add_item(args_tree, hf_amqp_method_stream_cancel_consumer_tag,
3615         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
3616     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
3617
3618     /*  nowait (bit)             */
3619     proto_tree_add_item(args_tree, hf_amqp_method_stream_cancel_nowait,
3620         tvb, offset, 1, FALSE);
3621
3622     return offset;
3623 }
3624
3625 /*  Dissection routine for method Stream.Cancel-Ok                        */
3626
3627 static int
3628 dissect_amqp_method_stream_cancel_ok(tvbuff_t *tvb _U_,
3629     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
3630 {
3631     /*  consumer-tag (shortstr)  */
3632     proto_tree_add_item(args_tree, hf_amqp_method_stream_cancel_ok_consumer_tag,
3633         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
3634     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
3635
3636     return offset;
3637 }
3638
3639 /*  Dissection routine for method Stream.Publish                          */
3640
3641 static int
3642 dissect_amqp_method_stream_publish(tvbuff_t *tvb _U_,
3643     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
3644 {
3645     /*  ticket (short)           */
3646     proto_tree_add_item(args_tree, hf_amqp_method_stream_publish_ticket,
3647         tvb, offset, 2, FALSE);
3648     AMQP_INCREMENT(offset, 2, bound);
3649
3650     /*  exchange (shortstr)      */
3651     proto_tree_add_item(args_tree, hf_amqp_method_stream_publish_exchange,
3652         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
3653     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
3654
3655     /*  routing-key (shortstr)   */
3656     proto_tree_add_item(args_tree, hf_amqp_method_stream_publish_routing_key,
3657         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
3658     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
3659
3660     /*  mandatory (bit)          */
3661     proto_tree_add_item(args_tree, hf_amqp_method_stream_publish_mandatory,
3662         tvb, offset, 1, FALSE);
3663
3664     /*  immediate (bit)          */
3665     proto_tree_add_item(args_tree, hf_amqp_method_stream_publish_immediate,
3666         tvb, offset, 1, FALSE);
3667
3668     return offset;
3669 }
3670
3671 /*  Dissection routine for method Stream.Return                           */
3672
3673 static int
3674 dissect_amqp_method_stream_return(tvbuff_t *tvb _U_,
3675     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
3676 {
3677     /*  reply-code (short)       */
3678     proto_tree_add_item(args_tree, hf_amqp_method_stream_return_reply_code,
3679         tvb, offset, 2, FALSE);
3680     AMQP_INCREMENT(offset, 2, bound);
3681
3682     /*  reply-text (shortstr)    */
3683     proto_tree_add_item(args_tree, hf_amqp_method_stream_return_reply_text,
3684         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
3685     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
3686
3687     /*  exchange (shortstr)      */
3688     proto_tree_add_item(args_tree, hf_amqp_method_stream_return_exchange,
3689         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
3690     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
3691
3692     /*  routing-key (shortstr)   */
3693     proto_tree_add_item(args_tree, hf_amqp_method_stream_return_routing_key,
3694         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
3695     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
3696
3697     return offset;
3698 }
3699
3700 /*  Dissection routine for method Stream.Deliver                          */
3701
3702 static int
3703 dissect_amqp_method_stream_deliver(tvbuff_t *tvb _U_,
3704     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
3705 {
3706     /*  consumer-tag (shortstr)  */
3707     proto_tree_add_item(args_tree, hf_amqp_method_stream_deliver_consumer_tag,
3708         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
3709     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
3710
3711     /*  delivery-tag (longlong)  */
3712     proto_tree_add_item(args_tree, hf_amqp_method_stream_deliver_delivery_tag,
3713         tvb, offset, 8, FALSE);
3714     AMQP_INCREMENT(offset, 8, bound);
3715
3716     /*  exchange (shortstr)      */
3717     proto_tree_add_item(args_tree, hf_amqp_method_stream_deliver_exchange,
3718         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
3719     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
3720
3721     /*  queue (shortstr)         */
3722     proto_tree_add_item(args_tree, hf_amqp_method_stream_deliver_queue,
3723         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
3724     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
3725
3726     return offset;
3727 }
3728
3729 /*  Dissection routine for method Tx.Select                               */
3730
3731 static int
3732 dissect_amqp_method_tx_select(tvbuff_t *tvb _U_,
3733     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
3734 {
3735     return offset;
3736 }
3737
3738 /*  Dissection routine for method Tx.Select-Ok                            */
3739
3740 static int
3741 dissect_amqp_method_tx_select_ok(tvbuff_t *tvb _U_,
3742     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
3743 {
3744     return offset;
3745 }
3746
3747 /*  Dissection routine for method Tx.Commit                               */
3748
3749 static int
3750 dissect_amqp_method_tx_commit(tvbuff_t *tvb _U_,
3751     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
3752 {
3753     return offset;
3754 }
3755
3756 /*  Dissection routine for method Tx.Commit-Ok                            */
3757
3758 static int
3759 dissect_amqp_method_tx_commit_ok(tvbuff_t *tvb _U_,
3760     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
3761 {
3762     return offset;
3763 }
3764
3765 /*  Dissection routine for method Tx.Rollback                             */
3766
3767 static int
3768 dissect_amqp_method_tx_rollback(tvbuff_t *tvb _U_,
3769     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
3770 {
3771     return offset;
3772 }
3773
3774 /*  Dissection routine for method Tx.Rollback-Ok                          */
3775
3776 static int
3777 dissect_amqp_method_tx_rollback_ok(tvbuff_t *tvb _U_,
3778     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
3779 {
3780     return offset;
3781 }
3782
3783 /*  Dissection routine for method Dtx.Select                              */
3784
3785 static int
3786 dissect_amqp_method_dtx_select(tvbuff_t *tvb _U_,
3787     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
3788 {
3789     return offset;
3790 }
3791
3792 /*  Dissection routine for method Dtx.Select-Ok                           */
3793
3794 static int
3795 dissect_amqp_method_dtx_select_ok(tvbuff_t *tvb _U_,
3796     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
3797 {
3798     return offset;
3799 }
3800
3801 /*  Dissection routine for method Dtx.Start                               */
3802
3803 static int
3804 dissect_amqp_method_dtx_start(tvbuff_t *tvb _U_,
3805     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
3806 {
3807     /*  dtx-identifier (shortstr)  */
3808     proto_tree_add_item(args_tree, hf_amqp_method_dtx_start_dtx_identifier,
3809         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
3810     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
3811
3812     return offset;
3813 }
3814
3815 /*  Dissection routine for method Dtx.Start-Ok                            */
3816
3817 static int
3818 dissect_amqp_method_dtx_start_ok(tvbuff_t *tvb _U_,
3819     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
3820 {
3821     return offset;
3822 }
3823
3824 /*  Dissection routine for method Tunnel.Request                          */
3825
3826 static int
3827 dissect_amqp_method_tunnel_request(tvbuff_t *tvb _U_,
3828     int offset _U_, int bound _U_, proto_tree *args_tree _U_)
3829 {
3830     proto_item *ti;
3831     /*  meta-data (table)        */
3832     ti = proto_tree_add_item(
3833         args_tree, hf_amqp_method_tunnel_request_meta_data,
3834         tvb, offset + 4, tvb_get_ntohl(tvb, offset), FALSE);
3835     dissect_amqp_field_table (tvb, offset + 4,
3836         offset + 4 + tvb_get_ntohl(tvb, offset), tvb_get_ntohl(tvb, offset), ti);
3837     AMQP_INCREMENT(offset, 4 + tvb_get_ntohl(tvb, offset), bound);
3838
3839     return offset;
3840 }
3841
3842
3843 /*  Dissection routine for content headers of class basic          */
3844
3845 static int
3846 dissect_amqp_content_header_basic(tvbuff_t *tvb,
3847     int offset, int bound, proto_tree *prop_tree)
3848 {
3849     proto_item *ti;
3850     guint16 prop_flags;
3851
3852     prop_flags = tvb_get_ntohs(tvb, 19);
3853     if (prop_flags & 0x8000) {
3854     /*  content-type (shortstr)  */
3855     proto_tree_add_item(prop_tree, hf_amqp_header_basic_content_type,
3856         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
3857     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
3858
3859     }
3860     prop_flags <<= 1;
3861     if (prop_flags & 0x8000) {
3862     /*  content-encoding (shortstr)  */
3863     proto_tree_add_item(prop_tree, hf_amqp_header_basic_content_encoding,
3864         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
3865     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
3866
3867     }
3868     prop_flags <<= 1;
3869     if (prop_flags & 0x8000) {
3870     /*  headers (table)          */
3871     ti = proto_tree_add_item(
3872         prop_tree, hf_amqp_header_basic_headers,
3873         tvb, offset + 4, tvb_get_ntohl(tvb, offset), FALSE);
3874     dissect_amqp_field_table (tvb, offset + 4,
3875         offset + 4 + tvb_get_ntohl(tvb, offset), tvb_get_ntohl(tvb, offset), ti);
3876     AMQP_INCREMENT(offset, 4 + tvb_get_ntohl(tvb, offset), bound);
3877
3878     }
3879     prop_flags <<= 1;
3880     if (prop_flags & 0x8000) {
3881     /*  delivery-mode (octet)    */
3882     proto_tree_add_item(prop_tree, hf_amqp_header_basic_delivery_mode,
3883         tvb, offset, 1, FALSE);
3884     AMQP_INCREMENT(offset, 1, bound);
3885
3886     }
3887     prop_flags <<= 1;
3888     if (prop_flags & 0x8000) {
3889     /*  priority (octet)         */
3890     proto_tree_add_item(prop_tree, hf_amqp_header_basic_priority,
3891         tvb, offset, 1, FALSE);
3892     AMQP_INCREMENT(offset, 1, bound);
3893
3894     }
3895     prop_flags <<= 1;
3896     if (prop_flags & 0x8000) {
3897     /*  correlation-id (shortstr)  */
3898     proto_tree_add_item(prop_tree, hf_amqp_header_basic_correlation_id,
3899         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
3900     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
3901
3902     }
3903     prop_flags <<= 1;
3904     if (prop_flags & 0x8000) {
3905     /*  reply-to (shortstr)      */
3906     proto_tree_add_item(prop_tree, hf_amqp_header_basic_reply_to,
3907         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
3908     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
3909
3910     }
3911     prop_flags <<= 1;
3912     if (prop_flags & 0x8000) {
3913     /*  expiration (shortstr)    */
3914     proto_tree_add_item(prop_tree, hf_amqp_header_basic_expiration,
3915         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
3916     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
3917
3918     }
3919     prop_flags <<= 1;
3920     if (prop_flags & 0x8000) {
3921     /*  message-id (shortstr)    */
3922     proto_tree_add_item(prop_tree, hf_amqp_header_basic_message_id,
3923         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
3924     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
3925
3926     }
3927     prop_flags <<= 1;
3928     if (prop_flags & 0x8000) {
3929     /*  timestamp (timestamp)    */
3930     proto_tree_add_item(prop_tree, hf_amqp_header_basic_timestamp,
3931         tvb, offset, 8, FALSE);
3932     AMQP_INCREMENT(offset, 8, bound);
3933
3934     }
3935     prop_flags <<= 1;
3936     if (prop_flags & 0x8000) {
3937     /*  type (shortstr)          */
3938     proto_tree_add_item(prop_tree, hf_amqp_header_basic_type,
3939         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
3940     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
3941
3942     }
3943     prop_flags <<= 1;
3944     if (prop_flags & 0x8000) {
3945     /*  user-id (shortstr)       */
3946     proto_tree_add_item(prop_tree, hf_amqp_header_basic_user_id,
3947         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
3948     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
3949
3950     }
3951     prop_flags <<= 1;
3952     if (prop_flags & 0x8000) {
3953     /*  app-id (shortstr)        */
3954     proto_tree_add_item(prop_tree, hf_amqp_header_basic_app_id,
3955         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
3956     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
3957
3958     }
3959     prop_flags <<= 1;
3960     if (prop_flags & 0x8000) {
3961     /*  cluster-id (shortstr)    */
3962     proto_tree_add_item(prop_tree, hf_amqp_header_basic_cluster_id,
3963         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
3964     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
3965
3966     }
3967     prop_flags <<= 1;
3968
3969     return offset;
3970 }
3971 /*  Dissection routine for content headers of class file           */
3972
3973 static int
3974 dissect_amqp_content_header_file(tvbuff_t *tvb,
3975     int offset, int bound, proto_tree *prop_tree)
3976 {
3977     proto_item *ti;
3978     guint16 prop_flags;
3979
3980     prop_flags = tvb_get_ntohs(tvb, 19);
3981     if (prop_flags & 0x8000) {
3982     /*  content-type (shortstr)  */
3983     proto_tree_add_item(prop_tree, hf_amqp_header_file_content_type,
3984         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
3985     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
3986
3987     }
3988     prop_flags <<= 1;
3989     if (prop_flags & 0x8000) {
3990     /*  content-encoding (shortstr)  */
3991     proto_tree_add_item(prop_tree, hf_amqp_header_file_content_encoding,
3992         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
3993     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
3994
3995     }
3996     prop_flags <<= 1;
3997     if (prop_flags & 0x8000) {
3998     /*  headers (table)          */
3999     ti = proto_tree_add_item(
4000         prop_tree, hf_amqp_header_file_headers,
4001         tvb, offset + 4, tvb_get_ntohl(tvb, offset), FALSE);
4002     dissect_amqp_field_table (tvb, offset + 4,
4003         offset + 4 + tvb_get_ntohl(tvb, offset), tvb_get_ntohl(tvb, offset), ti);
4004     AMQP_INCREMENT(offset, 4 + tvb_get_ntohl(tvb, offset), bound);
4005
4006     }
4007     prop_flags <<= 1;
4008     if (prop_flags & 0x8000) {
4009     /*  priority (octet)         */
4010     proto_tree_add_item(prop_tree, hf_amqp_header_file_priority,
4011         tvb, offset, 1, FALSE);
4012     AMQP_INCREMENT(offset, 1, bound);
4013
4014     }
4015     prop_flags <<= 1;
4016     if (prop_flags & 0x8000) {
4017     /*  reply-to (shortstr)      */
4018     proto_tree_add_item(prop_tree, hf_amqp_header_file_reply_to,
4019         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
4020     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
4021
4022     }
4023     prop_flags <<= 1;
4024     if (prop_flags & 0x8000) {
4025     /*  message-id (shortstr)    */
4026     proto_tree_add_item(prop_tree, hf_amqp_header_file_message_id,
4027         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
4028     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
4029
4030     }
4031     prop_flags <<= 1;
4032     if (prop_flags & 0x8000) {
4033     /*  filename (shortstr)      */
4034     proto_tree_add_item(prop_tree, hf_amqp_header_file_filename,
4035         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
4036     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
4037
4038     }
4039     prop_flags <<= 1;
4040     if (prop_flags & 0x8000) {
4041     /*  timestamp (timestamp)    */
4042     proto_tree_add_item(prop_tree, hf_amqp_header_file_timestamp,
4043         tvb, offset, 8, FALSE);
4044     AMQP_INCREMENT(offset, 8, bound);
4045
4046     }
4047     prop_flags <<= 1;
4048     if (prop_flags & 0x8000) {
4049     /*  cluster-id (shortstr)    */
4050     proto_tree_add_item(prop_tree, hf_amqp_header_file_cluster_id,
4051         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
4052     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
4053
4054     }
4055     prop_flags <<= 1;
4056
4057     return offset;
4058 }
4059 /*  Dissection routine for content headers of class stream         */
4060
4061 static int
4062 dissect_amqp_content_header_stream(tvbuff_t *tvb,
4063     int offset, int bound, proto_tree *prop_tree)
4064 {
4065     proto_item *ti;
4066     guint16 prop_flags;
4067
4068     prop_flags = tvb_get_ntohs(tvb, 19);
4069     if (prop_flags & 0x8000) {
4070     /*  content-type (shortstr)  */
4071     proto_tree_add_item(prop_tree, hf_amqp_header_stream_content_type,
4072         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
4073     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
4074
4075     }
4076     prop_flags <<= 1;
4077     if (prop_flags & 0x8000) {
4078     /*  content-encoding (shortstr)  */
4079     proto_tree_add_item(prop_tree, hf_amqp_header_stream_content_encoding,
4080         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
4081     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
4082
4083     }
4084     prop_flags <<= 1;
4085     if (prop_flags & 0x8000) {
4086     /*  headers (table)          */
4087     ti = proto_tree_add_item(
4088         prop_tree, hf_amqp_header_stream_headers,
4089         tvb, offset + 4, tvb_get_ntohl(tvb, offset), FALSE);
4090     dissect_amqp_field_table (tvb, offset + 4,
4091         offset + 4 + tvb_get_ntohl(tvb, offset), tvb_get_ntohl(tvb, offset), ti);
4092     AMQP_INCREMENT(offset, 4 + tvb_get_ntohl(tvb, offset), bound);
4093
4094     }
4095     prop_flags <<= 1;
4096     if (prop_flags & 0x8000) {
4097     /*  priority (octet)         */
4098     proto_tree_add_item(prop_tree, hf_amqp_header_stream_priority,
4099         tvb, offset, 1, FALSE);
4100     AMQP_INCREMENT(offset, 1, bound);
4101
4102     }
4103     prop_flags <<= 1;
4104     if (prop_flags & 0x8000) {
4105     /*  timestamp (timestamp)    */
4106     proto_tree_add_item(prop_tree, hf_amqp_header_stream_timestamp,
4107         tvb, offset, 8, FALSE);
4108     AMQP_INCREMENT(offset, 8, bound);
4109
4110     }
4111     prop_flags <<= 1;
4112
4113     return offset;
4114 }
4115 /*  Dissection routine for content headers of class tunnel         */
4116
4117 static int
4118 dissect_amqp_content_header_tunnel(tvbuff_t *tvb,
4119     int offset, int bound, proto_tree *prop_tree)
4120 {
4121     proto_item *ti;
4122     guint16 prop_flags;
4123
4124     prop_flags = tvb_get_ntohs(tvb, 19);
4125     if (prop_flags & 0x8000) {
4126     /*  headers (table)          */
4127     ti = proto_tree_add_item(
4128         prop_tree, hf_amqp_header_tunnel_headers,
4129         tvb, offset + 4, tvb_get_ntohl(tvb, offset), FALSE);
4130     dissect_amqp_field_table (tvb, offset + 4,
4131         offset + 4 + tvb_get_ntohl(tvb, offset), tvb_get_ntohl(tvb, offset), ti);
4132     AMQP_INCREMENT(offset, 4 + tvb_get_ntohl(tvb, offset), bound);
4133
4134     }
4135     prop_flags <<= 1;
4136     if (prop_flags & 0x8000) {
4137     /*  proxy-name (shortstr)    */
4138     proto_tree_add_item(prop_tree, hf_amqp_header_tunnel_proxy_name,
4139         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
4140     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
4141
4142     }
4143     prop_flags <<= 1;
4144     if (prop_flags & 0x8000) {
4145     /*  data-name (shortstr)     */
4146     proto_tree_add_item(prop_tree, hf_amqp_header_tunnel_data_name,
4147         tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
4148     AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
4149
4150     }
4151     prop_flags <<= 1;
4152     if (prop_flags & 0x8000) {
4153     /*  durable (octet)          */
4154     proto_tree_add_item(prop_tree, hf_amqp_header_tunnel_durable,
4155         tvb, offset, 1, FALSE);
4156     AMQP_INCREMENT(offset, 1, bound);
4157
4158     }
4159     prop_flags <<= 1;
4160     if (prop_flags & 0x8000) {
4161     /*  broadcast (octet)        */
4162     proto_tree_add_item(prop_tree, hf_amqp_header_tunnel_broadcast,
4163         tvb, offset, 1, FALSE);
4164     AMQP_INCREMENT(offset, 1, bound);
4165
4166     }
4167     prop_flags <<= 1;
4168
4169     return offset;
4170 }
4171
4172 /*  Basic registration functions  */
4173
4174 void
4175 proto_register_amqp(void)
4176 {
4177     /*  Setup of field format array  */
4178     static hf_register_info hf[] = {
4179         {&hf_amqp_type, {
4180             "Type", "amqp.type",
4181             FT_UINT8, BASE_DEC, VALS(amqp_frame_types), 0x0,
4182             "Frame type", HFILL}},
4183         {&hf_amqp_channel,{
4184             "Channel", "amqp.channel",
4185             FT_UINT16, BASE_DEC, NULL, 0x0,
4186             "Channel ID", HFILL}},
4187         {&hf_amqp_length, {
4188             "Length", "amqp.length",
4189             FT_UINT32, BASE_DEC, NULL, 0x0,
4190             "Length of the frame", HFILL}},
4191         {&hf_amqp_method_class_id, {
4192             "Class", "amqp.method.class",
4193             FT_UINT16, BASE_DEC, VALS(amqp_method_classes), 0x0,
4194             "Class ID", HFILL}},
4195         {&hf_amqp_method_connection_method_id, {
4196             "Method", "amqp.method.method",
4197             FT_UINT16, BASE_DEC, VALS(amqp_method_connection_methods), 0x0,
4198             "Method ID", HFILL}},
4199         {&hf_amqp_method_channel_method_id, {
4200             "Method", "amqp.method.method",
4201             FT_UINT16, BASE_DEC, VALS(amqp_method_channel_methods), 0x0,
4202             "Method ID", HFILL}},
4203         {&hf_amqp_method_access_method_id, {
4204             "Method", "amqp.method.method",
4205             FT_UINT16, BASE_DEC, VALS(amqp_method_access_methods), 0x0,
4206             "Method ID", HFILL}},
4207         {&hf_amqp_method_exchange_method_id, {
4208             "Method", "amqp.method.method",
4209             FT_UINT16, BASE_DEC, VALS(amqp_method_exchange_methods), 0x0,
4210             "Method ID", HFILL}},
4211         {&hf_amqp_method_queue_method_id, {
4212             "Method", "amqp.method.method",
4213             FT_UINT16, BASE_DEC, VALS(amqp_method_queue_methods), 0x0,
4214             "Method ID", HFILL}},
4215         {&hf_amqp_method_basic_method_id, {
4216             "Method", "amqp.method.method",
4217             FT_UINT16, BASE_DEC, VALS(amqp_method_basic_methods), 0x0,
4218             "Method ID", HFILL}},
4219         {&hf_amqp_method_file_method_id, {
4220             "Method", "amqp.method.method",
4221             FT_UINT16, BASE_DEC, VALS(amqp_method_file_methods), 0x0,
4222             "Method ID", HFILL}},
4223         {&hf_amqp_method_stream_method_id, {
4224             "Method", "amqp.method.method",
4225             FT_UINT16, BASE_DEC, VALS(amqp_method_stream_methods), 0x0,
4226             "Method ID", HFILL}},
4227         {&hf_amqp_method_tx_method_id, {
4228             "Method", "amqp.method.method",
4229             FT_UINT16, BASE_DEC, VALS(amqp_method_tx_methods), 0x0,
4230             "Method ID", HFILL}},
4231         {&hf_amqp_method_dtx_method_id, {
4232             "Method", "amqp.method.method",
4233             FT_UINT16, BASE_DEC, VALS(amqp_method_dtx_methods), 0x0,
4234             "Method ID", HFILL}},
4235         {&hf_amqp_method_tunnel_method_id, {
4236             "Method", "amqp.method.method",
4237             FT_UINT16, BASE_DEC, VALS(amqp_method_tunnel_methods), 0x0,
4238             "Method ID", HFILL}},
4239         {&hf_amqp_method_arguments, {
4240             "Arguments", "amqp.method.arguments",
4241             FT_NONE, BASE_NONE, NULL, 0x0,
4242             "Method arguments", HFILL}},
4243         {&hf_amqp_method_connection_start_version_major, {
4244             "Version-Major", "amqp.method.arguments.version_major",
4245             FT_UINT8, BASE_DEC, NULL, 0,
4246             NULL, HFILL}},
4247         {&hf_amqp_method_connection_start_version_minor, {
4248             "Version-Minor", "amqp.method.arguments.version_minor",
4249             FT_UINT8, BASE_DEC, NULL, 0,
4250             NULL, HFILL}},
4251         {&hf_amqp_method_connection_start_server_properties, {
4252             "Server-Properties", "amqp.method.arguments.server_properties",
4253             FT_NONE, BASE_NONE, NULL, 0,
4254             NULL, HFILL}},
4255         {&hf_amqp_method_connection_start_mechanisms, {
4256             "Mechanisms", "amqp.method.arguments.mechanisms",
4257             FT_BYTES, BASE_NONE, NULL, 0,
4258             NULL, HFILL}},
4259         {&hf_amqp_method_connection_start_locales, {
4260             "Locales", "amqp.method.arguments.locales",
4261             FT_BYTES, BASE_NONE, NULL, 0,
4262             NULL, HFILL}},
4263         {&hf_amqp_method_connection_start_ok_client_properties, {
4264             "Client-Properties", "amqp.method.arguments.client_properties",
4265             FT_NONE, BASE_NONE, NULL, 0,
4266             NULL, HFILL}},
4267         {&hf_amqp_method_connection_start_ok_mechanism, {
4268             "Mechanism", "amqp.method.arguments.mechanism",
4269             FT_STRING, BASE_NONE, NULL, 0,
4270             NULL, HFILL}},
4271         {&hf_amqp_method_connection_start_ok_response, {
4272             "Response", "amqp.method.arguments.response",
4273             FT_BYTES, BASE_NONE, NULL, 0,
4274             NULL, HFILL}},
4275         {&hf_amqp_method_connection_start_ok_locale, {
4276             "Locale", "amqp.method.arguments.locale",
4277             FT_STRING, BASE_NONE, NULL, 0,
4278             NULL, HFILL}},
4279         {&hf_amqp_method_connection_secure_challenge, {
4280             "Challenge", "amqp.method.arguments.challenge",
4281             FT_BYTES, BASE_NONE, NULL, 0,
4282             NULL, HFILL}},
4283         {&hf_amqp_method_connection_secure_ok_response, {
4284             "Response", "amqp.method.arguments.response",
4285             FT_BYTES, BASE_NONE, NULL, 0,
4286             NULL, HFILL}},
4287         {&hf_amqp_method_connection_tune_channel_max, {
4288             "Channel-Max", "amqp.method.arguments.channel_max",
4289              FT_UINT16, BASE_DEC, NULL, 0,
4290             NULL, HFILL}},
4291         {&hf_amqp_method_connection_tune_frame_max, {
4292             "Frame-Max", "amqp.method.arguments.frame_max",
4293             FT_UINT32, BASE_DEC, NULL, 0,
4294             NULL, HFILL}},
4295         {&hf_amqp_method_connection_tune_heartbeat, {
4296             "Heartbeat", "amqp.method.arguments.heartbeat",
4297              FT_UINT16, BASE_DEC, NULL, 0,
4298             NULL, HFILL}},
4299         {&hf_amqp_method_connection_tune_ok_channel_max, {
4300             "Channel-Max", "amqp.method.arguments.channel_max",
4301              FT_UINT16, BASE_DEC, NULL, 0,
4302             NULL, HFILL}},
4303         {&hf_amqp_method_connection_tune_ok_frame_max, {
4304             "Frame-Max", "amqp.method.arguments.frame_max",
4305             FT_UINT32, BASE_DEC, NULL, 0,
4306             NULL, HFILL}},
4307         {&hf_amqp_method_connection_tune_ok_heartbeat, {
4308             "Heartbeat", "amqp.method.arguments.heartbeat",
4309              FT_UINT16, BASE_DEC, NULL, 0,
4310             NULL, HFILL}},
4311         {&hf_amqp_method_connection_open_virtual_host, {
4312             "Virtual-Host", "amqp.method.arguments.virtual_host",
4313             FT_STRING, BASE_NONE, NULL, 0,
4314             NULL, HFILL}},
4315         {&hf_amqp_method_connection_open_capabilities, {
4316             "Capabilities", "amqp.method.arguments.capabilities",
4317             FT_STRING, BASE_NONE, NULL, 0,
4318             NULL, HFILL}},
4319         {&hf_amqp_method_connection_open_insist, {
4320             "Insist", "amqp.method.arguments.insist",
4321             FT_BOOLEAN, 8, NULL, 0x01,
4322             NULL, HFILL}},
4323         {&hf_amqp_method_connection_open_ok_known_hosts, {
4324             "Known-Hosts", "amqp.method.arguments.known_hosts",
4325             FT_STRING, BASE_NONE, NULL, 0,
4326             NULL, HFILL}},
4327         {&hf_amqp_method_connection_redirect_host, {
4328             "Host", "amqp.method.arguments.host",
4329             FT_STRING, BASE_NONE, NULL, 0,
4330             NULL, HFILL}},
4331         {&hf_amqp_method_connection_redirect_known_hosts, {
4332             "Known-Hosts", "amqp.method.arguments.known_hosts",
4333             FT_STRING, BASE_NONE, NULL, 0,
4334             NULL, HFILL}},
4335         {&hf_amqp_method_connection_close_reply_code, {
4336             "Reply-Code", "amqp.method.arguments.reply_code",
4337              FT_UINT16, BASE_DEC, NULL, 0,
4338             NULL, HFILL}},
4339         {&hf_amqp_method_connection_close_reply_text, {
4340             "Reply-Text", "amqp.method.arguments.reply_text",
4341             FT_STRING, BASE_NONE, NULL, 0,
4342             NULL, HFILL}},
4343         {&hf_amqp_method_connection_close_class_id, {
4344             "Class-Id", "amqp.method.arguments.class_id",
4345              FT_UINT16, BASE_DEC, NULL, 0,
4346             NULL, HFILL}},
4347         {&hf_amqp_method_connection_close_method_id, {
4348             "Method-Id", "amqp.method.arguments.method_id",
4349              FT_UINT16, BASE_DEC, NULL, 0,
4350             NULL, HFILL}},
4351         {&hf_amqp_method_channel_open_out_of_band, {
4352             "Out-Of-Band", "amqp.method.arguments.out_of_band",
4353             FT_STRING, BASE_NONE, NULL, 0,
4354             NULL, HFILL}},
4355         {&hf_amqp_method_channel_open_ok_channel_id, {
4356             "Channel-Id", "amqp.method.arguments.channel_id",
4357             FT_BYTES, BASE_NONE, NULL, 0,
4358             NULL, HFILL}},
4359         {&hf_amqp_method_channel_flow_active, {
4360             "Active", "amqp.method.arguments.active",
4361             FT_BOOLEAN, 8, NULL, 0x01,
4362             NULL, HFILL}},
4363         {&hf_amqp_method_channel_flow_ok_active, {
4364             "Active", "amqp.method.arguments.active",
4365             FT_BOOLEAN, 8, NULL, 0x01,
4366             NULL, HFILL}},
4367         {&hf_amqp_method_channel_close_reply_code, {
4368             "Reply-Code", "amqp.method.arguments.reply_code",
4369              FT_UINT16, BASE_DEC, NULL, 0,
4370             NULL, HFILL}},
4371         {&hf_amqp_method_channel_close_reply_text, {
4372             "Reply-Text", "amqp.method.arguments.reply_text",
4373             FT_STRING, BASE_NONE, NULL, 0,
4374             NULL, HFILL}},
4375         {&hf_amqp_method_channel_close_class_id, {
4376             "Class-Id", "amqp.method.arguments.class_id",
4377              FT_UINT16, BASE_DEC, NULL, 0,
4378             NULL, HFILL}},
4379         {&hf_amqp_method_channel_close_method_id, {
4380             "Method-Id", "amqp.method.arguments.method_id",
4381              FT_UINT16, BASE_DEC, NULL, 0,
4382             NULL, HFILL}},
4383         {&hf_amqp_method_channel_resume_channel_id, {
4384             "Channel-Id", "amqp.method.arguments.channel_id",
4385             FT_BYTES, BASE_NONE, NULL, 0,
4386             NULL, HFILL}},
4387         {&hf_amqp_method_access_request_realm, {
4388             "Realm", "amqp.method.arguments.realm",
4389             FT_STRING, BASE_NONE, NULL, 0,
4390             NULL, HFILL}},
4391         {&hf_amqp_method_access_request_exclusive, {
4392             "Exclusive", "amqp.method.arguments.exclusive",
4393             FT_BOOLEAN, 8, NULL, 0x01,
4394             NULL, HFILL}},
4395         {&hf_amqp_method_access_request_passive, {
4396             "Passive", "amqp.method.arguments.passive",
4397             FT_BOOLEAN, 8, NULL, 0x02,
4398             NULL, HFILL}},
4399         {&hf_amqp_method_access_request_active, {
4400             "Active", "amqp.method.arguments.active",
4401             FT_BOOLEAN, 8, NULL, 0x04,
4402             NULL, HFILL}},
4403         {&hf_amqp_method_access_request_write, {
4404             "Write", "amqp.method.arguments.write",
4405             FT_BOOLEAN, 8, NULL, 0x08,
4406             NULL, HFILL}},
4407         {&hf_amqp_method_access_request_read, {
4408             "Read", "amqp.method.arguments.read",
4409             FT_BOOLEAN, 8, NULL, 0x10,
4410             NULL, HFILL}},
4411         {&hf_amqp_method_access_request_ok_ticket, {
4412             "Ticket", "amqp.method.arguments.ticket",
4413              FT_UINT16, BASE_DEC, NULL, 0,
4414             NULL, HFILL}},
4415         {&hf_amqp_method_exchange_declare_ticket, {
4416             "Ticket", "amqp.method.arguments.ticket",
4417              FT_UINT16, BASE_DEC, NULL, 0,
4418             NULL, HFILL}},
4419         {&hf_amqp_method_exchange_declare_exchange, {
4420             "Exchange", "amqp.method.arguments.exchange",
4421             FT_STRING, BASE_NONE, NULL, 0,
4422             NULL, HFILL}},
4423         {&hf_amqp_method_exchange_declare_type, {
4424             "Type", "amqp.method.arguments.type",
4425             FT_STRING, BASE_NONE, NULL, 0,
4426             NULL, HFILL}},
4427         {&hf_amqp_method_exchange_declare_passive, {
4428             "Passive", "amqp.method.arguments.passive",
4429             FT_BOOLEAN, 8, NULL, 0x01,
4430             NULL, HFILL}},
4431         {&hf_amqp_method_exchange_declare_durable, {
4432             "Durable", "amqp.method.arguments.durable",
4433             FT_BOOLEAN, 8, NULL, 0x02,
4434             NULL, HFILL}},
4435         {&hf_amqp_method_exchange_declare_auto_delete, {
4436             "Auto-Delete", "amqp.method.arguments.auto_delete",
4437             FT_BOOLEAN, 8, NULL, 0x04,
4438             NULL, HFILL}},
4439         {&hf_amqp_method_exchange_declare_internal, {
4440             "Internal", "amqp.method.arguments.internal",
4441             FT_BOOLEAN, 8, NULL, 0x08,
4442             NULL, HFILL}},
4443         {&hf_amqp_method_exchange_declare_nowait, {
4444             "Nowait", "amqp.method.arguments.nowait",
4445             FT_BOOLEAN, 8, NULL, 0x10,
4446             NULL, HFILL}},
4447         {&hf_amqp_method_exchange_declare_arguments, {
4448             "Arguments", "amqp.method.arguments.arguments",
4449             FT_NONE, BASE_NONE, NULL, 0,
4450             NULL, HFILL}},
4451         {&hf_amqp_method_exchange_delete_ticket, {
4452             "Ticket", "amqp.method.arguments.ticket",
4453              FT_UINT16, BASE_DEC, NULL, 0,
4454             NULL, HFILL}},
4455         {&hf_amqp_method_exchange_delete_exchange, {
4456             "Exchange", "amqp.method.arguments.exchange",
4457             FT_STRING, BASE_NONE, NULL, 0,
4458             NULL, HFILL}},
4459         {&hf_amqp_method_exchange_delete_if_unused, {
4460             "If-Unused", "amqp.method.arguments.if_unused",
4461             FT_BOOLEAN, 8, NULL, 0x01,
4462             NULL, HFILL}},
4463         {&hf_amqp_method_exchange_delete_nowait, {
4464             "Nowait", "amqp.method.arguments.nowait",
4465             FT_BOOLEAN, 8, NULL, 0x02,
4466             NULL, HFILL}},
4467         {&hf_amqp_method_queue_declare_ticket, {
4468             "Ticket", "amqp.method.arguments.ticket",
4469              FT_UINT16, BASE_DEC, NULL, 0,
4470             NULL, HFILL}},
4471         {&hf_amqp_method_queue_declare_queue, {
4472             "Queue", "amqp.method.arguments.queue",
4473             FT_STRING, BASE_NONE, NULL, 0,
4474             NULL, HFILL}},
4475         {&hf_amqp_method_queue_declare_passive, {
4476             "Passive", "amqp.method.arguments.passive",
4477             FT_BOOLEAN, 8, NULL, 0x01,
4478             NULL, HFILL}},
4479         {&hf_amqp_method_queue_declare_durable, {
4480             "Durable", "amqp.method.arguments.durable",
4481             FT_BOOLEAN, 8, NULL, 0x02,
4482             NULL, HFILL}},
4483         {&hf_amqp_method_queue_declare_exclusive, {
4484             "Exclusive", "amqp.method.arguments.exclusive",
4485             FT_BOOLEAN, 8, NULL, 0x04,
4486             NULL, HFILL}},
4487         {&hf_amqp_method_queue_declare_auto_delete, {
4488             "Auto-Delete", "amqp.method.arguments.auto_delete",
4489             FT_BOOLEAN, 8, NULL, 0x08,
4490             NULL, HFILL}},
4491         {&hf_amqp_method_queue_declare_nowait, {
4492             "Nowait", "amqp.method.arguments.nowait",
4493             FT_BOOLEAN, 8, NULL, 0x10,
4494             NULL, HFILL}},
4495         {&hf_amqp_method_queue_declare_arguments, {
4496             "Arguments", "amqp.method.arguments.arguments",
4497             FT_NONE, BASE_NONE, NULL, 0,
4498             NULL, HFILL}},
4499         {&hf_amqp_method_queue_declare_ok_queue, {
4500             "Queue", "amqp.method.arguments.queue",
4501             FT_STRING, BASE_NONE, NULL, 0,
4502             NULL, HFILL}},
4503         {&hf_amqp_method_queue_declare_ok_message_count, {
4504             "Message-Count", "amqp.method.arguments.message_count",
4505             FT_UINT32, BASE_DEC, NULL, 0,
4506             NULL, HFILL}},
4507         {&hf_amqp_method_queue_declare_ok_consumer_count, {
4508             "Consumer-Count", "amqp.method.arguments.consumer_count",
4509             FT_UINT32, BASE_DEC, NULL, 0,
4510             NULL, HFILL}},
4511         {&hf_amqp_method_queue_bind_ticket, {
4512             "Ticket", "amqp.method.arguments.ticket",
4513              FT_UINT16, BASE_DEC, NULL, 0,
4514             NULL, HFILL}},
4515         {&hf_amqp_method_queue_bind_queue, {
4516             "Queue", "amqp.method.arguments.queue",
4517             FT_STRING, BASE_NONE, NULL, 0,
4518             NULL, HFILL}},
4519         {&hf_amqp_method_queue_bind_exchange, {
4520             "Exchange", "amqp.method.arguments.exchange",
4521             FT_STRING, BASE_NONE, NULL, 0,
4522             NULL, HFILL}},
4523         {&hf_amqp_method_queue_bind_routing_key, {
4524             "Routing-Key", "amqp.method.arguments.routing_key",
4525             FT_STRING, BASE_NONE, NULL, 0,
4526             NULL, HFILL}},
4527         {&hf_amqp_method_queue_bind_nowait, {
4528             "Nowait", "amqp.method.arguments.nowait",
4529             FT_BOOLEAN, 8, NULL, 0x01,
4530             NULL, HFILL}},
4531         {&hf_amqp_method_queue_bind_arguments, {
4532             "Arguments", "amqp.method.arguments.arguments",
4533             FT_NONE, BASE_NONE, NULL, 0,
4534             NULL, HFILL}},
4535         {&hf_amqp_method_queue_unbind_ticket, {
4536             "Ticket", "amqp.method.arguments.ticket",
4537              FT_UINT16, BASE_DEC, NULL, 0,
4538             NULL, HFILL}},
4539         {&hf_amqp_method_queue_unbind_queue, {
4540             "Queue", "amqp.method.arguments.queue",
4541             FT_STRING, BASE_NONE, NULL, 0,
4542             NULL, HFILL}},
4543         {&hf_amqp_method_queue_unbind_exchange, {
4544             "Exchange", "amqp.method.arguments.exchange",
4545             FT_STRING, BASE_NONE, NULL, 0,
4546             NULL, HFILL}},
4547         {&hf_amqp_method_queue_unbind_routing_key, {
4548             "Routing-Key", "amqp.method.arguments.routing_key",
4549             FT_STRING, BASE_NONE, NULL, 0,
4550             NULL, HFILL}},
4551         {&hf_amqp_method_queue_unbind_arguments, {
4552             "Arguments", "amqp.method.arguments.arguments",
4553             FT_NONE, BASE_NONE, NULL, 0,
4554             NULL, HFILL}},
4555         {&hf_amqp_method_queue_purge_ticket, {
4556             "Ticket", "amqp.method.arguments.ticket",
4557              FT_UINT16, BASE_DEC, NULL, 0,
4558             NULL, HFILL}},
4559         {&hf_amqp_method_queue_purge_queue, {
4560             "Queue", "amqp.method.arguments.queue",
4561             FT_STRING, BASE_NONE, NULL, 0,
4562             NULL, HFILL}},
4563         {&hf_amqp_method_queue_purge_nowait, {
4564             "Nowait", "amqp.method.arguments.nowait",
4565             FT_BOOLEAN, 8, NULL, 0x01,
4566             NULL, HFILL}},
4567         {&hf_amqp_method_queue_purge_ok_message_count, {
4568             "Message-Count", "amqp.method.arguments.message_count",
4569             FT_UINT32, BASE_DEC, NULL, 0,
4570             NULL, HFILL}},
4571         {&hf_amqp_method_queue_delete_ticket, {
4572             "Ticket", "amqp.method.arguments.ticket",
4573              FT_UINT16, BASE_DEC, NULL, 0,
4574             NULL, HFILL}},
4575         {&hf_amqp_method_queue_delete_queue, {
4576             "Queue", "amqp.method.arguments.queue",
4577             FT_STRING, BASE_NONE, NULL, 0,
4578             NULL, HFILL}},
4579         {&hf_amqp_method_queue_delete_if_unused, {
4580             "If-Unused", "amqp.method.arguments.if_unused",
4581             FT_BOOLEAN, 8, NULL, 0x01,
4582             NULL, HFILL}},
4583         {&hf_amqp_method_queue_delete_if_empty, {
4584             "If-Empty", "amqp.method.arguments.if_empty",
4585             FT_BOOLEAN, 8, NULL, 0x02,
4586             NULL, HFILL}},
4587         {&hf_amqp_method_queue_delete_nowait, {
4588             "Nowait", "amqp.method.arguments.nowait",
4589             FT_BOOLEAN, 8, NULL, 0x04,
4590             NULL, HFILL}},
4591         {&hf_amqp_method_queue_delete_ok_message_count, {
4592             "Message-Count", "amqp.method.arguments.message_count",
4593             FT_UINT32, BASE_DEC, NULL, 0,
4594             NULL, HFILL}},
4595         {&hf_amqp_method_basic_qos_prefetch_size, {
4596             "Prefetch-Size", "amqp.method.arguments.prefetch_size",
4597             FT_UINT32, BASE_DEC, NULL, 0,
4598             NULL, HFILL}},
4599         {&hf_amqp_method_basic_qos_prefetch_count, {
4600             "Prefetch-Count", "amqp.method.arguments.prefetch_count",
4601              FT_UINT16, BASE_DEC, NULL, 0,
4602             NULL, HFILL}},
4603         {&hf_amqp_method_basic_qos_global, {
4604             "Global", "amqp.method.arguments.global",
4605             FT_BOOLEAN, 8, NULL, 0x01,
4606             NULL, HFILL}},
4607         {&hf_amqp_method_basic_consume_ticket, {
4608             "Ticket", "amqp.method.arguments.ticket",
4609              FT_UINT16, BASE_DEC, NULL, 0,
4610             NULL, HFILL}},
4611         {&hf_amqp_method_basic_consume_queue, {
4612             "Queue", "amqp.method.arguments.queue",
4613             FT_STRING, BASE_NONE, NULL, 0,
4614             NULL, HFILL}},
4615         {&hf_amqp_method_basic_consume_consumer_tag, {
4616             "Consumer-Tag", "amqp.method.arguments.consumer_tag",
4617             FT_STRING, BASE_NONE, NULL, 0,
4618             NULL, HFILL}},
4619         {&hf_amqp_method_basic_consume_no_local, {
4620             "No-Local", "amqp.method.arguments.no_local",
4621             FT_BOOLEAN, 8, NULL, 0x01,
4622             NULL, HFILL}},
4623         {&hf_amqp_method_basic_consume_no_ack, {
4624             "No-Ack", "amqp.method.arguments.no_ack",
4625             FT_BOOLEAN, 8, NULL, 0x02,
4626             NULL, HFILL}},
4627         {&hf_amqp_method_basic_consume_exclusive, {
4628             "Exclusive", "amqp.method.arguments.exclusive",
4629             FT_BOOLEAN, 8, NULL, 0x04,
4630             NULL, HFILL}},
4631         {&hf_amqp_method_basic_consume_nowait, {
4632             "Nowait", "amqp.method.arguments.nowait",
4633             FT_BOOLEAN, 8, NULL, 0x08,
4634             NULL, HFILL}},
4635         {&hf_amqp_method_basic_consume_filter, {
4636             "Filter", "amqp.method.arguments.filter",
4637             FT_NONE, BASE_NONE, NULL, 0,
4638             NULL, HFILL}},
4639         {&hf_amqp_method_basic_consume_ok_consumer_tag, {
4640             "Consumer-Tag", "amqp.method.arguments.consumer_tag",
4641             FT_STRING, BASE_NONE, NULL, 0,
4642             NULL, HFILL}},
4643         {&hf_amqp_method_basic_cancel_consumer_tag, {
4644             "Consumer-Tag", "amqp.method.arguments.consumer_tag",
4645             FT_STRING, BASE_NONE, NULL, 0,
4646             NULL, HFILL}},
4647         {&hf_amqp_method_basic_cancel_nowait, {
4648             "Nowait", "amqp.method.arguments.nowait",
4649             FT_BOOLEAN, 8, NULL, 0x01,
4650             NULL, HFILL}},
4651         {&hf_amqp_method_basic_cancel_ok_consumer_tag, {
4652             "Consumer-Tag", "amqp.method.arguments.consumer_tag",
4653             FT_STRING, BASE_NONE, NULL, 0,
4654             NULL, HFILL}},
4655         {&hf_amqp_method_basic_publish_ticket, {
4656             "Ticket", "amqp.method.arguments.ticket",
4657              FT_UINT16, BASE_DEC, NULL, 0,
4658             NULL, HFILL}},
4659         {&hf_amqp_method_basic_publish_exchange, {
4660             "Exchange", "amqp.method.arguments.exchange",
4661             FT_STRING, BASE_NONE, NULL, 0,
4662             NULL, HFILL}},
4663         {&hf_amqp_method_basic_publish_routing_key, {
4664             "Routing-Key", "amqp.method.arguments.routing_key",
4665             FT_STRING, BASE_NONE, NULL, 0,
4666             NULL, HFILL}},
4667         {&hf_amqp_method_basic_publish_mandatory, {
4668             "Mandatory", "amqp.method.arguments.mandatory",
4669             FT_BOOLEAN, 8, NULL, 0x01,
4670             NULL, HFILL}},
4671         {&hf_amqp_method_basic_publish_immediate, {
4672             "Immediate", "amqp.method.arguments.immediate",
4673             FT_BOOLEAN, 8, NULL, 0x02,
4674             NULL, HFILL}},
4675         {&hf_amqp_method_basic_return_reply_code, {
4676             "Reply-Code", "amqp.method.arguments.reply_code",
4677              FT_UINT16, BASE_DEC, NULL, 0,
4678             NULL, HFILL}},
4679         {&hf_amqp_method_basic_return_reply_text, {
4680             "Reply-Text", "amqp.method.arguments.reply_text",
4681             FT_STRING, BASE_NONE, NULL, 0,
4682             NULL, HFILL}},
4683         {&hf_amqp_method_basic_return_exchange, {
4684             "Exchange", "amqp.method.arguments.exchange",
4685             FT_STRING, BASE_NONE, NULL, 0,
4686             NULL, HFILL}},
4687         {&hf_amqp_method_basic_return_routing_key, {
4688             "Routing-Key", "amqp.method.arguments.routing_key",
4689             FT_STRING, BASE_NONE, NULL, 0,
4690             NULL, HFILL}},
4691         {&hf_amqp_method_basic_deliver_consumer_tag, {
4692             "Consumer-Tag", "amqp.method.arguments.consumer_tag",
4693             FT_STRING, BASE_NONE, NULL, 0,
4694             NULL, HFILL}},
4695         {&hf_amqp_method_basic_deliver_delivery_tag, {
4696             "Delivery-Tag", "amqp.method.arguments.delivery_tag",
4697             FT_UINT64, BASE_DEC, NULL, 0,
4698             NULL, HFILL}},
4699         {&hf_amqp_method_basic_deliver_redelivered, {
4700             "Redelivered", "amqp.method.arguments.redelivered",
4701             FT_BOOLEAN, 8, NULL, 0x01,
4702             NULL, HFILL}},
4703         {&hf_amqp_method_basic_deliver_exchange, {
4704             "Exchange", "amqp.method.arguments.exchange",
4705             FT_STRING, BASE_NONE, NULL, 0,
4706             NULL, HFILL}},
4707         {&hf_amqp_method_basic_deliver_routing_key, {
4708             "Routing-Key", "amqp.method.arguments.routing_key",
4709             FT_STRING, BASE_NONE, NULL, 0,
4710             NULL, HFILL}},
4711         {&hf_amqp_method_basic_get_ticket, {
4712             "Ticket", "amqp.method.arguments.ticket",
4713              FT_UINT16, BASE_DEC, NULL, 0,
4714             NULL, HFILL}},
4715         {&hf_amqp_method_basic_get_queue, {
4716             "Queue", "amqp.method.arguments.queue",
4717             FT_STRING, BASE_NONE, NULL, 0,
4718             NULL, HFILL}},
4719         {&hf_amqp_method_basic_get_no_ack, {
4720             "No-Ack", "amqp.method.arguments.no_ack",
4721             FT_BOOLEAN, 8, NULL, 0x01,
4722             NULL, HFILL}},
4723         {&hf_amqp_method_basic_get_ok_delivery_tag, {
4724             "Delivery-Tag", "amqp.method.arguments.delivery_tag",
4725             FT_UINT64, BASE_DEC, NULL, 0,
4726             NULL, HFILL}},
4727         {&hf_amqp_method_basic_get_ok_redelivered, {
4728             "Redelivered", "amqp.method.arguments.redelivered",
4729             FT_BOOLEAN, 8, NULL, 0x01,
4730             NULL, HFILL}},
4731         {&hf_amqp_method_basic_get_ok_exchange, {
4732             "Exchange", "amqp.method.arguments.exchange",
4733             FT_STRING, BASE_NONE, NULL, 0,
4734             NULL, HFILL}},
4735         {&hf_amqp_method_basic_get_ok_routing_key, {
4736             "Routing-Key", "amqp.method.arguments.routing_key",
4737             FT_STRING, BASE_NONE, NULL, 0,
4738             NULL, HFILL}},
4739         {&hf_amqp_method_basic_get_ok_message_count, {
4740             "Message-Count", "amqp.method.arguments.message_count",
4741             FT_UINT32, BASE_DEC, NULL, 0,
4742             NULL, HFILL}},
4743         {&hf_amqp_method_basic_get_empty_cluster_id, {
4744             "Cluster-Id", "amqp.method.arguments.cluster_id",
4745             FT_STRING, BASE_NONE, NULL, 0,
4746             NULL, HFILL}},
4747         {&hf_amqp_method_basic_ack_delivery_tag, {
4748             "Delivery-Tag", "amqp.method.arguments.delivery_tag",
4749             FT_UINT64, BASE_DEC, NULL, 0,
4750             NULL, HFILL}},
4751         {&hf_amqp_method_basic_ack_multiple, {
4752             "Multiple", "amqp.method.arguments.multiple",
4753             FT_BOOLEAN, 8, NULL, 0x01,
4754             NULL, HFILL}},
4755         {&hf_amqp_method_basic_reject_delivery_tag, {
4756             "Delivery-Tag", "amqp.method.arguments.delivery_tag",
4757             FT_UINT64, BASE_DEC, NULL, 0,
4758             NULL, HFILL}},
4759         {&hf_amqp_method_basic_reject_requeue, {
4760             "Requeue", "amqp.method.arguments.requeue",
4761             FT_BOOLEAN, 8, NULL, 0x01,
4762             NULL, HFILL}},
4763         {&hf_amqp_method_basic_recover_requeue, {
4764             "Requeue", "amqp.method.arguments.requeue",
4765             FT_BOOLEAN, 8, NULL, 0x01,
4766             NULL, HFILL}},
4767         {&hf_amqp_method_file_qos_prefetch_size, {
4768             "Prefetch-Size", "amqp.method.arguments.prefetch_size",
4769             FT_UINT32, BASE_DEC, NULL, 0,
4770             NULL, HFILL}},
4771         {&hf_amqp_method_file_qos_prefetch_count, {
4772             "Prefetch-Count", "amqp.method.arguments.prefetch_count",
4773              FT_UINT16, BASE_DEC, NULL, 0,
4774             NULL, HFILL}},
4775         {&hf_amqp_method_file_qos_global, {
4776             "Global", "amqp.method.arguments.global",
4777             FT_BOOLEAN, 8, NULL, 0x01,
4778             NULL, HFILL}},
4779         {&hf_amqp_method_file_consume_ticket, {
4780             "Ticket", "amqp.method.arguments.ticket",
4781              FT_UINT16, BASE_DEC, NULL, 0,
4782             NULL, HFILL}},
4783         {&hf_amqp_method_file_consume_queue, {
4784             "Queue", "amqp.method.arguments.queue",
4785             FT_STRING, BASE_NONE, NULL, 0,
4786             NULL, HFILL}},
4787         {&hf_amqp_method_file_consume_consumer_tag, {
4788             "Consumer-Tag", "amqp.method.arguments.consumer_tag",
4789             FT_STRING, BASE_NONE, NULL, 0,
4790             NULL, HFILL}},
4791         {&hf_amqp_method_file_consume_no_local, {
4792             "No-Local", "amqp.method.arguments.no_local",
4793             FT_BOOLEAN, 8, NULL, 0x01,
4794             NULL, HFILL}},
4795         {&hf_amqp_method_file_consume_no_ack, {
4796             "No-Ack", "amqp.method.arguments.no_ack",
4797             FT_BOOLEAN, 8, NULL, 0x02,
4798             NULL, HFILL}},
4799         {&hf_amqp_method_file_consume_exclusive, {
4800             "Exclusive", "amqp.method.arguments.exclusive",
4801             FT_BOOLEAN, 8, NULL, 0x04,
4802             NULL, HFILL}},
4803         {&hf_amqp_method_file_consume_nowait, {
4804             "Nowait", "amqp.method.arguments.nowait",
4805             FT_BOOLEAN, 8, NULL, 0x08,
4806             NULL, HFILL}},
4807         {&hf_amqp_method_file_consume_filter, {
4808             "Filter", "amqp.method.arguments.filter",
4809             FT_NONE, BASE_NONE, NULL, 0,
4810             NULL, HFILL}},
4811         {&hf_amqp_method_file_consume_ok_consumer_tag, {
4812             "Consumer-Tag", "amqp.method.arguments.consumer_tag",
4813             FT_STRING, BASE_NONE, NULL, 0,
4814             NULL, HFILL}},
4815         {&hf_amqp_method_file_cancel_consumer_tag, {
4816             "Consumer-Tag", "amqp.method.arguments.consumer_tag",
4817             FT_STRING, BASE_NONE, NULL, 0,
4818             NULL, HFILL}},
4819         {&hf_amqp_method_file_cancel_nowait, {
4820             "Nowait", "amqp.method.arguments.nowait",
4821             FT_BOOLEAN, 8, NULL, 0x01,
4822             NULL, HFILL}},
4823         {&hf_amqp_method_file_cancel_ok_consumer_tag, {
4824             "Consumer-Tag", "amqp.method.arguments.consumer_tag",
4825             FT_STRING, BASE_NONE, NULL, 0,
4826             NULL, HFILL}},
4827         {&hf_amqp_method_file_open_identifier, {
4828             "Identifier", "amqp.method.arguments.identifier",
4829             FT_STRING, BASE_NONE, NULL, 0,
4830             NULL, HFILL}},
4831         {&hf_amqp_method_file_open_content_size, {
4832             "Content-Size", "amqp.method.arguments.content_size",
4833             FT_UINT64, BASE_DEC, NULL, 0,
4834             NULL, HFILL}},
4835         {&hf_amqp_method_file_open_ok_staged_size, {
4836             "Staged-Size", "amqp.method.arguments.staged_size",
4837             FT_UINT64, BASE_DEC, NULL, 0,
4838             NULL, HFILL}},
4839         {&hf_amqp_method_file_publish_ticket, {
4840             "Ticket", "amqp.method.arguments.ticket",
4841              FT_UINT16, BASE_DEC, NULL, 0,
4842             NULL, HFILL}},
4843         {&hf_amqp_method_file_publish_exchange, {
4844             "Exchange", "amqp.method.arguments.exchange",
4845             FT_STRING, BASE_NONE, NULL, 0,
4846             NULL, HFILL}},
4847         {&hf_amqp_method_file_publish_routing_key, {
4848             "Routing-Key", "amqp.method.arguments.routing_key",
4849             FT_STRING, BASE_NONE, NULL, 0,
4850             NULL, HFILL}},
4851         {&hf_amqp_method_file_publish_mandatory, {
4852             "Mandatory", "amqp.method.arguments.mandatory",
4853             FT_BOOLEAN, 8, NULL, 0x01,
4854             NULL, HFILL}},
4855         {&hf_amqp_method_file_publish_immediate, {
4856             "Immediate", "amqp.method.arguments.immediate",
4857             FT_BOOLEAN, 8, NULL, 0x02,
4858             NULL, HFILL}},
4859         {&hf_amqp_method_file_publish_identifier, {
4860             "Identifier", "amqp.method.arguments.identifier",
4861             FT_STRING, BASE_NONE, NULL, 0,
4862             NULL, HFILL}},
4863         {&hf_amqp_method_file_return_reply_code, {
4864             "Reply-Code", "amqp.method.arguments.reply_code",
4865              FT_UINT16, BASE_DEC, NULL, 0,
4866             NULL, HFILL}},
4867         {&hf_amqp_method_file_return_reply_text, {
4868             "Reply-Text", "amqp.method.arguments.reply_text",
4869             FT_STRING, BASE_NONE, NULL, 0,
4870             NULL, HFILL}},
4871         {&hf_amqp_method_file_return_exchange, {
4872             "Exchange", "amqp.method.arguments.exchange",
4873             FT_STRING, BASE_NONE, NULL, 0,
4874             NULL, HFILL}},
4875         {&hf_amqp_method_file_return_routing_key, {
4876             "Routing-Key", "amqp.method.arguments.routing_key",
4877             FT_STRING, BASE_NONE, NULL, 0,
4878             NULL, HFILL}},
4879         {&hf_amqp_method_file_deliver_consumer_tag, {
4880             "Consumer-Tag", "amqp.method.arguments.consumer_tag",
4881             FT_STRING, BASE_NONE, NULL, 0,
4882             NULL, HFILL}},
4883         {&hf_amqp_method_file_deliver_delivery_tag, {
4884             "Delivery-Tag", "amqp.method.arguments.delivery_tag",
4885             FT_UINT64, BASE_DEC, NULL, 0,
4886             NULL, HFILL}},
4887         {&hf_amqp_method_file_deliver_redelivered, {
4888             "Redelivered", "amqp.method.arguments.redelivered",
4889             FT_BOOLEAN, 8, NULL, 0x01,
4890             NULL, HFILL}},
4891         {&hf_amqp_method_file_deliver_exchange, {
4892             "Exchange", "amqp.method.arguments.exchange",
4893             FT_STRING, BASE_NONE, NULL, 0,
4894             NULL, HFILL}},
4895         {&hf_amqp_method_file_deliver_routing_key, {
4896             "Routing-Key", "amqp.method.arguments.routing_key",
4897             FT_STRING, BASE_NONE, NULL, 0,
4898             NULL, HFILL}},
4899         {&hf_amqp_method_file_deliver_identifier, {
4900             "Identifier", "amqp.method.arguments.identifier",
4901             FT_STRING, BASE_NONE, NULL, 0,
4902             NULL, HFILL}},
4903         {&hf_amqp_method_file_ack_delivery_tag, {
4904             "Delivery-Tag", "amqp.method.arguments.delivery_tag",
4905             FT_UINT64, BASE_DEC, NULL, 0,
4906             NULL, HFILL}},
4907         {&hf_amqp_method_file_ack_multiple, {
4908             "Multiple", "amqp.method.arguments.multiple",
4909             FT_BOOLEAN, 8, NULL, 0x01,
4910             NULL, HFILL}},
4911         {&hf_amqp_method_file_reject_delivery_tag, {
4912             "Delivery-Tag", "amqp.method.arguments.delivery_tag",
4913             FT_UINT64, BASE_DEC, NULL, 0,
4914             NULL, HFILL}},
4915         {&hf_amqp_method_file_reject_requeue, {
4916             "Requeue", "amqp.method.arguments.requeue",
4917             FT_BOOLEAN, 8, NULL, 0x01,
4918             NULL, HFILL}},
4919         {&hf_amqp_method_stream_qos_prefetch_size, {
4920             "Prefetch-Size", "amqp.method.arguments.prefetch_size",
4921             FT_UINT32, BASE_DEC, NULL, 0,
4922             NULL, HFILL}},
4923         {&hf_amqp_method_stream_qos_prefetch_count, {
4924             "Prefetch-Count", "amqp.method.arguments.prefetch_count",
4925              FT_UINT16, BASE_DEC, NULL, 0,
4926             NULL, HFILL}},
4927         {&hf_amqp_method_stream_qos_consume_rate, {
4928             "Consume-Rate", "amqp.method.arguments.consume_rate",
4929             FT_UINT32, BASE_DEC, NULL, 0,
4930             NULL, HFILL}},
4931         {&hf_amqp_method_stream_qos_global, {
4932             "Global", "amqp.method.arguments.global",
4933             FT_BOOLEAN, 8, NULL, 0x01,
4934             NULL, HFILL}},
4935         {&hf_amqp_method_stream_consume_ticket, {
4936             "Ticket", "amqp.method.arguments.ticket",
4937              FT_UINT16, BASE_DEC, NULL, 0,
4938             NULL, HFILL}},
4939         {&hf_amqp_method_stream_consume_queue, {
4940             "Queue", "amqp.method.arguments.queue",
4941             FT_STRING, BASE_NONE, NULL, 0,
4942             NULL, HFILL}},
4943         {&hf_amqp_method_stream_consume_consumer_tag, {
4944             "Consumer-Tag", "amqp.method.arguments.consumer_tag",
4945             FT_STRING, BASE_NONE, NULL, 0,
4946             NULL, HFILL}},
4947         {&hf_amqp_method_stream_consume_no_local, {
4948             "No-Local", "amqp.method.arguments.no_local",
4949             FT_BOOLEAN, 8, NULL, 0x01,
4950             NULL, HFILL}},
4951         {&hf_amqp_method_stream_consume_exclusive, {
4952             "Exclusive", "amqp.method.arguments.exclusive",
4953             FT_BOOLEAN, 8, NULL, 0x02,
4954             NULL, HFILL}},
4955         {&hf_amqp_method_stream_consume_nowait, {
4956             "Nowait", "amqp.method.arguments.nowait",
4957             FT_BOOLEAN, 8, NULL, 0x04,
4958             NULL, HFILL}},
4959         {&hf_amqp_method_stream_consume_filter, {
4960             "Filter", "amqp.method.arguments.filter",
4961             FT_NONE, BASE_NONE, NULL, 0,
4962             NULL, HFILL}},
4963         {&hf_amqp_method_stream_consume_ok_consumer_tag, {
4964             "Consumer-Tag", "amqp.method.arguments.consumer_tag",
4965             FT_STRING, BASE_NONE, NULL, 0,
4966             NULL, HFILL}},
4967         {&hf_amqp_method_stream_cancel_consumer_tag, {
4968             "Consumer-Tag", "amqp.method.arguments.consumer_tag",
4969             FT_STRING, BASE_NONE, NULL, 0,
4970             NULL, HFILL}},
4971         {&hf_amqp_method_stream_cancel_nowait, {
4972             "Nowait", "amqp.method.arguments.nowait",
4973             FT_BOOLEAN, 8, NULL, 0x01,
4974             NULL, HFILL}},
4975         {&hf_amqp_method_stream_cancel_ok_consumer_tag, {
4976             "Consumer-Tag", "amqp.method.arguments.consumer_tag",
4977             FT_STRING, BASE_NONE, NULL, 0,
4978             NULL, HFILL}},
4979         {&hf_amqp_method_stream_publish_ticket, {
4980             "Ticket", "amqp.method.arguments.ticket",
4981              FT_UINT16, BASE_DEC, NULL, 0,
4982             NULL, HFILL}},
4983         {&hf_amqp_method_stream_publish_exchange, {
4984             "Exchange", "amqp.method.arguments.exchange",
4985             FT_STRING, BASE_NONE, NULL, 0,
4986             NULL, HFILL}},
4987         {&hf_amqp_method_stream_publish_routing_key, {
4988             "Routing-Key", "amqp.method.arguments.routing_key",
4989             FT_STRING, BASE_NONE, NULL, 0,
4990             NULL, HFILL}},
4991         {&hf_amqp_method_stream_publish_mandatory, {
4992             "Mandatory", "amqp.method.arguments.mandatory",
4993             FT_BOOLEAN, 8, NULL, 0x01,
4994             NULL, HFILL}},
4995         {&hf_amqp_method_stream_publish_immediate, {
4996             "Immediate", "amqp.method.arguments.immediate",
4997             FT_BOOLEAN, 8, NULL, 0x02,
4998             NULL, HFILL}},
4999         {&hf_amqp_method_stream_return_reply_code, {
5000             "Reply-Code", "amqp.method.arguments.reply_code",
5001              FT_UINT16, BASE_DEC, NULL, 0,
5002             NULL, HFILL}},
5003         {&hf_amqp_method_stream_return_reply_text, {
5004             "Reply-Text", "amqp.method.arguments.reply_text",
5005             FT_STRING, BASE_NONE, NULL, 0,
5006             NULL, HFILL}},
5007         {&hf_amqp_method_stream_return_exchange, {
5008             "Exchange", "amqp.method.arguments.exchange",
5009             FT_STRING, BASE_NONE, NULL, 0,
5010             NULL, HFILL}},
5011         {&hf_amqp_method_stream_return_routing_key, {
5012             "Routing-Key", "amqp.method.arguments.routing_key",
5013             FT_STRING, BASE_NONE, NULL, 0,
5014             NULL, HFILL}},
5015         {&hf_amqp_method_stream_deliver_consumer_tag, {
5016             "Consumer-Tag", "amqp.method.arguments.consumer_tag",
5017             FT_STRING, BASE_NONE, NULL, 0,
5018             NULL, HFILL}},
5019         {&hf_amqp_method_stream_deliver_delivery_tag, {
5020             "Delivery-Tag", "amqp.method.arguments.delivery_tag",
5021             FT_UINT64, BASE_DEC, NULL, 0,
5022             NULL, HFILL}},
5023         {&hf_amqp_method_stream_deliver_exchange, {
5024             "Exchange", "amqp.method.arguments.exchange",
5025             FT_STRING, BASE_NONE, NULL, 0,
5026             NULL, HFILL}},
5027         {&hf_amqp_method_stream_deliver_queue, {
5028             "Queue", "amqp.method.arguments.queue",
5029             FT_STRING, BASE_NONE, NULL, 0,
5030             NULL, HFILL}},
5031         {&hf_amqp_method_dtx_start_dtx_identifier, {
5032             "Dtx-Identifier", "amqp.method.arguments.dtx_identifier",
5033             FT_STRING, BASE_NONE, NULL, 0,
5034             NULL, HFILL}},
5035         {&hf_amqp_method_tunnel_request_meta_data, {
5036             "Meta-Data", "amqp.method.arguments.meta_data",
5037             FT_NONE, BASE_NONE, NULL, 0,
5038             NULL, HFILL}},
5039         {&hf_amqp_field, {
5040             "AMQP", "amqp.field",
5041             FT_NONE, BASE_NONE, NULL, 0,
5042             NULL, HFILL}},
5043         {&hf_amqp_header_class_id, {
5044             "Class ID", "amqp.header.class",
5045             FT_UINT16, BASE_DEC, VALS(amqp_method_classes), 0,
5046             NULL, HFILL}},
5047         {&hf_amqp_header_weight, {
5048             "Weight", "amqp.header.weight",
5049             FT_UINT16, BASE_DEC, NULL, 0,
5050             NULL, HFILL}},
5051         {&hf_amqp_header_body_size, {
5052             "Body size", "amqp.header.body-size",
5053             FT_UINT64, BASE_DEC, NULL, 0,
5054             NULL, HFILL}},
5055         {&hf_amqp_header_property_flags, {
5056             "Property flags", "amqp.header.property-flags",
5057             FT_UINT16, BASE_HEX, NULL, 0,
5058             NULL, HFILL}},
5059         {&hf_amqp_header_properties, {
5060             "Properties", "amqp.header.properties",
5061             FT_NONE, BASE_NONE, NULL, 0x0,
5062             "Message properties", HFILL}},
5063         {&hf_amqp_header_basic_content_type, {
5064             "Content-Type", "amqp.method.properties.content_type",
5065             FT_STRING, BASE_NONE, NULL, 0,
5066             NULL, HFILL}},
5067         {&hf_amqp_header_basic_content_encoding, {
5068             "Content-Encoding", "amqp.method.properties.content_encoding",
5069             FT_STRING, BASE_NONE, NULL, 0,
5070             NULL, HFILL}},
5071         {&hf_amqp_header_basic_headers, {
5072             "Headers", "amqp.method.properties.headers",
5073             FT_NONE, BASE_NONE, NULL, 0,
5074             NULL, HFILL}},
5075         {&hf_amqp_header_basic_delivery_mode, {
5076             "Delivery-Mode", "amqp.method.properties.delivery_mode",
5077             FT_UINT8, BASE_DEC, NULL, 0,
5078             NULL, HFILL}},
5079         {&hf_amqp_header_basic_priority, {
5080             "Priority", "amqp.method.properties.priority",
5081             FT_UINT8, BASE_DEC, NULL, 0,
5082             NULL, HFILL}},
5083         {&hf_amqp_header_basic_correlation_id, {
5084             "Correlation-Id", "amqp.method.properties.correlation_id",
5085             FT_STRING, BASE_NONE, NULL, 0,
5086             NULL, HFILL}},
5087         {&hf_amqp_header_basic_reply_to, {
5088             "Reply-To", "amqp.method.properties.reply_to",
5089             FT_STRING, BASE_NONE, NULL, 0,
5090             NULL, HFILL}},
5091         {&hf_amqp_header_basic_expiration, {
5092             "Expiration", "amqp.method.properties.expiration",
5093             FT_STRING, BASE_NONE, NULL, 0,
5094             NULL, HFILL}},
5095         {&hf_amqp_header_basic_message_id, {
5096             "Message-Id", "amqp.method.properties.message_id",
5097             FT_STRING, BASE_NONE, NULL, 0,
5098             NULL, HFILL}},
5099         {&hf_amqp_header_basic_timestamp, {
5100             "Timestamp", "amqp.method.properties.timestamp",
5101             FT_UINT64, BASE_DEC, NULL, 0,
5102             NULL, HFILL}},
5103         {&hf_amqp_header_basic_type, {
5104             "Type", "amqp.method.properties.type",
5105             FT_STRING, BASE_NONE, NULL, 0,
5106             NULL, HFILL}},
5107         {&hf_amqp_header_basic_user_id, {
5108             "User-Id", "amqp.method.properties.user_id",
5109             FT_STRING, BASE_NONE, NULL, 0,
5110             NULL, HFILL}},
5111         {&hf_amqp_header_basic_app_id, {
5112             "App-Id", "amqp.method.properties.app_id",
5113             FT_STRING, BASE_NONE, NULL, 0,
5114             NULL, HFILL}},
5115         {&hf_amqp_header_basic_cluster_id, {
5116             "Cluster-Id", "amqp.method.properties.cluster_id",
5117             FT_STRING, BASE_NONE, NULL, 0,
5118             NULL, HFILL}},
5119         {&hf_amqp_header_file_content_type, {
5120             "Content-Type", "amqp.method.properties.content_type",
5121             FT_STRING, BASE_NONE, NULL, 0,
5122             NULL, HFILL}},
5123         {&hf_amqp_header_file_content_encoding, {
5124             "Content-Encoding", "amqp.method.properties.content_encoding",
5125             FT_STRING, BASE_NONE, NULL, 0,
5126             NULL, HFILL}},
5127         {&hf_amqp_header_file_headers, {
5128             "Headers", "amqp.method.properties.headers",
5129             FT_NONE, BASE_NONE, NULL, 0,
5130             NULL, HFILL}},
5131         {&hf_amqp_header_file_priority, {
5132             "Priority", "amqp.method.properties.priority",
5133             FT_UINT8, BASE_DEC, NULL, 0,
5134             NULL, HFILL}},
5135         {&hf_amqp_header_file_reply_to, {
5136             "Reply-To", "amqp.method.properties.reply_to",
5137             FT_STRING, BASE_NONE, NULL, 0,
5138             NULL, HFILL}},
5139         {&hf_amqp_header_file_message_id, {
5140             "Message-Id", "amqp.method.properties.message_id",
5141             FT_STRING, BASE_NONE, NULL, 0,
5142             NULL, HFILL}},
5143         {&hf_amqp_header_file_filename, {
5144             "Filename", "amqp.method.properties.filename",
5145             FT_STRING, BASE_NONE, NULL, 0,
5146             NULL, HFILL}},
5147         {&hf_amqp_header_file_timestamp, {
5148             "Timestamp", "amqp.method.properties.timestamp",
5149             FT_UINT64, BASE_DEC, NULL, 0,
5150             NULL, HFILL}},
5151         {&hf_amqp_header_file_cluster_id, {
5152             "Cluster-Id", "amqp.method.properties.cluster_id",
5153             FT_STRING, BASE_NONE, NULL, 0,
5154             NULL, HFILL}},
5155         {&hf_amqp_header_stream_content_type, {
5156             "Content-Type", "amqp.method.properties.content_type",
5157             FT_STRING, BASE_NONE, NULL, 0,
5158             NULL, HFILL}},
5159         {&hf_amqp_header_stream_content_encoding, {
5160             "Content-Encoding", "amqp.method.properties.content_encoding",
5161             FT_STRING, BASE_NONE, NULL, 0,
5162             NULL, HFILL}},
5163         {&hf_amqp_header_stream_headers, {
5164             "Headers", "amqp.method.properties.headers",
5165             FT_NONE, BASE_NONE, NULL, 0,
5166             NULL, HFILL}},
5167         {&hf_amqp_header_stream_priority, {
5168             "Priority", "amqp.method.properties.priority",
5169             FT_UINT8, BASE_DEC, NULL, 0,
5170             NULL, HFILL}},
5171         {&hf_amqp_header_stream_timestamp, {
5172             "Timestamp", "amqp.method.properties.timestamp",
5173             FT_UINT64, BASE_DEC, NULL, 0,
5174             NULL, HFILL}},
5175         {&hf_amqp_header_tunnel_headers, {
5176             "Headers", "amqp.method.properties.headers",
5177             FT_NONE, BASE_NONE, NULL, 0,
5178             NULL, HFILL}},
5179         {&hf_amqp_header_tunnel_proxy_name, {
5180             "Proxy-Name", "amqp.method.properties.proxy_name",
5181             FT_STRING, BASE_NONE, NULL, 0,
5182             NULL, HFILL}},
5183         {&hf_amqp_header_tunnel_data_name, {
5184             "Data-Name", "amqp.method.properties.data_name",
5185             FT_STRING, BASE_NONE, NULL, 0,
5186             NULL, HFILL}},
5187         {&hf_amqp_header_tunnel_durable, {
5188             "Durable", "amqp.method.properties.durable",
5189             FT_UINT8, BASE_DEC, NULL, 0,
5190             NULL, HFILL}},
5191         {&hf_amqp_header_tunnel_broadcast, {
5192             "Broadcast", "amqp.method.properties.broadcast",
5193             FT_UINT8, BASE_DEC, NULL, 0,
5194             NULL, HFILL}},
5195         {&hf_amqp_payload, {
5196             "Payload", "amqp.payload",
5197             FT_BYTES, BASE_NONE, NULL, 0,
5198             "Message payload", HFILL}},
5199         {&hf_amqp_init_protocol, {
5200             "Protocol", "amqp.init.protocol",
5201             FT_STRING, BASE_NONE, NULL, 0,
5202             "Protocol name", HFILL}},
5203         {&hf_amqp_init_id_major, {
5204             "Protocol ID Major", "amqp.init.id_major",
5205             FT_UINT8, BASE_DEC, NULL, 0,
5206             NULL, HFILL}},
5207         {&hf_amqp_init_id_minor, {
5208             "Protocol ID Minor", "amqp.init.id_minor",
5209             FT_UINT8, BASE_DEC, NULL, 0,
5210             NULL, HFILL}},
5211         {&hf_amqp_init_version_major, {
5212             "Version Major", "amqp.init.version_major",
5213             FT_UINT8, BASE_DEC, NULL, 0,
5214             "Protocol version major", HFILL}},
5215         {&hf_amqp_init_version_minor, {
5216             "Version Minor", "amqp.init.version_minor",
5217             FT_UINT8, BASE_DEC, NULL, 0,
5218             "Protocol version minor", HFILL}}
5219     };
5220
5221     /*  Setup of protocol subtree array  */
5222
5223     static gint *ett [] = {
5224          &ett_amqp,
5225          &ett_args,
5226          &ett_props,
5227          &ett_field_table,
5228          &ett_amqp_init
5229     };
5230
5231     proto_amqp = proto_register_protocol(
5232         "Advanced Message Queueing Protocol", "AMQP", "amqp");
5233     proto_register_field_array(proto_amqp, hf, array_length(hf));
5234     proto_register_subtree_array(ett, array_length(ett));
5235 }
5236
5237 void
5238 proto_reg_handoff_amqp(void)
5239 {
5240     dissector_add("tcp.port", amqp_port,
5241         create_dissector_handle(dissect_amqp, proto_amqp));
5242 }