Commit Graph

19 Commits

Author SHA1 Message Date
Balint Reczey 311f9acfd5 Fix wiretap headers to allow error-free ABI dumping.
svn path=/trunk/; revision=37543
2011-06-04 21:20:57 +00:00
Guy Harris 207a75388a Have parse_ascend() return:
PARSED_RECORD if we got a packet;

    PARSED_NONRECORD if the parser succeeded but didn't see a packet;

    PARSE_FAILED if the parser failed.

Treat anything other than PARSED_RECORD as a failure, for now; I'm not
sure why we were treating "parser succeeded but didn't see a packet" as
success, as that was causing us to recognize some non-Ascend-output text
files as Ascend files and to return "records" with bogus caplen and len
values.

svn path=/trunk/; revision=32009
2010-02-25 20:45:59 +00:00
Ulf Lamping 77ec324774 set compiler option "treat warnings as errors" - to prevent new warnings for wiretap
remove all compiler warnings:
a) prevent wrong malloc/free definitions by lex/yacc generated files
b) add int/time_t casts - MSVC2005 is more "sensitive" about this than MSVC6

svn path=/trunk/; revision=21078
2007-03-21 01:32:50 +00:00
Ulf Lamping 59d6c8ea33 change all file offsets from long to gint64 so we can - theoretically - handle files > 2GB correct.
Please distclean Win32 builds!

svn path=/trunk/; revision=19814
2006-11-05 22:46:44 +00:00
Ronnie Sahlberg 89f022b12b name change
svn path=/trunk/; revision=18197
2006-05-21 05:12:17 +00:00
Jörg Mayer e1c6d9ac3d Fix some warnings (and one of my previous 'fixes')
svn path=/trunk/; revision=14997
2005-07-22 17:57:40 +00:00
Gerald Combs 9e93bf4747 From Josh Bailey:
Attached is an update to Lucent/Ascend trace parsing: fix a few bugs,
add support for ISDN and Ethernet captures - diffs to 0.10.9.


svn path=/trunk/; revision=13311
2005-02-05 17:39:12 +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 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 0b82bd5123 Packet data is an array of "guint8"s, not an array of "char"s; declare
variables appropriately.

Put in a cast to squelch MSVC++ warnings.

svn path=/trunk/; revision=9575
2004-01-06 20:05:39 +00:00
Jörg Mayer 64b6acac6d 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=6115
2002-08-28 20:30:45 +00:00
Guy Harris 31519a0ff0 From Motonori Shindo: get rid of "send output to /dev/null" hack in
Ascend/Lucent trace reading code's Flex scanner.

svn path=/trunk/; revision=4346
2001-12-06 08:25:52 +00:00
Guy Harris 81566ec823 In "wdd" captures:
fix the interpretation of the date and time reported in capture
	files;

	use that date and time only to set the start date and time of
	the capture, not to generate the time stamp for every packet.

Make the "struct tm" used for that local to the code to handle that
production in the grammar, rather than global.

For all captures, we *can* now fstat a compressed file (and have been
able to do so for a while, in fact), so revert to doing so and using the
ctime of the capture file if we can't get a date and time from the
file's contents.

svn path=/trunk/; revision=2605
2000-11-11 03:15:07 +00:00
Guy Harris 0cc75a3569 In Wiretap, a file stream handle is a "FILE_T", not a "FILE_T *" (a
"FILE_T" is either a "gzFile" or a "FILE *", depending on whether zlib
support is enabled or not).  Fix various function declarations and
definitions.

svn path=/trunk/; revision=1984
2000-05-19 08:18:17 +00:00
Guy Harris f3d90d30a4 Remove the "union pseudo_header" from the "frame_data" structure;
there's no need to keep it around in memory - when the frame data is
read in when handing a frame, read in the information, if any, necessary
to reconstruct the frame header, and reconstruct it.  This saves some
memory.

This requires that the seek-and-read function be implemented inside
Wiretap, and that the Wiretap handle remain open even after we've
finished reading the file sequentially.

This also points out that we can't really do X.25-over-Ethernet
correctly, as we don't know where the direction (DTE->DCE or DCE->DTE)
flag is stored; it's not clear how the Ethernet type 0x0805 for X.25
Layer 3 is supposed to be handled in any case.  We eliminate
X.25-over-Ethernet support (until we find out what we're supposed to
do).

svn path=/trunk/; revision=1975
2000-05-18 09:09:50 +00:00
Guy Harris 72fa4b5d3a Don't define "pseudo_header" in "ascend-scanner.l", as that may cause
warnings about multiple declaration of "pseudo_header" as a common.
Instead, define it only in "ascend-grammar.y", and declare it in
"ascend-int.h" as an "extern".

svn path=/trunk/; revision=1103
1999-11-24 19:29:45 +00:00
Guy Harris 5779d0b754 The #defines to turn "yy{lex,error}" into names specific to the
parser/lexical analyzer in question are needed only in the ".c" files
for the generated parser and lexical analyzer, and Flex and Byacc/Bison
put them there; don't bother putting them in a header file, just
directly declare the functions with the right names.

svn path=/trunk/; revision=801
1999-10-10 18:16:43 +00:00
Guy Harris 05af0607de Move some definitions of stuff not used outside the Lucent/Ascend
capture file reading code from "ascend.h" to "ascend-int.h".

svn path=/trunk/; revision=788
1999-10-08 07:45:31 +00:00
Guy Harris 21f0e54e7f Add an "ascend-int.h" file, to declare routines used by more than one of
the files in the Lucent/Ascend capture file code.

svn path=/trunk/; revision=787
1999-10-08 07:41:33 +00:00