aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-xmpp.c
AgeCommit message (Collapse)AuthorFilesLines
2019-07-26HTTPS (almost) everywhere.Guy Harris1-1/+1
Change all wireshark.org URLs to use https. Fix some broken links while we're at it. Change-Id: I161bf8eeca43b8027605acea666032da86f5ea1c Reviewed-on: https://code.wireshark.org/review/34089 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-04-04epan: Convert our PROTO_ITEM_ macros to inline functions.Gerald Combs1-1/+1
Convert our various PROTO_ITEM_ macros to inline functions and document them. Change-Id: I070b15d4f70d2189217a177ee8ba2740be36327c Reviewed-on: https://code.wireshark.org/review/32706 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-12dissectors: use SPDX identifiers.Dario Lombardo1-13/+1
Change-Id: I92c94448e6641716d03158a5f332c8b53709423a Reviewed-on: https://code.wireshark.org/review/25756 Petri-Dish: Dario Lombardo <lomato@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-10-08Combine Decode As and port preferences for tcp.port dissector table.Michael Mann1-1/+1
This patch introduces new APIs to allow dissectors to have a preference for a (TCP) port, but the underlying data is actually part of Decode As functionality. For now the APIs are intentionally separate from the regular APIs that register a dissector within a dissector table. It may be possible to eventually combine the two so that all dissectors that register with a dissector table have an opportunity to "automatically" have a preference to adjust the "table value" through the preferences dialog. The tcp.port dissector table was used as the guinea pig. This will eventually be expanded to other dissector tables as well (most notably UDP ports). Some dissectors that "shared" a TCP/UDP port preference were also converted. It also removed the need for some preference callback functions (mostly when the callback function was the proto_reg_handoff function) so there is cleanup around that. Dissectors that has a port preference whose default was 0 were switched to using the dissector_add_for_decode_as_with_preference API rather than dissector_add_uint_with_preference Also added comments for TCP ports used that aren't IANA registered. Change-Id: I99604f95d426ad345f4b494598d94178b886eb67 Reviewed-on: https://code.wireshark.org/review/17724 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-08-28xmpp: Improve stanza reassembly.Stig Bjørlykke1-5/+7
A XMPP stanza may be fragmented inside a conversation, so don't check for this only when starting a new conversation. Change-Id: I63b987184f52645e6c72c3c4155b39b7948de828 Reviewed-on: https://code.wireshark.org/review/17344 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-08-25xmpp: Add whitespace keepalive indicationStig Bjørlykke1-3/+8
RFC 6120 section 4.6.1 defines the use of a single whitespace as "whitespace keepalive", so indicate this in the Info column. Change-Id: I685431d91be2a37fbd66f8d1cdabe53f33092e93 Reviewed-on: https://code.wireshark.org/review/17323 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl> Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-03-20Manually add protocol dependencies derived from find_dissector.Michael Mann1-1/+1
Started by grepping call_dissector_with_data, call_dissector_only and call_dissector and traced the handles passed into them to a find_dissector within the dissector. Then replaced find_dissector with find_dissector_add_dependency and added the protocol id from the dissector. "data" dissector was not considered to be a dependency. Change-Id: I15d0d77301306587ef8e7af5876e74231816890d Reviewed-on: https://code.wireshark.org/review/14509 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-01-25Move the proto data stuff out of frame_data.[ch].Guy Harris1-0/+1
It's not tied to the frame_data structure any more, so it belongs by itself. Clean up some #includes while we're at it; in particular, frame_data.h doesn't use anything related to tvbuffs, so don't have it gratuitiously include tvbuff.h. Change-Id: Ic32922d4a3840bac47007c5d4c546b8842245e0c Reviewed-on: https://code.wireshark.org/review/13518 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-08Fix a lot of typos and misspellingsmoshekaplan1-6/+6
Change-Id: I8512cfa1d424f82a873a0e0e1d22c7b075fdd7f3 Reviewed-on: https://code.wireshark.org/review/13069 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-09new_register_dissector -> register_dissector for dissector directory.Michael Mann1-1/+1
Change-Id: Ie39ef054a4a942687bd079f3a4d8c2cc55d5f22c Reviewed-on: https://code.wireshark.org/review/12485 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-24Convert XMPP dissector to "new style".Michael Mann1-8/+9
Wasn't sure if the absence/disabling of the XML dissector should prevent this dissector from doing anything, but left the current implementation that allows it mostly because XMPP has an IANA registered TCP port. Change-Id: Ie08b262d611e4d9add9566f440e3d825d6b0b55c Reviewed-on: https://code.wireshark.org/review/12094 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-08-18Eliminate proto_tree_add_text from XMPP dissectors.Michael Mann1-1/+60
Change-Id: I32fdf085ef484d147d9f0b27c56efba41bb827bf Reviewed-on: https://code.wireshark.org/review/10086 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-09Fix STARTTLS handling in various dissectorsPeter Wu1-25/+1
This patch lets a dissector hand over control to the SSL dissector which simplifies dissector code ("TCP | App | SSL | App" becomes "TCP | SSL | App"). After this patch, all of the affected dissectors will now be dissected as SSL with its Application Data being treated as the protocol before STARTTLS. This was previously not the case because the port was not registered for dissection via ssl_dissector_add. The desegmentation issue within the MySQL dissector is now also gone. Convert some tvb_length[_remaining] users in pop and smtp as well. Tested against mysql-ssl.pcapng and mysql-ssl-larger.pcapng(*1), Tested against pop-ssl.pcapng (note: only first stream is decrypted, either the key after negotiation is wrong or there is a bug), Tested against smtp-ssl.pcapng and smtp2525-ssl.pcapng (with Decode As) and smtp-ssl.pcapng with filter "tcp.len>0", Tested against xmpp-ssl.pcapng, http://wiki.wireshark.org/SampleCaptures#SSL_with_decryption_keys *1) mysql-ssl-larger has MySQL dissector errors for the fragmented SSL packet, but reassembly seems to work. Needs further investigation. Bug: 9515 Change-Id: I408ef8ff30d9edc8954dab9b3615900666dfa932 Reviewed-on: https://code.wireshark.org/review/6981 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-25Deleting unnecessary #includes from dissectors.Martin Mathieson1-4/+0
Fifth batch (packet-rtp.c -> end). Will look at cleaning up and committing script afterwards. Change-Id: I8ed61dc941d98d3f7259a9d1f74e214eb7b4bfa2 Reviewed-on: https://code.wireshark.org/review/6052 Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-12-21Cleanup use of #includes in non-generated epan/dissector/*.cBill Meier1-9/+5
Specifically: - Set packet.h to be the first wireshark #include after config.h and "system" #includes. packet.h added as an #include in some cases when missing. - Remove some #includes included (directly/indirectly) in packet.h. E.g., glib.h. (Done only for those files including packet.h). - As needed, move "system" #includes to be after config.h and before wireshark #includes. - Rework various #include file specifications for consistency. - Misc. Change-Id: Ifaa1a14b50b69fbad38ea4838a49dfe595c54c95 Reviewed-on: https://code.wireshark.org/review/5923 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-11-26XML: pass XML structure to caller through p_(add|get)_proto_data functionsPascal Quantin1-4/+6
Since ge3a04bb data parameter is used for the media-type string Bug: 10729 Change-Id: I3df640079a8bf57f4bd86a1baa08cbf9a3a7e1b3 Reviewed-on: https://code.wireshark.org/review/5511 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-11-22Use dissector data to "return" XML data to XMPP dissector.Michael Mann1-3/+5
Change-Id: I9abdc8c3deed35131af1537733d624d5cfced182 Reviewed-on: https://code.wireshark.org/review/5443 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(Using sed : sed -i '/^ \* \$Id\$/,+1 d') Fix manually some typo (in export_object_dicom.c and crc16-plain.c) Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8 Reviewed-on: https://code.wireshark.org/review/497 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2013-12-10- Forward declaration of register functions.Anders Broman1-0/+3
svn path=/trunk/; revision=53901
2013-10-29From didier gautheron: remove redundant or use faster col_xxx functionsBill Meier1-2/+1
- when the text parameter is constant col_add_str() and col_set_str() are equivalent but col_set_str() is faster. - same for replace col_append_fstr and col_append_str - remove col_clear() when it's redundant: + before a col_set/col_add if the dissector can't throw an exception. - replace col_append() after a col_clear() with faster col_add... or col_set https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9344 svn path=/trunk/; revision=52948
2013-09-09expert_add_info_format_text -> expert_add_info_formatMichael Mann1-1/+1
svn path=/trunk/; revision=51852
2013-08-25Convert XMPP dissector suite to wmem.Evan Huus1-6/+6
svn path=/trunk/; revision=51514
2013-08-23Batch of filterable expert infos.Michael Mann1-22/+25
svn path=/trunk/; revision=51486
2013-08-05Keep result of [new_]register_dissector in some dissectors.Jakub Zawadzki1-7/+6
svn path=/trunk/; revision=51156
2013-06-30From David Richards via ↵Jeff Morriss1-4/+18
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8871 : TLS decryption fails when trying to decrypt XMPP sessions using start_tls as the port in the key list of the SSL preferences. Looking at the code, the XMPP dissector has 2 issues: 1) The crude XML element detection for XMPP segmentation is run before checking if the SSL dissector should be called. As a result, the SSL dissector is not called at the appropriate times. 2) The SSL dissector is called withoug resetting the desegment flags are not manipulated as the SMTP dissector does so segmented SSL packets are not properly reconstructed. Generally this causes the server hello not to be detected. A proposed patch to fix these issues is attached. svn path=/trunk/; revision=50272
2013-05-28Batch of filterable expert infos. This (mostly) completes the non-ASN.1 ↵Michael Mann1-53/+61
list of (built-in) dissectors that only had a small handful of add_expert_info_format calls. svn path=/trunk/; revision=49602
2013-03-19From beroset:Anders Broman1-2/+2
remove C++ incompatibilities https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 svn path=/trunk/; revision=48412
2013-02-22No need for static dissector_handle_t.Jakub Zawadzki1-3/+1
svn path=/trunk/; revision=47827
2012-12-05Fix numerous instances of a variable/parameter name "shadowing" a library ↵Bill Meier1-8/+8
function name; (At least some (gcc ?) compilers give a "shadow" warning for these). svn path=/trunk/; revision=46402
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-2/+0
svn path=/trunk/; revision=45017
2012-07-28Decode SSL streams in XMPP sessions. Fixes:Evan Huus1-7/+18
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3177 The logic is rather conservative for now, but I imagine false negatives are better than false positives for this sort of thing. svn path=/trunk/; revision=44088
2012-07-22The XMPP dissector was allocating a new parser for every packet and neverEvan Huus1-0/+2
freeing them. This was slow and leaked gobs of memory. Be like XML: allocate one parser during set-up and share it around. svn path=/trunk/; revision=43920
2012-07-16proto_tree_add_boolean() takes value not ENC_ flag.Jakub Zawadzki1-2/+2
svn path=/trunk/; revision=43747
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2012-05-21From Michael Mann:Anders Broman1-0/+8
Check for enabled XML dissecto. Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6625 xmpp decoder crashes when xml is disabled svn path=/trunk/; revision=42736
2012-01-14check_col() not req'd and other minor cleanups ....Bill Meier1-754/+752
svn path=/trunk/; revision=40503
2011-11-13Don't use generic shared function/typedef/struct names;Bill Meier1-18/+15
Remove unneeded #includes; Cleanup trailing whitespace. svn path=/trunk/; revision=39823
2011-11-12From Mariusz Okrój and Sebastien Vincent via ↵Alexis La Goutte1-97/+1388
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6225 Enhance XMPP Dissector XMPP is communication protocol that is based on XML. Existing Jabber dissector has only few filtering possibilities and displays packets in inconvenient way. This dissector is a result of cooperation with Jitsi community as Google Summer of Code project (http://www.jitsi.org/index.php/GSOC2011/XmppWireshark). From me : Add Mariusz Okrój in AUTHORS File Add Modelines information svn path=/trunk/; revision=39799
2011-10-21For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.Bill Meier1-2/+2
Also: remove trailing whitespace for a number of files. svn path=/trunk/; revision=39503
2011-09-06Rename Jabber -> XMPPAnders Broman1-0/+140
Ref http://xmpp.org/ https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5992 svn path=/trunk/; revision=38890