aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-wsp.c
AgeCommit message (Collapse)AuthorFilesLines
2016-07-09packet-wsp.c: Fix infinite loop in add_headersMichael Mann1-0/+15
Bug: 12594 Change-Id: Id86d1e5f2db12871bc1b345721e79e57192f01e1 Reviewed-on: https://code.wireshark.org/review/16355 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-06-16qt: move free_stat_tables from SimpleStatisticsDialog::fillTree to ↵Dario Lombardo1-1/+2
~SimpleStatisticsDialog. Add a reference count to stat_tap_table_ui to prevent bad deallocations. Bug: 12437 Change-Id: Ib9b1f929d08a574c306dc755ec416ab94a3fd6d3 Reviewed-on: https://code.wireshark.org/review/15920 Reviewed-by: Peter Wu <peter@lekensteyn.nl> Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-05-26Remove some proto_item_append_stringMichael Mann1-26/+31
These calls to proto_item_append_string were not taking into account all of the special treatment needed to use it, so proto_item_append_text (or similar) was probably intended. Change-Id: I5d1f092f8162a87d30fc8dc694f6124dc81372b5 Reviewed-on: https://code.wireshark.org/review/15575 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-05-08Remove the MIBenum stuff from the WAP code.Guy Harris1-3/+4
MIBenum values are from an IANA registry, not a WAP specification; add <epan/iana_charsets.h> to declare the MIBenum -> Wireshark encoding mapper routine and the value_string_ext for MIBenum values, and epan/iana_charsets.c to define them. Change-Id: I6d9c82cd011bd5211c688322e6423de38e161f41 Reviewed-on: https://code.wireshark.org/review/15298 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-05-08Show MIBenum values for character sets as decimal.Guy Harris1-1/+1
http://www.iana.org/assignments/character-sets/character-sets.xhtml is the official IANA registry for character sets, including MIBenum values, and it shows MIBenum values in decimal, not hex, so show them in decimal, not hex. Change-Id: Id00a0d351a1f758401232aba621cc60aeccf360a Reviewed-on: https://code.wireshark.org/review/15292 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-03-20Manually add protocol dependencies derived from find_dissector.Michael Mann1-3/+3
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-17Associate dissector tables and heuristic subdissector lists with a protocol.Michael Mann1-1/+1
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-01-24Add the packet number to the packet_info structure, and use it.Guy Harris1-4/+4
That removes most of the uses of the frame number field in the frame_data structure. Change-Id: Ie22e4533e87f8360d7c0a61ca6ffb796cc233f22 Reviewed-on: https://code.wireshark.org/review/13509 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-29Rename new_stat_tap_ui to stat_tap_table_ui.Guy Harris1-3/+3
A "new" statistics tap UI is a statistics tap UI where the statistics are maintained as tables and common code handles the tables; what matters is the tables, not that it's "new". Change-Id: I7a0e63cfac98c24cd5e7dce973b9a0cc5b6a03ba Reviewed-on: https://code.wireshark.org/review/12897 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-29There's no "old" stat_tap_table, so remove "new_" from the name.Guy Harris1-7/+7
Change-Id: I1a0349d5d9d47210a97ff7a99fb358e59fd70e72 Reviewed-on: https://code.wireshark.org/review/12896 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-09new_register_dissector -> register_dissector for dissector directory.Michael Mann1-2/+2
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-09new_create_dissector_handle -> create_dissector_handle for dissector directory.Michael Mann1-2/+2
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-11-18create_dissector_handle -> new_create_dissector_handleMichael Mann1-7/+9
Picking off "easy" dissectors that only have one or two exit points at most. Change-Id: I9c7d1c092bbae896ec0c2832617891346927f2e1 Reviewed-on: https://code.wireshark.org/review/11932 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-11-14register_dissector -> new_register_dissectorMichael Mann1-6/+8
Picking off "easy" dissectors that only have one or two exit points at most. This concludes a "first pass" over the dissector directory. Change-Id: If5ce5484214be50fe541cba478da1de62e354297 Reviewed-on: https://code.wireshark.org/review/11830 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-04Don't include "file.h" if you don't need it.Guy Harris1-0/+2
It ends up dragging in libwireshark headers, which programs not linking with libwireshark shouldn't do. In particular, including <epan/address.h> causes some functions that refer to libwireshark functions to be defined if the compiler doesn't handle "static inline" the way GCC does, and you end up requiring libwireshark even though you shouldn't require it. Move plurality() to wsutil/str_util.h, so that non-libwireshark code can get it without include epan/packet.h. Fix includes as necessary. Change-Id: Ie4819719da4c2b349f61445112aa419e99b977d3 Reviewed-on: https://code.wireshark.org/review/11545 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-10-14Change proto_tree_add_ipv6() to take a struct e_in6_addr pointerJoão Valverde1-1/+1
tvb_get_ipv6() takes a struct e_in6_addr *, use that here too. Change-Id: Id8b368daa05c151a61d4bc01dc88c00da13e9c88 Reviewed-on: https://code.wireshark.org/review/10953 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: Balint Reczey <balint@balintreczey.hu> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-10-09WSP: Fix add_addresses()João Valverde1-2/+2
Change-Id: I25d84c725559f5f077dcc03fb425a89d87e90f55 Reviewed-on: https://code.wireshark.org/review/10897 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-09-01Convert the WSP stats to generic stat API.Gerald Combs1-0/+156
Add support for multiple tables to SimpleStatisticsDialog. Change-Id: I843d901db092d2f2856d3d1a16f29f85fb41374b Reviewed-on: https://code.wireshark.org/review/10339 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-21Remove deprecated tvb_length from a bunch of dissectorsEvan Huus1-1/+1
Change-Id: I5c777806cb1403062a9d85261149d722df57b239 Reviewed-on: https://code.wireshark.org/review/9005 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: Anders Broman <a.broman58@gmail.com>
2015-03-30WSP: Fix Dead Store (Dead assignement/Dead increment) warning found by ClangAlexis La Goutte1-21/+21
Change-Id: I1e046988ed0e21e4824a3021e43fb429ed5211b4 Reviewed-on: https://code.wireshark.org/review/7854 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-03-28wsp: fix format stringEvan Huus1-2/+2
I76f7515889727dc7fad27ac90ca96750384a46f3 made the format strings static using macros, but missed the fact that sprintf("%s foo", bar) should become (bar " foo") and not ("%s foo" bar). This caused a malformed value string fallback. Bug: 11092 Change-Id: Idba3c87a32a6b3c852e661a62e8cd9be6cad0904 Reviewed-on: https://code.wireshark.org/review/7836 Petri-Dish: Evan Huus <eapache@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Evan Huus <eapache@gmail.com>
2015-03-25Generate format strings at compile time.Guy Harris1-20/+20
This squelches some compiler warnings, with the addition of G_GNUC_PRINTF() calls. Change-Id: I76f7515889727dc7fad27ac90ca96750384a46f3 Reviewed-on: https://code.wireshark.org/review/7812 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-24Overhaul WSP dissector.Michael Mann1-1948/+1850
1. Remove proto_tree_add_text (the reason I started the update) 2. Add expert info (mostly related to proto_tree_add_text, but since I was in the neighborhood...) 3. Replace "big functions macros" with "small macro" + real function (for big .o size savings) 4. Remove DebugLog macro (intent seems to duplicate basic functionality of a step-through debugger) 5. Replace HF_EMPTY (and comparible macros) with -1 6. Move header handler array to remove need for many forward declarations. Change-Id: Ic5467289aae7d54e78c1fd65f93358387d6139aa Reviewed-on: https://code.wireshark.org/review/7799 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-12-21Cleanup use of #includes in non-generated epan/dissector/*.cBill Meier1-2/+0
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-21Have a heur_dissector_list_t be an opaque handle.Guy Harris1-1/+1
This allows dissector lists to be looked up by name, so they can be shared by multiple dissectors. (This means that there's no "udplite" heuristic dissector list, but there shouldn't be one - protocols can run atop UDP or UDPLite equally well, and they share a port namespace and uint dissector table, so they should share a heuristic dissector table as well.) Change-Id: Ifb2d2c294938c06d348a159adea7a57db8d770a7 Reviewed-on: https://code.wireshark.org/review/5936 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-13dissector_try_uint(_new) and dissector_try_string now return the number of ↵Pascal Quantin1-6/+6
bytes consumed Change-Id: I528ad736caee1f29e2f0abfc0afcca6587d74eca Reviewed-on: https://code.wireshark.org/review/5743 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-12-01Use proto_tree_add_bitmask for groups of proto_tree_add_boolean.Michael Mann1-44/+21
Part 3 of many, but this concludes the strict conversion to proto_tree_add_bitmask. Patches to follow with use proto_tree_add_bitmask_xxx (some functions still need to be written) Change-Id: Ic2435667c6a7f1d40602124e5044954d2a296180 Reviewed-on: https://code.wireshark.org/review/5553 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-11-25Have media dissector take its "media type parameter" from dissector data ↵Michael Mann1-16/+4
parameter instead of pinfo->private_data. Change-Id: I0a0cb0b4838bc4e55a759fb6031355892c220c8e Reviewed-on: https://code.wireshark.org/review/5461 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-10-19Remove unnecessary tvb_ensure_bytes_exist calls.Michael Mann1-124/+0
All of the calls removed are followed by proto_tree_add_xxx calls of the same offset/length of the tvb_ensure_bytes_exist call. The proto_tree_add_xxx calls should throw the exception, so we don't need the "double check". There are probably more calls that can be removed, these were just obvious as first glance, spurred mostly by noticing the (ab)use in packet-wsp.c Change-Id: I37cee347c8cf8ab0559e21562c802d3b37f4871e Reviewed-on: https://code.wireshark.org/review/4833 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-07-06convert to proto_tree_add_subtree[_format]Michael Mann1-8/+7
Change-Id: I3efa2a81ab2685cde6eae0a00b24520478a545ce Reviewed-on: https://code.wireshark.org/review/2900 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19Revert "Fixup: tvb_* -> tvb_captured"Michael Mann1-2/+2
https://www.wireshark.org/lists/wireshark-dev/201406/msg00131.html This reverts commit 246fe2ca4c67d8c98caa84e2f57694f6322e2f96. Change-Id: Ib24bae0198c13a84bd7f731bf4af921212109a8f Reviewed-on: https://code.wireshark.org/review/2430 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-18Fixup: tvb_* -> tvb_capturedDario Lombardo1-2/+2
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f Reviewed-on: https://code.wireshark.org/review/2377 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-18Fixup: tvb_get_string(z) -> tvb_get_string(z)_encDario Lombardo1-8/+8
Change-Id: I63a3704effe3fcab01a193dc39b6a22e9f1cf3fe Reviewed-on: https://code.wireshark.org/review/2376 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-16Convert a bunch of time_to_str functions to wmemEvan Huus1-8/+8
Change-Id: I24fe3cc4a3589dadc4528a77fe7ff13d06b1a983 Reviewed-on: https://code.wireshark.org/review/2245 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-07tvb_new_subset -> tvb_new_subset_length when length parameters are equal.Michael Mann1-16/+16
tvb_new_subset -> tvb_new_subset_remaining it appears that's what the intention is. Change-Id: I2334bbf3f10475b3c22391392fc8b6864454de2d Reviewed-on: https://code.wireshark.org/review/1999 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-05-21Change the signature of dissector_try_heuristic() to return hdtbl_entryAndersBroman1-4/+7
which can be used to call the found heuristic dissector on the next pass. Introduce call_heur_dissector_direct() to be used to call a heuristic dissector which accepted the frame on the first pass. Change-Id: I524edd717b7d92b510bd60acfeea686d5f2b4582 Reviewed-on: https://code.wireshark.org/review/1697 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
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>
2014-01-14Don't cast away constness.Guy Harris1-2/+2
svn path=/trunk/; revision=54775
2013-12-19Rename more to_str functions to have ep_ in the name if they return ephemeralEvan Huus1-8/+8
buffers. Remove two unused functions. svn path=/trunk/; revision=54250
2013-12-10- Forward declaration of register functions.Anders Broman1-0/+6
svn path=/trunk/; revision=53908
2013-11-09Include <epan/to_str.h> only when needed.Jakub Zawadzki1-0/+1
svn path=/trunk/; revision=53189
2013-11-02Require dissector_try_string to pass a data parameter to its subdissectors. ↵Michael Mann1-4/+4
There weren't that many calls, so might as well modify the function than create a need for dissector_try_string_new. svn path=/trunk/; revision=53049
2013-10-16In packet-wsp.c, don't use the get_long_integer macro where we only need theEvan Huus1-6/+6
very smallest part of its logic. Just call tvb_get_guint8 directly and check that the return is between 1 and 4. Properly fixes the set-but-unused and associated warnings that were showing up. svn path=/trunk/; revision=52648
2013-10-16Fix warnings found by Clang 5.0 (-Wself-assign and -Wparentheses-equality).Gerald Combs1-2/+2
Move code from ipv6-utils.h to packet-ipv6.c since that was the only place it was used. Comment out unused code. svn path=/trunk/; revision=52645
2013-10-16Fix a comment.Gerald Combs1-1/+1
svn path=/trunk/; revision=52644
2013-10-16Back out the previous commit. We'll have to find a different fix.Gerald Combs1-2/+0
svn path=/trunk/; revision=52643
2013-10-16Work around a self-assingment error picked up by Clang 5.0.Gerald Combs1-1/+3
svn path=/trunk/; revision=52642
2013-09-22More emem -> wmem conversion:Pascal Quantin1-5/+5
- tvb_get_g_stringz()/tvb_get_ephemeral_stringz()/tvb_get_seasonal_stringz() -> tvb_get_stringz() - tvb_get_g_stringz_enc()/tvb_get_ephemeral_stringz_enc() -> tvb_get_stringz_enc() - tvb_get_ephemeral_unicode_stringz() -> tvb_get_unicode_stringz() - tvb_bcd_dig_to_ep_str() -> tvb_bcd_dig_to_wmem_packet_str() - update docs accordingly svn path=/trunk/; revision=52180
2013-09-22emem -> wmem conversion:Pascal Quantin1-3/+3
- ep_tvb_get_bits() -> wmem_packet_tvb_get_bits() - tvb_g_memdup()/ep_tvb_memdup() -> tvb_memdup() - tvb_fake_unicode()/tvb_get_ephemeral_faked_unicode() -> tvb_get_faked_unicode() - tvb_get_g_string()/tvb_get_ephemeral_string()/tvb_get_seasonal_string() -> tvb_get_string() - tvb_get_g_unicode_string()/tvb_get_ephemeral_unicode_string() -> tvb_get_unicode_string() - tvb_get_ephemeral_string_enc() -> tvb_get_string_enc() - update docs accordingly svn path=/trunk/; revision=52172
2013-09-21Add _g_ to the names of functions that allocate glib memory. This is a bit moreEvan Huus1-1/+1
explicit, and frees up the "generic" names (like tvb_memdup) for new signatures that take the appropriate wmem pool. Majority of the conversion done with sed. svn path=/trunk/; revision=52164