]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-udp.c
Autosar SOME/IP protocol support
[tcpdump] / print-udp.c
index d130eee7752a5d1b665d8c99bf4f4513f7d36c4a..9cde3d8910f588f974bb583879905b4aa0d37598 100644 (file)
@@ -524,6 +524,10 @@ udp_print(netdissect_options *ndo, const u_char *bp, u_int length,
                        udpipaddr_print(ndo, ip, sport, dport);
                        ptp_print(ndo, cp, length);
                        break;
+               case PT_SOMEIP:
+                       udpipaddr_print(ndo, ip, sport, dport);
+                       someip_print(ndo, cp, length);
+                       break;
                }
                return;
        }
@@ -727,7 +731,9 @@ udp_print(netdissect_options *ndo, const u_char *bp, u_int length,
                 } else if (IS_SRC_OR_DST_PORT(PTP_EVENT_PORT) ||
                         IS_SRC_OR_DST_PORT(PTP_GENERAL_PORT)) {
                         ptp_print(ndo, cp, length);
-                } else {
+                } else if (IS_SRC_OR_DST_PORT(SOMEIP_PORT))
+                        someip_print(ndo, (const u_char *)(up + 1), length);
+                else {
                        if (ulen > length)
                                ND_PRINT("UDP, bad length %u > %u",
                                    ulen, length);