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

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
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×637
×431
×69
×7
×5

question asked: 27 May '14, 22:40

question was seen: 2,610 times

last updated: 22 Jun '14, 10:35

p​o​w​e​r​e​d by O​S​Q​A