aboutsummaryrefslogtreecommitdiffstats
path: root/epan/prefs.h
AgeCommit message (Collapse)AuthorFilesLines
2017-04-14Make prefs_register_subtree() static too.Guy Harris1-9/+0
It's not used outside epan/prefs.c, and it probably shouldn't be. Change-Id: I8a10961a33b93db1de982eec264c134f9f3bc66c Reviewed-on: https://code.wireshark.org/review/21096 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-14Make prefs_register_module() static.Guy Harris1-18/+0
It's not used outside epan/prefs.c, and it *shouldn't* be used outside epan/prefs.c - there are other APIs that call it, and handle the details of picking the right name, title, description, etc.. Change-Id: Ib95b4811d50c2bf1c480f115ee998274252243c9 Reviewed-on: https://code.wireshark.org/review/21095 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-09Pull all the "load settings" calls into a epan_load_settings() routine.Guy Harris1-2/+5
That way, nothing using libwireshark needs to know what settings need to be loaded, they just call epan_load_settings(). Change-Id: I9390e259e286fc4f5acaeaac2767e4c3c4b656af Reviewed-on: https://code.wireshark.org/review/20983 Petri-Dish: Guy Harris <guy@alum.mit.edu> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-09Pull the error-reporting code for preference files into read_prefs().Guy Harris1-12/+3
No need to duplicate it in N different programs. Update comments while we're at it. Change-Id: I3096cbe5448a19363eff6303bdd54e522dae9336 Reviewed-on: https://code.wireshark.org/review/20973 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-02-16Qt: Disable pane menu items if not used in layoutStig Bjørlykke1-0/+5
If a pane is not used in the layout it should not be possible to show and hide this from the menu, as this may give unexpected results. Change-Id: I335168e66e1dffc89992cad480dd7daaea7e9d59 Reviewed-on: https://code.wireshark.org/review/20140 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-01-07Convert range API to always use wmem memory.Michael Mann1-1/+1
This is mostly to address memory leaks in range preferences (the biggest user of range functionality) on shutdown. Now range preferences must use epan scoped memory when referencing internal preference structures to keep consistency. Change-Id: Idc644f59b5b42fa1d46891542b53ff13ea754157 Reviewed-on: https://code.wireshark.org/review/19387 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-12-27InterfaceList: Add check for remote interfaceRoland Knall1-0/+3
Add a check, to allow the filtering of remote only interfaces. Also add the necessary options to the type menu. Change-Id: Ib82519362454094f64abf1cbe6d7bc917990d7ac Reviewed-on: https://code.wireshark.org/review/19438 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Roland Knall <rknall@gmail.com>
2016-12-01Check preference titles and descriptions.Gerald Combs1-1/+9
When registering preferences, make sure our titles and descriptions are valid UTF-8. Make sure our titles are short and only contain printable characters. Fix problematic titles and descriptions. Change-Id: I20d3f93438f2b3c30266f934297feb79897f2ee5 Reviewed-on: https://code.wireshark.org/review/18998 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-11-22Add prefs_get_uint_value and prefs_get_range_valueMichael Mann1-0/+11
This allows dissectors to not need to know about the internal preference structure. Change-Id: I1ae67248cd0b0132aefc225ea0a9befaf9afdde2 Reviewed-on: https://code.wireshark.org/review/18864 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-20InterfaceList: Add button to toggle hidden interfacesRoland Knall1-0/+1
Add a button to the context menu, to allow for easy display of hidden interfaces, and make that a storable preference Change-Id: I8df5562b3ce8119b0ed38f9893c1879127f40c47 Reviewed-on: https://code.wireshark.org/review/18005 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Roland Knall <rknall@gmail.com>
2016-10-17frame: print debug line according to new console preference.Dario Lombardo1-0/+1
Change-Id: I4e4b7d08e7765c43904469bbf8ba5c0581428382 Reviewed-on: https://code.wireshark.org/review/18231 Petri-Dish: Dario Lombardo <lomato@gmail.com> Reviewed-by: Jörg Mayer <jmayer@loplof.de> Reviewed-by: Dario Lombardo <lomato@gmail.com>
2016-10-08Combine Decode As and port preferences for tcp.port dissector table.Michael Mann1-0/+14
This patch introduces new APIs to allow dissectors to have a preference for a (TCP) port, but the underlying data is actually part of Decode As functionality. For now the APIs are intentionally separate from the regular APIs that register a dissector within a dissector table. It may be possible to eventually combine the two so that all dissectors that register with a dissector table have an opportunity to "automatically" have a preference to adjust the "table value" through the preferences dialog. The tcp.port dissector table was used as the guinea pig. This will eventually be expanded to other dissector tables as well (most notably UDP ports). Some dissectors that "shared" a TCP/UDP port preference were also converted. It also removed the need for some preference callback functions (mostly when the callback function was the proto_reg_handoff function) so there is cleanup around that. Dissectors that has a port preference whose default was 0 were switched to using the dissector_add_for_decode_as_with_preference API rather than dissector_add_uint_with_preference Also added comments for TCP ports used that aren't IANA registered. Change-Id: I99604f95d426ad345f4b494598d94178b886eb67 Reviewed-on: https://code.wireshark.org/review/17724 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-10-03Be more forgiving about invalid Coloring Rules.Gerald Combs1-1/+1
In ColoringRulesDialog: Only check a rule's display filter if that rule is enabled. This keeps us from disabling the OK button when we shouldn't. Adjust the "Your coloring rules file contains unknown rules" dialog text and buttons for accuracy. In color_filters.c: Don't try to compile disabled filters in color_filters_apply. Don't warn about disabled and invalid filters in read_filters_file. Bug: 12814 Change-Id: I7143bf8e7a6162d296f1e93769344b69763195c8 Reviewed-on: https://code.wireshark.org/review/17823 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-10-01Interface List: Change display to view/modelRoland Knall1-0/+1
This changes the underlying model of the main interface tree. Because of that, we can resort to a view/model approach, enlisting the global interfaces list as only data source. The interface list works identical to the old list, but allows for filtering of the displayed interfaces by type. Only types, which are present and whose interfaces are not hidden, are being displayed for selection. Change-Id: If8475b227daa026dc0ad3d25bc7fe050d5bf2ac3 Reviewed-on: https://code.wireshark.org/review/17940 Reviewed-by: Roland Knall <rknall@gmail.com>
2016-02-01extcap: Add Save functionality to options dialogRoland Knall1-0/+3
This patch creates the functionality of saving all parameters for extcap devices in the general preference section. For now, multiselect and fileselect do not save their values but patches for this will be provided in the future Also, all preferences are stored as strings to make handling easier. This might change in the future, but for the first version it will stick. Restore to Defaults is not implemented as of yet, and will be in a future version, once the preference storing is finalized Bug: 11666 Change-Id: I178346405146d2e43f4f3481c05c92c0b3595af5 Reviewed-on: https://code.wireshark.org/review/13451 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Roland Knall <rknall@gmail.com>
2016-01-27Make Qt UI capture filter behavior more closely match the GTK+ UI.Gerald Combs1-1/+1
If the user enters a capture filter in the Capture Interfaces dialog and presses "Start", make sure we copy the filter to the main welcome screen. Back out capture filter code from g0ce9ac4. Leave out the code that set the global capture filter. Move the code that set individual capture filters to the welcome screen. Fix multiple interface selection in the welcome screen. Rename allFilterComboBox in the capture interfaces dialog to captureFilterComboBox to match the main welcome screen. If the user starts typing in captureFilterComboBox, make sure the "Capture Filter" column is visible. Update the "Capture Filter" column as the user types. Conversely, if the user edits the "Capture Filter" column, update captureFilterComboBox accordingly. If we're editing a per-interface filter make sure we commit its contents before starting capture. Map our device index directly to each tree item instead of using a separate map which will no longer be valid any time our sort order changes (which we do right away in our constructor). Don't set prefs.capture_devices_filter in the Qt UI. The GTK+ UI doesn't and doing so can lead to surprising behavior. Note that it's mostly unused. Note that we don't multiple selected filters very well. Ping-Bug: 11886 Change-Id: I3c052f4f464411e2fb8fb7d96b218e1ce2bac3fd Reviewed-on: https://code.wireshark.org/review/13410 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-12-29Qt: Add gui.prepend_window_title optionAlexis La Goutte1-0/+1
Bug: 11102 Change-Id: I659b6be4652a65542c217370e01340e4696c0e31 Reviewed-on: https://code.wireshark.org/review/12653 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-12-28Refactor GUI dependencies out of color_filters.[ch] and move it to epan ↵Michael Mann1-1/+1
directory. This also moved color.h into color_filters.h Change-Id: Ic19e27aa1b3ec67e764aa7ee8bbef7b1187bb12e Reviewed-on: https://code.wireshark.org/review/12831 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-12-18prefs_register_modules() is used only in epan/prefs.c; make it static.Guy Harris1-5/+0
Change-Id: If2a5ad5c836c5dfddb4f6c4ffa41c52e52f2b671 Reviewed-on: https://code.wireshark.org/review/12717 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-11epan: Don't export deregister functionsStig Bjørlykke1-1/+1
Most of the deregister functions are used internally from Lua while reloading plugins. Don't export them for others to use. Change-Id: I919dbfa807f696c38d409ca7206104a0fba1ae65 Reviewed-on: https://code.wireshark.org/review/12508 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-12-04Export prefs_register_module() and prefs_register_subtree() functionsPascal Quantin1-2/+2
Change-Id: I09796eadb5fb8b564adfab5060715571983b1bb3 Reviewed-on: https://code.wireshark.org/review/12428 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-10-27Add preferences for related packets and the scroll bar minimap.Gerald Combs1-0/+2
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-08-11Added Reload Lua plugins.Stig Bjørlykke1-0/+5
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-06Add an elide mode preference for the Qt packet list.Gerald Combs1-0/+9
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-07-20Qt: Add option to back white line separator for packet list itemsMichal Labedzki1-1/+1
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-03-25Have a #define for whether the capture buffer size can be set.Guy Harris1-1/+1
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-02-21Call pre_init_prefs each time our profile changes.Gerald Combs1-7/+7
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-12Support for looking for incomplete dissectors.Dario Lombardo1-0/+1
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-01-10Add preference to display spaces between bytes for FT_BYTES fields.Michael Mann1-0/+1
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>
2014-12-10Qt: Obey main toolbar icon preferences.Gerald Combs1-1/+1
Remove the preferences for the filter toolbar and mark them GTK+-only. Change-Id: Ie48b19aee29a1cfcea4c41ca6c08ddbba3102377 Reviewed-on: https://code.wireshark.org/review/5693 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-08-17prefs.h : fix indent (use 4 spaces) and add modelines infoAlexis La Goutte1-28/+34
Change-Id: I319b76973ade38261f40e6120c436de923b5d5bf Reviewed-on: https://code.wireshark.org/review/3658 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-12Capture Interfaces Dialog:Irene Ruengeler1-0/+1
- 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-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-02-25Remove trailing whitespaceBill Meier1-6/+6
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>
2013-12-21Avoid including <epan/addr_resolv.h> in dissectorsJakub Zawadzki1-2/+2
svn path=/trunk/; revision=54333
2013-12-09Add a function and an enum to register an uat preference for QT only.Irene Rüngeler1-0/+11
svn path=/trunk/; revision=53880
2013-12-03When including <epan/prefs.h> don't force inclusion of <epan/uat.h>Jakub Zawadzki1-2/+3
svn path=/trunk/; revision=53769
2013-11-29Stats_tree enhancements for sorting, averages and burst rate. Bug 9452 ↵Michael Mann1-0/+14
(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-07Add Packet Editor PreferenceAlexis La Goutte1-0/+1
svn path=/trunk/; revision=53134
2013-09-09Add Preference to change Language (in QtShark)Alexis La Goutte1-1/+2
Need restart application to change language svn path=/trunk/; revision=51869
2013-07-25Add a UAT dialog. Make UAT preferences uat_t * instead of void *.Gerald Combs1-2/+4
C++-ize the UAT headers. Add an ElidedLabel widget. Use it in the File Set, Profile, and UAT dialogs. Update the Qt README. svn path=/trunk/; revision=50896
2013-07-18From Cal Turney:Anders Broman1-0/+3
Unrecognized preferences and color filters created in proprietary or older versions are discarded when saved. If the user attempts to save the preferences or colorfilters file, a popup is displayed that warns that unrecognized prefs or color filters have been detected and will be discarded if the save operation is allowed to proceed. In the case of Preferences, the popup message includes the version at which the file was last saved. A "Continue without Saving" button is provided so that the user can save the profile under a different name. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8942 svn path=/trunk/; revision=50716
2013-07-17Backing out r50690 (exept simple_dialog)Anders Broman1-3/+0
struct FILE is different on windows vs *nix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8942 svn path=/trunk/; revision=50691
2013-07-17From Cal Turney:Anders Broman1-0/+3
Unrecognized preferences and color filters created in proprietary or older versions are discarded when saved. If the user attempts to save the preferences or colorfilters file, a popup is displayed that warns that unrecognized prefs or color filters have been detected and will be discarded if the save operation is allowed to proceed. In the case of Preferences, the popup message includes the version at which the file was last saved. A "Continue without Saving" button is provided so that the user can save the profile under a different name. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8942 svn path=/trunk/; revision=50690
2013-06-28Make colors used by colorize_filter_te_as_* as preferences. Bug 5413 ↵Michael Mann1-0/+1
(https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5413) svn path=/trunk/; revision=50203
2013-04-26Fix a whole bunch of doxygen warnings, mostly typos or renamed parameters.Evan Huus1-2/+1
svn path=/trunk/; revision=49053
2013-03-13Add interface options preferences.Irene Rüngeler1-0/+1
svn path=/trunk/; revision=48275
2013-03-07Add buffersize and snap length to the preferences.Irene Rüngeler1-0/+4
svn path=/trunk/; revision=48163
2013-03-01Export libwireshark symbols using WS_DLL_PUBLIC defineBalint Reczey1-43/+48
Also remove old WS_VAR_IMPORT define and related Makefile magic everywhere in the project. svn path=/trunk/; revision=47992
2013-02-19Add automatic software update checks for Win32 using WinSparkle. AddGerald Combs1-0/+10
preferences (currently hidden) to disable updates, set the update frequency, and set the update "channel" (stable vs development). Add a "Help" menu item to manually check for updates. svn path=/trunk/; revision=47748