Commit Graph

836 Commits

Author SHA1 Message Date
Stephen Fisher bd9673f84f Fix for bug 948, "Apply capture preferences not applying." Now when the user
changes a capture option in the preferences, it will show up right away in
the capture options dialog.


svn path=/trunk/; revision=19908
2006-11-16 07:04:02 +00:00
Stephen Fisher 90303fb17f New feature to automatically highlight the field found when doing a find.
This works for both string and hex searches.  This resolves feature request
bug #776.


svn path=/trunk/; revision=19897
2006-11-14 22:35:22 +00:00
Anders Broman 99511df5a0 From Simon Munton as pointed out by Stephen Fisher:
patch on bug #220 (to main.c. 
the second part to packet_list.c was done separately for bug 1159 in rev 19735).  That patch fixes bug #1205 coincidentally.

svn path=/trunk/; revision=19888
2006-11-14 06:00:48 +00:00
Ulf Lamping 59d6c8ea33 change all file offsets from long to gint64 so we can - theoretically - handle files > 2GB correct.
Please distclean Win32 builds!

svn path=/trunk/; revision=19814
2006-11-05 22:46:44 +00:00
Guy Harris 87dd0d2636 Make the routines that manipulate the hex/text display window take a
GtkWidget * as an argument, rather than a version-of-GTK+-dependent
pointer; that way, we need fewer #ifdefs.

Use WIDGET_SET_SIZE() instead of #ifdeffed code using
gtk_widget_set_usize() or gtk_widget_set_size_request() -
WIDGET_SET_SIZE() was created to encapsulate that GTK+ 1.2[.x] vs. 2.x
difference.

Make some variables not used outside gtk/main.c static.

Clean up white space.

Clean up handling of return value from load_airpcap() a bit.

Use one big #ifdef HAVE_AIRPCAP/#endif for all the AirPcap stuff in
gtk/main.c.

Attach _U_ to the unused arguments to driver_warning_dialog_cb(), not to
the arguments that are being used - and don't include it at all if
HAVE_AIRPCAP isn't defined, as it's not used in that case.

svn path=/trunk/; revision=19798
2006-11-05 00:54:17 +00:00
Gerald Combs 2fcb67b496 From Giorgio Tino: Add a "Don't show this message again" option to an
AirPcap warning dialog.  Fix a callback bug in simple_dialog.c.

svn path=/trunk/; revision=19747
2006-10-31 01:44:11 +00:00
Gerald Combs ff8422a3e4 From Giorgio Tino: Add support for version 2.0 of the AirPcap driver,
which has an updated API for WEP key handling.

svn path=/trunk/; revision=19736
2006-10-30 06:34:31 +00:00
Gerald Combs ac0181b469 Put a trailing ellipsis behind the wireless toolbar buttons since they open
a new window.

svn path=/trunk/; revision=19673
2006-10-24 21:07:05 +00:00
Guy Harris a08a2b5b89 Put the ", " before the PortAudio item regardless of whether we have
PortAudio or not; this fixes 1174.

svn path=/trunk/; revision=19653
2006-10-21 17:48:45 +00:00
Gerald Combs fd2d2df09f AirPcap fixes from Giorgio Tino:
1) When choosing to Merge, Import or Keep decryption keys,  key lists will be saved to the preferences file AND into the registry.

2) Now if you check/uncheck the WEP deccryption checkbox in the Preferences..., the AirPcap toolbar will be modified as well.

svn path=/trunk/; revision=19646
2006-10-20 23:22:53 +00:00
Guy Harris b12232d7a1 Do the word-wrapping in end_string(), once the string is completely
constructed.  Clean up the insertion of ", ".

Put the runtime libpcap version into the runtime version info.

svn path=/trunk/; revision=19625
2006-10-20 09:06:24 +00:00
Jaap Keuter 22a949a42f Make dumpcap complile again and other minor improvements.
svn path=/trunk/; revision=19624
2006-10-20 06:24:56 +00:00
Gerald Combs 99d5c5e440 Rename get_epan_and_portaudio_version_info() to get_gui_compiled_info()
and add version info for AirPcap.  Add a corresponding
get_gui_runtime_info().  Fix up whitespace.

svn path=/trunk/; revision=19620
2006-10-19 22:43:38 +00:00
Guy Harris 1eefc6d60e Clean up the word wrap stuff a bit. (Arguably, that should be done in
the code that displays it - we might, for example, be able to have the
About dialog word-wrap to the appropriate size, and word-wrap text
printed to the standard output to the terminal width if it's going to a
terminal and to 80 or whatever columns otherwise.)

Don't report anything in dumpcap about libraries not used by dumpcap. 
(It was printing a blank, which looked a bit weird.)

Fix the handling of _MSC_VER as per Gerald's fix for _MSC_FULL_VER.

svn path=/trunk/; revision=19618
2006-10-19 21:17:23 +00:00
Guy Harris 00d8ca2d45 Fix up the changes to put the Portaudio information at the end of the
version string, so the information comes out right for applications that
don't use Portaudio.

Get rid of an extra "with" in the version string for dumpcap.

Get rid of an extra blank after the libpcap version string, and get rid
of an extra newline before it.

Attempt to add more compiler version information and to prettify the
MSVC++ version information (both untested).

svn path=/trunk/; revision=19613
2006-10-19 18:43:12 +00:00
Gerald Combs 40b8458408 Add support for:
- The AirPcap Multi-Channel Aggregator (which is marketspeak for an "any" 
    device)
  - Merging the 802.11 dissector WEP key list with AirPcap's
  - Decrypting WEP in the adapter, in Wireshark, or not at all
  
Update the release notes.

svn path=/trunk/; revision=19599
2006-10-19 00:48:03 +00:00
Ulf Lamping c9ad9d765a remove the experimental display of the highest expert level in the statusbar for now.
as long as we haven't solved that TCP checksum offload problems causing checksum errors all the time, this will display the error level for almost every capture done on a local machine - rendering this display pretty useless in it's current form.

svn path=/trunk/; revision=19516
2006-10-13 18:19:42 +00:00
Jaap Keuter fe2f2920b8 Don't let PortAudio skip the queue on the about dialog ;)
svn path=/trunk/; revision=19478
2006-10-10 19:00:50 +00:00
Ulf Lamping cdb790c0b2 experimental: append the current maximum expert warning level to the "File" statusbar, e.g. "[Expert: Chat]".
I'm still looking for a good way to display the current expert level and this seems to be the best place.

However, ideas are still welcome ...

svn path=/trunk/; revision=19297
2006-09-22 23:49:08 +00:00
Gerald Combs b18c049226 Don't complain if we can't find airpcap.dll.
svn path=/trunk/; revision=19296
2006-09-22 23:26:52 +00:00
Gerald Combs ea0b3b5d10 Fix protocol reference link URL.
svn path=/trunk/; revision=19256
2006-09-18 22:22:44 +00:00
Guy Harris c577480d71 Move the PortAudio stuff to from version_info.c to gtk/main.c, so it can
use Pa_GetVersionText().

(The word-wrapping stuff appears to work.)

svn path=/trunk/; revision=19222
2006-09-12 20:23:57 +00:00
Guy Harris a28b428aff Go back to setting the capture filter to an empty string when we start;
that obviates the need to check for a null capture filter string, and
fixes bug 1055.

Keep track of whether it was set from the command line, though, so we
can catch attempts to set the filter more than once, and attempts to set
it when we're not capturing.

Clean up white space.

svn path=/trunk/; revision=19047
2006-08-26 18:36:09 +00:00
Graeme Lunt 14be5e2bcc U3 packaging, utility and Wireshark modifications that allows Wireshark to be run from a U3 USB device.
For more details see packaging/u3/win32/README.txt


svn path=/trunk/; revision=19046
2006-08-26 17:55:21 +00:00
Ronnie Sahlberg b588469ccf guids are not olnly used in dcerpc interfaces and they often occur in many other protocols such as ldap and smb/smb2
move the initialization of the guid mapping table from the dcerpc dissector to a more neutral place


svn path=/trunk/; revision=18947
2006-08-18 09:32:19 +00:00
Gerald Combs f9661850d1 Add support for AirPcap, an upcoming wireless product from CACE. Support
is disabled by default, and can be enabled by setting AIRPCAP_CONFIG
in config.nmake.  The code is currently limited to Windows, but should
be adaptable to other platforms.

The official announcement won't come until next week, so you'll have to
read the source for details.  :)

svn path=/trunk/; revision=18928
2006-08-16 18:01:25 +00:00
Ulf Lamping 3342dab895 "bug" #1013: from Stephen Fisher
add the X --display command line parameter to the documentation

svn path=/trunk/; revision=18889
2006-08-13 00:13:22 +00:00
Ulf Lamping 96539fbb08 experimental: add a "Conversation Filter" entry to the context menu of the packet list. More info to come in the developer list shortly.
svn path=/trunk/; revision=18885
2006-08-12 22:38:08 +00:00
Jörg Mayer 30c04916b4 Reported by Stephen Fisher <stephentfisher@yahoo.com>:
I believe this is a typo in the command line help for the -i option:

Usage: wireshark [options] ... [ <infile> ]

Capture interface:
  -i <interface>           name or idx of interface (def: first none
loopback)

Shouldn't that read "first non-loopback" ?



svn path=/trunk/; revision=18813
2006-08-01 19:52:36 +00:00
Guy Harris 5e3fe34170 Fix the usage output to all go to the same stream.
svn path=/trunk/; revision=18646
2006-07-04 02:23:15 +00:00
Ulf Lamping e1874af6da If the user sets a time reference and the time display format is currently not "Seconds Since Beginning of Capture", ask him if Wireshark should switch to that format. It's the only display format where a time reference makes sense.
It's just annoying to set a time reference without seeing a reasonable result on the screen.

svn path=/trunk/; revision=18614
2006-06-29 19:04:33 +00:00
Guy Harris c922f5e48e Fix the signatures of find_next_mark_cb() and find_next_mark_cb() to
match their declarations, and mark the "action" argument as unused.

svn path=/trunk/; revision=18446
2006-06-13 05:36:27 +00:00
Ulf Lamping 2bfd2bf5a7 update of "Edit" menu:
Add missing "Find Next Mark" and "Find Previous Mark" functionality to the "Edit" menu.

"unify" the menu items of "Time Reference" and "Mark Frame" functionality (both main and packet list context menus)

... we need to update the User's Guide screenshots anyway because of the Wireshark changes :-)

svn path=/trunk/; revision=18438
2006-06-12 19:35:26 +00:00
Gerald Combs 477bd8006a Use the new capture icons.
svn path=/trunk/; revision=18377
2006-06-07 04:03:18 +00:00
Tomas Kukosa 62179dd08f eicon3d*.xpm -> wsicon*.xpm
svn path=/trunk/; revision=18309
2006-06-02 05:43:38 +00:00
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
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