Commit Graph

24 Commits

Author SHA1 Message Date
João Valverde 133b0c583f Move epan/wmem/wmem_scopes.h to epan/
This header was installed incorrectly to epan/wmem_scopes.h.

Instead of creating additional installation rules for a single
header in a subfolder (kept for backward compatibility) just
rename the standard "epan/wmem/wmem.h" include to
"epan/wmem_scopes.h" and fix the documentation.

Now the header is installed *correctly* to epan/wmem_scopes.h.
2021-07-26 14:56:11 +00:00
Martin Mathieson 11e919898c Set a few more dissector vars/funs to static.
These are the last of the easy ones to fix/set.
2021-02-15 09:20:58 +00:00
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
Anders Broman 96abc05815 Fix Wpointer-sign warnings.
Change-Id: I58383b280a04ea0f0f8185298459e07e47bf25e4
Reviewed-on: https://code.wireshark.org/review/33908
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-07-12 10:53:41 +00:00
Anders Broman 121a6fa6ae Fix Wpointer-sign warnings.
Change-Id: Ia7893c4c78b1f5fc124a0bb56ae47ed6ab514f6b
Reviewed-on: https://code.wireshark.org/review/33897
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-07-11 13:30:09 +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
Stig Bjørlykke d99112d393 Use col_append_str() for fixed strings
Change from col_append_fstr() to col_append_str() when
appending strings without formatting.

Change-Id: I8975704c246f2b9a1301ed5f96273aa9d61c6f44
Reviewed-on: https://code.wireshark.org/review/20857
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>
2017-04-03 05:32:17 +00:00
Peter Wu a2cf38305e c15ch: fix value_string termination
Change-Id: I305ec694e2eea75dd1826d3ae82b39d2716ef7c1
Reviewed-on: https://code.wireshark.org/review/20789
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-03-29 20:12:24 +00:00
Guy Harris 0ecfc7280c Use tvb_new_subset_remaining() rather than tvb_new_subset_length_caplen().
Any call of the form tvb_new_subset_length_caplen(tvb, offset, -1, -1)
should instead be tvb_new_subset_remaining(tvb, offset).

Change-Id: I4bc95b028103ea4fc82453ef3460c147d7ccabd6
Reviewed-on: https://code.wireshark.org/review/19598
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-01-10 06:40:45 +00:00
Guy Harris 7cd6906056 Rename tvb_new_subset() to tvb_new_subset_length_caplen().
This emphasizes that there is no such thing as *the* routine to
construct a subset tvbuff; you need to choose one of
tvb_new_subset_remaining() (if you want a new tvbuff that contains
everything past a certain point in an existing tvbuff),
tvb_new_subset_length() (if you want a subset that contains everything
past a certain point, for some number of bytes, in an existing tvbuff),
and tvb_new_subset_length_caplen() (for all other cases).

Many of the calls to tvb_new_subset_length_caplen() should really be
calling one of the other routines; that's the next step.  (This also
makes it easier to find the calls that need fixing.)

Change-Id: Ieb3d676d8cda535451c119487d7cd3b559221f2b
Reviewed-on: https://code.wireshark.org/review/19597
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-01-10 06:19:37 +00:00
Guy Harris a4c8ebc18b Don't do any Decode As stuff for dissector tables not used with Decode As.
Have all dissector tables have a "supports Decode As" flag, which
defaults to FALSE, and which is set to TRUE if a register_decode_as()
refers to it.

When adding a dissector to a dissector table with a given key, only add
it for Decode As if the dissector table supports it.

For non-FT_STRING dissector tables, always check for multiple entries
for the same protocol with different dissectors, and report an error if
we found them.

This means there's no need for the creator of a dissector table to
specify whether duplicates of that sort should be allowed - we always do
the check when registering something for "Decode As" (in a non-FT_STRING
dissector table), and just don't bother registering anything for "Decode
As" if the dissector table doesn't support "Decode As", so there's no
check done for those dissector tables.

Change-Id: I4a1fdea3bddc2af27a65cfbca23edc99b26c0eed
Reviewed-on: https://code.wireshark.org/review/17402
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-08-31 00:08:01 +00:00
Michael Mann 9bcac48403 Manually add protocol dependencies derived from find_dissector.
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-03-20 12:48:48 +00:00
Michael Mann e37275bfde Associate dissector tables and heuristic subdissector lists with a protocol.
This will make it easier to determine protocol dependencies.

Some LLC OUI dissector tables didn't have an associated protocol, so they were left without one (-1 used)

Change-Id: I6339f16476510ef3f393d6fb5d8946419bfb4b7d
Reviewed-on: https://code.wireshark.org/review/14446
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-17 00:05:17 +00:00
Michael Mann d1f5b376fa Resolve hf_ field name conflicts with protocol strings.
Change-Id: Ie719e2f14c6eaf536035ab30dcb40e91c431c6e4
Reviewed-on: https://code.wireshark.org/review/14061
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-02-22 13:32:01 +00:00
Michael Mann 443a7ed259 new_create_dissector_handle -> create_dissector_handle for dissector directory.
Some of the ASN.1 dissectors still generate a new_create_dissector_handle from the tool itself, so leave those for now.

Change-Id: Ic6e5803b1444d7ac24070949f5fd557909a5641f
Reviewed-on: https://code.wireshark.org/review/12484
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-09 12:37:36 +00:00
Michael Mann 74541a9596 Don't allow multiple registrations of a protocol in dissector tables.
The target here is the Decode As dialog where protocols have multiple registrations into a dissector table and that shows up as multiple entries in the Decode As dialog list with the same name so users are unsure which "dissector" they are choosing.

The "default" behavior (done in this commit) is to not allow duplicates for a dissector table, whether its part of Decode As or not.  It's just ENFORCED for Decode As.

Bug: 3949
Change-Id: Ibe14fa61aaeca0881f9cc39b78799e314b5e8127
Reviewed-on: https://code.wireshark.org/review/11405
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-04 12:39:40 +00:00
Bill Meier d3c7d6ed41 [c15ch] Trivial: Remove unneeded #include
Change-Id: I07db4f6e7dda81f3be1b828d42c08c385b6e8e27
Reviewed-on: https://code.wireshark.org/review/8968
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-06-18 00:49:23 +00:00
Bill Meier f95db69aa1 Add editor-modelines; Don't use tabwidth=4; Adjust whitespace.
Change-Id: I7c287b176002c48dee6ae44334ee9fad221b4cd3
Reviewed-on: https://code.wireshark.org/review/8816
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-06-08 04:47:48 +00:00
Alexis La Goutte 0437280a20 C15ch: fix o previous prototype for function [-Wmissing-prototypes]
Change-Id: Iaa3c12ca435bf628343216d2d951f50cc0ff2231
Reviewed-on: https://code.wireshark.org/review/8194
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: Anders Broman <a.broman58@gmail.com>
2015-04-26 06:50:07 +00:00
Alexis La Goutte d5e932f99f C15CH: fix unused (const) variable found by Clang
packet-c15ch.c:1523:22: warning: unused variable 'MIN_PM_VAL' [-Wunused-const-variable]
packet-c15ch.c:1611:22: warning: unused variable 'MIN_DIG_CKT_TEST_TRKPM_VAL' [-Wunused-const-variable]
packet-c15ch.c:3006:21: warning: unused variable 'FIRST_TASK_TYPE_INDEX' [-Wunused-const-variable]

Change-Id: I09ba83acc4515fe9818cd43f9ac2ec7fe7196bae
Reviewed-on: https://code.wireshark.org/review/8193
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-04-26 06:46:17 +00:00
Evan Huus e3ee6818eb c15ch: check packet sanity before allocating
The 'num_digits' parameter to add_digits_string_info_col can come straight from
the packet. Verify it is sane (e.g. the number of bytes required are actually
present) as otherwise we can try and allocate enourmous quantities of memory for
no reason.

Also clean up the routine; fix indenting, and simplify the loop variables.

Bug: 11148
Change-Id: I11052652f8d42fa2bb31f37e3c74523842bb3096
Reviewed-on: https://code.wireshark.org/review/8195
Reviewed-by: Evan Huus <eapache@gmail.com>
Petri-Dish: Evan Huus <eapache@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-04-25 23:50:23 +00:00
Guy Harris 49fbb788fc Use BASE_EXT_STRING for *all* value_string_exts.
Change-Id: Id78735d3b6205a143dd6af0926483f04429a4cd4
Reviewed-on: https://code.wireshark.org/review/8180
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-04-23 18:57:15 +00:00
Alexis La Goutte cc6c6db5e4 C15ch: try to make buildbot Happy
packet-c15ch.c:5798: warning: comparison of unsigned expression >= 0 is always true
packet-c15ch.c:5809: warning: comparison of unsigned expression < 0 is always false
packet-c15ch.c:5841: warning: comparison of unsigned expression < 0 is always false
packet-c15ch.c:5859: warning: comparison of unsigned expression < 0 is always false
packet-c15ch.c:5917: warning: comparison is always false due to limited range of data type

Change-Id: Ia12f83c070bc1b794581cd37e330c38b0bad0516
Reviewed-on: https://code.wireshark.org/review/8174
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-04-23 14:39:11 +00:00
Michael Mann 2665578aba Add C15 Call History Protocol dissection (C15ch) dissector
Bug: 11063
Change-Id: I3daa9e6a75e52df1587678bd78f42e4e46fe4509
Reviewed-on: https://code.wireshark.org/review/7557
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-04-23 11:45:01 +00:00