Ask Your Question
0

Wireshark build error

asked 2020-03-05 04:59:47 +0000

Sriram R gravatar image

updated 2020-03-05 06:13:00 +0000

I'm getting the following error while trying to build a plugin for wireshark 3.2.1 on my PC (windows 10)

C:\Users\ravishas\Desktop\wsnew\plugins\epan\expand\packet-expand.c(778,43): warning C4113: 'void (__cdecl *)(tvbuff_t *,packet_info *,proto_tree *)' differs in parameter lists from 'dissector_t' [C:\Development\build_try\plugins\epan\expand\expand.vcxproj]

C:\Users\ravishas\Desktop\wsnew\plugins\epan\expand\packet-expand.c(778,43): warning C4133: 'function': incompatible types - from 'void (__cdecl *)(tvbuff_t *,packet_info *,proto_tree *)' to 'dissector_t' [C:\Development\build_try\plugins\epan\expand\expand.vcxproj]

I have looked into the function and there is an additional " void * " parameter in the dissector_t function. Should that parameter be retained or is there any other workaround?

Thanks in advance

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-03-05 18:43:45 +0000

Guy Harris gravatar image

I have looked into the function and there is an additional " void * " parameter in the dissector_t function.

Yes, there is. A dissector is handed, as its last argument, a void *, which is a pointer to private data being passed to the dissector. Most dissectors are just passed a null pointer; what it gets passed depends on what's calling it.

Should that parameter be retained

Yes. It has to be there, even if the dissector ignores it.

edit flag offensive delete link more

Comments

But it still gives me the same error. How do I rectify it?

Sriram R gravatar imageSriram R ( 2020-03-16 08:50: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: 2020-03-05 04:59:47 +0000

Seen: 191 times

Last updated: Mar 05 '20