summaryrefslogtreecommitdiff
path: root/wiretap/wtap_opttypes.c
AgeCommit message (Collapse)AuthorFilesLines
2016-03-09Initialize write function pointers when copying a new wtap block option.Michael Mann1-0/+2
Issue found by Clang (Assigned value is garbage or undefined). Change-Id: I9a3ab41dd01becbd454af02f2567ea3a2beeba40 Reviewed-on: https://code.wireshark.org/review/14399 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-03-06Improve wiretap block capabilities.Michael Mann1-175/+606
Make a more formal method for registering options within a block and do it all with a single function (wtap_optionblock_add_block). Add ability for block to be able to write itself, refactored out of pcapng.c. This was implemented for SHB, ISB, and IDB blocks. Name resolution (NRB), while possible, seemed a little messy for the moment. Change-Id: Ie855c8550c7c7d96cfc188c0cd90bfbc4d5f0ee8 Reviewed-on: https://code.wireshark.org/review/14357 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-03Refactor wiretap option block types into a registration system.Michael Mann1-189/+259
Also required mergecap to look for plugins to initialize wiretap option blocks. Change-Id: I4208d1028dd0f94f185393801d72025329266cb7 Reviewed-on: https://code.wireshark.org/review/14300 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-03Allocate GArray when copying stat blocks within IDB block.Michael Mann1-1/+1
Don't treat it like a GList Bug: 12220 Change-Id: I057649a26d135516c6e8d4fb028c6cb9dcda2e7c Reviewed-on: https://code.wireshark.org/review/14326 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-01NULL check GArray to prevent assertion.Michael Mann1-1/+2
Change-Id: I52de10a1d96b6ef7294ad8be9ec9195defca4b53 Reviewed-on: https://code.wireshark.org/review/14266 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Graham Bloice <graham.bloice@trihedral.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-01Prevent use-after-free issues with pcapng.c/wtap_opttypes.cMichael Mann1-3/+8
Bug: 12173 Change-Id: Ifff28491073d50e088b26847830a3bc8835f4282 Reviewed-on: https://code.wireshark.org/review/14180 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-02-23Making wiretap option blocks more generic.Michael Mann1-0/+505
This was inspired by https://code.wireshark.org/review/9729/, but takes it in a different direction where all options are put into an array, regardless of whether they are "standard" or "custom". It should be easier to add "custom" options in this design. Some, but not all blocks have been converted. Descriptions of some of the block options have been moved from wtap.h to pcapng.h as it seems to be the one that implements the description of the blocks. Also what could be added/refactored is registering block behavior. Change-Id: I3dffa38f0bb088f98749a4f97a3b7655baa4aa6a Reviewed-on: https://code.wireshark.org/review/13667 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>