Closed djwbrown closed 8 years ago
Sorry about the confusion! Looks like I was linking against an older version of libwireshark-dev rather than building against the up-to-date wireshark-2.0.3 source. I removed the libwireshark-dev package and modified the CMakeLists file to point to my wireshark-2.0.3 source. Seems to have resolved the issue.
With Wireshark 2.0.3, I've found that the plugin won't load (segfault on startup) due to a misalignment of the hf_register_info array-of-structs.
void proto_register_field_array(const int parent, hf_register_info *hf, const int num_records)
This function in Wireshark expects the data to be packed into 80-byte structures. I've checked with GDB andsizeof(hf_register_info)
evaluates to 80. Relevant line isproto.c:5732
.My btbb.so plugin is providing 88-byte structs (at least the first two are). I believe the
int id
andint parent
, initialized by theHFILL
macro, need to be 32-bit. Maybe there is a compiler flag needed to prevent the padding?3.19.0-59-generic 14.04.1-Ubuntu x86_64 GNU/Linux, wireshark-2.0.3