Hi,

Thanks for the answers, now I at least understand what is going on. 
Unfortunately it seems,  the data parameter in the dissector call is not 
promoted to Lua (maybe somthing for another enhancement :) ). So I will 
probably try to implement Pascal's solution first.

Sebastian

> Am 15.12.2015 um 12:53 schrieb Michael Mann <[email protected]>:
> 
> The CAN ID is passed as the "data" parameter to the subdissector from the CAN 
> dissector.  The C code of a subdissector to handle it would be as follows:
>  
> struct can_identifier
> {
>     guint32 id;
> };
>  
> static int subdissector_function(tvbuff_t *tvb, packet_info *pinfo, 
> proto_tree *tree, void* data)
> {
>     struct can_identifier can_id;
>     can_id = *((struct can_identifier*)data);
>     if (can_id.id != 42)
>     {
>         return 0;
>     }
>     ...
> }
>  
> I'm not as familiar with Lua to know how to setup the equivalent, but you 
> shouldn't need to "override" the CAN dissector to get the CAN ID.
>  
>  
> 
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <[email protected]>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:[email protected]?subject=unsubscribe

Reply via email to