Commit Graph

12 Commits

Author SHA1 Message Date
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 9db95664d1 When deciding whether we have enough data in a lower-level packet to
attempt reassembly of a higher-level packet that includes the
lower-level packet, use "tvb_bytes_exist()" to check whether all the
data that's to be included in the reassembly is available, rather than
by checking whether the packet is short.

Add some checks of that sort that were missing.

Use the reported length of the packet when doing reassembly.

Make the "iphdrlen" field of a "packet_info" structure be the length of
the IP header in bytes, not in 4-byte words.

svn path=/trunk/; revision=7274
2003-03-04 06:47:10 +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
Gerald Combs 615a09e861 Don't pass a null string pointer to proto_tree_add_text().
svn path=/trunk/; revision=6752
2002-12-07 03:45:34 +00:00
Guy Harris c5ea448c8e I've seen a capture with a TDS packet type of 18 at the beginning of the
session; treat all packet type values >= 1 and <= 18 as valid packet
types.

Do standard TCP desegmentation of Netlib buffers, and do reassembly of
TDS messages fragmented over multiple Netlib buffers, rather than doing
the "remember what was in the last TCP segment" stuff; I've seen nothing
to indicate that a TDS message would continue past the last byte of a
"last buffer in request or response" Netlib buffer, and the "remember
what was in the last TCP segment" stuff was complicated and buggy,
perhaps irreparably so ("buggy" as in "crashes").

Make the top-level protocol item for a TDS message be an item for
"proto_tds", and put both the Netlib header and TDS stuff under that
item - that's what Microsoft Network Monitor does.

Get rid of the unused Netlib heuristic subdissector list.

Don't make a new data source for NTLMSSP data in a TDS message - the
data is just a slice of the message, it's not transformed from ASCII hex
to binary, or reassembled, or anything such as that.

Tokens are tokens, not PDUs.

Make the heuristics a bit stronger, to reject packets that are clearly
not TDS packets.  Once the heuristics match, make a non-heuristic
dissector the dissector for the conversation.

Quit dissecting the TCP segment (or reassembled data) if we have a
Netlib buffer with a length < 8, as it's not large enough to even have a
Netlib header.

svn path=/trunk/; revision=6737
2002-12-03 08:36:48 +00:00
Guy Harris 6a4cecd753 Update to match what a Sniffer document says about TDS.
svn path=/trunk/; revision=6674
2002-11-26 21:45:28 +00:00
Guy Harris 4b41d87d39 Clean up the comments a bit, to match the way I read the protocol
information at

	http://www.freetds.org/tds.html

and the way the packets seem to work (the description of TDS "PDUs"
actually appears to be a description of items in a TDS server reply PDU,
and I rather strongly suspect that you do *not* have multiple TDS PDUs
in a NETLIB packet), as well as to note that Microsoft Network Monitor
2.x appears to dissect some additional stuff.

Note that if I'm correct we can do desegmentation of NETLIB packets and
reassembly of TDS PDUs rather than the current somewhat clumsy handling
of packets split across segment boundaries.

Put the hf_netlib_xxx variables in the order in which they appear in the
NETLIB header, give hf_netlib_type the "packet_type_names" value_string
table as its value_string table, and actually use it when putting the
NETLIB type field into the protocol tree.

Clear out "nl_data" at the beginning of "dissect_netlib()", as there are
code paths where it does not get set.  (That's a bit of a hack to try to
clean up a crashing bug - but I can't reproduce the crash on my home
FreeBSD PC, so I don't know whether it fixed the problem or not.  If I'm
correct about the way the packets seem to work, the problem can probably
be fixed quite cleanly by tossing out the current split-packet handling
in favor of the reassembly described above.)

svn path=/trunk/; revision=6669
2002-11-23 07:29:10 +00:00
Gerald Combs b823ff306a Clean up the TDS dissector a bit. Change a lot of signed ints to
unsigned, and set their size to match the protocol data assigned to
them.  Make sure the number of columns read doesn't exceed MAX_COLUMNS.
Explicitly check for integer values > 0.  Switch from using memcpy with
tvb_get_ptr to tvb_memcpy.  Make indentation consistent.

Add TDS support to randpkt.  Most of the generated packets won't pass
the heuristic checks, but enough should make it through to adequately
test the dissector.

svn path=/trunk/; revision=6653
2002-11-17 21:47:41 +00:00
Richard Sharpe da3cdd9ce2 Commit patch from Steve Langasek.
svn path=/trunk/; revision=6351
2002-09-28 16:04:03 +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 90ef4c6797 If thou art dissecting a protocol that can have multiple PDUs per frame
and where the PDU header has a length field that is the length of the
entire PDU, including the header, thou shalt not try to loop doing that
if thou findest a packet with a length of zero, lest thou spin in an
infinite loop.

svn path=/trunk/; revision=6031
2002-08-20 02:04:00 +00:00
Jörg Mayer 6bad27d387 Add new dissector by Brian Bruns for the TDS protocol with the
following changes:

- Inserted packet-tds.h This is personal taste because of the many
  files in the toplevel directory. Whoever works on this next is
  free of course to separate it back out again.
- Removed unused includes sys/types.h, snprintf.h, netinet/in.h
- #if-0 unused function
- Removed duplicate define
- Declared all unused parameters as such
- Changed a // comment into /* */
- ifdef-DEBUG a printf statement

svn path=/trunk/; revision=6025
2002-08-19 21:33:29 +00:00