aboutsummaryrefslogtreecommitdiffstats
path: root/epan/capture_dissectors.c
AgeCommit message (Collapse)AuthorFilesLines
2016-10-28Implement registration of capture dissectors by nameJoão Valverde1-10/+53
Mirror it after protocol dissector API. Change-Id: I7985bcfa9e07654c7cf005efec94efc205d7a304 Reviewed-on: https://code.wireshark.org/review/18496 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-06-21The C standard requires <stdlib.h> for getenv() and abort().Guy Harris1-0/+1
You might be able to get away with not including it on some or all UN*Xes, but you can't do so on Windows with MSVC. Change-Id: Id2de70745e2a6e8dedc005a55030f3d3fcb54a69 Reviewed-on: https://code.wireshark.org/review/16064 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-06-21More helpful failure when registration fails.Joerg Mayer1-0/+7
Change-Id: I3c574c504cc9166d04b5b725a6a393767a58a280 Reviewed-on: https://code.wireshark.org/review/16063 Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2015-12-22Don't limit capture packet counts to a fixed set of protocols.Michael Mann1-0/+27
Kept backwards compatibility with GTK+ capture info dialog by keeping the protocols tracked hardcoded, but Qt should have more freedom. Change-Id: I497be71ec761d53f312e14858daa7152d01b8c72 Reviewed-on: https://code.wireshark.org/review/12724 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-12-17Create capture dissector "info" structure (capture_packet_info_t)Michael Mann1-2/+2
While it currently only contains packet_counts, it will hopefully stabilize the capture function signature if more fields are added. Change-Id: I003552c58043c7c2d67aec458187b12b233057e2 Reviewed-on: https://code.wireshark.org/review/12690 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-14Create capture dissector tables.Michael Mann1-13/+58
They are modeled after dissection dissector tables, but for the moment, don't have/need the flexibility. They are intended to be much simpler/faster than full dissection. The two most used/needed are "wtap_encap" and "ethertype", so they were the basis of starting to use and test capture dissector table API. Others may be added in the future. The "capture dissector" function signature needed a bit of tweeking to handling "claiming" of a packet. The current application of this is capture functions returning TRUE if they affected a "type" of packet count. Returning FALSE ends up considering the packet an "other" type. Change-Id: I81d06a6ccb2c03665f087258a46b9d78d513d6cd Reviewed-on: https://code.wireshark.org/review/12607 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-13Fix crash at startupPascal Quantin1-4/+4
Change-Id: I6d21fb06ace6186991f4e481bfc7452364e6c4f7 Reviewed-on: https://code.wireshark.org/review/12602 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-12-13Create a way to register "capture" dissectors.Michael Mann1-0/+85
Capture dissectors could be architected like dissection dissectors, with tables and subtables and possibly using tvbs to pass there data instead of raw byte arrays. This is a first step towards that by refactoring capture_info_packet() to work off of a "capture dissector table" Registering the capture dissection functions instead of calling them directly also clears up a bunch of dissector header files who sole purpose was providing the capture dissection function definition. Change-Id: I10e9b79e061f32d2572f009823601d4f048d37aa Reviewed-on: https://code.wireshark.org/review/12581 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>