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 #include <sys/cdefs.h>
24 __RCSID("$NetBSD: print-udp.c,v 1.6 2015/03/31 21:59:35 christos Exp $");
27 #define NETDISSECT_REWORKED
32 #include <tcpdump-stdinc.h>
34 #include "interface.h"
35 #include "addrtoname.h"
37 #include "appletalk.h"
53 uint16_t rh_flags
; /* T:2 P:1 CNT:5 PT:8 */
54 uint16_t rh_len
; /* length of message (in words) */
55 uint32_t rh_ssrc
; /* synchronization src id */
59 uint32_t upper
; /* more significant 32 bits */
60 uint32_t lower
; /* less significant 32 bits */
67 ntp64 sr_ntp
; /* 64-bit ntp timestamp */
68 uint32_t sr_ts
; /* reference media timestamp */
69 uint32_t sr_np
; /* no. packets sent */
70 uint32_t sr_nb
; /* no. bytes sent */
75 * Time stamps are middle 32-bits of ntp timestamp.
78 uint32_t rr_srcid
; /* sender being reported */
79 uint32_t rr_nl
; /* no. packets lost */
80 uint32_t rr_ls
; /* extended last seq number received */
81 uint32_t rr_dv
; /* jitter (delay variance) */
82 uint32_t rr_lsr
; /* orig. ts from last rr from this src */
83 uint32_t rr_dlsr
; /* time from recpt of last rr to xmit time */
87 #define RTCP_PT_SR 200
88 #define RTCP_PT_RR 201
89 #define RTCP_PT_SDES 202
90 #define RTCP_SDES_CNAME 1
91 #define RTCP_SDES_NAME 2
92 #define RTCP_SDES_EMAIL 3
93 #define RTCP_SDES_PHONE 4
94 #define RTCP_SDES_LOC 5
95 #define RTCP_SDES_TOOL 6
96 #define RTCP_SDES_NOTE 7
97 #define RTCP_SDES_PRIV 8
98 #define RTCP_PT_BYE 203
99 #define RTCP_PT_APP 204
102 vat_print(netdissect_options
*ndo
, const void *hdr
, register const struct udphdr
*up
)
105 u_int ts
= *(uint16_t *)hdr
;
106 if ((ts
& 0xf060) != 0) {
108 ND_PRINT((ndo
, "udp/vt %u %d / %d",
109 (uint32_t)(EXTRACT_16BITS(&up
->uh_ulen
) - sizeof(*up
)),
110 ts
& 0x3ff, ts
>> 10));
113 uint32_t i0
= EXTRACT_32BITS(&((u_int
*)hdr
)[0]);
114 uint32_t i1
= EXTRACT_32BITS(&((u_int
*)hdr
)[1]);
115 ND_PRINT((ndo
, "udp/vat %u c%d %u%s",
116 (uint32_t)(EXTRACT_16BITS(&up
->uh_ulen
) - sizeof(*up
) - 8),
118 i1
, i0
& 0x800000? "*" : ""));
121 ND_PRINT((ndo
, " f%d", (i0
>> 16) & 0x1f));
123 ND_PRINT((ndo
, " s%d", (i0
>> 24) & 0x3f));
128 rtp_print(netdissect_options
*ndo
, const void *hdr
, u_int len
,
129 register const struct udphdr
*up
)
132 u_int
*ip
= (u_int
*)hdr
;
133 u_int hasopt
, hasext
, contype
, hasmarker
;
134 uint32_t i0
= EXTRACT_32BITS(&((u_int
*)hdr
)[0]);
135 uint32_t i1
= EXTRACT_32BITS(&((u_int
*)hdr
)[1]);
136 u_int dlen
= EXTRACT_16BITS(&up
->uh_ulen
) - sizeof(*up
) - 8;
144 if ((i0
>> 30) == 1) {
146 hasopt
= i0
& 0x800000;
147 contype
= (i0
>> 16) & 0x3f;
148 hasmarker
= i0
& 0x400000;
152 hasext
= i0
& 0x10000000;
153 contype
= (i0
>> 16) & 0x7f;
154 hasmarker
= i0
& 0x800000;
160 ND_PRINT((ndo
, "udp/%s %d c%d %s%s %d %u",
164 (hasopt
|| hasext
)? "+" : "",
168 if (ndo
->ndo_vflag
) {
169 ND_PRINT((ndo
, " %u", EXTRACT_32BITS(&((u_int
*)hdr
)[2])));
174 optlen
= (i2
>> 16) & 0xff;
175 if (optlen
== 0 || optlen
> len
) {
176 ND_PRINT((ndo
, " !opt"));
181 } while ((int)i2
>= 0);
186 extlen
= (i2
& 0xffff) + 1;
188 ND_PRINT((ndo
, " !ext"));
193 if (contype
== 0x1f) /*XXX H.261 */
194 ND_PRINT((ndo
, " 0x%04x", ip
[0] >> 16));
198 static const u_char
*
199 rtcp_print(netdissect_options
*ndo
, const u_char
*hdr
, const u_char
*ep
)
201 /* rtp v2 control (rtcp) */
202 struct rtcp_rr
*rr
= 0;
204 struct rtcphdr
*rh
= (struct rtcphdr
*)hdr
;
209 if ((u_char
*)(rh
+ 1) > ep
) {
210 ND_PRINT((ndo
, " [|rtcp]"));
213 len
= (EXTRACT_16BITS(&rh
->rh_len
) + 1) * 4;
214 flags
= EXTRACT_16BITS(&rh
->rh_flags
);
215 cnt
= (flags
>> 8) & 0x1f;
216 switch (flags
& 0xff) {
218 sr
= (struct rtcp_sr
*)(rh
+ 1);
219 ND_PRINT((ndo
, " sr"));
220 if (len
!= cnt
* sizeof(*rr
) + sizeof(*sr
) + sizeof(*rh
))
221 ND_PRINT((ndo
, " [%d]", len
));
223 ND_PRINT((ndo
, " %u", EXTRACT_32BITS(&rh
->rh_ssrc
)));
224 if ((u_char
*)(sr
+ 1) > ep
) {
225 ND_PRINT((ndo
, " [|rtcp]"));
228 ts
= (double)(EXTRACT_32BITS(&sr
->sr_ntp
.upper
)) +
229 ((double)(EXTRACT_32BITS(&sr
->sr_ntp
.lower
)) /
231 ND_PRINT((ndo
, " @%.2f %u %up %ub", ts
, EXTRACT_32BITS(&sr
->sr_ts
),
232 EXTRACT_32BITS(&sr
->sr_np
), EXTRACT_32BITS(&sr
->sr_nb
)));
233 rr
= (struct rtcp_rr
*)(sr
+ 1);
236 ND_PRINT((ndo
, " rr"));
237 if (len
!= cnt
* sizeof(*rr
) + sizeof(*rh
))
238 ND_PRINT((ndo
, " [%d]", len
));
239 rr
= (struct rtcp_rr
*)(rh
+ 1);
241 ND_PRINT((ndo
, " %u", EXTRACT_32BITS(&rh
->rh_ssrc
)));
244 ND_PRINT((ndo
, " sdes %d", len
));
246 ND_PRINT((ndo
, " %u", EXTRACT_32BITS(&rh
->rh_ssrc
)));
250 ND_PRINT((ndo
, " bye %d", len
));
252 ND_PRINT((ndo
, " %u", EXTRACT_32BITS(&rh
->rh_ssrc
)));
256 ND_PRINT((ndo
, " type-0x%x %d", flags
& 0xff, len
));
261 ND_PRINT((ndo
, " c%d", cnt
));
263 if ((u_char
*)(rr
+ 1) > ep
) {
264 ND_PRINT((ndo
, " [|rtcp]"));
268 ND_PRINT((ndo
, " %u", EXTRACT_32BITS(&rr
->rr_srcid
)));
269 ts
= (double)(EXTRACT_32BITS(&rr
->rr_lsr
)) / 65536.;
270 dts
= (double)(EXTRACT_32BITS(&rr
->rr_dlsr
)) / 65536.;
271 ND_PRINT((ndo
, " %ul %us %uj @%.2f+%.2f",
272 EXTRACT_32BITS(&rr
->rr_nl
) & 0x00ffffff,
273 EXTRACT_32BITS(&rr
->rr_ls
),
274 EXTRACT_32BITS(&rr
->rr_dv
), ts
, dts
));
279 static int udp_cksum(netdissect_options
*ndo
, register const struct ip
*ip
,
280 register const struct udphdr
*up
,
283 return nextproto4_cksum(ndo
, ip
, (const uint8_t *)(void *)up
, len
, len
,
288 static int udp6_cksum(const struct ip6_hdr
*ip6
, const struct udphdr
*up
,
291 return nextproto6_cksum(ip6
, (const uint8_t *)(void *)up
, len
, len
,
297 udpipaddr_print(netdissect_options
*ndo
, const struct ip
*ip
, int sport
, int dport
)
300 const struct ip6_hdr
*ip6
;
303 ip6
= (const struct ip6_hdr
*)ip
;
308 if (ip6
->ip6_nxt
== IPPROTO_UDP
) {
310 ND_PRINT((ndo
, "%s > %s: ",
311 ip6addr_string(ndo
, &ip6
->ip6_src
),
312 ip6addr_string(ndo
, &ip6
->ip6_dst
)));
314 ND_PRINT((ndo
, "%s.%s > %s.%s: ",
315 ip6addr_string(ndo
, &ip6
->ip6_src
),
316 udpport_string(sport
),
317 ip6addr_string(ndo
, &ip6
->ip6_dst
),
318 udpport_string(dport
)));
322 ND_PRINT((ndo
, "%s > %s: ",
323 udpport_string(sport
),
324 udpport_string(dport
)));
330 if (ip
->ip_p
== IPPROTO_UDP
) {
332 ND_PRINT((ndo
, "%s > %s: ",
333 ipaddr_string(ndo
, &ip
->ip_src
),
334 ipaddr_string(ndo
, &ip
->ip_dst
)));
336 ND_PRINT((ndo
, "%s.%s > %s.%s: ",
337 ipaddr_string(ndo
, &ip
->ip_src
),
338 udpport_string(sport
),
339 ipaddr_string(ndo
, &ip
->ip_dst
),
340 udpport_string(dport
)));
344 ND_PRINT((ndo
, "%s > %s: ",
345 udpport_string(sport
),
346 udpport_string(dport
)));
353 udp_print(netdissect_options
*ndo
, register const u_char
*bp
, u_int length
,
354 register const u_char
*bp2
, int fragmented
)
356 register const struct udphdr
*up
;
357 register const struct ip
*ip
;
358 register const u_char
*cp
;
359 register const u_char
*ep
= bp
+ length
;
360 uint16_t sport
, dport
, ulen
;
362 register const struct ip6_hdr
*ip6
;
365 if (ep
> ndo
->ndo_snapend
)
366 ep
= ndo
->ndo_snapend
;
367 up
= (struct udphdr
*)bp
;
368 ip
= (struct ip
*)bp2
;
371 ip6
= (struct ip6_hdr
*)bp2
;
375 if (!ND_TTEST(up
->uh_dport
)) {
376 udpipaddr_print(ndo
, ip
, -1, -1);
377 ND_PRINT((ndo
, "[|udp]"));
381 sport
= EXTRACT_16BITS(&up
->uh_sport
);
382 dport
= EXTRACT_16BITS(&up
->uh_dport
);
384 if (length
< sizeof(struct udphdr
)) {
385 udpipaddr_print(ndo
, ip
, sport
, dport
);
386 ND_PRINT((ndo
, "truncated-udp %d", length
));
389 ulen
= EXTRACT_16BITS(&up
->uh_ulen
);
390 if (ulen
< sizeof(struct udphdr
)) {
391 udpipaddr_print(ndo
, ip
, sport
, dport
);
392 ND_PRINT((ndo
, "truncated-udplength %d", ulen
));
395 ulen
-= sizeof(struct udphdr
);
396 length
-= sizeof(struct udphdr
);
400 cp
= (u_char
*)(up
+ 1);
401 if (cp
> ndo
->ndo_snapend
) {
402 udpipaddr_print(ndo
, ip
, sport
, dport
);
403 ND_PRINT((ndo
, "[|udp]"));
407 if (ndo
->ndo_packettype
) {
408 register struct sunrpc_msg
*rp
;
409 enum sunrpc_msg_type direction
;
411 switch (ndo
->ndo_packettype
) {
414 udpipaddr_print(ndo
, ip
, sport
, dport
);
415 vat_print(ndo
, (void *)(up
+ 1), up
);
419 udpipaddr_print(ndo
, ip
, sport
, dport
);
420 wb_print(ndo
, (void *)(up
+ 1), length
);
424 rp
= (struct sunrpc_msg
*)(up
+ 1);
425 direction
= (enum sunrpc_msg_type
)EXTRACT_32BITS(&rp
->rm_direction
);
426 if (direction
== SUNRPC_CALL
)
428 sunrpcrequest_print(ndo
, (u_char
*)rp
, length
,
432 * FIXME: remove this exception once rpc has
438 nfsreply_print(ndo
, (u_char
*)rp
, length
,
439 (u_char
*)ip
); /*XXX*/
443 udpipaddr_print(ndo
, ip
, sport
, dport
);
444 rtp_print(ndo
, (void *)(up
+ 1), length
, up
);
448 udpipaddr_print(ndo
, ip
, sport
, dport
);
450 cp
= rtcp_print(ndo
, cp
, ep
);
454 udpipaddr_print(ndo
, ip
, sport
, dport
);
455 snmp_print(ndo
, (const u_char
*)(up
+ 1), length
);
459 udpipaddr_print(ndo
, ip
, sport
, dport
);
464 udpipaddr_print(ndo
, ip
, sport
, dport
);
465 tftp_print(ndo
, cp
, length
);
469 udpipaddr_print(ndo
, ip
, sport
, dport
);
470 aodv_print(ndo
, (const u_char
*)(up
+ 1), length
,
479 udpipaddr_print(ndo
, ip
, sport
, dport
);
480 radius_print(ndo
, cp
, length
);
484 udpipaddr_print(ndo
, ip
, sport
, dport
);
485 vxlan_print(ndo
, (const u_char
*)(up
+ 1), length
);
490 udpipaddr_print(ndo
, ip
, sport
, dport
);
491 pgm_print(ndo
, cp
, length
, bp2
);
494 udpipaddr_print(ndo
, ip
, sport
, dport
);
495 lmp_print(ndo
, cp
, length
);
501 udpipaddr_print(ndo
, ip
, sport
, dport
);
502 if (!ndo
->ndo_qflag
) {
503 register struct sunrpc_msg
*rp
;
504 enum sunrpc_msg_type direction
;
506 rp
= (struct sunrpc_msg
*)(up
+ 1);
507 if (ND_TTEST(rp
->rm_direction
)) {
508 direction
= (enum sunrpc_msg_type
)EXTRACT_32BITS(&rp
->rm_direction
);
509 if (dport
== NFS_PORT
&& direction
== SUNRPC_CALL
) {
510 ND_PRINT((ndo
, "NFS request xid %u ", EXTRACT_32BITS(&rp
->rm_xid
)));
511 nfsreq_print_noaddr(ndo
, (u_char
*)rp
, length
,
515 if (sport
== NFS_PORT
&& direction
== SUNRPC_REPLY
) {
516 ND_PRINT((ndo
, "NFS reply xid %u ", EXTRACT_32BITS(&rp
->rm_xid
)));
517 nfsreply_print_noaddr(ndo
, (u_char
*)rp
, length
,
522 if (dport
== SUNRPC_PORT
&& direction
== SUNRPC_CALL
) {
523 sunrpcrequest_print((u_char
*)rp
, length
, (u_char
*)ip
);
528 if (ND_TTEST(((struct LAP
*)cp
)->type
) &&
529 ((struct LAP
*)cp
)->type
== lapDDP
&&
530 (atalk_port(sport
) || atalk_port(dport
))) {
532 ND_PRINT((ndo
, "kip "));
533 llap_print(ndo
, cp
, length
);
538 if (ndo
->ndo_vflag
&& !ndo
->ndo_Kflag
&& !fragmented
) {
539 /* Check the checksum, if possible. */
540 uint16_t sum
, udp_sum
;
543 * XXX - do this even if vflag == 1?
544 * TCP does, and we do so for UDP-over-IPv6.
546 if (IP_V(ip
) == 4 && (ndo
->ndo_vflag
> 1)) {
547 udp_sum
= EXTRACT_16BITS(&up
->uh_sum
);
549 ND_PRINT((ndo
, "[no cksum] "));
550 } else if (ND_TTEST2(cp
[0], length
)) {
551 sum
= udp_cksum(ndo
, ip
, up
, length
+ sizeof(struct udphdr
));
554 ND_PRINT((ndo
, "[bad udp cksum 0x%04x -> 0x%04x!] ",
556 in_cksum_shouldbe(udp_sum
, sum
)));
558 ND_PRINT((ndo
, "[udp sum ok] "));
562 else if (IP_V(ip
) == 6 && ip6
->ip6_plen
) {
563 /* for IPv6, UDP checksum is mandatory */
564 if (ND_TTEST2(cp
[0], length
)) {
565 sum
= udp6_cksum(ip6
, up
, length
+ sizeof(struct udphdr
));
566 udp_sum
= EXTRACT_16BITS(&up
->uh_sum
);
569 ND_PRINT((ndo
, "[bad udp cksum 0x%04x -> 0x%04x!] ",
571 in_cksum_shouldbe(udp_sum
, sum
)));
573 ND_PRINT((ndo
, "[udp sum ok] "));
579 if (!ndo
->ndo_qflag
) {
580 #define ISPORT(p) (dport == (p) || sport == (p))
581 if (ISPORT(NAMESERVER_PORT
))
582 ns_print(ndo
, (const u_char
*)(up
+ 1), length
, 0);
583 else if (ISPORT(MULTICASTDNS_PORT
))
584 ns_print(ndo
, (const u_char
*)(up
+ 1), length
, 1);
585 else if (ISPORT(TIMED_PORT
))
586 timed_print(ndo
, (const u_char
*)(up
+ 1));
587 else if (ISPORT(TFTP_PORT
))
588 tftp_print(ndo
, (const u_char
*)(up
+ 1), length
);
589 else if (ISPORT(BOOTPC_PORT
) || ISPORT(BOOTPS_PORT
))
590 bootp_print(ndo
, (const u_char
*)(up
+ 1), length
);
591 else if (ISPORT(RIP_PORT
))
592 rip_print(ndo
, (const u_char
*)(up
+ 1), length
);
593 else if (ISPORT(AODV_PORT
))
594 aodv_print(ndo
, (const u_char
*)(up
+ 1), length
,
600 else if (ISPORT(ISAKMP_PORT
))
601 isakmp_print(ndo
, (const u_char
*)(up
+ 1), length
, bp2
);
602 else if (ISPORT(ISAKMP_PORT_NATT
))
603 isakmp_rfc3948_print(ndo
, (const u_char
*)(up
+ 1), length
, bp2
);
605 else if (ISPORT(ISAKMP_PORT_USER1
) || ISPORT(ISAKMP_PORT_USER2
))
606 isakmp_print(ndo
, (const u_char
*)(up
+ 1), length
, bp2
);
608 else if (ISPORT(SNMP_PORT
) || ISPORT(SNMPTRAP_PORT
))
609 snmp_print(ndo
, (const u_char
*)(up
+ 1), length
);
610 else if (ISPORT(NTP_PORT
))
611 ntp_print(ndo
, (const u_char
*)(up
+ 1), length
);
612 else if (ISPORT(KERBEROS_PORT
) || ISPORT(KERBEROS_SEC_PORT
))
613 krb_print(ndo
, (const void *)(up
+ 1));
614 else if (ISPORT(L2TP_PORT
))
615 l2tp_print(ndo
, (const u_char
*)(up
+ 1), length
);
616 #ifdef TCPDUMP_DO_SMB
617 else if (ISPORT(NETBIOS_NS_PORT
))
618 nbt_udp137_print(ndo
, (const u_char
*)(up
+ 1), length
);
619 else if (ISPORT(NETBIOS_DGRAM_PORT
))
620 nbt_udp138_print(ndo
, (const u_char
*)(up
+ 1), length
);
622 else if (dport
== VAT_PORT
)
623 vat_print(ndo
, (const void *)(up
+ 1), up
);
624 else if (ISPORT(ZEPHYR_SRV_PORT
) || ISPORT(ZEPHYR_CLT_PORT
))
625 zephyr_print(ndo
, (const void *)(up
+ 1), length
);
627 * Since there are 10 possible ports to check, I think
628 * a <> test would be more efficient
630 else if ((sport
>= RX_PORT_LOW
&& sport
<= RX_PORT_HIGH
) ||
631 (dport
>= RX_PORT_LOW
&& dport
<= RX_PORT_HIGH
))
632 rx_print(ndo
, (const void *)(up
+ 1), length
, sport
, dport
,
635 else if (ISPORT(RIPNG_PORT
))
636 ripng_print(ndo
, (const u_char
*)(up
+ 1), length
);
637 else if (ISPORT(DHCP6_SERV_PORT
) || ISPORT(DHCP6_CLI_PORT
))
638 dhcp6_print(ndo
, (const u_char
*)(up
+ 1), length
);
639 else if (ISPORT(AHCP_PORT
))
640 ahcp_print(ndo
, (const u_char
*)(up
+ 1), length
);
641 else if (ISPORT(BABEL_PORT
) || ISPORT(BABEL_PORT_OLD
))
642 babel_print(ndo
, (const u_char
*)(up
+ 1), length
);
645 * Kludge in test for whiteboard packets.
647 else if (dport
== WB_PORT
)
648 wb_print(ndo
, (const void *)(up
+ 1), length
);
649 else if (ISPORT(CISCO_AUTORP_PORT
))
650 cisco_autorp_print(ndo
, (const void *)(up
+ 1), length
);
651 else if (ISPORT(RADIUS_PORT
) ||
652 ISPORT(RADIUS_NEW_PORT
) ||
653 ISPORT(RADIUS_ACCOUNTING_PORT
) ||
654 ISPORT(RADIUS_NEW_ACCOUNTING_PORT
) ||
655 ISPORT(RADIUS_COA_PORT
) )
656 radius_print(ndo
, (const u_char
*)(up
+1), length
);
657 else if (dport
== HSRP_PORT
)
658 hsrp_print(ndo
, (const u_char
*)(up
+ 1), length
);
659 else if (ISPORT(LWRES_PORT
))
660 lwres_print(ndo
, (const u_char
*)(up
+ 1), length
);
661 else if (ISPORT(LDP_PORT
))
662 ldp_print(ndo
, (const u_char
*)(up
+ 1), length
);
663 else if (ISPORT(OLSR_PORT
))
664 olsr_print(ndo
, (const u_char
*)(up
+ 1), length
,
666 (IP_V(ip
) == 6) ? 1 : 0);
670 else if (ISPORT(MPLS_LSP_PING_PORT
))
671 lspping_print(ndo
, (const u_char
*)(up
+ 1), length
);
672 else if (dport
== BFD_CONTROL_PORT
||
673 dport
== BFD_ECHO_PORT
)
674 bfd_print(ndo
, (const u_char
*)(up
+1), length
, dport
);
675 else if (ISPORT(LMP_PORT
))
676 lmp_print(ndo
, (const u_char
*)(up
+ 1), length
);
677 else if (ISPORT(VQP_PORT
))
678 vqp_print(ndo
, (const u_char
*)(up
+ 1), length
);
679 else if (ISPORT(SFLOW_PORT
))
680 sflow_print(ndo
, (const u_char
*)(up
+ 1), length
);
681 else if (dport
== LWAPP_CONTROL_PORT
)
682 lwapp_control_print(ndo
, (const u_char
*)(up
+ 1), length
, 1);
683 else if (sport
== LWAPP_CONTROL_PORT
)
684 lwapp_control_print(ndo
, (const u_char
*)(up
+ 1), length
, 0);
685 else if (ISPORT(LWAPP_DATA_PORT
))
686 lwapp_data_print(ndo
, (const u_char
*)(up
+ 1), length
);
687 else if (ISPORT(SIP_PORT
))
688 sip_print(ndo
, (const u_char
*)(up
+ 1), length
);
689 else if (ISPORT(SYSLOG_PORT
))
690 syslog_print(ndo
, (const u_char
*)(up
+ 1), length
);
691 else if (ISPORT(OTV_PORT
))
692 otv_print(ndo
, (const u_char
*)(up
+ 1), length
);
693 else if (ISPORT(VXLAN_PORT
))
694 vxlan_print(ndo
, (const u_char
*)(up
+ 1), length
);
695 else if (ISPORT(GENEVE_PORT
))
696 geneve_print(ndo
, (const u_char
*)(up
+ 1), length
);
699 ND_PRINT((ndo
, "UDP, bad length %u > %u",
702 ND_PRINT((ndo
, "UDP, length %u", ulen
));
707 ND_PRINT((ndo
, "UDP, bad length %u > %u",
710 ND_PRINT((ndo
, "UDP, length %u", ulen
));
717 * c-style: whitesmith