aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-cql.c
AgeCommit message (Collapse)AuthorFilesLines
2019-07-26HTTPS (almost) everywhere.Guy Harris1-1/+1
Change all wireshark.org URLs to use https. Fix some broken links while we're at it. Change-Id: I161bf8eeca43b8027605acea666032da86f5ea1c Reviewed-on: https://code.wireshark.org/review/34089 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-04-04epan: Convert our PROTO_ITEM_ macros to inline functions.Gerald Combs1-18/+18
Convert our various PROTO_ITEM_ macros to inline functions and document them. Change-Id: I070b15d4f70d2189217a177ee8ba2740be36327c Reviewed-on: https://code.wireshark.org/review/32706 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-12-27Try to squeeze some bytes out of the frame_data structure.Guy Harris1-1/+1
Make the time stamp precision a 4-bit bitfield, so, when combined with the other bitfields, we have 32 bits. That means we put the flags at the same structure level as the time stamp precision, so they can be combined; that gets rid of an extra "flags." for references to the flags. Put the two pointers next to each other, and after a multiple of 8 bytes worth of other fields, so that there's no padding before or between them. It's still not down to 64 bytes, which is the next lower power of 2, so there's more work to do. Change-Id: I6f3e9d9f6f48137bbee8f100c152d2c42adb8fbe Reviewed-on: https://code.wireshark.org/review/31213 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-12-05Fix some spelling errors found by Lintian.Gerald Combs1-1/+1
Change-Id: If6fc3aab7ad4fc634567121f7b9541bc6f6c5766 Reviewed-on: https://code.wireshark.org/review/30926 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-18Fix batch decoding in CQL packet dissectorMichael Penick1-14/+11
Batch sub-query values were being incorrectly decoded for non-prepared (kind = 0) queries. Change-Id: I89ee1ab9c298c2d09a09ee3ed7a8b837e7c3c5b2 Reviewed-on: https://code.wireshark.org/review/30236 Petri-Dish: Anders Broman <a.broman58@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-26Use the time stamps in the packet_info structure, not the frame_data structure.Guy Harris1-2/+2
In the long run, we'd like to remove the time stamp from the frame_data structure, as, in Wireshark, and in TShark in two-pass mode, there's one allocated for every frame in the file, and shrinking the size of that structure reduces the memory usage. This removes one obstacle to that. Change-Id: Ia8f87522cd974555c57e0ac1e742b097e8b0f2fc Reviewed-on: https://code.wireshark.org/review/29881 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-03-17CQL: ensure that there is at least one column to display rowsPascal Quantin1-11/+13
Bug: 14530 Change-Id: Ie5729c00ea4d826dbae028b3a4653acf746b92b8 Reviewed-on: https://code.wireshark.org/review/26521 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@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>
2017-10-26Add a ws_in6_addr typedef for struct e_in6_addr.Guy Harris1-1/+1
That allows a parallel typedef of ws_in4_addr for guint32. Change-Id: I03b230247065e0e3840eb87635315a8e523ef562 Reviewed-on: https://code.wireshark.org/review/24073 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-07-21cql: Fix Dead Store (Dead assignement/Dead increment) Warning found by ClangAlexis La Goutte1-3/+0
Change-Id: I74f4d33ad1805bd233190e7cb9ee1610ae628af5 Reviewed-on: https://code.wireshark.org/review/22755 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>
2017-07-18CQL: Fixes the dissector so PREPARE Results have the Query IDSimon Vans-Colina1-2/+4
Change-Id: I518335dc317ac5fb3c1339686579ff44b73c2546 Reviewed-on: https://code.wireshark.org/review/22675 Reviewed-by: Anders Broman <a.broman58@gmail.com> Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-06-07CQL: add an expert info when a list count is negativePascal Quantin1-17/+41
Bug: 13764 Change-Id: Ied78911c7089c9b7ca50d4df0e478cd4946af372 Reviewed-on: https://code.wireshark.org/review/21988 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Benoît Canet <benoit@scylladb.com> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2017-05-28cql: Dump row resultsBenoît Canet1-50/+649
Bug: 13709 Change-Id: If96e947e14d5bd0ccdc52bf0b618f34c64dd6780 Signed-off-by: Benoît Canet <benoit@scylladb.com> Reviewed-on: https://code.wireshark.org/review/21637 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: Alexis La Goutte <alexis.lagoutte@gmail.com>
2017-01-22CQL: Add support for prepared batch statementBenoît Canet1-2/+81
This portion of the code was never completed. Complete it. Change-Id: Iaa139b8c6d50a5ce3a7039000e9af38fab3d6124 Signed-off-by: Benoît Canet <benoit@scylladb.com> Reviewed-on: https://code.wireshark.org/review/19725 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: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-10-18CQL: free buffer earlier in case of Snappy decompression failurePascal Quantin1-0/+2
Change-Id: I3048823b4057caf49f2f6bf28cf2389dc3c88f27 Reviewed-on: https://code.wireshark.org/review/18255 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-10-18CQL: add LZ4/Snappy decompression support on WindowsPascal Quantin1-2/+2
Change-Id: I34374cf29357e2ed5062da1a5245b9adbabf732d Reviewed-on: https://code.wireshark.org/review/18249 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-10-17cql: add lz4 and snappy decompressionBenoît Canet1-18/+130
We do not use the STARTUP negotiation since a stream can be captured in its middle but try to decompress if the flag is present and fallback if it fails. Change-Id: Iecbf49a45220b04be7808869c9884548eb1e7694 Signed-off-by: Benoît Canet <benoit@scylladb.com> Reviewed-on: https://code.wireshark.org/review/17952 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-10-14CQL: Enhance version dissectionAlexis La Goutte1-2/+35
Display on hex (like spec) Add (sub) field for protocol version and direction Ping-Bug 12818 Change-Id: I6947f82915f54095f86cd0e2125982af42e9bbf9 Reviewed-on: https://code.wireshark.org/review/18188 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-10-14CQL: Add support of version 4Alexis La Goutte1-5/+68
Add new flag and new option Bug: 12818 Change-Id: I36a49cef407a5049f45ff3746d809a46c2520164 Reviewed-on: https://code.wireshark.org/review/17628 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-10-14CQL: Enhance flags dissectionAlexis La Goutte1-12/+48
Always display unused/reserved field 5th argument of proto_tree_add_bitmask is ett_ value add a display field for query flags Ping-Bug: 12818 Change-Id: I9f906f75c5fe8328bba41e560878dafdb6b6608d Reviewed-on: https://code.wireshark.org/review/18187 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-10-08Combine Decode As and port preferences for tcp.port dissector table.Michael Mann1-2/+2
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-09-11CQL: rename code for don't only support v3Alexis La Goutte1-438/+438
There is a v4 (and v5) with some change (patches coming !) Change-Id: I3107727e2b86f7f6c0019ba6f2638bb40b41c0fb Reviewed-on: https://code.wireshark.org/review/17626 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>
2016-09-10CQL: fix indent modelinesAlexis La Goutte1-4/+4
Change-Id: Ie7ad09b3141fa6f4753981bd814736ee88c817d1 Reviewed-on: https://code.wireshark.org/review/17627 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-07-12packet-cql.c: Bugfix bitwise operation with parenthesis.Michael Mann1-1/+1
Change-Id: I93e1c64597f309db5341c6ccadfdb3b23c056182 Reviewed-on: https://code.wireshark.org/review/16397 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-06-01Make the modelines more like other ones.Guy Harris1-4/+4
Thou shalt not ever use modelines that put the tab-character tab spots anywhere other than every 8 characters; that's where Ken and Dennis put them, and that's where they belong. Use whatever indentation you want, including 4-space indentation, but do *not* try to arrange that a tab character moves to the next 4-character boundary, because, in a lot of UN*X software, it doesn't. (Yes, this means that Xcode's default is wrong. It *is* wrong, especially given that it's an IDE for a UNIX.) Change-Id: I308745cdeef35b7c91ea493da6487baadc357f58 Reviewed-on: https://code.wireshark.org/review/15673 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-06-01Apache Cassandra CQL protocol v3.0Benoît Canet1-0/+1401
Change-Id: I74cddcce3104da269e9587ee78ff29785734188f Reviewed-on: https://code.wireshark.org/review/12479 Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>