Commit Graph

43 Commits

Author SHA1 Message Date
Michael Mann 8b0e9c6672 Follow up for proto_tree_add_checksum.
Fill in the "gaps" so that all dissectors that verify checksums have both a
status and expert info field.

Also address comments from original proto_tree_add_checksum patch that didn't make it.

Ping-Bug: 8859
Change-Id: I2e6640108fd6bb218cb959fe9e4ba98a13e43a2f
Reviewed-on: https://code.wireshark.org/review/16590
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>
2016-07-27 03:40:02 +00:00
Michael Mann ad6fc87d64 Add proto_tree_add_checksum.
This is an attempt to standardize display/handling of checksum fields for all dissectors.
The main target is for dissectors that do validation, but dissectors that just report the
checksum were also included just to make them easier to find in the future.

Bug: 10620
Bug: 12058
Ping-Bug: 8859
Change-Id: Ia8abd86e42eaf8ed50de6b173409e914b17993bf
Reviewed-on: https://code.wireshark.org/review/16380
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-07-21 12:35:22 +00:00
Michael Mann 210dc9b301 new_create_dissector_handle -> create_dissector_handle for plugins.
Change-Id: I0d485b1337c669291ad58b6c096657ce2db353c8
Reviewed-on: https://code.wireshark.org/review/12516
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-11 03:42:52 +00:00
Michael Mann 3ca5e3ec7d create_dissector_handle -> new_create_dissector_handle for plugins
Was able to actually convert all calls to "new style"

Change-Id: If9916a4762d410f2ad12aa5431174d7462dc7ac4
Reviewed-on: https://code.wireshark.org/review/11941
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-18 17:44:49 +00:00
Martin Mathieson 88d62dffe8 Remove unneeded includes from plugins folder
Change-Id: Ifdad0fb786a97a6f84a64d442fcca0c20116552f
Reviewed-on: https://code.wireshark.org/review/7059
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2015-02-10 17:53:28 +00:00
Alexis La Goutte 7dfda8875a WIMAX: fix no previous prototype for ... [-Wmissing-prototypes]
Also comment the unused function wimax_decode_sub_dl_ul_map

Part 2...

Change-Id: I1836aa2851156e4f756c5697f86a142625d697c9
Reviewed-on: https://code.wireshark.org/review/6810
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-01-27 15:31:57 +00:00
Guy Harris a4019a357b Rename a variable to avoid a compiler warning.
(Thanks, IBM and AT&T.)

Change-Id: Ifcffd4937f90ca466c01ebc4f3e3bd8555a9b078
Reviewed-on: https://code.wireshark.org/review/6198
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-01 05:03:45 +00:00
Michael Mann 889c566b9a Eliminate proto_tree_add_text from WiMax plugin.
Most of this was done with a custom perl script that picked out the field names from the XBIT macro and generated an hf_ and filter (that was humanly tweaked from there).

Change-Id: I563db9f8ea216efe37322b784ab0daf25c038d9e
Reviewed-on: https://code.wireshark.org/review/6149
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>
2015-01-01 04:34:44 +00:00
Bill Meier 998a84774b plugins: Cleanup #includes
Change-Id: Ic839f2995532d68308f8b5908c185acc7acaaa9c
Mostly: remove '#include <glib/glib.h>' and certain
         other #includes already included in packet.h
Reviewed-on: https://code.wireshark.org/review/5971
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-22 05:00:20 +00:00
Anders Broman 3788097ac8 Revert "Fix warning: no previous prototype for ... [-Wmissing-prototypes]"
This reverts commit 9918435ed7.

Change-Id: I122b65ec59f48b8a21e2b43ccdad0ed146b0e78f
Reviewed-on: https://code.wireshark.org/review/3702
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-08-18 14:03:11 +00:00
Alexis La Goutte 9918435ed7 Fix warning: no previous prototype for ... [-Wmissing-prototypes]
Change-Id: If41ffdfa15fb24af3e6846f1cfc855eb6cfffb77
Reviewed-on: https://code.wireshark.org/review/3699
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-08-18 13:15:57 +00:00
Alexis La Goutte 305f36d711 Wimax Plugins: Fix indent (use tabs) and modelines
Change-Id: I27a976c9cac598be5a90412da171915181a784d3
Reviewed-on: https://code.wireshark.org/review/3656
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-08-17 02:29:29 +00:00
Michael Mann ede5a9d4c0 Convert tvb_get_ptr buffer access macros to use much safer tvb access macros.
Added a few filterable fields in the process of trying to figure out the macros.  Much more can be done to add many more filterable fields (and remove proto_tree_add_text calls hidden in the macros), but that'll be done some other time.

bug:10281
Change-Id: I9788f176c0e721ff4f243d4ecb79d7d0114fffc0
Reviewed-on: https://code.wireshark.org/review/3262
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-07-30 15:45:26 +00:00
Michael Mann e6c87fe6b1 convert to proto_tree_add_subtree[_format] for plugin dissectors
Change-Id: I13924c5a2f056688a42cdee25654d82c056b5f97
Reviewed-on: https://code.wireshark.org/review/2974
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-10 01:51:21 +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
Evan Huus a7ea59488d The wimax plugin primarily uses tvb_get_ptr buffer accesses instead of the
safe accessor functions, and it's all done via scary bit-twiddling macros to
boot.

Create the macros TVB_NIB_WORD and TVB_NIB_NIBBLE that (should) behave just
like the raw-pointer NIB_WORD and NIB_NIBBLE macros, except using the safe tvb
functions instead.

Replace two instances with the safe versions, which fixes an out-of-bounds
access caught by my valgrind fuzzer. If this doesn't break anything then we
should probably do a wholesale replacement at some point, but I'm not feeling
that adventurous at the moment.

svn path=/trunk/; revision=54951
2014-01-24 20:48:55 +00:00
Anders Broman 3cb2c58eaf Fix [-Wmissing-prototypes]
svn path=/trunk/; revision=54552
2014-01-02 11:27:10 +00:00
Bill Meier aa67dd156e Fix (using '#if 0') various [-Wunused-const-variable] warnings
svn path=/trunk/; revision=52794
2013-10-23 15:53:31 +00:00
Michael Mann 1ac3997acb Wimax dissector improvements:
1. Remove message type field from all MAC Management "sub"dissectors and place it in Mac Management subdissector itself.  This may cause backwards-compatibility issues (malformed packets) with third-party subdissectors of the MAC Management dissector, but it didn't make sense to have so many filters for a single enumerated value, especially when the various "protocol" filters covers many of them.

2. Removed some if(tree) checks as column info and calling other dissectors are sometimes executed underneath.  Some of this is in preparation for addressing bug 5349.

3. Make all dissector functions (and a few others) static, and use register_dissector() when necessary.

4. Convert generic decoder CRC errors into expert info, rather than have it be a "protocol" filter (it just looks funny that way)


In general, these dissectors seem "over-protocolized". I understand the need for all of the dissectors, but I don't know if they all need "protocol" status.

svn path=/trunk/; revision=52203
2013-09-24 18:45:39 +00:00
Michael Mann 6ceb84b10b Make dissectors register for their MAC Management Message Type and use dissector_try_uint to do any dissection. Many "outside" (third-party) message types appear to exist.
Have the makefiles do all the work setting up proto_register_<dissector> and proto_reg_handoff_<dissector>, rather than sprinkled throughout the dissectors with extern declarations.

More is coming to make more functions static (because of current makefile fixes) and cleanup MAC Management dissectors to remove unnecessary/duplicative code, but I wanted to get the build issues squared away.

svn path=/trunk/; revision=52167
2013-09-22 00:50:24 +00:00
Bill Meier f784806968 Comment out numerous unused hf_.... instances found by checkhf.
svn path=/trunk/; revision=47617
2013-02-10 20:52:21 +00:00
Jeff Morriss 3551a86c36 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45015
2012-09-20 01:29:52 +00:00
Jakub Zawadzki bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
Gerald Combs 4d30e72575 Fix a few scan-build warnings.
svn path=/trunk/; revision=42528
2012-05-09 23:08:47 +00:00
Bill Meier 02065b0981 Convert 'encoding' parameter of certain proto_tree_add_item() calls in plugin dissectors:
Specifically:  Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as
 the encoding parameter for proto_tree_add_item() calls which directly reference
 an item in hf[] which has a type of:
    FT_UINT8
    FT_UINT16
    FT_UINT24
    FT_UINT32
    FT_UINT64
    FT_INT8
    FT_INT16
    FT_INT24
    FT_INT32
    FT_INT64
    FT_FLOAT
    FT_DOUBLE


svn path=/trunk/; revision=39292
2011-10-06 14:46:34 +00:00
Anders Broman d6fda1f1f5 From Kluchnikov Ivan:
Wrong length of items in wimax Compressed DL-MAP and UL-MAP.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6067

svn path=/trunk/; revision=37890
2011-07-04 14:57:12 +00:00
Jaap Keuter c5c0a0d943 Use Wireshark standard marking for unused parameters.
svn path=/trunk/; revision=35590
2011-01-19 22:53:46 +00:00
Bill Meier 8589c2f11b Minor changes:
- Move proto_register...() to the end of the file as per convention;
- Move ett[] to be local to proto_register...();
- "if (...==-1)" not req'd in proto_register...();
- #include <moduleinfo.h> not req'd;
- Remove unneeded forward declarations.

svn path=/trunk/; revision=29296
2009-08-04 19:01:34 +00:00
Stig Bjørlykke 7f77783e20 From Kovarththanan Rajaratnam:
More header field info cleanup in plugins/* and epan/dissectors/*

svn path=/trunk/; revision=28811
2009-06-22 18:23:58 +00:00
Stig Bjørlykke f8c959dc8c From Kovarththanan Rajaratnam:
Move header field info declarations into function scope.

This is the first step. Another patch will be submitted which actually scrubs
the header field info declarations (remove empty blurbs, etc.)

svn path=/trunk/; revision=28797
2009-06-22 04:58:08 +00:00
Bill Meier 9a3563e807 Fix some typos and spelling (mostly in text strings)
svn path=/trunk/; revision=27085
2008-12-22 15:24:18 +00:00
Bill Meier a3a9ff5a2b #include <prefs.h> not required
svn path=/trunk/; revision=26103
2008-08-29 01:40:32 +00:00
Martin Mathieson 9c34677453 Fix HARQ_ULMAP_IE decoder padding error (bug 2738).
From Frank Wang.

svn path=/trunk/; revision=25815
2008-07-24 08:46:13 +00:00
Bill Meier f2fd24c9c0 Change C++ style comments to C style ...
svn path=/trunk/; revision=25762
2008-07-18 02:48:37 +00:00
Jaap Keuter 77c287a58c From Frank Wang:
The ULMAP decoder can get a wrong bit offset when decoding CQICH_Alloc_IE.
The finishing position shoud not pad to byte but pad to the length specified,
which can be nibble aligned.

svn path=/trunk/; revision=25703
2008-07-11 16:03:06 +00:00
Martin Mathieson 5283264092 Fix bug 2662 (ULMAP HARQ_ULMAP_IE decode error).
From Frank Wang.

I'd prefer to delete wrong code, but we'll see if anyone misses it.















svn path=/trunk/; revision=25675
2008-07-08 16:05:41 +00:00
Martin Mathieson d2036aca8a Try again to get labels matching function names.
svn path=/trunk/; revision=25529
2008-06-23 10:08:13 +00:00
Martin Mathieson 8d053ee86d Fix wimax UL-MAP ext IE decode error.
From Frank Wang (bug 2548).











svn path=/trunk/; revision=25528
2008-06-23 09:24:32 +00:00
Jörg Mayer 0c797861ba Warning fixes: function declaration isn’t a prototype
svn path=/trunk/; revision=23862
2007-12-14 15:14:40 +00:00
Gerald Combs 2a67c4d472 Change calls to g_ntohs, g_ntohl, g_htons, and g_htonl to their
epan/pint.h equivalents. Add warnings about trying to operate on tvb
data directly.

svn path=/trunk/; revision=23787
2007-12-06 18:53:58 +00:00
Gerald Combs 70510e21c8 Change each filter prefix to match the protocol name ("wmx"). Add a
"wmx" prefix to each sub-protocol. "wmx"-ize the preferences and
dissector registration.

svn path=/trunk/; revision=23660
2007-11-28 22:56:27 +00:00
Guy Harris 01844e151a Use tvb_reported_length() to get the amount of data we should look at;
the number of bytes in the packet or subset of the packet is the
reported length, tvb_length() just gives you the amount of that data
that was actually captured.

Include <glib.h>, not <gmodule.h>, even in plugins.

Fix the version numbers in the rc files.

svn path=/trunk/; revision=21960
2007-05-27 18:33:13 +00:00
Gerald Combs a491fec183 From Mike Harvey: Support for WiMAX and the WiMAX M2M encapsulation protocol.
Add support for WiMAX and M2M to various makefiles and installer files.  Add
basic support for M2M to randpkt.

svn path=/trunk/; revision=21945
2007-05-25 23:40:42 +00:00