First time here? Check out the FAQ!

Ask Your Question
0

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

asked Jun 19 '19

jlshuman gravatar image

updated Jun 19 '19

Guy Harris gravatar image

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?

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
0

answered Jun 19 '19

grahamb gravatar image

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.

Preview: (hide)
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 gravatar imagejlshuman ( Jun 19 '19 )

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

grahamb gravatar imagegrahamb ( Jun 19 '19 )

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: Jun 19 '19

Seen: 371 times

Last updated: Jun 19 '19