Commit Graph

2070 Commits

Author SHA1 Message Date
Guy Harris 8af330852d Support for reading compressed Sniffer files, from Tim Farley, Joerg
Mayer, and yours truly.

svn path=/trunk/; revision=2002
2000-05-25 09:00:24 +00:00
Gilbert Ramirez 99efdc9fba Convert LAPB dissector to use tvbuffs, and to get pseudo_header from
packet_info struct.

svn path=/trunk/; revision=2001
2000-05-25 08:45:54 +00:00
Guy Harris f90bbf2a5a Assorted enhancements from Mark Burton.
svn path=/trunk/; revision=2000
2000-05-25 08:38:54 +00:00
Guy Harris f937a5d86f Assorted padding fixes from Mark Burton.
svn path=/trunk/; revision=1999
2000-05-25 08:32:13 +00:00
Gilbert Ramirez 40c5ed378f Convert dissect_ppp() and friends to use tvbuffs.
(the ip_tcp_options stuff is still non-tvbuff until I convert ip and tcp).

Add preliminary fix for Linux ISDN ippp devices (similar watch was posted
to ethereal-users, but did not use tvbuffs).

Change packet-raw.c to call capture_ppp()/dissect_ppp() in the case
where the frame starts with FF:03. We had been calling
capture_ip()/dissect_ip() at byte offset 4, but I think this is for
historical reasons of packet-raw.c and packet-ip.c existing before
packet-ppp.c.

svn path=/trunk/; revision=1998
2000-05-25 07:42:26 +00:00
Guy Harris 2a0cd38254 Display the fragment offset in decimal (as the IPv4 dissector does)
rather than hex.

svn path=/trunk/; revision=1997
2000-05-24 07:52:31 +00:00
Guy Harris d7b9c90614 Patch from Scott Howard to show the IP fragment offset as a byte offset
rather than an 8-byte offset.

svn path=/trunk/; revision=1996
2000-05-24 07:51:10 +00:00
Guy Harris a12762b431 Update a comment to reflect that only UCD SNMP 4.1.1 has
"snmp_set_full_objid()" as a macro rather than a function - 4.1.2 has it
as a function again.

svn path=/trunk/; revision=1995
2000-05-24 05:59:50 +00:00
Guy Harris b23955a89b EIGRP over Appletalk and EIGRP over IPX support, from Paul Ionescu.
svn path=/trunk/; revision=1994
2000-05-22 18:09:36 +00:00
Guy Harris b5a6696946 Support for ISAKMP XAUTH authentication, from Yaniv Kaul.
svn path=/trunk/; revision=1993
2000-05-22 17:59:53 +00:00
Guy Harris 9c90de553c Get rid of the comment before "cfgattrident2str()" explaining why it's
there - it's now called from within "packet-isakmp.c", so there's no
need to explain "this isn't used yet, but it will be in the future"; the
future has arrived....

svn path=/trunk/; revision=1992
2000-05-22 17:56:01 +00:00
Guy Harris 7db4db24be Parsing attributes in Config mode, and support for a Hybrid mode
authentication draft, from Yaniv Kaul.

svn path=/trunk/; revision=1991
2000-05-21 19:59:02 +00:00
Guy Harris 192a2e45fa Use "rm -f", not "rm", to remove "plugin_api.obj", so that if
"plugin_api.obj" doesn't exist, it just drives on rather than giving an
error.

svn path=/trunk/; revision=1990
2000-05-20 20:52:27 +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 586e1b6fca Move the closes of the save file FD around:
"capture()" should ensure that it's closed before returning, but
	it was only getting closed by "wtap_dump_close()" on success, so
	close the raw FD on failure (no "wtap_dump" stream is opened on
	failure, so we just close the raw FD);

	in a "update the display as packets arrive" capture, we should
	close the FD in the parent as soon as the fork is done, before
	even testing whether the fork succeeded (and we might as well do
	the same with the write side of the sync pipe).

svn path=/trunk/; revision=1988
2000-05-19 22:37:57 +00:00
Gilbert Ramirez cd1952d2ec Convert dissect_raw() to use tvbuff's.
svn path=/trunk/; revision=1987
2000-05-19 21:47:38 +00:00
Gilbert Ramirez 14d71d8986 Close capture file descriptor.
From Mark Burton <markb@ordern.com>

svn path=/trunk/; revision=1986
2000-05-19 19:53:48 +00:00
Gilbert Ramirez 8f304ff5e1 Detect CISCO and NOVELL type IPX packets.
From Paul Ionescu <ipaul@romsys.ro>

svn path=/trunk/; revision=1985
2000-05-19 19:48:01 +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 17ccdafa03 The only packets that look like SMUX packets *are* SMUX packets (unlike
SNMP, where we let the ATM code tell the SNMP dissector to call it
"ILMI"), so don't pass a protocol name string into "dissect_smux_pdu()",
just have "dissect_smux_pdu()" call it "SMUX".

svn path=/trunk/; revision=1983
2000-05-19 07:00:04 +00:00
Guy Harris bae4ad8d18 "wtap.h" doesn't need to include "ascend.h" or "toshiba.h".
svn path=/trunk/; revision=1982
2000-05-19 05:33:32 +00:00
Guy Harris 6093369044 Make "packet-clip.c", "packet-raw.c", "packet-ppp.c", "packet-tr.c",
"packet-eth.c", and "packet-fddi.c" include the include files that
declare the functions they export, so that the declarationss in the
header files will be checked against the definitions in the source
files.

svn path=/trunk/; revision=1981
2000-05-19 05:29:44 +00:00
Guy Harris 88a19954c2 Make "packet-null.c" include "packet-null.h", so that the declarations
in "packet-null.h" will be checked against the definitions in
"packet-null.c".

Fix the declaration of "dissect_null()" in "packet-null.h", so that said
checks don't complain.

svn path=/trunk/; revision=1980
2000-05-19 05:18:26 +00:00
Gilbert Ramirez b263e4934b Add protection against 0-length FT_BYTES being added to proto_tree.
Convert ethertype() and dissect_null() to use tvbuff.

svn path=/trunk/; revision=1979
2000-05-19 04:54:36 +00:00
Gilbert Ramirez c43db40dc1 Use new-style wtap_dump().
svn path=/trunk/; revision=1978
2000-05-19 02:42:16 +00:00
Gilbert Ramirez 82de27099d Mark DHCP packets as DHCP, and add boot.dhcp flag.
From Paul Ionescu <ipaul@romsys.ro>

svn path=/trunk/; revision=1977
2000-05-19 02:16:17 +00:00
Guy Harris 568af9a05d Note that the time stamp is printed only when reading an existing
capture file, not when printing packet summaries as packets are
captured.

svn path=/trunk/; revision=1976
2000-05-18 20:58:59 +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 e7ea221d9c Paul Ionescu's patch to add support for IPX over GRE.
svn path=/trunk/; revision=1974
2000-05-18 08:41:22 +00:00
Guy Harris 7bf3c7523b Have "proto_tree_is_visible" false except when we're in the middle of
doing something that requires that the text for protocol tree entries be
generated, i.e.

	1) initialize it to FALSE;

	2) have every routine that sets it clear it when it's done;

	3) when printing packets, set it to TRUE only if we're not just
	   printing packet summary lines;

and then get rid of settings to FALSE made unnecessary as a result of
those changes.

This makes sure it's not set when it doesn't have to be (which causes
the protocol tree code to format the text when it doesn't have to,
wasting CPU time).

svn path=/trunk/; revision=1973
2000-05-18 08:35:01 +00:00
Guy Harris 4a9e0166ce Small fix from Yaniv Kaul.
svn path=/trunk/; revision=1972
2000-05-17 08:23:50 +00:00
Gilbert Ramirez b4905911d3 Updates to doco.
svn path=/trunk/; revision=1971
2000-05-17 04:34:20 +00:00
Gilbert Ramirez 3502bc1c7f Guard against short/malformed packets with old-style bounds-checking.
svn path=/trunk/; revision=1970
2000-05-17 04:09:32 +00:00
Gilbert Ramirez 69b133ea73 Add "eth.trailer" and show ethernet trailer if it exists.
svn path=/trunk/; revision=1969
2000-05-17 03:05:39 +00:00
Gilbert Ramirez 961528e2c5 Fix dissect_ascend() prototype.
svn path=/trunk/; revision=1968
2000-05-16 15:22:31 +00:00
Gilbert Ramirez 39994bd360 Change 'cp' to 'mv' for 'accept' step.
svn path=/trunk/; revision=1967
2000-05-16 06:23:05 +00:00
Gilbert Ramirez 9f45a0b0f5 Convert Ethernet and Lucent/Ascend dissectors to use tvbuff.
Note in AUTHORS file that we use the exception module from kazlib.

svn path=/trunk/; revision=1966
2000-05-16 06:21:33 +00:00
Gilbert Ramirez 0a2817ceba Have tvbuff's keep track of cap_len and pkt_len ('length' and 'reported_length'
in tvbuff terminology). This is implemented for TVBUFF_REAL and TVBUFF_SUBSET
so far; support for TVBUFF_COMPOSITE is coming soon.

Throw either ReportedBoundsError or BoundsError.
A ReportedBoundsError is reported as "Malformed Frame" since the protocol
stated that a certain number of bytes should be available but they weren't.
A BoundsError is reported as a "Short Frame" since the snaplen was too short.

Register proto_short (BoundsError) and proto_malformed (ReportedBounds)
so searches can be made on "short" and "malformed".

svn path=/trunk/; revision=1965
2000-05-16 04:44:14 +00:00
Guy Harris 9d92bf4eeb Fix a botch that kept it from compiling if you didn't have an SNMP
library.

svn path=/trunk/; revision=1964
2000-05-15 08:02:39 +00:00
Gilbert Ramirez 06ba8a87c2 Add very basic tvbuff documentation. I still need to explain TVBUFF_COMPOSITE's,
and explain how to use exceptions.h.

svn path=/trunk/; revision=1963
2000-05-15 06:48:16 +00:00
Gilbert Ramirez ec3337ed07 Convert token-ring dissector to use tvbuffs.
Modify ethernet dissector to catch BoundsError if the attempt to
create next_tvb with the length specified in the ethernet header throws
an exception. In that case, next_tv is created with as many bytes as
are available in the frame.

Both dissect_tr() and dissect_eth() now have TRY blocks, which means
I had to fiddle with 'volatile' and 'static' storage options to get
things right (at least according to gcc).

svn path=/trunk/; revision=1962
2000-05-15 06:22:07 +00:00
Gilbert Ramirez 6c2a7af1f6 Add accessors for 24-bit integers (which get returned as guint32's).
svn path=/trunk/; revision=1961
2000-05-15 04:37:27 +00:00
Guy Harris 0d12107436 SMUX and SNMP V3 support from Jochen Friedrich.
svn path=/trunk/; revision=1960
2000-05-15 03:15:12 +00:00
Guy Harris 9befd25e50 We can't trust "cf->current_frame" to refer to the frame that was
selected before we started re-colorizing or re-filtering the display, as
when the first row is added to the clist, that may be selected and thus
made the current frame.

This means that we can't find the row corresponding to the
previously-selected frame, if any, by checking as each packet is
colorized/filtered and see whether its "frame_data" structure is equal
to "cf->current_frame", as that'll always say that the first frame in
the display is the selected frame.

Instead, we recored the value of "cf->current_frame" before we do
anything to the clist, have "add_packet_to_packet_list()" return either
the row number of the frame (if it passed the filter and thus was added
to the clist) or -1 (if it didn't pass the filter and thus wasn't added
to the clist), and, after "add_packet_to_packet_list()", if the current
frame is the one that was the selected row, remember its row number (if
any), and, when we're finished colorizing/filtering the display, make
that row the current row if it's not -1 (-1 means that the selected row
didn't pass the filter).

Also, don't do that until after we've thawed the clist, as the vertical
adjustment for the clist doesn't reflect reality until then, and
attempting to go to a given row won't work right until the vertical
adjustment for the clist reflects reality.

Shove all the code to set the selected and focus rows, and to make said
row visible, into a routine, so the "Find Frame" and "Go To Frame" code
can use it as well.

svn path=/trunk/; revision=1959
2000-05-15 01:50:16 +00:00
Guy Harris d83e4cb58c Add a comment giving the URL of the CIFS Remote Administration Protocol
spec (which covers some of what this file dissects).

Dissect the share type in NetShareEnum replies as a type value (using
values from said spec), not just as a number.

svn path=/trunk/; revision=1958
2000-05-14 20:50:03 +00:00
Guy Harris 3820e1fd77 The argument to a "proto_tree_add_item()" adding an FT_IPv4 item should
be the 32-bit IP address (in host byte order), not a pointer to the
first octet of that IP address.

svn path=/trunk/; revision=1957
2000-05-14 07:19:49 +00:00
Guy Harris e9cc5fa70c Put in some checks to make sure we don't go past the end of the frame
when fetching strings in NetShareEnum and NetServEnum2 replies.

svn path=/trunk/; revision=1956
2000-05-14 04:00:48 +00:00
Guy Harris 37315afd37 In a NetServEnum, there's only one byte of padding after the share name.
(See, for example

	ftp://ftp.microsoft.com/developr/drg/CIFS/cifsrap2.txt

.)

svn path=/trunk/; revision=1955
2000-05-14 03:17:26 +00:00
Gilbert Ramirez 67e584e2a4 Fix location of $(TETHEREAL) dependency.
svn path=/trunk/; revision=1954
2000-05-13 11:34:12 +00:00
Guy Harris a51b2e1ca6 Use "htoles()" rather than "pletohs()" to convert host-byte-order shorts
to little-endian shorts - and to convert host-byte-order longs to
little-endian shorts (if the host-byte-order long will fit into a short,
"htoles()" does the right thing; if it doesn't, there is no right thing
to do - perhaps we should return a wiretap error, although, at least at
present, it's unlikely that we'll have packets bigger than 65535 bytes,
so it's unlikely that the values won't fit into a short).

svn path=/trunk/; revision=1953
2000-05-12 22:12:21 +00:00