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