Commit Graph

78 Commits

Author SHA1 Message Date
John Thacker 5c15ebb9a2 prefs: Convert most RTP dissectors to use "auto" PT preferences
Similar to commit 2eb7b05b8c,
replace the RTP payload type preferences with automatic
dissectors.

This reduces the number of preference module callbacks.
2022-07-31 07:37:11 +00:00
John Thacker 18ffd52e8e RTP: Make Decode As handling consistent across subdissectors
RTP has two dissector tables, one directly associated with payload types, and
one which is associated with strings that appear in SDP commands. This makes
all dissectors that are registered as a dynamic payload type that can be
configured by SDP appear as a Decode As option for the RTP PT table.

Some protocols were registered in the table for configuration by SDP but
had no way to register with the rtp.pt table. These include EVRC, H.223,
and v150fw.

Other protocols had a long standing preference to set a dynamic payload type,
but they still did not appear in the Decode As menu unless that preference
was changed from the default, largely because of the way that the preference
was not actually registered with the rtp.pt table unless it had a value in
the dynamic payload type range. These include EVS, H.263P, H.264, H.265,
ISMACryp, IuUP, LAPD, MP4V-ES, RTP-MIDI, and VP8.

RFC 3551 says that not just the dynamic payload types, but also the unassigned
and even the statically assigned payload types MAY be dynamically reassigned as
necessary, so this patch also allows these preferences to be set for payload
types less than 96. The only payload type not allowed is 0 (which RFCs 3551 and
7007 say must be μ-law PCM), which is handy anyone for backwards compatibility
with preferences that used to be uints (where 0 meant disabled.)

All protcols which formerly used a uint preference are all converted to a
range preference, and the text is changed to be similar for each. This works
in a backwards compatible fashion, and any defaults are maintained.

The patch also adds some of the dissector variants as PINOs so that they will
show up with distinct names in the Decode As menus, and changes some of the
protocol short names so that the entry in Decode As is clearer and matches
what is used for other similar protocols.

Change-Id: I68627b5c3e495d9fc813d88208f3b62e47e0c4de
Reviewed-on: https://code.wireshark.org/review/37396
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-06-12 06:06:21 +00:00
Martin Mathieson d70a4a9321 Standardise IETF RFC and Draft URLs in dissectors.
Prefer:
- html (rather than txt)
- https

Also includes the script check_dissector_urls.py,
that can be used to find links in code and test them.

Change-Id: Iafd8bb8948674a38ad5232bf5b5432ffb2b1251b
Reviewed-on: https://code.wireshark.org/review/36821
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2020-04-13 14:58:48 +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
Gerald Combs 8d3ac3af86 epan: Convert our PROTO_ITEM_ macros to inline functions.
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>
2019-04-04 04:03:38 +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 ea97b3364c Add AMR WB pino to make Decode As happy.
Change-Id: I7150db30ce52ab4398ed977197f200070fca1d8c
Reviewed-on: https://code.wireshark.org/review/24270
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-11-07 03:58:50 +00:00
AndersBroman 33d28030b1 [AMR] Change the Payload type preference to a range and have separate
ranges for AMR and AMR-WB.

Change-Id: If5dca10b226a09168f1b1f834d97b826f8b777d6
Reviewed-on: https://code.wireshark.org/review/24105
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-10-27 15:47:24 +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
Joerg Mayer 8f3ad91905 Fix some warnings/errors of type
git/epan/dissectors/packet-a21.c:478:25: error: 'item' was marked unused but was used
      [-Werror,-Wused-but-marked-unused]
        proto_item_append_text(item, "%s", val_to_str_const(event_id, a21_event_vals, "Unknown"));
                               ^
Added manual change id because file-jpeg.c forced the use of commit -n

Change-Id: Iffff53d6253758c8454d9583f0a11f317c8390cb

Fix warnings/errors of type:
git/epan/dissectors/packet-ax25-kiss.c:205:52: error: 'pseudo_header' was marked unused but was
      used [-Werror,-Wused-but-marked-unused]
                        return capture_ax25( pd, l_offset, len, cpinfo, pseudo_header );

Fix checkhf warnings:
Unused entry: epan/dissectors/packet-artnet.c, hf_artnet_address_netswitch
Unused entry: epan/dissectors/packet-artnet.c, hf_artnet_address_subswitch
Unused entry: epan/dissectors/packet-artnet.c, hf_artnet_poll_reply_trailer
Unused entry: epan/dissectors/packet-artnet.c, hf_artnet_rdm_universe
Unused entry: epan/dissectors/packet-artnet.c, hf_artnet_tod_data_universe

Change-Id: Id1fa12afb97a8e9cd4ed0ea25351c3b2639c930e
Reviewed-on: https://code.wireshark.org/review/14667
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2016-03-28 12:46:31 +00:00
Guy Harris ab784d60b3 Rename new_dissector_t to dissector_t.
There are no longer any "old" dissectors, so "new_" is redundant.

Change-Id: I5fee51228c2a8562166f5991e1f30c2c697e45c8
Reviewed-on: https://code.wireshark.org/review/13273
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-14 01:03:10 +00:00
moshekaplan cd7026951b Fix a lot of typos and misspellings
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>
2016-01-08 20:04:56 +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 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 01f7356f85 register_dissector -> new_register_dissector
Picking off "easy" dissectors that only have one or two exit points at most.

Change-Id: I3d5e576b796556ef070bb36d8b55da0b175dcba8
Reviewed-on: https://code.wireshark.org/review/11805
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-11-13 17:44:24 +00:00
Martin Mathieson 596669f921 First batch of unincludes. Last attempt...
Change-Id: I3681462aeb98ca62ed3ec5eb226b2553317391a9
Reviewed-on: https://code.wireshark.org/review/5997
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-12-22 21:03:13 +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
AndersBroman f8c7a5bdff Add an RFC reference and fix deprecated API.
Change-Id: I8dcddc6bcbaf462a6e74b76764ea26b7f5b08920
Reviewed-on: https://code.wireshark.org/review/4996
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-10-30 15:00:28 +00:00
Michael Mann 29993d5266 Eliminate proto_tree_add_text from some dissectors.
Change-Id: Ie41ac30f8edaeee75b23717ef1d5147d804a65b3
Reviewed-on: https://code.wireshark.org/review/4074
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-09-11 06:33:23 +00:00
Michael Mann 188aa9a80e convert to proto_tree_add_subtree[_format]
Change-Id: Ib60ca75b7da8cfa21cfe2999c9b9448a02c332df
Reviewed-on: https://code.wireshark.org/review/2560
Tested-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-22 21:07:16 +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
Jakub Zawadzki c45475ab45 Fix [-Wmissing-prototypes]
svn path=/trunk/; revision=54135
2013-12-15 23:44:12 +00:00
Chris Maynard 8cacdfa8ce Reject the packet if data is NULL. Leave the DISSECTOR_ASSERT(actx != NULL) since get_asn1_ctx() also checks the signature.
svn path=/trunk/; revision=53953
2013-12-11 23:03:01 +00:00
Jakub Zawadzki ea73d4a55c Avoid calling find_dissector(), cache result of [new_]register_dissector()
svn path=/trunk/; revision=53353
2013-11-16 01:10:05 +00:00
Michael Mann 60e3e52a53 Have asn1_ctx_t passed into the "h245.gef.name" and "h245.gef.content" subdissectors instead of using pinfo->private_data.
svn path=/trunk/; revision=53055
2013-11-03 02:45:22 +00:00
Bill Meier 76d4b43a29 Minor whitespace, formatting & etc changes.
svn path=/trunk/; revision=52588
2013-10-13 18:14:59 +00:00
Michael Mann 98492c5619 expert_add_info + proto_tree_add_text = proto_tree_add_expert, where applicable
svn path=/trunk/; revision=50337
2013-07-03 02:59:31 +00:00
Michael Mann 2d37ec3cb0 Batch of filterable expert infos.
svn path=/trunk/; revision=49853
2013-06-09 03:28:05 +00:00
Anders Broman ae74ef756b From Neil Piercy:
AMR Frame Type uses wrong Value String.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8681
Applied by hand, patch not against trunk?

svn path=/trunk/; revision=49326
2013-05-16 05:08:16 +00:00
Jakub Zawadzki c5a71b1006 String passed to val_to_str() must have int format specifier (%u, %d, %x, and so on...).
Fix some cases (easy to grep) by call to val_to_str_const().

svn path=/trunk/; revision=47807
2013-02-21 21:04:59 +00:00
Jeff Morriss 0266cceef3 Make all enum_val_t's const.
svn path=/trunk/; revision=46292
2012-11-29 20:15:37 +00:00
Bill Meier 52b516cfa9 General cleanup:
- Calls to expert...() and col_...() should not be under 'if (tree)'
- Move proto_reg_handoff...() to the end of the file as per convention;
- Localize a few variables
- Fix some whitespace (e.g., convert what appear to be '4 space tabs' to spaces)

svn path=/trunk/; revision=45591
2012-10-16 19:05:49 +00:00
Michael Mann 7fb78ec5b9 replace proto_tree_add_text with filterable items and expert info to get a few dissectors off of the checkAPIs.pl "naughty" list
svn path=/trunk/; revision=45572
2012-10-16 03:07:06 +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 b18e880040 Update FSF address - part II.
svn path=/trunk/; revision=43538
2012-06-28 23:18:38 +00:00
Anders Broman 4d897229f6 bool value should be FALSE.
svn path=/trunk/; revision=42094
2012-04-16 13:29:57 +00:00
Bill Meier 794757ae8f For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.
Also: remove trailing whitespace for a number of files.

svn path=/trunk/; revision=39503
2011-10-21 02:10:19 +00:00
Bill Meier 2bf572bc41 Remove unneeded #includes: proto.h,tvbuff.h,value_string.h,stdlib.h,...
svn path=/trunk/; revision=38413
2011-08-08 17:59:32 +00:00
Anders Broman 0a65432f96 Use ENC_BIG_ENDIAN.
svn path=/trunk/; revision=38135
2011-07-20 14:09:19 +00:00
Alexis La Goutte 1b5e64fde6 Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=36708
2011-04-18 18:36:44 +00:00
Bill Meier c6c91f8e76 Don't assign to a proto_item * if the value won't be used: Coverity 829 & 830;
Fix a minor bug wherein a number of proto_tree_add_...() used the wrong tree: Coverity 831;
Remove some unneeded #includes.

svn path=/trunk/; revision=36456
2011-04-04 17:49:32 +00:00
Gerald Combs 1b0516a27e Fix various Visual C++ analysis warnings.
svn path=/trunk/; revision=35985
2011-02-17 19:43:16 +00:00
Anders Broman d53865f5e3 Get rid of check_col().
svn path=/trunk/; revision=35823
2011-02-04 16:13:44 +00:00
Guy Harris a8bc4a0d13 Rename the routines that handle dissector tables with unsigned integer
keys to have _uint in their names, to match the routines that handle
dissector tables with string keys.  (Using _port can confuse people into
thinking they're intended solely for use with TCP/UDP/etc. ports when,
in fact, they work better for things such as Ethernet types, where the
binding of particular values to particular protocols are a lot
stronger.)

svn path=/trunk/; revision=35224
2010-12-20 05:35:29 +00:00
Anders Broman cfc7e8849c Fix a couple of cut-n-paste errors.
svn path=/trunk/; revision=34865
2010-11-14 09:57:42 +00:00
Anders Broman 9afb5801bc Fix a typo.
svn path=/trunk/; revision=34863
2010-11-13 20:09:01 +00:00
Anders Broman 2c042dcd15 Use value_string_ext.
svn path=/trunk/; revision=34845
2010-11-11 21:18:15 +00:00
Bill Meier 09764dd969 Remove unneeded #include <stdio.h>
svn path=/trunk/; revision=32367
2010-04-03 21:55:23 +00:00