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

From: [email protected] 
[mailto:[email protected]] On Behalf Of Jerry White
Sent: Tuesday, November 1, 2016 11:07 PM
To: Developer support list for Wireshark <[email protected]>
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.
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <[email protected]>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
             mailto:[email protected]?subject=unsubscribe

Reply via email to