Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Ethereal-users: RE: [Ethereal-users] Ethereal - PTP

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: "Francisco Alcoba (TS/EEM)" <francisco.alcoba@xxxxxxxxxxxx>
Date: Thu, 16 Dec 2004 07:48:17 +0100
> Could you tell me from which file does the function
> "dissect_ptp" is being called?
> I've looked everywhere in the source code but can't
> find the submodule that invokes it.
 
Hi,

I'm not an expert, but the way it works is approximately this:
Inside packet-ptp.c, you've got proto_reg_handoff_ptp. There the code
registers itself as a dissector that applies to udp ports EVENT_PORT_PTP
and GENERAL_PORT_PTP. When the packet is recognized as udp, packet-udp dissector
is called. Once this has read the udp ports, it tries with dissectors that
have registered for those ports -it also tries other methods, not every protocol
is directly associated to a port-. That's probably around decode_udp_ports. So
you don't have any explicit call to dissect_ptp that you can find in the code,
it will be something like dissector_try_port where the arguments have been
set in execution time to the appropiate values.

Of course, packet-udp is called because packet-ip recognized this was an UDP 
packet, packet-ip because... and so on.

Anyway, this question probably belongs to the development list. People there
will probably be able to give you further information.

Regards,
 Francisco