Lines Matching refs:ndo
100 vat_print(netdissect_options *ndo, const void *hdr, register const struct udphdr *up) in vat_print() argument
110 ND_PRINT((ndo, "udp/vt %u %d / %d", in vat_print()
122 ND_PRINT((ndo, "udp/vat %u c%d %u%s", in vat_print()
128 ND_PRINT((ndo, " f%d", (i0 >> 16) & 0x1f)); in vat_print()
130 ND_PRINT((ndo, " s%d", (i0 >> 24) & 0x3f)); in vat_print()
134 ND_PRINT((ndo, "%s", vat_tstr)); in vat_print()
138 rtp_print(netdissect_options *ndo, const void *hdr, u_int len, in rtp_print() argument
174 ND_PRINT((ndo, "udp/%s %d c%d %s%s %d %u", in rtp_print()
182 if (ndo->ndo_vflag) { in rtp_print()
184 ND_PRINT((ndo, " %u", EXTRACT_32BITS(&((const u_int *)hdr)[2]))); in rtp_print()
192 ND_PRINT((ndo, " !opt")); in rtp_print()
205 ND_PRINT((ndo, " !ext")); in rtp_print()
212 ND_PRINT((ndo, " 0x%04x", EXTRACT_32BITS(ip) >> 16)); in rtp_print()
216 ND_PRINT((ndo, "%s", rtp_tstr)); in rtp_print()
220 rtcp_print(netdissect_options *ndo, const u_char *hdr, const u_char *ep) in rtcp_print() argument
239 ND_PRINT((ndo, " sr")); in rtcp_print()
241 ND_PRINT((ndo, " [%d]", len)); in rtcp_print()
242 if (ndo->ndo_vflag) in rtcp_print()
243 ND_PRINT((ndo, " %u", EXTRACT_32BITS(&rh->rh_ssrc))); in rtcp_print()
250 ND_PRINT((ndo, " @%.2f %u %up %ub", ts, EXTRACT_32BITS(&sr->sr_ts), in rtcp_print()
255 ND_PRINT((ndo, " rr")); in rtcp_print()
257 ND_PRINT((ndo, " [%d]", len)); in rtcp_print()
259 if (ndo->ndo_vflag) in rtcp_print()
260 ND_PRINT((ndo, " %u", EXTRACT_32BITS(&rh->rh_ssrc))); in rtcp_print()
263 ND_PRINT((ndo, " sdes %d", len)); in rtcp_print()
264 if (ndo->ndo_vflag) in rtcp_print()
265 ND_PRINT((ndo, " %u", EXTRACT_32BITS(&rh->rh_ssrc))); in rtcp_print()
269 ND_PRINT((ndo, " bye %d", len)); in rtcp_print()
270 if (ndo->ndo_vflag) in rtcp_print()
271 ND_PRINT((ndo, " %u", EXTRACT_32BITS(&rh->rh_ssrc))); in rtcp_print()
275 ND_PRINT((ndo, " type-0x%x %d", flags & 0xff, len)); in rtcp_print()
280 ND_PRINT((ndo, " c%d", cnt)); in rtcp_print()
285 if (ndo->ndo_vflag) in rtcp_print()
286 ND_PRINT((ndo, " %u", EXTRACT_32BITS(&rr->rr_srcid))); in rtcp_print()
289 ND_PRINT((ndo, " %ul %us %uj @%.2f+%.2f", in rtcp_print()
297 ND_PRINT((ndo, "%s", rtcp_tstr)); in rtcp_print()
301 static int udp_cksum(netdissect_options *ndo, register const struct ip *ip, in udp_cksum() argument
305 return nextproto4_cksum(ndo, ip, (const uint8_t *)(const void *)up, len, len, in udp_cksum()
309 static int udp6_cksum(netdissect_options *ndo, const struct ip6_hdr *ip6, in udp6_cksum() argument
312 return nextproto6_cksum(ndo, ip6, (const uint8_t *)(const void *)up, len, len, in udp6_cksum()
317 udpipaddr_print(netdissect_options *ndo, const struct ip *ip, int sport, int dport) in udpipaddr_print() argument
329 ND_PRINT((ndo, "%s > %s: ", in udpipaddr_print()
330 ip6addr_string(ndo, &ip6->ip6_src), in udpipaddr_print()
331 ip6addr_string(ndo, &ip6->ip6_dst))); in udpipaddr_print()
333 ND_PRINT((ndo, "%s.%s > %s.%s: ", in udpipaddr_print()
334 ip6addr_string(ndo, &ip6->ip6_src), in udpipaddr_print()
335 udpport_string(ndo, sport), in udpipaddr_print()
336 ip6addr_string(ndo, &ip6->ip6_dst), in udpipaddr_print()
337 udpport_string(ndo, dport))); in udpipaddr_print()
341 ND_PRINT((ndo, "%s > %s: ", in udpipaddr_print()
342 udpport_string(ndo, sport), in udpipaddr_print()
343 udpport_string(ndo, dport))); in udpipaddr_print()
349 ND_PRINT((ndo, "%s > %s: ", in udpipaddr_print()
350 ipaddr_string(ndo, &ip->ip_src), in udpipaddr_print()
351 ipaddr_string(ndo, &ip->ip_dst))); in udpipaddr_print()
353 ND_PRINT((ndo, "%s.%s > %s.%s: ", in udpipaddr_print()
354 ipaddr_string(ndo, &ip->ip_src), in udpipaddr_print()
355 udpport_string(ndo, sport), in udpipaddr_print()
356 ipaddr_string(ndo, &ip->ip_dst), in udpipaddr_print()
357 udpport_string(ndo, dport))); in udpipaddr_print()
361 ND_PRINT((ndo, "%s > %s: ", in udpipaddr_print()
362 udpport_string(ndo, sport), in udpipaddr_print()
363 udpport_string(ndo, dport))); in udpipaddr_print()
370 udp_print(netdissect_options *ndo, register const u_char *bp, u_int length, in udp_print() argument
380 if (ep > ndo->ndo_snapend) in udp_print()
381 ep = ndo->ndo_snapend; in udp_print()
389 udpipaddr_print(ndo, ip, -1, -1); in udp_print()
397 udpipaddr_print(ndo, ip, sport, dport); in udp_print()
398 ND_PRINT((ndo, "truncated-udp %d", length)); in udp_print()
402 udpipaddr_print(ndo, ip, sport, dport); in udp_print()
407 udpipaddr_print(ndo, ip, sport, dport); in udp_print()
408 ND_PRINT((ndo, "truncated-udplength %d", ulen)); in udp_print()
417 if (cp > ndo->ndo_snapend) { in udp_print()
418 udpipaddr_print(ndo, ip, sport, dport); in udp_print()
422 if (ndo->ndo_packettype) { in udp_print()
426 switch (ndo->ndo_packettype) { in udp_print()
429 udpipaddr_print(ndo, ip, sport, dport); in udp_print()
430 vat_print(ndo, (const void *)(up + 1), up); in udp_print()
434 udpipaddr_print(ndo, ip, sport, dport); in udp_print()
435 wb_print(ndo, (const void *)(up + 1), length); in udp_print()
442 sunrpcrequest_print(ndo, (const u_char *)rp, length, in udp_print()
445 nfsreply_print(ndo, (const u_char *)rp, length, in udp_print()
450 udpipaddr_print(ndo, ip, sport, dport); in udp_print()
451 rtp_print(ndo, (const void *)(up + 1), length, up); in udp_print()
455 udpipaddr_print(ndo, ip, sport, dport); in udp_print()
457 cp = rtcp_print(ndo, cp, ep); in udp_print()
461 udpipaddr_print(ndo, ip, sport, dport); in udp_print()
462 snmp_print(ndo, (const u_char *)(up + 1), length); in udp_print()
466 udpipaddr_print(ndo, ip, sport, dport); in udp_print()
467 cnfp_print(ndo, cp); in udp_print()
471 udpipaddr_print(ndo, ip, sport, dport); in udp_print()
472 tftp_print(ndo, cp, length); in udp_print()
476 udpipaddr_print(ndo, ip, sport, dport); in udp_print()
477 aodv_print(ndo, (const u_char *)(up + 1), length, in udp_print()
482 udpipaddr_print(ndo, ip, sport, dport); in udp_print()
483 radius_print(ndo, cp, length); in udp_print()
487 udpipaddr_print(ndo, ip, sport, dport); in udp_print()
488 vxlan_print(ndo, (const u_char *)(up + 1), length); in udp_print()
493 udpipaddr_print(ndo, ip, sport, dport); in udp_print()
494 pgm_print(ndo, cp, length, bp2); in udp_print()
497 udpipaddr_print(ndo, ip, sport, dport); in udp_print()
498 lmp_print(ndo, cp, length); in udp_print()
504 udpipaddr_print(ndo, ip, sport, dport); in udp_print()
505 if (!ndo->ndo_qflag) { in udp_print()
513 ND_PRINT((ndo, "NFS request xid %u ", EXTRACT_32BITS(&rp->rm_xid))); in udp_print()
514 nfsreq_print_noaddr(ndo, (const u_char *)rp, length, in udp_print()
519 ND_PRINT((ndo, "NFS reply xid %u ", EXTRACT_32BITS(&rp->rm_xid))); in udp_print()
520 nfsreply_print_noaddr(ndo, (const u_char *)rp, length, in udp_print()
533 if (ndo->ndo_vflag && !ndo->ndo_Kflag && !fragmented) { in udp_print()
541 if (IP_V(ip) == 4 && (ndo->ndo_vflag > 1)) { in udp_print()
544 ND_PRINT((ndo, "[no cksum] ")); in udp_print()
546 sum = udp_cksum(ndo, ip, up, length + sizeof(struct udphdr)); in udp_print()
549 ND_PRINT((ndo, "[bad udp cksum 0x%04x -> 0x%04x!] ", in udp_print()
553 ND_PRINT((ndo, "[udp sum ok] ")); in udp_print()
559 sum = udp6_cksum(ndo, ip6, up, length + sizeof(struct udphdr)); in udp_print()
563 ND_PRINT((ndo, "[bad udp cksum 0x%04x -> 0x%04x!] ", in udp_print()
567 ND_PRINT((ndo, "[udp sum ok] ")); in udp_print()
572 if (!ndo->ndo_qflag) { in udp_print()
574 ns_print(ndo, (const u_char *)(up + 1), length, 0); in udp_print()
576 ns_print(ndo, (const u_char *)(up + 1), length, 1); in udp_print()
578 timed_print(ndo, (const u_char *)(up + 1)); in udp_print()
580 tftp_print(ndo, (const u_char *)(up + 1), length); in udp_print()
582 bootp_print(ndo, (const u_char *)(up + 1), length); in udp_print()
584 rip_print(ndo, (const u_char *)(up + 1), length); in udp_print()
586 aodv_print(ndo, (const u_char *)(up + 1), length, in udp_print()
589 isakmp_print(ndo, (const u_char *)(up + 1), length, bp2); in udp_print()
591 isakmp_rfc3948_print(ndo, (const u_char *)(up + 1), length, bp2); in udp_print()
594 isakmp_print(ndo, (const u_char *)(up + 1), length, bp2); in udp_print()
597 snmp_print(ndo, (const u_char *)(up + 1), length); in udp_print()
599 ntp_print(ndo, (const u_char *)(up + 1), length); in udp_print()
601 krb_print(ndo, (const void *)(up + 1)); in udp_print()
603 l2tp_print(ndo, (const u_char *)(up + 1), length); in udp_print()
606 nbt_udp137_print(ndo, (const u_char *)(up + 1), length); in udp_print()
608 nbt_udp138_print(ndo, (const u_char *)(up + 1), length); in udp_print()
611 vat_print(ndo, (const void *)(up + 1), up); in udp_print()
613 zephyr_print(ndo, (const void *)(up + 1), length); in udp_print()
620 rx_print(ndo, (const void *)(up + 1), length, sport, dport, in udp_print()
623 ripng_print(ndo, (const u_char *)(up + 1), length); in udp_print()
625 dhcp6_print(ndo, (const u_char *)(up + 1), length); in udp_print()
627 ahcp_print(ndo, (const u_char *)(up + 1), length); in udp_print()
629 babel_print(ndo, (const u_char *)(up + 1), length); in udp_print()
631 hncp_print(ndo, (const u_char *)(up + 1), length); in udp_print()
636 wb_print(ndo, (const void *)(up + 1), length); in udp_print()
638 cisco_autorp_print(ndo, (const void *)(up + 1), length); in udp_print()
645 radius_print(ndo, (const u_char *)(up+1), length); in udp_print()
647 hsrp_print(ndo, (const u_char *)(up + 1), length); in udp_print()
649 lwres_print(ndo, (const u_char *)(up + 1), length); in udp_print()
651 ldp_print(ndo, (const u_char *)(up + 1), length); in udp_print()
653 olsr_print(ndo, (const u_char *)(up + 1), length, in udp_print()
656 lspping_print(ndo, (const u_char *)(up + 1), length); in udp_print()
659 bfd_print(ndo, (const u_char *)(up+1), length, dport); in udp_print()
661 lmp_print(ndo, (const u_char *)(up + 1), length); in udp_print()
663 vqp_print(ndo, (const u_char *)(up + 1), length); in udp_print()
665 sflow_print(ndo, (const u_char *)(up + 1), length); in udp_print()
667 lwapp_control_print(ndo, (const u_char *)(up + 1), length, 1); in udp_print()
669 lwapp_control_print(ndo, (const u_char *)(up + 1), length, 0); in udp_print()
671 lwapp_data_print(ndo, (const u_char *)(up + 1), length); in udp_print()
673 sip_print(ndo, (const u_char *)(up + 1), length); in udp_print()
675 syslog_print(ndo, (const u_char *)(up + 1), length); in udp_print()
677 otv_print(ndo, (const u_char *)(up + 1), length); in udp_print()
679 vxlan_print(ndo, (const u_char *)(up + 1), length); in udp_print()
681 geneve_print(ndo, (const u_char *)(up + 1), length); in udp_print()
683 lisp_print(ndo, (const u_char *)(up + 1), length); in udp_print()
685 vxlan_gpe_print(ndo, (const u_char *)(up + 1), length); in udp_print()
689 if (ndo->ndo_vflag) in udp_print()
690 ND_PRINT((ndo, "kip ")); in udp_print()
691 llap_print(ndo, cp, length); in udp_print()
694 ND_PRINT((ndo, "UDP, bad length %u > %u", in udp_print()
697 ND_PRINT((ndo, "UDP, length %u", ulen)); in udp_print()
701 ND_PRINT((ndo, "UDP, bad length %u > %u", in udp_print()
704 ND_PRINT((ndo, "UDP, length %u", ulen)); in udp_print()
709 ND_PRINT((ndo, "%s", udp_tstr)); in udp_print()