Commit Graph

551 Commits

Author SHA1 Message Date
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