First time here? Check out the FAQ!
THIS IS A TEST INSTANCE. Feel free to ask and answer questions, but take care to avoid triggering too many notifications.
0

Why do I get a link error when I call proto_tree_add_format_wsp_text() in my dissector?

I am trying to make a call to proto_tree_add_format_wsp_text. This method is implemented in proto.c in the epan folder. I can include the header file for it and it will compile, but it will not link because my project does not know where the object code is. When I build Wireshark, I assume that files like proto.c are compiled into a library or dll. I think I should be able to link to that. But what is the file I need to link to and where is it?

jlshuman's avatar
1
jlshuman
asked 2019-06-19 14:06:08 +0000
Guy Harris's avatar
19.9k
Guy Harris
updated 2019-06-19 23:49:41 +0000
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

0

That function isn't exported from the libwireshark library, so can't be used by plugins.

To fix this you can temporarily prefix the declaration in proto.h with WS_DLL_PUBLIC and rebuild.

To create a permanent change you should submit a change at the Wireshark Gerrit instance. See the wiki page on Submitting Patches for more info.

grahamb's avatar
23.8k
grahamb
answered 2019-06-19 14:22:58 +0000
edit flag offensive 0 remove flag delete link

Comments

Is there public code that I can call that would replace the call to proto_tree_format_wsp_text? Something I can call that will do basically the same thing?

jlshuman's avatar jlshuman (2019-06-19 14:47:02 +0000) edit

That depends, what do you actually want to achieve? An example of the input bytes and the output display would help.

grahamb's avatar grahamb (2019-06-19 15:56:46 +0000) edit
add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer