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