Commit Graph

423 Commits

Author SHA1 Message Date
Jeff Morriss 81b0681c12 Fix CID 715144: assert that the preference we were looking for was found. It
should be which is why this is an assertion not a NULL check.

svn path=/trunk/; revision=52846
2013-10-25 14:57:55 +00:00
Alexis La Goutte f99f7bf17e From Dean Lee via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8597 Qtshark: Chinese Simp translation
From me :
Add to the (new) Qtshark Language selector

svn path=/trunk/; revision=51871
2013-09-09 17:49:15 +00:00
Alexis La Goutte fe4407ebc7 Add Preference to change Language (in QtShark)
Need restart application to change language

svn path=/trunk/; revision=51869
2013-09-09 16:20:45 +00:00
Evan Huus 14b098baf7 When freeing the preferences of a module, also free the preferences of its
submodule.

svn path=/trunk/; revision=51328
2013-08-13 02:56:55 +00:00
Evan Huus 615687f4c0 Fix the most egregious of the newly exposed leaks, about 28KB.
svn path=/trunk/; revision=51047
2013-07-31 01:55:20 +00:00
Evan Huus 999c603027 Convert preferences to wmem. Exposes some more memory leaks that didn't show up
before.

svn path=/trunk/; revision=51046
2013-07-31 01:49:57 +00:00
Guy Harris afe77c5a4e Clean up white space a bit, make the description of the capture column
type depend on what values are supported, add some comments.

Regularize the curly bracket style a bit.

svn path=/trunk/; revision=50998
2013-07-29 00:27:20 +00:00
Gerald Combs a05f55bffc Add a UAT dialog. Make UAT preferences uat_t * instead of void *.
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-25 23:49:47 +00:00
Guy Harris 21609c54bb Don't report a syntax error if a preference name without a "." is
specified, report it as "no such preference" instead.  That should be
less confusing; see

   http://stackoverflow.com/questions/17757659/how-to-apply-and-override-preferences-with-tshark

for an example of confusion.

#BACKPORT 1.10, 1.8

svn path=/trunk/; revision=50745
2013-07-21 00:56:42 +00:00
Pascal Quantin 57aebcf776 From Cal Turney via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8942 :
Fix segmentation fault when reading pref file

svn path=/trunk/; revision=50737
2013-07-19 08:04:58 +00:00
Pascal Quantin fdc867a4fc Temporarily disable offending code triggering a segmentation fault on Linux (see bug 8942)
svn path=/trunk/; revision=50725
2013-07-18 09:12:59 +00:00
Anders Broman 09c5152fa7 From Cal Turney:
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-18 04:28:36 +00:00
Anders Broman e9d236ec0b Backing out r50690 (exept simple_dialog)
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-17 05:52:51 +00:00
Anders Broman e0341f776c From Cal Turney:
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-07-17 04:52:19 +00:00
Guy Harris 86147047f5 Fix one that got missed.
svn path=/trunk/; revision=50660
2013-07-16 03:16:26 +00:00
Chris Maynard 9d3cda266b Revert r50655 for this file.
svn path=/trunk/; revision=50659
2013-07-16 03:04:47 +00:00
Chris Maynard d331c33b4f This should fix warning: to be safe all intermediate pointers in cast from 'gchar **' to 'const char **' must be 'const' qualified.
svn path=/trunk/; revision=50655
2013-07-16 02:34:44 +00:00
Evan Huus afa96c3f33 Fix some of the preferences leaks. Don't strdup the defaults, as they will be
strduped again immediately when they are registered. To make this safe, tweak
the flow a bit so that they are guaranteed to be registered immediately after
being set here.

svn path=/trunk/; revision=50563
2013-07-14 00:45:19 +00:00
Anders Broman 06f748c0b5 prefs.c: In function 'capture_column_set_cb':
prefs.c:1745: warning: unused variable 'syntax_error'

svn path=/trunk/; revision=50457
2013-07-09 05:14:33 +00:00
Anders Broman bbf7636e61 From Cal Turney:
Wireshark crashes when switching from a v1.11.0 profile to a v1.4.6 prof and then to a v1.5.1 profile.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8884

#BACKPORT 1.10

svn path=/trunk/; revision=50455
2013-07-09 04:22:43 +00:00
Jeff Morriss 20674d8877 From Cal Turney via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8876 :
Errors in preferences preceding "gui.console_open" are not immediately
displayed in the console:  If a gui.console_open is set to "AUTOMATIC" or
"ALWAYS" and an error or warning occurs in a preference previous to it, the
warning is not displayed in the console window because the window is not yet
open. However, if the user switches to another profile and returns, the
messages will be displayed.

Fix: Move the gui.console_open to the top of the list in
prefs_register_modules() of prefs.c. Existing preferences files can be
corrected by saving them.

svn path=/trunk/; revision=50269
2013-06-30 21:58:25 +00:00
Michael Mann 277aed869e Make colors used by colorize_filter_te_as_* as preferences. Bug 5413 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5413)
svn path=/trunk/; revision=50203
2013-06-28 03:03:36 +00:00
Jeff Morriss 838e3767ce From Cal Turney via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8707 :
As suggested by Jakub, don't use strlen() when g_string->len will do.

From me:

Don't assume that just because we "got_val" that the value has a length.
Checking it first eliminates this warning from Valgrind:

==11954== Invalid read of size 1
==11954==    at 0x61D1466: read_prefs_file (prefs.c:3012)
==11954==    by 0x61D1841: read_prefs (prefs.c:2955)
==11954==    by 0x409901: main (tshark.c:1137)
==11954==  Address 0xc05244f is 1 bytes before a block of size 16 alloc'd
==11954==    at 0x4A08A6E: realloc (vg_replace_malloc.c:662)
==11954==    by 0x3CF8C4D736: g_realloc (in /usr/lib64/libglib-2.0.so.0.3400.2)
==11954==    by 0x3CF8C66226: ??? (in /usr/lib64/libglib-2.0.so.0.3400.2)
==11954==    by 0x3CF8C66ACE: g_string_insert_c (in /usr/lib64/libglib-2.0.so.0.3400.2)
==11954==    by 0x61D1566: read_prefs_file (gstring.h:139)
==11954==    by 0x61D1841: read_prefs (prefs.c:2955)
==11954==    by 0x409901: main (tshark.c:1137)

svn path=/trunk/; revision=49731
2013-06-03 22:07:21 +00:00
Anders Broman aff9b07fd3 From Cal Turney:
Preferences with trailing commas are ignored.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8707

svn path=/trunk/; revision=49629
2013-05-30 05:30:08 +00:00
Guy Harris 7f97cc813e From Cal Tunney:
contify some arrays;

	don't complain about "print.command" on Windows, just ignore it,
	as it's valid on non-Windows platforms;

	fix some comparisons for preferences moved elsewhere;

	clean up some comments.

svn path=/trunk/; revision=49485
2013-05-21 21:28:41 +00:00
Guy Harris dc8af1b552 Clean up white space.
svn path=/trunk/; revision=49484
2013-05-21 20:38:51 +00:00
Anders Broman 1569217448 From Cal Turney:
When another profile is selected, its column.hidden preference is ignored.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8696

svn path=/trunk/; revision=49434
2013-05-20 05:33:18 +00:00
Gerald Combs a5037603ce Tell the user tha gui.update.channel probably shouldn't be changed.
svn path=/trunk/; revision=48970
2013-04-22 17:58:28 +00:00
Jeff Morriss c2ced4a2ab Don't try to open <home>/.wireshark on Windows: Wireshark hasn't written to
that directory since 2001 and reading from that directory was only left in for
backwards compatibility with versions prior to r4702.  I think it's now safe
to remove that backwards compatibility.

This eliminates the last argument of get_persconffile_path().

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8437

svn path=/trunk/; revision=48797
2013-04-09 02:48:03 +00:00
Bill Meier 0df5a9390d From beroset:
remove C++ incompatibilities
 https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 attachment #10397

svn path=/trunk/; revision=48438
2013-03-20 01:18:10 +00:00
Irene Rüngeler 44e6a88b13 Add interface options preferences.
svn path=/trunk/; revision=48275
2013-03-13 12:38:08 +00:00
Michael Tüxen 15501fad2a Try to fix the buildbots.
The patch for capture_dlg.c is from Anders...

svn path=/trunk/; revision=48164
2013-03-07 12:06:55 +00:00
Irene Rüngeler cb42bc9fec Add buffersize and snap length to the preferences.
svn path=/trunk/; revision=48163
2013-03-07 09:16:55 +00:00
Anders Broman d4e23d8daa Use explicit casts.
svn path=/trunk/; revision=48162
2013-03-07 07:48:33 +00:00
Bill Meier 24eff41b08 it's ==> its & its ==> it's as needed.
svn path=/trunk/; revision=47896
2013-02-26 02:19:57 +00:00
Gerald Combs 5a5d872639 Register the gui.update.interval preference.
svn path=/trunk/; revision=47750
2013-02-19 23:05:27 +00:00
Gerald Combs 81a5be5813 Enable automatic updates for Win64. Fix a copy/paste error.
svn path=/trunk/; revision=47749
2013-02-19 22:57:40 +00:00
Gerald Combs e48236a436 Add automatic software update checks for Win32 using WinSparkle. Add
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
2013-02-19 22:21:17 +00:00
Gerald Combs d21f62b73b Add a directory name preference type (PREF_DIRNAME) and registration
routine (prefs_register_directory_preference). Add PREF_FILENAME and
PREF_DIRNAME support to the Qt module preferences. Change a couple of
preferences to directory names.

Clean up some names and default settings.

svn path=/trunk/; revision=47573
2013-02-08 18:07:34 +00:00
Gerald Combs d1f6e2e3ec Use a not-quite-black background for marked packets.
http://ianstormtaylor.com/design-tip-never-use-black/

svn path=/trunk/; revision=47392
2013-01-31 18:46:40 +00:00
Gerald Combs 2dff8d7605 Add font and color preferences. Unfortunately Qt doesn't have a color
picker widget so we're back to popping up dialogs. Move the contents of
monospace_font.{cpp,h} to wireshark_application.{cpp,h}.

Pango and Qt use completely different string representations for fonts.
Add a separate gui.qt.font_name preference so that they don't clobber
each other.

svn path=/trunk/; revision=47240
2013-01-24 01:10:12 +00:00
Gerald Combs 6ef1fc5002 GTK+:
Get rid of user-hostile behavior. In the layout preferences pane 2 & 3
radio buttons overrode the user's selection if a duplicate item was
selected. Now we assume that the user knows what he or she is doing and
steal duplicate selections from the other panes.

Qt:

Match the new GTK+ behavior in the layout preferences. Add padding
around the layout images. Add toolbar style preferences to the
Appearance pane (instead of the layout pane).

All:

Remove the selection mode and scrollbar placement prefs and mark them
obsolete as recently discussed on -dev.

Adjust the layout images yet again after more Awful Monitor Testing.

svn path=/trunk/; revision=47214
2013-01-22 18:27:18 +00:00
Jaap Keuter 5fe15dfd37 Fix CID 966637 and CID 966638
Check pointers before using them.

svn path=/trunk/; revision=47186
2013-01-20 21:14:12 +00:00
Gerald Combs ae7ee61e84 Rename the "saved_val" preference element to "stashed_val" in order to
more clearly indicate that it's a copy of a preference value rather than
something we've saved in the preferences file. Update
prefs_pref_to_str() to handle default, stashed, and current prefs.

Create ui/preference_utils.[ch] and move some common routines there. Use
prefs_pref_type_name() in the GTK+ preferences dialog.

Make the "OK" button in the Qt preferences dialog work. We simply write
the prefs and redissect on "OK" and do nothing on "Cancel". This is
intentionally different from the Apply/OK/Cancel behavior in the GTK+
version.

Add a general "emitAppSignal" method to wsApp and use it for packet
dissection and preference changes.

Suggest that we might want to create a WsString class to make conversion
between QStrings, gchar *s, and GStrings easier.

svn path=/trunk/; revision=47139
2013-01-18 00:50:14 +00:00
Gerald Combs b0ef1a67ed strcmp → g_strcmp0. Fixes a crash on Windows.
svn path=/trunk/; revision=47085
2013-01-14 23:23:50 +00:00
Gerald Combs b82f42d8cf When the user is editing text or selecting from a combo box, don't
immediately close the dialog if he or she presses the escape or enter
keys. Revert the value if the user presses escape. Properly handle the
base for uint preferences. Fix a NULL pointer dereference.

Add a gchar_free_to_qstring utility routine which creates a QString from
a g_malloced string and frees it.

svn path=/trunk/; revision=47083
2013-01-14 22:21:11 +00:00
Gerald Combs 0fa6a4c421 Allow editing via the advanced preferences tree. Double-clicking an
item's name, status, or type resets it to its default value.
Double-clicking the item's value lets you edit it. Implement the
advanced search field. (Clicking OK and Cancel still doesn't yet do
anything.)

Note that we could probably use a
prefs_register_{uint16|port}_preference routine for 16-bit values. Make
reset_pref public. Update some names and descriptions.

svn path=/trunk/; revision=46986
2013-01-07 19:13:03 +00:00
Alexis La Goutte 86e16b4f61 Fix some Dead Store (Dead initialization) Warning found by Clang
svn path=/trunk/; revision=46978
2013-01-06 19:13:33 +00:00
Gerald Combs b99199fcf8 Constify a couple of variables and export a couple of functions.
svn path=/trunk/; revision=46943
2013-01-05 03:42:28 +00:00
Gerald Combs 4a3342e4ba Break out preference type names, type descriptions, string
representations, and default status out of write_prefs and into their
own routines. Split the corresponding custom preference write callbacks.
Fix an apparent memory leak in the hidden column callback.

Add an initial preferences dialog to the Qt port. Use the new preference
routines to implement an "Adavanced" page similar to the "about:config"
page available in many web browsers. Standard pages will hopefully follow
soon.

Remove some QDebug includes and make sure our QTreeWidgets have uniform
row heights set.

svn path=/trunk/; revision=46942
2013-01-05 02:30:58 +00:00
Gerald Combs 5bd252c44f Remove some duplicate code from ui/profile.c and move in more code from
ui/gtk/profile_dialog.c. Use the correct profile list in
profile_dialog.c so that deletion works.

Add a profile dialog to the Qt port. For some reason it crashes when
changing configuration profiles, which might be related to bug 7722.
Move the Qt configuration profile initialization from main.cpp to
wireshark_application.cpp. Make sure QMenuBar doesn't grab the
configuration profiles action on OS X. Add more role color names to
tango_colors.h.

svn path=/trunk/; revision=46834
2012-12-29 01:39:02 +00:00
Guy Harris f79410f0cd Tabs -> spaces.
svn path=/trunk/; revision=46800
2012-12-26 22:34:39 +00:00
Guy Harris 7df01d368e Update a comment.
svn path=/trunk/; revision=46799
2012-12-26 22:34:09 +00:00
Guy Harris 8ed7a73e22 Fix a bunch of warnings.
Cast away some implicit 64-bit-to-32-bit conversion errors due to use of
sizeof.

Cast away some implicit 64-bit-to-32-bit conversion errors due to use of
strtol() and strtoul().

Change some data types to avoid those implicit conversion warnings.

When assigning a constant to a float, make sure the constant isn't a
double, by appending "f" to the constant.

Constify a bunch of variables, parameters, and return values to
eliminate warnings due to strings being given const qualifiers.  Cast
away those warnings in some cases where an API we don't control forces
us to do so.

Enable a bunch of additional warnings by default.  Note why at least
some of the other warnings aren't enabled.

randpkt.c and text2pcap.c are used to build programs, so they don't need
to be in EXTRA_DIST.

If the user specifies --enable-warnings-as-errors, add -Werror *even if
the user specified --enable-extra-gcc-flags; assume they know what
they're doing and are willing to have the compile fail due to the extra
GCC warnings being treated as errors.

svn path=/trunk/; revision=46748
2012-12-26 05:57:06 +00:00
Evan Huus 6ef55f30d8 Rename wmem_permanent_scope -> wmem_epan_scope to reflect the fact that it
is technically scoped to the library, not the process. It's also shorter :)

svn path=/trunk/; revision=45877
2012-11-03 15:08:00 +00:00
Evan Huus 67f2dc0876 Don't leak memory when registering duplicate preferences subtree modules. Take
wmem_permanent copies of the substrings we actually need, and g_free the
temporary tokenized copy.

svn path=/trunk/; revision=45813
2012-10-27 20:41:58 +00:00
Evan Huus b7ff007bbb There's no need to g_strdup our default prefs - setting them as literals
works just fine and doesn't leak any memory.

Use wmem_permanent_scope() for the one string we do have to copy, to ensure
it doesn't leak either.

svn path=/trunk/; revision=45812
2012-10-27 20:29:12 +00:00
Chris Maynard 5ef60b46a3 We are already saving size and maximized state by default. Save position too.
svn path=/trunk/; revision=45334
2012-10-05 21:58:45 +00:00
Chris Maynard a1722d352a Trivial: LEDs -> Icons
svn path=/trunk/; revision=45223
2012-09-30 15:59:40 +00:00
Gerald Combs 3b6428bb44 Don't pass a null pointer to strcmp.
svn path=/trunk/; revision=45175
2012-09-27 16:23:06 +00:00
Jakub Zawadzki 5376508e7d Fix bug #7669: Preference editor removes (does not save) column definitions after the 27th.
put_string_list() was generating string with list of columns to be saved to preference file, 
but buffer is limited to MAX_FMT_PREF_LEN (1024 bytes). It looks like 1024 bytes is not enough.

Fix bug by writting directly to file.


svn path=/trunk/; revision=45043
2012-09-21 12:29:04 +00:00
Jeff Morriss 3729335973 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45016
2012-09-20 01:48:30 +00:00
Michael Mann 5672bee3a8 Fix bug 7650 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7650)
prefs.gui_colorized_fg and prefs.gui_colorized_bg not properly integrated into newer preference architecture

svn path=/trunk/; revision=44557
2012-08-18 02:47:37 +00:00
Pascal Quantin 6d711993f7 Squelch a few "dereferencing type-punned pointer" warnings when compiling with GCC 4.1.3
svn path=/trunk/; revision=44553
2012-08-17 17:29:51 +00:00
Michael Mann 722fed08b3 Bugfix 7608 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7608)
svn path=/trunk/; revision=44376
2012-08-09 12:46:44 +00:00
Michael Mann bec794d51e Bugfix capture column preferences
svn path=/trunk/; revision=44370
2012-08-09 00:46:17 +00:00
Michael Mann c5a649d613 Complete compiler warnings from r44348
svn path=/trunk/; revision=44364
2012-08-08 21:40:22 +00:00
Michael Tüxen 58e6d17082 Get it compiling on Mac OS X.
svn path=/trunk/; revision=44363
2012-08-08 21:34:43 +00:00
Michael Mann acf2c06044 Compiler error fixes resulting from r44348
svn path=/trunk/; revision=44359
2012-08-08 20:47:20 +00:00
Michael Mann e0e533d643 Have (almost) all preferences use the generic preferences API (per https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7402). This cleaned up a lot of hardcoded code and allows breaking up the prefs structure (or at least prevent it from growing too large) if desired.
Bugfixed problems mentioned in
http://www.wireshark.org/lists/wireshark-dev/201208/msg00001.html

Column preferences now support default '#' character

svn path=/trunk/; revision=44348
2012-08-08 16:54:02 +00:00
Michael Mann 3d12ea758b Base framework to allow all preferences to be part of generic preferences API. Implementation will follow, but I wanted the framework in place first.
svn path=/trunk/; revision=44331
2012-08-08 12:13:24 +00:00
Chris Maynard 6b733f55bc Plug a memory leak introduced with r44239. Resolves Coverity CID 714243: Unused pointer value. (Previous commit actually resolved Coverity CID 714242.)
svn path=/trunk/; revision=44266
2012-08-04 19:01:09 +00:00
Chris Maynard 230c57e6ec Plug a memory leak introduced with r44239. Resolves Coverity CID 714243: Unused pointer value.
svn path=/trunk/; revision=44265
2012-08-04 18:57:16 +00:00
Irene Rüngeler c610984bf5 Fix bug in while loop
svn path=/trunk/; revision=44242
2012-08-03 13:46:57 +00:00
Irene Rüngeler 2e1952678f Make the columns of the capture options dialog selectable. Changes are stored in the preferences file.
The ordering can be changed by dragging the column. The order is not stored.

svn path=/trunk/; revision=44239
2012-08-03 11:15:40 +00:00
Anders Broman df0bef704a From Michael Mann:
Expand show version preference.
implementation of Steven's suggestion of a radio button (actually
dropdown) of the 4 possibilities. 

I changed  the default to  have the version on both in
the welcome screen and on the window as that's how it was and people tend not to change the preferences I think.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6437

svn path=/trunk/; revision=44153
2012-07-31 07:27:39 +00:00
Jeff Morriss db754f7821 Don't bother printing the Description of STATIC_TEXT and UAT preferences:
they don't make it into the preferences file anyway...

svn path=/trunk/; revision=43607
2012-07-08 01:48:52 +00:00
Jeff Morriss 8f12c9d7d7 First phase of fixing https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7380 :
Add a new name resolution option: whether or not use the configured (in the OS)
name resolver (e.g., DNS) to resolve network names.  When this option is disabled
but network name resolution is enabled then Wireshark will resolve only those
names that it can from local sources.  This includes (at least, AFAIK):

- name resolutions that Wireshark picks up on from DNS packets it decodes
- the "user hosts file" (~/.wireshark/hosts on *NIX)
- what Wireshark reads out of capture file (the PCAPNG name resolution block)

This new preference defaults to "use external resolvers" for backward
compatibility (so people turning on network name resolution will get the old
behavior).

This option can be set via Edit->Preferences and on the command line; there
remain several UIs (e.g., the "open capture file" dialog, the
View->Name Resolution menu, etc.) that don't have the new option yet.


Also expand on the "description" for the name resolution preferences: these
are used not only in the tooltips but are also written to the preferences
file.  The previous text didn't include enough context when written do the
preferences file.

svn path=/trunk/; revision=43605
2012-07-08 01:31:48 +00:00
Guy Harris 85f219be2e From Michael Mann:
Add a preference for the packet length statistics.

Fixes bug 3239.

svn path=/trunk/; revision=43597
2012-07-07 08:15:41 +00:00
Guy Harris ef825ec6d3 Only one place is needed for creating preference panes; this clears up
some warnings from GTK+.

For interior nodes in the preference module tree, we create a page even
if the module itself has no preferences, so there's *something* we can
show if the user clicks on it.  (Showing the top-level protocols page is
a bit weird, and requires us to keep track of it.)

svn path=/trunk/; revision=43596
2012-07-07 02:49:17 +00:00
Guy Harris f0ebe6a075 Ask about a possible simplification (by just handling all modules by
pathname, so that any module we create for a protocol is just created as
being under "Protocols/").

svn path=/trunk/; revision=43595
2012-07-07 02:10:44 +00:00
Guy Harris 503361d6e8 Get rid of most tabs (which cleans up mixed indenting with tabs and
4-tab spaces).

svn path=/trunk/; revision=43592
2012-07-07 00:30:47 +00:00
Pascal Quantin 7e38fe433a Fix compilation with gcc 4.3.2 and without GEOIP
svn path=/trunk/; revision=43587
2012-07-06 12:25:54 +00:00
Jakub Zawadzki 88cb14dda3 - remove no longer used #defines
- prefs.name_resolve_concurrency is now just 'name_resolve_concurrency'
- add notes about possible (?) integer overflows.

svn path=/trunk/; revision=43586
2012-07-06 07:55:58 +00:00
Anders Broman c19583b72c From Michael Mann:
Generic preferences implementation - Printing and Name Resolution.

svn path=/trunk/; revision=43579
2012-07-06 04:48:36 +00:00
Jakub Zawadzki bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
Anders Broman 3814106d7e From Michael Mann:
generic preferences implementation

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7402

svn path=/trunk/; revision=43484
2012-06-25 21:05:36 +00:00
Jeff Morriss 4fdc3c3cc2 Create, and start using, file name preferences.
File name preferences are basically just string preferences except that the
GUI will present a "Browse" button that allows the user to go and find the
file s/he wants (rather than having to blindly type in the full path).

svn path=/trunk/; revision=43228
2012-06-13 01:13:12 +00:00
Gerald Combs 37af1a5f94 Add some needed parenthesis as pointed out by Jakub and the OS X
builders.

svn path=/trunk/; revision=42935
2012-05-30 23:14:07 +00:00
Gerald Combs 22d347ae3e In recent versions of GLib (test with 2.32) g_log_default_handler
helpfully ignores G_LOG_LEVEL_INFO and G_LOG_LEVEL_DEBUG messages by
default. If the console_log_level preference includes either of those
two levels set the G_MESSAGES_DEBUG environment variable so that those
messages are printed.

Add checks for various console log messages to the stdin capture suite.

Fixes bug 7265.

svn path=/trunk/; revision=42930
2012-05-30 21:42:24 +00:00
Jeff Morriss 6a4b07bb55 Store a copy of the default preferences (e_prefs; the dissectors' default
preference values have been stored for a while now).

If a preference has not been changed from its default value, comment it out
when writing the preferences file.  That way you won't get warnings about
some new "gui.*" (or other non-dissector) preference when switching between
SVN Wireshark and some older version.


Also fix some ommissions in copy_prefs() (preferences that were not copied).


(All these non-dissector preferences seem to require an awful lot of code;
it would be very nice to have a non-dissector preference registration API that
the GUI and core could use so we could eliminate a lot of this code.)

svn path=/trunk/; revision=42648
2012-05-16 03:06:08 +00:00
Jeff Morriss 2071275974 Most dissectors don't register their preferences in subtrees, so don't allocate the submodules pe_tree until it's needed.
svn path=/trunk/; revision=42646
2012-05-16 01:20:55 +00:00
Anders Broman a2921f7b97 From Evan Huus:
Get rid of unused cur_pos variable.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7203

svn path=/trunk/; revision=42282
2012-04-27 08:18:58 +00:00
Guy Harris a6ccc83e22 If we set "column.hidden" on the command line but don't set
"column.format" in a later argument, make sure we mark the appropriate
existing columns as hidden.

As part of cleaning up the infrastructure for doing this, store the COL_
code for a column in a fmt_data structure rather than a pointer to the
raw column format string; this simplifies some code.

Have a routine to return whether a column is visible, not hidden, as
it's used to set a "visible" flag.

svn path=/trunk/; revision=39822
2011-11-13 22:51:49 +00:00
Guy Harris 6b1284fa7c Get rid of the last remnants of the "check the syntax of capture
filters" preference; now that we always build with threads, we do the
syntax checking in a separate thread, so it doesn't hang the UI, and we
no longer have UI to change it but we were still trying to fetch the
value of the non-existent checkbox for it and getting a warning printed.

(We still check for it when reading, so that we don't print warnings if
it's present.)

svn path=/trunk/; revision=39788
2011-11-10 23:02:42 +00:00
Guy Harris 835647751c prefs_reset() has to reset the dissector preferences to their defaults,
as we don't save to a preferences file preference values that are equal
to their defaults, so if you change profiles, a preference that has a
non-default value in the old profile and a default value in the new
profile, so that it's *not* in the preference file for the new profile,
will not be set to the right value unless we reset all protocol
preferences to their defaults first.

svn path=/trunk/; revision=39777
2011-11-10 00:53:48 +00:00
Gerald Combs 7d442f4c22 Change the use of threads from "mostly always, depending on your
configure options and Gtk+ and GLib versions" to "always".

svn path=/trunk/; revision=39751
2011-11-07 23:42:53 +00:00
Stig Bjørlykke edc2689422 Only have the option to turn off syntax check capture filter
if not using threads.

svn path=/trunk/; revision=39732
2011-11-04 17:02:33 +00:00
Bill Meier c3d02e4b57 vlan dissector has been restored;
pref "eth.qinq_ethertype" has been moved(restored) to "vlan.qinq_ethertype".

svn path=/trunk/; revision=39136
2011-09-25 21:10:04 +00:00
Anders Broman 7c0741ad15 Revert Revision 34838 "Resolve bug #2254: Migrate the 802.1q VLAN dissector into the Ethernet II."
as this causes a lot of problems.
See 
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5680
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6305
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6366

Original bug:
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2254

svn path=/trunk/; revision=39100
2011-09-23 11:01:13 +00:00
Stig Bjørlykke 1a046d693b From Edwin Groothuis via bug 6207:
Added Filter Toolbar Save functionality.

From me:
Removed unused code.

svn path=/trunk/; revision=38937
2011-09-08 09:35:10 +00:00
Graeme Lunt b5cddc0336 An option to autoscroll the expanded item in the details view to a fixed
position (percentage) within the details view. 


svn path=/trunk/; revision=38558
2011-08-16 10:57:52 +00:00
Stig Bjørlykke a17cde69ec Check arguments to prefs_find_preference().
Fix CID 1259.

svn path=/trunk/; revision=38540
2011-08-14 20:31:16 +00:00
Chris Maynard 539c74fb0c From Jim Young via bug 3196: Enhancement to Expert Info Composite Tab Labels
Reference: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3196

svn path=/trunk/; revision=38324
2011-08-03 18:45:06 +00:00
Stig Bjørlykke 246d94edb2 Improved check for valid custom column in preferences.
This fixes bug 6131.

svn path=/trunk/; revision=38064
2011-07-16 18:30:57 +00:00
Stig Bjørlykke 6747aef250 Added a preference to turn of capture filter syntax check.
This can be used to disable the effect in bug 5356.

svn path=/trunk/; revision=37830
2011-06-29 10:42:29 +00:00
Gerald Combs 8d88f3a790 Make pcap-ng the default. Add a compile-time option to prefer pcap-ng or
pcap.  Add a "-P" capture option which tries to use pcap instead of
pcap-ng ("-P" seemed to be the best option but we may want to use a
different letter).

Update the documentation and release notes.

svn path=/trunk/; revision=37696
2011-06-17 17:52:31 +00:00
Stig Bjørlykke 0f9af51ce1 Preferences for x411 moved to p1.
svn path=/trunk/; revision=37687
2011-06-17 08:03:18 +00:00
Guy Harris c9b9dd690b Create a new frame_data_sequence data type; it represents a dense
sequence of frame_data structures, indexed by the frame number.  Extract
the relevant bits of the capture_file data structure and move them to
the frame_data_sequence, and move the relevant code from cfile.c and
tweak it to handle frame_data_sequence structures.

Have a possibly-null pointer to a frame_data_sequence structure in the
capture_file structure; if it's null, we aren't keeping a sequence of
frame_data structures (we don't keep that sequence when we're doing
one-pass processing in TShark).

Nothing in libwireshark should care about a capture_file structure; get
rid of some unnecessary includes of cfile.h.

svn path=/trunk/; revision=36881
2011-04-27 02:54:44 +00:00
Gerald Combs c6fecb57b0 From Ivan Sy via bug 3343:
- Support for DTLS and SSL RSA keys list using User Accessible Table
- Support for IPv6 SSL as posted by bug#3343 comment#1
- 'any' and 'anyipv4' for IPv4 wildcard
- 'anyipv6' for IPv6 wildcard
- UAT fields validation.


From me:

- Update paramaters to match UAT API changes.
- Change the UAT filename.
- Fix buffer overflow for IPv6 addresses.
- Allow the use of hostnames along with numeric addresses.
- Don't convert strings to addresses twice.
- Don't use the same variable name for different data types.
- Make "any" mean "any IPv4 or any IPv6".
- Bend the concept of obsolete preferences slightly so that we can convert
  and old-style key list to a UAT.
- Clean up whitespace.
- Don't point to a User's Guide section for now; it may make more sense to
  keep using the wiki page.
  
SSL dissector changes have been tested. DTLS dissector changes have not.

svn path=/trunk/; revision=36875
2011-04-26 21:59:11 +00:00
Gerald Combs a6bbdaa849 Fix some dead code and zero division issues found by Clang scan-build.
In convert_string_case() use g_utf8_strup() instead of converting each
character by hand. Hopefully this won't cause any unexpected changes in
behavior.

svn path=/trunk/; revision=36006
2011-02-18 22:43:48 +00:00
Jeff Morriss 376d57fcd9 Use g_error() (with a hopefully-useful error message) instead of g_assert() to report problems with preference registrations.
svn path=/trunk/; revision=35683
2011-01-27 17:31:41 +00:00
Jaap Keuter fc4d25fcc4 Allow for NULL preference descriptions.
svn path=/trunk/; revision=35242
2010-12-22 06:25:33 +00:00
Stephen Fisher fabe85aa2e Change default for "Welcome screen and title bar shows version" to on per
discussion in this thread on the wireshark-dev mailing list:

    http://www.wireshark.org/lists/wireshark-dev/201011/msg00151.html


svn path=/trunk/; revision=35113
2010-12-03 21:52:05 +00:00
Stephen Fisher 28fa4266d7 Add "Length" as a new default column on a trial basis between the protocol
and info columns per discussion on -dev list:

    http://www.wireshark.org/lists/wireshark-dev/201011/msg00151.html 


svn path=/trunk/; revision=35068
2010-11-29 20:43:24 +00:00
Stephen Fisher b18e8fd1ca Resolve bug #2254: Migrate the 802.1q VLAN dissector into the Ethernet II.
svn path=/trunk/; revision=34838
2010-11-10 22:37:30 +00:00
Stig Bjørlykke b1e1dcb54b Support empty column titles.
svn path=/trunk/; revision=34777
2010-11-04 11:37:06 +00:00
Jeff Morriss 6eba069093 Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4768 :
Return an error if the user specifies a value in a range in excess of the
range-specified maximum.

Except when reading in preferences files which might have ranges that exceed
the maximum (because we didn't use to check): in that case silently lower the
out-of-range values.

svn path=/trunk/; revision=34698
2010-10-29 22:09:31 +00:00
Jeff Morriss 710a96470f If we get a syntax error reading the preferences file, tell which preference we were reading when we got the error.
svn path=/trunk/; revision=34655
2010-10-27 01:43:24 +00:00
Stig Bjørlykke 21319003d5 Added an extra validity check for cust_format_info.
svn path=/trunk/; revision=34235
2010-09-24 13:19:03 +00:00
Stig Bjørlykke f5ab6c1930 Store "Show Resolved" setting for custom columns.
svn path=/trunk/; revision=34220
2010-09-23 19:41:55 +00:00
Sake Blok 7364bef1b3 When using a custom column, make it possible to select which occurrence to show if the field has multiple occurrences.
svn path=/trunk/; revision=34186
2010-09-22 20:56:14 +00:00
Stig Bjørlykke afd6761f46 A GString has it's own length.
svn path=/trunk/; revision=34034
2010-08-31 18:28:59 +00:00
Stig Bjørlykke f75b4ae02b Support space in list of hidden columns.
This fixes bug 5163.

svn path=/trunk/; revision=34033
2010-08-31 15:02:03 +00:00
Jeff Morriss 486562f263 Add some code to prefs_cleanup() to free (most of the) memory associated with the preferences. This only happens during shutdown so it's not fixing a memory leak, but it makes me more comfortable to know where the preferences memory is freed.
svn path=/trunk/; revision=33874
2010-08-21 04:26:26 +00:00
Stephen Fisher a81a8dd250 Modernize the SONMP ("SynOptics Network Management Protocol") dissector by renaming it to NDP ("Nortel Discovery Protocol") and do some basic cleanup.
svn path=/trunk/; revision=33815
2010-08-16 17:19:42 +00:00
Anders Broman c9a7fade6a From Cal Turney:
Optionally display Wireshark version in the main window's title bar.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5040

svn path=/trunk/; revision=33729
2010-08-07 14:37:37 +00:00
Guy Harris deae609c44 Backing out r33631 for now - it has a number of issues.
svn path=/trunk/; revision=33646
2010-07-28 01:12:41 +00:00
Anders Broman 2bd0983a36 From Cal Turney:
Optionally display Wireshark version in the main window's title bar.
(Modified to include SVN version).
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5040

svn path=/trunk/; revision=33631
2010-07-26 13:23:30 +00:00
Stig Bjørlykke 7b64be6a80 Revert COL_DSCP_VALUE back to value set in packet-ip.c.
Right justify COL_DSCP_VALUE (and COL_DCE_CALL as in the old packet list).

svn path=/trunk/; revision=33430
2010-07-05 09:05:27 +00:00
Stig Bjørlykke beb4314276 Introduce "Show Resolved" as an option in custom columns. This will determine
if we show the value or the string representing the value.

This setting is not stored in the preferences file yet, and the option is
not available in the columns preferences window.

svn path=/trunk/; revision=33317
2010-06-25 06:42:34 +00:00
Stig Bjørlykke 2e5c2b805f Check for custom column before using custom_field.
Store hidden columns correctly.

svn path=/trunk/; revision=33288
2010-06-22 13:40:28 +00:00
Stig Bjørlykke 737c0e843b Always make new columns visible.
svn path=/trunk/; revision=33285
2010-06-22 11:09:07 +00:00
Jaap Keuter a47dfc3efa Fix for bug 4888:
Convert DSCP column to the proper custom column filter code.

svn path=/trunk/; revision=33269
2010-06-20 18:23:35 +00:00
Stig Bjørlykke d3e1e2df1e Added "Hide Column" functionality.
svn path=/trunk/; revision=33266
2010-06-20 16:23:43 +00:00
Jeff Morriss 12b5361a7b Remember the default value of each protocol preference.
If, when we're writing the preferences file, the current value of the
preference is the same as the default, write out the preference (since the
preference file is also the documentation for the preferences) but comment it
out (so that if, for example, you go back to an older version of Wireshark
you won't get warnings about non-existant preferences that you didn't
change--and thus probably don't care too much about).

It might be interesting to, in the future, add a UI to restore the default
values.

svn path=/trunk/; revision=32967
2010-05-26 03:31:30 +00:00
Jeff Morriss ea0c9d6b14 Reindent a bit
svn path=/trunk/; revision=32960
2010-05-26 01:51:41 +00:00
Jeff Morriss c420b83ee5 find_val_for_string() is only used in prefs.c so remove the prototype
and make it static.

When reading enum preferences, use the current value of the preference as the
default value of the preference instead of a hard-coded 1.  This way if we
couldn't find the appropriate value we'll don't end up changing the preference
to something that may or may not make sense.

svn path=/trunk/; revision=32950
2010-05-25 20:57:14 +00:00
Guy Harris 36623bcb71 From H.sivank: GtkOSXApplication support.
Call the various flavors of OS X integration just "OS X integration",
not anything with "IGE" in it - it appears that, in some places,
"ige-mac-integration" refers only to the older Carbon-based functions,
although the library still appears to be called -ligemacintegration.

Update the URLs for the information about the OS X integration
libraries.

Clean up help message for --with-pcap-remote.

Clean up white space a bit.

Speaking of white space, it's "Mac OS X", not "MacOS X".

svn path=/trunk/; revision=32941
2010-05-25 00:35:44 +00:00
Guy Harris e1e576c11b Support monitor mode in the capture preferences.
Use prefs_is_capture_device_hidden() to find out whether a device should
be hidden - don't scan the list of hidden devices ourselves.

svn path=/trunk/; revision=32820
2010-05-15 19:38:13 +00:00
Stig Bjørlykke 7385fd55bd Use correct name for gprs-ns.
svn path=/trunk/; revision=32514
2010-04-19 10:34:52 +00:00
Stig Bjørlykke d5b16e1f97 Revision 32295 renamed "nsip" to "gprs_ns".
svn path=/trunk/; revision=32513
2010-04-19 10:23:41 +00:00
Balint Reczey e24d953fe1 Disable OID resolution and loading SMI modules by default.
Add an option to enable OID resolution.
Add an option to suppress errors reported by libsmi.

svn path=/trunk/; revision=32096
2010-03-03 17:19:30 +00:00
Bill Meier 9d663d7081 Fix various gcc -Wshadow warnings.
svn path=/trunk/; revision=31720
2010-01-28 18:45:46 +00:00
Stig Bjørlykke ff9123acbe Cleanup the escape/unescape underscore in Packet List column headers.
We only have to do this when actually set or get the title from the widget.

svn path=/trunk/; revision=31689
2010-01-26 23:05:40 +00:00
Gerasimos Dimitriadis c08fa6f3cf Move underscore escaping/unscaping function to strutil.c;
Update decoding of IS-801 Request GPS Acquisition Assistance

svn path=/trunk/; revision=31685
2010-01-26 18:21:17 +00:00
Stig Bjørlykke 1c1eb9021a Handle escape/unescape underscore when read/write the preferences
column.format entries.  Also fix a small memory leakage.

svn path=/trunk/; revision=31670
2010-01-25 21:45:17 +00:00
Stig Bjørlykke 17a01968d9 Ensure we don't write outside the pref_str in put_string_list().
This bug was introduced in revision 31487, when putting each
column.format entry on separate lines.

svn path=/trunk/; revision=31653
2010-01-25 10:22:00 +00:00
Anders Broman 759c418158 From Jim Young:
Patch to write "column.format:" preference values pairs to separate lines.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4380

svn path=/trunk/; revision=31487
2010-01-11 08:00:56 +00:00
Stig Bjørlykke 47be3577a7 Introduce "Ignore Packet" in the packet list.
This will remove the package from the dissection functions without
removing it from the capture file.

svn path=/trunk/; revision=31287
2009-12-17 01:18:14 +00:00
Anders Broman ce39b29305 Make the filter toolbar style a preference.
svn path=/trunk/; revision=30136
2009-09-25 05:19:18 +00:00
Kovarththanan Rajaratnam d75778eb4a Custom columnfication:
* Deprecate COL_DCE_CTX ("Context ID). Use dcerpc.cn_ctx_id

svn path=/trunk/; revision=29797
2009-09-08 14:59:26 +00:00
Kovarththanan Rajaratnam bc845e056c Custom column deprecation:
We fill out the COL_DSTIDX column by using 'pinfo->dst_idx'. This member is only set by the MDS Header dissector based on 'mdshdr.dstidx'. So remove COL_DSTIDX and migrate to 'mdshdr.dstidx' custom column.

svn path=/trunk/; revision=29795
2009-09-08 14:29:08 +00:00
Kovarththanan Rajaratnam 62af6eff84 Custom column deprecation:
We fill out the COL_SRCIDX column by using 'pinfo->src_idx'. This member is only set by the MDS Header dissector based on 'mdshdr.srcidx'. So remove COL_SRCIDX and migrate to 'mdshdr.srcidx' custom column.

svn path=/trunk/; revision=29794
2009-09-08 14:26:09 +00:00
Kovarththanan Rajaratnam 2cf14900d2 Custom column deprecation:
We fill out the COL_RXID column by using 'pinfo->rxid'. This member is only set by the Fibre Channel dissector based on 'fc.rx_id'. So remove COL_RXID and migrate to 'fc.rx_id' custom column.

svn path=/trunk/; revision=29793
2009-09-08 14:21:14 +00:00
Kovarththanan Rajaratnam cdfeebdd26 Custom column deprecation:
We fill out the COL_OXID column by using 'pinfo->oxid'. This member is only set by the Fibre Channel dissector based on 'fc.ox_id'. So remove COL_OXID and migrate to 'fc.ox_id' custom column.

svn path=/trunk/; revision=29792
2009-09-08 14:17:36 +00:00
Kovarththanan Rajaratnam a108023b2a COL_BSSGP_TLLI is deprecated
svn path=/trunk/; revision=29721
2009-09-05 18:39:46 +00:00
Stig Bjørlykke e275d24c39 Ignore preferences for deleted protocols "etheric" and "isup_thin".
svn path=/trunk/; revision=29709
2009-09-05 13:06:45 +00:00
Bill Meier 94f28dd8f9 (FWIW) One step towards including stdio.h & stdlib.h only when req'd.
svn path=/trunk/; revision=29568
2009-08-26 19:27:49 +00:00
Anders Broman 2dd60e1b66 Custom columnfication:
* Deprecate COL_BSSGP_TLLI (GPRS BSSGP IE TLLI). Use bssgp.tlli

svn path=/trunk/; revision=29546
2009-08-25 05:42:14 +00:00
Kovarththanan Rajaratnam 23d4eba3b1 Custom columnfication:
* Deprecate COL_DELTA_CONV_TIME (Delta time (conversation)). Use tcp.time_delta

svn path=/trunk/; revision=29524
2009-08-23 12:30:48 +00:00
Kovarththanan Rajaratnam b9cbd15469 Custom columnfication:
* Deprecate COL_REL_CONV_TIME (Relative time (conversation)). Use tcp.time_relative

svn path=/trunk/; revision=29523
2009-08-23 12:24:14 +00:00
Kovarththanan Rajaratnam 55cf35e3a0 Custom columnfication:
* Deprecate COL_FR_DLCI (Frame Relay DLCI). Use fr.dlci

svn path=/trunk/; revision=29522
2009-08-23 12:16:10 +00:00
Kovarththanan Rajaratnam ea8296ab26 Avoid signed/unsigned comparison
svn path=/trunk/; revision=29521
2009-08-23 11:35:53 +00:00
Kovarththanan Rajaratnam 51ca1739ae Custom columfication:
* Deprecate COL_DSCP_VALUE (IP DSCP Value). Use ip.dsfield

svn path=/trunk/; revision=29518
2009-08-23 11:12:12 +00:00
Kovarththanan Rajaratnam 00670c55c6 Custom columfication:
* Deprecate COL_HPUX_DEVID (HP-UX Device ID). Use nettl.devid

svn path=/trunk/; revision=29517
2009-08-23 10:25:51 +00:00
Kovarththanan Rajaratnam 205129d25c Custom columfication:
* Deprecate COL_HPUX_SUBSYS (HP-UX Nettl Subsystem). Use nettl.subsys

svn path=/trunk/; revision=29516
2009-08-23 10:20:42 +00:00
Kovarththanan Rajaratnam 56369978ae Custom columfication:
* Deprecate COL_CIRCUIT_ID (Circuit ID). Use iax2.call

svn path=/trunk/; revision=29515
2009-08-23 09:52:57 +00:00
Kovarththanan Rajaratnam 53586615aa Add initial code to handle the migration to custom columns by mapping the deprecated columns into their custom column counterparts when we read the preference file.
There are still many todos in this area:

1) We need to either warn the user that he/she needs to click "Save" in the preference dialog so we can "flush" the old predefined column or apply this change ourself silently.
2) The predefined columns need to be removed from the "Columns" UI.
3) ....

svn path=/trunk/; revision=29514
2009-08-23 09:16:58 +00:00
Stig Bjørlykke a61e285004 Added a preference to capture in Pcap-NG from GUI.
svn path=/trunk/; revision=28740
2009-06-15 16:36:02 +00:00
Gerald Combs 844af38e54 size_t fixes.
svn path=/trunk/; revision=27990
2009-04-08 05:25:14 +00:00
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