Wireshark-users: Re: [Wireshark-users] How to attach a protocol to the ethernet dissector table (
From: "Abhik Sarkar" <sarkar.abhik@xxxxxxxxx>
Date: Tue, 13 Jan 2009 14:46:44 +0400
A quick look at packet-ip.c suggests the table name is "ethertype".

On Tue, Jan 13, 2009 at 1:08 PM, Benoit <benpaka.spam@xxxxxxxxx> wrote:
> I'm actually using a simple protocol to communicate between FPGA and i would
> like to parse it by wireshark.
> I actually have a lua script which works well on the UDP but i would like to
> use only ethernet frame (the protocol should be define by the ethernet
> type).
>
>
>
> s4n_proto = Proto("s4n","S4N","S4N Protocol")
> -- create a function to dissect it
> function s4n_proto.dissector(buffer,
> pinfo,tree)
>     pinfo.cols.protocol = "S4N"
>     ...
> end
>
>
> -- load the udp.port table
> udp_table = DissectorTable.get("udp.port")
> -- register our protocol to handle udp port 18000
> udp_table:add(18000,s4n_proto)
>
> But now i would like to replace this last lines by:
> eth_table = DissectorTable.get("eth.type")
> eth_table:add(18000,s4n_proto)
>
> However, i've a probleme the eth.type is no a dissector table therefore I
> don't know how to do to simply register a simple lua protocol to an ethernet
> type/protocol.
>
>
> Thanks.
>
> --
> Benoit RAT
> www.neub.co.nr
>
> ___________________________________________________________________________
> Sent via:    Wireshark-users mailing list <wireshark-users@xxxxxxxxxxxxx>
> Archives:    http://www.wireshark.org/lists/wireshark-users
> Unsubscribe: https://wireshark.org/mailman/options/wireshark-users
>             mailto:wireshark-users-request@xxxxxxxxxxxxx?subject=unsubscribe
>