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 |
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
orpinfo.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 yourProto
to theDissectorTable
? Or do you need to add a differentProto
to theDissectorTable
?