/src/wireshark/epan/dissectors/packet-xmpp.c
Line | Count | Source (jump to first uncovered line) |
1 | | /* packet-xmpp.c |
2 | | * Wireshark's XMPP dissector. |
3 | | * |
4 | | * Copyright 2011, Mariusz Okroj <okrojmariusz[]gmail.com> |
5 | | * |
6 | | * Wireshark - Network traffic analyzer |
7 | | * By Gerald Combs <gerald@wireshark.org> |
8 | | * Copyright 1998 Gerald Combs |
9 | | * |
10 | | * SPDX-License-Identifier: GPL-2.0-or-later |
11 | | */ |
12 | | |
13 | | #include "config.h" |
14 | | |
15 | | |
16 | | #include <epan/packet.h> |
17 | | #include <epan/conversation.h> |
18 | | #include <epan/prefs.h> |
19 | | #include <epan/proto_data.h> |
20 | | #include <epan/exceptions.h> |
21 | | |
22 | | #include "packet-xmpp.h" |
23 | | #include "packet-xmpp-core.h" |
24 | | |
25 | 14 | #define XMPP_PORT 5222 |
26 | | |
27 | | void proto_register_xmpp(void); |
28 | | void proto_reg_handoff_xmpp(void); |
29 | | |
30 | | int proto_xmpp; |
31 | | |
32 | | static bool xmpp_desegment = true; |
33 | | |
34 | | int hf_xmpp_xmlns; |
35 | | int hf_xmpp_id; |
36 | | int hf_xmpp_from; |
37 | | int hf_xmpp_to; |
38 | | int hf_xmpp_type; |
39 | | int hf_xmpp_cdata; |
40 | | int hf_xmpp_attribute; |
41 | | |
42 | | int hf_xmpp_iq; |
43 | | |
44 | | int hf_xmpp_query; |
45 | | int hf_xmpp_query_node; |
46 | | |
47 | | int hf_xmpp_query_item; |
48 | | int hf_xmpp_query_item_jid; |
49 | | int hf_xmpp_query_item_name; |
50 | | int hf_xmpp_query_item_subscription; |
51 | | int hf_xmpp_query_item_ask; |
52 | | int hf_xmpp_query_item_group; |
53 | | int hf_xmpp_query_item_node; |
54 | | int hf_xmpp_query_item_approved; |
55 | | |
56 | | int hf_xmpp_query_identity; |
57 | | int hf_xmpp_query_identity_category; |
58 | | int hf_xmpp_query_identity_type; |
59 | | int hf_xmpp_query_identity_name; |
60 | | static int hf_xmpp_query_identity_lang; |
61 | | |
62 | | int hf_xmpp_query_feature; |
63 | | |
64 | | int hf_xmpp_query_streamhost; |
65 | | int hf_xmpp_query_streamhost_used; |
66 | | int hf_xmpp_query_activate; |
67 | | int hf_xmpp_query_udpsuccess; |
68 | | |
69 | | int hf_xmpp_error; |
70 | | int hf_xmpp_error_type; |
71 | | int hf_xmpp_error_code; |
72 | | int hf_xmpp_error_condition; |
73 | | int hf_xmpp_error_text; |
74 | | |
75 | | int hf_xmpp_iq_bind; |
76 | | int hf_xmpp_iq_bind_jid; |
77 | | int hf_xmpp_iq_bind_resource; |
78 | | |
79 | | int hf_xmpp_services; |
80 | | int hf_xmpp_channel; |
81 | | |
82 | | int hf_xmpp_iq_session; |
83 | | int hf_xmpp_stream; |
84 | | int hf_xmpp_features; |
85 | | |
86 | | int hf_xmpp_vcard; |
87 | | int hf_xmpp_vcard_x_update; |
88 | | |
89 | | int hf_xmpp_jingle; |
90 | | int hf_xmpp_jingle_sid; |
91 | | int hf_xmpp_jingle_initiator; |
92 | | int hf_xmpp_jingle_responder; |
93 | | int hf_xmpp_jingle_action; |
94 | | |
95 | | int hf_xmpp_jingle_content; |
96 | | int hf_xmpp_jingle_content_creator; |
97 | | int hf_xmpp_jingle_content_name; |
98 | | int hf_xmpp_jingle_content_disposition; |
99 | | int hf_xmpp_jingle_content_senders; |
100 | | |
101 | | int hf_xmpp_jingle_content_description; |
102 | | int hf_xmpp_jingle_content_description_media; |
103 | | int hf_xmpp_jingle_content_description_ssrc; |
104 | | |
105 | | int hf_xmpp_jingle_cont_desc_payload; |
106 | | int hf_xmpp_jingle_cont_desc_payload_id; |
107 | | int hf_xmpp_jingle_cont_desc_payload_channels; |
108 | | int hf_xmpp_jingle_cont_desc_payload_clockrate; |
109 | | int hf_xmpp_jingle_cont_desc_payload_maxptime; |
110 | | int hf_xmpp_jingle_cont_desc_payload_name; |
111 | | int hf_xmpp_jingle_cont_desc_payload_ptime; |
112 | | |
113 | | int hf_xmpp_jingle_cont_desc_payload_param; |
114 | | int hf_xmpp_jingle_cont_desc_payload_param_value; |
115 | | int hf_xmpp_jingle_cont_desc_payload_param_name; |
116 | | |
117 | | int hf_xmpp_jingle_cont_desc_enc; |
118 | | int hf_xmpp_jingle_cont_desc_enc_zrtp_hash; |
119 | | int hf_xmpp_jingle_cont_desc_enc_crypto; |
120 | | |
121 | | int hf_xmpp_jingle_cont_desc_rtp_hdr; |
122 | | int hf_xmpp_jingle_cont_desc_bandwidth; |
123 | | |
124 | | int hf_xmpp_jingle_cont_trans; |
125 | | int hf_xmpp_jingle_cont_trans_pwd; |
126 | | int hf_xmpp_jingle_cont_trans_ufrag; |
127 | | |
128 | | int hf_xmpp_jingle_cont_trans_cand; |
129 | | int hf_xmpp_jingle_cont_trans_rem_cand; |
130 | | int hf_xmpp_jingle_cont_trans_activated; |
131 | | int hf_xmpp_jingle_cont_trans_candidate_error; |
132 | | int hf_xmpp_jingle_cont_trans_candidate_used; |
133 | | int hf_xmpp_jingle_cont_trans_proxy_error; |
134 | | |
135 | | |
136 | | int hf_xmpp_jingle_reason; |
137 | | int hf_xmpp_jingle_reason_condition; |
138 | | int hf_xmpp_jingle_reason_text; |
139 | | |
140 | | int hf_xmpp_jingle_rtp_info; |
141 | | |
142 | | int hf_xmpp_jingle_file_transfer_offer; |
143 | | int hf_xmpp_jingle_file_transfer_request; |
144 | | int hf_xmpp_jingle_file_transfer_received; |
145 | | int hf_xmpp_jingle_file_transfer_abort; |
146 | | int hf_xmpp_jingle_file_transfer_checksum; |
147 | | |
148 | | int hf_xmpp_si; |
149 | | int hf_xmpp_si_file; |
150 | | |
151 | | int hf_xmpp_iq_feature_neg; |
152 | | int hf_xmpp_x_data; |
153 | | int hf_xmpp_x_data_field; |
154 | | int hf_xmpp_x_data_field_value; |
155 | | int hf_xmpp_x_data_instructions; |
156 | | int hf_xmpp_muc_user_status; |
157 | | |
158 | | int hf_xmpp_message; |
159 | | int hf_xmpp_message_chatstate; |
160 | | |
161 | | int hf_xmpp_message_thread; |
162 | | int hf_xmpp_message_thread_parent; |
163 | | |
164 | | int hf_xmpp_message_body; |
165 | | int hf_xmpp_message_subject; |
166 | | |
167 | | int hf_xmpp_ibb_open; |
168 | | int hf_xmpp_ibb_close; |
169 | | int hf_xmpp_ibb_data; |
170 | | |
171 | | int hf_xmpp_delay; |
172 | | |
173 | | int hf_xmpp_x_event; |
174 | | int hf_xmpp_x_event_condition; |
175 | | |
176 | | int hf_xmpp_presence; |
177 | | int hf_xmpp_presence_show; |
178 | | int hf_xmpp_presence_status; |
179 | | int hf_xmpp_presence_caps; |
180 | | |
181 | | int hf_xmpp_auth; |
182 | | int hf_xmpp_failure; |
183 | | int hf_xmpp_failure_text; |
184 | | int hf_xmpp_starttls; |
185 | | int hf_xmpp_proceed; |
186 | | int hf_xmpp_xml_header_version; |
187 | | int hf_xmpp_stream_end; |
188 | | |
189 | | int hf_xmpp_muc_x; |
190 | | int hf_xmpp_muc_user_x; |
191 | | int hf_xmpp_muc_user_item; |
192 | | int hf_xmpp_muc_user_invite; |
193 | | |
194 | | int hf_xmpp_gtalk_session; |
195 | | int hf_xmpp_gtalk_session_type; |
196 | | int hf_xmpp_gtalk; |
197 | | int hf_xmpp_gtalk_setting; |
198 | | int hf_xmpp_gtalk_setting_element; |
199 | | int hf_xmpp_gtalk_nosave_x; |
200 | | int hf_xmpp_gtalk_mail_mailbox; |
201 | | int hf_xmpp_gtalk_mail_new_mail; |
202 | | int hf_xmpp_gtalk_transport_p2p; |
203 | | int hf_xmpp_gtalk_mail_snippet; |
204 | | int hf_xmpp_gtalk_status_status_list; |
205 | | |
206 | | int hf_xmpp_conf_info; |
207 | | int hf_xmpp_conf_info_sid; |
208 | | |
209 | | int hf_xmpp_unknown; |
210 | | int hf_xmpp_unknown_attr; |
211 | | |
212 | | static int hf_xmpp_out; |
213 | | static int hf_xmpp_in; |
214 | | int hf_xmpp_response_in; |
215 | | int hf_xmpp_response_to; |
216 | | int hf_xmpp_jingle_session; |
217 | | int hf_xmpp_ibb; |
218 | | |
219 | | int hf_xmpp_ping; |
220 | | int hf_xmpp_hashes; |
221 | | |
222 | | int hf_xmpp_jitsi_inputevt; |
223 | | int hf_xmpp_jitsi_inputevt_rmt_ctrl; |
224 | | |
225 | | static int ett_xmpp; |
226 | | int ett_xmpp_iq; |
227 | | int ett_xmpp_query; |
228 | | int ett_xmpp_query_item; |
229 | | int ett_xmpp_query_identity; |
230 | | static int ett_xmpp_query_feature; |
231 | | |
232 | | int ett_xmpp_query_streamhost; |
233 | | int ett_xmpp_query_streamhost_used; |
234 | | int ett_xmpp_query_udpsuccess; |
235 | | |
236 | | static int ett_xmpp_iq_error; |
237 | | int ett_xmpp_iq_bind; |
238 | | int ett_xmpp_iq_session; |
239 | | int ett_xmpp_vcard; |
240 | | int ett_xmpp_vcard_x_update; |
241 | | |
242 | | int ett_xmpp_jingle; |
243 | | int ett_xmpp_jingle_content; |
244 | | int ett_xmpp_jingle_content_description; |
245 | | int ett_xmpp_jingle_cont_desc_enc; |
246 | | int ett_xmpp_jingle_cont_desc_enc_zrtp_hash; |
247 | | int ett_xmpp_jingle_cont_desc_enc_crypto; |
248 | | int ett_xmpp_jingle_cont_desc_rtp_hdr; |
249 | | int ett_xmpp_jingle_cont_desc_bandwidth; |
250 | | int ett_xmpp_jingle_cont_desc_payload; |
251 | | int ett_xmpp_jingle_cont_desc_payload_param; |
252 | | int ett_xmpp_jingle_cont_trans; |
253 | | int ett_xmpp_jingle_cont_trans_cand; |
254 | | int ett_xmpp_jingle_cont_trans_rem_cand; |
255 | | int ett_xmpp_jingle_reason; |
256 | | int ett_xmpp_jingle_rtp_info; |
257 | | |
258 | | int ett_xmpp_jingle_file_transfer_offer; |
259 | | int ett_xmpp_jingle_file_transfer_request; |
260 | | int ett_xmpp_jingle_file_transfer_abort; |
261 | | int ett_xmpp_jingle_file_transfer_received; |
262 | | int ett_xmpp_jingle_file_transfer_checksum; |
263 | | int ett_xmpp_jingle_file_transfer_file; |
264 | | |
265 | | int ett_xmpp_services; |
266 | | int ett_xmpp_services_relay; |
267 | | int ett_xmpp_channel; |
268 | | |
269 | | int ett_xmpp_si; |
270 | | int ett_xmpp_si_file; |
271 | | int ett_xmpp_si_file_range; |
272 | | |
273 | | int ett_xmpp_iq_feature_neg; |
274 | | int ett_xmpp_x_data; |
275 | | int ett_xmpp_x_data_field; |
276 | | int ett_xmpp_x_data_field_value; |
277 | | |
278 | | int ett_xmpp_ibb_open; |
279 | | int ett_xmpp_ibb_close; |
280 | | int ett_xmpp_ibb_data; |
281 | | |
282 | | int ett_xmpp_delay; |
283 | | |
284 | | int ett_xmpp_x_event; |
285 | | |
286 | | int ett_xmpp_message; |
287 | | int ett_xmpp_message_thread; |
288 | | int ett_xmpp_message_body; |
289 | | int ett_xmpp_message_subject; |
290 | | |
291 | | int ett_xmpp_presence; |
292 | | int ett_xmpp_presence_status; |
293 | | int ett_xmpp_presence_caps; |
294 | | |
295 | | int ett_xmpp_auth; |
296 | | static int ett_xmpp_challenge; |
297 | | static int ett_xmpp_response; |
298 | | static int ett_xmpp_success; |
299 | | int ett_xmpp_failure; |
300 | | int ett_xmpp_stream; |
301 | | int ett_xmpp_features; |
302 | | int ett_xmpp_features_mechanisms; |
303 | | int ett_xmpp_starttls; |
304 | | int ett_xmpp_proceed; |
305 | | |
306 | | int ett_xmpp_muc_x; |
307 | | int ett_xmpp_muc_hist; |
308 | | int ett_xmpp_muc_user_x; |
309 | | int ett_xmpp_muc_user_item; |
310 | | int ett_xmpp_muc_user_invite; |
311 | | |
312 | | int ett_xmpp_gtalk_session; |
313 | | int ett_xmpp_gtalk_session_desc; |
314 | | int ett_xmpp_gtalk_session_cand; |
315 | | int ett_xmpp_gtalk_session_desc_payload; |
316 | | int ett_xmpp_gtalk_session_reason; |
317 | | int ett_xmpp_gtalk_jingleinfo_stun; |
318 | | int ett_xmpp_gtalk_jingleinfo_server; |
319 | | int ett_xmpp_gtalk_jingleinfo_relay; |
320 | | int ett_xmpp_gtalk_jingleinfo_relay_serv; |
321 | | int ett_xmpp_gtalk_setting; |
322 | | int ett_xmpp_gtalk_nosave_x; |
323 | | int ett_xmpp_gtalk_mail_mailbox; |
324 | | int ett_xmpp_gtalk_mail_mail_info; |
325 | | int ett_xmpp_gtalk_mail_senders; |
326 | | int ett_xmpp_gtalk_mail_sender; |
327 | | int ett_xmpp_gtalk_status_status_list; |
328 | | int ett_xmpp_gtalk_transport_p2p; |
329 | | int ett_xmpp_gtalk_transport_p2p_cand; |
330 | | |
331 | | int ett_xmpp_conf_info; |
332 | | int ett_xmpp_conf_desc; |
333 | | int ett_xmpp_conf_state; |
334 | | int ett_xmpp_conf_users; |
335 | | int ett_xmpp_conf_user; |
336 | | int ett_xmpp_conf_endpoint; |
337 | | int ett_xmpp_conf_media; |
338 | | |
339 | | int ett_xmpp_ping; |
340 | | int ett_xmpp_hashes; |
341 | | int ett_xmpp_hashes_hash; |
342 | | |
343 | | int ett_xmpp_jitsi_inputevt; |
344 | | int ett_xmpp_jitsi_inputevt_rmt_ctrl; |
345 | | |
346 | | int ett_unknown[ETT_UNKNOWN_LEN]; |
347 | | |
348 | | static expert_field ei_xmpp_xml_disabled; |
349 | | static expert_field ei_xmpp_packet_unknown; |
350 | | expert_field ei_xmpp_starttls_missing; |
351 | | expert_field ei_xmpp_response; |
352 | | static expert_field ei_xmpp_challenge; |
353 | | static expert_field ei_xmpp_success; |
354 | | expert_field ei_xmpp_proceed_already_in_frame; |
355 | | expert_field ei_xmpp_starttls_already_in_frame; |
356 | | expert_field ei_xmpp_packet_without_response; |
357 | | expert_field ei_xmpp_unknown_element; |
358 | | expert_field ei_xmpp_field_unexpected_value; |
359 | | expert_field ei_xmpp_unknown_attribute; |
360 | | expert_field ei_xmpp_required_attribute; |
361 | | |
362 | | static dissector_handle_t xmpp_handle; |
363 | | |
364 | | static dissector_handle_t xml_handle; |
365 | | |
366 | | static void |
367 | 0 | cleanup_xmpp(void *user_data) { |
368 | |
|
369 | 0 | xmpp_element_t *root = (xmpp_element_t*)user_data; |
370 | |
|
371 | 0 | xmpp_element_t_tree_free(root); |
372 | 0 | } |
373 | | |
374 | | static int |
375 | 1 | dissect_xmpp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { |
376 | | |
377 | 1 | xml_frame_t *xml_frame; |
378 | 1 | xml_frame_t *xml_dissector_frame; |
379 | 1 | bool out_packet; |
380 | | |
381 | 1 | conversation_t *conversation; |
382 | 1 | xmpp_conv_info_t *xmpp_info; |
383 | | |
384 | 1 | proto_tree *xmpp_tree = NULL; |
385 | 1 | proto_item *xmpp_item = NULL; |
386 | 1 | proto_item *outin_item; |
387 | | |
388 | 1 | xmpp_element_t *packet = NULL; |
389 | | |
390 | 1 | int proto_xml = dissector_handle_get_protocol_index(xml_handle); |
391 | | |
392 | 1 | bool whitespace_keepalive = ((tvb_reported_length(tvb) == 1) && tvb_get_uint8(tvb, 0) == ' '); |
393 | | |
394 | | /*check if desegment |
395 | | * now it checks that last char is '>', |
396 | | * TODO checks that first element in packet is closed*/ |
397 | 1 | int indx; |
398 | 1 | char last_char; |
399 | | |
400 | 1 | if (xmpp_desegment && !whitespace_keepalive) |
401 | 1 | { |
402 | 1 | indx = tvb_reported_length(tvb) - 1; |
403 | 1 | if (indx >= 0) |
404 | 1 | { |
405 | 1 | last_char = tvb_get_uint8(tvb, indx); |
406 | | |
407 | 3 | while ((last_char <= ' ') && (indx - 1 >= 0)) |
408 | 2 | { |
409 | 2 | indx--; |
410 | 2 | last_char = tvb_get_uint8(tvb, indx); |
411 | 2 | } |
412 | | |
413 | 1 | if ((indx >= 0) && (last_char != '>')) |
414 | 1 | { |
415 | 1 | pinfo->desegment_len = DESEGMENT_ONE_MORE_SEGMENT; |
416 | 1 | return tvb_captured_length(tvb); |
417 | 1 | } |
418 | 1 | } |
419 | 1 | } |
420 | | |
421 | 0 | col_set_str(pinfo->cinfo, COL_PROTOCOL, "XMPP"); |
422 | 0 | col_clear(pinfo->cinfo, COL_INFO); |
423 | | |
424 | | /*if tree == NULL then xmpp_item and xmpp_tree will also NULL*/ |
425 | 0 | xmpp_item = proto_tree_add_item(tree, proto_xmpp, tvb, 0, -1, ENC_NA); |
426 | 0 | xmpp_tree = proto_item_add_subtree(xmpp_item, ett_xmpp); |
427 | |
|
428 | 0 | if (whitespace_keepalive) { |
429 | | /* RFC 6120 section 4.6.1 */ |
430 | 0 | col_set_str(pinfo->cinfo, COL_INFO, "Whitespace Keepalive"); |
431 | 0 | return tvb_captured_length(tvb); |
432 | 0 | } |
433 | | |
434 | 0 | call_dissector_with_data(xml_handle, tvb, pinfo, xmpp_tree, NULL); |
435 | | |
436 | | /* If XML dissector is disabled, we can't do much */ |
437 | 0 | if (!proto_is_protocol_enabled(find_protocol_by_id(proto_xml))) |
438 | 0 | { |
439 | 0 | col_append_str(pinfo->cinfo, COL_INFO, "(XML dissector disabled, can't dissect XMPP)"); |
440 | 0 | expert_add_info(pinfo, xmpp_item, &ei_xmpp_xml_disabled); |
441 | 0 | return tvb_captured_length(tvb); |
442 | 0 | } |
443 | | |
444 | | /*if stream end occurs then return*/ |
445 | 0 | if(xmpp_stream_close(xmpp_tree,tvb, pinfo)) |
446 | 0 | { |
447 | 0 | if(xmpp_tree) |
448 | 0 | xmpp_proto_tree_hide_first_child(xmpp_tree); |
449 | 0 | return tvb_captured_length(tvb); |
450 | 0 | } |
451 | | |
452 | 0 | xml_dissector_frame = (xml_frame_t *)p_get_proto_data(pinfo->pool, pinfo, proto_xml, 0); |
453 | 0 | if(xml_dissector_frame == NULL) |
454 | 0 | return tvb_captured_length(tvb); |
455 | | |
456 | | /*data from XML dissector*/ |
457 | 0 | xml_frame = xml_dissector_frame->first_child; |
458 | |
|
459 | 0 | if(!xml_frame) |
460 | 0 | return tvb_captured_length(tvb); |
461 | | |
462 | 0 | conversation = find_or_create_conversation(pinfo); |
463 | 0 | xmpp_info = (xmpp_conv_info_t *)conversation_get_proto_data(conversation, proto_xmpp); |
464 | |
|
465 | 0 | if (!xmpp_info) { |
466 | 0 | xmpp_info = wmem_new(wmem_file_scope(), xmpp_conv_info_t); |
467 | 0 | xmpp_info->req_resp = wmem_tree_new(wmem_file_scope()); |
468 | 0 | xmpp_info->jingle_sessions = wmem_tree_new(wmem_file_scope()); |
469 | 0 | xmpp_info->ibb_sessions = wmem_tree_new(wmem_file_scope()); |
470 | 0 | xmpp_info->gtalk_sessions = wmem_tree_new(wmem_file_scope()); |
471 | 0 | xmpp_info->ssl_start = 0; |
472 | 0 | conversation_add_proto_data(conversation, proto_xmpp, (void *) xmpp_info); |
473 | 0 | } |
474 | |
|
475 | 0 | if (pinfo->match_uint == pinfo->destport) |
476 | 0 | out_packet = true; |
477 | 0 | else |
478 | 0 | out_packet = false; |
479 | |
|
480 | 0 | while(xml_frame) |
481 | 0 | { |
482 | 0 | packet = xmpp_xml_frame_to_element_t(pinfo, xml_frame, NULL, tvb); |
483 | 0 | DISSECTOR_ASSERT(packet); |
484 | 0 | CLEANUP_PUSH(cleanup_xmpp, packet); |
485 | |
|
486 | 0 | if (strcmp(packet->name, "iq") == 0) { |
487 | 0 | xmpp_iq_reqresp_track(pinfo, packet, xmpp_info); |
488 | 0 | xmpp_jingle_session_track(pinfo, packet, xmpp_info); |
489 | 0 | xmpp_gtalk_session_track(pinfo, packet, xmpp_info); |
490 | 0 | } |
491 | |
|
492 | 0 | if (strcmp(packet->name, "iq") == 0 || strcmp(packet->name, "message") == 0) { |
493 | 0 | xmpp_ibb_session_track(pinfo, packet, xmpp_info); |
494 | 0 | } |
495 | |
|
496 | 0 | if (out_packet) |
497 | 0 | outin_item = proto_tree_add_boolean(xmpp_tree, hf_xmpp_out, tvb, 0, 0, true); |
498 | 0 | else |
499 | 0 | outin_item = proto_tree_add_boolean(xmpp_tree, hf_xmpp_in, tvb, 0, 0, true); |
500 | |
|
501 | 0 | proto_item_set_hidden(outin_item); |
502 | | |
503 | | |
504 | | /*it hides tree generated by XML dissector*/ |
505 | 0 | xmpp_proto_tree_hide_first_child(xmpp_tree); |
506 | |
|
507 | 0 | if (strcmp(packet->name, "iq") == 0) { |
508 | 0 | xmpp_iq(xmpp_tree, tvb, pinfo, packet); |
509 | 0 | } else if (strcmp(packet->name, "presence") == 0) { |
510 | 0 | xmpp_presence(xmpp_tree, tvb, pinfo, packet); |
511 | 0 | } else if (strcmp(packet->name, "message") == 0) { |
512 | 0 | xmpp_message(xmpp_tree, tvb, pinfo, packet); |
513 | 0 | } else if (strcmp(packet->name, "auth") == 0) { |
514 | 0 | xmpp_auth(xmpp_tree, tvb, pinfo, packet); |
515 | 0 | } else if (strcmp(packet->name, "challenge") == 0) { |
516 | 0 | xmpp_challenge_response_success(xmpp_tree, tvb, pinfo, packet, &ei_xmpp_challenge, ett_xmpp_challenge, "CHALLENGE"); |
517 | 0 | } else if (strcmp(packet->name, "response") == 0) { |
518 | 0 | xmpp_challenge_response_success(xmpp_tree, tvb, pinfo, packet, &ei_xmpp_response, ett_xmpp_response, "RESPONSE"); |
519 | 0 | } else if (strcmp(packet->name, "success") == 0) { |
520 | 0 | xmpp_challenge_response_success(xmpp_tree, tvb, pinfo, packet, &ei_xmpp_success, ett_xmpp_success, "SUCCESS"); |
521 | 0 | } else if (strcmp(packet->name, "failure") == 0) { |
522 | 0 | xmpp_failure(xmpp_tree, tvb, pinfo, packet); |
523 | 0 | } else if (strcmp(packet->name, "xml") == 0) { |
524 | 0 | xmpp_xml_header(xmpp_tree, tvb, pinfo, packet); |
525 | 0 | } else if (strcmp(packet->name, "stream") == 0) { |
526 | 0 | xmpp_stream(xmpp_tree, tvb, pinfo, packet); |
527 | 0 | } else if (strcmp(packet->name, "features") == 0) { |
528 | 0 | xmpp_features(xmpp_tree, tvb, pinfo, packet); |
529 | 0 | } else if (strcmp(packet->name, "starttls") == 0) { |
530 | 0 | xmpp_starttls(xmpp_tree, tvb, pinfo, packet, xmpp_info); |
531 | 0 | } else if (strcmp(packet->name, "proceed") == 0) { |
532 | 0 | xmpp_proceed(xmpp_tree, tvb, pinfo, packet, xmpp_info); |
533 | 0 | } else { |
534 | 0 | xmpp_proto_tree_show_first_child(xmpp_tree); |
535 | 0 | expert_add_info_format(pinfo, xmpp_tree, &ei_xmpp_packet_unknown, "Unknown packet: %s", packet->name); |
536 | 0 | col_set_str(pinfo->cinfo, COL_INFO, "UNKNOWN PACKET "); |
537 | 0 | } |
538 | | |
539 | | /*appends to COL_INFO information about src or dst*/ |
540 | 0 | if (pinfo->match_uint == pinfo->destport) { |
541 | 0 | xmpp_attr_t *to = xmpp_get_attr(packet, "to"); |
542 | 0 | if (to) |
543 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "> %s ", to->value); |
544 | 0 | } else { |
545 | 0 | xmpp_attr_t *from = xmpp_get_attr(packet, "from"); |
546 | 0 | if (from) |
547 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "< %s ", from->value); |
548 | 0 | } |
549 | |
|
550 | 0 | CLEANUP_CALL_AND_POP; |
551 | 0 | xml_frame = xml_frame->next_sibling; |
552 | 0 | } |
553 | 0 | return tvb_captured_length(tvb); |
554 | 0 | } |
555 | | |
556 | | |
557 | | void |
558 | 14 | proto_register_xmpp(void) { |
559 | 14 | static hf_register_info hf[] = { |
560 | 14 | { &hf_xmpp_iq, |
561 | 14 | { |
562 | 14 | "IQ", "xmpp.iq", FT_NONE, BASE_NONE, NULL, 0x0, |
563 | 14 | "iq packet", HFILL |
564 | 14 | }}, |
565 | 14 | {&hf_xmpp_xmlns, |
566 | 14 | { |
567 | 14 | "xmlns", "xmpp.xmlns", FT_STRING, BASE_NONE, NULL, 0x0, |
568 | 14 | "element namespace", HFILL |
569 | 14 | }}, |
570 | 14 | {&hf_xmpp_cdata, |
571 | 14 | { |
572 | 14 | "CDATA", "xmpp.cdata", FT_STRING, BASE_NONE, NULL, 0x0, |
573 | 14 | NULL, HFILL |
574 | 14 | }}, |
575 | 14 | {&hf_xmpp_attribute, |
576 | 14 | { |
577 | 14 | "Attribute", "xmpp.attribute", FT_STRING, BASE_NONE, NULL, 0x0, |
578 | 14 | NULL, HFILL |
579 | 14 | }}, |
580 | 14 | { &hf_xmpp_id, |
581 | 14 | { |
582 | 14 | "id", "xmpp.id", FT_STRING, BASE_NONE, NULL, 0x0, |
583 | 14 | "packet id", HFILL |
584 | 14 | }}, |
585 | 14 | { &hf_xmpp_type, |
586 | 14 | { |
587 | 14 | "type", "xmpp.type", FT_STRING, BASE_NONE, NULL, 0x0, |
588 | 14 | "packet type", HFILL |
589 | 14 | }}, |
590 | 14 | { &hf_xmpp_from, |
591 | 14 | { |
592 | 14 | "from", "xmpp.from", FT_STRING, BASE_NONE, NULL, 0x0, |
593 | 14 | "packet from", HFILL |
594 | 14 | }}, |
595 | 14 | { &hf_xmpp_to, |
596 | 14 | { |
597 | 14 | "to", "xmpp.to", FT_STRING, BASE_NONE, NULL, 0x0, |
598 | 14 | "packet to", HFILL |
599 | 14 | }}, |
600 | 14 | { &hf_xmpp_query, |
601 | 14 | { |
602 | 14 | "QUERY", "xmpp.query", FT_NONE, BASE_NONE, NULL, 0x0, |
603 | 14 | "iq query", HFILL |
604 | 14 | }}, |
605 | 14 | { &hf_xmpp_query_node, |
606 | 14 | { |
607 | 14 | "node", "xmpp.query.node", FT_STRING, BASE_NONE, NULL, 0x0, |
608 | 14 | "iq query node", HFILL |
609 | 14 | }}, |
610 | 14 | { &hf_xmpp_query_item, |
611 | 14 | { |
612 | 14 | "ITEM", "xmpp.query.item", FT_NONE, BASE_NONE, NULL, 0x0, |
613 | 14 | "iq query item", HFILL |
614 | | |
615 | 14 | }}, |
616 | 14 | { &hf_xmpp_query_item_jid, |
617 | 14 | { |
618 | 14 | "jid", "xmpp.query.item.jid", FT_STRING, BASE_NONE, NULL, 0x0, |
619 | 14 | "iq query item jid", HFILL |
620 | | |
621 | 14 | }}, |
622 | 14 | { &hf_xmpp_query_item_name, |
623 | 14 | { |
624 | 14 | "name", "xmpp.query.item.name", FT_STRING, BASE_NONE, NULL, 0x0, |
625 | 14 | "iq query item name", HFILL |
626 | 14 | }}, |
627 | 14 | { &hf_xmpp_query_item_subscription, |
628 | 14 | { |
629 | 14 | "subscription", "xmpp.query.item.subscription", FT_STRING, BASE_NONE, NULL, 0x0, |
630 | 14 | "iq query item subscription", HFILL |
631 | 14 | }}, |
632 | 14 | { &hf_xmpp_query_item_ask, |
633 | 14 | { |
634 | 14 | "ask", "xmpp.query.item.ask", FT_STRING, BASE_NONE, NULL, 0x0, |
635 | 14 | "iq query item ask", HFILL |
636 | 14 | }}, |
637 | 14 | { &hf_xmpp_query_item_group, |
638 | 14 | { |
639 | 14 | "GROUP", "xmpp.query.item.group", FT_STRING, BASE_NONE, NULL, 0x0, |
640 | 14 | "iq query item group", HFILL |
641 | | |
642 | 14 | }}, |
643 | 14 | { &hf_xmpp_query_item_approved, |
644 | 14 | { |
645 | 14 | "approved", "xmpp.query.item.approved", FT_STRING, BASE_NONE, NULL, 0x0, |
646 | 14 | "iq query item approved", HFILL |
647 | | |
648 | 14 | }}, |
649 | 14 | { &hf_xmpp_query_item_node, |
650 | 14 | { |
651 | 14 | "node", "xmpp.query.item.node", FT_STRING, BASE_NONE, NULL, 0x0, |
652 | 14 | "iq query item node", HFILL |
653 | | |
654 | 14 | }}, |
655 | 14 | { &hf_xmpp_query_identity, |
656 | 14 | { |
657 | 14 | "IDENTITY", "xmpp.query.identity", FT_NONE, BASE_NONE, NULL, 0x0, |
658 | 14 | "iq query identity", HFILL |
659 | | |
660 | 14 | }}, |
661 | 14 | { &hf_xmpp_query_identity_category, |
662 | 14 | { |
663 | 14 | "category", "xmpp.query.identity.category", FT_STRING, BASE_NONE, NULL, 0x0, |
664 | 14 | "iq query identity category", HFILL |
665 | | |
666 | 14 | }}, |
667 | 14 | { &hf_xmpp_query_identity_type, |
668 | 14 | { |
669 | 14 | "type", "xmpp.query.identity.type", FT_STRING, BASE_NONE, NULL, 0x0, |
670 | 14 | "iq query identity type", HFILL |
671 | | |
672 | 14 | }}, |
673 | 14 | { &hf_xmpp_query_identity_name, |
674 | 14 | { |
675 | 14 | "name", "xmpp.query.identity.name", FT_STRING, BASE_NONE, NULL, 0x0, |
676 | 14 | "iq query identity name", HFILL |
677 | | |
678 | 14 | }}, |
679 | 14 | { &hf_xmpp_query_identity_lang, |
680 | 14 | { |
681 | 14 | "lang", "xmpp.query.identity.lang", FT_STRING, BASE_NONE, NULL, 0x0, |
682 | 14 | "iq query identity lang", HFILL |
683 | | |
684 | 14 | }}, |
685 | 14 | { &hf_xmpp_query_feature, |
686 | 14 | { |
687 | 14 | "FEATURE", "xmpp.query.feature", FT_STRING, BASE_NONE, NULL, 0x0, |
688 | 14 | "iq query feature", HFILL |
689 | | |
690 | 14 | }}, |
691 | 14 | { &hf_xmpp_query_streamhost, |
692 | 14 | { |
693 | 14 | "STREAMHOST", "xmpp.query.streamhost", FT_NONE, BASE_NONE, NULL, 0x0, |
694 | 14 | "iq query streamhost", HFILL |
695 | | |
696 | 14 | }}, |
697 | 14 | { &hf_xmpp_query_streamhost_used, |
698 | 14 | { |
699 | 14 | "STREAMHOST-USED", "xmpp.query.streamhost-used", FT_NONE, BASE_NONE, NULL, 0x0, |
700 | 14 | "iq query streamhost-used", HFILL |
701 | | |
702 | 14 | }}, |
703 | 14 | { &hf_xmpp_query_activate, |
704 | 14 | { |
705 | 14 | "ACTIVATE", "xmpp.query.activate", FT_STRING, BASE_NONE, NULL, 0x0, |
706 | 14 | "iq query activate", HFILL |
707 | | |
708 | 14 | }}, |
709 | 14 | { &hf_xmpp_query_udpsuccess, |
710 | 14 | { |
711 | 14 | "UDPSUCCESS", "xmpp.query.udpsuccess", FT_NONE, BASE_NONE, NULL, 0x0, |
712 | 14 | "iq query streamhost-used", HFILL |
713 | | |
714 | 14 | }}, |
715 | 14 | { &hf_xmpp_error, |
716 | 14 | { |
717 | 14 | "ERROR", "xmpp.error", FT_NONE, BASE_NONE, NULL, 0x0, |
718 | 14 | "iq error", HFILL |
719 | 14 | }}, |
720 | 14 | { &hf_xmpp_error_code, |
721 | 14 | { |
722 | 14 | "code", "xmpp.error.code", FT_STRING, BASE_NONE, NULL, 0x0, |
723 | 14 | "iq stanza error code", HFILL |
724 | | |
725 | 14 | }}, |
726 | 14 | { &hf_xmpp_error_type, |
727 | 14 | { |
728 | 14 | "type", "xmpp.error.type", FT_STRING, BASE_NONE, NULL, 0x0, |
729 | 14 | "iq error type", HFILL |
730 | | |
731 | 14 | }}, |
732 | 14 | { &hf_xmpp_error_condition, |
733 | 14 | { |
734 | 14 | "CONDITION", "xmpp.error.condition", FT_STRING, BASE_NONE, NULL, 0x0, |
735 | 14 | "iq error condition", HFILL |
736 | | |
737 | 14 | }}, |
738 | 14 | { &hf_xmpp_error_text, |
739 | 14 | { |
740 | 14 | "TEXT", "xmpp.error.text", FT_STRING, BASE_NONE, NULL, 0x0, |
741 | 14 | "iq error text", HFILL |
742 | | |
743 | 14 | }}, |
744 | 14 | { &hf_xmpp_iq_bind, |
745 | 14 | { |
746 | 14 | "BIND", "xmpp.iq.bind", FT_NONE, BASE_NONE, NULL, 0x0, |
747 | 14 | "iq bind", HFILL |
748 | | |
749 | 14 | }}, |
750 | 14 | { &hf_xmpp_iq_bind_jid, |
751 | 14 | { |
752 | 14 | "jid", "xmpp.iq.bind.jid", FT_STRING, BASE_NONE, NULL, 0x0, |
753 | 14 | "iq bind jid", HFILL |
754 | | |
755 | 14 | }}, |
756 | 14 | { &hf_xmpp_iq_bind_resource, |
757 | 14 | { |
758 | 14 | "resource", "xmpp.iq.bind.resource", FT_STRING, BASE_NONE, NULL, 0x0, |
759 | 14 | "iq bind resource", HFILL |
760 | | |
761 | 14 | }}, |
762 | 14 | { &hf_xmpp_services, |
763 | 14 | { |
764 | 14 | "SERVICES", "xmpp.services", FT_NONE, BASE_NONE, NULL, 0x0, |
765 | 14 | "http://jabber.org/protocol/jinglenodes services", HFILL |
766 | 14 | }}, |
767 | 14 | { &hf_xmpp_channel, |
768 | 14 | { |
769 | 14 | "CHANNEL", "xmpp.channel", FT_NONE, BASE_NONE, NULL, 0x0, |
770 | 14 | "http://jabber.org/protocol/jinglenodes#channel", HFILL |
771 | 14 | }}, |
772 | 14 | { &hf_xmpp_iq_session, |
773 | 14 | { |
774 | 14 | "SESSION", "xmpp.iq.session", FT_NONE, BASE_NONE, NULL, 0x0, |
775 | 14 | "iq session", HFILL |
776 | 14 | }}, |
777 | 14 | { &hf_xmpp_vcard, |
778 | 14 | { |
779 | 14 | "VCARD", "xmpp.vcard", FT_NONE, BASE_NONE, NULL, 0x0, |
780 | 14 | "vcard-temp", HFILL |
781 | 14 | }}, |
782 | 14 | { &hf_xmpp_vcard_x_update, |
783 | 14 | { |
784 | 14 | "X VCARD-UPDATE", "xmpp.vcard-update", FT_NONE, BASE_NONE, NULL, 0x0, |
785 | 14 | "vcard-temp:x:update", HFILL |
786 | 14 | }}, |
787 | 14 | { &hf_xmpp_jingle, |
788 | 14 | { |
789 | 14 | "JINGLE", "xmpp.jingle", FT_NONE, BASE_NONE, NULL, 0x0, |
790 | 14 | "iq jingle", HFILL |
791 | 14 | }}, |
792 | 14 | { &hf_xmpp_jingle_action, |
793 | 14 | { |
794 | 14 | "action", "xmpp.jingle.action", FT_STRING, BASE_NONE, NULL, 0x0, |
795 | 14 | "iq jingle action", HFILL |
796 | 14 | }}, |
797 | 14 | { &hf_xmpp_jingle_sid, |
798 | 14 | { |
799 | 14 | "sid", "xmpp.jingle.sid", FT_STRING, BASE_NONE, NULL, 0x0, |
800 | 14 | "iq jingle sid", HFILL |
801 | 14 | }}, |
802 | 14 | { &hf_xmpp_jingle_initiator, |
803 | 14 | { |
804 | 14 | "initiator", "xmpp.jingle.initiator", FT_STRING, BASE_NONE, NULL, 0x0, |
805 | 14 | "iq jingle initiator", HFILL |
806 | 14 | }}, |
807 | 14 | { &hf_xmpp_jingle_responder, |
808 | 14 | { |
809 | 14 | "responder", "xmpp.jingle.responder", FT_STRING, BASE_NONE, NULL, 0x0, |
810 | 14 | "iq jingle responder", HFILL |
811 | 14 | }}, |
812 | 14 | { &hf_xmpp_jingle_content, |
813 | 14 | { |
814 | 14 | "CONTENT", "xmpp.jingle.content", FT_NONE, BASE_NONE, NULL, 0x0, |
815 | 14 | "iq jingle content", HFILL |
816 | 14 | }}, |
817 | 14 | { &hf_xmpp_jingle_content_creator, |
818 | 14 | { |
819 | 14 | "creator", "xmpp.jingle.content.creator", FT_STRING, BASE_NONE, NULL, 0x0, |
820 | 14 | "iq jingle content creator", HFILL |
821 | 14 | }}, |
822 | 14 | { &hf_xmpp_jingle_content_name, |
823 | 14 | { |
824 | 14 | "name", "xmpp.jingle.content.name", FT_STRING, BASE_NONE, NULL, 0x0, |
825 | 14 | "iq jingle content name", HFILL |
826 | 14 | }}, |
827 | 14 | { &hf_xmpp_jingle_content_disposition, |
828 | 14 | { |
829 | 14 | "disposition", "xmpp.jingle.content.disposition", FT_STRING, BASE_NONE, NULL, 0x0, |
830 | 14 | "iq jingle content disposition", HFILL |
831 | 14 | }}, |
832 | 14 | { &hf_xmpp_jingle_content_senders, |
833 | 14 | { |
834 | 14 | "senders", "xmpp.jingle.content.senders", FT_STRING, BASE_NONE, NULL, 0x0, |
835 | 14 | "iq jingle content senders", HFILL |
836 | 14 | }}, |
837 | 14 | { &hf_xmpp_jingle_content_description, |
838 | 14 | { |
839 | 14 | "DESCRIPTION", "xmpp.jingle.content.description", FT_NONE, BASE_NONE, NULL, 0x0, |
840 | 14 | "iq jingle content description", HFILL |
841 | 14 | }}, |
842 | 14 | { &hf_xmpp_jingle_content_description_media, |
843 | 14 | { |
844 | 14 | "media", "xmpp.jingle.content.description.media", FT_STRING, BASE_NONE, NULL, 0x0, |
845 | 14 | "iq jingle content description", HFILL |
846 | 14 | }}, |
847 | 14 | { &hf_xmpp_jingle_content_description_ssrc, |
848 | 14 | { |
849 | 14 | "ssrc", "xmpp.jingle.content.description.ssrc", FT_STRING, BASE_NONE, NULL, 0x0, |
850 | 14 | "iq jingle content description ssrc", HFILL |
851 | 14 | }}, |
852 | 14 | { &hf_xmpp_jingle_cont_desc_payload, |
853 | 14 | { |
854 | 14 | "PAYLOAD-TYPE", "xmpp.jingle.content.description.payload-type", FT_NONE, BASE_NONE, NULL, 0x0, |
855 | 14 | "iq jingle content description payload-type", HFILL |
856 | 14 | }}, |
857 | 14 | { &hf_xmpp_jingle_cont_desc_payload_id, |
858 | 14 | { |
859 | 14 | "id", "xmpp.jingle.content.description.payload-type.id", FT_STRING, BASE_NONE, NULL, 0x0, |
860 | 14 | "iq jingle content description payload-type id", HFILL |
861 | 14 | }}, |
862 | 14 | { &hf_xmpp_jingle_cont_desc_payload_channels, |
863 | 14 | { |
864 | 14 | "channels", "xmpp.jingle.content.description.payload-type.channels", FT_STRING, BASE_NONE, NULL, 0x0, |
865 | 14 | "iq jingle content description payload-type channels", HFILL |
866 | 14 | }}, |
867 | 14 | { &hf_xmpp_jingle_cont_desc_payload_clockrate, |
868 | 14 | { |
869 | 14 | "clockrate", "xmpp.jingle.content.description.payload-type.clockrate", FT_STRING, BASE_NONE, NULL, 0x0, |
870 | 14 | "iq jingle content description payload-type clockrate", HFILL |
871 | 14 | }}, |
872 | 14 | { &hf_xmpp_jingle_cont_desc_payload_maxptime, |
873 | 14 | { |
874 | 14 | "maxptime", "xmpp.jingle.content.description.payload-type.maxptime", FT_STRING, BASE_NONE, NULL, 0x0, |
875 | 14 | "iq jingle content description payload-type maxptime", HFILL |
876 | 14 | }}, |
877 | 14 | { &hf_xmpp_jingle_cont_desc_payload_name, |
878 | 14 | { |
879 | 14 | "name", "xmpp.jingle.content.description.payload-type.name", FT_STRING, BASE_NONE, NULL, 0x0, |
880 | 14 | "iq jingle content description payload-type name", HFILL |
881 | 14 | }}, |
882 | 14 | { &hf_xmpp_jingle_cont_desc_payload_ptime, |
883 | 14 | { |
884 | 14 | "ptime", "xmpp.jingle.content.description.payload-type.ptime", FT_STRING, BASE_NONE, NULL, 0x0, |
885 | 14 | "iq jingle content description payload-type ptime", HFILL |
886 | 14 | }}, |
887 | 14 | { &hf_xmpp_jingle_cont_desc_payload_param, |
888 | 14 | { |
889 | 14 | "PARAMETER", "xmpp.jingle.content.description.payload-type.parameter", FT_NONE, BASE_NONE, NULL, 0x0, |
890 | 14 | "iq jingle content description payload-type parameter", HFILL |
891 | 14 | }}, |
892 | 14 | { &hf_xmpp_jingle_cont_desc_payload_param_name, |
893 | 14 | { |
894 | 14 | "name", "xmpp.jingle.content.description.payload-type.parameter.name", FT_STRING, BASE_NONE, NULL, 0x0, |
895 | 14 | "iq jingle content description payload-type parameter name", HFILL |
896 | 14 | }}, |
897 | 14 | { &hf_xmpp_jingle_cont_desc_payload_param_value, |
898 | 14 | { |
899 | 14 | "value", "xmpp.jingle.content.description.payload-type.parameter.value", FT_STRING, BASE_NONE, NULL, 0x0, |
900 | 14 | "iq jingle content description payload-type parameter value", HFILL |
901 | 14 | }}, |
902 | 14 | { &hf_xmpp_jingle_cont_trans, |
903 | 14 | { |
904 | 14 | "TRANSPORT", "xmpp.jingle.content.transport", FT_NONE, BASE_NONE, NULL, 0x0, |
905 | 14 | "iq jingle content transport", HFILL |
906 | 14 | }}, |
907 | 14 | { &hf_xmpp_jingle_cont_trans_ufrag, |
908 | 14 | { |
909 | 14 | "ufrag", "xmpp.jingle.content.transport.ufrag", FT_STRING, BASE_NONE, NULL, 0x0, |
910 | 14 | "iq jingle content transport ufrag", HFILL |
911 | 14 | }}, |
912 | 14 | { &hf_xmpp_jingle_cont_trans_pwd, |
913 | 14 | { |
914 | 14 | "pwd", "xmpp.jingle.content.transport.pwd", FT_STRING, BASE_NONE, NULL, 0x0, |
915 | 14 | "iq jingle content transport pwd", HFILL |
916 | 14 | }}, |
917 | 14 | { &hf_xmpp_jingle_cont_trans_cand, |
918 | 14 | { |
919 | 14 | "CANDIDATE", "xmpp.jingle.content.transport.candidate", FT_NONE, BASE_NONE, NULL, 0x0, |
920 | 14 | "iq jingle content transport candidate", HFILL |
921 | 14 | }}, |
922 | 14 | { &hf_xmpp_jingle_cont_trans_rem_cand, |
923 | 14 | { |
924 | 14 | "REMOTE-CANDIDATE", "xmpp.jingle.content.transport.remote-candidate", FT_NONE, BASE_NONE, NULL, 0x0, |
925 | 14 | "iq jingle content transport remote-candidate", HFILL |
926 | 14 | }}, |
927 | 14 | { &hf_xmpp_jingle_cont_trans_activated, |
928 | 14 | { |
929 | 14 | "ACTIVATED", "xmpp.jingle.content.transport.activated", FT_NONE, BASE_NONE, NULL, 0x0, |
930 | 14 | "urn:xmpp:jingle:transports:s5b:1 activated", HFILL |
931 | 14 | }}, |
932 | 14 | { &hf_xmpp_jingle_cont_trans_candidate_used, |
933 | 14 | { |
934 | 14 | "CANDIDATE-USED", "xmpp.jingle.content.transport.candidate-used", FT_NONE, BASE_NONE, NULL, 0x0, |
935 | 14 | "urn:xmpp:jingle:transports:s5b:1 candidate-used", HFILL |
936 | 14 | }}, |
937 | 14 | { &hf_xmpp_jingle_cont_trans_candidate_error, |
938 | 14 | { |
939 | 14 | "CANDIDATE-ERROR", "xmpp.jingle.content.transport.candidate-error", FT_NONE, BASE_NONE, NULL, 0x0, |
940 | 14 | "urn:xmpp:jingle:transports:s5b:1 candidate-error", HFILL |
941 | 14 | }}, |
942 | 14 | { &hf_xmpp_jingle_cont_trans_proxy_error, |
943 | 14 | { |
944 | 14 | "PROXY-ERROR", "xmpp.jingle.content.transport.proxy-error", FT_NONE, BASE_NONE, NULL, 0x0, |
945 | 14 | "urn:xmpp:jingle:transports:s5b:1 proxy-error", HFILL |
946 | 14 | }}, |
947 | 14 | { &hf_xmpp_jingle_cont_desc_enc, |
948 | 14 | { |
949 | 14 | "ENCRYPTION", "xmpp.jingle.content.description.encryption", FT_NONE, BASE_NONE, NULL, 0x0, |
950 | 14 | "iq jingle content description encryption", HFILL |
951 | 14 | }}, |
952 | 14 | { &hf_xmpp_jingle_cont_desc_enc_zrtp_hash, |
953 | 14 | { |
954 | 14 | "ZRTP-HASH", "xmpp.jingle.content.description.encryption.zrtp-hash", FT_NONE, BASE_NONE, NULL, 0x0, |
955 | 14 | "iq jingle content description encryption zrtp-hash", HFILL |
956 | 14 | }}, |
957 | 14 | { &hf_xmpp_jingle_cont_desc_enc_crypto, |
958 | 14 | { |
959 | 14 | "CRYPTO", "xmpp.jingle.content.description.encryption.crypto", FT_NONE, BASE_NONE, NULL, 0x0, |
960 | 14 | "iq jingle content description encryption crypto", HFILL |
961 | 14 | }}, |
962 | 14 | { &hf_xmpp_jingle_cont_desc_bandwidth, |
963 | 14 | { |
964 | 14 | "BANDWIDTH", "xmpp.jingle.content.description.bandwidth", FT_NONE, BASE_NONE, NULL, 0x0, |
965 | 14 | "iq jingle content description bandwidth", HFILL |
966 | 14 | }}, |
967 | 14 | { &hf_xmpp_jingle_cont_desc_rtp_hdr, |
968 | 14 | { |
969 | 14 | "RTP-HDREXT", "xmpp.jingle.content.description.rtp-hdrext", FT_NONE, BASE_NONE, NULL, 0x0, |
970 | 14 | "iq jingle content description rtp-hdrext", HFILL |
971 | 14 | }}, |
972 | 14 | { &hf_xmpp_jingle_reason, |
973 | 14 | { |
974 | 14 | "REASON", "xmpp.jingle.reason", FT_NONE, BASE_NONE, NULL, 0x0, |
975 | 14 | "iq jingle reason", HFILL |
976 | 14 | }}, |
977 | 14 | { &hf_xmpp_jingle_reason_condition, |
978 | 14 | { |
979 | 14 | "CONDITION", "xmpp.jingle.reason.condition", FT_STRING, BASE_NONE, NULL, 0x0, |
980 | 14 | "iq jingle reason condition", HFILL |
981 | 14 | }}, |
982 | 14 | { &hf_xmpp_jingle_reason_text, |
983 | 14 | { |
984 | 14 | "TEXT", "xmpp.jingle.reason.text", FT_STRING, BASE_NONE, NULL, 0x0, |
985 | 14 | "iq jingle reason text", HFILL |
986 | 14 | }}, |
987 | 14 | { &hf_xmpp_jingle_rtp_info, |
988 | 14 | { |
989 | 14 | "RTP-INFO", "xmpp.jingle.rtp_info", FT_STRING, BASE_NONE, NULL, 0x0, |
990 | 14 | "iq jingle rtp-info(ringing, active, hold, mute, ...)", HFILL |
991 | 14 | }}, |
992 | 14 | { &hf_xmpp_jingle_file_transfer_offer, |
993 | 14 | { |
994 | 14 | "OFFER", "xmpp.jingle.content.description.offer", FT_NONE, BASE_NONE, NULL, 0x0, |
995 | 14 | "urn:xmpp:jingle:apps:file-transfer:3 offer", HFILL |
996 | 14 | }}, |
997 | 14 | { &hf_xmpp_jingle_file_transfer_request, |
998 | 14 | { |
999 | 14 | "REQUEST", "xmpp.jingle.content.description.request", FT_NONE, BASE_NONE, NULL, 0x0, |
1000 | 14 | "urn:xmpp:jingle:apps:file-transfer:3 request", HFILL |
1001 | 14 | }}, |
1002 | 14 | { &hf_xmpp_jingle_file_transfer_received, |
1003 | 14 | { |
1004 | 14 | "RECEIVED", "xmpp.jingle.content.received", FT_NONE, BASE_NONE, NULL, 0x0, |
1005 | 14 | "urn:xmpp:jingle:apps:file-transfer:3 received", HFILL |
1006 | 14 | }}, |
1007 | 14 | { &hf_xmpp_jingle_file_transfer_abort, |
1008 | 14 | { |
1009 | 14 | "ABORT", "xmpp.jingle.content.abort", FT_NONE, BASE_NONE, NULL, 0x0, |
1010 | 14 | "urn:xmpp:jingle:apps:file-transfer:3 abort", HFILL |
1011 | 14 | }}, |
1012 | 14 | { &hf_xmpp_jingle_file_transfer_checksum, |
1013 | 14 | { |
1014 | 14 | "CHECKSUM", "xmpp.jingle.content.checksum", FT_NONE, BASE_NONE, NULL, 0x0, |
1015 | 14 | "urn:xmpp:jingle:apps:file-transfer:3 checksum", HFILL |
1016 | 14 | }}, |
1017 | 14 | { &hf_xmpp_si, |
1018 | 14 | { |
1019 | 14 | "SI", "xmpp.si", FT_NONE, BASE_NONE, NULL, 0x0, |
1020 | 14 | "iq si", HFILL |
1021 | 14 | }}, |
1022 | 14 | { &hf_xmpp_si_file, |
1023 | 14 | { |
1024 | 14 | "FILE", "xmpp.si.file", FT_NONE, BASE_NONE, NULL, 0x0, |
1025 | 14 | "iq si file", HFILL |
1026 | 14 | }}, |
1027 | 14 | { &hf_xmpp_iq_feature_neg, |
1028 | 14 | { |
1029 | 14 | "FEATURE", "xmpp.feature-neg", FT_NONE, BASE_NONE, NULL, 0x0, |
1030 | 14 | "http://jabber.org/protocol/feature-neg", HFILL |
1031 | 14 | }}, |
1032 | 14 | { &hf_xmpp_x_data, |
1033 | 14 | { |
1034 | 14 | "X-DATA", "xmpp.x-data", FT_NONE, BASE_NONE, NULL, 0x0, |
1035 | 14 | "jabber:x:data", HFILL |
1036 | 14 | }}, |
1037 | 14 | { &hf_xmpp_x_data_field, |
1038 | 14 | { |
1039 | 14 | "FIELD", "xmpp.x-data.field", FT_NONE, BASE_NONE, NULL, 0x0, |
1040 | 14 | "jabber:x:data field", HFILL |
1041 | 14 | }}, |
1042 | 14 | { &hf_xmpp_x_data_field_value, |
1043 | 14 | { |
1044 | 14 | "VALUE", "xmpp.x-data.field.value", FT_NONE, BASE_NONE, NULL, 0x0, |
1045 | 14 | "jabber:x:data field value", HFILL |
1046 | 14 | }}, |
1047 | 14 | { &hf_xmpp_x_data_instructions, |
1048 | 14 | { |
1049 | 14 | "INSTRUCTIONS", "xmpp.x-data.instructions", FT_STRING, BASE_NONE, NULL, 0x0, |
1050 | 14 | NULL, HFILL |
1051 | 14 | }}, |
1052 | 14 | { &hf_xmpp_muc_user_status, |
1053 | 14 | { |
1054 | 14 | "STATUS", "xmpp.muc_user_status", FT_STRING, BASE_NONE, NULL, 0x0, |
1055 | 14 | NULL, HFILL |
1056 | 14 | }}, |
1057 | 14 | { &hf_xmpp_delay, |
1058 | 14 | { |
1059 | 14 | "DELAY", "xmpp.delay", FT_NONE, BASE_NONE, NULL, 0x0, |
1060 | 14 | "urn:xmpp:delay", HFILL |
1061 | 14 | }}, |
1062 | 14 | { &hf_xmpp_x_event, |
1063 | 14 | { |
1064 | 14 | "X EVENT", "xmpp.x-event", FT_NONE, BASE_NONE, NULL, 0x0, |
1065 | 14 | "jabber:x:event", HFILL |
1066 | 14 | }}, |
1067 | 14 | { &hf_xmpp_x_event_condition, |
1068 | 14 | { |
1069 | 14 | "CONDITION", "xmpp.x-event.condition", FT_STRING, BASE_NONE, NULL, 0x0, |
1070 | 14 | "jabber:x:event condition", HFILL |
1071 | 14 | }}, |
1072 | 14 | { &hf_xmpp_presence, |
1073 | 14 | { |
1074 | 14 | "PRESENCE", "xmpp.presence", FT_NONE, BASE_NONE, NULL, 0x0, |
1075 | 14 | "presence packet", HFILL |
1076 | 14 | }}, |
1077 | 14 | { &hf_xmpp_presence_show, |
1078 | 14 | { |
1079 | 14 | "SHOW", "xmpp.presence.show", FT_STRING, BASE_NONE, NULL, 0x0, |
1080 | 14 | "presence show", HFILL |
1081 | 14 | }}, |
1082 | 14 | { &hf_xmpp_presence_status, |
1083 | 14 | { |
1084 | 14 | "STATUS", "xmpp.presence.status", FT_NONE, BASE_NONE, NULL, 0x0, |
1085 | 14 | "presence status", HFILL |
1086 | 14 | }}, |
1087 | 14 | { &hf_xmpp_presence_caps, |
1088 | 14 | { |
1089 | 14 | "CAPS", "xmpp.presence.caps", FT_NONE, BASE_NONE, NULL, 0x0, |
1090 | 14 | "presence caps", HFILL |
1091 | 14 | }}, |
1092 | 14 | { &hf_xmpp_message, |
1093 | 14 | { |
1094 | 14 | "MESSAGE", "xmpp.message", FT_NONE, BASE_NONE, NULL, 0x0, |
1095 | 14 | "message packet", HFILL |
1096 | 14 | }}, |
1097 | 14 | { &hf_xmpp_message_chatstate, |
1098 | 14 | { |
1099 | 14 | "CHATSTATE", "xmpp.message.chatstate", FT_STRING, BASE_NONE, NULL, 0x0, |
1100 | 14 | "message chatstate", HFILL |
1101 | 14 | }}, |
1102 | 14 | { &hf_xmpp_message_thread, |
1103 | 14 | { |
1104 | 14 | "THREAD", "xmpp.message.thread", FT_NONE, BASE_NONE, NULL, 0x0, |
1105 | 14 | "message thread", HFILL |
1106 | 14 | }}, |
1107 | 14 | { &hf_xmpp_message_body, |
1108 | 14 | { |
1109 | 14 | "BODY", "xmpp.message.body", FT_NONE, BASE_NONE, NULL, 0x0, |
1110 | 14 | "message body", HFILL |
1111 | 14 | }}, |
1112 | 14 | { &hf_xmpp_message_subject, |
1113 | 14 | { |
1114 | 14 | "SUBJECT", "xmpp.message.subject", FT_NONE, BASE_NONE, NULL, 0x0, |
1115 | 14 | "message subject", HFILL |
1116 | 14 | }}, |
1117 | 14 | { &hf_xmpp_message_thread_parent, |
1118 | 14 | { |
1119 | 14 | "parent", "xmpp.message.thread.parent", FT_STRING, BASE_NONE, NULL, 0x0, |
1120 | 14 | "message thread parent", HFILL |
1121 | 14 | }}, |
1122 | 14 | { &hf_xmpp_auth, |
1123 | 14 | { |
1124 | 14 | "AUTH", "xmpp.auth", FT_NONE, BASE_NONE, NULL, 0x0, |
1125 | 14 | "auth packet", HFILL |
1126 | 14 | }}, |
1127 | 14 | { &hf_xmpp_stream, |
1128 | 14 | { |
1129 | 14 | "STREAM", "xmpp.stream", FT_NONE, BASE_NONE, NULL, 0x0, |
1130 | 14 | "XMPP stream", HFILL |
1131 | 14 | }}, |
1132 | 14 | { &hf_xmpp_failure, |
1133 | 14 | { |
1134 | 14 | "FAILURE", "xmpp.failure", FT_NONE, BASE_NONE, NULL, 0x0, |
1135 | 14 | "failure packet", HFILL |
1136 | 14 | }}, |
1137 | 14 | { &hf_xmpp_failure_text, |
1138 | 14 | { |
1139 | 14 | "FAILURE TEXT", "xmpp.failure_text", FT_STRING, BASE_NONE, NULL, 0x0, |
1140 | 14 | NULL, HFILL |
1141 | 14 | }}, |
1142 | 14 | { &hf_xmpp_xml_header_version, |
1143 | 14 | { |
1144 | 14 | "XML HEADER VER", "xmpp.xml_header_version", FT_STRING, BASE_NONE, NULL, 0x0, |
1145 | 14 | NULL, HFILL |
1146 | 14 | }}, |
1147 | 14 | { &hf_xmpp_stream_end, |
1148 | 14 | { |
1149 | 14 | "STREAM END", "xmpp.stream_end", FT_NONE, BASE_NONE, NULL, 0x0, |
1150 | 14 | NULL, HFILL |
1151 | 14 | }}, |
1152 | 14 | { &hf_xmpp_features, |
1153 | 14 | { |
1154 | 14 | "FEATURES", "xmpp.features", FT_NONE, BASE_NONE, NULL, 0x0, |
1155 | 14 | "stream features", HFILL |
1156 | 14 | }}, |
1157 | 14 | { &hf_xmpp_starttls, |
1158 | 14 | { |
1159 | 14 | "STARTTLS", "xmpp.starttls", FT_NONE, BASE_NONE, NULL, 0x0, |
1160 | 14 | "starttls packet", HFILL |
1161 | 14 | }}, |
1162 | 14 | { &hf_xmpp_proceed, |
1163 | 14 | { |
1164 | 14 | "PROCEED", "xmpp.proceed", FT_NONE, BASE_NONE, NULL, 0x0, |
1165 | 14 | "proceed packet", HFILL |
1166 | 14 | }}, |
1167 | 14 | { &hf_xmpp_unknown, |
1168 | 14 | { |
1169 | 14 | "UNKNOWN", "xmpp.unknown", FT_STRING, BASE_NONE, NULL, 0x0, |
1170 | 14 | "unknown element", HFILL |
1171 | 14 | }}, |
1172 | 14 | { &hf_xmpp_unknown_attr, |
1173 | 14 | { |
1174 | 14 | "UNKNOWN ATTR", "xmpp.unknown_attr", FT_STRING, BASE_NONE, NULL, 0x0, |
1175 | 14 | "unknown attribute", HFILL |
1176 | 14 | }}, |
1177 | 14 | { &hf_xmpp_ibb_open, |
1178 | 14 | { |
1179 | 14 | "IBB-OPEN", "xmpp.ibb.open", FT_NONE, BASE_NONE, NULL, 0x0, |
1180 | 14 | "xmpp ibb open", HFILL |
1181 | 14 | }}, |
1182 | 14 | { &hf_xmpp_ibb_close, |
1183 | 14 | { |
1184 | 14 | "IBB-CLOSE", "xmpp.ibb.close", FT_NONE, BASE_NONE, NULL, 0x0, |
1185 | 14 | "xmpp ibb close", HFILL |
1186 | 14 | }}, |
1187 | 14 | { &hf_xmpp_ibb_data, |
1188 | 14 | { |
1189 | 14 | "IBB-DATA", "xmpp.ibb.data", FT_NONE, BASE_NONE, NULL, 0x0, |
1190 | 14 | "xmpp ibb data", HFILL |
1191 | 14 | }}, |
1192 | 14 | { &hf_xmpp_muc_x, |
1193 | 14 | { |
1194 | 14 | "X MUC", "xmpp.muc-x", FT_NONE, BASE_NONE, NULL, 0x0, |
1195 | 14 | "http://jabber.org/protocol/muc", HFILL |
1196 | 14 | }}, |
1197 | 14 | { &hf_xmpp_muc_user_x, |
1198 | 14 | { |
1199 | 14 | "X MUC-USER", "xmpp.muc-user-x", FT_NONE, BASE_NONE, NULL, 0x0, |
1200 | 14 | "http://jabber.org/protocol/muc#user", HFILL |
1201 | 14 | }}, |
1202 | 14 | { &hf_xmpp_muc_user_item, |
1203 | 14 | { |
1204 | 14 | "ITEM", "xmpp.muc-user-x.item", FT_NONE, BASE_NONE, NULL, 0x0, |
1205 | 14 | "muc#user item", HFILL |
1206 | 14 | }}, |
1207 | 14 | { &hf_xmpp_muc_user_invite, |
1208 | 14 | { |
1209 | 14 | "INVITE", "xmpp.muc-user-x.invite", FT_NONE, BASE_NONE, NULL, 0x0, |
1210 | 14 | "muc#user invite", HFILL |
1211 | 14 | }}, |
1212 | 14 | { &hf_xmpp_gtalk_session, |
1213 | 14 | { |
1214 | 14 | "GTALK-SESSION", "xmpp.gtalk.session", FT_NONE, BASE_NONE, NULL, 0x0, |
1215 | 14 | "GTalk session", HFILL |
1216 | 14 | }}, |
1217 | 14 | { &hf_xmpp_gtalk_session_type, |
1218 | 14 | { |
1219 | 14 | "type", "xmpp.gtalk.session.type", FT_STRING, BASE_NONE, NULL, 0x0, |
1220 | 14 | "GTalk session type", HFILL |
1221 | 14 | }}, |
1222 | 14 | { &hf_xmpp_gtalk, |
1223 | 14 | { |
1224 | 14 | "GTALK SESSION", "xmpp.gtalk", FT_STRING, BASE_NONE, NULL, 0x0, |
1225 | 14 | "GTalk SID", HFILL |
1226 | 14 | }}, |
1227 | 14 | { &hf_xmpp_gtalk_setting, |
1228 | 14 | { |
1229 | 14 | "USERSETTING", "xmpp.gtalk.setting", FT_NONE, BASE_NONE, NULL, 0x0, |
1230 | 14 | "google:setting usersetting", HFILL |
1231 | 14 | }}, |
1232 | 14 | { &hf_xmpp_gtalk_setting_element, |
1233 | 14 | { |
1234 | 14 | "USERSETTING ELEMENT", "xmpp.gtalk.setting_element", FT_STRING, BASE_NONE, NULL, 0x0, |
1235 | 14 | NULL, HFILL |
1236 | 14 | }}, |
1237 | 14 | { &hf_xmpp_gtalk_nosave_x, |
1238 | 14 | { |
1239 | 14 | "X-NOSAVE", "xmpp.gtalk.nosave.x", FT_NONE, BASE_NONE, NULL, 0x0, |
1240 | 14 | "google:nosave x", HFILL |
1241 | 14 | }}, |
1242 | 14 | { &hf_xmpp_gtalk_mail_mailbox, |
1243 | 14 | { |
1244 | 14 | "MAILBOX", "xmpp.gtalk.mailbox", FT_NONE, BASE_NONE, NULL, 0x0, |
1245 | 14 | "google:mail:notify mailbox", HFILL |
1246 | 14 | }}, |
1247 | 14 | { &hf_xmpp_gtalk_mail_new_mail, |
1248 | 14 | { |
1249 | 14 | "NEW MAIL", "xmpp.gtalk.new-mail", FT_NONE, BASE_NONE, NULL, 0x0, |
1250 | 14 | "google:mail:notify new-mail", HFILL |
1251 | 14 | }}, |
1252 | 14 | { &hf_xmpp_gtalk_transport_p2p, |
1253 | 14 | { |
1254 | 14 | "TRANSPORT", "xmpp.gtalk.transport-p2p", FT_NONE, BASE_NONE, NULL, 0x0, |
1255 | 14 | "google/transport/p2p", HFILL |
1256 | 14 | }}, |
1257 | 14 | { &hf_xmpp_gtalk_mail_snippet, |
1258 | 14 | { |
1259 | 14 | "SNIPPET", "xmpp.gtalk.mail_snippet", FT_STRING, BASE_NONE, NULL, 0x0, |
1260 | 14 | NULL, HFILL |
1261 | 14 | }}, |
1262 | 14 | { &hf_xmpp_gtalk_status_status_list, |
1263 | 14 | { |
1264 | 14 | "STATUS", "xmpp.gtalk.status_status_list", FT_STRING, BASE_NONE, NULL, 0x0, |
1265 | 14 | NULL, HFILL |
1266 | 14 | }}, |
1267 | 14 | { &hf_xmpp_conf_info, |
1268 | 14 | { |
1269 | 14 | "CONFERENCE INFO", "xmpp.conf-info", FT_NONE, BASE_NONE, NULL, 0x0, |
1270 | 14 | "urn:ietf:params:xml:ns:conference-info", HFILL |
1271 | 14 | }}, |
1272 | 14 | { &hf_xmpp_conf_info_sid, |
1273 | 14 | { |
1274 | 14 | "sid", "xmpp.conf-info.sid", FT_STRING, BASE_NONE, NULL, 0x0, |
1275 | 14 | "urn:ietf:params:xml:ns:conference-info sid", HFILL |
1276 | 14 | }}, |
1277 | 14 | { &hf_xmpp_response_in, |
1278 | 14 | { "Response In", "xmpp.response_in", |
1279 | 14 | FT_FRAMENUM, BASE_NONE, FRAMENUM_TYPE(FT_FRAMENUM_RESPONSE), 0x0, |
1280 | 14 | "The response to this request is in this frame", HFILL } |
1281 | 14 | }, |
1282 | 14 | { &hf_xmpp_response_to, |
1283 | 14 | { "Request In", "xmpp.response_to", |
1284 | 14 | FT_FRAMENUM, BASE_NONE, FRAMENUM_TYPE(FT_FRAMENUM_REQUEST), 0x0, |
1285 | 14 | "This is a response to the request in this frame", HFILL } |
1286 | 14 | }, |
1287 | 14 | { &hf_xmpp_out, |
1288 | 14 | { |
1289 | 14 | "Out", "xmpp.out", FT_BOOLEAN, BASE_NONE, NULL, 0x0, |
1290 | 14 | "Outgoing packet", HFILL |
1291 | 14 | }}, |
1292 | 14 | { &hf_xmpp_in, |
1293 | 14 | { |
1294 | 14 | "In", "xmpp.in", FT_BOOLEAN, BASE_NONE, NULL, 0x0, |
1295 | 14 | "Ingoing packet", HFILL |
1296 | 14 | }}, |
1297 | 14 | { &hf_xmpp_ibb, |
1298 | 14 | { |
1299 | 14 | "IBB SESSION", "xmpp.ibb", FT_STRING, BASE_NONE, NULL, 0x0, |
1300 | 14 | "In-Band Bytestreams session", HFILL |
1301 | 14 | }}, |
1302 | 14 | { &hf_xmpp_jingle_session, |
1303 | 14 | { |
1304 | 14 | "JINGLE SESSION", "xmpp.jingle_session", FT_STRING, BASE_NONE, NULL, 0x0, |
1305 | 14 | "Jingle SID", HFILL |
1306 | 14 | }}, |
1307 | 14 | { &hf_xmpp_ping, |
1308 | 14 | { |
1309 | 14 | "PING", "xmpp.ping", FT_NONE, BASE_NONE, NULL, 0x0, |
1310 | 14 | "urn:xmpp:ping", HFILL |
1311 | 14 | }}, |
1312 | 14 | { &hf_xmpp_hashes, |
1313 | 14 | { |
1314 | 14 | "HASHES", "xmpp.hashes", FT_NONE, BASE_NONE, NULL, 0x0, |
1315 | 14 | "urn:xmpp:hashes:0", HFILL |
1316 | 14 | }}, |
1317 | 14 | { &hf_xmpp_jitsi_inputevt, |
1318 | 14 | { |
1319 | 14 | "INPUTEVT", "xmpp.inputevt", FT_NONE, BASE_NONE, NULL, 0x0, |
1320 | 14 | "http://jitsi.org/protocol/inputevt", HFILL |
1321 | 14 | }}, |
1322 | 14 | { &hf_xmpp_jitsi_inputevt_rmt_ctrl, |
1323 | 14 | { |
1324 | 14 | "REMOTE-CONTROL", "xmpp.inputevt.remote-control", FT_NONE, BASE_NONE, NULL, 0x0, |
1325 | 14 | "http://jitsi.org/protocol/inputevt remote-control", HFILL |
1326 | 14 | }}, |
1327 | 14 | }; |
1328 | | |
1329 | 14 | static int * ett[] = { |
1330 | 14 | &ett_xmpp, |
1331 | 14 | &ett_xmpp_iq, |
1332 | 14 | &ett_xmpp_query, |
1333 | 14 | &ett_xmpp_query_item, |
1334 | 14 | &ett_xmpp_query_identity, |
1335 | 14 | &ett_xmpp_query_feature, |
1336 | 14 | &ett_xmpp_query_streamhost, |
1337 | 14 | &ett_xmpp_query_streamhost_used, |
1338 | 14 | &ett_xmpp_query_udpsuccess, |
1339 | 14 | &ett_xmpp_iq_error, |
1340 | 14 | &ett_xmpp_iq_bind, |
1341 | 14 | &ett_xmpp_iq_session, |
1342 | 14 | &ett_xmpp_vcard, |
1343 | 14 | &ett_xmpp_vcard_x_update, |
1344 | 14 | &ett_xmpp_jingle, |
1345 | 14 | &ett_xmpp_jingle_content, |
1346 | 14 | &ett_xmpp_jingle_content_description, |
1347 | 14 | &ett_xmpp_jingle_cont_desc_payload, |
1348 | 14 | &ett_xmpp_jingle_cont_desc_payload_param, |
1349 | 14 | &ett_xmpp_jingle_cont_desc_enc, |
1350 | 14 | &ett_xmpp_jingle_cont_desc_enc_zrtp_hash, |
1351 | 14 | &ett_xmpp_jingle_cont_desc_enc_crypto, |
1352 | 14 | &ett_xmpp_jingle_cont_desc_bandwidth, |
1353 | 14 | &ett_xmpp_jingle_cont_desc_rtp_hdr, |
1354 | 14 | &ett_xmpp_jingle_cont_trans, |
1355 | 14 | &ett_xmpp_jingle_cont_trans_cand, |
1356 | 14 | &ett_xmpp_jingle_cont_trans_rem_cand, |
1357 | 14 | &ett_xmpp_jingle_reason, |
1358 | 14 | &ett_xmpp_jingle_rtp_info, |
1359 | 14 | &ett_xmpp_services, |
1360 | 14 | &ett_xmpp_services_relay, |
1361 | 14 | &ett_xmpp_channel, |
1362 | 14 | &ett_xmpp_si, |
1363 | 14 | &ett_xmpp_si_file, |
1364 | 14 | &ett_xmpp_si_file_range, |
1365 | 14 | &ett_xmpp_iq_feature_neg, |
1366 | 14 | &ett_xmpp_x_data, |
1367 | 14 | &ett_xmpp_x_data_field, |
1368 | 14 | &ett_xmpp_x_data_field_value, |
1369 | 14 | &ett_xmpp_ibb_open, |
1370 | 14 | &ett_xmpp_ibb_close, |
1371 | 14 | &ett_xmpp_ibb_data, |
1372 | 14 | &ett_xmpp_delay, |
1373 | 14 | &ett_xmpp_x_event, |
1374 | 14 | &ett_xmpp_message, |
1375 | 14 | &ett_xmpp_message_thread, |
1376 | 14 | &ett_xmpp_message_subject, |
1377 | 14 | &ett_xmpp_message_body, |
1378 | 14 | &ett_xmpp_presence, |
1379 | 14 | &ett_xmpp_presence_status, |
1380 | 14 | &ett_xmpp_presence_caps, |
1381 | 14 | &ett_xmpp_auth, |
1382 | 14 | &ett_xmpp_challenge, |
1383 | 14 | &ett_xmpp_response, |
1384 | 14 | &ett_xmpp_success, |
1385 | 14 | &ett_xmpp_failure, |
1386 | 14 | &ett_xmpp_muc_x, |
1387 | 14 | &ett_xmpp_muc_hist, |
1388 | 14 | &ett_xmpp_muc_user_x, |
1389 | 14 | &ett_xmpp_muc_user_item, |
1390 | 14 | &ett_xmpp_muc_user_invite, |
1391 | 14 | &ett_xmpp_gtalk_session, |
1392 | 14 | &ett_xmpp_gtalk_session_desc, |
1393 | 14 | &ett_xmpp_gtalk_session_desc_payload, |
1394 | 14 | &ett_xmpp_gtalk_session_cand, |
1395 | 14 | &ett_xmpp_gtalk_session_reason, |
1396 | 14 | &ett_xmpp_gtalk_jingleinfo_stun, |
1397 | 14 | &ett_xmpp_gtalk_jingleinfo_server, |
1398 | 14 | &ett_xmpp_gtalk_jingleinfo_relay, |
1399 | 14 | &ett_xmpp_gtalk_jingleinfo_relay_serv, |
1400 | 14 | &ett_xmpp_gtalk_setting, |
1401 | 14 | &ett_xmpp_gtalk_nosave_x, |
1402 | 14 | &ett_xmpp_gtalk_mail_mailbox, |
1403 | 14 | &ett_xmpp_gtalk_mail_mail_info, |
1404 | 14 | &ett_xmpp_gtalk_mail_senders, |
1405 | 14 | &ett_xmpp_gtalk_mail_sender, |
1406 | 14 | &ett_xmpp_gtalk_status_status_list, |
1407 | 14 | &ett_xmpp_conf_info, |
1408 | 14 | &ett_xmpp_conf_desc, |
1409 | 14 | &ett_xmpp_conf_state, |
1410 | 14 | &ett_xmpp_conf_users, |
1411 | 14 | &ett_xmpp_conf_user, |
1412 | 14 | &ett_xmpp_conf_endpoint, |
1413 | 14 | &ett_xmpp_conf_media, |
1414 | 14 | &ett_xmpp_gtalk_transport_p2p, |
1415 | 14 | &ett_xmpp_gtalk_transport_p2p_cand, |
1416 | 14 | &ett_xmpp_ping, |
1417 | 14 | &ett_xmpp_hashes_hash, |
1418 | 14 | &ett_xmpp_hashes, |
1419 | 14 | &ett_xmpp_jingle_file_transfer_offer, |
1420 | 14 | &ett_xmpp_jingle_file_transfer_request, |
1421 | 14 | &ett_xmpp_jingle_file_transfer_received, |
1422 | 14 | &ett_xmpp_jingle_file_transfer_abort, |
1423 | 14 | &ett_xmpp_jingle_file_transfer_checksum, |
1424 | 14 | &ett_xmpp_jingle_file_transfer_file, |
1425 | 14 | &ett_xmpp_jitsi_inputevt, |
1426 | 14 | &ett_xmpp_jitsi_inputevt_rmt_ctrl, |
1427 | 14 | &ett_xmpp_stream, |
1428 | 14 | &ett_xmpp_features, |
1429 | 14 | &ett_xmpp_features_mechanisms, |
1430 | 14 | &ett_xmpp_starttls, |
1431 | 14 | &ett_xmpp_proceed, |
1432 | 14 | }; |
1433 | | |
1434 | 14 | static ei_register_info ei[] = { |
1435 | 14 | { &ei_xmpp_xml_disabled, { "xmpp.xml_disabled", PI_UNDECODED, PI_WARN, "XML dissector disabled, can't dissect XMPP", EXPFILL }}, |
1436 | 14 | { &ei_xmpp_packet_unknown, { "xmpp.packet_unknown", PI_UNDECODED, PI_NOTE, "Unknown packet", EXPFILL }}, |
1437 | 14 | { &ei_xmpp_packet_without_response, { "xmpp.packet_without_response", PI_PROTOCOL, PI_CHAT, "Packet without response", EXPFILL }}, |
1438 | 14 | { &ei_xmpp_response, { "xmpp.response", PI_RESPONSE_CODE, PI_CHAT, "RESPONSE", EXPFILL }}, |
1439 | 14 | { &ei_xmpp_challenge, { "xmpp.challenge", PI_RESPONSE_CODE, PI_CHAT, "CHALLENGE", EXPFILL }}, |
1440 | 14 | { &ei_xmpp_success, { "xmpp.success", PI_RESPONSE_CODE, PI_CHAT, "SUCCESS", EXPFILL }}, |
1441 | 14 | { &ei_xmpp_starttls_already_in_frame, { "xmpp.starttls.already_in_frame", PI_PROTOCOL, PI_WARN, "Already saw STARTTLS in frame X", EXPFILL }}, |
1442 | 14 | { &ei_xmpp_starttls_missing, { "xmpp.starttls.missing", PI_PROTOCOL, PI_WARN, "Haven't seen a STARTTLS, did the capture start in the middle of a session?", EXPFILL }}, |
1443 | 14 | { &ei_xmpp_proceed_already_in_frame, { "xmpp.proceed.already_in_frame", PI_PROTOCOL, PI_WARN, "Already saw PROCEED in frame X", EXPFILL }}, |
1444 | 14 | { &ei_xmpp_unknown_element, { "xmpp.unknown.element", PI_UNDECODED, PI_NOTE, "Unknown element", EXPFILL }}, |
1445 | 14 | { &ei_xmpp_unknown_attribute, { "xmpp.unknown.attribute", PI_UNDECODED, PI_NOTE, "Unknown attribute", EXPFILL }}, |
1446 | 14 | { &ei_xmpp_required_attribute, { "xmpp.required_attribute", PI_PROTOCOL, PI_WARN, "Required attribute doesn't appear", EXPFILL }}, |
1447 | 14 | { &ei_xmpp_field_unexpected_value, { "xmpp.field.unexpected_value", PI_PROTOCOL, PI_WARN, "Field has unexpected value", EXPFILL }}, |
1448 | 14 | }; |
1449 | | |
1450 | 14 | module_t *xmpp_module; |
1451 | 14 | expert_module_t* expert_xmpp; |
1452 | | |
1453 | 14 | static int* ett_unknown_ptr[ETT_UNKNOWN_LEN]; |
1454 | 14 | int i; |
1455 | 294 | for(i=0;i<ETT_UNKNOWN_LEN;i++) |
1456 | 280 | { |
1457 | 280 | ett_unknown_ptr[i] = &ett_unknown[i]; |
1458 | 280 | } |
1459 | | |
1460 | 14 | proto_xmpp = proto_register_protocol("XMPP Protocol", "XMPP", "xmpp"); |
1461 | | |
1462 | 14 | xmpp_module = prefs_register_protocol(proto_xmpp, NULL); |
1463 | 14 | prefs_register_bool_preference(xmpp_module, "desegment", |
1464 | 14 | "Reassemble XMPP messages", |
1465 | 14 | "Whether the XMPP dissector should reassemble messages. " |
1466 | 14 | "To use this option, you must also enable" |
1467 | 14 | " \"Allow subdissectors to reassemble TCP streams\"" |
1468 | 14 | " in the TCP protocol settings", |
1469 | 14 | &xmpp_desegment); |
1470 | | |
1471 | 14 | proto_register_field_array(proto_xmpp, hf, array_length(hf)); |
1472 | 14 | proto_register_subtree_array(ett, array_length(ett)); |
1473 | 14 | proto_register_subtree_array(ett_unknown_ptr, array_length(ett_unknown_ptr)); |
1474 | 14 | expert_xmpp = expert_register_protocol(proto_xmpp); |
1475 | 14 | expert_register_field_array(expert_xmpp, ei, array_length(ei)); |
1476 | | |
1477 | 14 | xmpp_handle = register_dissector("xmpp", dissect_xmpp, proto_xmpp); |
1478 | | |
1479 | 14 | xmpp_init_parsers(); |
1480 | 14 | } |
1481 | | |
1482 | | void |
1483 | 14 | proto_reg_handoff_xmpp(void) { |
1484 | 14 | xml_handle = find_dissector_add_dependency("xml", proto_xmpp); |
1485 | | |
1486 | 14 | dissector_add_uint_with_preference("tcp.port", XMPP_PORT, xmpp_handle); |
1487 | | |
1488 | 14 | } |
1489 | | /* |
1490 | | * Editor modelines - https://www.wireshark.org/tools/modelines.html |
1491 | | * |
1492 | | * Local variables: |
1493 | | * c-basic-offset: 4 |
1494 | | * tab-width: 8 |
1495 | | * indent-tabs-mode: nil |
1496 | | * End: |
1497 | | * |
1498 | | * ex: set shiftwidth=4 tabstop=8 expandtab: |
1499 | | * :indentSize=4:tabSize=8:noTabs=true: |
1500 | | */ |