Commit Graph

198 Commits

Author SHA1 Message Date
Jeff Morriss fc47a70c65 Change includes for getenv_utf8()
svn path=/trunk/; revision=35150
2010-12-07 21:20:39 +00:00
Guy Harris ba5564f32e Squelch some compiler warnings, clean up indentation, clean up a
comment.

svn path=/trunk/; revision=32076
2010-03-02 00:06:20 +00:00
Bill Meier bbe2945345 Fix a small memory leak
svn path=/trunk/; revision=28612
2009-06-02 20:16:23 +00:00
Bill Meier 3c4d1f5930 Use consistent indentation.
svn path=/trunk/; revision=28520
2009-05-29 13:42:51 +00:00
Gerald Combs 9c9db36825 size_t fixes.
svn path=/trunk/; revision=28059
2009-04-15 21:35:51 +00:00
Anders Broman caa4281da4 gtk_widget_ref() -> g_object_ref()
GTK_SIGNAL_FUNC -> G_CALLBACK()

svn path=/trunk/; revision=28017
2009-04-09 05:51:56 +00:00
Stig Bjørlykke 62f60df6b4 From Jakub Zawadzki (bug 3331):
g_free() is NULL safe, so we don't need check against it.

svn path=/trunk/; revision=27718
2009-03-13 22:06:48 +00:00
Stephen Fisher bbf7ec011a Remove all GTK+ < 2.4 code and minimum version checks.
svn path=/trunk/; revision=25182
2008-04-27 07:01:58 +00:00
Guy Harris 7c60e055c7 Add GTK_SIGNAL_FUNC() casts for GTK+ 2.[0-2] code.
svn path=/trunk/; revision=25128
2008-04-20 23:42:21 +00:00
Ulf Lamping 8e3e8b588f sort #includes by directories
svn path=/trunk/; revision=24968
2008-04-13 01:54:20 +00:00
Ulf Lamping d4ccf577a8 where it's not necessary, remove #include "compat_macros.h"
svn path=/trunk/; revision=24922
2008-04-12 01:02:59 +00:00
Ulf Lamping 736cada149 third round to replace SIGNAL_CONNECT with g_signal_connect
svn path=/trunk/; revision=24914
2008-04-11 22:10:36 +00:00
Ulf Lamping f9f87904c4 second round to replace SIGNAL_CONNECT with g_signal_connect
This requires some casts to be added and I just don't want to add casts at all possible places. So I compile and only add casts where the (MSVC) compiler has a hard time. 

Unfortunately this won't find any problems in Linux/Unix only code - I'll keep an eye on the buildbot and try to fix things as I'm going on ...

svn path=/trunk/; revision=24913
2008-04-11 21:39:16 +00:00
Bill Meier 74e1c12021 OBJECT_..._DATA --> g_object_..._data
svn path=/trunk/; revision=24895
2008-04-11 16:44:31 +00:00
Ulf Lamping 0a381cca29 try to fix #if !GTK_CHECK_VERSION
svn path=/trunk/; revision=24825
2008-04-07 01:14:00 +00:00
Ulf Lamping cf431ac2ee replace confusing #if checking for GTK2.4.0 (the GTK version when gtk_file_chooser was "invented") by #if GTK_CHECK_VERSION(2,4,0)
svn path=/trunk/; revision=24817
2008-04-06 23:34:05 +00:00
Ulf Lamping 0e701b77ae remove GTK1 code
svn path=/trunk/; revision=24816
2008-04-06 23:20:23 +00:00
Guy Harris 50bb064108 Get rid of some #if-ed out includes, which aren't needed.
svn path=/trunk/; revision=21031
2007-03-14 19:29:42 +00:00
Stephen Fisher d3b873b60d Sync up my changes so far to the content list (now called object
list) feature for http traffic.  It's now available under File->
Export->Objects->HTTP.  More changes to come..


svn path=/trunk/; revision=20951
2007-02-28 23:20:40 +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
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
Guy Harris 7698ee3eae Include <errno.h> to get errnos.
svn path=/trunk/; revision=18040
2006-04-30 06:54:25 +00:00
Guy Harris 8cc7c815d8 See whether <stdio.h> will get EISDIR defined.
svn path=/trunk/; revision=18039
2006-04-30 03:22:39 +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
Guy Harris 83d6dc10e1 For the "there's already a file with that name" dialog, use a wording
more like the one used by gedit.  (Note that the file in question might
not be a capture file, although it probably is.)

svn path=/trunk/; revision=17355
2006-02-19 23:51:39 +00:00
Gerald Combs e8860e5a95 Freeze and thaw the packet list after a merge so that the packet list shows
the correct information.

svn path=/trunk/; revision=17320
2006-02-16 15:53:48 +00:00
Guy Harris a189adb2fb Have those functions that end up just calling a win32_ routine if we're
using GTK+ 2.x on Windows just have the call, nothing else (no extra
variables).

svn path=/trunk/; revision=17308
2006-02-15 11:01:57 +00:00
Gerald Combs 80e5e0fb15 Copy over the file open/save code from the Win32 native branch.
The Windows-native routines were integrated by inserting

#if GTK_MAJOR_VERSION >= 2 && _WIN32
  win32_native_routine(GDK_WINDOW_HWND(top_level->window));
  return;
#endif

at the beginning of each GTK+ file routine.  There's probably a prettier
way to do this.

Some of the sizes need to be tweaked in win32-file-dlg.rc, but everything
seems to work.

Fix up whitespace.

svn path=/trunk/; revision=17285
2006-02-13 21:25:43 +00:00
Guy Harris ca970e3757 In "Save As", support only file types we can write to; that simplifies
the logic, making it easier to get it right (fewer interactions between
components of the dialog - the file type doesn't affect whether we can
save some but not all packets).  It also means we don't offer a file
type for saving, only to take it away if you choose anything other than
saving all packets.

If the capture file is a temporary file from a capture done in the
current Ethereal session, it's libpcap format, which we can write to, so
you would be able to save it.

If it's a saved file we read in, saving the file in its entirety in its
own format is just copying the file, and it's not clear supporting that
adds enough useful functionality to justify the extra complication.

Fix "range_update_dynamics()" to update all the rows of the range
button/count table properly (make the button active iff there's
a non-zero count in the currently-selected column, make a count active
iff the column is selected), to select the "Captured" column if the
count of displayed packets goes to zero, and to select the "Save all
packets" row if the count of packets in the currently-selected row and
column goes to zero.  (XXX - we should perhaps do that with the
"user-defined range" counts as well, which would involve updating the
counts on every change to the range field.)

svn path=/trunk/; revision=17251
2006-02-11 11:21:38 +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
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 fe17843002 bugfix: don't crash the file open dialog, if the preview gets confused by "invalid" timestamps.
The localtime call will return NULL on invalid input which results in a NULL pointer exception. Simply print '?' if localtime returned NULL.

svn path=/trunk/; revision=16317
2005-10-26 08:32:21 +00:00
Ulf Lamping e34467a28c disable gzip output compression for now, as it won't work in some cases (see source commment for details)
svn path=/trunk/; revision=15981
2005-09-23 18:50:07 +00:00
Ulf Lamping 84cf7ce767 added compression support for capture file output. The Save/As dialog now has a checkbox "Compress with gzip"
currently limited to Ethereal and all the variants of libpcap filetypes only.

We might want to add output compression support to the other tools as well (tethereal, mergecap, ...).

We might also want to add support for the other filetypes, but this is only possible if the filetype functions doesn't use special output operations like fseek.

One bug is still left: if the input and output filetypes while saving are the same, Ethereal currently optimizes this by simply copy the binary file instead of using wiretap (so it will be faster but it will ignore the compress setting). 

Don't know a good workaround for this, as I don't know a way to find out if the input file is currently compressed or not. One idea might be to use a heuristic on the filesize (compared to the packet size summmary). Another workaround I see is to remove this optimization, which is of course not the way I like to do it ...

svn path=/trunk/; revision=15804
2005-09-14 21:57:30 +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
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 38ec1644e6 Add APIs to Wiretap to return the file of the size as supplied by the OS
(so if the file's gzipped, it's *NOT* the size of the file after
uncompressing), and an approximation of the amount of that data read
sequentially so far.

Use those for various progress bars and the like.

Make the fstat() in the Ascend trace reader directly use wth->fd, as
it's inside Wiretap; that gets rid of the last caller of wtap_fd() (as
we're no longer directly using fstat() or lseek() in Ethereal), so get
rid of wtap_fd().

svn path=/trunk/; revision=15437
2005-08-19 19:40:00 +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
Jörg Mayer e9ea42eed9 Fix more "no previous declaration" warnings
svn path=/trunk/; revision=15173
2005-08-02 04:47:15 +00:00
Ulf Lamping 9b5d52aab6 ask for unsaved file when using the new start capture feature,
ask for unsaved file when really starting the capture, not already when showing the options dialog,
use the start capture icon in the capture options dialog (instead of simply Ok)

svn path=/trunk/; revision=14142
2005-04-19 21:02:01 +00:00
Ulf Lamping fcb74124f8 Save As: ask user if he wants to overwrite an already existing file
svn path=/trunk/; revision=14058
2005-04-12 21:24:30 +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 9105b04e4b Have "cf_merge_files()" take a pointer-to-pointer-to-char as the output
file name argument; if the pointed-to pointer is null, it opens a
temporary file, and sets that pointer to a mallocated copy of the
pathname of the temporary file.  It no longer needs a file descriptor as
an argument.

svn path=/trunk/; revision=13419
2005-02-17 03:05:54 +00:00
Guy Harris ea7ef54b0d Have "cf_merge_files()" always close "out_fd" before returning; it does
so if "wtap_dump_fdopen()" succeeds (as a side-effect of calling
"wtap_dump_close()"), even if "cf_merge_fails()" after that, so it
should do so if it fails.

That means we don't need to close it in the callers of "cf_merge_files()".

svn path=/trunk/; revision=13407
2005-02-15 20:01:24 +00:00
Ulf Lamping 9d18adec33 minor enhancements to Guy's last update
svn path=/trunk/; revision=13304
2005-02-05 13:44:27 +00:00
Guy Harris fa3e5609ab Put "cf_status_t" back.
svn path=/trunk/; revision=13303
2005-02-05 12:50:47 +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
Guy Harris f72cba5413 We use the range utilities regardless of whether we're built with
libpcap or not.

svn path=/trunk/; revision=13182
2005-01-27 11:23:06 +00:00