Commit Graph

32 Commits

Author SHA1 Message Date
Guy Harris 07f44e2a7f "ascend-grammar.h" is generated by Bison with a copy of the definition
of the YYSTYPE structure in "ascend-grammar.c"; the intent is that other
files include "ascend-grammar.h" if they need that structure, but that
"ascend-grammar.c" not itself include "ascend-grammar.h".  If it *does*
include it, the compiler complains about YYSTYPE being redefined (even
though the two structures are identical).

svn path=/trunk/; revision=15478
2005-08-20 17:49:58 +00:00
Jörg Mayer 96adc5f4a1 - Include the .h files in their .c files.
- Remove epan/dissectors/packet-sna.h, it isn't used anywhere.

svn path=/trunk/; revision=15475
2005-08-20 16:19:22 +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
Guy Harris 6c16e488a1 "*p++" doesn't affect what "p" points to; it only affects "p" itself,
and is equivalent to just "p++".  If "p" isn't used after that, "*p++"
does nothing whatsoever, and can just be removed.

svn path=/trunk/; revision=13818
2005-03-20 10:55:50 +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
Guy Harris 761ae95b19 From Joerg Mayer: get rid of "-Wno-unused" flag in some configure
scripts, and check in changes to add _U_ to some unused arguments (some
other should perhaps be used, so we leave the _U_ out so that the
warnings serve as a reminder to check those).

svn path=/trunk/; revision=4847
2002-03-02 20:41:08 +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 2e379072ec From Motonori Shindo: fix Ascend/Lucent trace reading code to handle
later trace formats that have an ASCII dump at the end of the line.

svn path=/trunk/; revision=4327
2001-12-04 10:07:30 +00:00
Gilbert Ramirez f14a6b8b91 Hopefully the last time I have to change my e-mail address.
svn path=/trunk/; revision=4199
2001-11-13 23:55:44 +00:00
Gilbert Ramirez aacb4d90f0 Use system's version of AM_PATH_GLIB macro.
Optimize use of AC_CHECK_FUNC in wiretap/acinclude.m4
Move #include "config.h" to be first include in some files.
From albert chin (china@thewrittenword.com)

svn path=/trunk/; revision=3857
2001-08-20 15:23:34 +00:00
Guy Harris f7b50ca754 From Joerg Mayer:
* gcc 3.0 warning fixes:
  - text2pcap.c: The number of characters to scan should probably not be 0
  - wiretap/csids.c: using preincrement on a variable used on both
    sides of an assignment might be undefined by the C99(?) standard
 * turn on additional warnings for epan and wiretap too
  - epan/configure.in
  - wiretap/configure.in
 * Fix some warnings (missing includes, signed/unsigned, missing
    initializers) found by turning on the warnings
  - all other files :-)

svn path=/trunk/; revision=3709
2001-07-13 00:55:58 +00:00
Gerald Combs 5b9ad66cb8 Add support for "version 7" wandess output. Actually, I think it's
simply PPP data that doesn't have a username associated with it, e.g. for
a dedicated WAN link as opposed to a dialup link.

svn path=/trunk/; revision=3274
2001-04-09 03:32:34 +00:00
Guy Harris 3d7d4a297d Not all packets in a "wdd" dump necessarily have a "Cause an attempt to
place call to" header (I presume this can happen if there was a call in
progress when the packet was sent or received); don't require the

	Date: 01/12/1990.  Time: 12:22:33
	Cause an attempt to place call to 14082750382

to be present in every packet.

(Only the date on the first packet is used, and only if it's present in
the first packet; if the first packet doesn't have a date, we can't
easily go back and fix up the previous packets, *especially* in programs
such as Tethereal and editcap which make only one pass through the
capture.

We set the called number to a null string if that's the case; we could
assume, in the sequential pass, that it's the phone number from the last
call, and remember that for use when doing random access.)

svn path=/trunk/; revision=2617
2000-11-12 04:57:39 +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 6ba1bf3f83 Add some comments, and fix one comment.
Remove what appear to be a pair of dangling "else"s.

Before calling "mktime()" on a "struct tm", you have to set "tm_isdst",
so it knows what to do about daylight savings time; set it to -1, so it
picks the appropriate time (except, presumably, for those times that
don't exist, when the clock is moved forward, where there is no
appropriate time, and those times that exist twice, when the clock is
moved backward, where there are *two* times and you can't tell which is
appropriate).

svn path=/trunk/; revision=2604
2000-11-11 01:44:05 +00:00
Gilbert Ramirez 4a3b77ba46 Move #include <time.h> into wtap-int.h instead of requiring it in
every C file. I noticed this because of a build break of csids.obj on
Win32.

svn path=/trunk/; revision=2378
2000-08-25 21:25:43 +00:00
Gilbert Ramirez d7e6e0e384 Add wtap-int.h. Move definitions relevant to the internal workins of wiretap
to that file, leave public definitions in wtap.h.

Rename "union pseudo_header" to "union wtap_pseudo_header".
Make the wtap_pseudo_header pointer available in packet_info struct.

svn path=/trunk/; revision=1989
2000-05-19 23:07:04 +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 3e067b812c Fix files that had Gilbert's old e-mail address or that didn't have my
forwarding e-mail address.

svn path=/trunk/; revision=1522
2000-01-22 06:22:44 +00:00
Gilbert Ramirez 1990d5fb5c Some initial changes for win32 support, but not all.
Added lots of #ifdef HAVE_*_H wrappers.
Added some #defines in config.h.win32
Check for more headers in configure.in
Added prototype for inet_aton() in inet_v6defs.h.
Changed "BYTE" token (i.e., #define) in ascend-gramamr.y because it
conflicts with a windows definition. Use HEXBYTE instead.

svn path=/trunk/; revision=1448
2000-01-10 17:33:17 +00:00
Guy Harris 841b4762ec Move the initial comment inside the first "%{", so that it shows up in
the generated parser, so that "ident" will tell you from which version
of the grammar that parser was generated.

svn path=/trunk/; revision=956
1999-10-31 19:34:46 +00:00
Guy Harris f494dfafa7 Include <time.h> to get "struct tm" declared.
svn path=/trunk/; revision=936
1999-10-27 17:07:08 +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
Guy Harris 522b27e290 Give it an RCS ID.
svn path=/trunk/; revision=706
1999-09-23 05:26:18 +00:00
Gerald Combs f4f6b71d0c Add support for "wdd" trace output.
svn path=/trunk/; revision=673
1999-09-13 03:49:04 +00:00
Gerald Combs feda83f7e0 Added Guy's patch to use the pseudo header facility to pass up the Ascend
metadata.

Also added filter items for the session and task number.

svn path=/trunk/; revision=664
1999-09-11 22:36:38 +00:00
Guy Harris 4ac044cc3e Get rid of an unused variable.
svn path=/trunk/; revision=663
1999-09-11 20:30:34 +00:00
Gerald Combs 70481fcc84 Add in ascend.c, ascend.h, ascend-grammar.y and ascend-scanner.l. These
read and parse the Lucent/Ascend trace output.

svn path=/trunk/; revision=653
1999-09-11 04:53:26 +00:00