Wireshark mailing list archives

Re: Calling MAC-LTE dissctor from lua dissector on the rest of te data


From: "Lehmann, Florian (EXT-Other - DE/Ulm)" <florian.lehmann.ext () nsn com>
Date: Wed, 18 Jan 2012 08:22:12 +0100

Hi Martin,

 

this is exactly the dissector I want to call, but unfortunately, I
cannot set the required context information associated to that frame or
paket from within lua. 

 

I found one hint about doing the same from a C decoder  here:
http://www.wireshark.org/lists/wireshark-dev/201101/msg00255.html

It seems as if I have to set the information for struct mac_lte_info
somewhere in pinfo which is not working for me. Is there any lua
equivalent for p_add_proto_data? 

I tried 

pinfo.cols.radioType = 1

which results in

Lua Error: ...Program Files\Wireshark\lua\test.lua:xxx: bad argument #2
to '?' (Columns__newindex: the column name must be a valid column)

 

The only way I see so far is rewriting the code in C and using
p_add_proto_data.

 

BR,

Florian

From: wireshark-users-bounces () wireshark org
[mailto:wireshark-users-bounces () wireshark org] On Behalf Of ext Martin
Mathieson
Sent: Tuesday, January 17, 2012 4:35 PM
To: Community support list for Wireshark
Subject: Re: [Wireshark-users] Calling MAC-LTE dissctor from lua
dissector on the rest of te data

 

Hi Florian, see information below.

Martin

On Tue, Jan 17, 2012 at 5:51 AM, Lehmann, Florian (EXT-Other - DE/Ulm)
<florian.lehmann.ext () nsn com> wrote:

Hi All,

I hope this is the right place to ask as I can't find any helpful
information.
I have a simple UDP Protocol, which has a MAC-LTE packet embedded. After
dissecting my part of the packet, I would like to call the MAC-LTE
dissector on the rest of the data.

 

Did you see the existing heuristic dissector?  Is this format suitable
for what you are doing?  See the MAC-LTE wiki page and the link to
packet-mac-lte.h for details.

 

I also have a change almost ready to submit that breaks the parsing of
the context information out from the heuristic dissector into a separate
function (I have a need to write to a file with a new DLT, where the
format of the frames is just the context header followed by the MAC
payload. So I have a simple dissector that will register with a DLT (or
use a "user" one, parse this header and pass the payload to the
"mac-lte" dissector).

 

        Calling the MAC-LTE dissector like:
        
        local dissector = Dissector.get("mac-lte")
        dissector:call(buffer(macPduDumpDataPos):tvb(), pinfo, subtree)
        
        results in the following error message:
        Can't dissect LTE MAC frame because no per-frame info was
attached.
        
        Could anyone point me in the right direction, how to dissect
only the
        header information from my custom protocol and to call the
MAC-LTE
        dissector afterwards?
        
        I am using Wireshark version 1.5.1-RL30_110407 (SVN Rev 35697
from
        /trunk).
        
        Thanks and BR,
        Florian
        
        
        
________________________________________________________________________
___
        Sent via:    Wireshark-users mailing list
<wireshark-users () wireshark org>
        Archives:    http://www.wireshark.org/lists/wireshark-users
        Unsubscribe:
https://wireshark.org/mailman/options/wireshark-users
        
mailto:wireshark-users-request () wireshark org?subject=unsubscribe

 

___________________________________________________________________________
Sent via:    Wireshark-users mailing list <wireshark-users () wireshark org>
Archives:    http://www.wireshark.org/lists/wireshark-users
Unsubscribe: https://wireshark.org/mailman/options/wireshark-users
             mailto:wireshark-users-request () wireshark org?subject=unsubscribe

Current thread: