OSQA is unmaintained. Help us figure out where to go from here.

Here is the thing.

  • source port is an ephemeral port and destination port is 5001 (iperf)
  • I'm trying to create a dissector which dissects the ACK packets from destination to source port.

Code 1.

      local tcp_dissector_table = DissectorTable.get("tcp.port")
      tcp_dissector_table:add(5001, my_proto)

with the code 1., it dissects only the packets from source to destination.

So I solved the problem with the code 2.

Code 2.

    function my_proto.dissector(buffer, pinfo, root)
      if f_tcp_srcport().value == 5001 then
      --my source
      end
    end

    register_postdissector(my_proto)

The question is 'why does the code 3. not work as it did like Code 1.?".

Code 3.

local tcp_dissector_table = DissectorTable.get("tcp.port")
tcp_dissector_table:add(5001, my_proto)

asked 17 May, 22:41

ngn505's gravatar image

ngn505
65
accept rate: 0%

edited 18 May, 00:48

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:

×614
×414
×24

question asked: 17 May, 22:41

question was seen: 66 times

last updated: 18 May, 00:48

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