aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-tds.c
AgeCommit message (Collapse)AuthorFilesLines
2012-12-26Fix a bunch of warnings.Guy Harris1-12/+12
Cast away some implicit 64-bit-to-32-bit conversion errors due to use of sizeof. Cast away some implicit 64-bit-to-32-bit conversion errors due to use of strtol() and strtoul(). Change some data types to avoid those implicit conversion warnings. When assigning a constant to a float, make sure the constant isn't a double, by appending "f" to the constant. Constify a bunch of variables, parameters, and return values to eliminate warnings due to strings being given const qualifiers. Cast away those warnings in some cases where an API we don't control forces us to do so. Enable a bunch of additional warnings by default. Note why at least some of the other warnings aren't enabled. randpkt.c and text2pcap.c are used to build programs, so they don't need to be in EXTRA_DIST. If the user specifies --enable-warnings-as-errors, add -Werror *even if the user specified --enable-extra-gcc-flags; assume they know what they're doing and are willing to have the compile fail due to the extra GCC warnings being treated as errors. svn path=/trunk/; revision=46748
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-3/+1
svn path=/trunk/; revision=45017
2012-09-10Initial commit to support yet another method of passing data between dissectors.Jakub Zawadzki1-1/+1
Add new parameter 'data' to heur_dissector_t and new_dissector_t, for now it's always NULL svn path=/trunk/; revision=44860
2012-09-07From Robert Bullen via ↵Jeff Morriss1-1/+3
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7683 : The reassembled fragments tree in the Packet Details view is awesome, but it lacks one thing: a field that exposes the reassembled data. tcp.data already exists for exposing a single TCP segment's payload as a byte array. It would be handy to have something similar for a single application layer PDU when TCP segment reassembly is involved. I propose tcp.reassembled.data, named and placed after the already existing field tcp.reassembled.length. My primary use case for this feature is outputting tcp.reassembled.data with tshark for further processing with a script. The attached patch implements this very feature. Because the reassembled fragment tree code is general purpose, i.e. not specific to just TCP, any dissector that relies upon it can add a similar field very cheaply. In that vein I've also implemented ip.reassembled.data and ipv6.reassembled.data, which expose reassembled fragment data as a single byte stream for IPv4 and IPv6, respectively. All other protocols that use the reassembly code have been left alone, other than inserting NULL into their initializer lists for the newly introduced struct field reassemble.h:fragment_items.hf_reassembled_data. svn path=/trunk/; revision=44802
2012-08-27Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7622 :Pascal Quantin1-39/+105
Fix dissection of a few TDS fields (line number in ERR and MSG token, user type in RESULTS token, row count in DONE token) when the TDS version is >= 7.2. Add a mechanism to memorize the TDS 7.X version in the conversation based on the TDS version found in LOGIN ACK token. This version is used for dissection when a TDS version is not set in preferences (TDS protocol type set to "not specified"). svn path=/trunk/; revision=44684
2012-08-10Use val_to_str_const() where appropriate;Bill Meier1-7/+7
Also (for a few files): - create/use some extended value strings; - remove unneeded #include files; - remove unneeded variable initialization; - re-order fcns slightly so prefs_reg_handoff...() at end, etc svn path=/trunk/; revision=44438
2012-08-10convert some simple uses to use ephemeral memoryMichael Mann1-2/+1
svn path=/trunk/; revision=44413
2012-07-22Update display filter names per Bug 2794. Part 1 of many.Michael Mann1-12/+12
svn path=/trunk/; revision=43907
2012-06-28Update FSF address - part II.Jakub Zawadzki1-1/+1
svn path=/trunk/; revision=43538
2012-06-24FT_FLOAT and FT_DOUBLE share the same comparison functions -> use same ↵Pascal Quantin1-1/+1
filter name svn path=/trunk/; revision=43460
2012-06-23Do not use same name for filters with incompatible typesPascal Quantin1-11/+11
svn path=/trunk/; revision=43450
2012-05-15Remove unneeded #includes (stdlib, stdio, ctypes, time);Bill Meier1-3/+2
In a few cases: do some whitespace, indentation cleanup & reformatting. svn path=/trunk/; revision=42632
2012-03-31Fix off by one shift errors introduced in r39530 where it seemed proper[1]Jakub Zawadzki1-20/+24
[1] I'm unsure of packet-dtpt, so I haven't patch it. svn path=/trunk/; revision=41873
2011-10-23Replace use of tvb_get_ephemeral_faked_unicode() by use of ↵Bill Meier1-18/+18
tvb_get_ephemeral_unicode_string(); Fix encoding arg as needed. svn path=/trunk/; revision=39530
2011-10-23Fix a few proto_tree_add_item() encoding args.Bill Meier1-1/+1
svn path=/trunk/; revision=39519
2011-10-21For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.Bill Meier1-2/+2
Also: remove trailing whitespace for a number of files. svn path=/trunk/; revision=39503
2011-10-16Do some conversions of proto_tree_add_item() 'encoding' arg.Bill Meier1-2/+2
(previously missed). 57 FT_BOOLEAN: FALSE-->ENC_BIG_ENDIAN 31 FT_BOOLEAN: TRUE-->ENC_LITTLE_ENDIAN 10 FT_BYTES: ENC_BIG_ENDIAN-->ENC_NA 1 FT_BYTES: ENC_LITTLE_ENDIAN-->ENC_NA 21 FT_BYTES: FALSE-->ENC_NA 2 FT_BYTES: TRUE-->ENC_NA 2 FT_IPXNET: ENC_BIG_ENDIAN-->ENC_NA 6 FT_IPv6: ENC_BIG_ENDIAN-->ENC_NA 1 FT_IPv6: FALSE-->ENC_NA 6 FT_NONE: ENC_BIG_ENDIAN-->ENC_NA 19 FT_NONE: FALSE-->ENC_NA 3 FT_NONE: TRUE-->ENC_NA 1 FT_STRING: ENC_BIG_ENDIAN-->ENC_ASCII|ENC_NA 1 FT_STRING: ENC_LITTLE_ENDIAN-->ENC_ASCII|ENC_NA 5 FT_STRING: FALSE-->ENC_ASCII|ENC_NA 1 FT_STRING: TRUE-->ENC_ASCII|ENC_NA 4 FT_STRINGZ: ENC_NA-->ENC_ASCII|ENC_NA 8 FT_STRINGZ: FALSE-->ENC_ASCII|ENC_NA 1 FT_INT32: FALSE-->ENC_BIG_ENDIAN 1 FT_INT32: TRUE-->ENC_LITTLE_ENDIAN 11 FT_UINT8: 0-->ENC_BIG_ENDIAN 111 FT_UINT8: FALSE-->ENC_BIG_ENDIAN 17 FT_UINT8: TRUE-->ENC_LITTLE_ENDIAN 1 FT_UINT16: 0-->ENC_BIG_ENDIAN 68 FT_UINT16: FALSE-->ENC_BIG_ENDIAN 18 FT_UINT16: TRUE-->ENC_LITTLE_ENDIAN 4 FT_UINT24: FALSE-->ENC_BIG_ENDIAN 70 FT_UINT32: FALSE-->ENC_BIG_ENDIAN 1 FT_UINT32: TRUE-->ENC_LITTLE_ENDIAN 4 FT_UINT64: FALSE-->ENC_BIG_ENDIAN 1 FT_UINT64: TRUE-->ENC_LITTLE_ENDIAN 1 FT_UINT_STRING: FALSE-->ENC_ASCII|ENC_BIG_ENDIAN svn path=/trunk/; revision=39442
2011-10-15Convert proto_tree_add_item() 'encoding' arg for field types FT_STRING, ↵Bill Meier1-3/+3
FT_STRINGZ, FT_UINT_STRING as follows: 1. If there's no character encoding (ENC_ASCII, ...) specified then use ENC_ASCII. 2. For all but FT_UINT_STRING, always use ENC_NA (replacing any existing True/1/FALSE/0 /ENC_BIG_ENDIAN/ENC_LITTLE_ENDIAN). svn path=/trunk/; revision=39426
2011-10-10 Convert 'encoding' parameter of certain proto_tree_add_item() calls in ↵Bill Meier1-18/+18
non-autogenerated epan/dissectors: Specifically: Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as the encoding parameter for proto_tree_add_item() calls which directly reference an item in hf[] which has a type of: FT_BOOLEAN FT_IPv4 FT_EUI64 FT_GUID FT_UINT_STRING Also: For type FT_ITv6 use ENC_NA. (This was missed in SVN #39260) svn path=/trunk/; revision=39328
2011-10-06Convert 'encoding' parameter of certain proto_tree_add_item() calls in ↵Bill Meier1-37/+37
non-autogenerated epan/dissectors: Specifically: Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as the encoding parameter for proto_tree_add_item() calls which directly reference an item in hf[] which has a type of: FT_UINT8 FT_UINT16 FT_UINT24 FT_UINT32 FT_UINT64 FT_INT8 FT_INT16 FT_INT24 FT_INT32 FT_INT64 FT_FLOAT FT_DOUBLE svn path=/trunk/; revision=39288
2011-10-04Use ENC_NA as encoding for proto_tree_add_item() calls which directly ↵Bill Meier1-14/+14
reference an hf item (in hf[] with types: FT_NONE FT_BYTES FT_IPV6 FT_IPXNET FT_OID Note: Encoding field set to ENC_NA only if the field was previously TRUE|FALSE|ENC_LITTLE_ENDIAN|ENC_BIG_ENDIAN svn path=/trunk/; revision=39260
2011-08-04Update some references.Guy Harris1-0/+5
svn path=/trunk/; revision=38329
2011-07-31Restore saved 'pinfo->fragmented' as appropriate;Bill Meier1-0/+1
Fixes gcc 4.6 "set but not used [-Wunused-but-set-variable]" warnings. svn path=/trunk/; revision=38297
2011-05-12Add token to query_tree instead of to tree. Fixes Coverity CID 1057.Chris Maynard1-2/+2
svn path=/trunk/; revision=37088
2011-03-25From Didier via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3055 :Jeff Morriss1-7/+8
Apply rev 25869 to most of the rest of the TCP-desegmenting dissectors. (The SSL dissector was already updated in one of two spots with bug 4535/rev 32456.) A couple of the patches had to be manually applied. From me: Fix the comments to match the change (including in the TCP and SSL dissectors.) svn path=/trunk/; revision=36332
2011-01-30Introduce "Fragment count" filter element for all protocols doing reassembly.Stig Bjørlykke1-0/+7
svn path=/trunk/; revision=35705
2010-12-20Rename the routines that handle dissector tables with unsigned integerGuy Harris1-2/+2
keys to have _uint in their names, to match the routines that handle dissector tables with string keys. (Using _port can confuse people into thinking they're intended solely for use with TCP/UDP/etc. ports when, in fact, they work better for things such as Ethernet types, where the binding of particular values to particular protocols are a lot stronger.) svn path=/trunk/; revision=35224
2010-11-23Based on https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5391#c11 : put ↵Jeff Morriss1-18/+19
some DISSECTOR_ASSERTs and THROW's back in. svn path=/trunk/; revision=35014
2010-11-22From Emil Wojak via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5391 :Jeff Morriss1-118/+1058
I'd like to share my enhancements to the TDS dissector with everyone. The list of improvements follows: - nearly complete dissection of RPC calls, - detection and dissection of the ALL_HEADERS rule, - corrected some existing proto_tree fields to support filters, - other minor fixes where the interpretation of data conflicted with the official documentation from MS. I tested the new code on a variety of different TDS captures with many diverse RPC calls. The code compiles and works on 32-bit Linux, I didn't check those changes on other platforms though. From me: - terminate all value_strings - change ++*offset to *offset += 1 (I think that's more readable) - replace all the dissector assertions which could be caused by malformed packets with expert infos - Don't throw ReportedBoundsError when the packets have unexpected data in them, just report an expert info and continue on svn path=/trunk/; revision=35007
2010-10-10Define some fcns & vars as static ...Bill Meier1-5/+8
svn path=/trunk/; revision=34458
2010-10-08Restore pinfo->private_data after an exception was thrown by a subdissector.Jeff Morriss1-5/+11
This is necessary in case a subdissector had changed it but was unable to restore it (due to the exception). Remove check_col(). svn path=/trunk/; revision=34436
2010-09-23Replace blurbs that match the name (case insensitive) with NULL.Jeff Morriss1-2/+2
svn path=/trunk/; revision=34227
2010-05-13As suggested in ↵Jeff Morriss1-9/+1
http://www.wireshark.org/lists/wireshark-dev/200809/msg00075.html (as referenced in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2907 ) and https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3411 : Write a new convenience routine for finding a conversation and, if it is not found, create it. The frame number and addresses are taken from pinfo (as is the common case). Use this function in a bunch of dissectors. svn path=/trunk/; revision=32790
2010-05-10Indentation & whitespace cleanup (including: "4 space tabs" ==> spaces)Bill Meier1-1422/+1422
svn path=/trunk/; revision=32735
2010-04-03Remove unneeded #include <stdio.h>Bill Meier1-1/+0
svn path=/trunk/; revision=32367
2010-02-03Changed "reassembled_length" -> "reassembled.length".Stig Bjørlykke1-1/+1
svn path=/trunk/; revision=31776
2010-02-02Introduce "Reassembled length" filter element for all protocols doingStig Bjørlykke1-0/+7
reassembly. svn path=/trunk/; revision=31767
2010-01-22Fix some gcc -Wshadow warningsBill Meier1-5/+5
svn path=/trunk/; revision=31623
2009-09-24* Prefer col_append_str instead of col_append_fstr for constant stringsKovarththanan Rajaratnam1-2/+1
* Remove check_col guards svn path=/trunk/; revision=30127
2009-08-16Switch a bunch of dissectors over to using tvb_new_subset_remaining()Kovarththanan Rajaratnam1-2/+2
svn path=/trunk/; revision=29446
2009-08-09Don't guard col_set_str (COL_PROTOCOL) with col_checkKovarththanan Rajaratnam1-2/+1
svn path=/trunk/; revision=29340
2009-06-18From Kovarththanan Rajaratnam via bug 3548:Stig Bjørlykke1-14/+14
(1) Trailing/leading spaces are removed from 'name's/'blurb's (2) Duplicate 'blurb's are replaced with NULL (3) Empty ("") 'blurb's are replaced with NULL (4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME, FT_PROTOCOL, FT_STRING and FT_STRINGZ field types (5) Only allow non-zero value for 'display' if 'bitmask' is non-zero svn path=/trunk/; revision=28770
2009-04-17Remove some no-longer-needed casts.Gerald Combs1-3/+3
svn path=/trunk/; revision=28081
2009-03-29More size_t casts.Anders Broman1-2/+2
svn path=/trunk/; revision=27882
2009-03-22P64 changes: Fix some cases for which size_t is not requiredBill Meier1-1/+1
svn path=/trunk/; revision=27822
2008-11-22From Peter (bug 2942):Stig Bjørlykke1-1/+1
Allow optimalization with -ftracer. svn path=/trunk/; revision=26822
2008-10-16From Scott Roberts:Jaap Keuter1-1/+4
Patch to have the tds dissector register itself by name. And fix the name of the register function itself. svn path=/trunk/; revision=26474
2008-02-07Removed some "statement not reached" warnings.Stig Bjørlykke1-14/+14
svn path=/trunk/; revision=24282
2007-11-09Apply yet another set of the optimization patches:Anders Broman1-1/+1
When offset parameter is 0 replace tvb_bytes_exist() with the faster tvb_length(). On the other hand if (tvb_bytes_exist(tvb, 0, 20) is more readable than if (tvb_length(tvb) >= 20 so only do it in heuristic function svn path=/trunk/; revision=23412
2007-09-26"fix" some warnings about "might be used uninitialized" variablesJörg Mayer1-2/+2
svn path=/trunk/; revision=22983