Wireshark-dev: Re: [Wireshark-dev] LUA dissector: server port is 400-port range
From: "Maynard, Chris" <Christopher.Maynard@xxxxxxx>
Date: Wed, 2 Nov 2016 13:59:39 +0000

You could try:  tcp_port_table:add(“8000-8399”, mgi_dissector)

- Chris

 

 

From: wireshark-dev-bounces@xxxxxxxxxxxxx [mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] On Behalf Of Jerry White
Sent: Tuesday, November 1, 2016 11:07 PM
To: Developer support list for Wireshark <wireshark-dev@xxxxxxxxxxxxx>
Subject: [Wireshark-dev] LUA dissector: server port is 400-port range

 

I'm writing a dissector for an application that can use any tcp port between 8000-8399. I've been doing multiple port dissection with the following code, but it seems unmanageable for 400 ports.

 

local tcp_port_table = DissectorTable.get("tcp.port")

local mgi_dissector = tcp_port_table:get_dissector(6110) -- this port should be the same as above

for i,port in ipairs{6111,6112,6113,6114,6115,6150,6151,6152,6153,6154,6155} do

        tcp_port_table:add(port,mgi_dissector)

end

 

Any help appreciated.

Jerry

 

CONFIDENTIALITY NOTICE: This message is the property of International Game Technology PLC and/or its subsidiaries and may contain proprietary, confidential or trade secret information.  This message is intended solely for the use of the addressee.  If you are not the intended recipient and have received this message in error, please delete this message from your system. Any unauthorized reading, distribution, copying, or other use of this message or its attachments is strictly prohibited.