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

Can we define multiple criteria for our dissector plugin to be called ?

0

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%


One Answer:

1

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.

answered 12 Aug '12, 19:41

Guy%20Harris's gravatar image

Guy Harris ♦♦
17.4k335196
accept rate: 19%