Commit graph

199 commits

Author SHA1 Message Date
Guy Harris
836b7ccb6b Clean out the correct hash table.
svn path=/trunk/; revision=8024
2003-07-16 00:04:21 +00:00
Guy Harris
0c88f96ca0 Add a routine "dissect_ipv6_options()" that works like
"dissect_ip_tcp_options()" but for options that are like IPv6 options
(i.e., the length byte has a value that doesn't include the option code
or length byte).

Add an "ip_opts.h" header to declare it, and move the declaration of
stuff used by it and "dissect_ip_tcp_options()", and the declaration of
"dissect_ip_tcp_options()", to that header.

Use "dissect_ipv6_options()" for Mobile IPv6 options.

Get rid of the unused "mip6_opt_types[]" array in "packet-mip6.h".

svn path=/trunk/; revision=8015
2003-07-11 09:30:49 +00:00
Guy Harris
833b1d2d0d Put in a comment noting that we might not want to process the payload of
a TCP segment, and probably don't want to hand the segment to a TCP tap,
if the TCP segment is included in an error packet.

svn path=/trunk/; revision=7780
2003-06-04 08:45:10 +00:00
Guy Harris
524a84b5e9 If the reported length of the TCP packet is less than the TCP header
length, we can't get the segment length (although we can at least try to
dissect the header).  If that's the case, put in Ronnie's "short
segment" note.

Also, put into the information we pass to TCP taps an indication of
whether the segment length is valid or not.

svn path=/trunk/; revision=7705
2003-05-21 06:28:03 +00:00
Guy Harris
3847052a87 If we're inside an error packet, don't assume we know the length of the
TCP segment, as we might not have the entire segment.

svn path=/trunk/; revision=7704
2003-05-21 05:57:24 +00:00
Guy Harris
5bd844f8b4 If we were handed a fragmented packet, don't do anything that depends on
knowing the actual length of the packet, as we don't know that length
(IP fragments don't contain the length of the full packet - you don't
know how big the reassembled packet is until you reassemble it).

We don't have to worry about dissecting the TCP header in them, though.

svn path=/trunk/; revision=7703
2003-05-21 05:43:27 +00:00
Ronnie Sahlberg
49b51db7f2 Do not decode the full tcp header if the reported length is less than 20
or the reported tcp header length.
This is probably caused either by a very very short capture length or by
nmap or someone playing firewall fragment games to the tcp flags field.

svn path=/trunk/; revision=7698
2003-05-20 10:14:20 +00:00
Ronnie Sahlberg
926c61b11c Update the tcp sequence analysis to understand and decode properly
the rather brilliant keep-alive packets solaris use.

Solaris does not do RFC793 keepalives at all, instead they do a quite
brilliant workalike that gies them reliable keepalives.

svn path=/trunk/; revision=7685
2003-05-16 10:35:19 +00:00
Ronnie Sahlberg
cb5e97d49a Update to TCP to handle hints from dissectors where the next PDU may start.
ONCRPC dissector updated to provide hint to TCP where the next RPCoverTCP
PDU starts as example.
Trivial updates to the other TCP based protocols required to amke them handle
this as well.  See the updates to packet-rpc.c as an example.

This is enabled by activating tcp analysis and provides hints to TCP to know where PDUs starts when not aligned to the start of the segment.

svn path=/trunk/; revision=7543
2003-04-23 10:20:29 +00:00
Guy Harris
d359286841 Add a pointer to an hf_ value for a "reassembled_in" field (which can be
null) to the "fragment_items" structure, and don't pass that value into
"process_reassembled_data()", just have it use the value in the
"fragment_items" structure passed to it.

Make "process_reassembled_data()" capable of handling reassembly done by
"fragment_add_seq_check()", and use it in the ATP and 802.11 dissectors;
give them "reassembled_in" fields.  Make "process_reassembled_data()"
handle only the case of a completed reassembly (fd_head != NULL) so that
we can use it in those dissectors without gunking the code up too much.

svn path=/trunk/; revision=7513
2003-04-20 11:36:16 +00:00
Guy Harris
15fdb273f7 Use FT_FRAMENUM for the "Duplicate to the ACK in frame" and "This is an
ACK to the segment in frame" fields, so you can use the "Go To
Corresponding Frame" menu item.

svn path=/trunk/; revision=7379
2003-03-27 19:55:59 +00:00
Ronnie Sahlberg
eb5be58c63 Enhancement to TCP Sequence Analysis
Duplicate ACKs that are detected/suspected are now also flagged
with which frame the original ACK was seen in and the dup ack number.

This is displayed both in the summary pane as well as in the tree pane.

svn path=/trunk/; revision=7375
2003-03-27 09:40:27 +00:00
Ronnie Sahlberg
886cbe2321 Fixed a small bug in tcp sequence number analysis.
FIN flag would previously only add one to the sequence number if the
FIN packet was empty, i.e. did not carry any payload data.

This caused ethereal to incorrectly flag the ACK to such packets
(FIN+payload data) to be incorrectly flagged as
ACK to previously lost segment.

Change the algorithm to always add 1 to the segment length, and thus the sequence number for all packets with teh FIN bit set.

svn path=/trunk/; revision=7371
2003-03-26 08:00:24 +00:00
Guy Harris
05c41a279f Use the reported length, not the captured length, as the fragment length
when doing reassembly.

In some additional places, use "tvb_bytes_exist()" to check whether we
have enough data to do reassembly, rather than checking to see if the
frame is short (it might be short but we might still have enough data to
do reassembly).

In DCE RPC, use the fragment length from the header as the number of
bytes of fragment data.

There's no need to check "pinfo->fragmented" before doing reassembly in
the DCERPC-over-SMB-pipes code - either we have all the data or we
don't.

In SNA and WTP reassembly, add a check to make sure we have all the data
to be reassembled.

svn path=/trunk/; revision=7282
2003-03-05 07:17:50 +00:00
Richard Sharpe
9a57223add Pretty up the handling of SACK. Have tested now, looks OK.
svn path=/trunk/; revision=7273
2003-03-04 04:36:44 +00:00
Ronnie Sahlberg
192d29fa4d Update for tethereal -z io,users, top talkers :
"tcpip" added.

-z io,users,tcpip will create a top talkers list of individual tcpip connections

svn path=/trunk/; revision=7264
2003-03-03 23:20:59 +00:00
Richard Sharpe
8cc3f3f791 Add SACK leftedge and rightedge filtering ... Added them as decimal
values which seemed appropriate, but had the split them into two items
in the option tree.

svn path=/trunk/; revision=7260
2003-03-03 03:16:36 +00:00
Richard Sharpe
49a425956b As suggested by Guy, rather than add_uint_hidden, and then add_text,
do an add_uint_format(...). It was all too easy.

svn path=/trunk/; revision=7259
2003-03-03 02:59:23 +00:00
Richard Sharpe
7195b02fdf Allow filtering on the window scale value ...
svn path=/trunk/; revision=7236
2003-03-01 08:57:36 +00:00
Richard Sharpe
6efccea066 Adding more options support
svn path=/trunk/; revision=7235
2003-03-01 08:51:12 +00:00
Richard Sharpe
2af80f5309 Add tcp.options.mss_val to allow filtering on the value of the MSS option
svn path=/trunk/; revision=7233
2003-03-01 08:28:59 +00:00
Richard Sharpe
40e7a4f08f Some more options, cc and time stamp.
svn path=/trunk/; revision=7232
2003-03-01 07:15:04 +00:00
Richard Sharpe
41f3a9df0c More tcp options stuff ...
svn path=/trunk/; revision=7231
2003-03-01 07:07:07 +00:00
Richard Sharpe
e8b4840c75 More TCP Options support
svn path=/trunk/; revision=7230
2003-03-01 05:02:53 +00:00
Richard Sharpe
6470c4a962 Start adding support for options as hidden fields in the dissect tree.
svn path=/trunk/; revision=7228
2003-03-01 04:24:40 +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
d8629a2747 Protect against wraparound when scanning through a bunch of TCP data in
"tcp_dissect_pdus()".

svn path=/trunk/; revision=7179
2003-02-21 00:22:45 +00:00
Guy Harris
63bd8087e5 From Didier Gautheron: fix desegmentation code to handle sequence number
overflow.

svn path=/trunk/; revision=7169
2003-02-18 21:37:53 +00:00
Guy Harris
231f28ce08 Panic if a preference starts with the name of the module to which it
belongs, as that's redundant.

Fix a bunch of cases where that was done, and map the old name to the
new name.

Instead of marking "mtp3.mtp3_standard" as obsolete, map it to
"mtp3.standard".

svn path=/trunk/; revision=7030
2003-01-28 23:56:40 +00:00
Ronnie Sahlberg
e4633bc783 Update reassemble.c/show_item and all callers to use FT_FRAMENUM for the list of packets corresponding to a reassembled pdu
svn path=/trunk/; revision=6807
2002-12-19 11:22:38 +00:00
Ronnie Sahlberg
1027314b99 From Jason House, support for TAPping from TCP protocol
svn path=/trunk/; revision=6792
2002-12-17 11:49:32 +00:00
Guy Harris
59932f2722 Don't cast away constness, and fix variable and structure member
qualifiers as necessary to ensure that we don't have to.

"strcmp()", "strcasecmp()", and "memcmp()" don't return booleans; don't
test their results as if they did.

Use "guint8", not "guchar", for a pointer to (one or more) 8-bit bytes.

Update Michael Tuexen's e-mail address.

svn path=/trunk/; revision=6726
2002-12-02 23:43:30 +00:00
Guy Harris
5620a882ec Check whether we got an overflow for the PDU length *before* we check
whether we have that much data.

svn path=/trunk/; revision=6675
2002-11-27 04:55:23 +00:00
Ronnie Sahlberg
926433a151 Must use the proper proto_tree_add_... call for FT_NONE
svn path=/trunk/; revision=6577
2002-11-07 09:10:06 +00:00
Ronnie Sahlberg
2378b2a893 hf_index update for TCP
svn path=/trunk/; revision=6576
2002-11-07 08:51:07 +00:00
Ronnie Sahlberg
ee9c00c024 Fixed small bug in TCP seq/ack analysis. Forgot to check a pointer for NULL which caused crashes sometimes.
svn path=/trunk/; revision=6546
2002-11-02 22:00:17 +00:00
Ronnie Sahlberg
707f06ccc2 Three more things for TCP seq/ack analysis to check for and flag:
ZeroWindow:   ZeroWindow segments are detected and flagged
  ZeroWindowProbe: detected and flagged
  ZeroWindowViolation:  attempts to write >1 byte of data to a zerowindow is detected and flagged.

svn path=/trunk/; revision=6543
2002-11-01 11:05:37 +00:00
Ronnie Sahlberg
f4ecf268aa Update to TCP seq/ack analysis: tcp seq/ack analysis should now be able to
detect suspected duplicate ACKs.

svn path=/trunk/; revision=6542
2002-11-01 10:25:35 +00:00
Guy Harris
5b77ebc32d From Ronnie Sahlberg: use the frame number of a TCP segment, rather than
its starting sequence number, as the "fragment ID" when reassembling,
and include the source and destination port numbers in a
"tcp_segment_key" structure and use that as part of the key in the hash
table for segments, so that we don't get spoofed by segments in two
directions in the same conversation, or by segments in two separate
conversations between the same hosts, having the same starting sequence
number (which is not unlikely to happen if relative sequence numbers are
being used).

svn path=/trunk/; revision=6443
2002-10-17 02:19:29 +00:00
Ronnie Sahlberg
3832f2a8c2 From Didier: bugfix for sequence number wrapping
svn path=/trunk/; revision=6303
2002-09-18 12:08:28 +00:00
Ronnie Sahlberg
eef506e467 fix for the fix
svn path=/trunk/; revision=6274
2002-09-11 09:52:36 +00:00
Ronnie Sahlberg
b8769cdfa9 Tiny change to the tcp seq/ack analysis.
If the addresses are equal, compare the ports with '>' instead of '-'
since '>' will work regardless of whether the values are unsigned or not.

svn path=/trunk/; revision=6268
2002-09-11 09:08:07 +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
4047c3caeb Properly display the window scale option.
svn path=/trunk/; revision=6065
2002-08-22 19:47:15 +00:00
Guy Harris
23029e96e0 "CMP_ADDRESS()" is not guaranteed to return 0, 1, or -1, it's just
guaranteed to return 0, a positive number, or a negative number, based
on the result of the comparison.  Furthermore, if it returns 0, meaning
the source and destination addresses are the same, we have to look at
the port numbers to decide which side of the conversation the frame is
from.

svn path=/trunk/; revision=6064
2002-08-22 19:40:03 +00:00
Ronnie Sahlberg
e09e2a2754 Create a subtree with an item "tcp.analysis.flags" to keep all
tcp sequence number analysis flags, such as retransmission , lost-segment, etc
to make it easier to search for all these conditions.

svn path=/trunk/; revision=6056
2002-08-21 23:57:38 +00:00
Tim Potter
60e4ca9c4f Moved the generic true_false_string saying "Set", "Not set" into
epan/packet.c

It was cut and pasted into seven other dissectors!

svn path=/trunk/; revision=6052
2002-08-21 21:25:23 +00:00
Ronnie Sahlberg
a1c846ba48 Reverted part of the previous patch. It seemed we found a few too many
packets to display the ACK data for.

svn path=/trunk/; revision=6008
2002-08-17 22:26:00 +00:00
Ronnie Sahlberg
12a0b53183 Fixed bug not handling FIN pakcets properly.
Fixed another tiny bug where it would forget to check ACKs outside the window
sometimes.

svn path=/trunk/; revision=6001
2002-08-16 20:59:18 +00:00
Jörg Mayer
6a1666b35d Add sequence number wrap to tcp window checking.
svn path=/trunk/; revision=5945
2002-08-03 23:20:06 +00:00