Commit Graph

43 Commits

Author SHA1 Message Date
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
Gilbert Ramirez 058ef64db8 Add the ability to print packet dissections in PDML (an XML-based format)
to tethereal. It could be added to Ethereal, but the GUI changes to
allow the user to select PDML as a print format have not been added.

Provide a python module (EtherealXML.py) to help parse PDML.

Provide a sample app (msnchat) which uses tethereal and EtherealXML.py
to reconstruct MSN Chat sessions from packet capture files. It produces
a nice HTML report of the chat sessions.

Document tethereal's PDML and EtherealXML.py usage in doc/README.xml-output

Update tethereal's manpage to reflect the new [-T pdml|ps|text] option

svn path=/trunk/; revision=9180
2003-12-06 06:09:13 +00:00
Guy Harris b624dce63b Add a new WTAP_ENCAP_CHDLC_WITH_PHDR type, to distinguish Cisco HDLC
captures with packet direction information from captures without it.
Use them appropriately.

svn path=/trunk/; revision=8780
2003-10-25 07:17:28 +00:00
Guy Harris 78e089fa99 Add a "show_exception()" routine that takes an exception code as an
argument, and puts the appropriate exception indication into the tree.

In "dissect_frame()", do a CATCH_ALL for exceptions, and pass the
exception code to "show_exception()".

svn path=/trunk/; revision=8758
2003-10-23 05:01:39 +00:00
Ronnie Sahlberg f99d0f9edd Add filterable field for REF TIME frames so it is easy to search for them
svn path=/trunk/; revision=8511
2003-09-22 09:06:10 +00:00
Ronnie Sahlberg 1ce1722006 Attempt to prettify frame.time_relative
and some other fields

svn path=/trunk/; revision=8460
2003-09-12 04:52:55 +00:00
Ronnie Sahlberg 007d873671 Added TimeReference frames.
One can now select a packet and mark it as a TimeReference packet using the menu.
A TimeReference packet will be indicated by having all timestamp related column entries replaced by the string *REF*
A TimeReference packet will always be displayed in the packet pane, and overrides any display filters.

When a frame is a TimeReference frame, all later frames will calculate the TimeRelativeToFirstPacket  relative to the timestamp of the TimeReference frame instead of the first frame of the capture.

You can have any number of TimeReference frames you like.

svn path=/trunk/; revision=8459
2003-09-12 02:48:23 +00:00
Guy Harris 15eea3fbb6 Handle packet direction information for SDLC Sniffer captures.
Add a bunch of capture types discovered by stuffing them into Windows
Sniffer captures and seeing what a Sniffer thought they were.  Add
support for writing at least some of them.

svn path=/trunk/; revision=7265
2003-03-03 23:29:59 +00:00
Guy Harris 4156806b8b From Didier Gautheron: provide a mechanism to indicate why reassembly
wasn't done, and, for TCP, use that mechanism if reassembly isn't done
is an incorrect TCP checksum.

svn path=/trunk/; revision=7212
2003-02-27 03:56:48 +00:00
Guy Harris f88816e60f Add WTAP_ENCAP_FRELAY_WITH_PHDR for use with Frame Relay capture files
that have direction information.

Support writing WTAP_ENCAP_FRELAY_WITH_PHDR and WTAP_ENCAP_PPP_WITH_PHDR
captures out in libpcap format - we throw away the direction
information, but so it goes.

When reading/writing Windows Sniffer format, read and write the
direction flag.

svn path=/trunk/; revision=7052
2003-01-31 01:02:14 +00:00
Richard Sharpe 05fa98f948 Add support for Wellfleet HDLC. It now can see inside the packets and handles
the capture I was sent as a bunch of TCP segments containing LPD stuff.

svn path=/trunk/; revision=6810
2002-12-20 07:56:07 +00:00
Guy Harris 56f644145e Discard the WTAP_ENCAP_LAPD encapsulation type in favor of a
WTAP_ENCAP_ISDN encapsulation type, which includes a pseudo-header
giving the direction (user-to-network or network-to-user) and the
channel number.

Add a new circuit type, using the ISDN channel number as the circuit ID.

Add an ISDN dissector to put the direction and channel number into the
protocol tree and to call the appropriate dissector for the payload
based on the channel (LAPD for the D channel; V.120, PPP, or data for B
channels, based on some heuristics).

svn path=/trunk/; revision=6521
2002-10-31 07:12:42 +00:00
Ronnie Sahlberg 93a649db6f Tap api. tap is a simple api that can be used for arbitrary extensions.
One example extension is rpcstat.

Try -Z rpc,rtt,100003,3 as argument to tethereal when reading a capture
containing NFSv3 packets.

tap-rpcstat.[ch] is intended to demonstrate the api and can be used to
base other extensions on.

svn path=/trunk/; revision=6175
2002-09-04 09:40:29 +00:00
Jörg Mayer 7c4176d868 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=6117
2002-08-28 21:04:11 +00:00
Guy Harris 7a12fa1373 From Ulf Lamping:
Put "bytes" after the byte counts for the frame sizes in the
	    top-level item for the "Frame" protocol, to make it clearer
	    what they refer to.

	Put the source and destination MAC addresses into the top-level
	    item for Ethernet.

svn path=/trunk/; revision=6090
2002-08-26 19:09:02 +00:00
Guy Harris 518640292f Put in a comment noting that forcibly setting "pinfo->fd->lnk_t" means
you can't turn the "Treat all frames as DOCSIS frames" option off.

svn path=/trunk/; revision=5958
2002-08-06 08:13:42 +00:00
Guy Harris 8a9b35cb5e From Anand V. Narwani:
DOCSIS support, including support for "Ethernet" captures where
	    the raw frame is a DOCSIS frame rather than an Ethernet
	    frame (some Cisco cable-modem head-end gear can send out a
	    trace of all traffic on an Ethernet, but what it sends are
	    the raw bytes of DOCSIS frames, not Ethernet frames)

Get rid of second AUTHORS entry for Devin Heitmueller, merging its item
into the older entry.

Clean up the order of some lists of plugin items.

svn path=/trunk/; revision=5861
2002-07-12 22:52:43 +00:00
Guy Harris 82e11eb8ee From Didier Gautheron: put "frame.marked" into the "Frame" subtree, not
into the top-level tree.

svn path=/trunk/; revision=5393
2002-05-04 20:57:18 +00:00
Guy Harris 7aba39031e From Didier Gautheron: add a "frame.marked" hidden field, set if the
frame is marked, so that you can use Find Frame to find the next marked
frame, and can filter the display to show only marked frames.

Update the documentation to note that "frame.marked" is set on marked
frames.

svn path=/trunk/; revision=5377
2002-05-03 21:38:20 +00:00
Guy Harris b811d2cbe8 "pinfo->pseudo_header" might be null, even for link-layer types such as
WTAP_ENCAP_CHDLC; check whether it's null before using it.

Use FROM_DCE rather than 0x80 to check the "this is DCE->DTE" bit in
"x25.flags".

svn path=/trunk/; revision=5148
2002-04-13 00:02:55 +00:00
Gilbert Ramirez 5c10ad55a8 More static-ization.
svn path=/trunk/; revision=5131
2002-04-08 20:30:56 +00:00
Guy Harris b505843920 Add support for reassembling RPC-over-TCP fragments, and do that in both
RPC and NDMP.

Show the RPC-over-TCP fragment header as a tree with bitfields below it.

Add a routine to show a reported bounds error as an "Unreassembled
Packet" or a "Malformed Packet" depending on whether "pinfo->fragmented"
is set, and have NBNS and RPC use that.

Add "ett_ndmp_file_stats" to the list of ett_ values to be initialized
(it wasn't in that list, and wasn't getting initialized).

When freeing up various hash tables and memory chunks in the RPC
dissector, zero out the pointers to them, just to make sure we don't try
to free them again.

Always destroy the TCP segment key and address memory chunks in
"tcp_desegment_init()", regardless of whether TCP desegmentation is
enabled - we don't *allocate* them if TCP desegmentation isn't enabled,
but we should free them even if it's not enabled.  Also, when we free
them, set the pointers to them to null, so we don't double-free them.

Supply to subdissectors called from the TCP dissector the sequence
number of the first byte handed to the sub dissector.

svn path=/trunk/; revision=4753
2002-02-18 23:51:55 +00:00
Guy Harris eb2d6593dc Replace a bunch of "tvb_length()" and "tvb_length_remaining()" calls in
arguments to "proto_tree_add_text()", and to "proto_tree_add_XXX()" calls
that add FT_NONE or FT_PROTO items to the protocol tree, with -1.

Replace some calls to "tvb_length()" or "tvb_length_remaining()" with
calls to "tvb_reported_length()" and "tvb_reported_length_remaining()",
as those give the actual length of the data in the packet, not just the
data that happened to be captured.

svn path=/trunk/; revision=4605
2002-01-24 09:20:54 +00:00
Guy Harris ee5ca25d31 Include files from the "epan" directory and subdirectories thereof with
"epan/..." pathnames, so as to avoid collisions with header files in any
of the directories in which we look (e.g., "proto.h", as some other
package has its own "proto.h" file which it installs in the top-level
include directory).

Don't add "-I" flags to search "epan", as that's no longer necessary
(and we want includes of "epan" headers to fail if the "epan/" is left
out, so that we don't re-introduce includes lacking "epan/").

svn path=/trunk/; revision=4586
2002-01-21 07:37:49 +00:00
Guy Harris 816e7978c4 Mark un-reassembled TCP segments as (possibly) being un-reassembled, by
setting the "pinfo->fragmented" flag.

If a ReportedBoundsError occurs, flag the frame as being an
unreassembled packet, not an unreassembled fragmented packet, as it may
have been segmented across TCP segment boundaries rather than being part
of an IPv4/IPv6/CLNP/etc. fragmented/segmented packet.

svn path=/trunk/; revision=4558
2002-01-17 09:28:22 +00:00
Guy Harris fb1e26fe6a Use the "fragmented" field of the "packet_info" structure in
"dissect_frame()" to indicate whether a ReportedBoundsError was due to
the packet being malformed (i.e., the packet was shorter than it's
supposed to be, so the dissector went past the end trying to extract
fields that were supposed to be there) or due to it not being
reassembled (i.e., the packet was fragmented, and we didn't reassemble
it, but just treated the first fragment as the entire packet, so the
dissector went past the end trying to extract fields that were partially
or completely in fragments after that).  Mark the latter as being
unreasembled rather than malformed.

Properly initialize, save, and restore that field, and properly set it,
so that works.

svn path=/trunk/; revision=4555
2002-01-17 06:29:20 +00:00
Guy Harris 86a251065d If a ReportedBoundsError exception occurs, report it as a "malformed
packet" rather than a "malformed frame" - the packet in question might
be part of a link-layer frame or might span more than one link-layer
frame.

svn path=/trunk/; revision=4497
2002-01-08 07:17:55 +00:00
Gerald Combs 99502224b9 Cisco HDLC and frame relay direction reporting, from Tom Nisbet.
svn path=/trunk/; revision=4447
2001-12-24 17:06:53 +00:00
Guy Harris 23319ff023 Move the pointer to the "column_info" structure in the "frame_data"
structure to the "packet_info" structure; only stuff that's permanently
stored with each frame should be in the "frame_data" structure, and the
"column_info" structure is not guaranteed to hold the column values for
that frame at all times - it was only in the "frame_data" structure so
that it could be passed to dissectors, and, as all dissectors are now
passed a pointer to a "packet_info" structure, it could just as well be
put in the "packet_info" structure.

That saves memory, by shrinking the "frame_data" structure (there's one
of those per frame), and also lets us clean up the code a bit.

svn path=/trunk/; revision=4370
2001-12-10 00:26:21 +00:00
Guy Harris c6ac943216 Clean up indentation.
svn path=/trunk/; revision=4362
2001-12-08 21:03:41 +00:00
Guy Harris 75cc056222 Attach a descriptive name field type and base to dissector tables; that
specifies how the selector values used as keys in those tables are to be
displayed, and the title to use when displaying the table.

Use that information in the code to display the initial and current
entries of various dissector tables.

Have the dissector for BACnet APDUs register itself by name, and have
the BACnet NPDU dissector call it iff the BAC_CONTROL_NET bit isn't set,
rather than doing it with a dissector table.

svn path=/trunk/; revision=4358
2001-12-08 06:41:48 +00:00
Guy Harris 4e775d2e64 WTAP_ENCAP_ values are #defined in decimal; display them in decimal.
svn path=/trunk/; revision=4349
2001-12-06 22:52:18 +00:00
Ed Warnicke 7537283cc6 Added a proto_reg_handoff_frame() function and switched from
using dissect_data() to using call_dissector()

svn path=/trunk/; revision=4268
2001-11-26 01:23:59 +00:00
Gilbert Ramirez a81c03816c Add an option to show the File Offset of a frame. Not useful for
general packet analyzing, but useful when developing wiretap code or
other such low-level development.
Default preference is *not* to show File Offset.

svn path=/trunk/; revision=4120
2001-11-01 04:00:56 +00:00
Guy Harris 1d42c94b05 Make the resolution for time values be nanoseconds rather than
microseconds.

Fix some "signed vs. unsigned" comparison warnings.

svn path=/trunk/; revision=3934
2001-09-14 07:10:13 +00:00
Guy Harris 8412393197 From Joerg Mayer: explicitly fill in all members of a
"header_field_info" structure, including the ones that are later set by
the routines to register fields.

svn path=/trunk/; revision=3561
2001-06-18 02:18:27 +00:00
Ed Warnicke 62e9875d34 Added a register_dissector() call in packet-frame.c so that frame is now
a registered dissector and can be called by call_dissector().

svn path=/trunk/; revision=3233
2001-04-01 21:12:05 +00:00
Guy Harris 0e7c1de08a Have "proto_register_protocol()" build a list of data structures for
protocols, in addition to adding structures to the list of filterable
fields.  Give it an extra argument that specifies a "short name" for the
protocol, for use in such places as

	pinfo->current_proto;

	the dialog box for constructing filters;

	the preferences tab for the protocol;

and so on (although we're not yet using it in all those places).

Make the preference name that appears in the preferences file and the
command line for the DIAMETER protocol "diameter", not "Diameter"; the
convention is that the name in question be all-lower-case.

Make some routines and variables that aren't exported static.

Update a comment in the ICP dissector to make it clear that the
dissector won't see fragments other than the first fragment of a
fragmented datagram.

svn path=/trunk/; revision=2810
2001-01-03 06:56:03 +00:00
Guy Harris 5bcb17c724 If we get an exception when dissecting a packet, append "[Short Frame]"
or "[Malformed Frame]" to the Info column.

Make some dissectors set the Protocol column and clear the Info column
before fetching anything from the tvbuff they were handed, so that if
the frame is short or malformed, it'll be marked as being the right
top-level protocol, and the Info column won't have cruft left over from
the previous protocol.

svn path=/trunk/; revision=2800
2000-12-29 04:16:57 +00:00
Gerald Combs d4db37e5b5 Add the relative time to the frame tree, at the request of Manfred Young.
svn path=/trunk/; revision=2762
2000-12-15 03:30:21 +00:00
Gilbert Ramirez d673500082 Wrap the dissect_fddi() call (with a 4th argument) with
dissect_fddi_not_bitswapped() and dissect_fddi_bitswapped(), both of which
use the standard 3-argument tvbuffified-dissector argument list.

Add a dissector table called "wtap_encap" which is used to call dissectors
from dissect_frame(). The switch() statement from this top-level dissector
is removed.

The link-layer dissectors register themselves with the "wtap_encap"
dissector table. The dissectors are now static where possible.

svn path=/trunk/; revision=2708
2000-11-29 05:16:15 +00:00
Guy Harris 7c3fcbac34 IEEE 802.11 support, from Johan Jorgensen of Axis Communications AB.
Add in stuff for a bunch of libpcap formats either in libpcap 0.5.2 or
in the current CVS version; we don't implement all of them in
Ethereal/Wiretap (those are "#if 0"ed out), but we do implement the IEEE
802.11 stuff (which isn't yet in libpcap or tcpdump, but the CVS version
of libpcap *does* reserve 105 as the encapsulation type number for
802.11).

svn path=/trunk/; revision=2646
2000-11-15 05:42:35 +00:00
Gilbert Ramirez e69b5278aa Implement epan_dissect_new() and epan_dissect_free(). These are the
"top-level" dissectors that libepan-users call, instead of dissect_packet().
The epan_dissect_t holds the tvbuff after dissection so that the tvbuff's
memory is not cleared until after the proto_tree is freed. (I might stuff
the proto_tree into the epan_dissect_t, too).

What remains of dissect_packet() in packet.c handles the tvbuff initialiation.
The real meat of dissect_packet() is now in dissect_frame(), in packet-frame.c
This means that "packet.c" is no longer a dissector, os it is no longer
passed to make-reg-dotc.

Once dissect_fddi() gets two wrapper functions (dissect_fddi_swapped()
and dissect_fddi_nonswapped()), the a dissector handoff routine could
be used instead of the switch statement in dissect_frame(). I'd register
a field like "wtap.encap"

svn path=/trunk/; revision=2478
2000-10-06 10:11:40 +00:00