Commit Graph

28 Commits

Author SHA1 Message Date
Gilbert Ramirez 7bc6591130 Another change to make packet-tr more intelligent with regard to
short packets. Also increased RIF processing from 18 to 30 bytes of RIF, as
I learned that the token-ring spec changed. Don't call next dissector
if there are no more bytes in packet.

svn path=/trunk/; revision=698
1999-09-22 05:40:12 +00:00
Gilbert Ramirez 7b6a195ea3 Changed short packet handling in TR code to understand minimum-length
TR packets (it's a variable-length header, remember). Added lots of
proto_tree-style fields to TRMAC code.

svn path=/trunk/; revision=683
1999-09-17 04:20:23 +00:00
Gilbert Ramirez be8c6c16f8 Handle short packets in the capture and dissect stages more intelligently.
svn path=/trunk/; revision=680
1999-09-15 06:26:42 +00:00
Gilbert Ramirez bcf4001ef0 Changed (again) the way that the FT_BOOLEAN field type works internally.
Dissector code can add FT_BOOLEAN fields to the proto_tree and pass TRUE
or FALSE values (non-zero and zero values). The display filter language,
however, treats the checking for the existence of a FT_BOOLEAN field as
the checking for its truth. Before this change, packet-tr.c was the only
dissector using FT_BOOLEAN fields, and it only added the field to the
proto_tree if the TRUE; the dissector was determining the difference between
the check for existence and the check for truth.

I made this change because packet-ppp.c added some FT_BOOLEAN fields and
added them to the tree regardless of truth value, It's more natural just to
do it this way and let the display filter code worry about whether to
check for existence or truth. So that's how it works now.

svn path=/trunk/; revision=679
1999-09-15 06:13:21 +00:00
Gilbert Ramirez ca61d69c63 Removed two cases where protocol decoding assumed that the data in the
packets were correct. Bad packets could cause segfaults.

svn path=/trunk/; revision=641
1999-09-09 04:47:17 +00:00
Gilbert Ramirez b53d4ba179 Changed packet-tr.c to insert tr.sr, a FT_BOOLEAN field, only if tr.sr
is true. The test for truth now becomes a test for existence. The dfilter
grammar no longer recognizes 'true' and 'false', since you can now check
a boolean field via:

	tr.sr

or by its negation:

	!tr.sr

svn path=/trunk/; revision=591
1999-08-27 19:27:22 +00:00
Gilbert Ramirez 11ca5817b6 The token-ring decoder now takes into account some really garbled
TR packets that are seen on Linux 2.0 boxes (viewing your own packets
before they get to the wire). Thanks to Tom Gallagher <Tom.Gallagher@madge.com>
for providing the patch.

svn path=/trunk/; revision=589
1999-08-27 19:15:38 +00:00
Gilbert Ramirez cb1e32da97 Removed unnecessary #include "etypes.h" lines.
svn path=/trunk/; revision=565
1999-08-24 17:26:16 +00:00
Guy Harris a033390918 Add support for reading Full Frontal ATM from an ATM Sniffer capture
file, instead of throwing out all but LANE or RFC 1483 data frames and
pretending that the former are just Ethernet or Token-Ring frames.

Add some level of decoding for ATM LANE, but not all of it; the rest,
including decoding non-LANE frames, is left as an exercise for somebody
who has captures they want to decode, an interest in decoding them, ATM
expertise, and time....

svn path=/trunk/; revision=523
1999-08-20 06:55:20 +00:00
Gilbert Ramirez 5ad4d240bb Fixed a bug in displaying RIF ring/bridge pairs.
svn path=/trunk/; revision=456
1999-08-10 02:54:59 +00:00
Gilbert Ramirez b2f932c1db Changed the display filter scanner from GLIB's GScanner to lex. The code
as it standed depends on your lex being flex, but that only matters if you're
a developer. The distribution will include the dfilter-scanner.c file, so
that if the user doesn't modify dfilter-scanner.l, he won't need flex to
re-create the *.c file.

The new lex scanner gives me better syntax checking for ether addresses. I
thought I could get by using GScanner, but it simply wasn't powerful enough.

All operands have English-like abbreviations and C-like syntax:
and, && ; or, || ; eq, == ; ne, != ; , etc.

I removed the ETHER_VENDOR type in favor of letting the user use the [x:y]
notation:	ether.src[0:3] == 0:6:29 instead of ether.srcvendor == 00:06:29

I implemented the IPXNET field type; it had been there before, but was
not implemented. I chose to make it use integer values rather than byte
ranges, since an IPX Network is 4 bytes. So a display filter looks like this:
	ipx.srcnet == 0xc0a82c00
rather than this:
	ipx.srcnet == c0:a8:2c:00

I can supposrt the byte-range type IPXNET in the future, very trivially.

I still have more work to do on the parser though. It needs to check ranges
when extracting byte ranges ([x:y]) from packets. And I need to get rid
of those reduce/reduce errors from yacc!

svn path=/trunk/; revision=414
1999-08-01 04:28:20 +00:00
Gilbert Ramirez 7bd6c15378 Made the protocol (but not the fields) use the new proto_tree routine,
allowing users to filter on the existence of these protocols. I also
added packet-clip.c to the Nmake makefile.

svn path=/trunk/; revision=402
1999-07-29 05:47:07 +00:00
Gilbert Ramirez 0d36ec8de2 Modified the proto_register_field_array usage again. Thanks to Guy's
suggestion, this new method using a static array should use less memory
and be faster. It also has a nice side-effect of making the source-code
more readble, IMHO.

Changed the print routines to look for protocol proto_data instead of
looking at the text label as they did before, hoping that the data hex
dump field item starts with "Data (".

Added the -G keyword to ethereal to make it dump a glossary of display
filter keywords to stdout and exit. This data is then formatted with
the doc/dfilter2pod perl program to pod format, which is combined
with doc/ethereal.pod.template to create doc/ethereal.pod, from which
the ethereal manpage is created. This way we can keep the manpage up-to-date
with a list of fields that can be filtered on.

svn path=/trunk/; revision=364
1999-07-15 15:33:52 +00:00
Gilbert Ramirez 07f42b5b31 Created a new protocol tree implementation and a new display filter
mechanism that is built into ethereal. Wiretap is now used to read all
file formats. Libpcap is used only for capturing.

svn path=/trunk/; revision=342
1999-07-07 22:52:57 +00:00
Gilbert Ramirez 6a971ea03c Found a small bug in how the Token-Ring code tried to be smart and looked
for RIF bytes w/o the source-route bit being set.

svn path=/trunk/; revision=316
1999-06-16 20:14:51 +00:00
Gilbert Ramirez af2bae7723 Changed the Access Control and Frame Control fields in the Token-Ring header
to use the decode_*_bitfield() routines. This needed to happen anyway, but
I finally made the change so that I can figure out how I'm going to handle
bitfield fields in my experiment of changing the implementation of the
protocol tree in ethereal.

svn path=/trunk/; revision=311
1999-06-14 20:30:06 +00:00
Gilbert Ramirez ef3dfe2077 Removed all references to gtk objects from packet*.[ch] files. They now
reference the protocol tree with struct proto_tree and struct proto_item
objects. That way, the packet decoding source code file can be used with
non-gtk packet decoders, like a curses-based ethereal, e.g. I also re-arranged
some of the information in packet.h to more appropriate places (like other
packet-*.[ch] files).

svn path=/trunk/; revision=223
1999-03-23 03:14:46 +00:00
Gilbert Ramirez 2744866326 Small fixes for alignment, and #include for gtk+-1.1.x/glib-1.1.x
svn path=/trunk/; revision=197
1999-03-01 18:28:12 +00:00
Guy Harris 75305346b5 When doing a capture, decode enough of the incoming packets to correctly
update the packet counts and percentages in the dialog box popped up
during a capture, even for non-Ethernet captures.

svn path=/trunk/; revision=184
1999-02-09 00:35:38 +00:00
Gilbert Ramirez a12038c884 A bad frame control value could crash ethereal because I didn't do
proper bounds checking. Fixed.

svn path=/trunk/; revision=164
1999-01-08 04:42:43 +00:00
Gerald Combs 6ca358948b * Added column formatting functionality.
* Added check_col(), add_col_str() and add_col_fmt() to replace references
  to ft->win_info.
* Added column prefs handling code.

svn path=/trunk/; revision=97
1998-11-17 04:29:13 +00:00
Gilbert Ramirez fcb4c78a6a A lengthy patch to add the wiretap library. Wiretap is not used by default
because it is still in its infancy, but it can be compiled in optionally.
The library exists in its own subdirectory ethereal/wiretap. This patch also
edits all the packet-*.c files to remove the #include <pcap.h> line which is
unnecessary in these files. In the ethereal code, file.c is the most heavily
modified with #ifdef WITH_WIRETAP lines for the optional library.

svn path=/trunk/; revision=82
1998-11-12 00:06:47 +00:00
Gilbert Ramirez 0c8d1dd1b3 Commented out a left-over debug printf() statement.
svn path=/trunk/; revision=41
1998-10-13 03:38:16 +00:00
Gerald Combs 2e7e493198 Merged in a _huge_ patch from Guy Harris. It adds a time stap column,
generalizes the column printing code, adds a "frame" tree item to
   the tree view, and fixes a bunch of miscellaneous coding bugs.

svn path=/trunk/; revision=31
1998-09-27 22:12:47 +00:00
Gilbert Ramirez 020b7bfc99 I cleaned up the TR code by using variables that correspond to the TR header
fields. I got rid of a lot of pd[x] type stuff. I also made the TR code
a bit smarter again. With Linux 2.0.x and oltr, the source-route bit is
cleared before we get it. I can now detect more packets that were source-
routed but had their SR bit cleared.

svn path=/trunk/; revision=16
1998-09-17 22:28:07 +00:00
Gilbert Ramirez 4b7a7cd6d8 Re-added fixes after cvs tree was changed.
svn path=/trunk/; revision=11
1998-09-17 03:29:28 +00:00
Gerald Combs 576024f903 Added ID tags to the beginning of each source file.
svn path=/trunk/; revision=7
1998-09-16 03:22:19 +00:00
Gerald Combs 86534f46e1 Initial revision
svn path=/trunk/; revision=2
1998-09-16 02:39:15 +00:00