aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-tds.c
AgeCommit message (Collapse)AuthorFilesLines
2018-11-16TDS: Fix decoding of TDS7 password.Craig Jackson1-9/+24
Fix decoding of the TDS7 password field by treating it as a byte string, not an ASCII string. Also fix another display problem demonstrated by the sample trace. Bug: 15274 Change-Id: I906d6e9499e2e986820e9248604e98051d877bed Reviewed-on: https://code.wireshark.org/review/30653 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-11-03TDS: Remove Type info for ValueAlexis La Goutte1-1/+0
Change-Id: I3f2005c9b6587b9b9425f9e61f5afecba822bbf9 Ping-Bug: 15255 Reviewed-on: https://code.wireshark.org/review/30467 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Dario Lombardo <lomato@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-11-03%f suffices for floats and doubles.Guy Harris1-2/+2
Change-Id: Ic45a009d449b7ef20fa903e7d5222eef872d337b Reviewed-on: https://code.wireshark.org/review/30490 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-11-02tds: use %lf instead of G_GINT64_MODIFIER for text.Dario Lombardo1-1/+1
On many platforms, G_GINT64_MODIFIER is "ll", that gives an error when used with the float modifier: ../epan/dissectors/packet-tds.c:2270:55: error: length modifier 'll' results in undefined behavior or no effect with 'f' conversion specifier [-Werror,-Wformat] proto_item_append_text(item, " (%"G_GINT64_MODIFIER"f)", tvb_get_letohieee_float(tvb, *offset)); ~~^~~~~~~~~~~~~~~~~~~ /usr/local/Cellar/glib/2.58.1/lib/glib-2.0/include/glibconfig.h:56:28: note: expanded from macro 'G_GINT64_MODIFIER' #define G_GINT64_MODIFIER "ll" ^ 1 error generated. The solution appears to revert back to %lf. Fixes: v2.9.0rc0-2411-gdbe2d081ec Change-Id: I470cc5395921abc14aedd501f27881d5c21c618f Reviewed-on: https://code.wireshark.org/review/30487 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Dario Lombardo <lomato@gmail.com>
2018-11-02TDS: Display value of data on top of fieldAlexis La Goutte1-6/+18
Bug: 15255 Change-Id: Ib100de8c5eebfc359a6913a3bb7b6b171c12eedc Reviewed-on: https://code.wireshark.org/review/30468 Reviewed-by: Craig Jackson <cejackson51@gmail.com> Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2018-10-12TDS: Implement Error token for TDS 4.x.Craig Jackson1-12/+21
For completeness, make dissect_tds_error_token compatible with TDS 4.x as well as TDS 7. It is mostly replaced by the ExtendedError token for TDS 5.0. Change-Id: Ia01be7d417ec008f97e3310346329f07b7c79e74 Reviewed-on: https://code.wireshark.org/review/30166 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-11Squelch a narrowing warning.Guy Harris1-1/+1
Change-Id: Ibe75903250dd9cccd2b4a80d1215f5ea6fd0cce2 Reviewed-on: https://code.wireshark.org/review/29590 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-08-26TDS: Improve handling of SYBLONGBINARYCraig Jackson1-13/+4
Use FT_UINT_BYTES to handle SYBLONGBINARY cleanly. Change-Id: Ie88c19bb788670190113c8c1e962660162ce3780 Reviewed-on: https://code.wireshark.org/review/29273 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-08-17tds: Fix Dead Store (Dead assignement/Dead increment) Warning found by ClangAlexis La Goutte1-2/+2
Change-Id: I8d21c81c86dc63cbc9035fb26372b373191baeb8 Reviewed-on: https://code.wireshark.org/review/29179 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-08-16TDS: Handle TDS 5.0 MSG token.Craig Jackson1-8/+100
Add support for the TDS_MSG token, used in TDS 5.0. This requires support for TDS_PARAMS and TDS_PARAMFMT tokens in the response stream as well as the request stream. Add support for the TDS 5.0 LONGBINARY type. Change-Id: I49b70f8b03881767283fcc41610517a08ee7c4e7 Reviewed-on: https://code.wireshark.org/review/29160 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-08-09TDS: Add support for non-nullable datetime and money types.Craig Jackson1-49/+119
This was accomplished by factoring out the existing code supporting nullable datetime and money types. The non-nullable versions are older and more often used with TDS 4 and TDS 5. Change-Id: I1bbf942d2b5ff3ec6bb9f1a607f0c579949f6131 Reviewed-on: https://code.wireshark.org/review/29008 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-08-02tds: Fix Dead Store (Dead assignement/Dead increment) Warning found by ClangAlexis La Goutte1-1/+0
Change-Id: I951a69b44959fd4c2f24f9ce70e40cf95dd2aa2e Reviewed-on: https://code.wireshark.org/review/28927 Reviewed-by: Dario Lombardo <lomato@gmail.com> Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Craig Jackson <cejackson51@gmail.com> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-07-31No need to initialize cursorname_len.Guy Harris1-1/+1
Not initializing it also means that we'll get an error from compilers with sufficiently good dataflow analysis if we use it in, or before, the call itself, which is a Good Thing as we *shouldn't* use it before we know it. Change-Id: I99aa3fedd2a04f5bb6e60e0f6f8b0a3682263351 Reviewed-on: https://code.wireshark.org/review/28888 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-07-31TDS: Fix bad proto_tree_add_item_ret_string_and_length call.Craig Jackson1-1/+1
I'm not sure why this compiled in all of the test environments. (Ubuntu and Windows, plus Buildbot.) Change-Id: I15d281010f3f463f3929aff8918ade8b71cffff7 Reviewed-on: https://code.wireshark.org/review/28887 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-07-31tds: fix uninitialized var.Dario Lombardo1-1/+1
../epan/dissectors/packet-tds.c:2659:27: error: variable 'cursorname_len' is uninitialized when used here [-Werror,-Wuninitialized] tvb, cur + 1, cursorname_len, tds_get_char_encoding(tds_info)|ENC_NA, ^~~~~~~~~~~~~~ ../epan/dissectors/packet-tds.c:2653:29: note: initialize the variable 'cursorname_len' to silence this warning guint cursorname_len; ^ = 0 1 error generated. Change-Id: I21a1e34997af95097d3a916589f69b86a6fe0418 Reviewed-on: https://code.wireshark.org/review/28883 Reviewed-by: Dario Lombardo <lomato@gmail.com> Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-07-30Add basic support for TDS 5 (Sybase) cursors.Craig Jackson1-11/+839
Change-Id: Ie04489b5445dc473d9bc6d772c1c33270da9b363 Reviewed-on: https://code.wireshark.org/review/28835 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-22Use tvb_new_subset_remaining() for a tvbuff that goes to end-of-packet.Guy Harris1-5/+4
Change-Id: I997ff6efbfbc2e11af47d689612ec0f288b4ab5d Reviewed-on: https://code.wireshark.org/review/27078 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-03-13TDS: Improve dissection of TDS5 tokenized requests.Craig Jackson1-656/+1160
Add dissection of more tokens in the TDS5 tokenized request packet. These include RPC calls and parameterized language calls. The majority of the remaining tokens are associated with cursors. Cursors are a large enough problem to merit a separate patch. Change-Id: I5bdf33cd167178c2bc6027a5434740d70ef50744 Reviewed-on: https://code.wireshark.org/review/26455 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-25TDS: Fix Dead Store (Dead assignement/Dead increment) Warning found by ClangAlexis La Goutte1-1/+0
Change-Id: Iac95d4d588670b75fbb9e99095e5c0a562460000 Reviewed-on: https://code.wireshark.org/review/26085 Reviewed-by: Craig Jackson <cejackson51@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-24TDS: Minor updates to TDS 5 Response token handlingCraig Jackson1-50/+20
Fix a couple of cases where endianness was not handled properly when using FT_UINT_STRING. Use FT_UINT_STRING to streamline some of the decodes which were previously merged. Change-Id: I72196d2146fe1884f2d0af01bd1185a662923226 Reviewed-on: https://code.wireshark.org/review/26056 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-22TDS: Improve dissection of TDS5 responses.Craig Jackson1-104/+581
Add dissection of the TDS5 packets for transmitting column information (ROWFMT, ROWFMT2) and extended error messages. Change-Id: Ib85c91b7ea007ce8bdc602bf6b607ab7a5cf1be5 Reviewed-on: https://code.wireshark.org/review/25855 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-12dissectors: use SPDX identifiers.Dario Lombardo1-13/+1
Change-Id: I92c94448e6641716d03158a5f332c8b53709423a Reviewed-on: https://code.wireshark.org/review/25756 Petri-Dish: Dario Lombardo <lomato@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-01TDS: ensure to always initialize tds_encoding_char even when protocol is unknownPascal Quantin1-17/+3
Otherwise we use an uninitialized variable Bug: 14372 Change-Id: Idacdb40569421f7e41e181c14fb2bc033b0645b8 Reviewed-on: https://code.wireshark.org/review/25529 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-02-01New dissector Session Multiplex Protocol SMPUli Heilmeier1-7/+34
Adding Session Multiplex Protocol SMP SMP is used by TDS when MARS in enabled. Bug: 14110 Change-Id: Ia4113c627d107da6c3d51e4004265efb228a297b Reviewed-on: https://code.wireshark.org/review/25509 Reviewed-by: Craig Jackson <cejackson51@gmail.com> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-01-28TDS: Dissect TDS4.2 response packetCraig Jackson1-270/+1030
Add dissection of the TDS response packet for TDS 4.2. In order to share code, this required parameterizing TDS 7.x token-handling routines for things such as endian-ness and one-byte vs two-byte character encodings. This required ascertaining accurately when TDS 7.x is in use as early in the conversation as possible. This in turn required knowing the program versions downloaded in the prelogin packet in the case where the login packet is encrypted. (Listening to the LoginAck token is a little too late.) Add more support routines to parameterize the endian nature of each connection. Although the particular tokens decoded here are documented for TDS 4.2, it has only been tested with a trace from TDS 4.6. TDS 4.6 didn't change much, but there may be a few minor errors. Change-Id: I6f8f136bcc565640fbea4302cb79ea29a118d9a1 Reviewed-on: https://code.wireshark.org/review/25464 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-01-01TDS: Fix Dead Store (Dead assignement/Dead increment) Warning found by ClangAlexis La Goutte1-1/+1
Change-Id: I3345246de63781decc1046834f82f60f02ad54c0 Reviewed-on: https://code.wireshark.org/review/25101 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-23TDS: Dissect TDS4/5 login packetCraig Jackson1-18/+1871
Add dissection of the TDS_BUF_LOGIN (aka TDS4/TDS5 login) packet. Add some support routines to remember the endian nature of each connection. Dissecting the TDS5 login requires dissecting the TDS_CAPABILITY token as well. Change-Id: Id92dedeaf4b5d192bab7ec99775e371f229db3e3 Reviewed-on: https://code.wireshark.org/review/24831 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-01TDS: Improve TDS7 Prelogin request/response handlingCraig Jackson1-77/+112
- Fix detection of TDS7 Prelogin responses to have fewer false positives. This was causing regular responses to be recognized as Prelogin responses if they happened to begin with a DONEINPROC token. - Define symbolic constents for the Prelogin options. - Apply the version_convert processing to the relevant prelogin options as well as to the loginack_progversion. - Correct the display of the program version in version_convert. - Factor out the setting of tds7_version so it can be called from the dissect_tds7_login as well as dissect_tds_login_ack_token. This is needed to correctly handle tokens which come before the loginack token in the login response. - Fix the wording of a comment in my last commit. Change-Id: I57615bbb1e780db37cda25d8d5d7f964f68b337e Reviewed-on: https://code.wireshark.org/review/24664 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2017-11-24TDS: Fix packet reassembly for TDS 4.x/TDS5.x streams.Craig Jackson1-28/+87
The existing TDS "netlib" packet reassembly code only handles situations where the netlib header has a valid non-zero packet number. This does not always occur for older clients, in particular when TDS 7 is not in use. This has been tested with: DB-Library 4.6 talking to Sybase CT-Library 5.0 talking to Sybase jConnect 5.0 talking to Sybase .NET 4.5 talking to SQL Server with TLS login Freetds CT-Library talking to SQL Server with unencrypted login - I'm not sure of the version of this, in the protocol it appears as 8.0.341. Change-Id: I1690ba191ba3f4bd10569ab1a26dae82c5bbf260 Reviewed-on: https://code.wireshark.org/review/24470 Petri-Dish: Graham Bloice <graham.bloice@trihedral.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-20packet-tds.c: Correct encoding for hf_tds_colmetadata_maxbytesizeMichael Mann1-1/+1
It's just a FT_UINT16, not need for 2 encodings. Change-Id: I502a61a2ff2a1fd05f1efa48912119f98d10e636 Reviewed-on: https://code.wireshark.org/review/24498 Reviewed-by: Craig Jackson <cejackson51@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-09-19TDS: Fix some URLs and add a note about our heuristic check.Gerald Combs1-2/+7
Wayback-ize a couple of URLs. Note that we might be able to improve our heuristic check by checking various string lengths. (I didn't add the checks myself because I don't have any TDS captures with login packets.) Change-Id: I3d67c66a292fd02035a15e1e047227f55314737a Reviewed-on: https://code.wireshark.org/review/23612 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-06-05[TDS] Convert to using tcp_dissect_pdus.Michael Mann1-214/+72
Bring some modernity to this dissector and use tcp_dissect_pdus. Also an excuse to remove the conversation_set_dissector in the heuristic dissector which was generating some false positives because the heuristic isn't that strong. Bug: 12882 Change-Id: Ibb04fd4fbc819acd1dc96d6259b047c897ec2de6 Reviewed-on: https://code.wireshark.org/review/19125 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-01-29Register reassembly tablesMichael Mann1-22/+9
Register all reassembly tables with a central unit, allowing the central unit to have the callback that initializes and destroys the reassembly tables, rather than have dissectors do it individually. Change-Id: Ic92619c06fb5ba6f1c3012f613cae14982e101d4 Reviewed-on: https://code.wireshark.org/review/19834 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-01-10Rename tvb_new_subset() to tvb_new_subset_length_caplen().Guy Harris1-2/+2
This emphasizes that there is no such thing as *the* routine to construct a subset tvbuff; you need to choose one of tvb_new_subset_remaining() (if you want a new tvbuff that contains everything past a certain point in an existing tvbuff), tvb_new_subset_length() (if you want a subset that contains everything past a certain point, for some number of bytes, in an existing tvbuff), and tvb_new_subset_length_caplen() (for all other cases). Many of the calls to tvb_new_subset_length_caplen() should really be calling one of the other routines; that's the next step. (This also makes it easier to find the calls that need fixing.) Change-Id: Ieb3d676d8cda535451c119487d7cd3b559221f2b Reviewed-on: https://code.wireshark.org/review/19597 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-01-07Convert range API to always use wmem memory.Michael Mann1-1/+0
This is mostly to address memory leaks in range preferences (the biggest user of range functionality) on shutdown. Now range preferences must use epan scoped memory when referencing internal preference structures to keep consistency. Change-Id: Idc644f59b5b42fa1d46891542b53ff13ea754157 Reviewed-on: https://code.wireshark.org/review/19387 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-12-13Adjust proto_tree_add_uint_format_value calls to use unit stringMichael Mann1-26/+18
Several calls to proto_tree_add_uint_format_value could be better served using BASE_UNIT_STRING with a "unit string" in hf_ field. There also a few cases where proto_tree_add_uint_format_value could just be proto_tree_add_uint. Added a few more "common" unit string values to unit_strings.[ch] Change-Id: Iaedff82c515269c9c31ab9100dff19f5563c932d Reviewed-on: https://code.wireshark.org/review/19242 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-11-22Add prefs_get_uint_value and prefs_get_range_valueMichael Mann1-4/+2
This allows dissectors to not need to know about the internal preference structure. Change-Id: I1ae67248cd0b0132aefc225ea0a9befaf9afdde2 Reviewed-on: https://code.wireshark.org/review/18864 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-10-12Cleanup from adding Decode As TCP preferences.Michael Mann1-5/+9
1. Fix bug caught by scan build (module not read) 2. Remove range preference call that should have been part of original patch. Change-Id: I24b1fb253548bffddc4c8ebfc3ede666d8fd9dcd Reviewed-on: https://code.wireshark.org/review/18143 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-10-08Combine Decode As and port preferences for tcp.port dissector table.Michael Mann1-3/+3
This patch introduces new APIs to allow dissectors to have a preference for a (TCP) port, but the underlying data is actually part of Decode As functionality. For now the APIs are intentionally separate from the regular APIs that register a dissector within a dissector table. It may be possible to eventually combine the two so that all dissectors that register with a dissector table have an opportunity to "automatically" have a preference to adjust the "table value" through the preferences dialog. The tcp.port dissector table was used as the guinea pig. This will eventually be expanded to other dissector tables as well (most notably UDP ports). Some dissectors that "shared" a TCP/UDP port preference were also converted. It also removed the need for some preference callback functions (mostly when the callback function was the proto_reg_handoff function) so there is cleanup around that. Dissectors that has a port preference whose default was 0 were switched to using the dissector_add_for_decode_as_with_preference API rather than dissector_add_uint_with_preference Also added comments for TCP ports used that aren't IANA registered. Change-Id: I99604f95d426ad345f4b494598d94178b886eb67 Reviewed-on: https://code.wireshark.org/review/17724 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-06-12Add missing scale in TDS type infoMichael Vigovsky1-1/+2
Change-Id: I6734fe448e4ee6f20a0d57b1aaae5e7e61f0cb5c Reviewed-on: https://code.wireshark.org/review/15811 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-06-05Fix expert_info errors found by new and improved checkhfs.pl.Michael Mann1-2/+6
Change-Id: I30f1b92ee438361c3bd58743f7d1ae8d5ffc96f0 Reviewed-on: https://code.wireshark.org/review/15718 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-03-20Create call_data_dissector() to call data dissector.Michael Mann1-3/+1
This saves many dissectors the need to find the data dissector and store a handle to it. There were also some that were finding it, but not using it. For others this was the only reason for their handoff function, so it could be eliminated. Change-Id: I5d3f951ee1daa3d30c060d21bd12bbc881a8027b Reviewed-on: https://code.wireshark.org/review/14530 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-20Manually add protocol dependencies derived from find_dissector.Michael Mann1-2/+2
Started by grepping call_dissector_with_data, call_dissector_only and call_dissector and traced the handles passed into them to a find_dissector within the dissector. Then replaced find_dissector with find_dissector_add_dependency and added the protocol id from the dissector. "data" dissector was not considered to be a dependency. Change-Id: I15d0d77301306587ef8e7af5876e74231816890d Reviewed-on: https://code.wireshark.org/review/14509 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-11TDS: Fix conflict for hf fieldsAlexis La Goutte1-5/+5
'tds.done.donerowcount' exists multiple times with NOT compatible types: FT_UINT32 and FT_UINT64 'tds.doneproc.donerowcount' exists multiple times with NOT compatible types: FT_UINT32 and FT_UINT64 'tds.doneinproc.donerowcount' exists multiple times with NOT compatible types: FT_UINT32 and FT_UINT64 'tds.envchange.newvalue' exists multiple times with NOT compatible types: FT_BYTES and FT_STRING 'tds.envchange.oldvalue' exists multiple times with NOT compatible types: FT_BYTES and FT_STRING Change-Id: I87d713aaa722d7ab9e8d19955f3820e9040446c1 Reviewed-on: https://code.wireshark.org/review/14415 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-01-29tds: don't THROW() an exception from a dissectorMartin Kaiser1-1/+6
return the error to the caller, exit the loop and the dissection... Change-Id: Iba64a5d5e4f79bc33c2b1c91b937c9726e15a802 Reviewed-on: https://code.wireshark.org/review/13587 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2016-01-08Fix a lot of typos and misspellingsmoshekaplan1-2/+2
Change-Id: I8512cfa1d424f82a873a0e0e1d22c7b075fdd7f3 Reviewed-on: https://code.wireshark.org/review/13069 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-09new_register_dissector -> register_dissector for dissector directory.Michael Mann1-1/+1
Change-Id: Ie39ef054a4a942687bd079f3a4d8c2cc55d5f22c Reviewed-on: https://code.wireshark.org/review/12485 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-03Make the gauntlet a bit clearer.Guy Harris1-3/+2
if(is a fixed-length TDS type) { XXX } else if(is a variable-length TDS type) { XXX } Change-Id: Icaa8047ad76abe8b955fb5a025a057ddf8757b1f Reviewed-on: https://code.wireshark.org/review/12415 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-03TDS: Sanity check number of columns to prevent crash.Michael Mann1-0/+4
Bug: 11846 Change-Id: I6eac46dc397263fe005e803730c5d3084bfb7f74 Reviewed-on: https://code.wireshark.org/review/12391 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-01TDS: Register each login param in a separate fieldNathan Cole1-6/+73
Addition of several fields to cover all login parameters. Bug: 11661 Change-Id: I1cb1620b0e1a8c40b311f4dd4b6eb91e6e55a74d Reviewed-on: https://code.wireshark.org/review/11455 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>