2 * Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
3 * The Regents of the University of California. All rights reserved.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that: (1) source code distributions
7 * retain the above copyright notice and this paragraph in its entirety, (2)
8 * distributions including binary code include the above copyright notice and
9 * this paragraph in its entirety in the documentation or other materials
10 * provided with the distribution, and (3) all advertising materials mentioning
11 * features or use of this software display the following acknowledgement:
12 * ``This product includes software developed by the University of California,
13 * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
14 * the University nor the names of its contributors may be used to endorse
15 * or promote products derived from this software without specific prior
17 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
18 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
19 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
22 /* \summary: UDP printer */
26 #include "netdissect-stdinc.h"
28 #include "netdissect.h"
29 #include "addrtoname.h"
31 #include "appletalk.h"
45 nd_uint16_t rh_flags
; /* T:2 P:1 CNT:5 PT:8 */
46 nd_uint16_t rh_len
; /* length of message (in words) */
47 nd_uint32_t rh_ssrc
; /* synchronization src id */
51 nd_uint32_t upper
; /* more significant 32 bits */
52 nd_uint32_t lower
; /* less significant 32 bits */
59 ntp64 sr_ntp
; /* 64-bit ntp timestamp */
60 nd_uint32_t sr_ts
; /* reference media timestamp */
61 nd_uint32_t sr_np
; /* no. packets sent */
62 nd_uint32_t sr_nb
; /* no. bytes sent */
67 * Time stamps are middle 32-bits of ntp timestamp.
70 nd_uint32_t rr_srcid
; /* sender being reported */
71 nd_uint32_t rr_nl
; /* no. packets lost */
72 nd_uint32_t rr_ls
; /* extended last seq number received */
73 nd_uint32_t rr_dv
; /* jitter (delay variance) */
74 nd_uint32_t rr_lsr
; /* orig. ts from last rr from this src */
75 nd_uint32_t rr_dlsr
; /* time from recpt of last rr to xmit time */
79 #define RTCP_PT_SR 200
80 #define RTCP_PT_RR 201
81 #define RTCP_PT_SDES 202
82 #define RTCP_SDES_CNAME 1
83 #define RTCP_SDES_NAME 2
84 #define RTCP_SDES_EMAIL 3
85 #define RTCP_SDES_PHONE 4
86 #define RTCP_SDES_LOC 5
87 #define RTCP_SDES_TOOL 6
88 #define RTCP_SDES_NOTE 7
89 #define RTCP_SDES_PRIV 8
90 #define RTCP_PT_BYE 203
91 #define RTCP_PT_APP 204
94 vat_print(netdissect_options
*ndo
, const u_char
*hdr
, u_int length
)
99 ndo
->ndo_protocol
= "vat";
101 ND_PRINT("udp/va/vat, length %u < 2", length
);
104 ts
= GET_BE_U_2(hdr
);
105 if ((ts
& 0xf060) != 0) {
107 ND_PRINT("udp/vt %u %u / %u",
109 ts
& 0x3ff, ts
>> 10);
115 ND_PRINT("udp/vat, length %u < 8", length
);
118 i0
= GET_BE_U_4(&((const u_int
*)hdr
)[0]);
119 i1
= GET_BE_U_4(&((const u_int
*)hdr
)[1]);
120 ND_PRINT("udp/vat %u c%u %u%s",
123 i1
, i0
& 0x800000? "*" : "");
126 ND_PRINT(" f%u", (i0
>> 16) & 0x1f);
128 ND_PRINT(" s%u", (i0
>> 24) & 0x3f);
133 rtp_print(netdissect_options
*ndo
, const u_char
*hdr
, u_int len
)
136 const u_int
*ip
= (const u_int
*)hdr
;
137 u_int hasopt
, hasext
, contype
, hasmarker
, dlen
;
141 ndo
->ndo_protocol
= "rtp";
143 ND_PRINT("udp/rtp, length %u < 8", len
);
146 i0
= GET_BE_U_4(&((const u_int
*)hdr
)[0]);
147 i1
= GET_BE_U_4(&((const u_int
*)hdr
)[1]);
154 if ((i0
>> 30) == 1) {
155 /* rtp v1 - draft-ietf-avt-rtp-04 */
156 hasopt
= i0
& 0x800000;
157 contype
= (i0
>> 16) & 0x3f;
158 hasmarker
= i0
& 0x400000;
161 /* rtp v2 - RFC 3550 */
163 ND_PRINT("udp/rtp, length %u < 12", dlen
+ 8);
166 hasext
= i0
& 0x10000000;
167 contype
= (i0
>> 16) & 0x7f;
168 hasmarker
= i0
& 0x800000;
174 ND_PRINT("udp/%s %u c%u %s%s %u %u",
178 (hasopt
|| hasext
)? "+" : "",
182 if (ndo
->ndo_vflag
) {
183 ND_PRINT(" %u", GET_BE_U_4(&((const u_int
*)hdr
)[2]));
188 optlen
= (i2
>> 16) & 0xff;
189 if (optlen
== 0 || optlen
> len
) {
195 } while ((int)i2
>= 0);
200 extlen
= (i2
& 0xffff) + 1;
207 if (contype
== 0x1f) /*XXX H.261 */
208 ND_PRINT(" 0x%04x", GET_BE_U_4(ip
) >> 16);
212 static const u_char
*
213 rtcp_print(netdissect_options
*ndo
, const u_char
*hdr
)
215 /* rtp v2 control (rtcp) */
216 const struct rtcp_rr
*rr
= 0;
217 const struct rtcp_sr
*sr
;
218 const struct rtcphdr
*rh
= (const struct rtcphdr
*)hdr
;
225 ndo
->ndo_protocol
= "rtcp";
226 len
= (GET_BE_U_2(rh
->rh_len
) + 1) * 4;
227 flags
= GET_BE_U_2(rh
->rh_flags
);
228 cnt
= (flags
>> 8) & 0x1f;
229 ssrc
= GET_BE_U_4(rh
->rh_ssrc
);
230 switch (flags
& 0xff) {
232 sr
= (const struct rtcp_sr
*)(rh
+ 1);
234 if (len
!= cnt
* sizeof(*rr
) + sizeof(*sr
) + sizeof(*rh
))
235 ND_PRINT(" [%u]", len
);
237 ND_PRINT(" %u", ssrc
);
238 ts
= (double)(GET_BE_U_4(sr
->sr_ntp
.upper
)) +
239 ((double)(GET_BE_U_4(sr
->sr_ntp
.lower
)) /
241 ND_PRINT(" @%.2f %u %up %ub", ts
, GET_BE_U_4(sr
->sr_ts
),
242 GET_BE_U_4(sr
->sr_np
), GET_BE_U_4(sr
->sr_nb
));
243 rr
= (const struct rtcp_rr
*)(sr
+ 1);
247 if (len
!= cnt
* sizeof(*rr
) + sizeof(*rh
))
248 ND_PRINT(" [%u]", len
);
249 rr
= (const struct rtcp_rr
*)(rh
+ 1);
251 ND_PRINT(" %u", ssrc
);
254 ND_PRINT(" sdes %u", len
);
256 ND_PRINT(" %u", ssrc
);
260 ND_PRINT(" bye %u", len
);
262 ND_PRINT(" %u", ssrc
);
266 ND_PRINT(" type-0x%x %u", flags
& 0xff, len
);
271 ND_PRINT(" c%u", cnt
);
274 ND_PRINT(" %u", GET_BE_U_4(rr
->rr_srcid
));
275 ts
= (double)(GET_BE_U_4(rr
->rr_lsr
)) / 65536.;
276 dts
= (double)(GET_BE_U_4(rr
->rr_dlsr
)) / 65536.;
277 ND_PRINT(" %ul %us %uj @%.2f+%.2f",
278 GET_BE_U_4(rr
->rr_nl
) & 0x00ffffff,
279 GET_BE_U_4(rr
->rr_ls
),
280 GET_BE_U_4(rr
->rr_dv
), ts
, dts
);
286 static uint16_t udp_cksum(netdissect_options
*ndo
, const struct ip
*ip
,
287 const struct udphdr
*up
,
290 return nextproto4_cksum(ndo
, ip
, (const uint8_t *)(const void *)up
, len
, len
,
294 static uint16_t udp6_cksum(netdissect_options
*ndo
, const struct ip6_hdr
*ip6
,
295 const struct udphdr
*up
, u_int len
)
297 return nextproto6_cksum(ndo
, ip6
, (const uint8_t *)(const void *)up
, len
, len
,
302 udpipaddr_print(netdissect_options
*ndo
,
303 const struct ip
*ip
, const uint16_t sport
, const uint16_t dport
)
305 const struct ip6_hdr
*ip6
= (const struct ip6_hdr
*)ip
;
307 if (IP_V(ip
) == 4 && GET_U_1(ip
->ip_p
) == IPPROTO_UDP
) {
308 ND_PRINT("%s.%s > %s.%s: ",
309 GET_IPADDR_STRING(ip
->ip_src
),
310 udpport_string(ndo
, sport
),
311 GET_IPADDR_STRING(ip
->ip_dst
),
312 udpport_string(ndo
, dport
));
313 } else if (IP_V(ip
) == 6 && GET_U_1(ip6
->ip6_nxt
) == IPPROTO_UDP
) {
314 ND_PRINT("%s.%s > %s.%s: ",
315 GET_IP6ADDR_STRING(ip6
->ip6_src
),
316 udpport_string(ndo
, sport
),
317 GET_IP6ADDR_STRING(ip6
->ip6_dst
),
318 udpport_string(ndo
, dport
));
320 ND_PRINT("%s > %s: ",
321 udpport_string(ndo
, sport
), udpport_string(ndo
, dport
));
325 udpipaddr_noport_print(netdissect_options
*ndo
, const struct ip
*ip
)
327 const struct ip6_hdr
*ip6
= (const struct ip6_hdr
*)ip
;
329 if (IP_V(ip
) == 4 && GET_U_1(ip
->ip_p
) == IPPROTO_UDP
) {
330 ND_PRINT("%s > %s: ",
331 GET_IPADDR_STRING(ip
->ip_src
),
332 GET_IPADDR_STRING(ip
->ip_dst
));
333 } else if (IP_V(ip
) == 6 && GET_U_1(ip6
->ip6_nxt
) == IPPROTO_UDP
) {
334 ND_PRINT("%s > %s: ",
335 GET_IP6ADDR_STRING(ip6
->ip6_src
),
336 GET_IP6ADDR_STRING(ip6
->ip6_dst
));
341 udp_print(netdissect_options
*ndo
, const u_char
*bp
, u_int length
,
342 const u_char
*bp2
, int fragmented
, u_int ttl_hl
)
344 const struct udphdr
*up
;
347 const u_char
*ep
= ndo
->ndo_snapend
;
348 uint16_t sport
, dport
;
351 const struct ip6_hdr
*ip6
;
353 ndo
->ndo_protocol
= "udp";
354 up
= (const struct udphdr
*)bp
;
355 ip
= (const struct ip
*)bp2
;
357 ip6
= (const struct ip6_hdr
*)bp2
;
360 if (!ND_TTEST_2(up
->uh_dport
)) {
361 udpipaddr_noport_print(ndo
, ip
);
362 nd_trunc_longjmp(ndo
);
365 sport
= GET_BE_U_2(up
->uh_sport
);
366 dport
= GET_BE_U_2(up
->uh_dport
);
367 if (ndo
->ndo_packettype
!= PT_RPC
)
368 udpipaddr_print(ndo
, ip
, sport
, dport
);
370 ND_ICHECKMSG_ZU("undersized-udp", length
, <, sizeof(struct udphdr
));
371 ulen
= GET_BE_U_2(up
->uh_ulen
);
372 udp_sum
= GET_BE_U_2(up
->uh_sum
);
374 * IPv6 Jumbo Datagrams; see RFC 2675.
375 * If the length is zero, and the length provided to us is
376 * > 65535, use the provided length as the length.
378 if (ulen
== 0 && length
> 65535)
380 ND_ICHECKMSG_ZU("undersized-udplength", ulen
, <,
381 sizeof(struct udphdr
));
382 ulen
-= sizeof(struct udphdr
);
383 length
-= sizeof(struct udphdr
);
387 cp
= (const u_char
*)(up
+ 1);
389 if (ndo
->ndo_packettype
) {
390 const struct sunrpc_msg
*rp
;
391 enum sunrpc_msg_type direction
;
393 switch (ndo
->ndo_packettype
) {
396 vat_print(ndo
, cp
, length
);
400 wb_print(ndo
, cp
, length
);
404 rp
= (const struct sunrpc_msg
*)cp
;
405 direction
= (enum sunrpc_msg_type
) GET_BE_U_4(rp
->rm_direction
);
406 if (direction
== SUNRPC_CALL
)
407 sunrpc_print(ndo
, (const u_char
*)rp
, length
,
410 nfsreply_print(ndo
, (const u_char
*)rp
, length
,
411 (const u_char
*)ip
); /*XXX*/
415 rtp_print(ndo
, cp
, length
);
420 cp
= rtcp_print(ndo
, cp
);
424 snmp_print(ndo
, cp
, length
);
432 tftp_print(ndo
, cp
, length
);
436 aodv_print(ndo
, cp
, length
, IP_V(ip
) == 6);
440 radius_print(ndo
, cp
, length
);
444 vxlan_print(ndo
, cp
, length
);
449 pgm_print(ndo
, cp
, length
, bp2
);
452 lmp_print(ndo
, cp
, length
);
455 ptp_print(ndo
, cp
, length
);
458 someip_print(ndo
, cp
, length
);
461 /* over_tcp: FALSE, is_mdns: FALSE */
462 domain_print(ndo
, cp
, length
, FALSE
, FALSE
);
471 if (!ndo
->ndo_qflag
) {
472 const struct sunrpc_msg
*rp
;
473 enum sunrpc_msg_type direction
;
475 rp
= (const struct sunrpc_msg
*)cp
;
476 if (ND_TTEST_4(rp
->rm_direction
)) {
477 direction
= (enum sunrpc_msg_type
) GET_BE_U_4(rp
->rm_direction
);
478 if (dport
== NFS_PORT
&& direction
== SUNRPC_CALL
) {
479 ND_PRINT("NFS request xid %u ",
480 GET_BE_U_4(rp
->rm_xid
));
481 nfsreq_noaddr_print(ndo
, (const u_char
*)rp
, length
,
485 if (sport
== NFS_PORT
&& direction
== SUNRPC_REPLY
) {
486 ND_PRINT("NFS reply xid %u ",
487 GET_BE_U_4(rp
->rm_xid
));
488 nfsreply_noaddr_print(ndo
, (const u_char
*)rp
, length
,
493 if (dport
== SUNRPC_PORT
&& direction
== SUNRPC_CALL
) {
494 sunrpc_print((const u_char
*)rp
, length
, (const u_char
*)ip
);
501 if (ndo
->ndo_vflag
&& !ndo
->ndo_Kflag
&& !fragmented
) {
502 /* Check the checksum, if possible. */
506 * XXX - do this even if vflag == 1?
507 * TCP does, and we do so for UDP-over-IPv6.
509 if (IP_V(ip
) == 4 && (ndo
->ndo_vflag
> 1)) {
511 ND_PRINT("[no cksum] ");
512 } else if (ND_TTEST_LEN(cp
, length
)) {
513 sum
= udp_cksum(ndo
, ip
, up
, length
+ sizeof(struct udphdr
));
516 ND_PRINT("[bad udp cksum 0x%04x -> 0x%04x!] ",
518 in_cksum_shouldbe(udp_sum
, sum
));
520 ND_PRINT("[udp sum ok] ");
522 } else if (IP_V(ip
) == 6) {
523 /* for IPv6, UDP checksum is mandatory */
524 if (ND_TTEST_LEN(cp
, length
)) {
525 sum
= udp6_cksum(ndo
, ip6
, up
, length
+ sizeof(struct udphdr
));
528 ND_PRINT("[bad udp cksum 0x%04x -> 0x%04x!] ",
530 in_cksum_shouldbe(udp_sum
, sum
));
532 ND_PRINT("[udp sum ok] ");
537 if (!ndo
->ndo_qflag
) {
538 if (IS_SRC_OR_DST_PORT(NAMESERVER_PORT
))
539 /* over_tcp: FALSE, is_mdns: FALSE */
540 domain_print(ndo
, cp
, length
, FALSE
, FALSE
);
541 else if (IS_SRC_OR_DST_PORT(BOOTPC_PORT
) ||
542 IS_SRC_OR_DST_PORT(BOOTPS_PORT
))
543 bootp_print(ndo
, cp
, length
);
544 else if (IS_SRC_OR_DST_PORT(TFTP_PORT
))
545 tftp_print(ndo
, cp
, length
);
546 else if (IS_SRC_OR_DST_PORT(KERBEROS_PORT
))
547 krb_print(ndo
, (const u_char
*)cp
);
548 else if (IS_SRC_OR_DST_PORT(NTP_PORT
))
549 ntp_print(ndo
, cp
, length
);
551 else if (IS_SRC_OR_DST_PORT(NETBIOS_NS_PORT
))
552 nbt_udp137_print(ndo
, cp
, length
);
553 else if (IS_SRC_OR_DST_PORT(NETBIOS_DGRAM_PORT
))
554 nbt_udp138_print(ndo
, cp
, length
);
556 else if (IS_SRC_OR_DST_PORT(SNMP_PORT
) ||
557 IS_SRC_OR_DST_PORT(SNMPTRAP_PORT
))
558 snmp_print(ndo
, cp
, length
);
559 else if (IS_SRC_OR_DST_PORT(PTP_EVENT_PORT
) ||
560 IS_SRC_OR_DST_PORT(PTP_GENERAL_PORT
))
561 ptp_print(ndo
, cp
, length
);
562 else if (IS_SRC_OR_DST_PORT(CISCO_AUTORP_PORT
))
563 cisco_autorp_print(ndo
, cp
, length
);
564 else if (IS_SRC_OR_DST_PORT(ISAKMP_PORT
))
565 isakmp_print(ndo
, cp
, length
, bp2
);
566 else if (IS_SRC_OR_DST_PORT(SYSLOG_PORT
))
567 syslog_print(ndo
, cp
, length
);
568 else if (IS_SRC_OR_DST_PORT(RIP_PORT
))
569 rip_print(ndo
, cp
, length
);
570 else if (IS_SRC_OR_DST_PORT(RIPNG_PORT
))
571 ripng_print(ndo
, cp
, length
);
572 else if (IS_SRC_OR_DST_PORT(TIMED_PORT
))
573 timed_print(ndo
, (const u_char
*)cp
);
574 else if (IS_SRC_OR_DST_PORT(DHCP6_SERV_PORT
) ||
575 IS_SRC_OR_DST_PORT(DHCP6_CLI_PORT
))
576 dhcp6_print(ndo
, cp
, length
);
577 else if (IS_SRC_OR_DST_PORT(LDP_PORT
))
578 ldp_print(ndo
, cp
, length
);
579 else if (IS_SRC_OR_DST_PORT(AODV_PORT
))
580 aodv_print(ndo
, cp
, length
, IP_V(ip
) == 6);
581 else if (IS_SRC_OR_DST_PORT(OLSR_PORT
))
582 olsr_print(ndo
, cp
, length
, IP_V(ip
) == 6);
583 else if (IS_SRC_OR_DST_PORT(LMP_PORT
))
584 lmp_print(ndo
, cp
, length
);
585 else if (IS_SRC_OR_DST_PORT(KERBEROS_SEC_PORT
))
586 krb_print(ndo
, (const u_char
*)cp
);
587 else if (IS_SRC_OR_DST_PORT(LWRES_PORT
))
588 lwres_print(ndo
, cp
, length
);
589 else if (IS_SRC_OR_DST_PORT(MULTICASTDNS_PORT
))
590 /* over_tcp: FALSE, is_mdns: TRUE */
591 domain_print(ndo
, cp
, length
, FALSE
, TRUE
);
592 else if (IS_SRC_OR_DST_PORT(ISAKMP_PORT_NATT
))
593 isakmp_rfc3948_print(ndo
, cp
, length
, bp2
, IP_V(ip
), fragmented
, ttl_hl
);
594 else if (IS_SRC_OR_DST_PORT(ISAKMP_PORT_USER1
) || IS_SRC_OR_DST_PORT(ISAKMP_PORT_USER2
))
595 isakmp_print(ndo
, cp
, length
, bp2
);
596 else if (IS_SRC_OR_DST_PORT(L2TP_PORT
))
597 l2tp_print(ndo
, cp
, length
);
598 else if (dport
== VAT_PORT
)
599 vat_print(ndo
, cp
, length
);
600 else if (IS_SRC_OR_DST_PORT(ZEPHYR_SRV_PORT
) || IS_SRC_OR_DST_PORT(ZEPHYR_CLT_PORT
))
601 zephyr_print(ndo
, cp
, length
);
603 * Since there are 10 possible ports to check, I think
604 * a <> test would be more efficient
606 else if ((sport
>= RX_PORT_LOW
&& sport
<= RX_PORT_HIGH
) ||
607 (dport
>= RX_PORT_LOW
&& dport
<= RX_PORT_HIGH
))
608 rx_print(ndo
, cp
, length
, sport
, dport
,
609 (const u_char
*) ip
);
610 else if (IS_SRC_OR_DST_PORT(AHCP_PORT
))
611 ahcp_print(ndo
, cp
, length
);
612 else if (IS_SRC_OR_DST_PORT(BABEL_PORT
) || IS_SRC_OR_DST_PORT(BABEL_PORT_OLD
))
613 babel_print(ndo
, cp
, length
);
614 else if (IS_SRC_OR_DST_PORT(HNCP_PORT
))
615 hncp_print(ndo
, cp
, length
);
617 * Kludge in test for whiteboard packets.
619 else if (dport
== WB_PORT
)
620 wb_print(ndo
, cp
, length
);
621 else if (IS_SRC_OR_DST_PORT(RADIUS_PORT
) ||
622 IS_SRC_OR_DST_PORT(RADIUS_NEW_PORT
) ||
623 IS_SRC_OR_DST_PORT(RADIUS_ACCOUNTING_PORT
) ||
624 IS_SRC_OR_DST_PORT(RADIUS_NEW_ACCOUNTING_PORT
) ||
625 IS_SRC_OR_DST_PORT(RADIUS_CISCO_COA_PORT
) ||
626 IS_SRC_OR_DST_PORT(RADIUS_COA_PORT
) )
627 radius_print(ndo
, cp
, length
);
628 else if (dport
== HSRP_PORT
)
629 hsrp_print(ndo
, cp
, length
);
630 else if (IS_SRC_OR_DST_PORT(MPLS_LSP_PING_PORT
))
631 lspping_print(ndo
, cp
, length
);
632 else if (dport
== BFD_CONTROL_PORT
||
633 dport
== BFD_MULTIHOP_PORT
||
634 dport
== BFD_LAG_PORT
||
635 dport
== SBFD_PORT
||
636 dport
== BFD_ECHO_PORT
)
637 bfd_print(ndo
, cp
, length
, dport
);
638 else if (sport
== SBFD_PORT
)
639 bfd_print(ndo
, cp
, length
, sport
);
640 else if (IS_SRC_OR_DST_PORT(VQP_PORT
))
641 vqp_print(ndo
, cp
, length
);
642 else if (IS_SRC_OR_DST_PORT(SFLOW_PORT
))
643 sflow_print(ndo
, cp
, length
);
644 else if (dport
== LWAPP_CONTROL_PORT
)
645 lwapp_control_print(ndo
, cp
, length
, 1);
646 else if (sport
== LWAPP_CONTROL_PORT
)
647 lwapp_control_print(ndo
, cp
, length
, 0);
648 else if (IS_SRC_OR_DST_PORT(LWAPP_DATA_PORT
))
649 lwapp_data_print(ndo
, cp
, length
);
650 else if (IS_SRC_OR_DST_PORT(SIP_PORT
))
651 sip_print(ndo
, cp
, length
);
652 else if (IS_SRC_OR_DST_PORT(OTV_PORT
))
653 otv_print(ndo
, cp
, length
);
654 else if (IS_SRC_OR_DST_PORT(VXLAN_PORT
))
655 vxlan_print(ndo
, cp
, length
);
656 else if (dport
== GENEVE_PORT
)
657 geneve_print(ndo
, cp
, length
);
658 else if (IS_SRC_OR_DST_PORT(LISP_CONTROL_PORT
))
659 lisp_print(ndo
, cp
, length
);
660 else if (IS_SRC_OR_DST_PORT(VXLAN_GPE_PORT
))
661 vxlan_gpe_print(ndo
, cp
, length
);
662 else if (IS_SRC_OR_DST_PORT(ZEP_PORT
))
663 zep_print(ndo
, cp
, length
);
664 else if (IS_SRC_OR_DST_PORT(MPLS_PORT
))
665 mpls_print(ndo
, cp
, length
);
666 else if ((atalk_port(sport
) || atalk_port(dport
)) &&
667 GET_U_1(((const struct LAP
*)cp
)->type
) == lapDDP
) {
670 llap_print(ndo
, cp
, length
);
671 } else if (IS_SRC_OR_DST_PORT(SOMEIP_PORT
))
672 someip_print(ndo
, cp
, length
);
673 else if (IS_SRC_OR_DST_PORT(HTTPS_PORT
) &&
674 quic_detect(ndo
, cp
, length
))
676 else if (sport
== BCM_LI_PORT
)
677 bcm_li_print(ndo
, cp
, length
);
679 if (ulen
> length
&& !fragmented
)
680 ND_PRINT("UDP, bad length %u > %u",
683 ND_PRINT("UDP, length %u", ulen
);
686 if (ulen
> length
&& !fragmented
)
687 ND_PRINT("UDP, bad length %u > %u",
690 ND_PRINT("UDP, length %u", ulen
);
695 nd_print_invalid(ndo
);