greatscottgadgets / ubertooth

Software, firmware, and hardware designs for Ubertooth
https://greatscottgadgets.com/ubertoothone/
GNU General Public License v2.0
1.92k stars 430 forks source link

Wireshark plugin error: "btbb.so: undefined symbol: new_create_dissector_handle" #371

Closed mactavishmeng closed 5 years ago

mactavishmeng commented 5 years ago

Sorry for my wired English grammar but I really need help!

I build the btbb plugin according to the "Build-Guide" , but something wrong when I try to capture BLE in my wireshark.

Actually, I don't know how to build these plugins (btbb and btbredr) correctly. When I set the CMAKE_INSTALL_LIBDIR to the root of wireshark's plugins folder (cmake command: cmake -DCMAKE_INSTALL_LIBDIR=/usr/lib/x86_64-linux-gnu/wireshark/plugins/2.6 ..) and run wireshark, there won't be any warning. However, once I change the install path to epan or some exist plugin folder, build btbb and run wireshark, error occured.

Steps to reproduce

  1. Download from release page and extract libbtbb 2018-12-R1
  2. cd into libbtbb-2018-12-R1/wireshark/plugins/btbb
  3. Build plugin according to the "Build-Guide"
  4. Run wireshark image

Expected behaviour

btbb plugin work properly

Actual behaviour

Error occured: "undefined symbol: new_create_dissector_handle"

Version information

Operating system:

Ubertooth tools version (ubertooth-rx -V):

libbtbb version:

Ubertooth firmware version (ubertooth-util -v):

If you are reporting a problem that involves third party software (Wireshark/Kismet/etc), please report the version here. Wireshark version:

Output

There are some warning during make progress:

[ 25%] Generating plugin.c
Scanning dependencies of target btbb
[ 50%] Building C object CMakeFiles/btbb.dir/plugin.c.o
[ 75%] Building C object CMakeFiles/btbb.dir/packet-btbb.c.o
/home/dahua/Documents/libbtbb-2018-12-R1/wireshark/plugins/btbb/packet-btbb.c: In function ‘dissect_dm1’:
/home/dahua/Documents/libbtbb-2018-12-R1/wireshark/plugins/btbb/packet-btbb.c:252:11: warning: assignment makes pointer from integer without a cast [enabled by default]
   pld_tvb = tvb_new_subset(tvb, offset, len, len);
           ^
/home/dahua/Documents/libbtbb-2018-12-R1/wireshark/plugins/btbb/packet-btbb.c:259:12: warning: assignment makes pointer from integer without a cast [enabled by default]
    pld_tvb = tvb_new_subset(tvb, offset, len, len);
            ^
/home/dahua/Documents/libbtbb-2018-12-R1/wireshark/plugins/btbb/packet-btbb.c: In function ‘proto_reg_handoff_btbb’:
/home/dahua/Documents/libbtbb-2018-12-R1/wireshark/plugins/btbb/packet-btbb.c:572:14: warning: assignment makes pointer from integer without a cast [enabled by default]
  btbb_handle = new_create_dissector_handle(dissect_btbb, proto_btbb);
              ^
[100%] Building C object CMakeFiles/btbb.dir/packet-btbrlmp.c.o
/home/dahua/Documents/libbtbb-2018-12-R1/wireshark/plugins/btbb/packet-btbrlmp.c: In function ‘proto_register_btbrlmp’:
/home/dahua/Documents/libbtbb-2018-12-R1/wireshark/plugins/btbb/packet-btbrlmp.c:2864:2: warning: passing argument 2 of ‘register_dissector’ from incompatible pointer type [enabled by default]
  register_dissector("btbrlmp", dissect_btbrlmp, proto_btbrlmp);
  ^
In file included from /home/dahua/Documents/libbtbb-2018-12-R1/wireshark/plugins/btbb/packet-btbrlmp.c:31:0:
/usr/include/wireshark/epan/packet.h:520:34: note: expected ‘dissector_t’ but argument is of type ‘void (*)(struct tvbuff_t *, struct packet_info *, struct proto_tree *)’
 WS_DLL_PUBLIC dissector_handle_t register_dissector(const char *name, dissector_t dissector, const int proto);
                                  ^
Linking C shared module btbb.so
[100%] Built target btbb
mactavishmeng commented 5 years ago

Sorry, I haven't notice that the author has explained this in libbtbb issus 50:

The plugins required vary based on the Wireshark version:
Build legacy for pre-2.0

Build the regular plugins for Wireshark 2.0-2.2

You should not need to build any plugins for Wireshark 2.2+

So I think I don't need to build btbb plugin for my wireshark version 2.6.6