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 */
28 #include "netdissect-stdinc.h"
30 #include "netdissect.h"
31 #include "addrtoname.h"
33 #include "appletalk.h"
47 nd_uint16_t rh_flags
; /* T:2 P:1 CNT:5 PT:8 */
48 nd_uint16_t rh_len
; /* length of message (in words) */
49 nd_uint32_t rh_ssrc
; /* synchronization src id */
53 nd_uint32_t upper
; /* more significant 32 bits */
54 nd_uint32_t lower
; /* less significant 32 bits */
61 ntp64 sr_ntp
; /* 64-bit ntp timestamp */
62 nd_uint32_t sr_ts
; /* reference media timestamp */
63 nd_uint32_t sr_np
; /* no. packets sent */
64 nd_uint32_t sr_nb
; /* no. bytes sent */
69 * Time stamps are middle 32-bits of ntp timestamp.
72 nd_uint32_t rr_srcid
; /* sender being reported */
73 nd_uint32_t rr_nl
; /* no. packets lost */
74 nd_uint32_t rr_ls
; /* extended last seq number received */
75 nd_uint32_t rr_dv
; /* jitter (delay variance) */
76 nd_uint32_t rr_lsr
; /* orig. ts from last rr from this src */
77 nd_uint32_t rr_dlsr
; /* time from recpt of last rr to xmit time */
81 #define RTCP_PT_SR 200
82 #define RTCP_PT_RR 201
83 #define RTCP_PT_SDES 202
84 #define RTCP_SDES_CNAME 1
85 #define RTCP_SDES_NAME 2
86 #define RTCP_SDES_EMAIL 3
87 #define RTCP_SDES_PHONE 4
88 #define RTCP_SDES_LOC 5
89 #define RTCP_SDES_TOOL 6
90 #define RTCP_SDES_NOTE 7
91 #define RTCP_SDES_PRIV 8
92 #define RTCP_PT_BYE 203
93 #define RTCP_PT_APP 204
96 vat_print(netdissect_options
*ndo
, const u_char
*hdr
, u_int length
)
101 ndo
->ndo_protocol
= "vat";
103 ND_PRINT("udp/va/vat, length %u < 2", length
);
106 ts
= GET_BE_U_2(hdr
);
107 if ((ts
& 0xf060) != 0) {
109 ND_PRINT("udp/vt %u %u / %u",
111 ts
& 0x3ff, ts
>> 10);
117 ND_PRINT("udp/vat, length %u < 8", length
);
120 i0
= GET_BE_U_4(&((const u_int
*)hdr
)[0]);
121 i1
= GET_BE_U_4(&((const u_int
*)hdr
)[1]);
122 ND_PRINT("udp/vat %u c%u %u%s",
125 i1
, i0
& 0x800000? "*" : "");
128 ND_PRINT(" f%u", (i0
>> 16) & 0x1f);
130 ND_PRINT(" s%u", (i0
>> 24) & 0x3f);
135 rtp_print(netdissect_options
*ndo
, const u_char
*hdr
, u_int len
)
138 const u_int
*ip
= (const u_int
*)hdr
;
139 u_int hasopt
, hasext
, contype
, hasmarker
, dlen
;
143 ndo
->ndo_protocol
= "rtp";
145 ND_PRINT("udp/rtp, length %u < 8", len
);
148 i0
= GET_BE_U_4(&((const u_int
*)hdr
)[0]);
149 i1
= GET_BE_U_4(&((const u_int
*)hdr
)[1]);
156 if ((i0
>> 30) == 1) {
157 /* rtp v1 - draft-ietf-avt-rtp-04 */
158 hasopt
= i0
& 0x800000;
159 contype
= (i0
>> 16) & 0x3f;
160 hasmarker
= i0
& 0x400000;
163 /* rtp v2 - RFC 3550 */
165 ND_PRINT("udp/rtp, length %u < 12", dlen
+ 8);
168 hasext
= i0
& 0x10000000;
169 contype
= (i0
>> 16) & 0x7f;
170 hasmarker
= i0
& 0x800000;
176 ND_PRINT("udp/%s %u c%u %s%s %u %u",
180 (hasopt
|| hasext
)? "+" : "",
184 if (ndo
->ndo_vflag
) {
185 ND_PRINT(" %u", GET_BE_U_4(&((const u_int
*)hdr
)[2]));
190 optlen
= (i2
>> 16) & 0xff;
191 if (optlen
== 0 || optlen
> len
) {
197 } while ((int)i2
>= 0);
202 extlen
= (i2
& 0xffff) + 1;
209 if (contype
== 0x1f) /*XXX H.261 */
210 ND_PRINT(" 0x%04x", GET_BE_U_4(ip
) >> 16);
214 static const u_char
*
215 rtcp_print(netdissect_options
*ndo
, const u_char
*hdr
, const u_char
*ep
)
217 /* rtp v2 control (rtcp) */
218 const struct rtcp_rr
*rr
= 0;
219 const struct rtcp_sr
*sr
;
220 const struct rtcphdr
*rh
= (const struct rtcphdr
*)hdr
;
226 ndo
->ndo_protocol
= "rtcp";
227 if ((const u_char
*)(rh
+ 1) > ep
)
230 len
= (GET_BE_U_2(rh
->rh_len
) + 1) * 4;
231 flags
= GET_BE_U_2(rh
->rh_flags
);
232 cnt
= (flags
>> 8) & 0x1f;
233 switch (flags
& 0xff) {
235 sr
= (const struct rtcp_sr
*)(rh
+ 1);
237 if (len
!= cnt
* sizeof(*rr
) + sizeof(*sr
) + sizeof(*rh
))
238 ND_PRINT(" [%u]", len
);
240 ND_PRINT(" %u", GET_BE_U_4(rh
->rh_ssrc
));
241 if ((const u_char
*)(sr
+ 1) > ep
)
244 ts
= (double)(GET_BE_U_4(sr
->sr_ntp
.upper
)) +
245 ((double)(GET_BE_U_4(sr
->sr_ntp
.lower
)) /
247 ND_PRINT(" @%.2f %u %up %ub", ts
, GET_BE_U_4(sr
->sr_ts
),
248 GET_BE_U_4(sr
->sr_np
), GET_BE_U_4(sr
->sr_nb
));
249 rr
= (const struct rtcp_rr
*)(sr
+ 1);
253 if (len
!= cnt
* sizeof(*rr
) + sizeof(*rh
))
254 ND_PRINT(" [%u]", len
);
255 rr
= (const struct rtcp_rr
*)(rh
+ 1);
257 ND_PRINT(" %u", GET_BE_U_4(rh
->rh_ssrc
));
260 ND_PRINT(" sdes %u", len
);
262 ND_PRINT(" %u", GET_BE_U_4(rh
->rh_ssrc
));
266 ND_PRINT(" bye %u", len
);
268 ND_PRINT(" %u", GET_BE_U_4(rh
->rh_ssrc
));
272 ND_PRINT(" type-0x%x %u", flags
& 0xff, len
);
277 ND_PRINT(" c%u", cnt
);
279 if ((const u_char
*)(rr
+ 1) > ep
)
283 ND_PRINT(" %u", GET_BE_U_4(rr
->rr_srcid
));
284 ts
= (double)(GET_BE_U_4(rr
->rr_lsr
)) / 65536.;
285 dts
= (double)(GET_BE_U_4(rr
->rr_dlsr
)) / 65536.;
286 ND_PRINT(" %ul %us %uj @%.2f+%.2f",
287 GET_BE_U_4(rr
->rr_nl
) & 0x00ffffff,
288 GET_BE_U_4(rr
->rr_ls
),
289 GET_BE_U_4(rr
->rr_dv
), ts
, dts
);
299 static uint16_t udp_cksum(netdissect_options
*ndo
, const struct ip
*ip
,
300 const struct udphdr
*up
,
303 return nextproto4_cksum(ndo
, ip
, (const uint8_t *)(const void *)up
, len
, len
,
307 static uint16_t udp6_cksum(netdissect_options
*ndo
, const struct ip6_hdr
*ip6
,
308 const struct udphdr
*up
, u_int len
)
310 return nextproto6_cksum(ndo
, ip6
, (const uint8_t *)(const void *)up
, len
, len
,
315 udpipaddr_print(netdissect_options
*ndo
,
316 const struct ip
*ip
, const uint16_t sport
, const uint16_t dport
)
318 const struct ip6_hdr
*ip6
= (const struct ip6_hdr
*)ip
;
320 if (IP_V(ip
) == 4 && GET_U_1(ip
->ip_p
) == IPPROTO_UDP
) {
321 ND_PRINT("%s.%s > %s.%s: ",
322 GET_IPADDR_STRING(ip
->ip_src
),
323 udpport_string(ndo
, sport
),
324 GET_IPADDR_STRING(ip
->ip_dst
),
325 udpport_string(ndo
, dport
));
326 } else if (IP_V(ip
) == 6 && GET_U_1(ip6
->ip6_nxt
) == IPPROTO_UDP
) {
327 ND_PRINT("%s.%s > %s.%s: ",
328 GET_IP6ADDR_STRING(ip6
->ip6_src
),
329 udpport_string(ndo
, sport
),
330 GET_IP6ADDR_STRING(ip6
->ip6_dst
),
331 udpport_string(ndo
, dport
));
333 ND_PRINT("%s > %s: ",
334 udpport_string(ndo
, sport
), udpport_string(ndo
, dport
));
338 udpipaddr_noport_print(netdissect_options
*ndo
, const struct ip
*ip
)
340 const struct ip6_hdr
*ip6
= (const struct ip6_hdr
*)ip
;
342 if (IP_V(ip
) == 4 && GET_U_1(ip
->ip_p
) == IPPROTO_UDP
) {
343 ND_PRINT("%s > %s: ",
344 GET_IPADDR_STRING(ip
->ip_src
),
345 GET_IPADDR_STRING(ip
->ip_dst
));
346 } else if (IP_V(ip
) == 6 && GET_U_1(ip6
->ip6_nxt
) == IPPROTO_UDP
) {
347 ND_PRINT("%s > %s: ",
348 GET_IP6ADDR_STRING(ip6
->ip6_src
),
349 GET_IP6ADDR_STRING(ip6
->ip6_dst
));
354 udp_print(netdissect_options
*ndo
, const u_char
*bp
, u_int length
,
355 const u_char
*bp2
, int fragmented
, u_int ttl_hl
)
357 const struct udphdr
*up
;
360 const u_char
*ep
= ndo
->ndo_snapend
;
361 uint16_t sport
, dport
;
363 const struct ip6_hdr
*ip6
;
365 ndo
->ndo_protocol
= "udp";
366 up
= (const struct udphdr
*)bp
;
367 ip
= (const struct ip
*)bp2
;
369 ip6
= (const struct ip6_hdr
*)bp2
;
372 if (!ND_TTEST_2(up
->uh_dport
)) {
373 udpipaddr_noport_print(ndo
, ip
);
377 sport
= GET_BE_U_2(up
->uh_sport
);
378 dport
= GET_BE_U_2(up
->uh_dport
);
379 if (ndo
->ndo_packettype
!= PT_RPC
)
380 udpipaddr_print(ndo
, ip
, sport
, dport
);
382 if (length
< sizeof(struct udphdr
)) {
383 ND_PRINT("truncated-udp %u", length
);
386 if (!ND_TTEST_2(up
->uh_ulen
)) {
389 ulen
= GET_BE_U_2(up
->uh_ulen
);
391 * IPv6 Jumbo Datagrams; see RFC 2675.
392 * If the length is zero, and the length provided to us is
393 * > 65535, use the provided length as the length.
395 if (ulen
== 0 && length
> 65535)
397 if (ulen
< sizeof(struct udphdr
)) {
398 ND_PRINT("truncated-udplength %u", ulen
);
401 ulen
-= sizeof(struct udphdr
);
402 length
-= sizeof(struct udphdr
);
406 cp
= (const u_char
*)(up
+ 1);
407 if (cp
> ndo
->ndo_snapend
) {
411 if (ndo
->ndo_packettype
) {
412 const struct sunrpc_msg
*rp
;
413 enum sunrpc_msg_type direction
;
415 switch (ndo
->ndo_packettype
) {
418 vat_print(ndo
, cp
, length
);
422 wb_print(ndo
, cp
, length
);
426 rp
= (const struct sunrpc_msg
*)cp
;
427 direction
= (enum sunrpc_msg_type
) GET_BE_U_4(rp
->rm_direction
);
428 if (direction
== SUNRPC_CALL
)
429 sunrpc_print(ndo
, (const u_char
*)rp
, length
,
432 nfsreply_print(ndo
, (const u_char
*)rp
, length
,
433 (const u_char
*)ip
); /*XXX*/
437 rtp_print(ndo
, cp
, length
);
442 cp
= rtcp_print(ndo
, cp
, ep
);
446 snmp_print(ndo
, cp
, length
);
454 tftp_print(ndo
, cp
, length
);
458 aodv_print(ndo
, cp
, length
,
463 radius_print(ndo
, cp
, length
);
467 vxlan_print(ndo
, cp
, length
);
472 pgm_print(ndo
, cp
, length
, bp2
);
475 lmp_print(ndo
, cp
, length
);
478 ptp_print(ndo
, cp
, length
);
481 someip_print(ndo
, cp
, length
);
484 /* over_tcp: FALSE, is_mdns: FALSE */
485 domain_print(ndo
, cp
, length
, FALSE
, FALSE
);
491 if (!ndo
->ndo_qflag
) {
492 const struct sunrpc_msg
*rp
;
493 enum sunrpc_msg_type direction
;
495 rp
= (const struct sunrpc_msg
*)cp
;
496 if (ND_TTEST_4(rp
->rm_direction
)) {
497 direction
= (enum sunrpc_msg_type
) GET_BE_U_4(rp
->rm_direction
);
498 if (dport
== NFS_PORT
&& direction
== SUNRPC_CALL
) {
499 ND_PRINT("NFS request xid %u ",
500 GET_BE_U_4(rp
->rm_xid
));
501 nfsreq_noaddr_print(ndo
, (const u_char
*)rp
, length
,
505 if (sport
== NFS_PORT
&& direction
== SUNRPC_REPLY
) {
506 ND_PRINT("NFS reply xid %u ",
507 GET_BE_U_4(rp
->rm_xid
));
508 nfsreply_noaddr_print(ndo
, (const u_char
*)rp
, length
,
513 if (dport
== SUNRPC_PORT
&& direction
== SUNRPC_CALL
) {
514 sunrpc_print((const u_char
*)rp
, length
, (const u_char
*)ip
);
521 if (ndo
->ndo_vflag
&& !ndo
->ndo_Kflag
&& !fragmented
) {
522 /* Check the checksum, if possible. */
523 uint16_t sum
, udp_sum
;
526 * XXX - do this even if vflag == 1?
527 * TCP does, and we do so for UDP-over-IPv6.
529 if (IP_V(ip
) == 4 && (ndo
->ndo_vflag
> 1)) {
530 udp_sum
= GET_BE_U_2(up
->uh_sum
);
532 ND_PRINT("[no cksum] ");
533 } else if (ND_TTEST_LEN(cp
, length
)) {
534 sum
= udp_cksum(ndo
, ip
, up
, length
+ sizeof(struct udphdr
));
537 ND_PRINT("[bad udp cksum 0x%04x -> 0x%04x!] ",
539 in_cksum_shouldbe(udp_sum
, sum
));
541 ND_PRINT("[udp sum ok] ");
544 else if (IP_V(ip
) == 6) {
545 /* for IPv6, UDP checksum is mandatory */
546 if (ND_TTEST_LEN(cp
, length
)) {
547 sum
= udp6_cksum(ndo
, ip6
, up
, length
+ sizeof(struct udphdr
));
548 udp_sum
= GET_BE_U_2(up
->uh_sum
);
551 ND_PRINT("[bad udp cksum 0x%04x -> 0x%04x!] ",
553 in_cksum_shouldbe(udp_sum
, sum
));
555 ND_PRINT("[udp sum ok] ");
560 if (!ndo
->ndo_qflag
) {
561 if (IS_SRC_OR_DST_PORT(NAMESERVER_PORT
))
562 /* over_tcp: FALSE, is_mdns: FALSE */
563 domain_print(ndo
, cp
, length
, FALSE
, FALSE
);
564 else if (IS_SRC_OR_DST_PORT(MULTICASTDNS_PORT
))
565 /* over_tcp: FALSE, is_mdns: TRUE */
566 domain_print(ndo
, cp
, length
, FALSE
, TRUE
);
567 else if (IS_SRC_OR_DST_PORT(TIMED_PORT
))
568 timed_print(ndo
, (const u_char
*)cp
);
569 else if (IS_SRC_OR_DST_PORT(TFTP_PORT
))
570 tftp_print(ndo
, cp
, length
);
571 else if (IS_SRC_OR_DST_PORT(BOOTPC_PORT
) || IS_SRC_OR_DST_PORT(BOOTPS_PORT
))
572 bootp_print(ndo
, cp
, length
);
573 else if (IS_SRC_OR_DST_PORT(RIP_PORT
))
574 rip_print(ndo
, cp
, length
);
575 else if (IS_SRC_OR_DST_PORT(AODV_PORT
))
576 aodv_print(ndo
, cp
, length
,
578 else if (IS_SRC_OR_DST_PORT(ISAKMP_PORT
))
579 isakmp_print(ndo
, cp
, length
, bp2
);
580 else if (IS_SRC_OR_DST_PORT(ISAKMP_PORT_NATT
))
581 isakmp_rfc3948_print(ndo
, cp
, length
, bp2
, IP_V(ip
), fragmented
, ttl_hl
);
582 else if (IS_SRC_OR_DST_PORT(ISAKMP_PORT_USER1
) || IS_SRC_OR_DST_PORT(ISAKMP_PORT_USER2
))
583 isakmp_print(ndo
, cp
, length
, bp2
);
584 else if (IS_SRC_OR_DST_PORT(SNMP_PORT
) || IS_SRC_OR_DST_PORT(SNMPTRAP_PORT
))
585 snmp_print(ndo
, cp
, length
);
586 else if (IS_SRC_OR_DST_PORT(NTP_PORT
))
587 ntp_print(ndo
, cp
, length
);
588 else if (IS_SRC_OR_DST_PORT(KERBEROS_PORT
) || IS_SRC_OR_DST_PORT(KERBEROS_SEC_PORT
))
589 krb_print(ndo
, (const u_char
*)cp
);
590 else if (IS_SRC_OR_DST_PORT(L2TP_PORT
))
591 l2tp_print(ndo
, cp
, length
);
593 else if (IS_SRC_OR_DST_PORT(NETBIOS_NS_PORT
))
594 nbt_udp137_print(ndo
, cp
, length
);
595 else if (IS_SRC_OR_DST_PORT(NETBIOS_DGRAM_PORT
))
596 nbt_udp138_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(RIPNG_PORT
))
611 ripng_print(ndo
, cp
, length
);
612 else if (IS_SRC_OR_DST_PORT(DHCP6_SERV_PORT
) || IS_SRC_OR_DST_PORT(DHCP6_CLI_PORT
))
613 dhcp6_print(ndo
, cp
, length
);
614 else if (IS_SRC_OR_DST_PORT(AHCP_PORT
))
615 ahcp_print(ndo
, cp
, length
);
616 else if (IS_SRC_OR_DST_PORT(BABEL_PORT
) || IS_SRC_OR_DST_PORT(BABEL_PORT_OLD
))
617 babel_print(ndo
, cp
, length
);
618 else if (IS_SRC_OR_DST_PORT(HNCP_PORT
))
619 hncp_print(ndo
, cp
, length
);
621 * Kludge in test for whiteboard packets.
623 else if (dport
== WB_PORT
)
624 wb_print(ndo
, cp
, length
);
625 else if (IS_SRC_OR_DST_PORT(CISCO_AUTORP_PORT
))
626 cisco_autorp_print(ndo
, cp
, length
);
627 else if (IS_SRC_OR_DST_PORT(RADIUS_PORT
) ||
628 IS_SRC_OR_DST_PORT(RADIUS_NEW_PORT
) ||
629 IS_SRC_OR_DST_PORT(RADIUS_ACCOUNTING_PORT
) ||
630 IS_SRC_OR_DST_PORT(RADIUS_NEW_ACCOUNTING_PORT
) ||
631 IS_SRC_OR_DST_PORT(RADIUS_CISCO_COA_PORT
) ||
632 IS_SRC_OR_DST_PORT(RADIUS_COA_PORT
) )
633 radius_print(ndo
, cp
, length
);
634 else if (dport
== HSRP_PORT
)
635 hsrp_print(ndo
, cp
, length
);
636 else if (IS_SRC_OR_DST_PORT(LWRES_PORT
))
637 lwres_print(ndo
, cp
, length
);
638 else if (IS_SRC_OR_DST_PORT(LDP_PORT
))
639 ldp_print(ndo
, cp
, length
);
640 else if (IS_SRC_OR_DST_PORT(OLSR_PORT
))
641 olsr_print(ndo
, cp
, length
,
642 (IP_V(ip
) == 6) ? 1 : 0);
643 else if (IS_SRC_OR_DST_PORT(MPLS_LSP_PING_PORT
))
644 lspping_print(ndo
, cp
, length
);
645 else if (sport
== BCM_LI_PORT
)
646 bcm_li_print(ndo
, cp
, length
);
647 else if (dport
== BFD_CONTROL_PORT
||
648 dport
== BFD_MULTIHOP_PORT
||
649 dport
== BFD_LAG_PORT
||
650 dport
== BFD_ECHO_PORT
)
651 bfd_print(ndo
, cp
, length
, dport
);
652 else if (IS_SRC_OR_DST_PORT(LMP_PORT
))
653 lmp_print(ndo
, cp
, length
);
654 else if (IS_SRC_OR_DST_PORT(VQP_PORT
))
655 vqp_print(ndo
, cp
, length
);
656 else if (IS_SRC_OR_DST_PORT(SFLOW_PORT
))
657 sflow_print(ndo
, cp
, length
);
658 else if (dport
== LWAPP_CONTROL_PORT
)
659 lwapp_control_print(ndo
, cp
, length
, 1);
660 else if (sport
== LWAPP_CONTROL_PORT
)
661 lwapp_control_print(ndo
, cp
, length
, 0);
662 else if (IS_SRC_OR_DST_PORT(LWAPP_DATA_PORT
))
663 lwapp_data_print(ndo
, cp
, length
);
664 else if (IS_SRC_OR_DST_PORT(SIP_PORT
))
665 sip_print(ndo
, cp
, length
);
666 else if (IS_SRC_OR_DST_PORT(SYSLOG_PORT
))
667 syslog_print(ndo
, cp
, length
);
668 else if (IS_SRC_OR_DST_PORT(OTV_PORT
))
669 otv_print(ndo
, cp
, length
);
670 else if (IS_SRC_OR_DST_PORT(VXLAN_PORT
))
671 vxlan_print(ndo
, cp
, length
);
672 else if (IS_SRC_OR_DST_PORT(GENEVE_PORT
))
673 geneve_print(ndo
, cp
, length
);
674 else if (IS_SRC_OR_DST_PORT(LISP_CONTROL_PORT
))
675 lisp_print(ndo
, cp
, length
);
676 else if (IS_SRC_OR_DST_PORT(VXLAN_GPE_PORT
))
677 vxlan_gpe_print(ndo
, cp
, length
);
678 else if (IS_SRC_OR_DST_PORT(ZEP_PORT
))
679 zep_print(ndo
, cp
, length
);
680 else if (IS_SRC_OR_DST_PORT(MPLS_PORT
))
681 mpls_print(ndo
, cp
, length
);
682 else if (ND_TTEST_1(((const struct LAP
*)cp
)->type
) &&
683 GET_U_1(((const struct LAP
*)cp
)->type
) == lapDDP
&&
684 (atalk_port(sport
) || atalk_port(dport
))) {
687 llap_print(ndo
, cp
, length
);
688 } else if (IS_SRC_OR_DST_PORT(PTP_EVENT_PORT
) ||
689 IS_SRC_OR_DST_PORT(PTP_GENERAL_PORT
)) {
690 ptp_print(ndo
, cp
, length
);
691 } else if (IS_SRC_OR_DST_PORT(SOMEIP_PORT
))
692 someip_print(ndo
, cp
, length
);
694 if (ulen
> length
&& !fragmented
)
695 ND_PRINT("UDP, bad length %u > %u",
698 ND_PRINT("UDP, length %u", ulen
);
701 if (ulen
> length
&& !fragmented
)
702 ND_PRINT("UDP, bad length %u > %u",
705 ND_PRINT("UDP, length %u", ulen
);