Commit Graph

148 Commits

Author SHA1 Message Date
Michael Mann d1d5bf121e Replace proto_tree_add_text in dissector header files where it was used in a macro that should be expert info.
Change-Id: I045368a0a91586231fc4b1e2700c2275088b76af
Reviewed-on: https://code.wireshark.org/review/6244
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-02 22:11:34 +00:00
Martin Mathieson 48db2548a9 Deleting unneccessary #includes from dissectors.
Second batch (packet-eth.c -> packet-icmpv6.d).

Will look at cleaning up and committing script afterwards.

Change-Id: I14295758b81a59115d8c88899f166cc3d5d17594
Reviewed-on: https://code.wireshark.org/review/6013
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-12-23 12:22:54 +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
Alexis La Goutte 772fbfb98b GSM a BSSMAP : fix warning: no previous prototype for 'dissect_bssmap' [-Wmissing-prototypes]
Change-Id: Ibc03864498cb88e93cb3f774d1f4987aa10dd32e
Reviewed-on: https://code.wireshark.org/review/5720
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-12-11 12:16:21 +00:00
Michael Mann ab8cad2816 Remove sccp_info member from packet_info structure.
sccp_msg_info_t* is now passed from SCCP dissector to its subdissectors through dissector data parameter.

Change-Id: Iab4aae58f8995e844f72e02e9f2de36e83589fc0
Reviewed-on: https://code.wireshark.org/review/5442
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-11-26 09:20:44 +00:00
AndersBroman 3ce0167467 [BSSMAP] de_mid() used with wrong length.
Change-Id: Ia64f254d85845ff39eacc7a339fdfa646ff9bb50
Reviewed-on: https://code.wireshark.org/review/5364
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-11-17 12:39:55 +00:00
AndersBroman 9952e7c331 [BSSMAP] Handle vendor specific encoding of "Layer 3 Message Contents".
Change-Id: I351bc0a6a8ae636b2f888a80f61e526096a61b64
Reviewed-on: https://code.wireshark.org/review/5295
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-11-14 11:57:45 +00:00
AndersBroman bba77c3fc0 tvb_length -> tvb_reported_length
Change-Id: I48b618008c8c8accd6f161bdc42e02906a4765b7
Reviewed-on: https://code.wireshark.org/review/5085
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-11-03 15:21:43 +00:00
Michael Mann 371e4ae1c7 Eliminate some proto_tree_add_text from GSM dissectors (so now there are no dissectors with 100+ proto_tree_add_text calls).
Add tfs_allocated_by_receiver_sender to tfs.h because it seems "popular" enough.

Change-Id: I478461d9b951a2c3e3aec6aaf996d95ba2c0feee
Reviewed-on: https://code.wireshark.org/review/4708
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-10-15 19:16:37 +00:00
Alexis La Goutte 43dffab8c8 GSM (bssmap): Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: I9fadd0edc26e5525cfdd15fc62062f19fef16d10
Reviewed-on: https://code.wireshark.org/review/4526
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-10-07 21:24:13 +00:00
Bill Meier 07698d536b Adjust some whitespace to match editor modelines.
Change-Id: Ia22cac3ebd7a454c156f98d967e6fd61f708a2b3
Reviewed-on: https://code.wireshark.org/review/4489
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-10-06 02:55:49 +00:00
Michael Mann 3d7e5a6b9d Eliminate proto_tree_add_text from packet-gsm_a_bssmap.c
Also remove other_decode_bitfield_value calls.

Change-Id: I056fe74fbd547b690cd5ed60e3e8777df9474704
Reviewed-on: https://code.wireshark.org/review/4468
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-10-04 20:23:08 +00:00
Bill Meier 9b181b97c6 Add editor modelines; Adjust whitespace; Remove boilerplate comments
Change-Id: I1f5f83ed441f6009125cf2cbe5023af04986898a
Reviewed-on: https://code.wireshark.org/review/4392
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-30 21:06:37 +00:00
Michael Mann 3df42e79a5 proto_tree_add_text cleanup
Create filters (expert and hf_) that have the "most bang for the buck" (ie have many instances for a single filter)

Change-Id: I61995e41c5b298df77e084e65cdf30ebe95da1e6
Reviewed-on: https://code.wireshark.org/review/4086
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-12 05:51:11 +00:00
Michael Mann fe4b7ee625 convert to proto_tree_add_subtree[_format]
Change-Id: If110de1e0555637264f86f1508858d569871a9c7
Reviewed-on: https://code.wireshark.org/review/2675
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-29 13:10:02 +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
Michael Mann 73217d9f3f tvb_new_subset -> tvb_new_subset_length when length parameters are equal.
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-06-07 15:41:07 +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 a6415ece0a Rename a couple of to_str functions to have ep_ in the name. This makes it
obvious that the returned string is ephemeral, and opens up the original names
in the API for versions that take a wmem pool (and thus can work in any scope).

svn path=/trunk/; revision=54249
2013-12-19 15:49:09 +00:00
Anders Broman a1f179c4f5 Make local functions static. Include *.h when needed.
svn path=/trunk/; revision=54164
2013-12-17 06:10:41 +00:00
Jakub Zawadzki c45475ab45 Fix [-Wmissing-prototypes]
svn path=/trunk/; revision=54135
2013-12-15 23:44:12 +00:00
Michael Mann 7221215cdc Add "rtp handle protection" inside srtp_add_address/rtp_add_address/bluetooth_add_address so dissectors calling it don't need to find "rtp" just for the handle check.
svn path=/trunk/; revision=53288
2013-11-12 22:04:03 +00:00
Jakub Zawadzki 1899903f69 Include <epan/to_str.h> only when needed.
svn path=/trunk/; revision=53189
2013-11-09 13:41:10 +00:00
Bill Meier 9874da2fcb #if 0 numerous "unused const variables" (mostly value-string-arrays);
Also; fix a few "set but not used" warnings.

svn path=/trunk/; revision=52780
2013-10-23 06:29:11 +00:00
Anders Broman 0fdbb8ca25 Dissect bssmap_reroute_cmd and bssmap_reroute_complete and
add new IE dissection to bssmap_cl3_info.

svn path=/trunk/; revision=52217
2013-09-25 21:06:05 +00:00
Pascal Quantin 84bf0acc00 Convert a few dissectors from EMEM to WMEM API
svn path=/trunk/; revision=51597
2013-08-30 14:49:55 +00:00
Anders Broman 22b3ead1c4 Add dissection of more IEs
svn path=/trunk/; revision=50912
2013-07-26 15:58:17 +00:00
Michael Mann ce537f6b94 Remove static packet_info *gpinfo and just use the packet_info provided by the function.
svn path=/trunk/; revision=49145
2013-05-03 14:54:39 +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
Chris Maynard 05308f904d Fix Coverity CID 281471: Logically dead code. (addr_type can only be 1 or 2 due to the return statement in the default case)
svn path=/trunk/; revision=48577
2013-03-27 02:46:45 +00:00
Anders Broman 88731fc9ef Set up RTCP conversation too.
svn path=/trunk/; revision=48442
2013-03-20 20:02:22 +00:00
Pascal Quantin 86eda54fe6 As suggested by Evan Huus, use extended value_strings
svn path=/trunk/; revision=48407
2013-03-18 22:21:53 +00:00
Pascal Quantin 94f330030d use enum values instead of hardcoded values
(as suggested by Sylvain Munaut in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8487)

svn path=/trunk/; revision=48397
2013-03-18 20:26:47 +00:00
Chris Maynard 181751aa74 Fix Coverity CID 280371: Logically dead code.
svn path=/trunk/; revision=47972
2013-03-01 06:52:25 +00:00
Pascal Quantin ae61fe0158 Try to fix dissection of GSM protocol family broken by r47209.
Using val_to_str seemed to be a good idea, but most value_string arrays were not properly filled or were using hacks.
(I hope I got everything right...)


svn path=/trunk/; revision=47218
2013-01-22 23:25:44 +00:00
Guy Harris 5c2a86ebc8 Update a comment.
svn path=/trunk/; revision=46795
2012-12-26 22:13:34 +00:00
Guy Harris 46e9f63fb2 Do array bounds checking.
svn path=/trunk/; revision=46793
2012-12-26 22:05:41 +00:00
Guy Harris 8ede6b7dc0 bssmap_msg_fcn[] is a dense array, not a sparse array, so *every* entry
must be filled in - even if we don't happen to have dissectors for
particular message types.  Just put NULL in there, so we don't index
past the end of the array, grab a random location in memory's contents
as a function pointer, and crash when we call through that pointer.

svn path=/trunk/; revision=46747
2012-12-25 23:14:05 +00:00
Anders Broman 45769c7975 Update MSG value string and add commented out info
svn path=/trunk/; revision=46207
2012-11-26 19:53:30 +00:00
Bill Meier 8e9db03197 Minor cleanup:
- revert incorrect replacement of FALSE by ENC_BIG_ENDIAN
  done a while back;
  [The incorrect use of ENC_BIG_ENDIAN was benign since
   ENC_BIG_ENDIAN is currently defined as 0x0000000];

svn path=/trunk/; revision=45651
2012-10-18 22:22:25 +00:00
Anders Broman ef4ecaa38b Use proto_tree_add_item() and value_strings in a couple of more places.
svn path=/trunk/; revision=45087
2012-09-24 08:38:45 +00:00
Anders Broman 201380fd33 Detected typos in speech codec value.
- Refactored code to use proto_tree_add_item() and use a value string.

svn path=/trunk/; revision=45044
2012-09-21 13:36:07 +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
Pascal Quantin 7da4784b25 Following r44648, revert part of r44162 and followups so as to have a top level gsm_a filter name
svn path=/trunk/; revision=44667
2012-08-25 13:32:41 +00:00
Pascal Quantin 6c8d938dd4 Follow-up of r44162: clean more filters
svn path=/trunk/; revision=44187
2012-08-01 14:07:18 +00:00
Michael Mann 175851fb40 Updated GSM dissectors display filters per checkfiltername.pl
Tried to provide consistency with GSM dissector (protocol) names, even if the filenames now don't match the dissector name.

svn path=/trunk/; revision=44162
2012-07-31 18:54:11 +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 4cc3cae627 - In INTERNAL HANDOVER COMMAND Circuit Identity Code is C(Coded optional in WS)
- be_speech_codec ( 3.2.2.104    Speech Codec) did not cover all codecs.

svn path=/trunk/; revision=43401
2012-06-20 07:59:20 +00:00