/src/wireshark/epan/dissectors/packet-amqp.c
Line | Count | Source (jump to first uncovered line) |
1 | | /* packet-amqp.c |
2 | | * |
3 | | * AMQP 0-9, 0-9-1, 0-10 and AMQP 1.0 Wireshark dissector |
4 | | * |
5 | | * Author: Martin Sustrik <sustrik@imatix.com> (AMQP 0-9) |
6 | | * Author: Steve Huston <shuston@riverace.com> (extended for AMQP 0-10) |
7 | | * Author: Pavel Moravec <pmoravec@redhat.com> (extended for AMQP 1.0) |
8 | | * |
9 | | * Copyright (c) 1996-2007 iMatix Corporation |
10 | | * |
11 | | * Wireshark - Network traffic analyzer |
12 | | * By Gerald Combs <gerald@wireshark.org> |
13 | | * Copyright 1998 Gerald Combs |
14 | | * |
15 | | * SPDX-License-Identifier: GPL-2.0-or-later |
16 | | */ |
17 | | |
18 | | /* |
19 | | * See |
20 | | * http://www.amqp.org/resources/download |
21 | | * http://www.rabbitmq.com/protocol.html |
22 | | * |
23 | | * for specifications for various versions of the AMQP protocol. |
24 | | */ |
25 | | |
26 | | #include "config.h" |
27 | | |
28 | | #include <math.h> |
29 | | |
30 | | #include <epan/packet.h> |
31 | | #include <epan/expert.h> |
32 | | #include <epan/prefs.h> |
33 | | #include <epan/decode_as.h> |
34 | | #include <epan/to_str.h> |
35 | | #include <epan/proto_data.h> |
36 | | #include <epan/tfs.h> |
37 | | #include <wsutil/str_util.h> |
38 | | #include <epan/uat.h> |
39 | | #include "packet-tcp.h" |
40 | | #include "packet-tls.h" |
41 | | |
42 | | |
43 | | void proto_register_amqp(void); |
44 | | void proto_reg_handoff_amqp(void); |
45 | | /* Generic data */ |
46 | | |
47 | 14 | #define AMQP_PORT 5672 |
48 | | static unsigned amqps_port = 5671; /* AMQP over SSL/TLS */ |
49 | | |
50 | | /* |
51 | | * This dissector handles AMQP 0-9, 0-10 and 1.0. The conversation structure |
52 | | * contains the version being run - it's only really reliably detected at |
53 | | * protocol init. If this dissector starts in the middle of a conversation |
54 | | * it will try to figure it out, but conversation start is the best. |
55 | | */ |
56 | | |
57 | | /* #define AMQP_V0_8 1 */ |
58 | 14 | #define AMQP_V0_9 2 |
59 | | /* #define AMQP_V0_91 3 */ |
60 | 80 | #define AMQP_V0_10 4 |
61 | 27 | #define AMQP_V1_0 5 |
62 | | typedef struct { |
63 | | uint8_t version; |
64 | | wmem_map_t *channels; /* maps channel_num to amqp_channel_t */ |
65 | | } amqp_conv; |
66 | | |
67 | | static dissector_table_t version_table; |
68 | | static dissector_table_t media_type_subdissector_table; |
69 | | |
70 | | struct amqp_delivery; |
71 | | typedef struct amqp_delivery amqp_delivery; |
72 | | |
73 | | struct amqp_delivery { |
74 | | uint64_t delivery_tag; /* message number or delivery tag */ |
75 | | uint32_t msg_framenum; /* basic.publish or basic.deliver frame */ |
76 | | uint32_t ack_framenum; /* basic.ack or basic.nack frame */ |
77 | | amqp_delivery *prev; |
78 | | }; |
79 | | |
80 | | typedef struct { |
81 | | char *type; /* content type */ |
82 | | char *encoding; /* content encoding. Not used in subdissector now */ |
83 | | } amqp_content_params; |
84 | | |
85 | | typedef struct _amqp_channel_t { |
86 | | amqp_conv *conn; |
87 | | bool confirms; /* true if publisher confirms are enabled */ |
88 | | uint16_t channel_num; /* channel number */ |
89 | | uint64_t publish_count; /* number of messages published so far */ |
90 | | amqp_delivery *last_delivery1; /* list of unacked messages on tcp flow1 */ |
91 | | amqp_delivery *last_delivery2; /* list of unacked messages on tcp flow2 */ |
92 | | amqp_content_params *content_params; /* parameters of content */ |
93 | | } amqp_channel_t; |
94 | | |
95 | | typedef struct _amqp_message_decode_t { |
96 | | uint32_t match_criteria; |
97 | | char *topic_pattern; |
98 | | GRegex *topic_regex; |
99 | | char *payload_proto_name; |
100 | | dissector_handle_t payload_proto; |
101 | | char *topic_more_info; |
102 | | } amqp_message_decode_t; |
103 | | |
104 | 0 | #define MATCH_CRITERIA_EQUAL 0 |
105 | 0 | #define MATCH_CRITERIA_CONTAINS 1 |
106 | 0 | #define MATCH_CRITERIA_STARTS_WITH 2 |
107 | 0 | #define MATCH_CRITERIA_ENDS_WITH 3 |
108 | 0 | #define MATCH_CRITERIA_REGEX 4 |
109 | | |
110 | | static const value_string match_criteria[] = { |
111 | | { MATCH_CRITERIA_EQUAL, "Equal to" }, |
112 | | { MATCH_CRITERIA_CONTAINS, "Contains" }, |
113 | | { MATCH_CRITERIA_STARTS_WITH, "Starts with" }, |
114 | | { MATCH_CRITERIA_ENDS_WITH, "Ends with" }, |
115 | | { MATCH_CRITERIA_REGEX, "Regular Expression" }, |
116 | | { 0, NULL } |
117 | | }; |
118 | | |
119 | | #define MAX_BUFFER 256 |
120 | | |
121 | | /* 0-9 and 0-9-1 defines */ |
122 | | |
123 | 0 | #define AMQP_0_9_FRAME_TYPE_METHOD 1 |
124 | 0 | #define AMQP_0_9_FRAME_TYPE_CONTENT_HEADER 2 |
125 | 0 | #define AMQP_0_9_FRAME_TYPE_CONTENT_BODY 3 |
126 | | #define AMQP_0_9_FRAME_TYPE_OOB_METHOD 4 |
127 | | #define AMQP_0_9_FRAME_TYPE_OOB_CONTENT_HEADER 5 |
128 | | #define AMQP_0_9_FRAME_TYPE_OOB_CONTENT_BODY 6 |
129 | | #define AMQP_0_9_FRAME_TYPE_TRACE 7 |
130 | 0 | #define AMQP_0_9_FRAME_TYPE_HEARTBEAT 8 |
131 | | |
132 | 0 | #define AMQP_0_9_CLASS_CONNECTION 10 |
133 | 0 | #define AMQP_0_9_CLASS_CHANNEL 20 |
134 | 0 | #define AMQP_0_9_CLASS_ACCESS 30 |
135 | 0 | #define AMQP_0_9_CLASS_EXCHANGE 40 |
136 | 0 | #define AMQP_0_9_CLASS_QUEUE 50 |
137 | 0 | #define AMQP_0_9_CLASS_BASIC 60 |
138 | 0 | #define AMQP_0_9_CLASS_FILE 70 |
139 | 0 | #define AMQP_0_9_CLASS_STREAM 80 |
140 | 0 | #define AMQP_0_9_CLASS_TX 90 |
141 | 0 | #define AMQP_0_9_CLASS_DTX 100 |
142 | 0 | #define AMQP_0_9_CLASS_TUNNEL 110 |
143 | 0 | #define AMQP_0_9_CLASS_CONFIRM 85 |
144 | | |
145 | 0 | #define AMQP_0_9_METHOD_CONNECTION_START 10 |
146 | 0 | #define AMQP_0_9_METHOD_CONNECTION_START_OK 11 |
147 | 0 | #define AMQP_0_9_METHOD_CONNECTION_SECURE 20 |
148 | 0 | #define AMQP_0_9_METHOD_CONNECTION_SECURE_OK 21 |
149 | 0 | #define AMQP_0_9_METHOD_CONNECTION_TUNE 30 |
150 | 0 | #define AMQP_0_9_METHOD_CONNECTION_TUNE_OK 31 |
151 | 0 | #define AMQP_0_9_METHOD_CONNECTION_OPEN 40 |
152 | 0 | #define AMQP_0_9_METHOD_CONNECTION_OPEN_OK 41 |
153 | 0 | #define AMQP_0_9_METHOD_CONNECTION_REDIRECT 42 |
154 | 0 | #define AMQP_0_9_METHOD_CONNECTION_CLOSE 50 |
155 | 0 | #define AMQP_0_9_METHOD_CONNECTION_CLOSE_OK 51 |
156 | 0 | #define AMQP_0_9_METHOD_CONNECTION_BLOCKED 60 |
157 | 0 | #define AMQP_0_9_METHOD_CONNECTION_UNBLOCKED 61 |
158 | | |
159 | 0 | #define AMQP_0_9_METHOD_CHANNEL_OPEN 10 |
160 | 0 | #define AMQP_0_9_METHOD_CHANNEL_OPEN_OK 11 |
161 | 0 | #define AMQP_0_9_METHOD_CHANNEL_FLOW 20 |
162 | 0 | #define AMQP_0_9_METHOD_CHANNEL_FLOW_OK 21 |
163 | 0 | #define AMQP_0_9_METHOD_CHANNEL_CLOSE 40 |
164 | 0 | #define AMQP_0_9_METHOD_CHANNEL_CLOSE_OK 41 |
165 | 0 | #define AMQP_0_9_METHOD_CHANNEL_RESUME 50 |
166 | 0 | #define AMQP_0_9_METHOD_CHANNEL_PING 60 |
167 | 0 | #define AMQP_0_9_METHOD_CHANNEL_PONG 70 |
168 | 0 | #define AMQP_0_9_METHOD_CHANNEL_OK 80 |
169 | | |
170 | 0 | #define AMQP_0_9_METHOD_ACCESS_REQUEST 10 |
171 | 0 | #define AMQP_0_9_METHOD_ACCESS_REQUEST_OK 11 |
172 | | |
173 | 0 | #define AMQP_0_9_METHOD_EXCHANGE_DECLARE 10 |
174 | 0 | #define AMQP_0_9_METHOD_EXCHANGE_DECLARE_OK 11 |
175 | 0 | #define AMQP_0_9_METHOD_EXCHANGE_DELETE 20 |
176 | 0 | #define AMQP_0_9_METHOD_EXCHANGE_DELETE_OK 21 |
177 | 0 | #define AMQP_0_9_METHOD_EXCHANGE_BIND 30 |
178 | 0 | #define AMQP_0_9_METHOD_EXCHANGE_BIND_OK 31 |
179 | 0 | #define AMQP_0_9_METHOD_EXCHANGE_UNBIND 40 |
180 | 0 | #define AMQP_0_9_METHOD_EXCHANGE_UNBIND_OK 51 |
181 | | |
182 | 0 | #define AMQP_0_9_METHOD_QUEUE_DECLARE 10 |
183 | 0 | #define AMQP_0_9_METHOD_QUEUE_DECLARE_OK 11 |
184 | 0 | #define AMQP_0_9_METHOD_QUEUE_BIND 20 |
185 | 0 | #define AMQP_0_9_METHOD_QUEUE_BIND_OK 21 |
186 | 0 | #define AMQP_0_9_METHOD_QUEUE_UNBIND 50 |
187 | 0 | #define AMQP_0_9_METHOD_QUEUE_UNBIND_OK 51 |
188 | 0 | #define AMQP_0_9_METHOD_QUEUE_PURGE 30 |
189 | 0 | #define AMQP_0_9_METHOD_QUEUE_PURGE_OK 31 |
190 | 0 | #define AMQP_0_9_METHOD_QUEUE_DELETE 40 |
191 | 0 | #define AMQP_0_9_METHOD_QUEUE_DELETE_OK 41 |
192 | | |
193 | 0 | #define AMQP_0_9_METHOD_BASIC_QOS 10 |
194 | 0 | #define AMQP_0_9_METHOD_BASIC_QOS_OK 11 |
195 | 0 | #define AMQP_0_9_METHOD_BASIC_CONSUME 20 |
196 | 0 | #define AMQP_0_9_METHOD_BASIC_CONSUME_OK 21 |
197 | 0 | #define AMQP_0_9_METHOD_BASIC_CANCEL 30 |
198 | 0 | #define AMQP_0_9_METHOD_BASIC_CANCEL_OK 31 |
199 | 0 | #define AMQP_0_9_METHOD_BASIC_PUBLISH 40 |
200 | 0 | #define AMQP_0_9_METHOD_BASIC_RETURN 50 |
201 | 0 | #define AMQP_0_9_METHOD_BASIC_DELIVER 60 |
202 | 0 | #define AMQP_0_9_METHOD_BASIC_GET 70 |
203 | 0 | #define AMQP_0_9_METHOD_BASIC_GET_OK 71 |
204 | 0 | #define AMQP_0_9_METHOD_BASIC_GET_EMPTY 72 |
205 | 0 | #define AMQP_0_9_METHOD_BASIC_ACK 80 |
206 | 0 | #define AMQP_0_9_METHOD_BASIC_REJECT 90 |
207 | | /* basic(100) is in 0-9 called Recover and in 0-9-1 Recover.Async, |
208 | | * we will use the more recent 0-9-1 terminology */ |
209 | 0 | #define AMQP_0_9_METHOD_BASIC_RECOVER_ASYNC 100 |
210 | 0 | #define AMQP_0_9_METHOD_BASIC_RECOVER 110 |
211 | 0 | #define AMQP_0_9_METHOD_BASIC_RECOVER_OK 111 |
212 | 0 | #define AMQP_0_9_METHOD_BASIC_NACK 120 |
213 | | |
214 | 0 | #define AMQP_0_9_METHOD_FILE_QOS 10 |
215 | 0 | #define AMQP_0_9_METHOD_FILE_QOS_OK 11 |
216 | 0 | #define AMQP_0_9_METHOD_FILE_CONSUME 20 |
217 | 0 | #define AMQP_0_9_METHOD_FILE_CONSUME_OK 21 |
218 | 0 | #define AMQP_0_9_METHOD_FILE_CANCEL 30 |
219 | 0 | #define AMQP_0_9_METHOD_FILE_CANCEL_OK 31 |
220 | 0 | #define AMQP_0_9_METHOD_FILE_OPEN 40 |
221 | 0 | #define AMQP_0_9_METHOD_FILE_OPEN_OK 41 |
222 | 0 | #define AMQP_0_9_METHOD_FILE_STAGE 50 |
223 | 0 | #define AMQP_0_9_METHOD_FILE_PUBLISH 60 |
224 | 0 | #define AMQP_0_9_METHOD_FILE_RETURN 70 |
225 | 0 | #define AMQP_0_9_METHOD_FILE_DELIVER 80 |
226 | 0 | #define AMQP_0_9_METHOD_FILE_ACK 90 |
227 | 0 | #define AMQP_0_9_METHOD_FILE_REJECT 100 |
228 | | |
229 | 0 | #define AMQP_0_9_METHOD_STREAM_QOS 10 |
230 | 0 | #define AMQP_0_9_METHOD_STREAM_QOS_OK 11 |
231 | 0 | #define AMQP_0_9_METHOD_STREAM_CONSUME 20 |
232 | 0 | #define AMQP_0_9_METHOD_STREAM_CONSUME_OK 21 |
233 | 0 | #define AMQP_0_9_METHOD_STREAM_CANCEL 30 |
234 | 0 | #define AMQP_0_9_METHOD_STREAM_CANCEL_OK 31 |
235 | 0 | #define AMQP_0_9_METHOD_STREAM_PUBLISH 40 |
236 | 0 | #define AMQP_0_9_METHOD_STREAM_RETURN 50 |
237 | 0 | #define AMQP_0_9_METHOD_STREAM_DELIVER 60 |
238 | | |
239 | 0 | #define AMQP_0_9_METHOD_TX_SELECT 10 |
240 | 0 | #define AMQP_0_9_METHOD_TX_SELECT_OK 11 |
241 | 0 | #define AMQP_0_9_METHOD_TX_COMMIT 20 |
242 | 0 | #define AMQP_0_9_METHOD_TX_COMMIT_OK 21 |
243 | 0 | #define AMQP_0_9_METHOD_TX_ROLLBACK 30 |
244 | 0 | #define AMQP_0_9_METHOD_TX_ROLLBACK_OK 31 |
245 | | |
246 | 0 | #define AMQP_0_9_METHOD_DTX_SELECT 10 |
247 | 0 | #define AMQP_0_9_METHOD_DTX_SELECT_OK 11 |
248 | 0 | #define AMQP_0_9_METHOD_DTX_START 20 |
249 | 0 | #define AMQP_0_9_METHOD_DTX_START_OK 21 |
250 | | |
251 | 0 | #define AMQP_0_9_METHOD_TUNNEL_REQUEST 10 |
252 | | |
253 | 0 | #define AMQP_0_9_METHOD_CONFIRM_SELECT 10 |
254 | 0 | #define AMQP_0_9_METHOD_CONFIRM_SELECT_OK 11 |
255 | | |
256 | | /* AMQP 1.0 values */ |
257 | | |
258 | 1 | #define AMQP_1_0_AMQP_FRAME 0 |
259 | 1 | #define AMQP_1_0_SASL_FRAME 1 |
260 | 0 | #define AMQP_1_0_TLS_FRAME 2 |
261 | | |
262 | 0 | #define AMQP_1_0_AMQP_OPEN 0x10 |
263 | 0 | #define AMQP_1_0_AMQP_BEGIN 0x11 |
264 | 0 | #define AMQP_1_0_AMQP_ATTACH 0x12 |
265 | 0 | #define AMQP_1_0_AMQP_FLOW 0x13 |
266 | 0 | #define AMQP_1_0_AMQP_TRANSFER 0x14 |
267 | 0 | #define AMQP_1_0_AMQP_DISPOSITION 0x15 |
268 | 0 | #define AMQP_1_0_AMQP_DETACH 0x16 |
269 | 0 | #define AMQP_1_0_AMQP_END 0x17 |
270 | 0 | #define AMQP_1_0_AMQP_CLOSE 0x18 |
271 | | |
272 | 0 | #define AMQP_1_0_SASL_MECHANISMS 0x40 |
273 | 0 | #define AMQP_1_0_SASL_INIT 0x41 |
274 | 0 | #define AMQP_1_0_SASL_CHALLENGE 0x42 |
275 | 0 | #define AMQP_1_0_SASL_RESPONSE 0x43 |
276 | 0 | #define AMQP_1_0_SASL_OUTCOME 0x44 |
277 | | |
278 | | #define AMQP_1_0_AMQP_TYPE_ERROR 0x1d |
279 | | #define AMQP_1_0_AMQP_TYPE_HEADER 0x70 |
280 | | #define AMQP_1_0_AMQP_TYPE_DELIVERY_ANNOTATIONS 0x71 |
281 | | #define AMQP_1_0_AMQP_TYPE_MESSAGE_ANNOTATIONS 0x72 |
282 | | #define AMQP_1_0_AMQP_TYPE_PROPERTIES 0x73 |
283 | | #define AMQP_1_0_AMQP_TYPE_APPLICATION_PROPERTIES 0x74 |
284 | | #define AMQP_1_0_AMQP_TYPE_DATA 0x75 |
285 | | #define AMQP_1_0_AMQP_TYPE_AMQP_SEQUENCE 0x76 |
286 | | #define AMQP_1_0_AMQP_TYPE_AMQP_VALUE 0x77 |
287 | | #define AMQP_1_0_AMQP_TYPE_FOOTER 0x78 |
288 | | #define AMQP_1_0_AMQP_TYPE_RECEIVED 0x23 |
289 | | #define AMQP_1_0_AMQP_TYPE_ACCEPTED 0x24 |
290 | | #define AMQP_1_0_AMQP_TYPE_REJECTED 0x25 |
291 | | #define AMQP_1_0_AMQP_TYPE_RELEASED 0x26 |
292 | | #define AMQP_1_0_AMQP_TYPE_MODIFIED 0x27 |
293 | | #define AMQP_1_0_AMQP_TYPE_SOURCE 0x28 |
294 | | #define AMQP_1_0_AMQP_TYPE_TARGET 0x29 |
295 | | #define AMQP_1_0_AMQP_TYPE_DELETE_ON_CLOSE 0x2b |
296 | | #define AMQP_1_0_AMQP_TYPE_DELETE_ON_NO_LINKS 0x2c |
297 | | #define AMQP_1_0_AMQP_TYPE_DELETE_ON_NO_MESSAGE 0x2d |
298 | | #define AMQP_1_0_AMQP_TYPE_DELETE_ON_NO_LINKS_OR_MESSAGE 0x2e |
299 | | #define AMQP_1_0_AMQP_TYPE_COORDINATOR 0x30 |
300 | | #define AMQP_1_0_AMQP_TYPE_DECLARE 0x31 |
301 | | #define AMQP_1_0_AMQP_TYPE_DISCHARGE 0x32 |
302 | | #define AMQP_1_0_AMQP_TYPE_DECLARED 0x33 |
303 | | #define AMQP_1_0_AMQP_TYPE_TRANSACTIONAL_STATE 0x34 |
304 | | |
305 | 0 | #define AMQP_1_0_TYPE_DESCRIPTOR_CONSTRUCTOR 0x00 |
306 | | |
307 | 0 | #define AMQP_1_0_TYPE_NULL 0x40 |
308 | 0 | #define AMQP_1_0_TYPE_LIST0 0x45 |
309 | 0 | #define AMQP_1_0_TYPE_LIST8 0xc0 |
310 | 0 | #define AMQP_1_0_TYPE_LIST32 0xd0 |
311 | 0 | #define AMQP_1_0_TYPE_MAP8 0xc1 |
312 | 0 | #define AMQP_1_0_TYPE_MAP32 0xd1 |
313 | 0 | #define AMQP_1_0_TYPE_ARRAY8 0xe0 |
314 | 0 | #define AMQP_1_0_TYPE_ARRAY32 0xf0 |
315 | | |
316 | | /* AMQP 0-10 values */ |
317 | | |
318 | 82 | #define AMQP_0_10_FRAME_CONTROL 0 |
319 | 44 | #define AMQP_0_10_FRAME_COMMAND 1 |
320 | 1 | #define AMQP_0_10_FRAME_HEADER 2 |
321 | 1 | #define AMQP_0_10_FRAME_BODY 3 |
322 | | |
323 | 0 | #define AMQP_0_10_TYPE_STR16 0x95 |
324 | 0 | #define AMQP_0_10_TYPE_MAP 0xa8 |
325 | 0 | #define AMQP_0_10_TYPE_LIST 0xa9 |
326 | 3 | #define AMQP_0_10_TYPE_ARRAY 0xaa |
327 | 0 | #define AMQP_0_10_TYPE_STRUCT32 0xab |
328 | | |
329 | 71 | #define AMQP_0_10_CLASS_CONNECTION 0x01 |
330 | 66 | #define AMQP_0_10_METHOD_CONNECTION_START 0x01 |
331 | 2 | #define AMQP_0_10_METHOD_CONNECTION_START_OK 0x02 |
332 | 0 | #define AMQP_0_10_METHOD_CONNECTION_SECURE 0x03 |
333 | 1 | #define AMQP_0_10_METHOD_CONNECTION_SECURE_OK 0x04 |
334 | 0 | #define AMQP_0_10_METHOD_CONNECTION_TUNE 0x05 |
335 | 0 | #define AMQP_0_10_METHOD_CONNECTION_TUNE_OK 0x06 |
336 | 0 | #define AMQP_0_10_METHOD_CONNECTION_OPEN 0x07 |
337 | 0 | #define AMQP_0_10_METHOD_CONNECTION_OPEN_OK 0x08 |
338 | 1 | #define AMQP_0_10_METHOD_CONNECTION_REDIRECT 0x09 |
339 | 0 | #define AMQP_0_10_METHOD_CONNECTION_HEARTBEAT 0x0a |
340 | 0 | #define AMQP_0_10_METHOD_CONNECTION_CLOSE 0x0b |
341 | 0 | #define AMQP_0_10_METHOD_CONNECTION_CLOSE_OK 0x0c |
342 | | |
343 | 1 | #define AMQP_0_10_CLASS_SESSION 0x02 |
344 | 0 | #define AMQP_0_10_METHOD_SESSION_ATTACH 0x01 |
345 | 1 | #define AMQP_0_10_METHOD_SESSION_ATTACHED 0x02 |
346 | 1 | #define AMQP_0_10_METHOD_SESSION_DETACH 0x03 |
347 | 0 | #define AMQP_0_10_METHOD_SESSION_DETACHED 0x04 |
348 | 0 | #define AMQP_0_10_METHOD_SESSION_REQUEST_TIMEOUT 0x05 |
349 | 0 | #define AMQP_0_10_METHOD_SESSION_TIMEOUT 0x06 |
350 | 0 | #define AMQP_0_10_METHOD_SESSION_COMMAND_POINT 0x07 |
351 | 0 | #define AMQP_0_10_METHOD_SESSION_EXPECTED 0x08 |
352 | 0 | #define AMQP_0_10_METHOD_SESSION_CONFIRMED 0x09 |
353 | 0 | #define AMQP_0_10_METHOD_SESSION_COMPLETED 0x0a |
354 | 0 | #define AMQP_0_10_METHOD_SESSION_KNOWN_COMPLETED 0x0b |
355 | 0 | #define AMQP_0_10_METHOD_SESSION_FLUSH 0x0c |
356 | 0 | #define AMQP_0_10_METHOD_SESSION_GAP 0x0d |
357 | | |
358 | 0 | #define AMQP_0_10_CLASS_EXECUTION 0x03 |
359 | 0 | #define AMQP_0_10_METHOD_EXECUTION_SYNC 0x01 |
360 | 0 | #define AMQP_0_10_METHOD_EXECUTION_RESULT 0x02 |
361 | 0 | #define AMQP_0_10_METHOD_EXECUTION_EXCEPTION 0x03 |
362 | | |
363 | 2 | #define AMQP_0_10_CLASS_MESSAGE 0x04 |
364 | 0 | #define AMQP_0_10_STRUCT_MESSAGE_DELIVERY_PROPERTIES 0x01 |
365 | 0 | #define AMQP_0_10_STRUCT_MESSAGE_FRAGMENT_PROPERTIES 0x02 |
366 | 0 | #define AMQP_0_10_STRUCT_MESSAGE_MESSAGE_PROPERTIES 0x03 |
367 | 0 | #define AMQP_0_10_STRUCT_MESSAGE_ACQUIRED 0x04 |
368 | 0 | #define AMQP_0_10_STRUCT_MESSAGE_RESUME_RESULT 0x05 |
369 | 0 | #define AMQP_0_10_METHOD_MESSAGE_TRANSFER 0x01 |
370 | 0 | #define AMQP_0_10_METHOD_MESSAGE_ACCEPT 0x02 |
371 | 0 | #define AMQP_0_10_METHOD_MESSAGE_REJECT 0x03 |
372 | 1 | #define AMQP_0_10_METHOD_MESSAGE_RELEASE 0x04 |
373 | 0 | #define AMQP_0_10_METHOD_MESSAGE_ACQUIRE 0x05 |
374 | 0 | #define AMQP_0_10_METHOD_MESSAGE_RESUME 0x06 |
375 | 1 | #define AMQP_0_10_METHOD_MESSAGE_SUBSCRIBE 0x07 |
376 | 0 | #define AMQP_0_10_METHOD_MESSAGE_CANCEL 0x08 |
377 | 0 | #define AMQP_0_10_METHOD_MESSAGE_SET_FLOW_MODE 0x09 |
378 | 0 | #define AMQP_0_10_METHOD_MESSAGE_FLOW 0x0a |
379 | 0 | #define AMQP_0_10_METHOD_MESSAGE_FLUSH 0x0b |
380 | 0 | #define AMQP_0_10_METHOD_MESSAGE_STOP 0x0c |
381 | | |
382 | 0 | #define AMQP_0_10_CLASS_TX 0x05 |
383 | | #define AMQP_0_10_METHOD_TX_SELECT 0x01 |
384 | | #define AMQP_0_10_METHOD_TX_COMMIT 0x02 |
385 | | #define AMQP_0_10_METHOD_TX_ROLLBACK 0x03 |
386 | | |
387 | 0 | #define AMQP_0_10_CLASS_DTX 0x06 |
388 | 0 | #define AMQP_0_10_STRUCT_DTX_XA_RESULT 0x01 |
389 | 0 | #define AMQP_0_10_STRUCT_DTX_RECOVER_RESULT 0x03 |
390 | 0 | #define AMQP_0_10_METHOD_DTX_SELECT 0x01 |
391 | 0 | #define AMQP_0_10_METHOD_DTX_START 0x02 |
392 | 0 | #define AMQP_0_10_METHOD_DTX_END 0x03 |
393 | 0 | #define AMQP_0_10_METHOD_DTX_COMMIT 0x04 |
394 | 0 | #define AMQP_0_10_METHOD_DTX_FORGET 0x05 |
395 | 0 | #define AMQP_0_10_METHOD_DTX_GET_TIMEOUT 0x06 |
396 | 0 | #define AMQP_0_10_METHOD_DTX_PREPARE 0x07 |
397 | 0 | #define AMQP_0_10_METHOD_DTX_RECOVER 0x08 |
398 | 0 | #define AMQP_0_10_METHOD_DTX_ROLLBACK 0x09 |
399 | 0 | #define AMQP_0_10_METHOD_DTX_SET_TIMEOUT 0x0a |
400 | | |
401 | 0 | #define AMQP_0_10_CLASS_EXCHANGE 0x07 |
402 | 0 | #define AMQP_0_10_STRUCT_EXCHANGE_QUERY_RESULT 0x01 |
403 | 0 | #define AMQP_0_10_STRUCT_EXCHANGE_BOUND_RESULT 0x02 |
404 | 0 | #define AMQP_0_10_METHOD_EXCHANGE_DECLARE 0x01 |
405 | 0 | #define AMQP_0_10_METHOD_EXCHANGE_DELETE 0x02 |
406 | 0 | #define AMQP_0_10_METHOD_EXCHANGE_QUERY 0x03 |
407 | 0 | #define AMQP_0_10_METHOD_EXCHANGE_BIND 0x04 |
408 | 0 | #define AMQP_0_10_METHOD_EXCHANGE_UNBIND 0x05 |
409 | 0 | #define AMQP_0_10_METHOD_EXCHANGE_BOUND 0x06 |
410 | | |
411 | 1 | #define AMQP_0_10_CLASS_QUEUE 0x08 |
412 | 0 | #define AMQP_0_10_STRUCT_QUEUE_QUERY_RESULT 0x01 |
413 | 0 | #define AMQP_0_10_METHOD_QUEUE_DECLARE 0x01 |
414 | 0 | #define AMQP_0_10_METHOD_QUEUE_DELETE 0x02 |
415 | 0 | #define AMQP_0_10_METHOD_QUEUE_PURGE 0x03 |
416 | 0 | #define AMQP_0_10_METHOD_QUEUE_QUERY 0x04 |
417 | | |
418 | 0 | #define AMQP_0_10_CLASS_FILE 0x09 |
419 | 0 | #define AMQP_0_10_STRUCT_FILE_PROPERTIES 0x01 |
420 | 0 | #define AMQP_0_10_METHOD_FILE_QOS 0x01 |
421 | 0 | #define AMQP_0_10_METHOD_FILE_QOS_OK 0x02 |
422 | 0 | #define AMQP_0_10_METHOD_FILE_CONSUME 0x03 |
423 | 0 | #define AMQP_0_10_METHOD_FILE_CONSUME_OK 0x04 |
424 | 0 | #define AMQP_0_10_METHOD_FILE_CANCEL 0x05 |
425 | 0 | #define AMQP_0_10_METHOD_FILE_OPEN 0x06 |
426 | 0 | #define AMQP_0_10_METHOD_FILE_OPEN_OK 0x07 |
427 | 0 | #define AMQP_0_10_METHOD_FILE_STAGE 0x08 |
428 | 0 | #define AMQP_0_10_METHOD_FILE_PUBLISH 0x09 |
429 | 0 | #define AMQP_0_10_METHOD_FILE_RETURN 0x0a |
430 | 0 | #define AMQP_0_10_METHOD_FILE_DELIVER 0x0b |
431 | 0 | #define AMQP_0_10_METHOD_FILE_ACK 0x0c |
432 | 0 | #define AMQP_0_10_METHOD_FILE_REJECT 0x0d |
433 | | |
434 | 0 | #define AMQP_0_10_CLASS_STREAM 0x0a |
435 | 0 | #define AMQP_0_10_STRUCT_STREAM_PROPERTIES 0x01 |
436 | 0 | #define AMQP_0_10_METHOD_STREAM_QOS 0x01 |
437 | 0 | #define AMQP_0_10_METHOD_STREAM_QOS_OK 0x02 |
438 | 0 | #define AMQP_0_10_METHOD_STREAM_CONSUME 0x03 |
439 | 0 | #define AMQP_0_10_METHOD_STREAM_CONSUME_OK 0x04 |
440 | 0 | #define AMQP_0_10_METHOD_STREAM_CANCEL 0x05 |
441 | 0 | #define AMQP_0_10_METHOD_STREAM_PUBLISH 0x06 |
442 | 0 | #define AMQP_0_10_METHOD_STREAM_RETURN 0x07 |
443 | 0 | #define AMQP_0_10_METHOD_STREAM_DELIVER 0x08 |
444 | | |
445 | | /* Private functions */ |
446 | | |
447 | | static unsigned |
448 | | dissect_amqp_0_9_field_value(tvbuff_t *tvb, packet_info *pinfo, int offset, unsigned length, |
449 | | const char *name, proto_tree *field_table_tree); |
450 | | |
451 | | static void |
452 | | dissect_amqp_0_10_struct32(tvbuff_t *tvb, packet_info *pinfo, proto_item *ti); |
453 | | |
454 | | static amqp_channel_t* |
455 | | get_conversation_channel(conversation_t *conv, uint16_t channel_num); |
456 | | |
457 | | static void |
458 | | record_msg_delivery(tvbuff_t *tvb, packet_info *pinfo, uint16_t channel_num, |
459 | | uint64_t delivery_tag); |
460 | | |
461 | | static void |
462 | | record_msg_delivery_c(conversation_t *conv, amqp_channel_t *channel, |
463 | | tvbuff_t *tvb, packet_info *pinfo, uint64_t delivery_tag); |
464 | | |
465 | | static void |
466 | | record_delivery_ack(tvbuff_t *tvb, packet_info *pinfo, uint16_t channel_num, |
467 | | uint64_t delivery_tag, bool multiple); |
468 | | |
469 | | static void |
470 | | record_delivery_ack_c(conversation_t *conv, amqp_channel_t *channel, |
471 | | tvbuff_t *tvb, packet_info *pinfo, uint64_t delivery_tag, bool multiple); |
472 | | |
473 | | static void |
474 | | generate_msg_reference(tvbuff_t *tvb, packet_info *pinfo, proto_tree *prop_tree); |
475 | | |
476 | | static void |
477 | | generate_ack_reference(tvbuff_t *tvb, packet_info *pinfo, proto_tree *prop_tree); |
478 | | |
479 | | /* AMQP 0-10 type decoding information */ |
480 | | |
481 | | typedef int (*type_formatter)(tvbuff_t *tvb, |
482 | | unsigned offset, /* In tvb where data starts */ |
483 | | unsigned length, /* Length of data, if known */ |
484 | | const char **value); /* Receive formatted val */ |
485 | | struct amqp_typeinfo { |
486 | | uint8_t typecode; /* From AMQP 0-10 spec */ |
487 | | const char *amqp_typename; |
488 | | type_formatter formatter; |
489 | | unsigned known_size; |
490 | | }; |
491 | | |
492 | | /* AMQP 1-0 type decoding information */ |
493 | | |
494 | | typedef int (*type_dissector)(tvbuff_t *tvb, |
495 | | packet_info *pinfo, |
496 | | unsigned offset, /* In tvb where data starts */ |
497 | | unsigned length, /* Length of data, if known */ |
498 | | proto_item *item, |
499 | | int hf_amqp_type); |
500 | | |
501 | | struct amqp1_typeinfo { |
502 | | uint8_t typecode; /* From AMQP 0-10 spec */ |
503 | | const char *amqp_typename; |
504 | | const int ftype; |
505 | | unsigned known_size; |
506 | | type_dissector dissector; |
507 | | type_formatter formatter; |
508 | | }; |
509 | | |
510 | | struct amqp_synonym_types_t { |
511 | | const int *hf_none; /* Must be of type FT_NONE */ |
512 | | const int *hf_uint; /* FT_UINT */ |
513 | | const int *hf_str; /* FT_STRING */ |
514 | | const int *hf_bin; /* FT_BYTES */ |
515 | | const int *hf_guid; /* FT_GUID */ |
516 | | }; |
517 | | |
518 | | /* struct for field interpreting format code (i.e. 0x70 for msg.header) to relevant hf_* variable |
519 | | * (here hf_amqp_1_0_messageHeader). If the type is list, next 2 struct items specify how to |
520 | | * interpret list items (in terms of hf_* variable) |
521 | | */ |
522 | | struct amqp_defined_types_t { |
523 | | const int format_code; |
524 | | int *hf_amqp_type; |
525 | | uint32_t hf_amqp_subtype_count; |
526 | | int * const *hf_amqp_subtypes; |
527 | | }; |
528 | | |
529 | | /* functions for decoding 1.0 type and/or value */ |
530 | | |
531 | | |
532 | | static const struct amqp1_typeinfo* decode_fixed_type(uint8_t code); |
533 | | |
534 | | static void |
535 | | get_amqp_1_0_value_formatter(tvbuff_t *tvb, |
536 | | packet_info *pinfo, |
537 | | uint8_t code, |
538 | | int offset, |
539 | | int hf_amqp_type, |
540 | | const char *name, |
541 | | uint32_t hf_amqp_subtype_count, |
542 | | int * const *hf_amqp_subtypes, |
543 | | unsigned *length_size, |
544 | | proto_item *item); |
545 | | |
546 | | static unsigned |
547 | | get_amqp_1_0_type_formatter(tvbuff_t *tvb, |
548 | | int offset, |
549 | | int *hf_amqp_type, |
550 | | const char **name, |
551 | | uint32_t *hf_amqp_subtype_count, |
552 | | int * const **hf_amqp_subtypes, |
553 | | unsigned *length_size); |
554 | | |
555 | | static void |
556 | | get_amqp_1_0_type_value_formatter(tvbuff_t *tvb, |
557 | | packet_info *pinfo, |
558 | | int offset, |
559 | | int hf_amqp_type, |
560 | | const char *name, |
561 | | unsigned *length_size, |
562 | | proto_item *item); |
563 | | |
564 | | /* functions for decoding particular primitive types */ |
565 | | |
566 | | static int |
567 | | dissect_amqp_1_0_fixed(tvbuff_t *tvb, packet_info *pinfo, |
568 | | unsigned offset, unsigned length, |
569 | | proto_item *item, int hf_amqp_type); |
570 | | |
571 | | static int |
572 | | dissect_amqp_1_0_variable(tvbuff_t *tvb, packet_info *pinfo, |
573 | | unsigned offset, unsigned length, |
574 | | proto_item *item, int hf_amqp_type); |
575 | | |
576 | | static int |
577 | | dissect_amqp_1_0_timestamp(tvbuff_t *tvb, packet_info *pinfo _U_, |
578 | | unsigned offset, unsigned length, |
579 | | proto_item *item, int hf_amqp_type); |
580 | | |
581 | | static int |
582 | | dissect_amqp_1_0_skip(tvbuff_t *tvb _U_, packet_info *pinfo _U_, |
583 | | unsigned offset _U_, unsigned length _U_, |
584 | | proto_item *item _U_, int hf_amqp_type _U_); |
585 | | |
586 | | static int |
587 | | dissect_amqp_1_0_zero(tvbuff_t *tvb, packet_info *pinfo, |
588 | | unsigned offset, unsigned length _U_, |
589 | | proto_item *item, int hf_amqp_type); |
590 | | |
591 | | static int |
592 | | dissect_amqp_1_0_true(tvbuff_t *tvb, packet_info *pinfo, |
593 | | unsigned offset, unsigned length _U_, |
594 | | proto_item *item, int hf_amqp_type); |
595 | | |
596 | | static int |
597 | | dissect_amqp_1_0_false(tvbuff_t *tvb, packet_info *pinfo, |
598 | | unsigned offset, unsigned length _U_, |
599 | | proto_item *item, int hf_amqp_type); |
600 | | |
601 | | static int |
602 | | format_amqp_1_0_null(tvbuff_t *tvb _U_, |
603 | | unsigned offset _U_, unsigned length _U_, |
604 | | const char **value); |
605 | | |
606 | | static int |
607 | | format_amqp_1_0_boolean_true(tvbuff_t *tvb, unsigned offset, unsigned length _U_, |
608 | | const char **value); |
609 | | |
610 | | static int |
611 | | format_amqp_1_0_boolean_false(tvbuff_t *tvb, unsigned offset, unsigned length _U_, |
612 | | const char **value); |
613 | | |
614 | | static int |
615 | | format_amqp_1_0_boolean(tvbuff_t *tvb, unsigned offset, unsigned length _U_, |
616 | | const char **value); |
617 | | |
618 | | static int |
619 | | format_amqp_1_0_uint(tvbuff_t *tvb, unsigned offset, unsigned length, |
620 | | const char **value); |
621 | | |
622 | | static int |
623 | | format_amqp_1_0_int(tvbuff_t *tvb, unsigned offset, unsigned length, |
624 | | const char **value); |
625 | | |
626 | | static int |
627 | | format_amqp_1_0_float(tvbuff_t *tvb, unsigned offset, unsigned length _U_, |
628 | | const char **value); |
629 | | |
630 | | static int |
631 | | format_amqp_1_0_double(tvbuff_t *tvb, unsigned offset, unsigned length _U_, |
632 | | const char **value); |
633 | | |
634 | | static int |
635 | | format_amqp_1_0_decimal(tvbuff_t *tvb _U_, unsigned offset _U_, unsigned length, |
636 | | const char **value); |
637 | | |
638 | | static int |
639 | | format_amqp_1_0_char(tvbuff_t *tvb, unsigned offset, unsigned length _U_, |
640 | | const char **value); |
641 | | |
642 | | static int |
643 | | format_amqp_1_0_timestamp(tvbuff_t *tvb, unsigned offset, unsigned length _U_, |
644 | | const char **value); |
645 | | |
646 | | static int |
647 | | format_amqp_1_0_uuid(tvbuff_t *tvb, unsigned offset, unsigned length _U_, |
648 | | const char **value); |
649 | | |
650 | | static int |
651 | | format_amqp_1_0_bin(tvbuff_t *tvb, unsigned offset, unsigned length, |
652 | | const char **value); |
653 | | |
654 | | static int |
655 | | format_amqp_1_0_str(tvbuff_t *tvb, unsigned offset, unsigned length, |
656 | | const char **value); |
657 | | |
658 | | static int |
659 | | format_amqp_1_0_symbol(tvbuff_t *tvb, unsigned offset, unsigned length, |
660 | | const char **value); |
661 | | |
662 | | static bool |
663 | | get_amqp_0_10_type_formatter(uint8_t code, |
664 | | const char **name, |
665 | | type_formatter *decoder, |
666 | | unsigned *length_size); |
667 | | |
668 | | static int |
669 | | format_amqp_0_10_bin(tvbuff_t *tvb, |
670 | | unsigned offset, unsigned length, |
671 | | const char **value); |
672 | | |
673 | | static int |
674 | | format_amqp_0_10_int(tvbuff_t *tvb, |
675 | | unsigned offset, unsigned length, |
676 | | const char **value); |
677 | | |
678 | | static int |
679 | | format_amqp_0_10_uint(tvbuff_t *tvb, |
680 | | unsigned offset, unsigned length, |
681 | | const char **value); |
682 | | |
683 | | static int |
684 | | format_amqp_0_10_char(tvbuff_t *tvb, |
685 | | unsigned offset, unsigned length, |
686 | | const char **value); |
687 | | |
688 | | static int |
689 | | format_amqp_0_10_boolean(tvbuff_t *tvb, |
690 | | unsigned offset, unsigned length, |
691 | | const char **value); |
692 | | |
693 | | static int |
694 | | format_amqp_0_10_vbin(tvbuff_t *tvb, |
695 | | unsigned offset, unsigned length, |
696 | | const char **value); |
697 | | |
698 | | static int |
699 | | format_amqp_0_10_str(tvbuff_t *tvb, |
700 | | unsigned offset, unsigned length, |
701 | | const char **value); |
702 | | |
703 | | static void |
704 | | format_amqp_0_10_sequence_set(tvbuff_t *tvb, unsigned offset, unsigned length, |
705 | | proto_item *item); |
706 | | |
707 | | /* Various handles */ |
708 | | |
709 | | static int proto_amqp; |
710 | | static int proto_amqpv0_9; |
711 | | static int proto_amqpv0_10; |
712 | | static int proto_amqpv1_0; |
713 | | |
714 | | /* 1.0 handles */ |
715 | | |
716 | | static int hf_amqp_1_0_size; |
717 | | static int hf_amqp_1_0_doff; |
718 | | static int hf_amqp_1_0_type; |
719 | | static int hf_amqp_1_0_containerId; |
720 | | static int hf_amqp_1_0_hostname; |
721 | | static int hf_amqp_1_0_maxFrameSize; |
722 | | static int hf_amqp_1_0_channelMax; |
723 | | static int hf_amqp_1_0_idleTimeOut; |
724 | | static int hf_amqp_1_0_outgoingLocales; |
725 | | static int hf_amqp_1_0_incomingLocales; |
726 | | static int hf_amqp_1_0_offeredCapabilities; |
727 | | static int hf_amqp_1_0_desiredCapabilities; |
728 | | static int hf_amqp_1_0_properties; |
729 | | static int hf_amqp_1_0_remoteChannel; |
730 | | static int hf_amqp_1_0_nextOutgoingId; |
731 | | static int hf_amqp_1_0_incomingWindow; |
732 | | static int hf_amqp_1_0_outgoingWindow; |
733 | | static int hf_amqp_1_0_handleMax; |
734 | | static int hf_amqp_1_0_name; |
735 | | static int hf_amqp_1_0_handle; |
736 | | static int hf_amqp_1_0_role; |
737 | | static int hf_amqp_1_0_sndSettleMode; |
738 | | static int hf_amqp_1_0_rcvSettleMode; |
739 | | static int hf_amqp_1_0_source; |
740 | | static int hf_amqp_1_0_target; |
741 | | static int hf_amqp_1_0_deleteOnClose; |
742 | | static int hf_amqp_1_0_deleteOnNoLinks; |
743 | | static int hf_amqp_1_0_deleteOnNoMessages; |
744 | | static int hf_amqp_1_0_deleteOnNoLinksOrMessages; |
745 | | static int hf_amqp_1_0_coordinator; |
746 | | static int hf_amqp_1_0_declare; |
747 | | static int hf_amqp_1_0_globalId; |
748 | | static int hf_amqp_1_0_discharge; |
749 | | static int hf_amqp_1_0_txnId; |
750 | | static int hf_amqp_1_0_fail; |
751 | | static int hf_amqp_1_0_declared; |
752 | | static int hf_amqp_1_0_transactionalState; |
753 | | static int hf_amqp_1_0_outcome; |
754 | | static int hf_amqp_1_0_unsettled; |
755 | | static int hf_amqp_1_0_incompleteUnsettled; |
756 | | static int hf_amqp_1_0_initialDeliveryCount; |
757 | | static int hf_amqp_1_0_maxMessageSize; |
758 | | static int hf_amqp_1_0_nextIncomingId; |
759 | | static int hf_amqp_1_0_deliveryCount; |
760 | | static int hf_amqp_1_0_sectionNumber; |
761 | | static int hf_amqp_1_0_sectionOffset; |
762 | | static int hf_amqp_1_0_deliveryFailed; |
763 | | static int hf_amqp_1_0_undeliverableHere; |
764 | | static int hf_amqp_1_0_linkCredit; |
765 | | static int hf_amqp_1_0_available; |
766 | | static int hf_amqp_1_0_drain; |
767 | | static int hf_amqp_1_0_echo; |
768 | | static int hf_amqp_1_0_deliveryId; |
769 | | static int hf_amqp_1_0_deliveryTag; |
770 | | static int hf_amqp_1_0_messageFormat; |
771 | | static int hf_amqp_1_0_settled; |
772 | | static int hf_amqp_1_0_more; |
773 | | static int hf_amqp_1_0_state; |
774 | | static int hf_amqp_1_0_resume; |
775 | | static int hf_amqp_1_0_aborted; |
776 | | static int hf_amqp_1_0_batchable; |
777 | | static int hf_amqp_1_0_first; |
778 | | static int hf_amqp_1_0_last; |
779 | | static int hf_amqp_1_0_closed; |
780 | | static int hf_amqp_1_0_amqp_performative; |
781 | | static int hf_amqp_1_0_error; |
782 | | static int hf_amqp_1_0_messageHeader; |
783 | | static int hf_amqp_1_0_deliveryAnnotations; |
784 | | static int hf_amqp_1_0_messageAnnotations; |
785 | | static int hf_amqp_1_0_messageProperties; |
786 | | static int hf_amqp_1_0_applicationProperties; |
787 | | static int hf_amqp_1_0_data; |
788 | | static int hf_amqp_1_0_amqp_sequence; |
789 | | static int hf_amqp_1_0_amqp_value; |
790 | | static int hf_amqp_1_0_footer; |
791 | | static int hf_amqp_1_0_received; |
792 | | static int hf_amqp_1_0_accepted; |
793 | | static int hf_amqp_1_0_rejected; |
794 | | static int hf_amqp_1_0_released; |
795 | | static int hf_amqp_1_0_modified; |
796 | | static int hf_amqp_1_0_condition; |
797 | | static int hf_amqp_1_0_description; |
798 | | static int hf_amqp_1_0_info; |
799 | | static int hf_amqp_1_0_address; |
800 | | static int hf_amqp_1_0_durable; |
801 | | static int hf_amqp_1_0_terminusDurable; |
802 | | static int hf_amqp_1_0_priority; |
803 | | static int hf_amqp_1_0_ttl; |
804 | | static int hf_amqp_1_0_firstAcquirer; |
805 | | static int hf_amqp_1_0_expiryPolicy; |
806 | | static int hf_amqp_1_0_timeout; |
807 | | static int hf_amqp_1_0_dynamic; |
808 | | static int hf_amqp_1_0_dynamicNodeProperties; |
809 | | static int hf_amqp_1_0_distributionMode; |
810 | | static int hf_amqp_1_0_filter; |
811 | | static int hf_amqp_1_0_defaultOutcome; |
812 | | static int hf_amqp_1_0_outcomes; |
813 | | static int hf_amqp_1_0_capabilities; |
814 | | static int hf_amqp_1_0_messageId; |
815 | | static int hf_amqp_1_0_userId; |
816 | | static int hf_amqp_1_0_to; |
817 | | static int hf_amqp_1_0_subject; |
818 | | static int hf_amqp_1_0_replyTo; |
819 | | static int hf_amqp_1_0_correlationId; |
820 | | static int hf_amqp_1_0_contentType; |
821 | | static int hf_amqp_1_0_contentEncoding; |
822 | | static int hf_amqp_1_0_absoluteExpiryTime; |
823 | | static int hf_amqp_1_0_creationTime; |
824 | | static int hf_amqp_1_0_groupId; |
825 | | static int hf_amqp_1_0_groupSequence; |
826 | | static int hf_amqp_1_0_replyToGroupId; |
827 | | static int hf_amqp_1_0_sasl_method; |
828 | | static int hf_amqp_1_0_mechanisms; |
829 | | static int hf_amqp_1_0_mechanism; |
830 | | static int hf_amqp_1_0_initResponse; |
831 | | static int hf_amqp_1_0_saslChallenge; |
832 | | static int hf_amqp_1_0_saslResponse; |
833 | | static int hf_amqp_1_0_saslCode; |
834 | | static int hf_amqp_1_0_saslAdditionalData; |
835 | | static int hf_amqp_1_0_list; |
836 | | static int hf_amqp_1_0_map; |
837 | | /* variables for variant sub-types (see amqp_synonym_types) |
838 | | * - fields of type="*" can be of any type |
839 | | * - fields with multiple="true" may contain the type or an array */ |
840 | | static int hf_amqp_1_0_outgoingLocales_sym; |
841 | | static int hf_amqp_1_0_incomingLocales_sym; |
842 | | static int hf_amqp_1_0_offeredCapabilities_sym; |
843 | | static int hf_amqp_1_0_desiredCapabilities_sym; |
844 | | static int hf_amqp_1_0_address_str; |
845 | | static int hf_amqp_1_0_source_str; |
846 | | static int hf_amqp_1_0_target_str; |
847 | | static int hf_amqp_1_0_outcomes_sym; |
848 | | static int hf_amqp_1_0_capabilities_sym; |
849 | | static int hf_amqp_1_0_messageId_uint; |
850 | | static int hf_amqp_1_0_messageId_str; |
851 | | static int hf_amqp_1_0_messageId_bin; |
852 | | static int hf_amqp_1_0_messageId_uuid; |
853 | | static int hf_amqp_1_0_correlationId_uint; |
854 | | static int hf_amqp_1_0_correlationId_str; |
855 | | static int hf_amqp_1_0_correlationId_bin; |
856 | | static int hf_amqp_1_0_correlationId_uuid; |
857 | | static int hf_amqp_1_0_to_str; |
858 | | static int hf_amqp_1_0_replyTo_str; |
859 | | static int hf_amqp_1_0_mechanisms_sym; |
860 | | |
861 | | /* Several field can be of multiple types. To distinguish it among hf_amqp_1_0_* variables, |
862 | | * table below "translates" original hf_amqp_1_0_* variable to the type-specific one. |
863 | | * Each row contains synonym fields for {FT_NONE, FT_UINT, FT_STRING, FT_BYTES, FT_GUID} |
864 | | * NULL indicates no synonym of a given type |
865 | | * FT_NONE field must be always present |
866 | | */ |
867 | | static const struct amqp_synonym_types_t amqp_synonym_types[] = { |
868 | | {&hf_amqp_1_0_outgoingLocales, NULL, &hf_amqp_1_0_outgoingLocales_sym, NULL, NULL}, |
869 | | {&hf_amqp_1_0_incomingLocales, NULL, &hf_amqp_1_0_incomingLocales_sym, NULL, NULL}, |
870 | | {&hf_amqp_1_0_offeredCapabilities, NULL, &hf_amqp_1_0_offeredCapabilities_sym, NULL, NULL}, |
871 | | {&hf_amqp_1_0_desiredCapabilities, NULL, &hf_amqp_1_0_desiredCapabilities_sym, NULL, NULL}, |
872 | | {&hf_amqp_1_0_address, NULL, &hf_amqp_1_0_address_str, NULL, NULL}, |
873 | | {&hf_amqp_1_0_source, NULL, &hf_amqp_1_0_source_str, NULL, NULL}, |
874 | | {&hf_amqp_1_0_target, NULL, &hf_amqp_1_0_target_str, NULL, NULL}, |
875 | | {&hf_amqp_1_0_outcomes, NULL, &hf_amqp_1_0_outcomes_sym, NULL, NULL}, |
876 | | {&hf_amqp_1_0_capabilities, NULL, &hf_amqp_1_0_capabilities_sym, NULL, NULL}, |
877 | | {&hf_amqp_1_0_messageId, &hf_amqp_1_0_messageId_uint, &hf_amqp_1_0_messageId_str, &hf_amqp_1_0_messageId_bin, &hf_amqp_1_0_messageId_uuid}, |
878 | | {&hf_amqp_1_0_messageId, &hf_amqp_1_0_messageId_uint, &hf_amqp_1_0_messageId_str, &hf_amqp_1_0_messageId_bin, &hf_amqp_1_0_messageId_uuid}, |
879 | | {&hf_amqp_1_0_correlationId, &hf_amqp_1_0_correlationId_uint, &hf_amqp_1_0_correlationId_str, &hf_amqp_1_0_correlationId_bin, &hf_amqp_1_0_correlationId_uuid}, |
880 | | {&hf_amqp_1_0_to, NULL, &hf_amqp_1_0_to_str, NULL, NULL}, |
881 | | {&hf_amqp_1_0_replyTo, NULL, &hf_amqp_1_0_replyTo_str, NULL, NULL}, |
882 | | {&hf_amqp_1_0_mechanisms, NULL, &hf_amqp_1_0_mechanisms_sym, NULL, NULL}, |
883 | | {NULL, NULL, NULL, NULL, NULL} |
884 | | }; |
885 | | |
886 | | /* fields with hf_* types for list items; |
887 | | * i.e. sasl.init method has 3 arguments in a list (mechanism, init.response, hostname) |
888 | | * so when dissecting sasl.init arguments list, identify the list items with |
889 | | * corresponding hf_* variable */ |
890 | | static int * const amqp_1_0_sasl_mechanisms_items[] = { &hf_amqp_1_0_mechanisms }; |
891 | | static int * const amqp_1_0_sasl_init_items[] = { &hf_amqp_1_0_mechanism, |
892 | | &hf_amqp_1_0_initResponse, |
893 | | &hf_amqp_1_0_hostname }; |
894 | | static int * const amqp_1_0_sasl_challenge_items[] = { &hf_amqp_1_0_saslChallenge }; |
895 | | static int * const amqp_1_0_sasl_response_items[] = { &hf_amqp_1_0_saslResponse }; |
896 | | static int * const amqp_1_0_sasl_outcome_items[] = { &hf_amqp_1_0_saslCode, |
897 | | &hf_amqp_1_0_saslAdditionalData }; |
898 | | static int * const amqp_1_0_amqp_open_items[] = { &hf_amqp_1_0_containerId, |
899 | | &hf_amqp_1_0_hostname, |
900 | | &hf_amqp_1_0_maxFrameSize, |
901 | | &hf_amqp_1_0_channelMax, |
902 | | &hf_amqp_1_0_idleTimeOut, |
903 | | &hf_amqp_1_0_outgoingLocales, |
904 | | &hf_amqp_1_0_incomingLocales, |
905 | | &hf_amqp_1_0_offeredCapabilities, |
906 | | &hf_amqp_1_0_desiredCapabilities, |
907 | | &hf_amqp_1_0_properties }; |
908 | | static int * const amqp_1_0_amqp_begin_items[] = { &hf_amqp_1_0_remoteChannel, |
909 | | &hf_amqp_1_0_nextOutgoingId, |
910 | | &hf_amqp_1_0_incomingWindow, |
911 | | &hf_amqp_1_0_outgoingWindow, |
912 | | &hf_amqp_1_0_handleMax, |
913 | | &hf_amqp_1_0_offeredCapabilities, |
914 | | &hf_amqp_1_0_desiredCapabilities, |
915 | | &hf_amqp_1_0_properties }; |
916 | | static int * const amqp_1_0_amqp_attach_items[] = { &hf_amqp_1_0_name, |
917 | | &hf_amqp_1_0_handle, |
918 | | &hf_amqp_1_0_role, |
919 | | &hf_amqp_1_0_sndSettleMode, |
920 | | &hf_amqp_1_0_rcvSettleMode, |
921 | | &hf_amqp_1_0_source, |
922 | | &hf_amqp_1_0_target, |
923 | | &hf_amqp_1_0_unsettled, |
924 | | &hf_amqp_1_0_incompleteUnsettled, |
925 | | &hf_amqp_1_0_initialDeliveryCount, |
926 | | &hf_amqp_1_0_maxMessageSize, |
927 | | &hf_amqp_1_0_offeredCapabilities, |
928 | | &hf_amqp_1_0_desiredCapabilities, |
929 | | &hf_amqp_1_0_properties }; |
930 | | static int * const amqp_1_0_amqp_flow_items[] = { &hf_amqp_1_0_nextIncomingId, |
931 | | &hf_amqp_1_0_incomingWindow, |
932 | | &hf_amqp_1_0_nextOutgoingId, |
933 | | &hf_amqp_1_0_outgoingWindow, |
934 | | &hf_amqp_1_0_handle, |
935 | | &hf_amqp_1_0_deliveryCount, |
936 | | &hf_amqp_1_0_linkCredit, |
937 | | &hf_amqp_1_0_available, |
938 | | &hf_amqp_1_0_drain, |
939 | | &hf_amqp_1_0_echo, |
940 | | &hf_amqp_1_0_properties }; |
941 | | static int * const amqp_1_0_amqp_transfer_items[] = { &hf_amqp_1_0_handle, |
942 | | &hf_amqp_1_0_deliveryId, |
943 | | &hf_amqp_1_0_deliveryTag, |
944 | | &hf_amqp_1_0_messageFormat, |
945 | | &hf_amqp_1_0_settled, |
946 | | &hf_amqp_1_0_more, |
947 | | &hf_amqp_1_0_rcvSettleMode, |
948 | | &hf_amqp_1_0_state, |
949 | | &hf_amqp_1_0_resume, |
950 | | &hf_amqp_1_0_aborted, |
951 | | &hf_amqp_1_0_batchable }; |
952 | | static int * const amqp_1_0_amqp_disposition_items[] = { &hf_amqp_1_0_role, |
953 | | &hf_amqp_1_0_first, |
954 | | &hf_amqp_1_0_last, |
955 | | &hf_amqp_1_0_settled, |
956 | | &hf_amqp_1_0_state, |
957 | | &hf_amqp_1_0_batchable }; |
958 | | static int * const amqp_1_0_amqp_detach_items[] = { &hf_amqp_1_0_handle, |
959 | | &hf_amqp_1_0_closed, |
960 | | &hf_amqp_1_0_error }; |
961 | | static int * const amqp_1_0_amqp_end_items[] = { &hf_amqp_1_0_error }; |
962 | | static int * const amqp_1_0_amqp_close_items[] = { &hf_amqp_1_0_error }; |
963 | | static int * const amqp_1_0_error_items[] = { &hf_amqp_1_0_condition, |
964 | | &hf_amqp_1_0_description, |
965 | | &hf_amqp_1_0_info }; |
966 | | static int * const amqp_1_0_messageHeader_items[] = { &hf_amqp_1_0_durable, |
967 | | &hf_amqp_1_0_priority, |
968 | | &hf_amqp_1_0_ttl, |
969 | | &hf_amqp_1_0_firstAcquirer, |
970 | | &hf_amqp_1_0_deliveryCount }; |
971 | | static int * const amqp_1_0_received_items[] = { &hf_amqp_1_0_sectionNumber, |
972 | | &hf_amqp_1_0_sectionOffset }; |
973 | | static int * const amqp_1_0_rejected_items[] = { &hf_amqp_1_0_error }; |
974 | | static int * const amqp_1_0_modified_items[] = { &hf_amqp_1_0_deliveryFailed, |
975 | | &hf_amqp_1_0_undeliverableHere, |
976 | | &hf_amqp_1_0_messageAnnotations }; |
977 | | static int * const amqp_1_0_source_items[] = { &hf_amqp_1_0_address, |
978 | | &hf_amqp_1_0_terminusDurable, |
979 | | &hf_amqp_1_0_expiryPolicy, |
980 | | &hf_amqp_1_0_timeout, |
981 | | &hf_amqp_1_0_dynamic, |
982 | | &hf_amqp_1_0_dynamicNodeProperties, |
983 | | &hf_amqp_1_0_distributionMode, |
984 | | &hf_amqp_1_0_filter, |
985 | | &hf_amqp_1_0_defaultOutcome, |
986 | | &hf_amqp_1_0_outcomes, |
987 | | &hf_amqp_1_0_capabilities }; |
988 | | static int * const amqp_1_0_target_items[] = { &hf_amqp_1_0_address, |
989 | | &hf_amqp_1_0_terminusDurable, |
990 | | &hf_amqp_1_0_expiryPolicy, |
991 | | &hf_amqp_1_0_timeout, |
992 | | &hf_amqp_1_0_dynamic, |
993 | | &hf_amqp_1_0_dynamicNodeProperties, |
994 | | &hf_amqp_1_0_capabilities }; |
995 | | static int * const amqp_1_0_messageProperties_items[] = { &hf_amqp_1_0_messageId, |
996 | | &hf_amqp_1_0_userId, |
997 | | &hf_amqp_1_0_to, |
998 | | &hf_amqp_1_0_subject, |
999 | | &hf_amqp_1_0_replyTo, |
1000 | | &hf_amqp_1_0_correlationId, |
1001 | | &hf_amqp_1_0_contentType, |
1002 | | &hf_amqp_1_0_contentEncoding, |
1003 | | &hf_amqp_1_0_absoluteExpiryTime, |
1004 | | &hf_amqp_1_0_creationTime, |
1005 | | &hf_amqp_1_0_groupId, |
1006 | | &hf_amqp_1_0_groupSequence, |
1007 | | &hf_amqp_1_0_replyToGroupId }; |
1008 | | static int * const amqp_1_0_coordinator_items[] = { &hf_amqp_1_0_capabilities }; |
1009 | | static int * const amqp_1_0_declare_items[] = { &hf_amqp_1_0_globalId }; |
1010 | | static int * const amqp_1_0_discharge_items[] = { &hf_amqp_1_0_txnId, |
1011 | | &hf_amqp_1_0_fail }; |
1012 | | static int * const amqp_1_0_declared_items[] = { &hf_amqp_1_0_txnId }; |
1013 | | static int * const amqp_1_0_transactionalState_items[] = { &hf_amqp_1_0_txnId, |
1014 | | &hf_amqp_1_0_outcome }; |
1015 | | |
1016 | | /* 0-10 handles */ |
1017 | | |
1018 | | static int hf_amqp_0_10_format; |
1019 | | static int hf_amqp_0_10_position; |
1020 | | static int hf_amqp_0_10_type; |
1021 | | static int hf_amqp_0_10_size; |
1022 | | static int hf_amqp_0_10_track; |
1023 | | static int hf_amqp_0_10_class; |
1024 | | static int hf_amqp_0_10_connection_method; |
1025 | | static int hf_amqp_0_10_session_method; |
1026 | | static int hf_amqp_0_10_execution_method; |
1027 | | static int hf_amqp_0_10_message_method; |
1028 | | static int hf_amqp_0_10_tx_method; |
1029 | | static int hf_amqp_0_10_dtx_method; |
1030 | | static int hf_amqp_0_10_exchange_method; |
1031 | | static int hf_amqp_0_10_queue_method; |
1032 | | static int hf_amqp_0_10_file_method; |
1033 | | static int hf_amqp_0_10_stream_method; |
1034 | | static int hf_amqp_0_10_argument_packing_flags; |
1035 | | static int hf_amqp_0_10_session_header; |
1036 | | static int hf_amqp_0_10_session_header_sync; |
1037 | | static int hf_amqp_0_10_struct32_size; |
1038 | | static int hf_amqp_0_10_struct32; |
1039 | | static int hf_amqp_0_10_struct32_padding; |
1040 | | static int hf_amqp_0_10_struct32_class; |
1041 | | static int hf_amqp_0_10_struct32_struct; |
1042 | | static int hf_amqp_0_10_array_type; |
1043 | | static int hf_amqp_0_10_array_element_count; |
1044 | | static int hf_amqp_0_10_array_string; |
1045 | | static int hf_amqp_0_10_message_body; |
1046 | | static int hf_amqp_0_10_dtx_xid; |
1047 | | static int hf_amqp_0_10_dtx_xid_format; |
1048 | | static int hf_amqp_0_10_dtx_xid_global_id; |
1049 | | static int hf_amqp_0_10_dtx_xid_branch_id; |
1050 | | static int hf_amqp_0_10_struct_delivery_properties_discard_unroutable; |
1051 | | static int hf_amqp_0_10_struct_delivery_properties_immediate; |
1052 | | static int hf_amqp_0_10_struct_delivery_properties_redelivered; |
1053 | | static int hf_amqp_0_10_struct_delivery_properties_priority; |
1054 | | static int hf_amqp_0_10_struct_delivery_properties_mode; |
1055 | | static int hf_amqp_0_10_struct_delivery_properties_ttl; |
1056 | | static int hf_amqp_0_10_struct_delivery_properties_timestamp; |
1057 | | static int hf_amqp_0_10_struct_delivery_properties_expiration; |
1058 | | static int hf_amqp_0_10_struct_delivery_properties_exchange; |
1059 | | static int hf_amqp_0_10_struct_delivery_properties_routing_key; |
1060 | | static int hf_amqp_0_10_struct_delivery_properties_resume_ttl; |
1061 | | static int hf_amqp_0_10_struct_fragment_properties_first; |
1062 | | static int hf_amqp_0_10_struct_fragment_properties_last; |
1063 | | static int hf_amqp_0_10_struct_fragment_properties_size; |
1064 | | /* static int hf_amqp_0_10_struct_message_properties; */ |
1065 | | static int hf_amqp_0_10_struct_message_properties_content_len; |
1066 | | static int hf_amqp_0_10_struct_message_properties_message_id; |
1067 | | static int hf_amqp_0_10_struct_message_properties_correlation; |
1068 | | static int hf_amqp_0_10_struct_message_properties_reply_to; |
1069 | | static int hf_amqp_0_10_struct_message_properties_content_type; |
1070 | | static int hf_amqp_0_10_struct_message_properties_content_encoding; |
1071 | | static int hf_amqp_0_10_struct_message_properties_user_id; |
1072 | | static int hf_amqp_0_10_struct_message_properties_app_id; |
1073 | | static int hf_amqp_0_10_struct_message_properties_application_headers; |
1074 | | static int hf_amqp_0_10_struct_reply_to_exchange; |
1075 | | static int hf_amqp_0_10_struct_reply_to_routing_key; |
1076 | | static int hf_amqp_0_10_struct_acquired_transfers; |
1077 | | static int hf_amqp_0_10_struct_resume_result_offset; |
1078 | | static int hf_amqp_0_10_struct_exchange_query_result_durable; |
1079 | | static int hf_amqp_0_10_struct_exchange_query_result_not_found; |
1080 | | static int hf_amqp_0_10_struct_exchange_bound_result_exchange_not_found; |
1081 | | static int hf_amqp_0_10_struct_exchange_bound_result_queue_not_found; |
1082 | | static int hf_amqp_0_10_struct_exchange_bound_result_queue_not_matched; |
1083 | | static int hf_amqp_0_10_struct_exchange_bound_result_key_not_matched; |
1084 | | static int hf_amqp_0_10_struct_exchange_bound_result_args_not_matched; |
1085 | | static int hf_amqp_0_10_struct_queue_query_result_durable; |
1086 | | static int hf_amqp_0_10_struct_queue_query_result_exclusive; |
1087 | | static int hf_amqp_0_10_struct_queue_query_result_auto_delete; |
1088 | | static int hf_amqp_0_10_struct_queue_query_result_message_count; |
1089 | | static int hf_amqp_0_10_struct_queue_query_result_subscriber_count; |
1090 | | static int hf_amqp_0_10_struct_file_properties_content_type; |
1091 | | static int hf_amqp_0_10_struct_file_properties_content_encoding; |
1092 | | static int hf_amqp_0_10_struct_file_properties_headers; |
1093 | | static int hf_amqp_0_10_struct_file_properties_priority; |
1094 | | static int hf_amqp_0_10_struct_file_properties_reply_to; |
1095 | | static int hf_amqp_0_10_struct_file_properties_message_id; |
1096 | | static int hf_amqp_0_10_struct_file_properties_filename; |
1097 | | static int hf_amqp_0_10_struct_file_properties_timestamp; |
1098 | | static int hf_amqp_0_10_struct_file_properties_cluster_id; |
1099 | | static int hf_amqp_0_10_struct_stream_properties_content_type; |
1100 | | static int hf_amqp_0_10_struct_stream_properties_content_encoding; |
1101 | | static int hf_amqp_0_10_struct_stream_properties_headers; |
1102 | | static int hf_amqp_0_10_struct_stream_properties_priority; |
1103 | | static int hf_amqp_0_10_struct_stream_properties_timestamp; |
1104 | | static int hf_amqp_0_10_method_session_attach_name; |
1105 | | static int hf_amqp_0_10_method_session_attach_name_size; |
1106 | | static int hf_amqp_0_10_method_session_attach_force; |
1107 | | static int hf_amqp_0_10_method_session_detached_code; |
1108 | | static int hf_amqp_0_10_method_session_timeout; |
1109 | | static int hf_amqp_0_10_method_session_completed_timely; |
1110 | | static int hf_amqp_0_10_method_session_flush_expected; |
1111 | | static int hf_amqp_0_10_method_session_flush_confirmed; |
1112 | | static int hf_amqp_0_10_method_session_flush_completed; |
1113 | | static int hf_amqp_0_10_method_session_command_point_id; |
1114 | | static int hf_amqp_0_10_method_session_command_point_offset; |
1115 | | static int hf_amqp_0_10_method_session_commands; |
1116 | | static int hf_amqp_0_10_method_session_fragments; |
1117 | | static int hf_amqp_0_10_method_execution_command_id; |
1118 | | static int hf_amqp_0_10_method_execution_exception_error; |
1119 | | static int hf_amqp_0_10_method_execution_field_index; |
1120 | | static int hf_amqp_0_10_method_execution_description; |
1121 | | static int hf_amqp_0_10_method_execution_error_info; |
1122 | | static int hf_amqp_0_10_method_message_transfer_destination; |
1123 | | static int hf_amqp_0_10_method_message_transfer_accept_mode; |
1124 | | static int hf_amqp_0_10_method_message_transfer_acquire_mode; |
1125 | | static int hf_amqp_0_10_method_message_accept_transfers; |
1126 | | static int hf_amqp_0_10_method_message_transfer_reject_code; |
1127 | | static int hf_amqp_0_10_method_message_reject_text; |
1128 | | static int hf_amqp_0_10_method_message_release_set_redelivered; |
1129 | | static int hf_amqp_0_10_method_message_dest; |
1130 | | static int hf_amqp_0_10_method_message_resume_id; |
1131 | | static int hf_amqp_0_10_method_message_subscribe_queue; |
1132 | | static int hf_amqp_0_10_method_message_subscribe_exclusive; |
1133 | | static int hf_amqp_0_10_method_message_subscribe_resume_ttl; |
1134 | | static int hf_amqp_0_10_method_message_subscribe_args; |
1135 | | static int hf_amqp_0_10_method_message_flow_mode; |
1136 | | static int hf_amqp_0_10_method_message_credit_unit; |
1137 | | static int hf_amqp_0_10_method_message_credit_value; |
1138 | | static int hf_amqp_0_10_method_dtx_start_join; |
1139 | | static int hf_amqp_0_10_method_dtx_start_resume; |
1140 | | static int hf_amqp_0_10_method_dtx_end_fail; |
1141 | | static int hf_amqp_0_10_method_dtx_end_suspend; |
1142 | | static int hf_amqp_0_10_method_dtx_commit_one_phase; |
1143 | | static int hf_amqp_0_10_method_dtx_set_timeout_timeout; |
1144 | | static int hf_amqp_0_10_method_exchange_declare_exchange; |
1145 | | static int hf_amqp_0_10_method_exchange_declare_type; |
1146 | | static int hf_amqp_0_10_method_exchange_declare_alt_exchange; |
1147 | | static int hf_amqp_0_10_method_exchange_declare_passive; |
1148 | | static int hf_amqp_0_10_method_exchange_declare_durable; |
1149 | | static int hf_amqp_0_10_method_exchange_declare_auto_delete; |
1150 | | static int hf_amqp_0_10_method_exchange_declare_arguments; |
1151 | | static int hf_amqp_0_10_method_exchange_delete_if_unused; |
1152 | | static int hf_amqp_0_10_method_exchange_bind_queue; |
1153 | | static int hf_amqp_0_10_method_exchange_binding_key; |
1154 | | static int hf_amqp_0_10_method_queue_name; |
1155 | | static int hf_amqp_0_10_method_queue_alt_exchange; |
1156 | | static int hf_amqp_0_10_method_queue_declare_passive; |
1157 | | static int hf_amqp_0_10_method_queue_declare_durable; |
1158 | | static int hf_amqp_0_10_method_queue_declare_exclusive; |
1159 | | static int hf_amqp_0_10_method_queue_declare_auto_delete; |
1160 | | static int hf_amqp_0_10_method_queue_declare_arguments; |
1161 | | static int hf_amqp_0_10_method_queue_delete_if_unused; |
1162 | | static int hf_amqp_0_10_method_queue_delete_if_empty; |
1163 | | static int hf_amqp_0_10_method_file_qos_prefetch_size; |
1164 | | static int hf_amqp_0_10_method_file_qos_prefetch_count; |
1165 | | static int hf_amqp_0_10_method_file_qos_global; |
1166 | | static int hf_amqp_0_10_method_file_consumer_tag; |
1167 | | static int hf_amqp_0_10_method_file_consume_no_local; |
1168 | | static int hf_amqp_0_10_method_file_consume_no_ack; |
1169 | | static int hf_amqp_0_10_method_file_consume_exclusive; |
1170 | | static int hf_amqp_0_10_method_file_consume_nowait; |
1171 | | static int hf_amqp_0_10_method_file_consume_arguments; |
1172 | | static int hf_amqp_0_10_method_file_identifier; |
1173 | | static int hf_amqp_0_10_method_file_open_content_size; |
1174 | | static int hf_amqp_0_10_method_file_open_ok_staged_size; |
1175 | | static int hf_amqp_0_10_method_file_publish_exchange; |
1176 | | static int hf_amqp_0_10_method_file_publish_routing_key; |
1177 | | static int hf_amqp_0_10_method_file_publish_mandatory; |
1178 | | static int hf_amqp_0_10_method_file_publish_immediate; |
1179 | | static int hf_amqp_0_10_method_file_return_reply_code; |
1180 | | static int hf_amqp_0_10_method_file_return_reply_text; |
1181 | | static int hf_amqp_0_10_method_file_return_exchange; |
1182 | | static int hf_amqp_0_10_method_file_return_routing_key; |
1183 | | static int hf_amqp_0_10_method_file_deliver_consumer_tag; |
1184 | | static int hf_amqp_0_10_method_file_deliver_delivery_tag; |
1185 | | static int hf_amqp_0_10_method_file_deliver_redelivered; |
1186 | | static int hf_amqp_0_10_method_file_deliver_exchange; |
1187 | | static int hf_amqp_0_10_method_file_deliver_routing_key; |
1188 | | static int hf_amqp_0_10_method_file_ack_delivery_tag; |
1189 | | static int hf_amqp_0_10_method_file_ack_multiple; |
1190 | | static int hf_amqp_0_10_method_file_reject_delivery_tag; |
1191 | | static int hf_amqp_0_10_method_file_reject_requeue; |
1192 | | static int hf_amqp_0_10_method_stream_qos_prefetch_size; |
1193 | | static int hf_amqp_0_10_method_stream_qos_prefetch_count; |
1194 | | /* static int hf_amqp_0_10_method_stream_qos_consume_rate; */ |
1195 | | static int hf_amqp_0_10_method_stream_qos_global; |
1196 | | static int hf_amqp_0_10_method_stream_consumer_tag; |
1197 | | static int hf_amqp_0_10_method_stream_consume_no_local; |
1198 | | static int hf_amqp_0_10_method_stream_consume_exclusive; |
1199 | | static int hf_amqp_0_10_method_stream_consume_nowait; |
1200 | | static int hf_amqp_0_10_method_stream_consume_arguments; |
1201 | | static int hf_amqp_0_10_method_stream_publish_exchange; |
1202 | | static int hf_amqp_0_10_method_stream_publish_routing_key; |
1203 | | static int hf_amqp_0_10_method_stream_publish_mandatory; |
1204 | | static int hf_amqp_0_10_method_stream_publish_immediate; |
1205 | | static int hf_amqp_0_10_method_stream_return_reply_code; |
1206 | | static int hf_amqp_0_10_method_stream_return_reply_text; |
1207 | | static int hf_amqp_0_10_method_stream_return_exchange; |
1208 | | static int hf_amqp_0_10_method_stream_return_routing_key; |
1209 | | static int hf_amqp_0_10_method_stream_deliver_consumer_tag; |
1210 | | static int hf_amqp_0_10_method_stream_deliver_delivery_tag; |
1211 | | static int hf_amqp_0_10_method_stream_deliver_exchange; |
1212 | | static int hf_amqp_0_10_method_stream_deliver_queue; |
1213 | | static int hf_amqp_channel; |
1214 | | static int hf_amqp_reserved; |
1215 | | static int hf_amqp_0_9_type; |
1216 | | static int hf_amqp_0_9_length; |
1217 | | static int hf_amqp_0_9_method_class_id; |
1218 | | static int hf_amqp_method_connection_method_id; |
1219 | | static int hf_amqp_method_channel_method_id; |
1220 | | static int hf_amqp_method_access_method_id; |
1221 | | static int hf_amqp_method_exchange_method_id; |
1222 | | static int hf_amqp_method_queue_method_id; |
1223 | | static int hf_amqp_method_basic_method_id; |
1224 | | static int hf_amqp_method_file_method_id; |
1225 | | static int hf_amqp_method_stream_method_id; |
1226 | | static int hf_amqp_method_tx_method_id; |
1227 | | static int hf_amqp_method_dtx_method_id; |
1228 | | static int hf_amqp_method_tunnel_method_id; |
1229 | | static int hf_amqp_method_confirm_method_id; |
1230 | | static int hf_amqp_method_arguments; |
1231 | | static int hf_amqp_method_connection_start_version_major; |
1232 | | static int hf_amqp_method_connection_start_version_minor; |
1233 | | static int hf_amqp_method_connection_start_server_properties; |
1234 | | static int hf_amqp_0_9_method_connection_start_mechanisms; |
1235 | | static int hf_amqp_0_10_method_connection_start_mechanisms; |
1236 | | static int hf_amqp_0_9_method_connection_start_locales; |
1237 | | static int hf_amqp_0_10_method_connection_start_locales; |
1238 | | static int hf_amqp_method_connection_start_ok_client_properties; |
1239 | | static int hf_amqp_method_connection_start_ok_mechanism; |
1240 | | static int hf_amqp_method_connection_start_ok_response; |
1241 | | static int hf_amqp_method_connection_start_ok_locale; |
1242 | | static int hf_amqp_method_connection_secure_challenge; |
1243 | | static int hf_amqp_method_connection_secure_ok_response; |
1244 | | static int hf_amqp_method_connection_tune_channel_max; |
1245 | | static int hf_amqp_0_9_method_connection_tune_frame_max; |
1246 | | static int hf_amqp_0_10_method_connection_tune_frame_max; |
1247 | | static int hf_amqp_0_9_method_connection_tune_heartbeat; |
1248 | | static int hf_amqp_0_10_method_connection_tune_heartbeat_min; |
1249 | | static int hf_amqp_0_10_method_connection_tune_heartbeat_max; |
1250 | | static int hf_amqp_method_connection_tune_ok_channel_max; |
1251 | | static int hf_amqp_0_9_method_connection_tune_ok_frame_max; |
1252 | | static int hf_amqp_0_10_method_connection_tune_ok_frame_max; |
1253 | | static int hf_amqp_method_connection_tune_ok_heartbeat; |
1254 | | static int hf_amqp_method_connection_open_virtual_host; |
1255 | | static int hf_amqp_0_9_method_connection_open_capabilities; |
1256 | | static int hf_amqp_0_10_method_connection_open_capabilities; |
1257 | | static int hf_amqp_0_9_method_connection_open_insist; |
1258 | | static int hf_amqp_0_10_method_connection_open_insist; |
1259 | | static int hf_amqp_0_9_method_connection_open_ok_known_hosts; |
1260 | | static int hf_amqp_0_10_method_connection_open_ok_known_hosts; |
1261 | | static int hf_amqp_method_connection_redirect_host; |
1262 | | static int hf_amqp_0_9_method_connection_redirect_known_hosts; |
1263 | | static int hf_amqp_0_10_method_connection_redirect_known_hosts; |
1264 | | static int hf_amqp_0_9_method_connection_close_reply_code; |
1265 | | static int hf_amqp_0_10_method_connection_close_reply_code; |
1266 | | static int hf_amqp_method_connection_close_reply_text; |
1267 | | static int hf_amqp_method_connection_close_class_id; |
1268 | | static int hf_amqp_method_connection_close_method_id; |
1269 | | static int hf_amqp_method_connection_blocked_reason; |
1270 | | static int hf_amqp_method_channel_open_out_of_band; |
1271 | | static int hf_amqp_method_channel_open_ok_channel_id; |
1272 | | static int hf_amqp_method_channel_flow_active; |
1273 | | static int hf_amqp_method_channel_flow_ok_active; |
1274 | | static int hf_amqp_method_channel_close_reply_code; |
1275 | | static int hf_amqp_method_channel_close_reply_text; |
1276 | | static int hf_amqp_method_channel_close_class_id; |
1277 | | static int hf_amqp_method_channel_close_method_id; |
1278 | | static int hf_amqp_method_channel_resume_channel_id; |
1279 | | static int hf_amqp_method_access_request_realm; |
1280 | | static int hf_amqp_method_access_request_exclusive; |
1281 | | static int hf_amqp_method_access_request_passive; |
1282 | | static int hf_amqp_method_access_request_active; |
1283 | | static int hf_amqp_method_access_request_write; |
1284 | | static int hf_amqp_method_access_request_read; |
1285 | | static int hf_amqp_method_access_request_ok_ticket; |
1286 | | static int hf_amqp_method_exchange_declare_ticket; |
1287 | | static int hf_amqp_method_exchange_declare_exchange; |
1288 | | static int hf_amqp_method_exchange_declare_type; |
1289 | | static int hf_amqp_method_exchange_declare_passive; |
1290 | | static int hf_amqp_method_exchange_declare_durable; |
1291 | | static int hf_amqp_method_exchange_declare_auto_delete; |
1292 | | static int hf_amqp_method_exchange_declare_internal; |
1293 | | static int hf_amqp_method_exchange_declare_nowait; |
1294 | | static int hf_amqp_method_exchange_declare_arguments; |
1295 | | static int hf_amqp_method_exchange_bind_destination; |
1296 | | static int hf_amqp_method_exchange_bind_source; |
1297 | | static int hf_amqp_method_exchange_bind_routing_key; |
1298 | | static int hf_amqp_method_exchange_bind_nowait; |
1299 | | static int hf_amqp_method_exchange_bind_arguments; |
1300 | | static int hf_amqp_method_exchange_delete_ticket; |
1301 | | static int hf_amqp_method_exchange_delete_exchange; |
1302 | | static int hf_amqp_method_exchange_delete_if_unused; |
1303 | | static int hf_amqp_method_exchange_delete_nowait; |
1304 | | static int hf_amqp_method_queue_declare_ticket; |
1305 | | static int hf_amqp_method_queue_declare_queue; |
1306 | | static int hf_amqp_method_queue_declare_passive; |
1307 | | static int hf_amqp_method_queue_declare_durable; |
1308 | | static int hf_amqp_method_queue_declare_exclusive; |
1309 | | static int hf_amqp_method_queue_declare_auto_delete; |
1310 | | static int hf_amqp_method_queue_declare_nowait; |
1311 | | static int hf_amqp_method_queue_declare_arguments; |
1312 | | static int hf_amqp_method_queue_declare_ok_queue; |
1313 | | static int hf_amqp_method_queue_declare_ok_message_count; |
1314 | | static int hf_amqp_method_queue_declare_ok_consumer_count; |
1315 | | static int hf_amqp_method_queue_bind_ticket; |
1316 | | static int hf_amqp_method_queue_bind_queue; |
1317 | | static int hf_amqp_method_queue_bind_exchange; |
1318 | | static int hf_amqp_method_queue_bind_routing_key; |
1319 | | static int hf_amqp_method_queue_bind_nowait; |
1320 | | static int hf_amqp_method_queue_bind_arguments; |
1321 | | static int hf_amqp_method_queue_unbind_ticket; |
1322 | | static int hf_amqp_method_queue_unbind_queue; |
1323 | | static int hf_amqp_method_queue_unbind_exchange; |
1324 | | static int hf_amqp_method_queue_unbind_routing_key; |
1325 | | static int hf_amqp_method_queue_unbind_arguments; |
1326 | | static int hf_amqp_method_queue_purge_ticket; |
1327 | | static int hf_amqp_method_queue_purge_queue; |
1328 | | static int hf_amqp_method_queue_purge_nowait; |
1329 | | static int hf_amqp_method_queue_purge_ok_message_count; |
1330 | | static int hf_amqp_method_queue_delete_ticket; |
1331 | | static int hf_amqp_method_queue_delete_queue; |
1332 | | static int hf_amqp_method_queue_delete_if_unused; |
1333 | | static int hf_amqp_method_queue_delete_if_empty; |
1334 | | static int hf_amqp_method_queue_delete_nowait; |
1335 | | static int hf_amqp_method_queue_delete_ok_message_count; |
1336 | | static int hf_amqp_method_basic_qos_prefetch_size; |
1337 | | static int hf_amqp_method_basic_qos_prefetch_count; |
1338 | | static int hf_amqp_method_basic_qos_global; |
1339 | | static int hf_amqp_method_basic_consume_ticket; |
1340 | | static int hf_amqp_method_basic_consume_queue; |
1341 | | static int hf_amqp_method_basic_consume_consumer_tag; |
1342 | | static int hf_amqp_method_basic_consume_no_local; |
1343 | | static int hf_amqp_method_basic_consume_no_ack; |
1344 | | static int hf_amqp_method_basic_consume_exclusive; |
1345 | | static int hf_amqp_method_basic_consume_nowait; |
1346 | | static int hf_amqp_method_basic_consume_filter; |
1347 | | static int hf_amqp_method_basic_consume_ok_consumer_tag; |
1348 | | static int hf_amqp_method_basic_cancel_consumer_tag; |
1349 | | static int hf_amqp_method_basic_cancel_nowait; |
1350 | | static int hf_amqp_method_basic_cancel_ok_consumer_tag; |
1351 | | static int hf_amqp_method_basic_publish_number; |
1352 | | static int hf_amqp_method_basic_publish_ticket; |
1353 | | static int hf_amqp_method_basic_publish_exchange; |
1354 | | static int hf_amqp_method_basic_publish_routing_key; |
1355 | | static int hf_amqp_method_basic_publish_mandatory; |
1356 | | static int hf_amqp_method_basic_publish_immediate; |
1357 | | static int hf_amqp_method_basic_return_reply_code; |
1358 | | static int hf_amqp_method_basic_return_reply_text; |
1359 | | static int hf_amqp_method_basic_return_exchange; |
1360 | | static int hf_amqp_method_basic_return_routing_key; |
1361 | | static int hf_amqp_method_basic_deliver_consumer_tag; |
1362 | | static int hf_amqp_method_basic_deliver_delivery_tag; |
1363 | | static int hf_amqp_method_basic_deliver_redelivered; |
1364 | | static int hf_amqp_method_basic_deliver_exchange; |
1365 | | static int hf_amqp_method_basic_deliver_routing_key; |
1366 | | static int hf_amqp_method_basic_get_ticket; |
1367 | | static int hf_amqp_method_basic_get_queue; |
1368 | | static int hf_amqp_method_basic_get_no_ack; |
1369 | | static int hf_amqp_method_basic_get_ok_delivery_tag; |
1370 | | static int hf_amqp_method_basic_get_ok_redelivered; |
1371 | | static int hf_amqp_method_basic_get_ok_exchange; |
1372 | | static int hf_amqp_method_basic_get_ok_routing_key; |
1373 | | static int hf_amqp_method_basic_get_ok_message_count; |
1374 | | static int hf_amqp_method_basic_get_empty_cluster_id; |
1375 | | static int hf_amqp_method_basic_ack_delivery_tag; |
1376 | | static int hf_amqp_method_basic_ack_multiple; |
1377 | | static int hf_amqp_method_basic_reject_delivery_tag; |
1378 | | static int hf_amqp_method_basic_reject_requeue; |
1379 | | static int hf_amqp_method_basic_recover_requeue; |
1380 | | static int hf_amqp_method_basic_nack_delivery_tag; |
1381 | | static int hf_amqp_method_basic_nack_multiple; |
1382 | | static int hf_amqp_method_basic_nack_requeue; |
1383 | | static int hf_amqp_method_file_qos_prefetch_size; |
1384 | | static int hf_amqp_method_file_qos_prefetch_count; |
1385 | | static int hf_amqp_method_file_qos_global; |
1386 | | static int hf_amqp_method_file_consume_ticket; |
1387 | | static int hf_amqp_method_file_consume_queue; |
1388 | | static int hf_amqp_method_file_consume_consumer_tag; |
1389 | | static int hf_amqp_method_file_consume_no_local; |
1390 | | static int hf_amqp_method_file_consume_no_ack; |
1391 | | static int hf_amqp_method_file_consume_exclusive; |
1392 | | static int hf_amqp_method_file_consume_nowait; |
1393 | | static int hf_amqp_method_file_consume_filter; |
1394 | | static int hf_amqp_method_file_consume_ok_consumer_tag; |
1395 | | static int hf_amqp_method_file_cancel_consumer_tag; |
1396 | | static int hf_amqp_method_file_cancel_nowait; |
1397 | | static int hf_amqp_method_file_cancel_ok_consumer_tag; |
1398 | | static int hf_amqp_method_file_open_identifier; |
1399 | | static int hf_amqp_method_file_open_content_size; |
1400 | | static int hf_amqp_method_file_open_ok_staged_size; |
1401 | | static int hf_amqp_method_file_publish_ticket; |
1402 | | static int hf_amqp_method_file_publish_exchange; |
1403 | | static int hf_amqp_method_file_publish_routing_key; |
1404 | | static int hf_amqp_method_file_publish_mandatory; |
1405 | | static int hf_amqp_method_file_publish_immediate; |
1406 | | static int hf_amqp_method_file_publish_identifier; |
1407 | | static int hf_amqp_method_file_return_reply_code; |
1408 | | static int hf_amqp_method_file_return_reply_text; |
1409 | | static int hf_amqp_method_file_return_exchange; |
1410 | | static int hf_amqp_method_file_return_routing_key; |
1411 | | static int hf_amqp_method_file_deliver_consumer_tag; |
1412 | | static int hf_amqp_method_file_deliver_delivery_tag; |
1413 | | static int hf_amqp_method_file_deliver_redelivered; |
1414 | | static int hf_amqp_method_file_deliver_exchange; |
1415 | | static int hf_amqp_method_file_deliver_routing_key; |
1416 | | static int hf_amqp_method_file_deliver_identifier; |
1417 | | static int hf_amqp_method_file_ack_delivery_tag; |
1418 | | static int hf_amqp_method_file_ack_multiple; |
1419 | | static int hf_amqp_method_file_reject_delivery_tag; |
1420 | | static int hf_amqp_method_file_reject_requeue; |
1421 | | static int hf_amqp_method_stream_qos_prefetch_size; |
1422 | | static int hf_amqp_method_stream_qos_prefetch_count; |
1423 | | static int hf_amqp_method_stream_qos_consume_rate; |
1424 | | static int hf_amqp_method_stream_qos_global; |
1425 | | static int hf_amqp_method_stream_consume_ticket; |
1426 | | static int hf_amqp_method_stream_consume_queue; |
1427 | | static int hf_amqp_method_stream_consume_consumer_tag; |
1428 | | static int hf_amqp_method_stream_consume_no_local; |
1429 | | static int hf_amqp_method_stream_consume_exclusive; |
1430 | | static int hf_amqp_method_stream_consume_nowait; |
1431 | | static int hf_amqp_method_stream_consume_filter; |
1432 | | static int hf_amqp_method_stream_consume_ok_consumer_tag; |
1433 | | static int hf_amqp_method_stream_cancel_consumer_tag; |
1434 | | static int hf_amqp_method_stream_cancel_nowait; |
1435 | | static int hf_amqp_method_stream_cancel_ok_consumer_tag; |
1436 | | static int hf_amqp_method_stream_publish_ticket; |
1437 | | static int hf_amqp_method_stream_publish_exchange; |
1438 | | static int hf_amqp_method_stream_publish_routing_key; |
1439 | | static int hf_amqp_method_stream_publish_mandatory; |
1440 | | static int hf_amqp_method_stream_publish_immediate; |
1441 | | static int hf_amqp_method_stream_return_reply_code; |
1442 | | static int hf_amqp_method_stream_return_reply_text; |
1443 | | static int hf_amqp_method_stream_return_exchange; |
1444 | | static int hf_amqp_method_stream_return_routing_key; |
1445 | | static int hf_amqp_method_stream_deliver_consumer_tag; |
1446 | | static int hf_amqp_method_stream_deliver_delivery_tag; |
1447 | | static int hf_amqp_method_stream_deliver_exchange; |
1448 | | static int hf_amqp_method_stream_deliver_queue; |
1449 | | static int hf_amqp_method_dtx_start_dtx_identifier; |
1450 | | static int hf_amqp_method_tunnel_request_meta_data; |
1451 | | static int hf_amqp_method_confirm_select_nowait; |
1452 | | static int hf_amqp_field; |
1453 | | static int hf_amqp_field_name; |
1454 | | static int hf_amqp_field_type; |
1455 | | static int hf_amqp_field_integer; |
1456 | | static int hf_amqp_field_unsigned_integer; |
1457 | | static int hf_amqp_field_string; |
1458 | | static int hf_amqp_field_boolean; |
1459 | | static int hf_amqp_field_byte; |
1460 | | static int hf_amqp_field_unsigned_byte; |
1461 | | static int hf_amqp_field_short_int; |
1462 | | static int hf_amqp_field_short_uint; |
1463 | | static int hf_amqp_field_long_int; |
1464 | | static int hf_amqp_field_float; |
1465 | | static int hf_amqp_field_double; |
1466 | | static int hf_amqp_field_decimal; |
1467 | | static int hf_amqp_field_timestamp; |
1468 | | static int hf_amqp_field_byte_array; |
1469 | | static int hf_amqp_header_class_id; |
1470 | | static int hf_amqp_header_weight; |
1471 | | static int hf_amqp_header_body_size; |
1472 | | static int hf_amqp_header_property_flags; |
1473 | | static int hf_amqp_header_properties; |
1474 | | static int hf_amqp_header_basic_content_type; |
1475 | | static int hf_amqp_header_basic_content_encoding; |
1476 | | static int hf_amqp_header_basic_headers; |
1477 | | static int hf_amqp_header_basic_delivery_mode; |
1478 | | static int hf_amqp_header_basic_priority; |
1479 | | static int hf_amqp_header_basic_correlation_id; |
1480 | | static int hf_amqp_header_basic_reply_to; |
1481 | | static int hf_amqp_header_basic_expiration; |
1482 | | static int hf_amqp_header_basic_message_id; |
1483 | | static int hf_amqp_header_basic_timestamp; |
1484 | | static int hf_amqp_header_basic_type; |
1485 | | static int hf_amqp_header_basic_user_id; |
1486 | | static int hf_amqp_header_basic_app_id; |
1487 | | static int hf_amqp_header_basic_cluster_id; |
1488 | | static int hf_amqp_header_file_content_type; |
1489 | | static int hf_amqp_header_file_content_encoding; |
1490 | | static int hf_amqp_header_file_headers; |
1491 | | static int hf_amqp_header_file_priority; |
1492 | | static int hf_amqp_header_file_reply_to; |
1493 | | static int hf_amqp_header_file_message_id; |
1494 | | static int hf_amqp_header_file_filename; |
1495 | | static int hf_amqp_header_file_timestamp; |
1496 | | static int hf_amqp_header_file_cluster_id; |
1497 | | static int hf_amqp_header_stream_content_type; |
1498 | | static int hf_amqp_header_stream_content_encoding; |
1499 | | static int hf_amqp_header_stream_headers; |
1500 | | static int hf_amqp_header_stream_priority; |
1501 | | static int hf_amqp_header_stream_timestamp; |
1502 | | static int hf_amqp_header_tunnel_headers; |
1503 | | static int hf_amqp_header_tunnel_proxy_name; |
1504 | | static int hf_amqp_header_tunnel_data_name; |
1505 | | static int hf_amqp_header_tunnel_durable; |
1506 | | static int hf_amqp_header_tunnel_broadcast; |
1507 | | static int hf_amqp_0_10_dtx_xa_status; |
1508 | | static int hf_amqp_payload; |
1509 | | static int hf_amqp_init_protocol; |
1510 | | static int hf_amqp_init_id; |
1511 | | static int hf_amqp_init_id_major; |
1512 | | static int hf_amqp_init_id_minor; |
1513 | | static int hf_amqp_init_version_major; |
1514 | | static int hf_amqp_init_version_minor; |
1515 | | static int hf_amqp_init_version_revision; |
1516 | | static int hf_amqp_message_in; |
1517 | | static int hf_amqp_ack_in; |
1518 | | static int hf_amqp_method_connection_start_server_properties_size; |
1519 | | static int hf_amqp_0_10_method_connection_start_mechanisms_size; |
1520 | | static int hf_amqp_0_10_method_connection_start_locales_size; |
1521 | | static int hf_amqp_method_connection_start_ok_client_properties_size; |
1522 | | static int hf_amqp_0_10_method_connection_open_capabilities_size; |
1523 | | static int hf_amqp_0_10_method_connection_open_ok_known_hosts_size; |
1524 | | static int hf_amqp_0_10_method_connection_redirect_known_hosts_size; |
1525 | | static int hf_amqp_0_10_method_execution_error_info_size; |
1526 | | static int hf_amqp_0_10_method_exchange_declare_arguments_size; |
1527 | | static int hf_amqp_0_10_method_queue_declare_arguments_size; |
1528 | | static int hf_amqp_0_10_method_file_consume_arguments_size; |
1529 | | static int hf_amqp_0_10_method_stream_consume_arguments_size; |
1530 | | static int hf_amqp_0_10_struct_message_properties_application_headers_size; |
1531 | | static int hf_amqp_0_10_struct_file_properties_headers_size; |
1532 | | static int hf_amqp_0_10_struct_stream_properties_headers_size; |
1533 | | static int hf_amqp_0_10_struct_dtx_recover_result_size; |
1534 | | |
1535 | | static int ett_amqp; |
1536 | | static int ett_header; |
1537 | | static int ett_args; |
1538 | | static int ett_props; |
1539 | | static int ett_field_table; |
1540 | | static int ett_amqp_init; |
1541 | | static int ett_amqp_0_9_field; |
1542 | | static int ett_amqp_0_10_map; |
1543 | | static int ett_amqp_0_10_array; |
1544 | | static int ett_amqp_0_10_struct; |
1545 | | static int ett_amqp_1_0_list; |
1546 | | static int ett_amqp_1_0_array; |
1547 | | static int ett_amqp_1_0_map; |
1548 | | |
1549 | | static expert_field ei_amqp_connection_error; |
1550 | | static expert_field ei_amqp_channel_error; |
1551 | | static expert_field ei_amqp_message_undeliverable; |
1552 | | static expert_field ei_amqp_bad_flag_value; |
1553 | | static expert_field ei_amqp_unknown_stream_method; |
1554 | | static expert_field ei_amqp_unknown_basic_method; |
1555 | | static expert_field ei_amqp_unknown_frame_type; |
1556 | | static expert_field ei_amqp_field_short; |
1557 | | static expert_field ei_amqp_bad_length; |
1558 | | static expert_field ei_amqp_unknown_command_class; |
1559 | | static expert_field ei_amqp_unknown_tunnel_method; |
1560 | | static expert_field ei_amqp_unknown_confirm_method; |
1561 | | static expert_field ei_amqp_invalid_class_code; |
1562 | | static expert_field ei_amqp_unknown_access_method; |
1563 | | static expert_field ei_amqp_unknown_tx_method; |
1564 | | static expert_field ei_amqp_unknown_header_class; |
1565 | | static expert_field ei_amqp_unknown_connection_method; |
1566 | | static expert_field ei_amqp_unknown_queue_method; |
1567 | | static expert_field ei_amqp_unknown_channel_method; |
1568 | | static expert_field ei_amqp_unknown_dtx_method; |
1569 | | static expert_field ei_amqp_unknown_method_class; |
1570 | | static expert_field ei_amqp_unknown_file_method; |
1571 | | static expert_field ei_amqp_unknown_exchange_method; |
1572 | | static expert_field ei_amqp_unknown_sasl_command; |
1573 | | static expert_field ei_amqp_unknown_amqp_command; |
1574 | | static expert_field ei_amqp_unknown_amqp_type; |
1575 | | static expert_field ei_amqp_invalid_number_of_params; |
1576 | | static expert_field ei_amqp_size_exceeds_65K; |
1577 | | static expert_field ei_amqp_array_type_unknown; |
1578 | | |
1579 | | static dissector_handle_t amqp_tcp_handle; |
1580 | | |
1581 | | static amqp_message_decode_t *amqp_message_decodes; |
1582 | | static unsigned num_amqp_message_decodes; |
1583 | | |
1584 | | static void *amqp_message_decode_copy_cb(void *dest, const void *orig, size_t len _U_) |
1585 | 0 | { |
1586 | 0 | const amqp_message_decode_t *o = (const amqp_message_decode_t *)orig; |
1587 | 0 | amqp_message_decode_t *d = (amqp_message_decode_t *)dest; |
1588 | |
|
1589 | 0 | d->match_criteria = o->match_criteria; |
1590 | 0 | d->topic_pattern = g_strdup(o->topic_pattern); |
1591 | 0 | d->payload_proto_name = g_strdup(o->payload_proto_name); |
1592 | 0 | d->payload_proto = o->payload_proto; |
1593 | 0 | d->topic_more_info = g_strdup(o->topic_more_info); |
1594 | |
|
1595 | 0 | return d; |
1596 | 0 | } |
1597 | | |
1598 | | static bool amqp_message_decode_update_cb(void *record, char **error) |
1599 | 0 | { |
1600 | 0 | amqp_message_decode_t *u = (amqp_message_decode_t *)record; |
1601 | |
|
1602 | 0 | if (u->topic_pattern == NULL || strlen(u->topic_pattern) == 0) { |
1603 | 0 | *error = g_strdup("Missing topic pattern"); |
1604 | 0 | return false; |
1605 | 0 | } |
1606 | | |
1607 | 0 | if (u->payload_proto_name == NULL || strlen(u->payload_proto_name) == 0) { |
1608 | 0 | *error = g_strdup("Missing payload protocol"); |
1609 | 0 | return false; |
1610 | 0 | } |
1611 | | |
1612 | 0 | if (u->match_criteria == MATCH_CRITERIA_REGEX) { |
1613 | 0 | u->topic_regex = g_regex_new(u->topic_pattern, (GRegexCompileFlags) G_REGEX_OPTIMIZE, (GRegexMatchFlags) 0, NULL); |
1614 | 0 | if (!u->topic_regex) { |
1615 | 0 | *error = g_strdup_printf("Invalid regex: %s", u->topic_pattern); |
1616 | 0 | return false; |
1617 | 0 | } |
1618 | 0 | } |
1619 | | |
1620 | 0 | return true; |
1621 | 0 | } |
1622 | | |
1623 | | static void amqp_message_decode_free_cb(void *record) |
1624 | 0 | { |
1625 | 0 | amqp_message_decode_t *u = (amqp_message_decode_t *)record; |
1626 | |
|
1627 | 0 | g_free(u->topic_pattern); |
1628 | 0 | if (u->topic_regex) { |
1629 | 0 | g_regex_unref(u->topic_regex); |
1630 | 0 | } |
1631 | 0 | g_free(u->payload_proto_name); |
1632 | 0 | g_free(u->topic_more_info); |
1633 | 0 | } |
1634 | | |
1635 | | UAT_VS_DEF(message_decode, match_criteria, amqp_message_decode_t, uint32_t, MATCH_CRITERIA_EQUAL, "Equal to") |
1636 | | UAT_CSTRING_CB_DEF(message_decode, topic_pattern, amqp_message_decode_t) |
1637 | | UAT_DISSECTOR_DEF(message_decode, payload_proto, payload_proto, payload_proto_name, amqp_message_decode_t) |
1638 | | UAT_CSTRING_CB_DEF(message_decode, topic_more_info, amqp_message_decode_t) |
1639 | | |
1640 | | |
1641 | | /* Various enumerations */ |
1642 | | |
1643 | | static const value_string amqp_1_0_SASL_code_value [] = { |
1644 | | {0, "ok"}, |
1645 | | {1, "auth"}, |
1646 | | {2, "sys"}, |
1647 | | {3, "sys-perm"}, |
1648 | | {4, "sys-temp"}, |
1649 | | {0, NULL} |
1650 | | }; |
1651 | | |
1652 | | static const true_false_string amqp_1_0_role_value = { |
1653 | | "receiver", |
1654 | | "sender" |
1655 | | }; |
1656 | | |
1657 | | static const value_string amqp_1_0_sndSettleMode_value[] = { |
1658 | | {0, "unsettled"}, |
1659 | | {1, "settled"}, |
1660 | | {2, "mixed"}, |
1661 | | {0, NULL} |
1662 | | }; |
1663 | | |
1664 | | static const value_string amqp_1_0_rcvSettleMode_value[] = { |
1665 | | {0, "first"}, |
1666 | | {1, "second"}, |
1667 | | {0, NULL} |
1668 | | }; |
1669 | | |
1670 | | static const value_string amqp_1_0_terminus_durable_value[] = { |
1671 | | {0, "none"}, |
1672 | | {1, "configuration"}, |
1673 | | {2, "unsettled-state"}, |
1674 | | {0, NULL} |
1675 | | }; |
1676 | | |
1677 | | static const value_string amqp_1_0_AMQP_performatives [] = { |
1678 | | {AMQP_1_0_AMQP_OPEN, "open"}, |
1679 | | {AMQP_1_0_AMQP_BEGIN, "begin"}, |
1680 | | {AMQP_1_0_AMQP_ATTACH, "attach"}, |
1681 | | {AMQP_1_0_AMQP_FLOW, "flow"}, |
1682 | | {AMQP_1_0_AMQP_TRANSFER, "transfer"}, |
1683 | | {AMQP_1_0_AMQP_DISPOSITION, "disposition"}, |
1684 | | {AMQP_1_0_AMQP_DETACH, "detach"}, |
1685 | | {AMQP_1_0_AMQP_END, "end"}, |
1686 | | {AMQP_1_0_AMQP_CLOSE, "close"}, |
1687 | | {0, NULL} |
1688 | | }; |
1689 | | |
1690 | | static const value_string amqp_1_0_SASL_methods [] = { |
1691 | | {AMQP_1_0_SASL_MECHANISMS, "sasl.mechanisms"}, |
1692 | | {AMQP_1_0_SASL_INIT, "sasl.init"}, |
1693 | | {AMQP_1_0_SASL_CHALLENGE, "sasl.challenge"}, |
1694 | | {AMQP_1_0_SASL_RESPONSE, "sasl.response"}, |
1695 | | {AMQP_1_0_SASL_OUTCOME, "sasl.outcome"}, |
1696 | | {0, NULL} |
1697 | | }; |
1698 | | |
1699 | | static const value_string amqp_1_0_type [] = { |
1700 | | {AMQP_1_0_AMQP_FRAME, "AMQP"}, |
1701 | | {AMQP_1_0_SASL_FRAME, "SASL"}, |
1702 | | {AMQP_1_0_TLS_FRAME, "TLS"}, |
1703 | | {0, NULL} |
1704 | | }; |
1705 | | |
1706 | | static const value_string amqp_0_10_frame_position [] = { |
1707 | | {0x00, "----"}, |
1708 | | {0x01, "---e"}, |
1709 | | {0x02, "--b-"}, |
1710 | | {0x03, "--be"}, |
1711 | | {0x04, "-E--"}, |
1712 | | {0x05, "-E-e"}, |
1713 | | {0x06, "-Eb-"}, |
1714 | | {0x07, "-Ebe"}, |
1715 | | {0x08, "B---"}, |
1716 | | {0x09, "B--e"}, |
1717 | | {0x0a, "B-b-"}, |
1718 | | {0x0b, "B-be"}, |
1719 | | {0x0c, "BE--"}, |
1720 | | {0x0d, "BE-e"}, |
1721 | | {0x0e, "BEb-"}, |
1722 | | {0x0f, "BEbe"}, |
1723 | | {0, NULL} |
1724 | | }; |
1725 | | |
1726 | | static const value_string amqp_0_10_frame_types [] = { |
1727 | | {0, "Control"}, |
1728 | | {1, "Command"}, |
1729 | | {2, "Header"}, |
1730 | | {3, "Body"}, |
1731 | | {0, NULL} |
1732 | | }; |
1733 | | |
1734 | | static const value_string amqp_0_10_frame_tracks [] = { |
1735 | | {0, "Control"}, |
1736 | | {1, "Command"}, |
1737 | | {0, NULL} |
1738 | | }; |
1739 | | |
1740 | | static const value_string amqp_0_10_class [] = { |
1741 | | {AMQP_0_10_CLASS_CONNECTION, "Connection"}, |
1742 | | {AMQP_0_10_CLASS_SESSION, "Session"}, |
1743 | | {AMQP_0_10_CLASS_EXECUTION, "Execution"}, |
1744 | | {AMQP_0_10_CLASS_MESSAGE, "Message"}, |
1745 | | {AMQP_0_10_CLASS_TX, "Tx"}, |
1746 | | {AMQP_0_10_CLASS_DTX, "Dtx"}, |
1747 | | {AMQP_0_10_CLASS_EXCHANGE, "Exchange"}, |
1748 | | {AMQP_0_10_CLASS_QUEUE, "Queue"}, |
1749 | | {AMQP_0_10_CLASS_FILE, "File"}, |
1750 | | {AMQP_0_10_CLASS_STREAM, "Stream"}, |
1751 | | {0, NULL} |
1752 | | }; |
1753 | | |
1754 | | static const value_string amqp_0_10_connection_methods [] = { |
1755 | | {AMQP_0_10_METHOD_CONNECTION_START, "connection.start"}, |
1756 | | {AMQP_0_10_METHOD_CONNECTION_START_OK, "connection.start-ok"}, |
1757 | | {AMQP_0_10_METHOD_CONNECTION_SECURE, "connection.secure"}, |
1758 | | {AMQP_0_10_METHOD_CONNECTION_SECURE_OK, "connection.secure-ok"}, |
1759 | | {AMQP_0_10_METHOD_CONNECTION_TUNE, "connection.tune"}, |
1760 | | {AMQP_0_10_METHOD_CONNECTION_TUNE_OK, "connection.tune-ok"}, |
1761 | | {AMQP_0_10_METHOD_CONNECTION_OPEN, "connection.open"}, |
1762 | | {AMQP_0_10_METHOD_CONNECTION_OPEN_OK, "connection.open-ok"}, |
1763 | | {AMQP_0_10_METHOD_CONNECTION_REDIRECT, "connection.redirect"}, |
1764 | | {AMQP_0_10_METHOD_CONNECTION_HEARTBEAT, "connection.heartbeat"}, |
1765 | | {AMQP_0_10_METHOD_CONNECTION_CLOSE, "connection.close"}, |
1766 | | {AMQP_0_10_METHOD_CONNECTION_CLOSE_OK, "connection.close-ok"}, |
1767 | | {0, NULL} |
1768 | | }; |
1769 | | |
1770 | | static const value_string amqp_0_10_session_methods [] = { |
1771 | | {AMQP_0_10_METHOD_SESSION_ATTACH, "session.attach"}, |
1772 | | {AMQP_0_10_METHOD_SESSION_ATTACHED, "session.attached"}, |
1773 | | {AMQP_0_10_METHOD_SESSION_DETACH, "session.detach"}, |
1774 | | {AMQP_0_10_METHOD_SESSION_DETACHED, "session.detached"}, |
1775 | | {AMQP_0_10_METHOD_SESSION_REQUEST_TIMEOUT, "session.request-timeout"}, |
1776 | | {AMQP_0_10_METHOD_SESSION_TIMEOUT, "session.timeout"}, |
1777 | | {AMQP_0_10_METHOD_SESSION_COMMAND_POINT, "session.command-point"}, |
1778 | | {AMQP_0_10_METHOD_SESSION_EXPECTED, "session.expected"}, |
1779 | | {AMQP_0_10_METHOD_SESSION_CONFIRMED, "session.confirmed"}, |
1780 | | {AMQP_0_10_METHOD_SESSION_COMPLETED, "session.completed"}, |
1781 | | {AMQP_0_10_METHOD_SESSION_KNOWN_COMPLETED, "session.known-completed"}, |
1782 | | {AMQP_0_10_METHOD_SESSION_FLUSH, "session.flush"}, |
1783 | | {AMQP_0_10_METHOD_SESSION_GAP, "session.gap"}, |
1784 | | {0, NULL} |
1785 | | }; |
1786 | | |
1787 | | static const value_string amqp_0_10_execution_methods [] = { |
1788 | | {AMQP_0_10_METHOD_EXECUTION_SYNC, "execution.sync"}, |
1789 | | {AMQP_0_10_METHOD_EXECUTION_RESULT, "execution.result"}, |
1790 | | {AMQP_0_10_METHOD_EXECUTION_EXCEPTION, "execution.exception"}, |
1791 | | {0, NULL} |
1792 | | }; |
1793 | | |
1794 | | static const value_string amqp_0_10_message_methods [] = { |
1795 | | {AMQP_0_10_METHOD_MESSAGE_TRANSFER, "message.transfer"}, |
1796 | | {AMQP_0_10_METHOD_MESSAGE_ACCEPT, "message.accept"}, |
1797 | | {AMQP_0_10_METHOD_MESSAGE_REJECT, "message.reject"}, |
1798 | | {AMQP_0_10_METHOD_MESSAGE_RELEASE, "message.release"}, |
1799 | | {AMQP_0_10_METHOD_MESSAGE_ACQUIRE, "message.acquire"}, |
1800 | | {AMQP_0_10_METHOD_MESSAGE_RESUME, "message.resume"}, |
1801 | | {AMQP_0_10_METHOD_MESSAGE_SUBSCRIBE, "message.subscribe"}, |
1802 | | {AMQP_0_10_METHOD_MESSAGE_CANCEL, "message.cancel"}, |
1803 | | {AMQP_0_10_METHOD_MESSAGE_SET_FLOW_MODE, "message.set-flow-mode"}, |
1804 | | {AMQP_0_10_METHOD_MESSAGE_FLOW, "message.flow"}, |
1805 | | {AMQP_0_10_METHOD_MESSAGE_FLUSH, "message.flush"}, |
1806 | | {AMQP_0_10_METHOD_MESSAGE_STOP, "message.stop"}, |
1807 | | {0, NULL} |
1808 | | }; |
1809 | | |
1810 | | static const value_string amqp_0_10_tx_methods [] = { |
1811 | | {AMQP_0_10_METHOD_TX_SELECT, "tx.select"}, |
1812 | | {AMQP_0_10_METHOD_TX_COMMIT, "tx.commit"}, |
1813 | | {AMQP_0_10_METHOD_TX_ROLLBACK, "tx.rollback"}, |
1814 | | {0, NULL} |
1815 | | }; |
1816 | | |
1817 | | static const value_string amqp_0_10_dtx_methods [] = { |
1818 | | {AMQP_0_10_METHOD_DTX_SELECT, "dtx.select"}, |
1819 | | {AMQP_0_10_METHOD_DTX_START, "dtx.start"}, |
1820 | | {AMQP_0_10_METHOD_DTX_END, "dtx.end"}, |
1821 | | {AMQP_0_10_METHOD_DTX_COMMIT, "dtx.commit"}, |
1822 | | {AMQP_0_10_METHOD_DTX_FORGET, "dtx.forget"}, |
1823 | | {AMQP_0_10_METHOD_DTX_GET_TIMEOUT, "dtx.get-timeout"}, |
1824 | | {AMQP_0_10_METHOD_DTX_PREPARE, "dtx.prepare"}, |
1825 | | {AMQP_0_10_METHOD_DTX_RECOVER, "dtx.recover"}, |
1826 | | {AMQP_0_10_METHOD_DTX_ROLLBACK, "dtx.rollback"}, |
1827 | | {AMQP_0_10_METHOD_DTX_SET_TIMEOUT, "dtx.set-timeout"}, |
1828 | | {0, NULL} |
1829 | | }; |
1830 | | |
1831 | | static const value_string amqp_0_10_exchange_methods [] = { |
1832 | | {AMQP_0_10_METHOD_EXCHANGE_DECLARE, "exchange.declare"}, |
1833 | | {AMQP_0_10_METHOD_EXCHANGE_DELETE, "exchange.delete"}, |
1834 | | {AMQP_0_10_METHOD_EXCHANGE_QUERY, "exchange.query"}, |
1835 | | {AMQP_0_10_METHOD_EXCHANGE_BIND, "exchange.bind"}, |
1836 | | {AMQP_0_10_METHOD_EXCHANGE_UNBIND, "exchange.unbind"}, |
1837 | | {AMQP_0_10_METHOD_EXCHANGE_BOUND, "exchange.bound"}, |
1838 | | {0, NULL} |
1839 | | }; |
1840 | | |
1841 | | static const value_string amqp_0_10_queue_methods [] = { |
1842 | | {AMQP_0_10_METHOD_QUEUE_DECLARE, "queue.declare"}, |
1843 | | {AMQP_0_10_METHOD_QUEUE_DELETE, "queue.delete"}, |
1844 | | {AMQP_0_10_METHOD_QUEUE_PURGE, "queue.purge"}, |
1845 | | {AMQP_0_10_METHOD_QUEUE_QUERY, "queue.query"}, |
1846 | | {0, NULL} |
1847 | | }; |
1848 | | |
1849 | | static const value_string amqp_0_10_file_methods [] = { |
1850 | | {AMQP_0_10_METHOD_FILE_QOS, "file.qos"}, |
1851 | | {AMQP_0_10_METHOD_FILE_QOS_OK, "file.qos-ok"}, |
1852 | | {AMQP_0_10_METHOD_FILE_CONSUME, "file.consume"}, |
1853 | | {AMQP_0_10_METHOD_FILE_CONSUME_OK, "file.consume-ok"}, |
1854 | | {AMQP_0_10_METHOD_FILE_CANCEL, "file.cancel"}, |
1855 | | {AMQP_0_10_METHOD_FILE_OPEN, "file.open"}, |
1856 | | {AMQP_0_10_METHOD_FILE_OPEN_OK, "file.open-ok"}, |
1857 | | {AMQP_0_10_METHOD_FILE_STAGE, "file.stage"}, |
1858 | | {AMQP_0_10_METHOD_FILE_PUBLISH, "file.publish"}, |
1859 | | {AMQP_0_10_METHOD_FILE_RETURN, "file.return"}, |
1860 | | {AMQP_0_10_METHOD_FILE_DELIVER, "file.deliver"}, |
1861 | | {AMQP_0_10_METHOD_FILE_ACK, "file.ack"}, |
1862 | | {AMQP_0_10_METHOD_FILE_REJECT, "file.reject"}, |
1863 | | {0, NULL} |
1864 | | }; |
1865 | | |
1866 | | static const value_string amqp_0_10_stream_methods [] = { |
1867 | | {AMQP_0_10_METHOD_STREAM_QOS, "stream.qos"}, |
1868 | | {AMQP_0_10_METHOD_STREAM_QOS_OK, "stream.qos-ok"}, |
1869 | | {AMQP_0_10_METHOD_STREAM_CONSUME, "stream.consume"}, |
1870 | | {AMQP_0_10_METHOD_STREAM_CONSUME_OK, "stream.consume-ok"}, |
1871 | | {AMQP_0_10_METHOD_STREAM_CANCEL, "stream.cancel"}, |
1872 | | {AMQP_0_10_METHOD_STREAM_PUBLISH, "stream.publish"}, |
1873 | | {AMQP_0_10_METHOD_STREAM_RETURN, "stream.return"}, |
1874 | | {AMQP_0_10_METHOD_STREAM_DELIVER, "stream.deliver"}, |
1875 | | {0, NULL} |
1876 | | }; |
1877 | | |
1878 | | static const value_string amqp_0_10_method_connection_close_reply_codes [] = { |
1879 | | {200, "normal"}, |
1880 | | {320, "connection-forced"}, |
1881 | | {402, "invalid-path"}, |
1882 | | {501, "framing-error"}, |
1883 | | {0, NULL} |
1884 | | }; |
1885 | | |
1886 | | static const true_false_string amqp_0_10_session_header_sync = { |
1887 | | "notification requested", "notification NOT requested" |
1888 | | }; |
1889 | | |
1890 | | static const value_string amqp_0_10_method_session_detached_codes [] = { |
1891 | | {0, "normal"}, |
1892 | | {1, "session-busy"}, |
1893 | | {2, "transport-busy"}, |
1894 | | {3, "not-attached"}, |
1895 | | {4, "unknown-ids"}, |
1896 | | {0, NULL} |
1897 | | }; |
1898 | | |
1899 | | static const value_string amqp_0_10_method_execution_exception_errors [] = { |
1900 | | {403, "unauthorized-access"}, |
1901 | | {404, "not-found"}, |
1902 | | {405, "resource-locked"}, |
1903 | | {406, "precondition-failed"}, |
1904 | | {408, "resource-deleted"}, |
1905 | | {409, "illegal-state"}, |
1906 | | {503, "command-invalid"}, |
1907 | | {506, "resource-limit-exceeded"}, |
1908 | | {530, "not-allowed"}, |
1909 | | {531, "illegal-argument"}, |
1910 | | {540, "not-implemented"}, |
1911 | | {541, "internal-error"}, |
1912 | | {542, "invalid-argument"}, |
1913 | | {0, NULL} |
1914 | | }; |
1915 | | |
1916 | | static const value_string amqp_0_10_message_transfer_accept_modes [] = { |
1917 | | {0, "explicit"}, |
1918 | | {1, "none"}, |
1919 | | {0, NULL} |
1920 | | }; |
1921 | | |
1922 | | static const value_string amqp_0_10_message_transfer_acquire_modes [] = { |
1923 | | {0, "pre-acquired"}, |
1924 | | {1, "not-acquired"}, |
1925 | | {0, NULL} |
1926 | | }; |
1927 | | |
1928 | | static const value_string amqp_0_10_message_transfer_reject_codes [] = { |
1929 | | {0, "unspecified"}, |
1930 | | {1, "unroutable"}, |
1931 | | {2, "immediate"}, |
1932 | | {0, NULL} |
1933 | | }; |
1934 | | |
1935 | | static const value_string amqp_0_10_message_flow_modes [] = { |
1936 | | {0, "credit"}, |
1937 | | {1, "window"}, |
1938 | | {0, NULL} |
1939 | | }; |
1940 | | |
1941 | | static const value_string amqp_0_10_message_credit_units [] = { |
1942 | | {0, "message"}, |
1943 | | {1, "byte"}, |
1944 | | {0, NULL} |
1945 | | }; |
1946 | | |
1947 | | static const value_string amqp_0_10_xa_status [] = { |
1948 | | {0, "Normal execution completion. (xa-ok)"}, |
1949 | | {1, "The rollback was caused for an unspecified reason. (xa-rbrollback)"}, |
1950 | | {2, "A transaction branch took too long. (xa-rbtimeout)"}, |
1951 | | {3, "The transaction branch may have been heuristically completed. (xa-heurhaz)"}, |
1952 | | {4, "The transaction branch has been heuristically committed. (xa-heurcom)"}, |
1953 | | {5, "The transaction branch has been heuristically rolled back. (xa-heurrb)"}, |
1954 | | {6, "The transaction branch has been heuristically committed and rolled back. (xa-heurmix)"}, |
1955 | | {7, "The transaction branch was read-only and has been committed. (xa-rdonly)"}, |
1956 | | {0, NULL} |
1957 | | }; |
1958 | | |
1959 | | static const value_string amqp_0_10_struct_delivery_properties_priorities [] = { |
1960 | | {0, "lowest"}, |
1961 | | {1, "lower"}, |
1962 | | {2, "low"}, |
1963 | | {3, "below-average"}, |
1964 | | {4, "medium"}, |
1965 | | {5, "above-average"}, |
1966 | | {6, "high"}, |
1967 | | {7, "higher"}, |
1968 | | {8, "very-high"}, |
1969 | | {9, "highest"}, |
1970 | | {0, NULL} |
1971 | | }; |
1972 | | |
1973 | | static const value_string amqp_0_10_struct_delivery_properties_modes [] = { |
1974 | | {1, "non-persistent"}, |
1975 | | {2, "persistent"}, |
1976 | | {0, NULL} |
1977 | | }; |
1978 | | |
1979 | | static const value_string amqp_0_10_file_return_codes [] = { |
1980 | | {311, "content-too-large"}, |
1981 | | {312, "no-route"}, |
1982 | | {313, "no-consumers"}, |
1983 | | {0, NULL} |
1984 | | }; |
1985 | | |
1986 | | static const value_string amqp_0_10_stream_return_codes [] = { |
1987 | | {311, "content-too-large"}, |
1988 | | {312, "no-route"}, |
1989 | | {313, "no-consumers"}, |
1990 | | {0, NULL} |
1991 | | }; |
1992 | | |
1993 | | static const value_string amqp_0_10_struct32_vals[] = { |
1994 | | { ((AMQP_0_10_CLASS_MESSAGE << 8) | (AMQP_0_10_STRUCT_MESSAGE_DELIVERY_PROPERTIES)), "message.delivery-properties" }, |
1995 | | { ((AMQP_0_10_CLASS_MESSAGE << 8) | (AMQP_0_10_STRUCT_MESSAGE_FRAGMENT_PROPERTIES)), "message.fragment-properties" }, |
1996 | | { ((AMQP_0_10_CLASS_MESSAGE << 8) | (AMQP_0_10_STRUCT_MESSAGE_MESSAGE_PROPERTIES)), "message.message-properties" }, |
1997 | | { ((AMQP_0_10_CLASS_MESSAGE << 8) | (AMQP_0_10_STRUCT_MESSAGE_ACQUIRED)), "message.acquired" }, |
1998 | | { ((AMQP_0_10_CLASS_MESSAGE << 8) | (AMQP_0_10_STRUCT_MESSAGE_RESUME_RESULT)), "message.resume-result" }, |
1999 | | { ((AMQP_0_10_CLASS_DTX << 8) | (AMQP_0_10_STRUCT_DTX_XA_RESULT)), "dtx.xa-status" }, |
2000 | | { ((AMQP_0_10_CLASS_DTX << 8) | (AMQP_0_10_STRUCT_DTX_RECOVER_RESULT)), "dtx.recover-result" }, |
2001 | | { ((AMQP_0_10_CLASS_EXCHANGE << 8) | (AMQP_0_10_STRUCT_EXCHANGE_QUERY_RESULT)), "exchange.exchange-query-result" }, |
2002 | | { ((AMQP_0_10_CLASS_EXCHANGE << 8) | (AMQP_0_10_STRUCT_EXCHANGE_BOUND_RESULT)), "exchange.exchange-bound-result" }, |
2003 | | { ((AMQP_0_10_CLASS_QUEUE << 8) | (AMQP_0_10_STRUCT_QUEUE_QUERY_RESULT)), "queue.queue-query-result" }, |
2004 | | { ((AMQP_0_10_CLASS_FILE << 8) | (AMQP_0_10_STRUCT_FILE_PROPERTIES)), "file.file-properties" }, |
2005 | | { ((AMQP_0_10_CLASS_STREAM << 8) | (AMQP_0_10_STRUCT_STREAM_PROPERTIES)), "stream.stream-properties" }, |
2006 | | { 0, NULL } |
2007 | | }; |
2008 | | |
2009 | | static const value_string amqp_0_9_frame_types [] = { |
2010 | | {AMQP_0_9_FRAME_TYPE_METHOD, "Method"}, |
2011 | | {AMQP_0_9_FRAME_TYPE_CONTENT_HEADER, "Content header"}, |
2012 | | {AMQP_0_9_FRAME_TYPE_CONTENT_BODY, "Content body"}, |
2013 | | {AMQP_0_9_FRAME_TYPE_OOB_METHOD, "OOB Method"}, |
2014 | | {AMQP_0_9_FRAME_TYPE_OOB_CONTENT_HEADER, "OOB Content header"}, |
2015 | | {AMQP_0_9_FRAME_TYPE_OOB_CONTENT_BODY, "OOB Content body"}, |
2016 | | {AMQP_0_9_FRAME_TYPE_TRACE , "Trace"}, |
2017 | | {AMQP_0_9_FRAME_TYPE_HEARTBEAT, "Heartbeat"}, |
2018 | | {0, NULL} |
2019 | | }; |
2020 | | |
2021 | | static const value_string amqp_0_9_method_classes [] = { |
2022 | | {AMQP_0_9_CLASS_CONNECTION, "Connection"}, |
2023 | | {AMQP_0_9_CLASS_CHANNEL, "Channel"}, |
2024 | | {AMQP_0_9_CLASS_ACCESS, "Access"}, |
2025 | | {AMQP_0_9_CLASS_EXCHANGE, "Exchange"}, |
2026 | | {AMQP_0_9_CLASS_QUEUE, "Queue"}, |
2027 | | {AMQP_0_9_CLASS_BASIC, "Basic"}, |
2028 | | {AMQP_0_9_CLASS_FILE, "File"}, |
2029 | | {AMQP_0_9_CLASS_STREAM, "Stream"}, |
2030 | | {AMQP_0_9_CLASS_TX, "Tx"}, |
2031 | | {AMQP_0_9_CLASS_DTX, "Dtx"}, |
2032 | | {AMQP_0_9_CLASS_TUNNEL, "Tunnel"}, |
2033 | | {AMQP_0_9_CLASS_CONFIRM, "Confirm"}, |
2034 | | {0, NULL} |
2035 | | }; |
2036 | | |
2037 | | static const value_string amqp_method_connection_methods [] = { |
2038 | | {10, "Start"}, |
2039 | | {11, "Start-Ok"}, |
2040 | | {20, "Secure"}, |
2041 | | {21, "Secure-Ok"}, |
2042 | | {30, "Tune"}, |
2043 | | {31, "Tune-Ok"}, |
2044 | | {40, "Open"}, |
2045 | | {41, "Open-Ok"}, |
2046 | | {42, "Redirect"}, |
2047 | | {50, "Close"}, |
2048 | | {51, "Close-Ok"}, |
2049 | | {60, "Blocked"}, |
2050 | | {61, "Unblocked"}, |
2051 | | {0, NULL} |
2052 | | }; |
2053 | | |
2054 | | static const value_string amqp_method_channel_methods [] = { |
2055 | | {10, "Open"}, |
2056 | | {11, "Open-Ok"}, |
2057 | | {20, "Flow"}, |
2058 | | {21, "Flow-Ok"}, |
2059 | | {40, "Close"}, |
2060 | | {41, "Close-Ok"}, |
2061 | | {50, "Resume"}, |
2062 | | {60, "Ping"}, |
2063 | | {70, "Pong"}, |
2064 | | {80, "Ok"}, |
2065 | | {0, NULL} |
2066 | | }; |
2067 | | |
2068 | | static const value_string amqp_method_access_methods [] = { |
2069 | | {10, "Request"}, |
2070 | | {11, "Request-Ok"}, |
2071 | | {0, NULL} |
2072 | | }; |
2073 | | |
2074 | | static const value_string amqp_method_exchange_methods [] = { |
2075 | | {10, "Declare"}, |
2076 | | {11, "Declare-Ok"}, |
2077 | | {20, "Delete"}, |
2078 | | {21, "Delete-Ok"}, |
2079 | | {30, "Bind"}, |
2080 | | {31, "Bind-Ok"}, |
2081 | | {40, "Unbind"}, |
2082 | | {41, "Unbind-Ok"}, |
2083 | | {0, NULL} |
2084 | | }; |
2085 | | |
2086 | | static const value_string amqp_method_queue_methods [] = { |
2087 | | {10, "Declare"}, |
2088 | | {11, "Declare-Ok"}, |
2089 | | {20, "Bind"}, |
2090 | | {21, "Bind-Ok"}, |
2091 | | {50, "Unbind"}, |
2092 | | {51, "Unbind-Ok"}, |
2093 | | {30, "Purge"}, |
2094 | | {31, "Purge-Ok"}, |
2095 | | {40, "Delete"}, |
2096 | | {41, "Delete-Ok"}, |
2097 | | {0, NULL} |
2098 | | }; |
2099 | | |
2100 | | static const value_string amqp_method_basic_methods [] = { |
2101 | | {10, "Qos"}, |
2102 | | {11, "Qos-Ok"}, |
2103 | | {20, "Consume"}, |
2104 | | {21, "Consume-Ok"}, |
2105 | | {30, "Cancel"}, |
2106 | | {31, "Cancel-Ok"}, |
2107 | | {40, "Publish"}, |
2108 | | {50, "Return"}, |
2109 | | {60, "Deliver"}, |
2110 | | {70, "Get"}, |
2111 | | {71, "Get-Ok"}, |
2112 | | {72, "Get-Empty"}, |
2113 | | {80, "Ack"}, |
2114 | | {90, "Reject"}, |
2115 | | /* basic(100) is in 0-9 called Recover and in 0-9-1 Recover.Async, |
2116 | | * we will use the more recent 0-9-1 terminology */ |
2117 | | {100, "Recover-Async"}, |
2118 | | {110, "Recover"}, |
2119 | | {111, "Recover-Ok"}, |
2120 | | {120, "Nack"}, |
2121 | | {0, NULL} |
2122 | | }; |
2123 | | |
2124 | | static const value_string amqp_method_file_methods [] = { |
2125 | | {10, "Qos"}, |
2126 | | {11, "Qos-Ok"}, |
2127 | | {20, "Consume"}, |
2128 | | {21, "Consume-Ok"}, |
2129 | | {30, "Cancel"}, |
2130 | | {31, "Cancel-Ok"}, |
2131 | | {40, "Open"}, |
2132 | | {41, "Open-Ok"}, |
2133 | | {50, "Stage"}, |
2134 | | {60, "Publish"}, |
2135 | | {70, "Return"}, |
2136 | | {80, "Deliver"}, |
2137 | | {90, "Ack"}, |
2138 | | {100, "Reject"}, |
2139 | | {0, NULL} |
2140 | | }; |
2141 | | |
2142 | | static const value_string amqp_method_stream_methods [] = { |
2143 | | {10, "Qos"}, |
2144 | | {11, "Qos-Ok"}, |
2145 | | {20, "Consume"}, |
2146 | | {21, "Consume-Ok"}, |
2147 | | {30, "Cancel"}, |
2148 | | {31, "Cancel-Ok"}, |
2149 | | {40, "Publish"}, |
2150 | | {50, "Return"}, |
2151 | | {60, "Deliver"}, |
2152 | | {0, NULL} |
2153 | | }; |
2154 | | |
2155 | | static const value_string amqp_method_tx_methods [] = { |
2156 | | {10, "Select"}, |
2157 | | {11, "Select-Ok"}, |
2158 | | {20, "Commit"}, |
2159 | | {21, "Commit-Ok"}, |
2160 | | {30, "Rollback"}, |
2161 | | {31, "Rollback-Ok"}, |
2162 | | {0, NULL} |
2163 | | }; |
2164 | | |
2165 | | static const value_string amqp_method_dtx_methods [] = { |
2166 | | {10, "Select"}, |
2167 | | {11, "Select-Ok"}, |
2168 | | {20, "Start"}, |
2169 | | {21, "Start-Ok"}, |
2170 | | {0, NULL} |
2171 | | }; |
2172 | | |
2173 | | static const value_string amqp_method_tunnel_methods [] = { |
2174 | | {10, "Request"}, |
2175 | | {0, NULL} |
2176 | | }; |
2177 | | |
2178 | | static const value_string amqp_0_10_array_type_vals [] = { |
2179 | | {AMQP_0_10_TYPE_STR16, "str16"}, |
2180 | | {AMQP_0_10_TYPE_STRUCT32, "struct32"}, |
2181 | | {0, NULL} |
2182 | | }; |
2183 | | |
2184 | | static const value_string amqp_method_confirm_methods [] = { |
2185 | | {10, "Select"}, |
2186 | | {11, "Select-Ok"}, |
2187 | | {0, NULL} |
2188 | | }; |
2189 | | |
2190 | | /* AMQP 0-10 Type Info */ |
2191 | | static const struct amqp_typeinfo amqp_0_10_fixed_types[] = { |
2192 | | { 0x00, "bin8", format_amqp_0_10_bin, 1 }, |
2193 | | { 0x01, "int8", format_amqp_0_10_int, 1 }, |
2194 | | { 0x02, "uint8", format_amqp_0_10_uint, 1 }, |
2195 | | { 0x04, "char", format_amqp_0_10_char, 1 }, |
2196 | | { 0x08, "boolean", format_amqp_0_10_boolean, 1 }, |
2197 | | { 0x10, "bin16", format_amqp_0_10_bin, 2 }, |
2198 | | { 0x11, "int16", format_amqp_0_10_int, 2 }, |
2199 | | { 0x12, "uint16", format_amqp_0_10_uint, 2 }, |
2200 | | { 0x20, "bin32", format_amqp_0_10_bin, 4 }, |
2201 | | { 0x21, "int32", format_amqp_0_10_int, 4 }, |
2202 | | { 0x22, "uint32", format_amqp_0_10_uint, 4 }, |
2203 | | { 0xff, "end", 0, 0 } |
2204 | | }; |
2205 | | |
2206 | | static const struct amqp_typeinfo amqp_0_10_var_types[] = { |
2207 | | { 0x80, "vbin8", format_amqp_0_10_vbin, 1 }, |
2208 | | { 0x95, "str16", format_amqp_0_10_str, 2 }, |
2209 | | { 0xff, "end", 0, 0 } |
2210 | | }; |
2211 | | |
2212 | | /* AMQP 1.0 Type Info */ |
2213 | | static const struct amqp1_typeinfo amqp_1_0_fixed_types[] = { |
2214 | | { 0x40, "null", FT_NONE, 0, dissect_amqp_1_0_skip, format_amqp_1_0_null }, |
2215 | | { 0x41, "bool", FT_BOOLEAN, 0, dissect_amqp_1_0_true, format_amqp_1_0_boolean_true }, |
2216 | | { 0x42, "bool", FT_BOOLEAN, 0, dissect_amqp_1_0_false, format_amqp_1_0_boolean_false }, |
2217 | | { 0x56, "bool", FT_BOOLEAN, 1, dissect_amqp_1_0_fixed, format_amqp_1_0_boolean }, |
2218 | | { 0x50, "ubyte", FT_UINT8, 1, dissect_amqp_1_0_fixed, format_amqp_1_0_uint }, |
2219 | | { 0x60, "ushort", FT_UINT16, 2, dissect_amqp_1_0_fixed, format_amqp_1_0_uint }, |
2220 | | { 0x70, "uint", FT_UINT32, 4, dissect_amqp_1_0_fixed, format_amqp_1_0_uint }, |
2221 | | { 0x52, "smalluint", FT_UINT8, 1, dissect_amqp_1_0_fixed, format_amqp_1_0_uint }, |
2222 | | { 0x43, "uint0", FT_UINT8, 0, dissect_amqp_1_0_zero, format_amqp_1_0_uint }, |
2223 | | { 0x80, "ulong", FT_UINT64, 8, dissect_amqp_1_0_fixed, format_amqp_1_0_uint }, |
2224 | | { 0x53, "smallulong", FT_UINT8, 1, dissect_amqp_1_0_fixed, format_amqp_1_0_uint }, |
2225 | | { 0x44, "ulong0", FT_UINT8, 0, dissect_amqp_1_0_zero, format_amqp_1_0_uint }, |
2226 | | { 0x51, "byte", FT_INT8, 1, dissect_amqp_1_0_fixed, format_amqp_1_0_int }, |
2227 | | { 0x61, "short", FT_INT16, 2, dissect_amqp_1_0_fixed, format_amqp_1_0_int }, |
2228 | | { 0x71, "int", FT_INT32, 4, dissect_amqp_1_0_fixed, format_amqp_1_0_int }, |
2229 | | { 0x54, "smallint", FT_INT8, 1, dissect_amqp_1_0_fixed, format_amqp_1_0_int }, |
2230 | | { 0x81, "long", FT_INT64, 8, dissect_amqp_1_0_fixed, format_amqp_1_0_int }, |
2231 | | { 0x55, "smalllong", FT_INT8, 1, dissect_amqp_1_0_fixed, format_amqp_1_0_int }, |
2232 | | { 0x72, "float", FT_FLOAT, 4, dissect_amqp_1_0_fixed, format_amqp_1_0_float }, |
2233 | | { 0x82, "double", FT_DOUBLE, 8, dissect_amqp_1_0_fixed, format_amqp_1_0_double }, |
2234 | | { 0x74, "decimal32", FT_BYTES, 4, dissect_amqp_1_0_fixed, format_amqp_1_0_decimal }, |
2235 | | { 0x84, "decimal64", FT_BYTES, 8, dissect_amqp_1_0_fixed, format_amqp_1_0_decimal }, |
2236 | | { 0x94, "decimal128", FT_BYTES, 16, dissect_amqp_1_0_fixed, format_amqp_1_0_decimal }, |
2237 | | { 0x73, "char", FT_STRING, 4, dissect_amqp_1_0_fixed, format_amqp_1_0_char }, |
2238 | | { 0x83, "timestamp", FT_ABSOLUTE_TIME, 8, dissect_amqp_1_0_timestamp, format_amqp_1_0_timestamp }, |
2239 | | { 0x98, "uuid", FT_GUID, 16, dissect_amqp_1_0_fixed, format_amqp_1_0_uuid }, |
2240 | | { 0xa0, "vbin8", FT_BYTES, 1, dissect_amqp_1_0_variable, format_amqp_1_0_bin }, |
2241 | | { 0xb0, "vbin32", FT_BYTES, 4, dissect_amqp_1_0_variable, format_amqp_1_0_bin }, |
2242 | | { 0xa1, "str8-utf8", FT_STRING, 1, dissect_amqp_1_0_variable, format_amqp_1_0_str }, |
2243 | | { 0xb1, "str32-utf8", FT_STRING, 4, dissect_amqp_1_0_variable, format_amqp_1_0_str }, |
2244 | | { 0xa3, "sym8", FT_STRING, 1, dissect_amqp_1_0_variable, format_amqp_1_0_symbol }, |
2245 | | { 0xb3, "sym32", FT_STRING, 4, dissect_amqp_1_0_variable, format_amqp_1_0_symbol }, |
2246 | | { 0xff, "end", 0, 0, 0, 0 } |
2247 | | }; |
2248 | | |
2249 | | /* see explanation at declaration of amqp_defined_types_t */ |
2250 | | static const struct amqp_defined_types_t amqp_1_0_defined_types[] = { |
2251 | | {AMQP_1_0_AMQP_TYPE_ERROR, &hf_amqp_1_0_error, 3, amqp_1_0_error_items }, |
2252 | | {AMQP_1_0_AMQP_TYPE_HEADER, &hf_amqp_1_0_messageHeader, 5, amqp_1_0_messageHeader_items }, |
2253 | | {AMQP_1_0_AMQP_TYPE_DELIVERY_ANNOTATIONS, &hf_amqp_1_0_deliveryAnnotations, 0, NULL }, |
2254 | | {AMQP_1_0_AMQP_TYPE_MESSAGE_ANNOTATIONS, &hf_amqp_1_0_messageAnnotations, 0, NULL }, |
2255 | | {AMQP_1_0_AMQP_TYPE_PROPERTIES, &hf_amqp_1_0_messageProperties, 13, amqp_1_0_messageProperties_items }, |
2256 | | {AMQP_1_0_AMQP_TYPE_APPLICATION_PROPERTIES, &hf_amqp_1_0_applicationProperties, 0, NULL }, |
2257 | | {AMQP_1_0_AMQP_TYPE_DATA, &hf_amqp_1_0_data, 0, NULL }, |
2258 | | {AMQP_1_0_AMQP_TYPE_AMQP_SEQUENCE, &hf_amqp_1_0_amqp_sequence, 0, NULL }, |
2259 | | {AMQP_1_0_AMQP_TYPE_AMQP_VALUE, &hf_amqp_1_0_amqp_value, 0, NULL }, |
2260 | | {AMQP_1_0_AMQP_TYPE_FOOTER, &hf_amqp_1_0_footer, 0, NULL }, |
2261 | | {AMQP_1_0_AMQP_TYPE_RECEIVED, &hf_amqp_1_0_received, 2, amqp_1_0_received_items }, |
2262 | | {AMQP_1_0_AMQP_TYPE_ACCEPTED, &hf_amqp_1_0_accepted, 0, NULL }, |
2263 | | {AMQP_1_0_AMQP_TYPE_REJECTED, &hf_amqp_1_0_rejected, 1, amqp_1_0_rejected_items }, |
2264 | | {AMQP_1_0_AMQP_TYPE_RELEASED, &hf_amqp_1_0_released, 0, NULL }, |
2265 | | {AMQP_1_0_AMQP_TYPE_MODIFIED, &hf_amqp_1_0_modified, 3, amqp_1_0_modified_items }, |
2266 | | {AMQP_1_0_AMQP_TYPE_SOURCE, &hf_amqp_1_0_source, 11, amqp_1_0_source_items }, |
2267 | | {AMQP_1_0_AMQP_TYPE_TARGET, &hf_amqp_1_0_target, 7, amqp_1_0_target_items }, |
2268 | | {AMQP_1_0_AMQP_TYPE_DELETE_ON_CLOSE, &hf_amqp_1_0_deleteOnClose, 0, NULL }, |
2269 | | {AMQP_1_0_AMQP_TYPE_DELETE_ON_NO_LINKS, &hf_amqp_1_0_deleteOnNoLinks, 0, NULL }, |
2270 | | {AMQP_1_0_AMQP_TYPE_DELETE_ON_NO_MESSAGE, &hf_amqp_1_0_deleteOnNoMessages, 0, NULL }, |
2271 | | {AMQP_1_0_AMQP_TYPE_DELETE_ON_NO_LINKS_OR_MESSAGE, &hf_amqp_1_0_deleteOnNoLinksOrMessages, 0, NULL }, |
2272 | | {AMQP_1_0_AMQP_TYPE_COORDINATOR, &hf_amqp_1_0_coordinator, 1, amqp_1_0_coordinator_items }, |
2273 | | {AMQP_1_0_AMQP_TYPE_DECLARE, &hf_amqp_1_0_declare, 1, amqp_1_0_declare_items }, |
2274 | | {AMQP_1_0_AMQP_TYPE_DISCHARGE, &hf_amqp_1_0_discharge, 2, amqp_1_0_discharge_items }, |
2275 | | {AMQP_1_0_AMQP_TYPE_DECLARED, &hf_amqp_1_0_declared, 1, amqp_1_0_declared_items }, |
2276 | | {AMQP_1_0_AMQP_TYPE_TRANSACTIONAL_STATE, &hf_amqp_1_0_transactionalState, 2, amqp_1_0_transactionalState_items }, |
2277 | | { 0, NULL, 0, NULL } |
2278 | | }; |
2279 | | |
2280 | | static void |
2281 | | check_amqp_version(tvbuff_t *tvb, amqp_conv *conn) |
2282 | 87 | { |
2283 | 87 | uint32_t f0_9_length; |
2284 | | |
2285 | | /* |
2286 | | * If we already know and the version and this isn't a protocol header, |
2287 | | * return ok. 0-10 and up can run protocol headers in each direction, |
2288 | | * so if it looks like a protocol header, snag the version even if one |
2289 | | * is already recorded. Multi-protocol brokers can negotiate down. |
2290 | | */ |
2291 | 87 | if ((conn->version != 0) && (tvb_get_uint8(tvb, 0) != 'A')) |
2292 | 7 | return; |
2293 | | |
2294 | 80 | if (tvb_memeql(tvb, 0, (const uint8_t*)"AMQP", 4) == 0) { |
2295 | | /* AMQP 0-* has protocol major/minor in 6th/7th byte, while AMQP 1.0 |
2296 | | * has it in 5th/6th byte (7th is revision) |
2297 | | */ |
2298 | 1 | uint8_t fivth_byte; |
2299 | 1 | uint8_t sixth_byte; |
2300 | 1 | uint8_t seventh_byte; |
2301 | | |
2302 | 1 | fivth_byte = tvb_get_uint8(tvb, 5); |
2303 | 1 | sixth_byte = tvb_get_uint8(tvb, 6); |
2304 | 1 | seventh_byte = tvb_get_uint8(tvb, 7); |
2305 | 1 | if ((fivth_byte == 1) && (sixth_byte == 0) && (seventh_byte == 0)) |
2306 | 0 | conn->version = AMQP_V1_0; |
2307 | 1 | else if (sixth_byte == 0) { |
2308 | 0 | if (seventh_byte == 9) |
2309 | 0 | conn->version = AMQP_V0_9; |
2310 | 0 | else if (seventh_byte == 10) |
2311 | 0 | conn->version = AMQP_V0_10; |
2312 | 0 | } |
2313 | 1 | return; |
2314 | 1 | } |
2315 | | |
2316 | | /* |
2317 | | * It's not a protocol header and the AMQP version isn't known. Try to |
2318 | | * deduce it from the content. |
2319 | | * |
2320 | | * First indicator is the frame length. 0-9 has a 32-bit length in |
2321 | | * octets 3-7. In 0-10, those are the second octet of the segment type, |
2322 | | * one reserved octet that should always be zero, a four-bit track number |
2323 | | * (high bits zero), and the first octet of the 16-bit channel number. |
2324 | | * In 1.0, those are the lowest-value octet of the 32-bit frame size, |
2325 | | * an octet for data offset (at least 2), a type code octet (0x00 for |
2326 | | * an AMQP frame, 0x01 for a SASL frame), and the first of two |
2327 | | * type-specific octets in the frame header. |
2328 | | * |
2329 | | * If the frame fits within the PDU, and there's a frame end byte (0xCE) |
2330 | | * where it should be, this is almost certainly 0-9. (Compare with "less |
2331 | | * than or equal to", as there may be more than one frame in a PDU.) |
2332 | | * |
2333 | | * Else, higher version. 0-10 has 5th octet 0x00 while 1.0 |
2334 | | * has there at least 2 (DOFF) - use this fact to determine. |
2335 | | */ |
2336 | 79 | f0_9_length = tvb_get_ntohl(tvb, 3) + 7 + 1; /* Add header and end */ |
2337 | 79 | if ((f0_9_length <= tvb_reported_length(tvb)) && |
2338 | 79 | (tvb_get_uint8(tvb, f0_9_length - 1) == 0xCE)) |
2339 | 0 | conn->version = AMQP_V0_9; |
2340 | 79 | else if (tvb_get_uint8(tvb, 4) == 0x00) |
2341 | 66 | conn->version = AMQP_V0_10; |
2342 | 13 | else |
2343 | 13 | conn->version = AMQP_V1_0; |
2344 | 79 | return; |
2345 | 80 | } |
2346 | | |
2347 | | |
2348 | | static unsigned |
2349 | | get_amqp_1_0_message_len(packet_info *pinfo _U_, tvbuff_t *tvb, |
2350 | | int offset, void *data _U_) |
2351 | 17 | { |
2352 | | /* Heuristic - protocol initialisation frame starts with 'AMQP' */ |
2353 | 17 | if (tvb_memeql(tvb, offset, (const uint8_t*)"AMQP", 4) == 0) |
2354 | 0 | return 8; |
2355 | 17 | return (unsigned) tvb_get_ntohl(tvb, offset); |
2356 | 17 | } |
2357 | | |
2358 | | static unsigned |
2359 | | get_amqp_0_10_message_len(packet_info *pinfo _U_, tvbuff_t *tvb, |
2360 | | int offset, void *data _U_) |
2361 | 105 | { |
2362 | | /* Heuristic - protocol initialisation frame starts with 'AMQP' */ |
2363 | 105 | if (tvb_memeql(tvb, offset, (const uint8_t*)"AMQP", 4) == 0) |
2364 | 0 | return 8; |
2365 | | |
2366 | 105 | return (unsigned) tvb_get_ntohs(tvb, offset + 2); /* Max *frame* length = 65K; */ |
2367 | 105 | } |
2368 | | |
2369 | | static unsigned |
2370 | | get_amqp_0_9_message_len(packet_info *pinfo _U_, tvbuff_t *tvb, |
2371 | | int offset, void *data _U_) |
2372 | 0 | { |
2373 | 0 | uint32_t length; |
2374 | | |
2375 | | /* Heuristic - protocol initialisation frame starts with 'AMQP' */ |
2376 | 0 | if (tvb_memeql(tvb, offset, (const uint8_t*)"AMQP", 4) == 0) |
2377 | 0 | return 8; |
2378 | | |
2379 | | /* |
2380 | | * XXX - the location of the length differs from protocol version to |
2381 | | * protocol version; for now, we only handle version 0-9, and we |
2382 | | * clamp the length at 1MB so we don't go nuts if we get a bogus |
2383 | | * length due to dissecting the wrong version (or getting a malformed |
2384 | | * packet). |
2385 | | */ |
2386 | 0 | length = tvb_get_ntohl(tvb, offset + 3); |
2387 | 0 | if (length > 1048576) /* [0x100000] */ |
2388 | 0 | length = 1048576; |
2389 | 0 | return length + 8; |
2390 | 0 | } |
2391 | | |
2392 | | |
2393 | | /* Dissection routine for AMQP 0-9 field tables */ |
2394 | | |
2395 | | static void |
2396 | | // NOLINTNEXTLINE(misc-no-recursion) |
2397 | | dissect_amqp_0_9_field_table(tvbuff_t *tvb, packet_info *pinfo, int offset, unsigned length, proto_item *item) |
2398 | 0 | { |
2399 | 0 | proto_tree *field_table_tree, *field_item_tree; |
2400 | 0 | proto_item *field_item; |
2401 | 0 | unsigned namelen, vallen; |
2402 | 0 | const uint8_t *name; |
2403 | 0 | int field_start; |
2404 | |
|
2405 | 0 | field_table_tree = proto_item_add_subtree(item, ett_amqp); |
2406 | |
|
2407 | 0 | while (length != 0) { |
2408 | 0 | field_start = offset; |
2409 | 0 | field_item = proto_tree_add_item(field_table_tree, hf_amqp_field, tvb, |
2410 | 0 | offset, 1, ENC_NA); |
2411 | 0 | namelen = tvb_get_uint8(tvb, offset); |
2412 | 0 | offset += 1; |
2413 | 0 | length -= 1; |
2414 | 0 | if (length < namelen) |
2415 | 0 | goto too_short; |
2416 | 0 | field_item_tree = proto_item_add_subtree(field_item, ett_amqp_0_9_field); |
2417 | 0 | proto_tree_add_item_ret_string(field_item_tree, hf_amqp_field_name, tvb, offset, namelen, ENC_UTF_8, pinfo->pool, &name); |
2418 | 0 | proto_item_set_text(field_item, "%s", name); |
2419 | 0 | offset += namelen; |
2420 | 0 | length -= namelen; |
2421 | |
|
2422 | 0 | increment_dissection_depth(pinfo); |
2423 | 0 | vallen = dissect_amqp_0_9_field_value(tvb, pinfo, offset, length, name, field_item_tree); |
2424 | 0 | decrement_dissection_depth(pinfo); |
2425 | 0 | if(vallen == 0) |
2426 | 0 | goto too_short; |
2427 | 0 | offset += vallen; |
2428 | 0 | length -= vallen; |
2429 | 0 | } |
2430 | 0 | return; |
2431 | | |
2432 | 0 | too_short: |
2433 | 0 | proto_tree_add_expert(field_table_tree, pinfo, &ei_amqp_field_short, tvb, field_start, offset - field_start); |
2434 | 0 | return; |
2435 | 0 | } |
2436 | | |
2437 | | /* Dissection routine for AMQP 0-9 field arrays */ |
2438 | | |
2439 | | static void |
2440 | | // NOLINTNEXTLINE(misc-no-recursion) |
2441 | | dissect_amqp_0_9_field_array(tvbuff_t *tvb, packet_info *pinfo, int offset, unsigned length, proto_item *item) |
2442 | 0 | { |
2443 | 0 | proto_tree *field_table_tree, *field_item_tree; |
2444 | 0 | proto_item *field_item; |
2445 | 0 | int field_start, idx; |
2446 | 0 | unsigned vallen; |
2447 | 0 | const char *name; |
2448 | |
|
2449 | 0 | field_table_tree = proto_item_add_subtree(item, ett_amqp); |
2450 | 0 | idx = 0; |
2451 | |
|
2452 | 0 | while (length != 0) { |
2453 | 0 | field_start = offset; |
2454 | 0 | field_item = proto_tree_add_none_format(field_table_tree, hf_amqp_field, tvb, |
2455 | 0 | offset, 0, "[%i]", idx); |
2456 | 0 | field_item_tree = proto_item_add_subtree(field_item, ett_amqp_0_9_field); |
2457 | 0 | name = wmem_strdup_printf(pinfo->pool, "[%i]", idx); |
2458 | |
|
2459 | 0 | increment_dissection_depth(pinfo); |
2460 | 0 | vallen = dissect_amqp_0_9_field_value(tvb, pinfo, offset, length, name, field_item_tree); |
2461 | 0 | decrement_dissection_depth(pinfo); |
2462 | 0 | if(vallen == 0) |
2463 | 0 | goto too_short; |
2464 | 0 | offset += vallen; |
2465 | 0 | length -= vallen; |
2466 | |
|
2467 | 0 | idx++; |
2468 | 0 | } |
2469 | 0 | return; |
2470 | | |
2471 | 0 | too_short: |
2472 | 0 | proto_tree_add_expert(field_table_tree, pinfo, &ei_amqp_field_short, tvb, field_start, offset - field_start); |
2473 | 0 | return; |
2474 | 0 | } |
2475 | | |
2476 | | /* The common practice of AMQP 0-9-1 brokers and clients differs to what has |
2477 | | * been described in the AMQP 0-9-1 standard. |
2478 | | * |
2479 | | * Here's a tabular summary of the state of things: |
2480 | | * See also https://www.rabbitmq.com/amqp-0-9-1-errata.html |
2481 | | * |
2482 | | * 0-9 0-9-1 Industry Type |
2483 | | * -------------------------------------------- |
2484 | | * t t Boolean |
2485 | | * b b Signed 8-bit |
2486 | | * B Unsigned 8-bit |
2487 | | * U s Signed 16-bit |
2488 | | * u Unsigned 16-bit |
2489 | | * I I I Signed 32-bit |
2490 | | * i Unsigned 32-bit |
2491 | | * L l Signed 64-bit |
2492 | | * l Unsigned 64-bit |
2493 | | * f f 32-bit float |
2494 | | * d d 64-bit float |
2495 | | * D D D Decimal |
2496 | | * s Short string |
2497 | | * S S S Long string |
2498 | | * A A Array |
2499 | | * T T T Timestamp (u64) |
2500 | | * F F F Nested Table |
2501 | | * V V V Void |
2502 | | * x Byte array |
2503 | | * |
2504 | | * This dissector conforms to the common practice rather than to the standard |
2505 | | * and uses the tags in the third column. We don't *think* there is a vendor |
2506 | | * who follows the 0-9-1 spec for this bit. |
2507 | | */ |
2508 | | |
2509 | | static const value_string amqp_0_9_field_type_vals[] = { |
2510 | | { 'A', "array" }, |
2511 | | { 'B', "unsigned byte" }, |
2512 | | { 'D', "decimal" }, |
2513 | | { 'F', "field table" }, |
2514 | | { 'I', "integer" }, |
2515 | | { 'S', "string" }, |
2516 | | { 'T', "timestamp" }, |
2517 | | { 'V', "void" }, |
2518 | | { 'b', "byte" }, |
2519 | | { 'd', "double" }, |
2520 | | { 'f', "float" }, |
2521 | | { 'i', "unsigned integer" }, |
2522 | | { 'l', "long int" }, |
2523 | | { 's', "short int" }, |
2524 | | { 't', "boolean" }, |
2525 | | { 'u', "short uint" }, |
2526 | | { 'x', "byte array" }, |
2527 | | { 0, NULL }, |
2528 | | }; |
2529 | | |
2530 | | static unsigned |
2531 | | // NOLINTNEXTLINE(misc-no-recursion) |
2532 | | dissect_amqp_0_9_field_value(tvbuff_t *tvb, packet_info *pinfo, int offset, unsigned length, |
2533 | | const char *name _U_, proto_tree *field_tree) |
2534 | 0 | { |
2535 | 0 | proto_item *field_item, *type_item, *ti = NULL; |
2536 | 0 | unsigned vallen; |
2537 | 0 | uint8_t type; |
2538 | 0 | const char *amqp_typename; |
2539 | 0 | int value_start; |
2540 | |
|
2541 | 0 | value_start = offset; |
2542 | 0 | if (length < 1) |
2543 | 0 | return 0; /* too short */ |
2544 | 0 | type = tvb_get_uint8(tvb, offset); |
2545 | 0 | amqp_typename = char_val_to_str(type, amqp_0_9_field_type_vals, "unknown type"); |
2546 | 0 | field_item = proto_tree_get_parent(field_tree); |
2547 | 0 | proto_item_append_text(field_item, " (%s)", amqp_typename); |
2548 | 0 | type_item = proto_tree_add_item(field_tree, hf_amqp_field_type, tvb, offset, 1, ENC_NA); |
2549 | 0 | offset += 1; |
2550 | 0 | length -= 1; |
2551 | 0 | switch (type) { |
2552 | 0 | case 'I': /* signed 32-bit */ |
2553 | 0 | if (length < 4) |
2554 | 0 | return 0; /* too short */ |
2555 | 0 | ti = proto_tree_add_item(field_tree, hf_amqp_field_integer, tvb, offset, 4, ENC_BIG_ENDIAN); |
2556 | 0 | offset += 4; |
2557 | 0 | break; |
2558 | 0 | case 'D': /* 40-bit decimal floating point, biased towards small numbers */ |
2559 | 0 | { |
2560 | 0 | if (length < 5) |
2561 | 0 | return 0; /* too short */ |
2562 | 0 | double decimal = tvb_get_ntohl(tvb, offset + 1) / pow(10, tvb_get_uint8(tvb, offset)); |
2563 | 0 | ti = proto_tree_add_double(field_tree, hf_amqp_field_decimal, tvb, offset, 5, decimal); |
2564 | 0 | offset += 5; |
2565 | 0 | break; |
2566 | 0 | } |
2567 | 0 | case 'S': /* long string, UTF-8 encoded */ |
2568 | 0 | if (length < 4) |
2569 | 0 | return 0; /* too short */ |
2570 | 0 | ti = proto_tree_add_item_ret_length(field_tree, hf_amqp_field_string, tvb, offset, 4, ENC_BIG_ENDIAN|ENC_UTF_8, &vallen); |
2571 | 0 | offset += vallen; |
2572 | 0 | break; |
2573 | 0 | case 'T': /* timestamp (u64) */ |
2574 | 0 | if (length < 8) |
2575 | 0 | return 0; /* too short */ |
2576 | 0 | ti = proto_tree_add_item(field_tree, hf_amqp_field_timestamp, tvb, |
2577 | 0 | offset, 8, ENC_TIME_SECS|ENC_BIG_ENDIAN); |
2578 | 0 | offset += 8; |
2579 | 0 | break; |
2580 | 0 | case 'F': /* nested table */ |
2581 | 0 | if (length < 4) |
2582 | 0 | return 0; /* too short */ |
2583 | 0 | vallen = tvb_get_ntohl(tvb, offset); |
2584 | 0 | offset += 4; |
2585 | 0 | length -= 4; |
2586 | 0 | if (length < vallen) |
2587 | 0 | return 0; /* too short */ |
2588 | 0 | dissect_amqp_0_9_field_table(tvb, pinfo, offset, vallen, field_tree); |
2589 | 0 | offset += vallen; |
2590 | 0 | break; |
2591 | 0 | case 'V': |
2592 | 0 | break; |
2593 | | /* AMQP 0-9-1 types */ |
2594 | 0 | case 't': /* boolean */ |
2595 | 0 | if (length < 1) |
2596 | 0 | return 0; /* too short */ |
2597 | 0 | ti = proto_tree_add_item(field_tree, hf_amqp_field_boolean, tvb, offset, 1, ENC_NA); |
2598 | 0 | offset += 1; |
2599 | 0 | break; |
2600 | 0 | case 'b': /* signed 8-bit */ |
2601 | 0 | if (length < 1) |
2602 | 0 | return 0; /* too short */ |
2603 | 0 | ti = proto_tree_add_item(field_tree, hf_amqp_field_byte, tvb, offset, 1, ENC_NA); |
2604 | 0 | offset += 1; |
2605 | 0 | break; |
2606 | 0 | case 'B': /* unsigned 8-bit */ |
2607 | 0 | if (length < 1) |
2608 | 0 | return 0; /* too short */ |
2609 | 0 | ti = proto_tree_add_item(field_tree, hf_amqp_field_unsigned_byte, tvb, offset, 1, ENC_NA); |
2610 | 0 | offset += 1; |
2611 | 0 | break; |
2612 | 0 | case 's': /* signed 16-bit */ |
2613 | 0 | if (length < 2) |
2614 | 0 | return 0; /* too short */ |
2615 | 0 | ti = proto_tree_add_item(field_tree, hf_amqp_field_short_int, tvb, offset, 2, ENC_BIG_ENDIAN); |
2616 | 0 | offset += 2; |
2617 | 0 | break; |
2618 | 0 | case 'u': /* unsigned 16-bit */ |
2619 | 0 | if (length < 2) |
2620 | 0 | return 0; /* too short */ |
2621 | 0 | ti = proto_tree_add_item(field_tree, hf_amqp_field_short_uint, tvb, offset, 2, ENC_BIG_ENDIAN); |
2622 | 0 | offset += 2; |
2623 | 0 | break; |
2624 | 0 | case 'i': /* unsigned 32-bit */ |
2625 | 0 | if (length < 4) |
2626 | 0 | return 0; /* too short */ |
2627 | 0 | ti = proto_tree_add_item(field_tree, hf_amqp_field_unsigned_integer, tvb, offset, 4, ENC_BIG_ENDIAN); |
2628 | 0 | offset += 4; |
2629 | 0 | break; |
2630 | 0 | case 'l': /* signed 64-bit */ |
2631 | 0 | if (length < 8) |
2632 | 0 | return 0; /* too short */ |
2633 | 0 | ti = proto_tree_add_item(field_tree, hf_amqp_field_long_int, tvb, offset, 8, ENC_BIG_ENDIAN); |
2634 | 0 | offset += 8; |
2635 | 0 | break; |
2636 | 0 | case 'f': /* 32-bit float */ |
2637 | 0 | if (length < 4) |
2638 | 0 | return 0; /* too short */ |
2639 | 0 | ti = proto_tree_add_item(field_tree, hf_amqp_field_float, tvb, offset, 4, ENC_BIG_ENDIAN); |
2640 | 0 | offset += 4; |
2641 | 0 | break; |
2642 | 0 | case 'd': /* 64-bit float */ |
2643 | 0 | if (length < 8) |
2644 | 0 | return 0; /* too short */ |
2645 | 0 | ti = proto_tree_add_item(field_tree, hf_amqp_field_double, tvb, offset, 8, ENC_BIG_ENDIAN); |
2646 | 0 | offset += 8; |
2647 | 0 | break; |
2648 | 0 | case 'A': /* array */ |
2649 | 0 | if (length < 4) |
2650 | 0 | return 0; /* too short */ |
2651 | 0 | vallen = tvb_get_ntohl(tvb, offset); |
2652 | 0 | offset += 4; |
2653 | 0 | length -= 4; |
2654 | 0 | if (length < vallen) |
2655 | 0 | return 0; /* too short */ |
2656 | 0 | dissect_amqp_0_9_field_array(tvb, pinfo, offset, vallen, ti); |
2657 | 0 | offset += vallen; |
2658 | 0 | break; |
2659 | 0 | case 'x': /* byte array */ |
2660 | 0 | if (length < 4) |
2661 | 0 | return 0; /* too short */ |
2662 | 0 | ti = proto_tree_add_item_ret_length(field_tree, hf_amqp_field_byte_array, tvb, |
2663 | 0 | offset, 4, ENC_NA, &vallen); |
2664 | 0 | offset += vallen; |
2665 | 0 | break; |
2666 | 0 | default: |
2667 | 0 | expert_add_info(pinfo, type_item, &ei_amqp_array_type_unknown); |
2668 | | /* Without knowing the type, we don't know how much to increment |
2669 | | * the offset, so break out. */ |
2670 | 0 | return 0; |
2671 | 0 | } |
2672 | | |
2673 | 0 | proto_item_set_end(field_item, tvb, offset); |
2674 | 0 | if (ti != NULL) { |
2675 | 0 | proto_item_append_text(field_item, ": %s", proto_item_get_display_repr(pinfo->pool, ti)); |
2676 | 0 | } |
2677 | 0 | return offset - value_start; |
2678 | 0 | } |
2679 | | |
2680 | | /* Get amqp_0_10 32bit size field from a PDU */ |
2681 | | |
2682 | | /* XXX: This is a hack. |
2683 | | * The issue: there are numerous places in the amqp_0_10 code |
2684 | | * where a 32bit size field is fetched from the PDU and |
2685 | | * then used as the size of the following data field and |
2686 | | * to advance 'offset' & etc with the potential |
2687 | | * to cause an overflow (using 32bit arithmetic). |
2688 | | * The hack: limit the size to 65K. |
2689 | | * Strictly speaking this is not OK since field sizes |
2690 | | * presumably can be larger than 65K. |
2691 | | * However: the code, as written, assumes that a field |
2692 | | * fits within an AMQP_0_10 "frame" which has, by definition, a |
2693 | | * maximum size of 65K. |
2694 | | */ |
2695 | | |
2696 | 472 | #define AMQP_0_10_SIZE_MAX(s) (((unsigned)(s) < (1U << 16)) ? (unsigned)s : (1U << 16)) |
2697 | | static unsigned |
2698 | 9 | amqp_0_10_get_32bit_size(tvbuff_t *tvb, int offset) { |
2699 | 9 | unsigned size = tvb_get_ntohl(tvb, offset); |
2700 | 9 | return AMQP_0_10_SIZE_MAX(size); |
2701 | 9 | } |
2702 | | |
2703 | | static unsigned |
2704 | 82 | amqp_0_10_get_32bit_size_new(proto_tree* tree, packet_info* pinfo, tvbuff_t *tvb, int hf, int offset) { |
2705 | 82 | unsigned size; |
2706 | 82 | proto_item* ti; |
2707 | | |
2708 | 82 | ti = proto_tree_add_item_ret_uint(tree, hf, tvb, offset, 4, ENC_BIG_ENDIAN, &size); |
2709 | 82 | if (size > 0xFFFF) |
2710 | 68 | { |
2711 | 68 | expert_add_info(pinfo, ti, &ei_amqp_size_exceeds_65K); |
2712 | 68 | size = 0xFFFF; |
2713 | 68 | } |
2714 | | |
2715 | 82 | return size; |
2716 | 82 | } |
2717 | | |
2718 | | /* Dissection routine for AMQP 0-10 maps */ |
2719 | | |
2720 | | static void |
2721 | | dissect_amqp_0_10_map(tvbuff_t *tvb, proto_item *item) |
2722 | 67 | { |
2723 | 67 | proto_item *map_tree; |
2724 | 67 | unsigned namelen, size; |
2725 | 67 | uint8_t type; |
2726 | 67 | const char *name; |
2727 | 67 | const char *amqp_typename; |
2728 | 67 | const char *value; |
2729 | 67 | uint32_t i, field_count; |
2730 | 67 | int offset = 0; |
2731 | 67 | type_formatter formatter; |
2732 | | |
2733 | 67 | map_tree = proto_item_add_subtree(item, ett_amqp_0_10_map); |
2734 | 67 | field_count = tvb_get_ntohl(tvb, offset); |
2735 | 67 | offset += 4; |
2736 | 67 | proto_item_append_text(item, " (%u %s)", field_count, plurality(field_count, "entry", "entries")); |
2737 | 776 | for (i = 0; ((i < field_count) && (tvb_reported_length_remaining(tvb, offset) > 0)); i++) { |
2738 | 752 | unsigned field_length = 0; |
2739 | 752 | unsigned field_start = offset; |
2740 | 752 | namelen = tvb_get_uint8(tvb, offset); |
2741 | 752 | offset += 1; |
2742 | 752 | name = (char*) tvb_get_string_enc(wmem_packet_scope(), tvb, offset, namelen, ENC_UTF_8|ENC_NA); |
2743 | 752 | offset += namelen; |
2744 | 752 | type = tvb_get_uint8(tvb, offset); |
2745 | 752 | offset += 1; |
2746 | 752 | if (get_amqp_0_10_type_formatter(type, &amqp_typename, &formatter, &size)) { |
2747 | 463 | field_length = formatter(tvb, offset, size, &value); /* includes var 'length' field if var field */ |
2748 | 463 | field_length = AMQP_0_10_SIZE_MAX(field_length); |
2749 | 463 | proto_tree_add_none_format(map_tree, |
2750 | 463 | hf_amqp_field, |
2751 | 463 | tvb, |
2752 | 463 | field_start, |
2753 | 463 | 1 + namelen + 1 + field_length, |
2754 | 463 | "%s (%s): %s", |
2755 | 463 | name, amqp_typename, value); |
2756 | 463 | offset += field_length; |
2757 | 463 | } |
2758 | 289 | else { /* type not found in table: Do special processing */ |
2759 | 289 | unsigned size_field_len = 0; |
2760 | | |
2761 | 289 | switch (type) { |
2762 | 0 | case AMQP_0_10_TYPE_MAP: |
2763 | 0 | case AMQP_0_10_TYPE_LIST: |
2764 | 3 | case AMQP_0_10_TYPE_ARRAY: |
2765 | 3 | field_length = amqp_0_10_get_32bit_size(tvb, offset); |
2766 | 3 | size_field_len = 4; |
2767 | 3 | proto_tree_add_none_format(map_tree, hf_amqp_field, |
2768 | 3 | tvb, field_start, (1 + namelen + 1 + 4 + field_length), |
2769 | 3 | "%s (composite): %d bytes", |
2770 | 3 | name, field_length); |
2771 | 3 | break; |
2772 | | |
2773 | 243 | default: { /* Determine total field length from the type */ |
2774 | 243 | unsigned temp = 1U << ((type & 0x70) >> 4); /* Map type to a length value */ |
2775 | 243 | amqp_typename = "unimplemented type"; |
2776 | | |
2777 | | /* fixed length cases */ |
2778 | 243 | if ((type & 0x80) == 0) { |
2779 | 159 | field_length = temp; /* Actual length of the field */ |
2780 | 159 | } |
2781 | 84 | else if ((type & 0xc0) == 0xc0) { |
2782 | 52 | field_length = 5; |
2783 | 52 | } |
2784 | 32 | else if ((type & 0xd0) == 0xd0) { |
2785 | 0 | field_length = 9; |
2786 | 0 | } |
2787 | 32 | else if ((type & 0xf0) == 0xf0) { |
2788 | 0 | field_length = 0; |
2789 | 0 | } |
2790 | | |
2791 | | /* variable length/reserved cases */ |
2792 | 32 | else if ((type & 0x80) == 0x80) { |
2793 | 32 | size_field_len = temp; |
2794 | 32 | switch (size_field_len) { |
2795 | 16 | case 1: |
2796 | 16 | field_length = tvb_get_uint8(tvb, offset); |
2797 | 16 | break; |
2798 | 2 | case 2: |
2799 | 2 | field_length = tvb_get_ntohs(tvb, offset); |
2800 | 2 | break; |
2801 | 6 | case 4: |
2802 | 6 | field_length = amqp_0_10_get_32bit_size(tvb, offset); |
2803 | 6 | break; |
2804 | 8 | default: |
2805 | 8 | field_length = 1; /* Reserved... skip 1 */ |
2806 | 8 | amqp_typename = "reserved"; |
2807 | 8 | break; |
2808 | 32 | } |
2809 | 32 | } |
2810 | 0 | else { |
2811 | 0 | DISSECTOR_ASSERT_NOT_REACHED(); |
2812 | 0 | } |
2813 | 243 | proto_tree_add_none_format(map_tree, hf_amqp_field, |
2814 | 243 | tvb, field_start, 1 + namelen + 1 + size_field_len + field_length, |
2815 | 243 | "%s (%s): (value field length: %d bytes)", |
2816 | 243 | name, amqp_typename, field_length); |
2817 | 243 | } /* default */ |
2818 | 289 | } /* switch (type) */ |
2819 | | |
2820 | 246 | offset += (size_field_len + field_length); |
2821 | 246 | } |
2822 | 752 | } |
2823 | 67 | } |
2824 | | |
2825 | | /* Dissection routine for AMQP 0-10 maps */ |
2826 | | static void |
2827 | | // NOLINTNEXTLINE(misc-no-recursion) |
2828 | | dissect_amqp_0_10_array(tvbuff_t *tvb, |
2829 | | packet_info *pinfo, |
2830 | | int offset, /* Start of array in tvb */ |
2831 | | proto_item *item) |
2832 | 0 | { |
2833 | 0 | proto_item *type_item, *struct_item; |
2834 | 0 | proto_tree *array_tree; |
2835 | 0 | uint16_t len16; |
2836 | 0 | uint32_t type, i, element_count; |
2837 | 0 | uint32_t struct_length; |
2838 | 0 | tvbuff_t *next_tvb; |
2839 | |
|
2840 | 0 | element_count = tvb_get_ntohl(tvb, offset+1); |
2841 | 0 | array_tree = proto_item_add_subtree(item, ett_amqp_0_10_array); |
2842 | 0 | proto_item_append_text(item, " (array of %u element%s)", element_count, plurality(element_count, "", "s")); |
2843 | 0 | type_item = proto_tree_add_item_ret_uint(array_tree, hf_amqp_0_10_array_type, tvb, offset, 1, ENC_NA, &type); |
2844 | 0 | offset += 1; |
2845 | 0 | proto_tree_add_item_ret_uint(array_tree, hf_amqp_0_10_array_element_count, tvb, offset, 4, ENC_BIG_ENDIAN, &element_count); |
2846 | 0 | offset += 4; |
2847 | |
|
2848 | 0 | for (i = 0; ((i < element_count) && (tvb_reported_length_remaining(tvb, offset) > 0)); i++) { |
2849 | 0 | switch (type) { |
2850 | 0 | case AMQP_0_10_TYPE_STR16: |
2851 | 0 | len16 = tvb_get_ntohs(tvb, offset); |
2852 | 0 | proto_tree_add_item(array_tree, hf_amqp_0_10_array_string, tvb, offset, 2, ENC_UTF_8|ENC_BIG_ENDIAN); |
2853 | 0 | offset += (2 + len16); |
2854 | 0 | break; |
2855 | | |
2856 | 0 | case AMQP_0_10_TYPE_STRUCT32: |
2857 | 0 | struct_length = amqp_0_10_get_32bit_size_new(array_tree, pinfo, tvb, hf_amqp_0_10_struct32_size, offset); |
2858 | 0 | offset += 4; |
2859 | |
|
2860 | 0 | struct_item = proto_tree_add_item(array_tree, |
2861 | 0 | hf_amqp_0_10_struct32, |
2862 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
2863 | 0 | proto_item_set_len(struct_item, struct_length); |
2864 | |
|
2865 | 0 | if (struct_length > (uint32_t)tvb_reported_length_remaining(tvb, offset)) |
2866 | 0 | { |
2867 | 0 | next_tvb = tvb_new_subset_remaining(tvb, offset); |
2868 | 0 | } |
2869 | 0 | else |
2870 | 0 | { |
2871 | 0 | next_tvb = tvb_new_subset_length(tvb, offset, struct_length); |
2872 | 0 | } |
2873 | 0 | dissect_amqp_0_10_struct32(next_tvb, pinfo, struct_item); |
2874 | 0 | offset += struct_length; |
2875 | 0 | break; |
2876 | | |
2877 | 0 | default: |
2878 | 0 | expert_add_info(pinfo, type_item, &ei_amqp_array_type_unknown); |
2879 | | /* Don't bother continuing through the loop: we don't know how |
2880 | | * much to increment the offset by and the type doesn't change |
2881 | | * so there's nothing interesting to do... |
2882 | | */ |
2883 | 0 | return; |
2884 | 0 | } |
2885 | 0 | } |
2886 | 0 | } |
2887 | | |
2888 | | static void |
2889 | | dissect_amqp_0_10_xid (tvbuff_t *tvb, |
2890 | | int offset, |
2891 | | proto_item *ti) |
2892 | 0 | { |
2893 | 0 | proto_item *xid_tree; |
2894 | 0 | uint8_t flag1/*, flag2*/; |
2895 | |
|
2896 | 0 | xid_tree = proto_item_add_subtree(ti, ett_args); |
2897 | 0 | flag1 = tvb_get_uint8(tvb, offset); |
2898 | | /*flag2 = tvb_get_uint8(tvb, offset+1);*/ |
2899 | 0 | proto_tree_add_item(xid_tree, hf_amqp_0_10_argument_packing_flags, |
2900 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
2901 | 0 | offset += 2; |
2902 | 0 | if (flag1 & 0x01) { |
2903 | | /* format (uint32) */ |
2904 | 0 | proto_tree_add_item(xid_tree, |
2905 | 0 | hf_amqp_0_10_dtx_xid_format, |
2906 | 0 | tvb, offset, 4, ENC_BIG_ENDIAN); |
2907 | 0 | offset += 4; |
2908 | 0 | } |
2909 | 0 | if (flag1 & 0x02) { |
2910 | | /* global-id (vbin8) */ |
2911 | 0 | proto_tree_add_item(xid_tree, |
2912 | 0 | hf_amqp_0_10_dtx_xid_global_id, |
2913 | 0 | tvb, offset, 1, ENC_NA); |
2914 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
2915 | 0 | } |
2916 | 0 | if (flag1 & 0x04) { |
2917 | | /* branch-id (vbin8) */ |
2918 | 0 | proto_tree_add_item(xid_tree, |
2919 | 0 | hf_amqp_0_10_dtx_xid_branch_id, |
2920 | 0 | tvb, offset, 1, ENC_NA); |
2921 | | /* offset += (1 + tvb_get_uint8(tvb, offset)); */ |
2922 | 0 | } |
2923 | 0 | } |
2924 | | |
2925 | | /* Dissection routine for AMQP 0-10 frames */ |
2926 | | |
2927 | | static void |
2928 | | dissect_amqp_0_10_connection(tvbuff_t *tvb, |
2929 | | packet_info *pinfo, |
2930 | | proto_tree *tree) |
2931 | 71 | { |
2932 | 71 | proto_item *args_tree; |
2933 | 71 | proto_item *ti; |
2934 | 71 | proto_item *flags_item; |
2935 | 71 | uint8_t method; |
2936 | 71 | uint8_t flag1, flag2; /* args struct packing flags */ |
2937 | 71 | uint32_t arg_length; |
2938 | 71 | int flags_offset; |
2939 | 71 | const char *method_name; |
2940 | 71 | int offset = 0; |
2941 | 71 | tvbuff_t *next_tvb; |
2942 | | |
2943 | 71 | method = tvb_get_uint8(tvb, offset+1); |
2944 | 71 | method_name = val_to_str_const(method, amqp_0_10_connection_methods, |
2945 | 71 | "<invalid connection method>"); |
2946 | 71 | col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", method_name); |
2947 | 71 | col_set_fence(pinfo->cinfo, COL_INFO); |
2948 | | |
2949 | 71 | proto_tree_add_item(tree, hf_amqp_0_10_connection_method, |
2950 | 71 | tvb, offset+1, 1, ENC_BIG_ENDIAN); |
2951 | 71 | offset += 2; |
2952 | 71 | ti = proto_tree_add_item(tree, hf_amqp_method_arguments, |
2953 | 71 | tvb, offset, -1, ENC_NA); |
2954 | 71 | args_tree = proto_item_add_subtree(ti, ett_args); |
2955 | | /* |
2956 | | * The flag bits are a simple bit string, not a net-byte-order |
2957 | | * field. tvb_get_bits16() doesn't know how to do little-endian |
2958 | | * at this time, so just pick out two bytes. |
2959 | | */ |
2960 | 71 | flags_offset = offset; |
2961 | 71 | flag1 = tvb_get_uint8(tvb, offset); |
2962 | 71 | flag2 = tvb_get_uint8(tvb, offset+1); |
2963 | 71 | flags_item = proto_tree_add_item(args_tree, |
2964 | 71 | hf_amqp_0_10_argument_packing_flags, |
2965 | 71 | tvb, offset, 2, ENC_BIG_ENDIAN); |
2966 | 71 | offset += 2; |
2967 | 71 | switch (method) { |
2968 | 66 | case AMQP_0_10_METHOD_CONNECTION_START: |
2969 | 66 | if ((flag1 & ~0x07) || (flag2 != 0)) |
2970 | 66 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
2971 | 66 | if (flag1 & 0x01) { |
2972 | | /* server-properties (map) */ |
2973 | 65 | arg_length = amqp_0_10_get_32bit_size_new(args_tree, pinfo, tvb, hf_amqp_method_connection_start_server_properties_size, offset); |
2974 | 65 | offset += 4; |
2975 | 65 | ti = proto_tree_add_item(args_tree, |
2976 | 65 | hf_amqp_method_connection_start_server_properties, |
2977 | 65 | tvb, |
2978 | 65 | offset, |
2979 | 65 | arg_length, ENC_NA); |
2980 | 65 | if (arg_length > (uint32_t)tvb_reported_length_remaining(tvb, offset)) |
2981 | 65 | { |
2982 | 65 | next_tvb = tvb_new_subset_remaining(tvb, offset); |
2983 | 65 | } |
2984 | 0 | else |
2985 | 0 | { |
2986 | 0 | next_tvb = tvb_new_subset_length(tvb, offset, arg_length); |
2987 | 0 | } |
2988 | 65 | dissect_amqp_0_10_map (next_tvb, ti); |
2989 | 65 | offset += arg_length; |
2990 | 65 | } |
2991 | 66 | if (flag1 & 0x02) { |
2992 | | /* mechanisms (str16-array) */ |
2993 | 12 | arg_length = amqp_0_10_get_32bit_size_new(args_tree, pinfo, tvb, hf_amqp_0_10_method_connection_start_mechanisms_size, offset); |
2994 | 12 | offset += 4; |
2995 | 12 | ti = proto_tree_add_item(args_tree, |
2996 | 12 | hf_amqp_0_10_method_connection_start_mechanisms, |
2997 | 12 | tvb, |
2998 | 12 | offset, |
2999 | 12 | arg_length, ENC_NA); |
3000 | 12 | dissect_amqp_0_10_array (tvb, |
3001 | 12 | pinfo, |
3002 | 12 | offset, |
3003 | 12 | ti); |
3004 | 12 | offset += arg_length; |
3005 | 12 | } |
3006 | 66 | if (flag1 & 0x04) { |
3007 | | /* locales (str16-array) */ |
3008 | 1 | arg_length = amqp_0_10_get_32bit_size_new(args_tree, pinfo, tvb, hf_amqp_0_10_method_connection_start_locales_size, offset); |
3009 | 1 | offset += 4; |
3010 | 1 | ti = proto_tree_add_item(args_tree, |
3011 | 1 | hf_amqp_0_10_method_connection_start_locales, |
3012 | 1 | tvb, |
3013 | 1 | offset, |
3014 | 1 | arg_length, ENC_NA); |
3015 | 1 | dissect_amqp_0_10_array (tvb, |
3016 | 1 | pinfo, |
3017 | 1 | offset, |
3018 | 1 | ti); |
3019 | | /* offset += arg_length; */ |
3020 | 1 | } |
3021 | 66 | break; |
3022 | | |
3023 | 2 | case AMQP_0_10_METHOD_CONNECTION_START_OK: |
3024 | 2 | if ((flag1 & ~0x0f) || (flag2 != 0)) |
3025 | 2 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
3026 | 2 | if (flag1 & 0x01) { |
3027 | | /* client-properties (map) */ |
3028 | 2 | arg_length = amqp_0_10_get_32bit_size_new(args_tree, pinfo, tvb, hf_amqp_method_connection_start_ok_client_properties_size, offset); |
3029 | 2 | offset += 4; |
3030 | 2 | ti = proto_tree_add_item(args_tree, |
3031 | 2 | hf_amqp_method_connection_start_ok_client_properties, |
3032 | 2 | tvb, |
3033 | 2 | offset, |
3034 | 2 | arg_length, ENC_NA); |
3035 | 2 | if (arg_length > (uint32_t)tvb_reported_length_remaining(tvb, offset)) |
3036 | 2 | { |
3037 | 2 | next_tvb = tvb_new_subset_remaining(tvb, offset); |
3038 | 2 | } |
3039 | 0 | else |
3040 | 0 | { |
3041 | 0 | next_tvb = tvb_new_subset_length(tvb, offset, arg_length); |
3042 | 0 | } |
3043 | 2 | dissect_amqp_0_10_map (next_tvb, ti); |
3044 | 2 | offset += arg_length; |
3045 | 2 | } |
3046 | 2 | if (flag1 & 0x02) { |
3047 | | /* mechanism (str8) */ |
3048 | 0 | proto_tree_add_item(args_tree, |
3049 | 0 | hf_amqp_method_connection_start_ok_mechanism, |
3050 | 0 | tvb, offset, 1, |
3051 | 0 | ENC_ASCII|ENC_BIG_ENDIAN); |
3052 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
3053 | 0 | } |
3054 | 2 | if (flag1 & 0x04) { |
3055 | | /* response (vbin32) */ |
3056 | 0 | proto_tree_add_item(args_tree, |
3057 | 0 | hf_amqp_method_connection_start_ok_response, |
3058 | 0 | tvb, offset, 4, |
3059 | 0 | ENC_BIG_ENDIAN); |
3060 | 0 | offset += (4 + tvb_get_ntohl(tvb, offset)); |
3061 | 0 | } |
3062 | 2 | if (flag1 & 0x08) { |
3063 | | /* locale (str8) */ |
3064 | 0 | proto_tree_add_item(args_tree, |
3065 | 0 | hf_amqp_method_connection_start_ok_locale, |
3066 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
3067 | | /* offset += (1 + tvb_get_uint8(tvb, offset)); */ |
3068 | 0 | } |
3069 | 2 | break; |
3070 | | |
3071 | 0 | case AMQP_0_10_METHOD_CONNECTION_SECURE: |
3072 | 0 | if ((flag1 & ~0x01) || (flag2 != 0)) |
3073 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
3074 | 0 | if (flag1 & 0x01) { |
3075 | | /* challenge (vbin32) */ |
3076 | 0 | proto_tree_add_item(args_tree, |
3077 | 0 | hf_amqp_method_connection_secure_challenge, |
3078 | 0 | tvb, offset, 4, |
3079 | 0 | ENC_BIG_ENDIAN); |
3080 | | /* offset += (4 + tvb_get_ntohl(tvb, offset)); */ |
3081 | 0 | } |
3082 | 0 | break; |
3083 | | |
3084 | 1 | case AMQP_0_10_METHOD_CONNECTION_SECURE_OK: |
3085 | 1 | if ((flag1 & ~0x01) || (flag2 != 0)) |
3086 | 1 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
3087 | 1 | if (flag1 & 0x01) { |
3088 | | /* response (vbin32) */ |
3089 | 0 | proto_tree_add_item(args_tree, |
3090 | 0 | hf_amqp_method_connection_secure_ok_response, |
3091 | 0 | tvb, offset, 4, |
3092 | 0 | ENC_BIG_ENDIAN); |
3093 | | /* offset += (4 + tvb_get_ntohl(tvb, offset)); */ |
3094 | 0 | } |
3095 | 1 | break; |
3096 | | |
3097 | 0 | case AMQP_0_10_METHOD_CONNECTION_TUNE: |
3098 | 0 | if ((flag1 & ~0x0f) || (flag2 != 0)) |
3099 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
3100 | 0 | if (flag1 & 0x01) { |
3101 | | /* channel-max (uint16) */ |
3102 | 0 | proto_tree_add_item(args_tree, |
3103 | 0 | hf_amqp_method_connection_tune_channel_max, |
3104 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
3105 | 0 | offset += 2; |
3106 | 0 | } |
3107 | 0 | if (flag1 & 0x02) { |
3108 | | /* max-frame-size (uint16) */ |
3109 | 0 | proto_tree_add_item(args_tree, |
3110 | 0 | hf_amqp_0_10_method_connection_tune_frame_max, |
3111 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
3112 | 0 | offset += 2; |
3113 | 0 | } |
3114 | 0 | if (flag1 & 0x04) { |
3115 | | /* heartbeat-min (uint16) */ |
3116 | 0 | proto_tree_add_item(args_tree, |
3117 | 0 | hf_amqp_0_10_method_connection_tune_heartbeat_min, |
3118 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
3119 | 0 | offset += 2; |
3120 | 0 | } |
3121 | 0 | if (flag1 & 0x08) { |
3122 | | /* heartbeat-max (uint16) */ |
3123 | 0 | proto_tree_add_item(args_tree, |
3124 | 0 | hf_amqp_0_10_method_connection_tune_heartbeat_max, |
3125 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
3126 | | /* offset += 2; */ |
3127 | 0 | } |
3128 | 0 | break; |
3129 | | |
3130 | 0 | case AMQP_0_10_METHOD_CONNECTION_TUNE_OK: |
3131 | 0 | if ((flag1 & ~0x07) || (flag2 != 0)) |
3132 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
3133 | 0 | if (flag1 & 0x01) { |
3134 | | /* channel-max (uint16) */ |
3135 | 0 | proto_tree_add_item(args_tree, |
3136 | 0 | hf_amqp_method_connection_tune_ok_channel_max, |
3137 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
3138 | 0 | offset += 2; |
3139 | 0 | } |
3140 | 0 | if (flag1 & 0x02) { |
3141 | | /* max-frame-size (uint16) */ |
3142 | 0 | proto_tree_add_item(args_tree, |
3143 | 0 | hf_amqp_0_10_method_connection_tune_ok_frame_max, |
3144 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
3145 | 0 | offset += 2; |
3146 | 0 | } |
3147 | 0 | if (flag1 & 0x04) { |
3148 | | /* heartbeat (uint16) */ |
3149 | 0 | proto_tree_add_item(args_tree, |
3150 | 0 | hf_amqp_method_connection_tune_ok_heartbeat, |
3151 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
3152 | | /* offset += 2; */ |
3153 | 0 | } |
3154 | 0 | break; |
3155 | | |
3156 | 0 | case AMQP_0_10_METHOD_CONNECTION_OPEN: |
3157 | 0 | if ((flag1 & ~0x07) || (flag2 != 0)) |
3158 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
3159 | 0 | if (flag1 & 0x01) { |
3160 | | /* virtual-host (str8) */ |
3161 | 0 | proto_tree_add_item(args_tree, |
3162 | 0 | hf_amqp_method_connection_open_virtual_host, |
3163 | 0 | tvb, |
3164 | 0 | offset, |
3165 | 0 | 1, ENC_ASCII|ENC_BIG_ENDIAN); |
3166 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
3167 | 0 | } |
3168 | 0 | if (flag1 & 0x02) { |
3169 | | /* capabilities (str16-array) */ |
3170 | 0 | arg_length = amqp_0_10_get_32bit_size_new(args_tree, pinfo, tvb, hf_amqp_0_10_method_connection_open_capabilities_size, offset); |
3171 | 0 | offset += 4; |
3172 | 0 | ti = proto_tree_add_item(args_tree, |
3173 | 0 | hf_amqp_0_10_method_connection_open_capabilities, |
3174 | 0 | tvb, |
3175 | 0 | offset, |
3176 | 0 | arg_length, ENC_ASCII); |
3177 | 0 | dissect_amqp_0_10_array (tvb, |
3178 | 0 | pinfo, |
3179 | 0 | offset, |
3180 | 0 | ti); |
3181 | | /* offset += arg_length; */ |
3182 | 0 | } |
3183 | | /* |
3184 | | * 3rd argument is an optional bit, insist. |
3185 | | */ |
3186 | 0 | proto_tree_add_item(args_tree, |
3187 | 0 | hf_amqp_0_10_method_connection_open_insist, |
3188 | 0 | tvb, flags_offset, 1, ENC_BIG_ENDIAN); |
3189 | 0 | break; |
3190 | | |
3191 | 0 | case AMQP_0_10_METHOD_CONNECTION_OPEN_OK: |
3192 | 0 | if ((flag1 & ~0x01) || (flag2 != 0)) |
3193 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
3194 | 0 | if (flag1 & 0x01) { |
3195 | | /* known-hosts (amqp-host-array) */ |
3196 | 0 | arg_length = amqp_0_10_get_32bit_size_new(args_tree, pinfo, tvb, hf_amqp_0_10_method_connection_open_ok_known_hosts_size, offset); |
3197 | 0 | offset += 4; |
3198 | 0 | ti = proto_tree_add_item(args_tree, |
3199 | 0 | hf_amqp_0_10_method_connection_open_ok_known_hosts, |
3200 | 0 | tvb, |
3201 | 0 | offset, |
3202 | 0 | arg_length, ENC_NA); |
3203 | 0 | dissect_amqp_0_10_array (tvb, |
3204 | 0 | pinfo, |
3205 | 0 | offset, |
3206 | 0 | ti); |
3207 | | /* offset += arg_length; */ |
3208 | 0 | } |
3209 | 0 | break; |
3210 | | |
3211 | 1 | case AMQP_0_10_METHOD_CONNECTION_REDIRECT: |
3212 | 1 | if ((flag1 & ~0x03) || (flag2 != 0)) |
3213 | 1 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
3214 | 1 | if (flag1 & 0x01) { |
3215 | | /* host (amqp-host-url [str16]) */ |
3216 | 1 | proto_tree_add_item(args_tree, |
3217 | 1 | hf_amqp_method_connection_redirect_host, |
3218 | 1 | tvb, offset, 2, |
3219 | 1 | ENC_ASCII|ENC_BIG_ENDIAN); |
3220 | 1 | offset += (2 + tvb_get_ntohs(tvb, offset)); |
3221 | 1 | } |
3222 | 1 | if (flag1 & 0x02) { |
3223 | | /* known-hosts (amqp-host-array) */ |
3224 | 1 | arg_length = amqp_0_10_get_32bit_size_new(args_tree, pinfo, tvb, hf_amqp_0_10_method_connection_redirect_known_hosts_size, offset); |
3225 | 1 | offset += 4; |
3226 | 1 | ti = proto_tree_add_item(args_tree, |
3227 | 1 | hf_amqp_0_10_method_connection_redirect_known_hosts, |
3228 | 1 | tvb, |
3229 | 1 | offset, |
3230 | 1 | arg_length, ENC_NA); |
3231 | 1 | dissect_amqp_0_10_array (tvb, |
3232 | 1 | pinfo, |
3233 | 1 | offset, |
3234 | 1 | ti); |
3235 | | /* offset += arg_length; */ |
3236 | 1 | } |
3237 | 1 | break; |
3238 | | |
3239 | 0 | case AMQP_0_10_METHOD_CONNECTION_HEARTBEAT: |
3240 | 0 | break; |
3241 | | |
3242 | 0 | case AMQP_0_10_METHOD_CONNECTION_CLOSE: |
3243 | 0 | if ((flag1 & ~0x03) || (flag2 != 0)) |
3244 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
3245 | 0 | if (flag1 & 0x01) { |
3246 | | /* reply-code (uint16) */ |
3247 | 0 | proto_tree_add_item(args_tree, |
3248 | 0 | hf_amqp_0_10_method_connection_close_reply_code, |
3249 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
3250 | 0 | offset += 2; |
3251 | 0 | } |
3252 | 0 | if (flag1 & 0x02) { |
3253 | | /* reply-text (str8) */ |
3254 | 0 | proto_tree_add_item(args_tree, |
3255 | 0 | hf_amqp_method_connection_close_reply_text, |
3256 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
3257 | | /* offset + (1 + tvb_get_uint8(tvb, offset)); */ |
3258 | 0 | } |
3259 | 0 | break; |
3260 | | |
3261 | 0 | case AMQP_0_10_METHOD_CONNECTION_CLOSE_OK: |
3262 | 0 | break; |
3263 | 71 | } |
3264 | 71 | } |
3265 | | |
3266 | | static void |
3267 | | dissect_amqp_0_10_session(tvbuff_t *tvb, |
3268 | | packet_info *pinfo, |
3269 | | proto_tree *tree) |
3270 | 1 | { |
3271 | 1 | proto_item *args_tree; |
3272 | 1 | proto_item *ti; |
3273 | 1 | proto_item *flags_item; |
3274 | 1 | uint8_t method; |
3275 | 1 | uint8_t flag1, flag2; |
3276 | 1 | uint32_t size; |
3277 | 1 | uint32_t array_size; |
3278 | 1 | int flags_offset; |
3279 | 1 | const char *method_name; |
3280 | 1 | int offset = 0; |
3281 | | |
3282 | 1 | method = tvb_get_uint8(tvb, offset+1); |
3283 | 1 | method_name = val_to_str_const(method, amqp_0_10_session_methods, |
3284 | 1 | "<invalid session method>"); |
3285 | 1 | col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", method_name); |
3286 | 1 | col_set_fence(pinfo->cinfo, COL_INFO); |
3287 | | |
3288 | 1 | proto_tree_add_item(tree, hf_amqp_0_10_session_method, |
3289 | 1 | tvb, offset+1, 1, ENC_BIG_ENDIAN); |
3290 | 1 | offset += 2; |
3291 | | |
3292 | 1 | ti = proto_tree_add_item(tree, hf_amqp_method_arguments, |
3293 | 1 | tvb, offset, -1, ENC_NA); |
3294 | 1 | args_tree = proto_item_add_subtree(ti, ett_args); |
3295 | | /* |
3296 | | * The flag bits are a simple bit string, not a net-byte-order |
3297 | | * field. tvb_get_bits16() doesn't know how to do little-endian |
3298 | | * at this time, so just pick out two bytes. |
3299 | | */ |
3300 | 1 | flags_offset = offset; |
3301 | 1 | flag1 = tvb_get_uint8(tvb, offset); |
3302 | 1 | flag2 = tvb_get_uint8(tvb, offset+1); |
3303 | 1 | flags_item = proto_tree_add_item(args_tree, |
3304 | 1 | hf_amqp_0_10_argument_packing_flags, |
3305 | 1 | tvb, offset, 2, ENC_BIG_ENDIAN); |
3306 | 1 | offset += 2; |
3307 | 1 | switch (method) { |
3308 | 0 | case AMQP_0_10_METHOD_SESSION_ATTACH: |
3309 | 0 | if ((flag1 & ~0x03) || ((flag2 != 0))) |
3310 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
3311 | 0 | if (flag1 & 0x01) { |
3312 | | /* name (vbin16) */ |
3313 | 0 | proto_tree_add_item_ret_uint(args_tree, hf_amqp_0_10_method_session_attach_name_size, |
3314 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN, &size); |
3315 | 0 | offset += 2; |
3316 | 0 | proto_tree_add_item(args_tree, |
3317 | 0 | hf_amqp_0_10_method_session_attach_name, |
3318 | 0 | tvb, offset, size, ENC_NA); |
3319 | | /* offset += size; */ |
3320 | 0 | } |
3321 | | /* |
3322 | | * 2nd argument is an optional bit, force. |
3323 | | */ |
3324 | 0 | proto_tree_add_item(args_tree, |
3325 | 0 | hf_amqp_0_10_method_session_attach_force, |
3326 | 0 | tvb, flags_offset, 1, ENC_BIG_ENDIAN); |
3327 | 0 | break; |
3328 | | |
3329 | 1 | case AMQP_0_10_METHOD_SESSION_ATTACHED: |
3330 | 1 | case AMQP_0_10_METHOD_SESSION_DETACH: |
3331 | 1 | if ((flag1 != 0x01) || (flag2 != 0)) |
3332 | 1 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
3333 | 1 | if (flag1 & 0x01) { |
3334 | | /* name (vbin16) */ |
3335 | 0 | proto_tree_add_item_ret_uint(args_tree, hf_amqp_0_10_method_session_attach_name_size, |
3336 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN, &size); |
3337 | 0 | offset += 2; |
3338 | 0 | proto_tree_add_item(args_tree, |
3339 | 0 | hf_amqp_0_10_method_session_attach_name, |
3340 | 0 | tvb, offset, size, ENC_NA); |
3341 | | /* offset += size; */ |
3342 | 0 | } |
3343 | 1 | break; |
3344 | | |
3345 | 0 | case AMQP_0_10_METHOD_SESSION_DETACHED: |
3346 | 0 | if ((flag1 & ~0x03) || (flag2 != 0)) |
3347 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
3348 | 0 | if (flag1 & 0x01) { |
3349 | | /* name (vbin16) */ |
3350 | 0 | proto_tree_add_item_ret_uint(args_tree, hf_amqp_0_10_method_session_attach_name_size, |
3351 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN, &size); |
3352 | 0 | offset += 2; |
3353 | 0 | proto_tree_add_item(args_tree, |
3354 | 0 | hf_amqp_0_10_method_session_attach_name, |
3355 | 0 | tvb, offset, size, ENC_NA); |
3356 | 0 | offset += size; |
3357 | 0 | } |
3358 | 0 | if (flag1 & 0x02) { |
3359 | | /* code (detach-code [uint8]) */ |
3360 | 0 | proto_tree_add_item(args_tree, |
3361 | 0 | hf_amqp_0_10_method_session_detached_code, |
3362 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
3363 | | /* offset += 1; */ |
3364 | 0 | } |
3365 | 0 | break; |
3366 | | |
3367 | 0 | case AMQP_0_10_METHOD_SESSION_REQUEST_TIMEOUT: |
3368 | 0 | case AMQP_0_10_METHOD_SESSION_TIMEOUT: |
3369 | 0 | if ((flag1 & ~0x01) || (flag2 != 0)) |
3370 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
3371 | 0 | if (flag1 & 0x01) { |
3372 | | /* timeout (uint32) */ |
3373 | 0 | proto_tree_add_item(args_tree, |
3374 | 0 | hf_amqp_0_10_method_session_timeout, |
3375 | 0 | tvb, offset, 4, ENC_BIG_ENDIAN); |
3376 | | /* offset += 4; */ |
3377 | 0 | } |
3378 | 0 | break; |
3379 | | |
3380 | 0 | case AMQP_0_10_METHOD_SESSION_COMMAND_POINT: |
3381 | 0 | if ((flag1 & ~0x03) || (flag2 != 0)) |
3382 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
3383 | 0 | if (flag1 & 0x01) { |
3384 | | /* command-id (sequence-no [uint32]) */ |
3385 | 0 | proto_tree_add_item(args_tree, |
3386 | 0 | hf_amqp_0_10_method_session_command_point_id, |
3387 | 0 | tvb, offset, 4, ENC_BIG_ENDIAN); |
3388 | 0 | offset += 4; |
3389 | 0 | } |
3390 | 0 | if (flag1 & 0x02) { |
3391 | | /* command-offset (uint64) */ |
3392 | 0 | proto_tree_add_item(args_tree, |
3393 | 0 | hf_amqp_0_10_method_session_command_point_offset, |
3394 | 0 | tvb, offset, 8, ENC_BIG_ENDIAN); |
3395 | | /* offset += 8; */ |
3396 | 0 | } |
3397 | 0 | break; |
3398 | | |
3399 | 0 | case AMQP_0_10_METHOD_SESSION_EXPECTED: |
3400 | 0 | if ((flag1 & ~0x03) || (flag2 != 0)) |
3401 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
3402 | 0 | if (flag1 & 0x01) { |
3403 | | /* commands (commands [sequence-set]) */ |
3404 | 0 | size = tvb_get_ntohs(tvb, offset); |
3405 | 0 | ti = proto_tree_add_item(args_tree, |
3406 | 0 | hf_amqp_0_10_method_session_commands, |
3407 | 0 | tvb, offset, size + 2, ENC_NA); |
3408 | 0 | offset += 2; |
3409 | 0 | format_amqp_0_10_sequence_set(tvb, offset, size, ti); |
3410 | 0 | offset += size; |
3411 | 0 | } |
3412 | 0 | if (flag1 & 0x02) { |
3413 | | /* fragments (command-fragments [array of command-fragment]) */ |
3414 | 0 | array_size = amqp_0_10_get_32bit_size(tvb, offset); |
3415 | 0 | ti = proto_tree_add_item(args_tree, |
3416 | 0 | hf_amqp_0_10_method_session_fragments, |
3417 | 0 | tvb, offset, array_size + 4, ENC_NA); |
3418 | 0 | offset += 4; |
3419 | 0 | dissect_amqp_0_10_array(tvb, |
3420 | 0 | pinfo, |
3421 | 0 | offset, |
3422 | 0 | ti); |
3423 | | /* offset += array_size; */ |
3424 | 0 | } |
3425 | 0 | break; |
3426 | | |
3427 | 0 | case AMQP_0_10_METHOD_SESSION_CONFIRMED: |
3428 | 0 | if ((flag1 & ~0x03) || (flag2 != 0)) |
3429 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
3430 | 0 | if (flag1 & 0x01) { |
3431 | | /* commands (commands [sequence-set]) */ |
3432 | 0 | size = tvb_get_ntohs(tvb, offset); |
3433 | 0 | ti = proto_tree_add_item(args_tree, |
3434 | 0 | hf_amqp_0_10_method_session_commands, |
3435 | 0 | tvb, offset, size + 2, ENC_NA); |
3436 | 0 | offset += 2; |
3437 | 0 | format_amqp_0_10_sequence_set(tvb, offset, size, ti); |
3438 | 0 | offset += size; |
3439 | 0 | } |
3440 | 0 | if (flag1 & 0x02) { |
3441 | | /* fragments (command-fragments [array of command-fragment]) */ |
3442 | 0 | array_size = amqp_0_10_get_32bit_size(tvb, offset); |
3443 | 0 | ti = proto_tree_add_item(args_tree, |
3444 | 0 | hf_amqp_0_10_method_session_fragments, |
3445 | 0 | tvb, offset, array_size + 4, ENC_NA); |
3446 | 0 | offset += 4; |
3447 | 0 | dissect_amqp_0_10_array(tvb, |
3448 | 0 | pinfo, |
3449 | 0 | offset, |
3450 | 0 | ti); |
3451 | | /* offset += array_size; */ |
3452 | 0 | } |
3453 | 0 | break; |
3454 | | |
3455 | 0 | case AMQP_0_10_METHOD_SESSION_COMPLETED: |
3456 | 0 | if ((flag1 & ~0x03) || (flag2 != 0)) |
3457 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
3458 | 0 | if (flag1 & 0x01) { |
3459 | | /* commands (commands [sequence-set]) */ |
3460 | 0 | size = tvb_get_ntohs(tvb, offset); |
3461 | 0 | ti = proto_tree_add_item(args_tree, |
3462 | 0 | hf_amqp_0_10_method_session_commands, |
3463 | 0 | tvb, offset, size + 2, ENC_NA); |
3464 | 0 | offset += 2; |
3465 | 0 | format_amqp_0_10_sequence_set(tvb, offset, size, ti); |
3466 | | /* offset += size; */ |
3467 | 0 | } |
3468 | | /* |
3469 | | * 2nd argument is an optional bit, timely-reply. |
3470 | | */ |
3471 | 0 | proto_tree_add_item(args_tree, |
3472 | 0 | hf_amqp_0_10_method_session_completed_timely, |
3473 | 0 | tvb, flags_offset, 1, ENC_BIG_ENDIAN); |
3474 | 0 | break; |
3475 | | |
3476 | 0 | case AMQP_0_10_METHOD_SESSION_KNOWN_COMPLETED: |
3477 | 0 | if ((flag1 & ~0x01) || (flag2 != 0)) |
3478 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
3479 | 0 | if (flag1 & 0x01) { |
3480 | | /* commands (commands [sequence-set]) */ |
3481 | 0 | size = tvb_get_ntohs(tvb, offset); |
3482 | 0 | ti = proto_tree_add_item(args_tree, |
3483 | 0 | hf_amqp_0_10_method_session_commands, |
3484 | 0 | tvb, offset, size + 2, ENC_NA); |
3485 | 0 | offset += 2; |
3486 | 0 | format_amqp_0_10_sequence_set(tvb, offset, size, ti); |
3487 | | /* offset += size; */ |
3488 | 0 | } |
3489 | 0 | break; |
3490 | | |
3491 | 0 | case AMQP_0_10_METHOD_SESSION_FLUSH: |
3492 | 0 | if ((flag1 & ~0x07) || (flag2 != 0)) |
3493 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
3494 | 0 | proto_tree_add_item(args_tree, |
3495 | 0 | hf_amqp_0_10_method_session_flush_expected, |
3496 | 0 | tvb, flags_offset, 1, ENC_BIG_ENDIAN); |
3497 | 0 | proto_tree_add_item(args_tree, |
3498 | 0 | hf_amqp_0_10_method_session_flush_confirmed, |
3499 | 0 | tvb, flags_offset, 1, ENC_BIG_ENDIAN); |
3500 | 0 | proto_tree_add_item(args_tree, |
3501 | 0 | hf_amqp_0_10_method_session_flush_completed, |
3502 | 0 | tvb, flags_offset, 1, ENC_BIG_ENDIAN); |
3503 | 0 | break; |
3504 | | |
3505 | 0 | case AMQP_0_10_METHOD_SESSION_GAP: |
3506 | 0 | if ((flag1 & ~0x01) || (flag2 != 0)) |
3507 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
3508 | 0 | if (flag1 & 0x01) { |
3509 | | /* commands (commands [sequence-set]) */ |
3510 | 0 | size = tvb_get_ntohs(tvb, offset); |
3511 | 0 | ti = proto_tree_add_item(args_tree, |
3512 | 0 | hf_amqp_0_10_method_session_commands, |
3513 | 0 | tvb, offset, size + 2, ENC_NA); |
3514 | 0 | offset += 2; |
3515 | 0 | format_amqp_0_10_sequence_set(tvb, offset, size, ti); |
3516 | | /* offset += size; */ |
3517 | 0 | } |
3518 | 0 | break; |
3519 | | |
3520 | 1 | } |
3521 | 1 | } |
3522 | | |
3523 | | static void |
3524 | | dissect_amqp_0_10_execution(tvbuff_t *tvb, |
3525 | | packet_info *pinfo, |
3526 | | proto_tree *tree) |
3527 | 0 | { |
3528 | 0 | proto_item *args_tree; |
3529 | 0 | proto_item *ti; |
3530 | 0 | proto_item *flags_item; |
3531 | 0 | uint8_t amqp_class = 0, method; |
3532 | 0 | uint8_t flag1, flag2; |
3533 | 0 | uint32_t struct_size; |
3534 | 0 | int class_hf; |
3535 | 0 | const char *method_name; |
3536 | 0 | int offset = 0; |
3537 | 0 | tvbuff_t *next_tvb; |
3538 | |
|
3539 | 0 | method = tvb_get_uint8(tvb, offset+1); |
3540 | 0 | method_name = val_to_str_const(method, amqp_0_10_execution_methods, |
3541 | 0 | "<invalid execution method>"); |
3542 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", method_name); |
3543 | 0 | col_set_fence(pinfo->cinfo, COL_INFO); |
3544 | |
|
3545 | 0 | proto_tree_add_item(tree, hf_amqp_0_10_execution_method, |
3546 | 0 | tvb, offset+1, 1, ENC_BIG_ENDIAN); |
3547 | 0 | offset += 2; |
3548 | | /* |
3549 | | * Session header is 2 bytes; one that tells that it's 1 byte long, then |
3550 | | * the byte itself. Bit 0 is sync. |
3551 | | */ |
3552 | 0 | flag1 = tvb_get_uint8(tvb, offset); |
3553 | 0 | flag2 = tvb_get_uint8(tvb, offset+1); |
3554 | 0 | ti = proto_tree_add_item(tree, hf_amqp_0_10_session_header, tvb, offset, 2, ENC_BIG_ENDIAN); |
3555 | 0 | if ((flag1 != 1) || ((flag2 & 0xfe) != 0)) |
3556 | 0 | proto_item_append_text(ti, " (Invalid)"); |
3557 | 0 | else |
3558 | 0 | proto_tree_add_item(tree, hf_amqp_0_10_session_header_sync, |
3559 | 0 | tvb, offset + 1, 1, ENC_BIG_ENDIAN); |
3560 | 0 | offset += 2; |
3561 | |
|
3562 | 0 | ti = proto_tree_add_item(tree, hf_amqp_method_arguments, |
3563 | 0 | tvb, offset, -1, ENC_NA); |
3564 | 0 | args_tree = proto_item_add_subtree(ti, ett_args); |
3565 | | /* |
3566 | | * The flag bits are a simple bit string, not a net-byte-order |
3567 | | * field. tvb_get_bits16() doesn't know how to do little-endian |
3568 | | * at this time, so just pick out two bytes. |
3569 | | */ |
3570 | 0 | flag1 = tvb_get_uint8(tvb, offset); |
3571 | 0 | flag2 = tvb_get_uint8(tvb, offset+1); |
3572 | 0 | flags_item = proto_tree_add_item(args_tree, |
3573 | 0 | hf_amqp_0_10_argument_packing_flags, |
3574 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
3575 | 0 | offset += 2; |
3576 | 0 | switch (method) { |
3577 | 0 | case AMQP_0_10_METHOD_EXECUTION_SYNC: |
3578 | 0 | if ((flag1 != 0) || (flag2 != 0)) |
3579 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
3580 | 0 | break; |
3581 | | |
3582 | 0 | case AMQP_0_10_METHOD_EXECUTION_RESULT: |
3583 | 0 | if ((flag1 & ~0x03) || (flag2 != 0)) |
3584 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
3585 | 0 | if (flag1 & 0x01) { |
3586 | | /* command-id (sequence-no [uint32]) */ |
3587 | 0 | proto_tree_add_item(args_tree, |
3588 | 0 | hf_amqp_0_10_method_execution_command_id, |
3589 | 0 | tvb, offset, 4, ENC_BIG_ENDIAN); |
3590 | 0 | offset += 4; |
3591 | 0 | } |
3592 | 0 | if (flag1 & 0x02) { |
3593 | | /* value (struct32) */ |
3594 | 0 | struct_size = amqp_0_10_get_32bit_size_new(args_tree, pinfo, tvb, hf_amqp_0_10_struct32_size, offset); |
3595 | 0 | offset += 4; |
3596 | |
|
3597 | 0 | ti = proto_tree_add_item(args_tree, |
3598 | 0 | hf_amqp_0_10_struct32, |
3599 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
3600 | 0 | proto_item_set_len(ti, struct_size); |
3601 | 0 | if (struct_size > (uint32_t)tvb_reported_length_remaining(tvb, offset)) |
3602 | 0 | { |
3603 | 0 | next_tvb = tvb_new_subset_remaining(tvb, offset); |
3604 | 0 | } |
3605 | 0 | else |
3606 | 0 | { |
3607 | 0 | next_tvb = tvb_new_subset_length(tvb, offset, struct_size); |
3608 | 0 | } |
3609 | 0 | dissect_amqp_0_10_struct32(next_tvb, pinfo, ti); |
3610 | | /* offset += struct_size; */ |
3611 | 0 | } |
3612 | 0 | break; |
3613 | | |
3614 | 0 | case AMQP_0_10_METHOD_EXECUTION_EXCEPTION: |
3615 | 0 | if ((flag1 & ~0x7f) || (flag2 != 0)) |
3616 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
3617 | 0 | if (flag1 & 0x01) { |
3618 | | /* error-code (error-code [uint16]) */ |
3619 | 0 | proto_tree_add_item(args_tree, |
3620 | 0 | hf_amqp_0_10_method_execution_exception_error, |
3621 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
3622 | 0 | offset += 2; |
3623 | 0 | } |
3624 | 0 | if (flag1 & 0x02) { |
3625 | | /* command-id (sequence-no [uint32]) */ |
3626 | 0 | proto_tree_add_item(args_tree, |
3627 | 0 | hf_amqp_0_10_method_execution_command_id, |
3628 | 0 | tvb, offset, 4, ENC_BIG_ENDIAN); |
3629 | 0 | offset += 4; |
3630 | 0 | } |
3631 | 0 | if (flag1 & 0x04) { |
3632 | | /* class-code (uint8) */ |
3633 | 0 | amqp_class = tvb_get_uint8(tvb, offset); |
3634 | 0 | proto_tree_add_item(args_tree, hf_amqp_0_10_class, |
3635 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
3636 | 0 | offset += 1; |
3637 | 0 | } |
3638 | 0 | if (flag1 & 0x08) { |
3639 | | /* command-code (uint8) */ |
3640 | 0 | switch(amqp_class) { |
3641 | 0 | case AMQP_0_10_CLASS_CONNECTION: |
3642 | 0 | class_hf = hf_amqp_0_10_connection_method; |
3643 | 0 | break; |
3644 | 0 | case AMQP_0_10_CLASS_SESSION: |
3645 | 0 | class_hf = hf_amqp_0_10_session_method; |
3646 | 0 | break; |
3647 | 0 | case AMQP_0_10_CLASS_EXECUTION: |
3648 | 0 | class_hf = hf_amqp_0_10_execution_method; |
3649 | 0 | break; |
3650 | 0 | case AMQP_0_10_CLASS_MESSAGE: |
3651 | 0 | class_hf = hf_amqp_0_10_message_method; |
3652 | 0 | break; |
3653 | 0 | case AMQP_0_10_CLASS_TX: |
3654 | 0 | class_hf = hf_amqp_0_10_tx_method; |
3655 | 0 | break; |
3656 | 0 | case AMQP_0_10_CLASS_DTX: |
3657 | 0 | class_hf = hf_amqp_0_10_dtx_method; |
3658 | 0 | break; |
3659 | 0 | case AMQP_0_10_CLASS_EXCHANGE: |
3660 | 0 | class_hf = hf_amqp_0_10_exchange_method; |
3661 | 0 | break; |
3662 | 0 | case AMQP_0_10_CLASS_QUEUE: |
3663 | 0 | class_hf = hf_amqp_0_10_queue_method; |
3664 | 0 | break; |
3665 | 0 | case AMQP_0_10_CLASS_FILE: |
3666 | 0 | class_hf = hf_amqp_0_10_file_method; |
3667 | 0 | break; |
3668 | 0 | case AMQP_0_10_CLASS_STREAM: |
3669 | 0 | class_hf = hf_amqp_0_10_stream_method; |
3670 | 0 | break; |
3671 | 0 | default: |
3672 | 0 | class_hf = -1; |
3673 | 0 | break; |
3674 | 0 | } |
3675 | 0 | if (class_hf != -1) |
3676 | 0 | proto_tree_add_item(args_tree, class_hf, |
3677 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
3678 | 0 | else |
3679 | 0 | expert_add_info_format(pinfo, args_tree, &ei_amqp_invalid_class_code, "Invalid class code %x", amqp_class); |
3680 | 0 | offset += 1; |
3681 | 0 | } |
3682 | 0 | if (flag1 & 0x10) { |
3683 | | /* field-index (uint8) */ |
3684 | 0 | proto_tree_add_item(args_tree, hf_amqp_0_10_method_execution_field_index, |
3685 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
3686 | 0 | offset += 1; |
3687 | 0 | } |
3688 | 0 | if (flag1 & 0x20) { |
3689 | | /* description (str16) */ |
3690 | 0 | proto_tree_add_item(args_tree, hf_amqp_0_10_method_execution_description, |
3691 | 0 | tvb, offset, 2, ENC_ASCII|ENC_BIG_ENDIAN); |
3692 | 0 | offset += (2 + tvb_get_ntohs(tvb, offset)); |
3693 | 0 | } |
3694 | 0 | if (flag1 & 0x40) { |
3695 | | /* error-info (map) */ |
3696 | 0 | struct_size = amqp_0_10_get_32bit_size_new(args_tree, pinfo, tvb, hf_amqp_0_10_method_execution_error_info_size, offset); |
3697 | 0 | offset += 4; |
3698 | 0 | ti = proto_tree_add_item(args_tree, |
3699 | 0 | hf_amqp_0_10_method_execution_error_info, |
3700 | 0 | tvb, |
3701 | 0 | offset, |
3702 | 0 | struct_size, ENC_NA); |
3703 | 0 | if (struct_size > (uint32_t)tvb_reported_length_remaining(tvb, offset)) |
3704 | 0 | { |
3705 | 0 | next_tvb = tvb_new_subset_remaining(tvb, offset); |
3706 | 0 | } |
3707 | 0 | else |
3708 | 0 | { |
3709 | 0 | next_tvb = tvb_new_subset_length(tvb, offset, struct_size); |
3710 | 0 | } |
3711 | 0 | dissect_amqp_0_10_map (next_tvb, ti); |
3712 | | /* offset += struct_size; */ |
3713 | 0 | } |
3714 | 0 | break; |
3715 | 0 | } |
3716 | 0 | } |
3717 | | |
3718 | | static void |
3719 | | dissect_amqp_0_10_message(tvbuff_t *tvb, |
3720 | | packet_info *pinfo, |
3721 | | proto_tree *tree) |
3722 | 2 | { |
3723 | 2 | proto_item *args_tree; |
3724 | 2 | proto_item *ti; |
3725 | 2 | proto_item *flags_item; |
3726 | 2 | uint8_t method; |
3727 | 2 | uint8_t flag1, flag2; |
3728 | 2 | uint16_t size; |
3729 | 2 | uint32_t map_size; |
3730 | 2 | int flags_offset; |
3731 | 2 | const char *method_name; |
3732 | 2 | int offset = 0; |
3733 | 2 | tvbuff_t *next_tvb; |
3734 | | |
3735 | 2 | method = tvb_get_uint8(tvb, offset+1); |
3736 | 2 | method_name = val_to_str_const(method, amqp_0_10_message_methods, |
3737 | 2 | "<invalid message method>"); |
3738 | 2 | col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", method_name); |
3739 | 2 | col_set_fence(pinfo->cinfo, COL_INFO); |
3740 | | |
3741 | 2 | proto_tree_add_item(tree, hf_amqp_0_10_message_method, |
3742 | 2 | tvb, offset+1, 1, ENC_BIG_ENDIAN); |
3743 | 2 | offset += 2; |
3744 | | |
3745 | | /* |
3746 | | * Session header is 2 bytes; one that tells that it's 1 byte long, then |
3747 | | * the byte itself. Bit 0 is sync. |
3748 | | */ |
3749 | 2 | flag1 = tvb_get_uint8(tvb, offset); |
3750 | 2 | flag2 = tvb_get_uint8(tvb, offset+1); |
3751 | 2 | ti = proto_tree_add_item(tree, hf_amqp_0_10_session_header, tvb, offset, 2, ENC_BIG_ENDIAN); |
3752 | 2 | if ((flag1 != 1) || ((flag2 & 0xfe) != 0)) |
3753 | 2 | proto_item_append_text(ti, " (Invalid)"); |
3754 | 0 | else |
3755 | 0 | proto_tree_add_item(tree, hf_amqp_0_10_session_header_sync, |
3756 | 0 | tvb, offset + 1, 1, ENC_BIG_ENDIAN); |
3757 | 2 | offset += 2; |
3758 | | |
3759 | 2 | ti = proto_tree_add_item(tree, hf_amqp_method_arguments, |
3760 | 2 | tvb, offset, -1, ENC_NA); |
3761 | 2 | args_tree = proto_item_add_subtree(ti, ett_args); |
3762 | | /* |
3763 | | * The flag bits are a simple bit string, not a net-byte-order |
3764 | | * field. tvb_get_bits16() doesn't know how to do little-endian |
3765 | | * at this time, so just pick out two bytes. |
3766 | | */ |
3767 | 2 | flags_offset = offset; |
3768 | 2 | flag1 = tvb_get_uint8(tvb, offset); |
3769 | 2 | flag2 = tvb_get_uint8(tvb, offset+1); |
3770 | 2 | flags_item = proto_tree_add_item(args_tree, |
3771 | 2 | hf_amqp_0_10_argument_packing_flags, |
3772 | 2 | tvb, offset, 2, ENC_BIG_ENDIAN); |
3773 | 2 | offset += 2; |
3774 | 2 | switch (method) { |
3775 | 0 | case AMQP_0_10_METHOD_MESSAGE_TRANSFER: |
3776 | 0 | if ((flag1 & ~0x07) || (flag2 != 0)) |
3777 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
3778 | 0 | if (flag1 & 0x01) { /* destination (str8) */ |
3779 | 0 | proto_tree_add_item(args_tree, |
3780 | 0 | hf_amqp_0_10_method_message_transfer_destination, |
3781 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
3782 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
3783 | 0 | } |
3784 | 0 | if (flag1 & 0x02) { /* accept-mode (accept-mode [uint8]) */ |
3785 | 0 | proto_tree_add_item(args_tree, |
3786 | 0 | hf_amqp_0_10_method_message_transfer_accept_mode, |
3787 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
3788 | 0 | offset += 1; |
3789 | 0 | } |
3790 | 0 | if (flag1 & 0x04) { /* acquire-mode (acquire-mode [uint8]) */ |
3791 | 0 | proto_tree_add_item(args_tree, |
3792 | 0 | hf_amqp_0_10_method_message_transfer_acquire_mode, |
3793 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
3794 | | /* offset += 1; */ |
3795 | 0 | } |
3796 | 0 | break; |
3797 | | |
3798 | 0 | case AMQP_0_10_METHOD_MESSAGE_ACCEPT: |
3799 | 0 | if ((flag1 & ~0x01) || (flag2 != 0)) |
3800 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
3801 | 0 | if (flag1 & 0x01) { |
3802 | | /* transfers (session.commands [sequence-set]) */ |
3803 | 0 | size = tvb_get_ntohs(tvb, offset); |
3804 | 0 | ti = proto_tree_add_item(args_tree, |
3805 | 0 | hf_amqp_0_10_method_message_accept_transfers, |
3806 | 0 | tvb, offset, size + 2, ENC_NA); |
3807 | 0 | offset += 2; |
3808 | 0 | format_amqp_0_10_sequence_set(tvb, offset, size, ti); |
3809 | | /* offset += size; */ |
3810 | 0 | } |
3811 | 0 | break; |
3812 | | |
3813 | 0 | case AMQP_0_10_METHOD_MESSAGE_REJECT: |
3814 | 0 | if ((flag1 & ~0x07) || (flag2 != 0)) |
3815 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
3816 | 0 | if (flag1 & 0x01) { |
3817 | | /* transfers (session.commands [sequence-set]) */ |
3818 | 0 | size = tvb_get_ntohs(tvb, offset); |
3819 | 0 | ti = proto_tree_add_item(args_tree, |
3820 | 0 | hf_amqp_0_10_method_message_accept_transfers, |
3821 | 0 | tvb, offset, size + 2, ENC_NA); |
3822 | 0 | offset += 2; |
3823 | 0 | format_amqp_0_10_sequence_set(tvb, offset, size, ti); |
3824 | 0 | offset += size; |
3825 | 0 | } |
3826 | 0 | if (flag1 & 0x02) { /* reject-code (reject-code [uint16]) */ |
3827 | 0 | proto_tree_add_item(args_tree, |
3828 | 0 | hf_amqp_0_10_method_message_transfer_reject_code, |
3829 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
3830 | 0 | offset += 2; |
3831 | 0 | } |
3832 | 0 | if (flag1 & 0x04) { /* text (str8) */ |
3833 | 0 | proto_tree_add_item(args_tree, |
3834 | 0 | hf_amqp_0_10_method_message_reject_text, |
3835 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
3836 | | /* offset += (1 + tvb_get_uint8(tvb, offset)); */ |
3837 | 0 | } |
3838 | 0 | break; |
3839 | | |
3840 | 1 | case AMQP_0_10_METHOD_MESSAGE_RELEASE: |
3841 | 1 | if ((flag1 & ~0x03) || (flag2 != 0)) |
3842 | 1 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
3843 | 1 | if (flag1 & 0x01) { |
3844 | | /* transfers (session.commands [sequence-set]) */ |
3845 | 0 | size = tvb_get_ntohs(tvb, offset); |
3846 | 0 | proto_tree_add_item(args_tree, |
3847 | 0 | hf_amqp_0_10_method_message_accept_transfers, |
3848 | 0 | tvb, offset, size + 2, ENC_NA); |
3849 | 0 | offset += 2; |
3850 | 0 | format_amqp_0_10_sequence_set(tvb, offset, size, ti); |
3851 | | /* offset += size; */ |
3852 | 0 | } |
3853 | | /* |
3854 | | * 2nd argument is an optional bit, set-redelivered. |
3855 | | */ |
3856 | 1 | proto_tree_add_item(args_tree, |
3857 | 1 | hf_amqp_0_10_method_message_release_set_redelivered, |
3858 | 1 | tvb, flags_offset, 1, ENC_BIG_ENDIAN); |
3859 | 1 | break; |
3860 | | |
3861 | 0 | case AMQP_0_10_METHOD_MESSAGE_ACQUIRE: |
3862 | 0 | if ((flag1 & ~0x01) || (flag2 != 0)) |
3863 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
3864 | 0 | if (flag1 & 0x01) { |
3865 | | /* transfers (session.commands [sequence-set]) */ |
3866 | 0 | size = tvb_get_ntohs(tvb, offset); |
3867 | 0 | proto_tree_add_item(args_tree, |
3868 | 0 | hf_amqp_0_10_method_message_accept_transfers, |
3869 | 0 | tvb, offset, size + 2, ENC_NA); |
3870 | 0 | offset += 2; |
3871 | 0 | format_amqp_0_10_sequence_set(tvb, offset, size, ti); |
3872 | | /* offset += size; */ |
3873 | 0 | } |
3874 | 0 | break; |
3875 | | |
3876 | 0 | case AMQP_0_10_METHOD_MESSAGE_RESUME: |
3877 | 0 | if ((flag1 & ~0x03) || (flag2 != 0)) |
3878 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
3879 | 0 | if (flag1 & 0x01) { |
3880 | | /* destination (destination [str8]) */ |
3881 | 0 | proto_tree_add_item(args_tree, |
3882 | 0 | hf_amqp_0_10_method_message_dest, |
3883 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
3884 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
3885 | 0 | } |
3886 | 0 | if (flag1 & 0x02) { |
3887 | | /* resume-id (resume-id [str16]) */ |
3888 | 0 | proto_tree_add_item(args_tree, |
3889 | 0 | hf_amqp_0_10_method_message_resume_id, |
3890 | 0 | tvb, offset, 2, ENC_ASCII|ENC_BIG_ENDIAN); |
3891 | | /* offset += (2 + tvb_get_ntohs(tvb, offset)); */ |
3892 | 0 | } |
3893 | 0 | break; |
3894 | | |
3895 | 1 | case AMQP_0_10_METHOD_MESSAGE_SUBSCRIBE: |
3896 | 1 | if (flag2 != 0) |
3897 | 1 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
3898 | 1 | if (flag1 & 0x01) { |
3899 | | /* queue (queue.name [str8]) */ |
3900 | 0 | proto_tree_add_item(args_tree, |
3901 | 0 | hf_amqp_0_10_method_message_subscribe_queue, |
3902 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
3903 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
3904 | 0 | } |
3905 | 1 | if (flag1 & 0x02) { |
3906 | | /* destination (destination [str8]) */ |
3907 | 1 | proto_tree_add_item(args_tree, |
3908 | 1 | hf_amqp_0_10_method_message_dest, |
3909 | 1 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
3910 | 1 | offset += (1 + tvb_get_uint8(tvb, offset)); |
3911 | 1 | } |
3912 | 1 | if (flag1 & 0x04) { /* accept-mode (accept-mode [uint8]) */ |
3913 | 0 | proto_tree_add_item(args_tree, |
3914 | 0 | hf_amqp_0_10_method_message_transfer_accept_mode, |
3915 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
3916 | 0 | offset += 1; |
3917 | 0 | } |
3918 | 1 | if (flag1 & 0x08) { /* acquire-mode (acquire-mode [uint8]) */ |
3919 | 0 | proto_tree_add_item(args_tree, |
3920 | 0 | hf_amqp_0_10_method_message_transfer_acquire_mode, |
3921 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
3922 | 0 | offset += 1; |
3923 | 0 | } |
3924 | | /* |
3925 | | * 5th argument is an optional bit, exclusive. |
3926 | | */ |
3927 | 1 | proto_tree_add_item(args_tree, |
3928 | 1 | hf_amqp_0_10_method_message_subscribe_exclusive, |
3929 | 1 | tvb, flags_offset, 1, ENC_BIG_ENDIAN); |
3930 | 1 | if (flag1 & 0x20) { |
3931 | | /* resume-id (resume-id [str16]) */ |
3932 | 0 | proto_tree_add_item(args_tree, |
3933 | 0 | hf_amqp_0_10_method_message_resume_id, |
3934 | 0 | tvb, offset, 2, ENC_ASCII|ENC_BIG_ENDIAN); |
3935 | 0 | offset += (2 + tvb_get_ntohs(tvb, offset)); |
3936 | 0 | } |
3937 | 1 | if (flag1 & 0x40) { |
3938 | | /* resume-ttl (uint64) */ |
3939 | 0 | proto_tree_add_item(args_tree, |
3940 | 0 | hf_amqp_0_10_method_message_subscribe_resume_ttl, |
3941 | 0 | tvb, offset, 8, ENC_BIG_ENDIAN); |
3942 | 0 | offset += 8; |
3943 | 0 | } |
3944 | 1 | if (flag1 & 0x80) { |
3945 | | /* arguments (map) */ |
3946 | 0 | map_size = amqp_0_10_get_32bit_size(tvb, offset); |
3947 | 0 | ti = proto_tree_add_item(args_tree, |
3948 | 0 | hf_amqp_0_10_method_message_subscribe_args, |
3949 | 0 | tvb, |
3950 | 0 | offset, |
3951 | 0 | 4 + map_size, ENC_NA); |
3952 | 0 | if (map_size > (uint32_t)tvb_reported_length_remaining(tvb, offset)) |
3953 | 0 | { |
3954 | 0 | next_tvb = tvb_new_subset_remaining(tvb, offset); |
3955 | 0 | } |
3956 | 0 | else |
3957 | 0 | { |
3958 | 0 | next_tvb = tvb_new_subset_length(tvb, offset, map_size); |
3959 | 0 | } |
3960 | 0 | dissect_amqp_0_10_map (next_tvb, ti); |
3961 | | /* offset += (4 + map_size); */ |
3962 | 0 | } |
3963 | 1 | break; |
3964 | | |
3965 | 0 | case AMQP_0_10_METHOD_MESSAGE_CANCEL: |
3966 | 0 | if ((flag1 & ~0x01) || (flag2 != 0)) |
3967 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
3968 | 0 | if (flag1 & 0x01) { |
3969 | | /* destination (destination [str8]) */ |
3970 | 0 | proto_tree_add_item(args_tree, |
3971 | 0 | hf_amqp_0_10_method_message_dest, |
3972 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
3973 | | /* offset += (1 + tvb_get_uint8(tvb, offset)); */ |
3974 | 0 | } |
3975 | 0 | break; |
3976 | | |
3977 | 0 | case AMQP_0_10_METHOD_MESSAGE_SET_FLOW_MODE: |
3978 | 0 | if ((flag1 & ~0x03) || (flag2 != 0)) |
3979 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
3980 | 0 | if (flag1 & 0x01) { |
3981 | | /* destination (destination [str8]) */ |
3982 | 0 | proto_tree_add_item(args_tree, |
3983 | 0 | hf_amqp_0_10_method_message_dest, |
3984 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
3985 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
3986 | 0 | } |
3987 | 0 | if (flag1 & 0x02) { |
3988 | | /* flow-mode (flow-mode [uint8]) */ |
3989 | 0 | proto_tree_add_item(args_tree, |
3990 | 0 | hf_amqp_0_10_method_message_flow_mode, |
3991 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
3992 | | /* offset += 1; */ |
3993 | 0 | } |
3994 | 0 | break; |
3995 | | |
3996 | 0 | case AMQP_0_10_METHOD_MESSAGE_FLOW: |
3997 | 0 | if ((flag1 & ~0x07) || (flag2 != 0)) |
3998 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
3999 | 0 | if (flag1 & 0x01) { |
4000 | | /* destination (destination [str8]) */ |
4001 | 0 | proto_tree_add_item(args_tree, |
4002 | 0 | hf_amqp_0_10_method_message_dest, |
4003 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
4004 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
4005 | 0 | } |
4006 | 0 | if (flag1 & 0x02) { |
4007 | | /* unit (credit-unit [uint8]) */ |
4008 | 0 | proto_tree_add_item(args_tree, |
4009 | 0 | hf_amqp_0_10_method_message_credit_unit, |
4010 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
4011 | 0 | offset += 1; |
4012 | 0 | } |
4013 | 0 | if (flag1 & 0x04) { |
4014 | | /* value (uint32) */ |
4015 | 0 | proto_tree_add_item(args_tree, |
4016 | 0 | hf_amqp_0_10_method_message_credit_value, |
4017 | 0 | tvb, offset, 4, ENC_BIG_ENDIAN); |
4018 | | /* offset += 4; */ |
4019 | 0 | } |
4020 | 0 | break; |
4021 | | |
4022 | 0 | case AMQP_0_10_METHOD_MESSAGE_FLUSH: |
4023 | 0 | if ((flag1 & ~0x01) || (flag2 != 0)) |
4024 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
4025 | 0 | if (flag1 & 0x01) { |
4026 | | /* destination (destination [str8]) */ |
4027 | 0 | proto_tree_add_item(args_tree, |
4028 | 0 | hf_amqp_0_10_method_message_dest, |
4029 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
4030 | | /* offset += (1 + tvb_get_uint8(tvb, offset)); */ |
4031 | 0 | } |
4032 | 0 | break; |
4033 | | |
4034 | 0 | case AMQP_0_10_METHOD_MESSAGE_STOP: |
4035 | 0 | if ((flag1 & ~0x01) || (flag2 != 0)) |
4036 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
4037 | 0 | if (flag1 & 0x01) { |
4038 | | /* destination (destination [str8]) */ |
4039 | 0 | proto_tree_add_item(args_tree, |
4040 | 0 | hf_amqp_0_10_method_message_dest, |
4041 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
4042 | | /* offset += (1 + tvb_get_uint8(tvb, offset)); */ |
4043 | 0 | } |
4044 | 0 | break; |
4045 | 2 | } |
4046 | 2 | } |
4047 | | |
4048 | | static void |
4049 | | dissect_amqp_0_10_tx(tvbuff_t *tvb, |
4050 | | packet_info *pinfo, |
4051 | | proto_tree *tree) |
4052 | 0 | { |
4053 | 0 | uint8_t method; |
4054 | 0 | uint8_t flag1, flag2; |
4055 | 0 | const char *method_name; |
4056 | 0 | proto_item *ti; |
4057 | 0 | int offset = 1; |
4058 | |
|
4059 | 0 | method = tvb_get_uint8(tvb, offset+1); |
4060 | 0 | method_name = val_to_str_const(method, amqp_0_10_tx_methods, |
4061 | 0 | "<invalid tx method>"); |
4062 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", method_name); |
4063 | 0 | col_set_fence(pinfo->cinfo, COL_INFO); |
4064 | |
|
4065 | 0 | proto_tree_add_item(tree, hf_amqp_0_10_tx_method, |
4066 | 0 | tvb, offset+1, 1, ENC_BIG_ENDIAN); |
4067 | 0 | offset += 2; |
4068 | | /* |
4069 | | * Session header is 2 bytes; one that tells that it's 1 byte long, then |
4070 | | * the byte itself. Bit 0 is sync. |
4071 | | */ |
4072 | 0 | flag1 = tvb_get_uint8(tvb, offset); |
4073 | 0 | flag2 = tvb_get_uint8(tvb, offset+1); |
4074 | 0 | ti = proto_tree_add_item(tree, hf_amqp_0_10_session_header, tvb, offset, 2, ENC_BIG_ENDIAN); |
4075 | 0 | if ((flag1 != 1) || ((flag2 & 0xfe) != 0)) |
4076 | 0 | proto_item_append_text(ti, " (Invalid)"); |
4077 | 0 | else |
4078 | 0 | proto_tree_add_item(tree, hf_amqp_0_10_session_header_sync, |
4079 | 0 | tvb, offset + 1, 1, ENC_BIG_ENDIAN); |
4080 | | /* offset += 2; */ |
4081 | | |
4082 | | /* No args on any method in this class */ |
4083 | 0 | } |
4084 | | |
4085 | | static void |
4086 | | dissect_amqp_0_10_dtx(tvbuff_t *tvb, |
4087 | | packet_info *pinfo, |
4088 | | proto_tree *tree) |
4089 | 0 | { |
4090 | 0 | proto_item *args_tree; |
4091 | 0 | proto_item *ti; |
4092 | 0 | proto_item *flags_item; |
4093 | 0 | uint8_t method; |
4094 | 0 | uint8_t flag1, flag2; |
4095 | 0 | uint16_t xid_length; |
4096 | 0 | int flags_offset; |
4097 | 0 | const char *method_name; |
4098 | 0 | int offset = 0; |
4099 | |
|
4100 | 0 | method = tvb_get_uint8(tvb, offset+1); |
4101 | 0 | method_name = val_to_str_const(method, amqp_0_10_dtx_methods, |
4102 | 0 | "<invalid dtx method>"); |
4103 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", method_name); |
4104 | 0 | col_set_fence(pinfo->cinfo, COL_INFO); |
4105 | |
|
4106 | 0 | proto_tree_add_item(tree, hf_amqp_0_10_dtx_method, |
4107 | 0 | tvb, offset+1, 1, ENC_BIG_ENDIAN); |
4108 | 0 | offset += 2; |
4109 | | /* |
4110 | | * Session header is 2 bytes; one that tells that it's 1 byte long, then |
4111 | | * the byte itself. Bit 0 is sync. |
4112 | | */ |
4113 | 0 | flag1 = tvb_get_uint8(tvb, offset); |
4114 | 0 | flag2 = tvb_get_uint8(tvb, offset+1); |
4115 | 0 | ti = proto_tree_add_item(tree, hf_amqp_0_10_session_header, tvb, offset, 2, ENC_BIG_ENDIAN); |
4116 | 0 | if ((flag1 != 1) || ((flag2 & 0xfe) != 0)) |
4117 | 0 | proto_item_append_text(ti, " (Invalid)"); |
4118 | 0 | else |
4119 | 0 | proto_tree_add_item(tree, hf_amqp_0_10_session_header_sync, |
4120 | 0 | tvb, offset + 1, 1, ENC_BIG_ENDIAN); |
4121 | 0 | offset += 2; |
4122 | | |
4123 | | /* No args for dtx.select or dtx.recover */ |
4124 | 0 | if ((method == AMQP_0_10_METHOD_DTX_SELECT) || |
4125 | 0 | (method == AMQP_0_10_METHOD_DTX_RECOVER)) |
4126 | 0 | return; |
4127 | | |
4128 | 0 | ti = proto_tree_add_item(tree, hf_amqp_method_arguments, |
4129 | 0 | tvb, offset, -1, ENC_NA); |
4130 | 0 | args_tree = proto_item_add_subtree(ti, ett_args); |
4131 | | |
4132 | | /* |
4133 | | * The flag bits are a simple bit string, not a net-byte-order |
4134 | | * field. tvb_get_bits16() doesn't know how to do little-endian |
4135 | | * at this time, so just pick out two bytes. |
4136 | | */ |
4137 | 0 | flags_offset = offset; |
4138 | 0 | flag1 = tvb_get_uint8(tvb, offset); |
4139 | 0 | flag2 = tvb_get_uint8(tvb, offset+1); |
4140 | 0 | flags_item = proto_tree_add_item(args_tree, |
4141 | 0 | hf_amqp_0_10_argument_packing_flags, |
4142 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
4143 | 0 | offset += 2; |
4144 | 0 | switch (method) { |
4145 | 0 | case AMQP_0_10_METHOD_DTX_START: |
4146 | 0 | if ((flag1 & ~0x07) || (flag2 != 0)) |
4147 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
4148 | 0 | if (flag1 & 0x01) { /* xid (xid) */ |
4149 | 0 | xid_length = tvb_get_ntohs(tvb, offset); |
4150 | 0 | offset += 2; |
4151 | 0 | ti = proto_tree_add_item(args_tree, |
4152 | 0 | hf_amqp_0_10_dtx_xid, |
4153 | 0 | tvb, |
4154 | 0 | offset - 2, |
4155 | 0 | xid_length + 2, ENC_NA); |
4156 | 0 | dissect_amqp_0_10_xid (tvb, |
4157 | 0 | offset, |
4158 | 0 | ti); |
4159 | | /* offset += xid_length; */ |
4160 | 0 | } |
4161 | | /* |
4162 | | * 2nd, 3rd arguments are optional bits. |
4163 | | */ |
4164 | 0 | proto_tree_add_item(args_tree, |
4165 | 0 | hf_amqp_0_10_method_dtx_start_join, |
4166 | 0 | tvb, flags_offset, 1, ENC_BIG_ENDIAN); |
4167 | 0 | proto_tree_add_item(args_tree, |
4168 | 0 | hf_amqp_0_10_method_dtx_start_resume, |
4169 | 0 | tvb, flags_offset, 1, ENC_BIG_ENDIAN); |
4170 | |
|
4171 | 0 | break; |
4172 | | |
4173 | 0 | case AMQP_0_10_METHOD_DTX_END: |
4174 | 0 | if ((flag1 & ~0x07) || (flag2 != 0)) |
4175 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
4176 | 0 | if (flag1 & 0x01) { /* xid (xid) */ |
4177 | 0 | xid_length = tvb_get_ntohs(tvb, offset); |
4178 | 0 | offset += 2; |
4179 | 0 | ti = proto_tree_add_item(args_tree, |
4180 | 0 | hf_amqp_0_10_dtx_xid, |
4181 | 0 | tvb, |
4182 | 0 | offset - 2, |
4183 | 0 | xid_length + 2, ENC_NA); |
4184 | 0 | dissect_amqp_0_10_xid (tvb, |
4185 | 0 | offset, |
4186 | 0 | ti); |
4187 | | /* offset += xid_length; */ |
4188 | 0 | } |
4189 | | /* |
4190 | | * 2nd, 3rd arguments are optional bits. |
4191 | | */ |
4192 | 0 | proto_tree_add_item(args_tree, |
4193 | 0 | hf_amqp_0_10_method_dtx_end_fail, |
4194 | 0 | tvb, flags_offset, 1, ENC_BIG_ENDIAN); |
4195 | 0 | proto_tree_add_item(args_tree, |
4196 | 0 | hf_amqp_0_10_method_dtx_end_suspend, |
4197 | 0 | tvb, flags_offset, 1, ENC_BIG_ENDIAN); |
4198 | 0 | break; |
4199 | | |
4200 | 0 | case AMQP_0_10_METHOD_DTX_COMMIT: |
4201 | 0 | if ((flag1 & ~0x03) || (flag2 != 0)) |
4202 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
4203 | 0 | if (flag1 & 0x01) { /* xid (xid) */ |
4204 | 0 | xid_length = tvb_get_ntohs(tvb, offset); |
4205 | 0 | offset += 2; |
4206 | 0 | ti = proto_tree_add_item(args_tree, |
4207 | 0 | hf_amqp_0_10_dtx_xid, |
4208 | 0 | tvb, |
4209 | 0 | offset - 2, |
4210 | 0 | xid_length + 2, ENC_NA); |
4211 | 0 | dissect_amqp_0_10_xid (tvb, |
4212 | 0 | offset, |
4213 | 0 | ti); |
4214 | | /* offset += xid_length; */ |
4215 | 0 | } |
4216 | | /* |
4217 | | * 2nd argument is an optional bit. |
4218 | | */ |
4219 | 0 | proto_tree_add_item(args_tree, |
4220 | 0 | hf_amqp_0_10_method_dtx_commit_one_phase, |
4221 | 0 | tvb, flags_offset, 1, ENC_BIG_ENDIAN); |
4222 | 0 | break; |
4223 | | |
4224 | 0 | case AMQP_0_10_METHOD_DTX_FORGET: |
4225 | 0 | case AMQP_0_10_METHOD_DTX_GET_TIMEOUT: |
4226 | 0 | case AMQP_0_10_METHOD_DTX_PREPARE: |
4227 | 0 | case AMQP_0_10_METHOD_DTX_ROLLBACK: |
4228 | 0 | if ((flag1 & ~0x01) || (flag2 != 0)) |
4229 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
4230 | 0 | if (flag1 & 0x01) { /* xid (xid) */ |
4231 | 0 | xid_length = tvb_get_ntohs(tvb, offset); |
4232 | 0 | offset += 2; |
4233 | 0 | ti = proto_tree_add_item(args_tree, |
4234 | 0 | hf_amqp_0_10_dtx_xid, |
4235 | 0 | tvb, |
4236 | 0 | offset - 2, |
4237 | 0 | xid_length + 2, ENC_NA); |
4238 | 0 | dissect_amqp_0_10_xid (tvb, |
4239 | 0 | offset, |
4240 | 0 | ti); |
4241 | | /* offset += xid_length; */ |
4242 | 0 | } |
4243 | 0 | break; |
4244 | | |
4245 | 0 | case AMQP_0_10_METHOD_DTX_SET_TIMEOUT: |
4246 | 0 | if ((flag1 & ~0x03) || (flag2 != 0)) |
4247 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
4248 | 0 | if (flag1 & 0x01) { /* xid (xid) */ |
4249 | 0 | xid_length = tvb_get_ntohs(tvb, offset); |
4250 | 0 | offset += 2; |
4251 | 0 | ti = proto_tree_add_item(args_tree, |
4252 | 0 | hf_amqp_0_10_dtx_xid, |
4253 | 0 | tvb, |
4254 | 0 | offset - 2, |
4255 | 0 | xid_length + 2, ENC_NA); |
4256 | 0 | dissect_amqp_0_10_xid (tvb, |
4257 | 0 | offset, |
4258 | 0 | ti); |
4259 | 0 | offset += xid_length; |
4260 | 0 | } |
4261 | 0 | if (flag1 & 0x02) { /* timeout (uint32) */ |
4262 | 0 | proto_tree_add_item(args_tree, |
4263 | 0 | hf_amqp_0_10_method_dtx_set_timeout_timeout, |
4264 | 0 | tvb, offset, 4, ENC_BIG_ENDIAN); |
4265 | | /* offset += 2; */ |
4266 | 0 | } |
4267 | 0 | break; |
4268 | |
|
4269 | 0 | } |
4270 | 0 | } |
4271 | | |
4272 | | static void |
4273 | | dissect_amqp_0_10_exchange(tvbuff_t *tvb, |
4274 | | packet_info *pinfo, |
4275 | | proto_tree *tree) |
4276 | 0 | { |
4277 | 0 | proto_item *args_tree; |
4278 | 0 | proto_item *ti; |
4279 | 0 | proto_item *flags_item; |
4280 | 0 | uint8_t method; |
4281 | 0 | uint8_t flag1, flag2; |
4282 | 0 | uint32_t map_length; |
4283 | 0 | int flags_offset; |
4284 | 0 | const char *method_name; |
4285 | 0 | int offset = 0; |
4286 | 0 | tvbuff_t *next_tvb; |
4287 | |
|
4288 | 0 | method = tvb_get_uint8(tvb, offset+1); |
4289 | 0 | method_name = val_to_str_const(method, amqp_0_10_exchange_methods, |
4290 | 0 | "<invalid exchange method>"); |
4291 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", method_name); |
4292 | 0 | col_set_fence(pinfo->cinfo, COL_INFO); |
4293 | |
|
4294 | 0 | proto_tree_add_item(tree, hf_amqp_0_10_exchange_method, |
4295 | 0 | tvb, offset+1, 1, ENC_BIG_ENDIAN); |
4296 | 0 | offset += 2; |
4297 | | /* |
4298 | | * Session header is 2 bytes; one that tells that it's 1 byte long, then |
4299 | | * the byte itself. Bit 0 is sync. |
4300 | | */ |
4301 | 0 | flag1 = tvb_get_uint8(tvb, offset); |
4302 | 0 | flag2 = tvb_get_uint8(tvb, offset+1); |
4303 | 0 | ti = proto_tree_add_item(tree, hf_amqp_0_10_session_header, tvb, offset, 2, ENC_BIG_ENDIAN); |
4304 | 0 | if ((flag1 != 1) || ((flag2 & 0xfe) != 0)) |
4305 | 0 | proto_item_append_text(ti, " (Invalid)"); |
4306 | 0 | else |
4307 | 0 | proto_tree_add_item(tree, hf_amqp_0_10_session_header_sync, |
4308 | 0 | tvb, offset + 1, 1, ENC_BIG_ENDIAN); |
4309 | 0 | offset += 2; |
4310 | |
|
4311 | 0 | ti = proto_tree_add_item(tree, hf_amqp_method_arguments, |
4312 | 0 | tvb, offset, -1, ENC_NA); |
4313 | 0 | args_tree = proto_item_add_subtree(ti, ett_args); |
4314 | | |
4315 | | /* |
4316 | | * The flag bits are a simple bit string, not a net-byte-order |
4317 | | * field. tvb_get_bits16() doesn't know how to do little-endian |
4318 | | * at this time, so just pick out two bytes. |
4319 | | */ |
4320 | 0 | flags_offset = offset; |
4321 | 0 | flag1 = tvb_get_uint8(tvb, offset); |
4322 | 0 | flag2 = tvb_get_uint8(tvb, offset+1); |
4323 | 0 | flags_item = proto_tree_add_item(args_tree, |
4324 | 0 | hf_amqp_0_10_argument_packing_flags, |
4325 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
4326 | 0 | offset += 2; |
4327 | 0 | switch (method) { |
4328 | 0 | case AMQP_0_10_METHOD_EXCHANGE_DECLARE: |
4329 | 0 | if ((flag1 & ~0x7f) || (flag2 != 0)) |
4330 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
4331 | 0 | if (flag1 & 0x01) { /* exchange (name [str8]) */ |
4332 | 0 | proto_tree_add_item(args_tree, |
4333 | 0 | hf_amqp_0_10_method_exchange_declare_exchange, |
4334 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
4335 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
4336 | 0 | } |
4337 | 0 | if (flag1 & 0x02) { /* type (str8) */ |
4338 | 0 | proto_tree_add_item(args_tree, |
4339 | 0 | hf_amqp_0_10_method_exchange_declare_type, |
4340 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
4341 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
4342 | 0 | } |
4343 | 0 | if (flag1 & 0x04) { /* alternate-exchange (name [str8]) */ |
4344 | 0 | proto_tree_add_item(args_tree, |
4345 | 0 | hf_amqp_0_10_method_exchange_declare_alt_exchange, |
4346 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
4347 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
4348 | 0 | } |
4349 | | /* |
4350 | | * 4th-6th arguments are optional bits. |
4351 | | */ |
4352 | 0 | proto_tree_add_item(args_tree, |
4353 | 0 | hf_amqp_0_10_method_exchange_declare_passive, |
4354 | 0 | tvb, flags_offset, 1, ENC_BIG_ENDIAN); |
4355 | 0 | proto_tree_add_item(args_tree, |
4356 | 0 | hf_amqp_0_10_method_exchange_declare_durable, |
4357 | 0 | tvb, flags_offset, 1, ENC_BIG_ENDIAN); |
4358 | 0 | proto_tree_add_item(args_tree, |
4359 | 0 | hf_amqp_0_10_method_exchange_declare_auto_delete, |
4360 | 0 | tvb, flags_offset, 1, ENC_BIG_ENDIAN); |
4361 | 0 | if (flag1 & 0x40) { /* arguments (map) */ |
4362 | 0 | map_length = amqp_0_10_get_32bit_size_new(args_tree, pinfo, tvb, hf_amqp_0_10_method_exchange_declare_arguments_size, offset); |
4363 | 0 | offset += 4; |
4364 | 0 | ti = proto_tree_add_item(args_tree, |
4365 | 0 | hf_amqp_0_10_method_exchange_declare_arguments, |
4366 | 0 | tvb, |
4367 | 0 | offset, |
4368 | 0 | map_length, ENC_NA); |
4369 | 0 | if (map_length > (uint32_t)tvb_reported_length_remaining(tvb, offset)) |
4370 | 0 | { |
4371 | 0 | next_tvb = tvb_new_subset_remaining(tvb, offset); |
4372 | 0 | } |
4373 | 0 | else |
4374 | 0 | { |
4375 | 0 | next_tvb = tvb_new_subset_length(tvb, offset, map_length); |
4376 | 0 | } |
4377 | 0 | dissect_amqp_0_10_map (next_tvb, ti); |
4378 | | /* offset += map_length; */ |
4379 | 0 | } |
4380 | 0 | break; |
4381 | | |
4382 | 0 | case AMQP_0_10_METHOD_EXCHANGE_DELETE: |
4383 | 0 | if ((flag1 & ~0x03) || (flag2 != 0)) |
4384 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
4385 | 0 | if (flag1 & 0x01) { /* exchange (name [str8]) */ |
4386 | 0 | proto_tree_add_item(args_tree, |
4387 | 0 | hf_amqp_0_10_method_exchange_declare_exchange, |
4388 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
4389 | | /* offset += (1 + tvb_get_uint8(tvb, offset)); */ |
4390 | 0 | } |
4391 | | /* |
4392 | | * 2nd argument is an optional bit. |
4393 | | */ |
4394 | 0 | proto_tree_add_item(args_tree, |
4395 | 0 | hf_amqp_0_10_method_exchange_delete_if_unused, |
4396 | 0 | tvb, flags_offset, 1, ENC_BIG_ENDIAN); |
4397 | 0 | break; |
4398 | | |
4399 | 0 | case AMQP_0_10_METHOD_EXCHANGE_QUERY: |
4400 | 0 | if ((flag1 & ~0x01) || (flag2 != 0)) |
4401 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
4402 | 0 | if (flag1 & 0x01) { /* exchange (name [str8]) */ |
4403 | 0 | proto_tree_add_item(args_tree, |
4404 | 0 | hf_amqp_0_10_method_exchange_declare_exchange, |
4405 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
4406 | | /* offset += (1 + tvb_get_uint8(tvb, offset)); */ |
4407 | 0 | } |
4408 | 0 | break; |
4409 | | |
4410 | 0 | case AMQP_0_10_METHOD_EXCHANGE_BIND: |
4411 | 0 | if ((flag1 & ~0x0f) || (flag2 != 0)) |
4412 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
4413 | 0 | if (flag1 & 0x01) { /* queue (queue.name [str8]) */ |
4414 | 0 | proto_tree_add_item(args_tree, |
4415 | 0 | hf_amqp_0_10_method_exchange_bind_queue, |
4416 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
4417 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
4418 | 0 | } |
4419 | 0 | if (flag1 & 0x02) { /* exchange (name [str8]) */ |
4420 | 0 | proto_tree_add_item(args_tree, |
4421 | 0 | hf_amqp_0_10_method_exchange_declare_exchange, |
4422 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
4423 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
4424 | 0 | } |
4425 | 0 | if (flag1 & 0x04) { /* binding-key (str8) */ |
4426 | 0 | proto_tree_add_item(args_tree, |
4427 | 0 | hf_amqp_0_10_method_exchange_binding_key, |
4428 | 0 | tvb, offset, 1, ENC_ASCII); |
4429 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
4430 | 0 | } |
4431 | 0 | if (flag1 & 0x08) { /* arguments (map) */ |
4432 | 0 | map_length = amqp_0_10_get_32bit_size_new(args_tree, pinfo, tvb, hf_amqp_0_10_method_exchange_declare_arguments_size, offset); |
4433 | 0 | offset += 4; |
4434 | 0 | ti = proto_tree_add_item(args_tree, |
4435 | 0 | hf_amqp_0_10_method_exchange_declare_arguments, |
4436 | 0 | tvb, |
4437 | 0 | offset, |
4438 | 0 | map_length, ENC_NA); |
4439 | 0 | if (map_length > (uint32_t)tvb_reported_length_remaining(tvb, offset)) |
4440 | 0 | { |
4441 | 0 | next_tvb = tvb_new_subset_remaining(tvb, offset); |
4442 | 0 | } |
4443 | 0 | else |
4444 | 0 | { |
4445 | 0 | next_tvb = tvb_new_subset_length(tvb, offset, map_length); |
4446 | 0 | } |
4447 | 0 | dissect_amqp_0_10_map (next_tvb, ti); |
4448 | | /* offset += map_length; */ |
4449 | 0 | } |
4450 | 0 | break; |
4451 | | |
4452 | 0 | case AMQP_0_10_METHOD_EXCHANGE_UNBIND: |
4453 | 0 | if ((flag1 & ~0x07) || (flag2 != 0)) |
4454 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
4455 | 0 | if (flag1 & 0x01) { /* queue (queue.name [str8]) */ |
4456 | 0 | proto_tree_add_item(args_tree, |
4457 | 0 | hf_amqp_0_10_method_exchange_bind_queue, |
4458 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
4459 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
4460 | 0 | } |
4461 | 0 | if (flag1 & 0x02) { /* exchange (name [str8]) */ |
4462 | 0 | proto_tree_add_item(args_tree, |
4463 | 0 | hf_amqp_0_10_method_exchange_declare_exchange, |
4464 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
4465 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
4466 | 0 | } |
4467 | 0 | if (flag1 & 0x04) { /* binding-key (str8) */ |
4468 | 0 | proto_tree_add_item(args_tree, |
4469 | 0 | hf_amqp_0_10_method_exchange_binding_key, |
4470 | 0 | tvb, offset, 1, ENC_ASCII); |
4471 | | /* offset += (1 + tvb_get_uint8(tvb, offset)); */ |
4472 | 0 | } |
4473 | 0 | break; |
4474 | | |
4475 | 0 | case AMQP_0_10_METHOD_EXCHANGE_BOUND: |
4476 | 0 | if ((flag1 & ~0x0f) || (flag2 != 0)) |
4477 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
4478 | 0 | if (flag1 & 0x01) { /* exchange (name [str8]) */ |
4479 | 0 | proto_tree_add_item(args_tree, |
4480 | 0 | hf_amqp_0_10_method_exchange_declare_exchange, |
4481 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
4482 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
4483 | 0 | } |
4484 | 0 | if (flag1 & 0x02) { /* queue (queue.name [str8]) */ |
4485 | 0 | proto_tree_add_item(args_tree, |
4486 | 0 | hf_amqp_0_10_method_exchange_bind_queue, |
4487 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
4488 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
4489 | 0 | } |
4490 | 0 | if (flag1 & 0x04) { /* binding-key (str8) */ |
4491 | 0 | proto_tree_add_item(args_tree, |
4492 | 0 | hf_amqp_0_10_method_exchange_binding_key, |
4493 | 0 | tvb, offset, 1, ENC_ASCII); |
4494 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
4495 | 0 | } |
4496 | 0 | if (flag1 & 0x08) { /* arguments (map) */ |
4497 | 0 | map_length = amqp_0_10_get_32bit_size_new(args_tree, pinfo, tvb, hf_amqp_0_10_method_exchange_declare_arguments_size, offset); |
4498 | 0 | offset += 4; |
4499 | 0 | ti = proto_tree_add_item(args_tree, |
4500 | 0 | hf_amqp_0_10_method_exchange_declare_arguments, |
4501 | 0 | tvb, |
4502 | 0 | offset, |
4503 | 0 | map_length, ENC_NA); |
4504 | 0 | if (map_length > (uint32_t)tvb_reported_length_remaining(tvb, offset)) |
4505 | 0 | { |
4506 | 0 | next_tvb = tvb_new_subset_remaining(tvb, offset); |
4507 | 0 | } |
4508 | 0 | else |
4509 | 0 | { |
4510 | 0 | next_tvb = tvb_new_subset_length(tvb, offset, map_length); |
4511 | 0 | } |
4512 | 0 | dissect_amqp_0_10_map (next_tvb, ti); |
4513 | | /* offset += map_length; */ |
4514 | 0 | } |
4515 | 0 | break; |
4516 | 0 | } |
4517 | 0 | } |
4518 | | |
4519 | | static void |
4520 | | dissect_amqp_0_10_queue(tvbuff_t *tvb, |
4521 | | packet_info *pinfo, |
4522 | | proto_tree *tree) |
4523 | 1 | { |
4524 | 1 | proto_item *args_tree; |
4525 | 1 | proto_item *ti; |
4526 | 1 | proto_item *flags_item; |
4527 | 1 | uint8_t method; |
4528 | 1 | uint8_t flag1, flag2; |
4529 | 1 | uint32_t map_length; |
4530 | 1 | int flags_offset; |
4531 | 1 | const char *method_name; |
4532 | 1 | int offset = 0; |
4533 | 1 | tvbuff_t *next_tvb; |
4534 | | |
4535 | 1 | method = tvb_get_uint8(tvb, offset+1); |
4536 | 1 | method_name = val_to_str_const(method, amqp_0_10_queue_methods, |
4537 | 1 | "<invalid queue method>"); |
4538 | 1 | col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", method_name); |
4539 | 1 | col_set_fence(pinfo->cinfo, COL_INFO); |
4540 | | |
4541 | 1 | proto_tree_add_item(tree, hf_amqp_0_10_queue_method, |
4542 | 1 | tvb, offset+1, 1, ENC_BIG_ENDIAN); |
4543 | 1 | offset += 2; |
4544 | | /* |
4545 | | * Session header is 2 bytes; one that tells that it's 1 byte long, then |
4546 | | * the byte itself. Bit 0 is sync. |
4547 | | */ |
4548 | 1 | flag1 = tvb_get_uint8(tvb, offset); |
4549 | 1 | flag2 = tvb_get_uint8(tvb, offset+1); |
4550 | 1 | ti = proto_tree_add_item(tree, hf_amqp_0_10_session_header, tvb, offset, 2, ENC_BIG_ENDIAN); |
4551 | 1 | if ((flag1 != 1) || ((flag2 & 0xfe) != 0)) |
4552 | 1 | proto_item_append_text(ti, " (Invalid)"); |
4553 | 0 | else |
4554 | 0 | proto_tree_add_item(tree, hf_amqp_0_10_session_header_sync, |
4555 | 0 | tvb, offset + 1, 1, ENC_BIG_ENDIAN); |
4556 | 1 | offset += 2; |
4557 | | |
4558 | 1 | ti = proto_tree_add_item(tree, hf_amqp_method_arguments, |
4559 | 1 | tvb, offset, -1, ENC_NA); |
4560 | 1 | args_tree = proto_item_add_subtree(ti, ett_args); |
4561 | | |
4562 | | /* |
4563 | | * The flag bits are a simple bit string, not a net-byte-order |
4564 | | * field. tvb_get_bits16() doesn't know how to do little-endian |
4565 | | * at this time, so just pick out two bytes. |
4566 | | */ |
4567 | 1 | flags_offset = offset; |
4568 | 1 | flag1 = tvb_get_uint8(tvb, offset); |
4569 | 1 | flag2 = tvb_get_uint8(tvb, offset+1); |
4570 | 1 | flags_item = proto_tree_add_item(args_tree, |
4571 | 1 | hf_amqp_0_10_argument_packing_flags, |
4572 | 1 | tvb, offset, 2, ENC_BIG_ENDIAN); |
4573 | 1 | offset += 2; |
4574 | 1 | switch (method) { |
4575 | 0 | case AMQP_0_10_METHOD_QUEUE_DECLARE: |
4576 | 0 | if ((flag1 & ~0x7f) || (flag2 != 0)) |
4577 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
4578 | 0 | if (flag1 & 0x01) { /* queue (name [str8]) */ |
4579 | 0 | proto_tree_add_item(args_tree, |
4580 | 0 | hf_amqp_0_10_method_queue_name, |
4581 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
4582 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
4583 | 0 | } |
4584 | 0 | if (flag1 & 0x02) { /* alternate-exchange (exchange.name [str8]) */ |
4585 | 0 | proto_tree_add_item(args_tree, |
4586 | 0 | hf_amqp_0_10_method_queue_alt_exchange, |
4587 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
4588 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
4589 | 0 | } |
4590 | | /* |
4591 | | * 3rd-6th arguments are optional bits. |
4592 | | */ |
4593 | 0 | proto_tree_add_item(args_tree, |
4594 | 0 | hf_amqp_0_10_method_queue_declare_passive, |
4595 | 0 | tvb, flags_offset, 1, ENC_BIG_ENDIAN); |
4596 | 0 | proto_tree_add_item(args_tree, |
4597 | 0 | hf_amqp_0_10_method_queue_declare_durable, |
4598 | 0 | tvb, flags_offset, 1, ENC_BIG_ENDIAN); |
4599 | 0 | proto_tree_add_item(args_tree, |
4600 | 0 | hf_amqp_0_10_method_queue_declare_exclusive, |
4601 | 0 | tvb, flags_offset, 1, ENC_BIG_ENDIAN); |
4602 | 0 | proto_tree_add_item(args_tree, |
4603 | 0 | hf_amqp_0_10_method_queue_declare_auto_delete, |
4604 | 0 | tvb, flags_offset, 1, ENC_BIG_ENDIAN); |
4605 | 0 | if (flag1 & 0x40) { /* arguments (map) */ |
4606 | 0 | map_length = amqp_0_10_get_32bit_size_new(args_tree, pinfo, tvb, hf_amqp_0_10_method_queue_declare_arguments_size, offset); |
4607 | 0 | offset += 4; |
4608 | 0 | ti = proto_tree_add_item(args_tree, |
4609 | 0 | hf_amqp_0_10_method_queue_declare_arguments, |
4610 | 0 | tvb, |
4611 | 0 | offset, |
4612 | 0 | map_length, ENC_NA); |
4613 | 0 | if (map_length > (uint32_t)tvb_reported_length_remaining(tvb, offset)) |
4614 | 0 | { |
4615 | 0 | next_tvb = tvb_new_subset_remaining(tvb, offset); |
4616 | 0 | } |
4617 | 0 | else |
4618 | 0 | { |
4619 | 0 | next_tvb = tvb_new_subset_length(tvb, offset, map_length); |
4620 | 0 | } |
4621 | 0 | dissect_amqp_0_10_map (next_tvb, ti); |
4622 | | /* offset += map_length; */ |
4623 | 0 | } |
4624 | 0 | break; |
4625 | | |
4626 | 0 | case AMQP_0_10_METHOD_QUEUE_DELETE: |
4627 | 0 | if ((flag1 & ~0x07) || (flag2 != 0)) |
4628 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
4629 | 0 | if (flag1 & 0x01) { /* queue (name [str8]) */ |
4630 | 0 | proto_tree_add_item(args_tree, |
4631 | 0 | hf_amqp_0_10_method_queue_name, |
4632 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
4633 | | /* offset += (1 + tvb_get_uint8(tvb, offset)); */ |
4634 | 0 | } |
4635 | | /* |
4636 | | * 2nd-3rd arguments are optional bits. |
4637 | | */ |
4638 | 0 | proto_tree_add_item(args_tree, |
4639 | 0 | hf_amqp_0_10_method_queue_delete_if_unused, |
4640 | 0 | tvb, flags_offset, 1, ENC_BIG_ENDIAN); |
4641 | 0 | proto_tree_add_item(args_tree, |
4642 | 0 | hf_amqp_0_10_method_queue_delete_if_empty, |
4643 | 0 | tvb, flags_offset, 1, ENC_BIG_ENDIAN); |
4644 | 0 | break; |
4645 | | |
4646 | 0 | case AMQP_0_10_METHOD_QUEUE_PURGE: |
4647 | 0 | if ((flag1 & ~0x01) || (flag2 != 0)) |
4648 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
4649 | 0 | if (flag1 & 0x01) { /* queue (name [str8]) */ |
4650 | 0 | proto_tree_add_item(args_tree, |
4651 | 0 | hf_amqp_0_10_method_queue_name, |
4652 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
4653 | | /* offset += (1 + tvb_get_uint8(tvb, offset)); */ |
4654 | 0 | } |
4655 | 0 | break; |
4656 | | |
4657 | 0 | case AMQP_0_10_METHOD_QUEUE_QUERY: |
4658 | 0 | if ((flag1 & ~0x01) || (flag2 != 0)) |
4659 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
4660 | 0 | if (flag1 & 0x01) { /* queue (name [str8]) */ |
4661 | 0 | proto_tree_add_item(args_tree, |
4662 | 0 | hf_amqp_0_10_method_queue_name, |
4663 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
4664 | | /* offset += (1 + tvb_get_uint8(tvb, offset)); */ |
4665 | 0 | } |
4666 | 0 | break; |
4667 | 1 | } |
4668 | 1 | } |
4669 | | |
4670 | | static void |
4671 | | dissect_amqp_0_10_file(tvbuff_t *tvb, |
4672 | | packet_info *pinfo, |
4673 | | proto_tree *tree) |
4674 | 0 | { |
4675 | 0 | proto_item *args_tree; |
4676 | 0 | proto_item *ti; |
4677 | 0 | proto_item *flags_item; |
4678 | 0 | uint8_t method; |
4679 | 0 | uint8_t flag1, flag2; |
4680 | 0 | uint32_t map_length; |
4681 | 0 | int flags_offset; |
4682 | 0 | const char *method_name; |
4683 | 0 | int offset = 0; |
4684 | 0 | tvbuff_t *next_tvb; |
4685 | |
|
4686 | 0 | method = tvb_get_uint8(tvb, offset+1); |
4687 | 0 | method_name = val_to_str_const(method, amqp_0_10_file_methods, |
4688 | 0 | "<invalid file method>"); |
4689 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", method_name); |
4690 | 0 | col_set_fence(pinfo->cinfo, COL_INFO); |
4691 | |
|
4692 | 0 | proto_tree_add_item(tree, hf_amqp_0_10_file_method, |
4693 | 0 | tvb, offset+1, 1, ENC_BIG_ENDIAN); |
4694 | 0 | offset += 2; |
4695 | | /* |
4696 | | * Session header is 2 bytes; one that tells that it's 1 byte long, then |
4697 | | * the byte itself. Bit 0 is sync. |
4698 | | */ |
4699 | 0 | flag1 = tvb_get_uint8(tvb, offset); |
4700 | 0 | flag2 = tvb_get_uint8(tvb, offset+1); |
4701 | 0 | ti = proto_tree_add_item(tree, hf_amqp_0_10_session_header, tvb, offset, 2, ENC_BIG_ENDIAN); |
4702 | 0 | if ((flag1 != 1) || ((flag2 & 0xfe) != 0)) |
4703 | 0 | proto_item_append_text(ti, " (Invalid)"); |
4704 | 0 | else |
4705 | 0 | proto_tree_add_item(tree, hf_amqp_0_10_session_header_sync, |
4706 | 0 | tvb, offset + 1, 1, ENC_BIG_ENDIAN); |
4707 | 0 | offset += 2; |
4708 | |
|
4709 | 0 | ti = proto_tree_add_item(tree, hf_amqp_method_arguments, |
4710 | 0 | tvb, offset, -1, ENC_NA); |
4711 | 0 | args_tree = proto_item_add_subtree(ti, ett_args); |
4712 | | |
4713 | | /* |
4714 | | * The flag bits are a simple bit string, not a net-byte-order |
4715 | | * field. tvb_get_bits16() doesn't know how to do little-endian |
4716 | | * at this time, so just pick out two bytes. |
4717 | | */ |
4718 | 0 | flags_offset = offset; |
4719 | 0 | flag1 = tvb_get_uint8(tvb, offset); |
4720 | 0 | flag2 = tvb_get_uint8(tvb, offset+1); |
4721 | 0 | flags_item = proto_tree_add_item(args_tree, |
4722 | 0 | hf_amqp_0_10_argument_packing_flags, |
4723 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
4724 | 0 | offset += 2; |
4725 | 0 | switch (method) { |
4726 | 0 | case AMQP_0_10_METHOD_FILE_QOS: |
4727 | 0 | if ((flag1 & ~0x07) || (flag2 != 0)) |
4728 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
4729 | 0 | if (flag1 & 0x01) { /* prefetch-size (uint32) */ |
4730 | 0 | proto_tree_add_item(args_tree, |
4731 | 0 | hf_amqp_0_10_method_file_qos_prefetch_size, |
4732 | 0 | tvb, offset, 4, ENC_BIG_ENDIAN); |
4733 | 0 | offset += 4; |
4734 | 0 | } |
4735 | 0 | if (flag1 & 0x02) { /* prefetch-count (uint16) */ |
4736 | 0 | proto_tree_add_item(args_tree, |
4737 | 0 | hf_amqp_0_10_method_file_qos_prefetch_count, |
4738 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
4739 | | /* offset += 2; */ |
4740 | 0 | } |
4741 | | /* |
4742 | | * 3rd argument is an optional bit. |
4743 | | */ |
4744 | 0 | proto_tree_add_item(args_tree, |
4745 | 0 | hf_amqp_0_10_method_file_qos_global, |
4746 | 0 | tvb, flags_offset, 1, ENC_BIG_ENDIAN); |
4747 | 0 | break; |
4748 | | |
4749 | 0 | case AMQP_0_10_METHOD_FILE_QOS_OK: |
4750 | 0 | case AMQP_0_10_METHOD_FILE_STAGE: |
4751 | | /* No args */ |
4752 | 0 | break; |
4753 | | |
4754 | 0 | case AMQP_0_10_METHOD_FILE_CONSUME: |
4755 | 0 | if ((flag1 & ~0x7f) || (flag2 != 0)) |
4756 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
4757 | 0 | if (flag1 & 0x01) { /* queue (queue.name [str8]) */ |
4758 | 0 | proto_tree_add_item(args_tree, |
4759 | 0 | hf_amqp_0_10_method_queue_name, |
4760 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
4761 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
4762 | 0 | } |
4763 | 0 | if (flag1 & 0x02) { /* consumer-tag (str8) */ |
4764 | 0 | proto_tree_add_item(args_tree, |
4765 | 0 | hf_amqp_0_10_method_file_consumer_tag, |
4766 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
4767 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
4768 | 0 | } |
4769 | | /* |
4770 | | * 3rd-6th arguments are optional bits. |
4771 | | */ |
4772 | 0 | proto_tree_add_item(args_tree, |
4773 | 0 | hf_amqp_0_10_method_file_consume_no_local, |
4774 | 0 | tvb, flags_offset, 1, ENC_BIG_ENDIAN); |
4775 | 0 | proto_tree_add_item(args_tree, |
4776 | 0 | hf_amqp_0_10_method_file_consume_no_ack, |
4777 | 0 | tvb, flags_offset, 1, ENC_BIG_ENDIAN); |
4778 | 0 | proto_tree_add_item(args_tree, |
4779 | 0 | hf_amqp_0_10_method_file_consume_exclusive, |
4780 | 0 | tvb, flags_offset, 1, ENC_BIG_ENDIAN); |
4781 | 0 | proto_tree_add_item(args_tree, |
4782 | 0 | hf_amqp_0_10_method_file_consume_nowait, |
4783 | 0 | tvb, flags_offset, 1, ENC_BIG_ENDIAN); |
4784 | 0 | if (flag1 & 0x40) { /* arguments (map) */ |
4785 | 0 | map_length = amqp_0_10_get_32bit_size_new(args_tree, pinfo, tvb, hf_amqp_0_10_method_file_consume_arguments_size, offset); |
4786 | 0 | offset += 4; |
4787 | 0 | ti = proto_tree_add_item(args_tree, |
4788 | 0 | hf_amqp_0_10_method_file_consume_arguments, |
4789 | 0 | tvb, |
4790 | 0 | offset, |
4791 | 0 | map_length, ENC_NA); |
4792 | 0 | if (map_length > (uint32_t)tvb_reported_length_remaining(tvb, offset)) |
4793 | 0 | { |
4794 | 0 | next_tvb = tvb_new_subset_remaining(tvb, offset); |
4795 | 0 | } |
4796 | 0 | else |
4797 | 0 | { |
4798 | 0 | next_tvb = tvb_new_subset_length(tvb, offset, map_length); |
4799 | 0 | } |
4800 | 0 | dissect_amqp_0_10_map (next_tvb, ti); |
4801 | | /* offset += map_length; */ |
4802 | 0 | } |
4803 | 0 | break; |
4804 | | |
4805 | 0 | case AMQP_0_10_METHOD_FILE_CONSUME_OK: |
4806 | 0 | case AMQP_0_10_METHOD_FILE_CANCEL: |
4807 | 0 | if ((flag1 & ~0x01) || (flag2 != 0)) |
4808 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
4809 | 0 | if (flag1 & 0x01) { /* consumer-tag (str8) */ |
4810 | 0 | proto_tree_add_item(args_tree, |
4811 | 0 | hf_amqp_0_10_method_file_consumer_tag, |
4812 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
4813 | | /* offset += (1 + tvb_get_uint8(tvb, offset)); */ |
4814 | 0 | } |
4815 | 0 | break; |
4816 | | |
4817 | 0 | case AMQP_0_10_METHOD_FILE_OPEN: |
4818 | 0 | if ((flag1 & ~0x03) || (flag2 != 0)) |
4819 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
4820 | 0 | if (flag1 & 0x01) { /* identifier (str8) */ |
4821 | 0 | proto_tree_add_item(args_tree, |
4822 | 0 | hf_amqp_0_10_method_file_identifier, |
4823 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
4824 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
4825 | 0 | } |
4826 | 0 | if (flag1 & 0x02) { /* content-size (uint64) */ |
4827 | 0 | proto_tree_add_item(args_tree, |
4828 | 0 | hf_amqp_0_10_method_file_open_content_size, |
4829 | 0 | tvb, offset, 8, ENC_BIG_ENDIAN); |
4830 | | /* offset += 8; */ |
4831 | 0 | } |
4832 | 0 | break; |
4833 | | |
4834 | 0 | case AMQP_0_10_METHOD_FILE_OPEN_OK: |
4835 | 0 | if ((flag1 & ~0x01) || (flag2 != 0)) |
4836 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
4837 | 0 | if (flag1 & 0x01) { /* staged-size (uint64) */ |
4838 | 0 | proto_tree_add_item(args_tree, |
4839 | 0 | hf_amqp_0_10_method_file_open_ok_staged_size, |
4840 | 0 | tvb, offset, 8, ENC_BIG_ENDIAN); |
4841 | | /* offset += 8; */ |
4842 | 0 | } |
4843 | 0 | break; |
4844 | | |
4845 | 0 | case AMQP_0_10_METHOD_FILE_PUBLISH: |
4846 | 0 | if ((flag1 & ~0x1f) || (flag2 != 0)) |
4847 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
4848 | 0 | if (flag1 & 0x01) { /* exchange (exchange.name [str8]) */ |
4849 | 0 | proto_tree_add_item(args_tree, |
4850 | 0 | hf_amqp_0_10_method_file_publish_exchange, |
4851 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
4852 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
4853 | 0 | } |
4854 | 0 | if (flag1 & 0x02) { /* routing-key (str8) */ |
4855 | 0 | proto_tree_add_item(args_tree, |
4856 | 0 | hf_amqp_0_10_method_file_publish_routing_key, |
4857 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
4858 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
4859 | 0 | } |
4860 | | /* |
4861 | | * 3rd-4th arguments are optional bits. |
4862 | | */ |
4863 | 0 | proto_tree_add_item(args_tree, |
4864 | 0 | hf_amqp_0_10_method_file_publish_mandatory, |
4865 | 0 | tvb, flags_offset, 1, ENC_BIG_ENDIAN); |
4866 | 0 | proto_tree_add_item(args_tree, |
4867 | 0 | hf_amqp_0_10_method_file_publish_immediate, |
4868 | 0 | tvb, flags_offset, 1, ENC_BIG_ENDIAN); |
4869 | 0 | if (flag1 & 0x10) { /* identifier (str8) */ |
4870 | 0 | proto_tree_add_item(args_tree, |
4871 | 0 | hf_amqp_0_10_method_file_identifier, |
4872 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
4873 | | /* offset += (1 + tvb_get_uint8(tvb, offset)); */ |
4874 | 0 | } |
4875 | 0 | break; |
4876 | | |
4877 | 0 | case AMQP_0_10_METHOD_FILE_RETURN: |
4878 | 0 | if ((flag1 & ~0x0f) || (flag2 != 0)) |
4879 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
4880 | 0 | if (flag1 & 0x01) { /* reply-code (return-code [uint16]) */ |
4881 | 0 | proto_tree_add_item(args_tree, |
4882 | 0 | hf_amqp_0_10_method_file_return_reply_code, |
4883 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
4884 | 0 | offset += 2; |
4885 | 0 | } |
4886 | 0 | if (flag1 & 0x02) { /* reply-text (str8) */ |
4887 | 0 | proto_tree_add_item(args_tree, |
4888 | 0 | hf_amqp_0_10_method_file_return_reply_text, |
4889 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
4890 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
4891 | 0 | } |
4892 | 0 | if (flag1 & 0x04) { /* exchange (exchange.name [str8]) */ |
4893 | 0 | proto_tree_add_item(args_tree, |
4894 | 0 | hf_amqp_0_10_method_file_return_exchange, |
4895 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
4896 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
4897 | 0 | } |
4898 | 0 | if (flag1 & 0x08) { /* routing-key (str8) */ |
4899 | 0 | proto_tree_add_item(args_tree, |
4900 | 0 | hf_amqp_0_10_method_file_return_routing_key, |
4901 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
4902 | | /* offset += (1 + tvb_get_uint8(tvb, offset)); */ |
4903 | 0 | } |
4904 | 0 | break; |
4905 | | |
4906 | 0 | case AMQP_0_10_METHOD_FILE_DELIVER: |
4907 | 0 | if ((flag1 & ~0x3f) || (flag2 != 0)) |
4908 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
4909 | 0 | if (flag1 & 0x01) { /* consumer-tag (str8) */ |
4910 | 0 | proto_tree_add_item(args_tree, |
4911 | 0 | hf_amqp_0_10_method_file_deliver_consumer_tag, |
4912 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
4913 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
4914 | 0 | } |
4915 | 0 | if (flag1 & 0x02) { /* delivery-tag (uint64) */ |
4916 | 0 | proto_tree_add_item(args_tree, |
4917 | 0 | hf_amqp_0_10_method_file_deliver_delivery_tag, |
4918 | 0 | tvb, offset, 8, ENC_BIG_ENDIAN); |
4919 | 0 | offset += 8; |
4920 | 0 | } |
4921 | | /* |
4922 | | * 3rd argument is an optional bit. |
4923 | | */ |
4924 | 0 | proto_tree_add_item(args_tree, |
4925 | 0 | hf_amqp_0_10_method_file_deliver_redelivered, |
4926 | 0 | tvb, flags_offset, 1, ENC_BIG_ENDIAN); |
4927 | 0 | if (flag1 & 0x08) { /* exchange (exchange.name [str8]) */ |
4928 | 0 | proto_tree_add_item(args_tree, |
4929 | 0 | hf_amqp_0_10_method_file_deliver_exchange, |
4930 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
4931 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
4932 | 0 | } |
4933 | 0 | if (flag1 & 0x10) { /* routing-key (str8) */ |
4934 | 0 | proto_tree_add_item(args_tree, |
4935 | 0 | hf_amqp_0_10_method_file_deliver_routing_key, |
4936 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
4937 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
4938 | 0 | } |
4939 | 0 | if (flag1 & 0x20) { /* identifier (str8) */ |
4940 | 0 | proto_tree_add_item(args_tree, |
4941 | 0 | hf_amqp_0_10_method_file_identifier, |
4942 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
4943 | | /* offset += (1 + tvb_get_uint8(tvb, offset)); */ |
4944 | 0 | } |
4945 | 0 | break; |
4946 | | |
4947 | 0 | case AMQP_0_10_METHOD_FILE_ACK: |
4948 | 0 | if ((flag1 & ~0x03) || (flag2 != 0)) |
4949 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
4950 | 0 | if (flag1 & 0x01) { /* delivery-tag (uint64) */ |
4951 | 0 | proto_tree_add_item(args_tree, |
4952 | 0 | hf_amqp_0_10_method_file_ack_delivery_tag, |
4953 | 0 | tvb, offset, 8, ENC_BIG_ENDIAN); |
4954 | | /* offset += 8; */ |
4955 | 0 | } |
4956 | | /* |
4957 | | * 2nd argument is an optional bit. |
4958 | | */ |
4959 | 0 | proto_tree_add_item(args_tree, |
4960 | 0 | hf_amqp_0_10_method_file_ack_multiple, |
4961 | 0 | tvb, flags_offset, 1, ENC_BIG_ENDIAN); |
4962 | 0 | break; |
4963 | | |
4964 | 0 | case AMQP_0_10_METHOD_FILE_REJECT: |
4965 | 0 | if ((flag1 & ~0x03) || (flag2 != 0)) |
4966 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
4967 | 0 | if (flag1 & 0x01) { /* delivery-tag (uint64) */ |
4968 | 0 | proto_tree_add_item(args_tree, |
4969 | 0 | hf_amqp_0_10_method_file_reject_delivery_tag, |
4970 | 0 | tvb, offset, 8, ENC_BIG_ENDIAN); |
4971 | | /* offset += 8; */ |
4972 | 0 | } |
4973 | | /* |
4974 | | * 2nd argument is an optional bit. |
4975 | | */ |
4976 | 0 | proto_tree_add_item(args_tree, |
4977 | 0 | hf_amqp_0_10_method_file_reject_requeue, |
4978 | 0 | tvb, flags_offset, 1, ENC_BIG_ENDIAN); |
4979 | 0 | break; |
4980 | 0 | } |
4981 | 0 | } |
4982 | | |
4983 | | static void |
4984 | | dissect_amqp_0_10_stream(tvbuff_t *tvb, |
4985 | | packet_info *pinfo, |
4986 | | proto_tree *tree) |
4987 | 0 | { |
4988 | 0 | proto_item *args_tree; |
4989 | 0 | proto_item *ti; |
4990 | 0 | proto_item *flags_item; |
4991 | 0 | uint8_t method; |
4992 | 0 | uint8_t flag1, flag2; |
4993 | 0 | uint32_t map_length; |
4994 | 0 | int flags_offset; |
4995 | 0 | const char *method_name; |
4996 | 0 | int offset = 0; |
4997 | 0 | tvbuff_t *next_tvb; |
4998 | |
|
4999 | 0 | method = tvb_get_uint8(tvb, offset+1); |
5000 | 0 | method_name = val_to_str_const(method, amqp_0_10_stream_methods, |
5001 | 0 | "<invalid stream method>"); |
5002 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", method_name); |
5003 | 0 | col_set_fence(pinfo->cinfo, COL_INFO); |
5004 | |
|
5005 | 0 | proto_tree_add_item(tree, hf_amqp_0_10_stream_method, |
5006 | 0 | tvb, offset+1, 1, ENC_BIG_ENDIAN); |
5007 | 0 | offset += 2; |
5008 | | /* |
5009 | | * Session header is 2 bytes; one that tells that it's 1 byte long, then |
5010 | | * the byte itself. Bit 0 is sync. |
5011 | | */ |
5012 | 0 | flag1 = tvb_get_uint8(tvb, offset); |
5013 | 0 | flag2 = tvb_get_uint8(tvb, offset+1); |
5014 | 0 | ti = proto_tree_add_item(tree, hf_amqp_0_10_session_header, tvb, offset, 2, ENC_BIG_ENDIAN); |
5015 | 0 | if ((flag1 != 1) || ((flag2 & 0xfe) != 0)) |
5016 | 0 | proto_item_append_text(ti, " (Invalid)"); |
5017 | 0 | else |
5018 | 0 | proto_tree_add_item(tree, hf_amqp_0_10_session_header_sync, |
5019 | 0 | tvb, offset + 1, 1, ENC_BIG_ENDIAN); |
5020 | 0 | offset += 2; |
5021 | |
|
5022 | 0 | ti = proto_tree_add_item(tree, hf_amqp_method_arguments, |
5023 | 0 | tvb, offset, -1, ENC_NA); |
5024 | 0 | args_tree = proto_item_add_subtree(ti, ett_args); |
5025 | | |
5026 | | /* |
5027 | | * The flag bits are a simple bit string, not a net-byte-order |
5028 | | * field. tvb_get_bits16() doesn't know how to do little-endian |
5029 | | * at this time, so just pick out two bytes. |
5030 | | */ |
5031 | 0 | flags_offset = offset; |
5032 | 0 | flag1 = tvb_get_uint8(tvb, offset); |
5033 | 0 | flag2 = tvb_get_uint8(tvb, offset+1); |
5034 | 0 | flags_item = proto_tree_add_item(args_tree, |
5035 | 0 | hf_amqp_0_10_argument_packing_flags, |
5036 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
5037 | 0 | offset += 2; |
5038 | 0 | switch (method) { |
5039 | 0 | case AMQP_0_10_METHOD_STREAM_QOS: |
5040 | 0 | if ((flag1 & ~0x0f) || (flag2 != 0)) |
5041 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
5042 | 0 | if (flag1 & 0x01) { /* prefetch-size (uint32) */ |
5043 | 0 | proto_tree_add_item(args_tree, |
5044 | 0 | hf_amqp_0_10_method_stream_qos_prefetch_size, |
5045 | 0 | tvb, offset, 4, ENC_BIG_ENDIAN); |
5046 | 0 | offset += 4; |
5047 | 0 | } |
5048 | 0 | if (flag1 & 0x02) { /* prefetch-count (uint16) */ |
5049 | 0 | proto_tree_add_item(args_tree, |
5050 | 0 | hf_amqp_0_10_method_stream_qos_prefetch_count, |
5051 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
5052 | 0 | offset += 2; |
5053 | 0 | } |
5054 | 0 | if (flag1 & 0x04) { /* consume-rate (uint32) */ |
5055 | 0 | proto_tree_add_item(args_tree, |
5056 | 0 | hf_amqp_0_10_method_stream_qos_prefetch_size, |
5057 | 0 | tvb, offset, 4, ENC_BIG_ENDIAN); |
5058 | | /* offset += 4; */ |
5059 | 0 | } |
5060 | | /* |
5061 | | * 4th argument is an optional bit. |
5062 | | */ |
5063 | 0 | proto_tree_add_item(args_tree, |
5064 | 0 | hf_amqp_0_10_method_stream_qos_global, |
5065 | 0 | tvb, flags_offset, 1, ENC_BIG_ENDIAN); |
5066 | 0 | break; |
5067 | | |
5068 | 0 | case AMQP_0_10_METHOD_STREAM_QOS_OK: |
5069 | | /* No args */ |
5070 | 0 | break; |
5071 | | |
5072 | 0 | case AMQP_0_10_METHOD_STREAM_CONSUME: |
5073 | 0 | if ((flag1 & ~0x3f) || (flag2 != 0)) |
5074 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
5075 | 0 | if (flag1 & 0x01) { /* queue (queue.name [str8]) */ |
5076 | 0 | proto_tree_add_item(args_tree, |
5077 | 0 | hf_amqp_0_10_method_queue_name, |
5078 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
5079 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
5080 | 0 | } |
5081 | 0 | if (flag1 & 0x02) { /* consumer-tag (str8) */ |
5082 | 0 | proto_tree_add_item(args_tree, |
5083 | 0 | hf_amqp_0_10_method_stream_consumer_tag, |
5084 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
5085 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
5086 | 0 | } |
5087 | | /* |
5088 | | * 3rd-5th arguments are optional bits. |
5089 | | */ |
5090 | 0 | proto_tree_add_item(args_tree, |
5091 | 0 | hf_amqp_0_10_method_stream_consume_no_local, |
5092 | 0 | tvb, flags_offset, 1, ENC_BIG_ENDIAN); |
5093 | 0 | proto_tree_add_item(args_tree, |
5094 | 0 | hf_amqp_0_10_method_stream_consume_exclusive, |
5095 | 0 | tvb, flags_offset, 1, ENC_BIG_ENDIAN); |
5096 | 0 | proto_tree_add_item(args_tree, |
5097 | 0 | hf_amqp_0_10_method_stream_consume_nowait, |
5098 | 0 | tvb, flags_offset, 1, ENC_BIG_ENDIAN); |
5099 | 0 | if (flag1 & 0x20) { /* arguments (map) */ |
5100 | 0 | map_length = amqp_0_10_get_32bit_size_new(args_tree, pinfo, tvb, hf_amqp_0_10_method_stream_consume_arguments_size, offset); |
5101 | 0 | offset += 4; |
5102 | 0 | ti = proto_tree_add_item(args_tree, |
5103 | 0 | hf_amqp_0_10_method_stream_consume_arguments, |
5104 | 0 | tvb, |
5105 | 0 | offset, |
5106 | 0 | map_length, ENC_NA); |
5107 | 0 | if (map_length > (uint32_t)tvb_reported_length_remaining(tvb, offset)) |
5108 | 0 | { |
5109 | 0 | next_tvb = tvb_new_subset_remaining(tvb, offset); |
5110 | 0 | } |
5111 | 0 | else |
5112 | 0 | { |
5113 | 0 | next_tvb = tvb_new_subset_length(tvb, offset, map_length); |
5114 | 0 | } |
5115 | 0 | dissect_amqp_0_10_map (next_tvb, ti); |
5116 | | /* offset += map_length; */ |
5117 | 0 | } |
5118 | 0 | break; |
5119 | | |
5120 | 0 | case AMQP_0_10_METHOD_STREAM_CONSUME_OK: |
5121 | 0 | case AMQP_0_10_METHOD_STREAM_CANCEL: |
5122 | 0 | if ((flag1 & ~0x01) || (flag2 != 0)) |
5123 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
5124 | 0 | if (flag1 & 0x01) { /* consumer-tag (str8) */ |
5125 | 0 | proto_tree_add_item(args_tree, |
5126 | 0 | hf_amqp_0_10_method_stream_consumer_tag, |
5127 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
5128 | | /* offset += (1 + tvb_get_uint8(tvb, offset)); */ |
5129 | 0 | } |
5130 | 0 | break; |
5131 | | |
5132 | 0 | case AMQP_0_10_METHOD_STREAM_PUBLISH: |
5133 | 0 | if ((flag1 & ~0x0f) || (flag2 != 0)) |
5134 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
5135 | 0 | if (flag1 & 0x01) { /* exchange (exchange.name [str8]) */ |
5136 | 0 | proto_tree_add_item(args_tree, |
5137 | 0 | hf_amqp_0_10_method_stream_publish_exchange, |
5138 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
5139 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
5140 | 0 | } |
5141 | 0 | if (flag1 & 0x02) { /* routing-key (str8) */ |
5142 | 0 | proto_tree_add_item(args_tree, |
5143 | 0 | hf_amqp_0_10_method_stream_publish_routing_key, |
5144 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
5145 | | /* offset += (1 + tvb_get_uint8(tvb, offset)); */ |
5146 | 0 | } |
5147 | | /* |
5148 | | * 3rd-4th arguments are optional bits. |
5149 | | */ |
5150 | 0 | proto_tree_add_item(args_tree, |
5151 | 0 | hf_amqp_0_10_method_stream_publish_mandatory, |
5152 | 0 | tvb, flags_offset, 1, ENC_BIG_ENDIAN); |
5153 | 0 | proto_tree_add_item(args_tree, |
5154 | 0 | hf_amqp_0_10_method_stream_publish_immediate, |
5155 | 0 | tvb, flags_offset, 1, ENC_BIG_ENDIAN); |
5156 | 0 | break; |
5157 | | |
5158 | 0 | case AMQP_0_10_METHOD_STREAM_RETURN: |
5159 | 0 | if ((flag1 & ~0x0f) || (flag2 != 0)) |
5160 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
5161 | 0 | if (flag1 & 0x01) { /* reply-code (return-code [uint16]) */ |
5162 | 0 | proto_tree_add_item(args_tree, |
5163 | 0 | hf_amqp_0_10_method_stream_return_reply_code, |
5164 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
5165 | 0 | offset += 2; |
5166 | 0 | } |
5167 | 0 | if (flag1 & 0x02) { /* reply-text (str8) */ |
5168 | 0 | proto_tree_add_item(args_tree, |
5169 | 0 | hf_amqp_0_10_method_stream_return_reply_text, |
5170 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
5171 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
5172 | 0 | } |
5173 | 0 | if (flag1 & 0x04) { /* exchange (exchange.name [str8]) */ |
5174 | 0 | proto_tree_add_item(args_tree, |
5175 | 0 | hf_amqp_0_10_method_stream_return_exchange, |
5176 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
5177 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
5178 | 0 | } |
5179 | 0 | if (flag1 & 0x08) { /* routing-key (str8) */ |
5180 | 0 | proto_tree_add_item(args_tree, |
5181 | 0 | hf_amqp_0_10_method_stream_return_routing_key, |
5182 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
5183 | | /* offset += (1 + tvb_get_uint8(tvb, offset)); */ |
5184 | 0 | } |
5185 | 0 | break; |
5186 | | |
5187 | 0 | case AMQP_0_10_METHOD_STREAM_DELIVER: |
5188 | 0 | if ((flag1 & ~0x0f) || (flag2 != 0)) |
5189 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
5190 | 0 | if (flag1 & 0x01) { /* consumer-tag (str8) */ |
5191 | 0 | proto_tree_add_item(args_tree, |
5192 | 0 | hf_amqp_0_10_method_stream_deliver_consumer_tag, |
5193 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
5194 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
5195 | 0 | } |
5196 | 0 | if (flag1 & 0x02) { /* delivery-tag (uint64) */ |
5197 | 0 | proto_tree_add_item(args_tree, |
5198 | 0 | hf_amqp_0_10_method_stream_deliver_delivery_tag, |
5199 | 0 | tvb, offset, 8, ENC_BIG_ENDIAN); |
5200 | 0 | offset += 8; |
5201 | 0 | } |
5202 | 0 | if (flag1 & 0x04) { /* exchange (exchange.name [str8]) */ |
5203 | 0 | proto_tree_add_item(args_tree, |
5204 | 0 | hf_amqp_0_10_method_stream_deliver_exchange, |
5205 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
5206 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
5207 | 0 | } |
5208 | 0 | if (flag1 & 0x08) { /* queue (queue.name [str8]) */ |
5209 | 0 | proto_tree_add_item(args_tree, |
5210 | 0 | hf_amqp_0_10_method_stream_deliver_queue, |
5211 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
5212 | | /* offset += (1 + tvb_get_uint8(tvb, offset)); */ |
5213 | 0 | } |
5214 | 0 | break; |
5215 | 0 | } |
5216 | 0 | } |
5217 | | |
5218 | | static void |
5219 | | dissect_amqp_0_10_struct_delivery_properties(tvbuff_t *tvb, |
5220 | | packet_info *pinfo, |
5221 | | proto_tree *tree) |
5222 | 0 | { |
5223 | 0 | proto_item *args_tree; |
5224 | 0 | proto_item *flags_item; |
5225 | 0 | uint8_t flag1, flag2; |
5226 | 0 | uint64_t timestamp; |
5227 | 0 | int flags_offset; |
5228 | 0 | nstime_t tv; |
5229 | 0 | int offset = 0; |
5230 | |
|
5231 | 0 | args_tree = proto_item_add_subtree(tree, ett_args); |
5232 | 0 | offset += 2; /* Skip class and struct codes */ |
5233 | 0 | flags_offset = offset; |
5234 | 0 | flag1 = tvb_get_uint8(tvb, offset); |
5235 | 0 | flag2 = tvb_get_uint8(tvb, offset+1); |
5236 | 0 | flags_item = proto_tree_add_item(args_tree, |
5237 | 0 | hf_amqp_0_10_argument_packing_flags, |
5238 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
5239 | 0 | if (flag2 & ~0x0f) |
5240 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
5241 | 0 | offset += 2; |
5242 | | |
5243 | | /* First 3 fields are bits */ |
5244 | 0 | proto_tree_add_item(args_tree, |
5245 | 0 | hf_amqp_0_10_struct_delivery_properties_discard_unroutable, |
5246 | 0 | tvb, flags_offset, 1, ENC_BIG_ENDIAN); |
5247 | 0 | proto_tree_add_item(args_tree, |
5248 | 0 | hf_amqp_0_10_struct_delivery_properties_immediate, |
5249 | 0 | tvb, flags_offset, 1, ENC_BIG_ENDIAN); |
5250 | 0 | proto_tree_add_item(args_tree, |
5251 | 0 | hf_amqp_0_10_struct_delivery_properties_redelivered, |
5252 | 0 | tvb, flags_offset, 1, ENC_BIG_ENDIAN); |
5253 | 0 | if (flag1 & 0x08) { |
5254 | | /* delivery-priority (delivery-priority [uint8]) */ |
5255 | 0 | proto_tree_add_item(args_tree, |
5256 | 0 | hf_amqp_0_10_struct_delivery_properties_priority, |
5257 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
5258 | 0 | offset += 1; |
5259 | 0 | } |
5260 | 0 | if (flag1 & 0x10) { |
5261 | | /* delivery-mode (delivery-mode [uint8]) */ |
5262 | 0 | proto_tree_add_item(args_tree, |
5263 | 0 | hf_amqp_0_10_struct_delivery_properties_mode, |
5264 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
5265 | 0 | offset += 1; |
5266 | 0 | } |
5267 | 0 | if (flag1 & 0x20) { |
5268 | | /* ttl (uint64) */ |
5269 | 0 | proto_tree_add_item(args_tree, |
5270 | 0 | hf_amqp_0_10_struct_delivery_properties_ttl, |
5271 | 0 | tvb, offset, 8, ENC_BIG_ENDIAN); |
5272 | 0 | offset += 8; |
5273 | 0 | } |
5274 | 0 | if (flag1 & 0x40) { |
5275 | | /* timestamp (datetime [uint64]) */ |
5276 | 0 | timestamp = tvb_get_ntoh64(tvb, offset); |
5277 | 0 | tv.secs = (time_t)timestamp; |
5278 | 0 | tv.nsecs = 0; |
5279 | 0 | proto_tree_add_time(args_tree, |
5280 | 0 | hf_amqp_0_10_struct_delivery_properties_timestamp, |
5281 | 0 | tvb, offset, 8, &tv); |
5282 | 0 | offset += 8; |
5283 | 0 | } |
5284 | 0 | if (flag1 & 0x80) { |
5285 | | /* expiration (datetime [uint64]) */ |
5286 | 0 | timestamp = tvb_get_ntoh64(tvb, offset); |
5287 | 0 | tv.secs = (time_t)timestamp; |
5288 | 0 | tv.nsecs = 0; |
5289 | 0 | proto_tree_add_time(args_tree, |
5290 | 0 | hf_amqp_0_10_struct_delivery_properties_expiration, |
5291 | 0 | tvb, offset, 8, &tv); |
5292 | 0 | offset += 8; |
5293 | 0 | } |
5294 | 0 | if (flag2 & 0x01) { |
5295 | | /* exchange (exchange.name [str8]) */ |
5296 | 0 | proto_tree_add_item(args_tree, |
5297 | 0 | hf_amqp_0_10_struct_delivery_properties_exchange, |
5298 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
5299 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
5300 | 0 | } |
5301 | 0 | if (flag2 & 0x02) { |
5302 | | /* routing-key (str8) */ |
5303 | 0 | proto_tree_add_item(args_tree, |
5304 | 0 | hf_amqp_0_10_struct_delivery_properties_routing_key, |
5305 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
5306 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
5307 | 0 | } |
5308 | 0 | if (flag2 & 0x04) { |
5309 | | /* resume-id (resume-id [str16]) */ |
5310 | 0 | proto_tree_add_item(args_tree, |
5311 | 0 | hf_amqp_0_10_method_message_resume_id, |
5312 | 0 | tvb, offset, 2, ENC_ASCII|ENC_BIG_ENDIAN); |
5313 | 0 | offset += (2 + tvb_get_ntohs(tvb, offset)); |
5314 | 0 | } |
5315 | 0 | if (flag2 & 0x08) { |
5316 | | /* resume-ttl (uint64) */ |
5317 | 0 | proto_tree_add_item(args_tree, |
5318 | 0 | hf_amqp_0_10_struct_delivery_properties_resume_ttl, |
5319 | 0 | tvb, offset, 8, ENC_BIG_ENDIAN); |
5320 | | /* offset += 8; */ |
5321 | 0 | } |
5322 | 0 | } |
5323 | | |
5324 | | static void |
5325 | | dissect_amqp_0_10_struct_fragment_properties(tvbuff_t *tvb, |
5326 | | packet_info *pinfo, |
5327 | | proto_tree *tree) |
5328 | 0 | { |
5329 | 0 | proto_item *args_tree; |
5330 | 0 | proto_item *flags_item; |
5331 | 0 | uint8_t flag1, flag2; |
5332 | 0 | int flags_offset; |
5333 | 0 | int offset = 0; |
5334 | |
|
5335 | 0 | args_tree = proto_item_add_subtree(tree, ett_args); |
5336 | 0 | offset += 2; /* Skip class and struct codes */ |
5337 | 0 | flags_offset = offset; |
5338 | 0 | flag1 = tvb_get_uint8(tvb, offset); |
5339 | 0 | flag2 = tvb_get_uint8(tvb, offset+1); |
5340 | 0 | flags_item = proto_tree_add_item(args_tree, |
5341 | 0 | hf_amqp_0_10_argument_packing_flags, |
5342 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
5343 | 0 | if ((flag1 & ~0x07) || (flag2 != 0)) |
5344 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
5345 | 0 | offset += 2; |
5346 | | |
5347 | | /* First 2 fields are bits */ |
5348 | 0 | proto_tree_add_item(args_tree, |
5349 | 0 | hf_amqp_0_10_struct_fragment_properties_first, |
5350 | 0 | tvb, flags_offset, 1, ENC_BIG_ENDIAN); |
5351 | 0 | proto_tree_add_item(args_tree, |
5352 | 0 | hf_amqp_0_10_struct_fragment_properties_last, |
5353 | 0 | tvb, flags_offset, 1, ENC_BIG_ENDIAN); |
5354 | 0 | if (flag1 & 0x04) { |
5355 | | /* fragment-size (uint64) */ |
5356 | 0 | proto_tree_add_item(args_tree, |
5357 | 0 | hf_amqp_0_10_struct_fragment_properties_size, |
5358 | 0 | tvb, offset, 8, ENC_BIG_ENDIAN); |
5359 | | /* offset += 8; */ |
5360 | 0 | } |
5361 | 0 | } |
5362 | | |
5363 | | static void |
5364 | | dissect_amqp_0_10_struct_message_properties(tvbuff_t *tvb, |
5365 | | packet_info *pinfo, |
5366 | | proto_tree *tree) |
5367 | 0 | { |
5368 | 0 | proto_item *ti; |
5369 | 0 | proto_item *frag; |
5370 | 0 | proto_item *args_tree; |
5371 | 0 | proto_item *flags_item, *subflags_item; |
5372 | 0 | uint8_t flag1, flag2; |
5373 | 0 | uint8_t subflag1, subflag2; |
5374 | 0 | uint16_t len16; |
5375 | 0 | uint32_t map_length; |
5376 | 0 | int offset = 0; |
5377 | 0 | tvbuff_t *next_tvb; |
5378 | |
|
5379 | 0 | frag = proto_item_add_subtree(tree, ett_args); |
5380 | 0 | offset += 2; /* Skip class and struct codes */ |
5381 | 0 | flag1 = tvb_get_uint8(tvb, offset); |
5382 | 0 | flag2 = tvb_get_uint8(tvb, offset+1); |
5383 | 0 | flags_item = proto_tree_add_item(frag, |
5384 | 0 | hf_amqp_0_10_argument_packing_flags, |
5385 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
5386 | 0 | if (flag2 & ~0x01) |
5387 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
5388 | 0 | offset += 2; |
5389 | 0 | if (flag1 & 0x01) { |
5390 | | /* content-length (uint64) */ |
5391 | 0 | proto_tree_add_item(frag, |
5392 | 0 | hf_amqp_0_10_struct_message_properties_content_len, |
5393 | 0 | tvb, offset, 8, ENC_BIG_ENDIAN); |
5394 | 0 | offset += 8; |
5395 | 0 | } |
5396 | 0 | if (flag1 & 0x02) { |
5397 | | /* message-id (uuid) */ |
5398 | 0 | proto_tree_add_item(frag, |
5399 | 0 | hf_amqp_0_10_struct_message_properties_message_id, |
5400 | 0 | tvb, offset, 16, ENC_BIG_ENDIAN); |
5401 | 0 | offset += 16; |
5402 | 0 | } |
5403 | 0 | if (flag1 & 0x04) { |
5404 | | /* correlation-id (vbin16) */ |
5405 | 0 | proto_tree_add_item(frag, |
5406 | 0 | hf_amqp_0_10_struct_message_properties_correlation, |
5407 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
5408 | 0 | offset += (2 + tvb_get_ntohs(tvb, offset)); |
5409 | 0 | } |
5410 | 0 | if (flag1 & 0x08) { |
5411 | | /* reply-to (reply-to) */ |
5412 | | /* This is another struct, length 2, packing 2 */ |
5413 | 0 | len16 = tvb_get_ntohs(tvb, offset); |
5414 | 0 | offset += 2; |
5415 | 0 | ti = proto_tree_add_item(frag, |
5416 | 0 | hf_amqp_0_10_struct_message_properties_reply_to, |
5417 | 0 | tvb, offset, len16, ENC_NA); |
5418 | 0 | args_tree = proto_item_add_subtree(ti, ett_args); |
5419 | 0 | subflags_item = proto_tree_add_item(args_tree, |
5420 | 0 | hf_amqp_0_10_argument_packing_flags, |
5421 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
5422 | 0 | subflag1 = tvb_get_uint8(tvb, offset); |
5423 | 0 | subflag2 = tvb_get_uint8(tvb, offset + 1); |
5424 | 0 | if ((subflag1 & ~0x03) || (subflag2 != 0)) |
5425 | 0 | expert_add_info(pinfo, subflags_item, &ei_amqp_bad_flag_value); |
5426 | 0 | offset += 2; |
5427 | 0 | if (subflag1 & 0x01) { |
5428 | | /* exchange (str8) */ |
5429 | 0 | proto_tree_add_item(args_tree, |
5430 | 0 | hf_amqp_0_10_struct_reply_to_exchange, |
5431 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
5432 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
5433 | 0 | } |
5434 | 0 | if (subflag1 & 0x02) { |
5435 | | /* routing-key (str8) */ |
5436 | 0 | proto_tree_add_item(args_tree, |
5437 | 0 | hf_amqp_0_10_struct_reply_to_routing_key, |
5438 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
5439 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
5440 | 0 | } |
5441 | 0 | } |
5442 | 0 | if (flag1 & 0x10) { |
5443 | | /* content-type (str8) */ |
5444 | 0 | proto_tree_add_item(frag, |
5445 | 0 | hf_amqp_0_10_struct_message_properties_content_type, |
5446 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
5447 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
5448 | 0 | } |
5449 | 0 | if (flag1 & 0x20) { |
5450 | | /* content-encoding (str8) */ |
5451 | 0 | proto_tree_add_item(frag, |
5452 | 0 | hf_amqp_0_10_struct_message_properties_content_encoding, |
5453 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
5454 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
5455 | 0 | } |
5456 | 0 | if (flag1 & 0x40) { |
5457 | | /* user-id (vbin16 ) */ |
5458 | 0 | proto_tree_add_item(frag, |
5459 | 0 | hf_amqp_0_10_struct_message_properties_user_id, |
5460 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
5461 | 0 | offset += (2 + tvb_get_ntohs(tvb, offset)); |
5462 | 0 | } |
5463 | 0 | if (flag1 & 0x80) { |
5464 | | /* app-id (vbin16 ) */ |
5465 | 0 | proto_tree_add_item(frag, |
5466 | 0 | hf_amqp_0_10_struct_message_properties_app_id, |
5467 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
5468 | 0 | offset += (2 + tvb_get_ntohs(tvb, offset)); |
5469 | 0 | } |
5470 | 0 | if (flag2 & 0x01) { |
5471 | | /* application-headers (map) */ |
5472 | 0 | map_length = amqp_0_10_get_32bit_size_new(frag, pinfo, tvb, hf_amqp_0_10_struct_message_properties_application_headers_size, offset); |
5473 | 0 | offset += 4; |
5474 | 0 | ti = proto_tree_add_item(frag, |
5475 | 0 | hf_amqp_0_10_struct_message_properties_application_headers, |
5476 | 0 | tvb, |
5477 | 0 | offset, |
5478 | 0 | map_length, ENC_NA); |
5479 | 0 | if (map_length > (uint32_t)tvb_reported_length_remaining(tvb, offset)) |
5480 | 0 | { |
5481 | 0 | next_tvb = tvb_new_subset_remaining(tvb, offset); |
5482 | 0 | } |
5483 | 0 | else |
5484 | 0 | { |
5485 | 0 | next_tvb = tvb_new_subset_length(tvb, offset, map_length); |
5486 | 0 | } |
5487 | 0 | dissect_amqp_0_10_map (next_tvb, ti); |
5488 | | /* offset += map_length; */ |
5489 | 0 | } |
5490 | 0 | } |
5491 | | |
5492 | | static void |
5493 | | dissect_amqp_0_10_struct_exchange_query_result(tvbuff_t *tvb, |
5494 | | packet_info *pinfo, |
5495 | | proto_item *tree) |
5496 | 0 | { |
5497 | 0 | proto_item *ti; |
5498 | 0 | proto_item *result; |
5499 | 0 | proto_item *flags_item; |
5500 | 0 | uint8_t flag1, flag2; |
5501 | 0 | uint32_t map_length; |
5502 | 0 | int flags_offset; |
5503 | 0 | int offset = 0; |
5504 | 0 | tvbuff_t *next_tvb; |
5505 | |
|
5506 | 0 | result = proto_item_add_subtree(tree, ett_args); |
5507 | 0 | offset += 2; /* Skip class and struct codes */ |
5508 | 0 | flags_offset = offset; |
5509 | 0 | flag1 = tvb_get_uint8(tvb, offset); |
5510 | 0 | flag2 = tvb_get_uint8(tvb, offset+1); |
5511 | 0 | flags_item = proto_tree_add_item(result, |
5512 | 0 | hf_amqp_0_10_argument_packing_flags, |
5513 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
5514 | 0 | if (flag2 & ~0x0f) |
5515 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
5516 | 0 | offset += 2; |
5517 | 0 | if (flag1 & 0x01) { |
5518 | | /* type (str8) */ |
5519 | 0 | proto_tree_add_item(result, |
5520 | 0 | hf_amqp_0_10_method_exchange_declare_type, |
5521 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
5522 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
5523 | 0 | } |
5524 | 0 | proto_tree_add_item(result, |
5525 | 0 | hf_amqp_0_10_struct_exchange_query_result_durable, |
5526 | 0 | tvb, flags_offset, 1, ENC_BIG_ENDIAN); |
5527 | 0 | proto_tree_add_item(result, |
5528 | 0 | hf_amqp_0_10_struct_exchange_query_result_not_found, |
5529 | 0 | tvb, flags_offset, 1, ENC_BIG_ENDIAN); |
5530 | 0 | if (flag1 & 0x08) { |
5531 | | /* arguments (map) */ |
5532 | 0 | map_length = amqp_0_10_get_32bit_size_new(result, pinfo, tvb, hf_amqp_0_10_method_exchange_declare_arguments_size, offset); |
5533 | 0 | offset += 4; |
5534 | 0 | ti = proto_tree_add_item(result, |
5535 | 0 | hf_amqp_0_10_method_exchange_declare_arguments, |
5536 | 0 | tvb, |
5537 | 0 | offset, |
5538 | 0 | map_length, ENC_NA); |
5539 | 0 | if (map_length > (uint32_t)tvb_reported_length_remaining(tvb, offset)) |
5540 | 0 | { |
5541 | 0 | next_tvb = tvb_new_subset_remaining(tvb, offset); |
5542 | 0 | } |
5543 | 0 | else |
5544 | 0 | { |
5545 | 0 | next_tvb = tvb_new_subset_length(tvb, offset, map_length); |
5546 | 0 | } |
5547 | 0 | dissect_amqp_0_10_map (next_tvb, ti); |
5548 | | /* offset += map_length; */ |
5549 | 0 | } |
5550 | 0 | } |
5551 | | |
5552 | | static void |
5553 | | dissect_amqp_0_10_struct_queue_query_result(tvbuff_t *tvb, |
5554 | | packet_info *pinfo, |
5555 | | proto_item *tree) |
5556 | 0 | { |
5557 | 0 | proto_item *ti; |
5558 | 0 | proto_item *result; |
5559 | 0 | proto_item *flags_item; |
5560 | 0 | uint8_t flag1, flag2; |
5561 | 0 | uint32_t map_length; |
5562 | 0 | int flags_offset; |
5563 | 0 | int offset = 0; |
5564 | 0 | tvbuff_t *next_tvb; |
5565 | |
|
5566 | 0 | result = proto_item_add_subtree(tree, ett_args); |
5567 | 0 | offset += 2; /* Skip class and struct codes */ |
5568 | 0 | flags_offset = offset; |
5569 | 0 | flag1 = tvb_get_uint8(tvb, offset); |
5570 | 0 | flag2 = tvb_get_uint8(tvb, offset+1); |
5571 | 0 | flags_item = proto_tree_add_item(result, |
5572 | 0 | hf_amqp_0_10_argument_packing_flags, |
5573 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
5574 | |
|
5575 | 0 | if (flag2 != 0) |
5576 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
5577 | 0 | offset += 2; |
5578 | 0 | if (flag1 & 0x01) { |
5579 | | /* queue (name [str8]) */ |
5580 | 0 | proto_tree_add_item(result, |
5581 | 0 | hf_amqp_0_10_method_queue_name, |
5582 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
5583 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
5584 | 0 | } |
5585 | 0 | if (flag1 & 0x02) { /* alternate-exchange (exchange.name [str8]) */ |
5586 | 0 | proto_tree_add_item(result, |
5587 | 0 | hf_amqp_0_10_method_queue_alt_exchange, |
5588 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
5589 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
5590 | 0 | } |
5591 | | /* |
5592 | | * 3rd-5th arguments are optional bits. |
5593 | | */ |
5594 | 0 | proto_tree_add_item(result, |
5595 | 0 | hf_amqp_0_10_struct_queue_query_result_durable, |
5596 | 0 | tvb, flags_offset, 1, ENC_BIG_ENDIAN); |
5597 | 0 | proto_tree_add_item(result, |
5598 | 0 | hf_amqp_0_10_struct_queue_query_result_exclusive, |
5599 | 0 | tvb, flags_offset, 1, ENC_BIG_ENDIAN); |
5600 | 0 | proto_tree_add_item(result, |
5601 | 0 | hf_amqp_0_10_struct_queue_query_result_auto_delete, |
5602 | 0 | tvb, flags_offset, 1, ENC_BIG_ENDIAN); |
5603 | 0 | if (flag1 & 0x20) { /* arguments (map) */ |
5604 | 0 | map_length = amqp_0_10_get_32bit_size_new(result, pinfo, tvb, hf_amqp_0_10_method_queue_declare_arguments_size, offset); |
5605 | 0 | offset += 4; |
5606 | 0 | ti = proto_tree_add_item(result, |
5607 | 0 | hf_amqp_0_10_method_queue_declare_arguments, |
5608 | 0 | tvb, |
5609 | 0 | offset, |
5610 | 0 | map_length, ENC_NA); |
5611 | 0 | if (map_length > (uint32_t)tvb_reported_length_remaining(tvb, offset)) |
5612 | 0 | { |
5613 | 0 | next_tvb = tvb_new_subset_remaining(tvb, offset); |
5614 | 0 | } |
5615 | 0 | else |
5616 | 0 | { |
5617 | 0 | next_tvb = tvb_new_subset_length(tvb, offset, map_length); |
5618 | 0 | } |
5619 | 0 | dissect_amqp_0_10_map (next_tvb, ti); |
5620 | 0 | offset += map_length; |
5621 | 0 | } |
5622 | 0 | if (flag1 & 0x40) { /* message-count (uint32) */ |
5623 | 0 | proto_tree_add_item(result, |
5624 | 0 | hf_amqp_0_10_struct_queue_query_result_message_count, |
5625 | 0 | tvb, offset, 4, ENC_BIG_ENDIAN); |
5626 | 0 | offset += 4; |
5627 | 0 | } |
5628 | 0 | if (flag1 & 0x80) { /* subscriber-count (uint32) */ |
5629 | 0 | proto_tree_add_item(result, |
5630 | 0 | hf_amqp_0_10_struct_queue_query_result_subscriber_count, |
5631 | 0 | tvb, offset, 4, ENC_BIG_ENDIAN); |
5632 | | /* offset += 4; */ |
5633 | 0 | } |
5634 | 0 | } |
5635 | | |
5636 | | static void |
5637 | | dissect_amqp_0_10_struct_file_properties(tvbuff_t *tvb, |
5638 | | packet_info *pinfo, |
5639 | | proto_tree *tree) |
5640 | 0 | { |
5641 | 0 | proto_item *ti; |
5642 | 0 | proto_item *props; |
5643 | 0 | proto_item *flags_item; |
5644 | 0 | uint8_t flag1, flag2; |
5645 | 0 | uint32_t map_length; |
5646 | 0 | uint64_t timestamp; |
5647 | 0 | int offset = 0; |
5648 | 0 | nstime_t tv; |
5649 | 0 | tvbuff_t *next_tvb; |
5650 | |
|
5651 | 0 | props = proto_item_add_subtree(tree, ett_args); |
5652 | 0 | offset += 2; /* Skip class and struct codes */ |
5653 | 0 | flag1 = tvb_get_uint8(tvb, offset); |
5654 | 0 | flag2 = tvb_get_uint8(tvb, offset+1); |
5655 | 0 | flags_item = proto_tree_add_item(props, |
5656 | 0 | hf_amqp_0_10_argument_packing_flags, |
5657 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
5658 | 0 | if (flag2 & ~0x01) |
5659 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
5660 | 0 | offset += 2; |
5661 | 0 | if (flag1 & 0x01) { |
5662 | | /* content-type (str8) */ |
5663 | 0 | proto_tree_add_item(props, |
5664 | 0 | hf_amqp_0_10_struct_file_properties_content_type, |
5665 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
5666 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
5667 | 0 | } |
5668 | 0 | if (flag1 & 0x02) { |
5669 | | /* content-encoding (str8) */ |
5670 | 0 | proto_tree_add_item(props, |
5671 | 0 | hf_amqp_0_10_struct_file_properties_content_encoding, |
5672 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
5673 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
5674 | 0 | } |
5675 | 0 | if (flag1 & 0x04) { |
5676 | | /* headers (map) */ |
5677 | 0 | map_length = amqp_0_10_get_32bit_size_new(props, pinfo, tvb, hf_amqp_0_10_struct_file_properties_headers_size, offset); |
5678 | 0 | offset += 4; |
5679 | 0 | ti = proto_tree_add_item(props, |
5680 | 0 | hf_amqp_0_10_struct_file_properties_headers, |
5681 | 0 | tvb, |
5682 | 0 | offset, |
5683 | 0 | map_length, ENC_NA); |
5684 | 0 | if (map_length > (uint32_t)tvb_reported_length_remaining(tvb, offset)) |
5685 | 0 | { |
5686 | 0 | next_tvb = tvb_new_subset_remaining(tvb, offset); |
5687 | 0 | } |
5688 | 0 | else |
5689 | 0 | { |
5690 | 0 | next_tvb = tvb_new_subset_length(tvb, offset, map_length); |
5691 | 0 | } |
5692 | 0 | dissect_amqp_0_10_map (next_tvb, ti); |
5693 | 0 | offset += map_length; |
5694 | 0 | } |
5695 | 0 | if (flag1 & 0x08) { |
5696 | | /* priority (uint8) */ |
5697 | 0 | proto_tree_add_item(props, |
5698 | 0 | hf_amqp_0_10_struct_file_properties_priority, |
5699 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
5700 | 0 | offset += 1; |
5701 | 0 | } |
5702 | 0 | if (flag1 & 0x10) { |
5703 | | /* reply-to (str8) */ |
5704 | 0 | proto_tree_add_item(props, |
5705 | 0 | hf_amqp_0_10_struct_file_properties_reply_to, |
5706 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
5707 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
5708 | 0 | } |
5709 | 0 | if (flag1 & 0x20) { |
5710 | | /* message-id (str8) */ |
5711 | 0 | proto_tree_add_item(props, |
5712 | 0 | hf_amqp_0_10_struct_file_properties_message_id, |
5713 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
5714 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
5715 | 0 | } |
5716 | 0 | if (flag1 & 0x40) { |
5717 | | /* filename (str8) */ |
5718 | 0 | proto_tree_add_item(props, |
5719 | 0 | hf_amqp_0_10_struct_file_properties_filename, |
5720 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
5721 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
5722 | 0 | } |
5723 | 0 | if (flag1 & 0x80) { |
5724 | | /* timestamp (datetime [uint64]) */ |
5725 | 0 | timestamp = tvb_get_ntoh64(tvb, offset); |
5726 | 0 | tv.secs = (time_t)timestamp; |
5727 | 0 | tv.nsecs = 0; |
5728 | 0 | proto_tree_add_time(props, |
5729 | 0 | hf_amqp_0_10_struct_file_properties_timestamp, |
5730 | 0 | tvb, offset, 8, &tv); |
5731 | 0 | offset += 8; |
5732 | 0 | } |
5733 | 0 | if (flag2 & 0x01) { |
5734 | | /* cluster-id (str8) */ |
5735 | 0 | proto_tree_add_item(props, |
5736 | 0 | hf_amqp_0_10_struct_file_properties_cluster_id, |
5737 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
5738 | | /* offset += (1 + tvb_get_uint8(tvb, offset)); */ |
5739 | 0 | } |
5740 | 0 | } |
5741 | | |
5742 | | static void |
5743 | | dissect_amqp_0_10_struct_stream_properties(tvbuff_t *tvb, |
5744 | | packet_info *pinfo, |
5745 | | proto_tree *tree) |
5746 | 0 | { |
5747 | 0 | proto_item *ti; |
5748 | 0 | proto_item *props; |
5749 | 0 | proto_item *flags_item; |
5750 | 0 | uint8_t flag1, flag2; |
5751 | 0 | uint32_t map_length; |
5752 | 0 | uint64_t timestamp; |
5753 | 0 | int offset = 0; |
5754 | 0 | nstime_t tv; |
5755 | 0 | tvbuff_t *next_tvb; |
5756 | |
|
5757 | 0 | props = proto_item_add_subtree(tree, ett_args); |
5758 | 0 | offset += 2; /* Skip class and struct codes */ |
5759 | 0 | flag1 = tvb_get_uint8(tvb, offset); |
5760 | 0 | flag2 = tvb_get_uint8(tvb, offset+1); |
5761 | 0 | flags_item = proto_tree_add_item(props, |
5762 | 0 | hf_amqp_0_10_argument_packing_flags, |
5763 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
5764 | 0 | if ((flag1 & ~0x1f) || (flag2 != 0)) |
5765 | 0 | expert_add_info(pinfo, flags_item, &ei_amqp_bad_flag_value); |
5766 | 0 | offset += 2; |
5767 | 0 | if (flag1 & 0x01) { |
5768 | | /* content-type (str8) */ |
5769 | 0 | proto_tree_add_item(props, |
5770 | 0 | hf_amqp_0_10_struct_stream_properties_content_type, |
5771 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
5772 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
5773 | 0 | } |
5774 | 0 | if (flag1 & 0x02) { |
5775 | | /* content-encoding (str8) */ |
5776 | 0 | proto_tree_add_item(props, |
5777 | 0 | hf_amqp_0_10_struct_stream_properties_content_encoding, |
5778 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
5779 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
5780 | 0 | } |
5781 | 0 | if (flag1 & 0x04) { |
5782 | | /* headers (map) */ |
5783 | 0 | map_length = amqp_0_10_get_32bit_size_new(props, pinfo, tvb, hf_amqp_0_10_struct_stream_properties_headers_size, offset); |
5784 | 0 | offset += 4; |
5785 | 0 | ti = proto_tree_add_item(props, |
5786 | 0 | hf_amqp_0_10_struct_stream_properties_headers, |
5787 | 0 | tvb, |
5788 | 0 | offset, |
5789 | 0 | map_length, ENC_NA); |
5790 | 0 | if (map_length > (uint32_t)tvb_reported_length_remaining(tvb, offset)) |
5791 | 0 | { |
5792 | 0 | next_tvb = tvb_new_subset_remaining(tvb, offset); |
5793 | 0 | } |
5794 | 0 | else |
5795 | 0 | { |
5796 | 0 | next_tvb = tvb_new_subset_length(tvb, offset, map_length); |
5797 | 0 | } |
5798 | 0 | dissect_amqp_0_10_map (next_tvb, ti); |
5799 | 0 | offset += map_length; |
5800 | 0 | } |
5801 | 0 | if (flag1 & 0x08) { |
5802 | | /* priority (uint8) */ |
5803 | 0 | proto_tree_add_item(props, |
5804 | 0 | hf_amqp_0_10_struct_stream_properties_priority, |
5805 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
5806 | 0 | offset += 1; |
5807 | 0 | } |
5808 | 0 | if (flag1 & 0x10) { |
5809 | | /* timestamp (datetime [uint64]) */ |
5810 | 0 | timestamp = tvb_get_ntoh64(tvb, offset); |
5811 | 0 | tv.secs = (time_t)timestamp; |
5812 | 0 | tv.nsecs = 0; |
5813 | 0 | proto_tree_add_time(props, |
5814 | 0 | hf_amqp_0_10_struct_stream_properties_timestamp, |
5815 | 0 | tvb, offset, 8, &tv); |
5816 | | /* offset += 8; */ |
5817 | 0 | } |
5818 | 0 | } |
5819 | | |
5820 | | static void |
5821 | | // NOLINTNEXTLINE(misc-no-recursion) |
5822 | | dissect_amqp_0_10_struct32(tvbuff_t *tvb, |
5823 | | packet_info *pinfo, |
5824 | | proto_item *ti) |
5825 | 1 | { |
5826 | 1 | uint32_t class_code, struct_code; |
5827 | 1 | uint8_t flag1; |
5828 | 1 | uint16_t size; |
5829 | 1 | proto_item *ti2, *result; |
5830 | 1 | proto_tree *tree; |
5831 | 1 | int offset = 0; |
5832 | | |
5833 | 1 | tree = proto_item_add_subtree(ti, ett_args); |
5834 | | |
5835 | 1 | proto_tree_add_item_ret_uint(tree, hf_amqp_0_10_struct32_class, tvb, offset, 1, ENC_NA, &class_code); |
5836 | 1 | proto_tree_add_item_ret_uint(tree, hf_amqp_0_10_struct32_struct, tvb, offset+1, 1, ENC_NA, &struct_code); |
5837 | | |
5838 | 1 | increment_dissection_depth(pinfo); |
5839 | | |
5840 | 1 | switch(class_code) { |
5841 | 0 | case AMQP_0_10_CLASS_MESSAGE: |
5842 | 0 | switch (struct_code) { |
5843 | 0 | case AMQP_0_10_STRUCT_MESSAGE_DELIVERY_PROPERTIES: |
5844 | 0 | dissect_amqp_0_10_struct_delivery_properties(tvb, |
5845 | 0 | pinfo, |
5846 | 0 | tree); |
5847 | 0 | break; |
5848 | 0 | case AMQP_0_10_STRUCT_MESSAGE_FRAGMENT_PROPERTIES: |
5849 | 0 | dissect_amqp_0_10_struct_fragment_properties(tvb, |
5850 | 0 | pinfo, |
5851 | 0 | tree); |
5852 | 0 | break; |
5853 | 0 | case AMQP_0_10_STRUCT_MESSAGE_MESSAGE_PROPERTIES: |
5854 | 0 | dissect_amqp_0_10_struct_message_properties(tvb, |
5855 | 0 | pinfo, |
5856 | 0 | tree); |
5857 | 0 | break; |
5858 | 0 | case AMQP_0_10_STRUCT_MESSAGE_ACQUIRED: |
5859 | 0 | result = proto_item_add_subtree(tree, ett_args); |
5860 | 0 | offset += 2; /* Class/type codes */ |
5861 | 0 | flag1 = tvb_get_uint8(tvb, offset); |
5862 | 0 | proto_tree_add_item(result, hf_amqp_0_10_argument_packing_flags, |
5863 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
5864 | 0 | offset += 2; |
5865 | 0 | if (flag1 & 0x01) { |
5866 | | /* transfers (commands [sequence-set]) */ |
5867 | 0 | size = tvb_get_ntohs(tvb, offset); |
5868 | 0 | ti2 = proto_tree_add_item(result, |
5869 | 0 | hf_amqp_0_10_struct_acquired_transfers, |
5870 | 0 | tvb, offset, size + 2, ENC_NA); |
5871 | 0 | format_amqp_0_10_sequence_set(tvb, offset + 2, size, ti2); |
5872 | 0 | } |
5873 | 0 | break; |
5874 | 0 | case AMQP_0_10_STRUCT_MESSAGE_RESUME_RESULT: |
5875 | 0 | result = proto_item_add_subtree(tree, ett_args); |
5876 | 0 | offset += 2; /* Class/type codes */ |
5877 | 0 | flag1 = tvb_get_uint8(tvb, offset); |
5878 | 0 | proto_tree_add_item(result, hf_amqp_0_10_argument_packing_flags, |
5879 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
5880 | 0 | offset += 2; |
5881 | 0 | if (flag1 & 0x01) { |
5882 | | /* offset (uint64) */ |
5883 | 0 | proto_tree_add_item(result, |
5884 | 0 | hf_amqp_0_10_struct_resume_result_offset, |
5885 | 0 | tvb, offset, 8, ENC_BIG_ENDIAN); |
5886 | 0 | } |
5887 | 0 | break; |
5888 | 0 | } |
5889 | 0 | break; |
5890 | | |
5891 | 0 | case AMQP_0_10_CLASS_DTX: |
5892 | 0 | switch (struct_code) { |
5893 | 0 | case AMQP_0_10_STRUCT_DTX_XA_RESULT: |
5894 | 0 | offset += 2; /* Class/type codes */ |
5895 | | /*flag1 = tvb_get_uint8(tvb, offset);*/ |
5896 | 0 | proto_tree_add_item(tree, hf_amqp_0_10_struct32_padding, tvb, offset, 2, ENC_NA); |
5897 | 0 | offset += 2; |
5898 | 0 | proto_tree_add_item(tree, hf_amqp_0_10_dtx_xa_status, tvb, offset, 2, ENC_BIG_ENDIAN); |
5899 | 0 | break; |
5900 | | |
5901 | 0 | case AMQP_0_10_STRUCT_DTX_RECOVER_RESULT: |
5902 | 0 | offset += 2; /* Class/type codes */ |
5903 | 0 | proto_tree_add_item(tree, hf_amqp_0_10_struct32_padding, tvb, offset, 2, ENC_NA); |
5904 | 0 | offset += 2; |
5905 | 0 | amqp_0_10_get_32bit_size_new(tree, pinfo, tvb, hf_amqp_0_10_struct_dtx_recover_result_size, offset); |
5906 | 0 | offset += 4; |
5907 | 0 | dissect_amqp_0_10_array(tvb, |
5908 | 0 | pinfo, |
5909 | 0 | offset, |
5910 | 0 | tree); |
5911 | 0 | break; |
5912 | 0 | } |
5913 | 0 | break; |
5914 | | |
5915 | 0 | case AMQP_0_10_CLASS_EXCHANGE: |
5916 | 0 | switch (struct_code) { |
5917 | 0 | case AMQP_0_10_STRUCT_EXCHANGE_QUERY_RESULT: |
5918 | 0 | dissect_amqp_0_10_struct_exchange_query_result(tvb, |
5919 | 0 | pinfo, |
5920 | 0 | tree); |
5921 | 0 | break; |
5922 | | |
5923 | 0 | case AMQP_0_10_STRUCT_EXCHANGE_BOUND_RESULT: |
5924 | 0 | result = proto_item_add_subtree(tree, ett_args); |
5925 | 0 | offset += 2; /* Class/type codes */ |
5926 | 0 | proto_tree_add_item(result, |
5927 | 0 | hf_amqp_0_10_struct_exchange_bound_result_exchange_not_found, |
5928 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
5929 | 0 | proto_tree_add_item(result, |
5930 | 0 | hf_amqp_0_10_struct_exchange_bound_result_queue_not_found, |
5931 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
5932 | 0 | proto_tree_add_item(result, |
5933 | 0 | hf_amqp_0_10_struct_exchange_bound_result_queue_not_matched, |
5934 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
5935 | 0 | proto_tree_add_item(result, |
5936 | 0 | hf_amqp_0_10_struct_exchange_bound_result_key_not_matched, |
5937 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
5938 | 0 | proto_tree_add_item(result, |
5939 | 0 | hf_amqp_0_10_struct_exchange_bound_result_args_not_matched, |
5940 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
5941 | 0 | break; |
5942 | 0 | } |
5943 | 0 | break; |
5944 | | |
5945 | 0 | case AMQP_0_10_CLASS_QUEUE: |
5946 | 0 | switch (struct_code) { |
5947 | 0 | case AMQP_0_10_STRUCT_QUEUE_QUERY_RESULT: |
5948 | 0 | dissect_amqp_0_10_struct_queue_query_result(tvb, pinfo, tree); |
5949 | 0 | break; |
5950 | 0 | } |
5951 | 0 | break; |
5952 | | |
5953 | 0 | case AMQP_0_10_CLASS_FILE: |
5954 | 0 | switch (struct_code) { |
5955 | 0 | case AMQP_0_10_STRUCT_FILE_PROPERTIES: |
5956 | 0 | dissect_amqp_0_10_struct_file_properties(tvb, pinfo, tree); |
5957 | 0 | break; |
5958 | 0 | } |
5959 | 0 | break; |
5960 | | |
5961 | 0 | case AMQP_0_10_CLASS_STREAM: |
5962 | 0 | switch (struct_code) { |
5963 | 0 | case AMQP_0_10_STRUCT_STREAM_PROPERTIES: |
5964 | 0 | dissect_amqp_0_10_struct_stream_properties(tvb, pinfo, tree); |
5965 | 0 | break; |
5966 | 0 | } |
5967 | 0 | break; |
5968 | 1 | } |
5969 | 0 | decrement_dissection_depth(pinfo); |
5970 | 0 | } |
5971 | | |
5972 | | /* decodes AMQP 1.0 list |
5973 | | * arguments: |
5974 | | * tvb: obvious |
5975 | | * pinfo: obvious |
5976 | | * offset: obvious |
5977 | | * bound: boundary within that the list has to end |
5978 | | * item: obvious |
5979 | | * hf_amqp_type: what hf_* type is the list itself |
5980 | | * hf_amqp_subtype_count: length of hf_amqp_subtypes |
5981 | | * hf_amqp_subtypes: what hf_* types are the list items |
5982 | | * name: what to show for unformatted content |
5983 | | */ |
5984 | | static unsigned |
5985 | | // NOLINTNEXTLINE(misc-no-recursion) |
5986 | | dissect_amqp_1_0_list(tvbuff_t *tvb, |
5987 | | packet_info *pinfo, |
5988 | | int offset, |
5989 | | proto_item *item, |
5990 | | int hf_amqp_type, |
5991 | | uint32_t hf_amqp_subtype_count, |
5992 | | int * const *hf_amqp_subtypes, |
5993 | | const char *name) |
5994 | 0 | { |
5995 | 0 | proto_item *list_tree; |
5996 | 0 | uint8_t type; |
5997 | 0 | uint8_t count_len; |
5998 | 0 | uint32_t i, element_count; |
5999 | 0 | uint32_t element_size; |
6000 | 0 | uint32_t decoded_element_size; |
6001 | 0 | uint32_t orig_offset; |
6002 | 0 | uint32_t decoded_elements; |
6003 | 0 | int hf_amqp_item; |
6004 | |
|
6005 | 0 | list_tree = 0; |
6006 | 0 | decoded_elements = 0; |
6007 | 0 | orig_offset = offset; |
6008 | |
|
6009 | 0 | type = tvb_get_uint8(tvb, offset); |
6010 | 0 | offset += 1; |
6011 | 0 | switch (type) { |
6012 | 0 | case AMQP_1_0_TYPE_LIST0: |
6013 | 0 | count_len = 0; |
6014 | 0 | element_size = 0; |
6015 | 0 | element_count = 0; |
6016 | 0 | break; |
6017 | 0 | case AMQP_1_0_TYPE_LIST8: |
6018 | 0 | count_len = 1; |
6019 | 0 | element_size = tvb_get_uint8(tvb, offset); |
6020 | 0 | element_count = tvb_get_uint8(tvb, offset+count_len); |
6021 | 0 | break; |
6022 | 0 | case AMQP_1_0_TYPE_LIST32: |
6023 | 0 | count_len = 4; |
6024 | 0 | element_size = tvb_get_ntohl(tvb, offset); |
6025 | 0 | element_count = tvb_get_ntohl(tvb, offset+count_len); |
6026 | 0 | break; |
6027 | 0 | default: |
6028 | 0 | proto_tree_add_none_format(list_tree, hf_amqp_1_0_list, tvb, |
6029 | 0 | offset-1, |
6030 | 0 | 1, |
6031 | 0 | "(unknown type %d)", |
6032 | 0 | type); |
6033 | 0 | expert_add_info_format(pinfo, |
6034 | 0 | list_tree, |
6035 | 0 | &ei_amqp_unknown_amqp_type, |
6036 | 0 | "Unknown AMQP list type %d", |
6037 | 0 | type); |
6038 | 0 | return 0; |
6039 | 0 | } |
6040 | | |
6041 | 0 | list_tree = proto_tree_add_item(item, |
6042 | 0 | hf_amqp_type, |
6043 | 0 | tvb, |
6044 | 0 | offset-1, |
6045 | 0 | element_size+1+count_len, |
6046 | 0 | ENC_BIG_ENDIAN); |
6047 | 0 | proto_item_set_text(list_tree, "%s", name ? name : proto_registrar_get_name(hf_amqp_type)); |
6048 | 0 | offset += (count_len*2); |
6049 | |
|
6050 | 0 | if (element_count > 0) |
6051 | 0 | list_tree = proto_item_add_subtree(list_tree, ett_amqp_1_0_list); |
6052 | | /* display the item count for custom lists only |
6053 | | * standard structures contain NULL items, so the real element count is different */ |
6054 | 0 | if (hf_amqp_subtype_count == 0) |
6055 | 0 | proto_item_append_text(list_tree, " (list of %d element%s)", element_count, plurality(element_count, "", "s")); |
6056 | |
|
6057 | 0 | if (element_count > element_size) |
6058 | 0 | { |
6059 | 0 | expert_add_info_format(pinfo, |
6060 | 0 | list_tree, |
6061 | 0 | &ei_amqp_invalid_number_of_params, |
6062 | 0 | "Number of list elements (%d) bigger than list size (%d)", |
6063 | 0 | element_count, element_size); |
6064 | 0 | return 0; |
6065 | 0 | } |
6066 | | |
6067 | 0 | for (i = 0; ((i < element_count) && (tvb_reported_length_remaining(tvb, offset) > 0)); i++) { |
6068 | 0 | decoded_element_size = 0; |
6069 | 0 | if (decoded_elements<hf_amqp_subtype_count) |
6070 | 0 | hf_amqp_item = *(hf_amqp_subtypes[decoded_elements]); |
6071 | 0 | else |
6072 | 0 | hf_amqp_item = hf_amqp_1_0_list; /* dynamic item */ |
6073 | 0 | get_amqp_1_0_type_value_formatter(tvb, |
6074 | 0 | pinfo, |
6075 | 0 | offset, |
6076 | 0 | hf_amqp_item, |
6077 | 0 | NULL, |
6078 | 0 | &decoded_element_size, |
6079 | 0 | list_tree); |
6080 | 0 | decoded_elements += 1; |
6081 | 0 | offset += decoded_element_size; |
6082 | 0 | } |
6083 | 0 | if (i != element_count) |
6084 | 0 | expert_add_info_format(pinfo, |
6085 | 0 | list_tree, |
6086 | 0 | &ei_amqp_invalid_number_of_params, |
6087 | 0 | "Number of list elements (%d) not matching number of decoded elements (%d)", |
6088 | 0 | element_count+decoded_elements, decoded_elements); |
6089 | 0 | return offset-orig_offset; |
6090 | 0 | } |
6091 | | |
6092 | | /* decodes AMQP 1.0 map |
6093 | | * arguments: see dissect_amqp_1_0_list |
6094 | | */ |
6095 | | static unsigned |
6096 | | // NOLINTNEXTLINE(misc-no-recursion) |
6097 | | dissect_amqp_1_0_map(tvbuff_t *tvb, |
6098 | | packet_info *pinfo, |
6099 | | int offset, |
6100 | | proto_item *item, |
6101 | | int hf_amqp_type, |
6102 | | const char *name) |
6103 | 0 | { |
6104 | 0 | proto_item *map_tree; |
6105 | 0 | uint8_t type; |
6106 | 0 | uint8_t count_len; |
6107 | 0 | uint32_t element_count; |
6108 | 0 | uint32_t element_size; |
6109 | 0 | const struct amqp1_typeinfo* element_type; |
6110 | 0 | uint32_t decoded_element_size; |
6111 | 0 | uint32_t orig_offset; |
6112 | 0 | const char *value = NULL; |
6113 | |
|
6114 | 0 | map_tree = 0; |
6115 | 0 | orig_offset = offset; |
6116 | |
|
6117 | 0 | type = tvb_get_uint8(tvb, offset); |
6118 | 0 | offset += 1; |
6119 | 0 | switch (type) { |
6120 | 0 | case AMQP_1_0_TYPE_MAP8: |
6121 | 0 | count_len = 1; |
6122 | 0 | element_size = tvb_get_uint8(tvb, offset); |
6123 | 0 | element_count = tvb_get_uint8(tvb, offset+count_len); |
6124 | 0 | break; |
6125 | 0 | case AMQP_1_0_TYPE_MAP32: |
6126 | 0 | count_len = 4; |
6127 | 0 | element_size = tvb_get_ntohl(tvb, offset); |
6128 | 0 | element_count = tvb_get_ntohl(tvb, offset+count_len); |
6129 | 0 | break; |
6130 | 0 | default: |
6131 | 0 | proto_tree_add_none_format(map_tree, hf_amqp_1_0_map, tvb, |
6132 | 0 | offset-1, |
6133 | 0 | 1, |
6134 | 0 | "(unknown type %d)", |
6135 | 0 | type); |
6136 | 0 | expert_add_info_format(pinfo, |
6137 | 0 | map_tree, |
6138 | 0 | &ei_amqp_unknown_amqp_type, |
6139 | 0 | "Unknown AMQP map type %d", |
6140 | 0 | type); |
6141 | 0 | return tvb_reported_length_remaining(tvb, orig_offset); |
6142 | 0 | } |
6143 | | |
6144 | 0 | if (proto_registrar_get_ftype(hf_amqp_type) != FT_NONE) { |
6145 | 0 | map_tree = proto_tree_add_item(item, |
6146 | 0 | hf_amqp_type, |
6147 | 0 | tvb, |
6148 | 0 | offset-1, |
6149 | 0 | element_size+1+count_len, |
6150 | 0 | ENC_NA); |
6151 | 0 | } else { |
6152 | 0 | map_tree = proto_tree_add_none_format(item, |
6153 | 0 | hf_amqp_type, |
6154 | 0 | tvb, |
6155 | 0 | offset-1, |
6156 | 0 | element_size+1+count_len, |
6157 | 0 | "%s", |
6158 | 0 | name ? name : proto_registrar_get_name(hf_amqp_type)); |
6159 | 0 | } |
6160 | 0 | offset += (count_len*2); |
6161 | |
|
6162 | 0 | if (element_count > 0) |
6163 | 0 | map_tree = proto_item_add_subtree(map_tree, ett_amqp_1_0_map); |
6164 | 0 | if (element_count%2==1) { |
6165 | 0 | expert_add_info_format(pinfo, |
6166 | 0 | map_tree, |
6167 | 0 | &ei_amqp_invalid_number_of_params, |
6168 | 0 | "Odd number of map items: %d", |
6169 | 0 | element_count); |
6170 | 0 | return tvb_reported_length_remaining(tvb, orig_offset); |
6171 | 0 | } |
6172 | | |
6173 | 0 | if (element_count > element_size) |
6174 | 0 | { |
6175 | 0 | expert_add_info_format(pinfo, |
6176 | 0 | map_tree, |
6177 | 0 | &ei_amqp_invalid_number_of_params, |
6178 | 0 | "Number of map elements (%d) bigger than map size (%d)", |
6179 | 0 | element_count, element_size); |
6180 | 0 | return tvb_reported_length_remaining(tvb, orig_offset); |
6181 | 0 | } |
6182 | | |
6183 | 0 | proto_item_append_text(map_tree, |
6184 | 0 | " (map of %d element%s)", |
6185 | 0 | (element_count/2), |
6186 | 0 | plurality(element_count/2, "", "s")); |
6187 | |
|
6188 | 0 | while ((element_count > 0) && (tvb_reported_length_remaining(tvb, offset) > 0)) { |
6189 | 0 | if (element_count%2 == 0) { /* decode key */ |
6190 | 0 | element_type = decode_fixed_type(tvb_get_uint8(tvb, offset)); |
6191 | 0 | if (element_type) |
6192 | 0 | { |
6193 | 0 | decoded_element_size=element_type->formatter(tvb, offset+1, element_type->known_size, &value); |
6194 | 0 | offset += (decoded_element_size+1); |
6195 | 0 | } |
6196 | 0 | else |
6197 | 0 | { /* can't decode key type */ |
6198 | 0 | proto_tree_add_none_format(map_tree, hf_amqp_1_0_map, tvb, |
6199 | 0 | offset, |
6200 | 0 | 1, |
6201 | 0 | "(unknown map key type %d)", |
6202 | 0 | tvb_get_uint8(tvb, offset)); |
6203 | 0 | expert_add_info_format(pinfo, |
6204 | 0 | map_tree, |
6205 | 0 | &ei_amqp_unknown_amqp_type, |
6206 | 0 | "Unknown AMQP map key type %d", |
6207 | 0 | tvb_get_uint8(tvb, offset)); |
6208 | 0 | offset += 1; |
6209 | 0 | } |
6210 | 0 | } |
6211 | 0 | else { /* decode value */ |
6212 | 0 | get_amqp_1_0_type_value_formatter(tvb, |
6213 | 0 | pinfo, |
6214 | 0 | offset, |
6215 | 0 | hf_amqp_1_0_list, /* dynamic item */ |
6216 | 0 | value, |
6217 | 0 | &decoded_element_size, |
6218 | 0 | map_tree); |
6219 | 0 | offset += decoded_element_size; |
6220 | 0 | } |
6221 | 0 | element_count--; |
6222 | 0 | } |
6223 | 0 | return offset-orig_offset; |
6224 | 0 | } |
6225 | | |
6226 | | /* decodes AMQP 1.0 array |
6227 | | * arguments: see dissect_amqp_1_0_list |
6228 | | */ |
6229 | | static unsigned |
6230 | | // NOLINTNEXTLINE(misc-no-recursion) |
6231 | | dissect_amqp_1_0_array(tvbuff_t *tvb, |
6232 | | packet_info *pinfo, |
6233 | | int offset, |
6234 | | proto_item *item, |
6235 | | int hf_amqp_type, |
6236 | | uint32_t hf_amqp_subtype_count, |
6237 | | int * const *hf_amqp_subtypes, |
6238 | | const char *name) |
6239 | 0 | { |
6240 | 0 | proto_item *array_tree; |
6241 | 0 | uint8_t type; |
6242 | 0 | uint8_t count_len; |
6243 | 0 | uint32_t i, element_count; |
6244 | 0 | uint32_t element_size; |
6245 | 0 | uint32_t element_type; |
6246 | 0 | uint32_t decoded_element_size; |
6247 | 0 | uint32_t orig_offset; |
6248 | 0 | uint32_t decoded_elements; |
6249 | 0 | int hf_amqp_item; |
6250 | 0 | uint32_t hf_amqp_subtype_count_array = 0; |
6251 | 0 | int * const *hf_amqp_subtypes_array = NULL; |
6252 | 0 | const char *type_name_array = NULL; |
6253 | |
|
6254 | 0 | array_tree = 0; |
6255 | 0 | decoded_elements = 0; |
6256 | 0 | orig_offset = offset; |
6257 | |
|
6258 | 0 | type = tvb_get_uint8(tvb, offset); |
6259 | 0 | offset += 1; |
6260 | 0 | switch (type) { |
6261 | 0 | case AMQP_1_0_TYPE_ARRAY8: |
6262 | 0 | count_len = 1; |
6263 | 0 | element_size = tvb_get_uint8(tvb, offset); |
6264 | 0 | element_count = tvb_get_uint8(tvb, offset+count_len); |
6265 | 0 | break; |
6266 | 0 | case AMQP_1_0_TYPE_ARRAY32: |
6267 | 0 | count_len = 4; |
6268 | 0 | element_size = tvb_get_ntohl(tvb, offset); |
6269 | 0 | element_count = tvb_get_ntohl(tvb, offset+count_len); |
6270 | 0 | break; |
6271 | 0 | default: |
6272 | 0 | proto_tree_add_none_format(array_tree, hf_amqp_1_0_list, tvb, |
6273 | 0 | offset-1, |
6274 | 0 | 1, |
6275 | 0 | "(unknown type %d)", |
6276 | 0 | type); |
6277 | 0 | expert_add_info_format(pinfo, |
6278 | 0 | array_tree, |
6279 | 0 | &ei_amqp_unknown_amqp_type, |
6280 | 0 | "Unknown AMQP array type %d", |
6281 | 0 | type); |
6282 | 0 | return tvb_reported_length_remaining(tvb, orig_offset); |
6283 | 0 | } |
6284 | | |
6285 | 0 | element_type = get_amqp_1_0_type_formatter(tvb, |
6286 | 0 | offset+count_len*2, |
6287 | 0 | &hf_amqp_type, |
6288 | 0 | &type_name_array, |
6289 | 0 | &hf_amqp_subtype_count_array, |
6290 | 0 | &hf_amqp_subtypes_array, |
6291 | 0 | &decoded_element_size); |
6292 | |
|
6293 | 0 | array_tree = proto_tree_add_item(item, |
6294 | 0 | hf_amqp_type, |
6295 | 0 | tvb, |
6296 | 0 | offset-1, |
6297 | 0 | element_size+1+count_len, |
6298 | 0 | ENC_BIG_ENDIAN); |
6299 | 0 | proto_item_set_text(array_tree, "%s", name ? name : proto_registrar_get_name(hf_amqp_type)); |
6300 | 0 | offset += (count_len*2+decoded_element_size); |
6301 | |
|
6302 | 0 | if (element_count > 0) |
6303 | 0 | array_tree = proto_item_add_subtree(array_tree, ett_amqp_1_0_array); |
6304 | | /* display the item count for custom arrays only |
6305 | | * standard structures contain NULL items, so the real element count is different */ |
6306 | 0 | if (hf_amqp_subtype_count == 0) |
6307 | 0 | proto_item_append_text(array_tree, " (array of %d element%s)", element_count, plurality(element_count, "", "s")); |
6308 | |
|
6309 | 0 | if (element_count > element_size) |
6310 | 0 | { |
6311 | 0 | expert_add_info_format(pinfo, |
6312 | 0 | array_tree, |
6313 | 0 | &ei_amqp_invalid_number_of_params, |
6314 | 0 | "Number of array elements (%d) bigger than array size (%d)", |
6315 | 0 | element_count, element_size); |
6316 | 0 | return tvb_reported_length_remaining(tvb, orig_offset); |
6317 | 0 | } |
6318 | | |
6319 | 0 | for (i = 0; ((i < element_count) && (tvb_reported_length_remaining(tvb, offset) > 0)); i++) { |
6320 | 0 | decoded_element_size = 0; |
6321 | 0 | if (decoded_elements<hf_amqp_subtype_count) |
6322 | 0 | hf_amqp_item = *(hf_amqp_subtypes[decoded_elements]); |
6323 | 0 | else |
6324 | 0 | hf_amqp_item = hf_amqp_1_0_list; /* dynamic item */ |
6325 | 0 | get_amqp_1_0_value_formatter(tvb, |
6326 | 0 | pinfo, |
6327 | 0 | element_type, /* code */ |
6328 | 0 | offset, |
6329 | 0 | hf_amqp_item, |
6330 | 0 | (proto_registrar_get_nth(hf_amqp_type))->name, /* name */ |
6331 | 0 | hf_amqp_subtype_count_array, /* subitem list count */ |
6332 | 0 | hf_amqp_subtypes_array, /* subitem list hf_.. list */ |
6333 | 0 | &decoded_element_size, |
6334 | 0 | array_tree); |
6335 | 0 | decoded_elements += 1; |
6336 | 0 | if (decoded_element_size==0) |
6337 | 0 | decoded_element_size=1; /* necessary for 0x40 or similar values where value_formatter returns size of _value_ 0 (type=1 not counted) */ |
6338 | 0 | offset += decoded_element_size; |
6339 | 0 | } |
6340 | 0 | if (i != element_count) |
6341 | 0 | expert_add_info_format(pinfo, |
6342 | 0 | array_tree, |
6343 | 0 | &ei_amqp_invalid_number_of_params, |
6344 | 0 | "Number of array elements (%d) not matching number of decoded elements (%d)", |
6345 | 0 | element_count+decoded_elements, decoded_elements); |
6346 | 0 | return offset-orig_offset; |
6347 | 0 | } |
6348 | | |
6349 | | /* decodes AMQP 1.0 AMQP performative (open, attach, transfer or so) |
6350 | | * arguments: |
6351 | | * tvb, offset, length, amqp_tree, pinfo: obvious |
6352 | | * method_name: what to print to col_append_str method in dissect_amqp_1_0_frame |
6353 | | */ |
6354 | | static void |
6355 | | dissect_amqp_1_0_AMQP_frame(tvbuff_t *tvb, |
6356 | | proto_item *amqp_item, |
6357 | | packet_info *pinfo) |
6358 | 1 | { |
6359 | 1 | proto_item *args_tree; |
6360 | 1 | uint32_t arg_length = 0; |
6361 | 1 | uint32_t method; |
6362 | 1 | int offset = 0; |
6363 | 1 | proto_item* ti; |
6364 | | |
6365 | 1 | args_tree = proto_item_add_subtree(amqp_item, ett_args); |
6366 | | |
6367 | 1 | if (tvb_reported_length(tvb) == 0) { /* empty keepalive sent */ |
6368 | 0 | col_append_str(pinfo->cinfo, COL_INFO, "(empty)"); |
6369 | 0 | col_set_fence(pinfo->cinfo, COL_INFO); |
6370 | 0 | return; |
6371 | 0 | } |
6372 | | |
6373 | 1 | ti = proto_tree_add_item_ret_uint(args_tree, hf_amqp_1_0_amqp_performative, tvb, offset+2, 1, ENC_BIG_ENDIAN, &method); |
6374 | 1 | col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", val_to_str_const(method, amqp_1_0_AMQP_performatives, "<invalid AMQP performative>")); |
6375 | 1 | col_set_fence(pinfo->cinfo, COL_INFO); |
6376 | | |
6377 | 1 | offset += 3; /* descriptor-constructor & fixed_one length & AMQP performative code */ |
6378 | 1 | switch(method) { |
6379 | 0 | case AMQP_1_0_AMQP_OPEN: |
6380 | 0 | dissect_amqp_1_0_list(tvb, |
6381 | 0 | pinfo, |
6382 | 0 | offset, |
6383 | 0 | args_tree, |
6384 | 0 | hf_amqp_method_arguments, |
6385 | 0 | 10, amqp_1_0_amqp_open_items, NULL); |
6386 | 0 | break; |
6387 | 0 | case AMQP_1_0_AMQP_BEGIN: |
6388 | 0 | dissect_amqp_1_0_list(tvb, |
6389 | 0 | pinfo, |
6390 | 0 | offset, |
6391 | 0 | args_tree, |
6392 | 0 | hf_amqp_method_arguments, |
6393 | 0 | 8, amqp_1_0_amqp_begin_items, NULL); |
6394 | 0 | break; |
6395 | 0 | case AMQP_1_0_AMQP_ATTACH: |
6396 | 0 | dissect_amqp_1_0_list(tvb, |
6397 | 0 | pinfo, |
6398 | 0 | offset, |
6399 | 0 | args_tree, |
6400 | 0 | hf_amqp_method_arguments, |
6401 | 0 | 14, amqp_1_0_amqp_attach_items, NULL); |
6402 | 0 | break; |
6403 | 0 | case AMQP_1_0_AMQP_FLOW: |
6404 | 0 | dissect_amqp_1_0_list(tvb, |
6405 | 0 | pinfo, |
6406 | 0 | offset, |
6407 | 0 | args_tree, |
6408 | 0 | hf_amqp_method_arguments, |
6409 | 0 | 11, amqp_1_0_amqp_flow_items, NULL); |
6410 | 0 | break; |
6411 | 0 | case AMQP_1_0_AMQP_TRANSFER: |
6412 | 0 | arg_length = dissect_amqp_1_0_list(tvb, |
6413 | 0 | pinfo, |
6414 | 0 | offset, |
6415 | 0 | args_tree, |
6416 | 0 | hf_amqp_method_arguments, |
6417 | 0 | 11, amqp_1_0_amqp_transfer_items, NULL); |
6418 | | |
6419 | | /* now decode message header, annotations, properties and data */ |
6420 | 0 | while ((arg_length > 0) && (tvb_reported_length_remaining(tvb, offset + arg_length) > 0)) { |
6421 | 0 | offset += arg_length; |
6422 | 0 | get_amqp_1_0_type_value_formatter(tvb, |
6423 | 0 | pinfo, |
6424 | 0 | offset, |
6425 | 0 | hf_amqp_1_0_list, /* dynamic item */ |
6426 | 0 | NULL, |
6427 | 0 | &arg_length, |
6428 | 0 | args_tree); |
6429 | 0 | } |
6430 | 0 | break; |
6431 | 0 | case AMQP_1_0_AMQP_DISPOSITION: |
6432 | 0 | dissect_amqp_1_0_list(tvb, |
6433 | 0 | pinfo, |
6434 | 0 | offset, |
6435 | 0 | args_tree, |
6436 | 0 | hf_amqp_method_arguments, |
6437 | 0 | 6, amqp_1_0_amqp_disposition_items, NULL); |
6438 | 0 | break; |
6439 | 0 | case AMQP_1_0_AMQP_DETACH: |
6440 | 0 | dissect_amqp_1_0_list(tvb, |
6441 | 0 | pinfo, |
6442 | 0 | offset, |
6443 | 0 | args_tree, |
6444 | 0 | hf_amqp_method_arguments, |
6445 | 0 | 3, amqp_1_0_amqp_detach_items, NULL); |
6446 | 0 | break; |
6447 | 0 | case AMQP_1_0_AMQP_END: |
6448 | 0 | dissect_amqp_1_0_list(tvb, |
6449 | 0 | pinfo, |
6450 | 0 | offset, |
6451 | 0 | args_tree, |
6452 | 0 | hf_amqp_method_arguments, |
6453 | 0 | 1, amqp_1_0_amqp_end_items, NULL); |
6454 | 0 | break; |
6455 | 0 | case AMQP_1_0_AMQP_CLOSE: |
6456 | 0 | dissect_amqp_1_0_list(tvb, |
6457 | 0 | pinfo, |
6458 | 0 | offset, |
6459 | 0 | args_tree, |
6460 | 0 | hf_amqp_method_arguments, |
6461 | 0 | 1, amqp_1_0_amqp_close_items, NULL); |
6462 | 0 | break; |
6463 | 1 | default: |
6464 | 1 | expert_add_info_format(pinfo, |
6465 | 1 | ti, |
6466 | 1 | &ei_amqp_unknown_amqp_command, |
6467 | 1 | "Unknown AMQP performative %d", |
6468 | 1 | method); |
6469 | 1 | } |
6470 | 1 | } |
6471 | | |
6472 | | /* decodes AMQP 1.0 SASL methods (mechanisms offer, challenge, response,..) |
6473 | | * arguments: see dissect_amqp_1_0_AMQP_frame |
6474 | | */ |
6475 | | static void |
6476 | | dissect_amqp_1_0_SASL_frame(tvbuff_t *tvb, |
6477 | | proto_item *amqp_item, |
6478 | | packet_info *pinfo) |
6479 | 1 | { |
6480 | 1 | proto_item *args_tree; |
6481 | 1 | uint32_t method; |
6482 | 1 | int offset = 0; |
6483 | 1 | proto_item *ti; |
6484 | | |
6485 | 1 | args_tree = proto_item_add_subtree(amqp_item, ett_args); |
6486 | 1 | ti = proto_tree_add_item_ret_uint(args_tree, hf_amqp_1_0_sasl_method, tvb, offset+2, 1, ENC_BIG_ENDIAN, &method); |
6487 | | |
6488 | 1 | col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", val_to_str_const(method, amqp_1_0_SASL_methods, "<invalid SASL method>")); |
6489 | 1 | col_set_fence(pinfo->cinfo, COL_INFO); |
6490 | | |
6491 | 1 | offset += 3; /* descriptor-constructor & fixed_one length & SASL method code */ |
6492 | 1 | switch(method) { |
6493 | 0 | case AMQP_1_0_SASL_MECHANISMS: |
6494 | 0 | dissect_amqp_1_0_list(tvb, |
6495 | 0 | pinfo, |
6496 | 0 | offset, |
6497 | 0 | args_tree, |
6498 | 0 | hf_amqp_method_arguments, |
6499 | 0 | 1, amqp_1_0_sasl_mechanisms_items, NULL); |
6500 | 0 | break; |
6501 | 0 | case AMQP_1_0_SASL_INIT: |
6502 | 0 | dissect_amqp_1_0_list(tvb, |
6503 | 0 | pinfo, |
6504 | 0 | offset, |
6505 | 0 | args_tree, |
6506 | 0 | hf_amqp_method_arguments, |
6507 | 0 | 3, amqp_1_0_sasl_init_items, NULL); |
6508 | 0 | break; |
6509 | 0 | case AMQP_1_0_SASL_CHALLENGE: |
6510 | 0 | dissect_amqp_1_0_list(tvb, |
6511 | 0 | pinfo, |
6512 | 0 | offset, |
6513 | 0 | args_tree, |
6514 | 0 | hf_amqp_method_arguments, |
6515 | 0 | 1, amqp_1_0_sasl_challenge_items, NULL); |
6516 | 0 | break; |
6517 | 0 | case AMQP_1_0_SASL_RESPONSE: |
6518 | 0 | dissect_amqp_1_0_list(tvb, |
6519 | 0 | pinfo, |
6520 | 0 | offset, |
6521 | 0 | args_tree, |
6522 | 0 | hf_amqp_method_arguments, |
6523 | 0 | 1, amqp_1_0_sasl_response_items, NULL); |
6524 | 0 | break; |
6525 | 0 | case AMQP_1_0_SASL_OUTCOME: |
6526 | 0 | dissect_amqp_1_0_list(tvb, |
6527 | 0 | pinfo, |
6528 | 0 | offset, |
6529 | 0 | args_tree, |
6530 | 0 | hf_amqp_method_arguments, |
6531 | 0 | 2, amqp_1_0_sasl_outcome_items, NULL); |
6532 | 0 | break; |
6533 | 1 | default: |
6534 | 1 | expert_add_info_format(pinfo, |
6535 | 1 | ti, |
6536 | 1 | &ei_amqp_unknown_sasl_command, |
6537 | 1 | "Unknown SASL command %d", |
6538 | 1 | method); |
6539 | 1 | } |
6540 | 1 | } |
6541 | | |
6542 | | static int |
6543 | | dissect_amqp_1_0_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
6544 | 16 | { |
6545 | 16 | proto_item *ti, *size_item; |
6546 | 16 | proto_tree *amqp_tree; |
6547 | 16 | uint8_t frame_type; |
6548 | 16 | uint32_t length; |
6549 | 16 | unsigned offset; |
6550 | 16 | tvbuff_t *next_tvb; |
6551 | | |
6552 | 16 | col_clear(pinfo->cinfo, COL_INFO); |
6553 | | |
6554 | | /* Heuristic - protocol initialisation frame starts with 'AMQP' followed by 0x0 */ |
6555 | 16 | if (tvb_memeql(tvb, 0, "AMQP", 4) == 0) { |
6556 | 0 | uint8_t proto_major; |
6557 | 0 | uint8_t proto_minor; |
6558 | 0 | uint8_t proto_revision; |
6559 | |
|
6560 | 0 | proto_major = tvb_get_uint8(tvb, 5); |
6561 | 0 | proto_minor = tvb_get_uint8(tvb, 6); |
6562 | 0 | proto_revision = tvb_get_uint8(tvb, 7); |
6563 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "Protocol-Header%s %d-%d-%d ", |
6564 | 0 | (tvb_get_uint8(tvb, 4)==0x2) ? "(TLS)" : "", /* frame type = 2 => TLS */ |
6565 | 0 | proto_major, |
6566 | 0 | proto_minor, |
6567 | 0 | proto_revision); |
6568 | 0 | col_set_fence(pinfo->cinfo, COL_INFO); |
6569 | |
|
6570 | 0 | if (tree) { |
6571 | 0 | ti = proto_tree_add_item(tree, proto_amqp, tvb, 0, -1, ENC_NA); |
6572 | 0 | amqp_tree = proto_item_add_subtree(ti, ett_amqp_init); |
6573 | 0 | proto_tree_add_item(amqp_tree, hf_amqp_init_protocol, tvb, 0, 4, ENC_ASCII); |
6574 | 0 | proto_tree_add_item(amqp_tree, hf_amqp_init_id, tvb, 4, 1, ENC_BIG_ENDIAN); |
6575 | 0 | proto_tree_add_item(amqp_tree, hf_amqp_init_version_major, tvb, 5, 1, ENC_BIG_ENDIAN); |
6576 | 0 | proto_tree_add_item(amqp_tree, hf_amqp_init_version_minor, tvb, 6, 1, ENC_BIG_ENDIAN); |
6577 | 0 | proto_tree_add_item(amqp_tree, hf_amqp_init_version_revision, tvb, 7, 1, ENC_BIG_ENDIAN); |
6578 | 0 | } |
6579 | 0 | return 8; |
6580 | 0 | } |
6581 | | |
6582 | | /* Protocol frame */ |
6583 | | |
6584 | | /* frame header */ |
6585 | 16 | ti = proto_tree_add_item(tree, proto_amqp, tvb, 0, -1, ENC_NA); |
6586 | 16 | amqp_tree = proto_item_add_subtree(ti, ett_amqp); |
6587 | 16 | size_item = proto_tree_add_item_ret_uint(amqp_tree, hf_amqp_1_0_size, tvb, 0, 4, ENC_BIG_ENDIAN, &length); |
6588 | 16 | proto_tree_add_item(amqp_tree, hf_amqp_1_0_doff, tvb, 4, 1, ENC_BIG_ENDIAN); |
6589 | 16 | proto_tree_add_item(amqp_tree, hf_amqp_1_0_type, tvb, 5, 1, ENC_BIG_ENDIAN); |
6590 | 16 | proto_tree_add_item(amqp_tree, hf_amqp_channel, tvb, 6, 2, ENC_BIG_ENDIAN); |
6591 | | |
6592 | 16 | offset = 4*tvb_get_uint8(tvb,4); /* i.e. 4*DOFF */ |
6593 | 16 | frame_type = tvb_get_uint8(tvb, 5); |
6594 | 16 | if (length < offset) { |
6595 | 6 | expert_add_info(pinfo, size_item, &ei_amqp_bad_length); |
6596 | 6 | return 8; |
6597 | 6 | } |
6598 | | |
6599 | 10 | if (length > (uint32_t)tvb_reported_length_remaining(tvb, offset)) |
6600 | 9 | { |
6601 | 9 | next_tvb = tvb_new_subset_remaining(tvb, offset); |
6602 | 9 | } |
6603 | 1 | else |
6604 | 1 | { |
6605 | 1 | next_tvb = tvb_new_subset_length(tvb, offset, length); |
6606 | 1 | } |
6607 | | |
6608 | 10 | switch(frame_type) { |
6609 | 1 | case AMQP_1_0_AMQP_FRAME: |
6610 | 1 | dissect_amqp_1_0_AMQP_frame(next_tvb, amqp_tree, pinfo); |
6611 | 1 | break; |
6612 | 1 | case AMQP_1_0_SASL_FRAME: |
6613 | 1 | dissect_amqp_1_0_SASL_frame(next_tvb, amqp_tree, pinfo); |
6614 | 1 | break; |
6615 | 0 | case AMQP_1_0_TLS_FRAME: |
6616 | | /* should not occur, this is handled in '(tvb_memeql(tvb, 0, (const uint8_t*)"AMQP", 4) == 0)' test above */ |
6617 | 0 | break; |
6618 | 3 | default: |
6619 | 3 | expert_add_info_format(pinfo, amqp_tree, &ei_amqp_unknown_frame_type, "Unknown frame type %d", frame_type); |
6620 | 10 | } |
6621 | | |
6622 | 5 | return tvb_reported_length(tvb); |
6623 | 10 | } |
6624 | | |
6625 | | static int |
6626 | | dissect_amqp_0_10_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
6627 | 104 | { |
6628 | 104 | proto_item *ti; |
6629 | 104 | proto_item *amqp_tree = NULL; |
6630 | 104 | uint8_t frame_type; |
6631 | 104 | uint16_t length; |
6632 | 104 | uint32_t struct_length; |
6633 | 104 | unsigned offset; |
6634 | 104 | tvbuff_t *next_tvb; |
6635 | | |
6636 | | /* Heuristic - protocol initialisation frame starts with 'AMQP' */ |
6637 | 104 | if (tvb_memeql(tvb, 0, (const uint8_t*)"AMQP", 4) == 0) { |
6638 | 0 | uint8_t proto_major; |
6639 | 0 | uint8_t proto_minor; |
6640 | |
|
6641 | 0 | proto_major = tvb_get_uint8(tvb, 6); |
6642 | 0 | proto_minor = tvb_get_uint8(tvb, 7); |
6643 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "Protocol-Header %d-%d ", |
6644 | 0 | proto_major, |
6645 | 0 | proto_minor); |
6646 | 0 | col_set_fence(pinfo->cinfo, COL_INFO); |
6647 | |
|
6648 | 0 | if (tree) { |
6649 | 0 | ti = proto_tree_add_item(tree, proto_amqp, tvb, 0, -1, ENC_NA); |
6650 | 0 | amqp_tree = proto_item_add_subtree(ti, ett_amqp_init); |
6651 | 0 | proto_tree_add_item(amqp_tree, hf_amqp_init_protocol, tvb, 0, 4, ENC_ASCII); |
6652 | 0 | proto_tree_add_item(amqp_tree, hf_amqp_init_id_major, tvb, 4, 1, ENC_BIG_ENDIAN); |
6653 | 0 | proto_tree_add_item(amqp_tree, hf_amqp_init_id_minor, tvb, 5, 1, ENC_BIG_ENDIAN); |
6654 | 0 | proto_tree_add_item(amqp_tree, hf_amqp_init_version_major, tvb, 6, 1, ENC_BIG_ENDIAN); |
6655 | 0 | proto_tree_add_item(amqp_tree, hf_amqp_init_version_minor, tvb, 7, 1, ENC_BIG_ENDIAN); |
6656 | 0 | } |
6657 | 0 | return 8; |
6658 | 0 | } |
6659 | | |
6660 | | /* Protocol frame */ |
6661 | 104 | if (tree) { |
6662 | 104 | ti = proto_tree_add_item(tree, proto_amqp, tvb, 0, -1, ENC_NA); |
6663 | 104 | amqp_tree = proto_item_add_subtree(ti, ett_amqp); |
6664 | 104 | proto_tree_add_item(amqp_tree, hf_amqp_0_10_format, tvb, 0, 1, ENC_BIG_ENDIAN); |
6665 | 104 | proto_tree_add_item(amqp_tree, hf_amqp_0_10_position, tvb, 0, 1, ENC_BIG_ENDIAN); |
6666 | 104 | proto_tree_add_item(amqp_tree, hf_amqp_0_10_type, tvb, 1, 1, ENC_BIG_ENDIAN); |
6667 | 104 | proto_tree_add_item(amqp_tree, hf_amqp_0_10_size, tvb, 2, 2, ENC_BIG_ENDIAN); |
6668 | 104 | proto_tree_add_item(amqp_tree, hf_amqp_0_10_track, tvb, 5, 1, ENC_BIG_ENDIAN); |
6669 | 104 | proto_tree_add_item(amqp_tree, hf_amqp_channel, tvb, 6, 2, ENC_BIG_ENDIAN); |
6670 | 104 | proto_tree_add_item(amqp_tree, hf_amqp_reserved, tvb, 8, 4, ENC_BIG_ENDIAN); |
6671 | 104 | } |
6672 | | |
6673 | 104 | frame_type = tvb_get_uint8(tvb, 1); |
6674 | 104 | length = tvb_get_ntohs(tvb, 2); |
6675 | 104 | offset = 12; |
6676 | 104 | next_tvb = tvb_new_subset_remaining(tvb, offset); |
6677 | | |
6678 | 104 | switch(frame_type) { |
6679 | 44 | case AMQP_0_10_FRAME_COMMAND: |
6680 | | /* Fall through */ |
6681 | 82 | case AMQP_0_10_FRAME_CONTROL: |
6682 | 82 | proto_tree_add_item(amqp_tree, hf_amqp_0_10_class, tvb, offset+0, 1, ENC_BIG_ENDIAN); |
6683 | 82 | switch(tvb_get_uint8(tvb, offset + 0)) { |
6684 | 71 | case AMQP_0_10_CLASS_CONNECTION: |
6685 | 71 | dissect_amqp_0_10_connection(next_tvb, pinfo, amqp_tree); |
6686 | 71 | break; |
6687 | 1 | case AMQP_0_10_CLASS_SESSION: |
6688 | 1 | dissect_amqp_0_10_session(next_tvb, pinfo, amqp_tree); |
6689 | 1 | break; |
6690 | 0 | case AMQP_0_10_CLASS_EXECUTION: |
6691 | 0 | dissect_amqp_0_10_execution(next_tvb, pinfo, amqp_tree); |
6692 | 0 | break; |
6693 | 2 | case AMQP_0_10_CLASS_MESSAGE: |
6694 | 2 | dissect_amqp_0_10_message(next_tvb, pinfo, amqp_tree); |
6695 | 2 | break; |
6696 | 0 | case AMQP_0_10_CLASS_TX: |
6697 | 0 | dissect_amqp_0_10_tx(next_tvb, pinfo, amqp_tree); |
6698 | 0 | break; |
6699 | 0 | case AMQP_0_10_CLASS_DTX: |
6700 | 0 | dissect_amqp_0_10_dtx(next_tvb, pinfo, amqp_tree); |
6701 | 0 | break; |
6702 | 0 | case AMQP_0_10_CLASS_EXCHANGE: |
6703 | 0 | dissect_amqp_0_10_exchange(next_tvb, pinfo, amqp_tree); |
6704 | 0 | break; |
6705 | 1 | case AMQP_0_10_CLASS_QUEUE: |
6706 | 1 | dissect_amqp_0_10_queue(next_tvb, pinfo, amqp_tree); |
6707 | 1 | break; |
6708 | 0 | case AMQP_0_10_CLASS_FILE: |
6709 | 0 | dissect_amqp_0_10_file(next_tvb, pinfo, amqp_tree); |
6710 | 0 | break; |
6711 | 0 | case AMQP_0_10_CLASS_STREAM: |
6712 | 0 | dissect_amqp_0_10_stream(next_tvb, pinfo, amqp_tree); |
6713 | 0 | break; |
6714 | 7 | default: |
6715 | 7 | expert_add_info_format(pinfo, amqp_tree, &ei_amqp_unknown_command_class, "Unknown command/control class %d", tvb_get_uint8(tvb, offset + 0)); |
6716 | 82 | } |
6717 | 22 | break; |
6718 | | |
6719 | 22 | case AMQP_0_10_FRAME_HEADER: |
6720 | 1 | col_append_str(pinfo->cinfo, COL_INFO, "header "); |
6721 | 1 | col_set_fence(pinfo->cinfo, COL_INFO); |
6722 | 2 | while (tvb_reported_length_remaining(tvb, offset) > 0) |
6723 | 1 | { |
6724 | 1 | struct_length = amqp_0_10_get_32bit_size_new(amqp_tree, pinfo, tvb, hf_amqp_0_10_struct32_size, offset); |
6725 | 1 | offset += 4; |
6726 | | |
6727 | 1 | ti = proto_tree_add_item(amqp_tree, |
6728 | 1 | hf_amqp_0_10_struct32, |
6729 | 1 | tvb, offset, 2, ENC_BIG_ENDIAN); |
6730 | 1 | proto_item_set_len(ti, struct_length); |
6731 | 1 | if (struct_length > (uint32_t)tvb_reported_length_remaining(tvb, offset)) |
6732 | 0 | { |
6733 | 0 | next_tvb = tvb_new_subset_remaining(tvb, offset); |
6734 | 0 | } |
6735 | 1 | else |
6736 | 1 | { |
6737 | 1 | next_tvb = tvb_new_subset_length(tvb, offset, struct_length); |
6738 | 1 | } |
6739 | 1 | dissect_amqp_0_10_struct32(next_tvb, pinfo, ti); |
6740 | 1 | offset += struct_length; |
6741 | 1 | } |
6742 | 1 | break; |
6743 | | |
6744 | 1 | case AMQP_0_10_FRAME_BODY: |
6745 | 1 | col_append_str(pinfo->cinfo, COL_INFO, "message-body "); |
6746 | 1 | col_set_fence(pinfo->cinfo, COL_INFO); |
6747 | 1 | proto_tree_add_item(amqp_tree, |
6748 | 1 | hf_amqp_0_10_message_body, |
6749 | 1 | tvb, offset, length - 12, ENC_NA); |
6750 | 1 | break; |
6751 | | |
6752 | 19 | default: |
6753 | 19 | expert_add_info_format(pinfo, amqp_tree, &ei_amqp_unknown_frame_type, "Unknown frame type %d", frame_type); |
6754 | 104 | } |
6755 | | |
6756 | 42 | return tvb_reported_length(tvb); |
6757 | 104 | } |
6758 | | |
6759 | | |
6760 | | /* Dissection routine for method Connection.Start */ |
6761 | | |
6762 | | static int |
6763 | | dissect_amqp_0_9_method_connection_start(tvbuff_t *tvb, packet_info *pinfo, |
6764 | | int offset, proto_tree *args_tree) |
6765 | 0 | { |
6766 | 0 | proto_item *ti; |
6767 | | |
6768 | | /* version-major (octet) */ |
6769 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_connection_start_version_major, |
6770 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
6771 | 0 | offset += 1; |
6772 | | |
6773 | | /* version-minor (octet) */ |
6774 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_connection_start_version_minor, |
6775 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
6776 | 0 | offset += 1; |
6777 | | |
6778 | | /* server-properties (table) */ |
6779 | 0 | ti = proto_tree_add_item( |
6780 | 0 | args_tree, hf_amqp_method_connection_start_server_properties, |
6781 | 0 | tvb, offset + 4, tvb_get_ntohl(tvb, offset), ENC_NA); |
6782 | 0 | dissect_amqp_0_9_field_table(tvb, pinfo, offset + 4, tvb_get_ntohl(tvb, offset), ti); |
6783 | 0 | offset += 4 + tvb_get_ntohl(tvb, offset); |
6784 | | |
6785 | | /* mechanisms (longstr) */ |
6786 | 0 | proto_tree_add_item(args_tree, hf_amqp_0_9_method_connection_start_mechanisms, |
6787 | 0 | tvb, offset + 4, tvb_get_ntohl(tvb, offset), ENC_NA); |
6788 | 0 | offset += 4 + tvb_get_ntohl(tvb, offset); |
6789 | | |
6790 | | /* locales (longstr) */ |
6791 | 0 | proto_tree_add_item(args_tree, hf_amqp_0_9_method_connection_start_locales, |
6792 | 0 | tvb, offset + 4, tvb_get_ntohl(tvb, offset), ENC_NA); |
6793 | 0 | offset += 4 + tvb_get_ntohl(tvb, offset); |
6794 | |
|
6795 | 0 | return offset; |
6796 | 0 | } |
6797 | | |
6798 | | /* Dissection routine for method Connection.Start-Ok */ |
6799 | | |
6800 | | static int |
6801 | | dissect_amqp_0_9_method_connection_start_ok(tvbuff_t *tvb, packet_info *pinfo, |
6802 | | int offset, proto_tree *args_tree) |
6803 | 0 | { |
6804 | 0 | proto_item *ti; |
6805 | | |
6806 | | /* client-properties (table) */ |
6807 | 0 | ti = proto_tree_add_item( |
6808 | 0 | args_tree, hf_amqp_method_connection_start_ok_client_properties, |
6809 | 0 | tvb, offset + 4, tvb_get_ntohl(tvb, offset), ENC_NA); |
6810 | 0 | dissect_amqp_0_9_field_table(tvb, pinfo, offset + 4, tvb_get_ntohl(tvb, offset), ti); |
6811 | 0 | offset += 4 + tvb_get_ntohl(tvb, offset); |
6812 | | |
6813 | | /* mechanism (shortstr) */ |
6814 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_connection_start_ok_mechanism, |
6815 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
6816 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
6817 | | |
6818 | | /* response (longstr) */ |
6819 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_connection_start_ok_response, |
6820 | 0 | tvb, offset, 4, ENC_BIG_ENDIAN); |
6821 | 0 | offset += (4 + tvb_get_ntohl(tvb, offset)); |
6822 | | |
6823 | | /* locale (shortstr) */ |
6824 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_connection_start_ok_locale, |
6825 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
6826 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
6827 | |
|
6828 | 0 | return offset; |
6829 | 0 | } |
6830 | | |
6831 | | /* Dissection routine for method Connection.Secure */ |
6832 | | |
6833 | | static int |
6834 | | dissect_amqp_0_9_method_connection_secure(tvbuff_t *tvb, |
6835 | | int offset, proto_tree *args_tree) |
6836 | 0 | { |
6837 | | /* challenge (longstr) */ |
6838 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_connection_secure_challenge, |
6839 | 0 | tvb, offset, 4, ENC_BIG_ENDIAN); |
6840 | 0 | offset += (4 + tvb_get_ntohl(tvb, offset)); |
6841 | |
|
6842 | 0 | return offset; |
6843 | 0 | } |
6844 | | |
6845 | | /* Dissection routine for method Connection.Secure-Ok */ |
6846 | | |
6847 | | static int |
6848 | | dissect_amqp_0_9_method_connection_secure_ok(tvbuff_t *tvb, |
6849 | | int offset, proto_tree *args_tree) |
6850 | 0 | { |
6851 | | /* response (longstr) */ |
6852 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_connection_secure_ok_response, |
6853 | 0 | tvb, offset, 4, ENC_BIG_ENDIAN); |
6854 | 0 | offset += (4 + tvb_get_ntohl(tvb, offset)); |
6855 | |
|
6856 | 0 | return offset; |
6857 | 0 | } |
6858 | | |
6859 | | /* Dissection routine for method Connection.Tune */ |
6860 | | |
6861 | | static int |
6862 | | dissect_amqp_0_9_method_connection_tune(tvbuff_t *tvb, |
6863 | | int offset, proto_tree *args_tree) |
6864 | 0 | { |
6865 | | /* channel-max (short) */ |
6866 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_connection_tune_channel_max, |
6867 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
6868 | 0 | offset += 2; |
6869 | | |
6870 | | /* frame-max (long) */ |
6871 | 0 | proto_tree_add_item(args_tree, hf_amqp_0_9_method_connection_tune_frame_max, |
6872 | 0 | tvb, offset, 4, ENC_BIG_ENDIAN); |
6873 | 0 | offset += 4; |
6874 | | |
6875 | | /* heartbeat (short) */ |
6876 | 0 | proto_tree_add_item(args_tree, hf_amqp_0_9_method_connection_tune_heartbeat, |
6877 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
6878 | 0 | offset += 2; |
6879 | |
|
6880 | 0 | return offset; |
6881 | 0 | } |
6882 | | |
6883 | | /* Dissection routine for method Connection.Tune-Ok */ |
6884 | | |
6885 | | static int |
6886 | | dissect_amqp_0_9_method_connection_tune_ok(tvbuff_t *tvb, |
6887 | | int offset, proto_tree *args_tree) |
6888 | 0 | { |
6889 | | /* channel-max (short) */ |
6890 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_connection_tune_ok_channel_max, |
6891 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
6892 | 0 | offset += 2; |
6893 | | |
6894 | | /* frame-max (long) */ |
6895 | 0 | proto_tree_add_item(args_tree, hf_amqp_0_9_method_connection_tune_ok_frame_max, |
6896 | 0 | tvb, offset, 4, ENC_BIG_ENDIAN); |
6897 | 0 | offset += 4; |
6898 | | |
6899 | | /* heartbeat (short) */ |
6900 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_connection_tune_ok_heartbeat, |
6901 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
6902 | 0 | offset += 2; |
6903 | |
|
6904 | 0 | return offset; |
6905 | 0 | } |
6906 | | |
6907 | | /* Dissection routine for method Connection.Open */ |
6908 | | |
6909 | | static int |
6910 | | dissect_amqp_0_9_method_connection_open(tvbuff_t *tvb, packet_info *pinfo, |
6911 | | int offset, proto_tree *args_tree) |
6912 | 0 | { |
6913 | 0 | const uint8_t* vhost; |
6914 | | /* virtual-host (shortstr) */ |
6915 | 0 | proto_tree_add_item_ret_string(args_tree, hf_amqp_method_connection_open_virtual_host, |
6916 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN, pinfo->pool, &vhost); |
6917 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "vhost=%s ", vhost); |
6918 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
6919 | | |
6920 | | /* capabilities (shortstr) */ |
6921 | 0 | proto_tree_add_item(args_tree, hf_amqp_0_9_method_connection_open_capabilities, |
6922 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
6923 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
6924 | | |
6925 | | /* insist (bit) */ |
6926 | 0 | proto_tree_add_item(args_tree, hf_amqp_0_9_method_connection_open_insist, |
6927 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
6928 | |
|
6929 | 0 | return offset; |
6930 | 0 | } |
6931 | | |
6932 | | /* Dissection routine for method Connection.Open-Ok */ |
6933 | | |
6934 | | static int |
6935 | | dissect_amqp_0_9_method_connection_open_ok(tvbuff_t *tvb, |
6936 | | int offset, proto_tree *args_tree) |
6937 | 0 | { |
6938 | | /* known-hosts (shortstr) */ |
6939 | 0 | proto_tree_add_item(args_tree, hf_amqp_0_9_method_connection_open_ok_known_hosts, |
6940 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
6941 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
6942 | |
|
6943 | 0 | return offset; |
6944 | 0 | } |
6945 | | |
6946 | | /* Dissection routine for method Connection.Redirect */ |
6947 | | |
6948 | | static int |
6949 | | dissect_amqp_0_9_method_connection_redirect(tvbuff_t *tvb, |
6950 | | int offset, proto_tree *args_tree) |
6951 | 0 | { |
6952 | | /* host (shortstr) */ |
6953 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_connection_redirect_host, |
6954 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN); |
6955 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
6956 | | |
6957 | | /* known-hosts (shortstr) */ |
6958 | 0 | proto_tree_add_item(args_tree, hf_amqp_0_9_method_connection_redirect_known_hosts, |
6959 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
6960 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
6961 | |
|
6962 | 0 | return offset; |
6963 | 0 | } |
6964 | | |
6965 | | /* Dissection routine for method Connection.Close */ |
6966 | | |
6967 | | static int |
6968 | | dissect_amqp_0_9_method_connection_close(tvbuff_t *tvb, packet_info *pinfo, |
6969 | | int offset, proto_tree *args_tree) |
6970 | 0 | { |
6971 | 0 | proto_item *tf_code; |
6972 | 0 | const uint8_t* reply; |
6973 | | |
6974 | | /* reply-code (short) */ |
6975 | 0 | tf_code = proto_tree_add_item(args_tree, hf_amqp_0_9_method_connection_close_reply_code, |
6976 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
6977 | 0 | if (tvb_get_ntohs(tvb, offset) > 200) |
6978 | 0 | expert_add_info(pinfo, tf_code, &ei_amqp_connection_error); |
6979 | 0 | offset += 2; |
6980 | | |
6981 | | /* reply-text (shortstr) */ |
6982 | 0 | proto_tree_add_item_ret_string(args_tree, hf_amqp_method_connection_close_reply_text, |
6983 | 0 | tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN, pinfo->pool, &reply); |
6984 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "reply=%s ", reply); |
6985 | 0 | offset += (1 + tvb_get_uint8(tvb, offset)); |
6986 | | |
6987 | | /* class-id (short) */ |
6988 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_connection_close_class_id, |
6989 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
6990 | 0 | offset += 2; |
6991 | | |
6992 | | /* method-id (short) */ |
6993 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_connection_close_method_id, |
6994 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
6995 | 0 | offset += 2; |
6996 | |
|
6997 | 0 | return offset; |
6998 | 0 | } |
6999 | | |
7000 | | /* Dissection routine for method Connection.Close-Ok */ |
7001 | | |
7002 | | static int |
7003 | | dissect_amqp_0_9_method_connection_close_ok(tvbuff_t *tvb _U_, |
7004 | | int offset, proto_tree *args_tree _U_) |
7005 | 0 | { |
7006 | 0 | return offset; |
7007 | 0 | } |
7008 | | |
7009 | | /* Dissection routine for method Connection.Blocked */ |
7010 | | |
7011 | | static int |
7012 | | dissect_amqp_0_9_method_connection_blocked(tvbuff_t *tvb, |
7013 | | int offset, proto_tree *args_tree) |
7014 | 0 | { |
7015 | | /* reason (shortstr) */ |
7016 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_connection_blocked_reason, |
7017 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
7018 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
7019 | |
|
7020 | 0 | return offset; |
7021 | 0 | } |
7022 | | |
7023 | | /* Dissection routine for method Connection.Unblocked */ |
7024 | | |
7025 | | static int |
7026 | | dissect_amqp_0_9_method_connection_unblocked(tvbuff_t *tvb _U_, |
7027 | | int offset, proto_tree *args_tree _U_) |
7028 | 0 | { |
7029 | 0 | return offset; |
7030 | 0 | } |
7031 | | |
7032 | | /* Dissection routine for method Channel.Open */ |
7033 | | |
7034 | | static int |
7035 | | dissect_amqp_0_9_method_channel_open(tvbuff_t *tvb, |
7036 | | int offset, proto_tree *args_tree) |
7037 | 0 | { |
7038 | | /* out-of-band (shortstr) */ |
7039 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_channel_open_out_of_band, |
7040 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
7041 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
7042 | |
|
7043 | 0 | return offset; |
7044 | 0 | } |
7045 | | |
7046 | | /* Dissection routine for method Channel.Open-Ok */ |
7047 | | |
7048 | | static int |
7049 | | dissect_amqp_0_9_method_channel_open_ok(tvbuff_t *tvb, |
7050 | | int offset, proto_tree *args_tree) |
7051 | 0 | { |
7052 | | /* channel-id (longstr) */ |
7053 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_channel_open_ok_channel_id, |
7054 | 0 | tvb, offset + 4, tvb_get_ntohl(tvb, offset), ENC_NA); |
7055 | 0 | offset += 4 + tvb_get_ntohl(tvb, offset); |
7056 | |
|
7057 | 0 | return offset; |
7058 | 0 | } |
7059 | | |
7060 | | /* Dissection routine for method Channel.Flow */ |
7061 | | |
7062 | | static int |
7063 | | dissect_amqp_0_9_method_channel_flow(tvbuff_t *tvb, |
7064 | | int offset, proto_tree *args_tree) |
7065 | 0 | { |
7066 | | /* active (bit) */ |
7067 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_channel_flow_active, |
7068 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
7069 | |
|
7070 | 0 | return offset; |
7071 | 0 | } |
7072 | | |
7073 | | /* Dissection routine for method Channel.Flow-Ok */ |
7074 | | |
7075 | | static int |
7076 | | dissect_amqp_0_9_method_channel_flow_ok(tvbuff_t *tvb, |
7077 | | int offset, proto_tree *args_tree) |
7078 | 0 | { |
7079 | | /* active (bit) */ |
7080 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_channel_flow_ok_active, |
7081 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
7082 | |
|
7083 | 0 | return offset; |
7084 | 0 | } |
7085 | | |
7086 | | /* Dissection routine for method Channel.Close */ |
7087 | | |
7088 | | static int |
7089 | | dissect_amqp_0_9_method_channel_close(uint16_t channel_num, tvbuff_t *tvb, |
7090 | | packet_info *pinfo, int offset, proto_tree *args_tree) |
7091 | 0 | { |
7092 | 0 | proto_item *tf_code; |
7093 | 0 | const uint8_t* reply; |
7094 | | |
7095 | | /* reply-code (short) */ |
7096 | 0 | tf_code = proto_tree_add_item(args_tree, hf_amqp_method_channel_close_reply_code, |
7097 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
7098 | 0 | if (tvb_get_ntohs(tvb, offset) > 200) |
7099 | 0 | expert_add_info(pinfo, tf_code, &ei_amqp_channel_error); |
7100 | 0 | offset += 2; |
7101 | | |
7102 | | /* reply-text (shortstr) */ |
7103 | 0 | proto_tree_add_item_ret_string(args_tree, hf_amqp_method_channel_close_reply_text, |
7104 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII|ENC_NA, pinfo->pool, &reply); |
7105 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "reply=%s ", reply); |
7106 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
7107 | | |
7108 | | /* class-id (short) */ |
7109 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_channel_close_class_id, |
7110 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
7111 | 0 | offset += 2; |
7112 | | |
7113 | | /* method-id (short) */ |
7114 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_channel_close_method_id, |
7115 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
7116 | 0 | offset += 2; |
7117 | | |
7118 | | /* delete channel */ |
7119 | 0 | if(!PINFO_FD_VISITED(pinfo)) |
7120 | 0 | { |
7121 | 0 | conversation_t *conv; |
7122 | 0 | amqp_conv *conn; |
7123 | |
|
7124 | 0 | conv = find_or_create_conversation(pinfo); |
7125 | 0 | conn = (amqp_conv *)conversation_get_proto_data(conv, proto_amqp); |
7126 | 0 | if (conn) |
7127 | 0 | wmem_map_remove(conn->channels, GUINT_TO_POINTER((uint32_t)channel_num)); |
7128 | 0 | } |
7129 | |
|
7130 | 0 | return offset; |
7131 | 0 | } |
7132 | | |
7133 | | /* Dissection routine for method Channel.Close-Ok */ |
7134 | | |
7135 | | static int |
7136 | | dissect_amqp_0_9_method_channel_close_ok(tvbuff_t *tvb _U_, |
7137 | | int offset, proto_tree *args_tree _U_) |
7138 | 0 | { |
7139 | 0 | return offset; |
7140 | 0 | } |
7141 | | |
7142 | | /* Dissection routine for method Channel.Resume */ |
7143 | | |
7144 | | static int |
7145 | | dissect_amqp_0_9_method_channel_resume(tvbuff_t *tvb, |
7146 | | int offset, proto_tree *args_tree) |
7147 | 0 | { |
7148 | | /* channel-id (longstr) */ |
7149 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_channel_resume_channel_id, |
7150 | 0 | tvb, offset + 4, tvb_get_ntohl(tvb, offset), ENC_NA); |
7151 | 0 | offset += 4 + tvb_get_ntohl(tvb, offset); |
7152 | |
|
7153 | 0 | return offset; |
7154 | 0 | } |
7155 | | |
7156 | | /* Dissection routine for method Channel.Ping */ |
7157 | | |
7158 | | static int |
7159 | | dissect_amqp_0_9_method_channel_ping(tvbuff_t *tvb _U_, |
7160 | | int offset, proto_tree *args_tree _U_) |
7161 | 0 | { |
7162 | 0 | return offset; |
7163 | 0 | } |
7164 | | |
7165 | | /* Dissection routine for method Channel.Pong */ |
7166 | | |
7167 | | static int |
7168 | | dissect_amqp_0_9_method_channel_pong(tvbuff_t *tvb _U_, |
7169 | | int offset, proto_tree *args_tree _U_) |
7170 | 0 | { |
7171 | 0 | return offset; |
7172 | 0 | } |
7173 | | |
7174 | | /* Dissection routine for method Channel.Ok */ |
7175 | | |
7176 | | static int |
7177 | | dissect_amqp_0_9_method_channel_ok(tvbuff_t *tvb _U_, |
7178 | | int offset, proto_tree *args_tree _U_) |
7179 | 0 | { |
7180 | 0 | return offset; |
7181 | 0 | } |
7182 | | |
7183 | | /* Dissection routine for method Access.Request */ |
7184 | | |
7185 | | static int |
7186 | | dissect_amqp_0_9_method_access_request(tvbuff_t *tvb, |
7187 | | int offset, proto_tree *args_tree) |
7188 | 0 | { |
7189 | | /* realm (shortstr) */ |
7190 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_access_request_realm, |
7191 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
7192 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
7193 | | |
7194 | | /* exclusive (bit) */ |
7195 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_access_request_exclusive, |
7196 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
7197 | | |
7198 | | /* passive (bit) */ |
7199 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_access_request_passive, |
7200 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
7201 | | |
7202 | | /* active (bit) */ |
7203 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_access_request_active, |
7204 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
7205 | | |
7206 | | /* write (bit) */ |
7207 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_access_request_write, |
7208 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
7209 | | |
7210 | | /* read (bit) */ |
7211 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_access_request_read, |
7212 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
7213 | |
|
7214 | 0 | return offset; |
7215 | 0 | } |
7216 | | |
7217 | | /* Dissection routine for method Access.Request-Ok */ |
7218 | | |
7219 | | static int |
7220 | | dissect_amqp_0_9_method_access_request_ok(tvbuff_t *tvb, |
7221 | | int offset, proto_tree *args_tree) |
7222 | 0 | { |
7223 | | /* ticket (short) */ |
7224 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_access_request_ok_ticket, |
7225 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
7226 | 0 | offset += 2; |
7227 | |
|
7228 | 0 | return offset; |
7229 | 0 | } |
7230 | | |
7231 | | /* Dissection routine for method Exchange.Declare */ |
7232 | | |
7233 | | static int |
7234 | | dissect_amqp_0_9_method_exchange_declare(tvbuff_t *tvb, packet_info *pinfo, |
7235 | | int offset, proto_tree *args_tree) |
7236 | 0 | { |
7237 | 0 | proto_item *ti; |
7238 | 0 | const uint8_t* exchange; |
7239 | | |
7240 | | /* ticket (short) */ |
7241 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_exchange_declare_ticket, |
7242 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
7243 | 0 | offset += 2; |
7244 | | |
7245 | | /* exchange (shortstr) */ |
7246 | 0 | proto_tree_add_item_ret_string(args_tree, hf_amqp_method_exchange_declare_exchange, |
7247 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII|ENC_NA, pinfo->pool, &exchange); |
7248 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "x=%s ", exchange); |
7249 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
7250 | | |
7251 | | /* type (shortstr) */ |
7252 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_exchange_declare_type, |
7253 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
7254 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
7255 | | |
7256 | | /* passive (bit) */ |
7257 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_exchange_declare_passive, |
7258 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
7259 | | |
7260 | | /* durable (bit) */ |
7261 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_exchange_declare_durable, |
7262 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
7263 | | |
7264 | | /* auto-delete (bit) */ |
7265 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_exchange_declare_auto_delete, |
7266 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
7267 | | |
7268 | | /* internal (bit) */ |
7269 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_exchange_declare_internal, |
7270 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
7271 | | |
7272 | | /* nowait (bit) */ |
7273 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_exchange_declare_nowait, |
7274 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
7275 | |
|
7276 | 0 | offset += 1; |
7277 | | /* arguments (table) */ |
7278 | 0 | ti = proto_tree_add_item( |
7279 | 0 | args_tree, hf_amqp_method_exchange_declare_arguments, |
7280 | 0 | tvb, offset + 4, tvb_get_ntohl(tvb, offset), ENC_NA); |
7281 | 0 | dissect_amqp_0_9_field_table(tvb, pinfo, offset + 4, tvb_get_ntohl(tvb, offset), ti); |
7282 | 0 | offset += 4 + tvb_get_ntohl(tvb, offset); |
7283 | |
|
7284 | 0 | return offset; |
7285 | 0 | } |
7286 | | |
7287 | | /* Dissection routine for method Exchange.Declare-Ok */ |
7288 | | |
7289 | | static int |
7290 | | dissect_amqp_0_9_method_exchange_declare_ok(tvbuff_t *tvb _U_, |
7291 | | int offset, proto_tree *args_tree _U_) |
7292 | 0 | { |
7293 | 0 | return offset; |
7294 | 0 | } |
7295 | | |
7296 | | /* Dissection routine for method Exchange.Bind */ |
7297 | | |
7298 | | static int |
7299 | | dissect_amqp_0_9_method_exchange_bind(tvbuff_t *tvb, packet_info *pinfo, |
7300 | | int offset, proto_tree *args_tree) |
7301 | 0 | { |
7302 | 0 | proto_item *ti; |
7303 | 0 | const uint8_t* str; |
7304 | | |
7305 | | /* ticket (short) */ |
7306 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_exchange_declare_ticket, |
7307 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
7308 | 0 | offset += 2; |
7309 | | |
7310 | | /* destination (shortstr) */ |
7311 | 0 | proto_tree_add_item_ret_string(args_tree, hf_amqp_method_exchange_bind_destination, |
7312 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII|ENC_NA, pinfo->pool, &str); |
7313 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "dx=%s ", str); |
7314 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
7315 | | |
7316 | | /* source (shortstr) */ |
7317 | 0 | proto_tree_add_item_ret_string(args_tree, hf_amqp_method_exchange_bind_source, |
7318 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII|ENC_NA, pinfo->pool, &str); |
7319 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "sx=%s ", str); |
7320 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
7321 | | |
7322 | | /* routing-key (shortstr) */ |
7323 | 0 | proto_tree_add_item_ret_string(args_tree, hf_amqp_method_exchange_bind_routing_key, |
7324 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII|ENC_NA, pinfo->pool, &str); |
7325 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "bk=%s ", str); |
7326 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
7327 | | |
7328 | | /* nowait (bit) */ |
7329 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_exchange_bind_nowait, |
7330 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
7331 | 0 | offset += 1; |
7332 | | |
7333 | | /* arguments (table) */ |
7334 | 0 | ti = proto_tree_add_item( |
7335 | 0 | args_tree, hf_amqp_method_exchange_bind_arguments, |
7336 | 0 | tvb, offset + 4, tvb_get_ntohl(tvb, offset), ENC_NA); |
7337 | 0 | dissect_amqp_0_9_field_table(tvb, pinfo, offset + 4, tvb_get_ntohl(tvb, offset), ti); |
7338 | 0 | offset += 4 + tvb_get_ntohl(tvb, offset); |
7339 | |
|
7340 | 0 | return offset; |
7341 | 0 | } |
7342 | | |
7343 | | /* Dissection routine for method Exchange.Bind-Ok */ |
7344 | | |
7345 | | static int |
7346 | | dissect_amqp_0_9_method_exchange_bind_ok(tvbuff_t *tvb _U_, |
7347 | | int offset, proto_tree *args_tree _U_) |
7348 | 0 | { |
7349 | 0 | return offset; |
7350 | 0 | } |
7351 | | |
7352 | | /* Dissection routine for method Exchange.Delete */ |
7353 | | |
7354 | | static int |
7355 | | dissect_amqp_0_9_method_exchange_delete(tvbuff_t *tvb, packet_info *pinfo, |
7356 | | int offset, proto_tree *args_tree) |
7357 | 0 | { |
7358 | 0 | const uint8_t* exchange; |
7359 | | |
7360 | | /* ticket (short) */ |
7361 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_exchange_delete_ticket, |
7362 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
7363 | 0 | offset += 2; |
7364 | | |
7365 | | /* exchange (shortstr) */ |
7366 | 0 | proto_tree_add_item_ret_string(args_tree, hf_amqp_method_exchange_delete_exchange, |
7367 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII|ENC_NA, pinfo->pool, &exchange); |
7368 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "x=%s ", exchange); |
7369 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
7370 | | |
7371 | | /* if-unused (bit) */ |
7372 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_exchange_delete_if_unused, |
7373 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
7374 | | |
7375 | | /* nowait (bit) */ |
7376 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_exchange_delete_nowait, |
7377 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
7378 | |
|
7379 | 0 | return offset; |
7380 | 0 | } |
7381 | | |
7382 | | /* Dissection routine for method Exchange.Delete-Ok */ |
7383 | | |
7384 | | static int |
7385 | | dissect_amqp_0_9_method_exchange_delete_ok(tvbuff_t *tvb _U_, |
7386 | | int offset, proto_tree *args_tree _U_) |
7387 | 0 | { |
7388 | 0 | return offset; |
7389 | 0 | } |
7390 | | |
7391 | | /* Dissection routine for method Queue.Declare */ |
7392 | | |
7393 | | static int |
7394 | | dissect_amqp_0_9_method_queue_declare(tvbuff_t *tvb, packet_info *pinfo, |
7395 | | int offset, proto_tree *args_tree) |
7396 | 0 | { |
7397 | 0 | proto_item *ti; |
7398 | 0 | const uint8_t* queue; |
7399 | | |
7400 | | /* ticket (short) */ |
7401 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_queue_declare_ticket, |
7402 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
7403 | 0 | offset += 2; |
7404 | | |
7405 | | /* queue (shortstr) */ |
7406 | 0 | proto_tree_add_item_ret_string(args_tree, hf_amqp_method_queue_declare_queue, |
7407 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII|ENC_NA, pinfo->pool, &queue); |
7408 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "q=%s ", queue); |
7409 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
7410 | | |
7411 | | /* passive (bit) */ |
7412 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_queue_declare_passive, |
7413 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
7414 | | |
7415 | | /* durable (bit) */ |
7416 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_queue_declare_durable, |
7417 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
7418 | | |
7419 | | /* exclusive (bit) */ |
7420 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_queue_declare_exclusive, |
7421 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
7422 | | |
7423 | | /* auto-delete (bit) */ |
7424 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_queue_declare_auto_delete, |
7425 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
7426 | | |
7427 | | /* nowait (bit) */ |
7428 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_queue_declare_nowait, |
7429 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
7430 | |
|
7431 | 0 | offset += 1; |
7432 | | /* arguments (table) */ |
7433 | 0 | ti = proto_tree_add_item( |
7434 | 0 | args_tree, hf_amqp_method_queue_declare_arguments, |
7435 | 0 | tvb, offset + 4, tvb_get_ntohl(tvb, offset), ENC_NA); |
7436 | 0 | dissect_amqp_0_9_field_table(tvb, pinfo, offset + 4, tvb_get_ntohl(tvb, offset), ti); |
7437 | 0 | offset += 4 + tvb_get_ntohl(tvb, offset); |
7438 | |
|
7439 | 0 | return offset; |
7440 | 0 | } |
7441 | | |
7442 | | /* Dissection routine for method Queue.Declare-Ok */ |
7443 | | |
7444 | | static int |
7445 | | dissect_amqp_0_9_method_queue_declare_ok(tvbuff_t *tvb, packet_info *pinfo, |
7446 | | int offset, proto_tree *args_tree) |
7447 | 0 | { |
7448 | 0 | const uint8_t* queue; |
7449 | | |
7450 | | /* queue (shortstr) */ |
7451 | 0 | proto_tree_add_item_ret_string(args_tree, hf_amqp_method_queue_declare_ok_queue, |
7452 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII|ENC_NA, pinfo->pool, &queue); |
7453 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "q=%s ", queue); |
7454 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
7455 | | |
7456 | | /* message-count (long) */ |
7457 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_queue_declare_ok_message_count, |
7458 | 0 | tvb, offset, 4, ENC_BIG_ENDIAN); |
7459 | 0 | offset += 4; |
7460 | | |
7461 | | /* consumer-count (long) */ |
7462 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_queue_declare_ok_consumer_count, |
7463 | 0 | tvb, offset, 4, ENC_BIG_ENDIAN); |
7464 | 0 | offset += 4; |
7465 | |
|
7466 | 0 | return offset; |
7467 | 0 | } |
7468 | | |
7469 | | /* Dissection routine for method Queue.Bind */ |
7470 | | |
7471 | | static int |
7472 | | dissect_amqp_0_9_method_queue_bind(tvbuff_t *tvb, packet_info *pinfo, |
7473 | | int offset, proto_tree *args_tree) |
7474 | 0 | { |
7475 | 0 | proto_item *ti; |
7476 | 0 | const uint8_t* str; |
7477 | | |
7478 | | /* ticket (short) */ |
7479 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_queue_bind_ticket, |
7480 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
7481 | 0 | offset += 2; |
7482 | | |
7483 | | /* queue (shortstr) */ |
7484 | 0 | proto_tree_add_item_ret_string(args_tree, hf_amqp_method_queue_bind_queue, |
7485 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII|ENC_NA, pinfo->pool, &str); |
7486 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "q=%s ", str); |
7487 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
7488 | | |
7489 | | /* exchange (shortstr) */ |
7490 | 0 | proto_tree_add_item_ret_string(args_tree, hf_amqp_method_queue_bind_exchange, |
7491 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII|ENC_NA, pinfo->pool, &str); |
7492 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "x=%s ", str); |
7493 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
7494 | | |
7495 | | /* routing-key (shortstr) */ |
7496 | 0 | proto_tree_add_item_ret_string(args_tree, hf_amqp_method_queue_bind_routing_key, |
7497 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII|ENC_NA, pinfo->pool, &str); |
7498 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "bk=%s ", str); |
7499 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
7500 | | |
7501 | | /* nowait (bit) */ |
7502 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_queue_bind_nowait, |
7503 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
7504 | |
|
7505 | 0 | offset += 1; |
7506 | | /* arguments (table) */ |
7507 | 0 | ti = proto_tree_add_item( |
7508 | 0 | args_tree, hf_amqp_method_queue_bind_arguments, |
7509 | 0 | tvb, offset + 4, tvb_get_ntohl(tvb, offset), ENC_NA); |
7510 | 0 | dissect_amqp_0_9_field_table(tvb, pinfo, offset + 4, tvb_get_ntohl(tvb, offset), ti); |
7511 | 0 | offset += 4 + tvb_get_ntohl(tvb, offset); |
7512 | |
|
7513 | 0 | return offset; |
7514 | 0 | } |
7515 | | |
7516 | | /* Dissection routine for method Queue.Bind-Ok */ |
7517 | | |
7518 | | static int |
7519 | | dissect_amqp_0_9_method_queue_bind_ok(tvbuff_t *tvb _U_, |
7520 | | int offset, proto_tree *args_tree _U_) |
7521 | 0 | { |
7522 | 0 | return offset; |
7523 | 0 | } |
7524 | | |
7525 | | /* Dissection routine for method Queue.Unbind */ |
7526 | | |
7527 | | static int |
7528 | | dissect_amqp_0_9_method_queue_unbind(tvbuff_t *tvb, packet_info *pinfo, |
7529 | | int offset, proto_tree *args_tree) |
7530 | 0 | { |
7531 | 0 | proto_item *ti; |
7532 | 0 | const uint8_t* str; |
7533 | | |
7534 | | /* ticket (short) */ |
7535 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_queue_unbind_ticket, |
7536 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
7537 | 0 | offset += 2; |
7538 | | |
7539 | | /* queue (shortstr) */ |
7540 | 0 | proto_tree_add_item_ret_string(args_tree, hf_amqp_method_queue_unbind_queue, |
7541 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII|ENC_NA, pinfo->pool, &str); |
7542 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "q=%s ", str); |
7543 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
7544 | | |
7545 | | /* exchange (shortstr) */ |
7546 | 0 | proto_tree_add_item_ret_string(args_tree, hf_amqp_method_queue_unbind_exchange, |
7547 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII|ENC_NA, pinfo->pool, &str); |
7548 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "x=%s ", str); |
7549 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
7550 | | |
7551 | | /* routing-key (shortstr) */ |
7552 | 0 | proto_tree_add_item_ret_string(args_tree, hf_amqp_method_queue_unbind_routing_key, |
7553 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII|ENC_NA, pinfo->pool, &str); |
7554 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "rk=%s ", str); |
7555 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
7556 | | |
7557 | | /* arguments (table) */ |
7558 | 0 | ti = proto_tree_add_item( |
7559 | 0 | args_tree, hf_amqp_method_queue_unbind_arguments, |
7560 | 0 | tvb, offset + 4, tvb_get_ntohl(tvb, offset), ENC_NA); |
7561 | 0 | dissect_amqp_0_9_field_table(tvb, pinfo, offset + 4, tvb_get_ntohl(tvb, offset), ti); |
7562 | 0 | offset += 4 + tvb_get_ntohl(tvb, offset); |
7563 | |
|
7564 | 0 | return offset; |
7565 | 0 | } |
7566 | | |
7567 | | /* Dissection routine for method Queue.Unbind-Ok */ |
7568 | | |
7569 | | static int |
7570 | | dissect_amqp_0_9_method_queue_unbind_ok(tvbuff_t *tvb _U_, |
7571 | | int offset, proto_tree *args_tree _U_) |
7572 | 0 | { |
7573 | 0 | return offset; |
7574 | 0 | } |
7575 | | |
7576 | | /* Dissection routine for method Queue.Purge */ |
7577 | | |
7578 | | static int |
7579 | | dissect_amqp_0_9_method_queue_purge(tvbuff_t *tvb, packet_info *pinfo, |
7580 | | int offset, proto_tree *args_tree) |
7581 | 0 | { |
7582 | 0 | const uint8_t* queue; |
7583 | | |
7584 | | /* ticket (short) */ |
7585 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_queue_purge_ticket, |
7586 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
7587 | 0 | offset += 2; |
7588 | | |
7589 | | /* queue (shortstr) */ |
7590 | 0 | proto_tree_add_item_ret_string(args_tree, hf_amqp_method_queue_purge_queue, |
7591 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII|ENC_NA, pinfo->pool, &queue); |
7592 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "q=%s ", queue); |
7593 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
7594 | | |
7595 | | /* nowait (bit) */ |
7596 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_queue_purge_nowait, |
7597 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
7598 | |
|
7599 | 0 | return offset; |
7600 | 0 | } |
7601 | | |
7602 | | /* Dissection routine for method Queue.Purge-Ok */ |
7603 | | |
7604 | | static int |
7605 | | dissect_amqp_0_9_method_queue_purge_ok(tvbuff_t *tvb, |
7606 | | int offset, proto_tree *args_tree) |
7607 | 0 | { |
7608 | | /* message-count (long) */ |
7609 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_queue_purge_ok_message_count, |
7610 | 0 | tvb, offset, 4, ENC_BIG_ENDIAN); |
7611 | 0 | offset += 4; |
7612 | |
|
7613 | 0 | return offset; |
7614 | 0 | } |
7615 | | |
7616 | | /* Dissection routine for method Queue.Delete */ |
7617 | | |
7618 | | static int |
7619 | | dissect_amqp_0_9_method_queue_delete(tvbuff_t *tvb, packet_info *pinfo, |
7620 | | int offset, proto_tree *args_tree) |
7621 | 0 | { |
7622 | 0 | const uint8_t* queue; |
7623 | | |
7624 | | /* ticket (short) */ |
7625 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_queue_delete_ticket, |
7626 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
7627 | 0 | offset += 2; |
7628 | | |
7629 | | /* queue (shortstr) */ |
7630 | 0 | proto_tree_add_item_ret_string(args_tree, hf_amqp_method_queue_delete_queue, |
7631 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII|ENC_NA, pinfo->pool, &queue); |
7632 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "q=%s ", queue); |
7633 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
7634 | | |
7635 | | /* if-unused (bit) */ |
7636 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_queue_delete_if_unused, |
7637 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
7638 | | |
7639 | | /* if-empty (bit) */ |
7640 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_queue_delete_if_empty, |
7641 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
7642 | | |
7643 | | /* nowait (bit) */ |
7644 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_queue_delete_nowait, |
7645 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
7646 | |
|
7647 | 0 | return offset; |
7648 | 0 | } |
7649 | | |
7650 | | /* Dissection routine for method Queue.Delete-Ok */ |
7651 | | |
7652 | | static int |
7653 | | dissect_amqp_0_9_method_queue_delete_ok(tvbuff_t *tvb, |
7654 | | int offset, proto_tree *args_tree) |
7655 | 0 | { |
7656 | | /* message-count (long) */ |
7657 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_queue_delete_ok_message_count, |
7658 | 0 | tvb, offset, 4, ENC_BIG_ENDIAN); |
7659 | 0 | offset += 4; |
7660 | |
|
7661 | 0 | return offset; |
7662 | 0 | } |
7663 | | |
7664 | | /* Dissection routine for method Basic.Qos */ |
7665 | | |
7666 | | static int |
7667 | | dissect_amqp_0_9_method_basic_qos(tvbuff_t *tvb, |
7668 | | int offset, proto_tree *args_tree) |
7669 | 0 | { |
7670 | | /* prefetch-size (long) */ |
7671 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_basic_qos_prefetch_size, |
7672 | 0 | tvb, offset, 4, ENC_BIG_ENDIAN); |
7673 | 0 | offset += 4; |
7674 | | |
7675 | | /* prefetch-count (short) */ |
7676 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_basic_qos_prefetch_count, |
7677 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
7678 | 0 | offset += 2; |
7679 | | |
7680 | | /* global (bit) */ |
7681 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_basic_qos_global, |
7682 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
7683 | |
|
7684 | 0 | return offset; |
7685 | 0 | } |
7686 | | |
7687 | | /* Dissection routine for method Basic.Qos-Ok */ |
7688 | | |
7689 | | static int |
7690 | | dissect_amqp_0_9_method_basic_qos_ok(tvbuff_t *tvb _U_, |
7691 | | int offset, proto_tree *args_tree _U_) |
7692 | 0 | { |
7693 | 0 | return offset; |
7694 | 0 | } |
7695 | | |
7696 | | /* Dissection routine for method Basic.Consume */ |
7697 | | |
7698 | | static int |
7699 | | dissect_amqp_0_9_method_basic_consume(tvbuff_t *tvb, packet_info *pinfo, |
7700 | | int offset, proto_tree *args_tree) |
7701 | 0 | { |
7702 | 0 | proto_item *ti; |
7703 | 0 | const uint8_t* queue; |
7704 | | |
7705 | | /* ticket (short) */ |
7706 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_basic_consume_ticket, |
7707 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
7708 | 0 | offset += 2; |
7709 | | |
7710 | | /* queue (shortstr) */ |
7711 | 0 | proto_tree_add_item_ret_string(args_tree, hf_amqp_method_basic_consume_queue, |
7712 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII|ENC_NA, pinfo->pool, &queue); |
7713 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "q=%s ", queue); |
7714 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
7715 | | |
7716 | | /* consumer-tag (shortstr) */ |
7717 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_basic_consume_consumer_tag, |
7718 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
7719 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
7720 | | |
7721 | | /* no-local (bit) */ |
7722 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_basic_consume_no_local, |
7723 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
7724 | | |
7725 | | /* no-ack (bit) */ |
7726 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_basic_consume_no_ack, |
7727 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
7728 | | |
7729 | | /* exclusive (bit) */ |
7730 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_basic_consume_exclusive, |
7731 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
7732 | | |
7733 | | /* nowait (bit) */ |
7734 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_basic_consume_nowait, |
7735 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
7736 | |
|
7737 | 0 | offset += 1; |
7738 | | /* filter (table) */ |
7739 | 0 | ti = proto_tree_add_item( |
7740 | 0 | args_tree, hf_amqp_method_basic_consume_filter, |
7741 | 0 | tvb, offset + 4, tvb_get_ntohl(tvb, offset), ENC_NA); |
7742 | 0 | dissect_amqp_0_9_field_table(tvb, pinfo, offset + 4, tvb_get_ntohl(tvb, offset), ti); |
7743 | 0 | offset += 4 + tvb_get_ntohl(tvb, offset); |
7744 | |
|
7745 | 0 | return offset; |
7746 | 0 | } |
7747 | | |
7748 | | /* Dissection routine for method Basic.Consume-Ok */ |
7749 | | |
7750 | | static int |
7751 | | dissect_amqp_0_9_method_basic_consume_ok(tvbuff_t *tvb, |
7752 | | int offset, proto_tree *args_tree) |
7753 | 0 | { |
7754 | | /* consumer-tag (shortstr) */ |
7755 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_basic_consume_ok_consumer_tag, |
7756 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
7757 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
7758 | |
|
7759 | 0 | return offset; |
7760 | 0 | } |
7761 | | |
7762 | | /* Dissection routine for method Basic.Cancel */ |
7763 | | |
7764 | | static int |
7765 | | dissect_amqp_0_9_method_basic_cancel(tvbuff_t *tvb, |
7766 | | int offset, proto_tree *args_tree) |
7767 | 0 | { |
7768 | | /* consumer-tag (shortstr) */ |
7769 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_basic_cancel_consumer_tag, |
7770 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
7771 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
7772 | | |
7773 | | /* nowait (bit) */ |
7774 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_basic_cancel_nowait, |
7775 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
7776 | |
|
7777 | 0 | return offset; |
7778 | 0 | } |
7779 | | |
7780 | | /* Dissection routine for method Basic.Cancel-Ok */ |
7781 | | |
7782 | | static int |
7783 | | dissect_amqp_0_9_method_basic_cancel_ok(tvbuff_t *tvb, |
7784 | | int offset, proto_tree *args_tree) |
7785 | 0 | { |
7786 | | /* consumer-tag (shortstr) */ |
7787 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_basic_cancel_ok_consumer_tag, |
7788 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
7789 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
7790 | |
|
7791 | 0 | return offset; |
7792 | 0 | } |
7793 | | |
7794 | | /* Dissection routine for method Basic.Publish */ |
7795 | | |
7796 | | static int |
7797 | | dissect_amqp_0_9_method_basic_publish(uint16_t channel_num, |
7798 | | tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *args_tree) |
7799 | 0 | { |
7800 | 0 | amqp_delivery *delivery; |
7801 | 0 | proto_item *pi; |
7802 | 0 | const uint8_t* str; |
7803 | | |
7804 | | /* message number (long long) */ |
7805 | 0 | if(!PINFO_FD_VISITED(pinfo)) |
7806 | 0 | { |
7807 | 0 | conversation_t *conv; |
7808 | 0 | amqp_channel_t *channel; |
7809 | |
|
7810 | 0 | conv = find_or_create_conversation(pinfo); |
7811 | 0 | channel = get_conversation_channel(conv, channel_num); |
7812 | |
|
7813 | 0 | record_msg_delivery_c(conv, channel, tvb, pinfo, ++channel->publish_count); |
7814 | 0 | } |
7815 | |
|
7816 | 0 | delivery = (amqp_delivery *)p_get_proto_data(pinfo->pool, pinfo, proto_amqp, |
7817 | 0 | (uint32_t)tvb_raw_offset(tvb)); |
7818 | 0 | if(delivery) |
7819 | 0 | { |
7820 | 0 | pi = proto_tree_add_uint64(args_tree, hf_amqp_method_basic_publish_number, |
7821 | 0 | tvb, offset-2, 2, delivery->delivery_tag); |
7822 | 0 | proto_item_set_generated(pi); |
7823 | 0 | } |
7824 | | |
7825 | | /* ticket (short) */ |
7826 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_basic_publish_ticket, |
7827 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
7828 | 0 | offset += 2; |
7829 | | |
7830 | | /* exchange (shortstr) */ |
7831 | 0 | proto_tree_add_item_ret_string(args_tree, hf_amqp_method_basic_publish_exchange, |
7832 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII|ENC_NA, pinfo->pool, &str); |
7833 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "x=%s ", str); |
7834 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
7835 | | |
7836 | | /* routing-key (shortstr) */ |
7837 | 0 | proto_tree_add_item_ret_string(args_tree, hf_amqp_method_basic_publish_routing_key, |
7838 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII|ENC_NA, pinfo->pool, &str); |
7839 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "rk=%s ", str); |
7840 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
7841 | | |
7842 | | /* mandatory (bit) */ |
7843 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_basic_publish_mandatory, |
7844 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
7845 | | |
7846 | | /* immediate (bit) */ |
7847 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_basic_publish_immediate, |
7848 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
7849 | |
|
7850 | 0 | return offset; |
7851 | 0 | } |
7852 | | |
7853 | | /* Dissection routine for method Basic.Return */ |
7854 | | |
7855 | | static int |
7856 | | dissect_amqp_0_9_method_basic_return(tvbuff_t *tvb, packet_info *pinfo, |
7857 | | int offset, proto_tree *args_tree) |
7858 | 0 | { |
7859 | 0 | proto_item *tf_code; |
7860 | | |
7861 | | /* reply-code (short) */ |
7862 | 0 | tf_code = proto_tree_add_item(args_tree, hf_amqp_method_basic_return_reply_code, |
7863 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
7864 | 0 | if (tvb_get_ntohs(tvb, offset) > 200) |
7865 | 0 | expert_add_info(pinfo, tf_code, &ei_amqp_message_undeliverable); |
7866 | 0 | offset += 2; |
7867 | | |
7868 | | /* reply-text (shortstr) */ |
7869 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_basic_return_reply_text, |
7870 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
7871 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
7872 | | |
7873 | | /* exchange (shortstr) */ |
7874 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_basic_return_exchange, |
7875 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
7876 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
7877 | | |
7878 | | /* routing-key (shortstr) */ |
7879 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_basic_return_routing_key, |
7880 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
7881 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
7882 | |
|
7883 | 0 | return offset; |
7884 | 0 | } |
7885 | | |
7886 | | /* Dissection routine for method Basic.Deliver */ |
7887 | | |
7888 | | static int |
7889 | | dissect_amqp_0_9_method_basic_deliver(uint16_t channel_num, |
7890 | | tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *args_tree) |
7891 | 0 | { |
7892 | 0 | uint64_t delivery_tag; |
7893 | 0 | const uint8_t* str; |
7894 | | |
7895 | | /* consumer-tag (shortstr) */ |
7896 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_basic_deliver_consumer_tag, |
7897 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
7898 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
7899 | | |
7900 | | /* delivery-tag (longlong) */ |
7901 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_basic_deliver_delivery_tag, |
7902 | 0 | tvb, offset, 8, ENC_BIG_ENDIAN); |
7903 | 0 | delivery_tag = tvb_get_ntoh64(tvb, offset); |
7904 | 0 | offset += 8; |
7905 | | |
7906 | | /* redelivered (bit) */ |
7907 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_basic_deliver_redelivered, |
7908 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
7909 | |
|
7910 | 0 | offset += 1; |
7911 | | /* exchange (shortstr) */ |
7912 | 0 | proto_tree_add_item_ret_string(args_tree, hf_amqp_method_basic_deliver_exchange, |
7913 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII|ENC_NA, pinfo->pool, &str); |
7914 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "x=%s ", str); |
7915 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
7916 | | |
7917 | | /* routing-key (shortstr) */ |
7918 | 0 | proto_tree_add_item_ret_string(args_tree, hf_amqp_method_basic_deliver_routing_key, |
7919 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII|ENC_NA, pinfo->pool, &str); |
7920 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "rk=%s ", str); |
7921 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
7922 | |
|
7923 | 0 | if(!PINFO_FD_VISITED(pinfo)) |
7924 | 0 | record_msg_delivery(tvb, pinfo, channel_num, delivery_tag); |
7925 | |
|
7926 | 0 | return offset; |
7927 | 0 | } |
7928 | | |
7929 | | /* Dissection routine for method Basic.Get */ |
7930 | | |
7931 | | static int |
7932 | | dissect_amqp_0_9_method_basic_get(tvbuff_t *tvb, packet_info *pinfo, |
7933 | | int offset, proto_tree *args_tree) |
7934 | 0 | { |
7935 | 0 | const uint8_t* queue; |
7936 | | |
7937 | | /* ticket (short) */ |
7938 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_basic_get_ticket, |
7939 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
7940 | 0 | offset += 2; |
7941 | | |
7942 | | /* queue (shortstr) */ |
7943 | 0 | proto_tree_add_item_ret_string(args_tree, hf_amqp_method_basic_get_queue, |
7944 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII|ENC_NA, pinfo->pool, &queue); |
7945 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "q=%s ", queue); |
7946 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
7947 | | |
7948 | | /* no-ack (bit) */ |
7949 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_basic_get_no_ack, |
7950 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
7951 | |
|
7952 | 0 | return offset; |
7953 | 0 | } |
7954 | | |
7955 | | /* Dissection routine for method Basic.Get-Ok */ |
7956 | | |
7957 | | static int |
7958 | | dissect_amqp_0_9_method_basic_get_ok(uint16_t channel_num, |
7959 | | tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *args_tree) |
7960 | 0 | { |
7961 | 0 | uint64_t delivery_tag; |
7962 | 0 | const uint8_t* str; |
7963 | | |
7964 | | /* delivery-tag (longlong) */ |
7965 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_basic_get_ok_delivery_tag, |
7966 | 0 | tvb, offset, 8, ENC_BIG_ENDIAN); |
7967 | 0 | delivery_tag = tvb_get_ntoh64(tvb, offset); |
7968 | 0 | offset += 8; |
7969 | | |
7970 | | /* redelivered (bit) */ |
7971 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_basic_get_ok_redelivered, |
7972 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
7973 | |
|
7974 | 0 | offset += 1; |
7975 | | /* exchange (shortstr) */ |
7976 | 0 | proto_tree_add_item_ret_string(args_tree, hf_amqp_method_basic_get_ok_exchange, |
7977 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII|ENC_NA, pinfo->pool, &str); |
7978 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "x=%s ", str); |
7979 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
7980 | | |
7981 | | /* routing-key (shortstr) */ |
7982 | 0 | proto_tree_add_item_ret_string(args_tree, hf_amqp_method_basic_get_ok_routing_key, |
7983 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII|ENC_NA, pinfo->pool, &str); |
7984 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "rk=%s ", str); |
7985 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
7986 | | |
7987 | | /* message-count (long) */ |
7988 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_basic_get_ok_message_count, |
7989 | 0 | tvb, offset, 4, ENC_BIG_ENDIAN); |
7990 | 0 | offset += 4; |
7991 | |
|
7992 | 0 | if(!PINFO_FD_VISITED(pinfo)) |
7993 | 0 | record_msg_delivery(tvb, pinfo, channel_num, delivery_tag); |
7994 | |
|
7995 | 0 | return offset; |
7996 | 0 | } |
7997 | | |
7998 | | /* Dissection routine for method Basic.Get-Empty */ |
7999 | | |
8000 | | static int |
8001 | | dissect_amqp_0_9_method_basic_get_empty(tvbuff_t *tvb, |
8002 | | int offset, proto_tree *args_tree) |
8003 | 0 | { |
8004 | | /* cluster-id (shortstr) */ |
8005 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_basic_get_empty_cluster_id, |
8006 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
8007 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
8008 | |
|
8009 | 0 | return offset; |
8010 | 0 | } |
8011 | | |
8012 | | /* Dissection routine for method Basic.Ack */ |
8013 | | |
8014 | | static int |
8015 | | dissect_amqp_0_9_method_basic_ack(uint16_t channel_num, |
8016 | | tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *args_tree) |
8017 | 0 | { |
8018 | 0 | uint64_t delivery_tag; |
8019 | 0 | int multiple; |
8020 | | |
8021 | | /* delivery-tag (longlong) */ |
8022 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_basic_ack_delivery_tag, |
8023 | 0 | tvb, offset, 8, ENC_BIG_ENDIAN); |
8024 | 0 | delivery_tag = tvb_get_ntoh64(tvb, offset); |
8025 | 0 | offset += 8; |
8026 | | |
8027 | | /* multiple (bit) */ |
8028 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_basic_ack_multiple, |
8029 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
8030 | 0 | multiple = tvb_get_uint8(tvb, offset) & 0x01; |
8031 | |
|
8032 | 0 | if(!PINFO_FD_VISITED(pinfo)) |
8033 | 0 | record_delivery_ack(tvb, pinfo, channel_num, delivery_tag, multiple); |
8034 | |
|
8035 | 0 | return offset; |
8036 | 0 | } |
8037 | | |
8038 | | /* Dissection routine for method Basic.Reject */ |
8039 | | |
8040 | | static int |
8041 | | dissect_amqp_0_9_method_basic_reject(uint16_t channel_num, |
8042 | | tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *args_tree) |
8043 | 0 | { |
8044 | 0 | uint64_t delivery_tag; |
8045 | | |
8046 | | /* delivery-tag (longlong) */ |
8047 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_basic_reject_delivery_tag, |
8048 | 0 | tvb, offset, 8, ENC_BIG_ENDIAN); |
8049 | 0 | delivery_tag = tvb_get_ntoh64(tvb, offset); |
8050 | 0 | offset += 8; |
8051 | | |
8052 | | /* requeue (bit) */ |
8053 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_basic_reject_requeue, |
8054 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
8055 | |
|
8056 | 0 | if(!PINFO_FD_VISITED(pinfo)) |
8057 | 0 | record_delivery_ack(tvb, pinfo, channel_num, delivery_tag, false); |
8058 | |
|
8059 | 0 | return offset; |
8060 | 0 | } |
8061 | | |
8062 | | /* Dissection routine for method Basic.Recover-Async */ |
8063 | | |
8064 | | static int |
8065 | | dissect_amqp_0_9_method_basic_recover_async(tvbuff_t *tvb, |
8066 | | int offset, proto_tree *args_tree) |
8067 | 0 | { |
8068 | | /* requeue (bit) */ |
8069 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_basic_recover_requeue, |
8070 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
8071 | |
|
8072 | 0 | return offset; |
8073 | 0 | } |
8074 | | |
8075 | | /* Dissection routine for method Basic.Recover */ |
8076 | | |
8077 | | static int |
8078 | | dissect_amqp_0_9_method_basic_recover(tvbuff_t *tvb, |
8079 | | int offset, proto_tree *args_tree) |
8080 | 0 | { |
8081 | | /* requeue (bit) */ |
8082 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_basic_recover_requeue, |
8083 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
8084 | |
|
8085 | 0 | return offset; |
8086 | 0 | } |
8087 | | |
8088 | | /* Dissection routine for method Basic.Recover-Ok */ |
8089 | | |
8090 | | static int |
8091 | | dissect_amqp_0_9_method_basic_recover_ok(tvbuff_t *tvb _U_, |
8092 | | int offset, proto_tree *args_tree _U_) |
8093 | 0 | { |
8094 | 0 | return offset; |
8095 | 0 | } |
8096 | | |
8097 | | /* Dissection routine for method Basic.Nack */ |
8098 | | |
8099 | | static int |
8100 | | dissect_amqp_0_9_method_basic_nack(uint16_t channel_num, |
8101 | | tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *args_tree) |
8102 | 0 | { |
8103 | 0 | uint64_t delivery_tag; |
8104 | 0 | int multiple; |
8105 | | |
8106 | | /* delivery-tag (longlong) */ |
8107 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_basic_nack_delivery_tag, |
8108 | 0 | tvb, offset, 8, ENC_BIG_ENDIAN); |
8109 | 0 | delivery_tag = tvb_get_ntoh64(tvb, offset); |
8110 | 0 | offset += 8; |
8111 | | |
8112 | | /* multiple (bit) */ |
8113 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_basic_nack_multiple, |
8114 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
8115 | 0 | multiple = tvb_get_uint8(tvb, offset) & 0x01; |
8116 | | |
8117 | | /* requeue (bit) */ |
8118 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_basic_nack_requeue, |
8119 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
8120 | |
|
8121 | 0 | if(!PINFO_FD_VISITED(pinfo)) |
8122 | 0 | record_delivery_ack(tvb, pinfo, channel_num, delivery_tag, multiple); |
8123 | |
|
8124 | 0 | return offset; |
8125 | 0 | } |
8126 | | |
8127 | | /* Dissection routine for method File.Qos */ |
8128 | | |
8129 | | static int |
8130 | | dissect_amqp_0_9_method_file_qos(tvbuff_t *tvb, |
8131 | | int offset, proto_tree *args_tree) |
8132 | 0 | { |
8133 | | /* prefetch-size (long) */ |
8134 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_file_qos_prefetch_size, |
8135 | 0 | tvb, offset, 4, ENC_BIG_ENDIAN); |
8136 | 0 | offset += 4; |
8137 | | |
8138 | | /* prefetch-count (short) */ |
8139 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_file_qos_prefetch_count, |
8140 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
8141 | 0 | offset += 2; |
8142 | | |
8143 | | /* global (bit) */ |
8144 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_file_qos_global, |
8145 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
8146 | |
|
8147 | 0 | return offset; |
8148 | 0 | } |
8149 | | |
8150 | | /* Dissection routine for method File.Qos-Ok */ |
8151 | | |
8152 | | static int |
8153 | | dissect_amqp_0_9_method_file_qos_ok(tvbuff_t *tvb _U_, |
8154 | | int offset, proto_tree *args_tree _U_) |
8155 | 0 | { |
8156 | 0 | return offset; |
8157 | 0 | } |
8158 | | |
8159 | | /* Dissection routine for method File.Consume */ |
8160 | | |
8161 | | static int |
8162 | | dissect_amqp_0_9_method_file_consume(tvbuff_t *tvb, packet_info *pinfo, |
8163 | | int offset, proto_tree *args_tree) |
8164 | 0 | { |
8165 | 0 | proto_item *ti; |
8166 | | |
8167 | | /* ticket (short) */ |
8168 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_file_consume_ticket, |
8169 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
8170 | 0 | offset += 2; |
8171 | | |
8172 | | /* queue (shortstr) */ |
8173 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_file_consume_queue, |
8174 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
8175 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
8176 | | |
8177 | | /* consumer-tag (shortstr) */ |
8178 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_file_consume_consumer_tag, |
8179 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
8180 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
8181 | | |
8182 | | /* no-local (bit) */ |
8183 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_file_consume_no_local, |
8184 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
8185 | | |
8186 | | /* no-ack (bit) */ |
8187 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_file_consume_no_ack, |
8188 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
8189 | | |
8190 | | /* exclusive (bit) */ |
8191 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_file_consume_exclusive, |
8192 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
8193 | | |
8194 | | /* nowait (bit) */ |
8195 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_file_consume_nowait, |
8196 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
8197 | |
|
8198 | 0 | offset += 1; |
8199 | | /* filter (table) */ |
8200 | 0 | ti = proto_tree_add_item( |
8201 | 0 | args_tree, hf_amqp_method_file_consume_filter, |
8202 | 0 | tvb, offset + 4, tvb_get_ntohl(tvb, offset), ENC_NA); |
8203 | 0 | dissect_amqp_0_9_field_table(tvb, pinfo, offset + 4, tvb_get_ntohl(tvb, offset), ti); |
8204 | 0 | offset += 4 + tvb_get_ntohl(tvb, offset); |
8205 | |
|
8206 | 0 | return offset; |
8207 | 0 | } |
8208 | | |
8209 | | /* Dissection routine for method File.Consume-Ok */ |
8210 | | |
8211 | | static int |
8212 | | dissect_amqp_0_9_method_file_consume_ok(tvbuff_t *tvb, |
8213 | | int offset, proto_tree *args_tree) |
8214 | 0 | { |
8215 | | /* consumer-tag (shortstr) */ |
8216 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_file_consume_ok_consumer_tag, |
8217 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
8218 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
8219 | |
|
8220 | 0 | return offset; |
8221 | 0 | } |
8222 | | |
8223 | | /* Dissection routine for method File.Cancel */ |
8224 | | |
8225 | | static int |
8226 | | dissect_amqp_0_9_method_file_cancel(tvbuff_t *tvb, |
8227 | | int offset, proto_tree *args_tree) |
8228 | 0 | { |
8229 | | /* consumer-tag (shortstr) */ |
8230 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_file_cancel_consumer_tag, |
8231 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
8232 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
8233 | | |
8234 | | /* nowait (bit) */ |
8235 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_file_cancel_nowait, |
8236 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
8237 | |
|
8238 | 0 | return offset; |
8239 | 0 | } |
8240 | | |
8241 | | /* Dissection routine for method File.Cancel-Ok */ |
8242 | | |
8243 | | static int |
8244 | | dissect_amqp_0_9_method_file_cancel_ok(tvbuff_t *tvb, |
8245 | | int offset, proto_tree *args_tree) |
8246 | 0 | { |
8247 | | /* consumer-tag (shortstr) */ |
8248 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_file_cancel_ok_consumer_tag, |
8249 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
8250 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
8251 | |
|
8252 | 0 | return offset; |
8253 | 0 | } |
8254 | | |
8255 | | /* Dissection routine for method File.Open */ |
8256 | | |
8257 | | static int |
8258 | | dissect_amqp_0_9_method_file_open(tvbuff_t *tvb, |
8259 | | int offset, proto_tree *args_tree) |
8260 | 0 | { |
8261 | | /* identifier (shortstr) */ |
8262 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_file_open_identifier, |
8263 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
8264 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
8265 | | |
8266 | | /* content-size (longlong) */ |
8267 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_file_open_content_size, |
8268 | 0 | tvb, offset, 8, ENC_BIG_ENDIAN); |
8269 | 0 | offset += 8; |
8270 | |
|
8271 | 0 | return offset; |
8272 | 0 | } |
8273 | | |
8274 | | /* Dissection routine for method File.Open-Ok */ |
8275 | | |
8276 | | static int |
8277 | | dissect_amqp_0_9_method_file_open_ok(tvbuff_t *tvb, |
8278 | | int offset, proto_tree *args_tree) |
8279 | 0 | { |
8280 | | /* staged-size (longlong) */ |
8281 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_file_open_ok_staged_size, |
8282 | 0 | tvb, offset, 8, ENC_BIG_ENDIAN); |
8283 | 0 | offset += 8; |
8284 | |
|
8285 | 0 | return offset; |
8286 | 0 | } |
8287 | | |
8288 | | /* Dissection routine for method File.Stage */ |
8289 | | |
8290 | | static int |
8291 | | dissect_amqp_0_9_method_file_stage(tvbuff_t *tvb _U_, |
8292 | | int offset, proto_tree *args_tree _U_) |
8293 | 0 | { |
8294 | 0 | return offset; |
8295 | 0 | } |
8296 | | |
8297 | | /* Dissection routine for method File.Publish */ |
8298 | | |
8299 | | static int |
8300 | | dissect_amqp_0_9_method_file_publish(tvbuff_t *tvb, |
8301 | | int offset, proto_tree *args_tree) |
8302 | 0 | { |
8303 | | /* ticket (short) */ |
8304 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_file_publish_ticket, |
8305 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
8306 | 0 | offset += 2; |
8307 | | |
8308 | | /* exchange (shortstr) */ |
8309 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_file_publish_exchange, |
8310 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
8311 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
8312 | | |
8313 | | /* routing-key (shortstr) */ |
8314 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_file_publish_routing_key, |
8315 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
8316 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
8317 | | |
8318 | | /* mandatory (bit) */ |
8319 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_file_publish_mandatory, |
8320 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
8321 | | |
8322 | | /* immediate (bit) */ |
8323 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_file_publish_immediate, |
8324 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
8325 | |
|
8326 | 0 | offset += 1; |
8327 | | /* identifier (shortstr) */ |
8328 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_file_publish_identifier, |
8329 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
8330 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
8331 | |
|
8332 | 0 | return offset; |
8333 | 0 | } |
8334 | | |
8335 | | /* Dissection routine for method File.Return */ |
8336 | | |
8337 | | static int |
8338 | | dissect_amqp_0_9_method_file_return(tvbuff_t *tvb, |
8339 | | int offset, proto_tree *args_tree) |
8340 | 0 | { |
8341 | | /* reply-code (short) */ |
8342 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_file_return_reply_code, |
8343 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
8344 | 0 | offset += 2; |
8345 | | |
8346 | | /* reply-text (shortstr) */ |
8347 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_file_return_reply_text, |
8348 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
8349 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
8350 | | |
8351 | | /* exchange (shortstr) */ |
8352 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_file_return_exchange, |
8353 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
8354 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
8355 | | |
8356 | | /* routing-key (shortstr) */ |
8357 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_file_return_routing_key, |
8358 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
8359 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
8360 | |
|
8361 | 0 | return offset; |
8362 | 0 | } |
8363 | | |
8364 | | /* Dissection routine for method File.Deliver */ |
8365 | | |
8366 | | static int |
8367 | | dissect_amqp_0_9_method_file_deliver(tvbuff_t *tvb, |
8368 | | int offset, proto_tree *args_tree) |
8369 | 0 | { |
8370 | | /* consumer-tag (shortstr) */ |
8371 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_file_deliver_consumer_tag, |
8372 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
8373 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
8374 | | |
8375 | | /* delivery-tag (longlong) */ |
8376 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_file_deliver_delivery_tag, |
8377 | 0 | tvb, offset, 8, ENC_BIG_ENDIAN); |
8378 | 0 | offset += 8; |
8379 | | |
8380 | | /* redelivered (bit) */ |
8381 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_file_deliver_redelivered, |
8382 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
8383 | |
|
8384 | 0 | offset += 1; |
8385 | | /* exchange (shortstr) */ |
8386 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_file_deliver_exchange, |
8387 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
8388 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
8389 | | |
8390 | | /* routing-key (shortstr) */ |
8391 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_file_deliver_routing_key, |
8392 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
8393 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
8394 | | |
8395 | | /* identifier (shortstr) */ |
8396 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_file_deliver_identifier, |
8397 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
8398 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
8399 | |
|
8400 | 0 | return offset; |
8401 | 0 | } |
8402 | | |
8403 | | /* Dissection routine for method File.Ack */ |
8404 | | |
8405 | | static int |
8406 | | dissect_amqp_0_9_method_file_ack(tvbuff_t *tvb, |
8407 | | int offset, proto_tree *args_tree) |
8408 | 0 | { |
8409 | | /* delivery-tag (longlong) */ |
8410 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_file_ack_delivery_tag, |
8411 | 0 | tvb, offset, 8, ENC_BIG_ENDIAN); |
8412 | 0 | offset += 8; |
8413 | | |
8414 | | /* multiple (bit) */ |
8415 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_file_ack_multiple, |
8416 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
8417 | |
|
8418 | 0 | return offset; |
8419 | 0 | } |
8420 | | |
8421 | | /* Dissection routine for method File.Reject */ |
8422 | | |
8423 | | static int |
8424 | | dissect_amqp_0_9_method_file_reject(tvbuff_t *tvb, |
8425 | | int offset, proto_tree *args_tree) |
8426 | 0 | { |
8427 | | /* delivery-tag (longlong) */ |
8428 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_file_reject_delivery_tag, |
8429 | 0 | tvb, offset, 8, ENC_BIG_ENDIAN); |
8430 | 0 | offset += 8; |
8431 | | |
8432 | | /* requeue (bit) */ |
8433 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_file_reject_requeue, |
8434 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
8435 | |
|
8436 | 0 | return offset; |
8437 | 0 | } |
8438 | | |
8439 | | /* Dissection routine for method Stream.Qos */ |
8440 | | |
8441 | | static int |
8442 | | dissect_amqp_0_9_method_stream_qos(tvbuff_t *tvb, |
8443 | | int offset, proto_tree *args_tree) |
8444 | 0 | { |
8445 | | /* prefetch-size (long) */ |
8446 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_stream_qos_prefetch_size, |
8447 | 0 | tvb, offset, 4, ENC_BIG_ENDIAN); |
8448 | 0 | offset += 4; |
8449 | | |
8450 | | /* prefetch-count (short) */ |
8451 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_stream_qos_prefetch_count, |
8452 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
8453 | 0 | offset += 2; |
8454 | | |
8455 | | /* consume-rate (long) */ |
8456 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_stream_qos_consume_rate, |
8457 | 0 | tvb, offset, 4, ENC_BIG_ENDIAN); |
8458 | 0 | offset += 4; |
8459 | | |
8460 | | /* global (bit) */ |
8461 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_stream_qos_global, |
8462 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
8463 | |
|
8464 | 0 | return offset; |
8465 | 0 | } |
8466 | | |
8467 | | /* Dissection routine for method Stream.Qos-Ok */ |
8468 | | |
8469 | | static int |
8470 | | dissect_amqp_0_9_method_stream_qos_ok(tvbuff_t *tvb _U_, |
8471 | | int offset, proto_tree *args_tree _U_) |
8472 | 0 | { |
8473 | 0 | return offset; |
8474 | 0 | } |
8475 | | |
8476 | | /* Dissection routine for method Stream.Consume */ |
8477 | | |
8478 | | static int |
8479 | | dissect_amqp_0_9_method_stream_consume(tvbuff_t *tvb, packet_info *pinfo, |
8480 | | int offset, proto_tree *args_tree) |
8481 | 0 | { |
8482 | 0 | proto_item *ti; |
8483 | | |
8484 | | /* ticket (short) */ |
8485 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_stream_consume_ticket, |
8486 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
8487 | 0 | offset += 2; |
8488 | | |
8489 | | /* queue (shortstr) */ |
8490 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_stream_consume_queue, |
8491 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
8492 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
8493 | | |
8494 | | /* consumer-tag (shortstr) */ |
8495 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_stream_consume_consumer_tag, |
8496 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
8497 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
8498 | | |
8499 | | /* no-local (bit) */ |
8500 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_stream_consume_no_local, |
8501 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
8502 | | |
8503 | | /* exclusive (bit) */ |
8504 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_stream_consume_exclusive, |
8505 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
8506 | | |
8507 | | /* nowait (bit) */ |
8508 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_stream_consume_nowait, |
8509 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
8510 | |
|
8511 | 0 | offset += 1; |
8512 | | /* filter (table) */ |
8513 | 0 | ti = proto_tree_add_item( |
8514 | 0 | args_tree, hf_amqp_method_stream_consume_filter, |
8515 | 0 | tvb, offset + 4, tvb_get_ntohl(tvb, offset), ENC_NA); |
8516 | 0 | dissect_amqp_0_9_field_table(tvb, pinfo, offset + 4, tvb_get_ntohl(tvb, offset), ti); |
8517 | 0 | offset += 4 + tvb_get_ntohl(tvb, offset); |
8518 | |
|
8519 | 0 | return offset; |
8520 | 0 | } |
8521 | | |
8522 | | /* Dissection routine for method Stream.Consume-Ok */ |
8523 | | |
8524 | | static int |
8525 | | dissect_amqp_0_9_method_stream_consume_ok(tvbuff_t *tvb, |
8526 | | int offset, proto_tree *args_tree) |
8527 | 0 | { |
8528 | | /* consumer-tag (shortstr) */ |
8529 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_stream_consume_ok_consumer_tag, |
8530 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
8531 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
8532 | |
|
8533 | 0 | return offset; |
8534 | 0 | } |
8535 | | |
8536 | | /* Dissection routine for method Stream.Cancel */ |
8537 | | |
8538 | | static int |
8539 | | dissect_amqp_0_9_method_stream_cancel(tvbuff_t *tvb, |
8540 | | int offset, proto_tree *args_tree) |
8541 | 0 | { |
8542 | | /* consumer-tag (shortstr) */ |
8543 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_stream_cancel_consumer_tag, |
8544 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
8545 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
8546 | | |
8547 | | /* nowait (bit) */ |
8548 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_stream_cancel_nowait, |
8549 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
8550 | |
|
8551 | 0 | return offset; |
8552 | 0 | } |
8553 | | |
8554 | | /* Dissection routine for method Stream.Cancel-Ok */ |
8555 | | |
8556 | | static int |
8557 | | dissect_amqp_0_9_method_stream_cancel_ok(tvbuff_t *tvb, |
8558 | | int offset, proto_tree *args_tree) |
8559 | 0 | { |
8560 | | /* consumer-tag (shortstr) */ |
8561 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_stream_cancel_ok_consumer_tag, |
8562 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
8563 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
8564 | |
|
8565 | 0 | return offset; |
8566 | 0 | } |
8567 | | |
8568 | | /* Dissection routine for method Stream.Publish */ |
8569 | | |
8570 | | static int |
8571 | | dissect_amqp_0_9_method_stream_publish(tvbuff_t *tvb, |
8572 | | int offset, proto_tree *args_tree) |
8573 | 0 | { |
8574 | | /* ticket (short) */ |
8575 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_stream_publish_ticket, |
8576 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
8577 | 0 | offset += 2; |
8578 | | |
8579 | | /* exchange (shortstr) */ |
8580 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_stream_publish_exchange, |
8581 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
8582 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
8583 | | |
8584 | | /* routing-key (shortstr) */ |
8585 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_stream_publish_routing_key, |
8586 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
8587 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
8588 | | |
8589 | | /* mandatory (bit) */ |
8590 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_stream_publish_mandatory, |
8591 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
8592 | | |
8593 | | /* immediate (bit) */ |
8594 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_stream_publish_immediate, |
8595 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
8596 | |
|
8597 | 0 | return offset; |
8598 | 0 | } |
8599 | | |
8600 | | /* Dissection routine for method Stream.Return */ |
8601 | | |
8602 | | static int |
8603 | | dissect_amqp_0_9_method_stream_return(tvbuff_t *tvb, |
8604 | | int offset, proto_tree *args_tree) |
8605 | 0 | { |
8606 | | /* reply-code (short) */ |
8607 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_stream_return_reply_code, |
8608 | 0 | tvb, offset, 2, ENC_BIG_ENDIAN); |
8609 | 0 | offset += 2; |
8610 | | |
8611 | | /* reply-text (shortstr) */ |
8612 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_stream_return_reply_text, |
8613 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
8614 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
8615 | | |
8616 | | /* exchange (shortstr) */ |
8617 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_stream_return_exchange, |
8618 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
8619 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
8620 | | |
8621 | | /* routing-key (shortstr) */ |
8622 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_stream_return_routing_key, |
8623 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
8624 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
8625 | |
|
8626 | 0 | return offset; |
8627 | 0 | } |
8628 | | |
8629 | | /* Dissection routine for method Stream.Deliver */ |
8630 | | |
8631 | | static int |
8632 | | dissect_amqp_0_9_method_stream_deliver(tvbuff_t *tvb, |
8633 | | int offset, proto_tree *args_tree) |
8634 | 0 | { |
8635 | | /* consumer-tag (shortstr) */ |
8636 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_stream_deliver_consumer_tag, |
8637 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
8638 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
8639 | | |
8640 | | /* delivery-tag (longlong) */ |
8641 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_stream_deliver_delivery_tag, |
8642 | 0 | tvb, offset, 8, ENC_BIG_ENDIAN); |
8643 | 0 | offset += 8; |
8644 | | |
8645 | | /* exchange (shortstr) */ |
8646 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_stream_deliver_exchange, |
8647 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
8648 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
8649 | | |
8650 | | /* queue (shortstr) */ |
8651 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_stream_deliver_queue, |
8652 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
8653 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
8654 | |
|
8655 | 0 | return offset; |
8656 | 0 | } |
8657 | | |
8658 | | /* Dissection routine for method Tx.Select */ |
8659 | | |
8660 | | static int |
8661 | | dissect_amqp_0_9_method_tx_select(tvbuff_t *tvb _U_, |
8662 | | int offset, proto_tree *args_tree _U_) |
8663 | 0 | { |
8664 | 0 | return offset; |
8665 | 0 | } |
8666 | | |
8667 | | /* Dissection routine for method Tx.Select-Ok */ |
8668 | | |
8669 | | static int |
8670 | | dissect_amqp_0_9_method_tx_select_ok(tvbuff_t *tvb _U_, |
8671 | | int offset, proto_tree *args_tree _U_) |
8672 | 0 | { |
8673 | 0 | return offset; |
8674 | 0 | } |
8675 | | |
8676 | | /* Dissection routine for method Tx.Commit */ |
8677 | | |
8678 | | static int |
8679 | | dissect_amqp_0_9_method_tx_commit(tvbuff_t *tvb _U_, |
8680 | | int offset, proto_tree *args_tree _U_) |
8681 | 0 | { |
8682 | 0 | return offset; |
8683 | 0 | } |
8684 | | |
8685 | | /* Dissection routine for method Tx.Commit-Ok */ |
8686 | | |
8687 | | static int |
8688 | | dissect_amqp_0_9_method_tx_commit_ok(tvbuff_t *tvb _U_, |
8689 | | int offset, proto_tree *args_tree _U_) |
8690 | 0 | { |
8691 | 0 | return offset; |
8692 | 0 | } |
8693 | | |
8694 | | /* Dissection routine for method Tx.Rollback */ |
8695 | | |
8696 | | static int |
8697 | | dissect_amqp_0_9_method_tx_rollback(tvbuff_t *tvb _U_, |
8698 | | int offset, proto_tree *args_tree _U_) |
8699 | 0 | { |
8700 | 0 | return offset; |
8701 | 0 | } |
8702 | | |
8703 | | /* Dissection routine for method Tx.Rollback-Ok */ |
8704 | | |
8705 | | static int |
8706 | | dissect_amqp_0_9_method_tx_rollback_ok(tvbuff_t *tvb _U_, |
8707 | | int offset, proto_tree *args_tree _U_) |
8708 | 0 | { |
8709 | 0 | return offset; |
8710 | 0 | } |
8711 | | |
8712 | | /* Dissection routine for method Dtx.Select */ |
8713 | | |
8714 | | static int |
8715 | | dissect_amqp_0_9_method_dtx_select(tvbuff_t *tvb _U_, |
8716 | | int offset, proto_tree *args_tree _U_) |
8717 | 0 | { |
8718 | 0 | return offset; |
8719 | 0 | } |
8720 | | |
8721 | | /* Dissection routine for method Dtx.Select-Ok */ |
8722 | | |
8723 | | static int |
8724 | | dissect_amqp_0_9_method_dtx_select_ok(tvbuff_t *tvb _U_, |
8725 | | int offset, proto_tree *args_tree _U_) |
8726 | 0 | { |
8727 | 0 | return offset; |
8728 | 0 | } |
8729 | | |
8730 | | /* Dissection routine for method Dtx.Start */ |
8731 | | |
8732 | | static int |
8733 | | dissect_amqp_0_9_method_dtx_start(tvbuff_t *tvb, |
8734 | | int offset, proto_tree *args_tree) |
8735 | 0 | { |
8736 | | /* dtx-identifier (shortstr) */ |
8737 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_dtx_start_dtx_identifier, |
8738 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
8739 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
8740 | |
|
8741 | 0 | return offset; |
8742 | 0 | } |
8743 | | |
8744 | | /* Dissection routine for method Dtx.Start-Ok */ |
8745 | | |
8746 | | static int |
8747 | | dissect_amqp_0_9_method_dtx_start_ok(tvbuff_t *tvb _U_, |
8748 | | int offset, proto_tree *args_tree _U_) |
8749 | 0 | { |
8750 | 0 | return offset; |
8751 | 0 | } |
8752 | | |
8753 | | /* Dissection routine for method Tunnel.Request */ |
8754 | | |
8755 | | static int |
8756 | | dissect_amqp_0_9_method_tunnel_request(tvbuff_t *tvb, packet_info *pinfo, |
8757 | | int offset, proto_tree *args_tree) |
8758 | 0 | { |
8759 | 0 | proto_item *ti; |
8760 | | |
8761 | | /* meta-data (table) */ |
8762 | 0 | ti = proto_tree_add_item( |
8763 | 0 | args_tree, hf_amqp_method_tunnel_request_meta_data, |
8764 | 0 | tvb, offset + 4, tvb_get_ntohl(tvb, offset), ENC_NA); |
8765 | 0 | dissect_amqp_0_9_field_table(tvb, pinfo, offset + 4, tvb_get_ntohl(tvb, offset), ti); |
8766 | 0 | offset += 4 + tvb_get_ntohl(tvb, offset); |
8767 | |
|
8768 | 0 | return offset; |
8769 | 0 | } |
8770 | | |
8771 | | /* Dissection routine for method Confirm.Select */ |
8772 | | |
8773 | | static int |
8774 | | dissect_amqp_0_9_method_confirm_select(tvbuff_t *tvb, |
8775 | | int offset, proto_tree *args_tree) |
8776 | 0 | { |
8777 | | /* nowait (bit) */ |
8778 | 0 | proto_tree_add_item(args_tree, hf_amqp_method_confirm_select_nowait, |
8779 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
8780 | |
|
8781 | 0 | return offset; |
8782 | 0 | } |
8783 | | |
8784 | | /* Dissection routine for method Confirm.Select-Ok */ |
8785 | | |
8786 | | static int |
8787 | | dissect_amqp_0_9_method_confirm_select_ok(uint16_t channel_num, |
8788 | | tvbuff_t *tvb _U_, packet_info *pinfo, int offset, proto_tree *args_tree _U_) |
8789 | 0 | { |
8790 | 0 | if(!PINFO_FD_VISITED(pinfo)) |
8791 | 0 | { |
8792 | 0 | amqp_channel_t *channel; |
8793 | 0 | channel = get_conversation_channel(find_or_create_conversation(pinfo), channel_num); |
8794 | 0 | channel->confirms = true; |
8795 | 0 | } |
8796 | |
|
8797 | 0 | return offset; |
8798 | 0 | } |
8799 | | |
8800 | | |
8801 | | /* Dissection routine for content headers of class basic */ |
8802 | | |
8803 | | static int |
8804 | | dissect_amqp_0_9_content_header_basic(tvbuff_t *tvb, packet_info *pinfo, |
8805 | | int offset, proto_tree *prop_tree, amqp_content_params *eh_ptr) |
8806 | 0 | { |
8807 | 0 | proto_item *ti; |
8808 | 0 | uint16_t prop_flags; |
8809 | 0 | nstime_t tv; |
8810 | 0 | const uint8_t *content; |
8811 | |
|
8812 | 0 | prop_flags = tvb_get_ntohs(tvb, 19); |
8813 | |
|
8814 | 0 | if (prop_flags & 0x8000) { |
8815 | | /* content-type (shortstr) */ |
8816 | 0 | proto_tree_add_item_ret_string(prop_tree, hf_amqp_header_basic_content_type, |
8817 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII|ENC_NA, pinfo->pool, &content); |
8818 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "type=%s ", content); |
8819 | |
|
8820 | 0 | eh_ptr->type = ascii_strdown_inplace( |
8821 | 0 | (char*)tvb_get_string_enc(wmem_file_scope(), tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII)); |
8822 | |
|
8823 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
8824 | 0 | } |
8825 | 0 | prop_flags <<= 1; |
8826 | |
|
8827 | 0 | if (prop_flags & 0x8000) { |
8828 | | /* content-encoding (shortstr) */ |
8829 | 0 | proto_tree_add_item(prop_tree, hf_amqp_header_basic_content_encoding, |
8830 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
8831 | |
|
8832 | 0 | eh_ptr->encoding = ascii_strdown_inplace( |
8833 | 0 | tvb_get_string_enc(wmem_file_scope(), tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII)); |
8834 | |
|
8835 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
8836 | 0 | } |
8837 | 0 | prop_flags <<= 1; |
8838 | |
|
8839 | 0 | if (prop_flags & 0x8000) { |
8840 | | /* headers (table) */ |
8841 | 0 | ti = proto_tree_add_item( |
8842 | 0 | prop_tree, hf_amqp_header_basic_headers, |
8843 | 0 | tvb, offset + 4, tvb_get_ntohl(tvb, offset), ENC_NA); |
8844 | 0 | dissect_amqp_0_9_field_table(tvb, pinfo, offset + 4, tvb_get_ntohl(tvb, offset), ti); |
8845 | 0 | offset += 4 + tvb_get_ntohl(tvb, offset); |
8846 | 0 | } |
8847 | 0 | prop_flags <<= 1; |
8848 | |
|
8849 | 0 | if (prop_flags & 0x8000) { |
8850 | | /* delivery-mode (octet) */ |
8851 | 0 | proto_tree_add_item(prop_tree, hf_amqp_header_basic_delivery_mode, |
8852 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
8853 | 0 | offset += 1; |
8854 | 0 | } |
8855 | 0 | prop_flags <<= 1; |
8856 | |
|
8857 | 0 | if (prop_flags & 0x8000) { |
8858 | | /* priority (octet) */ |
8859 | 0 | proto_tree_add_item(prop_tree, hf_amqp_header_basic_priority, |
8860 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
8861 | 0 | offset += 1; |
8862 | 0 | } |
8863 | 0 | prop_flags <<= 1; |
8864 | |
|
8865 | 0 | if (prop_flags & 0x8000) { |
8866 | | /* correlation-id (shortstr) */ |
8867 | 0 | proto_tree_add_item(prop_tree, hf_amqp_header_basic_correlation_id, |
8868 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
8869 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
8870 | 0 | } |
8871 | 0 | prop_flags <<= 1; |
8872 | |
|
8873 | 0 | if (prop_flags & 0x8000) { |
8874 | | /* reply-to (shortstr) */ |
8875 | 0 | proto_tree_add_item(prop_tree, hf_amqp_header_basic_reply_to, |
8876 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
8877 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
8878 | 0 | } |
8879 | 0 | prop_flags <<= 1; |
8880 | |
|
8881 | 0 | if (prop_flags & 0x8000) { |
8882 | | /* expiration (shortstr) */ |
8883 | 0 | proto_tree_add_item(prop_tree, hf_amqp_header_basic_expiration, |
8884 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
8885 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
8886 | 0 | } |
8887 | 0 | prop_flags <<= 1; |
8888 | |
|
8889 | 0 | if (prop_flags & 0x8000) { |
8890 | | /* message-id (shortstr) */ |
8891 | 0 | proto_tree_add_item(prop_tree, hf_amqp_header_basic_message_id, |
8892 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
8893 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
8894 | 0 | } |
8895 | 0 | prop_flags <<= 1; |
8896 | |
|
8897 | 0 | if (prop_flags & 0x8000) { |
8898 | | /* timestamp (timestamp) */ |
8899 | 0 | tv.secs = (time_t)tvb_get_ntoh64(tvb, offset); |
8900 | 0 | tv.nsecs = 0; |
8901 | 0 | proto_tree_add_time(prop_tree, hf_amqp_header_basic_timestamp, |
8902 | 0 | tvb, offset, 8, &tv); |
8903 | 0 | offset += 8; |
8904 | 0 | } |
8905 | 0 | prop_flags <<= 1; |
8906 | |
|
8907 | 0 | if (prop_flags & 0x8000) { |
8908 | | /* type (shortstr) */ |
8909 | 0 | proto_tree_add_item(prop_tree, hf_amqp_header_basic_type, |
8910 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
8911 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
8912 | 0 | } |
8913 | 0 | prop_flags <<= 1; |
8914 | |
|
8915 | 0 | if (prop_flags & 0x8000) { |
8916 | | /* user-id (shortstr) */ |
8917 | 0 | proto_tree_add_item(prop_tree, hf_amqp_header_basic_user_id, |
8918 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
8919 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
8920 | 0 | } |
8921 | 0 | prop_flags <<= 1; |
8922 | |
|
8923 | 0 | if (prop_flags & 0x8000) { |
8924 | | /* app-id (shortstr) */ |
8925 | 0 | proto_tree_add_item(prop_tree, hf_amqp_header_basic_app_id, |
8926 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
8927 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
8928 | 0 | } |
8929 | 0 | prop_flags <<= 1; |
8930 | |
|
8931 | 0 | if (prop_flags & 0x8000) { |
8932 | | /* cluster-id (shortstr) */ |
8933 | 0 | proto_tree_add_item(prop_tree, hf_amqp_header_basic_cluster_id, |
8934 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
8935 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
8936 | 0 | } |
8937 | | /*prop_flags <<= 1;*/ |
8938 | |
|
8939 | 0 | return offset; |
8940 | 0 | } |
8941 | | /* Dissection routine for content headers of class file */ |
8942 | | |
8943 | | static int |
8944 | | dissect_amqp_0_9_content_header_file(tvbuff_t *tvb, packet_info *pinfo, |
8945 | | int offset, proto_tree *prop_tree) |
8946 | 0 | { |
8947 | 0 | proto_item *ti; |
8948 | 0 | uint16_t prop_flags; |
8949 | 0 | nstime_t tv; |
8950 | 0 | const uint8_t *content; |
8951 | |
|
8952 | 0 | prop_flags = tvb_get_ntohs(tvb, 19); |
8953 | |
|
8954 | 0 | if (prop_flags & 0x8000) { |
8955 | | /* content-type (shortstr) */ |
8956 | 0 | proto_tree_add_item_ret_string(prop_tree, hf_amqp_header_file_content_type, |
8957 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII|ENC_NA, pinfo->pool, &content); |
8958 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "type=%s ", content); |
8959 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
8960 | 0 | } |
8961 | 0 | prop_flags <<= 1; |
8962 | |
|
8963 | 0 | if (prop_flags & 0x8000) { |
8964 | | /* content-encoding (shortstr) */ |
8965 | 0 | proto_tree_add_item(prop_tree, hf_amqp_header_file_content_encoding, |
8966 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
8967 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
8968 | 0 | } |
8969 | 0 | prop_flags <<= 1; |
8970 | |
|
8971 | 0 | if (prop_flags & 0x8000) { |
8972 | | /* headers (table) */ |
8973 | 0 | ti = proto_tree_add_item(prop_tree, hf_amqp_header_file_headers, |
8974 | 0 | tvb, offset + 4, tvb_get_ntohl(tvb, offset), ENC_NA); |
8975 | 0 | dissect_amqp_0_9_field_table(tvb, pinfo, offset + 4, tvb_get_ntohl(tvb, offset), ti); |
8976 | 0 | offset += 4 + tvb_get_ntohl(tvb, offset); |
8977 | 0 | } |
8978 | 0 | prop_flags <<= 1; |
8979 | |
|
8980 | 0 | if (prop_flags & 0x8000) { |
8981 | | /* priority (octet) */ |
8982 | 0 | proto_tree_add_item(prop_tree, hf_amqp_header_file_priority, |
8983 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
8984 | 0 | offset += 1; |
8985 | 0 | } |
8986 | 0 | prop_flags <<= 1; |
8987 | |
|
8988 | 0 | if (prop_flags & 0x8000) { |
8989 | | /* reply-to (shortstr) */ |
8990 | 0 | proto_tree_add_item(prop_tree, hf_amqp_header_file_reply_to, |
8991 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
8992 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
8993 | 0 | } |
8994 | 0 | prop_flags <<= 1; |
8995 | |
|
8996 | 0 | if (prop_flags & 0x8000) { |
8997 | | /* message-id (shortstr) */ |
8998 | 0 | proto_tree_add_item(prop_tree, hf_amqp_header_file_message_id, |
8999 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
9000 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
9001 | 0 | } |
9002 | 0 | prop_flags <<= 1; |
9003 | |
|
9004 | 0 | if (prop_flags & 0x8000) { |
9005 | | /* filename (shortstr) */ |
9006 | 0 | proto_tree_add_item(prop_tree, hf_amqp_header_file_filename, |
9007 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
9008 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
9009 | 0 | } |
9010 | 0 | prop_flags <<= 1; |
9011 | |
|
9012 | 0 | if (prop_flags & 0x8000) { |
9013 | | /* timestamp (timestamp) */ |
9014 | 0 | tv.secs = (time_t)tvb_get_ntoh64(tvb, offset); |
9015 | 0 | tv.nsecs = 0; |
9016 | 0 | proto_tree_add_time(prop_tree, hf_amqp_header_file_timestamp, |
9017 | 0 | tvb, offset, 8, &tv); |
9018 | 0 | offset += 8; |
9019 | 0 | } |
9020 | 0 | prop_flags <<= 1; |
9021 | |
|
9022 | 0 | if (prop_flags & 0x8000) { |
9023 | | /* cluster-id (shortstr) */ |
9024 | 0 | proto_tree_add_item(prop_tree, hf_amqp_header_file_cluster_id, |
9025 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
9026 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
9027 | 0 | } |
9028 | | /*prop_flags <<= 1;*/ |
9029 | |
|
9030 | 0 | return offset; |
9031 | 0 | } |
9032 | | /* Dissection routine for content headers of class stream */ |
9033 | | |
9034 | | static int |
9035 | | dissect_amqp_0_9_content_header_stream(tvbuff_t *tvb, packet_info *pinfo, |
9036 | | int offset, proto_tree *prop_tree) |
9037 | 0 | { |
9038 | 0 | proto_item *ti; |
9039 | 0 | uint16_t prop_flags; |
9040 | 0 | nstime_t tv; |
9041 | 0 | const uint8_t *content; |
9042 | |
|
9043 | 0 | prop_flags = tvb_get_ntohs(tvb, 19); |
9044 | |
|
9045 | 0 | if (prop_flags & 0x8000) { |
9046 | | /* content-type (shortstr) */ |
9047 | 0 | proto_tree_add_item_ret_string(prop_tree, hf_amqp_header_stream_content_type, |
9048 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII|ENC_NA, pinfo->pool, &content); |
9049 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "type=%s ", content); |
9050 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
9051 | 0 | } |
9052 | 0 | prop_flags <<= 1; |
9053 | |
|
9054 | 0 | if (prop_flags & 0x8000) { |
9055 | | /* content-encoding (shortstr) */ |
9056 | 0 | proto_tree_add_item(prop_tree, hf_amqp_header_stream_content_encoding, |
9057 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
9058 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
9059 | 0 | } |
9060 | 0 | prop_flags <<= 1; |
9061 | |
|
9062 | 0 | if (prop_flags & 0x8000) { |
9063 | | /* headers (table) */ |
9064 | 0 | ti = proto_tree_add_item(prop_tree, hf_amqp_header_stream_headers, |
9065 | 0 | tvb, offset + 4, tvb_get_ntohl(tvb, offset), ENC_NA); |
9066 | 0 | dissect_amqp_0_9_field_table(tvb, pinfo, offset + 4, tvb_get_ntohl(tvb, offset), ti); |
9067 | 0 | offset += 4 + tvb_get_ntohl(tvb, offset); |
9068 | 0 | } |
9069 | 0 | prop_flags <<= 1; |
9070 | |
|
9071 | 0 | if (prop_flags & 0x8000) { |
9072 | | /* priority (octet) */ |
9073 | 0 | proto_tree_add_item(prop_tree, hf_amqp_header_stream_priority, |
9074 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
9075 | 0 | offset += 1; |
9076 | 0 | } |
9077 | 0 | prop_flags <<= 1; |
9078 | |
|
9079 | 0 | if (prop_flags & 0x8000) { |
9080 | | /* timestamp (timestamp) */ |
9081 | 0 | tv.secs = (time_t)tvb_get_ntoh64(tvb, offset); |
9082 | 0 | tv.nsecs = 0; |
9083 | 0 | proto_tree_add_time(prop_tree, hf_amqp_header_stream_timestamp, |
9084 | 0 | tvb, offset, 8, &tv); |
9085 | 0 | offset += 8; |
9086 | 0 | } |
9087 | | /*prop_flags <<= 1;*/ |
9088 | |
|
9089 | 0 | return offset; |
9090 | 0 | } |
9091 | | |
9092 | | /* Dissection routine for content headers of class tunnel */ |
9093 | | |
9094 | | static int |
9095 | | dissect_amqp_0_9_content_header_tunnel(tvbuff_t *tvb, packet_info *pinfo, |
9096 | | int offset, proto_tree *prop_tree) |
9097 | 0 | { |
9098 | 0 | proto_item *ti; |
9099 | 0 | uint16_t prop_flags; |
9100 | |
|
9101 | 0 | prop_flags = tvb_get_ntohs(tvb, 19); |
9102 | |
|
9103 | 0 | if (prop_flags & 0x8000) { |
9104 | | /* headers (table) */ |
9105 | 0 | ti = proto_tree_add_item(prop_tree, hf_amqp_header_tunnel_headers, |
9106 | 0 | tvb, offset + 4, tvb_get_ntohl(tvb, offset), ENC_NA); |
9107 | 0 | dissect_amqp_0_9_field_table(tvb, pinfo, offset + 4, tvb_get_ntohl(tvb, offset), ti); |
9108 | 0 | offset += 4 + tvb_get_ntohl(tvb, offset); |
9109 | 0 | } |
9110 | 0 | prop_flags <<= 1; |
9111 | |
|
9112 | 0 | if (prop_flags & 0x8000) { |
9113 | | /* proxy-name (shortstr) */ |
9114 | 0 | proto_tree_add_item(prop_tree, hf_amqp_header_tunnel_proxy_name, |
9115 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
9116 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
9117 | 0 | } |
9118 | 0 | prop_flags <<= 1; |
9119 | |
|
9120 | 0 | if (prop_flags & 0x8000) { |
9121 | | /* data-name (shortstr) */ |
9122 | 0 | proto_tree_add_item(prop_tree, hf_amqp_header_tunnel_data_name, |
9123 | 0 | tvb, offset + 1, tvb_get_uint8(tvb, offset), ENC_ASCII); |
9124 | 0 | offset += 1 + tvb_get_uint8(tvb, offset); |
9125 | 0 | } |
9126 | 0 | prop_flags <<= 1; |
9127 | |
|
9128 | 0 | if (prop_flags & 0x8000) { |
9129 | | /* durable (octet) */ |
9130 | 0 | proto_tree_add_item(prop_tree, hf_amqp_header_tunnel_durable, |
9131 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
9132 | 0 | offset += 1; |
9133 | 0 | } |
9134 | 0 | prop_flags <<= 1; |
9135 | |
|
9136 | 0 | if (prop_flags & 0x8000) { |
9137 | | /* broadcast (octet) */ |
9138 | 0 | proto_tree_add_item(prop_tree, hf_amqp_header_tunnel_broadcast, |
9139 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
9140 | 0 | offset += 1; |
9141 | 0 | } |
9142 | | /*prop_flags <<= 1;*/ |
9143 | |
|
9144 | 0 | return offset; |
9145 | 0 | } |
9146 | | |
9147 | | /* Dissection routine for AMQP 0-9 frames */ |
9148 | | |
9149 | | static int |
9150 | | dissect_amqp_0_9_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
9151 | 0 | { |
9152 | 0 | proto_item *ti; |
9153 | 0 | proto_item *amqp_tree = NULL; |
9154 | 0 | proto_item *args_tree; |
9155 | 0 | proto_item *prop_tree; |
9156 | 0 | unsigned length; |
9157 | 0 | uint8_t frame_type; |
9158 | 0 | uint16_t channel_num, class_id, method_id; |
9159 | | |
9160 | | /* Heuristic - protocol initialisation frame starts with 'AMQP' */ |
9161 | 0 | if (tvb_memeql(tvb, 0, (const uint8_t*)"AMQP", 4) == 0) { |
9162 | 0 | uint8_t proto_id, proto_major, proto_minor; |
9163 | |
|
9164 | 0 | proto_id = tvb_get_uint8(tvb, 5); |
9165 | 0 | proto_major = tvb_get_uint8(tvb, 6); |
9166 | 0 | proto_minor = tvb_get_uint8(tvb, 7); |
9167 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "Protocol-Header %u-%u-%u", |
9168 | 0 | proto_id, |
9169 | 0 | proto_major, |
9170 | 0 | proto_minor); |
9171 | 0 | col_set_fence(pinfo->cinfo, COL_INFO); |
9172 | |
|
9173 | 0 | if (tree) { |
9174 | 0 | ti = proto_tree_add_item(tree, proto_amqp, tvb, 0, -1, ENC_NA); |
9175 | 0 | amqp_tree = proto_item_add_subtree(ti, ett_amqp_init); |
9176 | 0 | proto_tree_add_item(amqp_tree, hf_amqp_init_protocol, tvb, 0, 4, ENC_ASCII); |
9177 | 0 | proto_tree_add_item(amqp_tree, hf_amqp_init_id_major, tvb, 4, 1, ENC_BIG_ENDIAN); |
9178 | 0 | proto_tree_add_item(amqp_tree, hf_amqp_init_id_minor, tvb, 5, 1, ENC_BIG_ENDIAN); |
9179 | 0 | proto_tree_add_item(amqp_tree, hf_amqp_init_version_major, tvb, 6, 1, ENC_BIG_ENDIAN); |
9180 | 0 | proto_tree_add_item(amqp_tree, hf_amqp_init_version_minor, tvb, 7, 1, ENC_BIG_ENDIAN); |
9181 | 0 | } |
9182 | 0 | return 8; |
9183 | 0 | } |
9184 | | |
9185 | 0 | if (tree) { |
9186 | 0 | ti = proto_tree_add_item(tree, proto_amqp, tvb, 0, -1, ENC_NA); |
9187 | 0 | amqp_tree = proto_item_add_subtree(ti, ett_amqp); |
9188 | 0 | proto_tree_add_item(amqp_tree, hf_amqp_0_9_type, tvb, 0, 1, ENC_BIG_ENDIAN); |
9189 | 0 | proto_tree_add_item(amqp_tree, hf_amqp_channel, tvb, 1, 2, ENC_BIG_ENDIAN); |
9190 | 0 | proto_tree_add_item(amqp_tree, hf_amqp_0_9_length, tvb, 3, 4, ENC_BIG_ENDIAN); |
9191 | 0 | } |
9192 | |
|
9193 | 0 | frame_type = tvb_get_uint8(tvb, 0); |
9194 | 0 | channel_num = tvb_get_ntohs(tvb, 1); |
9195 | 0 | length = tvb_get_ntohl(tvb, 3); |
9196 | |
|
9197 | 0 | switch (frame_type) { |
9198 | 0 | case AMQP_0_9_FRAME_TYPE_METHOD: |
9199 | 0 | class_id = tvb_get_ntohs(tvb, 7); |
9200 | 0 | proto_tree_add_item(amqp_tree, hf_amqp_0_9_method_class_id, |
9201 | 0 | tvb, 7, 2, ENC_BIG_ENDIAN); |
9202 | 0 | switch (class_id) { |
9203 | 0 | case AMQP_0_9_CLASS_CONNECTION: |
9204 | 0 | method_id = tvb_get_ntohs(tvb, 9); |
9205 | 0 | proto_tree_add_item(amqp_tree, hf_amqp_method_connection_method_id, |
9206 | 0 | tvb, 9, 2, ENC_BIG_ENDIAN); |
9207 | 0 | ti = proto_tree_add_item(amqp_tree, hf_amqp_method_arguments, |
9208 | 0 | tvb, 11, length - 4, ENC_NA); |
9209 | 0 | args_tree = proto_item_add_subtree(ti, ett_args); |
9210 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "Connection.%s ", |
9211 | 0 | val_to_str( method_id, amqp_method_connection_methods, "Unknown (%u)")); |
9212 | 0 | switch (method_id) { |
9213 | 0 | case AMQP_0_9_METHOD_CONNECTION_START: |
9214 | 0 | dissect_amqp_0_9_method_connection_start(tvb, |
9215 | 0 | pinfo, 11, args_tree); |
9216 | 0 | break; |
9217 | 0 | case AMQP_0_9_METHOD_CONNECTION_START_OK: |
9218 | 0 | dissect_amqp_0_9_method_connection_start_ok(tvb, |
9219 | 0 | pinfo, 11, args_tree); |
9220 | 0 | break; |
9221 | 0 | case AMQP_0_9_METHOD_CONNECTION_SECURE: |
9222 | 0 | dissect_amqp_0_9_method_connection_secure(tvb, |
9223 | 0 | 11, args_tree); |
9224 | 0 | break; |
9225 | 0 | case AMQP_0_9_METHOD_CONNECTION_SECURE_OK: |
9226 | 0 | dissect_amqp_0_9_method_connection_secure_ok(tvb, |
9227 | 0 | 11, args_tree); |
9228 | 0 | break; |
9229 | 0 | case AMQP_0_9_METHOD_CONNECTION_TUNE: |
9230 | 0 | dissect_amqp_0_9_method_connection_tune(tvb, |
9231 | 0 | 11, args_tree); |
9232 | 0 | break; |
9233 | 0 | case AMQP_0_9_METHOD_CONNECTION_TUNE_OK: |
9234 | 0 | dissect_amqp_0_9_method_connection_tune_ok(tvb, |
9235 | 0 | 11, args_tree); |
9236 | 0 | break; |
9237 | 0 | case AMQP_0_9_METHOD_CONNECTION_OPEN: |
9238 | 0 | dissect_amqp_0_9_method_connection_open(tvb, |
9239 | 0 | pinfo, 11, args_tree); |
9240 | 0 | break; |
9241 | 0 | case AMQP_0_9_METHOD_CONNECTION_OPEN_OK: |
9242 | 0 | dissect_amqp_0_9_method_connection_open_ok(tvb, |
9243 | 0 | 11, args_tree); |
9244 | 0 | break; |
9245 | 0 | case AMQP_0_9_METHOD_CONNECTION_REDIRECT: |
9246 | 0 | dissect_amqp_0_9_method_connection_redirect(tvb, |
9247 | 0 | 11, args_tree); |
9248 | 0 | break; |
9249 | 0 | case AMQP_0_9_METHOD_CONNECTION_CLOSE: |
9250 | 0 | dissect_amqp_0_9_method_connection_close(tvb, |
9251 | 0 | pinfo, 11, args_tree); |
9252 | 0 | break; |
9253 | 0 | case AMQP_0_9_METHOD_CONNECTION_CLOSE_OK: |
9254 | 0 | dissect_amqp_0_9_method_connection_close_ok(tvb, |
9255 | 0 | 11, args_tree); |
9256 | 0 | break; |
9257 | 0 | case AMQP_0_9_METHOD_CONNECTION_BLOCKED: |
9258 | 0 | dissect_amqp_0_9_method_connection_blocked(tvb, |
9259 | 0 | 11, args_tree); |
9260 | 0 | break; |
9261 | 0 | case AMQP_0_9_METHOD_CONNECTION_UNBLOCKED: |
9262 | 0 | dissect_amqp_0_9_method_connection_unblocked(tvb, |
9263 | 0 | 11, args_tree); |
9264 | 0 | break; |
9265 | 0 | default: |
9266 | 0 | expert_add_info_format(pinfo, amqp_tree, &ei_amqp_unknown_connection_method, "Unknown connection method %u", method_id); |
9267 | 0 | } |
9268 | 0 | break; |
9269 | 0 | case AMQP_0_9_CLASS_CHANNEL: |
9270 | 0 | method_id = tvb_get_ntohs(tvb, 9); |
9271 | 0 | proto_tree_add_item(amqp_tree, hf_amqp_method_channel_method_id, |
9272 | 0 | tvb, 9, 2, ENC_BIG_ENDIAN); |
9273 | 0 | ti = proto_tree_add_item(amqp_tree, hf_amqp_method_arguments, |
9274 | 0 | tvb, 11, length - 4, ENC_NA); |
9275 | 0 | args_tree = proto_item_add_subtree(ti, ett_args); |
9276 | |
|
9277 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "Channel.%s ", |
9278 | 0 | val_to_str( method_id, amqp_method_channel_methods, "Unknown (%u)")); |
9279 | |
|
9280 | 0 | switch (method_id) { |
9281 | 0 | case AMQP_0_9_METHOD_CHANNEL_OPEN: |
9282 | 0 | dissect_amqp_0_9_method_channel_open(tvb, |
9283 | 0 | 11, args_tree); |
9284 | 0 | break; |
9285 | 0 | case AMQP_0_9_METHOD_CHANNEL_OPEN_OK: |
9286 | 0 | dissect_amqp_0_9_method_channel_open_ok(tvb, |
9287 | 0 | 11, args_tree); |
9288 | 0 | break; |
9289 | 0 | case AMQP_0_9_METHOD_CHANNEL_FLOW: |
9290 | 0 | dissect_amqp_0_9_method_channel_flow(tvb, |
9291 | 0 | 11, args_tree); |
9292 | 0 | break; |
9293 | 0 | case AMQP_0_9_METHOD_CHANNEL_FLOW_OK: |
9294 | 0 | dissect_amqp_0_9_method_channel_flow_ok(tvb, |
9295 | 0 | 11, args_tree); |
9296 | 0 | break; |
9297 | 0 | case AMQP_0_9_METHOD_CHANNEL_CLOSE: |
9298 | 0 | dissect_amqp_0_9_method_channel_close(channel_num, tvb, |
9299 | 0 | pinfo, 11, args_tree); |
9300 | 0 | break; |
9301 | 0 | case AMQP_0_9_METHOD_CHANNEL_CLOSE_OK: |
9302 | 0 | dissect_amqp_0_9_method_channel_close_ok(tvb, |
9303 | 0 | 11, args_tree); |
9304 | 0 | break; |
9305 | 0 | case AMQP_0_9_METHOD_CHANNEL_RESUME: |
9306 | 0 | dissect_amqp_0_9_method_channel_resume(tvb, |
9307 | 0 | 11, args_tree); |
9308 | 0 | break; |
9309 | 0 | case AMQP_0_9_METHOD_CHANNEL_PING: |
9310 | 0 | dissect_amqp_0_9_method_channel_ping(tvb, |
9311 | 0 | 11, args_tree); |
9312 | 0 | break; |
9313 | 0 | case AMQP_0_9_METHOD_CHANNEL_PONG: |
9314 | 0 | dissect_amqp_0_9_method_channel_pong(tvb, |
9315 | 0 | 11, args_tree); |
9316 | 0 | break; |
9317 | 0 | case AMQP_0_9_METHOD_CHANNEL_OK: |
9318 | 0 | dissect_amqp_0_9_method_channel_ok(tvb, |
9319 | 0 | 11, args_tree); |
9320 | 0 | break; |
9321 | 0 | default: |
9322 | 0 | expert_add_info_format(pinfo, amqp_tree, &ei_amqp_unknown_channel_method, "Unknown channel method %u", method_id); |
9323 | 0 | } |
9324 | 0 | break; |
9325 | 0 | case AMQP_0_9_CLASS_ACCESS: |
9326 | 0 | method_id = tvb_get_ntohs(tvb, 9); |
9327 | 0 | proto_tree_add_item(amqp_tree, hf_amqp_method_access_method_id, |
9328 | 0 | tvb, 9, 2, ENC_BIG_ENDIAN); |
9329 | 0 | ti = proto_tree_add_item(amqp_tree, hf_amqp_method_arguments, |
9330 | 0 | tvb, 11, length - 4, ENC_NA); |
9331 | 0 | args_tree = proto_item_add_subtree(ti, ett_args); |
9332 | 0 | switch (method_id) { |
9333 | 0 | case AMQP_0_9_METHOD_ACCESS_REQUEST: |
9334 | 0 | dissect_amqp_0_9_method_access_request(tvb, |
9335 | 0 | 11, args_tree); |
9336 | 0 | col_append_str(pinfo->cinfo, COL_INFO, |
9337 | 0 | "Access.Request "); |
9338 | 0 | break; |
9339 | 0 | case AMQP_0_9_METHOD_ACCESS_REQUEST_OK: |
9340 | 0 | dissect_amqp_0_9_method_access_request_ok(tvb, |
9341 | 0 | 11, args_tree); |
9342 | 0 | col_append_str(pinfo->cinfo, COL_INFO, |
9343 | 0 | "Access.Request-Ok "); |
9344 | 0 | break; |
9345 | 0 | default: |
9346 | 0 | expert_add_info_format(pinfo, amqp_tree, &ei_amqp_unknown_access_method, "Unknown access method %u", method_id); |
9347 | 0 | } |
9348 | 0 | break; |
9349 | 0 | case AMQP_0_9_CLASS_EXCHANGE: |
9350 | 0 | method_id = tvb_get_ntohs(tvb, 9); |
9351 | 0 | proto_tree_add_item(amqp_tree, hf_amqp_method_exchange_method_id, |
9352 | 0 | tvb, 9, 2, ENC_BIG_ENDIAN); |
9353 | 0 | ti = proto_tree_add_item(amqp_tree, hf_amqp_method_arguments, |
9354 | 0 | tvb, 11, length - 4, ENC_NA); |
9355 | 0 | args_tree = proto_item_add_subtree(ti, ett_args); |
9356 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "Exchange.%s ", |
9357 | 0 | val_to_str( method_id, amqp_method_exchange_methods, "Unknown (%u)")); |
9358 | 0 | switch (method_id) { |
9359 | 0 | case AMQP_0_9_METHOD_EXCHANGE_DECLARE: |
9360 | 0 | dissect_amqp_0_9_method_exchange_declare(tvb, |
9361 | 0 | pinfo, 11, args_tree); |
9362 | 0 | break; |
9363 | 0 | case AMQP_0_9_METHOD_EXCHANGE_DECLARE_OK: |
9364 | 0 | dissect_amqp_0_9_method_exchange_declare_ok(tvb, |
9365 | 0 | 11, args_tree); |
9366 | 0 | break; |
9367 | 0 | case AMQP_0_9_METHOD_EXCHANGE_BIND: |
9368 | 0 | dissect_amqp_0_9_method_exchange_bind(tvb, |
9369 | 0 | pinfo, 11, args_tree); |
9370 | 0 | break; |
9371 | 0 | case AMQP_0_9_METHOD_EXCHANGE_BIND_OK: |
9372 | 0 | dissect_amqp_0_9_method_exchange_bind_ok(tvb, |
9373 | 0 | 11, args_tree); |
9374 | 0 | break; |
9375 | 0 | case AMQP_0_9_METHOD_EXCHANGE_DELETE: |
9376 | 0 | dissect_amqp_0_9_method_exchange_delete(tvb, |
9377 | 0 | pinfo, 11, args_tree); |
9378 | 0 | break; |
9379 | 0 | case AMQP_0_9_METHOD_EXCHANGE_DELETE_OK: |
9380 | 0 | dissect_amqp_0_9_method_exchange_delete_ok(tvb, |
9381 | 0 | 11, args_tree); |
9382 | 0 | break; |
9383 | 0 | case AMQP_0_9_METHOD_EXCHANGE_UNBIND: |
9384 | | /* the same parameters as in bind */ |
9385 | 0 | dissect_amqp_0_9_method_exchange_bind(tvb, |
9386 | 0 | pinfo, 11, args_tree); |
9387 | 0 | break; |
9388 | 0 | case AMQP_0_9_METHOD_EXCHANGE_UNBIND_OK: |
9389 | | /* the same parameters as in bind-ok */ |
9390 | 0 | dissect_amqp_0_9_method_exchange_bind_ok(tvb, |
9391 | 0 | 11, args_tree); |
9392 | 0 | break; |
9393 | 0 | default: |
9394 | 0 | expert_add_info_format(pinfo, amqp_tree, &ei_amqp_unknown_exchange_method, "Unknown exchange method %u", method_id); |
9395 | 0 | } |
9396 | 0 | break; |
9397 | 0 | case AMQP_0_9_CLASS_QUEUE: |
9398 | 0 | method_id = tvb_get_ntohs(tvb, 9); |
9399 | 0 | proto_tree_add_item(amqp_tree, hf_amqp_method_queue_method_id, |
9400 | 0 | tvb, 9, 2, ENC_BIG_ENDIAN); |
9401 | 0 | ti = proto_tree_add_item(amqp_tree, hf_amqp_method_arguments, |
9402 | 0 | tvb, 11, length - 4, ENC_NA); |
9403 | 0 | args_tree = proto_item_add_subtree(ti, ett_args); |
9404 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "Queue.%s ", |
9405 | 0 | val_to_str( method_id, amqp_method_queue_methods, "Unknown (%u)")); |
9406 | |
|
9407 | 0 | switch (method_id) { |
9408 | 0 | case AMQP_0_9_METHOD_QUEUE_DECLARE: |
9409 | 0 | dissect_amqp_0_9_method_queue_declare(tvb, |
9410 | 0 | pinfo, 11, args_tree); |
9411 | 0 | break; |
9412 | 0 | case AMQP_0_9_METHOD_QUEUE_DECLARE_OK: |
9413 | 0 | dissect_amqp_0_9_method_queue_declare_ok(tvb, |
9414 | 0 | pinfo, 11, args_tree); |
9415 | 0 | break; |
9416 | 0 | case AMQP_0_9_METHOD_QUEUE_BIND: |
9417 | 0 | dissect_amqp_0_9_method_queue_bind(tvb, |
9418 | 0 | pinfo, 11, args_tree); |
9419 | 0 | break; |
9420 | 0 | case AMQP_0_9_METHOD_QUEUE_BIND_OK: |
9421 | 0 | dissect_amqp_0_9_method_queue_bind_ok(tvb, |
9422 | 0 | 11, args_tree); |
9423 | 0 | break; |
9424 | 0 | case AMQP_0_9_METHOD_QUEUE_UNBIND: |
9425 | 0 | dissect_amqp_0_9_method_queue_unbind(tvb, |
9426 | 0 | pinfo, 11, args_tree); |
9427 | 0 | break; |
9428 | 0 | case AMQP_0_9_METHOD_QUEUE_UNBIND_OK: |
9429 | 0 | dissect_amqp_0_9_method_queue_unbind_ok(tvb, |
9430 | 0 | 11, args_tree); |
9431 | 0 | break; |
9432 | 0 | case AMQP_0_9_METHOD_QUEUE_PURGE: |
9433 | 0 | dissect_amqp_0_9_method_queue_purge(tvb, |
9434 | 0 | pinfo, 11, args_tree); |
9435 | 0 | break; |
9436 | 0 | case AMQP_0_9_METHOD_QUEUE_PURGE_OK: |
9437 | 0 | dissect_amqp_0_9_method_queue_purge_ok(tvb, |
9438 | 0 | 11, args_tree); |
9439 | 0 | break; |
9440 | 0 | case AMQP_0_9_METHOD_QUEUE_DELETE: |
9441 | 0 | dissect_amqp_0_9_method_queue_delete(tvb, |
9442 | 0 | pinfo, 11, args_tree); |
9443 | 0 | break; |
9444 | 0 | case AMQP_0_9_METHOD_QUEUE_DELETE_OK: |
9445 | 0 | dissect_amqp_0_9_method_queue_delete_ok(tvb, |
9446 | 0 | 11, args_tree); |
9447 | 0 | break; |
9448 | 0 | default: |
9449 | 0 | expert_add_info_format(pinfo, amqp_tree, &ei_amqp_unknown_queue_method, "Unknown queue method %u", method_id); |
9450 | 0 | } |
9451 | 0 | break; |
9452 | 0 | case AMQP_0_9_CLASS_BASIC: |
9453 | 0 | method_id = tvb_get_ntohs(tvb, 9); |
9454 | 0 | proto_tree_add_item(amqp_tree, hf_amqp_method_basic_method_id, |
9455 | 0 | tvb, 9, 2, ENC_BIG_ENDIAN); |
9456 | 0 | ti = proto_tree_add_item(amqp_tree, hf_amqp_method_arguments, |
9457 | 0 | tvb, 11, length - 4, ENC_NA); |
9458 | 0 | args_tree = proto_item_add_subtree(ti, ett_args); |
9459 | |
|
9460 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "Basic.%s ", |
9461 | 0 | val_to_str( method_id, amqp_method_basic_methods, "Unknown (%u)")); |
9462 | |
|
9463 | 0 | switch (method_id) { |
9464 | 0 | case AMQP_0_9_METHOD_BASIC_QOS: |
9465 | 0 | dissect_amqp_0_9_method_basic_qos(tvb, |
9466 | 0 | 11, args_tree); |
9467 | 0 | break; |
9468 | 0 | case AMQP_0_9_METHOD_BASIC_QOS_OK: |
9469 | 0 | dissect_amqp_0_9_method_basic_qos_ok(tvb, |
9470 | 0 | 11, args_tree); |
9471 | 0 | break; |
9472 | 0 | case AMQP_0_9_METHOD_BASIC_CONSUME: |
9473 | 0 | dissect_amqp_0_9_method_basic_consume(tvb, |
9474 | 0 | pinfo, 11, args_tree); |
9475 | 0 | break; |
9476 | 0 | case AMQP_0_9_METHOD_BASIC_CONSUME_OK: |
9477 | 0 | dissect_amqp_0_9_method_basic_consume_ok(tvb, |
9478 | 0 | 11, args_tree); |
9479 | 0 | break; |
9480 | 0 | case AMQP_0_9_METHOD_BASIC_CANCEL: |
9481 | 0 | dissect_amqp_0_9_method_basic_cancel(tvb, |
9482 | 0 | 11, args_tree); |
9483 | 0 | break; |
9484 | 0 | case AMQP_0_9_METHOD_BASIC_CANCEL_OK: |
9485 | 0 | dissect_amqp_0_9_method_basic_cancel_ok(tvb, |
9486 | 0 | 11, args_tree); |
9487 | 0 | break; |
9488 | 0 | case AMQP_0_9_METHOD_BASIC_PUBLISH: |
9489 | 0 | dissect_amqp_0_9_method_basic_publish(channel_num, tvb, |
9490 | 0 | pinfo, 11, args_tree); |
9491 | 0 | generate_ack_reference(tvb, pinfo, amqp_tree); |
9492 | 0 | break; |
9493 | 0 | case AMQP_0_9_METHOD_BASIC_RETURN: |
9494 | 0 | dissect_amqp_0_9_method_basic_return(tvb, |
9495 | 0 | pinfo, 11, args_tree); |
9496 | 0 | break; |
9497 | 0 | case AMQP_0_9_METHOD_BASIC_DELIVER: |
9498 | 0 | dissect_amqp_0_9_method_basic_deliver(channel_num, tvb, |
9499 | 0 | pinfo, 11, args_tree); |
9500 | 0 | generate_ack_reference(tvb, pinfo, amqp_tree); |
9501 | 0 | break; |
9502 | 0 | case AMQP_0_9_METHOD_BASIC_GET: |
9503 | 0 | dissect_amqp_0_9_method_basic_get(tvb, |
9504 | 0 | pinfo, 11, args_tree); |
9505 | 0 | break; |
9506 | 0 | case AMQP_0_9_METHOD_BASIC_GET_OK: |
9507 | 0 | dissect_amqp_0_9_method_basic_get_ok(channel_num, tvb, |
9508 | 0 | pinfo, 11, args_tree); |
9509 | 0 | generate_ack_reference(tvb, pinfo, amqp_tree); |
9510 | 0 | break; |
9511 | 0 | case AMQP_0_9_METHOD_BASIC_GET_EMPTY: |
9512 | 0 | dissect_amqp_0_9_method_basic_get_empty(tvb, |
9513 | 0 | 11, args_tree); |
9514 | 0 | break; |
9515 | 0 | case AMQP_0_9_METHOD_BASIC_ACK: |
9516 | 0 | dissect_amqp_0_9_method_basic_ack(channel_num, tvb, |
9517 | 0 | pinfo, 11, args_tree); |
9518 | 0 | generate_msg_reference(tvb, pinfo, amqp_tree); |
9519 | 0 | break; |
9520 | 0 | case AMQP_0_9_METHOD_BASIC_REJECT: |
9521 | 0 | dissect_amqp_0_9_method_basic_reject(channel_num, tvb, |
9522 | 0 | pinfo, 11, args_tree); |
9523 | 0 | generate_msg_reference(tvb, pinfo, amqp_tree); |
9524 | 0 | break; |
9525 | 0 | case AMQP_0_9_METHOD_BASIC_RECOVER_ASYNC: |
9526 | 0 | dissect_amqp_0_9_method_basic_recover_async(tvb, |
9527 | 0 | 11, args_tree); |
9528 | 0 | break; |
9529 | 0 | case AMQP_0_9_METHOD_BASIC_RECOVER: |
9530 | 0 | dissect_amqp_0_9_method_basic_recover(tvb, |
9531 | 0 | 11, args_tree); |
9532 | 0 | break; |
9533 | 0 | case AMQP_0_9_METHOD_BASIC_RECOVER_OK: |
9534 | 0 | dissect_amqp_0_9_method_basic_recover_ok(tvb, |
9535 | 0 | 11, args_tree); |
9536 | 0 | break; |
9537 | 0 | case AMQP_0_9_METHOD_BASIC_NACK: |
9538 | 0 | dissect_amqp_0_9_method_basic_nack(channel_num, tvb, |
9539 | 0 | pinfo, 11, args_tree); |
9540 | 0 | generate_msg_reference(tvb, pinfo, amqp_tree); |
9541 | 0 | break; |
9542 | 0 | default: |
9543 | 0 | expert_add_info_format(pinfo, amqp_tree, &ei_amqp_unknown_basic_method, "Unknown basic method %u", method_id); |
9544 | 0 | } |
9545 | 0 | break; |
9546 | 0 | case AMQP_0_9_CLASS_FILE: |
9547 | 0 | method_id = tvb_get_ntohs(tvb, 9); |
9548 | 0 | proto_tree_add_item(amqp_tree, hf_amqp_method_file_method_id, |
9549 | 0 | tvb, 9, 2, ENC_BIG_ENDIAN); |
9550 | 0 | ti = proto_tree_add_item(amqp_tree, hf_amqp_method_arguments, |
9551 | 0 | tvb, 11, length - 4, ENC_NA); |
9552 | 0 | args_tree = proto_item_add_subtree(ti, ett_args); |
9553 | |
|
9554 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "File.%s ", |
9555 | 0 | val_to_str( method_id, amqp_method_file_methods, "Unknown (%u)")); |
9556 | |
|
9557 | 0 | switch (method_id) { |
9558 | 0 | case AMQP_0_9_METHOD_FILE_QOS: |
9559 | 0 | dissect_amqp_0_9_method_file_qos(tvb, |
9560 | 0 | 11, args_tree); |
9561 | 0 | break; |
9562 | 0 | case AMQP_0_9_METHOD_FILE_QOS_OK: |
9563 | 0 | dissect_amqp_0_9_method_file_qos_ok(tvb, |
9564 | 0 | 11, args_tree); |
9565 | 0 | break; |
9566 | 0 | case AMQP_0_9_METHOD_FILE_CONSUME: |
9567 | 0 | dissect_amqp_0_9_method_file_consume(tvb, |
9568 | 0 | pinfo, 11, args_tree); |
9569 | 0 | break; |
9570 | 0 | case AMQP_0_9_METHOD_FILE_CONSUME_OK: |
9571 | 0 | dissect_amqp_0_9_method_file_consume_ok(tvb, |
9572 | 0 | 11, args_tree); |
9573 | 0 | break; |
9574 | 0 | case AMQP_0_9_METHOD_FILE_CANCEL: |
9575 | 0 | dissect_amqp_0_9_method_file_cancel(tvb, |
9576 | 0 | 11, args_tree); |
9577 | 0 | break; |
9578 | 0 | case AMQP_0_9_METHOD_FILE_CANCEL_OK: |
9579 | 0 | dissect_amqp_0_9_method_file_cancel_ok(tvb, |
9580 | 0 | 11, args_tree); |
9581 | 0 | break; |
9582 | 0 | case AMQP_0_9_METHOD_FILE_OPEN: |
9583 | 0 | dissect_amqp_0_9_method_file_open(tvb, |
9584 | 0 | 11, args_tree); |
9585 | 0 | break; |
9586 | 0 | case AMQP_0_9_METHOD_FILE_OPEN_OK: |
9587 | 0 | dissect_amqp_0_9_method_file_open_ok(tvb, |
9588 | 0 | 11, args_tree); |
9589 | 0 | break; |
9590 | 0 | case AMQP_0_9_METHOD_FILE_STAGE: |
9591 | 0 | dissect_amqp_0_9_method_file_stage(tvb, |
9592 | 0 | 11, args_tree); |
9593 | 0 | break; |
9594 | 0 | case AMQP_0_9_METHOD_FILE_PUBLISH: |
9595 | 0 | dissect_amqp_0_9_method_file_publish(tvb, |
9596 | 0 | 11, args_tree); |
9597 | 0 | break; |
9598 | 0 | case AMQP_0_9_METHOD_FILE_RETURN: |
9599 | 0 | dissect_amqp_0_9_method_file_return(tvb, |
9600 | 0 | 11, args_tree); |
9601 | 0 | break; |
9602 | 0 | case AMQP_0_9_METHOD_FILE_DELIVER: |
9603 | 0 | dissect_amqp_0_9_method_file_deliver(tvb, |
9604 | 0 | 11, args_tree); |
9605 | 0 | break; |
9606 | 0 | case AMQP_0_9_METHOD_FILE_ACK: |
9607 | 0 | dissect_amqp_0_9_method_file_ack(tvb, |
9608 | 0 | 11, args_tree); |
9609 | 0 | break; |
9610 | 0 | case AMQP_0_9_METHOD_FILE_REJECT: |
9611 | 0 | dissect_amqp_0_9_method_file_reject(tvb, |
9612 | 0 | 11, args_tree); |
9613 | 0 | break; |
9614 | 0 | default: |
9615 | 0 | expert_add_info_format(pinfo, amqp_tree, &ei_amqp_unknown_file_method, "Unknown file method %u", method_id); |
9616 | 0 | } |
9617 | 0 | break; |
9618 | 0 | case AMQP_0_9_CLASS_STREAM: |
9619 | 0 | method_id = tvb_get_ntohs(tvb, 9); |
9620 | 0 | proto_tree_add_item(amqp_tree, hf_amqp_method_stream_method_id, |
9621 | 0 | tvb, 9, 2, ENC_BIG_ENDIAN); |
9622 | 0 | ti = proto_tree_add_item(amqp_tree, hf_amqp_method_arguments, |
9623 | 0 | tvb, 11, length - 4, ENC_NA); |
9624 | 0 | args_tree = proto_item_add_subtree(ti, ett_args); |
9625 | |
|
9626 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "Stream.%s ", |
9627 | 0 | val_to_str( method_id, amqp_method_stream_methods, "Unknown (%u)")); |
9628 | |
|
9629 | 0 | switch (method_id) { |
9630 | 0 | case AMQP_0_9_METHOD_STREAM_QOS: |
9631 | 0 | dissect_amqp_0_9_method_stream_qos(tvb, |
9632 | 0 | 11, args_tree); |
9633 | 0 | break; |
9634 | 0 | case AMQP_0_9_METHOD_STREAM_QOS_OK: |
9635 | 0 | dissect_amqp_0_9_method_stream_qos_ok(tvb, |
9636 | 0 | 11, args_tree); |
9637 | 0 | break; |
9638 | 0 | case AMQP_0_9_METHOD_STREAM_CONSUME: |
9639 | 0 | dissect_amqp_0_9_method_stream_consume(tvb, |
9640 | 0 | pinfo, 11, args_tree); |
9641 | 0 | break; |
9642 | 0 | case AMQP_0_9_METHOD_STREAM_CONSUME_OK: |
9643 | 0 | dissect_amqp_0_9_method_stream_consume_ok(tvb, |
9644 | 0 | 11, args_tree); |
9645 | 0 | break; |
9646 | 0 | case AMQP_0_9_METHOD_STREAM_CANCEL: |
9647 | 0 | dissect_amqp_0_9_method_stream_cancel(tvb, |
9648 | 0 | 11, args_tree); |
9649 | 0 | break; |
9650 | 0 | case AMQP_0_9_METHOD_STREAM_CANCEL_OK: |
9651 | 0 | dissect_amqp_0_9_method_stream_cancel_ok(tvb, |
9652 | 0 | 11, args_tree); |
9653 | 0 | break; |
9654 | 0 | case AMQP_0_9_METHOD_STREAM_PUBLISH: |
9655 | 0 | dissect_amqp_0_9_method_stream_publish(tvb, |
9656 | 0 | 11, args_tree); |
9657 | 0 | break; |
9658 | 0 | case AMQP_0_9_METHOD_STREAM_RETURN: |
9659 | 0 | dissect_amqp_0_9_method_stream_return(tvb, |
9660 | 0 | 11, args_tree); |
9661 | 0 | break; |
9662 | 0 | case AMQP_0_9_METHOD_STREAM_DELIVER: |
9663 | 0 | dissect_amqp_0_9_method_stream_deliver(tvb, |
9664 | 0 | 11, args_tree); |
9665 | 0 | break; |
9666 | 0 | default: |
9667 | 0 | expert_add_info_format(pinfo, amqp_tree, &ei_amqp_unknown_stream_method, "Unknown stream method %u", method_id); |
9668 | 0 | } |
9669 | 0 | break; |
9670 | 0 | case AMQP_0_9_CLASS_TX: |
9671 | 0 | method_id = tvb_get_ntohs(tvb, 9); |
9672 | 0 | proto_tree_add_item(amqp_tree, hf_amqp_method_tx_method_id, |
9673 | 0 | tvb, 9, 2, ENC_BIG_ENDIAN); |
9674 | 0 | ti = proto_tree_add_item(amqp_tree, hf_amqp_method_arguments, |
9675 | 0 | tvb, 11, length - 4, ENC_NA); |
9676 | 0 | args_tree = proto_item_add_subtree(ti, ett_args); |
9677 | |
|
9678 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "Tx.%s ", |
9679 | 0 | val_to_str( method_id, amqp_method_tx_methods, "Unknown (%u)")); |
9680 | |
|
9681 | 0 | switch (method_id) { |
9682 | 0 | case AMQP_0_9_METHOD_TX_SELECT: |
9683 | 0 | dissect_amqp_0_9_method_tx_select(tvb, |
9684 | 0 | 11, args_tree); |
9685 | 0 | break; |
9686 | 0 | case AMQP_0_9_METHOD_TX_SELECT_OK: |
9687 | 0 | dissect_amqp_0_9_method_tx_select_ok(tvb, |
9688 | 0 | 11, args_tree); |
9689 | 0 | break; |
9690 | 0 | case AMQP_0_9_METHOD_TX_COMMIT: |
9691 | 0 | dissect_amqp_0_9_method_tx_commit(tvb, |
9692 | 0 | 11, args_tree); |
9693 | 0 | break; |
9694 | 0 | case AMQP_0_9_METHOD_TX_COMMIT_OK: |
9695 | 0 | dissect_amqp_0_9_method_tx_commit_ok(tvb, |
9696 | 0 | 11, args_tree); |
9697 | 0 | break; |
9698 | 0 | case AMQP_0_9_METHOD_TX_ROLLBACK: |
9699 | 0 | dissect_amqp_0_9_method_tx_rollback(tvb, |
9700 | 0 | 11, args_tree); |
9701 | 0 | break; |
9702 | 0 | case AMQP_0_9_METHOD_TX_ROLLBACK_OK: |
9703 | 0 | dissect_amqp_0_9_method_tx_rollback_ok(tvb, |
9704 | 0 | 11, args_tree); |
9705 | 0 | break; |
9706 | 0 | default: |
9707 | 0 | expert_add_info_format(pinfo, amqp_tree, &ei_amqp_unknown_tx_method, "Unknown tx method %u", method_id); |
9708 | 0 | } |
9709 | 0 | break; |
9710 | 0 | case AMQP_0_9_CLASS_DTX: |
9711 | 0 | method_id = tvb_get_ntohs(tvb, 9); |
9712 | 0 | proto_tree_add_item(amqp_tree, hf_amqp_method_dtx_method_id, |
9713 | 0 | tvb, 9, 2, ENC_BIG_ENDIAN); |
9714 | 0 | ti = proto_tree_add_item(amqp_tree, hf_amqp_method_arguments, |
9715 | 0 | tvb, 11, length - 4, ENC_NA); |
9716 | 0 | args_tree = proto_item_add_subtree(ti, ett_args); |
9717 | |
|
9718 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "Dtx.%s ", |
9719 | 0 | val_to_str( method_id, amqp_method_dtx_methods, "Unknown (%u)")); |
9720 | |
|
9721 | 0 | switch (method_id) { |
9722 | 0 | case AMQP_0_9_METHOD_DTX_SELECT: |
9723 | 0 | dissect_amqp_0_9_method_dtx_select(tvb, |
9724 | 0 | 11, args_tree); |
9725 | 0 | break; |
9726 | 0 | case AMQP_0_9_METHOD_DTX_SELECT_OK: |
9727 | 0 | dissect_amqp_0_9_method_dtx_select_ok(tvb, |
9728 | 0 | 11, args_tree); |
9729 | 0 | break; |
9730 | 0 | case AMQP_0_9_METHOD_DTX_START: |
9731 | 0 | dissect_amqp_0_9_method_dtx_start(tvb, |
9732 | 0 | 11, args_tree); |
9733 | 0 | break; |
9734 | 0 | case AMQP_0_9_METHOD_DTX_START_OK: |
9735 | 0 | dissect_amqp_0_9_method_dtx_start_ok(tvb, |
9736 | 0 | 11, args_tree); |
9737 | 0 | break; |
9738 | 0 | default: |
9739 | 0 | expert_add_info_format(pinfo, amqp_tree, &ei_amqp_unknown_dtx_method, "Unknown dtx method %u", method_id); |
9740 | 0 | } |
9741 | 0 | break; |
9742 | 0 | case AMQP_0_9_CLASS_TUNNEL: |
9743 | 0 | method_id = tvb_get_ntohs(tvb, 9); |
9744 | 0 | proto_tree_add_item(amqp_tree, hf_amqp_method_tunnel_method_id, |
9745 | 0 | tvb, 9, 2, ENC_BIG_ENDIAN); |
9746 | 0 | ti = proto_tree_add_item(amqp_tree, hf_amqp_method_arguments, |
9747 | 0 | tvb, 11, length - 4, ENC_NA); |
9748 | 0 | args_tree = proto_item_add_subtree(ti, ett_args); |
9749 | 0 | switch (method_id) { |
9750 | 0 | case AMQP_0_9_METHOD_TUNNEL_REQUEST: |
9751 | 0 | dissect_amqp_0_9_method_tunnel_request(tvb, |
9752 | 0 | pinfo, 11, args_tree); |
9753 | 0 | col_append_str(pinfo->cinfo, COL_INFO, |
9754 | 0 | "Tunnel.Request "); |
9755 | 0 | break; |
9756 | 0 | default: |
9757 | 0 | expert_add_info_format(pinfo, amqp_tree, &ei_amqp_unknown_tunnel_method, "Unknown tunnel method %u", method_id); |
9758 | 0 | } |
9759 | 0 | break; |
9760 | 0 | case AMQP_0_9_CLASS_CONFIRM: |
9761 | 0 | method_id = tvb_get_ntohs(tvb, 9); |
9762 | 0 | proto_tree_add_item(amqp_tree, hf_amqp_method_confirm_method_id, |
9763 | 0 | tvb, 9, 2, ENC_BIG_ENDIAN); |
9764 | 0 | ti = proto_tree_add_item(amqp_tree, hf_amqp_method_arguments, |
9765 | 0 | tvb, 11, length - 4, ENC_NA); |
9766 | 0 | args_tree = proto_item_add_subtree(ti, ett_args); |
9767 | 0 | switch (method_id) { |
9768 | 0 | case AMQP_0_9_METHOD_CONFIRM_SELECT: |
9769 | 0 | dissect_amqp_0_9_method_confirm_select(tvb, |
9770 | 0 | 11, args_tree); |
9771 | 0 | col_append_str(pinfo->cinfo, COL_INFO, |
9772 | 0 | "Confirm.Select "); |
9773 | 0 | break; |
9774 | 0 | case AMQP_0_9_METHOD_CONFIRM_SELECT_OK: |
9775 | 0 | dissect_amqp_0_9_method_confirm_select_ok(channel_num, tvb, pinfo, |
9776 | 0 | 11, args_tree); |
9777 | 0 | col_append_str(pinfo->cinfo, COL_INFO, |
9778 | 0 | "Confirm.Select-Ok "); |
9779 | 0 | break; |
9780 | 0 | default: |
9781 | 0 | expert_add_info_format(pinfo, amqp_tree, &ei_amqp_unknown_confirm_method, "Unknown confirm method %u", method_id); |
9782 | 0 | } |
9783 | 0 | break; |
9784 | 0 | default: |
9785 | 0 | expert_add_info_format(pinfo, amqp_tree, &ei_amqp_unknown_method_class, "Unknown method class %u", class_id); |
9786 | 0 | } |
9787 | 0 | break; |
9788 | 0 | case AMQP_0_9_FRAME_TYPE_CONTENT_HEADER: |
9789 | 0 | class_id = tvb_get_ntohs(tvb, 7); |
9790 | 0 | proto_tree_add_item(amqp_tree, hf_amqp_header_class_id, |
9791 | 0 | tvb, 7, 2, ENC_BIG_ENDIAN); |
9792 | 0 | proto_tree_add_item(amqp_tree, hf_amqp_header_weight, |
9793 | 0 | tvb, 9, 2, ENC_BIG_ENDIAN); |
9794 | 0 | proto_tree_add_item(amqp_tree, hf_amqp_header_body_size, |
9795 | 0 | tvb, 11, 8, ENC_BIG_ENDIAN); |
9796 | 0 | proto_tree_add_item(amqp_tree, hf_amqp_header_property_flags, |
9797 | 0 | tvb, 19, 2, ENC_BIG_ENDIAN); |
9798 | 0 | ti = proto_tree_add_item(amqp_tree, hf_amqp_header_properties, |
9799 | 0 | tvb, 21, length - 14, ENC_NA); |
9800 | 0 | prop_tree = proto_item_add_subtree(ti, ett_props); |
9801 | 0 | col_append_str(pinfo->cinfo, COL_INFO, "Content-Header "); |
9802 | 0 | switch (class_id) { |
9803 | 0 | case AMQP_0_9_CLASS_BASIC: { |
9804 | 0 | amqp_channel_t *channel; |
9805 | 0 | channel = get_conversation_channel(find_or_create_conversation(pinfo), channel_num); |
9806 | 0 | channel->content_params = wmem_new0(wmem_file_scope(), amqp_content_params); |
9807 | |
|
9808 | 0 | dissect_amqp_0_9_content_header_basic(tvb, |
9809 | 0 | pinfo, 21, prop_tree, channel->content_params); |
9810 | 0 | } |
9811 | 0 | break; |
9812 | 0 | case AMQP_0_9_CLASS_FILE: |
9813 | 0 | dissect_amqp_0_9_content_header_file(tvb, |
9814 | 0 | pinfo, 21, prop_tree); |
9815 | 0 | break; |
9816 | 0 | case AMQP_0_9_CLASS_STREAM: |
9817 | 0 | dissect_amqp_0_9_content_header_stream(tvb, |
9818 | 0 | pinfo, 21, prop_tree); |
9819 | 0 | break; |
9820 | 0 | case AMQP_0_9_CLASS_TUNNEL: |
9821 | 0 | dissect_amqp_0_9_content_header_tunnel(tvb, |
9822 | 0 | pinfo, 21, prop_tree); |
9823 | 0 | break; |
9824 | 0 | default: |
9825 | 0 | expert_add_info_format(pinfo, amqp_tree, &ei_amqp_unknown_header_class, "Unknown header class %u", class_id); |
9826 | 0 | } |
9827 | 0 | break; |
9828 | 0 | case AMQP_0_9_FRAME_TYPE_CONTENT_BODY: |
9829 | 0 | proto_tree_add_item(amqp_tree, hf_amqp_payload, |
9830 | 0 | tvb, 7, length, ENC_NA); |
9831 | 0 | col_append_str(pinfo->cinfo, COL_INFO, "Content-Body "); |
9832 | | |
9833 | | /* try to find dissector for content */ |
9834 | 0 | amqp_channel_t *channel; |
9835 | 0 | tvbuff_t *body_tvb; |
9836 | 0 | amqp_content_params *content_params; |
9837 | |
|
9838 | 0 | channel = get_conversation_channel(find_or_create_conversation(pinfo), channel_num); |
9839 | 0 | content_params = channel->content_params; |
9840 | |
|
9841 | 0 | if (content_params != NULL && content_params->type != NULL) { |
9842 | 0 | body_tvb = tvb_new_subset_length(tvb, 7, length); |
9843 | 0 | dissector_try_string_with_data(media_type_subdissector_table, content_params->type, body_tvb, pinfo, amqp_tree, true, NULL); |
9844 | 0 | } |
9845 | 0 | break; |
9846 | 0 | case AMQP_0_9_FRAME_TYPE_HEARTBEAT: |
9847 | 0 | col_append_str(pinfo->cinfo, COL_INFO, |
9848 | 0 | "Heartbeat "); |
9849 | 0 | break; |
9850 | 0 | default: |
9851 | 0 | expert_add_info_format(pinfo, amqp_tree, &ei_amqp_unknown_frame_type, "Unknown frame type %u", frame_type); |
9852 | 0 | } |
9853 | | |
9854 | 0 | col_set_fence(pinfo->cinfo, COL_INFO); |
9855 | 0 | return tvb_reported_length(tvb); |
9856 | 0 | } |
9857 | | |
9858 | | static amqp_channel_t* |
9859 | | get_conversation_channel(conversation_t *conv, uint16_t channel_num) |
9860 | 0 | { |
9861 | 0 | amqp_conv *conn; |
9862 | 0 | amqp_channel_t *channel; |
9863 | | |
9864 | | /* the amqp_conv structure was already created to record the AMQP version */ |
9865 | 0 | conn = (amqp_conv *)conversation_get_proto_data(conv, proto_amqp); |
9866 | 0 | if (!conn) |
9867 | 0 | return NULL; |
9868 | | |
9869 | 0 | channel = (amqp_channel_t *)wmem_map_lookup(conn->channels, GUINT_TO_POINTER((uint32_t)channel_num)); |
9870 | 0 | if(channel == NULL) |
9871 | 0 | { |
9872 | 0 | channel = wmem_new0(wmem_file_scope(), amqp_channel_t); |
9873 | 0 | channel->conn = conn; |
9874 | 0 | channel->channel_num = channel_num; |
9875 | 0 | wmem_map_insert(conn->channels, GUINT_TO_POINTER((uint32_t)channel_num), channel); |
9876 | 0 | } |
9877 | |
|
9878 | 0 | return channel; |
9879 | 0 | } |
9880 | | |
9881 | | static void |
9882 | | record_msg_delivery(tvbuff_t *tvb, packet_info *pinfo, uint16_t channel_num, |
9883 | | uint64_t delivery_tag) |
9884 | 0 | { |
9885 | 0 | conversation_t *conv; |
9886 | 0 | amqp_channel_t *channel; |
9887 | |
|
9888 | 0 | conv = find_or_create_conversation(pinfo); |
9889 | 0 | channel = get_conversation_channel(conv, channel_num); |
9890 | 0 | record_msg_delivery_c(conv, channel, tvb, pinfo, delivery_tag); |
9891 | 0 | } |
9892 | | |
9893 | | static void |
9894 | | record_msg_delivery_c(conversation_t *conv, amqp_channel_t *channel, |
9895 | | tvbuff_t *tvb, packet_info *pinfo, uint64_t delivery_tag) |
9896 | 0 | { |
9897 | 0 | struct tcp_analysis *tcpd; |
9898 | 0 | amqp_delivery **dptr; |
9899 | 0 | amqp_delivery *delivery; |
9900 | |
|
9901 | 0 | tcpd = get_tcp_conversation_data(conv, pinfo); |
9902 | | /* separate messages sent in each direction */ |
9903 | 0 | dptr = tcpd->fwd == &(tcpd->flow1) ? &channel->last_delivery1 : &channel->last_delivery2; |
9904 | |
|
9905 | 0 | delivery = wmem_new0(wmem_file_scope(), amqp_delivery); |
9906 | 0 | delivery->delivery_tag = delivery_tag; |
9907 | 0 | delivery->msg_framenum = pinfo->num; |
9908 | | /* append to the list of unacked deliveries */ |
9909 | 0 | delivery->prev = (*dptr); |
9910 | 0 | (*dptr) = delivery; |
9911 | |
|
9912 | 0 | p_add_proto_data(pinfo->pool, pinfo, proto_amqp, (uint32_t)tvb_raw_offset(tvb), delivery); |
9913 | 0 | } |
9914 | | |
9915 | | static void |
9916 | | record_delivery_ack(tvbuff_t *tvb, packet_info *pinfo, uint16_t channel_num, |
9917 | | uint64_t delivery_tag, bool multiple) |
9918 | 0 | { |
9919 | 0 | conversation_t *conv; |
9920 | 0 | amqp_channel_t *channel; |
9921 | |
|
9922 | 0 | conv = find_or_create_conversation(pinfo); |
9923 | 0 | channel = get_conversation_channel(conv, channel_num); |
9924 | 0 | record_delivery_ack_c(conv, channel, tvb, pinfo, delivery_tag, multiple); |
9925 | 0 | } |
9926 | | |
9927 | | static void |
9928 | | record_delivery_ack_c(conversation_t *conv, amqp_channel_t *channel, |
9929 | | tvbuff_t *tvb, packet_info *pinfo, uint64_t delivery_tag, bool multiple) |
9930 | 0 | { |
9931 | 0 | struct tcp_analysis *tcpd; |
9932 | 0 | amqp_delivery **dptr; |
9933 | 0 | amqp_delivery *last_acked = NULL; |
9934 | |
|
9935 | 0 | tcpd = get_tcp_conversation_data(conv, pinfo); |
9936 | | /* the basic.ack may be sent in both directions, but always opposite |
9937 | | * to the basic.publish or basic.deliver */ |
9938 | 0 | dptr = tcpd->rev == &(tcpd->flow1) ? &channel->last_delivery1 : &channel->last_delivery2; |
9939 | 0 | while(*dptr) |
9940 | 0 | { |
9941 | 0 | if((*dptr)->delivery_tag == delivery_tag) |
9942 | 0 | { |
9943 | 0 | do |
9944 | 0 | { |
9945 | 0 | amqp_delivery *delivery = (*dptr); |
9946 | 0 | *dptr = delivery->prev; /* remove from the list of unacked */ |
9947 | |
|
9948 | 0 | delivery->ack_framenum = pinfo->num; |
9949 | | /* append to the list of acked deliveries */ |
9950 | 0 | delivery->prev = last_acked; |
9951 | 0 | last_acked = delivery; |
9952 | 0 | } |
9953 | 0 | while(multiple && *dptr); |
9954 | 0 | } |
9955 | 0 | else |
9956 | 0 | dptr = &(*dptr)->prev; /* goto next */ |
9957 | 0 | } |
9958 | |
|
9959 | 0 | p_add_proto_data(pinfo->pool, pinfo, proto_amqp, |
9960 | 0 | (uint32_t)tvb_raw_offset(tvb), last_acked); |
9961 | 0 | } |
9962 | | |
9963 | | static void |
9964 | | generate_msg_reference(tvbuff_t *tvb, packet_info *pinfo, proto_tree *amqp_tree) |
9965 | 0 | { |
9966 | 0 | amqp_delivery *delivery; |
9967 | 0 | proto_item *pi; |
9968 | |
|
9969 | 0 | delivery = (amqp_delivery *)p_get_proto_data(pinfo->pool, pinfo, proto_amqp, |
9970 | 0 | (uint32_t)tvb_raw_offset(tvb)); |
9971 | 0 | while(delivery != NULL) |
9972 | 0 | { |
9973 | 0 | if(delivery->msg_framenum) |
9974 | 0 | { |
9975 | 0 | pi = proto_tree_add_uint(amqp_tree, hf_amqp_message_in, |
9976 | 0 | tvb, 0, 0, delivery->msg_framenum); |
9977 | 0 | proto_item_set_generated(pi); |
9978 | 0 | } |
9979 | |
|
9980 | 0 | delivery = delivery->prev; |
9981 | 0 | } |
9982 | 0 | } |
9983 | | |
9984 | | static void |
9985 | | generate_ack_reference(tvbuff_t *tvb, packet_info *pinfo, proto_tree *amqp_tree) |
9986 | 0 | { |
9987 | 0 | amqp_delivery *delivery; |
9988 | |
|
9989 | 0 | delivery = (amqp_delivery *)p_get_proto_data(pinfo->pool, pinfo, proto_amqp, |
9990 | 0 | (uint32_t)tvb_raw_offset(tvb)); |
9991 | 0 | if(delivery && delivery->ack_framenum) |
9992 | 0 | { |
9993 | 0 | proto_item *pi; |
9994 | |
|
9995 | 0 | pi = proto_tree_add_uint(amqp_tree, hf_amqp_ack_in, tvb, 0, 0, delivery->ack_framenum); |
9996 | 0 | proto_item_set_generated(pi); |
9997 | 0 | } |
9998 | |
|
9999 | 0 | } |
10000 | | |
10001 | | /* AMQP 1.0 Type Decoders */ |
10002 | | |
10003 | | static const struct amqp1_typeinfo* decode_fixed_type(uint8_t code) |
10004 | 0 | { |
10005 | 0 | int i; |
10006 | |
|
10007 | 0 | for (i = 0; amqp_1_0_fixed_types[i].typecode != 0xff; ++i) { |
10008 | 0 | if (amqp_1_0_fixed_types[i].typecode == code) |
10009 | 0 | return &amqp_1_0_fixed_types[i]; |
10010 | 0 | } |
10011 | 0 | return NULL; |
10012 | 0 | } |
10013 | | |
10014 | | /* For given code, the routine decodes its value, format & print output. |
10015 | | * If the code is compound type (array,list,map), it calls relevant |
10016 | | * dissect_* routines for decoding its items |
10017 | | * arguments: |
10018 | | * tvb, pinfo, code, offset, bound: obvious |
10019 | | * hf_amqp_type: what hf_* variable corresponds to type of the code |
10020 | | * name: name of type of this code (applicable to map items and type descriptor |
10021 | | * hf_amqp_subtype_count: for format code to be list, expected number of list items |
10022 | | * hf_amqp_subtypes: for format code to be list, field of hf_* variables of list items |
10023 | | * length_size: decoded length |
10024 | | */ |
10025 | | static void |
10026 | | // NOLINTNEXTLINE(misc-no-recursion) |
10027 | | get_amqp_1_0_value_formatter(tvbuff_t *tvb, |
10028 | | packet_info *pinfo, |
10029 | | uint8_t code, |
10030 | | int offset, |
10031 | | int hf_amqp_type, |
10032 | | const char *name, |
10033 | | uint32_t hf_amqp_subtype_count, |
10034 | | int * const *hf_amqp_subtypes, |
10035 | | unsigned *length_size, |
10036 | | proto_item *item) |
10037 | 0 | { |
10038 | 0 | const struct amqp1_typeinfo* element_type; |
10039 | 0 | const char *value = NULL; |
10040 | |
|
10041 | 0 | increment_dissection_depth(pinfo); |
10042 | 0 | element_type = decode_fixed_type(code); |
10043 | 0 | if (element_type) |
10044 | 0 | { |
10045 | 0 | const struct amqp_synonym_types_t *synonyms; |
10046 | 0 | int shift_view = 0; |
10047 | | |
10048 | | /* some AMQP fields can be of several types; by default we use FT_NONE, |
10049 | | * but to enable filtering we try to find a field corresponding to |
10050 | | * the actual type */ |
10051 | 0 | if (proto_registrar_get_ftype(hf_amqp_type) == FT_NONE) |
10052 | 0 | { |
10053 | 0 | for (synonyms = amqp_synonym_types; synonyms->hf_none != NULL; synonyms++) |
10054 | 0 | { |
10055 | 0 | if (*(synonyms->hf_none) == hf_amqp_type) |
10056 | 0 | { |
10057 | 0 | if (FT_IS_UINT(element_type->ftype) && synonyms->hf_uint != NULL) |
10058 | 0 | hf_amqp_type = *(synonyms->hf_uint); |
10059 | 0 | else if (FT_IS_STRING(element_type->ftype) && synonyms->hf_str != NULL) |
10060 | 0 | hf_amqp_type = *(synonyms->hf_str); |
10061 | 0 | else if (element_type->ftype == FT_BYTES && synonyms->hf_bin != NULL) |
10062 | 0 | hf_amqp_type = *(synonyms->hf_bin); |
10063 | 0 | else if (element_type->ftype == FT_GUID && synonyms->hf_guid != NULL) |
10064 | 0 | hf_amqp_type = *(synonyms->hf_guid); |
10065 | 0 | break; |
10066 | 0 | } |
10067 | 0 | } |
10068 | 0 | } |
10069 | |
|
10070 | 0 | if (proto_registrar_get_ftype(hf_amqp_type) != FT_NONE) |
10071 | 0 | { |
10072 | | /* we know the field as well its type, use native dissectors */ |
10073 | 0 | *length_size = element_type->dissector(tvb, pinfo, |
10074 | 0 | offset, |
10075 | 0 | element_type->known_size, |
10076 | 0 | item, hf_amqp_type); |
10077 | 0 | } |
10078 | 0 | else if(code == AMQP_1_0_TYPE_NULL) |
10079 | 0 | { |
10080 | | /* null value says that a particular field was optional and is omitted |
10081 | | * the omitted fields of standard structures are not shown |
10082 | | * however, we still display null values of custom lists, maps and arrays */ |
10083 | 0 | *length_size = 0; |
10084 | 0 | if(hf_amqp_type == hf_amqp_1_0_list) |
10085 | 0 | { |
10086 | 0 | proto_tree_add_none_format(item, hf_amqp_type, |
10087 | 0 | tvb, |
10088 | 0 | offset-1, |
10089 | 0 | 1, |
10090 | 0 | "%s: (null)", |
10091 | 0 | name ? name : proto_registrar_get_name(hf_amqp_type)); |
10092 | 0 | } |
10093 | 0 | } |
10094 | 0 | else |
10095 | 0 | { |
10096 | | /* multi-type and custom fields must be converted to a string */ |
10097 | 0 | *length_size = element_type->formatter(tvb, offset, element_type->known_size, &value); |
10098 | |
|
10099 | 0 | if (code/16 > 0x9) /* variable width code is 0xa[0-9] or 0xb[0-9] */ |
10100 | | /* shift to right to skip the variable length indicator */ |
10101 | 0 | shift_view = element_type->known_size; |
10102 | 0 | else if(*length_size == 0) |
10103 | | /* shift to left to show at least the type code */ |
10104 | 0 | shift_view = -1; |
10105 | |
|
10106 | 0 | proto_tree_add_none_format(item, hf_amqp_type, |
10107 | 0 | tvb, |
10108 | 0 | offset+shift_view, |
10109 | 0 | (*length_size)-shift_view, |
10110 | 0 | "%s (%s): %s", |
10111 | 0 | name ? name : proto_registrar_get_name(hf_amqp_type), |
10112 | 0 | element_type->amqp_typename, value); |
10113 | 0 | } |
10114 | 0 | } |
10115 | 0 | else { /* no fixed code, i.e. compound (list, map, array) */ |
10116 | 0 | switch (code) { |
10117 | 0 | case AMQP_1_0_TYPE_LIST0: |
10118 | 0 | case AMQP_1_0_TYPE_LIST8: |
10119 | 0 | case AMQP_1_0_TYPE_LIST32: |
10120 | 0 | *length_size = dissect_amqp_1_0_list(tvb, |
10121 | 0 | pinfo, |
10122 | 0 | offset-1, /* "-1" due to decode type again in the method */ |
10123 | 0 | item, |
10124 | 0 | hf_amqp_type, |
10125 | 0 | hf_amqp_subtype_count, |
10126 | 0 | hf_amqp_subtypes, name); |
10127 | 0 | if (*length_size == 0) { |
10128 | | /* something went wrong during list dissection; let's stop here */ |
10129 | 0 | *length_size = tvb_reported_length_remaining(tvb, offset); |
10130 | 0 | } else { |
10131 | 0 | *length_size -= 1; /* "-1" due to decode type again in the method */ |
10132 | 0 | } |
10133 | 0 | break; |
10134 | 0 | case AMQP_1_0_TYPE_MAP8: |
10135 | 0 | case AMQP_1_0_TYPE_MAP32: |
10136 | | /* "-1" due to decode type again in the method */ |
10137 | 0 | *length_size = dissect_amqp_1_0_map(tvb, pinfo, offset-1, item, hf_amqp_type, name)-1; |
10138 | 0 | break; |
10139 | 0 | case AMQP_1_0_TYPE_ARRAY8: |
10140 | 0 | case AMQP_1_0_TYPE_ARRAY32: |
10141 | 0 | *length_size = dissect_amqp_1_0_array(tvb, |
10142 | 0 | pinfo, |
10143 | 0 | offset-1, /* "-1" due to decode type again in the method */ |
10144 | 0 | item, |
10145 | 0 | hf_amqp_type, |
10146 | 0 | hf_amqp_subtype_count, |
10147 | 0 | hf_amqp_subtypes, name)-1; /* "-1" due to decode type again in the method */ |
10148 | 0 | break; |
10149 | 0 | default: |
10150 | 0 | expert_add_info_format(pinfo, |
10151 | 0 | item, |
10152 | 0 | &ei_amqp_unknown_amqp_type, |
10153 | 0 | "Unknown AMQP type %d (0x%x) of field \"%s\"", |
10154 | 0 | code, code, |
10155 | 0 | name ? name : proto_registrar_get_name(hf_amqp_type)); |
10156 | 0 | *length_size = tvb_reported_length_remaining(tvb, offset); /* to stop dissecting */ |
10157 | 0 | break; |
10158 | 0 | } |
10159 | 0 | } |
10160 | 0 | decrement_dissection_depth(pinfo); |
10161 | 0 | } |
10162 | | |
10163 | | /* It decodes 1.0 type, including type constructor |
10164 | | * arguments: see get_amqp_1_0_value_formatter |
10165 | | * return code: decoded format code of primitive type |
10166 | | */ |
10167 | | static unsigned |
10168 | | get_amqp_1_0_type_formatter(tvbuff_t *tvb, |
10169 | | int offset, |
10170 | | int *hf_amqp_type, |
10171 | | const char **name, |
10172 | | uint32_t *hf_amqp_subtype_count, |
10173 | | int * const **hf_amqp_subtypes, |
10174 | | unsigned *length_size) |
10175 | 0 | { |
10176 | 0 | int i; |
10177 | 0 | int code; |
10178 | 0 | int format_code_type; |
10179 | 0 | unsigned format_len = 0; |
10180 | 0 | unsigned orig_offset = offset; |
10181 | |
|
10182 | 0 | code = tvb_get_uint8(tvb, offset); |
10183 | 0 | offset += 1; |
10184 | 0 | if (code == AMQP_1_0_TYPE_DESCRIPTOR_CONSTRUCTOR) { |
10185 | 0 | format_code_type = tvb_get_uint8(tvb, offset); |
10186 | 0 | offset += 1; |
10187 | 0 | if (format_code_type%16==0xf) { /* i.e. format codes like %x5F %x00-FF */ |
10188 | 0 | offset += 1; |
10189 | 0 | } |
10190 | 0 | switch (format_code_type/16) { |
10191 | 0 | case 4: /* empty */ |
10192 | 0 | format_len=0; |
10193 | 0 | break; |
10194 | 0 | case 5: /* fixed-one */ |
10195 | 0 | format_len=1; |
10196 | 0 | code = (int)tvb_get_uint8(tvb, offset); |
10197 | 0 | break; |
10198 | 0 | case 6: /* fixed-two */ |
10199 | 0 | format_len=2; |
10200 | 0 | code = (int)tvb_get_ntohs(tvb, offset); |
10201 | 0 | break; |
10202 | 0 | case 7: /* fixed-four */ |
10203 | 0 | format_len=4; |
10204 | 0 | code = (int)tvb_get_ntohl(tvb, offset); |
10205 | 0 | break; |
10206 | 0 | case 8: /* fixed-eight */ |
10207 | 0 | format_len=8; |
10208 | 0 | code = (int)tvb_get_ntoh64(tvb, offset); |
10209 | | /* TODO: use a int64_t for 32-bit platforms? we never compare it to |
10210 | | * anything bigger than an int anyways... */ |
10211 | 0 | break; |
10212 | 0 | case 9: /* fixed-sixteen */ |
10213 | 0 | format_len=16; |
10214 | | /* TODO: somehow set code = next_128_bytes */ |
10215 | 0 | break; |
10216 | 0 | case 0xa: /* variable-one */ |
10217 | 0 | format_len = format_amqp_1_0_str(tvb, offset, 1, name); |
10218 | 0 | break; |
10219 | 0 | case 0xb: /* variable-four */ |
10220 | 0 | format_len = format_amqp_1_0_str(tvb, offset, 4, name); |
10221 | 0 | break; |
10222 | | /* TODO: could be type compound? or array? */ |
10223 | 0 | } |
10224 | 0 | offset += format_len; |
10225 | 0 | for (i = 0; amqp_1_0_defined_types[i].format_code != 0x00; ++i) { |
10226 | 0 | if (amqp_1_0_defined_types[i].format_code == code) { |
10227 | 0 | *hf_amqp_type = *(amqp_1_0_defined_types[i].hf_amqp_type); |
10228 | 0 | *hf_amqp_subtype_count = amqp_1_0_defined_types[i].hf_amqp_subtype_count; |
10229 | 0 | *hf_amqp_subtypes = amqp_1_0_defined_types[i].hf_amqp_subtypes; |
10230 | 0 | break; |
10231 | 0 | } |
10232 | 0 | } |
10233 | | /* now take the real primitive format code */ |
10234 | 0 | code = tvb_get_uint8(tvb, offset); |
10235 | 0 | offset += 1; |
10236 | 0 | } |
10237 | 0 | *length_size = (offset-orig_offset); |
10238 | 0 | return code; |
10239 | 0 | } |
10240 | | |
10241 | | /* It decodes both 1.0 type and its value, in fact it just calls |
10242 | | * get_amqp_1_0_type_formatter and get_amqp_1_0_value_formatter methods |
10243 | | * arguments: see get_amqp_1_0_value_formatter |
10244 | | */ |
10245 | | static void |
10246 | | // NOLINTNEXTLINE(misc-no-recursion) |
10247 | | get_amqp_1_0_type_value_formatter(tvbuff_t *tvb, |
10248 | | packet_info *pinfo, |
10249 | | int offset, |
10250 | | int hf_amqp_type, /* what to print in GUI if name==NULL */ |
10251 | | const char *name, /* what to print in GUI */ |
10252 | | unsigned *length_size, /* decoded length */ |
10253 | | proto_item *item) |
10254 | 0 | { |
10255 | 0 | int code; |
10256 | 0 | uint32_t hf_amqp_subtype_count = 0; |
10257 | 0 | int * const *hf_amqp_subtypes = NULL; |
10258 | 0 | const char *type_name = NULL; |
10259 | 0 | const char *format_name = NULL; |
10260 | 0 | unsigned type_length_size; |
10261 | |
|
10262 | 0 | code = get_amqp_1_0_type_formatter(tvb, |
10263 | 0 | offset, |
10264 | 0 | &hf_amqp_type, |
10265 | 0 | &type_name, |
10266 | 0 | &hf_amqp_subtype_count, |
10267 | 0 | &hf_amqp_subtypes, |
10268 | 0 | &type_length_size); |
10269 | 0 | if ((name != NULL) || (type_name != NULL)) |
10270 | 0 | { |
10271 | 0 | if (type_name == NULL) |
10272 | 0 | format_name = name; |
10273 | 0 | else if (name == NULL) |
10274 | 0 | format_name = type_name; |
10275 | 0 | else |
10276 | 0 | { |
10277 | 0 | format_name = wmem_strdup_printf(pinfo->pool, "%s : %s", name, type_name); |
10278 | 0 | } |
10279 | 0 | } |
10280 | 0 | offset += type_length_size; |
10281 | 0 | get_amqp_1_0_value_formatter(tvb, |
10282 | 0 | pinfo, |
10283 | 0 | code, |
10284 | 0 | offset, |
10285 | 0 | hf_amqp_type, |
10286 | 0 | format_name, |
10287 | 0 | hf_amqp_subtype_count, |
10288 | 0 | hf_amqp_subtypes, |
10289 | 0 | length_size, |
10290 | 0 | item); |
10291 | 0 | *length_size += type_length_size; |
10292 | 0 | } |
10293 | | |
10294 | | static void |
10295 | | get_amqp_timestamp(nstime_t *nstime, tvbuff_t *tvb, unsigned offset) |
10296 | 0 | { |
10297 | 0 | int64_t msec; |
10298 | |
|
10299 | 0 | msec = tvb_get_ntoh64(tvb, offset); |
10300 | 0 | nstime->secs = (time_t)(msec / 1000); |
10301 | 0 | nstime->nsecs = (int)(msec % 1000)*1000000; |
10302 | 0 | } |
10303 | | |
10304 | | static int |
10305 | | dissect_amqp_1_0_fixed(tvbuff_t *tvb, packet_info *pinfo _U_, |
10306 | | unsigned offset, unsigned length, |
10307 | | proto_item *item, int hf_amqp_type) |
10308 | 0 | { |
10309 | 0 | proto_tree_add_item(item, hf_amqp_type, tvb, offset, length, ENC_BIG_ENDIAN); |
10310 | 0 | return length; |
10311 | 0 | } |
10312 | | |
10313 | | |
10314 | | static bool find_data_dissector(tvbuff_t *msg_tvb, packet_info *pinfo, proto_tree *item) |
10315 | 0 | { |
10316 | | //get amqp to string field |
10317 | 0 | if (item == NULL) return false; |
10318 | | |
10319 | 0 | GPtrArray *array = proto_find_finfo(item, hf_amqp_1_0_to_str); |
10320 | |
|
10321 | 0 | if (array == NULL) return false; |
10322 | 0 | if (array->len == 0) { |
10323 | 0 | g_ptr_array_free(array, true); |
10324 | 0 | return false; |
10325 | 0 | } |
10326 | | |
10327 | 0 | field_info *fi = (field_info*)array->pdata[0]; |
10328 | 0 | if (fi == NULL || !FT_IS_STRING(fvalue_type_ftenum(fi->value))) { |
10329 | 0 | g_ptr_array_free(array, true); |
10330 | 0 | return false; |
10331 | 0 | } |
10332 | | |
10333 | 0 | const char* msg_to = fvalue_get_string(fi->value); |
10334 | |
|
10335 | 0 | amqp_message_decode_t *message_decode_entry = NULL; |
10336 | 0 | size_t topic_str_len; |
10337 | 0 | size_t topic_pattern_len; |
10338 | 0 | bool match_found = false; |
10339 | | |
10340 | | //compare amqp to string field with uat entries |
10341 | 0 | for (unsigned i = 0; i < num_amqp_message_decodes && !match_found; i++) { |
10342 | 0 | message_decode_entry = &amqp_message_decodes[i]; |
10343 | 0 | switch (message_decode_entry->match_criteria) { |
10344 | | |
10345 | 0 | case MATCH_CRITERIA_EQUAL: |
10346 | 0 | match_found = (strcmp(msg_to, message_decode_entry->topic_pattern) == 0); |
10347 | 0 | break; |
10348 | | |
10349 | 0 | case MATCH_CRITERIA_CONTAINS: |
10350 | 0 | match_found = (strstr(msg_to, message_decode_entry->topic_pattern) != NULL); |
10351 | 0 | break; |
10352 | | |
10353 | 0 | case MATCH_CRITERIA_STARTS_WITH: |
10354 | 0 | topic_str_len = strlen(msg_to); |
10355 | 0 | topic_pattern_len = strlen(message_decode_entry->topic_pattern); |
10356 | 0 | match_found = ((topic_str_len >= topic_pattern_len) && |
10357 | 0 | (strncmp(msg_to, message_decode_entry->topic_pattern, topic_pattern_len) == 0)); |
10358 | 0 | break; |
10359 | | |
10360 | 0 | case MATCH_CRITERIA_ENDS_WITH: |
10361 | 0 | topic_str_len = strlen(msg_to); |
10362 | 0 | topic_pattern_len = strlen(message_decode_entry->topic_pattern); |
10363 | 0 | match_found = ((topic_str_len >= topic_pattern_len) && |
10364 | 0 | (strcmp(msg_to + (topic_str_len - topic_pattern_len), message_decode_entry->topic_pattern) == 0)); |
10365 | 0 | break; |
10366 | | |
10367 | 0 | case MATCH_CRITERIA_REGEX: |
10368 | 0 | if (message_decode_entry->topic_regex) { |
10369 | 0 | GMatchInfo *match_info = NULL; |
10370 | 0 | g_regex_match(message_decode_entry->topic_regex, msg_to, (GRegexMatchFlags) 0, &match_info); |
10371 | 0 | match_found = g_match_info_matches(match_info); |
10372 | 0 | g_match_info_free(match_info); |
10373 | 0 | } |
10374 | 0 | break; |
10375 | | |
10376 | 0 | default: |
10377 | | /* Unknown match criteria */ |
10378 | 0 | break; |
10379 | 0 | } |
10380 | | |
10381 | | |
10382 | 0 | if (match_found) { |
10383 | 0 | call_dissector_with_data(message_decode_entry->payload_proto, msg_tvb, pinfo, item , message_decode_entry->topic_more_info); |
10384 | 0 | } |
10385 | 0 | } |
10386 | | |
10387 | | |
10388 | 0 | g_ptr_array_free(array, true); |
10389 | |
|
10390 | 0 | return match_found; |
10391 | 0 | } |
10392 | | |
10393 | | static int |
10394 | | dissect_amqp_1_0_variable(tvbuff_t *tvb, packet_info *pinfo, |
10395 | | unsigned offset, unsigned length, |
10396 | | proto_item *item, int hf_amqp_type) |
10397 | 0 | { |
10398 | 0 | unsigned bin_length; |
10399 | |
|
10400 | 0 | if (length == 1) |
10401 | 0 | bin_length = tvb_get_uint8(tvb, offset); |
10402 | 0 | else if (length == 4) |
10403 | 0 | bin_length = tvb_get_ntohl(tvb, offset); |
10404 | 0 | else { |
10405 | 0 | expert_add_info_format(pinfo, item, &ei_amqp_unknown_amqp_type, |
10406 | 0 | "Invalid size of length indicator %d!", length); |
10407 | 0 | return length; |
10408 | 0 | } |
10409 | 0 | offset += length; |
10410 | |
|
10411 | 0 | bool is_dissected = false; |
10412 | 0 | if (hf_amqp_type == hf_amqp_1_0_data) { |
10413 | 0 | tvbuff_t *msg_tvb = tvb_new_subset_length(tvb, offset, bin_length); |
10414 | 0 | is_dissected = find_data_dissector(msg_tvb, pinfo, item); |
10415 | 0 | } |
10416 | |
|
10417 | 0 | if (!is_dissected) { |
10418 | 0 | proto_tree_add_item(item, hf_amqp_type, tvb, offset, bin_length, ENC_NA); |
10419 | 0 | } |
10420 | 0 | return length+bin_length; |
10421 | 0 | } |
10422 | | |
10423 | | static int |
10424 | | dissect_amqp_1_0_timestamp(tvbuff_t *tvb, packet_info *pinfo _U_, |
10425 | | unsigned offset, unsigned length, |
10426 | | proto_item *item, int hf_amqp_type) |
10427 | 0 | { |
10428 | 0 | nstime_t nstime; |
10429 | 0 | get_amqp_timestamp(&nstime, tvb, offset); |
10430 | |
|
10431 | 0 | proto_tree_add_time(item, hf_amqp_type, tvb, offset, length, &nstime); |
10432 | 0 | return length; |
10433 | 0 | } |
10434 | | |
10435 | | static int |
10436 | | dissect_amqp_1_0_skip(tvbuff_t *tvb _U_, packet_info *pinfo _U_, |
10437 | | unsigned offset _U_, unsigned length _U_, |
10438 | | proto_item *item _U_, int hf_amqp_type _U_) |
10439 | 0 | { |
10440 | | /* null value means the respective field is omitted */ |
10441 | 0 | return 0; |
10442 | 0 | } |
10443 | | |
10444 | | static int |
10445 | | dissect_amqp_1_0_zero(tvbuff_t *tvb, packet_info *pinfo, |
10446 | | unsigned offset, unsigned length _U_, |
10447 | | proto_item *item, int hf_amqp_type) |
10448 | 0 | { |
10449 | 0 | switch(proto_registrar_get_ftype(hf_amqp_type)) |
10450 | 0 | { |
10451 | 0 | case FT_UINT8: |
10452 | 0 | case FT_UINT16: |
10453 | 0 | case FT_UINT24: |
10454 | 0 | case FT_UINT32: |
10455 | 0 | proto_tree_add_uint(item, hf_amqp_type, tvb, offset-1, 1, 0); |
10456 | 0 | break; |
10457 | 0 | case FT_UINT40: |
10458 | 0 | case FT_UINT48: |
10459 | 0 | case FT_UINT56: |
10460 | 0 | case FT_UINT64: |
10461 | 0 | proto_tree_add_uint64(item, hf_amqp_type, tvb, offset-1, 1, 0L); |
10462 | 0 | break; |
10463 | 0 | case FT_INT8: |
10464 | 0 | case FT_INT16: |
10465 | 0 | case FT_INT24: |
10466 | 0 | case FT_INT32: |
10467 | 0 | proto_tree_add_int(item, hf_amqp_type, tvb, offset-1, 1, 0); |
10468 | 0 | break; |
10469 | 0 | case FT_INT40: |
10470 | 0 | case FT_INT48: |
10471 | 0 | case FT_INT56: |
10472 | 0 | case FT_INT64: |
10473 | 0 | proto_tree_add_int64(item, hf_amqp_type, tvb, offset-1, 1, 0L); |
10474 | 0 | break; |
10475 | 0 | default: |
10476 | 0 | expert_add_info_format(pinfo, item, &ei_amqp_unknown_amqp_type, |
10477 | 0 | "Unexpected integer at frame position %d to list field \"%s\"", |
10478 | 0 | offset, |
10479 | 0 | proto_registrar_get_name(hf_amqp_type)); |
10480 | 0 | } |
10481 | | |
10482 | 0 | return 0; |
10483 | 0 | } |
10484 | | |
10485 | | static int |
10486 | | dissect_amqp_1_0_true(tvbuff_t *tvb, packet_info *pinfo _U_, |
10487 | | unsigned offset, unsigned length _U_, |
10488 | | proto_item *item, int hf_amqp_type) |
10489 | 0 | { |
10490 | 0 | proto_tree_add_boolean(item, hf_amqp_type, tvb, offset-1, 1, true); |
10491 | 0 | return 0; |
10492 | 0 | } |
10493 | | |
10494 | | static int |
10495 | | dissect_amqp_1_0_false(tvbuff_t *tvb, packet_info *pinfo _U_, |
10496 | | unsigned offset, unsigned length _U_, |
10497 | | proto_item *item, int hf_amqp_type) |
10498 | 0 | { |
10499 | 0 | proto_tree_add_boolean(item, hf_amqp_type, tvb, offset-1, 1, false); |
10500 | 0 | return 0; |
10501 | 0 | } |
10502 | | |
10503 | | static int |
10504 | | format_amqp_1_0_null(tvbuff_t *tvb _U_, |
10505 | | unsigned offset _U_, unsigned length _U_, |
10506 | | const char **value) |
10507 | 0 | { |
10508 | 0 | *value = "(null)"; |
10509 | 0 | return 0; |
10510 | 0 | } |
10511 | | |
10512 | | static int |
10513 | | format_amqp_1_0_boolean_true(tvbuff_t *tvb _U_, |
10514 | | unsigned offset _U_, unsigned length _U_, |
10515 | | const char **value) |
10516 | 0 | { |
10517 | 0 | *value = wmem_strdup(wmem_packet_scope(), "true"); |
10518 | 0 | return 0; |
10519 | 0 | } |
10520 | | |
10521 | | static int |
10522 | | format_amqp_1_0_boolean_false(tvbuff_t *tvb _U_, |
10523 | | unsigned offset _U_, unsigned length _U_, |
10524 | | const char **value) |
10525 | 0 | { |
10526 | 0 | *value = wmem_strdup(wmem_packet_scope(), "false"); |
10527 | 0 | return 0; |
10528 | 0 | } |
10529 | | |
10530 | | static int |
10531 | | format_amqp_1_0_boolean(tvbuff_t *tvb, |
10532 | | unsigned offset, unsigned length _U_, |
10533 | | const char **value) |
10534 | 0 | { |
10535 | 0 | uint8_t val; |
10536 | |
|
10537 | 0 | val = tvb_get_uint8(tvb, offset); |
10538 | 0 | *value = wmem_strdup(wmem_packet_scope(), val ? "true" : "false"); |
10539 | 0 | return 1; |
10540 | 0 | } |
10541 | | |
10542 | | /* this covers ubyte, ushort, uint and ulong */ |
10543 | | static int |
10544 | | format_amqp_1_0_uint(tvbuff_t *tvb, |
10545 | | unsigned offset, unsigned length, |
10546 | | const char **value) |
10547 | 0 | { |
10548 | 0 | uint64_t val; |
10549 | |
|
10550 | 0 | if (length == 0) |
10551 | 0 | val = 0; |
10552 | 0 | else if (length == 1) |
10553 | 0 | val = tvb_get_uint8(tvb, offset); |
10554 | 0 | else if (length == 2) |
10555 | 0 | val = tvb_get_ntohs(tvb, offset); |
10556 | 0 | else if (length == 4) |
10557 | 0 | val = tvb_get_ntohl(tvb, offset); |
10558 | 0 | else if (length == 8) |
10559 | 0 | val = tvb_get_ntoh64(tvb, offset); |
10560 | 0 | else { |
10561 | 0 | *value = wmem_strdup_printf(wmem_packet_scope(), "Invalid uint length %d!", length); |
10562 | 0 | return length; |
10563 | 0 | } |
10564 | 0 | *value = wmem_strdup_printf(wmem_packet_scope(), "%" PRIu64, val); |
10565 | 0 | return length; |
10566 | 0 | } |
10567 | | |
10568 | | /* this covers byte, short, int and long */ |
10569 | | static int |
10570 | | format_amqp_1_0_int(tvbuff_t *tvb, |
10571 | | unsigned offset, unsigned length, |
10572 | | const char **value) |
10573 | 0 | { |
10574 | 0 | int64_t val; |
10575 | |
|
10576 | 0 | if (length == 1) |
10577 | 0 | val = tvb_get_int8(tvb, offset); |
10578 | 0 | else if (length == 2) |
10579 | 0 | val = tvb_get_ntohis(tvb, offset); |
10580 | 0 | else if (length == 4) |
10581 | 0 | val = tvb_get_ntohil(tvb, offset); |
10582 | 0 | else if (length == 8) |
10583 | 0 | val = tvb_get_ntohi64(tvb, offset); |
10584 | 0 | else { |
10585 | 0 | *value = wmem_strdup_printf(wmem_packet_scope(), "Invalid int length %d!", length); |
10586 | 0 | return length; |
10587 | 0 | } |
10588 | 0 | *value = wmem_strdup_printf(wmem_packet_scope(), "%" PRIi64, val); |
10589 | 0 | return length; |
10590 | 0 | } |
10591 | | |
10592 | | static int |
10593 | | format_amqp_1_0_float(tvbuff_t *tvb, unsigned offset, unsigned length _U_, |
10594 | | const char **value) |
10595 | 0 | { |
10596 | 0 | float floatval; |
10597 | 0 | floatval = tvb_get_ntohieee_float(tvb, offset); |
10598 | 0 | *value = wmem_strdup_printf(wmem_packet_scope(), "%f", floatval); |
10599 | 0 | return 4; |
10600 | 0 | } |
10601 | | |
10602 | | static int |
10603 | | format_amqp_1_0_double(tvbuff_t *tvb, unsigned offset, unsigned length _U_, |
10604 | | const char **value) |
10605 | 0 | { |
10606 | 0 | double doubleval; |
10607 | 0 | doubleval = tvb_get_ntohieee_double(tvb, offset); |
10608 | 0 | *value = wmem_strdup_printf(wmem_packet_scope(), "%f", doubleval); |
10609 | 0 | return 8; |
10610 | 0 | } |
10611 | | |
10612 | | static int |
10613 | | format_amqp_1_0_decimal(tvbuff_t *tvb _U_, unsigned offset _U_, unsigned length, |
10614 | | const char **value) |
10615 | 0 | { |
10616 | | /* TODO: this requires the _Decimal32 datatype from ISO/IEC TR 24732 |
10617 | | * and corresponding support in printf and glib |
10618 | | */ |
10619 | 0 | *value = wmem_strdup_printf(wmem_packet_scope(), "(not supported)"); |
10620 | 0 | return length; |
10621 | 0 | } |
10622 | | |
10623 | | static int |
10624 | | format_amqp_1_0_char(tvbuff_t *tvb, unsigned offset, unsigned length _U_, |
10625 | | const char **value) |
10626 | 0 | { |
10627 | | /* one UTF-32BE encoded Unicode character */ |
10628 | 0 | *value = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, 4, ENC_UCS_4|ENC_BIG_ENDIAN); |
10629 | 0 | return 4; |
10630 | 0 | } |
10631 | | |
10632 | | static int |
10633 | | format_amqp_1_0_timestamp(tvbuff_t *tvb, unsigned offset, unsigned length _U_, |
10634 | | const char **value) |
10635 | 0 | { |
10636 | 0 | nstime_t nstime; |
10637 | 0 | get_amqp_timestamp(&nstime, tvb, offset); |
10638 | |
|
10639 | 0 | *value = abs_time_to_str(wmem_packet_scope(), &nstime, ABSOLUTE_TIME_UTC, false); |
10640 | 0 | return 8; |
10641 | 0 | } |
10642 | | |
10643 | | static int |
10644 | | format_amqp_1_0_uuid(tvbuff_t *tvb, unsigned offset, unsigned length _U_, |
10645 | | const char **value) |
10646 | 0 | { |
10647 | 0 | e_guid_t uuid; |
10648 | 0 | tvb_get_guid(tvb, offset, &uuid, ENC_BIG_ENDIAN); |
10649 | 0 | *value = guid_to_str(wmem_packet_scope(), &uuid); |
10650 | 0 | return 16; |
10651 | 0 | } |
10652 | | |
10653 | | static int |
10654 | | format_amqp_1_0_bin(tvbuff_t *tvb, |
10655 | | unsigned offset, unsigned length, |
10656 | | const char **value) |
10657 | 0 | { |
10658 | 0 | unsigned bin_length; |
10659 | |
|
10660 | 0 | if (length == 1) |
10661 | 0 | bin_length = tvb_get_uint8(tvb, offset); |
10662 | 0 | else if (length == 4) |
10663 | 0 | bin_length = tvb_get_ntohl(tvb, offset); |
10664 | 0 | else { |
10665 | 0 | *value = wmem_strdup_printf(wmem_packet_scope(), "Invalid binary length size %d!", length); |
10666 | 0 | return length; |
10667 | 0 | } |
10668 | 0 | offset += length; |
10669 | 0 | *value = tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, bin_length); |
10670 | 0 | return (length+bin_length); |
10671 | 0 | } |
10672 | | |
10673 | | static int |
10674 | | format_amqp_1_0_str(tvbuff_t *tvb, |
10675 | | unsigned offset, unsigned length, |
10676 | | const char **value) |
10677 | 0 | { |
10678 | 0 | unsigned string_length; |
10679 | |
|
10680 | 0 | if (length == 1) |
10681 | 0 | string_length = tvb_get_uint8(tvb, offset); |
10682 | 0 | else if (length == 4) |
10683 | 0 | string_length = tvb_get_ntohl(tvb, offset); |
10684 | 0 | else { |
10685 | 0 | *value = wmem_strdup_printf(wmem_packet_scope(), "Invalid string length size %d!", length); |
10686 | 0 | return length; |
10687 | 0 | } |
10688 | 0 | offset += length; |
10689 | 0 | *value = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, string_length, ENC_UTF_8|ENC_NA); |
10690 | | /* offset += string_length; */ |
10691 | 0 | return (string_length + length); |
10692 | 0 | } |
10693 | | |
10694 | | static int |
10695 | | format_amqp_1_0_symbol(tvbuff_t *tvb, |
10696 | | unsigned offset, unsigned length, |
10697 | | const char **value) |
10698 | 0 | { |
10699 | 0 | unsigned symbol_length; |
10700 | 0 | if (length == 1) |
10701 | 0 | symbol_length = tvb_get_uint8(tvb, offset); |
10702 | 0 | else if (length == 4) |
10703 | 0 | symbol_length = tvb_get_ntohl(tvb, offset); |
10704 | 0 | else { |
10705 | 0 | *value = wmem_strdup_printf(wmem_packet_scope(), "Invalid symbol length size %d!", length); |
10706 | 0 | return length; |
10707 | 0 | } |
10708 | 0 | offset += length; |
10709 | 0 | *value = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, symbol_length, ENC_ASCII|ENC_NA); |
10710 | | /* offset += symbol_length; */ |
10711 | 0 | return (symbol_length + length); |
10712 | 0 | } |
10713 | | |
10714 | | |
10715 | | /* AMQP 0-10 Type Decoders */ |
10716 | | |
10717 | | static bool |
10718 | | get_amqp_0_10_type_formatter(uint8_t code, |
10719 | | const char **name, |
10720 | | type_formatter *formatter, |
10721 | | unsigned *length_size) |
10722 | 709 | { |
10723 | 709 | int i; |
10724 | 709 | const struct amqp_typeinfo *table; |
10725 | | |
10726 | 709 | if (code & 0x80) |
10727 | 90 | table = amqp_0_10_var_types; |
10728 | 619 | else |
10729 | 619 | table = amqp_0_10_fixed_types; |
10730 | 3.23k | for (i = 0; table[i].typecode != 0xff; ++i) { |
10731 | 2.98k | if (table[i].typecode == code) { |
10732 | 463 | *name = wmem_strdup(wmem_packet_scope(), table[i].amqp_typename); |
10733 | 463 | *formatter = table[i].formatter; |
10734 | 463 | *length_size = table[i].known_size; |
10735 | 463 | return true; |
10736 | 463 | } |
10737 | 2.98k | } |
10738 | 246 | return false; |
10739 | 709 | } |
10740 | | |
10741 | | static int |
10742 | | format_amqp_0_10_bin(tvbuff_t *tvb, |
10743 | | unsigned offset, unsigned length, |
10744 | | const char **value) |
10745 | 243 | { |
10746 | 243 | *value = tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, length); |
10747 | 243 | return length; |
10748 | 243 | } |
10749 | | |
10750 | | static int |
10751 | | format_amqp_0_10_int(tvbuff_t *tvb, |
10752 | | unsigned offset, unsigned length, |
10753 | | const char **value) |
10754 | 105 | { |
10755 | 105 | int val; |
10756 | | |
10757 | 105 | if (length == 1) |
10758 | 82 | val = tvb_get_int8(tvb, offset); |
10759 | 23 | else if (length == 2) |
10760 | 23 | val = tvb_get_ntohis(tvb, offset); |
10761 | 0 | else if (length == 4) |
10762 | 0 | val = tvb_get_ntohil(tvb, offset); |
10763 | 0 | else { |
10764 | 0 | *value = wmem_strdup_printf(wmem_packet_scope(), "Invalid int length %d!", length); |
10765 | 0 | return length; |
10766 | 0 | } |
10767 | 105 | *value = wmem_strdup_printf(wmem_packet_scope(), "%d", val); |
10768 | 105 | return length; |
10769 | 105 | } |
10770 | | |
10771 | | static int |
10772 | | format_amqp_0_10_uint(tvbuff_t *tvb, |
10773 | | unsigned offset, unsigned length, |
10774 | | const char **value) |
10775 | 65 | { |
10776 | 65 | unsigned int val; |
10777 | | |
10778 | 65 | if (length == 1) |
10779 | 56 | val = tvb_get_uint8(tvb, offset); |
10780 | 9 | else if (length == 2) |
10781 | 1 | val = tvb_get_ntohs(tvb, offset); |
10782 | 8 | else if (length == 4) |
10783 | 8 | val = tvb_get_ntohl(tvb, offset); |
10784 | 0 | else { |
10785 | 0 | *value = wmem_strdup_printf(wmem_packet_scope(), "Invalid uint length %d!", length); |
10786 | 0 | return length; |
10787 | 0 | } |
10788 | 65 | *value = wmem_strdup_printf(wmem_packet_scope(), "%u", val); |
10789 | 65 | return length; |
10790 | 65 | } |
10791 | | |
10792 | | static int |
10793 | | format_amqp_0_10_char(tvbuff_t *tvb, |
10794 | | unsigned offset, unsigned length _U_, |
10795 | | const char **value) |
10796 | 22 | { |
10797 | 22 | *value = tvb_format_text(wmem_packet_scope(), tvb, offset, 1); |
10798 | 22 | return 1; |
10799 | 22 | } |
10800 | | |
10801 | | static int |
10802 | | format_amqp_0_10_boolean(tvbuff_t *tvb, |
10803 | | unsigned offset, unsigned length _U_, |
10804 | | const char **value) |
10805 | 25 | { |
10806 | 25 | uint8_t val; |
10807 | | |
10808 | 25 | val = tvb_get_uint8(tvb, offset); |
10809 | 25 | *value = wmem_strdup(wmem_packet_scope(), val ? "true" : "false"); |
10810 | 25 | return 1; |
10811 | 25 | } |
10812 | | |
10813 | | static int |
10814 | | format_amqp_0_10_vbin(tvbuff_t *tvb, |
10815 | | unsigned offset, unsigned length, |
10816 | | const char **value) |
10817 | 2 | { |
10818 | 2 | unsigned bin_length; |
10819 | | |
10820 | 2 | if (length == 1) |
10821 | 2 | bin_length = tvb_get_uint8(tvb, offset); |
10822 | 0 | else if (length == 2) |
10823 | 0 | bin_length = tvb_get_ntohs(tvb, offset); |
10824 | 0 | else if (length == 4) |
10825 | 0 | bin_length = amqp_0_10_get_32bit_size(tvb, offset); |
10826 | 0 | else { |
10827 | 0 | *value = wmem_strdup_printf(wmem_packet_scope(), "Invalid vbin length size %d!", length); |
10828 | 0 | return length; |
10829 | 0 | } |
10830 | 2 | offset += length; |
10831 | 2 | *value = tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, bin_length); |
10832 | | /* offset += bin_length; */ |
10833 | 2 | return (bin_length + length); |
10834 | 2 | } |
10835 | | |
10836 | | static int |
10837 | | format_amqp_0_10_str(tvbuff_t *tvb, |
10838 | | unsigned offset, unsigned length, |
10839 | | const char **value) |
10840 | 1 | { |
10841 | 1 | unsigned string_length; |
10842 | | |
10843 | 1 | if (length == 1) |
10844 | 0 | string_length = tvb_get_uint8(tvb, offset); |
10845 | 1 | else if (length == 2) |
10846 | 1 | string_length = tvb_get_ntohs(tvb, offset); |
10847 | 0 | else if (length == 4) |
10848 | 0 | string_length = amqp_0_10_get_32bit_size(tvb, offset); |
10849 | 0 | else { |
10850 | 0 | *value = wmem_strdup_printf(wmem_packet_scope(), "Invalid string length size %d!", length); |
10851 | 0 | return length; |
10852 | 0 | } |
10853 | 1 | offset += length; |
10854 | 1 | *value = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, string_length, ENC_UTF_8|ENC_NA); |
10855 | | /* offset += string_length; */ |
10856 | 1 | return (string_length + length); |
10857 | 1 | } |
10858 | | |
10859 | | static void |
10860 | | format_amqp_0_10_sequence_set(tvbuff_t *tvb, unsigned offset, unsigned length, |
10861 | | proto_item *item) |
10862 | 0 | { |
10863 | 0 | unsigned i, values; |
10864 | | |
10865 | | /* Must be 4-byte values */ |
10866 | 0 | if ((length % 4) != 0) { |
10867 | 0 | proto_item_append_text(item, "Invalid sequence set length %u", |
10868 | 0 | length); |
10869 | 0 | } |
10870 | |
|
10871 | 0 | values = length / 4; |
10872 | | /* There must be pairs of values */ |
10873 | 0 | if ((values % 2) != 0) { |
10874 | 0 | proto_item_append_text(item, "Invalid sequence set value count %u", |
10875 | 0 | values); |
10876 | 0 | } |
10877 | 0 | proto_item_append_text(item, " ["); |
10878 | 0 | for (i = 0; i < values; i += 2) { |
10879 | 0 | proto_item_append_text(item, "(%u, %u)%s", |
10880 | 0 | tvb_get_ntohl(tvb, offset), |
10881 | 0 | tvb_get_ntohl(tvb, offset + 4), |
10882 | 0 | (i < (values - 2)) ? ", " : ""); |
10883 | 0 | offset += 8; |
10884 | 0 | length -= 8; |
10885 | 0 | } |
10886 | 0 | proto_item_append_text(item, "]"); |
10887 | 0 | } |
10888 | | |
10889 | | static void amqp_prompt(packet_info *pinfo _U_, char* result) |
10890 | 0 | { |
10891 | 0 | snprintf(result, MAX_DECODE_AS_PROMPT_LEN, "AMQP version as"); |
10892 | 0 | } |
10893 | | |
10894 | | static void *amqp_value(packet_info *pinfo) |
10895 | 0 | { |
10896 | 0 | unsigned version = AMQP_V1_0; |
10897 | 0 | conversation_t *conv = find_conversation_pinfo(pinfo, 0); |
10898 | 0 | if (conv != NULL) |
10899 | 0 | { |
10900 | 0 | amqp_conv *conn = (amqp_conv *)conversation_get_proto_data(conv, proto_amqp); |
10901 | 0 | if (conn != NULL) |
10902 | 0 | version = conn->version; |
10903 | 0 | } |
10904 | |
|
10905 | 0 | return GUINT_TO_POINTER(version); |
10906 | 0 | } |
10907 | | |
10908 | | static int |
10909 | | dissect_amqpv0_9(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) |
10910 | 0 | { |
10911 | 0 | tcp_dissect_pdus(tvb, pinfo, tree, true, 7, get_amqp_0_9_message_len, |
10912 | 0 | dissect_amqp_0_9_frame, data); |
10913 | 0 | return tvb_captured_length(tvb); |
10914 | 0 | } |
10915 | | |
10916 | | static int |
10917 | | dissect_amqpv0_10(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) |
10918 | 73 | { |
10919 | 73 | tcp_dissect_pdus(tvb, pinfo, tree, true, 8, get_amqp_0_10_message_len, |
10920 | 73 | dissect_amqp_0_10_frame, data); |
10921 | 73 | return tvb_captured_length(tvb); |
10922 | 73 | } |
10923 | | |
10924 | | static int |
10925 | | dissect_amqpv1_0(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) |
10926 | 13 | { |
10927 | 13 | tcp_dissect_pdus(tvb, pinfo, tree, true, 8, get_amqp_1_0_message_len, |
10928 | 13 | dissect_amqp_1_0_frame, data); |
10929 | 13 | return tvb_captured_length(tvb); |
10930 | 13 | } |
10931 | | |
10932 | | /* Main dissection routine */ |
10933 | | |
10934 | | static int |
10935 | | dissect_amqp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) |
10936 | 88 | { |
10937 | 88 | conversation_t *conv; |
10938 | 88 | amqp_conv *conn; |
10939 | | |
10940 | 88 | col_set_str(pinfo->cinfo, COL_PROTOCOL, "AMQP"); |
10941 | 88 | col_clear(pinfo->cinfo, COL_INFO); |
10942 | | |
10943 | | /* We need at least 8 bytes to check the protocol and get the frame size */ |
10944 | 88 | if (tvb_reported_length (tvb) < 8) { |
10945 | | /* But at this moment we don't know how much we will need */ |
10946 | 1 | pinfo->desegment_len = DESEGMENT_ONE_MORE_SEGMENT; |
10947 | 1 | return -1; /* need more data */ |
10948 | 1 | } |
10949 | | |
10950 | | /* Find (or build) conversation to remember the protocol version */ |
10951 | 87 | conv = find_or_create_conversation(pinfo); |
10952 | 87 | conn = (amqp_conv *)conversation_get_proto_data(conv, proto_amqp); |
10953 | 87 | if (conn == NULL) { |
10954 | 80 | conn = wmem_new0(wmem_file_scope(), amqp_conv); |
10955 | 80 | conn->channels = wmem_map_new(wmem_file_scope(), g_direct_hash, g_direct_equal); |
10956 | 80 | conversation_add_proto_data(conv, proto_amqp, conn); |
10957 | 80 | } |
10958 | 87 | check_amqp_version(tvb, conn); |
10959 | | /* Restore can_desegment to whatever TCP set it to before calling the |
10960 | | * subdissector (which will decrement it a second time) in order for |
10961 | | * tcp_dissect_pdus() to work as expected. |
10962 | | */ |
10963 | 87 | pinfo->can_desegment = pinfo->saved_can_desegment; |
10964 | 87 | if (!dissector_try_uint_with_data(version_table, conn->version, tvb, pinfo, tree, false, data)) |
10965 | 1 | { |
10966 | 1 | col_append_str(pinfo->cinfo, COL_INFO, "AMQP (unknown version)"); |
10967 | 1 | col_set_fence(pinfo->cinfo, COL_INFO); |
10968 | 1 | } |
10969 | | |
10970 | 87 | return tvb_captured_length(tvb); |
10971 | 88 | } |
10972 | | |
10973 | | /* Basic registration functions */ |
10974 | | |
10975 | | void |
10976 | | proto_register_amqp(void) |
10977 | 14 | { |
10978 | | /* |
10979 | | * Setup of field format array. A few of the 0-9 fields are reused |
10980 | | * in 0-10, but there are many separate. |
10981 | | */ |
10982 | 14 | static hf_register_info hf[] = { |
10983 | 14 | {&hf_amqp_1_0_size, { |
10984 | 14 | "Length", "amqp.length", |
10985 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
10986 | 14 | "Length of the frame", HFILL}}, |
10987 | 14 | {&hf_amqp_1_0_doff, { |
10988 | 14 | "Doff", "amqp.doff", |
10989 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
10990 | 14 | "Data offset", HFILL}}, |
10991 | 14 | {&hf_amqp_1_0_type, { |
10992 | 14 | "Type", "amqp.type", |
10993 | 14 | FT_UINT8, BASE_DEC, VALS(amqp_1_0_type), 0x0, |
10994 | 14 | "Frame type", HFILL}}, |
10995 | 14 | {&hf_amqp_1_0_amqp_performative, { |
10996 | 14 | "Performative", "amqp.performative", |
10997 | 14 | FT_UINT8, BASE_DEC, VALS(amqp_1_0_AMQP_performatives), 0x0, |
10998 | 14 | NULL, HFILL}}, |
10999 | 14 | {&hf_amqp_1_0_sasl_method, { |
11000 | 14 | "SASL Method", "amqp.sasl.method", |
11001 | 14 | FT_UINT8, BASE_DEC, VALS(amqp_1_0_SASL_methods), 0x0, |
11002 | 14 | NULL, HFILL}}, |
11003 | 14 | {&hf_amqp_1_0_list, { |
11004 | 14 | "list-item", "amqp.list", |
11005 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
11006 | 14 | NULL, HFILL}}, |
11007 | 14 | {&hf_amqp_1_0_map, { |
11008 | 14 | "map-item", "amqp.map", |
11009 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
11010 | 14 | NULL, HFILL}}, |
11011 | 14 | {&hf_amqp_1_0_containerId, { |
11012 | 14 | "Container-Id", "amqp.performative.arguments.containerId", |
11013 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
11014 | 14 | NULL, HFILL}}, |
11015 | 14 | {&hf_amqp_1_0_hostname, { |
11016 | 14 | "Hostname", "amqp.performative.arguments.hostname", |
11017 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
11018 | 14 | NULL, HFILL}}, |
11019 | 14 | {&hf_amqp_1_0_maxFrameSize, { |
11020 | 14 | "Max-Frame-Size", "amqp.performative.arguments.maxFrameSize", |
11021 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
11022 | 14 | NULL, HFILL}}, |
11023 | 14 | {&hf_amqp_1_0_channelMax, { |
11024 | 14 | "Channel-Max", "amqp.performative.arguments.channelMax", |
11025 | 14 | FT_UINT16, BASE_DEC, NULL, 0, |
11026 | 14 | NULL, HFILL}}, |
11027 | 14 | {&hf_amqp_1_0_idleTimeOut, { |
11028 | 14 | "Idle-Timeout", "amqp.performative.arguments.idleTimeout", |
11029 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
11030 | 14 | NULL, HFILL}}, |
11031 | 14 | {&hf_amqp_1_0_outgoingLocales, { |
11032 | 14 | "Outgoing-Locales", "amqp.performative.arguments.outgoingLocales", |
11033 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
11034 | 14 | NULL, HFILL}}, |
11035 | 14 | {&hf_amqp_1_0_incomingLocales, { |
11036 | 14 | "Incoming-Locales", "amqp.performative.arguments.incomingLocales", |
11037 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
11038 | 14 | NULL, HFILL}}, |
11039 | 14 | {&hf_amqp_1_0_offeredCapabilities, { |
11040 | 14 | "Offered-Capabilities", "amqp.arguments.offeredCapabilities", |
11041 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
11042 | 14 | NULL, HFILL}}, |
11043 | 14 | {&hf_amqp_1_0_desiredCapabilities, { |
11044 | 14 | "Desired-Capabilities", "amqp.performative.arguments.desiredCapabilities", |
11045 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
11046 | 14 | NULL, HFILL}}, |
11047 | 14 | {&hf_amqp_1_0_properties, { |
11048 | 14 | "Properties", "amqp.performative.arguments.properties", |
11049 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
11050 | 14 | NULL, HFILL}}, |
11051 | 14 | {&hf_amqp_1_0_nextIncomingId, { |
11052 | 14 | "Next-Incoming-Id", "amqp.performative.arguments.nextIncomingId", |
11053 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
11054 | 14 | NULL, HFILL}}, |
11055 | 14 | {&hf_amqp_1_0_deliveryCount, { |
11056 | 14 | "Delivery-Count", "amqp.performative.arguments.deliveryCount", |
11057 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
11058 | 14 | NULL, HFILL}}, |
11059 | 14 | {&hf_amqp_1_0_sectionNumber, { |
11060 | 14 | "Section-Number", "amqp.received.sectionNumber", |
11061 | 14 | FT_UINT8, BASE_DEC, NULL, 0, |
11062 | 14 | "Section number of received message", HFILL}}, |
11063 | 14 | {&hf_amqp_1_0_sectionOffset, { |
11064 | 14 | "Section-Offset", "amqp.received.sectionOffset", |
11065 | 14 | FT_UINT8, BASE_DEC, NULL, 0, |
11066 | 14 | "Section offset of received message", HFILL}}, |
11067 | 14 | {&hf_amqp_1_0_deliveryFailed, { |
11068 | 14 | "Delivery-Failed", "amqp.modified.deliveryFailed", |
11069 | 14 | FT_BOOLEAN, BASE_NONE, NULL, 0, |
11070 | 14 | NULL, HFILL}}, |
11071 | 14 | {&hf_amqp_1_0_undeliverableHere, { |
11072 | 14 | "Undeliverable-Here", "amqp.modified.undeliverableHere", |
11073 | 14 | FT_BOOLEAN, BASE_NONE, NULL, 0, |
11074 | 14 | NULL, HFILL}}, |
11075 | 14 | {&hf_amqp_1_0_linkCredit, { |
11076 | 14 | "Link-Credit", "amqp.performative.arguments.linkCredit", |
11077 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
11078 | 14 | NULL, HFILL}}, |
11079 | 14 | {&hf_amqp_1_0_available, { |
11080 | 14 | "Available", "amqp.performative.arguments.available", |
11081 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
11082 | 14 | "The number of available messages", HFILL}}, |
11083 | 14 | {&hf_amqp_1_0_drain, { |
11084 | 14 | "Drain", "amqp.performative.arguments.drain", |
11085 | 14 | FT_BOOLEAN, BASE_NONE, NULL, 0, |
11086 | 14 | "Drain mode", HFILL}}, |
11087 | 14 | {&hf_amqp_1_0_echo, { |
11088 | 14 | "Echo", "amqp.performative.arguments.echo", |
11089 | 14 | FT_BOOLEAN, BASE_NONE, NULL, 0, |
11090 | 14 | "Request state from partner", HFILL}}, |
11091 | 14 | {&hf_amqp_1_0_deliveryId, { |
11092 | 14 | "Delivery-Id", "amqp.performative.arguments.deliveryId", |
11093 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
11094 | 14 | NULL, HFILL}}, |
11095 | 14 | {&hf_amqp_1_0_deliveryTag, { |
11096 | 14 | "Delivery-Tag", "amqp.performative.arguments.deliveryTag", |
11097 | 14 | FT_BYTES, BASE_NONE, NULL, 0, |
11098 | 14 | NULL, HFILL}}, |
11099 | 14 | {&hf_amqp_1_0_messageFormat, { |
11100 | 14 | "Message-Format", "amqp.performative.arguments.messageFormat", |
11101 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
11102 | 14 | NULL, HFILL}}, |
11103 | 14 | {&hf_amqp_1_0_settled, { |
11104 | 14 | "Settled", "amqp.performative.arguments.settled", |
11105 | 14 | FT_BOOLEAN, BASE_NONE, NULL, 0, |
11106 | 14 | NULL, HFILL}}, |
11107 | 14 | {&hf_amqp_1_0_more, { |
11108 | 14 | "More", "amqp.performative.arguments.more", |
11109 | 14 | FT_BOOLEAN, BASE_NONE, NULL, 0, |
11110 | 14 | "The message has more content", HFILL}}, |
11111 | 14 | {&hf_amqp_1_0_state, { |
11112 | 14 | "State", "amqp.performative.arguments.state", |
11113 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
11114 | 14 | "State of the delivery at sender", HFILL}}, |
11115 | 14 | {&hf_amqp_1_0_resume, { |
11116 | 14 | "Resume", "amqp.performative.arguments.resume", |
11117 | 14 | FT_BOOLEAN, BASE_NONE, NULL, 0, |
11118 | 14 | "Resumed delivery", HFILL}}, |
11119 | 14 | {&hf_amqp_1_0_aborted, { |
11120 | 14 | "Aborted", "amqp.performative.arguments.aborted", |
11121 | 14 | FT_BOOLEAN, BASE_NONE, NULL, 0, |
11122 | 14 | "Message is aborted", HFILL}}, |
11123 | 14 | {&hf_amqp_1_0_batchable, { |
11124 | 14 | "Batchable", "amqp.performative.arguments.batchable", |
11125 | 14 | FT_BOOLEAN, BASE_NONE, NULL, 0, |
11126 | 14 | "Batchable hint", HFILL}}, |
11127 | 14 | {&hf_amqp_1_0_first, { |
11128 | 14 | "First", "amqp.performative.arguments.first", |
11129 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
11130 | 14 | "Lower bound of deliveries", HFILL}}, |
11131 | 14 | {&hf_amqp_1_0_last, { |
11132 | 14 | "Last", "amqp.performative.arguments.last", |
11133 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
11134 | 14 | "Upper bound of deliveries", HFILL}}, |
11135 | 14 | {&hf_amqp_1_0_closed, { |
11136 | 14 | "Closed", "amqp.performative.arguments.closed", |
11137 | 14 | FT_BOOLEAN, BASE_NONE, NULL, 0, |
11138 | 14 | "Sender closed the link", HFILL}}, |
11139 | 14 | {&hf_amqp_1_0_remoteChannel, { |
11140 | 14 | "Remote-Channel", "amqp.performative.arguments.remoteChannel", |
11141 | 14 | FT_UINT16, BASE_DEC, NULL, 0, |
11142 | 14 | NULL, HFILL}}, |
11143 | 14 | {&hf_amqp_1_0_nextOutgoingId, { |
11144 | 14 | "Next-Outgoing-Id", "amqp.performative.arguments.nextOutgoingId", |
11145 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
11146 | 14 | NULL, HFILL}}, |
11147 | 14 | {&hf_amqp_1_0_incomingWindow, { |
11148 | 14 | "Incoming-Window", "amqp.performative.arguments.incomingWindow", |
11149 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
11150 | 14 | NULL, HFILL}}, |
11151 | 14 | {&hf_amqp_1_0_outgoingWindow, { |
11152 | 14 | "Outgoing-Window", "amqp.performative.arguments.outgoingWindow", |
11153 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
11154 | 14 | NULL, HFILL}}, |
11155 | 14 | {&hf_amqp_1_0_handleMax, { |
11156 | 14 | "Handle-Max", "amqp.performative.arguments.handleMax", |
11157 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
11158 | 14 | NULL, HFILL}}, |
11159 | 14 | {&hf_amqp_1_0_name, { |
11160 | 14 | "Name", "amqp.performative.arguments.name", |
11161 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
11162 | 14 | "Name of the link", HFILL}}, |
11163 | 14 | {&hf_amqp_1_0_handle, { |
11164 | 14 | "Handle", "amqp.performative.arguments.handle", |
11165 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
11166 | 14 | "Handle for the link while attached", HFILL}}, |
11167 | 14 | {&hf_amqp_1_0_role, { |
11168 | 14 | "Role", "amqp.performative.arguments.role", |
11169 | 14 | FT_BOOLEAN, BASE_NONE, TFS(&amqp_1_0_role_value), 0, |
11170 | 14 | "Role of the link endpoint", HFILL}}, |
11171 | 14 | {&hf_amqp_1_0_sndSettleMode, { |
11172 | 14 | "Send-Settle-Mode", "amqp.performative.arguments.sndSettleMode", |
11173 | 14 | FT_UINT8, BASE_DEC, VALS(amqp_1_0_sndSettleMode_value), 0, |
11174 | 14 | NULL, HFILL}}, |
11175 | 14 | {&hf_amqp_1_0_rcvSettleMode, { |
11176 | 14 | "Receive-Settle-Mode", "amqp.performative.arguments.rcvSettleMode", |
11177 | 14 | FT_UINT8, BASE_DEC, VALS(amqp_1_0_rcvSettleMode_value), 0, |
11178 | 14 | NULL, HFILL}}, |
11179 | 14 | {&hf_amqp_1_0_source, { |
11180 | 14 | "Source", "amqp.performative.arguments.source", |
11181 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
11182 | 14 | "Source for messages", HFILL}}, |
11183 | 14 | {&hf_amqp_1_0_target, { |
11184 | 14 | "Target", "amqp.performative.arguments.target", |
11185 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
11186 | 14 | "Target for messages", HFILL}}, |
11187 | 14 | {&hf_amqp_1_0_deleteOnClose, { |
11188 | 14 | "Delete-On-Close", "amqp.lifetime-policy.deleteOnClose", |
11189 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
11190 | 14 | NULL, HFILL}}, |
11191 | 14 | {&hf_amqp_1_0_deleteOnNoLinks, { |
11192 | 14 | "Delete-On-No-Links", "amqp.lifetime-policy.deleteOnNoLinks", |
11193 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
11194 | 14 | NULL, HFILL}}, |
11195 | 14 | {&hf_amqp_1_0_deleteOnNoMessages, { |
11196 | 14 | "Delete-On-No-Messages", "amqp.lifetime-policy.deleteOnNoMessages", |
11197 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
11198 | 14 | NULL, HFILL}}, |
11199 | 14 | {&hf_amqp_1_0_deleteOnNoLinksOrMessages, { |
11200 | 14 | "Delete-On-No-Links-Or-Messages", "amqp.lifetime-policy.deleteOnNoLinksOrMessages", |
11201 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
11202 | 14 | NULL, HFILL}}, |
11203 | 14 | {&hf_amqp_1_0_coordinator, { |
11204 | 14 | "Coordinator", "amqp.tx.coordinator", |
11205 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
11206 | 14 | "Transaction coordinator", HFILL}}, |
11207 | 14 | {&hf_amqp_1_0_declare, { |
11208 | 14 | "Declare", "amqp.tx.declare", |
11209 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
11210 | 14 | "Declare transaction", HFILL}}, |
11211 | 14 | {&hf_amqp_1_0_globalId, { |
11212 | 14 | "Global-Id", "amqp.tx.arguments.globalId", |
11213 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
11214 | 14 | "Global id of a transaction", HFILL}}, |
11215 | 14 | {&hf_amqp_1_0_discharge, { |
11216 | 14 | "Discharge", "amqp.tx.discharge", |
11217 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
11218 | 14 | "Discharge transaction", HFILL}}, |
11219 | 14 | {&hf_amqp_1_0_txnId, { |
11220 | 14 | "Txn-Id", "amqp.tx.arguments.txnId", |
11221 | 14 | FT_BYTES, BASE_NONE, NULL, 0, |
11222 | 14 | "Transaction id", HFILL}}, |
11223 | 14 | {&hf_amqp_1_0_fail, { |
11224 | 14 | "Fail", "amqp.tx.arguments.fail", |
11225 | 14 | FT_BOOLEAN, BASE_NONE, NULL, 0, |
11226 | 14 | "Fail flag of transaction", HFILL}}, |
11227 | 14 | {&hf_amqp_1_0_declared, { |
11228 | 14 | "Declared", "amqp.tx.declared", |
11229 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
11230 | 14 | "Declared transaction", HFILL}}, |
11231 | 14 | {&hf_amqp_1_0_transactionalState, { |
11232 | 14 | "Transactional-State", "amqp.tx.transactionalState", |
11233 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
11234 | 14 | NULL, HFILL}}, |
11235 | 14 | {&hf_amqp_1_0_outcome, { |
11236 | 14 | "Outcome", "amqp.tx.arguments.outcome", |
11237 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
11238 | 14 | "Outcome of transaction", HFILL}}, |
11239 | 14 | {&hf_amqp_1_0_unsettled, { |
11240 | 14 | "Unsettled", "amqp.performative.arguments.unsettled", |
11241 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
11242 | 14 | "Unsettled delivery state", HFILL}}, |
11243 | 14 | {&hf_amqp_1_0_incompleteUnsettled, { |
11244 | 14 | "Incomplete-Unsettled", "amqp.performative.arguments.incompleteUnsettled", |
11245 | 14 | FT_BOOLEAN, BASE_NONE, NULL, 0, |
11246 | 14 | NULL, HFILL}}, |
11247 | 14 | {&hf_amqp_1_0_initialDeliveryCount, { |
11248 | 14 | "Initial-Delivery-Count", "amqp.performative.arguments.initDeliveryCount", |
11249 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
11250 | 14 | NULL, HFILL}}, |
11251 | 14 | {&hf_amqp_1_0_maxMessageSize, { |
11252 | 14 | "Max-Message-Size", "amqp.performative.arguments.maxMessageSize", |
11253 | 14 | FT_UINT64, BASE_DEC, NULL, 0, |
11254 | 14 | NULL, HFILL}}, |
11255 | 14 | {&hf_amqp_1_0_error, { |
11256 | 14 | "Error", "amqp.performative.arguments.error", |
11257 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
11258 | 14 | "Error in a performative", HFILL}}, |
11259 | 14 | {&hf_amqp_1_0_messageHeader, { |
11260 | 14 | "Message-Header", "amqp.header", |
11261 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
11262 | 14 | NULL, HFILL}}, |
11263 | 14 | {&hf_amqp_1_0_messageProperties, { |
11264 | 14 | "Message-Properties", "amqp.properties", |
11265 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
11266 | 14 | NULL, HFILL}}, |
11267 | 14 | {&hf_amqp_1_0_deliveryAnnotations, { |
11268 | 14 | "Delivery-Annotations", "amqp.deliveryAnnotations", |
11269 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
11270 | 14 | NULL, HFILL}}, |
11271 | 14 | {&hf_amqp_1_0_messageAnnotations, { |
11272 | 14 | "Message-Annotations", "amqp.messageAnnotations", |
11273 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
11274 | 14 | NULL, HFILL}}, |
11275 | 14 | {&hf_amqp_1_0_applicationProperties, { |
11276 | 14 | "Application-Properties", "amqp.applicationProperties", |
11277 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
11278 | 14 | NULL, HFILL}}, |
11279 | 14 | {&hf_amqp_1_0_data, { |
11280 | 14 | "Data", "amqp.data", |
11281 | 14 | FT_BYTES, BASE_NONE, NULL, 0, |
11282 | 14 | "Opaque binary data", HFILL}}, |
11283 | 14 | {&hf_amqp_1_0_amqp_sequence, { |
11284 | 14 | "AMQP-Sequence", "amqp.sequence", |
11285 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
11286 | 14 | NULL, HFILL}}, |
11287 | 14 | {&hf_amqp_1_0_amqp_value, { |
11288 | 14 | "AMQP-Value", "amqp.value", |
11289 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
11290 | 14 | NULL, HFILL}}, |
11291 | 14 | {&hf_amqp_1_0_footer, { |
11292 | 14 | "Footer", "amqp.footer", |
11293 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
11294 | 14 | "Message footer", HFILL}}, |
11295 | 14 | {&hf_amqp_1_0_received, { |
11296 | 14 | "Received", "amqp.delivery-state.received", |
11297 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
11298 | 14 | "Received messages", HFILL}}, |
11299 | 14 | {&hf_amqp_1_0_accepted, { |
11300 | 14 | "Accepted", "amqp.delivery-state.accepted", |
11301 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
11302 | 14 | "Accepted messages", HFILL}}, |
11303 | 14 | {&hf_amqp_1_0_rejected, { |
11304 | 14 | "Rejected", "amqp.delivery-state.rejected", |
11305 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
11306 | 14 | "Rejected messages", HFILL}}, |
11307 | 14 | {&hf_amqp_1_0_released, { |
11308 | 14 | "Released", "amqp.delivery-state.released", |
11309 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
11310 | 14 | "Released messages", HFILL}}, |
11311 | 14 | {&hf_amqp_1_0_modified, { |
11312 | 14 | "Modified", "amqp.delivery-state.modified", |
11313 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
11314 | 14 | "Modified messages", HFILL}}, |
11315 | 14 | {&hf_amqp_1_0_condition, { |
11316 | 14 | "Condition", "amqp.error.condition", |
11317 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
11318 | 14 | "Error condition", HFILL}}, |
11319 | 14 | {&hf_amqp_1_0_description, { |
11320 | 14 | "Description", "amqp.error.description", |
11321 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
11322 | 14 | "Error description", HFILL}}, |
11323 | 14 | {&hf_amqp_1_0_info, { |
11324 | 14 | "Info", "amqp.error.info", |
11325 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
11326 | 14 | "Error info", HFILL}}, |
11327 | 14 | {&hf_amqp_1_0_address, { |
11328 | 14 | "Address", "amqp.performative.arguments.address", |
11329 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
11330 | 14 | "Address of a node", HFILL}}, |
11331 | 14 | {&hf_amqp_1_0_durable, { |
11332 | 14 | "Durable", "amqp.message.durable", |
11333 | 14 | FT_BOOLEAN, BASE_NONE, NULL, 0, |
11334 | 14 | "Message durability", HFILL}}, |
11335 | 14 | {&hf_amqp_1_0_terminusDurable, { |
11336 | 14 | "Terminus-Durable", "amqp.performative.arguments.terminusDurable", |
11337 | 14 | FT_UINT8, BASE_DEC, VALS(amqp_1_0_terminus_durable_value), 0, |
11338 | 14 | NULL, HFILL}}, |
11339 | 14 | {&hf_amqp_1_0_priority, { |
11340 | 14 | "Priority", "amqp.message.priority", |
11341 | 14 | FT_UINT8, BASE_DEC, NULL, 0, |
11342 | 14 | "Message priority", HFILL}}, |
11343 | 14 | {&hf_amqp_1_0_ttl, { |
11344 | 14 | "Ttl", "amqp.message.ttl", |
11345 | 14 | FT_UINT8, BASE_DEC, NULL, 0, |
11346 | 14 | "Time to live", HFILL}}, |
11347 | 14 | {&hf_amqp_1_0_firstAcquirer, { |
11348 | 14 | "First-Acquirer", "amqp.message.firstAcquirer", |
11349 | 14 | FT_BOOLEAN, BASE_NONE, NULL, 0, |
11350 | 14 | NULL, HFILL}}, |
11351 | 14 | {&hf_amqp_1_0_expiryPolicy, { |
11352 | 14 | "Expiry-Policy", "amqp.properties.expiryPolicy", |
11353 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
11354 | 14 | NULL, HFILL}}, |
11355 | 14 | {&hf_amqp_1_0_timeout, { |
11356 | 14 | "Timeout", "amqp.properties.timeout", |
11357 | 14 | FT_UINT8, BASE_DEC, NULL, 0, |
11358 | 14 | "Duration that an expiring target will be retained", HFILL}}, |
11359 | 14 | {&hf_amqp_1_0_dynamic, { |
11360 | 14 | "Dynamic", "amqp.properties.dynamic", |
11361 | 14 | FT_BOOLEAN, BASE_NONE, NULL, 0, |
11362 | 14 | "Dynamic creation of a remote node", HFILL}}, |
11363 | 14 | {&hf_amqp_1_0_dynamicNodeProperties, { |
11364 | 14 | "Dynamic-Node-Properties", "amqp.properties.dynamicNodeProperties", |
11365 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
11366 | 14 | NULL, HFILL}}, |
11367 | 14 | {&hf_amqp_1_0_distributionMode, { |
11368 | 14 | "Distribution-Mode", "amqp.properties.distributionMode", |
11369 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
11370 | 14 | NULL, HFILL}}, |
11371 | 14 | {&hf_amqp_1_0_filter, { |
11372 | 14 | "Filter", "amqp.properties.filter", |
11373 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
11374 | 14 | "Predicates to filter messages admitted to the link", HFILL}}, |
11375 | 14 | {&hf_amqp_1_0_defaultOutcome, { |
11376 | 14 | "Default-Outcome", "amqp.properties.defaultOutcome", |
11377 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
11378 | 14 | NULL, HFILL}}, |
11379 | 14 | {&hf_amqp_1_0_outcomes, { |
11380 | 14 | "Outcomes", "amqp.properties.outcomes", |
11381 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
11382 | 14 | "Outcomes descriptors for the link", HFILL}}, |
11383 | 14 | {&hf_amqp_1_0_capabilities, { |
11384 | 14 | "Capabilities", "amqp.properties.capabilities", |
11385 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
11386 | 14 | "Extension capabilities of the sender", HFILL}}, |
11387 | 14 | {&hf_amqp_1_0_messageId, { |
11388 | 14 | "Message-Id", "amqp.message.messageId", |
11389 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
11390 | 14 | NULL, HFILL}}, |
11391 | 14 | {&hf_amqp_1_0_userId, { |
11392 | 14 | "User-Id", "amqp.message.userId", |
11393 | 14 | FT_BYTES, BASE_NONE, NULL, 0, |
11394 | 14 | NULL, HFILL}}, |
11395 | 14 | {&hf_amqp_1_0_to, { |
11396 | 14 | "To", "amqp.message.to", |
11397 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
11398 | 14 | "Destination address of the message", HFILL}}, |
11399 | 14 | {&hf_amqp_1_0_subject, { |
11400 | 14 | "Subject", "amqp.message.subject", |
11401 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
11402 | 14 | "Message subject", HFILL}}, |
11403 | 14 | {&hf_amqp_1_0_replyTo, { |
11404 | 14 | "Reply-To", "amqp.message.replyTo", |
11405 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
11406 | 14 | NULL, HFILL}}, |
11407 | 14 | {&hf_amqp_1_0_correlationId, { |
11408 | 14 | "Correlation-Id", "amqp.message.correlationId", |
11409 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
11410 | 14 | NULL, HFILL}}, |
11411 | 14 | {&hf_amqp_1_0_contentType, { |
11412 | 14 | "Content-Type", "amqp.message.contentType", |
11413 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
11414 | 14 | NULL, HFILL}}, |
11415 | 14 | {&hf_amqp_1_0_contentEncoding, { |
11416 | 14 | "Content-Encoding", "amqp.message.contentEncoding", |
11417 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
11418 | 14 | NULL, HFILL}}, |
11419 | 14 | {&hf_amqp_1_0_absoluteExpiryTime, { |
11420 | 14 | "Expiry-Time", "amqp.message.expiryTime", |
11421 | 14 | FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL, 0, |
11422 | 14 | "Absolute expiry time", HFILL}}, |
11423 | 14 | {&hf_amqp_1_0_creationTime, { |
11424 | 14 | "Creation-Time", "amqp.message.creationTime", |
11425 | 14 | FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL, 0, |
11426 | 14 | NULL, HFILL}}, |
11427 | 14 | {&hf_amqp_1_0_groupId, { |
11428 | 14 | "Group-Id", "amqp.message.groupId", |
11429 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
11430 | 14 | NULL, HFILL}}, |
11431 | 14 | {&hf_amqp_1_0_groupSequence, { |
11432 | 14 | "Group-Sequence", "amqp.message.groupSequence", |
11433 | 14 | FT_UINT8, BASE_DEC, NULL, 0, |
11434 | 14 | NULL, HFILL}}, |
11435 | 14 | {&hf_amqp_1_0_replyToGroupId, { |
11436 | 14 | "Reply-To-Group-Id", "amqp.message.replyToGroupId", |
11437 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
11438 | 14 | NULL, HFILL}}, |
11439 | 14 | {&hf_amqp_1_0_mechanisms, { |
11440 | 14 | "Mechanisms", "amqp.sasl.mechanisms", |
11441 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
11442 | 14 | "Supported security mechanisms", HFILL}}, |
11443 | 14 | {&hf_amqp_1_0_mechanism, { |
11444 | 14 | "Mechanism", "amqp.sasl.mechanism", |
11445 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
11446 | 14 | "Chosen security mechanism", HFILL}}, |
11447 | 14 | {&hf_amqp_1_0_initResponse, { |
11448 | 14 | "Init-Response", "amqp.sasl.initResponse", |
11449 | 14 | FT_BYTES, BASE_NONE, NULL, 0, |
11450 | 14 | NULL, HFILL}}, |
11451 | 14 | {&hf_amqp_1_0_saslChallenge, { |
11452 | 14 | "Challenge", "amqp.sasl.challenge", |
11453 | 14 | FT_BYTES, BASE_NONE, NULL, 0, |
11454 | 14 | "SASL challenge", HFILL}}, |
11455 | 14 | {&hf_amqp_1_0_saslResponse, { |
11456 | 14 | "Response", "amqp.sasl.response", |
11457 | 14 | FT_BYTES, BASE_NONE, NULL, 0, |
11458 | 14 | "SASL response", HFILL}}, |
11459 | 14 | {&hf_amqp_1_0_saslCode, { |
11460 | 14 | "Code", "amqp.sasl.saslCode", |
11461 | 14 | FT_UINT8, BASE_DEC, VALS(amqp_1_0_SASL_code_value), 0, |
11462 | 14 | "SASL outcome code", HFILL}}, |
11463 | 14 | {&hf_amqp_1_0_saslAdditionalData, { |
11464 | 14 | "Additional-Data", "amqp.sasl.addData", |
11465 | 14 | FT_BYTES, BASE_NONE, NULL, 0, |
11466 | 14 | "SASL outcome additional data", HFILL}}, |
11467 | 14 | {&hf_amqp_1_0_outgoingLocales_sym, { |
11468 | 14 | "Outgoing-Locales", "amqp.performative.arguments.outgoingLocales_sym", |
11469 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
11470 | 14 | NULL, HFILL}}, |
11471 | 14 | {&hf_amqp_1_0_incomingLocales_sym, { |
11472 | 14 | "Incoming-Locales", "amqp.performative.arguments.incomingLocales_sym", |
11473 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
11474 | 14 | NULL, HFILL}}, |
11475 | 14 | {&hf_amqp_1_0_offeredCapabilities_sym, { |
11476 | 14 | "Offered-Capabilities", "amqp.arguments.offeredCapabilities_sym", |
11477 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
11478 | 14 | NULL, HFILL}}, |
11479 | 14 | {&hf_amqp_1_0_desiredCapabilities_sym, { |
11480 | 14 | "Desired-Capabilities", "amqp.performative.arguments.desiredCapabilities_sym", |
11481 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
11482 | 14 | NULL, HFILL}}, |
11483 | 14 | {&hf_amqp_1_0_address_str, { |
11484 | 14 | "Address", "amqp.performative.arguments.address.string", |
11485 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
11486 | 14 | "Address of a node", HFILL}}, |
11487 | 14 | {&hf_amqp_1_0_source_str, { |
11488 | 14 | "Source", "amqp.performative.arguments.source.string", |
11489 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
11490 | 14 | "Source for messages", HFILL}}, |
11491 | 14 | {&hf_amqp_1_0_target_str, { |
11492 | 14 | "Target", "amqp.performative.arguments.target.string", |
11493 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
11494 | 14 | "Target for messages", HFILL}}, |
11495 | 14 | {&hf_amqp_1_0_outcomes_sym, { |
11496 | 14 | "Outcomes", "amqp.properties.outcomes_sym", |
11497 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
11498 | 14 | "Outcomes descriptors for the link", HFILL}}, |
11499 | 14 | {&hf_amqp_1_0_capabilities_sym, { |
11500 | 14 | "Capabilities", "amqp.properties.capabilities_sym", |
11501 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
11502 | 14 | "Extension capabilities of the sender", HFILL}}, |
11503 | 14 | {&hf_amqp_1_0_messageId_uint, { |
11504 | 14 | "Message-Id", "amqp.message.messageId.uint", |
11505 | 14 | FT_UINT8, BASE_DEC, NULL, 0, |
11506 | 14 | NULL, HFILL}}, |
11507 | 14 | {&hf_amqp_1_0_messageId_str, { |
11508 | 14 | "Message-Id", "amqp.message.messageId.string", |
11509 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
11510 | 14 | NULL, HFILL}}, |
11511 | 14 | {&hf_amqp_1_0_messageId_bin, { |
11512 | 14 | "Message-Id", "amqp.message.messageId.bytes", |
11513 | 14 | FT_BYTES, BASE_NONE, NULL, 0, |
11514 | 14 | NULL, HFILL}}, |
11515 | 14 | {&hf_amqp_1_0_messageId_uuid, { |
11516 | 14 | "Message-Id", "amqp.message.messageId.guid", |
11517 | 14 | FT_GUID, BASE_NONE, NULL, 0, |
11518 | 14 | NULL, HFILL}}, |
11519 | 14 | {&hf_amqp_1_0_correlationId_uint, { |
11520 | 14 | "Correlation-Id", "amqp.message.correlationId.uint", |
11521 | 14 | FT_UINT8, BASE_DEC, NULL, 0, |
11522 | 14 | NULL, HFILL}}, |
11523 | 14 | {&hf_amqp_1_0_correlationId_str, { |
11524 | 14 | "Correlation-Id", "amqp.message.correlationId.string", |
11525 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
11526 | 14 | NULL, HFILL}}, |
11527 | 14 | {&hf_amqp_1_0_correlationId_bin, { |
11528 | 14 | "Correlation-Id", "amqp.message.correlationId.bytes", |
11529 | 14 | FT_BYTES, BASE_NONE, NULL, 0, |
11530 | 14 | NULL, HFILL}}, |
11531 | 14 | {&hf_amqp_1_0_correlationId_uuid, { |
11532 | 14 | "Correlation-Id", "amqp.message.correlationId.guid", |
11533 | 14 | FT_GUID, BASE_NONE, NULL, 0, |
11534 | 14 | NULL, HFILL}}, |
11535 | 14 | {&hf_amqp_1_0_to_str, { |
11536 | 14 | "To", "amqp.message.to.string", |
11537 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
11538 | 14 | "Destination address of the message", HFILL}}, |
11539 | 14 | {&hf_amqp_1_0_replyTo_str, { |
11540 | 14 | "Reply-To", "amqp.message.replyTo.string", |
11541 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
11542 | 14 | NULL, HFILL}}, |
11543 | 14 | {&hf_amqp_1_0_mechanisms_sym, { |
11544 | 14 | "Mechanisms", "amqp.sasl.mechanisms_sym", |
11545 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
11546 | 14 | "Supported security mechanisms", HFILL}}, |
11547 | 14 | {&hf_amqp_0_10_format, { |
11548 | 14 | "Format", "amqp.format", |
11549 | 14 | FT_UINT8, BASE_DEC, NULL, 0xc0, |
11550 | 14 | "Framing version", HFILL}}, |
11551 | 14 | {&hf_amqp_0_10_position, { |
11552 | 14 | "Position", "amqp.frame-position", |
11553 | 14 | FT_UINT8, BASE_DEC, VALS(amqp_0_10_frame_position), 0x0f, |
11554 | 14 | "Framing position", HFILL}}, |
11555 | 14 | {&hf_amqp_0_10_type, { |
11556 | 14 | "Type", "amqp.type", |
11557 | 14 | FT_UINT8, BASE_DEC, VALS(amqp_0_10_frame_types), 0x0, |
11558 | 14 | "Frame type", HFILL}}, |
11559 | 14 | {&hf_amqp_0_10_size, { |
11560 | 14 | "Length", "amqp.length", |
11561 | 14 | FT_UINT16, BASE_DEC, NULL, 0x0, |
11562 | 14 | "Length of the frame", HFILL}}, |
11563 | 14 | {&hf_amqp_0_10_track, { |
11564 | 14 | "Track", "amqp.track-number", |
11565 | 14 | FT_UINT8, BASE_DEC, VALS(amqp_0_10_frame_tracks), 0x0, |
11566 | 14 | "Track number", HFILL}}, |
11567 | 14 | {&hf_amqp_0_10_class, { |
11568 | 14 | "Class", "amqp.class", |
11569 | 14 | FT_UINT8, BASE_DEC, VALS(amqp_0_10_class), 0x0, |
11570 | 14 | "Class ID", HFILL}}, |
11571 | 14 | {&hf_amqp_0_10_connection_method, { |
11572 | 14 | "Method", "amqp.connection.method", |
11573 | 14 | FT_UINT8, BASE_DEC, VALS(amqp_0_10_connection_methods), 0x0, |
11574 | 14 | "Connection Class Method", HFILL}}, |
11575 | 14 | {&hf_amqp_0_10_session_method, { |
11576 | 14 | "Method", "amqp.session.method", |
11577 | 14 | FT_UINT8, BASE_DEC, VALS(amqp_0_10_session_methods), 0x0, |
11578 | 14 | "Session Class Method", HFILL}}, |
11579 | 14 | {&hf_amqp_0_10_execution_method, { |
11580 | 14 | "Method", "amqp.execution.method", |
11581 | 14 | FT_UINT8, BASE_DEC, VALS(amqp_0_10_execution_methods), 0x0, |
11582 | 14 | "Execution Class Method", HFILL}}, |
11583 | 14 | {&hf_amqp_0_10_message_method, { |
11584 | 14 | "Method", "amqp.message.method", |
11585 | 14 | FT_UINT8, BASE_DEC, VALS(amqp_0_10_message_methods), 0x0, |
11586 | 14 | "Message Class Method", HFILL}}, |
11587 | 14 | {&hf_amqp_0_10_tx_method, { |
11588 | 14 | "Method", "amqp.tx.method", |
11589 | 14 | FT_UINT8, BASE_DEC, VALS(amqp_0_10_tx_methods), 0x0, |
11590 | 14 | "Tx Class Method", HFILL}}, |
11591 | 14 | {&hf_amqp_0_10_dtx_method, { |
11592 | 14 | "Method", "amqp.dtx.method", |
11593 | 14 | FT_UINT8, BASE_DEC, VALS(amqp_0_10_dtx_methods), 0x0, |
11594 | 14 | "Dtx Class Method", HFILL}}, |
11595 | 14 | {&hf_amqp_0_10_exchange_method, { |
11596 | 14 | "Method", "amqp.exchange.method", |
11597 | 14 | FT_UINT8, BASE_DEC, VALS(amqp_0_10_exchange_methods), 0x0, |
11598 | 14 | "Exchange Class Method", HFILL}}, |
11599 | 14 | {&hf_amqp_0_10_queue_method, { |
11600 | 14 | "Method", "amqp.queue.method", |
11601 | 14 | FT_UINT8, BASE_DEC, VALS(amqp_0_10_queue_methods), 0x0, |
11602 | 14 | "Queue Class Method", HFILL}}, |
11603 | 14 | {&hf_amqp_0_10_file_method, { |
11604 | 14 | "Method", "amqp.file.method", |
11605 | 14 | FT_UINT8, BASE_DEC, VALS(amqp_0_10_file_methods), 0x0, |
11606 | 14 | "File Class Method", HFILL}}, |
11607 | 14 | {&hf_amqp_0_10_stream_method, { |
11608 | 14 | "Method", "amqp.stream.method", |
11609 | 14 | FT_UINT8, BASE_DEC, VALS(amqp_0_10_stream_methods), 0x0, |
11610 | 14 | "Stream Class Method", HFILL}}, |
11611 | 14 | {&hf_amqp_0_10_message_body, { |
11612 | 14 | "Message body", "amqp.message-body", |
11613 | 14 | FT_NONE, BASE_NONE, NULL, 0x0, |
11614 | 14 | "Message body content", HFILL}}, |
11615 | 14 | {&hf_amqp_0_10_dtx_xid, { |
11616 | 14 | "Xid", "amqp.dtx.xid", |
11617 | 14 | FT_NONE, BASE_NONE, NULL, 0x0, |
11618 | 14 | "Dtx transaction id", HFILL}}, |
11619 | 14 | {&hf_amqp_0_10_dtx_xid_format, { |
11620 | 14 | "Format", "amqp.dtx.xid.format", |
11621 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
11622 | 14 | "Implementation-specific xid format code", HFILL}}, |
11623 | 14 | {&hf_amqp_0_10_dtx_xid_global_id, { |
11624 | 14 | "Global-id", "amqp.dtx.xid.global-id", |
11625 | 14 | FT_UINT_BYTES, BASE_NONE, NULL, 0x0, |
11626 | 14 | "Global transaction id", HFILL}}, |
11627 | 14 | {&hf_amqp_0_10_dtx_xid_branch_id, { |
11628 | 14 | "Branch-id", "amqp.dtx.xid.branch-id", |
11629 | 14 | FT_UINT_BYTES, BASE_NONE, NULL, 0x0, |
11630 | 14 | "Transaction branch qualifier", HFILL}}, |
11631 | 14 | {&hf_amqp_0_10_struct32_size, { |
11632 | 14 | "Size", "amqp.struct32_size", |
11633 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
11634 | 14 | NULL, HFILL}}, |
11635 | 14 | {&hf_amqp_0_10_struct32, { |
11636 | 14 | "struct", "amqp.struct32", |
11637 | 14 | FT_UINT16, BASE_HEX, VALS(amqp_0_10_struct32_vals), 0x0, |
11638 | 14 | NULL, HFILL}}, |
11639 | 14 | {&hf_amqp_0_10_struct32_class, { |
11640 | 14 | "Class", "amqp.struct32.class", |
11641 | 14 | FT_UINT8, BASE_DEC, VALS(amqp_0_10_class), 0x0, |
11642 | 14 | NULL, HFILL}}, |
11643 | 14 | {&hf_amqp_0_10_struct32_struct, { |
11644 | 14 | "Struct", "amqp.struct32.struct", |
11645 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
11646 | 14 | NULL, HFILL}}, |
11647 | 14 | {&hf_amqp_0_10_struct32_padding, { |
11648 | 14 | "Padding", "amqp.struct32.padding", |
11649 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
11650 | 14 | NULL, HFILL}}, |
11651 | 14 | {&hf_amqp_0_10_array_type, { |
11652 | 14 | "Type", "amqp.array.type", |
11653 | 14 | FT_UINT8, BASE_DEC, VALS(amqp_0_10_array_type_vals), 0x0, |
11654 | 14 | NULL, HFILL}}, |
11655 | 14 | {&hf_amqp_0_10_array_element_count, { |
11656 | 14 | "Element count", "amqp.array.element_count", |
11657 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
11658 | 14 | NULL, HFILL}}, |
11659 | 14 | {&hf_amqp_0_10_array_string, { |
11660 | 14 | "String", "amqp.array.string", |
11661 | 14 | FT_UINT_STRING, BASE_NONE, NULL, 0x0, |
11662 | 14 | NULL, HFILL}}, |
11663 | 14 | {&hf_amqp_0_10_struct_delivery_properties_discard_unroutable, { |
11664 | 14 | "Discard-unroutable", "amqp.message.delivery-properties.discard-unroutable", |
11665 | 14 | FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x01, |
11666 | 14 | "Discard message if unroutable", HFILL}}, |
11667 | 14 | {&hf_amqp_0_10_struct_delivery_properties_immediate, { |
11668 | 14 | "Immediate", "amqp.message.delivery-properties.immediate", |
11669 | 14 | FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x02, |
11670 | 14 | "Consider unroutable if can't be routed immediately", HFILL}}, |
11671 | 14 | {&hf_amqp_0_10_struct_delivery_properties_redelivered, { |
11672 | 14 | "Redelivered", "amqp.message.delivery-properties.redelivered", |
11673 | 14 | FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x04, |
11674 | 14 | "Message may have been previously delivered", HFILL}}, |
11675 | 14 | {&hf_amqp_0_10_struct_delivery_properties_priority, { |
11676 | 14 | "Delivery-priority", "amqp.message.delivery-properties.delivery-priority", |
11677 | 14 | FT_UINT8, BASE_DEC, VALS(amqp_0_10_struct_delivery_properties_priorities), 0x0, |
11678 | 14 | "Message delivery priority", HFILL}}, |
11679 | 14 | {&hf_amqp_0_10_struct_delivery_properties_mode, { |
11680 | 14 | "Delivery-mode", "amqp.message.delivery-properties.delivery-mode", |
11681 | 14 | FT_UINT8, BASE_DEC, VALS(amqp_0_10_struct_delivery_properties_modes), 0x0, |
11682 | 14 | "Message delivery persistence mode", HFILL}}, |
11683 | 14 | {&hf_amqp_0_10_struct_delivery_properties_ttl, { |
11684 | 14 | "TTL", "amqp.message.delivery-properties.ttl", |
11685 | 14 | FT_UINT64, BASE_DEC, NULL, 0x0, |
11686 | 14 | "Message time-to-live in msec", HFILL}}, |
11687 | 14 | {&hf_amqp_0_10_struct_delivery_properties_timestamp, { |
11688 | 14 | "Timestamp", "amqp.message.delivery-properties.timestamp", |
11689 | 14 | FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL, 0x0, |
11690 | 14 | "Time of arrival at broker", HFILL}}, |
11691 | 14 | {&hf_amqp_0_10_struct_delivery_properties_expiration, { |
11692 | 14 | "Expiration", "amqp.message.delivery-properties.expiration", |
11693 | 14 | FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL, 0x0, |
11694 | 14 | "Expiration time calculated by broker", HFILL}}, |
11695 | 14 | {&hf_amqp_0_10_struct_delivery_properties_exchange, { |
11696 | 14 | "Exchange", "amqp.message.delivery-properties.exchange", |
11697 | 14 | FT_UINT_STRING, BASE_NONE, NULL, 0x0, |
11698 | 14 | "Originating exchange", HFILL}}, |
11699 | 14 | {&hf_amqp_0_10_struct_delivery_properties_routing_key, { |
11700 | 14 | "Routing-key", "amqp.message.delivery-properties.routing-key", |
11701 | 14 | FT_UINT_STRING, BASE_NONE, NULL, 0x0, |
11702 | 14 | "Message routing key", HFILL}}, |
11703 | 14 | {&hf_amqp_0_10_struct_delivery_properties_resume_ttl, { |
11704 | 14 | "Resume-ttl", "amqp.message.delivery-properties.resume-ttl", |
11705 | 14 | FT_UINT64, BASE_DEC, NULL, 0x0, |
11706 | 14 | "TTL to use when resuming", HFILL}}, |
11707 | 14 | {&hf_amqp_0_10_struct_fragment_properties_first, { |
11708 | 14 | "First", "amqp.message.fragment-properties.first", |
11709 | 14 | FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x01, |
11710 | 14 | "Fragment contains the start of the message", HFILL}}, |
11711 | 14 | {&hf_amqp_0_10_struct_fragment_properties_last, { |
11712 | 14 | "Last", "amqp.message.fragment-properties.last", |
11713 | 14 | FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x02, |
11714 | 14 | "Fragment contains the end of the message", HFILL}}, |
11715 | 14 | {&hf_amqp_0_10_struct_fragment_properties_size, { |
11716 | 14 | "Fragment-size", "amqp.message.fragment-properties.fragment-size", |
11717 | 14 | FT_UINT64, BASE_DEC, NULL, 0x0, |
11718 | 14 | "Size of the message fragment", HFILL}}, |
11719 | | #if 0 |
11720 | | {&hf_amqp_0_10_struct_message_properties, { |
11721 | | "message.message-properties", "amqp.message.message-properties", |
11722 | | FT_NONE, BASE_NONE, NULL, 0x0, |
11723 | | "Message properties struct", HFILL}}, |
11724 | | #endif |
11725 | 14 | {&hf_amqp_0_10_struct_message_properties_content_len, { |
11726 | 14 | "Content-length", "amqp.message.message-properties.content-length", |
11727 | 14 | FT_UINT64, BASE_DEC, NULL, 0x0, |
11728 | 14 | "Length of associated message", HFILL}}, |
11729 | 14 | {&hf_amqp_0_10_struct_message_properties_message_id, { |
11730 | 14 | "Message-id", "amqp.message.message-properties.message-id", |
11731 | 14 | FT_GUID, BASE_NONE, NULL, 0x0, |
11732 | 14 | NULL, HFILL}}, |
11733 | 14 | {&hf_amqp_0_10_struct_message_properties_correlation, { |
11734 | 14 | "Correlation-id", "amqp.message.message-properties.correlation-id", |
11735 | 14 | FT_UINT_BYTES, BASE_NONE, NULL, 0x0, |
11736 | 14 | NULL, HFILL}}, |
11737 | 14 | {&hf_amqp_0_10_struct_message_properties_reply_to, { |
11738 | 14 | "Reply-to", "amqp.message.message-properties.reply-to", |
11739 | 14 | FT_NONE, BASE_NONE, NULL, 0x0, |
11740 | 14 | "Address to reply to", HFILL}}, |
11741 | 14 | {&hf_amqp_0_10_struct_message_properties_content_type, { |
11742 | 14 | "Content-type", "amqp.message.message-properties.content-type", |
11743 | 14 | FT_UINT_STRING, BASE_NONE, NULL, 0x0, |
11744 | 14 | "MIME content type", HFILL}}, |
11745 | 14 | {&hf_amqp_0_10_struct_message_properties_content_encoding, { |
11746 | 14 | "Content-encoding", "amqp.message.message-properties.content-encoding", |
11747 | 14 | FT_UINT_STRING, BASE_NONE, NULL, 0x0, |
11748 | 14 | "MIME content encoding method", HFILL}}, |
11749 | 14 | {&hf_amqp_0_10_struct_message_properties_user_id, { |
11750 | 14 | "User-id", "amqp.message.message-properties.user-id", |
11751 | 14 | FT_UINT_BYTES, BASE_NONE, NULL, 0x0, |
11752 | 14 | "Creating user id", HFILL}}, |
11753 | 14 | {&hf_amqp_0_10_struct_message_properties_app_id, { |
11754 | 14 | "App-id", "amqp.message.message-properties.app-id", |
11755 | 14 | FT_UINT_BYTES, BASE_NONE, NULL, 0x0, |
11756 | 14 | "Creating user id", HFILL}}, |
11757 | 14 | {&hf_amqp_0_10_struct_message_properties_application_headers, { |
11758 | 14 | "Application-headers", "amqp.message.message-properties.application-headers", |
11759 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
11760 | 14 | "Application-private headers", HFILL}}, |
11761 | 14 | {&hf_amqp_0_10_struct_reply_to_exchange, { |
11762 | 14 | "Exchange", "amqp.message.message-properties.reply-to.exchange", |
11763 | 14 | FT_UINT_STRING, BASE_NONE, NULL, 0x0, |
11764 | 14 | "Exchange to reply to", HFILL}}, |
11765 | 14 | {&hf_amqp_0_10_struct_reply_to_routing_key, { |
11766 | 14 | "Routing-key", "amqp.message.message-properties.reply-to.routing-key", |
11767 | 14 | FT_UINT_STRING, BASE_NONE, NULL, 0x0, |
11768 | 14 | "Routing key to reply with", HFILL}}, |
11769 | 14 | {&hf_amqp_0_10_struct_acquired_transfers, { |
11770 | 14 | "Transfers", "amqp.message.acquired.transfers", |
11771 | 14 | FT_NONE, BASE_NONE, NULL, 0x0, |
11772 | 14 | "Command set", HFILL}}, |
11773 | 14 | {&hf_amqp_0_10_struct_resume_result_offset, { |
11774 | 14 | "Offset", "amqp.message.resume-result.offset", |
11775 | 14 | FT_UINT64, BASE_DEC, NULL, 0x0, |
11776 | 14 | "Amount of data already transferred", HFILL}}, |
11777 | 14 | {&hf_amqp_0_10_struct_exchange_query_result_durable, { |
11778 | 14 | "Durable", "amqp.exchange.exchange-query-result.durable", |
11779 | 14 | FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x02, |
11780 | 14 | "Exchange is durable", HFILL}}, |
11781 | 14 | {&hf_amqp_0_10_struct_exchange_query_result_not_found, { |
11782 | 14 | "Not-found", "amqp.exchange.exchange-query-result.not-found", |
11783 | 14 | FT_BOOLEAN, 8, NULL, 0x04, |
11784 | 14 | "Exchange was not found", HFILL}}, |
11785 | 14 | {&hf_amqp_0_10_struct_exchange_bound_result_exchange_not_found, { |
11786 | 14 | "Exchange-not-found", "amqp.exchange.exchange-bound-result.exchange-not-found", |
11787 | 14 | FT_BOOLEAN, 8, NULL, 0x01, |
11788 | 14 | NULL, HFILL}}, |
11789 | 14 | {&hf_amqp_0_10_struct_exchange_bound_result_queue_not_found, { |
11790 | 14 | "Queue-not-found", "amqp.exchange.exchange-bound-result.queue-not-found", |
11791 | 14 | FT_BOOLEAN, 8, NULL, 0x02, |
11792 | 14 | NULL, HFILL}}, |
11793 | 14 | {&hf_amqp_0_10_struct_exchange_bound_result_queue_not_matched, { |
11794 | 14 | "Queue-not-matched", "amqp.exchange.exchange-bound-result.queue-not-matched", |
11795 | 14 | FT_BOOLEAN, 8, NULL, 0x04, |
11796 | 14 | "No binding from exchange to queue", HFILL}}, |
11797 | 14 | {&hf_amqp_0_10_struct_exchange_bound_result_key_not_matched, { |
11798 | 14 | "Key-not-matched", "amqp.exchange.exchange-bound-result.key-not-matched", |
11799 | 14 | FT_BOOLEAN, 8, NULL, 0x08, |
11800 | 14 | "No binding from exchange with binding-key", HFILL}}, |
11801 | 14 | {&hf_amqp_0_10_struct_exchange_bound_result_args_not_matched, { |
11802 | 14 | "Args-not-matched", "amqp.exchange.exchange-bound-result.args-not-matched", |
11803 | 14 | FT_BOOLEAN, 8, NULL, 0x10, |
11804 | 14 | "No binding from exchange with specified arguments", HFILL}}, |
11805 | 14 | {&hf_amqp_0_10_struct_queue_query_result_durable, { |
11806 | 14 | "Durable", "amqp.queue.queue-query-result.durable", |
11807 | 14 | FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x04, |
11808 | 14 | "Queue is durable", HFILL}}, |
11809 | 14 | {&hf_amqp_0_10_struct_queue_query_result_exclusive, { |
11810 | 14 | "Exclusive", "amqp.queue.queue-query-result.exclusive", |
11811 | 14 | FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x08, |
11812 | 14 | "Queue created exclusive-use", HFILL}}, |
11813 | 14 | {&hf_amqp_0_10_struct_queue_query_result_auto_delete, { |
11814 | 14 | "Auto-delete", "amqp.queue.queue-query-result.auto-delete", |
11815 | 14 | FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x10, |
11816 | 14 | "Queue created auto-delete", HFILL}}, |
11817 | 14 | {&hf_amqp_0_10_struct_queue_query_result_message_count, { |
11818 | 14 | "Message-count", "amqp.queue.queue-query-result.message-count", |
11819 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
11820 | 14 | "Number of messages in the queue", HFILL}}, |
11821 | 14 | {&hf_amqp_0_10_struct_queue_query_result_subscriber_count, { |
11822 | 14 | "Subscriber-count", "amqp.queue.queue-query-result.subscriber-count", |
11823 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
11824 | 14 | "Number of subscribers for the queue", HFILL}}, |
11825 | 14 | {&hf_amqp_0_10_struct_file_properties_content_type, { |
11826 | 14 | "Content-type", "amqp.file.file-properties.content-type", |
11827 | 14 | FT_UINT_STRING, BASE_NONE, NULL, 0x0, |
11828 | 14 | "MIME content type", HFILL}}, |
11829 | 14 | {&hf_amqp_0_10_struct_file_properties_content_encoding, { |
11830 | 14 | "Content-encoding", "amqp.file.file-properties.content-encoding", |
11831 | 14 | FT_UINT_STRING, BASE_NONE, NULL, 0x0, |
11832 | 14 | "MIME content encoding", HFILL}}, |
11833 | 14 | {&hf_amqp_0_10_struct_file_properties_headers, { |
11834 | 14 | "Headers", "amqp.file.file-properties.headers", |
11835 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
11836 | 14 | "Message header fields", HFILL}}, |
11837 | 14 | {&hf_amqp_0_10_struct_file_properties_priority, { |
11838 | 14 | "Priority", "amqp.file.file-properties.priority", |
11839 | 14 | FT_UINT8, BASE_DEC, NULL, 0, |
11840 | 14 | "Message priority, 0 to 9", HFILL}}, |
11841 | 14 | {&hf_amqp_0_10_struct_file_properties_reply_to, { |
11842 | 14 | "Reply-to", "amqp.file.file-properties.reply-to", |
11843 | 14 | FT_UINT_STRING, BASE_NONE, NULL, 0x0, |
11844 | 14 | "Destination to reply to", HFILL}}, |
11845 | 14 | {&hf_amqp_0_10_struct_file_properties_message_id, { |
11846 | 14 | "Message-id", "amqp.file.file-properties.message-id", |
11847 | 14 | FT_UINT_STRING, BASE_NONE, NULL, 0x0, |
11848 | 14 | "Application message identifier", HFILL}}, |
11849 | 14 | {&hf_amqp_0_10_struct_file_properties_filename, { |
11850 | 14 | "Filename", "amqp.file.file-properties.filename", |
11851 | 14 | FT_UINT_STRING, BASE_NONE, NULL, 0x0, |
11852 | 14 | "Message filename", HFILL}}, |
11853 | 14 | {&hf_amqp_0_10_struct_file_properties_timestamp, { |
11854 | 14 | "Timestamp", "amqp.file.file-properties.timestamp", |
11855 | 14 | FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL, 0x0, |
11856 | 14 | "Message timestamp", HFILL}}, |
11857 | 14 | {&hf_amqp_0_10_struct_file_properties_cluster_id, { |
11858 | 14 | "Cluster-id", "amqp.file.file-properties.cluster-id", |
11859 | 14 | FT_UINT_STRING, BASE_NONE, NULL, 0x0, |
11860 | 14 | "Intra-cluster routing identifier", HFILL}}, |
11861 | 14 | {&hf_amqp_0_10_struct_stream_properties_content_type, { |
11862 | 14 | "Content-type", "amqp.stream.stream-properties.content-type", |
11863 | 14 | FT_UINT_STRING, BASE_NONE, NULL, 0x0, |
11864 | 14 | "MIME content type", HFILL}}, |
11865 | 14 | {&hf_amqp_0_10_struct_stream_properties_content_encoding, { |
11866 | 14 | "Content-encoding", "amqp.stream.stream-properties.content-encoding", |
11867 | 14 | FT_UINT_STRING, BASE_NONE, NULL, 0x0, |
11868 | 14 | "MIME content encoding", HFILL}}, |
11869 | 14 | {&hf_amqp_0_10_struct_stream_properties_headers, { |
11870 | 14 | "Headers", "amqp.stream.stream-properties.headers", |
11871 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
11872 | 14 | "Message header fields", HFILL}}, |
11873 | 14 | {&hf_amqp_0_10_struct_stream_properties_priority, { |
11874 | 14 | "Priority", "amqp.stream.stream-properties.priority", |
11875 | 14 | FT_UINT8, BASE_DEC, NULL, 0, |
11876 | 14 | "Message priority, 0 to 9", HFILL}}, |
11877 | 14 | {&hf_amqp_0_10_struct_stream_properties_timestamp, { |
11878 | 14 | "Timestamp", "amqp.stream.stream-properties.timestamp", |
11879 | 14 | FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL, 0x0, |
11880 | 14 | "Message timestamp", HFILL}}, |
11881 | 14 | {&hf_amqp_0_10_argument_packing_flags, { |
11882 | 14 | "Packing Flags", "amqp.struct.packing", |
11883 | 14 | FT_UINT16, BASE_HEX, NULL, 0xffff, |
11884 | 14 | "Argument Struct Packing Flags", HFILL}}, |
11885 | 14 | {&hf_amqp_0_10_session_header, { |
11886 | 14 | "Session header", "amqp.session.header", |
11887 | 14 | FT_UINT16, BASE_HEX, NULL, 0x0, |
11888 | 14 | NULL, HFILL}}, |
11889 | 14 | {&hf_amqp_0_10_session_header_sync, { |
11890 | 14 | "Sync", "amqp.session.header.sync", |
11891 | 14 | FT_BOOLEAN, 8, TFS(&amqp_0_10_session_header_sync), 0x01, |
11892 | 14 | "Sync requested", HFILL}}, |
11893 | 14 | {&hf_amqp_0_10_method_session_attach_name, { |
11894 | 14 | "Session Name", "amqp.session.attach.name", |
11895 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
11896 | 14 | NULL, HFILL}}, |
11897 | 14 | {&hf_amqp_0_10_method_session_attach_name_size, { |
11898 | 14 | "Size", "amqp.session.attach.name.size", |
11899 | 14 | FT_UINT16, BASE_DEC, NULL, 0x0, |
11900 | 14 | NULL, HFILL}}, |
11901 | 14 | {&hf_amqp_0_10_method_session_attach_force, { |
11902 | 14 | "Session forced", "amqp.session.attach.force", |
11903 | 14 | FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x02, |
11904 | 14 | NULL, HFILL}}, |
11905 | 14 | {&hf_amqp_0_10_method_session_detached_code, { |
11906 | 14 | "Code", "amqp.session.detached.code", |
11907 | 14 | FT_UINT8, BASE_DEC, VALS(amqp_0_10_method_session_detached_codes), 0x0, |
11908 | 14 | "Reason for detach", HFILL}}, |
11909 | 14 | {&hf_amqp_0_10_method_session_timeout, { |
11910 | 14 | "Timeout", "amqp.session.timeout", |
11911 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
11912 | 14 | "Session timeout (seconds)", HFILL}}, |
11913 | 14 | {&hf_amqp_0_10_method_session_completed_timely, { |
11914 | 14 | "Timely-reply", "amqp.session.completed.timely-reply", |
11915 | 14 | FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x02, |
11916 | 14 | "Timely reply requested", HFILL}}, |
11917 | 14 | {&hf_amqp_0_10_method_session_flush_expected, { |
11918 | 14 | "Expected", "amqp.session.flush.expected", |
11919 | 14 | FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x01, |
11920 | 14 | "Request notification of expected commands", HFILL}}, |
11921 | 14 | {&hf_amqp_0_10_method_session_flush_confirmed, { |
11922 | 14 | "Confirmed", "amqp.session.flush.confirmed", |
11923 | 14 | FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x02, |
11924 | 14 | "Request notification of confirmed commands", HFILL}}, |
11925 | 14 | {&hf_amqp_0_10_method_session_flush_completed, { |
11926 | 14 | "Completed", "amqp.session.flush.completed", |
11927 | 14 | FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x04, |
11928 | 14 | "Request notification of completed commands", HFILL}}, |
11929 | 14 | {&hf_amqp_0_10_method_session_command_point_id, { |
11930 | 14 | "Command-id", "amqp.session.command_point.command_id", |
11931 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
11932 | 14 | "Next command's sequence number", HFILL}}, |
11933 | 14 | {&hf_amqp_0_10_method_session_command_point_offset, { |
11934 | 14 | "Command-offset", "amqp.session.command_point.command_offset", |
11935 | 14 | FT_UINT64, BASE_DEC, NULL, 0x0, |
11936 | 14 | "Byte offset within command", HFILL}}, |
11937 | 14 | {&hf_amqp_0_10_method_session_commands, { |
11938 | 14 | "Commands", "amqp.session.expected.commands", |
11939 | 14 | FT_NONE, BASE_NONE, NULL, 0x0, |
11940 | 14 | "Command set", HFILL}}, |
11941 | 14 | {&hf_amqp_0_10_method_session_fragments, { |
11942 | 14 | "Fragments", "amqp.session.expected.fragments", |
11943 | 14 | FT_NONE, BASE_NONE, NULL, 0x0, |
11944 | 14 | "Command Fragments", HFILL}}, |
11945 | 14 | {&hf_amqp_0_10_method_execution_command_id, { |
11946 | 14 | "Command-id", "amqp.execution.command_id", |
11947 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
11948 | 14 | "Command's sequence number", HFILL}}, |
11949 | 14 | {&hf_amqp_0_10_method_execution_exception_error, { |
11950 | 14 | "Error-code", "amqp.execution.exception.error-code", |
11951 | 14 | FT_UINT16, BASE_DEC, VALS(amqp_0_10_method_execution_exception_errors), 0x0, |
11952 | 14 | "Exception error code", HFILL}}, |
11953 | 14 | {&hf_amqp_0_10_method_execution_field_index, { |
11954 | 14 | "Field-index", "amqp.execution.exception.field-index", |
11955 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
11956 | 14 | "0-based index of exceptional field", HFILL}}, |
11957 | 14 | {&hf_amqp_0_10_method_execution_description, { |
11958 | 14 | "Description", "amqp.execution.exception.description", |
11959 | 14 | FT_UINT_STRING, BASE_NONE, NULL, 0, |
11960 | 14 | "Description of exception", HFILL}}, |
11961 | 14 | {&hf_amqp_0_10_method_execution_error_info, { |
11962 | 14 | "Error-info", "amqp.execution.exception.error-info", |
11963 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
11964 | 14 | "client-properties", HFILL}}, |
11965 | 14 | {&hf_amqp_0_10_method_message_transfer_destination, { |
11966 | 14 | "Destination", "amqp.message.transfer.destination", |
11967 | 14 | FT_UINT_STRING, BASE_NONE, NULL, 0, |
11968 | 14 | "Message destination", HFILL}}, |
11969 | 14 | {&hf_amqp_0_10_method_message_transfer_accept_mode, { |
11970 | 14 | "Accept-mode", "amqp.message.transfer.accept-mode", |
11971 | 14 | FT_UINT8, BASE_DEC, VALS(amqp_0_10_message_transfer_accept_modes), 0x0, |
11972 | 14 | "Message accept mode", HFILL}}, |
11973 | 14 | {&hf_amqp_0_10_method_message_transfer_acquire_mode, { |
11974 | 14 | "Acquire-mode", "amqp.message.transfer.acquire-mode", |
11975 | 14 | FT_UINT8, BASE_DEC, VALS(amqp_0_10_message_transfer_acquire_modes), 0x0, |
11976 | 14 | "Message acquire mode", HFILL}}, |
11977 | 14 | {&hf_amqp_0_10_method_message_accept_transfers, { |
11978 | 14 | "Commands", "amqp.message.accept.transfers", |
11979 | 14 | FT_NONE, BASE_NONE, NULL, 0x0, |
11980 | 14 | "Previously transferred messages", HFILL}}, |
11981 | 14 | {&hf_amqp_0_10_method_message_transfer_reject_code, { |
11982 | 14 | "Reject-code", "amqp.message.reject.reject-code", |
11983 | 14 | FT_UINT16, BASE_DEC, VALS(amqp_0_10_message_transfer_reject_codes), 0x0, |
11984 | 14 | "Message reject code", HFILL}}, |
11985 | 14 | {&hf_amqp_0_10_method_message_reject_text, { |
11986 | 14 | "Text", "amqp.message.reject.text", |
11987 | 14 | FT_UINT_STRING, BASE_NONE, NULL, 0, |
11988 | 14 | "Reject description", HFILL}}, |
11989 | 14 | {&hf_amqp_0_10_method_message_release_set_redelivered, { |
11990 | 14 | "Set-redelivered", "amqp.message.release.set-redelivered", |
11991 | 14 | FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x02, |
11992 | 14 | "Mark redelivered on next transfer from queue", HFILL}}, |
11993 | 14 | {&hf_amqp_0_10_method_message_dest, { |
11994 | 14 | "Destination", "amqp.message.destination", |
11995 | 14 | FT_UINT_STRING, BASE_NONE, NULL, 0, |
11996 | 14 | "Message destination", HFILL}}, |
11997 | 14 | {&hf_amqp_0_10_method_message_resume_id, { |
11998 | 14 | "Resume-Id", "amqp.message.resume.id", |
11999 | 14 | FT_UINT_STRING, BASE_NONE, NULL, 0, |
12000 | 14 | "Message id to resume", HFILL}}, |
12001 | 14 | {&hf_amqp_0_10_method_message_subscribe_queue, { |
12002 | 14 | "Queue", "amqp.message.subscribe.queue", |
12003 | 14 | FT_UINT_STRING, BASE_NONE, NULL, 0, |
12004 | 14 | "Queue to subscribe to", HFILL}}, |
12005 | 14 | {&hf_amqp_0_10_method_message_subscribe_exclusive, { |
12006 | 14 | "Exclusive", "amqp.message.subscribe.exclusive", |
12007 | 14 | FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x10, |
12008 | 14 | "Request exclusive subscription", HFILL}}, |
12009 | 14 | {&hf_amqp_0_10_method_message_subscribe_resume_ttl, { |
12010 | 14 | "Resume-ttl", "amqp.message.subscribe.resume_ttl", |
12011 | 14 | FT_UINT64, BASE_DEC, NULL, 0x0, |
12012 | 14 | "TTL to use when resuming", HFILL}}, |
12013 | 14 | {&hf_amqp_0_10_method_message_subscribe_args, { |
12014 | 14 | "Extended arguments", "amqp.message.subscribe.arguments", |
12015 | 14 | FT_NONE, BASE_NONE, NULL, 0x0, |
12016 | 14 | "Implementation-specific arguments", HFILL}}, |
12017 | 14 | {&hf_amqp_0_10_method_message_flow_mode, { |
12018 | 14 | "Flow-mode", "amqp.message.flow-mode", |
12019 | 14 | FT_UINT8, BASE_DEC, VALS(amqp_0_10_message_flow_modes), 0x0, |
12020 | 14 | "Method for allocating message flow credit", HFILL}}, |
12021 | 14 | {&hf_amqp_0_10_method_message_credit_unit, { |
12022 | 14 | "Credit-unit", "amqp.message.flow.credit-unit", |
12023 | 14 | FT_UINT8, BASE_DEC, VALS(amqp_0_10_message_credit_units), 0x0, |
12024 | 14 | "Unit of message flow value", HFILL}}, |
12025 | 14 | {&hf_amqp_0_10_method_message_credit_value, { |
12026 | 14 | "Value", "amqp.message.flow.value", |
12027 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
12028 | 14 | "Message flow value", HFILL}}, |
12029 | 14 | {&hf_amqp_0_10_method_dtx_start_join, { |
12030 | 14 | "Join", "amqp.dtx.start.join", |
12031 | 14 | FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x02, |
12032 | 14 | "Join with existing xid", HFILL}}, |
12033 | 14 | {&hf_amqp_0_10_method_dtx_start_resume, { |
12034 | 14 | "Resume", "amqp.dtx.start.resume", |
12035 | 14 | FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x04, |
12036 | 14 | "Resume suspended transaction", HFILL}}, |
12037 | 14 | {&hf_amqp_0_10_method_dtx_end_fail, { |
12038 | 14 | "Fail", "amqp.dtx.end.fail", |
12039 | 14 | FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x02, |
12040 | 14 | "This portion of work has failed", HFILL}}, |
12041 | 14 | {&hf_amqp_0_10_method_dtx_end_suspend, { |
12042 | 14 | "Suspend", "amqp.dtx.end.suspend", |
12043 | 14 | FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x04, |
12044 | 14 | "Temporarily suspending transaction", HFILL}}, |
12045 | 14 | {&hf_amqp_0_10_method_dtx_commit_one_phase, { |
12046 | 14 | "One-phase", "amqp.dtx.commit.one-phase", |
12047 | 14 | FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x02, |
12048 | 14 | "Use one-phase optimization", HFILL}}, |
12049 | 14 | {&hf_amqp_0_10_method_dtx_set_timeout_timeout, { |
12050 | 14 | "Timeout", "amqp.dtx.set-timeout.timeout", |
12051 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
12052 | 14 | "Transaction timeout value in seconds", HFILL}}, |
12053 | 14 | {&hf_amqp_0_10_method_exchange_declare_exchange, { |
12054 | 14 | "Exchange", "amqp.exchange.declare.exchange", |
12055 | 14 | FT_UINT_STRING, BASE_NONE, NULL, 0, |
12056 | 14 | "Exchange to declare", HFILL}}, |
12057 | 14 | {&hf_amqp_0_10_method_exchange_declare_type, { |
12058 | 14 | "Type", "amqp.exchange.declare.type", |
12059 | 14 | FT_UINT_STRING, BASE_NONE, NULL, 0, |
12060 | 14 | "Type of exchange to declare", HFILL}}, |
12061 | 14 | {&hf_amqp_0_10_method_exchange_declare_alt_exchange, { |
12062 | 14 | "Alternate-exchange", "amqp.exchange.declare.alternate-exchange", |
12063 | 14 | FT_UINT_STRING, BASE_NONE, NULL, 0, |
12064 | 14 | "Alternate exchange for unroutable messages", HFILL}}, |
12065 | 14 | {&hf_amqp_0_10_method_exchange_declare_passive, { |
12066 | 14 | "Passive", "amqp.exchange.declare.passive", |
12067 | 14 | FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x08, |
12068 | 14 | "Do not create the exchange", HFILL}}, |
12069 | 14 | {&hf_amqp_0_10_method_exchange_declare_durable, { |
12070 | 14 | "Durable", "amqp.exchange.declare.durable", |
12071 | 14 | FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x10, |
12072 | 14 | "Create a durable exchange", HFILL}}, |
12073 | 14 | {&hf_amqp_0_10_method_exchange_declare_auto_delete, { |
12074 | 14 | "Auto-delete", "amqp.exchange.declare.auto-delete", |
12075 | 14 | FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x20, |
12076 | 14 | "Delete exchange when last binding removed", HFILL}}, |
12077 | 14 | {&hf_amqp_0_10_method_exchange_declare_arguments, { |
12078 | 14 | "Arguments", "amqp.exchange.declare.arguments", |
12079 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
12080 | 14 | "Declaration arguments", HFILL}}, |
12081 | 14 | {&hf_amqp_0_10_method_exchange_delete_if_unused, { |
12082 | 14 | "If-unused", "amqp.exchange.delete.if-unused", |
12083 | 14 | FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x02, |
12084 | 14 | "Delete exchange only if it has no queue bindings", HFILL}}, |
12085 | 14 | {&hf_amqp_0_10_method_exchange_bind_queue, { |
12086 | 14 | "Queue", "amqp.exchange.bind.queue", |
12087 | 14 | FT_UINT_STRING, BASE_NONE, NULL, 0, |
12088 | 14 | "Queue to bind to", HFILL}}, |
12089 | 14 | {&hf_amqp_0_10_method_exchange_binding_key, { |
12090 | 14 | "Binding-key", "amqp.exchange.bind.binding-key", |
12091 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
12092 | 14 | "Binding between exchange and queue", HFILL}}, |
12093 | 14 | {&hf_amqp_0_10_method_queue_name, { |
12094 | 14 | "Queue", "amqp.queue.declare.queue", |
12095 | 14 | FT_UINT_STRING, BASE_NONE, NULL, 0, |
12096 | 14 | "Queue name", HFILL}}, |
12097 | 14 | {&hf_amqp_0_10_method_queue_alt_exchange, { |
12098 | 14 | "Alternate-exchange", "amqp.queue.declare.alternate-exchange", |
12099 | 14 | FT_UINT_STRING, BASE_NONE, NULL, 0, |
12100 | 14 | NULL, HFILL}}, |
12101 | 14 | {&hf_amqp_0_10_method_queue_declare_passive, { |
12102 | 14 | "Passive", "amqp.queue.declare.passive", |
12103 | 14 | FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x04, |
12104 | 14 | "Do not create the queue", HFILL}}, |
12105 | 14 | {&hf_amqp_0_10_method_queue_declare_durable, { |
12106 | 14 | "Durable", "amqp.queue.declare.durable", |
12107 | 14 | FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x08, |
12108 | 14 | "Create a durable queue", HFILL}}, |
12109 | 14 | {&hf_amqp_0_10_method_queue_declare_exclusive, { |
12110 | 14 | "Exclusive", "amqp.queue.declare.exclusive", |
12111 | 14 | FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x10, |
12112 | 14 | "Create a queue usable from only one session", HFILL}}, |
12113 | 14 | {&hf_amqp_0_10_method_queue_declare_auto_delete, { |
12114 | 14 | "Auto-delete", "amqp.queue.declare.auto-delete", |
12115 | 14 | FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x20, |
12116 | 14 | "Delete queue when all uses completed", HFILL}}, |
12117 | 14 | {&hf_amqp_0_10_method_queue_declare_arguments, { |
12118 | 14 | "Arguments", "amqp.queue.declare.arguments", |
12119 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
12120 | 14 | "Declaration arguments", HFILL}}, |
12121 | 14 | {&hf_amqp_0_10_method_queue_delete_if_unused, { |
12122 | 14 | "If-unused", "amqp.queue.delete.if-unused", |
12123 | 14 | FT_BOOLEAN, 8, NULL, 0x02, |
12124 | 14 | "Delete the queue only if there are no consumers", HFILL}}, |
12125 | 14 | {&hf_amqp_0_10_method_queue_delete_if_empty, { |
12126 | 14 | "If-empty", "amqp.queue.delete.if-empty", |
12127 | 14 | FT_BOOLEAN, 8, NULL, 0x04, |
12128 | 14 | "Delete queue only if empty", HFILL}}, |
12129 | 14 | {&hf_amqp_0_10_method_file_qos_prefetch_size, { |
12130 | 14 | "Prefetch-size", "amqp.file.qos.prefetch-size", |
12131 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
12132 | 14 | "Pre-fetch window size in octets", HFILL}}, |
12133 | 14 | {&hf_amqp_0_10_method_file_qos_prefetch_count, { |
12134 | 14 | "Prefetch-count", "amqp.file.qos.prefetch-count", |
12135 | 14 | FT_UINT16, BASE_DEC, NULL, 0x0, |
12136 | 14 | "Pre-fetch window size in messages", HFILL}}, |
12137 | 14 | {&hf_amqp_0_10_method_file_qos_global, { |
12138 | 14 | "Global", "amqp.file.qos.global", |
12139 | 14 | FT_BOOLEAN, 8, NULL, 0x04, |
12140 | 14 | "Apply QoS to entire connection", HFILL}}, |
12141 | 14 | {&hf_amqp_0_10_method_file_consumer_tag, { |
12142 | 14 | "Consumer-tag", "amqp.file.consumer-tag", |
12143 | 14 | FT_UINT_STRING, BASE_NONE, NULL, 0, |
12144 | 14 | "Consumer tag", HFILL}}, |
12145 | 14 | {&hf_amqp_0_10_method_file_consume_no_local, { |
12146 | 14 | "No-local", "amqp.file.consume.no-local", |
12147 | 14 | FT_BOOLEAN, 8, NULL, 0x04, |
12148 | 14 | "Don't send messages to connection that publishes them", HFILL}}, |
12149 | 14 | {&hf_amqp_0_10_method_file_consume_no_ack, { |
12150 | 14 | "No-ack", "amqp.file.consume.no-ack", |
12151 | 14 | FT_BOOLEAN, 8, NULL, 0x08, |
12152 | 14 | "No acknowledgement needed", HFILL}}, |
12153 | 14 | {&hf_amqp_0_10_method_file_consume_exclusive, { |
12154 | 14 | "Exclusive", "amqp.file.consume.exclusive", |
12155 | 14 | FT_BOOLEAN, 8, NULL, 0x10, |
12156 | 14 | "Request exclusive access", HFILL}}, |
12157 | 14 | {&hf_amqp_0_10_method_file_consume_nowait, { |
12158 | 14 | "Nowait", "amqp.file.consume.nowait", |
12159 | 14 | FT_BOOLEAN, 8, NULL, 0x20, |
12160 | 14 | "Do not send a reply", HFILL}}, |
12161 | 14 | {&hf_amqp_0_10_method_file_consume_arguments, { |
12162 | 14 | "Arguments", "amqp.file.consume.arguments", |
12163 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
12164 | 14 | "Arguments for consuming", HFILL}}, |
12165 | 14 | {&hf_amqp_0_10_method_file_identifier, { |
12166 | 14 | "Identifier", "amqp.file.identifier", |
12167 | 14 | FT_UINT_STRING, BASE_NONE, NULL, 0, |
12168 | 14 | "Staging identifier", HFILL}}, |
12169 | 14 | {&hf_amqp_0_10_method_file_open_content_size, { |
12170 | 14 | "Content-size", "amqp.file.open.content-size", |
12171 | 14 | FT_UINT64, BASE_DEC, NULL, 0x0, |
12172 | 14 | "Message content size in octets", HFILL}}, |
12173 | 14 | {&hf_amqp_0_10_method_file_open_ok_staged_size, { |
12174 | 14 | "Staged-size", "amqp.file.open_ok.staged-size", |
12175 | 14 | FT_UINT64, BASE_DEC, NULL, 0x0, |
12176 | 14 | "Amount of previously staged content in octets", HFILL}}, |
12177 | 14 | {&hf_amqp_0_10_method_file_publish_exchange, { |
12178 | 14 | "Exchange", "amqp.file.publish.exchange", |
12179 | 14 | FT_UINT_STRING, BASE_NONE, NULL, 0, |
12180 | 14 | "Exchange to publish to", HFILL}}, |
12181 | 14 | {&hf_amqp_0_10_method_file_publish_routing_key, { |
12182 | 14 | "Routing-key", "amqp.file.publish.routing-key", |
12183 | 14 | FT_UINT_STRING, BASE_NONE, NULL, 0, |
12184 | 14 | "Message routing key", HFILL}}, |
12185 | 14 | {&hf_amqp_0_10_method_file_publish_mandatory, { |
12186 | 14 | "Mandatory", "amqp.file.publish.mandatory", |
12187 | 14 | FT_BOOLEAN, 8, NULL, 0x04, |
12188 | 14 | "Mandatory routing", HFILL}}, |
12189 | 14 | {&hf_amqp_0_10_method_file_publish_immediate, { |
12190 | 14 | "Immediate", "amqp.file.publish.immediate", |
12191 | 14 | FT_BOOLEAN, 8, NULL, 0x08, |
12192 | 14 | "Request immediate delivery", HFILL}}, |
12193 | 14 | {&hf_amqp_0_10_method_file_return_reply_code, { |
12194 | 14 | "Reply-code", "amqp.file.return.reply-code", |
12195 | 14 | FT_UINT16, BASE_DEC, VALS(amqp_0_10_file_return_codes), 0x0, |
12196 | 14 | NULL, HFILL}}, |
12197 | 14 | {&hf_amqp_0_10_method_file_return_reply_text, { |
12198 | 14 | "Reply-text", "amqp.file.return.reply-text", |
12199 | 14 | FT_UINT_STRING, BASE_NONE, NULL, 0, |
12200 | 14 | "Localized reply text", HFILL}}, |
12201 | 14 | {&hf_amqp_0_10_method_file_return_exchange, { |
12202 | 14 | "Exchange", "amqp.file.return.exchange", |
12203 | 14 | FT_UINT_STRING, BASE_NONE, NULL, 0, |
12204 | 14 | "Exchange the original message was published to", HFILL}}, |
12205 | 14 | {&hf_amqp_0_10_method_file_return_routing_key, { |
12206 | 14 | "Routing-key", "amqp.file.return.routing-key", |
12207 | 14 | FT_UINT_STRING, BASE_NONE, NULL, 0, |
12208 | 14 | "Message routing key", HFILL}}, |
12209 | 14 | {&hf_amqp_0_10_method_file_deliver_consumer_tag, { |
12210 | 14 | "Consumer-tag", "amqp.file.deliver.consumer-tag", |
12211 | 14 | FT_UINT_STRING, BASE_NONE, NULL, 0, |
12212 | 14 | NULL, HFILL}}, |
12213 | 14 | {&hf_amqp_0_10_method_file_deliver_delivery_tag, { |
12214 | 14 | "Delivery-tag", "amqp.file.deliver.delivery-tag", |
12215 | 14 | FT_UINT64, BASE_HEX, NULL, 0, |
12216 | 14 | "Server-assigned, session-specific delivery tag", HFILL}}, |
12217 | 14 | {&hf_amqp_0_10_method_file_deliver_redelivered, { |
12218 | 14 | "Redelivered", "amqp.file.deliver.redelivered", |
12219 | 14 | FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x04, |
12220 | 14 | "Possible duplicate delivery", HFILL}}, |
12221 | 14 | {&hf_amqp_0_10_method_file_deliver_exchange, { |
12222 | 14 | "Exchange", "amqp.file.deliver.exchange", |
12223 | 14 | FT_UINT_STRING, BASE_NONE, NULL, 0, |
12224 | 14 | "Exchange the original message was published to", HFILL}}, |
12225 | 14 | {&hf_amqp_0_10_method_file_deliver_routing_key, { |
12226 | 14 | "Routing-key", "amqp.file.deliver.routing-key", |
12227 | 14 | FT_UINT_STRING, BASE_NONE, NULL, 0, |
12228 | 14 | "Message routing key", HFILL}}, |
12229 | 14 | {&hf_amqp_0_10_method_file_ack_delivery_tag, { |
12230 | 14 | "Delivery-tag", "amqp.file.ack.delivery-tag", |
12231 | 14 | FT_UINT64, BASE_HEX, NULL, 0, |
12232 | 14 | "Identifier of message being acknowledged", HFILL}}, |
12233 | 14 | {&hf_amqp_0_10_method_file_ack_multiple, { |
12234 | 14 | "Multiple", "amqp.file.ack.multiple", |
12235 | 14 | FT_BOOLEAN, 8, NULL, 0x02, |
12236 | 14 | "Acknowledge multiple messages", HFILL}}, |
12237 | 14 | {&hf_amqp_0_10_method_file_reject_delivery_tag, { |
12238 | 14 | "Delivery-tag", "amqp.file.reject.delivery-tag", |
12239 | 14 | FT_UINT64, BASE_HEX, NULL, 0, |
12240 | 14 | "Identifier of message to be rejected", HFILL}}, |
12241 | 14 | {&hf_amqp_0_10_method_file_reject_requeue, { |
12242 | 14 | "Requeue", "amqp.file.reject.requeue", |
12243 | 14 | FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x02, |
12244 | 14 | "Requeue the message", HFILL}}, |
12245 | 14 | {&hf_amqp_0_10_method_stream_qos_prefetch_size, { |
12246 | 14 | "Prefetch-size", "amqp.stream.qos.prefetch-size", |
12247 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
12248 | 14 | "Pre-fetch window size in octets", HFILL}}, |
12249 | 14 | {&hf_amqp_0_10_method_stream_qos_prefetch_count, { |
12250 | 14 | "Prefetch-count", "amqp.stream.qos.prefetch-count", |
12251 | 14 | FT_UINT16, BASE_DEC, NULL, 0x0, |
12252 | 14 | "Pre-fetch window size in messages", HFILL}}, |
12253 | | #if 0 |
12254 | | {&hf_amqp_0_10_method_stream_qos_consume_rate, { |
12255 | | "Prefetch-size", "amqp.stream.qos.consume_rate", |
12256 | | FT_UINT32, BASE_DEC, NULL, 0x0, |
12257 | | "Desired transfer rate in octets/second", HFILL}}, |
12258 | | #endif |
12259 | 14 | {&hf_amqp_0_10_method_stream_qos_global, { |
12260 | 14 | "Global", "amqp.stream.qos.global", |
12261 | 14 | FT_BOOLEAN, 8, NULL, 0x08, |
12262 | 14 | "Apply QoS to entire connection", HFILL}}, |
12263 | 14 | {&hf_amqp_0_10_method_stream_consumer_tag, { |
12264 | 14 | "Consumer-tag", "amqp.stream.consumer-tag", |
12265 | 14 | FT_UINT_STRING, BASE_NONE, NULL, 0, |
12266 | 14 | NULL, HFILL}}, |
12267 | 14 | {&hf_amqp_0_10_method_stream_consume_no_local, { |
12268 | 14 | "No-local", "amqp.stream.consume.no-local", |
12269 | 14 | FT_BOOLEAN, 8, NULL, 0x04, |
12270 | 14 | "Don't send messages to connection that publishes them", HFILL}}, |
12271 | 14 | {&hf_amqp_0_10_method_stream_consume_exclusive, { |
12272 | 14 | "Exclusive", "amqp.stream.consume.exclusive", |
12273 | 14 | FT_BOOLEAN, 8, NULL, 0x08, |
12274 | 14 | "Request exclusive access", HFILL}}, |
12275 | 14 | {&hf_amqp_0_10_method_stream_consume_nowait, { |
12276 | 14 | "Nowait", "amqp.stream.consume.nowait", |
12277 | 14 | FT_BOOLEAN, 8, NULL, 0x10, |
12278 | 14 | "Do not send a reply", HFILL}}, |
12279 | 14 | {&hf_amqp_0_10_method_stream_consume_arguments, { |
12280 | 14 | "Arguments", "amqp.stream.consume.arguments", |
12281 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
12282 | 14 | "Arguments for consuming", HFILL}}, |
12283 | 14 | {&hf_amqp_0_10_method_stream_publish_exchange, { |
12284 | 14 | "Exchange", "amqp.stream.publish.exchange", |
12285 | 14 | FT_UINT_STRING, BASE_NONE, NULL, 0, |
12286 | 14 | "Exchange to publish to", HFILL}}, |
12287 | 14 | {&hf_amqp_0_10_method_stream_publish_routing_key, { |
12288 | 14 | "Routing-key", "amqp.stream.publish.routing-key", |
12289 | 14 | FT_UINT_STRING, BASE_NONE, NULL, 0, |
12290 | 14 | "Message routing key", HFILL}}, |
12291 | 14 | {&hf_amqp_0_10_method_stream_publish_mandatory, { |
12292 | 14 | "Mandatory", "amqp.stream.publish.mandatory", |
12293 | 14 | FT_BOOLEAN, 8, NULL, 0x04, |
12294 | 14 | "Mandatory routing", HFILL}}, |
12295 | 14 | {&hf_amqp_0_10_method_stream_publish_immediate, { |
12296 | 14 | "Immediate", "amqp.stream.publish.immediate", |
12297 | 14 | FT_BOOLEAN, 8, NULL, 0x08, |
12298 | 14 | "Request immediate delivery", HFILL}}, |
12299 | 14 | {&hf_amqp_0_10_method_stream_return_reply_code, { |
12300 | 14 | "Reply-code", "amqp.stream.return.reply-code", |
12301 | 14 | FT_UINT16, BASE_DEC, VALS(amqp_0_10_stream_return_codes), 0x0, |
12302 | 14 | NULL, HFILL}}, |
12303 | 14 | {&hf_amqp_0_10_method_stream_return_reply_text, { |
12304 | 14 | "Reply-text", "amqp.stream.return.reply-text", |
12305 | 14 | FT_UINT_STRING, BASE_NONE, NULL, 0, |
12306 | 14 | "Localized reply text", HFILL}}, |
12307 | 14 | {&hf_amqp_0_10_method_stream_return_exchange, { |
12308 | 14 | "Exchange", "amqp.stream.return.exchange", |
12309 | 14 | FT_UINT_STRING, BASE_NONE, NULL, 0, |
12310 | 14 | "Exchange the original message was published to", HFILL}}, |
12311 | 14 | {&hf_amqp_0_10_method_stream_return_routing_key, { |
12312 | 14 | "Routing-key", "amqp.stream.return.routing-key", |
12313 | 14 | FT_UINT_STRING, BASE_NONE, NULL, 0, |
12314 | 14 | "Message routing key", HFILL}}, |
12315 | 14 | {&hf_amqp_0_10_method_stream_deliver_consumer_tag, { |
12316 | 14 | "Consumer-tag", "amqp.stream.deliver.consumer-tag", |
12317 | 14 | FT_UINT_STRING, BASE_NONE, NULL, 0, |
12318 | 14 | NULL, HFILL}}, |
12319 | 14 | {&hf_amqp_0_10_method_stream_deliver_delivery_tag, { |
12320 | 14 | "Delivery-tag", "amqp.stream.deliver.delivery-tag", |
12321 | 14 | FT_UINT64, BASE_HEX, NULL, 0, |
12322 | 14 | "Server-assigned, session-specific delivery tag", HFILL}}, |
12323 | 14 | {&hf_amqp_0_10_method_stream_deliver_exchange, { |
12324 | 14 | "Exchange", "amqp.stream.deliver.exchange", |
12325 | 14 | FT_UINT_STRING, BASE_NONE, NULL, 0, |
12326 | 14 | "Exchange the original message was published to", HFILL}}, |
12327 | 14 | {&hf_amqp_0_10_method_stream_deliver_queue, { |
12328 | 14 | "Queue", "amqp.stream.deliver.queue", |
12329 | 14 | FT_UINT_STRING, BASE_NONE, NULL, 0, |
12330 | 14 | "Name of the queue the message came from", HFILL}}, |
12331 | 14 | {&hf_amqp_channel, { |
12332 | 14 | "Channel", "amqp.channel", |
12333 | 14 | FT_UINT16, BASE_DEC, NULL, 0x0, |
12334 | 14 | "Channel ID", HFILL}}, |
12335 | 14 | {&hf_amqp_reserved, { |
12336 | 14 | "Reserved", "amqp.reserved", |
12337 | 14 | FT_UINT32, BASE_HEX, NULL, 0x0, |
12338 | 14 | NULL, HFILL}}, |
12339 | 14 | {&hf_amqp_0_9_type, { |
12340 | 14 | "Type", "amqp.type", |
12341 | 14 | FT_UINT8, BASE_DEC, VALS(amqp_0_9_frame_types), 0x0, |
12342 | 14 | "Frame type", HFILL}}, |
12343 | 14 | {&hf_amqp_0_9_length, { |
12344 | 14 | "Length", "amqp.length", |
12345 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
12346 | 14 | "Length of the frame", HFILL}}, |
12347 | 14 | {&hf_amqp_0_9_method_class_id, { |
12348 | 14 | "Class", "amqp.method.class", |
12349 | 14 | FT_UINT16, BASE_DEC, VALS(amqp_0_9_method_classes), 0x0, |
12350 | 14 | "Class ID", HFILL}}, |
12351 | 14 | {&hf_amqp_method_connection_method_id, { |
12352 | 14 | "Method", "amqp.method.method", |
12353 | 14 | FT_UINT16, BASE_DEC, VALS(amqp_method_connection_methods), 0x0, |
12354 | 14 | "Method ID", HFILL}}, |
12355 | 14 | {&hf_amqp_method_channel_method_id, { |
12356 | 14 | "Method", "amqp.method.method", |
12357 | 14 | FT_UINT16, BASE_DEC, VALS(amqp_method_channel_methods), 0x0, |
12358 | 14 | "Method ID", HFILL}}, |
12359 | 14 | {&hf_amqp_method_access_method_id, { |
12360 | 14 | "Method", "amqp.method.method", |
12361 | 14 | FT_UINT16, BASE_DEC, VALS(amqp_method_access_methods), 0x0, |
12362 | 14 | "Method ID", HFILL}}, |
12363 | 14 | {&hf_amqp_method_exchange_method_id, { |
12364 | 14 | "Method", "amqp.method.method", |
12365 | 14 | FT_UINT16, BASE_DEC, VALS(amqp_method_exchange_methods), 0x0, |
12366 | 14 | "Method ID", HFILL}}, |
12367 | 14 | {&hf_amqp_method_queue_method_id, { |
12368 | 14 | "Method", "amqp.method.method", |
12369 | 14 | FT_UINT16, BASE_DEC, VALS(amqp_method_queue_methods), 0x0, |
12370 | 14 | "Method ID", HFILL}}, |
12371 | 14 | {&hf_amqp_method_basic_method_id, { |
12372 | 14 | "Method", "amqp.method.method", |
12373 | 14 | FT_UINT16, BASE_DEC, VALS(amqp_method_basic_methods), 0x0, |
12374 | 14 | "Method ID", HFILL}}, |
12375 | 14 | {&hf_amqp_method_file_method_id, { |
12376 | 14 | "Method", "amqp.method.method", |
12377 | 14 | FT_UINT16, BASE_DEC, VALS(amqp_method_file_methods), 0x0, |
12378 | 14 | "Method ID", HFILL}}, |
12379 | 14 | {&hf_amqp_method_stream_method_id, { |
12380 | 14 | "Method", "amqp.method.method", |
12381 | 14 | FT_UINT16, BASE_DEC, VALS(amqp_method_stream_methods), 0x0, |
12382 | 14 | "Method ID", HFILL}}, |
12383 | 14 | {&hf_amqp_method_tx_method_id, { |
12384 | 14 | "Method", "amqp.method.method", |
12385 | 14 | FT_UINT16, BASE_DEC, VALS(amqp_method_tx_methods), 0x0, |
12386 | 14 | "Method ID", HFILL}}, |
12387 | 14 | {&hf_amqp_method_dtx_method_id, { |
12388 | 14 | "Method", "amqp.method.method", |
12389 | 14 | FT_UINT16, BASE_DEC, VALS(amqp_method_dtx_methods), 0x0, |
12390 | 14 | "Method ID", HFILL}}, |
12391 | 14 | {&hf_amqp_method_tunnel_method_id, { |
12392 | 14 | "Method", "amqp.method.method", |
12393 | 14 | FT_UINT16, BASE_DEC, VALS(amqp_method_tunnel_methods), 0x0, |
12394 | 14 | "Method ID", HFILL}}, |
12395 | 14 | {&hf_amqp_method_confirm_method_id, { |
12396 | 14 | "Method", "amqp.method.method", |
12397 | 14 | FT_UINT16, BASE_DEC, VALS(amqp_method_confirm_methods), 0x0, |
12398 | 14 | "Method ID", HFILL}}, |
12399 | 14 | {&hf_amqp_method_arguments, { |
12400 | 14 | "Arguments", "amqp.method.arguments", |
12401 | 14 | FT_NONE, BASE_NONE, NULL, 0x0, |
12402 | 14 | "Method arguments", HFILL}}, |
12403 | 14 | {&hf_amqp_method_connection_start_version_major, { |
12404 | 14 | "Version-Major", "amqp.method.arguments.version_major", |
12405 | 14 | FT_UINT8, BASE_DEC, NULL, 0, |
12406 | 14 | NULL, HFILL}}, |
12407 | 14 | {&hf_amqp_method_connection_start_version_minor, { |
12408 | 14 | "Version-Minor", "amqp.method.arguments.version_minor", |
12409 | 14 | FT_UINT8, BASE_DEC, NULL, 0, |
12410 | 14 | NULL, HFILL}}, |
12411 | 14 | {&hf_amqp_method_connection_start_server_properties, { |
12412 | 14 | "Server-Properties", "amqp.method.arguments.server_properties", |
12413 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
12414 | 14 | NULL, HFILL}}, |
12415 | 14 | {&hf_amqp_0_9_method_connection_start_mechanisms, { |
12416 | 14 | "Mechanisms", "amqp.method.arguments.mechanisms", |
12417 | 14 | FT_BYTES, BASE_NONE, NULL, 0, |
12418 | 14 | NULL, HFILL}}, |
12419 | 14 | {&hf_amqp_0_10_method_connection_start_mechanisms, { |
12420 | 14 | "Mechanisms", "amqp.method.arguments.mechanisms", |
12421 | 14 | FT_BYTES, BASE_NONE, NULL, 0, |
12422 | 14 | "Supported security mechanisms", HFILL}}, |
12423 | 14 | {&hf_amqp_0_9_method_connection_start_locales, { |
12424 | 14 | "Locales", "amqp.method.arguments.locales", |
12425 | 14 | FT_BYTES, BASE_NONE, NULL, 0, |
12426 | 14 | NULL, HFILL}}, |
12427 | 14 | {&hf_amqp_0_10_method_connection_start_locales, { |
12428 | 14 | "Locales", "amqp.method.arguments.locales", |
12429 | 14 | FT_BYTES, BASE_NONE, NULL, 0, |
12430 | 14 | "Supported message locales", HFILL}}, |
12431 | 14 | {&hf_amqp_method_connection_start_ok_client_properties, { |
12432 | 14 | "Client-Properties", "amqp.method.arguments.client_properties", |
12433 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
12434 | 14 | NULL, HFILL}}, |
12435 | 14 | {&hf_amqp_method_connection_start_ok_mechanism, { |
12436 | 14 | "Mechanism", "amqp.method.arguments.mechanism", |
12437 | 14 | FT_UINT_STRING, BASE_NONE, NULL, 0, |
12438 | 14 | NULL, HFILL}}, |
12439 | 14 | {&hf_amqp_method_connection_start_ok_response, { |
12440 | 14 | "Response", "amqp.method.arguments.response", |
12441 | 14 | FT_UINT_BYTES, BASE_NONE, NULL, 0, |
12442 | 14 | NULL, HFILL}}, |
12443 | 14 | {&hf_amqp_method_connection_start_ok_locale, { |
12444 | 14 | "Locale", "amqp.method.arguments.locale", |
12445 | 14 | FT_UINT_STRING, BASE_NONE, NULL, 0, |
12446 | 14 | NULL, HFILL}}, |
12447 | 14 | {&hf_amqp_method_connection_secure_challenge, { |
12448 | 14 | "Challenge", "amqp.method.arguments.challenge", |
12449 | 14 | FT_UINT_BYTES, BASE_NONE, NULL, 0, |
12450 | 14 | NULL, HFILL}}, |
12451 | 14 | {&hf_amqp_method_connection_secure_ok_response, { |
12452 | 14 | "Response", "amqp.method.arguments.response", |
12453 | 14 | FT_UINT_BYTES, BASE_NONE, NULL, 0, |
12454 | 14 | NULL, HFILL}}, |
12455 | 14 | {&hf_amqp_method_connection_tune_channel_max, { |
12456 | 14 | "Channel-Max", "amqp.method.arguments.channel_max", |
12457 | 14 | FT_UINT16, BASE_DEC, NULL, 0, |
12458 | 14 | NULL, HFILL}}, |
12459 | 14 | {&hf_amqp_0_9_method_connection_tune_frame_max, { |
12460 | 14 | "Frame-Max", "amqp.method.arguments.frame_max", |
12461 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
12462 | 14 | NULL, HFILL}}, |
12463 | 14 | {&hf_amqp_0_10_method_connection_tune_frame_max, { |
12464 | 14 | "Frame-Max", "amqp.method.arguments.frame_max", |
12465 | 14 | FT_UINT16, BASE_DEC, NULL, 0, |
12466 | 14 | "Server-proposed maximum frame size", HFILL}}, |
12467 | 14 | {&hf_amqp_0_9_method_connection_tune_heartbeat, { |
12468 | 14 | "Heartbeat", "amqp.method.arguments.heartbeat", |
12469 | 14 | FT_UINT16, BASE_DEC, NULL, 0, |
12470 | 14 | NULL, HFILL}}, |
12471 | 14 | {&hf_amqp_0_10_method_connection_tune_heartbeat_min, { |
12472 | 14 | "Heartbeat-Min", "amqp.method.arguments.heartbeat_min", |
12473 | 14 | FT_UINT16, BASE_DEC, NULL, 0, |
12474 | 14 | "Minimum heartbeat delay (seconds)", HFILL}}, |
12475 | 14 | {&hf_amqp_0_10_method_connection_tune_heartbeat_max, { |
12476 | 14 | "Heartbeat-Max", "amqp.method.arguments.heartbeat_max", |
12477 | 14 | FT_UINT16, BASE_DEC, NULL, 0, |
12478 | 14 | "Maximum heartbeat delay (seconds)", HFILL}}, |
12479 | 14 | {&hf_amqp_method_connection_tune_ok_channel_max, { |
12480 | 14 | "Channel-Max", "amqp.method.arguments.channel_max", |
12481 | 14 | FT_UINT16, BASE_DEC, NULL, 0, |
12482 | 14 | NULL, HFILL}}, |
12483 | 14 | {&hf_amqp_0_9_method_connection_tune_ok_frame_max, { |
12484 | 14 | "Frame-Max", "amqp.method.arguments.frame_max", |
12485 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
12486 | 14 | NULL, HFILL}}, |
12487 | 14 | {&hf_amqp_0_10_method_connection_tune_ok_frame_max, { |
12488 | 14 | "Frame-Max", "amqp.method.arguments.frame_max", |
12489 | 14 | FT_UINT16, BASE_DEC, NULL, 0, |
12490 | 14 | "Negotiated maximum frame size", HFILL}}, |
12491 | 14 | {&hf_amqp_method_connection_tune_ok_heartbeat, { |
12492 | 14 | "Heartbeat", "amqp.method.arguments.heartbeat", |
12493 | 14 | FT_UINT16, BASE_DEC, NULL, 0, |
12494 | 14 | NULL, HFILL}}, |
12495 | 14 | {&hf_amqp_method_connection_open_virtual_host, { |
12496 | 14 | "Virtual-Host", "amqp.method.arguments.virtual_host", |
12497 | 14 | FT_UINT_STRING, BASE_NONE, NULL, 0, |
12498 | 14 | NULL, HFILL}}, |
12499 | 14 | {&hf_amqp_0_9_method_connection_open_capabilities, { |
12500 | 14 | "Capabilities", "amqp.method.arguments.capabilities", |
12501 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
12502 | 14 | NULL, HFILL}}, |
12503 | 14 | {&hf_amqp_0_10_method_connection_open_capabilities, { |
12504 | 14 | "Capabilities", "amqp.method.arguments.capabilities", |
12505 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
12506 | 14 | "Required capabilities", HFILL}}, |
12507 | 14 | {&hf_amqp_0_9_method_connection_open_insist, { |
12508 | 14 | "Insist", "amqp.method.arguments.insist", |
12509 | 14 | FT_BOOLEAN, 8, NULL, 0x01, |
12510 | 14 | NULL, HFILL}}, |
12511 | 14 | {&hf_amqp_0_10_method_connection_open_insist, { |
12512 | 14 | "Insist", "amqp.method.arguments.insist", |
12513 | 14 | FT_BOOLEAN, 8, NULL, 0x04, |
12514 | 14 | "Client insists on this server", HFILL}}, |
12515 | 14 | {&hf_amqp_0_9_method_connection_open_ok_known_hosts, { |
12516 | 14 | "Known-Hosts", "amqp.method.arguments.known_hosts", |
12517 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
12518 | 14 | NULL, HFILL}}, |
12519 | 14 | {&hf_amqp_0_10_method_connection_open_ok_known_hosts, { |
12520 | 14 | "Known-Hosts", "amqp.method.arguments.known_hosts_bytes", |
12521 | 14 | FT_BYTES, BASE_NONE, NULL, 0, |
12522 | 14 | "Equivalent or alternate hosts for reconnection", HFILL}}, |
12523 | 14 | {&hf_amqp_method_connection_redirect_host, { |
12524 | 14 | "Host", "amqp.method.arguments.host", |
12525 | 14 | FT_UINT_STRING, BASE_NONE, NULL, 0, |
12526 | 14 | NULL, HFILL}}, |
12527 | 14 | {&hf_amqp_0_9_method_connection_redirect_known_hosts, { |
12528 | 14 | "Known-Hosts", "amqp.method.arguments.known_hosts", |
12529 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
12530 | 14 | NULL, HFILL}}, |
12531 | 14 | {&hf_amqp_0_10_method_connection_redirect_known_hosts, { |
12532 | 14 | "Known-Hosts", "amqp.method.arguments.known_hosts_bytes", |
12533 | 14 | FT_BYTES, BASE_NONE, NULL, 0, |
12534 | 14 | "Equivalent or alternate hosts to redirect to", HFILL}}, |
12535 | 14 | {&hf_amqp_0_9_method_connection_close_reply_code, { |
12536 | 14 | "Reply-Code", "amqp.method.arguments.reply_code", |
12537 | 14 | FT_UINT16, BASE_DEC, NULL, 0, |
12538 | 14 | NULL, HFILL}}, |
12539 | 14 | {&hf_amqp_0_10_method_connection_close_reply_code, { |
12540 | 14 | "Reply-Code", "amqp.method.arguments.reply_code", |
12541 | 14 | FT_UINT16, BASE_DEC, |
12542 | 14 | VALS(amqp_0_10_method_connection_close_reply_codes), 0, |
12543 | 14 | "Close reason", HFILL}}, |
12544 | 14 | {&hf_amqp_method_connection_close_reply_text, { |
12545 | 14 | "Reply-Text", "amqp.method.arguments.reply_text", |
12546 | 14 | FT_UINT_STRING, BASE_NONE, NULL, 0, |
12547 | 14 | NULL, HFILL}}, |
12548 | 14 | {&hf_amqp_method_connection_close_class_id, { |
12549 | 14 | "Class-Id", "amqp.method.arguments.class_id", |
12550 | 14 | FT_UINT16, BASE_DEC, NULL, 0, |
12551 | 14 | NULL, HFILL}}, |
12552 | 14 | {&hf_amqp_method_connection_close_method_id, { |
12553 | 14 | "Method-Id", "amqp.method.arguments.method_id", |
12554 | 14 | FT_UINT16, BASE_DEC, NULL, 0, |
12555 | 14 | NULL, HFILL}}, |
12556 | 14 | {&hf_amqp_method_connection_blocked_reason, { |
12557 | 14 | "Reason", "amqp.method.arguments.reason", |
12558 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
12559 | 14 | NULL, HFILL}}, |
12560 | 14 | {&hf_amqp_method_channel_open_out_of_band, { |
12561 | 14 | "Out-Of-Band", "amqp.method.arguments.out_of_band", |
12562 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
12563 | 14 | NULL, HFILL}}, |
12564 | 14 | {&hf_amqp_method_channel_open_ok_channel_id, { |
12565 | 14 | "Channel-Id", "amqp.method.arguments.channel_id", |
12566 | 14 | FT_BYTES, BASE_NONE, NULL, 0, |
12567 | 14 | NULL, HFILL}}, |
12568 | 14 | {&hf_amqp_method_channel_flow_active, { |
12569 | 14 | "Active", "amqp.method.arguments.active", |
12570 | 14 | FT_BOOLEAN, 8, NULL, 0x01, |
12571 | 14 | NULL, HFILL}}, |
12572 | 14 | {&hf_amqp_method_channel_flow_ok_active, { |
12573 | 14 | "Active", "amqp.method.arguments.active", |
12574 | 14 | FT_BOOLEAN, 8, NULL, 0x01, |
12575 | 14 | NULL, HFILL}}, |
12576 | 14 | {&hf_amqp_method_channel_close_reply_code, { |
12577 | 14 | "Reply-Code", "amqp.method.arguments.reply_code", |
12578 | 14 | FT_UINT16, BASE_DEC, NULL, 0, |
12579 | 14 | NULL, HFILL}}, |
12580 | 14 | {&hf_amqp_method_channel_close_reply_text, { |
12581 | 14 | "Reply-Text", "amqp.method.arguments.reply_text", |
12582 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
12583 | 14 | NULL, HFILL}}, |
12584 | 14 | {&hf_amqp_method_channel_close_class_id, { |
12585 | 14 | "Class-Id", "amqp.method.arguments.class_id", |
12586 | 14 | FT_UINT16, BASE_DEC, NULL, 0, |
12587 | 14 | NULL, HFILL}}, |
12588 | 14 | {&hf_amqp_method_channel_close_method_id, { |
12589 | 14 | "Method-Id", "amqp.method.arguments.method_id", |
12590 | 14 | FT_UINT16, BASE_DEC, NULL, 0, |
12591 | 14 | NULL, HFILL}}, |
12592 | 14 | {&hf_amqp_method_channel_resume_channel_id, { |
12593 | 14 | "Channel-Id", "amqp.method.arguments.channel_id", |
12594 | 14 | FT_BYTES, BASE_NONE, NULL, 0, |
12595 | 14 | NULL, HFILL}}, |
12596 | 14 | {&hf_amqp_method_access_request_realm, { |
12597 | 14 | "Realm", "amqp.method.arguments.realm", |
12598 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
12599 | 14 | NULL, HFILL}}, |
12600 | 14 | {&hf_amqp_method_access_request_exclusive, { |
12601 | 14 | "Exclusive", "amqp.method.arguments.exclusive", |
12602 | 14 | FT_BOOLEAN, 8, NULL, 0x01, |
12603 | 14 | NULL, HFILL}}, |
12604 | 14 | {&hf_amqp_method_access_request_passive, { |
12605 | 14 | "Passive", "amqp.method.arguments.passive", |
12606 | 14 | FT_BOOLEAN, 8, NULL, 0x02, |
12607 | 14 | NULL, HFILL}}, |
12608 | 14 | {&hf_amqp_method_access_request_active, { |
12609 | 14 | "Active", "amqp.method.arguments.active", |
12610 | 14 | FT_BOOLEAN, 8, NULL, 0x04, |
12611 | 14 | NULL, HFILL}}, |
12612 | 14 | {&hf_amqp_method_access_request_write, { |
12613 | 14 | "Write", "amqp.method.arguments.write", |
12614 | 14 | FT_BOOLEAN, 8, NULL, 0x08, |
12615 | 14 | NULL, HFILL}}, |
12616 | 14 | {&hf_amqp_method_access_request_read, { |
12617 | 14 | "Read", "amqp.method.arguments.read", |
12618 | 14 | FT_BOOLEAN, 8, NULL, 0x10, |
12619 | 14 | NULL, HFILL}}, |
12620 | 14 | {&hf_amqp_method_access_request_ok_ticket, { |
12621 | 14 | "Ticket", "amqp.method.arguments.ticket", |
12622 | 14 | FT_UINT16, BASE_DEC, NULL, 0, |
12623 | 14 | NULL, HFILL}}, |
12624 | 14 | {&hf_amqp_method_exchange_declare_ticket, { |
12625 | 14 | "Ticket", "amqp.method.arguments.ticket", |
12626 | 14 | FT_UINT16, BASE_DEC, NULL, 0, |
12627 | 14 | NULL, HFILL}}, |
12628 | 14 | {&hf_amqp_method_exchange_declare_exchange, { |
12629 | 14 | "Exchange", "amqp.method.arguments.exchange", |
12630 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
12631 | 14 | NULL, HFILL}}, |
12632 | 14 | {&hf_amqp_method_exchange_declare_type, { |
12633 | 14 | "Type", "amqp.method.arguments.type", |
12634 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
12635 | 14 | NULL, HFILL}}, |
12636 | 14 | {&hf_amqp_method_exchange_declare_passive, { |
12637 | 14 | "Passive", "amqp.method.arguments.passive", |
12638 | 14 | FT_BOOLEAN, 8, NULL, 0x01, |
12639 | 14 | NULL, HFILL}}, |
12640 | 14 | {&hf_amqp_method_exchange_declare_durable, { |
12641 | 14 | "Durable", "amqp.method.arguments.durable", |
12642 | 14 | FT_BOOLEAN, 8, NULL, 0x02, |
12643 | 14 | NULL, HFILL}}, |
12644 | 14 | {&hf_amqp_method_exchange_declare_auto_delete, { |
12645 | 14 | "Auto-Delete", "amqp.method.arguments.auto_delete", |
12646 | 14 | FT_BOOLEAN, 8, NULL, 0x04, |
12647 | 14 | NULL, HFILL}}, |
12648 | 14 | {&hf_amqp_method_exchange_declare_internal, { |
12649 | 14 | "Internal", "amqp.method.arguments.internal", |
12650 | 14 | FT_BOOLEAN, 8, NULL, 0x08, |
12651 | 14 | NULL, HFILL}}, |
12652 | 14 | {&hf_amqp_method_exchange_declare_nowait, { |
12653 | 14 | "Nowait", "amqp.method.arguments.nowait", |
12654 | 14 | FT_BOOLEAN, 8, NULL, 0x10, |
12655 | 14 | NULL, HFILL}}, |
12656 | 14 | {&hf_amqp_method_exchange_declare_arguments, { |
12657 | 14 | "Arguments", "amqp.method.arguments.arguments", |
12658 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
12659 | 14 | NULL, HFILL}}, |
12660 | 14 | {&hf_amqp_method_exchange_bind_destination, { |
12661 | 14 | "Destination", "amqp.method.arguments.destination", |
12662 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
12663 | 14 | NULL, HFILL}}, |
12664 | 14 | {&hf_amqp_method_exchange_bind_source, { |
12665 | 14 | "Destination", "amqp.method.arguments.source", |
12666 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
12667 | 14 | NULL, HFILL}}, |
12668 | 14 | {&hf_amqp_method_exchange_bind_routing_key, { |
12669 | 14 | "Routing-Key", "amqp.method.arguments.routing_key", |
12670 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
12671 | 14 | NULL, HFILL}}, |
12672 | 14 | {&hf_amqp_method_exchange_bind_nowait, { |
12673 | 14 | "Nowait", "amqp.method.arguments.nowait", |
12674 | 14 | FT_BOOLEAN, 8, NULL, 0x01, |
12675 | 14 | NULL, HFILL}}, |
12676 | 14 | {&hf_amqp_method_exchange_bind_arguments, { |
12677 | 14 | "Arguments", "amqp.method.arguments.arguments", |
12678 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
12679 | 14 | NULL, HFILL}}, |
12680 | 14 | {&hf_amqp_method_exchange_delete_ticket, { |
12681 | 14 | "Ticket", "amqp.method.arguments.ticket", |
12682 | 14 | FT_UINT16, BASE_DEC, NULL, 0, |
12683 | 14 | NULL, HFILL}}, |
12684 | 14 | {&hf_amqp_method_exchange_delete_exchange, { |
12685 | 14 | "Exchange", "amqp.method.arguments.exchange", |
12686 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
12687 | 14 | NULL, HFILL}}, |
12688 | 14 | {&hf_amqp_method_exchange_delete_if_unused, { |
12689 | 14 | "If-Unused", "amqp.method.arguments.if_unused", |
12690 | 14 | FT_BOOLEAN, 8, NULL, 0x01, |
12691 | 14 | NULL, HFILL}}, |
12692 | 14 | {&hf_amqp_method_exchange_delete_nowait, { |
12693 | 14 | "Nowait", "amqp.method.arguments.nowait", |
12694 | 14 | FT_BOOLEAN, 8, NULL, 0x02, |
12695 | 14 | NULL, HFILL}}, |
12696 | 14 | {&hf_amqp_method_queue_declare_ticket, { |
12697 | 14 | "Ticket", "amqp.method.arguments.ticket", |
12698 | 14 | FT_UINT16, BASE_DEC, NULL, 0, |
12699 | 14 | NULL, HFILL}}, |
12700 | 14 | {&hf_amqp_method_queue_declare_queue, { |
12701 | 14 | "Queue", "amqp.method.arguments.queue", |
12702 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
12703 | 14 | NULL, HFILL}}, |
12704 | 14 | {&hf_amqp_method_queue_declare_passive, { |
12705 | 14 | "Passive", "amqp.method.arguments.passive", |
12706 | 14 | FT_BOOLEAN, 8, NULL, 0x01, |
12707 | 14 | NULL, HFILL}}, |
12708 | 14 | {&hf_amqp_method_queue_declare_durable, { |
12709 | 14 | "Durable", "amqp.method.arguments.durable", |
12710 | 14 | FT_BOOLEAN, 8, NULL, 0x02, |
12711 | 14 | NULL, HFILL}}, |
12712 | 14 | {&hf_amqp_method_queue_declare_exclusive, { |
12713 | 14 | "Exclusive", "amqp.method.arguments.exclusive", |
12714 | 14 | FT_BOOLEAN, 8, NULL, 0x04, |
12715 | 14 | NULL, HFILL}}, |
12716 | 14 | {&hf_amqp_method_queue_declare_auto_delete, { |
12717 | 14 | "Auto-Delete", "amqp.method.arguments.auto_delete", |
12718 | 14 | FT_BOOLEAN, 8, NULL, 0x08, |
12719 | 14 | NULL, HFILL}}, |
12720 | 14 | {&hf_amqp_method_queue_declare_nowait, { |
12721 | 14 | "Nowait", "amqp.method.arguments.nowait", |
12722 | 14 | FT_BOOLEAN, 8, NULL, 0x10, |
12723 | 14 | NULL, HFILL}}, |
12724 | 14 | {&hf_amqp_method_queue_declare_arguments, { |
12725 | 14 | "Arguments", "amqp.method.arguments.arguments", |
12726 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
12727 | 14 | NULL, HFILL}}, |
12728 | 14 | {&hf_amqp_method_queue_declare_ok_queue, { |
12729 | 14 | "Queue", "amqp.method.arguments.queue", |
12730 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
12731 | 14 | NULL, HFILL}}, |
12732 | 14 | {&hf_amqp_method_queue_declare_ok_message_count, { |
12733 | 14 | "Message-Count", "amqp.method.arguments.message_count", |
12734 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
12735 | 14 | NULL, HFILL}}, |
12736 | 14 | {&hf_amqp_method_queue_declare_ok_consumer_count, { |
12737 | 14 | "Consumer-Count", "amqp.method.arguments.consumer_count", |
12738 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
12739 | 14 | NULL, HFILL}}, |
12740 | 14 | {&hf_amqp_method_queue_bind_ticket, { |
12741 | 14 | "Ticket", "amqp.method.arguments.ticket", |
12742 | 14 | FT_UINT16, BASE_DEC, NULL, 0, |
12743 | 14 | NULL, HFILL}}, |
12744 | 14 | {&hf_amqp_method_queue_bind_queue, { |
12745 | 14 | "Queue", "amqp.method.arguments.queue", |
12746 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
12747 | 14 | NULL, HFILL}}, |
12748 | 14 | {&hf_amqp_method_queue_bind_exchange, { |
12749 | 14 | "Exchange", "amqp.method.arguments.exchange", |
12750 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
12751 | 14 | NULL, HFILL}}, |
12752 | 14 | {&hf_amqp_method_queue_bind_routing_key, { |
12753 | 14 | "Routing-Key", "amqp.method.arguments.routing_key", |
12754 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
12755 | 14 | NULL, HFILL}}, |
12756 | 14 | {&hf_amqp_method_queue_bind_nowait, { |
12757 | 14 | "Nowait", "amqp.method.arguments.nowait", |
12758 | 14 | FT_BOOLEAN, 8, NULL, 0x01, |
12759 | 14 | NULL, HFILL}}, |
12760 | 14 | {&hf_amqp_method_queue_bind_arguments, { |
12761 | 14 | "Arguments", "amqp.method.arguments.arguments", |
12762 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
12763 | 14 | NULL, HFILL}}, |
12764 | 14 | {&hf_amqp_method_queue_unbind_ticket, { |
12765 | 14 | "Ticket", "amqp.method.arguments.ticket", |
12766 | 14 | FT_UINT16, BASE_DEC, NULL, 0, |
12767 | 14 | NULL, HFILL}}, |
12768 | 14 | {&hf_amqp_method_queue_unbind_queue, { |
12769 | 14 | "Queue", "amqp.method.arguments.queue", |
12770 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
12771 | 14 | NULL, HFILL}}, |
12772 | 14 | {&hf_amqp_method_queue_unbind_exchange, { |
12773 | 14 | "Exchange", "amqp.method.arguments.exchange", |
12774 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
12775 | 14 | NULL, HFILL}}, |
12776 | 14 | {&hf_amqp_method_queue_unbind_routing_key, { |
12777 | 14 | "Routing-Key", "amqp.method.arguments.routing_key", |
12778 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
12779 | 14 | NULL, HFILL}}, |
12780 | 14 | {&hf_amqp_method_queue_unbind_arguments, { |
12781 | 14 | "Arguments", "amqp.method.arguments.arguments", |
12782 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
12783 | 14 | NULL, HFILL}}, |
12784 | 14 | {&hf_amqp_method_queue_purge_ticket, { |
12785 | 14 | "Ticket", "amqp.method.arguments.ticket", |
12786 | 14 | FT_UINT16, BASE_DEC, NULL, 0, |
12787 | 14 | NULL, HFILL}}, |
12788 | 14 | {&hf_amqp_method_queue_purge_queue, { |
12789 | 14 | "Queue", "amqp.method.arguments.queue", |
12790 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
12791 | 14 | NULL, HFILL}}, |
12792 | 14 | {&hf_amqp_method_queue_purge_nowait, { |
12793 | 14 | "Nowait", "amqp.method.arguments.nowait", |
12794 | 14 | FT_BOOLEAN, 8, NULL, 0x01, |
12795 | 14 | NULL, HFILL}}, |
12796 | 14 | {&hf_amqp_method_queue_purge_ok_message_count, { |
12797 | 14 | "Message-Count", "amqp.method.arguments.message_count", |
12798 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
12799 | 14 | NULL, HFILL}}, |
12800 | 14 | {&hf_amqp_method_queue_delete_ticket, { |
12801 | 14 | "Ticket", "amqp.method.arguments.ticket", |
12802 | 14 | FT_UINT16, BASE_DEC, NULL, 0, |
12803 | 14 | NULL, HFILL}}, |
12804 | 14 | {&hf_amqp_method_queue_delete_queue, { |
12805 | 14 | "Queue", "amqp.method.arguments.queue", |
12806 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
12807 | 14 | NULL, HFILL}}, |
12808 | 14 | {&hf_amqp_method_queue_delete_if_unused, { |
12809 | 14 | "If-Unused", "amqp.method.arguments.if_unused", |
12810 | 14 | FT_BOOLEAN, 8, NULL, 0x01, |
12811 | 14 | NULL, HFILL}}, |
12812 | 14 | {&hf_amqp_method_queue_delete_if_empty, { |
12813 | 14 | "If-Empty", "amqp.method.arguments.if_empty", |
12814 | 14 | FT_BOOLEAN, 8, NULL, 0x02, |
12815 | 14 | NULL, HFILL}}, |
12816 | 14 | {&hf_amqp_method_queue_delete_nowait, { |
12817 | 14 | "Nowait", "amqp.method.arguments.nowait", |
12818 | 14 | FT_BOOLEAN, 8, NULL, 0x04, |
12819 | 14 | NULL, HFILL}}, |
12820 | 14 | {&hf_amqp_method_queue_delete_ok_message_count, { |
12821 | 14 | "Message-Count", "amqp.method.arguments.message_count", |
12822 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
12823 | 14 | NULL, HFILL}}, |
12824 | 14 | {&hf_amqp_method_basic_qos_prefetch_size, { |
12825 | 14 | "Prefetch-Size", "amqp.method.arguments.prefetch_size", |
12826 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
12827 | 14 | NULL, HFILL}}, |
12828 | 14 | {&hf_amqp_method_basic_qos_prefetch_count, { |
12829 | 14 | "Prefetch-Count", "amqp.method.arguments.prefetch_count", |
12830 | 14 | FT_UINT16, BASE_DEC, NULL, 0, |
12831 | 14 | NULL, HFILL}}, |
12832 | 14 | {&hf_amqp_method_basic_qos_global, { |
12833 | 14 | "Global", "amqp.method.arguments.global", |
12834 | 14 | FT_BOOLEAN, 8, NULL, 0x01, |
12835 | 14 | NULL, HFILL}}, |
12836 | 14 | {&hf_amqp_method_basic_consume_ticket, { |
12837 | 14 | "Ticket", "amqp.method.arguments.ticket", |
12838 | 14 | FT_UINT16, BASE_DEC, NULL, 0, |
12839 | 14 | NULL, HFILL}}, |
12840 | 14 | {&hf_amqp_method_basic_consume_queue, { |
12841 | 14 | "Queue", "amqp.method.arguments.queue", |
12842 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
12843 | 14 | NULL, HFILL}}, |
12844 | 14 | {&hf_amqp_method_basic_consume_consumer_tag, { |
12845 | 14 | "Consumer-Tag", "amqp.method.arguments.consumer_tag", |
12846 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
12847 | 14 | NULL, HFILL}}, |
12848 | 14 | {&hf_amqp_method_basic_consume_no_local, { |
12849 | 14 | "No-Local", "amqp.method.arguments.no_local", |
12850 | 14 | FT_BOOLEAN, 8, NULL, 0x01, |
12851 | 14 | NULL, HFILL}}, |
12852 | 14 | {&hf_amqp_method_basic_consume_no_ack, { |
12853 | 14 | "No-Ack", "amqp.method.arguments.no_ack", |
12854 | 14 | FT_BOOLEAN, 8, NULL, 0x02, |
12855 | 14 | NULL, HFILL}}, |
12856 | 14 | {&hf_amqp_method_basic_consume_exclusive, { |
12857 | 14 | "Exclusive", "amqp.method.arguments.exclusive", |
12858 | 14 | FT_BOOLEAN, 8, NULL, 0x04, |
12859 | 14 | NULL, HFILL}}, |
12860 | 14 | {&hf_amqp_method_basic_consume_nowait, { |
12861 | 14 | "Nowait", "amqp.method.arguments.nowait", |
12862 | 14 | FT_BOOLEAN, 8, NULL, 0x08, |
12863 | 14 | NULL, HFILL}}, |
12864 | 14 | {&hf_amqp_method_basic_consume_filter, { |
12865 | 14 | "Filter", "amqp.method.arguments.filter", |
12866 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
12867 | 14 | NULL, HFILL}}, |
12868 | 14 | {&hf_amqp_method_basic_consume_ok_consumer_tag, { |
12869 | 14 | "Consumer-Tag", "amqp.method.arguments.consumer_tag", |
12870 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
12871 | 14 | NULL, HFILL}}, |
12872 | 14 | {&hf_amqp_method_basic_cancel_consumer_tag, { |
12873 | 14 | "Consumer-Tag", "amqp.method.arguments.consumer_tag", |
12874 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
12875 | 14 | NULL, HFILL}}, |
12876 | 14 | {&hf_amqp_method_basic_cancel_nowait, { |
12877 | 14 | "Nowait", "amqp.method.arguments.nowait", |
12878 | 14 | FT_BOOLEAN, 8, NULL, 0x01, |
12879 | 14 | NULL, HFILL}}, |
12880 | 14 | {&hf_amqp_method_basic_cancel_ok_consumer_tag, { |
12881 | 14 | "Consumer-Tag", "amqp.method.arguments.consumer_tag", |
12882 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
12883 | 14 | NULL, HFILL}}, |
12884 | 14 | {&hf_amqp_method_basic_publish_number, { |
12885 | 14 | "Publish-Number", "amqp.method.arguments.publish_number", |
12886 | 14 | FT_UINT64, BASE_DEC, NULL, 0, |
12887 | 14 | NULL, HFILL}}, |
12888 | 14 | {&hf_amqp_method_basic_publish_ticket, { |
12889 | 14 | "Ticket", "amqp.method.arguments.ticket", |
12890 | 14 | FT_UINT16, BASE_DEC, NULL, 0, |
12891 | 14 | NULL, HFILL}}, |
12892 | 14 | {&hf_amqp_method_basic_publish_exchange, { |
12893 | 14 | "Exchange", "amqp.method.arguments.exchange", |
12894 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
12895 | 14 | NULL, HFILL}}, |
12896 | 14 | {&hf_amqp_method_basic_publish_routing_key, { |
12897 | 14 | "Routing-Key", "amqp.method.arguments.routing_key", |
12898 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
12899 | 14 | NULL, HFILL}}, |
12900 | 14 | {&hf_amqp_method_basic_publish_mandatory, { |
12901 | 14 | "Mandatory", "amqp.method.arguments.mandatory", |
12902 | 14 | FT_BOOLEAN, 8, NULL, 0x01, |
12903 | 14 | NULL, HFILL}}, |
12904 | 14 | {&hf_amqp_method_basic_publish_immediate, { |
12905 | 14 | "Immediate", "amqp.method.arguments.immediate", |
12906 | 14 | FT_BOOLEAN, 8, NULL, 0x02, |
12907 | 14 | NULL, HFILL}}, |
12908 | 14 | {&hf_amqp_method_basic_return_reply_code, { |
12909 | 14 | "Reply-Code", "amqp.method.arguments.reply_code", |
12910 | 14 | FT_UINT16, BASE_DEC, NULL, 0, |
12911 | 14 | NULL, HFILL}}, |
12912 | 14 | {&hf_amqp_method_basic_return_reply_text, { |
12913 | 14 | "Reply-Text", "amqp.method.arguments.reply_text", |
12914 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
12915 | 14 | NULL, HFILL}}, |
12916 | 14 | {&hf_amqp_method_basic_return_exchange, { |
12917 | 14 | "Exchange", "amqp.method.arguments.exchange", |
12918 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
12919 | 14 | NULL, HFILL}}, |
12920 | 14 | {&hf_amqp_method_basic_return_routing_key, { |
12921 | 14 | "Routing-Key", "amqp.method.arguments.routing_key", |
12922 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
12923 | 14 | NULL, HFILL}}, |
12924 | 14 | {&hf_amqp_method_basic_deliver_consumer_tag, { |
12925 | 14 | "Consumer-Tag", "amqp.method.arguments.consumer_tag", |
12926 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
12927 | 14 | NULL, HFILL}}, |
12928 | 14 | {&hf_amqp_method_basic_deliver_delivery_tag, { |
12929 | 14 | "Delivery-Tag", "amqp.method.arguments.delivery_tag", |
12930 | 14 | FT_UINT64, BASE_DEC, NULL, 0, |
12931 | 14 | NULL, HFILL}}, |
12932 | 14 | {&hf_amqp_method_basic_deliver_redelivered, { |
12933 | 14 | "Redelivered", "amqp.method.arguments.redelivered", |
12934 | 14 | FT_BOOLEAN, 8, NULL, 0x01, |
12935 | 14 | NULL, HFILL}}, |
12936 | 14 | {&hf_amqp_method_basic_deliver_exchange, { |
12937 | 14 | "Exchange", "amqp.method.arguments.exchange", |
12938 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
12939 | 14 | NULL, HFILL}}, |
12940 | 14 | {&hf_amqp_method_basic_deliver_routing_key, { |
12941 | 14 | "Routing-Key", "amqp.method.arguments.routing_key", |
12942 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
12943 | 14 | NULL, HFILL}}, |
12944 | 14 | {&hf_amqp_method_basic_get_ticket, { |
12945 | 14 | "Ticket", "amqp.method.arguments.ticket", |
12946 | 14 | FT_UINT16, BASE_DEC, NULL, 0, |
12947 | 14 | NULL, HFILL}}, |
12948 | 14 | {&hf_amqp_method_basic_get_queue, { |
12949 | 14 | "Queue", "amqp.method.arguments.queue", |
12950 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
12951 | 14 | NULL, HFILL}}, |
12952 | 14 | {&hf_amqp_method_basic_get_no_ack, { |
12953 | 14 | "No-Ack", "amqp.method.arguments.no_ack", |
12954 | 14 | FT_BOOLEAN, 8, NULL, 0x01, |
12955 | 14 | NULL, HFILL}}, |
12956 | 14 | {&hf_amqp_method_basic_get_ok_delivery_tag, { |
12957 | 14 | "Delivery-Tag", "amqp.method.arguments.delivery_tag", |
12958 | 14 | FT_UINT64, BASE_DEC, NULL, 0, |
12959 | 14 | NULL, HFILL}}, |
12960 | 14 | {&hf_amqp_method_basic_get_ok_redelivered, { |
12961 | 14 | "Redelivered", "amqp.method.arguments.redelivered", |
12962 | 14 | FT_BOOLEAN, 8, NULL, 0x01, |
12963 | 14 | NULL, HFILL}}, |
12964 | 14 | {&hf_amqp_method_basic_get_ok_exchange, { |
12965 | 14 | "Exchange", "amqp.method.arguments.exchange", |
12966 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
12967 | 14 | NULL, HFILL}}, |
12968 | 14 | {&hf_amqp_method_basic_get_ok_routing_key, { |
12969 | 14 | "Routing-Key", "amqp.method.arguments.routing_key", |
12970 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
12971 | 14 | NULL, HFILL}}, |
12972 | 14 | {&hf_amqp_method_basic_get_ok_message_count, { |
12973 | 14 | "Message-Count", "amqp.method.arguments.message_count", |
12974 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
12975 | 14 | NULL, HFILL}}, |
12976 | 14 | {&hf_amqp_method_basic_get_empty_cluster_id, { |
12977 | 14 | "Cluster-Id", "amqp.method.arguments.cluster_id", |
12978 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
12979 | 14 | NULL, HFILL}}, |
12980 | 14 | {&hf_amqp_method_basic_ack_delivery_tag, { |
12981 | 14 | "Delivery-Tag", "amqp.method.arguments.delivery_tag", |
12982 | 14 | FT_UINT64, BASE_DEC, NULL, 0, |
12983 | 14 | NULL, HFILL}}, |
12984 | 14 | {&hf_amqp_method_basic_ack_multiple, { |
12985 | 14 | "Multiple", "amqp.method.arguments.multiple", |
12986 | 14 | FT_BOOLEAN, 8, NULL, 0x01, |
12987 | 14 | NULL, HFILL}}, |
12988 | 14 | {&hf_amqp_method_basic_reject_delivery_tag, { |
12989 | 14 | "Delivery-Tag", "amqp.method.arguments.delivery_tag", |
12990 | 14 | FT_UINT64, BASE_DEC, NULL, 0, |
12991 | 14 | NULL, HFILL}}, |
12992 | 14 | {&hf_amqp_method_basic_reject_requeue, { |
12993 | 14 | "Requeue", "amqp.method.arguments.requeue", |
12994 | 14 | FT_BOOLEAN, 8, NULL, 0x01, |
12995 | 14 | NULL, HFILL}}, |
12996 | 14 | {&hf_amqp_method_basic_recover_requeue, { |
12997 | 14 | "Requeue", "amqp.method.arguments.requeue", |
12998 | 14 | FT_BOOLEAN, 8, NULL, 0x01, |
12999 | 14 | NULL, HFILL}}, |
13000 | 14 | {&hf_amqp_method_basic_nack_delivery_tag, { |
13001 | 14 | "Delivery-Tag", "amqp.method.arguments.delivery_tag", |
13002 | 14 | FT_UINT64, BASE_DEC, NULL, 0, |
13003 | 14 | NULL, HFILL}}, |
13004 | 14 | {&hf_amqp_method_basic_nack_multiple, { |
13005 | 14 | "Multiple", "amqp.method.arguments.multiple", |
13006 | 14 | FT_BOOLEAN, 8, NULL, 0x01, |
13007 | 14 | NULL, HFILL}}, |
13008 | 14 | {&hf_amqp_method_basic_nack_requeue, { |
13009 | 14 | "Requeue", "amqp.method.arguments.requeue", |
13010 | 14 | FT_BOOLEAN, 8, NULL, 0x02, |
13011 | 14 | NULL, HFILL}}, |
13012 | 14 | {&hf_amqp_method_file_qos_prefetch_size, { |
13013 | 14 | "Prefetch-Size", "amqp.method.arguments.prefetch_size", |
13014 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
13015 | 14 | NULL, HFILL}}, |
13016 | 14 | {&hf_amqp_method_file_qos_prefetch_count, { |
13017 | 14 | "Prefetch-Count", "amqp.method.arguments.prefetch_count", |
13018 | 14 | FT_UINT16, BASE_DEC, NULL, 0, |
13019 | 14 | NULL, HFILL}}, |
13020 | 14 | {&hf_amqp_method_file_qos_global, { |
13021 | 14 | "Global", "amqp.method.arguments.global", |
13022 | 14 | FT_BOOLEAN, 8, NULL, 0x01, |
13023 | 14 | NULL, HFILL}}, |
13024 | 14 | {&hf_amqp_method_file_consume_ticket, { |
13025 | 14 | "Ticket", "amqp.method.arguments.ticket", |
13026 | 14 | FT_UINT16, BASE_DEC, NULL, 0, |
13027 | 14 | NULL, HFILL}}, |
13028 | 14 | {&hf_amqp_method_file_consume_queue, { |
13029 | 14 | "Queue", "amqp.method.arguments.queue", |
13030 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
13031 | 14 | NULL, HFILL}}, |
13032 | 14 | {&hf_amqp_method_file_consume_consumer_tag, { |
13033 | 14 | "Consumer-Tag", "amqp.method.arguments.consumer_tag", |
13034 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
13035 | 14 | NULL, HFILL}}, |
13036 | 14 | {&hf_amqp_method_file_consume_no_local, { |
13037 | 14 | "No-Local", "amqp.method.arguments.no_local", |
13038 | 14 | FT_BOOLEAN, 8, NULL, 0x01, |
13039 | 14 | NULL, HFILL}}, |
13040 | 14 | {&hf_amqp_method_file_consume_no_ack, { |
13041 | 14 | "No-Ack", "amqp.method.arguments.no_ack", |
13042 | 14 | FT_BOOLEAN, 8, NULL, 0x02, |
13043 | 14 | NULL, HFILL}}, |
13044 | 14 | {&hf_amqp_method_file_consume_exclusive, { |
13045 | 14 | "Exclusive", "amqp.method.arguments.exclusive", |
13046 | 14 | FT_BOOLEAN, 8, NULL, 0x04, |
13047 | 14 | NULL, HFILL}}, |
13048 | 14 | {&hf_amqp_method_file_consume_nowait, { |
13049 | 14 | "Nowait", "amqp.method.arguments.nowait", |
13050 | 14 | FT_BOOLEAN, 8, NULL, 0x08, |
13051 | 14 | NULL, HFILL}}, |
13052 | 14 | {&hf_amqp_method_file_consume_filter, { |
13053 | 14 | "Filter", "amqp.method.arguments.filter", |
13054 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
13055 | 14 | NULL, HFILL}}, |
13056 | 14 | {&hf_amqp_method_file_consume_ok_consumer_tag, { |
13057 | 14 | "Consumer-Tag", "amqp.method.arguments.consumer_tag", |
13058 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
13059 | 14 | NULL, HFILL}}, |
13060 | 14 | {&hf_amqp_method_file_cancel_consumer_tag, { |
13061 | 14 | "Consumer-Tag", "amqp.method.arguments.consumer_tag", |
13062 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
13063 | 14 | NULL, HFILL}}, |
13064 | 14 | {&hf_amqp_method_file_cancel_nowait, { |
13065 | 14 | "Nowait", "amqp.method.arguments.nowait", |
13066 | 14 | FT_BOOLEAN, 8, NULL, 0x01, |
13067 | 14 | NULL, HFILL}}, |
13068 | 14 | {&hf_amqp_method_file_cancel_ok_consumer_tag, { |
13069 | 14 | "Consumer-Tag", "amqp.method.arguments.consumer_tag", |
13070 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
13071 | 14 | NULL, HFILL}}, |
13072 | 14 | {&hf_amqp_method_file_open_identifier, { |
13073 | 14 | "Identifier", "amqp.method.arguments.identifier", |
13074 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
13075 | 14 | NULL, HFILL}}, |
13076 | 14 | {&hf_amqp_method_file_open_content_size, { |
13077 | 14 | "Content-Size", "amqp.method.arguments.content_size", |
13078 | 14 | FT_UINT64, BASE_DEC, NULL, 0, |
13079 | 14 | NULL, HFILL}}, |
13080 | 14 | {&hf_amqp_method_file_open_ok_staged_size, { |
13081 | 14 | "Staged-Size", "amqp.method.arguments.staged_size", |
13082 | 14 | FT_UINT64, BASE_DEC, NULL, 0, |
13083 | 14 | NULL, HFILL}}, |
13084 | 14 | {&hf_amqp_method_file_publish_ticket, { |
13085 | 14 | "Ticket", "amqp.method.arguments.ticket", |
13086 | 14 | FT_UINT16, BASE_DEC, NULL, 0, |
13087 | 14 | NULL, HFILL}}, |
13088 | 14 | {&hf_amqp_method_file_publish_exchange, { |
13089 | 14 | "Exchange", "amqp.method.arguments.exchange", |
13090 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
13091 | 14 | NULL, HFILL}}, |
13092 | 14 | {&hf_amqp_method_file_publish_routing_key, { |
13093 | 14 | "Routing-Key", "amqp.method.arguments.routing_key", |
13094 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
13095 | 14 | NULL, HFILL}}, |
13096 | 14 | {&hf_amqp_method_file_publish_mandatory, { |
13097 | 14 | "Mandatory", "amqp.method.arguments.mandatory", |
13098 | 14 | FT_BOOLEAN, 8, NULL, 0x01, |
13099 | 14 | NULL, HFILL}}, |
13100 | 14 | {&hf_amqp_method_file_publish_immediate, { |
13101 | 14 | "Immediate", "amqp.method.arguments.immediate", |
13102 | 14 | FT_BOOLEAN, 8, NULL, 0x02, |
13103 | 14 | NULL, HFILL}}, |
13104 | 14 | {&hf_amqp_method_file_publish_identifier, { |
13105 | 14 | "Identifier", "amqp.method.arguments.identifier", |
13106 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
13107 | 14 | NULL, HFILL}}, |
13108 | 14 | {&hf_amqp_method_file_return_reply_code, { |
13109 | 14 | "Reply-Code", "amqp.method.arguments.reply_code", |
13110 | 14 | FT_UINT16, BASE_DEC, NULL, 0, |
13111 | 14 | NULL, HFILL}}, |
13112 | 14 | {&hf_amqp_method_file_return_reply_text, { |
13113 | 14 | "Reply-Text", "amqp.method.arguments.reply_text", |
13114 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
13115 | 14 | NULL, HFILL}}, |
13116 | 14 | {&hf_amqp_method_file_return_exchange, { |
13117 | 14 | "Exchange", "amqp.method.arguments.exchange", |
13118 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
13119 | 14 | NULL, HFILL}}, |
13120 | 14 | {&hf_amqp_method_file_return_routing_key, { |
13121 | 14 | "Routing-Key", "amqp.method.arguments.routing_key", |
13122 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
13123 | 14 | NULL, HFILL}}, |
13124 | 14 | {&hf_amqp_method_file_deliver_consumer_tag, { |
13125 | 14 | "Consumer-Tag", "amqp.method.arguments.consumer_tag", |
13126 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
13127 | 14 | NULL, HFILL}}, |
13128 | 14 | {&hf_amqp_method_file_deliver_delivery_tag, { |
13129 | 14 | "Delivery-Tag", "amqp.method.arguments.delivery_tag", |
13130 | 14 | FT_UINT64, BASE_DEC, NULL, 0, |
13131 | 14 | NULL, HFILL}}, |
13132 | 14 | {&hf_amqp_method_file_deliver_redelivered, { |
13133 | 14 | "Redelivered", "amqp.method.arguments.redelivered", |
13134 | 14 | FT_BOOLEAN, 8, NULL, 0x01, |
13135 | 14 | NULL, HFILL}}, |
13136 | 14 | {&hf_amqp_method_file_deliver_exchange, { |
13137 | 14 | "Exchange", "amqp.method.arguments.exchange", |
13138 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
13139 | 14 | NULL, HFILL}}, |
13140 | 14 | {&hf_amqp_method_file_deliver_routing_key, { |
13141 | 14 | "Routing-Key", "amqp.method.arguments.routing_key", |
13142 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
13143 | 14 | NULL, HFILL}}, |
13144 | 14 | {&hf_amqp_method_file_deliver_identifier, { |
13145 | 14 | "Identifier", "amqp.method.arguments.identifier", |
13146 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
13147 | 14 | NULL, HFILL}}, |
13148 | 14 | {&hf_amqp_method_file_ack_delivery_tag, { |
13149 | 14 | "Delivery-Tag", "amqp.method.arguments.delivery_tag", |
13150 | 14 | FT_UINT64, BASE_DEC, NULL, 0, |
13151 | 14 | NULL, HFILL}}, |
13152 | 14 | {&hf_amqp_method_file_ack_multiple, { |
13153 | 14 | "Multiple", "amqp.method.arguments.multiple", |
13154 | 14 | FT_BOOLEAN, 8, NULL, 0x01, |
13155 | 14 | NULL, HFILL}}, |
13156 | 14 | {&hf_amqp_method_file_reject_delivery_tag, { |
13157 | 14 | "Delivery-Tag", "amqp.method.arguments.delivery_tag", |
13158 | 14 | FT_UINT64, BASE_DEC, NULL, 0, |
13159 | 14 | NULL, HFILL}}, |
13160 | 14 | {&hf_amqp_method_file_reject_requeue, { |
13161 | 14 | "Requeue", "amqp.method.arguments.requeue", |
13162 | 14 | FT_BOOLEAN, 8, NULL, 0x01, |
13163 | 14 | NULL, HFILL}}, |
13164 | 14 | {&hf_amqp_method_stream_qos_prefetch_size, { |
13165 | 14 | "Prefetch-Size", "amqp.method.arguments.prefetch_size", |
13166 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
13167 | 14 | NULL, HFILL}}, |
13168 | 14 | {&hf_amqp_method_stream_qos_prefetch_count, { |
13169 | 14 | "Prefetch-Count", "amqp.method.arguments.prefetch_count", |
13170 | 14 | FT_UINT16, BASE_DEC, NULL, 0, |
13171 | 14 | NULL, HFILL}}, |
13172 | 14 | {&hf_amqp_method_stream_qos_consume_rate, { |
13173 | 14 | "Consume-Rate", "amqp.method.arguments.consume_rate", |
13174 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
13175 | 14 | NULL, HFILL}}, |
13176 | 14 | {&hf_amqp_method_stream_qos_global, { |
13177 | 14 | "Global", "amqp.method.arguments.global", |
13178 | 14 | FT_BOOLEAN, 8, NULL, 0x01, |
13179 | 14 | NULL, HFILL}}, |
13180 | 14 | {&hf_amqp_method_stream_consume_ticket, { |
13181 | 14 | "Ticket", "amqp.method.arguments.ticket", |
13182 | 14 | FT_UINT16, BASE_DEC, NULL, 0, |
13183 | 14 | NULL, HFILL}}, |
13184 | 14 | {&hf_amqp_method_stream_consume_queue, { |
13185 | 14 | "Queue", "amqp.method.arguments.queue", |
13186 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
13187 | 14 | NULL, HFILL}}, |
13188 | 14 | {&hf_amqp_method_stream_consume_consumer_tag, { |
13189 | 14 | "Consumer-Tag", "amqp.method.arguments.consumer_tag", |
13190 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
13191 | 14 | NULL, HFILL}}, |
13192 | 14 | {&hf_amqp_method_stream_consume_no_local, { |
13193 | 14 | "No-Local", "amqp.method.arguments.no_local", |
13194 | 14 | FT_BOOLEAN, 8, NULL, 0x01, |
13195 | 14 | NULL, HFILL}}, |
13196 | 14 | {&hf_amqp_method_stream_consume_exclusive, { |
13197 | 14 | "Exclusive", "amqp.method.arguments.exclusive", |
13198 | 14 | FT_BOOLEAN, 8, NULL, 0x02, |
13199 | 14 | NULL, HFILL}}, |
13200 | 14 | {&hf_amqp_method_stream_consume_nowait, { |
13201 | 14 | "Nowait", "amqp.method.arguments.nowait", |
13202 | 14 | FT_BOOLEAN, 8, NULL, 0x04, |
13203 | 14 | NULL, HFILL}}, |
13204 | 14 | {&hf_amqp_method_stream_consume_filter, { |
13205 | 14 | "Filter", "amqp.method.arguments.filter", |
13206 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
13207 | 14 | NULL, HFILL}}, |
13208 | 14 | {&hf_amqp_method_stream_consume_ok_consumer_tag, { |
13209 | 14 | "Consumer-Tag", "amqp.method.arguments.consumer_tag", |
13210 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
13211 | 14 | NULL, HFILL}}, |
13212 | 14 | {&hf_amqp_method_stream_cancel_consumer_tag, { |
13213 | 14 | "Consumer-Tag", "amqp.method.arguments.consumer_tag", |
13214 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
13215 | 14 | NULL, HFILL}}, |
13216 | 14 | {&hf_amqp_method_stream_cancel_nowait, { |
13217 | 14 | "Nowait", "amqp.method.arguments.nowait", |
13218 | 14 | FT_BOOLEAN, 8, NULL, 0x01, |
13219 | 14 | NULL, HFILL}}, |
13220 | 14 | {&hf_amqp_method_stream_cancel_ok_consumer_tag, { |
13221 | 14 | "Consumer-Tag", "amqp.method.arguments.consumer_tag", |
13222 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
13223 | 14 | NULL, HFILL}}, |
13224 | 14 | {&hf_amqp_method_stream_publish_ticket, { |
13225 | 14 | "Ticket", "amqp.method.arguments.ticket", |
13226 | 14 | FT_UINT16, BASE_DEC, NULL, 0, |
13227 | 14 | NULL, HFILL}}, |
13228 | 14 | {&hf_amqp_method_stream_publish_exchange, { |
13229 | 14 | "Exchange", "amqp.method.arguments.exchange", |
13230 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
13231 | 14 | NULL, HFILL}}, |
13232 | 14 | {&hf_amqp_method_stream_publish_routing_key, { |
13233 | 14 | "Routing-Key", "amqp.method.arguments.routing_key", |
13234 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
13235 | 14 | NULL, HFILL}}, |
13236 | 14 | {&hf_amqp_method_stream_publish_mandatory, { |
13237 | 14 | "Mandatory", "amqp.method.arguments.mandatory", |
13238 | 14 | FT_BOOLEAN, 8, NULL, 0x01, |
13239 | 14 | NULL, HFILL}}, |
13240 | 14 | {&hf_amqp_method_stream_publish_immediate, { |
13241 | 14 | "Immediate", "amqp.method.arguments.immediate", |
13242 | 14 | FT_BOOLEAN, 8, NULL, 0x02, |
13243 | 14 | NULL, HFILL}}, |
13244 | 14 | {&hf_amqp_method_stream_return_reply_code, { |
13245 | 14 | "Reply-Code", "amqp.method.arguments.reply_code", |
13246 | 14 | FT_UINT16, BASE_DEC, NULL, 0, |
13247 | 14 | NULL, HFILL}}, |
13248 | 14 | {&hf_amqp_method_stream_return_reply_text, { |
13249 | 14 | "Reply-Text", "amqp.method.arguments.reply_text", |
13250 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
13251 | 14 | NULL, HFILL}}, |
13252 | 14 | {&hf_amqp_method_stream_return_exchange, { |
13253 | 14 | "Exchange", "amqp.method.arguments.exchange", |
13254 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
13255 | 14 | NULL, HFILL}}, |
13256 | 14 | {&hf_amqp_method_stream_return_routing_key, { |
13257 | 14 | "Routing-Key", "amqp.method.arguments.routing_key", |
13258 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
13259 | 14 | NULL, HFILL}}, |
13260 | 14 | {&hf_amqp_method_stream_deliver_consumer_tag, { |
13261 | 14 | "Consumer-Tag", "amqp.method.arguments.consumer_tag", |
13262 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
13263 | 14 | NULL, HFILL}}, |
13264 | 14 | {&hf_amqp_method_stream_deliver_delivery_tag, { |
13265 | 14 | "Delivery-Tag", "amqp.method.arguments.delivery_tag", |
13266 | 14 | FT_UINT64, BASE_DEC, NULL, 0, |
13267 | 14 | NULL, HFILL}}, |
13268 | 14 | {&hf_amqp_method_stream_deliver_exchange, { |
13269 | 14 | "Exchange", "amqp.method.arguments.exchange", |
13270 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
13271 | 14 | NULL, HFILL}}, |
13272 | 14 | {&hf_amqp_method_stream_deliver_queue, { |
13273 | 14 | "Queue", "amqp.method.arguments.queue", |
13274 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
13275 | 14 | NULL, HFILL}}, |
13276 | 14 | {&hf_amqp_method_dtx_start_dtx_identifier, { |
13277 | 14 | "Dtx-Identifier", "amqp.method.arguments.dtx_identifier", |
13278 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
13279 | 14 | NULL, HFILL}}, |
13280 | 14 | {&hf_amqp_method_tunnel_request_meta_data, { |
13281 | 14 | "Meta-Data", "amqp.method.arguments.meta_data", |
13282 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
13283 | 14 | NULL, HFILL}}, |
13284 | 14 | {&hf_amqp_method_confirm_select_nowait, { |
13285 | 14 | "Nowait", "amqp.method.arguments.nowait", |
13286 | 14 | FT_BOOLEAN, 8, NULL, 0x01, |
13287 | 14 | NULL, HFILL}}, |
13288 | 14 | {&hf_amqp_field, { |
13289 | 14 | "Field", "amqp.field", |
13290 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
13291 | 14 | NULL, HFILL}}, |
13292 | 14 | {&hf_amqp_field_name, { |
13293 | 14 | "Name", "amqp.field.name", |
13294 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
13295 | 14 | NULL, HFILL}}, |
13296 | 14 | {&hf_amqp_field_type, { |
13297 | 14 | "Type", "amqp.field.type", |
13298 | 14 | FT_CHAR, BASE_HEX, VALS(amqp_0_9_field_type_vals), 0, |
13299 | 14 | NULL, HFILL}}, |
13300 | 14 | {&hf_amqp_field_integer, { |
13301 | 14 | "Value", "amqp.field.integer", |
13302 | 14 | FT_INT32, BASE_DEC, NULL, 0, |
13303 | 14 | NULL, HFILL}}, |
13304 | 14 | {&hf_amqp_field_unsigned_integer, { |
13305 | 14 | "Value", "amqp.field.unsigned_integer", |
13306 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
13307 | 14 | NULL, HFILL}}, |
13308 | 14 | {&hf_amqp_field_string, { |
13309 | 14 | "Value", "amqp.field.string", |
13310 | 14 | FT_UINT_STRING, BASE_NONE, NULL, 0, |
13311 | 14 | NULL, HFILL}}, |
13312 | 14 | {&hf_amqp_field_boolean, { |
13313 | 14 | "Value", "amqp.field.boolean", |
13314 | 14 | FT_BOOLEAN, BASE_NONE, NULL, 0, |
13315 | 14 | NULL, HFILL}}, |
13316 | 14 | {&hf_amqp_field_byte, { |
13317 | 14 | "Value", "amqp.field.byte", |
13318 | 14 | FT_INT8, BASE_DEC, NULL, 0, |
13319 | 14 | NULL, HFILL}}, |
13320 | 14 | {&hf_amqp_field_unsigned_byte, { |
13321 | 14 | "Value", "amqp.field.unsigned_byte", |
13322 | 14 | FT_UINT8, BASE_DEC, NULL, 0, |
13323 | 14 | NULL, HFILL}}, |
13324 | 14 | {&hf_amqp_field_short_int, { |
13325 | 14 | "Value", "amqp.field.short_int", |
13326 | 14 | FT_INT16, BASE_DEC, NULL, 0, |
13327 | 14 | NULL, HFILL}}, |
13328 | 14 | {&hf_amqp_field_short_uint, { |
13329 | 14 | "Value", "amqp.field.short_uint", |
13330 | 14 | FT_UINT16, BASE_DEC, NULL, 0, |
13331 | 14 | NULL, HFILL}}, |
13332 | 14 | {&hf_amqp_field_long_int, { |
13333 | 14 | "Value", "amqp.field.long_int", |
13334 | 14 | FT_INT64, BASE_DEC, NULL, 0, |
13335 | 14 | NULL, HFILL}}, |
13336 | 14 | {&hf_amqp_field_float, { |
13337 | 14 | "Value", "amqp.field.float", |
13338 | 14 | FT_FLOAT, BASE_NONE, NULL, 0, |
13339 | 14 | NULL, HFILL}}, |
13340 | 14 | {&hf_amqp_field_double, { |
13341 | 14 | "Value", "amqp.field.double", |
13342 | 14 | FT_DOUBLE, BASE_NONE, NULL, 0, |
13343 | 14 | NULL, HFILL}}, |
13344 | 14 | {&hf_amqp_field_decimal, { |
13345 | 14 | "Value", "amqp.field.decimal", |
13346 | 14 | FT_DOUBLE, BASE_NONE, NULL, 0, |
13347 | 14 | NULL, HFILL}}, |
13348 | 14 | {&hf_amqp_field_timestamp, { |
13349 | 14 | "Value", "amqp.field.timestamp", |
13350 | 14 | FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL, 0x0, |
13351 | 14 | NULL, HFILL}}, |
13352 | 14 | {&hf_amqp_field_byte_array, { |
13353 | 14 | "Value", "amqp.field.byte_array", |
13354 | 14 | FT_UINT_BYTES, BASE_NONE, NULL, 0, |
13355 | 14 | NULL, HFILL}}, |
13356 | 14 | {&hf_amqp_header_class_id, { |
13357 | 14 | "Class ID", "amqp.header.class", |
13358 | 14 | FT_UINT16, BASE_DEC, VALS(amqp_0_9_method_classes), 0, |
13359 | 14 | NULL, HFILL}}, |
13360 | 14 | {&hf_amqp_header_weight, { |
13361 | 14 | "Weight", "amqp.header.weight", |
13362 | 14 | FT_UINT16, BASE_DEC, NULL, 0, |
13363 | 14 | NULL, HFILL}}, |
13364 | 14 | {&hf_amqp_header_body_size, { |
13365 | 14 | "Body size", "amqp.header.body-size", |
13366 | 14 | FT_UINT64, BASE_DEC, NULL, 0, |
13367 | 14 | NULL, HFILL}}, |
13368 | 14 | {&hf_amqp_header_property_flags, { |
13369 | 14 | "Property flags", "amqp.header.property-flags", |
13370 | 14 | FT_UINT16, BASE_HEX, NULL, 0, |
13371 | 14 | NULL, HFILL}}, |
13372 | 14 | {&hf_amqp_header_properties, { |
13373 | 14 | "Properties", "amqp.header.properties", |
13374 | 14 | FT_NONE, BASE_NONE, NULL, 0x0, |
13375 | 14 | "Message properties", HFILL}}, |
13376 | 14 | {&hf_amqp_header_basic_content_type, { |
13377 | 14 | "Content-Type", "amqp.method.properties.content_type", |
13378 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
13379 | 14 | NULL, HFILL}}, |
13380 | 14 | {&hf_amqp_header_basic_content_encoding, { |
13381 | 14 | "Content-Encoding", "amqp.method.properties.content_encoding", |
13382 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
13383 | 14 | NULL, HFILL}}, |
13384 | 14 | {&hf_amqp_header_basic_headers, { |
13385 | 14 | "Headers", "amqp.method.properties.headers", |
13386 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
13387 | 14 | NULL, HFILL}}, |
13388 | 14 | {&hf_amqp_header_basic_delivery_mode, { |
13389 | 14 | "Delivery-Mode", "amqp.method.properties.delivery_mode", |
13390 | 14 | FT_UINT8, BASE_DEC, NULL, 0, |
13391 | 14 | NULL, HFILL}}, |
13392 | 14 | {&hf_amqp_header_basic_priority, { |
13393 | 14 | "Priority", "amqp.method.properties.priority", |
13394 | 14 | FT_UINT8, BASE_DEC, NULL, 0, |
13395 | 14 | NULL, HFILL}}, |
13396 | 14 | {&hf_amqp_header_basic_correlation_id, { |
13397 | 14 | "Correlation-Id", "amqp.method.properties.correlation_id", |
13398 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
13399 | 14 | NULL, HFILL}}, |
13400 | 14 | {&hf_amqp_header_basic_reply_to, { |
13401 | 14 | "Reply-To", "amqp.method.properties.reply_to", |
13402 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
13403 | 14 | NULL, HFILL}}, |
13404 | 14 | {&hf_amqp_header_basic_expiration, { |
13405 | 14 | "Expiration", "amqp.method.properties.expiration", |
13406 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
13407 | 14 | NULL, HFILL}}, |
13408 | 14 | {&hf_amqp_header_basic_message_id, { |
13409 | 14 | "Message-Id", "amqp.method.properties.message_id", |
13410 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
13411 | 14 | NULL, HFILL}}, |
13412 | 14 | {&hf_amqp_header_basic_timestamp, { |
13413 | 14 | "Timestamp", "amqp.method.properties.timestamp", |
13414 | 14 | FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL, 0, |
13415 | 14 | NULL, HFILL}}, |
13416 | 14 | {&hf_amqp_header_basic_type, { |
13417 | 14 | "Type", "amqp.method.properties.type", |
13418 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
13419 | 14 | NULL, HFILL}}, |
13420 | 14 | {&hf_amqp_header_basic_user_id, { |
13421 | 14 | "User-Id", "amqp.method.properties.user_id", |
13422 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
13423 | 14 | NULL, HFILL}}, |
13424 | 14 | {&hf_amqp_header_basic_app_id, { |
13425 | 14 | "App-Id", "amqp.method.properties.app_id", |
13426 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
13427 | 14 | NULL, HFILL}}, |
13428 | 14 | {&hf_amqp_header_basic_cluster_id, { |
13429 | 14 | "Cluster-Id", "amqp.method.properties.cluster_id", |
13430 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
13431 | 14 | NULL, HFILL}}, |
13432 | 14 | {&hf_amqp_header_file_content_type, { |
13433 | 14 | "Content-Type", "amqp.method.properties.content_type", |
13434 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
13435 | 14 | NULL, HFILL}}, |
13436 | 14 | {&hf_amqp_header_file_content_encoding, { |
13437 | 14 | "Content-Encoding", "amqp.method.properties.content_encoding", |
13438 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
13439 | 14 | NULL, HFILL}}, |
13440 | 14 | {&hf_amqp_header_file_headers, { |
13441 | 14 | "Headers", "amqp.method.properties.headers", |
13442 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
13443 | 14 | NULL, HFILL}}, |
13444 | 14 | {&hf_amqp_header_file_priority, { |
13445 | 14 | "Priority", "amqp.method.properties.priority", |
13446 | 14 | FT_UINT8, BASE_DEC, NULL, 0, |
13447 | 14 | NULL, HFILL}}, |
13448 | 14 | {&hf_amqp_header_file_reply_to, { |
13449 | 14 | "Reply-To", "amqp.method.properties.reply_to", |
13450 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
13451 | 14 | NULL, HFILL}}, |
13452 | 14 | {&hf_amqp_header_file_message_id, { |
13453 | 14 | "Message-Id", "amqp.method.properties.message_id", |
13454 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
13455 | 14 | NULL, HFILL}}, |
13456 | 14 | {&hf_amqp_header_file_filename, { |
13457 | 14 | "Filename", "amqp.method.properties.filename", |
13458 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
13459 | 14 | NULL, HFILL}}, |
13460 | 14 | {&hf_amqp_header_file_timestamp, { |
13461 | 14 | "Timestamp", "amqp.method.properties.timestamp", |
13462 | 14 | FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL, 0x0, |
13463 | 14 | NULL, HFILL}}, |
13464 | 14 | {&hf_amqp_header_file_cluster_id, { |
13465 | 14 | "Cluster-Id", "amqp.method.properties.cluster_id", |
13466 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
13467 | 14 | NULL, HFILL}}, |
13468 | 14 | {&hf_amqp_header_stream_content_type, { |
13469 | 14 | "Content-Type", "amqp.method.properties.content_type", |
13470 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
13471 | 14 | NULL, HFILL}}, |
13472 | 14 | {&hf_amqp_header_stream_content_encoding, { |
13473 | 14 | "Content-Encoding", "amqp.method.properties.content_encoding", |
13474 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
13475 | 14 | NULL, HFILL}}, |
13476 | 14 | {&hf_amqp_header_stream_headers, { |
13477 | 14 | "Headers", "amqp.method.properties.headers", |
13478 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
13479 | 14 | NULL, HFILL}}, |
13480 | 14 | {&hf_amqp_header_stream_priority, { |
13481 | 14 | "Priority", "amqp.method.properties.priority", |
13482 | 14 | FT_UINT8, BASE_DEC, NULL, 0, |
13483 | 14 | NULL, HFILL}}, |
13484 | 14 | {&hf_amqp_header_stream_timestamp, { |
13485 | 14 | "Timestamp", "amqp.method.properties.timestamp", |
13486 | 14 | FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL, 0x0, |
13487 | 14 | NULL, HFILL}}, |
13488 | 14 | {&hf_amqp_header_tunnel_headers, { |
13489 | 14 | "Headers", "amqp.method.properties.headers", |
13490 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
13491 | 14 | NULL, HFILL}}, |
13492 | 14 | {&hf_amqp_header_tunnel_proxy_name, { |
13493 | 14 | "Proxy-Name", "amqp.method.properties.proxy_name", |
13494 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
13495 | 14 | NULL, HFILL}}, |
13496 | 14 | {&hf_amqp_header_tunnel_data_name, { |
13497 | 14 | "Data-Name", "amqp.method.properties.data_name", |
13498 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
13499 | 14 | NULL, HFILL}}, |
13500 | 14 | {&hf_amqp_header_tunnel_durable, { |
13501 | 14 | "Durable", "amqp.method.properties.durable", |
13502 | 14 | FT_UINT8, BASE_DEC, NULL, 0, |
13503 | 14 | NULL, HFILL}}, |
13504 | 14 | {&hf_amqp_header_tunnel_broadcast, { |
13505 | 14 | "Broadcast", "amqp.method.properties.broadcast", |
13506 | 14 | FT_UINT8, BASE_DEC, NULL, 0, |
13507 | 14 | NULL, HFILL}}, |
13508 | 14 | {&hf_amqp_0_10_dtx_xa_status, { |
13509 | 14 | "DTX xa-status", "amqp.dtx.xa-status", |
13510 | 14 | FT_UINT16, BASE_DEC, VALS(amqp_0_10_xa_status), 0, |
13511 | 14 | NULL, HFILL}}, |
13512 | 14 | {&hf_amqp_payload, { |
13513 | 14 | "Payload", "amqp.payload", |
13514 | 14 | FT_BYTES, BASE_NONE, NULL, 0, |
13515 | 14 | "Message payload", HFILL}}, |
13516 | 14 | {&hf_amqp_init_protocol, { |
13517 | 14 | "Protocol", "amqp.init.protocol", |
13518 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
13519 | 14 | "Protocol name", HFILL}}, |
13520 | 14 | {&hf_amqp_init_id_major, { |
13521 | 14 | "Protocol ID Major", "amqp.init.id_major", |
13522 | 14 | FT_UINT8, BASE_DEC, NULL, 0, |
13523 | 14 | NULL, HFILL}}, |
13524 | 14 | {&hf_amqp_init_id_minor, { |
13525 | 14 | "Protocol ID Minor", "amqp.init.id_minor", |
13526 | 14 | FT_UINT8, BASE_DEC, NULL, 0, |
13527 | 14 | NULL, HFILL}}, |
13528 | 14 | {&hf_amqp_init_id, { |
13529 | 14 | "Protocol-ID", "amqp.init.id", |
13530 | 14 | FT_UINT8, BASE_DEC, NULL, 0, |
13531 | 14 | NULL, HFILL}}, |
13532 | 14 | {&hf_amqp_init_version_major, { |
13533 | 14 | "Version Major", "amqp.init.version_major", |
13534 | 14 | FT_UINT8, BASE_DEC, NULL, 0, |
13535 | 14 | "Protocol version major", HFILL}}, |
13536 | 14 | {&hf_amqp_init_version_minor, { |
13537 | 14 | "Version Minor", "amqp.init.version_minor", |
13538 | 14 | FT_UINT8, BASE_DEC, NULL, 0, |
13539 | 14 | "Protocol version minor", HFILL}}, |
13540 | 14 | {&hf_amqp_init_version_revision, { |
13541 | 14 | "Version-Revision", "amqp.init.version_revision", |
13542 | 14 | FT_UINT8, BASE_DEC, NULL, 0, |
13543 | 14 | "Protocol version revision", HFILL}}, |
13544 | 14 | {&hf_amqp_message_in, { |
13545 | 14 | "Message in frame", "amqp.message_in", |
13546 | 14 | FT_FRAMENUM, BASE_NONE, NULL, 0, |
13547 | 14 | NULL, HFILL}}, |
13548 | 14 | {&hf_amqp_ack_in, { |
13549 | 14 | "Ack in frame", "amqp.ack_in", |
13550 | 14 | FT_FRAMENUM, BASE_NONE, NULL, 0, |
13551 | 14 | NULL, HFILL}}, |
13552 | 14 | {&hf_amqp_method_connection_start_server_properties_size, { |
13553 | 14 | "Size", "amqp.method.connection_start.server_properties.size", |
13554 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
13555 | 14 | NULL, HFILL}}, |
13556 | 14 | {&hf_amqp_0_10_method_connection_start_mechanisms_size, { |
13557 | 14 | "Size", "amqp.method.connection_start.server_properties.size", |
13558 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
13559 | 14 | NULL, HFILL}}, |
13560 | 14 | {&hf_amqp_0_10_method_connection_start_locales_size, { |
13561 | 14 | "Size", "amqp.method.connection_start.locales.size", |
13562 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
13563 | 14 | NULL, HFILL}}, |
13564 | 14 | {&hf_amqp_method_connection_start_ok_client_properties_size, { |
13565 | 14 | "Size", "amqp.method.connection_start.ok_client_properties.size", |
13566 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
13567 | 14 | NULL, HFILL}}, |
13568 | 14 | {&hf_amqp_0_10_method_connection_open_capabilities_size, { |
13569 | 14 | "Size", "amqp.method.connection_open.capabilities.size", |
13570 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
13571 | 14 | NULL, HFILL}}, |
13572 | 14 | {&hf_amqp_0_10_method_connection_open_ok_known_hosts_size, { |
13573 | 14 | "Size", "amqp.method.connection_open.ok_known_hosts.size", |
13574 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
13575 | 14 | NULL, HFILL}}, |
13576 | 14 | {&hf_amqp_0_10_method_connection_redirect_known_hosts_size, { |
13577 | 14 | "Size", "amqp.method.connection_redirect.known_hosts.size", |
13578 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
13579 | 14 | NULL, HFILL}}, |
13580 | 14 | {&hf_amqp_0_10_method_execution_error_info_size, { |
13581 | 14 | "Size", "amqp.method.execution.error_info.size", |
13582 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
13583 | 14 | NULL, HFILL}}, |
13584 | 14 | {&hf_amqp_0_10_method_exchange_declare_arguments_size, { |
13585 | 14 | "Size", "amqp.method.exchange.declare_argument.size", |
13586 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
13587 | 14 | NULL, HFILL}}, |
13588 | 14 | {&hf_amqp_0_10_method_queue_declare_arguments_size, { |
13589 | 14 | "Size", "amqp.method.queue.declare_argument.size", |
13590 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
13591 | 14 | NULL, HFILL}}, |
13592 | 14 | {&hf_amqp_0_10_method_file_consume_arguments_size, { |
13593 | 14 | "Size", "amqp.method.file.consume_arguments.size", |
13594 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
13595 | 14 | NULL, HFILL}}, |
13596 | 14 | {&hf_amqp_0_10_method_stream_consume_arguments_size, { |
13597 | 14 | "Size", "amqp.method.stream.consume_arguments.size", |
13598 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
13599 | 14 | NULL, HFILL}}, |
13600 | 14 | {&hf_amqp_0_10_struct_message_properties_application_headers_size, { |
13601 | 14 | "Size", "amqp.struct.message_properties.application_headers.size", |
13602 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
13603 | 14 | NULL, HFILL}}, |
13604 | 14 | {&hf_amqp_0_10_struct_file_properties_headers_size, { |
13605 | 14 | "Size", "amqp.struct.file.properties_headers.size", |
13606 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
13607 | 14 | NULL, HFILL}}, |
13608 | 14 | {&hf_amqp_0_10_struct_stream_properties_headers_size, { |
13609 | 14 | "Size", "amqp.struct.stream.properties_headers.size", |
13610 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
13611 | 14 | NULL, HFILL}}, |
13612 | 14 | {&hf_amqp_0_10_struct_dtx_recover_result_size, { |
13613 | 14 | "Size", "amqp.struct.dtx_recover.result.size", |
13614 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
13615 | 14 | NULL, HFILL}}, |
13616 | 14 | }; |
13617 | | |
13618 | | /* Setup of protocol subtree array */ |
13619 | | |
13620 | 14 | static int *ett [] = { |
13621 | 14 | &ett_amqp, |
13622 | 14 | &ett_header, |
13623 | 14 | &ett_args, |
13624 | 14 | &ett_props, |
13625 | 14 | &ett_field_table, |
13626 | 14 | &ett_amqp_init, |
13627 | 14 | &ett_amqp_0_9_field, |
13628 | 14 | &ett_amqp_0_10_map, |
13629 | 14 | &ett_amqp_0_10_array, |
13630 | 14 | &ett_amqp_0_10_struct, |
13631 | 14 | &ett_amqp_1_0_array, |
13632 | 14 | &ett_amqp_1_0_map, |
13633 | 14 | &ett_amqp_1_0_list |
13634 | 14 | }; |
13635 | | |
13636 | 14 | static ei_register_info ei[] = { |
13637 | 14 | { &ei_amqp_connection_error, { "amqp.connection.error", PI_RESPONSE_CODE, PI_WARN, "Connection error", EXPFILL }}, |
13638 | 14 | { &ei_amqp_channel_error, { "amqp.channel.error", PI_RESPONSE_CODE, PI_WARN, "Channel error", EXPFILL }}, |
13639 | 14 | { &ei_amqp_message_undeliverable, { "amqp.message.undeliverable", PI_RESPONSE_CODE, PI_WARN, "Message was not delivered", EXPFILL }}, |
13640 | 14 | { &ei_amqp_bad_flag_value, { "amqp.bad_flag_value", PI_PROTOCOL, PI_WARN, "Bad flag value", EXPFILL }}, |
13641 | 14 | { &ei_amqp_bad_length, { "amqp.bad_length", PI_MALFORMED, PI_ERROR, "Bad frame length", EXPFILL }}, |
13642 | 14 | { &ei_amqp_field_short, { "amqp.field_short", PI_PROTOCOL, PI_ERROR, "Field is cut off by the end of the field table", EXPFILL }}, |
13643 | 14 | { &ei_amqp_invalid_class_code, { "amqp.unknown.class_code", PI_PROTOCOL, PI_WARN, "Invalid class code", EXPFILL }}, |
13644 | 14 | { &ei_amqp_unknown_command_class, { "amqp.unknown.command_class", PI_PROTOCOL, PI_ERROR, "Unknown command/control class", EXPFILL }}, |
13645 | 14 | { &ei_amqp_unknown_frame_type, { "amqp.unknown.frame_type", PI_PROTOCOL, PI_ERROR, "Unknown frame type", EXPFILL }}, |
13646 | 14 | { &ei_amqp_unknown_connection_method, { "amqp.unknown.method.connection", PI_PROTOCOL, PI_ERROR, "Unknown connection method", EXPFILL }}, |
13647 | 14 | { &ei_amqp_unknown_channel_method, { "amqp.unknown.method.channel", PI_PROTOCOL, PI_ERROR, "Unknown channel method", EXPFILL }}, |
13648 | 14 | { &ei_amqp_unknown_access_method, { "amqp.unknown.method.access", PI_PROTOCOL, PI_ERROR, "Unknown access method", EXPFILL }}, |
13649 | 14 | { &ei_amqp_unknown_exchange_method, { "amqp.unknown.method.exchange", PI_PROTOCOL, PI_ERROR, "Unknown exchange method", EXPFILL }}, |
13650 | 14 | { &ei_amqp_unknown_queue_method, { "amqp.unknown.method.queue", PI_PROTOCOL, PI_ERROR, "Unknown queue method", EXPFILL }}, |
13651 | 14 | { &ei_amqp_unknown_basic_method, { "amqp.unknown.method.basic", PI_PROTOCOL, PI_ERROR, "Unknown basic method", EXPFILL }}, |
13652 | 14 | { &ei_amqp_unknown_file_method, { "amqp.unknown.method.file", PI_PROTOCOL, PI_ERROR, "Unknown file method", EXPFILL }}, |
13653 | 14 | { &ei_amqp_unknown_stream_method, { "amqp.unknown.method.stream", PI_PROTOCOL, PI_ERROR, "Unknown stream method", EXPFILL }}, |
13654 | 14 | { &ei_amqp_unknown_tx_method, { "amqp.unknown.method.tx", PI_PROTOCOL, PI_ERROR, "Unknown tx method", EXPFILL }}, |
13655 | 14 | { &ei_amqp_unknown_dtx_method, { "amqp.unknown.method.dtx", PI_PROTOCOL, PI_ERROR, "Unknown dtx method", EXPFILL }}, |
13656 | 14 | { &ei_amqp_unknown_tunnel_method, { "amqp.unknown.method.tunnel", PI_PROTOCOL, PI_ERROR, "Unknown tunnel method", EXPFILL }}, |
13657 | 14 | { &ei_amqp_unknown_confirm_method, { "amqp.unknown.method.confirm", PI_PROTOCOL, PI_ERROR, "Unknown confirm method", EXPFILL }}, |
13658 | 14 | { &ei_amqp_unknown_method_class, { "amqp.unknown.method.class", PI_PROTOCOL, PI_ERROR, "Unknown method class", EXPFILL }}, |
13659 | 14 | { &ei_amqp_unknown_header_class, { "amqp.unknown.header_class", PI_PROTOCOL, PI_ERROR, "Unknown header class", EXPFILL }}, |
13660 | 14 | { &ei_amqp_unknown_sasl_command, { "amqp.unknown.sasl_command", PI_PROTOCOL, PI_ERROR, "Unknown SASL command", EXPFILL }}, |
13661 | 14 | { &ei_amqp_unknown_amqp_command, { "amqp.unknown.amqp_command", PI_PROTOCOL, PI_ERROR, "Unknown AMQP command", EXPFILL }}, |
13662 | 14 | { &ei_amqp_unknown_amqp_type, { "amqp.unknown.amqp_type", PI_PROTOCOL, PI_ERROR, "Unknown AMQP type", EXPFILL }}, |
13663 | 14 | { &ei_amqp_invalid_number_of_params, { "amqp.invalid.params_number", PI_PROTOCOL, PI_ERROR, "Invalid number of parameters", EXPFILL }}, |
13664 | 14 | { &ei_amqp_size_exceeds_65K, { "amqp.size_exceeds_65K", PI_PROTOCOL, PI_WARN, "Size field exceeds 65K; Dissection limited to 65K", EXPFILL}}, |
13665 | 14 | { &ei_amqp_array_type_unknown, { "amqp.array_type_unknown", PI_PROTOCOL, PI_WARN, "Array type unknown", EXPFILL}}, |
13666 | 14 | }; |
13667 | | |
13668 | | |
13669 | 14 | static uat_field_t amqp_message_decode_flds[] = { |
13670 | 14 | UAT_FLD_VS(message_decode, match_criteria, "Match criteria", match_criteria, "Match criteria"), |
13671 | 14 | UAT_FLD_CSTRING(message_decode, topic_pattern, "Topic pattern", "Pattern to match for the topic"), |
13672 | 14 | UAT_FLD_DISSECTOR(message_decode, payload_proto, "Payload dissector", |
13673 | 14 | "Dissector to be used for the message part of the matching topic"), |
13674 | 14 | UAT_FLD_CSTRING(message_decode, topic_more_info, "Additional Data", "Additional Data to pass to the dissector"), |
13675 | 14 | UAT_END_FIELDS |
13676 | 14 | }; |
13677 | | |
13678 | 14 | uat_t *message_uat = uat_new("Message Decoding", |
13679 | 14 | sizeof(amqp_message_decode_t), |
13680 | 14 | "amqp_message_decoding", |
13681 | 14 | true, |
13682 | 14 | &amqp_message_decodes, |
13683 | 14 | &num_amqp_message_decodes, |
13684 | 14 | UAT_AFFECTS_DISSECTION, /* affects dissection of packets, but not set of named fields */ |
13685 | 14 | "ChamqpMessageDecoding", |
13686 | 14 | amqp_message_decode_copy_cb, |
13687 | 14 | amqp_message_decode_update_cb, |
13688 | 14 | amqp_message_decode_free_cb, |
13689 | 14 | NULL, |
13690 | 14 | NULL, |
13691 | 14 | amqp_message_decode_flds); |
13692 | | |
13693 | | |
13694 | 14 | expert_module_t* expert_amqp; |
13695 | 14 | module_t *amqp_module; |
13696 | | |
13697 | | /* Decode As handling */ |
13698 | 14 | static build_valid_func amqp_da_build_value[1] = {amqp_value}; |
13699 | 14 | static decode_as_value_t amqp_da_values = {amqp_prompt, 1, amqp_da_build_value}; |
13700 | 14 | static decode_as_t amqp_da = {"amqp", "amqp.version", 1, 0, &amqp_da_values, NULL, NULL, |
13701 | 14 | decode_as_default_populate_list, decode_as_default_reset, decode_as_default_change, NULL}; |
13702 | | |
13703 | 14 | proto_amqp = proto_register_protocol("Advanced Message Queuing Protocol", "AMQP", "amqp"); |
13704 | | |
13705 | | /* Allows versions to be handled through Decode As */ |
13706 | 14 | proto_amqpv0_9 = proto_register_protocol_in_name_only("AMQP Version 0.9", "Version 0.9", "amqp.version.v0_9", proto_amqp, FT_BYTES); |
13707 | 14 | proto_amqpv0_10 = proto_register_protocol_in_name_only("AMQP Version 0.10", "Version 0.10", "amqp.version.v0_10", proto_amqp, FT_BYTES); |
13708 | 14 | proto_amqpv1_0 = proto_register_protocol_in_name_only("AMQP Version 1.0", "Version 1.0", "amqp.version.v1_0", proto_amqp, FT_BYTES); |
13709 | | |
13710 | 14 | amqp_tcp_handle = register_dissector("amqp", dissect_amqp, proto_amqp); |
13711 | 14 | proto_register_field_array(proto_amqp, hf, array_length(hf)); |
13712 | 14 | proto_register_subtree_array(ett, array_length(ett)); |
13713 | | |
13714 | 14 | expert_amqp = expert_register_protocol(proto_amqp); |
13715 | 14 | expert_register_field_array(expert_amqp, ei, array_length(ei)); |
13716 | | |
13717 | 14 | version_table = register_dissector_table("amqp.version", "AMQP versions", proto_amqp, FT_UINT8, BASE_DEC); |
13718 | | |
13719 | 14 | amqp_module = prefs_register_protocol(proto_amqp, proto_reg_handoff_amqp); |
13720 | | |
13721 | 14 | prefs_register_uint_preference(amqp_module, "tls.port", |
13722 | 14 | "AMQPS listening TCP Port", |
13723 | 14 | "Set the TCP port for AMQP over SSL/TLS" |
13724 | 14 | "(if other than the default of 5671)", |
13725 | 14 | 10, &amqps_port); |
13726 | 14 | prefs_register_obsolete_preference(amqp_module, "ssl.port"); |
13727 | | |
13728 | 14 | register_decode_as(&amqp_da); |
13729 | | |
13730 | 14 | prefs_register_uat_preference(amqp_module, "message_decode_table", |
13731 | 14 | "Message Decoding", |
13732 | 14 | "A table that enumerates custom message decodes to be used for a certain topic", |
13733 | 14 | message_uat); |
13734 | 14 | } |
13735 | | |
13736 | | void |
13737 | | proto_reg_handoff_amqp(void) |
13738 | 14 | { |
13739 | 14 | static unsigned old_amqps_port = 0; |
13740 | 14 | static bool initialize = false; |
13741 | | |
13742 | 14 | if (!initialize) { |
13743 | | /* Register TCP port for dissection */ |
13744 | 14 | dissector_add_uint_with_preference("tcp.port", AMQP_PORT, amqp_tcp_handle); |
13745 | | |
13746 | 14 | dissector_add_uint("amqp.version", AMQP_V0_9, create_dissector_handle( dissect_amqpv0_9, proto_amqpv0_9 )); |
13747 | 14 | dissector_add_uint("amqp.version", AMQP_V0_10, create_dissector_handle( dissect_amqpv0_10, proto_amqpv0_10 )); |
13748 | 14 | dissector_add_uint("amqp.version", AMQP_V1_0, create_dissector_handle( dissect_amqpv1_0, proto_amqpv1_0 )); |
13749 | | |
13750 | 14 | media_type_subdissector_table = find_dissector_table ("media_type"); |
13751 | | |
13752 | 14 | initialize = true; |
13753 | 14 | } |
13754 | | |
13755 | | /* Register for SSL/TLS payload dissection */ |
13756 | 14 | if (old_amqps_port != amqps_port) { |
13757 | 14 | if (old_amqps_port != 0) |
13758 | 0 | ssl_dissector_delete(old_amqps_port, amqp_tcp_handle); |
13759 | 14 | ssl_dissector_add(amqps_port, amqp_tcp_handle); |
13760 | 14 | old_amqps_port = amqps_port; |
13761 | 14 | } |
13762 | 14 | } |
13763 | | |
13764 | | /* |
13765 | | * Editor modelines - https://www.wireshark.org/tools/modelines.html |
13766 | | * |
13767 | | * Local variables: |
13768 | | * c-basic-offset: 4 |
13769 | | * tab-width: 8 |
13770 | | * indent-tabs-mode: nil |
13771 | | * End: |
13772 | | * |
13773 | | * vi: set shiftwidth=4 tabstop=8 expandtab: |
13774 | | * :indentSize=4:tabSize=8:noTabs=true: |
13775 | | */ |