Commit Graph

836 Commits

Author SHA1 Message Date
Gerald Combs e01dfff7ce Move common control initialization to gtk/main.c where it belongs.
Remove a MessageBox() call used for debugging.

Fixup whitespace.

svn path=/trunk/; revision=17319
2006-02-16 15:27:03 +00:00
Guy Harris 501dced966 Send LOG_DOMAIN_CAPTURE_CHILD messages to our log handler, so they don't
go to the standard output (as is the case for some such messages,
including the "child is sending an error message to the parent" message,
which shows up if we fail to exec dumpcap).  *Anything* other than an
official capture-child message written to the standard output by the
capture child confuses the heck out of the parent, and can cause it to
think the child closed the pipe (resulting, in the case described in the
previous parenthetical note, in no dialog box being displayed for
dumpcap not being executed).

svn path=/trunk/; revision=17274
2006-02-12 20:17:55 +00:00
Guy Harris b8136fbfa9 Add a routine to attempt to get the absolute pathname of the executable
file, strip off the last component to get the pathname of the directory
containing the executable file, and save it for future use.  On Windows,
you can get that from the OS, but, on UN*X, you have to look at argv[0]
and derive the absolute path from that (argv[0] is not guaranteed to be
an absolute path, or even a path at all).  (In addition, if you're
running from the build directory, you might have to strip off a ".libs/"
added to argv[0] as an artifact of the libtoolizing script.)

Use that in the About dialog, and use it to construct the path of
dumpcap.

Don't put quotes into the path of dumpcap; you don't have to quote
strings with spaces in them when handing them to execvp and, in fact,
you *mustn't* quote them, as the quotes will be treated as part of the
pathname.

svn path=/trunk/; revision=17267
2006-02-12 03:15:29 +00:00
Ulf Lamping ca152df284 various capture child related minor cleanups
svn path=/trunk/; revision=17258
2006-02-11 23:47:03 +00:00
Ulf Lamping 6bb67a3510 font_init don't need to know if running as a capture_child, this will simply no longer happen.
svn path=/trunk/; revision=17257
2006-02-11 23:35:31 +00:00
Ulf Lamping cf94760fa4 the point of no return ...
using dumpcap as the capture child for Ethereal.

dumpcap is a plain console application now, even for Win32 (so no WinMain, create_console and special piping stuff reguired). The undocumented command line option -Z will switch dumpcap into "child mode", using binary instead of plain text output messages to communicate with a parent Ethereal.

Ethereal's main.c no longer needs to distinguish between child mode or not, so some simplifying here.

capture_sync.c has to call dumpcap in a "hidden window" mode using CreateProcess instead of spawnvp, otherwise an uggly console window would appear. The handles created by _pipe doesn't seem to be inheritable for this function, using CreatePipe instead.

The file capture_loop.c is only needed by dumpcap, removed from Ethereal link objects.

Some debugging aid added and other minor cleanup done.

svn path=/trunk/; revision=17256
2006-02-11 23:25:11 +00:00
Ulf Lamping ec37501696 minor bugfix: restore the Ethereal icon (after capturing) at the right places
svn path=/trunk/; revision=17255
2006-02-11 17:08:32 +00:00
Lars Roland e271ba9a3c Display g_error messages in the console window unconditionally, if preferences aren't loaded yet.
This way we ensure that errors are displayed during protocol registration.

Use g_error instead of g_warning, if not allowed characters are used in display filter names for protocols. Extend the error message in this case.

svn path=/trunk/; revision=17248
2006-02-11 03:50:25 +00:00
Ulf Lamping e4e8df5e1d remove all calls to exit() from the capture_opts.c and replace them by status return values (0,1 or 2).
This way makes it much easier to debug, e.g. to set a common breakpoint if a command line parameter fails.

svn path=/trunk/; revision=17240
2006-02-10 02:05:30 +00:00
Ulf Lamping ba7b92bc02 Win32 inconvenience: a call to g_error will terminate the program and the user won't see anything.
To avoid this, the log handler in the error case:

- opens a console window (regardless of the users settings)
- waits for a keypress before continuing to terminate the program

This way, the user will be notified that there's a problem, instead of simply seeing a terminating program only.

svn path=/trunk/; revision=17236
2006-02-09 21:37:14 +00:00
Luis Ontanon b5f22bf8a8 eXtenstion options access to the -X command line options
svn path=/trunk/; revision=17207
2006-02-07 22:08:12 +00:00
Luis Ontanon 3196dfeaf6 - fix a leak
- register the funnel mini-api ASAP


svn path=/trunk/; revision=17189
2006-02-06 23:54:54 +00:00
Guy Harris 4c4f18eb3f Add code to check whether the app was started with special privileges
(e.g., set-UID or set-GID), and don't load user plugs if it is.

svn path=/trunk/; revision=17174
2006-02-06 03:11:34 +00:00
Jörg Mayer 9ba6da080a Paolo Abeni
I have developed an external plugin to enable ssl decryption in
ethereal.

Me

- Remove unnecessary $Id$ from acinclude.m4
- Added packet-ssl-utils.h to Makefile.common
- Fixed a few warnings

TODO

- Lots of warning fixes (see separate mail)
- Reformat function headers to read like the others do
  (return value<newline>function-name...)
- Test on Windows platform
- Review the patch to packet-ssl.c and new files packet-ssl-utils.[hc]


svn path=/trunk/; revision=17156
2006-02-04 23:44:05 +00:00
Ulf Lamping 35dd233580 show the number of packets captured, if "Update list of packets ..." isn't used
svn path=/trunk/; revision=17071
2006-01-22 16:26:41 +00:00
Ulf Lamping 83413ca191 remove an obsolete comment
svn path=/trunk/; revision=17043
2006-01-17 01:18:51 +00:00
Ulf Lamping 8b7477f57c GTK 2.x only: show a slightly different Ethereal main icon while capturing.
I very often forget to stop a running capture, so Ethereal keeps capturing packets on and on, leaving me with a lot of unrequired packets.

On the other hand (because of the above) I often maximize Ethereal just to see that it's really not capturing any longer.

Looking at the window title isn't of much help, as this title changes with every capture file name loaded, so there's no title which can be easily remembered.

We probably might use this icon mechanism as well, when Ethereal loads a (huge) file, so the user get's a more visual feedback when the capture loading is finished (and probably for other potential "lengthy" tasks as well).

svn path=/trunk/; revision=17042
2006-01-17 00:40:32 +00:00
Ulf Lamping 545110c939 fix #661
Win32: convert filenames coming in from command line parameters from locale (current code page) into utf8 encoding

This must also be done for the other command line tools like tethereal, editcap and alike ...

svn path=/trunk/; revision=17025
2006-01-12 22:38:37 +00:00
Ulf Lamping 92c7c05242 update usage output
svn path=/trunk/; revision=17014
2006-01-12 01:32:06 +00:00
Ulf Lamping b4471e0195 fix #152
set the read filter dialog modal and transient to the parent window if requested. This way, it will receive input signals (solving problems with GTK2's gtk_file_chooser).

To do this, add another construct_args flag, so it will be modal only if really needed ...

svn path=/trunk/; revision=16926
2005-12-31 17:09:27 +00:00
Guy Harris c9b702ba1a Provide not only copyright information, but a GPL blurb, in all the
version/usage messages.

Put newlines at the end of various version strings.

svn path=/trunk/; revision=16870
2005-12-21 08:59:52 +00:00
Ulf Lamping 5777e86158 use #ifdef SHOW_WELCOME_PAGE for the currently disabled welcome page instead of simply #if 0
svn path=/trunk/; revision=16843
2005-12-18 11:36:06 +00:00
Ulf Lamping 0268ed5e2d remove a missplaced comment
svn path=/trunk/; revision=16806
2005-12-15 00:46:23 +00:00
Ulf Lamping 79217bab2e HUGE STEP (hopefully toward the right direction):
remove a lot of redundant code from tethereal and use (move) stuff from capture_loop.c instead.

concentrate common capture related code in capture_opts.c, e.g. trying to find the right interface to capture from (command line option, preference, first usable) instead of duplicating this code over several files.

remove redundant code from dumpcap.c

this also implements command line option -D (and indexed interfaces at -i) for Ethereal and Dumpcap (as we have it in Tethereal already for a while)

svn path=/trunk/; revision=16787
2005-12-13 22:48:58 +00:00
Ulf Lamping 1fe28ca017 We should really do quit Ethereal if user asked us to do so with the -Q option!
Update the window title, right after the fixed capture finished. This might be required if the loading of the capture file afterwards just fails, leaving the title unchanged.

svn path=/trunk/; revision=16772
2005-12-13 02:09:14 +00:00
Ulf Lamping 7e3a24418c rename pcap-....c/.h files to capture-pcap-....c/.h
this way, the capture prefix will "logically" group the files together and file browsers will also group them

we may want to move the files into a subdir capture later

svn path=/trunk/; revision=16691
2005-12-06 00:07:13 +00:00
Ulf Lamping 8dab6be33c move some GTK only function declarations from ui_util.h to the appropriate header files in the gtk dir, as these declarations are obsolete and only confuses (at least me)
svn path=/trunk/; revision=16687
2005-12-05 22:45:54 +00:00
Ulf Lamping e1ee12bc71 add capture_opts_trim(), as this sequence is used three times now (will replace the other appearances later) ...
svn path=/trunk/; revision=16683
2005-12-05 21:26:01 +00:00
Ulf Lamping d2a024af60 split capture.h into capture.h, capture_loop.h and capture_opts.h and place the parts into the corresponding files
svn path=/trunk/; revision=16664
2005-12-03 19:32:54 +00:00
Ulf Lamping ca14992672 fix alphabetical order of OPTINIT string, v seems to be a controversial character :-)
svn path=/trunk/; revision=16642
2005-12-01 20:04:55 +00:00
Guy Harris 2f7fd680e2 Handle "-G" only in Tethereal - it doesn't work in Ethereal, and isn't
necessary there.

Add a "cmdarg_err()" routine to report command-line option errors; it
creates a console if necessary, and prints the command name and the
trailing newline.  Also add "cmdarg_err_cont()", which also creates a
console if necessary, and prints a trailing newline but no command name;
it's used to continue the message.  Use those, rather than
"g_warning()", for errors.

That means that we no longer need to pass the command name to various
command-line argument parsing routines.

svn path=/trunk/; revision=16526
2005-11-17 05:59:21 +00:00
Guy Harris ff10d1c217 Don't list "-B" on UN*X - it's not available there.
On Windows, show it using the same usage-message syntax as other
options.

Clean up the usage message.

When doing the "pre-scan" of command-line arguments, suppress error
messages - that suppresses bogus messages for GTK+ command-line flags,
and gets rid of double messages for other errors.

svn path=/trunk/; revision=16521
2005-11-17 04:10:31 +00:00
Ulf Lamping 32b71d9b7e hmmm, buggy bugfix
capture_child isn't initialized already here, so remove the whole error reaction check for now

svn path=/trunk/; revision=16517
2005-11-16 22:08:50 +00:00
Ulf Lamping 8b24e8d8f0 the "pre-scan" of the command line parameters shouldn't stop the capture child. The child uses a slightly different parameter pattern, so this isn't an error here. Fixes the reported capture problem
svn path=/trunk/; revision=16516
2005-11-16 21:46:24 +00:00
Guy Harris 03ac44a500 Remove comment that no longer applies.
If we get a getopt() error in the pre-scanning, quit - don't do all the
GUI stuff and re-scan the arguments (and print the error message twice).

svn path=/trunk/; revision=16443
2005-11-09 08:46:24 +00:00
Ulf Lamping c3187174bf replace *a lot* of file related calls by their GLib counterparts. This is necessary for the switch to GTK 2.6 (at least on WIN32).
to do this, I've added file_util.h to wiretap (would file_compat.h be a better name?), and provide compat_macros like eth_open() instead of open(). While at it, move other file related things there, like #include <io.h>, definition of O_BINARY and alike, so it's all in one place.

deleted related things from config.h.win32

As of these massive changes, I'm almost certain that this will break the Unix build. I'll keep an eye on the buildbot so hopefully everything is working again soon.

svn path=/trunk/; revision=16403
2005-11-06 22:43:25 +00:00
Ulf Lamping fab07a94e0 don't show the "stopping currently running capture" dialog, as the packet list seems to have problems updating the screen, so some ugly artefacts remain on the screen.
after I've fixed a bug in the Win32 capture stop mechanism some days(?) before (which speeds up that stopping a lot), this dialog isn't really needed

svn path=/trunk/; revision=16257
2005-10-17 19:46:29 +00:00
Ulf Lamping fafdf68095 from Richard van der Hoff:
Attached is a patch which makes the console log level (warning/message/debug etc) a configurable preference. There's no gui for setting it, but since it's pretty much only going to be useful for developers, I'm sure you'll cope...
----
I've added a small comment to the file output that it has no dialog output

svn path=/trunk/; revision=16205
2005-10-12 21:26:27 +00:00
Ulf Lamping e01a43a9bf minor bugfix: while closing a capture file, update the packets statusbar *after* closing the file
svn path=/trunk/; revision=16150
2005-10-07 04:26:29 +00:00
Ulf Lamping bb5e5d6ce1 fix a packet_list_freeze / thaw pair, if a return comes in it's way
add a g_warning() call if an error occured while reading from capture file (while doing a live update), usually shouldn't happen but is difficult to debug *if* it happens
add a new log domain LOG_DOMAIN_MAIN and the standard log handler for it
add some (partly commented out) g_log() calls, useful for GUI sequence debugging

svn path=/trunk/; revision=16136
2005-10-06 00:55:21 +00:00
Ulf Lamping ec98957e13 fix 369: we must do some more GUI stuff in capture_update_started(),
as GUI state get's cleared while switching to the next "multiple file" because of a call to cf_close()

svn path=/trunk/; revision=16134
2005-10-05 23:56:36 +00:00
Ulf Lamping 5851cd1694 minor bugfix: hide main widgets, if command line file couldn't be loaded
svn path=/trunk/; revision=16090
2005-10-03 19:11:57 +00:00
Ulf Lamping a7a1077bb5 fix 467: when using -k command line option, convert interface name display string ("user_description: devicename" from Preferences) into device name. Hopefully this won't break the UNIX version.
svn path=/trunk/; revision=15943
2005-09-21 20:33:12 +00:00
Ulf Lamping 8efa36ee51 fix #465: replace all fprintf(stderr, ...) with g_warning(...) calls
svn path=/trunk/; revision=15942
2005-09-21 20:27:32 +00:00
Guy Harris 5e5c735525 Squelch a compiler warning (the argument might be used later).
Clean up indentation.

svn path=/trunk/; revision=15917
2005-09-21 01:34:04 +00:00
Ulf Lamping 831c54c4f5 add two new callbacks:
cf_cb_file_closing (called before closing a capture file) cf_cb_file_closed will be called afterwards, but both only if a file is really closed as cf_close is called more often ...

If we are closing large capture files (~20MB), the screen looks ugly while the file is closed. Change this so the screen will immediately go back to initial state and a dialog (without buttons) is shown that the file is currently closed. As the operation which takes most of the time to close the file is a single eth_clist_clear call, we can't use a progress bar here.

cf_cb_live_capture_stopping: called when the user wants to stop the capture (toolbar or menu clicked). At least on Win32, the time between this and the actual stop completed can be noticeable (1-2 seconds), so the user doesn't know if the button press did anything at all. Do something similar as above, show a dialog box without buttons to inform that the close is in progress.

svn path=/trunk/; revision=15891
2005-09-20 08:42:35 +00:00
Ulf Lamping f14ccc2f63 if the capture child pops up it's own console, title it as such
svn path=/trunk/; revision=15889
2005-09-20 08:18:41 +00:00
Ulf Lamping cd7b8f0f08 set the window title of the Win32 debug console
svn path=/trunk/; revision=15720
2005-09-08 09:19:46 +00:00
Ulf Lamping 56c76e637e don't wait for a keypress if this is a capture child. This was very annoying, as stopping a capture seems to freeze Ethereal, but it simply waits for a keypress on the capture_child's console window.
svn path=/trunk/; revision=15718
2005-09-07 21:47:51 +00:00
Guy Harris f0b7251b34 Use the "svnversion" variable, exported by version_info.c, to print the
version number from SVN for non-release builds, just as Tethereal does. 
Fixes bug 408.

svn path=/trunk/; revision=15674
2005-09-03 18:21:48 +00:00
Ronnie Sahlberg 55add7077f convert one sprintf into g_snprintf()
at the same time, make proto_construct_dfilter_string() return an emem allocated string.
This fixes a tiny memleak in print.c that never freed the string returned by this function.


svn path=/trunk/; revision=15651
2005-09-01 09:03:29 +00:00
Ulf Lamping 723c80ea90 timestamp display precision:
- automatic adjustment depending on file format
- manual adjustment through menu items

save the setting in the recent file

svn path=/trunk/; revision=15534
2005-08-25 21:29:54 +00:00
Guy Harris 16e2c6605d The "secs" field of a "struct wtap_nstime" is a time_t, so it could be
an int or it could be a long; print stuff computed from it with %lu, and
cast the arguments to "long" so that it works on platforms where time_t
*isn't* a long and where "long int" and "int" have different sizes.

svn path=/trunk/; revision=15523
2005-08-25 01:16:40 +00:00
Ulf Lamping 6f43fbb2f0 EVERYTHING IN THE BUILDBOT IS GOING TO BE RED!!! Sorry!
I've done more than a day to change the timestamp resolution from microseconds to nanoseconds. As I really don't want to loose those changes, I'm going to check in the changes I've done so far. Hopefully someone else will give me a helping hand with the things left ...

What's done: I've changed the timestamp resolution from usec to nsec in almost any place in the sources. I've changed parts of the implementation in nstime.s/.h and a lot of places elsewhere.

As I don't understand the editcap source (well, I'm maybe just too tired right now), hopefully someone else might be able to fix this soon.

Doing all those changes, we get native nanosecond timestamp resolution in Ethereal. After fixing all the remaining issues, I'll take a look how to display this in a convenient way...

As I've also changed the wiretap timestamp resolution from usec to nsec we might want to change the wiretap version number...

svn path=/trunk/; revision=15520
2005-08-24 21:31:56 +00:00
Guy Harris 50d77b113c Rename epan/stat.[ch] to epan/stat_cmd_args.[ch] - it only deals with
implementing the "-z" command-line arguments, it doesn't deal with *all*
issues for stats.

svn path=/trunk/; revision=15483
2005-08-20 20:06:05 +00:00
Ulf Lamping eafbbbcabb renamed ui_util.c/.h to gui_utils.c/.h to prevent confusion with identical named ui_util.h in / dir
svn path=/trunk/; revision=15465
2005-08-20 12:09:48 +00:00
Guy Harris 4ddd504bb4 Move the stats.[ch] stuff into epan, so plugins can use it.
svn path=/trunk/; revision=15429
2005-08-19 10:00:14 +00:00
Guy Harris b2807e2ab6 Move the APIs for registering and processing "-z" command-line arguments
and "Statistics" menu items into "stat.h" and "stat.c", to separate them
from the core tapping APIs.  A tap could conceivably not register as a
"-z" command-line argument or "Statistics" menu item, and a stat could
conceivably not be implemented as a tap, and dissectors that implement
tapping points don't need the UI-related stuff from "stat.h", they just
want the tap-related stuff in <epan/tap.h>.

svn path=/trunk/; revision=15427
2005-08-19 09:29:41 +00:00
Guy Harris e67b202e2c Have "f_datalen" keep track of the number of bytes of uncompressed file
data, so that "f_len" still keeps the size of the underlying file (which
is necessary in order to make the progress bar when files are being read
work correctly).

svn path=/trunk/; revision=15415
2005-08-19 01:17:24 +00:00
Jörg Mayer 0f9ffd6923 Move SVNVERSION handling into version_info. That way, we won't have
to recompile tethereal.o etc each time the svn version has changed,
relinking is sufficient.

I'm not sure what to do about mergecap, as it currently doesn't link
against version_info, so it's "overhead" either way.

svn path=/trunk/; revision=15371
2005-08-16 06:45:17 +00:00
Ronnie Sahlberg 055e2596d9 Add beginning of seasonal allocation in addition to the existing ephemeral ones.
svn path=/trunk/; revision=15301
2005-08-12 08:51:08 +00:00
Ulf Lamping d28861b607 removed tons of MSVC const related warnings.
This might at some places interfere with the changes for gcc4, we might have to negotiate in that case :-)

Please note that a lot of these warnings were GTK1.x related only!

svn path=/trunk/; revision=15286
2005-08-10 19:49:45 +00:00
Jörg Mayer 4e1f4b18ab More char -> const char warning fixes.
Removed (very few) casts that only change the warning message
  but don't remove it (with gcc-4).

svn path=/trunk/; revision=15227
2005-08-05 20:59:08 +00:00
Ulf Lamping d788233d7c add some minor comments around the GTK main loop
svn path=/trunk/; revision=15189
2005-08-02 07:29:15 +00:00
Jörg Mayer e9ea42eed9 Fix more "no previous declaration" warnings
svn path=/trunk/; revision=15173
2005-08-02 04:47:15 +00:00
Ronnie Sahlberg c841beb71b EMEM : a simple and FAST api to allocate memory that will be automatically freed() when the next packet is dissected.
This offesr memory allocation with a packet  scope making memory leaks less likely and memory management faster.


Add initialization calls for both tethereal and ethereal.

Convert the ip_to_str() function to use this and avoid doing the silly rotating buffers thing it previously did.


We also need an equivalent set of functions for allocation with capture file scope (free when next capture is loaded) but i dont know where to put the free_all call.



svn path=/trunk/; revision=14984
2005-07-22 07:46:58 +00:00
Ulf Lamping 47d503303c from Graeme Hewson: "Fixes for ethereal config files"
svn path=/trunk/; revision=14956
2005-07-19 20:44:45 +00:00
Ulf Lamping 1c897f0559 remove compiler warnings:
main.c(345) : warning C4090: 'function' : different 'const' qualifiers
main.c(345) : warning C4022: 'simple_dialog_set_cb' : pointer mismatch for actual parameter 3

svn path=/trunk/; revision=14764
2005-06-26 10:23:39 +00:00
Ulf Lamping df7520d2a1 we are not a GNU program, so we shouldn't report as such in the command line help output
svn path=/trunk/; revision=14753
2005-06-25 21:27:26 +00:00
Guy Harris b67f63560e More constification.
svn path=/trunk/; revision=14740
2005-06-24 02:51:01 +00:00
Ulf Lamping 5ce6b0d8bc fix #135: handle the command line parameters -v, -h and -G completely in their own getopt() loop.
This is done "long before" calling gtk_init() as this function requires a running X server, causing an error if running from the console only.

svn path=/trunk/; revision=14736
2005-06-23 21:19:05 +00:00
Ulf Lamping 7d1f4d4dfa Win32: "fix" handling of create_console(), hopefully clarifying usage of the corresponding prefs flag
svn path=/trunk/; revision=14735
2005-06-23 20:18:17 +00:00
Ulf Lamping 826107f6cf beautify version and usage output
svn path=/trunk/; revision=14734
2005-06-23 20:14:05 +00:00
Ulf Lamping a1b6649a54 fix a typo in the usage output
svn path=/trunk/; revision=14678
2005-06-17 07:57:41 +00:00
Guy Harris ff38fe8476 Don't hand a null pointer to a "%s" format.
svn path=/trunk/; revision=14656
2005-06-16 06:41:28 +00:00
Guy Harris 72acd3728a Fix a typo, and squelch a compiler warning.
svn path=/trunk/; revision=14655
2005-06-16 06:34:27 +00:00
Ulf Lamping ef20416f66 this is an attempt, please report problems:
after asking the devlist if this would break things and got no negative response, try to scan command line parameters twice, trying to "rewind" the getopt settings

this way, fixing #135

svn path=/trunk/; revision=14610
2005-06-10 19:09:49 +00:00
Ulf Lamping e2f38f5456 fix positions of create_console()/destroy_console() calls for help and version output
svn path=/trunk/; revision=14602
2005-06-09 19:58:02 +00:00
Ulf Lamping 0489ec846e bugfix: don't crash, if cf->filename is NULL (which happens if an invalid capture filter is entered)
svn path=/trunk/; revision=14601
2005-06-09 19:55:55 +00:00
Ulf Lamping 66acca7018 update usage output and manual pages for both Ethereal and Tethereal to reflect the latest changes in the command line.
clarifications of some command line parameter descriptions in the manual pages

this also fixes #221

svn path=/trunk/; revision=14545
2005-06-04 01:29:14 +00:00
Ulf Lamping 87bcb9f8e5 add new command line flag "-g", will go to a given packet, after loading a capture file with -r
svn path=/trunk/; revision=14511
2005-05-31 21:30:40 +00:00
Ulf Lamping ec246cae54 fix #148: (win32 only) use command line parameter -B to set capture buffer size
svn path=/trunk/; revision=14484
2005-05-30 04:46:25 +00:00
Ulf Lamping 047cdd0f2a First part to fix #148: use command line parameter -o not only for preferences but also for recent settings.
This way we can simply remove the GUI related command line parameters -B, -P and -T, which are useless now.

svn path=/trunk/; revision=14483
2005-05-30 04:06:22 +00:00
Ulf Lamping de4bd60dcb show the complete filename in the statusbar, as there's no good reason to hide it (bugzilla #198)
fix various log related problems

svn path=/trunk/; revision=14447
2005-05-26 21:49:48 +00:00
Ulf Lamping edf3ec1d92 don't use stdout but stderr for logging, as this will confuse the capture childs sync_pipe (has to be solved later)
svn path=/trunk/; revision=14440
2005-05-26 18:29:09 +00:00
Ulf Lamping 464c90155b avoid two gcc warnings
svn path=/trunk/; revision=14439
2005-05-26 18:03:34 +00:00
Ulf Lamping 5d404864f2 use the log features of the GLib to have verbose output of the capturing engine, e.g. GLib provides different domains for different submodules. Output more verbose than warning level will be disabled by default (just like before).
use the console_log_handler in main.c for win32 AND unix now

Currently use the log for the capturing engine (only), as I desperately needed a log output for debugging.


svn path=/trunk/; revision=14438
2005-05-26 17:50:27 +00:00
Ulf Lamping 351214282d the capture child might not respond shortly after bringing it up (especially it will block, if no input coming from an input capture pipe (e.g. mkfifo) is coming in)
to prevent problems, bring the main GUI into "capture mode" right after successfully spawn/exec the capture child, without waiting for any response from it

svn path=/trunk/; revision=14436
2005-05-25 23:28:59 +00:00
Ulf Lamping bfbb46de43 win32 only: get interface details from WinPcap's packet.dll (direct access to NDIS specific driver information, upper second GTK part)
svn path=/trunk/; revision=14407
2005-05-20 22:23:00 +00:00
Ulf Lamping cad582a405 fix #187: don't crash if using "Expand Subtrees" in an empty area, just do nothing in that case
svn path=/trunk/; revision=14389
2005-05-18 00:55:44 +00:00
Ulf Lamping 2777289f85 removed various gcc warnings
svn path=/trunk/; revision=14246
2005-04-30 17:23:33 +00:00
Ulf Lamping d22ba722a4 bugfix: don't crash if we have no interface name
svn path=/trunk/; revision=14140
2005-04-19 20:55:27 +00:00
Ulf Lamping 7ee0db1080 statusbar changes:
-show the current capture file size, if capturing in real time mode.
-move the packet "Drops" count (if available) from file to packets statusbar part

svn path=/trunk/; revision=14130
2005-04-18 22:05:56 +00:00
Ulf Lamping 83dc83abd8 rename capture_clear() to capture_restart()
statusbar update should work now even in capture error case

svn path=/trunk/; revision=14105
2005-04-16 20:08:00 +00:00
Ulf Lamping 4eb2c02901 fix cf_cb_... callback handling (but it's still not perfect)
svn path=/trunk/; revision=14103
2005-04-16 19:29:48 +00:00
Ulf Lamping 06ef0a3b52 it should now be possible to use "Update packets in real time" even if used with one of the "Multiple files" option.
If this is used together with an option where input files changes too fast (e.g. new file every second), capturing will be (hopefully) stopped.

I've replaced the former capture pipe message format into a somewhat more general format to remove a lot of confusion.


svn path=/trunk/; revision=14054
2005-04-12 00:54:52 +00:00
Ulf Lamping 61ccc8baf1 various capture code cleanup and fixes:
display filename in statusbar while capturing
print_usage banner fixed
cf_cb_live_capture_prepare no longer needed
rename sync_pipe_do_capture -> sync_pipe_start
bugfix: sync_pipe_input_wait_for_start replaced by former implementation
fix cleanup of old file in capture_input_new_file
fix a tempfile detection bug (named file showed up as tempfile after capture)

svn path=/trunk/; revision=14053
2005-04-11 18:57:19 +00:00
Ulf Lamping 5625c461d0 bugfix: call to cf_cb_live_capture_..._started with correct parameter
svn path=/trunk/; revision=14045
2005-04-10 21:03:31 +00:00
Ulf Lamping 163f2b61a8 fix statusbar messages by splitting into update and fixed messages between capture and main
svn path=/trunk/; revision=14044
2005-04-10 19:36:56 +00:00
Guy Harris 80c1907a36 Rename "register_ethereal_tap()" to "register_tap_listener_cmd_arg()" as
it's used to register a callback for a tap listener invoked if the
specified command line argument is specified to the "-z" flag.

Move it, along with routines to:

	look up a "-z" argument in the table constructed by
	"register_tap_listener_cmd_arg()" and either save the full
	argument to "-z" and the corresponding listener if it's found or
	return a failure indication if it isn't;

	list the available tap listeners;

	call the "init" routines for the tap listeners saved in the
	table above;

and have Ethereal and Tethereal use those routines.

svn path=/trunk/; revision=13993
2005-04-01 09:08:27 +00:00
Guy Harris 910ad32b3b Don't assume only one "-z" argument will be given on the command line;
add information for each tap to a list, and set up all the taps in the
list.

svn path=/trunk/; revision=13991
2005-04-01 05:45:08 +00:00
Ulf Lamping 0b132c9b1d bugfixes: bring non real-time captures back to former behaviour, other minor fixes
svn path=/trunk/; revision=13961
2005-03-28 21:05:53 +00:00
Ulf Lamping 2d1981f08b various (minor) capture code cleanup
svn path=/trunk/; revision=13957
2005-03-28 18:04:09 +00:00
Ulf Lamping b64ebb05c2 fix Solaris build (I've removed O_BINARY)
rename sync_mode to real_time_mode, as we using sync_mode all the time now, so the name is misleading

svn path=/trunk/; revision=13956
2005-03-28 16:14:34 +00:00
Ulf Lamping 9d6ac60cef remove capture_child flag from capture_opts as it's no longer required
svn path=/trunk/; revision=13954
2005-03-28 15:31:13 +00:00
Ulf Lamping 7e78ef354e major capture engine rework: use two task model for EVERY capture mode
rework of the -b command line parameter (for Ethereal and Tethereal)

svn path=/trunk/; revision=13949
2005-03-28 00:19:02 +00:00
Ulf Lamping 729749c5b9 add a new checkitem "Colorize Packet List" into the View menu
keep it's setting in the recent file

svn path=/trunk/; revision=13929
2005-03-27 02:19:51 +00:00
Ulf Lamping ccff84dbdf code cleanup: use common prefix for all functions in color_filters.h
svn path=/trunk/; revision=13910
2005-03-26 01:09:14 +00:00
Guy Harris 5ef0665d34 Create the directory for the preferences files before writing out the
"recent" file.

Have "write_recent()" handle putting up error windows for failed
attempts to write the "recent" file.

svn path=/trunk/; revision=13909
2005-03-26 01:05:29 +00:00
Ulf Lamping 008d4b8106 code cleanup: the term filter_list was used with different meanings throughout the code, and the filter_list of the color_filters is "global".
use appropriate prefixes to avoid confusion and bugs

svn path=/trunk/; revision=13905
2005-03-25 22:52:45 +00:00
Guy Harris e4177b39e9 Plug a small leak found by the "leaks" tool on OS X.
svn path=/trunk/; revision=13888
2005-03-23 22:49:32 +00:00
Luis Ontanon 3e98d671fd From Graeme Hewson:
don't try to call register_all_plugin_tap_listeners() if configured without plugins.

svn path=/trunk/; revision=13737
2005-03-12 21:36:24 +00:00
Jörg Mayer 58d8f2f652 - pcap.h needs to be included before capture.h
- As capture.h is empty without libpcap defined, only include it in that
  case and don't protect the file internally against libpcap any more.

svn path=/trunk/; revision=13648
2005-03-07 10:19:33 +00:00
Ronnie Sahlberg 91a8ef6b5f from didier: bug fix for the menu,
if ethereal could not open the file   make us still be able to use the Open menu item to open a different file



svn path=/trunk/; revision=13589
2005-03-04 22:25:02 +00:00
Luis Ontanon 5319cabe88 Make sure that plugin tap listeners get registered before the non-plugin tap listeners
that's because stat trees are registered as tap listeners by either
gtk/stats_tree_stat.c or tap-stats_tree.c


svn path=/trunk/; revision=13545
2005-02-28 00:55:49 +00:00
Guy Harris dd4b0b718b The stats tree stuff should ultimately allow us to have plugin taps, so
add infrastructure for them, and display the plugin type (which could be
both dissector *and* tap) in the list of plugins.

svn path=/trunk/; revision=13543
2005-02-27 22:04:48 +00:00
Guy Harris 343810d95a Move "get_natural_int()" and "get_positive_int()" from "capture_opts.c"
to "clopts_common.c", make them not static, and use them in "gtk/main.c".

svn path=/trunk/; revision=13541
2005-02-27 21:15:30 +00:00
Ulf Lamping e7fafa28c6 some clarification of the capture child thing
svn path=/trunk/; revision=13535
2005-02-27 17:30:33 +00:00
Luis Ontanon 624d86fe0d abort early in main_filter_packets() if dftext is NULL
svn path=/trunk/; revision=13532
2005-02-27 14:01:12 +00:00
Guy Harris b94c5514fe Don't include "../image/eicon3d64.xpm", as we're not using it for now.
svn path=/trunk/; revision=13491
2005-02-24 05:40:55 +00:00
Ulf Lamping 72547c8d02 use the applications name (currently "ethereal" or "tethereal") in capture_opts, instead of hardcoded "ethereal" for both.
svn path=/trunk/; revision=13476
2005-02-23 08:34:12 +00:00
Ulf Lamping d643a55488 move capture_opts related things (init, command line, ...) from capture.c to a new file capture_opts.c and let both ethereal and tethereal use it.
svn path=/trunk/; revision=13474
2005-02-23 01:01:19 +00:00
Ulf Lamping 9677b33abf There seems to be some disagreement about if and how the welcome screen feature should be implemented.
As I currently don't have the time to continue this, I've temporarily disabled it.

svn path=/trunk/; revision=13472
2005-02-22 21:22:56 +00:00
Ulf Lamping 70b1e9f94f As we have a (two) WishList(s) in the Wiki now, this to do list doesn't make any sense
svn path=/trunk/; revision=13458
2005-02-21 19:49:38 +00:00
Ulf Lamping 179d4cca95 fix a capture bug if the capture filter wasn't valid to get back to "empty" state.
instead of already invoking cf_cb_live_capture_started in capture.c, I've introduced the new event cf_cb_live_capture_prepare which only has to set the main windows title and nothing more.

svn path=/trunk/; revision=13355
2005-02-08 19:57:16 +00:00
Guy Harris 802a3977bf Make Ethereal and Tethereal compile if we're building without libpcap.
svn path=/trunk/; revision=13346
2005-02-07 20:52:59 +00:00
Guy Harris 82908eac11 The welcome pane isn't scrollable, so add it to the scrolling window
with a viewport.

svn path=/trunk/; revision=13334
2005-02-07 03:35:51 +00:00
Guy Harris 79a39eddbc Move the code to set the title on a window when a capture is in progress
to the "start live capture" callback, and call that from "do_capture()".

When opening a capture file, don't pop up the "What do you want to do?"
pane when closing any existing file you have open, as we're just going
to put the regular view up right after that.

svn path=/trunk/; revision=13332
2005-02-07 02:09:30 +00:00
Ulf Lamping 1c6b2cf0e3 Instead of calling each single thing when doing/finish a file operation, file.c shouldn't call all the GUI related functions itself, instead throwing some kind of Events to it's caller(s).
I've implemented a very simple callback mechanism which provides exactly this. I've tried GHook from GLib before, but this doesn't seem to be the right thing, as it's too inflexible for the purpose here.

So I've implemented a callback function in main.c which receives all "events" and spreads them to menu, statusbar and itself.

I would see this implementation as a prototype which may need  improvements. Please comment the changes.

svn path=/trunk/; revision=13330
2005-02-07 00:54:46 +00:00
Guy Harris 7be4ff2a92 Clean up indentation.
svn path=/trunk/; revision=13329
2005-02-07 00:31:45 +00:00
Guy Harris 1041ccdbe5 Don't have "set_menus_for_captured_packets()" call
"main_set_for_capture_file()"; it should only deal with menus, not
anything else - and it gets called while the menus are being set up,
which is before the main window has been completely created, so
"main_widgets_show_or_hide()", which is called by
"main_set_for_capture_file()", gets errors trying to show or hide
widgets the pointers to which are null.

svn path=/trunk/; revision=13328
2005-02-06 23:16:05 +00:00
Ulf Lamping 3a63719e38 another two steps towards privilege seperation:
move another two capture related fields (iface and cfilter) from cfile to capture_opts

also move the handling of capture related command line options from main.c to capture.c, that way a future privilege seperated capture program can use the same code to parse it's command line than Ethereal. 
It might be even possible to share this parser code even with Tethereal, didn't took a closer look at this.

svn path=/trunk/; revision=13320
2005-02-06 21:20:35 +00:00
Ulf Lamping 3a9e847e27 some cleanup of the initial start sequence of Ethereal, filling in capture_opts and alike
svn path=/trunk/; revision=13317
2005-02-06 14:43:27 +00:00
Ulf Lamping ba04a65a6a fix bugs regarding the capture child
svn path=/trunk/; revision=13316
2005-02-06 12:21:27 +00:00
Ulf Lamping 97866a968b instead of initializing the capture_options in main.c, use the new function capture_opts_init
svn path=/trunk/; revision=13315
2005-02-06 00:13:00 +00:00
Ulf Lamping c8522d6dec begin a welcome page which is shown, if you don't have any capture data loaded.
This might be improved to have additional content and/or better layout of the elements.

svn path=/trunk/; revision=13313
2005-02-05 23:12:44 +00:00
Ulf Lamping fe7e1ec13c completely hide the main window panes, if we currently don't have a capture file.
svn path=/trunk/; revision=13312
2005-02-05 17:53:39 +00:00
Ulf Lamping a1a2ae3180 rename kill_capture_child to capture_kill_child to have a common prefix
split drag and drop support out of main.c into new file drag_and_drop.c, to reduce the size of main.c a bit.

Hopefully this won't break unix builds because of missing #include's, I will keep an eye on the buildbot

svn path=/trunk/; revision=13308
2005-02-05 15:35:25 +00:00
Guy Harris fa3e5609ab Put "cf_status_t" back.
svn path=/trunk/; revision=13303
2005-02-05 12:50:47 +00:00
Guy Harris 2c89242aac Instead of having a single enumerated type for status return values from
cf_ functions, have separate ones for different classes of routines, and
use gboolean when the return value is just "success" or "failure" - that
way you don't get compiler warnings if a case statement isn't handling a
particular status value if the routine in question won't return it.

svn path=/trunk/; revision=13293
2005-02-04 20:54:12 +00:00
Ulf Lamping 0861927ce3 huge cleanup of capture file API (functions in file.c/file.h).
This includes: all functions in file.h now have a cf_ prefix, will have doxygen tags, will have the capture_file *cf as the first parameter and I tried to generalize the return values for non trivial functions.

Hopefully, I didn't introduced any new bugs, as I had to change a lot of files...

svn path=/trunk/; revision=13289
2005-02-04 18:44:44 +00:00
Ulf Lamping dd71ad695f (some) redesign of capture data structures.
don't use global cfile at all but only an untpyed handle to call the cf_... functions in file.c
move the save_file member from capture_file to capture_opts, as it's only used while capturing and while preparing it

svn path=/trunk/; revision=13276
2005-02-04 01:29:29 +00:00
Ulf Lamping 9ff19a4c94 move capture_file_fd field from capture_file to capture_opts type, as this is the place where it should be
svn path=/trunk/; revision=13268
2005-02-03 22:48:20 +00:00
Guy Harris 91e606b7dd Fix a problem with building with libpcap disabled.
svn path=/trunk/; revision=13181
2005-01-27 10:47:27 +00:00
Ulf Lamping 5b84b7e764 while I'm at it, add another packet details context menu item, which will link to the specific display filter reference page (just try it out :-)
svn path=/trunk/; revision=13117
2005-01-19 01:12:45 +00:00
Ulf Lamping 5a36a73d25 added the "Online Protocol Info" to the packet details context menu with a simple_dialog doing some explanation.
svn path=/trunk/; revision=13115
2005-01-18 22:24:07 +00:00
Guy Harris 71e8b5bf1f Squelch compiler warnings about unused parameters.
svn path=/trunk/; revision=13096
2005-01-17 22:25:16 +00:00
Ulf Lamping 421737d210 add first implementation of context relevant calls to the protocol specific wiki pages. I've commented out the items in menu.c, so this (hopefully) won't break the current release run. We might think about further steps after the release is out.
However, if someone (already) want's to try out right now, you simply have to remove the comments in menu.c around line 430

svn path=/trunk/; revision=13091
2005-01-17 21:48:51 +00:00
Guy Harris 6e622fd24e "gtk_entry_get_text()" returns a "const char *" - assign the result to
one.

"get_basename()" doesn't modify its argument, and its callers don't
modify the substring pointed to by the result, so make it take a "const
char *" as an argument and return a "const char *". 

"find_last_pathname_separator()" doesn't modify its argument, so make it
a "const char *" - but some of its callers pass a non-"const" "char *"
and modify the result, so don't make its return value a "const char *".
And, as none of its callers are outside "filesystem.c", make it static.

In "about_folders_page_new()", have separate variables for pathnames
returned as "const char *" (which are cached by the routine that returns
them, so you can't modify them - and can't free them, so get rid of the
commented-out "g_free()" calls for them) and pathnames returned as "char
*" (which are allocated anew for each call, and can be modified, but
have to be freed).

Clean up white space.

svn path=/trunk/; revision=12881
2004-12-31 00:26:36 +00:00
Ulf Lamping d9be4670a7 move global capture_child flag into capture_options
svn path=/trunk/; revision=12855
2004-12-29 12:37:06 +00:00
Ulf Lamping 2ed93e96bd Don't use a global capture_opts in the capturing engine (this isn't a good idea). Do some more "housekeeping" in the capturing part.
Hopefully the unspecified forward declaration of capture_options_t in main.h is portable, but buildbot will tell me. This way I need the internals of that struct only at the places I really use it.

svn path=/trunk/; revision=12853
2004-12-29 09:09:35 +00:00
Guy Harris f1deabed56 Make the tone of the error messages a bit less formal, by using
contractions.  (Safari does, at least when you're trying to open a file
to which you don't have read access.)

svn path=/trunk/; revision=12852
2004-12-29 01:08:20 +00:00
Guy Harris 716ff427ce Don't start up a splash screen if "-G" is specified, even if we weren't
configured with libpcap support.

svn path=/trunk/; revision=12764
2004-12-17 10:09:32 +00:00
Lars Roland 221a66734e Don't ethclist.h in main.c, when we don't need it.
svn path=/trunk/; revision=12659
2004-12-02 19:41:56 +00:00
Guy Harris 27957c4c0d We don't use our own clist for GTK+ 1.3[.x], either.
svn path=/trunk/; revision=12658
2004-12-02 19:17:40 +00:00
Guy Harris 395bb21901 From Nathan Jennings: add a preference that supplies a prefix for window
titles.

svn path=/trunk/; revision=12657
2004-12-02 11:30:24 +00:00
Guy Harris 89cfc75ba2 We're not using our own clist for GTK+ 2.x, so call
"init_eth_clist_type()" only for GTK+ 1.2[.x].

svn path=/trunk/; revision=12654
2004-12-02 07:53:59 +00:00
Ronnie Sahlberg e2e3b87c73 performance enhancement:
in some profiling runs   eth_clist_get_type() took ~6%   change this to just a variable and initialize it explicitely from main.c



svn path=/trunk/; revision=12653
2004-12-02 03:12:24 +00:00
Ronnie Sahlberg 2e61f4d4c7 make ethereal compile with --without-pcap configuration option
svn path=/trunk/; revision=12652
2004-12-02 00:12:54 +00:00
Ulf Lamping 7445ecfd05 split capture_loop from capture.c, some more code cleanup
svn path=/trunk/; revision=12451
2004-10-30 17:50:51 +00:00
Ulf Lamping bdfe1d7fc8 move quit_after_cap into capture_opts
svn path=/trunk/; revision=12449
2004-10-30 14:30:52 +00:00
Guy Harris b48b8847b1 Change some of the merge.c APIs to return more information on failure,
and use that information to provide better error messages.

Have "merge_open_outfile()" do all the work of filling in the
merge_out_file_t structure, with the values to use passed as arguments. 
Get rid of some structure members that used to be used solely to pass
information to "merge_open_outfile()".

Add a "cf_merge_files()" routine to do the merging and reporting of errors.

svn path=/trunk/; revision=12420
2004-10-27 23:28:37 +00:00
Guy Harris 4624549a99 From Mark C. Brown: allow the file type for the merge operation to be
specified in the GUI.

svn path=/trunk/; revision=12326
2004-10-17 02:53:26 +00:00
Guy Harris 92ee993e82 "prefs-int.h" belongs in epan, too.
svn path=/trunk/; revision=12168
2004-10-01 08:33:53 +00:00
Guy Harris 7f5b234c5c Move the column preferences stuff to epan (the rest of the preferences
stuff is already there).

Update Gerald's e-mail address in column.h.

svn path=/trunk/; revision=12131
2004-09-29 02:54:22 +00:00
Guy Harris 6472876ab3 Move the tap infrastructure to the epan directory.
svn path=/trunk/; revision=12128
2004-09-29 00:06:36 +00:00
Guy Harris bbe7f89742 Move prefs.c and prefs.h into the epan subdirectory.
svn path=/trunk/; revision=12115
2004-09-27 22:55:15 +00:00
Ulf Lamping 6cd11f14ef first steps towards using the User's Guide as Ethereal's help system
svn path=/trunk/; revision=12021
2004-09-16 22:07:03 +00:00
Guy Harris f23f4ecf04 Use _WIN32 rather than WIN32 to determine if we're compiling on Win32;
according to Gisle Vanem, WIN32 isn't a built-in in MSVC, but _WIN32 is.

svn path=/trunk/; revision=11972
2004-09-11 23:03:36 +00:00
Guy Harris 8e90f07c71 Hoist the code for handling "-G" into a common module.
svn path=/trunk/; revision=11956
2004-09-10 22:47:02 +00:00
Gilbert Ramirez f676f7107b Add a "-G fields2" option which is like "-G fields", but extends the field
records by tw fields: base (for integers), and blurb

Add a "-G values" option which shows value strings and true_false strings for
the fields that have them.

svn path=/trunk/; revision=11954
2004-09-10 15:21:20 +00:00
Ulf Lamping 26afcbd9cc First working implementation of "Decode As" for DCE-RPC interface bindings. Ethereal needs to capture the DCE-RPC bind sequence, to get a relationsship between the interface UUID and the current conversation. If this binding wasn't captured, one can use "Decode As" and choose the interface from a list corresponding to a specific conversation. Currently "only" implemented for connectionoriented (TCP) DCE-RPC, but connectionless is a work in progress.
svn path=/trunk/; revision=11924
2004-09-07 16:19:56 +00:00
Guy Harris 92a52408e8 Don't have a dummy widget to use for panes marked as "None" - that means
the widget in question gets more than one parent if more than one pane
is marked as "None", and GTK_ doesn't like that.  Instead, just have
"main_widget_layout()" return a null pointer for "None" panes, and don't
put the pane into the pane splitter if that pane is null.

Clean up the handling of layouts.

svn path=/trunk/; revision=11855
2004-08-31 02:49:28 +00:00
Guy Harris 3a583aeb59 From Albert Chin: rename resolv.{ch} to addr_resolv.{ch}, so that an
include of <resolv.h> in any system header file gets the system
<resolv.h> (needed for builds on Tru64 with GTK+ 1.2[.x]).

svn path=/trunk/; revision=11615
2004-08-06 19:57:49 +00:00
Guy Harris 34de3c15d9 Have "gtk/color_utils.c" contain routines with toolkit-independent APIs,
but toolkit-dependent implementations, for manipulating colors, and have
"gtk/color_utils.h" declare them (the header file should eventually be
moved to the top-level directory).  Move the routines to convert between
GdkColor and color_t out of there into "colors.c", and move their
declarations into "colors.h", as their APIs are toolkit-dependent.

Have the first such routine be a "create_color()" routine, which takes
RGB values and initializes a "color_t", including doing any
toolkit-dependent work necessary for that; use that in the
"gtk/color_filters.c" code (the goal is to remove as many of the toolkit
dependencies as possible from that code, and move it to the top-level
directory).

svn path=/trunk/; revision=11497
2004-07-24 00:35:13 +00:00
Ulf Lamping bfd6ace52e renamed filter_prefs to filter_dlg, as the filter settings are (well, for a long time) no longer part of the preferences dialog.
svn path=/trunk/; revision=11436
2004-07-19 21:42:01 +00:00
Guy Harris 8a8b883450 Set the svn:eol-style property on all text files to "native", so that
they have LF at the end of the line on UN*X and CR/LF on Windows;
hopefully this means that if a CR/LF version is checked in on Windows,
the CRs will be stripped so that they show up only when checked out on
Windows, not on UN*X.

svn path=/trunk/; revision=11400
2004-07-18 00:24:25 +00:00
Gerald Combs 8106dc0862 Convert make-version.pl and the associated cvsversion.h and CVSVERSION
definition to Subversion.  "svn info" prints out the last changed date
of the repository, so we don't have to go hunting through "CVS/Entries"
files anymore.


svn path=/trunk/; revision=11379
2004-07-15 21:09:33 +00:00
Guy Harris fd262f1b97 From Daniel Thompson: add additional message/alert box options to
display "Save", "Continue without Saving", and "Cancel", for the "do you
want to save?" messages.

svn path=/trunk/; revision=11372
2004-07-13 07:15:45 +00:00
Ulf Lamping 05232a7e22 bugfix to a bug reported by Stuart MacDonald (bug #12):
present main window before closing the program,
when asking to save the capture file first

svn path=/trunk/; revision=11366
2004-07-12 19:10:58 +00:00
Guy Harris 70e22b4aba Don't allow non-positive values for the main window width and height
values in the "recent" file.  Also, check for syntax errors in numerical
values.

Set the main window height, as well as the main window width, to default
values before we read in the values from the "recent" file.  (Use
non-positive values here if you want the default to be "don't set the
geometry" - note that you can't set one to a positive value and the
other one to a non-positive value and expect only one to be set; they
*both* have to be positive in order for the size to be set.)

Treat non-positive values for those settings in the "recent" structure
as an indication that we don't have values from them and that we should
therefore not set the window size.

svn path=/trunk/; revision=11353
2004-07-09 21:13:22 +00:00
Gerald Combs 11c2a42da5 Don't show the splash screen if we've been passed the "-G" flag.
svn path=/trunk/; revision=11351
2004-07-09 18:43:04 +00:00
Ulf Lamping 76c2bec3ca bugfix: preference related capture options shouldn't be set by preferences,
if Ethereal is running as a capture_child

svn path=/trunk/; revision=11334
2004-07-07 16:31:30 +00:00
Gerald Combs 04d996b183 Make sure child processes don't create a splash screen. Make the verbs in
the splash screen messages present participles.

svn path=/trunk/; revision=11321
2004-07-06 19:16:04 +00:00
Ulf Lamping 176646edbf added a splash screen while Ethereal is started
svn path=/trunk/; revision=11310
2004-07-04 12:15:41 +00:00
Ulf Lamping e26fa0cbbb bugfix to a bug reported by dave.nicoson@thomson.net:
if reopening the capture options dialog, use the same values as before and
don't mess them caused by the units used.

svn path=/trunk/; revision=11283
2004-06-30 17:53:52 +00:00
Ulf Lamping 24527148ab close temporary merge output file, if merging failed
svn path=/trunk/; revision=11275
2004-06-30 05:49:30 +00:00
Ulf Lamping 19c7f04794 avoid using tmpnam() for security reasons.
instead of giving the merge stuff a filename,
give it an already opened file descriptor

svn path=/trunk/; revision=11273
2004-06-29 20:59:24 +00:00
Jörg Mayer 4bbb32eaaa The patch to fix the race condition introduced by using tmpnam replaced
insecure code by not-working code.  As I currently lack the time to fix
this properly until Monday as the earliest possible date I undo the patch.

Please note that Ethereal should not be used on multiuser systems with
untrusted users until a proper fix has been applied.

svn path=/trunk/; revision=11263
2004-06-29 03:27:52 +00:00
Jörg Mayer 0195deceae tmpnam() really should not be used for security reasons.
Replace it where used and update README.developer accordingly.

svn path=/trunk/; revision=11235
2004-06-25 07:04:03 +00:00
Ulf Lamping 5c061e582e if more than one file is (drag and) dropped into the program,
merge them together into a new temporary file
(and notice the user by a simple_dialog about it)

svn path=/trunk/; revision=11205
2004-06-21 16:45:07 +00:00
Ulf Lamping c5bae1f7e3 preference setting, so "ask for unsaved capture files" can be switched off
svn path=/trunk/; revision=11196
2004-06-20 15:57:11 +00:00
Ulf Lamping 17ca623b0f preference setting for the option to "avoid" the capture info dialog
svn path=/trunk/; revision=11195
2004-06-20 14:48:24 +00:00
Ulf Lamping 7e8187df20 added an option to "avoid" the capture info dialog completely.
This matters for "update of list in real time" (sync_mode) only,
as in normal mode you wouldn't otherwise have the possibility
to stop the capture.

svn path=/trunk/; revision=11194
2004-06-20 13:39:44 +00:00
Ulf Lamping 25e6749eb4 move font related stuff to new file font_utils.c/.h
do some font related renaming/code cleanup

svn path=/trunk/; revision=11166
2004-06-17 16:35:26 +00:00
Guy Harris f9be24cd13 On Windows, if "get_interface_list()" returns CANT_GET_INTERFACE_LIST
and the error message includes "Not enough storage is available
to process this command" or "The operation completed successfully",
suggest that the user install a WinPcap version later than 3.0 - this is
definitely a Frequently Asked Question on the Ethereal list.

svn path=/trunk/; revision=11143
2004-06-12 07:47:14 +00:00
Ulf Lamping 14bf83c340 add details for doxygen, various code cleanups as a result of this
svn path=/trunk/; revision=11052
2004-06-01 17:33:37 +00:00
Ulf Lamping 01c236864a next step to save the size and postition of the dialogs (using a hashtable)
move the get/set window size functionality from main to ui_util,
add some functions to handle windows/dialogs.

changed help and about dialog to suit the current window API

svn path=/trunk/; revision=10974
2004-05-23 17:37:36 +00:00
Guy Harris 88d2d10fb4 Don't put a newline at the end of the compiled-with version information
- we don't put it at the end of the run-time version information.

Add newlines into formats used with that information where appropriate
(the "About" dialog box already had a newline in the format).

svn path=/trunk/; revision=10950
2004-05-22 04:15:01 +00:00
Guy Harris 6e014216a9 Tag unused parameters with _U_ to squelch GCC compiler warnings (they're
GTK+ callbacks so we don't get to change the calling sequence).

svn path=/trunk/; revision=10934
2004-05-21 00:18:46 +00:00
Ulf Lamping ad85db871f moved the about dialog from main.c to it's own new about_dlg.c,
added a notebook tab with some directory infos (still incomplete and ugly)
cleaned up #includes in main.c (hoping this didn't break the build on unix)

svn path=/trunk/; revision=10925
2004-05-20 12:01:13 +00:00
Ulf Lamping 9ade33284d GTK2 only: catch window state event, and call display_queued_messages()
if window not iconified any longer.
Queue up simple_dialog messages, if window *is* iconified

svn path=/trunk/; revision=10914
2004-05-17 21:15:28 +00:00
Ulf Lamping e1fef4b5ca Win32 only: Preference setting to open a console window, one of:
never (default), automatic (like before), always

svn path=/trunk/; revision=10870
2004-05-13 15:28:02 +00:00
Ulf Lamping bd96071d8c rename context menu items:
Match -> Apply as Filter
Prepare -> Prepare a Filter
and prepended a ... at appropriate submenu items

svn path=/trunk/; revision=10814
2004-05-07 12:15:24 +00:00
Guy Harris b42f088ae5 Note that hiding panes in the paned widgets doesn't do what we want with
GTK+ 1.2[.x], although it does so with GTK+ 2.x.

svn path=/trunk/; revision=10801
2004-05-05 08:49:24 +00:00
Guy Harris 70e4f7ff87 Use "main_widgets_show_or_hide()" to control the visibility of all the
main window widgets, rather than requiring a relayout if the visibility
of the main toolbar, filter toolbar, or statusbar is changed.

Clean up indentation.

svn path=/trunk/; revision=10796
2004-05-04 21:08:03 +00:00
Guy Harris 76574b554b If all we're doing is changing the visibility of a pane, we don't have
to re-lay-out the main window, we just need to change the visibility of
the appropriate widgets - that reduces the amount of drawing done,
speeding things up a little and reducing flicker.

svn path=/trunk/; revision=10795
2004-05-04 20:49:33 +00:00
Guy Harris 6ae8786e94 Display "main_second_pane" if, and only if, both widgets in it are
displayed; otherwise, if you hide both of them (e.g., hiding the packet
details and packet data panes in the default layout), "main_second_pane"
remains but as a gray blob, rather than having the remaining pane take
over the entire window.

svn path=/trunk/; revision=10794
2004-05-04 20:40:08 +00:00
Guy Harris 9831d86922 Squelch some compiler warnings.
Clean up white space.

svn path=/trunk/; revision=10735
2004-04-30 00:22:46 +00:00
Ulf Lamping 414b631700 added selection of different main window pane layouts,
also added some preferences and a new preference page for this

svn path=/trunk/; revision=10729
2004-04-29 17:03:27 +00:00
Ulf Lamping 727b63bd8c Freely adjustable status line separations.
svn path=/trunk/; revision=10715
2004-04-27 19:16:11 +00:00
Ulf Lamping f59f209d4f save the position of the main window panes in the recent file,
and restore their position when program is started again (GTK2 only)

svn path=/trunk/; revision=10706
2004-04-25 23:45:12 +00:00
Guy Harris 5d9b301783 Report errors in opening various configuration files at the time the
failure occurs; now that "simple_dialog()" queues up messages if we
don't yet have the main window, those messages will be queued up until
then.

Move the point at which we pop up those queued messages after the
"process all pending GUI events" is done, so that those messages are
properly displayed on top of the main window.

svn path=/trunk/; revision=10617
2004-04-16 23:57:54 +00:00
Guy Harris d209115ba3 Add a "report_failure()" routine to allow dissectors to report arbitrary
errors to the user.  Use that, rather than "g_warning()", in the
Diameter dissector to report errors reading the dictionary.

Make the format argument to "simple_dialog()" a "const" pointer.

Fix up the read-error message in Tethereal to end with a newline.

If a simple dialog is requested before the main window or the
capture-control window is popped up, queue it up and pop the queued
messages up once the main or capture-control window is displayed.

svn path=/trunk/; revision=10616
2004-04-16 23:17:13 +00:00
Ulf Lamping cbcacf7e48 from Thomas Palmer: add a preference setting for filter toolbar placement
svn path=/trunk/; revision=10555
2004-04-06 19:02:18 +00:00
Gerald Combs 38f778743a Remove an extraneous 'break'.
svn path=/trunk/; revision=10554
2004-04-06 16:08:56 +00:00
Guy Harris 121f06fab7 Make "epan_init()" take, as additional arguments, pointers to routines
that dissectors should call to report file open and read errors, and
have "report_open_failure()" and "report_read_failure()" call through
those pointers, rather than being defined and exported by the
application using libethereal - instead, the application would define
those functions and pass pointers to them to 'epan_init()".

Move "report_err.h" to the epan directory, as the functions it declares
are now part of the libethereal API.

svn path=/trunk/; revision=10470
2004-03-23 21:19:58 +00:00
Guy Harris ddc5a1773a From Tomas Kukosa:
add Expand Tree to the View menu;

	make the Expand Tree context menu active iff the
	currently-selected item has a subtree;

	fix the GTK2 code for Expand Tree.

svn path=/trunk/; revision=10415
2004-03-20 06:34:09 +00:00
Guy Harris e59b9abbb4 From Tomas Kukosa: add a new "Expand Tree" context menu item, which
expands the selected item and all items below it.

svn path=/trunk/; revision=10407
2004-03-19 06:23:38 +00:00
Olivier Biot 11f9232336 From Lars Roland: Move timestamp_type into libethereal and provide accessor
methods for getting and setting the timestamp type.

This is a move towards a real libethereal shared library.

svn path=/trunk/; revision=10402
2004-03-18 19:04:33 +00:00
Guy Harris aaa184c98d Cast a "char" to "guchar" before passing it to the ctype macros, so that
it doesn't get sign-extended.

svn path=/trunk/; revision=10389
2004-03-17 08:59:28 +00:00
Ulf Lamping 6c9a1dc093 experimental: make usage of pcap_setbuff to increase the kernel buffer size
svn path=/trunk/; revision=10377
2004-03-13 22:49:30 +00:00
Ulf Lamping 7b62a629e8 replaced sprintf / snprintf by g_snprintf,
various other string related changes

svn path=/trunk/; revision=10373
2004-03-13 15:15:26 +00:00
Ulf Lamping 47b176f983 various string related changes
svn path=/trunk/; revision=10372
2004-03-13 14:07:14 +00:00
Ulf Lamping cb5a386901 fixed differences between capture GUI frontend and backend
svn path=/trunk/; revision=10303
2004-03-04 19:31:21 +00:00
Ulf Lamping ecf2665992 implemented capture dialog 3rd (+x) proposal
svn path=/trunk/; revision=10279
2004-03-02 22:07:23 +00:00
Guy Harris d9a9be352c Default to not using the ring buffer (as the default number of files is
1 file, i.e. the simple "just keep capturing until told to stop" mode,
you can't use a ring buffer).

svn path=/trunk/; revision=10259
2004-02-28 21:55:13 +00:00
Ulf Lamping b151b6d215 Capturing: "Number of files" switches between normal and multiple mode,
"Use ring buffer" switches between multiple single run and real ring buffer

svn path=/trunk/; revision=10257
2004-02-28 16:21:11 +00:00
Guy Harris 6064ef84c2 Add a "force" argument to "filter_packets()" and
"main_filter_packets()", to force the filtering to be done even if the
filter is the same as the current one; this is necessary in order to
make sure "Follow TCP Stream" gets the packets processed even if you're
filtering the stream that's currently filtered in.

svn path=/trunk/; revision=10209
2004-02-23 22:48:52 +00:00
Ulf Lamping ed6148660b statistics menu redesigned, now looking more like the former menu,
items now again grouped by function, not by ISO layer

svn path=/trunk/; revision=10202
2004-02-23 19:19:39 +00:00
Gerald Combs fc60101a9f Move cvsversion.h from BUILT_INCLUDES to BUILT_SOURCES. This tells automake
to create cvsversion.h before any "all" or "check" targets are built.

Clean up a few CVS version strings that I missed last week.

svn path=/trunk/; revision=10199
2004-02-23 16:12:52 +00:00
Ulf Lamping 62d083525e statistics menu structure proposal:
renamed "Watch Protocol" to "Statistics",
Made two new toplevel menu items "Transport" and "Application"

svn path=/trunk/; revision=10183
2004-02-22 21:35:58 +00:00
Ulf Lamping cdebea69ce Redesigned the menu structure of the former statistics stuff,
now sorted by ISO-layer, than alphabetically (now longer by functionality).
Seperated the tap registering from the actual menu making stuff,
so the seperate step of registering the tap and the menu is no longer needed.
Removed all things related to this double registering.

svn path=/trunk/; revision=10180
2004-02-22 18:47:04 +00:00
Ulf Lamping 2509c20b61 quit_after_cap should be a gboolean, not an int, and it should be initialized
svn path=/trunk/; revision=10169
2004-02-21 13:40:06 +00:00
Gerald Combs 058dbba4b9 Add support for a "version.conf" file in the main directory which can
be used to adjust version preferences.  It understands two configuration
directives: "enable", which can be 0 or 1, and "format", which can be any
strftime()-compatible string, e.g. "V12-powered on %A %Y-%m-%d %H:%M:%S".

If no configuration file is present, the configuration defaults to

enable: 1
format: CVS %Y%m%d%H%M%S

svn path=/trunk/; revision=10139
2004-02-20 20:36:14 +00:00
Ulf Lamping 6b03887732 minor bugfix from recent check in
svn path=/trunk/; revision=10137
2004-02-20 18:37:00 +00:00
Ulf Lamping ec03b28e12 bugfix: resizing (values from recent) must be done, before the
top_level window is shown, otherwise it has no effect!

svn path=/trunk/; revision=10136
2004-02-20 17:43:50 +00:00
Ulf Lamping fed61823c6 win32 drag-n-drop: corrected handling of UNC filenames "\\host\share\dir..."
svn path=/trunk/; revision=10135
2004-02-20 17:36:37 +00:00
Ulf Lamping d50cbeb79a bugfix: use last_open_dir for the recent file,
instead of the somewhat duplicated value in the recent struct

svn path=/trunk/; revision=10077
2004-02-17 14:49:11 +00:00
Guy Harris 36ece5a17a Add a "window_new()" routine that creates a window of a given type, sets
the title, and arranges to set the icon for it.  Use that instead of
"gtk_window_new()" and separate calls to set the title and arrange to
set the icon.

Regularize #includes a bit.

Clean up white space.

svn path=/trunk/; revision=10054
2004-02-13 00:53:37 +00:00
Guy Harris c5b4dad036 Create only one "About Ethereal" window per process.
svn path=/trunk/; revision=10052
2004-02-13 00:00:25 +00:00
Guy Harris 90cf9a6b7b The HIG's and/or GUI toolkit documentation for:
Mac OS X

	GNOME

	Qt

	KDE

	Windows

all indicate that {message,alert} boxes are modal, at least for the
window to which they apply.  (Presumably the idea is that not forcing
the user to pay attention to the alert box, and allowing more than one
alert box to be up for a given window, causes more problems than not
letting the user do stuff to that window in order to figure out what the
underlying problem is or figure out what to do to fix it - the message
should be sufficient, in most if not all cases, to let you know what the
problem is.)

Make "simple_dialog()" unconditionally make the alert box modal, and get
rid of ESD_TYPE_MODAL.  XXX - we need to make it possible to make an
alert box modal for a given window, rather than just the top-level
window.

svn path=/trunk/; revision=10051
2004-02-12 22:24:28 +00:00
Guy Harris f99bb93e55 Cast "char" values to "guchar" before passing them to <ctype.h> macros,
so that characters with the 8th bit set don't get sign-extended and
cause the macros not to return the right answer.

svn path=/trunk/; revision=10036
2004-02-11 09:19:54 +00:00
Guy Harris 2e4e229739 Get rid of the "Question" alert box type - rename it to "Confirmation",
as that seems to be the name used in the GNOME HIG, at least.  Make it
use the Warning icon (that's what the GNOME HIG says - and it's also
what's used for the equivalent on Windows), and use it for the "Save
current capture?" alert boxes.

svn path=/trunk/; revision=10030
2004-02-11 03:55:48 +00:00
Guy Harris c7fd1b2b13 Add a routine to be used to put up alert boxes for invalid display
filter expressions; use that in a number of places, so we use the same
alert box.  (More work is needed to figure out the right way to handle
some other "dfilter_compile()" failures.)

Use the error message from the display filter as the primary error, as
that's the message that tells you what the underlying problem is.  (The
GNOME HIG says "In most situations the user should only need the primary
text to make a quick decision", so the primary text should tell you
what's wrong with the filter, not just that it's invalid.  If there are
messages from the display filter code that don't give enough
information, or are a bit cryptic, such as "Unexpected end of filter
string," those should be fixed in the display filter code.)

Improve the error used if an empty filter is used for "find frame".

svn path=/trunk/; revision=10025
2004-02-11 00:55:28 +00:00
Jörg Mayer 348c83db8c Fix a few warnings
svn path=/trunk/; revision=9997
2004-02-06 14:59:52 +00:00
Guy Harris 372e6b2da0 Add some comments about the types of alert boxes you get with the
simple_dialog routines (which are really just message box/alert box
routines).

Add some macros for combinations of buttons (corresponding to
combinations that some GUI toolkits, which only support some
combinations, allow).

svn path=/trunk/; revision=9977
2004-02-04 01:10:37 +00:00
Ulf Lamping 1d2c791ab6 enhanced some dialog messages,
close capture file when user told so

svn path=/trunk/; revision=9965
2004-02-03 17:59:01 +00:00
Ulf Lamping 3f2f2929eb added some more info to the statusbar (filesize, packet count, ..),
fixed a minor bug in the cfile handling (file length in summary dialog)

svn path=/trunk/; revision=9961
2004-02-03 00:16:59 +00:00
Guy Harris 7b5e98bf8e Mark the "widget" argument to "main_load_window_geometry()" as unused
when building for GTK+ 1.2[.x].

svn path=/trunk/; revision=9955
2004-02-01 22:43:34 +00:00