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

Lua wireshark dissector registered to multiple ports

0

Hi, I'm working lua based custom dissector in wireshark which runs over tcp. The port numbers through which the devices send request and response keeps changing everytime. I need a way to register the new port found everytime. I figured out a way to get the src or dst port numbers from pinfo by using pinfo.src_port or pinfo.dst_port. But I need to way to register the new found port number in the DissectorTable. Please help me out here.

Thanks

asked 27 May '14, 22:40

PradeepKR's gravatar image

PradeepKR
11112
accept rate: 0%

I'm not sure I understand the problem you're having. Nothing prevents you adding to a DissectorTable while you're dissecting a packet. You would add it the same way you add it outside of that function.

Having said that... you said you're getting the port number from pinfo.src_port or pinfo.dst_port, but those are the port numbers of the packet you're dissecting... so if you're already dissecting it, why do you need to add your Proto to the DissectorTable? Or do you need to add a different Proto to the DissectorTable?

(22 Jun '14, 10:35) Hadriel