aboutsummaryrefslogtreecommitdiffstats
path: root/prefs.c
Commit message (Collapse)AuthorAgeFilesLines
* Replace the types from sys/types.h and netinet/in.h by their glib.hJörg Mayer2002-08-021-6/+2
| | | | | | | | 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
* Fix a few more memleaks found by valgrind (all derivingJörg Mayer2002-08-011-5/+7
| | | | | | from the get_persconffile_path mess). svn path=/trunk/; revision=5927
* Handle the "bool" members the same way we handled the members forGuy Harris2002-06-161-5/+5
| | | | | | enumerated values - "boolp" for pointers, "boolval" for values. svn path=/trunk/; revision=5678
* From Chris Waters: don't use "bool" as a variable name or structureGuy Harris2002-06-161-5/+5
| | | | | | member, as it's a C++ keyword. svn path=/trunk/; revision=5677
* From Michal Melerowicz:Guy Harris2002-05-291-1/+7
| | | | | | | | | | 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
* Don't give ordinal numbers to preferences that aren't displayed.Guy Harris2002-05-251-3/+11
| | | | svn path=/trunk/; revision=5554
* Add a mechanism for registering "obsolete" preference modules, so thatGuy Harris2002-05-111-4/+30
| | | | | | | | | | 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
* From Joerg Mayer: mark function arguments as unused.Guy Harris2002-03-311-2/+2
| | | | svn path=/trunk/; revision=5052
* Include files from the "epan" directory and subdirectories thereof withGuy Harris2002-01-211-5/+5
| | | | | | | | | | | | | "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
* Include <resolv.h> after "globals.h", as, at least on some platforms,Guy Harris2002-01-151-2/+2
| | | | | | | headers included by "globals.h" define MAXNAMELEN, and <resolv.h> defines it if it's not already defined. svn path=/trunk/; revision=4545
* Fix some preferences to eliminate the extra copy of the protocol name atGuy Harris2002-01-151-1/+15
| | | | | | | | | 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
* Add a preferences page for the name resolution flags.Guy Harris2002-01-131-10/+11
| | | | | | | | | | | | | | | | | 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
* Add a preferences page for capture preferences, so that the user canGuy Harris2002-01-101-5/+19
| | | | | | | | | | | 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
* Add preferences to save the main window size and position. If enabled,Gerald Combs2001-12-311-10/+66
| | | | | | | | | | 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
* From Darren New: BXXP dissector modified to be a BEEP dissector.Guy Harris2001-12-081-3/+11
| | | | | | Handle "bxxp." preferences as "beep." preferences. svn path=/trunk/; revision=4357
* When reading the preferences file, if the "module.preference" stringGilbert Ramirez2001-11-191-18/+35
| | | | | | | | | | 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
* Fix a couple of comments.Guy Harris2001-11-091-4/+4
| | | | svn path=/trunk/; revision=4187
* Allow periods in module names.Gilbert Ramirez2001-11-081-2/+2
| | | | svn path=/trunk/; revision=4177
* Allow a dissector to register preferences that it no longer supports asGuy Harris2001-11-041-3/+95
| | | | | | | | | | | | | | | | | | | | | | 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
* Crash if a dissector tries to create more than one preference with theGuy Harris2001-11-031-3/+17
| | | | | | | | | | | | 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
* Have a routine that takes a file name for a personal configuration fileGuy Harris2001-10-241-20/+5
| | | | | | | | | | 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
* Add a new routine to create the ".ethereal" directory for a user.Guy Harris2001-10-231-22/+1
| | | | | | | | | | | | | 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
* Add a routine to get the directory in which personal configuration filesGuy Harris2001-10-221-28/+38
| | | | | | | | | | 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
* Use G_DIR_SEPARATOR_S rather than "/" as a pathname separator in formatGuy Harris2001-10-211-6/+8
| | | | | | | | | | | | | | | | 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
* Keep the list of modules with preferences sorted by the module name, inGuy Harris2001-10-211-2/+11
| | | | | | | dictionary order (case-insensitive), so that they show up in order in the "Preferences" dialog box. svn path=/trunk/; revision=4052
* The Quake3 dissector wasn't in the previous release, only users runningGuy Harris2001-10-161-29/+9
| | | | | | | | 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
* The Quake III dissector called both the arena server port preference andGuy Harris2001-10-131-54/+76
| | | | | | | 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
* On Windows, use the directory in which the binary resides as theGuy Harris2001-08-211-7/+14
| | | | | | | | | | | | | | | | | | | | | | 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
* Use an unsigned character when processing string lists, so that you canGuy Harris2001-07-231-2/+3
| | | | | | | use "isspace()" on them without getting screwed by negative array subscripts. svn path=/trunk/; revision=3780
* Make "put_string_list()" truly take a GList of strings as arguments;Guy Harris2001-07-231-55/+57
| | | | | | | 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
* Reformat to be a bit closer to the way it looked before the parserGuy Harris2001-07-221-13/+12
| | | | | | changes. svn path=/trunk/; revision=3778
* Ignore non-quoted white space in string lists.Guy Harris2001-07-221-49/+96
| | | | | | | Backslash-escape backslashes and double quotes when writing string lists out. svn path=/trunk/; revision=3777
* "col_format_to_pref_str()" is used only in "prefs.c", and knows aboutGuy Harris2001-07-221-2/+52
| | | | | | | | 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
* Check for valid column titles (non-zero-length) and valid column formatsGuy Harris2001-07-221-8/+31
| | | | | | | | | | 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
* Don't require the strings in string lists to be quoted, just allow themGuy Harris2001-07-221-50/+77
| | | | | | | | | | | | 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
* Various signed vs. unsigned fixes, from Joerg Mayer.Guy Harris2001-06-181-3/+3
| | | | svn path=/trunk/; revision=3560
* Make Ethereal default to promiscuous-mode captures, the way it didGuy Harris2001-06-041-6/+5
| | | | | | | | | | 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
* Support for "-N" flag enabling selected forms of name resolution, fromGuy Harris2001-05-311-13/+86
| | | | | | | | | | | | 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
* There's no "enable name resolution in captures" preference in Ethereal,Guy Harris2001-04-151-10/+20
| | | | | | | | | | | | 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
* Added the ethereal capture preferences to the preference file.Jeff Foster2001-04-131-1/+50
| | | | svn path=/trunk/; revision=3298
* "get_home_dir()", in "epan/filesystem.c", usesGuy Harris2001-04-021-2/+2
| | | | | | | | | | | | | "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
* Map the old MGCP preference names to the new ones (including a specialGuy Harris2001-01-051-5/+80
| | | | | | hack to handle the two copies of "mgcp.{tcp,udp}.port" as best we can). svn path=/trunk/; revision=2832
* Add a new "prefs_register_protocol()" routine, which is likeGuy Harris2001-01-031-1/+13
| | | | | | | | | | | | "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
* Have "proto_register_protocol()" build a list of data structures forGuy Harris2001-01-031-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | protocols, in addition to adding structures to the list of filterable fields. Give it an extra argument that specifies a "short name" for the protocol, for use in such places as pinfo->current_proto; the dialog box for constructing filters; the preferences tab for the protocol; and so on (although we're not yet using it in all those places). Make the preference name that appears in the preferences file and the command line for the DIAMETER protocol "diameter", not "Diameter"; the convention is that the name in question be all-lower-case. Make some routines and variables that aren't exported static. Update a comment in the ICP dissector to make it clear that the dissector won't see fragments other than the first fragment of a fragmented datagram. svn path=/trunk/; revision=2810
* Fix a number of problems that caused compiles to fail ifGuy Harris2000-11-181-5/+5
| | | | | | PLUGINS_NEED_ADDRESS_TABLE was defined. svn path=/trunk/; revision=2662
* At least on UNIX/X, make the wildcard pattern that's the initialGuy Harris2000-10-151-2/+47
| | | | | | | | | | | | | fixed-width font preference match only ISO 8859/1 fonts, so that we don't match ISO 10646 fonts (as happens on some systems). Users will have to select a font with the appropriate character set encoding if they don't want stuff displayed as 8859/1 (note that making the widgets that use the fixed-width font handle arbitrary character sets is probably a non-trivial task, given that the *dissectors* will also have to handle arbitrary character sets, and that the character set used in a given packet isn't necessarily the character set in the user's locale). svn path=/trunk/; revision=2496
* More EPAN-related code movements. Get rid of usage of #include "globals.h"Gilbert Ramirez2000-09-281-1/+2
| | | | | | | and #include "util.h" from epan code. Move get_home_dir() into epan/filesystem.c as it's used by plugins.c. svn path=/trunk/; revision=2461
* Oops, I left off one "-*" in the XLFD description for the font that isGuy Harris2000-09-121-2/+2
| | | | | | | | 6x13 on most UNIXes (frankly, I think XLFD should have been hidden very deeply in the bowels of most X toolkits, and not even exposed to most programmers, much less to users). svn path=/trunk/; revision=2420
* Graham Bloice's patch to support inverse video rather than boldfaceGuy Harris2000-09-081-1/+13
| | | | | | | | | | highlighting of the bytes, in the hex dump window, corresponding to a selected field. Also, make "remember_ptree_widget()" static, as it's not used outside "gtk/proto_draw.c". svn path=/trunk/; revision=2399
* Add prefs.gui_marked_[fb]g color preferences for theLaurent Deniel2000-08-211-1/+37
| | | | | | | | | color of marked frames. They are currently only available from preferences file, but I will add the color selection in GUI later. svn path=/trunk/; revision=2327