Commit Graph

186 Commits

Author SHA1 Message Date
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