Hi,
 
What about this
 
  dissect_my_protocol(...., gboolean tcp)
  {
    ....
  }
 
  dissect_my_protocol_tcp(....)
  {
    dissect_my_protocol(....., TRUE);
  }
  dissect_my_protocol_udp(....)
  {
    dissect_my_protocol(....., FALSE);
  }
 
  heur_dissector_add("tcp", dissect_my_protocol_tcp, proto_myprotocol);
  heur_dissector_add("udp", dissect_my_protocol_udp, proto_myprotocol);
 
Thanx,
Jaap

  _____  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Kumar, Hemant
Sent: 2008-Jul-23 02:11
To: [email protected]
Subject: [Wireshark-dev] Dissector Registration Query



Hello All

 

I just wanted to know whether we can register our plugin dissector with
Multiple protocols.

Basically my dissector should be able to dissect both UDP  and TCP packet
payload.

I am implementing it as a Heuristic dissector  by :--

 

heur_dissector_add("tcp", dissect_mprotocol, proto_myprotocol);

 

 

If I add a line  heur_dissector_add("udp", dissect_mprotocol,
proto_myprotocol);

Then will it work fine. If it does works then , once UDP and TCP throws the
payload to my dissector 

For dissection how I can confirm whether it is UDP or TCP based traffic once
inside the main dissector

Function in the plugin .

 

 

Hoping to get a quick response on this.

 

Thanks a lot!!

 

Hemant

 

_______________________________________________
Wireshark-dev mailing list
[email protected]
https://wireshark.org/mailman/listinfo/wireshark-dev

Reply via email to