aboutsummaryrefslogtreecommitdiffstats
path: root/packet-tds.c
AgeCommit message (Collapse)AuthorFilesLines
2003-04-20Add a pointer to an hf_ value for a "reassembled_in" field (which can beGuy Harris1-1/+2
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-03-04When deciding whether we have enough data in a lower-level packet toGuy Harris1-2/+2
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
2002-12-19Update reassemble.c/show_item and all callers to use FT_FRAMENUM for the ↵Ronnie Sahlberg1-3/+3
list of packets corresponding to a reassembled pdu svn path=/trunk/; revision=6807
2002-12-07Don't pass a null string pointer to proto_tree_add_text().Gerald Combs1-5/+6
svn path=/trunk/; revision=6752
2002-12-03I've seen a capture with a TDS packet type of 18 at the beginning of theGuy Harris1-607/+598
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-11-26Update to match what a Sniffer document says about TDS.Guy Harris1-23/+77
svn path=/trunk/; revision=6674
2002-11-23Clean up the comments a bit, to match the way I read the protocolGuy Harris1-27/+65
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-17Clean up the TDS dissector a bit. Change a lot of signed ints toGerald Combs1-72/+75
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-09-28Commit patch from Steve Langasek.Richard Sharpe1-9/+129
svn path=/trunk/; revision=6351
2002-08-28Removed trailing whitespaces from .h and .c files using theJörg Mayer1-73/+73
winapi_cleanup tool written by Patrik Stridvall for the wine project. svn path=/trunk/; revision=6117
2002-08-20If thou art dissecting a protocol that can have multiple PDUs per frameGuy Harris1-1/+4
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-19Add new dissector by Brian Bruns for the TDS protocol with theJörg Mayer1-0/+1116
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