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 #define NETDISSECT_REWORKED
27 #include <tcpdump-stdinc.h>
29 #include "interface.h"
30 #include "addrtoname.h"
32 #include "appletalk.h"
48 uint16_t rh_flags
; /* T:2 P:1 CNT:5 PT:8 */
49 uint16_t rh_len
; /* length of message (in words) */
50 uint32_t rh_ssrc
; /* synchronization src id */
54 uint32_t upper
; /* more significant 32 bits */
55 uint32_t lower
; /* less significant 32 bits */
62 ntp64 sr_ntp
; /* 64-bit ntp timestamp */
63 uint32_t sr_ts
; /* reference media timestamp */
64 uint32_t sr_np
; /* no. packets sent */
65 uint32_t sr_nb
; /* no. bytes sent */
70 * Time stamps are middle 32-bits of ntp timestamp.
73 uint32_t rr_srcid
; /* sender being reported */
74 uint32_t rr_nl
; /* no. packets lost */
75 uint32_t rr_ls
; /* extended last seq number received */
76 uint32_t rr_dv
; /* jitter (delay variance) */
77 uint32_t rr_lsr
; /* orig. ts from last rr from this src */
78 uint32_t rr_dlsr
; /* time from recpt of last rr to xmit time */
82 #define RTCP_PT_SR 200
83 #define RTCP_PT_RR 201
84 #define RTCP_PT_SDES 202
85 #define RTCP_SDES_CNAME 1
86 #define RTCP_SDES_NAME 2
87 #define RTCP_SDES_EMAIL 3
88 #define RTCP_SDES_PHONE 4
89 #define RTCP_SDES_LOC 5
90 #define RTCP_SDES_TOOL 6
91 #define RTCP_SDES_NOTE 7
92 #define RTCP_SDES_PRIV 8
93 #define RTCP_PT_BYE 203
94 #define RTCP_PT_APP 204
97 vat_print(netdissect_options
*ndo
, const void *hdr
, register const struct udphdr
*up
)
100 u_int ts
= *(uint16_t *)hdr
;
101 if ((ts
& 0xf060) != 0) {
103 ND_PRINT((ndo
, "udp/vt %u %d / %d",
104 (uint32_t)(EXTRACT_16BITS(&up
->uh_ulen
) - sizeof(*up
)),
105 ts
& 0x3ff, ts
>> 10));
108 uint32_t i0
= EXTRACT_32BITS(&((u_int
*)hdr
)[0]);
109 uint32_t i1
= EXTRACT_32BITS(&((u_int
*)hdr
)[1]);
110 ND_PRINT((ndo
, "udp/vat %u c%d %u%s",
111 (uint32_t)(EXTRACT_16BITS(&up
->uh_ulen
) - sizeof(*up
) - 8),
113 i1
, i0
& 0x800000? "*" : ""));
116 ND_PRINT((ndo
, " f%d", (i0
>> 16) & 0x1f));
118 ND_PRINT((ndo
, " s%d", (i0
>> 24) & 0x3f));
123 rtp_print(netdissect_options
*ndo
, const void *hdr
, u_int len
,
124 register const struct udphdr
*up
)
127 u_int
*ip
= (u_int
*)hdr
;
128 u_int hasopt
, hasext
, contype
, hasmarker
;
129 uint32_t i0
= EXTRACT_32BITS(&((u_int
*)hdr
)[0]);
130 uint32_t i1
= EXTRACT_32BITS(&((u_int
*)hdr
)[1]);
131 u_int dlen
= EXTRACT_16BITS(&up
->uh_ulen
) - sizeof(*up
) - 8;
139 if ((i0
>> 30) == 1) {
141 hasopt
= i0
& 0x800000;
142 contype
= (i0
>> 16) & 0x3f;
143 hasmarker
= i0
& 0x400000;
147 hasext
= i0
& 0x10000000;
148 contype
= (i0
>> 16) & 0x7f;
149 hasmarker
= i0
& 0x800000;
155 ND_PRINT((ndo
, "udp/%s %d c%d %s%s %d %u",
159 (hasopt
|| hasext
)? "+" : "",
163 if (ndo
->ndo_vflag
) {
164 ND_PRINT((ndo
, " %u", EXTRACT_32BITS(&((u_int
*)hdr
)[2])));
169 optlen
= (i2
>> 16) & 0xff;
170 if (optlen
== 0 || optlen
> len
) {
171 ND_PRINT((ndo
, " !opt"));
176 } while ((int)i2
>= 0);
181 extlen
= (i2
& 0xffff) + 1;
183 ND_PRINT((ndo
, " !ext"));
188 if (contype
== 0x1f) /*XXX H.261 */
189 ND_PRINT((ndo
, " 0x%04x", ip
[0] >> 16));
193 static const u_char
*
194 rtcp_print(netdissect_options
*ndo
, const u_char
*hdr
, const u_char
*ep
)
196 /* rtp v2 control (rtcp) */
197 struct rtcp_rr
*rr
= 0;
199 struct rtcphdr
*rh
= (struct rtcphdr
*)hdr
;
204 if ((u_char
*)(rh
+ 1) > ep
) {
205 ND_PRINT((ndo
, " [|rtcp]"));
208 len
= (EXTRACT_16BITS(&rh
->rh_len
) + 1) * 4;
209 flags
= EXTRACT_16BITS(&rh
->rh_flags
);
210 cnt
= (flags
>> 8) & 0x1f;
211 switch (flags
& 0xff) {
213 sr
= (struct rtcp_sr
*)(rh
+ 1);
214 ND_PRINT((ndo
, " sr"));
215 if (len
!= cnt
* sizeof(*rr
) + sizeof(*sr
) + sizeof(*rh
))
216 ND_PRINT((ndo
, " [%d]", len
));
218 ND_PRINT((ndo
, " %u", EXTRACT_32BITS(&rh
->rh_ssrc
)));
219 if ((u_char
*)(sr
+ 1) > ep
) {
220 ND_PRINT((ndo
, " [|rtcp]"));
223 ts
= (double)(EXTRACT_32BITS(&sr
->sr_ntp
.upper
)) +
224 ((double)(EXTRACT_32BITS(&sr
->sr_ntp
.lower
)) /
226 ND_PRINT((ndo
, " @%.2f %u %up %ub", ts
, EXTRACT_32BITS(&sr
->sr_ts
),
227 EXTRACT_32BITS(&sr
->sr_np
), EXTRACT_32BITS(&sr
->sr_nb
)));
228 rr
= (struct rtcp_rr
*)(sr
+ 1);
231 ND_PRINT((ndo
, " rr"));
232 if (len
!= cnt
* sizeof(*rr
) + sizeof(*rh
))
233 ND_PRINT((ndo
, " [%d]", len
));
234 rr
= (struct rtcp_rr
*)(rh
+ 1);
236 ND_PRINT((ndo
, " %u", EXTRACT_32BITS(&rh
->rh_ssrc
)));
239 ND_PRINT((ndo
, " sdes %d", len
));
241 ND_PRINT((ndo
, " %u", EXTRACT_32BITS(&rh
->rh_ssrc
)));
245 ND_PRINT((ndo
, " bye %d", len
));
247 ND_PRINT((ndo
, " %u", EXTRACT_32BITS(&rh
->rh_ssrc
)));
251 ND_PRINT((ndo
, " type-0x%x %d", flags
& 0xff, len
));
256 ND_PRINT((ndo
, " c%d", cnt
));
258 if ((u_char
*)(rr
+ 1) > ep
) {
259 ND_PRINT((ndo
, " [|rtcp]"));
263 ND_PRINT((ndo
, " %u", EXTRACT_32BITS(&rr
->rr_srcid
)));
264 ts
= (double)(EXTRACT_32BITS(&rr
->rr_lsr
)) / 65536.;
265 dts
= (double)(EXTRACT_32BITS(&rr
->rr_dlsr
)) / 65536.;
266 ND_PRINT((ndo
, " %ul %us %uj @%.2f+%.2f",
267 EXTRACT_32BITS(&rr
->rr_nl
) & 0x00ffffff,
268 EXTRACT_32BITS(&rr
->rr_ls
),
269 EXTRACT_32BITS(&rr
->rr_dv
), ts
, dts
));
274 static int udp_cksum(netdissect_options
*ndo
, register const struct ip
*ip
,
275 register const struct udphdr
*up
,
278 return nextproto4_cksum(ndo
, ip
, (const uint8_t *)(void *)up
, len
, len
,
283 static int udp6_cksum(const struct ip6_hdr
*ip6
, const struct udphdr
*up
,
286 return nextproto6_cksum(ip6
, (const uint8_t *)(void *)up
, len
, len
,
292 udpipaddr_print(netdissect_options
*ndo
, const struct ip
*ip
, int sport
, int dport
)
295 const struct ip6_hdr
*ip6
;
298 ip6
= (const struct ip6_hdr
*)ip
;
303 if (ip6
->ip6_nxt
== IPPROTO_UDP
) {
305 ND_PRINT((ndo
, "%s > %s: ",
306 ip6addr_string(ndo
, &ip6
->ip6_src
),
307 ip6addr_string(ndo
, &ip6
->ip6_dst
)));
309 ND_PRINT((ndo
, "%s.%s > %s.%s: ",
310 ip6addr_string(ndo
, &ip6
->ip6_src
),
311 udpport_string(sport
),
312 ip6addr_string(ndo
, &ip6
->ip6_dst
),
313 udpport_string(dport
)));
317 ND_PRINT((ndo
, "%s > %s: ",
318 udpport_string(sport
),
319 udpport_string(dport
)));
325 if (ip
->ip_p
== IPPROTO_UDP
) {
327 ND_PRINT((ndo
, "%s > %s: ",
328 ipaddr_string(ndo
, &ip
->ip_src
),
329 ipaddr_string(ndo
, &ip
->ip_dst
)));
331 ND_PRINT((ndo
, "%s.%s > %s.%s: ",
332 ipaddr_string(ndo
, &ip
->ip_src
),
333 udpport_string(sport
),
334 ipaddr_string(ndo
, &ip
->ip_dst
),
335 udpport_string(dport
)));
339 ND_PRINT((ndo
, "%s > %s: ",
340 udpport_string(sport
),
341 udpport_string(dport
)));
348 udp_print(netdissect_options
*ndo
, register const u_char
*bp
, u_int length
,
349 register const u_char
*bp2
, int fragmented
)
351 register const struct udphdr
*up
;
352 register const struct ip
*ip
;
353 register const u_char
*cp
;
354 register const u_char
*ep
= bp
+ length
;
355 uint16_t sport
, dport
, ulen
;
357 register const struct ip6_hdr
*ip6
;
360 if (ep
> ndo
->ndo_snapend
)
361 ep
= ndo
->ndo_snapend
;
362 up
= (struct udphdr
*)bp
;
363 ip
= (struct ip
*)bp2
;
366 ip6
= (struct ip6_hdr
*)bp2
;
370 if (!ND_TTEST(up
->uh_dport
)) {
371 udpipaddr_print(ndo
, ip
, -1, -1);
372 ND_PRINT((ndo
, "[|udp]"));
376 sport
= EXTRACT_16BITS(&up
->uh_sport
);
377 dport
= EXTRACT_16BITS(&up
->uh_dport
);
379 if (length
< sizeof(struct udphdr
)) {
380 udpipaddr_print(ndo
, ip
, sport
, dport
);
381 ND_PRINT((ndo
, "truncated-udp %d", length
));
384 ulen
= EXTRACT_16BITS(&up
->uh_ulen
);
385 if (ulen
< sizeof(struct udphdr
)) {
386 udpipaddr_print(ndo
, ip
, sport
, dport
);
387 ND_PRINT((ndo
, "truncated-udplength %d", ulen
));
390 ulen
-= sizeof(struct udphdr
);
391 length
-= sizeof(struct udphdr
);
395 cp
= (u_char
*)(up
+ 1);
396 if (cp
> ndo
->ndo_snapend
) {
397 udpipaddr_print(ndo
, ip
, sport
, dport
);
398 ND_PRINT((ndo
, "[|udp]"));
402 if (ndo
->ndo_packettype
) {
403 register struct sunrpc_msg
*rp
;
404 enum sunrpc_msg_type direction
;
406 switch (ndo
->ndo_packettype
) {
409 udpipaddr_print(ndo
, ip
, sport
, dport
);
410 vat_print(ndo
, (void *)(up
+ 1), up
);
414 udpipaddr_print(ndo
, ip
, sport
, dport
);
415 wb_print(ndo
, (void *)(up
+ 1), length
);
419 rp
= (struct sunrpc_msg
*)(up
+ 1);
420 direction
= (enum sunrpc_msg_type
)EXTRACT_32BITS(&rp
->rm_direction
);
421 if (direction
== SUNRPC_CALL
)
422 sunrpcrequest_print(ndo
, (u_char
*)rp
, length
,
425 nfsreply_print(ndo
, (u_char
*)rp
, length
,
426 (u_char
*)ip
); /*XXX*/
430 udpipaddr_print(ndo
, ip
, sport
, dport
);
431 rtp_print(ndo
, (void *)(up
+ 1), length
, up
);
435 udpipaddr_print(ndo
, ip
, sport
, dport
);
437 cp
= rtcp_print(ndo
, cp
, ep
);
441 udpipaddr_print(ndo
, ip
, sport
, dport
);
442 snmp_print(ndo
, (const u_char
*)(up
+ 1), length
);
446 udpipaddr_print(ndo
, ip
, sport
, dport
);
451 udpipaddr_print(ndo
, ip
, sport
, dport
);
452 tftp_print(ndo
, cp
, length
);
456 udpipaddr_print(ndo
, ip
, sport
, dport
);
457 aodv_print(ndo
, (const u_char
*)(up
+ 1), length
,
466 udpipaddr_print(ndo
, ip
, sport
, dport
);
467 radius_print(ndo
, cp
, length
);
471 udpipaddr_print(ndo
, ip
, sport
, dport
);
472 vxlan_print(ndo
, (const u_char
*)(up
+ 1), length
);
477 udpipaddr_print(ndo
, ip
, sport
, dport
);
478 pgm_print(ndo
, cp
, length
, bp2
);
481 udpipaddr_print(ndo
, ip
, sport
, dport
);
482 lmp_print(ndo
, cp
, length
);
488 udpipaddr_print(ndo
, ip
, sport
, dport
);
489 if (!ndo
->ndo_qflag
) {
490 register struct sunrpc_msg
*rp
;
491 enum sunrpc_msg_type direction
;
493 rp
= (struct sunrpc_msg
*)(up
+ 1);
494 if (ND_TTEST(rp
->rm_direction
)) {
495 direction
= (enum sunrpc_msg_type
)EXTRACT_32BITS(&rp
->rm_direction
);
496 if (dport
== NFS_PORT
&& direction
== SUNRPC_CALL
) {
497 ND_PRINT((ndo
, "NFS request xid %u ", EXTRACT_32BITS(&rp
->rm_xid
)));
498 nfsreq_print_noaddr(ndo
, (u_char
*)rp
, length
,
502 if (sport
== NFS_PORT
&& direction
== SUNRPC_REPLY
) {
503 ND_PRINT((ndo
, "NFS reply xid %u ", EXTRACT_32BITS(&rp
->rm_xid
)));
504 nfsreply_print_noaddr(ndo
, (u_char
*)rp
, length
,
509 if (dport
== SUNRPC_PORT
&& direction
== SUNRPC_CALL
) {
510 sunrpcrequest_print((u_char
*)rp
, length
, (u_char
*)ip
);
515 if (ND_TTEST(((struct LAP
*)cp
)->type
) &&
516 ((struct LAP
*)cp
)->type
== lapDDP
&&
517 (atalk_port(sport
) || atalk_port(dport
))) {
519 ND_PRINT((ndo
, "kip "));
520 llap_print(ndo
, cp
, length
);
525 if (ndo
->ndo_vflag
&& !ndo
->ndo_Kflag
&& !fragmented
) {
526 /* Check the checksum, if possible. */
527 uint16_t sum
, udp_sum
;
530 * XXX - do this even if vflag == 1?
531 * TCP does, and we do so for UDP-over-IPv6.
533 if (IP_V(ip
) == 4 && (ndo
->ndo_vflag
> 1)) {
534 udp_sum
= EXTRACT_16BITS(&up
->uh_sum
);
536 ND_PRINT((ndo
, "[no cksum] "));
537 } else if (ND_TTEST2(cp
[0], length
)) {
538 sum
= udp_cksum(ndo
, ip
, up
, length
+ sizeof(struct udphdr
));
541 ND_PRINT((ndo
, "[bad udp cksum 0x%04x -> 0x%04x!] ",
543 in_cksum_shouldbe(udp_sum
, sum
)));
545 ND_PRINT((ndo
, "[udp sum ok] "));
549 else if (IP_V(ip
) == 6 && ip6
->ip6_plen
) {
550 /* for IPv6, UDP checksum is mandatory */
551 if (ND_TTEST2(cp
[0], length
)) {
552 sum
= udp6_cksum(ip6
, up
, length
+ sizeof(struct udphdr
));
553 udp_sum
= EXTRACT_16BITS(&up
->uh_sum
);
556 ND_PRINT((ndo
, "[bad udp cksum 0x%04x -> 0x%04x!] ",
558 in_cksum_shouldbe(udp_sum
, sum
)));
560 ND_PRINT((ndo
, "[udp sum ok] "));
566 if (!ndo
->ndo_qflag
) {
567 #define ISPORT(p) (dport == (p) || sport == (p))
568 if (ISPORT(NAMESERVER_PORT
))
569 ns_print(ndo
, (const u_char
*)(up
+ 1), length
, 0);
570 else if (ISPORT(MULTICASTDNS_PORT
))
571 ns_print(ndo
, (const u_char
*)(up
+ 1), length
, 1);
572 else if (ISPORT(TIMED_PORT
))
573 timed_print(ndo
, (const u_char
*)(up
+ 1));
574 else if (ISPORT(TFTP_PORT
))
575 tftp_print(ndo
, (const u_char
*)(up
+ 1), length
);
576 else if (ISPORT(BOOTPC_PORT
) || ISPORT(BOOTPS_PORT
))
577 bootp_print(ndo
, (const u_char
*)(up
+ 1), length
);
578 else if (ISPORT(RIP_PORT
))
579 rip_print(ndo
, (const u_char
*)(up
+ 1), length
);
580 else if (ISPORT(AODV_PORT
))
581 aodv_print(ndo
, (const u_char
*)(up
+ 1), length
,
587 else if (ISPORT(ISAKMP_PORT
))
588 isakmp_print(ndo
, (const u_char
*)(up
+ 1), length
, bp2
);
589 else if (ISPORT(ISAKMP_PORT_NATT
))
590 isakmp_rfc3948_print(ndo
, (const u_char
*)(up
+ 1), length
, bp2
);
592 else if (ISPORT(ISAKMP_PORT_USER1
) || ISPORT(ISAKMP_PORT_USER2
))
593 isakmp_print(ndo
, (const u_char
*)(up
+ 1), length
, bp2
);
595 else if (ISPORT(SNMP_PORT
) || ISPORT(SNMPTRAP_PORT
))
596 snmp_print(ndo
, (const u_char
*)(up
+ 1), length
);
597 else if (ISPORT(NTP_PORT
))
598 ntp_print(ndo
, (const u_char
*)(up
+ 1), length
);
599 else if (ISPORT(KERBEROS_PORT
) || ISPORT(KERBEROS_SEC_PORT
))
600 krb_print(ndo
, (const void *)(up
+ 1));
601 else if (ISPORT(L2TP_PORT
))
602 l2tp_print(ndo
, (const u_char
*)(up
+ 1), length
);
603 #ifdef TCPDUMP_DO_SMB
604 else if (ISPORT(NETBIOS_NS_PORT
))
605 nbt_udp137_print(ndo
, (const u_char
*)(up
+ 1), length
);
606 else if (ISPORT(NETBIOS_DGRAM_PORT
))
607 nbt_udp138_print(ndo
, (const u_char
*)(up
+ 1), length
);
609 else if (dport
== VAT_PORT
)
610 vat_print(ndo
, (const void *)(up
+ 1), up
);
611 else if (ISPORT(ZEPHYR_SRV_PORT
) || ISPORT(ZEPHYR_CLT_PORT
))
612 zephyr_print(ndo
, (const void *)(up
+ 1), length
);
614 * Since there are 10 possible ports to check, I think
615 * a <> test would be more efficient
617 else if ((sport
>= RX_PORT_LOW
&& sport
<= RX_PORT_HIGH
) ||
618 (dport
>= RX_PORT_LOW
&& dport
<= RX_PORT_HIGH
))
619 rx_print(ndo
, (const void *)(up
+ 1), length
, sport
, dport
,
622 else if (ISPORT(RIPNG_PORT
))
623 ripng_print(ndo
, (const u_char
*)(up
+ 1), length
);
624 else if (ISPORT(DHCP6_SERV_PORT
) || ISPORT(DHCP6_CLI_PORT
))
625 dhcp6_print(ndo
, (const u_char
*)(up
+ 1), length
);
626 else if (ISPORT(AHCP_PORT
))
627 ahcp_print(ndo
, (const u_char
*)(up
+ 1), length
);
628 else if (ISPORT(BABEL_PORT
) || ISPORT(BABEL_PORT_OLD
))
629 babel_print(ndo
, (const u_char
*)(up
+ 1), length
);
632 * Kludge in test for whiteboard packets.
634 else if (dport
== WB_PORT
)
635 wb_print(ndo
, (const void *)(up
+ 1), length
);
636 else if (ISPORT(CISCO_AUTORP_PORT
))
637 cisco_autorp_print(ndo
, (const void *)(up
+ 1), length
);
638 else if (ISPORT(RADIUS_PORT
) ||
639 ISPORT(RADIUS_NEW_PORT
) ||
640 ISPORT(RADIUS_ACCOUNTING_PORT
) ||
641 ISPORT(RADIUS_NEW_ACCOUNTING_PORT
) ||
642 ISPORT(RADIUS_COA_PORT
) )
643 radius_print(ndo
, (const u_char
*)(up
+1), length
);
644 else if (dport
== HSRP_PORT
)
645 hsrp_print(ndo
, (const u_char
*)(up
+ 1), length
);
646 else if (ISPORT(LWRES_PORT
))
647 lwres_print(ndo
, (const u_char
*)(up
+ 1), length
);
648 else if (ISPORT(LDP_PORT
))
649 ldp_print(ndo
, (const u_char
*)(up
+ 1), length
);
650 else if (ISPORT(OLSR_PORT
))
651 olsr_print(ndo
, (const u_char
*)(up
+ 1), length
,
653 (IP_V(ip
) == 6) ? 1 : 0);
657 else if (ISPORT(MPLS_LSP_PING_PORT
))
658 lspping_print(ndo
, (const u_char
*)(up
+ 1), length
);
659 else if (dport
== BFD_CONTROL_PORT
||
660 dport
== BFD_ECHO_PORT
)
661 bfd_print(ndo
, (const u_char
*)(up
+1), length
, dport
);
662 else if (ISPORT(LMP_PORT
))
663 lmp_print(ndo
, (const u_char
*)(up
+ 1), length
);
664 else if (ISPORT(VQP_PORT
))
665 vqp_print(ndo
, (const u_char
*)(up
+ 1), length
);
666 else if (ISPORT(SFLOW_PORT
))
667 sflow_print(ndo
, (const u_char
*)(up
+ 1), length
);
668 else if (dport
== LWAPP_CONTROL_PORT
)
669 lwapp_control_print(ndo
, (const u_char
*)(up
+ 1), length
, 1);
670 else if (sport
== LWAPP_CONTROL_PORT
)
671 lwapp_control_print(ndo
, (const u_char
*)(up
+ 1), length
, 0);
672 else if (ISPORT(LWAPP_DATA_PORT
))
673 lwapp_data_print(ndo
, (const u_char
*)(up
+ 1), length
);
674 else if (ISPORT(SIP_PORT
))
675 sip_print(ndo
, (const u_char
*)(up
+ 1), length
);
676 else if (ISPORT(SYSLOG_PORT
))
677 syslog_print(ndo
, (const u_char
*)(up
+ 1), length
);
678 else if (ISPORT(OTV_PORT
))
679 otv_print(ndo
, (const u_char
*)(up
+ 1), length
);
680 else if (ISPORT(VXLAN_PORT
))
681 vxlan_print(ndo
, (const u_char
*)(up
+ 1), length
);
684 ND_PRINT((ndo
, "UDP, bad length %u > %u",
687 ND_PRINT((ndo
, "UDP, length %u", ulen
));
692 ND_PRINT((ndo
, "UDP, bad length %u > %u",
695 ND_PRINT((ndo
, "UDP, length %u", ulen
));
702 * c-style: whitesmith