Commit Graph

328 Commits

Author SHA1 Message Date
Guy Harris 0b05086754 Apple calls it just "OS X" these days.
Change-Id: I98905988ceb394d27307d1cbe883d8fe95ac23e4
Reviewed-on: https://code.wireshark.org/review/11703
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-10 21:08:45 +00:00
Guy Harris 0162e54075 Clean up includes of unistd.h, fcntl.h, and sys/stat.h.
Have wsutil/file_util.h include them on UN*X, just as it includes io.h
on Windows, so we can have a rule of "if you do file operations, include
<wsutil/file_util.h> and use the routines in it".

Remove includes of unistd.h, fcntl.h, and sys/stat.h that aren't
necessary (whether because of the addition of them to wsutil/file_util.h
or because they weren't needed in the first place).

Change-Id: Ie241dd74deff284e39a5f690a297dbb6e1dc485f
Reviewed-on: https://code.wireshark.org/review/11619
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-07 21:52:23 +00:00
Gerald Combs 9f8d00c174 Add preferences for related packets and the scroll bar minimap.
Add gui.packet_list_show_related and gui.packet_list_show_minimap.
Show_related enables and disables the related packet delegate.
Show_minimap enables and disables the minimap. Start calling it the
"intelligent scroll bar" since that's the best suggestion for a name
I've seen so far.

Leave them out of the Appearance preference pane for now.

Change-Id: I5869c446fda5c8e62d6b1e49a74d63ba3b117b0f
Reviewed-on: https://code.wireshark.org/review/11332
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-10-27 23:28:56 +00:00
Peter Wu c647faa8a9 Fix various memleaks
Found by starting Wireshark within an empty profile, opening
Preferences, search for Protocol "IEEE 802.11" (because it has radio
buttons), then close everything again.

Many fixes are trivial, but the various recent_read_* functions in
recent.c were changed to return a boolean such that the result can
always be checked even if errno==0.

QButtonGroup leak was hinted by Clang Static Analyzer, all other
memleaks were found using ASAN/LSan.

Change-Id: Ia73f5d4c09d92f22e72377be59e23342f8ad7211
Reviewed-on: https://code.wireshark.org/review/10776
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: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-10-04 15:45:02 +00:00
Guy Harris 32e785f813 The official #define for 32-bit and 64-bit Windows is _WIN32.
It's _WIN32, with a leading underscore, not WIN32.  See, for example:

    https://sourceforge.net/p/predef/wiki/OperatingSystems/

and

    https://msdn.microsoft.com/en-us/library/b0084kay.aspx

*Some* environments may also define WIN32, but we shouldn't depend on
that.

Replace all-caps "WIN32" referring to Windows in comments and other text
with "Windows" or "Win32".  (The two are pretty much equivalent, these
days; nobody much cares about Win16, not that we ever ran on it, and
64-bit Windows is just a 64-bitified Win32.)

Change-Id: Id327bcd4b1e9baa4f27055eff08c2d9e594d6f70
Reviewed-on: https://code.wireshark.org/review/10367
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-09-02 22:59:10 +00:00
Stig Bjørlykke ecc4f756bd Added Reload Lua plugins.
This is initial support for reloading Lua plugins without
restarting the application.

Still todo:
- Deregister FileHandlers
- Support deregister ProtoField with existing abbrev (same_name_hfinfo)
- Add a progress dialog when reloading many plugins
- Search for memory leakages in wslua functions

Change-Id: I48870d8741251705ca15ffe1068613fcb0cb18c1
Reviewed-on: https://code.wireshark.org/review/5028
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-11 12:09:07 +00:00
Gerald Combs 9fd3bcc25e Add an elide mode preference for the Qt packet list.
Change-Id: I081cc1e9b2a0eea7f0a3ef1157561c50beb4c4db
Reviewed-on: https://code.wireshark.org/review/9902
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-08-06 21:06:34 +00:00
Hadriel Kaplan 190e313e9d DNS: move DNS name resolution pref to Name Resolution prefs
Move the boolean flag for using captured DNS packet info for name resolution
to the Name Resolution preferences settings, as it was rather surprising to
disable Name Resolution preferences and still have names being resolved. Also
disble them all if the '-n' command line switch is used, and re-enable it for
a 'd' character in the '-N' option.

Bug: 10337
Change-Id: Ie4d47bab0100db3360cc447cd3e446b2e39aa917
Reviewed-on: https://code.wireshark.org/review/9786
Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-07-25 17:05:01 +00:00
Michal Labedzki 1e487664bc Qt: Add option to back white line separator for packet list items
This uses one line (on bottom) of items and makes it white.
Seen in Wireshark on some configurations of GTK 2 on Linux,
so backports it to Qt for people who like it.

In my opinion it helps if you use packet list background colors
for frames and you have a lot of following frames with
the same background color.

Bug: 10954
Change-Id: Id8f58520d7224db4eb8181bcc04febd7416a8578
Reviewed-on: https://code.wireshark.org/review/7293
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-07-20 21:21:28 +00:00
Michael Mann 21e5a950ad Remove all preferences related to enabling/disabling heuristic dissectors.
The preferences are still supported for backwards compatibility, but the heuristic_protos file has final say on the "preference" to enable/disable a heuristic dissector.

Also add parameter to heur_dissector_add() for the "default" enable/disable of a heuristic dissector. With this parameter, a few more (presumably weak) heuristic dissectors have been "registered" but of course default to being disabled.

Change-Id: I51bebb2146ef3fbb8418d4f5c7f2cb2b58003a22
Reviewed-on: https://code.wireshark.org/review/9610
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-17 17:12:22 +00:00
Evan Huus 35399887f4 prefs: fix memory leak reading capture columns
Change-Id: I925ec3329cc099a5f3d2ae66e43b06fc52309dc8
Reviewed-on: https://code.wireshark.org/review/9504
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: Evan Huus <eapache@gmail.com>
2015-07-06 00:26:03 +00:00
Evan Huus e4f88dd6cb Fix a memory leak registering prefs
Built-in string prefs have to be dynamic, but get overwritten by the
registration routine, so we have to save and then free them after-the-fact.

Change-Id: Ib418b14296391dd198a8b49b0c99c5f697d8050f
Reviewed-on: https://code.wireshark.org/review/9132
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-06-25 17:39:02 +00:00
Evan Huus ec094b5cc1 Initialize default stats before using them
Quick hack fix for bug 11275.

The longer fix I am still thinking about, but it goes something like this: we
have a terribly confusing dependency graph in ordering our various preferences,
so it's fragile and needs refactoring.

1. We must call epan_init before we read the preferences files, since dissectors
register many preferences.
2. We must call pre_init_prefs before we call prefs_register_modules, since that
inits the default values of the "global" preferences structure. `init_prefs()`
handles this normally.
3. We must call epan_init before we call init_prefs since init_prefs depends on
UATs being initialized (which is something epan_init does).
4. We must call prefs_register_modules before we call epan_init since that
generates the `protocols` subtree which is needed for registering
dissector-specific preferences.

The above graph has a cycle, which I *think* can be solved by splitting
prefs_register_modules?

Bug: 11275
Change-Id: I08dae6a7ade178896e0de5e5091f7eeaca95846f
Reviewed-on: https://code.wireshark.org/review/9098
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-06-24 19:48:09 +00:00
Peter Wu 0c71b13b3e prefs: fix memleak
Calling g_list_remove_link(link, llink) does not free the removed
last link llink. g_list_next or g_list_foreach+g_free followed by
g_list_free should be used instead such that the data is freed before
and then dropped from the list.

This fixes a memleak in tshark -r dns.pcap detected by ASAN (single
packet).

Set pref->default_val.list = NULL just in case, and with symmetry with
capture_columns handling.

Change-Id: I3cc52e275784037ab40c0b42c68d0dd83b73cd98
Reviewed-on: https://code.wireshark.org/review/9026
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-06-23 05:46:18 +00:00
Guy Harris 083f6b6e6d Have a #define for whether the capture buffer size can be set.
It can be set if either 1) this is Windows (where we're assumed to be
using WinPcap, which includes calls to set the buffer size) or 2) we
have pcap_create() (in which case we also have pcap_set_buffer_size(),
at least in a normal libpcap release).

Use that rather than testing "defined(_WIN32) ||
defined(HAVE_PCAP_CREATE)"; that makes it a bit more obvious what's
being tested.

Change-Id: Id9f8455019d19206b04dd6820a748cb97ae5ad12
Reviewed-on: https://code.wireshark.org/review/7816
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-25 03:22:33 +00:00
Michal Labedzki 2d4817966e Qt: Automatically scroll the packet list.
Add an "Auto Scroll in Live Capture" action to the Go menu. It's in the
View menu in the GTK+ UI but it seems to make more sense as a navigation
item.

Use a timeout interval for automatic scrolling. I haven't run any tests
to see if this makes a difference but it would seem that the less
drawing we do during a high speed capture the better, particularly for
remote displays.

Update the x-stay-last icons.

Note that we might want to make prefs.capture_auto_scroll a "recent"
setting.

Mark auto_scroll_live and packet_list_check_end GTK+ only.

Bug: 10601
Co-authored-by: Gerald Combs <gerald@wireshark.org>
Change-Id: I645d27c0814f0e4a0d5b01ae68be366847e2522d
Reviewed-on: https://code.wireshark.org/review/7292
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-27 20:27:14 +00:00
Michal Labedzki c093797b12 Fix GTK-shark
Looks like a copy/paste issue.
ERROR: wireshark/color_filters.c💯color_filters_add_tmp: assertion failed: (strlen(prefs.gui_colorized_fg)==69)

Change-Id: I7b8309cfc178fd834951078a098bbce986639ed2
Reviewed-on: https://code.wireshark.org/review/7286
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-02-21 17:19:05 +00:00
Gerald Combs 5012cf84e6 Call pre_init_prefs each time our profile changes.
Manually back out gafa96c3 so that we can set our preferences to their
default values each time we switch profiles.

Zero the prefs struct at startup.

Change-Id: Ic28db44cd0c4cdf640e977d7277f7357db10ebe8
Reviewed-on: https://code.wireshark.org/review/7282
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-02-21 02:57:46 +00:00
Gerald Combs ead79e6aa1 Clear the filter expression list in prefs.c.
Move filter_expression_nuke from ui/gtk to epan and rename it to
filter_expression_free. Call it in prefs_reset along with the other
preference reset routines.

This keeps the Qt filter toolbar from filling up with duplicate
expressions when the profile changes.

Change-Id: I9fae9a7b48944079ea342a126979d9e79af0d22b
Reviewed-on: https://code.wireshark.org/review/7281
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-02-20 23:16:54 +00:00
Dario Lombardo 60cc8b4fd8 Support for looking for incomplete dissectors.
Change-Id: I03e592dd3d54fc0e1c4af09d5d5336dda93f950e
Reviewed-on: https://code.wireshark.org/review/6978
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-02-12 11:14:24 +00:00
Michael Mann 7967ef9510 Remove emem APIs from UAT functionality.
Change-Id: I009c09f25d170e5c9aaaef713eaacb3252817856
Reviewed-on: https://code.wireshark.org/review/6460
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Evan Huus <eapache@gmail.com>
Petri-Dish: 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-12 14:25:12 +00:00
Michael Mann effc8266ce Add preference to display spaces between bytes for FT_BYTES fields.
I think this can make fields more readable (for a small amount of bytes).

Converted DeviceNet dissector to use proto_tree_add_item for some FT_BYTES field as tvb_bytes_to_str_punct was used to create this effect "manually".

Change-Id: I59e2acf9b00a4eb1279e6c2b2b7bd8ecef20db9b
Reviewed-on: https://code.wireshark.org/review/6304
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-10 19:57:27 +00:00
Alexis La Goutte 60d7413efe prefs: fix typo
Change-Id: Ic4dbbab5e53b5745cb703e6e30b2dc6251c3918e
Reviewed-on: https://code.wireshark.org/review/6161
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-31 14:58:38 +00:00
Michal Labedzki 5025bc258c Qt: Dynamic languages
- get language as soon as possible (before creating any Qt objects) to make all
  translations working
- dynamic list of supported languages
- runtime change of GUI language (no need to restart application)
- add flags icons support
- search for *.qm languages in buildin resources, then
  data dir called "languages" (main directory in sources or
  /usr/share/wireshark/languages), then user directory
  (UNIX: ~/.wireshark/languages); "languages" directory should contains
  files wireshark_xx.qm where xx is language code (en, en_GB, etc.),
  and optional xx.svg for flag icon
- try to fix some untranslated manually-created UI items
  (need manual reset text of those components)

Change-Id: I62ca8a8cddce47cec9dbcad6b0bd68b6cfd92229
Reviewed-on: https://code.wireshark.org/review/5041
Tested-by: Michal Labedzki <michal.labedzki@tieto.com>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2014-11-04 08:21:55 +00:00
Alexis La Goutte e8d2ba9349 Pref: Remove unsued function
Fix also warning: no previous prototype for 'prefs_get_uint_preference' [-Wmissing-prototypes]

Change-Id: I4626372a9c131584c515a43e73aa019e2f696d29
Reviewed-on: https://code.wireshark.org/review/4960
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-10-28 15:21:00 +00:00
Guy Harris 033f096ee9 Don't use ctype.h routines.
That avoids locale dependency and handles possibly-signed chars (which
we weren't always doing before).

Change-Id: Ieceb93029252f646397b6488f2df8a57c6d2a23d
Reviewed-on: https://code.wireshark.org/review/4794
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-17 23:11:18 +00:00
Dario Lombardo 7f74471229 Added italian translation to qt.
Change-Id: If58ed29e78a9994fc488a4d01cf665f7e8d82830
Reviewed-on: https://code.wireshark.org/review/4707
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-10-16 18:55:33 +00:00
Gerald Combs 8fc2327766 Qt: Fix preference bugs.
Make sure we set the "resolved" member of the column fmt_data struct.

Emitting WiresharkApplication::AppSignals from a modal dialog can cause
event loop problems on OS X. Queue them up in PreferencesDialog and emit
them after closing.

Change-Id: I2de77778a0448db3b87d402e431b8e5f325cbbda
Reviewed-on: https://code.wireshark.org/review/4274
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-09-24 16:25:40 +00:00
Bill Meier f3dd7fe1eb Fix whitespace/indentation to match editor modelines.
Change-Id: I3445ae22f10584582d465bf632942e016f5f70ca
Reviewed-on: https://code.wireshark.org/review/3452
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-08-05 20:42:21 +00:00
Gerald Combs 59ef97dd65 [WIP] Add a conversation dialog.
Items are sorted by value.

Move common conversation code to ui/conversation_hash.[ch]. Add a
conversation_type_e enum along with convenience functions for fetching
titles, tap names, etc.

We have a single main dialog instead of a main dialog + individual
protocol dialogs. It de-clutters the statistics menu and results in
simpler code. Conversation type tabs can be added and removed within the
dialog itself. The tab list is sticky and saved with the current profile
when the dialog closes. Data can be copied as CSV or YAML.

Add a FilterAction class and a corresponding filterAction slot to
MainWindow. Use it for the Conversations context menu.

Add an addressResolutionChanged signal and related plumbing.

Get rid of the iterator members in the conversation item struct. Update
the GTK+ code accordingly.

Excercise for the reader:
- Update TShark to use the common hash code.

Ping-Bug: 9231
Ping-Bug: 8703
Ping-Bug: 6727
Change-Id: I8728d771fc5b1a85937bed9d898e53c3ecc3a544
Reviewed-on: https://code.wireshark.org/review/2987
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-21 23:19:09 +00:00
Martin Kaiser b1532b21be start support for the Japanese language in the Qt version
just the framework and some simple translations

Change-Id: I7653a9c6ab26b391bfe2942d088d233996030576
Reviewed-on: https://code.wireshark.org/review/3134
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-07-20 18:02:33 +00:00
Guy Harris 9d436346c3 Make the state variable an enum, and add a case for the IN_SKIP value.
Also indicate what the states mean.

Change-Id: Ie1701bb2fb33334bcd66d325d1368c2a15cbb7e8
Reviewed-on: https://code.wireshark.org/review/3061
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-15 21:06:16 +00:00
Guy Harris 338369ec2f Treat CR-LF at the end of a line like LF.
That way, if we're reading a Windows-format file on UN*X, we handle it
the same way we'd handle a UN*X-format file.

This handles bug 10272 for the preference file and the "recent" files;
there are other configuration files that may need code changes as well.

Change-Id: Iec15a8fac276929ce8b53ae16070e9f2855f574c
Reviewed-on: https://code.wireshark.org/review/3042
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-14 18:27:06 +00:00
Guy Harris d96ff60566 As opposed to *loudly* silently?
Change-Id: I5c6843ac2c665a4c8c8822084377fee661405d34
Reviewed-on: https://code.wireshark.org/review/2992
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-11 00:44:51 +00:00
Guy Harris 2585e6cb09 Change comments to reflect current reality.
Change-Id: If4e220457d2040eaa35dd5e55a0f43fc9da5e347
Reviewed-on: https://code.wireshark.org/review/2991
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-11 00:43:15 +00:00
Michal Labedzki 59e860cf2f [WIP] qt: Add support for Polish language
Change-Id: Ib63937e741b737f171a9b383a9cbabb55dfdd8ef
Reviewed-on: https://code.wireshark.org/review/2553
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-06-23 19:10:21 +00:00
Irene Ruengeler df8c4bf264 Capture Interfaces Dialog:
- allow to change the interface options in the table
- save the options to preferences when the dialog is left
- add a field for setting a capture filter for all selected interfaces
- add a "Compile BPF" button and a window to show the compiled filter output
- try to address Alexis' and Evan's comments

Change-Id: Ic1272e29183ec80e2d2f4b3e494c79dabe2c3b6f
Reviewed-on: https://code.wireshark.org/review/1946
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-12 05:54:59 +00:00
Bill Meier 3d23cbd11f (Trivial) Fix a typo.
Change-Id: I111d3af8d9f1a96ebbe3f4b19ab1597a93348058
Reviewed-on: https://code.wireshark.org/review/1952
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-06-04 19:29:38 +00:00
Peter Wu 8dc7d164dc prefs: prevent double-free on changing prefs
Prevent double-free when changing profiles. After switching from the
default profile to a profile without a preferences file,
saved_at_version will be freed, but a new version will not be inserted
(because the prefs file is empty). On a subsequent switch to another
profile, the saved_at_version field is freed again leading to a crash.

Bug: 9463
Change-Id: Ia9e0936e32603b4676a37dc428bda40c264a6eaa
Reviewed-on: https://code.wireshark.org/review/1425
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-29 04:17:54 +00:00
Peter Wu e8cb623166 prefs: spelling fix, simplify code
Found spelling error "a another". All those dynamic allocations and
magic numbers are horrible and unnecessary. Simplify the gtk code
rewording the message and merging strings.

Simplify the version code by using fscanf to take care of matching
the first line of a preference file.

Change-Id: I1e75803aacaa494ba5005791bcbd023e0807aaaa
Reviewed-on: https://code.wireshark.org/review/1424
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-29 04:16:23 +00:00
Peter Wu 878f341ffa prefs: fix ASAN error due to invalid indirection
For pref_current, indirection of pref->varp.string will cause a read of
size 8. This will cause a global buffer overflow error for all smaller
types, for example lbmc_use_heuristic_subdissectors (size 4).

Reproduce: compile Wireshark with -fsanitize=address, open Preferences
and select OK or Apply. Result: ASAN crash.

To fix this, only indirect a pointer if the storage size is known, a
void pointer stores the address of the constant value (pref_default,
pref_stashed) or the address to the value (pref_current). Note that
pointers of different types are of equal size, I could take
valp.pref_(anything).

While at it, remove superfluous 'break' keywords where a 'return'
keyword is present.

Change-Id: I05a69e8f14a1ecb4e5d2a0c0f0b71ed3f0a41d70
Reviewed-on: https://code.wireshark.org/review/1286
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-04-27 18:56:03 +00:00
Michal Labedzki 15b95bab42 Do not try to use unknown/non-existent webbrowser
Some systems do not have webbrowser or have strange browser.
Do not try to use it and dislayed URL for user information.

Change-Id: I3f5bcca6701b20cafa942629cbee78aa1fc689b1
Reviewed-on: https://code.wireshark.org/review/516
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-03-08 06:30:17 +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
Bill Meier 616ed71918 Fix bug which (somewhat) randomly caused UAT pref to not display on a proto pref page.
Introduced in ga2b2dd4b (SVN #53880)

Change-Id: I3dd24ab5e1b45367b03b8096a5892f346782217f
Reviewed-on: https://code.wireshark.org/review/433
Reviewed-by: Bill Meier <wmeier@newsguy.com>
Tested-by: Bill Meier <wmeier@newsguy.com>
2014-02-28 19:03:09 +00:00
Hadriel Kaplan 655f2e4dd4 Fix prefs.c: Argument with 'nonnull' attribute passed null (redux)
Change-Id: I795df36039278283008132d647aaf51e76dbe218
Reviewed-on: https://code.wireshark.org/review/424
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-02-27 21:23:32 +00:00
Bill Meier 11b5c15fdb Remove trailing whitespace
Change-Id: I8116f63ff88687c8db3fd6e8e23b22ab2f759af0
Reviewed-on: https://code.wireshark.org/review/385
Reviewed-by: Bill Meier <wmeier@newsguy.com>
Tested-by: Bill Meier <wmeier@newsguy.com>
2014-02-25 20:46:49 +00:00
Guy Harris 32da185ed5 Don't cast away constness.
svn path=/trunk/; revision=54802
2014-01-14 18:42:54 +00:00
Gerald Combs 17a67c3b5c Get the "Decode As" dialog working, albeit with a few warts. It differs
from the GTK flavor in two major ways:

- The "Decode As" and "User Specified Decodes" dialog have been unified.
- You can modify the decode as behavior at any time, not just when you
  have a packet selected.

Revert part of 53498 so that we can move items marked

/*** THE FOLLOWING SHOULD NOT BE USED BY ANY DISSECTORS!!! ***/

from epan/decode_as.h to ui/decode_as_utils.h. 

Move "save" code from decode_as_dlg.c to decode_as_utils.c as well.

In packet-dcerpc.c don't register a table named "ethertype". We might
want to add checks for duplicate table names.

To do:
- Add support for ranges?
- Either add support for DCERPC or make DCERPC use a regular dissector
  table.
- Fix string selectors (i.e. BER).


svn path=/trunk/; revision=53910
2013-12-10 19:23:26 +00:00
Irene Rüngeler a2b2dd4b28 Add a function and an enum to register an uat preference for QT only.
svn path=/trunk/; revision=53880
2013-12-09 10:07:33 +00:00
Michael Mann 60d6b05e23 Stats_tree enhancements for sorting, averages and burst rate. Bug 9452 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9452)
From Deon van der Westhuysen

- Bug fix: object leak in stats_tree after a tap reset (for example apply statistics preferences with a stats_tree window open)
- Bug fix: correct sample code in README.stats_tree
- Add: slash in plug-in name now creates submenu as docs describe (was a bug?)
- Add: menu separator before the stat_tree registered plug-ins
- Add: stats_tree can now calculate averages for nodes; automatically calculated for range nodes. Add section in README.stats_tree describing averages.
- Add: stats_tree can now calculate burst rate of each node (like rate but with a shorter, sliding time window)
- Add: sorting for stats_tree plug-ins. Can sort on node name, count, average, min, max values and burst rate.
- Add: preferences for stats_tree system (default sort column, burst calc params)
- Add: stats_tree window copy to clipboard and export and plain text, csv and XML.
- Added sample of new functionality in $srcdir/plugins/stats_tree/pinfo_stats_tree.c
- Moved all stats_tree sample plug-ins to "IP Statistics" submenu.

svn path=/trunk/; revision=53657
2013-11-29 22:47:59 +00:00