Commit Graph

261 Commits

Author SHA1 Message Date
Jörg Mayer 54e0e363a9 Get rid of warnings about shadowed variables (code was ok)
svn path=/trunk/; revision=12171
2004-10-01 12:31:52 +00:00
Guy Harris 7f5b234c5c Move the column preferences stuff to epan (the rest of the preferences
stuff is already there).

Update Gerald's e-mail address in column.h.

svn path=/trunk/; revision=12131
2004-09-29 02:54:22 +00:00
Guy Harris 6472876ab3 Move the tap infrastructure to the epan directory.
svn path=/trunk/; revision=12128
2004-09-29 00:06:36 +00:00
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 8e90f07c71 Hoist the code for handling "-G" into a common module.
svn path=/trunk/; revision=11956
2004-09-10 22:47:02 +00:00
Gilbert Ramirez f676f7107b Add a "-G fields2" option which is like "-G fields", but extends the field
records by tw fields: base (for integers), and blurb

Add a "-G values" option which shows value strings and true_false strings for
the fields that have them.

svn path=/trunk/; revision=11954
2004-09-10 15:21:20 +00:00
Guy Harris 10d4e3873a When opening an output file, use "file_snaplen" as the snapshot length,
rather than "pcap_snapshot(ld.pch)" - we've set "file_snaplen" to
"pcap_snapshot(ld.pch)" if we're capturing from a device, but if we're
reading from a pipe, "ld.pch" is null (so we'll crash if we use it), and
we've set "file_snaplen" from the header we've read from a pipe.

svn path=/trunk/; revision=11734
2004-08-13 08:27:58 +00:00
Guy Harris 3a583aeb59 From Albert Chin: rename resolv.{ch} to addr_resolv.{ch}, so that an
include of <resolv.h> in any system header file gets the system
<resolv.h> (needed for builds on Tru64 with GTK+ 1.2[.x]).

svn path=/trunk/; revision=11615
2004-08-06 19:57:49 +00:00
Gilbert Ramirez e8c27ad10c Mention psml as a valid option to -T in the usage statements.
svn path=/trunk/; revision=11607
2004-08-06 03:36:28 +00:00
Guy Harris 07658bc75c Disallow "-f" when not doing a live capture, rather than just ignoring
the specified filter.

Note in the manual that you can't use capture filters when reading a
capture file, and that read filters might require too much CPU when
doing a live capture.

svn path=/trunk/; revision=11594
2004-08-03 02:52:48 +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 a6b4a098ff "-T ps" should not imply "-V"; one should be able to get a list of
packet summaries in PostScript.

svn path=/trunk/; revision=11512
2004-07-25 08:32:32 +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
Gerald Combs 8106dc0862 Convert make-version.pl and the associated cvsversion.h and CVSVERSION
definition to Subversion.  "svn info" prints out the last changed date
of the repository, so we don't have to go hunting through "CVS/Entries"
files anymore.


svn path=/trunk/; revision=11379
2004-07-15 21:09:33 +00:00
Guy Harris 49283faa17 Don't complain about "-T pdml" or "-T psml" being combined with "-x"
only if "-x" was specified.

svn path=/trunk/; revision=11349
2004-07-09 09:21:07 +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 155117bd61 Fix the error for a WTAP_ERR_UNSUPPORTED_ENCAP read error to more
accurately reflect the problem (it's not that the entire file has a
network type we don't handle - if it did, we'd have failed when we tried
to open it - it's that the packet we tried to read does).

svn path=/trunk/; revision=11341
2004-07-08 07:47:29 +00:00
Guy Harris f9be24cd13 On Windows, if "get_interface_list()" returns CANT_GET_INTERFACE_LIST
and the error message includes "Not enough storage is available
to process this command" or "The operation completed successfully",
suggest that the user install a WinPcap version later than 3.0 - this is
definitely a Frequently Asked Question on the Ethereal list.

svn path=/trunk/; revision=11143
2004-06-12 07:47:14 +00:00
Guy Harris d16eb303f5 Move the ring-buffer tests from "process_packet()" to
"capture_pcap_cb()"; they're only done in live captures, and that
arranges that "process_packet()" gets called with the correct
wtap_dumper for the current file even if we switch to a new file.

Move the packet-count reporting out of "write_packet()" to
"capture_pcap_cb()" as well, as that's also only done in live captures.
That pretty much guts "write_packet()", so just move what's left up to
"process_packet()".

svn path=/trunk/; revision=11131
2004-06-10 08:01:51 +00:00
Guy Harris c8c2bab1b9 Add a routine that indicates where there are any tap listeners
registered (not whether there are any tap *filters* registered).

Do dissection in Tethereal iff:

	we're printing information about each packet;

	we're using a read filter on the packets;

	there are any tap listeners registered (even if there are no tap
	filters registered - not all taps use filters).

svn path=/trunk/; revision=11040
2004-05-31 09:53:21 +00:00
Guy Harris 0d1fb8c108 Make "-q" suppress packet printing when you're reading a capture file
and not writing to another capture file, for use with "-z" options.

Note that "-z proto" *doesn't* print statistics at the end - it modifies
the packet summary output.

Note that on at least some BSDs the "status" character is set to "off"
by default, so you have to set it explicitly in order to be able to ^T
an application such as Tethereal.

svn path=/trunk/; revision=11038
2004-05-31 08:41:32 +00:00
Guy Harris 8a429808e7 Move the packet counting, dissecting, and filtering out of the "write
packet" and "print packet" callbacks into a common routine, so that we
don't count packets twice if we're counting and dissecting.

Print the packet count with ^T iff we're not updating a displayed packet
count as packets arrive, regardless of whether we're printing packet
information, saving packets to a file, or both (tcpdump prints it
regardless of whether it's printing packet information or saving packets
to a file).

svn path=/trunk/; revision=11037
2004-05-31 07:52:27 +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 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 d209115ba3 Add a "report_failure()" routine to allow dissectors to report arbitrary
errors to the user.  Use that, rather than "g_warning()", in the
Diameter dissector to report errors reading the dictionary.

Make the format argument to "simple_dialog()" a "const" pointer.

Fix up the read-error message in Tethereal to end with a newline.

If a simple dialog is requested before the main window or the
capture-control window is popped up, queue it up and pop the queued
messages up once the main or capture-control window is displayed.

svn path=/trunk/; revision=10616
2004-04-16 23:17:13 +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 121f06fab7 Make "epan_init()" take, as additional arguments, pointers to routines
that dissectors should call to report file open and read errors, and
have "report_open_failure()" and "report_read_failure()" call through
those pointers, rather than being defined and exported by the
application using libethereal - instead, the application would define
those functions and pass pointers to them to 'epan_init()".

Move "report_err.h" to the epan directory, as the functions it declares
are now part of the libethereal API.

svn path=/trunk/; revision=10470
2004-03-23 21:19:58 +00:00
Olivier Biot 11f9232336 From Lars Roland: Move timestamp_type into libethereal and provide accessor
methods for getting and setting the timestamp type.

This is a move towards a real libethereal shared library.

svn path=/trunk/; revision=10402
2004-03-18 19:04:33 +00:00
Gerald Combs fc60101a9f Move cvsversion.h from BUILT_INCLUDES to BUILT_SOURCES. This tells automake
to create cvsversion.h before any "all" or "check" targets are built.

Clean up a few CVS version strings that I missed last week.

svn path=/trunk/; revision=10199
2004-02-23 16:12:52 +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
Gerald Combs 058dbba4b9 Add support for a "version.conf" file in the main directory which can
be used to adjust version preferences.  It understands two configuration
directives: "enable", which can be 0 or 1, and "format", which can be any
strftime()-compatible string, e.g. "V12-powered on %A %Y-%m-%d %H:%M:%S".

If no configuration file is present, the configuration defaults to

enable: 1
format: CVS %Y%m%d%H%M%S

svn path=/trunk/; revision=10139
2004-02-20 20:36:14 +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
Guy Harris d6cd61061e Have the Wiretap open, read, and seek-and-read routines return, in
addition to an error code, an error info string, for
WTAP_ERR_UNSUPPORTED, WTAP_ERR_UNSUPPORTED_ENCAP, and
WTAP_ERR_BAD_RECORD errors.  Replace the error messages logged with
"g_message()" for those errors with g_strdup()ed or g_strdup_printf()ed
strings returned as the error info string, and change the callers of
those routines to, for those errors, put the info string into the
printed message or alert box for the error.

Add messages for cases where those errors were returned without printing
an additional message.

Nobody uses the error code from "cf_read()" - "cf_read()" puts up the
alert box itself for failures; get rid of the error code, so it just
returns a success/failure indication.

Rename "file_read_error_message()" to "cf_read_error_message()", as it
handles read errors from Wiretap, and have it take an error info string
as an argument.  (That handles a lot of the work of putting the info
string into the error message.)

Make some variables in "ascend-grammar.y" static.

Check the return value of "erf_read_header()" in "erf_seek_read()".

Get rid of an unused #define in "i4btrace.c".

svn path=/trunk/; revision=9852
2004-01-25 21:55:17 +00:00
Guy Harris 6efa00c5f4 Add another check for output errors when printing.
svn path=/trunk/; revision=9829
2004-01-25 01:19:48 +00:00
Guy Harris 7502ac216a There's no need to keep a "FILE *" for the file being printed to in a
"capture_file" structure.  Keep it locally, instead.

Check for errors when printing packets.

Report failure to open a print destination and failure to write to a
print destination differently.

Don't have the "print preamble" and "print final" routines return
success/failure indications - revert to the old scheme where they
didn't, and have the callers use "ferror()" to check for errors.

Report write errors when printing dissections in Tethereal.

Report print errors as errors, not warnings.

svn path=/trunk/; revision=9828
2004-01-25 00:58:13 +00:00
Guy Harris 46848f0a9e Add a new "file_open_error_message()" routine in "epan/filesystem.c", to
translate UNIX errno values to a somewhat friendly message format
string.

Rename "file_open_error_message()" in "file.c" to
"cf_open_error_message()", make "cf_open_error_message()" use the new
"file_open_error_message()" for UNIX errno values, have "do_capture()"
in "capture.c" use "file_open_error_message()" to report errors from
"open()", and make "cf_open_error_message()" static as nothing outside
"file.c" uses it.

Do similar stuff in "tethereal.c".

svn path=/trunk/; revision=9821
2004-01-24 01:44:29 +00:00
Jörg Mayer da5f6f9472 The current year is 2004
svn path=/trunk/; revision=9731
2004-01-19 18:21:18 +00:00
Ulf Lamping 0353c5823f move timestamp format options from "View->Options" dialog into
menuitems under "View->Time Display Format".
renamed timestamp enum items e.g. from ABSOLUTE to TS_ABSOLUTE,
to prevent conflicting definitions with MSVC

svn path=/trunk/; revision=9729
2004-01-19 03:46:43 +00:00
Guy Harris 6033a79387 Update the Win32 information given when we fail to open a capture device
to note that the 3.0 and later versions of WinPcap don't support PPP/WAN
captures even on Windows OT.

svn path=/trunk/; revision=9709
2004-01-18 04:13:44 +00:00
Jörg Mayer 82cf1b015d Output the result of -h to stdout, not stderr
svn path=/trunk/; revision=9702
2004-01-18 02:12:59 +00:00
Olivier Biot 8db6fb47cd Nice rendering of the CVS version as "(cvs 200401181200003000)".
The make-version.pl script only defines CVSVERSION if this was a build
from CVS.

svn path=/trunk/; revision=9701
2004-01-18 01:41:14 +00:00
Jörg Mayer 0ac74ed036 In case of CVS sources, add the date of the last change to the version
number.

2do: Add support to Makefile.nmake
     Enforce the generation of cvsversion.h on each run of make

svn path=/trunk/; revision=9679
2004-01-16 20:04:21 +00:00
Guy Harris b97626862e Rename DISSECTOR_HELPER_{SRC,OBJECTS} to
DISSECTOR_SUPPORT_{SRC,OBJECTS}.

Add some additional files, required by dissectors, to those lists.

Extract the stuff to get version information strings for libraries and
the OS, which is *not* needed by dissectors, from "util.c", which
contains routines that *are* needed by dissectors, and put it into a
separate file.

Make "dftest" link only with the dissector support stuff, not with all
of the Ethereal common files.

svn path=/trunk/; revision=9645
2004-01-11 22:17:43 +00:00
Guy Harris 84dcd53b03 We don't need to keep the progress bar quantum or next step in the
capture_file structure - just make it local to the routine scanning
through the packets.

svn path=/trunk/; revision=9616
2004-01-09 21:38:21 +00:00
Ulf Lamping ba776f0e0f use the same packet range things for "Print" dialog, as already implemented
in the "Save As" dialog and some other minor changes

svn path=/trunk/; revision=9612
2004-01-09 19:02:18 +00:00
Ulf Lamping 0d9679de8d removed some MSVC warnings (level 3)
svn path=/trunk/; revision=9561
2004-01-05 19:31:44 +00:00
Richard Sharpe fa9874ef73 Apply the patches from Tadaaki Nagao for a global version of disabled
protocols ...

svn path=/trunk/; revision=9538
2004-01-03 18:40:08 +00:00
Guy Harris 7725f5e92d "pcap_compile_nopcap()" has a different signature in recent NetBSD
libpcap than in tcpdump.org libpcap; it's been deprecated for that
reason.  "pcap_open_dead()" has been in libpcap since 0.6, so only for
0.5[.x] will you have "pcap_compile_nopcap()" but not "pcap_open_dead()"
- for now, we use "pcap_open_dead()" rather than
"pcap_compile_nopcap()", and don't do the check for capture filters in
systems with libpcaps that lack "pcap_open_dead()".

svn path=/trunk/; revision=9341
2003-12-18 02:46:45 +00:00