aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-mysql.c
AgeCommit message (Collapse)AuthorFilesLines
2013-05-12Add the posibillity to use a key for per-packet-data.Anders Broman1-2/+2
svn path=/trunk/; revision=49259
2013-04-17Catch overflow condition in mysql dissector.Evan Huus1-1/+19
Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8458 Also add modelines. svn path=/trunk/; revision=48894
2013-03-18From beroset:Anders Broman1-8/+8
remove C++ incompatibilities https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 svn path=/trunk/; revision=48400
2013-02-26Fix spelling/typos found using a list of commonly misspelled words.Bill Meier1-2/+2
The misspellings were mostly in comments but some were in text strings visible to the user. svn path=/trunk/; revision=47899
2012-12-26Fix a bunch of warnings.Guy Harris1-1/+1
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-12-05Fix numerous instances of a variable/parameter name "shadowing" a library ↵Bill Meier1-74/+74
function name; (At least some (gcc ?) compilers give a "shadow" warning for these). svn path=/trunk/; revision=46402
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-01Add expert warning when we get a mysql EOF marker and theEvan Huus1-1/+3
connection is in a state where we're not expecting one. svn path=/trunk/; revision=44731
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2011-11-16Thou shalt not use proto_tree_add_string() with an FT_BYTES field.Guy Harris1-2/+3
svn path=/trunk/; revision=39873
2011-10-20From András Veres-Szentkirályi via ↵Jeff Morriss1-20/+424
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6426 : The current MySQL dissector ignored the execute parameters as metadata is needed from previous packets to decode the fields. I added the necessary code to store these in conn_data and developed dissector for all fields I could reproduce on the network. This also fixes a memory leak by moving the stmts structure (the pointer to which is stored in se_allocated memory) into se_trees. From me: use se_tree_create_non_persistent() so the entire tree is forgotten when the se_ memory goes away. Also some reformatting. svn path=/trunk/; revision=39483
2011-10-15Convert proto_tree_add_item() 'encoding' arg for field types FT_STRING, ↵Bill Meier1-17/+17
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-09-29Whitespace cleanup.Bill Meier1-26/+26
svn path=/trunk/; revision=39189
2011-09-29From András Veres-Szentkirályi: Added cursor type decoding to MySQL dissectorBill Meier1-3/+37
"The current MySQL dissector treats the exec_flags field as unused, however since MySQL 5.0, this field is used to indicate the type of the cursor as it can be read at http://forge.mysql.com/wiki/MySQL_Internals_ClientServer_Protocol#Execute_Packet_.28Tentative_Description.29 svn path=/trunk/; revision=39188
2011-09-21(Trivial) Remove trailing whitespace from lines for a few files.Bill Meier1-24/+24
svn path=/trunk/; revision=39084
2011-09-15From Pierre-Marie de Rodat:Anders Broman1-20/+58
MySQL’s response for a “prepare statement” command not supported by the MySQL dissector https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6342 svn path=/trunk/; revision=39018
2011-04-01From Alexis La Goutte via ↵Jeff Morriss1-33/+70
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5768 : Patch 6 : Enhance the MySQL collation Patch 7 : Enhance MySQL : add dissection of command Binlog Dump (replicate command). svn path=/trunk/; revision=36433
2011-03-28From Alexis La Goutte via ↵Jeff Morriss1-123/+148
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5768 : Patch 5 Enchance MySQL : * Add expert info of when undecoded data * Fix some white space svn path=/trunk/; revision=36379
2011-03-24From Alexis La Goutte via ↵Jeff Morriss1-271/+265
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5768 : Patch 3 : Enhance MySQL : Request/Response sub-dissector/function (white space changes, use ENC_NA when appropriate, use proto_tree_add_item()...) Patch 4 : Enhance MySQL : packet_ok, server, capa sub-dissector/function (white space changes, use ENC_NA when appropriate, use proto_tree_add_item()...) Split mysql_dissect_caps in mysql_dissect_caps_client and mysql_dissect_caps_server Rename mysql_dissect_ext_caps to mysql_dissect_ext_caps_client svn path=/trunk/; revision=36309
2011-03-23From Alexis La Goutte via ↵Jeff Morriss1-620/+588
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5768 : Patch 1 : Enhance MySQL : Reorder hf and Proto_reg Patch 2 : Enhance MySQL : white space changes, use ENC_NA when appropriate, use proto_tree_add_item() svn path=/trunk/; revision=36296
2011-03-18From Alexis La Goutte submitted in bug 5759: Use ENC_NA where appropriate.Chris Maynard1-27/+9
From me: Remove unused header fields found by checkhf.pl. One more ENC_NA. svn path=/trunk/; revision=36211
2011-03-17All fields are little-endian. Fixes bug 5759 reported by Tang Fulin.Chris Maynard1-36/+36
svn path=/trunk/; revision=36210
2011-01-16There's no need to pass the result of tvb_get_ptr() as the 'value' inJeff Morriss1-2/+2
proto_tree_add_*(): just use proto_tree_add_item(). Replace some tvb_get_ptr()s with tvb_get_ephemeral_string() or tvb_get_const_stringz(). Use tvb_memeql() & tvb_memcmp(). svn path=/trunk/; revision=35558
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-12-06Fix various typos and spelling errors.Bill Meier1-2/+2
svn path=/trunk/; revision=35126
2010-10-06From Alexis La Goutte: MYSQL: Fix FIELD_PACKET dissection;Bill Meier1-26/+48
From me: Two additional fixes for FIELD_PACKET dissection; Revision of the original patch from Alexis to properly dissect a SHOW_FIELDS response message. svn path=/trunk/; revision=34395
2010-08-03From Brandon Skari:Anders Broman1-9/+3
MySQL dissector doesn't dissect query responses. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5058 svn path=/trunk/; revision=33701
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-01-18Fix some gcc -Wshadow warnings ....Bill Meier1-11/+11
svn path=/trunk/; revision=31559
2009-09-24Don't guard col_append_str with check_colKovarththanan Rajaratnam1-6/+2
svn path=/trunk/; revision=30125
2009-08-09Don't guard col_set_str (COL_INFO/COL_PROTOCOL) with col_checkKovarththanan Rajaratnam1-15/+5
svn path=/trunk/; revision=29345
2009-07-07Changed flags_set_truth -> tfs_set_notsetStig Bjørlykke1-48/+48
svn path=/trunk/; revision=28989
2009-06-18From Kovarththanan Rajaratnam via bug 3548:Stig Bjørlykke1-83/+83
(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-03-31#include reassemble.h not req'dBill Meier1-1/+0
svn path=/trunk/; revision=27911
2009-03-01Fix conversation tracking bug noticed in:Jeff Morriss1-76/+64
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3216#c2 (Basically: how the dissector was dissecting frames--in the GUI--changed based on the order you had clicked on them.) ... by rewriting how the frame states are maintained: rather than maintaining a g_hash table of frames and their states, hang the (now se_alloc'd) frame data off the frame (using p_*_proto_data()). svn path=/trunk/; revision=27575
2009-02-28From Toralf Forster via ↵Jeff Morriss1-20/+41
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3216 : Implement mysql_dissect_row_packet(). From me: change all tvb_length_remaining() calls to tvb_reported_length_remaining() so the dissector will throw an exception if the packets are truncated. svn path=/trunk/; revision=27568
2009-02-28Remove a whole bunch of if(tree)'s that were protecting singleJeff Morriss1-188/+98
proto_tree_add_*() calls: those APIs check if tree is NULL too and taking out the dissector's ifs makes the code easier to read. svn path=/trunk/; revision=27567
2008-12-17Fix some typos and spelling (mostly in text strings)Bill Meier1-1/+1
svn path=/trunk/; revision=27037
2008-09-26Minor cleanups related to proto_reg_handoffBill Meier1-2/+0
svn path=/trunk/; revision=26277
2008-07-16conv_frame_states is an array of pointers, make it a GPtrArray instead of a ↵Jeff Morriss1-38/+59
GArray with casts svn path=/trunk/; revision=25754
2008-07-12From Jess Balint (bug 2700):Stig Bjørlykke1-42/+292
Implement field decoding in mysql protocol dissector. svn path=/trunk/; revision=25728
2008-01-24s/%ll/%" G_GINT64_MODIFIER "/gJeff Morriss1-1/+1
svn path=/trunk/; revision=24181
2007-10-23Apply the small performance enhancment patches for:Anders Broman1-4/+4
- if offset is 0, tvb_length is the same as tvb_length_remaining, just faster. Replace - col_append_fstr() with faster col_append_str() - col_add_str() with col_set_str() when it's safe svn path=/trunk/; revision=23252
2007-08-15- s/ntohs/g_ntohsJeff Morriss1-2/+3
- s/ntohl/g_ntohl - s/free/g_free - Change some tvb_get_string()+g_free()'s into tvb_get_ephemeral_string() - Change some tvb_fake_unicode()+g_free()'s into tvb_get_ephemeral_faked_unicode() - Change some tvb_get_string() calls that were clearly memory leaks (like atoi(tvb_get_string(...))) into tvb_get_ephemeral_string() svn path=/trunk/; revision=22515
2007-07-19Put register_dissector() call back inJeff Morriss1-0/+2
svn path=/trunk/; revision=22359
2007-07-17From Jess Balint:Stephen Fisher1-4/+38
a patch to fix the state management for the MySQL protocol dissector. svn path=/trunk/; revision=22339
2007-06-18From Martin Warnes:Stephen Fisher1-0/+9
Attached is a small patch that adds a preference option to allow the SQL Query string to be appended to the INFO column display. This makes life a little bit easier when scanning a trace to find the packet associated with a specific query. I thought it was better to implement it as a preference option with default set FALSE as it can clutter up the display for applications that generate large amounts of queries. svn path=/trunk/; revision=22130
2007-06-18From Martin Warnes:Stephen Fisher1-8/+10
Currently the MySQL dissector assumes that an OK-Packet Response contains the Server_Status field. Having checked the MySQL protocol page I can't say conclusively whether it should or it shouldn't, however I've come across a couple of MySQL Java clients that receive the OK-Packet without the Server_Status field set in response to a "SET AUTOCOMMIT" call. The attached patched simply adds a check to ensure the Server_Status field is present before calling function mysql_dissect_server_status. svn path=/trunk/; revision=22129
2006-11-30From Martin Warnesi:Jaap Keuter1-0/+2
Attached updated patch to use "dissect_mysql_pdu" instead of "dissect_mysql" when registering the protocol dissector. svn path=/trunk/; revision=20021
2006-10-31change the signature for the get_pdu_len() function pointer passed to ↵Ronnie Sahlberg1-2/+2
tcp_dissect_pdus() to also include a packet_info pointer. there are many reasons why some protocols actually need to be able to access the pinfo structure while determining the pdu size svn path=/trunk/; revision=19751