It appear that the for loop that extracts the time stamp from the ptp messages are dependent on the source port. Example if int(pkt.udp.port) == PTP_PORT_1 and int(pkt.ptp.v2_messageid) == MSG_ID_SYNC_MSG:
The if statement evaluates to false if the UDP source port is not 319.
Sine this is a sync message should the if statement evaluate the destination port?