Ask Your Question
0

tvb_format_stringzpad reported as undefined

asked 2022-08-28 15:53:09 +0000

updated 2022-08-28 20:41:38 +0000

Guy Harris gravatar image

Compiling my custom plugin on Apple silicon that calls tvb_format_stringzpad(), I get a linker error saying: Undefined symbols for architecture arm64: "_tvb_format_stringzpad", referenced from: my_dissector_function in packet-my_proto.o ld: symbol(s) not found for architecture arm64

The symbol seems to be available in: % lipo -archs libwireshark.15.0.7.dylib arm64

% nm -arch arm64 wireshark/build/run/Debug/libwireshark.15.0.7.dylib | grep 'tvb_format_stringzpad$' 00000000000c6c18 t _tvb_format_stringzpad

This being compiled against wireshark-3.6.7: % git rev-parse --short HEAD 4a304d7ec2

Any pointers on how to proceed would be appreciated.

edit retag flag offensive close merge delete

Comments

I think I got the answer. tvb_format_stringzpad is not an exported function and seems to be restricted for use within libwireshark itself by not being declared as WS_DLL_PUBLIC, is that correct?

Alexander Kapshuk gravatar imageAlexander Kapshuk ( 2022-08-28 16:51:27 +0000 )edit

There is a Closed issue (585: Export tvb_format_stringzpad() functions) that discusses "best practice".

Chuckc gravatar imageChuckc ( 2022-08-28 18:48:35 +0000 )edit

Thanks. I'll look into that.

Alexander Kapshuk gravatar imageAlexander Kapshuk ( 2022-08-29 07:45:41 +0000 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-08-29 07:16:51 +0000

Guy Harris gravatar image

tvb_format_stringzpad is not an exported function and seems to be restricted for use within libwireshark itself by not being declared as WS_DLL_PUBLIC, is that correct?

Correct.

edit flag offensive delete link more

Comments

Thanks for confirming that.

Alexander Kapshuk gravatar imageAlexander Kapshuk ( 2022-08-29 07:45:53 +0000 )edit

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: 2022-08-28 15:24:30 +0000

Seen: 31 times

Last updated: Aug 29