Commit Graph

119 Commits

Author SHA1 Message Date
Guy Harris 75de95e784 Remove redundant protocol names from preference values.
svn path=/trunk/; revision=9505
2003-12-31 09:58:56 +00:00
Guy Harris 4b37928246 Make the "max count of recently-visited files" preference unsigned.
Get rid of an unused variable.

Fix up whitespace.

svn path=/trunk/; revision=9475
2003-12-29 19:59:05 +00:00
Richard Sharpe e29be9a141 Add more code to handle the recent_files_count_max as a preference ...
Here we can read and write it from and to the preferences file. I only have
to add code to allow it to be set in the Edit->Preferences area,

svn path=/trunk/; revision=9464
2003-12-28 23:20:08 +00:00
Richard Sharpe 015681b24e Connect the recent_file_count_max variable to the prefs.gui_recent_file_count_max variable entry, and fix a small spelling/grammar mistake.
Now all we need is some enterprising individual to write the small amount of
preferences code to actually allow it to be changed etc, but I have to go to
Costco, so, later...

svn path=/trunk/; revision=9463
2003-12-28 21:10:26 +00:00
Guy Harris 839ce07c9a Handle the move of "smpp" preferences to "smpp-gsm-sms".
svn path=/trunk/; revision=9434
2003-12-23 21:29:25 +00:00
Ulf Lamping 792fb5f8fb changed read_prefs_file(): read in a generic config file and do a callback to
pref_set_pair_fct() for every key/value pair found

svn path=/trunk/; revision=9274
2003-12-13 17:24:47 +00:00
Guy Harris 7bd2e232a9 Export "protocol_t" as an opaque type.
Make "proto_is_protocol_enabled()" and "proto_get_protocol_short_name()"
take a "protocol_t *" as an argument, so they don't have to look up the
"protocol_t" - this will probably speed them up considerably, and
they're called on almost every dissector handoff.

Get rid of a number of "proto_is_protocol_enabled()" calls that aren't
necessary (dissectors called through handles, including those called
through dissector tables, or called as heuristic dissectors, aren't even
called if their protocol isn't enabled).

Change some direct dissector calls to go through handles.

svn path=/trunk/; revision=8979
2003-11-16 23:17:27 +00:00
Guy Harris 9c1b169dd9 From Gisle Vanem:
Copy the "gui_fileopen_*" fields in "copy_prefs()".

	Fix a typo in "free_prefs()".

svn path=/trunk/; revision=8915
2003-11-09 01:36:21 +00:00
Guy Harris 44a967d7e6 From Ulf Lamping: add a preference to control whether to show or hide
the main toolbar (currently no GUI to set it; that's in progress).

svn path=/trunk/; revision=8754
2003-10-22 22:13:13 +00:00
Guy Harris ee5c9ff5b8 From Ulf Lamping: add a GUI preference item to control the toolbar
style.

Make the style text arrays static, as nobody uses them outside prefs.c.

Use FALSE and TRUE for the values for the Boolean controlling the
highlighting style.

Note that we're now using stock icons in the toolbar in GTK+ 2.x.

Put back the resizing of elements in the top-level container, at least
for GTK+ 1.2[.x]; otherwise, the toolbar's height never gets smaller,
even if you change the style in such a way as to reduce the height of
the elements (icons+text -> icons or text, icons -> text).

Make some routines and variables not used outside gtk/toolbar.c static.

svn path=/trunk/; revision=8720
2003-10-16 21:19:12 +00:00
Guy Harris ffa3ad8ef5 From Ian Schorr:
Add a preference to control whether the "File > Open" dialog box
	should start out in the last directory in which it looked - and
	save that in the preferences file across invocations - or should
	always start out in a user-specified directory, and add another
	preference to specify that directory.

	Write out section name comments into the preferences file.

Clean up white space a bit.

svn path=/trunk/; revision=8699
2003-10-14 23:20:17 +00:00
Guy Harris 301bc24c43 Don't put an entry for a protocol into the Preferences dialog if it
doesn't have any settable preferences (for example, if it has only
obsolete preferences).

svn path=/trunk/; revision=8590
2003-10-02 21:06:11 +00:00
Guy Harris d09530d0cf Don't export MAX_VAR_LEN - nobody uses it.
svn path=/trunk/; revision=8453
2003-09-10 23:55:52 +00:00
Guy Harris 81fc518ec6 From Nathan Jennings:
support for user-supplied interface descriptions;

	support for hiding interfaces in drop-down list in capture
	dialog.

Clean up comments written to preferences file.

svn path=/trunk/; revision=8419
2003-09-08 21:44:42 +00:00
Guy Harris cdd8b24d5c Fix a typo.
svn path=/trunk/; revision=8267
2003-08-26 05:56:43 +00:00
Guy Harris ddf6a8acf2 From Michael Lum: add the ability to have a preferences file containing
a list of disabled protocols, and to save that list from the Edit >
Protocols dialog box.

Add checks for read errors in "read_prefs()".

Clean up white space.

svn path=/trunk/; revision=8144
2003-08-07 00:41:28 +00:00
Guy Harris a1fec03a31 Allow hyphens in preference module names, as the WAP protocols have IANA
names, which include hyphens.

svn path=/trunk/; revision=8127
2003-08-04 17:32:46 +00:00
Gerald Combs d98ee5ef39 Add two preferences to control ADNS, one to enable/disable it and one to
set its concurrency level.  Fix an ADNS queueing bug.

svn path=/trunk/; revision=8063
2003-07-22 03:14:31 +00:00
Guy Harris e1647e4504 From Richard Urwin:
add support for a system-wide color filter file;

	fix a bug where "read_filters()" didn't close the file handle.

Use the "get_datafile_path()" routine he added to construct the pathname
of the Diameter directory, the global preferences file, and the manuf
file.

svn path=/trunk/; revision=7677
2003-05-15 07:44:54 +00:00
Guy Harris bbb746f9b1 From Erwin Rol: ArtNET support.
svn path=/trunk/; revision=7518
2003-04-21 21:28:39 +00:00
Guy Harris 9442f5bc7d Don't create a protocol tree or do anything to the columns before
calling "tcp_dissect_pdus()", so that if we don't have the final segment
of a multi-segment packet, we don't change the columns or put in an
empty protocol tree item for NDPS.

Rename "ndps.desegment_ndps" to "ndps.desegment_tcp" - the "ndps." is
sufficient to indicate that it's for desegmenting NDPS, but we now have
a flag for desegmenting NDPS-over-SPX, so we should indicate that the
other flag is for desegmenting NDPS-over-TCP.

svn path=/trunk/; revision=7425
2003-04-09 08:43:53 +00:00
Guy Harris 283afef806 From Tomas Kukosa - allow a preference name to begin with the string
that's the name of the module, as long as the prefix doesn't end with
"." or "_" (so you can register "tc.tcp.port" or "tc.tcp_port", but not
"tc.tc.port" or "tc.tc_port").

svn path=/trunk/; revision=7351
2003-03-13 18:17:59 +00:00
Guy Harris 9de14cd339 When fixing up old preferences, check the module for the current
preference by comparing "module->name" against the module, not by
checking the first part of the preference name - the preference name
might not contain the correct module name, as we've mapped some modules.

svn path=/trunk/; revision=7350
2003-03-12 19:45:52 +00:00
Guy Harris 569e74a1f3 When registering a string preference, if the value of the preference is
NULL, convert it to a copy of a null string, otherwise replace it with a
copy of the string, so that we know that the variable for the preference
always points to a string that can be freed.

That also obviates the need to worry about a null-pointer value for a
preference variable when checking to see whether a preference has changed.

When checking for a string preference not being set, check for an empty
string, not a null pointer - the above code turns null pointers into
pointers to empty strings, *and* the GUI code does (and always did!) the
same.

svn path=/trunk/; revision=7342
2003-03-11 22:51:52 +00:00
Guy Harris 60f5f856fd Fix a couple of checks for families with renamed preferences.
svn path=/trunk/; revision=7034
2003-01-29 21:27:36 +00:00
Guy Harris 231f28ce08 Panic if a preference starts with the name of the module to which it
belongs, as that's redundant.

Fix a bunch of cases where that was done, and map the old name to the
new name.

Instead of marking "mtp3.mtp3_standard" as obsolete, map it to
"mtp3.standard".

svn path=/trunk/; revision=7030
2003-01-28 23:56:40 +00:00
Guy Harris e5d7b5dff7 Get rid of the extra "pcli." in the "pcli.pcli.udp_port" preference.
Map "pcli.pcli.udp_port" to "pcli.udp_port".

svn path=/trunk/; revision=7025
2003-01-28 22:27:20 +00:00
Guy Harris 392fee6d7a Support putting preferences into arbitrary places in a tree, which is
used to construct the "Edit->Preferences" dialog box; this includes the
ability to register a "subtree" for preferences.  Instead of
special-casing protocol preferences, have a subtree "Protocols" for
protocol preferences.

svn path=/trunk/; revision=6808
2002-12-20 01:48:57 +00:00
Gerald Combs 586bcd657c Disable network name resolution by default.
svn path=/trunk/; revision=6350
2002-09-28 15:23:13 +00:00
Olivier Abad 9226809ef4 - add a new GUI preference in the gtk2 port. It allows to use
alternating colors in all TreeView widgets (see
  gtk_tree_view_set_rules_hint()).

- remove unused preferences in the gtk2 port (tree_expander_style and
  tree_line_style).

svn path=/trunk/; revision=6296
2002-09-14 10:07:40 +00:00
Jörg Mayer 7c4176d868 Removed trailing whitespaces from .h and .c files using the
winapi_cleanup tool written by Patrik Stridvall for the wine
project.

svn path=/trunk/; revision=6117
2002-08-28 21:04:11 +00:00
Jörg Mayer 173fe5aef4 Replace the types from sys/types.h and netinet/in.h by their glib.h
equivalents for the toplevel directory. The removal of winsock2.h will
hopefully not cause any problems under MSVC++, as those files using
struct timeval still include wtap.h, which still includes winsock2.h.

svn path=/trunk/; revision=5932
2002-08-02 23:36:07 +00:00
Jörg Mayer 9630bf353e Fix a few more memleaks found by valgrind (all deriving
from the get_persconffile_path mess).

svn path=/trunk/; revision=5927
2002-08-01 03:15:29 +00:00
Guy Harris 3baa49d71d Handle the "bool" members the same way we handled the members for
enumerated values - "boolp" for pointers, "boolval" for values.

svn path=/trunk/; revision=5678
2002-06-16 00:58:38 +00:00
Guy Harris 3a407d9567 From Chris Waters: don't use "bool" as a variable name or structure
member, as it's a C++ keyword.

svn path=/trunk/; revision=5677
2002-06-16 00:53:20 +00:00
Guy Harris 20a92d3ffc From Michal Melerowicz:
Fixed TFT decoding and processing PPP payload inside of GTP
	protocol conf options

That change also put all GTP preferences under a "gtp" heading; put in
another hack so that your old "gtpv0" and "gtpv1" settings are recognized.

svn path=/trunk/; revision=5588
2002-05-29 07:35:55 +00:00
Guy Harris d3604ae33e Don't give ordinal numbers to preferences that aren't displayed.
svn path=/trunk/; revision=5554
2002-05-25 01:47:46 +00:00
Guy Harris 0bcf2de0d9 Add a mechanism for registering "obsolete" preference modules, so that
if a dissector had preferences at one point but no longer does, it can
register that fact, so that the old preferences in the preference file
are silently ignored.

Use that mechanism in the NCP dissector.

svn path=/trunk/; revision=5446
2002-05-11 18:58:02 +00:00
Guy Harris 2eb1990b0b From Joerg Mayer: mark function arguments as unused.
svn path=/trunk/; revision=5052
2002-03-31 21:05:47 +00:00
Guy Harris ee5ca25d31 Include files from the "epan" directory and subdirectories thereof with
"epan/..." pathnames, so as to avoid collisions with header files in any
of the directories in which we look (e.g., "proto.h", as some other
package has its own "proto.h" file which it installs in the top-level
include directory).

Don't add "-I" flags to search "epan", as that's no longer necessary
(and we want includes of "epan" headers to fail if the "epan/" is left
out, so that we don't re-introduce includes lacking "epan/").

svn path=/trunk/; revision=4586
2002-01-21 07:37:49 +00:00
Guy Harris df6fa9cc90 Include <resolv.h> after "globals.h", as, at least on some platforms,
headers included by "globals.h" define MAXNAMELEN, and <resolv.h>
defines it if it's not already defined.

svn path=/trunk/; revision=4545
2002-01-15 20:09:55 +00:00
Guy Harris 86d348aed1 Fix some preferences to eliminate the extra copy of the protocol name at
the beginning, and to use underscores rather than periods where the
preference's name really isn't part of a hierarchical namespace.

Use "%u" rather than "%d" to print unsigned quantities.

svn path=/trunk/; revision=4543
2002-01-15 10:01:21 +00:00
Guy Harris 0a03b0f73e Add a preferences page for the name resolution flags.
Separate the preferences value for those flags and the name resolution
code's value into separate variables; this means that the resolution
code no longer depends on the preferences code, and may let us
eventually have the current setting and the preference setting differ
(so that a user can temporarily override the preference setting without
causing subsequent saves of the preferences to save the temporary
value).

Add routines to create various types of widgets for preferences, and to
fetch the values for "enumerated" preferences, and use them both in the
code to handle hardwired preference pages and table-driven preference
pages.

svn path=/trunk/; revision=4536
2002-01-13 20:35:12 +00:00
Guy Harris 9357047df5 Add a preferences page for capture preferences, so that the user can
directly edit the capture preferences, rather than only being able to
set them implicitly from the values for the most recent capture.

Add a preferences item for the interface on which to capture.

Get rid of some unused variables.

svn path=/trunk/; revision=4510
2002-01-10 07:43:39 +00:00
Gerald Combs 30c5551caa Add preferences to save the main window size and position. If enabled,
the geometry is saved at exit.  Should we save the main window pane
sizes as well?

Move the DEF_WIDTH and DEF_HEIGHT #defines from gtk/main.h to prefs.h.
Remove the reference to DEF_WIDTH from proto_hier_stats_dlg.c.

svn path=/trunk/; revision=4462
2001-12-31 04:41:50 +00:00
Guy Harris 421e391953 From Darren New: BXXP dissector modified to be a BEEP dissector.
Handle "bxxp." preferences as "beep." preferences.

svn path=/trunk/; revision=4357
2001-12-08 01:45:36 +00:00
Gilbert Ramirez cc18ae2d70 When reading the preferences file, if the "module.preference" string
references an unknown module, check the "preference" part to see if
another "." is found; iterate until a known module is found, or until
nor more "."'s are found.

Needed for the new "x.25.non_q_bit_is_sna" preference.

svn path=/trunk/; revision=4225
2001-11-19 19:53:14 +00:00
Guy Harris 79163b436a Fix a couple of comments.
svn path=/trunk/; revision=4187
2001-11-09 08:36:56 +00:00
Gilbert Ramirez caa3a9f213 Allow periods in module names.
svn path=/trunk/; revision=4177
2001-11-08 02:54:31 +00:00
Guy Harris cc7347ebf6 Allow a dissector to register preferences that it no longer supports as
obsolete; we silently ignore attempts to set those in a preferences
file, so that we don't spam the user with error messages caused by them
having saved preferences in an earlier release that contained those
preferences.

Make the Diameter and iSCSI dissectors register obsolete preferences.

Crash if some code tries to register a preferences module with a name
that contains something other than lower-case ASCII letters, numbers, or
underscores, or that has already been registered, or if some code tries
to register a preference with a name that contains something other than
lower-case ASCII letters, numbers, underscores, or periods, or that has
already been registered, so that we don't put code like that in a
release and have to shovel code into "prefs.c" to fix it up later.  (The
problem with multiple modules or preferences with the same name should
be obvious; the problem with names with blanks, or upper-case letters,
or punctuation, is that they're a pain to type on the command line.)

svn path=/trunk/; revision=4148
2001-11-04 02:50:21 +00:00