aboutsummaryrefslogtreecommitdiffstats
path: root/epan/capture_dissectors.c
AgeCommit message (Collapse)AuthorFilesLines
2019-09-04Load environment vars to globals for efficency.Anders Broman1-1/+1
These environment variables are read very frequently, read them once to globals for performance improvment. Change-Id: I4f05a5edca85b370674cc5f85fce40bd1af695cb Reviewed-on: https://code.wireshark.org/review/34449 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
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>
2018-09-30Fix the type of the packet buffer argument to a capture dissector.Guy Harris1-2/+2
It's a blob of bytes, so the right type is guint8 *, not guchar *. (Yes, in practice, they're both typedefs for "unsigned char" - sadly, C's data types didn't make a distinction between "byte-sized integral value" and "character" - but given that we have different names, let's use them to make it clearer what's being done.) Change-Id: Idb10a208877c84df0432043d69d4aff5a2b2f803 Reviewed-on: https://code.wireshark.org/review/29943 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-16Qt: Implement the capture info dialog.Gerald Combs1-3/+3
Add back the capture info dialog. Draw sparklines for each protocol. Update the User's Guide. Bug: 12004 Change-Id: I45be8a0df4752255831a8b139ee84bb34d675ba9 Reviewed-on: https://code.wireshark.org/review/27565 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-02-13more SPDX convertions.Dario Lombardo1-13/+1
Change-Id: I6b8404c28b31a81767a3b64ffe9ba96156c4c217 Reviewed-on: https://code.wireshark.org/review/25757 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
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>