Commit Graph

403 Commits

Author SHA1 Message Date
Guy Harris bbe7f89742 Move prefs.c and prefs.h into the epan subdirectory.
svn path=/trunk/; revision=12115
2004-09-27 22:55:15 +00:00
Guy Harris f23f4ecf04 Use _WIN32 rather than WIN32 to determine if we're compiling on Win32;
according to Gisle Vanem, WIN32 isn't a built-in in MSVC, but _WIN32 is.

svn path=/trunk/; revision=11972
2004-09-11 23:03:36 +00:00
Guy Harris f06c1b5fb0 The packet range stuff knows about capture_file structures, so it's
really more of an Ethereal/Tethereal component than a libethereal
component (nothing else in libethereal knows about capture files); move
it back out of libethereal.  (The range stuff doesn't; we leave it in
libethereal.)

svn path=/trunk/; revision=11898
2004-09-04 20:02:11 +00:00
Guy Harris 478ba9a691 Rename "range.c" and "range.h" to "packet-range.c" and "packet-range.h";
they should ultimately be split into files with routines that handle
ranges, which are just subsets of [0,2^32), and packet ranges, which are
subsets of the packet list, possibly specified by a range.

Move them into epan, so they can be used by, for example, utilities that
handle ranges, such editcap.

svn path=/trunk/; revision=11890
2004-09-04 00:53:16 +00:00
Gerald Combs 16c708571a Move the guts of gtk/file_dlg.c:goto_framenum_cb() to
file.c:goto_framenum(), where all of the other goto_ routines live.

svn path=/trunk/; revision=11887
2004-09-02 19:52:39 +00:00
Gerald Combs c8235fae25 Move the file-reloading code from gtk/file_dlg.c to file.c.
svn path=/trunk/; revision=11823
2004-08-25 03:01:32 +00:00
Gerald Combs 76fd761686 As suggested by Guy: Have mark_frame() do nothing if the frame has
already been marked and have unmark_frame() do likewise.  Don't mess
with the marked frame count in mark_all_frames().

Be a little more paranoid about the marked frame count in other places.

svn path=/trunk/; revision=11775
2004-08-19 14:35:55 +00:00
Gerald Combs e986e98f0a If you mark all frames, then unmark all frames "marked_count" overflows.
Keep this from happening.

svn path=/trunk/; revision=11771
2004-08-18 21:05:38 +00:00
Gerald Combs 70ee7740c5 From Greg Morris: Add a configuration option to control search wrapping.
svn path=/trunk/; revision=11744
2004-08-15 19:26:25 +00:00
Guy Harris 999867b710 Move the code to open the printer/print file from "print_packets()" to
"print_ok_cb()", and have "print_packets()" just work on a
"print_stream_t" handed to it, so that different platforms can open the
printer/print file in different ways (opening the file is probably not
going to be platform-dependent, but opening the printer will be).

svn path=/trunk/; revision=11544
2004-07-27 20:10:02 +00:00
Guy Harris 5a3ab160c1 Make some generic print routines that take, as an argument, a pointer to
a structure containing a pointer to print operations for that object and
a pointer to the private subclass-dependent data for that object, with
subclasses for text and PostScript, and use those rather than the old
scheme where a print format was passed as an argument - or where (as in
the case of printing summary information in Tethereal) we just printed
as text even if "-T ps" was selected.

Check whether those routines succeed or get an I/O error writing output.

Clean up indentation.

svn path=/trunk/; revision=11514
2004-07-25 08:53:38 +00:00
Guy Harris c3cba6617b Move the color-filter related stuff out of "color.h" into
"color_filters.h", as that's the appropriate place for it - "color.h"
should just deal with "color_t".

svn path=/trunk/; revision=11503
2004-07-24 02:29:14 +00:00
Gilbert Ramirez 669db206cb Move dissectors to epan/dissectors directory.
Also move ncp222.py, x11-fields, process-x11-fields.pl,
make-reg-dotc, and make-reg-dotc.py.

Adjust #include lines in files that include packet-*.h
files.

svn path=/trunk/; revision=11410
2004-07-18 18:06:47 +00:00
Guy Harris 8a8b883450 Set the svn:eol-style property on all text files to "native", so that
they have LF at the end of the line on UN*X and CR/LF on Windows;
hopefully this means that if a CR/LF version is checked in on Windows,
the CRs will be stripped so that they show up only when checked out on
Windows, not on UN*X.

svn path=/trunk/; revision=11400
2004-07-18 00:24:25 +00:00
Guy Harris d26e67c773 If we're producing PostScript, don't put the column headers out if we're
not putting the column data out.

Don't fill in the column information if we're not going to use it.

svn path=/trunk/; revision=11343
2004-07-08 11:07:29 +00:00
Guy Harris b650d01031 Make the "human-readable text vs. PSML vs. PDML" choice separate from
the "text vs.  PostScript" choice.  The "text vs. PostScript" choice
should probably ultimately be done with a generic set of print methods,
to handle various platform-native print mechanisms more cleanly (and
perhaps the dialog box code for "export as {PDML,PSML}" should be
separate from the "export as text"/"print" dialog).

svn path=/trunk/; revision=11342
2004-07-08 10:36:29 +00:00
Guy Harris 5f1b5daf6b A read can return WTAP_ERR_UNSUPPORTED_ENCAP if the encapsulation type
is per-packet and the packet has an encapsulation type we don't know
about, so handle it on reads as well as errors - show an error message
noting that we had a packet with a network type we don't know about, and
show the extra info returned for that error giving details.

It shouldn't return WTAP_ERR_UNSUPPORTED, however, so just give the
"wtap_strerror()" error for that case.

svn path=/trunk/; revision=11340
2004-07-08 07:45:46 +00:00
Guy Harris 272a2055ab On at least some platforms, a #define of O_BINARY is needed even if
<fcntl.h> is included, as <fcntl.h> doesn't define it.

svn path=/trunk/; revision=11276
2004-06-30 06:58:59 +00:00
Ulf Lamping a24b176c32 define of O_BINARY not needed, if fcntl.h is included
other #include related cleanups

svn path=/trunk/; revision=11272
2004-06-29 20:51:26 +00:00
Ulf Lamping 76af137169 added a small comment
svn path=/trunk/; revision=11023
2004-05-27 21:48:10 +00:00
Guy Harris 15af0f656f From Lars Roland: add support for building a libethereal.dll with MSVC:
add a config.nmake option to control whether to build
	libethereal.dll or not;

	remove "./wiretap" from PATH to prevent problems due to
	wrongly-loaded files;

	build dissector.lib with MSVC;

	move "print.c" and "ps.c" to the dissector helpers, as "print.c"
	imports variables from packet-frame.c and packet-data.c, which
	are in libethereal;

	move "g711.c" out of the dissector helpers, as they're used only
	by Ethereal in a tap, not in Tethereal or in any dissector;

	add a .def file for libethereal;

	arrange to declare global variables exported from libethereal
	with "__declspec(dllimport)" when building programs that import
	those variables;

	update the NSIS installer.

Make the "configure" script define ETH_VAR_IMPORT as "extern".

svn path=/trunk/; revision=10834
2004-05-09 10:03:41 +00:00
Ulf Lamping f02a0353ac bugfix: reset the tap listeners, when the capture file is closed
svn path=/trunk/; revision=10769
2004-05-02 15:04:14 +00:00
Olivier Biot ec6f31bced The display filter engine can return an error message that is not safe
when using GTK2 code for rendering the error. In order to correctly
render the error message, it must be XML escaped.

TODO: track down the remaining places where this XML escaping is
      required, and fix it there too (not sure if they exist though).

svn path=/trunk/; revision=10764
2004-05-01 22:55:22 +00:00
Ulf Lamping d9118dc089 add PROTO_ITEM_SET_HIDDEN() and PROTO_ITEM_SET_GENERATED(),
this sets flags for later rendering of the field data

svn path=/trunk/; revision=10752
2004-05-01 15:15:08 +00:00
Ulf Lamping 895375603d put all required data into the print_args,
instead of confusing seperation of data

svn path=/trunk/; revision=10692
2004-04-25 12:04:08 +00:00
Ulf Lamping 1531315c18 some code cleanup of the printing system
svn path=/trunk/; revision=10682
2004-04-24 23:13:46 +00:00
Ulf Lamping 51f987e04f added some options and enhancements to the print output:
-ps: added formatting hints for ghostscript, so pdf conversion will be much better
-ps: print a thin line at the top and bottom of each page
-ps/text: add an option to start a new page for every packet (formfeed)

svn path=/trunk/; revision=10660
2004-04-22 17:03:21 +00:00
Ulf Lamping 91e61df84e changed postscript output:
reduced print margin to 1/2 inch and font size to 8 point,
include filename in page header,
wrap too long lines

svn path=/trunk/; revision=10652
2004-04-20 22:34:08 +00:00
Guy Harris 6d2501b49f If we're printing summaries and packet detail or hex dump information,
print the header before each summary line, and print a blank line
separating the summary line and the remaining information.

svn path=/trunk/; revision=10614
2004-04-16 20:20:54 +00:00
Ulf Lamping 8c42aa51f7 make print dialog "Packet Format" options somewhat similar to the
Ethereal panes, thus better understandable

svn path=/trunk/; revision=10611
2004-04-16 18:17:48 +00:00
Guy Harris e5f2451735 Rename a bunch of variables and routines that pertain to string search
with "string" rather than "ascii", to make it clearer what they're
involved with.

Use "gtk_toggle_button_set_active()", not
"gtk_toggle_button_set_state()" (the latter is a deprecated alias for
the former, probably dating back to GTK+ 1.0[.x] - 1.2[.x] and later
have "gtk_toggle_button_set_active()").

Do *NOT* change the radio buttons for the type of string search to do
based on whether we're doing a string search or not - doing so means we
don't correctly remember the type of string search.

Get rid of code to fetch some values that we don't subsequently use.

svn path=/trunk/; revision=10609
2004-04-15 23:28:11 +00:00
Ulf Lamping 27ca219d2b two memory leaks removed
svn path=/trunk/; revision=10599
2004-04-14 05:46:34 +00:00
Michael Tüxen 254aba8282 From Jon Oberheide: Add interface name to the capture and ethereal window
while capturing.

svn path=/trunk/; revision=10594
2004-04-13 18:01:40 +00:00
Guy Harris 9feb374670 Don't refer to "auto_scroll_live" if HAVE_LIBPCAP isn't defined - and
put the definition of it back under HAVE_LIBPCAP and don't add an extra
declaration in "file.h", as there's no longer code that needs to refer
to it if HAVE_LIBPCAP isn't defined.

svn path=/trunk/; revision=10350
2004-03-08 23:45:25 +00:00
Jörg Mayer 452789c91f This makes ethereal compile again when configured --without-pcap
I don't know whether this is the optimal patch, but it does the job.

file.h: extern declaration of auto_scroll_live
file.c: always declare auto_scroll_live

svn path=/trunk/; revision=10347
2004-03-08 23:07:15 +00:00
Ulf Lamping 1cd1731da9 tweaked the simple_dialog texts, to reflect the current search behaviour
svn path=/trunk/; revision=10260
2004-02-28 22:04:28 +00:00
Guy Harris 6064ef84c2 Add a "force" argument to "filter_packets()" and
"main_filter_packets()", to force the filtering to be done even if the
filter is the same as the current one; this is necessary in order to
make sure "Follow TCP Stream" gets the packets processed even if you're
filtering the stream that's currently filtered in.

svn path=/trunk/; revision=10209
2004-02-23 22:48:52 +00:00
Guy Harris d84a87c5b3 Make the message a bit more detailed (modeled after the one from the
UNIX version of Acrobat Reader 4.0).

svn path=/trunk/; revision=10185
2004-02-22 22:33:59 +00:00
Guy Harris ca86d812b3 From Greg Morris: if a search reaches the end or beginning of the list,
pop up an alert box letting the user know, and asking whether they want
to continue the search.

svn path=/trunk/; revision=10184
2004-02-22 22:22:47 +00:00
Ulf Lamping ba50469654 rework of capture.c: better seperation of sync and capture pipe by using
explicit names and seperated functionality of do_capture(),
but no functional change!

svn path=/trunk/; revision=10168
2004-02-21 12:58:42 +00:00
Guy Harris 83634f54c7 Add routines that can be called from dissectors to report file open and
read errors; there are separate implementations for Ethereal (pops up an
alert box) and Tethereal (prints an error message).

Use those routines in the ASN.1 dissector.

svn path=/trunk/; revision=10152
2004-02-21 02:15:07 +00:00
Ulf Lamping 0a4e5cc16d fixed dialog box text and some comments
svn path=/trunk/; revision=10078
2004-02-17 17:48:44 +00:00
Guy Harris 75b5cbf585 Replace the "cf_XXX_error_message()" routines with
"cf_XXX_failure_alert_box()" routines that put the alert box up, and
directly call the "alert_box.h" routines for OS errors.

svn path=/trunk/; revision=10028
2004-02-11 02:02:38 +00:00
Guy Harris 3a4e71a724 Add "write_failure_alert_box()" to put up an alert box for a failed
attempt to write to a file (or close a file opened for writing).

Get rid of no-longer-needed #includes of <epan/filesystem.h>.

svn path=/trunk/; revision=10027
2004-02-11 01:37:13 +00:00
Guy Harris 727b913bbd Add an "open_failure_alert_box()" routine to pop up an alert box for a
failed attempt to open/create a file.

Fix one call to pass the right value for the "for_writing" flag.

svn path=/trunk/; revision=10026
2004-02-11 01:23:25 +00:00
Guy Harris c7fd1b2b13 Add a routine to be used to put up alert boxes for invalid display
filter expressions; use that in a number of places, so we use the same
alert box.  (More work is needed to figure out the right way to handle
some other "dfilter_compile()" failures.)

Use the error message from the display filter as the primary error, as
that's the message that tells you what the underlying problem is.  (The
GNOME HIG says "In most situations the user should only need the primary
text to make a quick decision", so the primary text should tell you
what's wrong with the filter, not just that it's invalid.  If there are
messages from the display filter code that don't give enough
information, or are a bit cryptic, such as "Unexpected end of filter
string," those should be fixed in the display filter code.)

Improve the error used if an empty filter is used for "find frame".

svn path=/trunk/; revision=10025
2004-02-11 00:55:28 +00:00
Ulf Lamping 1d2c791ab6 enhanced some dialog messages,
close capture file when user told so

svn path=/trunk/; revision=9965
2004-02-03 17:59:01 +00:00
Guy Harris e8a196911c Use "%ld", not "%u", to print "long" values.
svn path=/trunk/; revision=9962
2004-02-03 00:30:50 +00:00
Ulf Lamping 3f2f2929eb added some more info to the statusbar (filesize, packet count, ..),
fixed a minor bug in the cfile handling (file length in summary dialog)

svn path=/trunk/; revision=9961
2004-02-03 00:16:59 +00:00
Guy Harris f914e6e9e7 Fix the spelling of "cumulative" (and variables whose names derive from
that spelling).

svn path=/trunk/; revision=9917
2004-01-31 04:10:05 +00:00