aboutsummaryrefslogtreecommitdiffstats
path: root/packet-tds.c
AgeCommit message (Collapse)AuthorFilesLines
2004-07-18Move dissectors to epan/dissectors directory.Gilbert Ramirez1-1805/+0
Also move ncp222.py, x11-fields, process-x11-fields.pl, make-reg-dotc, and make-reg-dotc.py. Adjust #include lines in files that include packet-*.h files. svn path=/trunk/; revision=11410
2004-07-18Set the svn:eol-style property on all text files to "native", so thatGuy Harris1-1/+1
they have LF at the end of the line on UN*X and CR/LF on Windows; hopefully this means that if a CR/LF version is checked in on Windows, the CRs will be stripped so that they show up only when checked out on Windows, not on UN*X. svn path=/trunk/; revision=11400
2004-07-09Move the redefinition of "isprint()" to be used by dissectors whenGuy Harris1-1/+3
generating strings to put into the printable representation of protocol tree items into an "isprint.h" header, and include it in some additional dissectors. Add bounds checking to one place in the DICOM dissector. svn path=/trunk/; revision=11356
2004-02-20In the columns list in a results token, columns with a type of 106Guy Harris1-1/+5
appear to have 3 extra bytes of stuff before the column name. svn path=/trunk/; revision=10119
2004-02-18Get rid of unused parameter token_sz in function dissect_tds7_results_tokenJörg Mayer1-3/+3
svn path=/trunk/; revision=10082
2004-02-06From Yaniv Kaul:Guy Harris1-3/+29
label each column of a results token; handle types 35, 38, and 104. svn path=/trunk/; revision=9992
2004-02-01From Yaniv Kaul:Guy Harris1-14/+136
add dissection of TDS7 results token and login_ack token; fix a small bug in the login packet dissection; add partial dissection of a query packet. svn path=/trunk/; revision=9952
2004-01-05Handle non-Unicode error tokens.Guy Harris1-11/+38
Error tokens (at least in one capture) appear to have a server name in them; handle that as well. (They also appear to have 3 more bytes of stuff in them.) svn path=/trunk/; revision=9551
2004-01-05From Yaniv Kaul:Guy Harris1-11/+122
add parsing of message token (Unicode and regular); add parsing of error token (Unicode only - do not have a non Unicode sample. Anyone?); add parsing of done token (only minimal actually); add parsing of Collation Information structure in Environment Change token. svn path=/trunk/; revision=9550
2003-12-31If a packet has a packet number of 0, it's not a fragment if the statusGuy Harris1-2/+2
is "last buffer". svn path=/trunk/; revision=9503
2003-12-27Don't defragment packets that aren't fragmented.Guy Harris1-2/+7
Note that we've seen weird sequence numbers for login packets. svn path=/trunk/; revision=9452
2003-08-28Make "process_reassembled_data()" do the check for fragmentation notGuy Harris1-14/+12
being complete and for fragmentation being trivial (i.e., the packet in question is both the first and last fragment). Have its callers *not* do that check - this lets "process_reassembled_data()" put in the "Reassembled in" item for fragments other than the last fragment. Add a "Reassembled in" field to TDS. svn path=/trunk/; revision=8295
2003-08-28It appears that TDS packets do have a sequence number; use that whenGuy Harris1-5/+9
reassembling. svn path=/trunk/; revision=8293
2003-08-28Use "process_reassembled_data()"; this means we get to use common code,Guy Harris1-12/+4
and it means we only dissect the reassembled data for the last frame (so code running through the packet list, and humans clicking on frames, see only one instance of the reassembled data, not multiple instances that might look like retransmissions). svn path=/trunk/; revision=8292
2003-08-27From Yaniv Kaul: fix the dissection of TDS7 login packets, and addGuy Harris1-10/+150
dissection for several fields in that packet. svn path=/trunk/; revision=8288
2003-08-23The FreeTDS TDS document says that the first string in an RPC packet isGuy Harris1-6/+12
a procedure name. svn path=/trunk/; revision=8214
2003-08-23If a Netlib message has "Not last buffer" set, flag it as such in theGuy Harris1-10/+21
Info column, to distinguish it from the message with the last buffer in it. svn path=/trunk/; revision=8213
2003-08-23Add the packet type name for the "Remote Procedure Call Packet" (which IGuy Harris1-25/+55
suspect refers to stored SQL procedures on the server, not to RPCs in the traditional sense), and the beginnings of a routine to dissect those packets (at least as seen in one capture). Don't use "get_unicode_or_ascii_string()", as it really expects to be used inside an SMB dissector, and wants arguments like the "bc" argument. Just use "tvb_fake_unicode()" and "tvb_get_string()", instead. If we're doing reassembly, and the PDU is split across segment boundaries, return after setting the desegmentation offset and length, don't just drive on and dissect the partial PDU. svn path=/trunk/; revision=8210
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