Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: [Wireshark-dev] LUA dissector: server port is 400-port range

From: Jerry White <jerrywhite518@xxxxxxxxx>
Date: Tue, 1 Nov 2016 20:06:48 -0700
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