]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-udp.c
The ptp (precision time protocol) with UDP as the transport protocol.
[tcpdump] / print-udp.c
index 77bf330e90d947ad24da7ba8ea6bbc1aebb102e5..8c05217435a63a28228d32bcaf93a3af34e3d7c4 100644 (file)
@@ -520,6 +520,10 @@ udp_print(netdissect_options *ndo, const u_char *bp, u_int length,
                        udpipaddr_print(ndo, ip, sport, dport);
                        lmp_print(ndo, cp, length);
                        break;
+               case PT_PTP:
+                       udpipaddr_print(ndo, ip, sport, dport);
+                       ptp_print(ndo, cp, length);
+                       break;
                }
                return;
        }
@@ -718,7 +722,10 @@ udp_print(netdissect_options *ndo, const u_char *bp, u_int length,
                        if (ndo->ndo_vflag)
                                ND_PRINT("kip ");
                        llap_print(ndo, cp, length);
-               } else {
+                } else if (IS_SRC_OR_DST_PORT(PTP_EVENT_PORT) ||
+                        IS_SRC_OR_DST_PORT(PTP_GENERAL_PORT)) {
+                        ptp_print(ndo, cp, length);
+                } else {
                        if (ulen > length)
                                ND_PRINT("UDP, bad length %u > %u",
                                    ulen, length);