Wireshark-dev: Re: [Wireshark-dev] problems with accessing pinfo, tvb in C, pinfo and tvb are p

From: Balint Reczey <Balint.Reczey@xxxxxxxxxxxx>
Date: Tue, 09 Dec 2008 11:55:24 +0100
Hi,

I think you could create an enhancement request in the bugtracker 
about making private_data accessible via Lua API. (Patches are
welcome! ;-))

That way you would not have to deal with the internal changes of the Lua
plugin.

Cheers,
Balint


2008. 12. 9, kedd keltezéssel 17.46-kor yami ezt írta:
> Hi dev,
> 
> Here is my story: my C dissector stores some information in
> pinfo->private_data, then it calls my lua dissector. I also wrote a C
> dynamic library which can be called by lua dissector, so that lua
> dissector can extract information from pinfo->private_data. The whole
> process can be ilustrated by:
> 
> C dissector ---calls---> lua dissector 
>      ----loadlib---> C function extract data from pinfo->private_data 
>          ----return-data----> lua dissector
> 
> Unfortunately the definition of Pinfo in epan/wslua/wslua.h was
> changed from rev. 25844 to rev. 25845 [1]. Due to this change, my code
> make wireshark crash.
> 
> My question is: how can we prevent this kind of thing in the futhure?
> By adding a function (or macro) like this (?)
> 
> packet_info* wslua_pinfo(Pinfo pinfo)
> {
>     return pinfo->ws_pinfo;
> }
> 
> Thanks!
> 
> ----
> 
> [1] See bug 2453:
> https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2453
> _______________________________________________
> Wireshark-dev mailing list
> Wireshark-dev@xxxxxxxxxxxxx
> https://wireshark.org/mailman/listinfo/wireshark-dev