Commit Graph

643 Commits

Author SHA1 Message Date
Ronnie Sahlberg 506713b254 From Ulf Lamping: Prettyfied Colorization dialog
svn path=/trunk/; revision=6335
2002-09-26 00:39:09 +00:00
Olivier Abad 1b89d48835 Change to color filters :
- moved color_filter_t in color.h
- change color_filter_t to use color_t instead of GdkColor

This changed allowed to remove the last gtk includes in file.c. It is
now completely free of any gtk related code.

svn path=/trunk/; revision=6324
2002-09-23 19:09:52 +00:00
Jörg Mayer ba14ebf41c Add packet_list.obj to Makefile.nmake - spotted by Ulf Lamping
svn path=/trunk/; revision=6322
2002-09-23 17:07:39 +00:00
Gerald Combs 7d7c2e075e From Graeme Hewson:
In my recent patches to set and use a default directory, I neglected
  to set the directory when the user enters a file name directly into the
  "Capture Options" and "Print" dialogs instead of using the file dialog.
  This set of patches corrects this.

svn path=/trunk/; revision=6318
2002-09-22 17:52:38 +00:00
Olivier Abad d72aca0b7e Removed all gtk calls in file.c :
- created a few packet_list_xxx functions (ui_util.h gtk/packet_list.c
  gtk2/packet_list.c) ;
- removed almost all "gtk/xxx" and "gtk2/xxx" includes in file.c

The only remaining includes are related to color filters. We have to
make color_filter_t GUI independent by replacing GdkColor with color_t.
I'll work on this later.

svn path=/trunk/; revision=6311
2002-09-21 11:36:30 +00:00
Guy Harris 1d5b83b842 Add "/I$(ZLIB_DIR)" to the list of "/I" flags in the top-level directory
and the "gtk" and "gtk2" directories, so that we find "zlib.h", as we
now define "HAVE_ZLIB" in the top-level "config.h.win32" and thus try to
include "zlib.h" on Windows.

svn path=/trunk/; revision=6246
2002-09-10 10:08:41 +00:00
Guy Harris 5e8ecbaf46 From Graeme Hewson:
Currently Ethereal sets and uses a default directory for reading
	and writing, but only in some places.  This set of patches extends
	the setting of the default directory to the -w option as well as
	the -r option, and causes all file dialogs to use and set the
	default consistently.  (I haven't changed the
	Preferences/Printing/File dialog, though, as that's a special
	case.)

	There's also a fix for a bug where Ethereal was issuing the
	message "Ring buffer requested, but capture isn't being saved to
	a permanent file" even though a file was specified with -w.

There also appear to be some other cleanups in his patch.

svn path=/trunk/; revision=6238
2002-09-09 20:39:01 +00:00
Jörg Mayer 49425de396 Add/fix cvs id tags
svn path=/trunk/; revision=6237
2002-09-09 20:32:32 +00:00
Guy Harris 7283f9b347 Put back missing include of <stdio.h>.
Fix the RCS ID.

svn path=/trunk/; revision=6235
2002-09-09 20:16:12 +00:00
Ronnie Sahlberg 5b2510fb8e Tap system supprot for Gtk1 and both rpc_stat and rpc_progs
Gtk1 is still single threaded so if the tap extensions need to do something
time consuming or cpu intensive, then the main application will suffer.

It is better than nothing.

svn path=/trunk/; revision=6215
2002-09-07 10:02:36 +00:00
Jörg Mayer f4ba9d929c Add back stdio.h
svn path=/trunk/; revision=6214
2002-09-07 10:01:55 +00:00
Jörg Mayer 2e0595ad63 Add back more string.h includes
svn path=/trunk/; revision=6205
2002-09-07 00:02:24 +00:00
Ronnie Sahlberg 429b24827b From Vassilii Khachaturov, cleanup of redundant code.
svn path=/trunk/; revision=6202
2002-09-06 22:45:44 +00:00
Guy Harris ce6eb43912 Put needed include back in (<string.h>, to declare "memset()").
svn path=/trunk/; revision=6201
2002-09-06 21:27:57 +00:00
Jörg Mayer e4a2e2cefe Include cleanups in gtk and gtk2:
Remove unneded includes
Add include wrappers where missing

svn path=/trunk/; revision=6191
2002-09-05 18:48:52 +00:00
Jörg Mayer b147295e08 Remove redundant HAVE_LIBPCAP check (copied from gtk2)
svn path=/trunk/; revision=6158
2002-08-31 14:22:11 +00:00
Jörg Mayer 438370a48d Remove trailing whitespaces.
svn path=/trunk/; revision=6155
2002-08-31 10:58:18 +00:00
Gerald Combs 074cb0f6d2 Cast the Mbits/s calculation as a float, so that we display the value
correctly for large captures.

svn path=/trunk/; revision=6150
2002-08-31 00:40:46 +00:00
Guy Harris 25c3026203 Make the "start_time" argument to "delayed_create_progress_dlg()" a
pointer to const, to emphasize that it does *not* modify the time
pointed to by the argument.

Make the initial delay for delayed progress bars 1/10 second rather than
1/2 second, as a 1/2 second delay is noticeable, especially when loading
a file for the first time (as the main window looks a bit blank).  Even
at 1/10 second you can still notice it, but it's not *as* noticeable.

svn path=/trunk/; revision=6118
2002-08-28 22:28:43 +00:00
Jörg Mayer 7c4176d868 Removed trailing whitespaces from .h and .c files using the
winapi_cleanup tool written by Patrik Stridvall for the wine
project.

svn path=/trunk/; revision=6117
2002-08-28 21:04:11 +00:00
Guy Harris abe6b6bcc8 From Ulf Lamping: extend the progress dialog box to give more progress
information.

Fix the types of some variables (make the file position in
"read_cap_file()" a "long", as Wiretap supports "long" offsets, and make
processed-packet counts in packet-processing loops "int"s, as the total
packet count in a "capture_file" structure is an "int").

svn path=/trunk/; revision=6112
2002-08-28 10:07:37 +00:00
Guy Harris d6d0a33cf7 Give the routines that implement the "Match" and "Prepare" menu items
more meaningful names, indicating whether they look at something in the
protocol tree or the packet list.

svn path=/trunk/; revision=6077
2002-08-24 01:17:09 +00:00
Guy Harris 053891e609 On Win32:
don't show "Command" and "File" as printer options, show
	"Printer" and "File";

	don't show the command to be used for printing.

svn path=/trunk/; revision=5986
2002-08-13 07:54:37 +00:00
Jörg Mayer 96ab70e209 Replace the types from sys/types.h and netinet/in.h by their glib.h
equivalents for the gtk/ directory.

svn path=/trunk/; revision=5930
2002-08-02 22:34:54 +00:00
Jörg Mayer 9630bf353e Fix a few more memleaks found by valgrind (all deriving
from the get_persconffile_path mess).

svn path=/trunk/; revision=5927
2002-08-01 03:15:29 +00:00
Guy Harris e04fc7ebfd From Graeme Hewson:
Ethereal sometimes creates a progress dialog bar and then, if
	the processing is fast, quickly destroys it.  The resulting
	"flash" can be disconcerting.  This set of patches ensures a
	progress bar is either not created or is displayed for a minimum
	time.

svn path=/trunk/; revision=5916
2002-07-30 10:13:16 +00:00
Guy Harris b0de25272d #ifdef out some variables not used on Windows.
If printing a single packet to a file, don't use the "print to a
printer" code for Windows.

Only free "print_args.dest" *after* the last usage.

svn path=/trunk/; revision=5913
2002-07-30 07:04:08 +00:00
Guy Harris 3365355534 From Joerg Mayer:
gtk/colors.c: Fix a memleak found by valgrind
   (Note that there are similar bugs in other functions that
   use the same construct with path!)

svn path=/trunk/; revision=5910
2002-07-29 06:30:01 +00:00
Guy Harris 77fa06b899 From Joerg Mayer:
dftest.c:
	     Remove #if-0-ed includes

	packet-ieee80211.c, packet-wtls.c, packet-afp.c, packet-wsp.c,
        packet-wtp.c, ethereal_gen.py:
	     Remove redundant include varargs (already in snprintf.h,
	     and required only for snprintf.h)

	Remove unused include of snprintf.h from files not using
	"snprintf()".

svn path=/trunk/; revision=5889
2002-07-17 00:43:03 +00:00
Guy Harris ca6badc579 Get rid of some "unused variable" and "unused static function" warnings,
and some compile errors in Tethereal, when compiling without libpcap.

If libpcap is missing (whether that's detected at compile time or, as on
Windows, at run time), don't call any of the "capture_prefs" routines -
the routine to create the capture preferences page wasn't called, so the
other routines can try to refer to non-existent widgets and other items
and crash.

Get rid of the stub routines in "capture_prefs()" used when compiling
without libpcap, as they're no longer called.

svn path=/trunk/; revision=5888
2002-07-17 00:22:30 +00:00
Guy Harris b083cf0b39 Fields can be up to 2^32-1 bytes long, as they may have come from a
reassembled packet and are thus not limited to the maximum frame size;
leave room for a Really Big number in the length item in the status bar,
and use "snprintf()" to format the length item Just To Be Sure.

svn path=/trunk/; revision=5839
2002-07-07 22:14:03 +00:00
Guy Harris 192749474f From Liviu Daia <Liviu.Daia[AT]imar.ro>: move "col_init()" call after
the command-line options are processed, so that we don't crash if you've
set the "column.format" preference from the command line.

Fix a grammaro in a comment.

svn path=/trunk/; revision=5838
2002-07-07 21:52:51 +00:00
Gerald Combs 0255b96a8f From a suggestion by PEN <codes [at] lycos.com>, add the length in bytes to
the status bar when a tree item is selected.

svn path=/trunk/; revision=5825
2002-07-06 16:47:17 +00:00
Guy Harris e65f81cc5c Trim leading and trailing white space from the capture device in the
preference setting, and, if it's empty, treat that as an indication that
the user doesn't want to wire in a default device, and just wants the
first device in the list chosen.

svn path=/trunk/; revision=5773
2002-06-28 01:59:46 +00:00
Guy Harris c2df675f3f From Anand V. Narwani: add in two missing files, so they're put into the
source tarball.

Update Gerald's e-mail address.

svn path=/trunk/; revision=5769
2002-06-27 19:08:43 +00:00
Guy Harris e46414058e Update the URL for WinPcap.
svn path=/trunk/; revision=5759
2002-06-24 20:56:15 +00:00
Guy Harris 15509f46f4 As we've done with the hex dump output for printing, use as many digits
to display the offset as are necessary to show the largest offset -
which could be bigger than 65535, so there may be more than 4 digits.

svn path=/trunk/; revision=5751
2002-06-24 00:08:28 +00:00
Guy Harris 25a058a7b1 From Devin Heitmueller: give the user a warning if they click "New" in
the filter list editing code without having specified a filter name and
string.

svn path=/trunk/; revision=5737
2002-06-22 20:00:26 +00:00
Jeff Foster d2f365249b Added MS Window printing to ethereal.
svn path=/trunk/; revision=5711
2002-06-19 20:44:05 +00:00
Guy Harris 3baa49d71d Handle the "bool" members the same way we handled the members for
enumerated values - "boolp" for pointers, "boolval" for values.

svn path=/trunk/; revision=5678
2002-06-16 00:58:38 +00:00
Guy Harris 3a407d9567 From Chris Waters: don't use "bool" as a variable name or structure
member, as it's a C++ keyword.

svn path=/trunk/; revision=5677
2002-06-16 00:53:20 +00:00
Guy Harris f103a8a076 From Graeme Hewson: varargs code cleanup in "simple_dialog.c".
svn path=/trunk/; revision=5617
2002-06-04 11:24:35 +00:00
Guy Harris 117f95bb39 Clean up white space.
svn path=/trunk/; revision=5615
2002-06-04 07:48:57 +00:00
Guy Harris 392a7dfc04 Get rid of the "data_src" member of the "frame_data" structure; put it
in the "packet_info" structure instead, as we don't need a pointer for
every single frame in the capture file, just for each frame for which we
currently have an open "epan_dissect_t".

svn path=/trunk/; revision=5614
2002-06-04 07:03:57 +00:00
Guy Harris b5f0786318 Don't assume that just because a purported font name begins with "-"
it's an XLFD font name.

svn path=/trunk/; revision=5596
2002-05-30 00:44:50 +00:00
Guy Harris 7d85ca00df Clean up the data structures for the color filter code a bit. The old
"colfilter" structure contained items of use only when the colorizing
dialog was up, so make the items in it private to "gtk/color_dlg.c".
Make the "Edit" and "Delete" buttons sensitive only when a row is
selected, and make the "Up" and "Down" buttons sensitive only when a row
is selected *and* that row has somewhere to move in the specified
direction.

svn path=/trunk/; revision=5575
2002-05-27 22:00:37 +00:00
Guy Harris ad6e52bd25 Get rid of an unused variable.
svn path=/trunk/; revision=5540
2002-05-24 07:05:44 +00:00
Gerald Combs ae64e9539c Save the whole capture device name in the preferences file. Under
Windows, this saves the description + device name.

svn path=/trunk/; revision=5534
2002-05-23 15:56:05 +00:00
Guy Harris e2630eed79 Command-line interface cleanups, from Graeme Hewson:
- Exit if an error is found in the options or arguments.

	- In print_usage(), improve the visibility of any getopt() error
	  message by suppressing the version information when -h is not
	  specified, and by adding an empty line.

	Ethereal:

	- If the -k option is specified, use the interface in the preferences
	  file, if present.

	- Prevent the user from specifying any hidden options which are used
	  internally in -S mode.

	Tethereal:

	- Fix a memory leak in the processing of the -f option.

	- In print_usage(), change "capture file type" to "output file type",
	  which I think is clearer; move the -q flag from the non-libpcap case
	  to the libpcap case.

svn path=/trunk/; revision=5525
2002-05-22 23:22:56 +00:00
Gerald Combs 0bc4c2d329 In the Windows capture dialog, place the interface description before the
interface name.

svn path=/trunk/; revision=5499
2002-05-18 02:41:46 +00:00