Commit Graph

651 Commits

Author SHA1 Message Date
Gerald Combs 8958bab6de Tethereal/tethereal -> TShark/tshark.
svn path=/trunk/; revision=18268
2006-05-31 17:38:42 +00:00
Anders Broman 05448fcc3d Ethereal->Wireshark
svn path=/trunk/; revision=18232
2006-05-28 17:19:08 +00:00
Ronnie Sahlberg 6075ec39fb ethereal->wireshark
svn path=/trunk/; revision=18207
2006-05-22 08:21:22 +00:00
Guy Harris 92552c2d76 Get rid of a bunch of "Ethereal"s and "ethereal"s in comments, GUI
strings, and function names.

svn path=/trunk/; revision=18205
2006-05-22 07:29:40 +00:00
Ronnie Sahlberg 89f022b12b name change
svn path=/trunk/; revision=18197
2006-05-21 05:12:17 +00:00
Graeme Lunt 6c381119a9 Removal of useless "Field Information" introduced in r18125
svn path=/trunk/; revision=18133
2006-05-11 16:42:38 +00:00
Anders Broman 8bebcb8d8e From Greg Morris:
add copy functionality to the details window. Also includes a change in the copy function of the hex data window to allow copying just the text strings instead of all of the hex data.

svn path=/trunk/; revision=18129
2006-05-11 05:08:00 +00:00
Graeme Lunt ab19b927c8 "Field Information" context menu item that will bring up a web page reference to a field type of FT_OID
svn path=/trunk/; revision=18125
2006-05-10 19:50:54 +00:00
Guy Harris 0dfbc73cbe Handle the case where we *can't* determine the pathname in which to find
programs, by reporting it with a dialog box that at least attempts to
indicate what the problem is, and by giving up early on running dumpcap.

svn path=/trunk/; revision=18051
2006-05-01 06:51:14 +00:00
Guy Harris 84aef00bad Move the file selection dialog routines to file_dlg.c, and give it a
header file.

#if 0 out some includes; if none of the builds have a problem with
that, I'll remove them.

svn path=/trunk/; revision=18036
2006-04-30 01:47:58 +00:00
Guy Harris 0ce9a23b25 Most of the stuff in file_dlg.c is specific to capture files, so rename
it to capture_file_dlg.c, and rename its header file.  We might want to
move the generic file dialog stuff to a file_dlg.c file (it's currently
in dlg_utils.c), and move the non-capture-file dialog stuff in
capture_file_dlg.c to another file.

svn path=/trunk/; revision=18034
2006-04-29 23:03:57 +00:00
Gerald Combs 9406c5db24 Use Unicode for all native Win32 calls. Unicode Windows applications
use UTF-16 internally and GTK+ 2.x uses UTF-8, which means we have to
do a lots of conversions.

Add utf_8to16() and utf_16to8 convenience functions to strutil.c.

svn path=/trunk/; revision=17534
2006-03-08 20:55:32 +00:00
Gerald Combs a103501de2 Fix what Coverity CID 61 was actually complaining about: Don't pass a NULL
value to get_interface_descriptive_name().

svn path=/trunk/; revision=17513
2006-03-07 22:14:12 +00:00
Gerald Combs 432e1233bb Fix Coverity run 12 CID 61: In main_cf_cb_live_capture_update_started(),
make sure capture_opts isn't NULL before we try to use it.

svn path=/trunk/; revision=17504
2006-03-07 19:11:35 +00:00
Ulf Lamping 79053183c5 remove dependencies to pcap.h, so getting an idea what needs to be done by dumpcap in addition to the things already done now
various dumpcap related code cleanup: mainly #include's and capture engine related stuff

svn path=/trunk/; revision=17327
2006-02-17 02:18:48 +00:00
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