This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

Prefs.range handling in lua

0

Hi all,

I wonder how to threat Pref.ranges in wiresharks lua interface. I did the following:

proto.prefs.ports = Pref.range( "Ports", "23055-23056", "Ports", 65535)

function proto.init() tcp_port_table = DissectorTable.get("tcp.port") tcp_port_table:add(zeosys_proto.prefs.ports, zeosys_proto)
end

and got:

bad argument #1 to ‘add’ (number expected, got string)

Should I implement the range parsing on my own or are there built-in functions for this?

Cheers, Michael

asked 15 May ‘14, 00:51

MichaelAdam's gravatar image

MichaelAdam
11112
accept rate: 0%

What version of Wireshark? Post the contents of the Help | About | Wireshark tab.

(22 Jun ‘14, 13:00) grahamb ♦


One Answer:

0

This looks like a bug. The add() function for a DissectorTable of tcp.port should be able to handle a range string argument. Please submit a bug to bugzilla.

answered 22 Jun '14, 11:13

Hadriel's gravatar image

Hadriel
2.7k2939
accept rate: 18%