aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-tds.c
AgeCommit message (Collapse)AuthorFilesLines
2014-12-25Deleting unnecessary #includes from dissectors.Martin Mathieson1-2/+0
Fifth batch (packet-rtp.c -> end). Will look at cleaning up and committing script afterwards. Change-Id: I8ed61dc941d98d3f7259a9d1f74e214eb7b4bfa2 Reviewed-on: https://code.wireshark.org/review/6052 Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-12-24TDS: Missing break in switch (CID 280475 & 281377)Alexis La Goutte1-0/+2
Change-Id: I9416e07f497081f7117e8c3ccb741ea601de9cdd Reviewed-on: https://code.wireshark.org/review/5993 Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-12-21Cleanup use of #includes in non-generated epan/dissector/*.cBill Meier1-3/+0
Specifically: - Set packet.h to be the first wireshark #include after config.h and "system" #includes. packet.h added as an #include in some cases when missing. - Remove some #includes included (directly/indirectly) in packet.h. E.g., glib.h. (Done only for those files including packet.h). - As needed, move "system" #includes to be after config.h and before wireshark #includes. - Rework various #include file specifications for consistency. - Misc. Change-Id: Ifaa1a14b50b69fbad38ea4838a49dfe595c54c95 Reviewed-on: https://code.wireshark.org/review/5923 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-11-26Remove the use of pinfo->private_data from dissectors that just save it to ↵Michael Mann1-7/+0
restore it. Change-Id: I13197cc48068bb35ee12a7023cfe5f76bbc4e264 Reviewed-on: https://code.wireshark.org/review/5486 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-10-20Get rid of unnecessary includes of ctype.h.Guy Harris1-1/+0
Change-Id: I2cf49f808558147ce77e7d086558966cfb2defca Reviewed-on: https://code.wireshark.org/review/4850 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-19TDS: Make buildbot happyAlexis La Goutte1-1/+1
Fix Field 'Server Version' (tds.server_version) is an integral value (FT_UINT32) but is being displayed as BASE_NONE Change-Id: I601e71ac8e7928ef90fdd16956af3a34bca269a9 Reviewed-on: https://code.wireshark.org/review/4836 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-10-19Eliminate proto_tree_add_text from packet-tds.cMichael Mann1-111/+175
Change-Id: Ib3dc7f8a87e55ef34d4847f4837d645e418607a3 Reviewed-on: https://code.wireshark.org/review/4826 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-07convert to proto_tree_add_subtree[_format]Michael Mann1-25/+10
Change-Id: Ie10ac4f5f04a23344d183e095bbafb23c6409144 Reviewed-on: https://code.wireshark.org/review/2904 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19Revert "Fixup: tvb_* -> tvb_captured"Michael Mann1-4/+4
https://www.wireshark.org/lists/wireshark-dev/201406/msg00131.html This reverts commit 246fe2ca4c67d8c98caa84e2f57694f6322e2f96. Change-Id: Ib24bae0198c13a84bd7f731bf4af921212109a8f Reviewed-on: https://code.wireshark.org/review/2430 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19Revert "Fixup: tvb_ensure_length_remaining -> ↵Michael Mann1-2/+2
tvb_ensure_captured_length_remaining" See https://www.wireshark.org/lists/wireshark-dev/201406/msg00131.html This reverts commit 021e7afc9fcba09094d0e2143cc434a34e3b09dc. Change-Id: I0640eabce5ce8c4ff3a88ebf848b499f8bb8ed2f Reviewed-on: https://code.wireshark.org/review/2429 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-18Fixup: tvb_ensure_length_remaining -> tvb_ensure_captured_length_remainingDario Lombardo1-2/+2
Change-Id: I0228f3b6b7067bc0ce51f9d359f99fd18feb2b66 Reviewed-on: https://code.wireshark.org/review/2378 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-18Fixup: tvb_* -> tvb_capturedDario Lombardo1-4/+4
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f Reviewed-on: https://code.wireshark.org/review/2377 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-18Fixup: tvb_get_string(z) -> tvb_get_string(z)_encDario Lombardo1-2/+2
Change-Id: I63a3704effe3fcab01a193dc39b6a22e9f1cf3fe Reviewed-on: https://code.wireshark.org/review/2376 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(Using sed : sed -i '/^ \* \$Id\$/,+1 d') Fix manually some typo (in export_object_dicom.c and crc16-plain.c) Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8 Reviewed-on: https://code.wireshark.org/review/497 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2013-12-21Drop isprint.h use g_ascii_isprint() when this include hack was enabled.Jakub Zawadzki1-3/+1
svn path=/trunk/; revision=54327
2013-12-20Change G_GINT64_CONSTANT(xxxxU) to G_GUINT64_CONSTANT(xxxx)Jakub Zawadzki1-3/+3
svn path=/trunk/; revision=54314
2013-12-16Use proto_tree_add_item() in preference to fetching the string andGuy Harris1-40/+39
adding it with proto_tree_add_string(). Use tvb_get_string_enc() rather than tvb_get_unicode_string() to fetch strings. We assume a UTF-16 encoding for all "Unicode" strings. Use tvb_strsize() and tvb_unicode_strsize() to get the lengths of null-terminated strings. Get rid of unused ett_nt_unicode_string variable. svn path=/trunk/; revision=54158
2013-12-10- Forward declaration of register functions.Anders Broman1-0/+3
svn path=/trunk/; revision=53918
2013-11-10Add missing includes in order to remove exceptions.h from proto.h (next commit).Jakub Zawadzki1-0/+1
svn path=/trunk/; revision=53230
2013-09-22emem -> wmem conversion:Pascal Quantin1-24/+24
- ep_tvb_get_bits() -> wmem_packet_tvb_get_bits() - tvb_g_memdup()/ep_tvb_memdup() -> tvb_memdup() - tvb_fake_unicode()/tvb_get_ephemeral_faked_unicode() -> tvb_get_faked_unicode() - tvb_get_g_string()/tvb_get_ephemeral_string()/tvb_get_seasonal_string() -> tvb_get_string() - tvb_get_g_unicode_string()/tvb_get_ephemeral_unicode_string() -> tvb_get_unicode_string() - tvb_get_ephemeral_string_enc() -> tvb_get_string_enc() - update docs accordingly svn path=/trunk/; revision=52172
2013-09-12Use wmem_new to get the automatic casts to fix the buildbot.Evan Huus1-2/+2
svn path=/trunk/; revision=51973
2013-09-12emem -> wmemJörg Mayer1-6/+6
svn path=/trunk/; revision=51972
2013-09-09expert_add_info_format_text -> expert_add_info_formatMichael Mann1-6/+6
svn path=/trunk/; revision=51852
2013-08-23Batch of filterable expert infos.Michael Mann1-19/+33
svn path=/trunk/; revision=51486
2013-08-05Keep result of [new_]register_dissector in some dissectors. [2 of x]Jakub Zawadzki1-3/+2
(don't create new dissector handle if we can use already existing one) svn path=/trunk/; revision=51159
2013-07-17Remove fragment_data, add fragment_head, fragment_item - for now alias it to ↵Jakub Zawadzki1-1/+1
the same structure. This is begin of work to split fragment head and fragments items. svn path=/trunk/; revision=50708
2013-07-16A better method of avoiding the "ISO C restricts enumerator values to range ↵Chris Maynard1-1/+3
of 'int'" warning. svn path=/trunk/; revision=50649
2013-07-15Don't compare a guint32 against -1, compare it against 0xFFFFFFFFU.Guy Harris1-1/+1
svn path=/trunk/; revision=50643
2013-07-15Fix warning: ISO C restricts enumerator values to range of 'int'Chris Maynard1-2/+2
svn path=/trunk/; revision=50641
2013-05-21add a few filterable fields/expert infoMichael Mann1-32/+38
svn path=/trunk/; revision=49479
2013-03-31coverity 281315 logically dead codeMartin Kaiser1-6/+1
svn path=/trunk/; revision=48676
2013-03-22Don't wire into the reassembly code the notion that reassemblies shouldGuy Harris1-8/+9
be done on flows from one address to another; reassembly for protocols running atop TCP should be done on flows from one TCP endpoint to another. We do this by: adding "reassembly table" as a data structure; associating hash tables for both in-progress reassemblies and completed reassemblies with that data structure (currently, not all reassemblies use the latter; they might keep completed reassemblies in the first table); having functions to create and destroy keys in that table; offering standard routines for doing address-based and address-and-port-based flow processing, so that dissectors not needing their own specialized flow processing can just use them. This fixes some mis-reassemblies of NIS YPSERV YPALL responses (where the second YPALL response is processed as if it were a continuation of a previous response between different endpoints, even though said response is already reassembled), and also allows the DCE RPC-specific stuff to be moved out of epan/reassembly.c into the DCE RPC dissector. svn path=/trunk/; revision=48491
2013-03-19From beroset:Anders Broman1-3/+3
remove C++ incompatibilities https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 svn path=/trunk/; revision=48430
2013-03-17Fix some Dead Store (Dead assignement/Dead increment) Warning found by ClangAlexis La Goutte1-2/+4
svn path=/trunk/; revision=48370
2013-03-17Add Modelines infoAlexis La Goutte1-0/+13
svn path=/trunk/; revision=48363
2013-02-27Move show_exception() and show_reported_bounds_error() toGuy Harris1-14/+10
epan/show_exception.c, as it's used outside epan/dissectors/packet-frame.c. Update their callers to include <epan/show_exception.h> to get their declaration. Add a CATCH_NONFATAL_ERRORS macro that catches all exceptions that, if there's more stuff in the packet to dissect after the dissector call that threw the exception, doesn't mean you shouldn't go ahead and dissect that stuff. Use it in all those cases, including ones where BoundsError was inappropriately being caught (you want those passed up to the top level, so that the packet is reported as having been cut short in the capture process). Add a CATCH_BOUNDS_ERRORS macro that catches all exceptions that correspond to running past the end of the data for a tvbuff; use it rather than explicitly catching those exceptions individually, and rather than just catching all exceptions (the only place that DissectorError should be caught, for example, is at the top level, so dissector bugs show up in the protocol tree). Don't catch and then immediately rethrow exceptions without doing anything else; just let the exceptions go up to the final catcher. Use show_exception() to report non-fatal errors, rather than doing it yourself. If a dissector is called from Lua, catch all non-fatal errors and use show_exception() to report them rather than catching only ReportedBoundsError and adding a proto_malformed item. Don't catch exceptions when constructing a trailer tvbuff in packet-ieee8023.c - just construct it after the payload has been dissected, and let whatever exceptions that throws be handled at the top level. Avoid some TRY/CATCH/ENDTRY cases by using checks such as tvb_bytes_exist() before even looking in the tvbuff. svn path=/trunk/; revision=47924
2013-02-18Enums aren't guaranteed to be able to hold a value that doesn't fit inGuy Harris1-1/+3
an int, so don't use enums for special values of the PLP length field. In addition, use G_GINT64_CONSTANT() to tag them as appropriate for a guint64. svn path=/trunk/; revision=47737
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