aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-kafka.c
AgeCommit message (Collapse)AuthorFilesLines
2016-04-20Kafka: several minor improvementsMartin Mathieson1-87/+233
Use a range preference for TCP ports rather than single value. Show interesting values in tree roots and/or the Info column. Use common functions to dissect some protocol fields. Change-Id: I9f5ca2565f47fc84d9c82a31511fae813542482e Reviewed-on: https://code.wireshark.org/review/14949 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2016-01-25Move the proto data stuff out of frame_data.[ch].Guy Harris1-0/+1
It's not tied to the frame_data structure any more, so it belongs by itself. Clean up some #includes while we're at it; in particular, frame_data.h doesn't use anything related to tvbuffs, so don't have it gratuitiously include tvbuff.h. Change-Id: Ic32922d4a3840bac47007c5d4c546b8842245e0c Reviewed-on: https://code.wireshark.org/review/13518 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-24Add the packet number to the packet_info structure, and use it.Guy Harris1-3/+3
That removes most of the uses of the frame number field in the frame_data structure. Change-Id: Ie22e4533e87f8360d7c0a61ca6ffb796cc233f22 Reviewed-on: https://code.wireshark.org/review/13509 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-09new_create_dissector_handle -> create_dissector_handle for dissector directory.Michael Mann1-1/+1
Some of the ASN.1 dissectors still generate a new_create_dissector_handle from the tool itself, so leave those for now. Change-Id: Ic6e5803b1444d7ac24070949f5fd557909a5641f Reviewed-on: https://code.wireshark.org/review/12484 Petri-Dish: Anders Broman <a.broman58@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-03-05kafka: misc minor tweaksEvan Huus1-7/+7
Use the new request/response framenum hints. Replace some deprecated APIs. Change-Id: Ia58c49da7e12d01477dadfc7f5a42b152730dc71 Reviewed-on: https://code.wireshark.org/review/7547 Petri-Dish: Evan Huus <eapache@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Evan Huus <eapache@gmail.com>
2015-01-30kafka: fill in some expert infoEvan Huus1-9/+16
Change-Id: I94e655fc56fd1534d57f6917d9e5f4189e08838a Reviewed-on: https://code.wireshark.org/review/6858 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Evan Huus <eapache@gmail.com>
2015-01-27Lua: Expose tcp_dissect_pdus() to LuaHadriel Kaplan1-1/+1
Provide a way for Lua-based dissectors to invoke tcp_dissect_pdus() to make TCP-based dissection easier. Bug: 9851 Change-Id: I91630ebf1f1fc1964118b6750cc34238e18a8ad3 Reviewed-on: https://code.wireshark.org/review/6778 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Tested-by: Hadriel Kaplan <hadrielk@yahoo.com>
2014-12-23Deleting unnecessary #includes from dissectors.Martin Mathieson1-1/+0
Third batch (packet-icmpv6.c -> packet-mac-lte.c). Will look at cleaning up and committing script afterwards. Change-Id: Ib91e36ad200db01c3000605f6a7a21125b96a640 Reviewed-on: https://code.wireshark.org/review/6018 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-12-21Cleanup use of #includes in non-generated epan/dissector/*.cBill Meier1-5/+2
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-10-20kafka: summarize number of messages in a setEvan Huus1-0/+3
Change-Id: I62873a147426079aa4890289320c43ef7f1b26dc Reviewed-on: https://code.wireshark.org/review/4877 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-10-20kafka: compression codec is unsignedEvan Huus1-1/+1
Change-Id: I238e93dd035caa359fed768aa2aac4df5a0ef47e Reviewed-on: https://code.wireshark.org/review/4875 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-08-14Eliminate proto_tree_add_text from some dissectors.Michael Mann1-4/+14
Other minor cleanup while in the neighborhood. Change-Id: If73a029f564219782c313d4154c24c7ce7458b52 Reviewed-on: https://code.wireshark.org/review/3574 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>
2014-07-02kafka: fully dissect offset request/response messagesEvan Huus1-0/+120
Change-Id: I641a3dbece6f822144f6740dde6801b1be202db5 Reviewed-on: https://code.wireshark.org/review/2777 Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-29proto_tree_add_subtree[_format]Michael Mann1-40/+19
Change-Id: Id00f456479415adf0a219af6c9a2108d4b3642d0 Reviewed-on: https://code.wireshark.org/review/2702 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-24Fix two bugs in kafka dissectionEvan Huus1-17/+24
- Respect the length field when dissecting message sets - Don't "wrap around" in capture when doing request/response matches Also convert one instance to proto_tree_add_subtree, as an experiment. Change-Id: Id161687865afa7ca83e6943a643bc54582f65554 Reviewed-on: https://code.wireshark.org/review/2624 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-19Revert "Fixup: tvb_* -> tvb_captured"Michael Mann1-6/+6
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-18Fixup: tvb_* -> tvb_capturedDario Lombardo1-6/+6
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f Reviewed-on: https://code.wireshark.org/review/2377 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-07tvb_new_subset -> tvb_new_subset_length when length parameters are equal.Michael Mann1-1/+1
tvb_new_subset -> tvb_new_subset_remaining it appears that's what the intention is. Change-Id: I2334bbf3f10475b3c22391392fc8b6864454de2d Reviewed-on: https://code.wireshark.org/review/1999 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-05-08Recognize kafka's ConsumerMetadata message typeEvan Huus1-12/+14
actual dissection still TODO Change-Id: I58e54ca117a9ccd5d6af34d18f9277afd009aa95 Reviewed-on: https://code.wireshark.org/review/1547 Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Evan Huus <eapache@gmail.com>
2014-05-06Update kafka dissector closer to latest specEvan Huus1-17/+8
Some new error values, some message types that have been "undocumented" as internal-only, etc. Change-Id: Iff15dd67b188c9e2745964d4916b22e0bea4243d Reviewed-on: https://code.wireshark.org/review/1533 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-09Update kafka OffsetFetchResponse dissectionEvan Huus1-5/+1
Per https://github.com/Shopify/sarama/pull/77 the spec is out of date, there is no longer a clientID field in certain messages. Change-Id: Ieeb7b8f1dd32b326b3d9507e3d5897574a1b09fd Reviewed-on: https://code.wireshark.org/review/1043 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-04-09Update some Kafka API constants per lastest specEvan Huus1-2/+2
Change-Id: Icef981f50e81e5059916e3bde5fa8a1e1fcd92ae Reviewed-on: https://code.wireshark.org/review/1033 Reviewed-by: Alexis La Goutte <alexis.lagoutte@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-20The payload of a compressed Kafka message is supposed to be itself aEvan Huus1-1/+6
message-set, so dissect it as such. I don't have a capture demonstrating this at the moment, but it ought to work. svn path=/trunk/; revision=54303
2013-12-20Simplify dissect_kafka_metadata_request() to not add an unnecessary tree andEvan Huus1-13/+2
match the rest of the protocol dissection in style. svn path=/trunk/; revision=54301
2013-12-20As pointed out in ↵Jeff Morriss1-2/+2
http://ask.wireshark.org/questions/28304/questions-on-packet-kafkac : ett_kafka_metadata_topics is defined (and registered) but not used. Use it. svn path=/trunk/; revision=54294
2013-12-15Fix [-Wmissing-prototypes]Jakub Zawadzki1-0/+1
svn path=/trunk/; revision=54135
2013-12-12(Trivial)Bill Meier1-8/+8
- Fix indentation to match editor modelines (tabs-->spaces); - Rework/add some whitespace; svn path=/trunk/; revision=53978
2013-11-23Create the ability to have packet scoped "proto" data. Bug 9470 ↵Michael Mann1-3/+3
(https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9470) I'm not sold on the name or module the proto_data functions live in, but I believe the function arguments are solid and gives us the most flexibility for the future. And search/replace of a function name is easy enough to do. The big driving force for getting this in sooner rather than later is the saved memory on ethernet packets (and IP packets soon), that used to have file_scope() proto data when all it needed was packet_scope() data (technically packet_info->pool scoped), strictly for Decode As. All dissectors that use p_add_proto_data() only for Decode As functionality have been converted to using packet_scope(). All other dissectors were converted to using file_scope() which was the original scope for "proto" data. svn path=/trunk/; revision=53520
2013-11-13The kafka compression codec is only 2 bits, not 3.Evan Huus1-1/+1
svn path=/trunk/; revision=53309
2013-11-09Add data parameter to tcp_dissect_pdus() as well as convert it to using ↵Michael Mann1-5/+6
"new" style dissectors. Now that "bytes consumed" can be determined, should tcp_dissect_pdus() take advantage of that? Should tcp_dissect_pdus return length (bytes consumed)? There are many dissectors that just call tcp_dissect_pdus() then return tvb_length(tvb). Seems like that could all be rolled into one. svn path=/trunk/; revision=53198
2013-10-27Dissect Kafka "fetch" requests and responses.Evan Huus1-0/+148
svn path=/trunk/; revision=52909
2013-10-25Kafka's CRC is 4 bytes long and is added with ENC_BIG_ENDIAN. Make the hfJeff Morriss1-1/+1
FT_UINT32 instead of FT_BYTES to match. svn path=/trunk/; revision=52845
2013-10-25Fix CID 1080758: be prepared for tvb_child_uncompress() failing (and returningJeff Morriss1-2/+8
NULL). svn path=/trunk/; revision=52844
2013-09-03Decompress gzipped Kafka messages.Evan Huus1-3/+49
svn path=/trunk/; revision=51726
2013-09-02Fix some Dead Store (Dead assignement/Dead increment) Warning found by ClangAlexis La Goutte1-6/+6
svn path=/trunk/; revision=51660
2013-09-02Dissect all the fields in kafka produce request/response pairs. All of theEvan Huus1-2/+139
helpers should be in place for the other message types now. svn path=/trunk/; revision=51648
2013-08-09Decode Kafka metadata requests and responses.Evan Huus1-0/+196
svn path=/trunk/; revision=51239
2013-07-30Dissect more of the Kafka protocol.Evan Huus1-0/+151
svn path=/trunk/; revision=51030
2013-07-25Fix a bug in the Kafka dissector handling PRODUCE requests with a RequiredAcksEvan Huus1-1/+15
field of 0 - we don't expect a response to them. svn path=/trunk/; revision=50894
2013-07-22Commit real kafka dissector this time.Evan Huus1-0/+491
svn path=/trunk/; revision=50779
2013-07-22Remove kafka dissector, accidentally committed symlink instead of real file.Evan Huus1-1/+0
svn path=/trunk/; revision=50778
2013-07-22Skeleton dissector for Apache Kafka's new protocol:Evan Huus1-0/+1
https://cwiki.apache.org/confluence/display/KAFKA/A+Guide+To+The+Kafka+Protocol All the core request/response matching necessary to actually decode is done, and helpers exist for the common Kafka data types. Now it just remains to fill in the rest of the fields. svn path=/trunk/; revision=50777