This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

Static linking dissector with library

0

Hi

Is it possible to make dissector without dependence on the dynamic-link libraries (e.g. libwireshark.so.0)?

Thank you

asked 30 Nov '16, 03:23

BorisBochkarev's gravatar image

BorisBochkarev
6112
accept rate: 0%


One Answer:

0

Oof, I suppose it's possible but you'd have to work out how to do it yourself. Basically you'd be statically linking all of the dynamic libraries into your dissector. (Presumably you're talking about a plugin dissector since a built-in dissector is part of libwireshark.so.)

Of course one would have to wonder: why would you want to? You'll end up with one giant plugin which wouldn't be loadable by Wireshark or any of its tools (since those will have duplicate symbols for all of the things statically linked into your plugin). Using it in a separate program might be feasible but that program is going to have to know all about libwireshark anyway (that's how the dissector is going to be called) so it wouldn't make sense for that program to not link with libwireshark directly.

answered 04 Jan '17, 11:36

JeffMorriss's gravatar image

JeffMorriss ♦
6.2k572
accept rate: 27%