Commit Graph

2760 Commits

Author SHA1 Message Date
Guy Harris 00828b3f2b "dissect_lapb()" is static to "packet-lapb.c", so it can't be directly
called by "dissect_lapbether()".  "packet-lapbether.c" included
"packet-lapb.h", to get "dissect_lapb()" declared, but that header file
doesn't exist.

Dissectors should call other dissectors indirectly, so have the LAPB
dissector register itself and have the LAPB-over-Ethernet dissector get
that handle and call the LAPB dissector through that handle, rather than
making the LAPB dissector non-static and adding a "packet-lapb.h" header
to declare it.

Remove some unnecessary includes from "packet-lapbether.c".

svn path=/trunk/; revision=2799
2000-12-29 02:27:21 +00:00
Guy Harris 1d3ed65598 Tvbuffify the IMAP dissector.
svn path=/trunk/; revision=2798
2000-12-29 02:19:14 +00:00
Richard Sharpe b226f348ad Modify X.25 dissector to accept a search string of x.25 and ex.25, not x25 and ex25.
svn path=/trunk/; revision=2797
2000-12-29 01:27:35 +00:00
Richard Sharpe d481cd7b3f Added a LAPBETHER dissector as per Guy's wishes ... :-)
Damn, took more than half an hour :-(

svn path=/trunk/; revision=2796
2000-12-29 01:06:24 +00:00
Guy Harris bc40aeeade When creating a subset tvbuff with lengths that don't run to the end of
the parent tvbuff, we have to set "pinfo->len" and "pinfo->captured_len"
unless we know for certain that *no* old-style dissectors will be called
later, because old-style dissectors get their length information from
"pi.len" and "pi.captured_len".

svn path=/trunk/; revision=2795
2000-12-29 00:51:52 +00:00
Guy Harris 3e876653f3 Tvbuffify the PPTP dissector.
svn path=/trunk/; revision=2794
2000-12-29 00:35:51 +00:00
Guy Harris 11e59a0078 Updates from Ed Warnicke.
svn path=/trunk/; revision=2793
2000-12-28 10:10:17 +00:00
Guy Harris d13901155d Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.

Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.

Fix the handling of the checksum field in the CDP dissector.

The strings in CDP are counted, not null-terminated; treat them as such.

Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.

svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
Jun-ichiro itojun Hagino f69876eece >This patch adds a missing capabilities NOTIFICATION message, and support for
>RFC2385 (Protection of BGP Sessions via the TCP MD5 Signature Option).
From: Greg Hankins <gregh@twoguys.org>

svn path=/trunk/; revision=2791
2000-12-28 05:13:14 +00:00
Guy Harris 4f5e161fe2 It turns out that the read timeout in Solaris's "bufmod" STREAMS module
doesn't work like the read timeout in BPF - the timer doesn't start
until at least one packet has arrived.

I think that's the way read timeouts should work on *all* packet capture
mechanisms, but it does mean that Solaris will, on a quiet net, exhibit
the same symptoms that Linux used to exhibit before we put in a
"select()" call to wait until either packets arrive or a timer expires -
the "pcap_dispatch()" call blocks until a packet arrives, so the display
doesn't get updated and Ethereal doesn't respond to user input until a
packet arrives.

Furthermore, Linux isn't the only OS that lacks any read timeout
on its packet capture mechanism; the others will also have that problem.

We therefore do the "select()" on *all* platforms other than the BSDs
(where the timer starts when the read is done, and can be used for
polling); I don't know whether it's necessary on Digital UNIX, but I
suspect it's necessary on SunOS 4.x (as the 5.x "bufmod" is probably
derived from the 4.x one, and the 5.x one, as per the above, starts the
timer when a packet arrives), and it may even be necessary on 3.x, those
(BSD, SunOS including 5.x, and Digital UNIX) apparently being the only
UNIXes that appear to have such a read timeout.

svn path=/trunk/; revision=2790
2000-12-28 01:44:19 +00:00
Guy Harris 9474f32fbf Always put the packet type in the Info column.
svn path=/trunk/; revision=2789
2000-12-28 00:44:49 +00:00
Guy Harris f6782c1ebe If the capture child process exits unexpectedly, give more information
on it, such as the exit status if it exited "normally" but unexpectedly.

On UNIX systems, #define the various POSIX <sys/wait.h> macros (and the
non-POSIX WCOREDUMP()" macro) if they're not defined by <sys/wait.h> (or
if we don't have <sys/wait.h>), and use them to dissect the exit status.

svn path=/trunk/; revision=2788
2000-12-27 22:35:48 +00:00
Guy Harris 11b24c6094 Tvbuffify the RIP and OSPF dissectors.
Change them to use facilities in Ethereal that were probably not present
when they were originally written, e.g. routines to fetch 24-bit
integers and to dump a bunch of raw bytes in hex.

Redo them to extract data from the packet as they dissect it, rather
than extracting an entire data structure at once; that way, it may be
able to dissect a structure not all of which is in the packet.

Dissect a bit more of the type-of-service metrics etc. in OSPF packets.

Make "tvb_length_remaining()" return a "gint", not a "guint"; it returns
-1 if the offset is past the end of the tvbuff.

Add a "tvb_reported_length_remaining()" routine, similar to
"tvb_length_remaining()".  Use it instead of just subtracting an offset
from "tvb_reported_length()".

svn path=/trunk/; revision=2787
2000-12-27 12:48:27 +00:00
Guy Harris 7e8b1d3a10 Get rid of extra blanks in strings.
"tvb_length_remaining()" will return -1 if the offset argument is past
the end of the tvbuff; check for values > 0, not values != 0, when
checking to see if there's extra garbage at the end of the packet.

svn path=/trunk/; revision=2786
2000-12-27 12:38:08 +00:00
Nathan Neulinger 79434f2dcf added KRB-ERROR response dissection
svn path=/trunk/; revision=2785
2000-12-26 16:44:43 +00:00
Nathan Neulinger 5242bfc924 add tethereal_static
svn path=/trunk/; revision=2784
2000-12-26 16:44:16 +00:00
Guy Harris d46aa3d576 Add a new "tvb_strsize()" routine, which finds the size of a
NUL-terminated string, starting at a given offset.  The size includes
the terminating NUL.  If it doesn't find the terminating NUL, it throws
the appropriate exception, as either there's no terminating NUL in the
packet or there is but it's past the end of the captured data in the
packet.

Use that routine in the TFTP dissector.  As it throws an exception if
the string isn't NUL-terminated, we can just use "%s" to print option
strings; we don't need to use "%.*s" with a string length.

svn path=/trunk/; revision=2783
2000-12-25 23:48:16 +00:00
Guy Harris cac14407f4 Preferences shouldn't supposed to have blanks in their names - it can
make it a bit of a pain to set their values on the command line (you
have to quote the name).  Use underscores instead.

Give the gateway and callagent port preferences different names.

Fix up the text descriptions and labels for those preferences.

svn path=/trunk/; revision=2782
2000-12-25 09:37:35 +00:00
Guy Harris 6de8fb2070 If a PrincipalName has at least one name-string, put the first of the
name strings into the top-level tree item for the PrincipalName, along
the lines of what was done earlier.

svn path=/trunk/; revision=2781
2000-12-25 06:59:33 +00:00
Jun-ichiro itojun Hagino b56e34d396 bgp route refresh/MP capability option.
Greg Hankins <gregh@twoguys.org>

svn path=/trunk/; revision=2780
2000-12-25 05:28:40 +00:00
Nathan Neulinger 9314e65702 Added kerberos name types and lookup in PrincName dissect
Cipher: to CipherText:
ETYPE to ENCTYPE to agree with krb5 headers
Added additional preauth types

svn path=/trunk/; revision=2779
2000-12-24 22:00:55 +00:00
Guy Harris a184a9d612 Add a "tftp_strnlen()" routine that
1) checks to make sure that the terminating '\0' is found in the
	   string, and throws a BoundsError exception if it isn't (TFTP
	   packets should fit in a single frame, so if the '\0' isn't
	   found, that's an error);

	2) adds 1 to the length to include the trailing '\0';

and use it to find all string lengths, so that we properly handle short
or malformed frames.

svn path=/trunk/; revision=2778
2000-12-24 20:33:04 +00:00
Guy Harris 60f9476740 Rename "asn1_octet_string_value_decode()" to
"asn1_string_value_decode()", as it can be used for various character
string types as well.

Turn "asn1_octet_string_decode()" into "asn1_string_decode()", which
takes an additional argument giving the tag expected for the string in
question, and make "asn1_octet_string_decode()" a wrapper around it.

Clean up the ASN.1 dissection in the Kerberos dissector, making more use
of the code in "asn1.c", wrapping more operations up in macros, and
doing some more type checking.

Use "REP" rather than "RESP" in names and strings; "REP" is what the
Kerberos spec uses.

Make the routines in the Kerberos dissector not used outside that
dissector static.

Fix some problems with the dissection of strings in the Kerberos
dissector (it was extracting the data from the wrong place in the
packet).

In Kerberos V5, the "kvno" item in the EncryptedData type is optional;
treat it as such.

Treat integers as unsigned in the Kerberos dissector.

svn path=/trunk/; revision=2777
2000-12-24 09:10:12 +00:00
Guy Harris 57e4216961 Report the holding time of a CLNP packet, in seconds, as seconds plus
fractions of a second (the resolution is 1/2 second).

In the bitfield breakdown of the flags/type field of a CLNP PDU, report
the PDU type as a name rather than as an abbreviation.

svn path=/trunk/; revision=2776
2000-12-23 23:06:50 +00:00
Guy Harris 03d721afc2 Show the type/flags byte of a CLNP PDU with a subtree dissecting the
bits.

svn path=/trunk/; revision=2775
2000-12-23 21:40:22 +00:00
Guy Harris 2536d27ed3 On Linux, try to open the "any" device and, if we can open it, add it to
the end of the list of interfaces on which you can capture.

svn path=/trunk/; revision=2774
2000-12-23 19:50:36 +00:00
Guy Harris 9689805893 Dissect the payload of a CLNP ER packet as a CLNP packet, so you know
what the offending packet was.

svn path=/trunk/; revision=2773
2000-12-23 19:34:46 +00:00
Guy Harris 039805843b Add support for the DLT_LINUX_SLL capture type in the current CVS
version of libpcap; that's used on Linux for captures on the "any"
device (which captures from all interfaces simultaneously) and for
captures on devices whose link-layer type libpcap doesn't (yet) support
natively.

The spanning tree code, when checking for GV{M,R,...}P packets, must
first check whether the link-layer destination address is, in fact, an
Ethernet-style address; on Linux cooked captures, there *is* no
destination address, so it's of type AT_NONE, not AT_ETHER.

svn path=/trunk/; revision=2772
2000-12-23 08:06:16 +00:00
Nathan Neulinger d9c2256fa2 fix '#endif FRED' to '#endif /* FRED */'
svn path=/trunk/; revision=2771
2000-12-22 22:26:19 +00:00
Nathan Neulinger e7c08b87ae added a couple of msg types - in particular - ERROR response
svn path=/trunk/; revision=2770
2000-12-22 21:43:53 +00:00
Nathan Neulinger aa1cf7209e added tethereal_static target
svn path=/trunk/; revision=2769
2000-12-22 15:55:36 +00:00
Gilbert Ramirez fe8e42b58e Enable FT_BYTES dfiltering, from Ed Warnicke.
svn path=/trunk/; revision=2768
2000-12-22 12:05:38 +00:00
Gilbert Ramirez bb279839f6 Bug fixes from Ed Warnicke.
svn path=/trunk/; revision=2767
2000-12-20 05:45:27 +00:00
Gilbert Ramirez 5c80670524 Call CHECK_DISPLAY_AS_DATA() for proto_ftp_data as well.
svn path=/trunk/; revision=2766
2000-12-19 02:57:49 +00:00
Guy Harris b5b2fbe783 X.25 over TCP support, from Paul Ionescu.
Also, update his e-mail address.

svn path=/trunk/; revision=2765
2000-12-17 07:38:14 +00:00
Richard Sharpe 8c47761ae4 Patches to prevent problems under Windows when time formats are negative.
Make sure that if _gtime is null, a bad format message returned.

Also noticed that I am going to have to do something about Unicode strings soon and the SMBopenX dissect is slightly wrong ... Oh well, it is the Xmas break soon :-) No rest for the Wicca'd (please don't interpret that as a statement of my religious affiliation, it is just a cute saying :-)

svn path=/trunk/; revision=2764
2000-12-17 03:48:44 +00:00
Gilbert Ramirez 297e84fc24 Match Selected works better with FT_STRING variables.
From Ed Warnicke <hagbard@physics.rutgers.edu>

svn path=/trunk/; revision=2763
2000-12-15 13:53:11 +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
Guy Harris ada46b7434 Check the checksum on GRE packets, if possible and if the Checksum
Present flag is set.

svn path=/trunk/; revision=2761
2000-12-15 00:03:09 +00:00
Guy Harris 0f68b651b1 Check the checksum on OSPF packets, if possible.
svn path=/trunk/; revision=2760
2000-12-14 22:23:15 +00:00
Guy Harris 4f140107f9 Check the checksum on ICMPv6 packets, if possible.
svn path=/trunk/; revision=2759
2000-12-14 21:45:12 +00:00
Guy Harris d11a675ff5 Fix a typo in a comment.
svn path=/trunk/; revision=2758
2000-12-14 21:44:01 +00:00
Guy Harris 93975466e6 Set the "fragmented" field of the "packet_info" structure based on
whether the packet has any fragmentation headers or not.

svn path=/trunk/; revision=2757
2000-12-14 18:56:22 +00:00
Gilbert Ramirez 80237dcb08 Include winsock.h on windows so that htons will be defined.
svn path=/trunk/; revision=2756
2000-12-14 17:51:51 +00:00
Guy Harris e9904948d6 Mobile IPv6 support, from Martti Kuparinen.
svn path=/trunk/; revision=2755
2000-12-14 08:35:08 +00:00
Guy Harris 13ca5c39d7 PPP patches from Burke Lau to:
add FCS checking;

	support Cisco HDLC format in the PPP dissector;

	handle MPLS-over-PPP.

svn path=/trunk/; revision=2754
2000-12-14 08:20:31 +00:00
Ashok Narayanan 33474c33cc Added support for Router-Alert IP option (RFC2113)
svn path=/trunk/; revision=2753
2000-12-13 16:38:20 +00:00
Guy Harris 1eaedf15b5 Don't check the checksum of ICMP datagrams that are fragmented
(unlikely, perhaps even forbidden, but not impossible).

svn path=/trunk/; revision=2752
2000-12-13 02:43:32 +00:00
Guy Harris 677a1c6dc2 Add code to check the checksums of TCP segments and UDP datagrams;
replace the existing checksummer with a modified version of the BSD
checksumming code.  Add a flag to the "packet_info" structure to
indicate that a packet is the first fragment of a fragmented datagram,
so that the checksummers won't try to checksum those.

(It doesn't seem to add a lot of CPU overhead, so we don't introduce a
flag to disable it, yet.  Further checks may be necessary to see whether
the overhead is just swamped by other overheads when scanning through a
capture dissecting all frames, or if it truly is negligible.)

Make the Boolean preference option controlling whether to make the
top-level protocol tree item for TCP display a packet summary static to
the TCP dissector (it doesn't need to be accessible outside the TCP
dissector).

svn path=/trunk/; revision=2751
2000-12-13 02:24:23 +00:00
Jun-ichiro itojun Hagino 10022aee67 print message ID in isakmp header
svn path=/trunk/; revision=2750
2000-12-12 09:57:05 +00:00