Commit Graph

40 Commits

Author SHA1 Message Date
Guy Harris 20800366dd HTTPS (almost) everywhere.
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-07-26 18:44:40 +00:00
Alexis La Goutte d56273a8d0 bfcp: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
Change-Id: I46cd2392022b5fb64e997c74650f6a2002f519c6
Reviewed-on: https://code.wireshark.org/review/27216
Reviewed-by: Ivan Nardi <nardi.ivan@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-01 10:18:41 +00:00
Ivan Nardi d7583cb713 BFCP: fix possible infinite loop
Bug: 14608
Change-Id: I483d7e79a974b7f2d41c6ea0771be7529a187ed3
Reviewed-on: https://code.wireshark.org/review/26950
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2018-04-20 10:44:23 +00:00
Dario Lombardo fe219637a6 dissectors: use SPDX identifiers.
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>
2018-02-12 16:49:58 +00:00
Michael Mann 2eb7b05b8c Convert most UDP dissectors to use "auto" preferences.
Similar to the "tcp.port" changes in I99604f95d426ad345f4b494598d94178b886eb67,
convert dissectors that use "udp.port".

More cleanup done on dissectors that use both TCP and UDP dissector
tables, so that less preference callbacks exist.

Change-Id: If07be9b9e850c244336a7069599cd554ce312dd3
Reviewed-on: https://code.wireshark.org/review/18120
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-10-13 02:51:18 +00:00
Michael Mann 268841f3e0 Combine Decode As and port preferences for tcp.port dissector table.
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-10-08 02:44:53 +00:00
Joerg Mayer 0c471e782f Fix more -Wused-but-marked-unused warnings/errors.
Change-Id: Ieb3e70a23c1a55b7ba60b1b32f159341adfe65b7
Reviewed-on: https://code.wireshark.org/review/14682
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2016-03-28 19:06:13 +00:00
Michael Mann 31a54708f4 new_register_dissector -> register_dissector for dissector directory.
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-12-09 12:38:06 +00:00
Michael Mann 2fe0fc5a1a Convert some TCP subdissectors to "new" style.
Change-Id: I28ce51f3c06f78b85792bce4a13ef39eb75d7890
Reviewed-on: https://code.wireshark.org/review/11648
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-09 15:59:59 +00:00
Michael Mann 21e5a950ad Remove all preferences related to enabling/disabling heuristic dissectors.
The preferences are still supported for backwards compatibility, but the heuristic_protos file has final say on the "preference" to enable/disable a heuristic dissector.

Also add parameter to heur_dissector_add() for the "default" enable/disable of a heuristic dissector. With this parameter, a few more (presumably weak) heuristic dissectors have been "registered" but of course default to being disabled.

Change-Id: I51bebb2146ef3fbb8418d4f5c7f2cb2b58003a22
Reviewed-on: https://code.wireshark.org/review/9610
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-17 17:12:22 +00:00
Michael Mann be7d295fbf Add "user presentable" and "unique string ids" to heuristic table entries.
This allows better presentation of heuristic dissectors to the end user.

Change-Id: I2ff3985ab914e83c2989880cc0c7b9904045b3f6
Reviewed-on: https://code.wireshark.org/review/9602
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-12 03:14:38 +00:00
AndersBroman 05c0152370 Replcae deprecated API tvb_length with tvb_reported_length or tvb_captured
length.

Change-Id: Id42f3409a32e202528d350f7afde7376e411fc51
Reviewed-on: https://code.wireshark.org/review/8076
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-04-15 15:22:42 +00:00
Bill Meier b5d7b7ab6e Cleanup use of #includes in non-generated epan/dissector/*.c
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-12-21 05:46:22 +00:00
Bill Meier bb5daa6ae9 Add editor modelines; Adjust whitespace as needed.
Change-Id: I391cdf80a6e4ae5b0f4068e0500a90d013588f8a
Reviewed-on: https://code.wireshark.org/review/4442
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-10-03 14:28:42 +00:00
Michael Mann 8a580b3e28 Make all "padding" fields filterable
Change-Id: Ic4e4d9142a9b05ef3b628fac2e8766014c5fccec
Reviewed-on: https://code.wireshark.org/review/4073
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-09-11 01:57:02 +00:00
Malcolm Walters 2a306f4b05 Fix for Bug 10240.
Include padding length in calculation of correct attribute length

Change-Id: I569c6a9e1be39e3bb997e797a094b80cdcba6b07
Reviewed-on: https://code.wireshark.org/review/2747
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-07-01 20:49:30 +00:00
Guy Harris ce3d2ff3de Rename dissector_add_handle() to dissector_add_for_decode_as().
Hopefully that name makes it clear what the routiner's purpose is, and
will encourage people to use it rather than using dissector_add_uint()
with a bogus integer value.

Change-Id: Ic5be456d0ad40b176aab01712ab7b13aed5de2a8
Reviewed-on: https://code.wireshark.org/review/2483
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-20 16:43:56 +00:00
Michael Mann 14824e6adf Revert "Fixup: tvb_* -> tvb_captured"
https://www.wireshark.org/lists/wireshark-dev/201406/msg00131.html

This reverts commit 246fe2ca4c.

Change-Id: Ib24bae0198c13a84bd7f731bf4af921212109a8f
Reviewed-on: https://code.wireshark.org/review/2430
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19 18:25:59 +00:00
Dario Lombardo 246fe2ca4c Fixup: tvb_* -> tvb_captured
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f
Reviewed-on: https://code.wireshark.org/review/2377
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-18 14:14:58 +00:00
Alexis La Goutte 296591399f Remove all $Id$ from top of file
(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>
2014-03-04 14:27:33 +00:00
Bill Meier 2ac134b3c5 whitespace fixes; mostly: remove trailing blanks
svn path=/trunk/; revision=52591
2013-10-13 19:56:52 +00:00
Michael Mann 9e3f9b449f expert_add_info_format_text -> expert_add_info_format
svn path=/trunk/; revision=51852
2013-09-09 00:44:09 +00:00
Jakub Zawadzki f4bcbeb9f2 Keep result of [new_]register_dissector in some dissectors. [2 of x]
(don't create new dissector handle if we can use already existing one)

svn path=/trunk/; revision=51159
2013-08-05 19:09:44 +00:00
Alexis La Goutte 0a8f75a63f Fix some warnings from fix-encoding-args tools.
svn path=/trunk/; revision=50367
2013-07-03 16:46:01 +00:00
Alexis La Goutte fb9d8134c6 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=50345
2013-07-03 16:42:35 +00:00
Michael Mann 7e8e5b347e Batch of filterable expert_infos.
svn path=/trunk/; revision=49581
2013-05-25 17:06:40 +00:00
Evan Huus 37600a157b Rename value string (and similar) functions to use a consistent pattern. This
was done using textual search+replace, not anything syntax-aware, so presumably
it got most comments as well (except where there were typos).

Use a consistent coding style, and make proper use of the WS_DLL_* defines.

Group the functions appropriately in the header.

I ended up getting rid of most of the explanatory comments since many of them
duplicated what was in the value_string.c file (and were out of sync with the
recent updates I made to those in r48633). Presumably most of the comments
should be in the .h file not the .c file, but there's enough churn ahead that
it's not worth fixing yet.

Part of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8467

svn path=/trunk/; revision=48634
2013-03-29 00:26:23 +00:00
Anders Broman b539916835 [-Wmissing-prototypes]
explicit casts.

svn path=/trunk/; revision=48293
2013-03-14 07:37:13 +00:00
Anders Broman dff339dd1e Set up BFCP conversations
svn path=/trunk/; revision=46165
2012-11-24 17:06:08 +00:00
Anders Broman a1ea2f91d8 Error: the name for hf_bfcp_queue_pos ("bfcp.queue_pos") has trailing space in packet-bfcp.c
svn path=/trunk/; revision=46157
2012-11-23 16:04:20 +00:00
Anders Broman 84582b0429 Update dissetion of the header flags.
svn path=/trunk/; revision=46156
2012-11-23 14:02:12 +00:00
Anders Broman a05cf8c4d2 Add dissection of attributes.
svn path=/trunk/; revision=46154
2012-11-23 13:44:31 +00:00
Jeff Morriss 2552c750e5 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45017
2012-09-20 02:03:38 +00:00
Jakub Zawadzki 5a8783f5b1 Initial commit to support yet another method of passing data between dissectors.
Add new parameter 'data' to heur_dissector_t and new_dissector_t, for now it's always NULL

svn path=/trunk/; revision=44860
2012-09-10 21:40:21 +00:00
Martin Mathieson 84182d3451 Fix VC code analaysis warning about definition of variable in inner
scope.

svn path=/trunk/; revision=44094
2012-07-28 22:35:11 +00:00
Bill Meier 3ef558ba7c (Minor) Localize a static variable;
svn path=/trunk/; revision=43973
2012-07-24 22:51:15 +00:00
Bill Meier 1b17369504 Fix: code under 'if(tree)' (in)directly calls sub-dissector/col_...()/expert...() fcns
svn path=/trunk/; revision=43226
2012-06-12 21:22:46 +00:00
Bill Meier 180f6edfa8 Minor cleanup:
- Add svn:keywords and svn;eol-style properties
- Move proto_reg_handoff...() to the end of the file as per convention;
- Use match_strval() instead of match_strval_idx() since idx not used;
- Use consistent indentation  & style.

svn path=/trunk/; revision=42216
2012-04-23 21:27:37 +00:00
pascal 3140c10fbb From Patrick White via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7061 :
Add UDP to BFCP dissector and dissect new primitives and attibutes
From me: add an expert info in case of invalid payload length to avoid a potential infinite loop

svn path=/trunk/; revision=42160
2012-04-20 14:41:34 +00:00
pascal bcd7b23435 From Nitinkumar Yemul:
Binary Floor Control Protocol (BFCP) dissector
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7061

svn path=/trunk/; revision=42028
2012-04-11 20:45:59 +00:00