Commit Graph

95 Commits

Author SHA1 Message Date
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
Guy Harris 2dd6f2451d Crash if a dissector tries to create more than one preference with the
same name; if that happens, there's no way to tell to which of them a
line in a preferences file, or an option supplied with "-o", refers, so
it's clearly a bug in the code.  This has happened in the past, and
fixing that required some preference renaming *and* code in the
preferences-file-reading code to try to preserve the user's settings and
not spew warnings when starting Ethereal or Tethereal; let's try to
catch it *before* the code gets into the code base.

svn path=/trunk/; revision=4143
2001-11-03 21:37:00 +00:00
Guy Harris 509f30374e Have a routine that takes a file name for a personal configuration file
and generates the path name; have it, if the file is to be opened for
reading on Win32, check whether it exists and, if not, check for it in
the old home directory-based configuration directory and, if so, return
that path instead, so that files saved with earlier versions of Ethereal
will be seen.

svn path=/trunk/; revision=4072
2001-10-24 07:18:39 +00:00
Guy Harris cf5a1d86e7 Add a new routine to create the ".ethereal" directory for a user.
Use that routine rather than duplicating that code in the routines to
write out the preference file and filter files.

Use it in the code for the color filter dialog, so that the directory in
question is created if necessary.

As that routine returns an error indication, have the code that calls
that routine put up a message box if the attempt fails.

svn path=/trunk/; revision=4065
2001-10-23 05:01:02 +00:00
Guy Harris e4db9c4b64 Add a routine to get the directory in which personal configuration files
reside.  Use it, rather than concatenating the user's home directory and
".ethereal" in a number of files.

Fix up some additional places to use G_DIR_SEPARATOR_S as the pathname
separator.

svn path=/trunk/; revision=4061
2001-10-22 22:59:26 +00:00
Guy Harris e980dd9d3b Use G_DIR_SEPARATOR_S rather than "/" as a pathname separator in format
strings used to generate pathnames.

Move the definition of PF_DIR from <epan/epan.h> to <epan/filesystem.h>,
so that files requiring only the definition of PF_DIR don't have to
include <epan/epan.h>, and get rid of no-longer-necessary includes of
<epan/epan.h>.

Add a routine to get the directory for "system files" such as
"/etc/ethers" - it's "/etc" on UNIX, and the datafile directory on
Windows (as there's no "/etc" on Windows).  Use that to construct the
pathname of the ethers and ipxnet files.

svn path=/trunk/; revision=4056
2001-10-21 21:48:00 +00:00
Guy Harris 10b0659ca0 Keep the list of modules with preferences sorted by the module name, in
dictionary order (case-insensitive), so that they show up in order in
the "Preferences" dialog box.

svn path=/trunk/; revision=4052
2001-10-21 17:30:50 +00:00
Guy Harris 9921fc5b3b The Quake3 dissector wasn't in the previous release, only users running
CVS versions would've had "quake3.udp.port" in the preferences file;
therefore, we can remove the code to map them to "quake3.udp.arena_port"
and "quake3.udp.master_port".

svn path=/trunk/; revision=4034
2001-10-16 07:35:11 +00:00
Guy Harris bdbd51ceb4 The Quake III dissector called both the arena server port preference and
the master server port preference "quake3.udp.port"; rename them to
"quake3.udp.arena_port" and "quake3.udp.master_port".

svn path=/trunk/; revision=4023
2001-10-13 07:43:25 +00:00
Guy Harris 9d601c6799 On Windows, use the directory in which the binary resides as the
directory in which global data files are stored.  If an installed binary
is being run, that's the correct directory for them; if a build-tree
binary is being run, the "manuf" file will be there, and you can put
other data files there as well, if necessary.

Do the same with plugins, except that, if there's no
"plugins\\{version}" subdirectory of that directory, fall back on the
default installation directory, so you at least have a place where you
can put plugins for use by build-tree binaries.  (Should we, instead,
have the Windows build procedure create a subdirectory of the "plugins"
source directory, with the plugin version number as its name, and copy
the plugins there, so you'd use the build-tree plugin binaries?)

Move "test_for_directory()" out of "util.c" and into
"epan/filesystem.c", with the other file system access portability
wrappers and convenience routines.  Fix "util.h" not to declare it - or
other routines moved to "epan/filesystem.c" a while ago.

svn path=/trunk/; revision=3858
2001-08-21 06:39:18 +00:00
Guy Harris baa0f41513 Use an unsigned character when processing string lists, so that you can
use "isspace()" on them without getting screwed by negative array
subscripts.

svn path=/trunk/; revision=3780
2001-07-23 18:14:36 +00:00
Guy Harris d7149c990b Make "put_string_list()" truly take a GList of strings as arguments;
generate such a list from the list of column format information and hand
the resulting list to "put_string_list()" when writing out the preference.

svn path=/trunk/; revision=3779
2001-07-23 00:12:47 +00:00
Guy Harris 91fe015bca Reformat to be a bit closer to the way it looked before the parser
changes.

svn path=/trunk/; revision=3778
2001-07-22 22:41:37 +00:00
Guy Harris 44740fe821 Ignore non-quoted white space in string lists.
Backslash-escape backslashes and double quotes when writing string lists
out.

svn path=/trunk/; revision=3777
2001-07-22 22:34:42 +00:00
Guy Harris 4b66d25227 "col_format_to_pref_str()" is used only in "prefs.c", and knows about
the format of string lists in a preferences file; rename it to
"put_string_list()", make it take the list as an argument rather than
working only on "prefs.col_list", and put it in "prefs.c".

svn path=/trunk/; revision=3776
2001-07-22 21:56:25 +00:00
Guy Harris 6b664c122c Check for valid column titles (non-zero-length) and valid column formats
in preference settings.

In the process of doing that, fix a memory leak (we were handing a null
pointer, rather than a pointer to the list of strings in
"column.format", to "clear_string_list()").

svn path=/trunk/; revision=3775
2001-07-22 21:50:47 +00:00
Guy Harris 1ca40d8b3e Don't require the strings in string lists to be quoted, just allow them
to be quoted.

Correctly handle backslash-quoting in string lists.

Return an error if the "get_string_list()" indicates that
"column.format" string list is syntactically invalid or if it doesn't
contain an even number of entries.

svn path=/trunk/; revision=3773
2001-07-22 21:27:54 +00:00
Guy Harris b9222c0011 Various signed vs. unsigned fixes, from Joerg Mayer.
svn path=/trunk/; revision=3560
2001-06-18 01:49:17 +00:00
Guy Harris 7778d77931 Make Ethereal default to promiscuous-mode captures, the way it did
before promiscuous-vs-non-promiscuous was made a preference in the
preferences file (I suspect at least some of the problems people are
seeing with captures on Windows not seeing all the traffic they expect
to see might be due to the captures not being done in promiscuous mode -
and the default behavior shouldn't have changed in any case).

svn path=/trunk/; revision=3511
2001-06-04 08:07:34 +00:00
Guy Harris 6ee04dad33 Support for "-N" flag enabling selected forms of name resolution, from
Joerg Meyer.

Support for saving to the preferences file the settings for all types of
name resolution.

Do a case-insensitive check for "true" and "false" in Boolean preference
settings.

svn path=/trunk/; revision=3489
2001-05-31 08:36:46 +00:00
Guy Harris f8c9764894 There's no "enable name resolution in captures" preference in Ethereal,
and never was - there's only an Ethereal-wide "enable name resolution"
preference.  Name it just "name_resolve".

Replace all tests of "g_resolving_actif" with tests of
"prefs.name_resolv", and replace all code that sets "g_resolving_actif"
with code that sets "prefs.name_resolv", so that the setting of
"prefs.name_resolv" actually affects whether names are resolved or not.

svn path=/trunk/; revision=3300
2001-04-15 03:37:16 +00:00
Jeff Foster 78ce39994c Added the ethereal capture preferences to the preference file.
svn path=/trunk/; revision=3298
2001-04-13 14:59:30 +00:00
Guy Harris 65dc469326 "get_home_dir()", in "epan/filesystem.c", uses
"find_last_pathname_separator()" on Win32; move the other pathname
manipulation routines from "util.c" into "epan/filesystem.c".

Remove from "util.h" the declarations of routines not defined in
"util.c", and put them into "epan/filesystem.h" if they're not already
there.

Adjust #includes to make the above work.

svn path=/trunk/; revision=3241
2001-04-02 09:53:46 +00:00
Guy Harris d18149374f Map the old MGCP preference names to the new ones (including a special
hack to handle the two copies of "mgcp.{tcp,udp}.port" as best we can).

svn path=/trunk/; revision=2832
2001-01-05 22:45:26 +00:00
Guy Harris 3613c121fe Add a new "prefs_register_protocol()" routine, which is like
"prefs_register_module()" except that it takes a protocol index as
returned by "proto_register_protocol()" as its first argument, rather
than taking two character strings as arguments as its first two
arguments, and uses the protocol's abbreviation as the name to use for
preferences in the preferences file and the "-o" flag and uses the
protocol's short name as the name to use in the tabs in the
"Edit->Preferences" window.

svn path=/trunk/; revision=2812
2001-01-03 07:53:48 +00:00