Commit Graph

9 Commits

Author SHA1 Message Date
Gilbert Ramirez aa553f63ec Convert LAPD and V.120 dissector to use tvbuff. Convert xdlc dissector-helper,
too.

svn path=/trunk/; revision=2030
2000-05-31 03:58:56 +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 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
Gilbert Ramirez 292e38e2c6 Add tvbuff class.
Add exceptions routines.
Convert proto_tree_add_*() routines to require tvbuff_t* argument.
Convert all dissectors to pass NULL argument ("NullTVB" macro == NULL) as
the tvbuff_t* argument to proto_tree_add_*() routines.

dissect_packet() creates a tvbuff_t, wraps the next dissect call in
a TRY block, will print "Short Frame" on the proto_tree if a BoundsError
exception is caught.

The FDDI dissector is converted to use tvbuff's.

svn path=/trunk/; revision=1939
2000-05-11 08:18:09 +00:00
Guy Harris 00dbb67cf2 Change the type of the "v120.control" protocol field from FT_STRING to
FT_UINT16; the xDLC code requires control fields to be FT_UINTn, as it
uses "proto_tree_add_uint_format()" to add that field to the protocol
tree.

Always pass TRUE as the "is_extended" argument to
"dissect_xdlc_control()" - the V.120 spec says "The data link control
sublayer provides the procedures and formats of fields for data link
layer peer-to-peer communication.  ...  For formats and the elements of
procedures, see Recommendation Q.922", and Q.922 seems to at least allow
for modulo 128 operation; it also speaks of SABME, as does V.120, and I
*think* the "extended" in "Set asynchronous balanced mode extended"
means "modulo 128".

Dissect the terminal adaptation sublayer header field after dissecting
the control field, so that the V.120 tree shows the data in sequential
order.

Calculates the length of the V.120 header based on the control field
type (using the "XDLC_CONTROL_LEN()" macro) and the length of the
terminal adaptation sublayer header ("dissect_v120_header()" now returns
the length of what it dissects).

Call "dissect_data()" on the V.120 payload, so you at least know how
much data there is, and can click on an item to see it highlighted.

svn path=/trunk/; revision=1727
2000-03-17 05:21:48 +00:00
Gilbert Ramirez f6e92a9e93 Break proto_tree_add_item_format() into multiple functions:
proto_tree_add_protocol_format()
	proto_tree_add_uint_format()
	proto_tree_add_ipxnet_format()
	proto_tree_add_ipv4_format()
	proto_tree_add_ipv6_format()
	proto_tree_add_bytes_format()
	proto_tree_add_string_format()
	proto_tree_add_ether_format()
	proto_tree_add_time_format()
	proto_tree_add_double_format()
	proto_tree_add_boolean_format()
If using GCC 2.x, we can check the print-format against the variable args
passed in. Regardless of compiler, we can now check at run-time that the
field type passed into the function corresponds to what that function
expects (FT_UINT, FT_BOOLEAN, etc.)

Note that proto_tree_add_protocol_format() does not require a value field,
since the value of a protocol is always NULL. It's more intuitive w/o the
vestigial argument.

Fixed a proto_tree_add_item_format-related bug in packet-isis-hello.c
Fixed a variable usage bug in packet-v120.c. (ett_* was used instead of hf_*)

Checked in Guy's fix for the function declearation for proto_tree_add_text()
and proto_tree_add_notext().

svn path=/trunk/; revision=1713
2000-03-12 04:48:32 +00:00
Guy Harris 700c7569e0 Updates from Bert Driehuis.
svn path=/trunk/; revision=1323
1999-12-14 06:21:19 +00:00
Guy Harris 104e56d68e Set "v120len" regardless of whether "tree" is null or not; we use it
regardless of whether it's null or not.

svn path=/trunk/; revision=1306
1999-12-12 23:08:20 +00:00
Gilbert Ramirez 4a15f6582a Added Bert Driehuis <driehuis@playbeing.org>'s I4B wiretap module
and V.120 decoder.

svn path=/trunk/; revision=1304
1999-12-12 22:40:10 +00:00