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

I know that we have to give some criteria in proto_reg_handoff_PROTOABBREV function such as --

dissector_add("tcp.port", 3011, ns_nnm_msg_handle);

So here i want my dissector to be called also when tcp.port == 3008, so can i add just another line here such as --

dissector_add("tcp.port", 3008, ns_nnm_msg_handle);

Am i doing correct ? Any help is sincerely appreciated.

asked 12 Aug '12, 09:40

yogeshg's gravatar image

yogeshg
41222326
accept rate: 0%


Yes, you can do that. Many dissectors do, whether it's registering in multiple dissector tables or registering with multiple keys in a single dissector table or both.

If your protocol can run over arbitrary ports, you might want to make a "range" preference, which lets the user specify a list of ports.

permanent link

answered 12 Aug '12, 19:41

Guy%20Harris's gravatar image

Guy Harris ♦♦
17.4k335196
accept rate: 19%

Your answer
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
×173

question asked: 12 Aug '12, 09:40

question was seen: 1,465 times

last updated: 12 Aug '12, 19:41

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