Commit Graph

102 Commits

Author SHA1 Message Date
Stig Bjørlykke 62f60df6b4 From Jakub Zawadzki (bug 3331):
g_free() is NULL safe, so we don't need check against it.

svn path=/trunk/; revision=27718
2009-03-13 22:06:48 +00:00
Stig Bjørlykke 69be63a5d9 Map "x.25.*" preferences to "x25.*".
svn path=/trunk/; revision=27604
2009-03-04 07:50:17 +00:00
Balint Reczey 5c7253a681 Made find_preference function public as prefs_find_preference.
svn path=/trunk/; revision=27166
2009-01-06 14:34:18 +00:00
Stephen Fisher 1fa606decf More updates to the IGE Mac OS X integration feature:
- Adds preference "MacOS X style" to the (G)UI preferences pane
 - When the preference above is enabled, the menu bar is moved from
   the Wireshark window to the top of the screen.  It is no longer displayed
   in both places at once.  This preference defaults to on.
 - Calls function to enable shortcut keys for OS X top of screen menus.
 - NOTE: The IGE Mac Integration functions change the Control key to Command
         key in the menus.  This may or may not be desirable.


svn path=/trunk/; revision=26565
2008-10-26 23:07:37 +00:00
Stig Bjørlykke 7e3514c200 Add a hidden preference to show the version in the welcome page.
svn path=/trunk/; revision=26371
2008-10-07 15:18:40 +00:00
Gerald Combs a6bb39afe3 Add a hidden preference to set the welcome screen title.
svn path=/trunk/; revision=26366
2008-10-06 22:49:01 +00:00
Stig Bjørlykke e0740e22e5 Remove the "Save column widths" option so we always save the widths.
svn path=/trunk/; revision=25968
2008-08-09 16:14:34 +00:00
Sake Blok 643d1baa53 From Kovarththanan Rajaratnam (Bug 2660):
Make display filter max recent entries a preference

(From me: fixed an off by one bug in saving to the recent file)


svn path=/trunk/; revision=25960
2008-08-08 19:41:35 +00:00
Jaap Keuter 47c276da54 From Balint Reczey:
When saving preferences, wireshark saves the description of each preference in 
a one line comment. Unfortunately if the description consists of several lines,
wireshark comments out only the fist one.
The attached patch solves the problem by commenting out every lines in the
description.

svn path=/trunk/; revision=25756
2008-07-16 18:09:24 +00:00
Guy Harris e95265b926 Rename the ERF "erfhdlc" preference to "hdlc_type" ("erf" is redundant,
and "hdlc" doesn't indicate that it's a protocol type), and, instead of
a "raw" option, have a "try to guess the traffic type" option - for now,
if the first byte is 0x0f or 0x8f, treat it as Cisco HDLC, otherwise
treat it as PPP.

svn path=/trunk/; revision=25737
2008-07-14 19:28:19 +00:00
Guy Harris 1349de5532 Replace the old "erfatm" preference for the ERF dissector with an
"aal5_type" dissector, which offers only "guess the traffic type" and
"LLC multiplexed" as options, defaulting to "guess the type".

Add a separate preference to control whether to treat single ATM cells
as raw data or as the first cell of an AAL5 PDU (and dissecting them as
short AAL5 PDUs).

Don't reach inside the tvbuff to get the data and the length; use
tvb_length() and tvb_get_ptr().

Pass the data *after* the AAL5 header to the "guess the traffic type"
routine.

svn path=/trunk/; revision=25736
2008-07-14 18:56:25 +00:00
Guy Harris f805676e19 Make erf.ethfcs a Boolean, with "FCS present" and "FCS not present" the
only options, and default to "FCS present".

svn path=/trunk/; revision=25724
2008-07-12 18:26:47 +00:00
Guy Harris a092f9857d Rename the preference values to something that leaves out the "eth" (as
it's redundant).

svn path=/trunk/; revision=25720
2008-07-12 02:42:33 +00:00
Guy Harris 6d0ad7e140 ERF Ethernet records always contain Ethernet packets, as the name
indicates; replace the "erf.eth" preference with an "erf.ethfcs"
preference, specifying whether the FCS is present in Ethernet frames,
and offer the options "present", "not present", and "maybe present" -
for "maybe present", call the regular Ethernet dissector, which tries to
figure out whether there's an FCS at the end of the packet or not.

svn path=/trunk/; revision=25719
2008-07-12 02:36:32 +00:00
Stig Bjørlykke 561f66c1b8 Added an option to set default link-layer header type for each interface.
Set linktype history for each interface so we don't mix them.
Fixed some indents.

svn path=/trunk/; revision=25411
2008-06-02 17:45:03 +00:00
Jeff Morriss a5cee04fad Move the file utility functions from wiretap to libwsutil so that
libwireshark (and the plugins using those functions) do not depend on
wiretap on Windows.

While doing that, rename the eth_* functions to ws_*.

svn path=/trunk/; revision=25354
2008-05-22 15:46:27 +00:00
Martin Mathieson d4dca0d94b Allow configuration of tap update interval.
- rename rtp_player config group to taps/statistics
- will rename prefs_rtp_player files later
  (svn didn't seem keen to rename with changes present,
   and output says its just a copy/delete anyway...)

svn path=/trunk/; revision=25133
2008-04-21 10:57:32 +00:00
Stig Bjørlykke a4f76f95a0 Added an option to display hidden protocol items.
svn path=/trunk/; revision=25108
2008-04-17 23:14:01 +00:00
Stig Bjørlykke 41e9bde037 Added an option to save column widths in the recent file.
Not 100% implemented for usage with configuration profiles with 
different column layout yet, as this requires some of the recent
values to be saved in each profile.

svn path=/trunk/; revision=24949
2008-04-12 19:37:05 +00:00
Anders Broman 63c5c71cf8 Remove:
#ifdef NEED_G_ASCII_STRCASECMP_H
#include "g_ascii_strcasecmp.h"
#endif

svn path=/trunk/; revision=24859
2008-04-09 05:36:08 +00:00
Ulf Lamping df724f83cd remove GTK1 specific font handling
svn path=/trunk/; revision=24842
2008-04-08 04:47:32 +00:00
Stephen Fisher 726a1caaf1 - Remove GLIB1 code
- Change ugly GLIB version checking statements to GLIB_CHECK_VERSION
- Remove ws_strsplit files because we no longer need to borrow GLIB2's
  g_strsplit code for the no longer supported GLIB1 builds


svn path=/trunk/; revision=24829
2008-04-07 05:22:54 +00:00
Guy Harris cd2d7e0a6d Map "dcp.*" preferences to "dccp.*".
svn path=/trunk/; revision=24652
2008-03-16 08:26:16 +00:00
Stig Bjørlykke d9eba4345b Free the allocated range if not using it.
svn path=/trunk/; revision=24560
2008-03-04 23:15:11 +00:00
Stig Bjørlykke 7647ca258b Ups, this free was not so smart...
svn path=/trunk/; revision=24552
2008-03-04 12:47:36 +00:00
Stig Bjørlykke 8c0e88cb8d Free allocated data.
svn path=/trunk/; revision=24550
2008-03-04 12:13:25 +00:00
Stig Bjørlykke 51b26f95f3 Improved custom columns with custom title.
Fixed a crash when adding an empty custom field.

svn path=/trunk/; revision=24438
2008-02-22 22:47:19 +00:00
Gerald Combs 6537c76fb6 Extend the UAT and preferences code so that you can use the "-o" flag
to override UAT entries from the command line, e.g.

  -o "uat:user_dlts:\"User 0 (DLT=147)\",\"http\",\"0\",\"\",\"0\",\"\""
  
Fix up white space.

svn path=/trunk/; revision=24338
2008-02-15 22:36:24 +00:00
Stig Bjørlykke 47d744b59d More rewrite of prohibited APIs (sprintf, strcpy, strcat).
svn path=/trunk/; revision=24258
2008-02-03 15:38:20 +00:00
Stig Bjørlykke f3747bf637 Hide hidden devices in "Capture Interfaces" dialog.
Added a function to check for hidden devices, which also work correctly
for plumbed devices on solaris.

svn path=/trunk/; revision=24231
2008-01-31 16:47:05 +00:00
Stig Bjørlykke 1621224a86 Free allocated data in prefs_reset, removed need for uat_reload_all and
made some cleanups in profile_dlg.

svn path=/trunk/; revision=24136
2008-01-19 01:18:35 +00:00
Jaap Keuter 2e0f8088c3 From Jim Young:
This patch provides a new RTP Player preferences dialog.  It allows one to
select the maximum number of visable channels in the RTP Player window.  The
default is four (4) channels which is the maximum number of usable channels 
that the RTP Player can display and still have access to the bottom row buttons 
on a 1024*768 resolution display.  Specifying a value less than 1 or greater than 
10 will be result in the RTP Player displaying the default 4 channels.

svn path=/trunk/; revision=24112
2008-01-16 07:36:34 +00:00
Stig Bjørlykke a2d1e9005d This patch adds support for configuration profiles, which can be used to
configure and use more than one set of preferences and configuration files.

This can be found in the "Configuration Profiles..." menu item from the Edit
menu, or by pressing Shift-Ctrl-A.  It's also possible to start wireshark
and tshark with a named profile by using the "-C ProfileName" option.
A new status pane in the main window will show the current profile.

The configuration files currently stored in the Profiles are:
- Preferences
- Capture Filters
- Display Filters
- Coloring Rules
- Disabled Protocols
- User Accessible Tables

The recent data are by design not added to the profile.

Planned future enhancements:
- make a more convenient function to switch between profiles
- add a "clone profile" button to copy an existing profile
- make the profiles list active and accept return as OK
- save users "Decode as" in the profile
- make new, clone and deletion of profiles more secure
- make some of the recent values available in the profile

This patch also fixes:
- setting default status pane sizes
- a bug setting status pane for packets when not having main lower pane.

svn path=/trunk/; revision=24089
2008-01-14 16:40:23 +00:00
Ronnie Sahlberg 8686381c19 get rid of GTree and use emem trees instead
svn path=/trunk/; revision=23738
2007-12-04 03:28:04 +00:00
Ronnie Sahlberg 643705ac5d reverse previous patch
svn path=/trunk/; revision=23735
2007-12-04 02:09:37 +00:00
Ronnie Sahlberg 75eacd9ad5 remove the use of GTrees and replace these with emem trees instead
svn path=/trunk/; revision=23734
2007-12-04 01:45:17 +00:00
Tomas Kukosa aab2bf936e - fix warnings in prefs.c
- do not flush SSL debug output after each message but only once per packet

svn path=/trunk/; revision=23680
2007-11-30 11:12:55 +00:00
Tomas Kukosa 6caaafbb6d Next few improvements to speed up startup about 10%.
- use GTree instead of GList for preference module lists

svn path=/trunk/; revision=23679
2007-11-30 09:22:01 +00:00
Tomas Kukosa a5ca7ec384 hide implementation of module list
(it makes easier change from GList to GTree as we have many modules now and GList implementation is slow for searching)

svn path=/trunk/; revision=23669
2007-11-29 07:52:52 +00:00
Guy Harris 9c89cdaaa3 strcasecmp(), strncasecmp(), g_strcasecmp(), and g_strncasecmp() delenda
est.  Use g_ascii_strcasecmp() and g_ascii_strncasecmp(), and supply our
own versions if they're missing from GLib (as is the case with GLib
1.x).

In the code to build the list of named fields for Diameter, don't use
g_strdown(); do our own g_ascii_-style upper-case to lower-case mapping
in the hash function and use g_ascii_strcasecmp() in the compare
function.

We do this because there is no guarantee that toupper(), tolower(), and
functions that use them will, for example, map between "I" and "i" in
all locales; in Turkish locales, for example, there are, in both
upper case and lower case, versions of "i" with and without a dot, and
the upper-case version of "i" is "I"-with-a-dot and the lower-case
version of "I" is "i"-without-a-dot.  This causes strings that should
match not to match.

This finishes fixing bug 2010 - an earlier checkin prevented the crash
(as there are other ways to produce the same crash, e.g. a bogus
dictionary.xml file), but didn't fix the case-insensitive string matching.

svn path=/trunk/; revision=23623
2007-11-27 18:52:51 +00:00
Sake Blok 9b6f806089 This patch adds (ten) temporary coloring rules which will only live until Wireshark is
quit. Temporary coloring filters can be set by:

- pressing <ctrl>-<digit> will create a conversation coloring filter based on the
  addresses of the currently selected packet (order TCP/UDP/IP/Ethernet)
  This can also be achieved from the "View|Colorize Conversation" menu.

- Rightclicking on a packet in the packet-list will give the option to
  "Colorize Conversation" just as "Conversation Filter" does.

- Rightclicking on an item in the packet-detail-list will give the option to
  "Colorize with filter" which works similar to "Apply as filter"

Temporary filters can be cleared from the same menus or by pressing <ctrl>-<space>.

This patch also adds an item to the above mentioned menu's to add a permanent color filter
in the same way.


The colors for the temporary coloring rules are now hardcoded as I do not know
how to change the color of menu-items and therefore I chose to use icons to
show the actual color of each of the ten temporary coloring rules. Is it at all
possible to have different menu items in different colors?

One other way of solving this is to recreate the icons on the fly after changing
the colors. I will have a look into that once it is clear whether I can use 
different colors within the menu structure.


svn path=/trunk/; revision=23560
2007-11-24 11:38:16 +00:00
Stephen Fisher eae32f15eb Back out part of revision 23395 - leave the toolbar arrow, but remove the
preference to turn it on / off per discussion on -dev list.


svn path=/trunk/; revision=23407
2007-11-09 02:08:00 +00:00
Stephen Fisher ee3d03b7ae Fix Windows builds that cannot find gtk/gtk.h from epan/prefs.c. Write out
toolbar arrow preference even in GTK < 2.4 and just don't use it unless
running GTK 2.4+.


svn path=/trunk/; revision=23397
2007-11-08 02:29:18 +00:00
Stephen Fisher d7c1ba361f Add an arrow with drop-down menu including any toolbar buttons that do not
fit on the top of the screen.  This only works in GTK 2.4+ and there is
a layout preference setting to disable it.


svn path=/trunk/; revision=23395
2007-11-07 21:50:48 +00:00
Stephen Fisher d1d72fd232 Fix for bug #93: changes to the columns has no effect until restart
These changes allow the packet list clist to be destroyed and recreated
with the new column titles/values/order that the user changed in the
preferences without restarting Wireshark. 


svn path=/trunk/; revision=22038
2007-06-04 20:15:10 +00:00
Ronnie Sahlberg 3f4f542449 add workaround so that gtk1 compiles again thanks to stupid const mismatch between
gtk versions  and warnings treaded as errors


svn path=/trunk/; revision=21852
2007-05-21 02:32:54 +00:00
Stephen Fisher 64cc1b407c From Sebastien Tandel:
(Fixing warnings)

stripped away some unused variables/parameters
+ in prefs.c
    suggestion of parentheses makes gcc happy


svn path=/trunk/; revision=21156
2007-03-23 18:45:21 +00:00
Graeme Lunt a51f1694c9 This change allows a structure to be created under the "Protocols" section of the preferences.
A new function is introduced, prefs_register_protocol_subtree(), that allows the subtree the protocol should appear under to be specified. The subtree is specified as a string, with a '/' delimiting each subtree element. For example,
	prefs_register_protocol(proto_dap, prefs_register_dap);
becomes
	prefs_register_protocol_subtree("OSI/X.500", proto_dap, prefs_register_dap);

The function will create all the intermediate subtree nodes that are required, if they don't already exist. 
This allows the grouping of procotols which should make the list of protocols more manageable as even more are added. The current aim is to group by protocol family e.g. 
+ OSI
  + X.400
      X.411
      X.420
  + X.500
      DISP
      DAP
      DOP
      DSP
  + X.509
      X509AF
      X509CE
      ...

but others grouping could be envisioned (e.g. by first letter). 

As the intermediate nodes may already have preferences (e.g. OSI), then modules are now allowed to have submodules. Previously each node was either a subtree or held preferences. This is consistent with the "User Interface" node.

The subtree structure has no effect on how the preferences are saved to file, and the "Protocol Preferences..." menu option will bring up the preferences expanded to the correct node.

In addition, a new "blank page" has been introduced for intermediate nodes that have no preferences (and is also used when the "Protocols" node itself is chosen). This prevents confusion when the user moves from a node with preferences to a node without preferences, but the page old page is still shown.

There is also a change to prevent '#' characters in a value being treated as a comment when parsing the preferences file. (There is nothing that adds comments when writing the preferences file.) 


svn path=/trunk/; revision=21066
2007-03-19 19:08:22 +00:00
Luis Ontanon d70a58f881 second iteration:
* fields of an uat table now are passed using an array of uat_filed_t
* field callbacks take two more userdata arguments
* add some macros to define uat field callbacks.
* uats can be registered as preferences for a specific protocol
   - the preference widget is a button that opens the uat's window
* dfilter-macro => reflect changes to API


svn path=/trunk/; revision=20695
2007-02-03 14:25:02 +00:00
Jeff Morriss bf110f3999 Only certain 'base' values make sense in 'prefs_register_uint_preference()': 0 and 2-36. Assert out if a different value is found.
svn path=/trunk/; revision=20644
2007-01-31 04:14:11 +00:00