Lines Matching +full:- +full:n
1 /*-
138 xsb->sb_cc = sb->sb_ccc; in sbtoxsockbuf()
139 xsb->sb_hiwat = sb->sb_hiwat; in sbtoxsockbuf()
140 xsb->sb_mbcnt = sb->sb_mbcnt; in sbtoxsockbuf()
141 xsb->sb_mbmax = sb->sb_mbmax; in sbtoxsockbuf()
142 xsb->sb_lowat = sb->sb_lowat; in sbtoxsockbuf()
143 xsb->sb_flags = sb->sb_flags; in sbtoxsockbuf()
144 xsb->sb_timeo = sb->sb_timeo; in sbtoxsockbuf()
154 xso->xso_len = sizeof *xso; in sotoxsocket()
155 xso->xso_so = (uintptr_t)so; in sotoxsocket()
156 xso->so_type = so->so_type; in sotoxsocket()
157 xso->so_options = so->so_options; in sotoxsocket()
158 xso->so_linger = so->so_linger; in sotoxsocket()
159 xso->so_state = so->so_state; in sotoxsocket()
160 xso->so_pcb = (uintptr_t)so->so_pcb; in sotoxsocket()
161 if (kread((uintptr_t)so->so_proto, &proto, sizeof(proto)) != 0) in sotoxsocket()
162 return (-1); in sotoxsocket()
163 xso->xso_protocol = proto.pr_protocol; in sotoxsocket()
165 return (-1); in sotoxsocket()
166 xso->xso_family = domain.dom_family; in sotoxsocket()
167 xso->so_timeo = so->so_timeo; in sotoxsocket()
168 xso->so_error = so->so_error; in sotoxsocket()
169 if ((so->so_options & SO_ACCEPTCONN) != 0) { in sotoxsocket()
170 xso->so_qlen = so->sol_qlen; in sotoxsocket()
171 xso->so_incqlen = so->sol_incqlen; in sotoxsocket()
172 xso->so_qlimit = so->sol_qlimit; in sotoxsocket()
174 sbtoxsockbuf(&so->so_snd, &xso->so_snd); in sotoxsocket()
175 sbtoxsockbuf(&so->so_rcv, &xso->so_rcv); in sotoxsocket()
176 xso->so_oobmark = so->so_oobmark; in sotoxsocket()
185 * -a (all) flag is specified.
235 for (xig = (struct xinpgen*)((char *)xig + xig->xig_len); in protopr()
236 xig->xig_len > sizeof(struct xinpgen); in protopr()
237 xig = (struct xinpgen *)((char *)xig + xig->xig_len)) { in protopr()
239 inp = &tp->xt_inp; in protopr()
240 if (inp->inp_gencnt > oxig->xig_gen) in protopr()
242 so = &inp->xi_socket; in protopr()
243 if (so->xso_protocol != proto) in protopr()
245 fnamelen = max(fnamelen, (int)strlen(tp->xt_stack)); in protopr()
246 cnamelen = max(cnamelen, (int)strlen(tp->xt_cc)); in protopr()
251 for (xig = (struct xinpgen *)((char *)xig + xig->xig_len); in protopr()
252 xig->xig_len > sizeof(struct xinpgen); in protopr()
253 xig = (struct xinpgen *)((char *)xig + xig->xig_len)) { in protopr()
256 inp = &tp->xt_inp; in protopr()
260 so = &inp->xi_socket; in protopr()
263 if (proto != 0 && so->xso_protocol != proto) in protopr()
267 if (inp->inp_gencnt > oxig->xig_gen) in protopr()
270 if ((af1 == AF_INET && (inp->inp_vflag & INP_IPV4) == 0) in protopr()
272 || (af1 == AF_INET6 && (inp->inp_vflag & INP_IPV6) == 0) in protopr()
274 || (af1 == AF_UNSPEC && ((inp->inp_vflag & INP_IPV4) == 0 in protopr()
276 && (inp->inp_vflag & INP_IPV6) == 0 in protopr()
283 (istcp && tp->t_state == TCPS_LISTEN) in protopr()
285 inp->inp_laddr.s_addr == INADDR_ANY) in protopr()
288 IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_laddr)) in protopr()
291 (((inp->inp_vflag & INP_IPV4) != 0 && in protopr()
292 inp->inp_laddr.s_addr == INADDR_ANY) in protopr()
294 || ((inp->inp_vflag & INP_IPV6) != 0 && in protopr()
295 IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_laddr)) in protopr()
309 xo_emit("\n"); in protopr()
311 xo_emit("{T:/%-*s} ", 2 * (int)sizeof(void *), in protopr()
315 "{T:/%-5.5s} {T:/%-32.32s} {T:/%-18.18s}" : in protopr()
317 "{T:/%-5.5s} {T:/%-32.32s} {T:/%-22.22s}" : in protopr()
318 "{T:/%-5.5s} {T:/%-32.32s} {T:/%-45.45s}"), in protopr()
322 "{T:/%-5.5s} {T:/%-6.6s} {T:/%-6.6s} {T:/%-6.6s} {T:/%-18.18s} {T:/%s}" : in protopr()
324 "{T:/%-5.5s} {T:/%-6.6s} {T:/%-6.6s} {T:/%-6.6s} {T:/%-22.22s} {T:/%s}" : in protopr()
325 "{T:/%-5.5s} {T:/%-6.6s} {T:/%-6.6s} {T:/%-6.6s} {T:/%-45.45s} {T:/%s}"), in protopr()
326 "Proto", "Rexmit", "OOORcv", "0-win", in protopr()
330 "{T:/%-5.5s} {T:/%-6.6s} {T:/%-6.6s} {T:/%-18.18s} {T:/%-18.18s}" : in protopr()
332 "{T:/%-5.5s} {T:/%-6.6s} {T:/%-6.6s} {T:/%-22.22s} {T:/%-22.22s}" : in protopr()
333 "{T:/%-5.5s} {T:/%-6.6s} {T:/%-6.6s} {T:/%-45.45s} {T:/%-45.45s}"), in protopr()
334 "Proto", "Recv-Q", "Send-Q", in protopr()
337 xo_emit(" {T:/%-11.11s}", "(state)"); in protopr()
340 xo_emit("{T:/%-6.6s} {T:/%-6.6s} " in protopr()
341 "{T:/%-6.6s} {T:/%-6.6s} {T:/%-6.6s} " in protopr()
342 "{T:/%-6.6s} {T:/%-6.6s} {T:/%-6.6s}", in protopr()
343 "R-HIWA", "S-HIWA", "R-LOWA", "S-LOWA", in protopr()
344 "R-BCNT", "S-BCNT", "R-BMAX", "S-BMAX"); in protopr()
354 xo_emit(" {T:/%-*.*s}", in protopr()
358 xo_emit(" {T:/%-*.*s} {T:/%10.10s}" in protopr()
368 xo_emit("\n"); in protopr()
371 if (Lflag && so->so_qlimit == 0) in protopr()
376 (u_long)so->so_pcb); in protopr()
378 if ((inp->inp_vflag & INP_IPV6) != 0) in protopr()
379 vchar = ((inp->inp_vflag & INP_IPV4) != 0) ? in protopr()
383 vchar = ((inp->inp_vflag & INP_IPV4) != 0) ? in protopr()
385 if (istcp && (tp->t_flags & TF_TOE) != 0) in protopr()
386 xo_emit("{:protocol/%-3.3s%-2.2s/%s%s} ", "toe", vchar); in protopr()
388 xo_emit("{:protocol/%-3.3s%-2.2s/%s%s} ", name, vchar); in protopr()
392 snprintf(buf1, sizeof buf1, "%u/%u/%u", so->so_qlen, in protopr()
393 so->so_incqlen, so->so_qlimit); in protopr()
394 xo_emit("{:listen-queue-sizes/%-32.32s} ", buf1); in protopr()
397 xo_emit("{:sent-retransmit-packets/%6u} " in protopr()
398 "{:received-out-of-order-packets/%6u} " in protopr()
399 "{:sent-zero-window/%6u} ", in protopr()
400 tp->t_sndrexmitpack, tp->t_rcvoopack, in protopr()
401 tp->t_sndzerowin); in protopr()
405 xo_emit("{:receive-bytes-waiting/%6u} " in protopr()
406 "{:send-bytes-waiting/%6u} ", in protopr()
407 so->so_rcv.sb_cc, so->so_snd.sb_cc); in protopr()
411 if (inp->inp_vflag & INP_IPV4) { in protopr()
412 inetprint("local", &inp->inp_laddr, in protopr()
413 (int)inp->inp_lport, name, 1, af1); in protopr()
415 inetprint("remote", &inp->inp_faddr, in protopr()
416 (int)inp->inp_fport, name, 1, af1); in protopr()
423 if (inp->inp_vflag & INP_IPV6) { in protopr()
424 inet6print("local", &inp->in6p_laddr, in protopr()
425 (int)inp->inp_lport, name, 1); in protopr()
427 inet6print("remote", &inp->in6p_faddr, in protopr()
428 (int)inp->inp_fport, name, 1); in protopr()
431 } else if (inp->inp_flags & INP_ANONPORT) { in protopr()
433 if (inp->inp_vflag & INP_IPV4) { in protopr()
434 inetprint("local", &inp->inp_laddr, in protopr()
435 (int)inp->inp_lport, name, 1, af1); in protopr()
437 inetprint("remote", &inp->inp_faddr, in protopr()
438 (int)inp->inp_fport, name, 0, af1); in protopr()
445 if (inp->inp_vflag & INP_IPV6) { in protopr()
446 inet6print("local", &inp->in6p_laddr, in protopr()
447 (int)inp->inp_lport, name, 1); in protopr()
449 inet6print("remote", &inp->in6p_faddr, in protopr()
450 (int)inp->inp_fport, name, 0); in protopr()
455 if (inp->inp_vflag & INP_IPV4) { in protopr()
456 inetprint("local", &inp->inp_laddr, in protopr()
457 (int)inp->inp_lport, name, 0, af1); in protopr()
459 inetprint("remote", &inp->inp_faddr, in protopr()
460 (int)inp->inp_fport, name, in protopr()
461 inp->inp_lport != inp->inp_fport, in protopr()
469 if (inp->inp_vflag & INP_IPV6) { in protopr()
470 inet6print("local", &inp->in6p_laddr, in protopr()
471 (int)inp->inp_lport, name, 0); in protopr()
473 inet6print("remote", &inp->in6p_faddr, in protopr()
474 (int)inp->inp_fport, name, in protopr()
475 inp->inp_lport != inp->inp_fport); in protopr()
480 xo_emit("{:receive-high-water/%6u} " in protopr()
481 "{:send-high-water/%6u} " in protopr()
482 "{:receive-low-water/%6u} {:send-low-water/%6u} " in protopr()
483 "{:receive-mbuf-bytes/%6u} {:send-mbuf-bytes/%6u} " in protopr()
484 "{:receive-mbuf-bytes-max/%6u} " in protopr()
485 "{:send-mbuf-bytes-max/%6u}", in protopr()
486 so->so_rcv.sb_hiwat, so->so_snd.sb_hiwat, in protopr()
487 so->so_rcv.sb_lowat, so->so_snd.sb_lowat, in protopr()
488 so->so_rcv.sb_mbcnt, so->so_snd.sb_mbcnt, in protopr()
489 so->so_rcv.sb_mbmax, so->so_snd.sb_mbmax); in protopr()
491 xo_emit(" {:retransmit-timer/%4d.%02d} " in protopr()
492 "{:persist-timer/%4d.%02d} " in protopr()
493 "{:keepalive-timer/%4d.%02d} " in protopr()
494 "{:msl2-timer/%4d.%02d} " in protopr()
495 "{:delay-ack-timer/%4d.%02d} " in protopr()
496 "{:inactivity-timer/%4d.%02d}", in protopr()
497 tp->tt_rexmt / 1000, in protopr()
498 (tp->tt_rexmt % 1000) / 10, in protopr()
499 tp->tt_persist / 1000, in protopr()
500 (tp->tt_persist % 1000) / 10, in protopr()
501 tp->tt_keep / 1000, in protopr()
502 (tp->tt_keep % 1000) / 10, in protopr()
503 tp->tt_2msl / 1000, in protopr()
504 (tp->tt_2msl % 1000) / 10, in protopr()
505 tp->tt_delack / 1000, in protopr()
506 (tp->tt_delack % 1000) / 10, in protopr()
507 tp->t_rcvtime / 1000, in protopr()
508 (tp->t_rcvtime % 1000) / 10); in protopr()
511 if (tp->t_state < 0 || tp->t_state >= TCP_NSTATES) in protopr()
512 xo_emit("{:tcp-state/%-11d}", tp->t_state); in protopr()
514 xo_emit("{:tcp-state/%-11s}", in protopr()
515 tcpstates[tp->t_state]); in protopr()
518 if (tp->t_flags & (TF_NEEDSYN|TF_NEEDFIN)) in protopr()
519 xo_emit("{:need-syn-or-fin/*}"); in protopr()
525 xo_emit(" {:flow-id/%08x} {:flow-type/%5d}", in protopr()
526 inp->inp_flowid, in protopr()
527 inp->inp_flowtype); in protopr()
531 xo_emit(" {:stack/%-*.*s}", in protopr()
533 fnamelen, fnamelen, tp->xt_stack); in protopr()
535 xo_emit(" {:cc/%-*.*s}" in protopr()
536 " {:snd-cwnd/%10lu}" in protopr()
537 " {:snd-ssthresh/%10lu}" in protopr()
538 " {:t-maxseg/%5u} {:ecn/%3s}", in protopr()
539 cnamelen, cnamelen, tp->xt_cc, in protopr()
540 tp->t_snd_cwnd, tp->t_snd_ssthresh, in protopr()
541 tp->t_maxseg, in protopr()
542 (tp->t_state >= TCPS_ESTABLISHED ? in protopr()
543 (tp->xt_ecn > 0 ? in protopr()
544 (tp->xt_ecn == 1 ? in protopr()
547 : "n/a")); in protopr()
549 xo_emit(" {:log-id/%s}", in protopr()
550 tp->xt_logid[0] == '\0' ? in protopr()
551 "-" : tp->xt_logid); in protopr()
553 xo_emit("\n"); in protopr()
556 if (xig != oxig && xig->xig_gen != oxig->xig_gen) { in protopr()
557 if (oxig->xig_count > xig->xig_count) { in protopr()
559 "deleted.\n", name); in protopr()
560 } else if (oxig->xig_count < xig->xig_count) { in protopr()
562 "created.\n", name); in protopr()
565 "created or deleted.\n", name); in protopr()
596 xo_emit("{T:/%s}:\n", name); in tcp_stats()
611 p(tcps_sndtotal, "\t{:sent-packets/%ju} {N:/packet%s sent}\n"); in tcp_stats()
612 p2(tcps_sndpack,tcps_sndbyte, "\t\t{:sent-data-packets/%ju} " in tcp_stats()
613 "{N:/data packet%s} ({:sent-data-bytes/%ju} {N:/byte%s})\n"); in tcp_stats()
615 "{:sent-retransmitted-packets/%ju} {N:/data packet%s} " in tcp_stats()
616 "({:sent-retransmitted-bytes/%ju} {N:/byte%s}) " in tcp_stats()
617 "{N:retransmitted}\n"); in tcp_stats()
619 "{:sent-unnecessary-retransmitted-packets/%ju} " in tcp_stats()
620 "{N:/data packet%s unnecessarily retransmitted}\n"); in tcp_stats()
621 p(tcps_mturesent, "\t\t{:sent-resends-by-mtu-discovery/%ju} " in tcp_stats()
622 "{N:/resend%s initiated by MTU discovery}\n"); in tcp_stats()
623 p2a(tcps_sndacks, tcps_delack, "\t\t{:sent-ack-only-packets/%ju} " in tcp_stats()
624 "{N:/ack-only packet%s/} ({:sent-packets-delayed/%ju} " in tcp_stats()
625 "{N:delayed})\n"); in tcp_stats()
626 p(tcps_sndurg, "\t\t{:sent-urg-only-packets/%ju} " in tcp_stats()
627 "{N:/URG only packet%s}\n"); in tcp_stats()
628 p(tcps_sndprobe, "\t\t{:sent-window-probe-packets/%ju} " in tcp_stats()
629 "{N:/window probe packet%s}\n"); in tcp_stats()
630 p(tcps_sndwinup, "\t\t{:sent-window-update-packets/%ju} " in tcp_stats()
631 "{N:/window update packet%s}\n"); in tcp_stats()
632 p(tcps_sndctrl, "\t\t{:sent-control-packets/%ju} " in tcp_stats()
633 "{N:/control packet%s}\n"); in tcp_stats()
634 p(tcps_rcvtotal, "\t{:received-packets/%ju} " in tcp_stats()
635 "{N:/packet%s received}\n"); in tcp_stats()
637 "{:received-ack-packets/%ju} {N:/ack%s} " in tcp_stats()
638 "{N:(for} {:received-ack-bytes/%ju} {N:/byte%s})\n"); in tcp_stats()
639 p(tcps_rcvdupack, "\t\t{:received-duplicate-acks/%ju} " in tcp_stats()
640 "{N:/duplicate ack%s}\n"); in tcp_stats()
641 p(tcps_tunneled_pkts, "\t\t{:received-udp-tunneled-pkts/%ju} " in tcp_stats()
642 "{N:/UDP tunneled pkt%s}\n"); in tcp_stats()
643 p(tcps_tunneled_errs, "\t\t{:received-bad-udp-tunneled-pkts/%ju} " in tcp_stats()
644 "{N:/UDP tunneled pkt cnt with error%s}\n"); in tcp_stats()
645 p(tcps_rcvacktoomuch, "\t\t{:received-acks-for-data-not-yet-sent/%ju} " in tcp_stats()
646 "{N:/ack%s for data not yet sent}\n"); in tcp_stats()
647 p(tcps_rcvghostack, "\t\t{:received-acks-for-data-never-been-sent/%ju} " in tcp_stats()
648 "{N:/ack%s for data never been sent (ghost acks)}\n"); in tcp_stats()
649 p(tcps_rcvacktooold, "\t\t{:received-acks-for-data-being-too-old/%ju} " in tcp_stats()
650 "{N:/ack%s for data being too old}\n"); in tcp_stats()
652 "{:received-in-sequence-packets/%ju} {N:/packet%s} " in tcp_stats()
653 "({:received-in-sequence-bytes/%ju} {N:/byte%s}) " in tcp_stats()
654 "{N:received in-sequence}\n"); in tcp_stats()
656 "{:received-completely-duplicate-packets/%ju} " in tcp_stats()
657 "{N:/completely duplicate packet%s} " in tcp_stats()
658 "({:received-completely-duplicate-bytes/%ju} {N:/byte%s})\n"); in tcp_stats()
659 p(tcps_pawsdrop, "\t\t{:received-old-duplicate-packets/%ju} " in tcp_stats()
660 "{N:/old duplicate packet%s}\n"); in tcp_stats()
662 "{:received-some-duplicate-packets/%ju} " in tcp_stats()
663 "{N:/packet%s with some dup. data} " in tcp_stats()
664 "({:received-some-duplicate-bytes/%ju} {N:/byte%s duped/})\n"); in tcp_stats()
665 p2(tcps_rcvoopack, tcps_rcvoobyte, "\t\t{:received-out-of-order/%ju} " in tcp_stats()
666 "{N:/out-of-order packet%s} " in tcp_stats()
667 "({:received-out-of-order-bytes/%ju} {N:/byte%s})\n"); in tcp_stats()
669 "{:received-after-window-packets/%ju} {N:/packet%s} " in tcp_stats()
670 "({:received-after-window-bytes/%ju} {N:/byte%s}) " in tcp_stats()
671 "{N:of data after window}\n"); in tcp_stats()
672 p(tcps_rcvwinprobe, "\t\t{:received-window-probes/%ju} " in tcp_stats()
673 "{N:/window probe%s}\n"); in tcp_stats()
674 p(tcps_rcvwinupd, "\t\t{:receive-window-update-packets/%ju} " in tcp_stats()
675 "{N:/window update packet%s}\n"); in tcp_stats()
676 p(tcps_dsack_count, "\t\t{:received-with-dsack-packets/%ju} " in tcp_stats()
677 "{N:/packet%s received with dsack}\n"); in tcp_stats()
678 p(tcps_dsack_bytes, "\t\t{:received-with-dsack-bytes/%ju} " in tcp_stats()
679 "{N:/dsack byte%s received (no TLP involved)}\n"); in tcp_stats()
680 p(tcps_dsack_tlp_bytes, "\t\t{:received-with-dsack-bytes-tlp/%ju} " in tcp_stats()
681 "{N:/dsack byte%s received (TLP responsible)}\n"); in tcp_stats()
682 p(tcps_rcvafterclose, "\t\t{:received-after-close-packets/%ju} " in tcp_stats()
683 "{N:/packet%s received after close}\n"); in tcp_stats()
684 p(tcps_rcvbadsum, "\t\t{:discard-bad-checksum/%ju} " in tcp_stats()
685 "{N:/discarded for bad checksum%s}\n"); in tcp_stats()
686 p(tcps_rcvbadoff, "\t\t{:discard-bad-header-offset/%ju} " in tcp_stats()
687 "{N:/discarded for bad header offset field%s}\n"); in tcp_stats()
688 p1a(tcps_rcvshort, "\t\t{:discard-too-short/%ju} " in tcp_stats()
689 "{N:discarded because packet too short}\n"); in tcp_stats()
690 p1a(tcps_rcvreassfull, "\t\t{:discard-reassembly-queue-full/%ju} " in tcp_stats()
691 "{N:discarded due to full reassembly queue}\n"); in tcp_stats()
692 p(tcps_connattempt, "\t{:connection-requests/%ju} " in tcp_stats()
693 "{N:/connection request%s}\n"); in tcp_stats()
694 p(tcps_accepts, "\t{:connections-accepts/%ju} " in tcp_stats()
695 "{N:/connection accept%s}\n"); in tcp_stats()
696 p(tcps_badsyn, "\t{:bad-connection-attempts/%ju} " in tcp_stats()
697 "{N:/bad connection attempt%s}\n"); in tcp_stats()
698 p(tcps_listendrop, "\t{:listen-queue-overflows/%ju} " in tcp_stats()
699 "{N:/listen queue overflow%s}\n"); in tcp_stats()
700 p(tcps_badrst, "\t{:ignored-in-window-resets/%ju} " in tcp_stats()
701 "{N:/ignored RSTs in the window%s}\n"); in tcp_stats()
702 p(tcps_connects, "\t{:connections-established/%ju} " in tcp_stats()
703 "{N:/connection%s established (including accepts)}\n"); in tcp_stats()
704 p(tcps_usedrtt, "\t\t{:connections-hostcache-rtt/%ju} " in tcp_stats()
705 "{N:/time%s used RTT from hostcache}\n"); in tcp_stats()
706 p(tcps_usedrttvar, "\t\t{:connections-hostcache-rttvar/%ju} " in tcp_stats()
707 "{N:/time%s used RTT variance from hostcache}\n"); in tcp_stats()
708 p(tcps_usedssthresh, "\t\t{:connections-hostcache-ssthresh/%ju} " in tcp_stats()
709 "{N:/time%s used slow-start threshold from hostcache}\n"); in tcp_stats()
710 p2(tcps_closed, tcps_drops, "\t{:connections-closed/%ju} " in tcp_stats()
711 "{N:/connection%s closed (including} " in tcp_stats()
712 "{:connection-drops/%ju} {N:/drop%s})\n"); in tcp_stats()
713 p(tcps_cachedrtt, "\t\t{:connections-updated-rtt-on-close/%ju} " in tcp_stats()
714 "{N:/connection%s updated cached RTT on close}\n"); in tcp_stats()
716 "{:connections-updated-variance-on-close/%ju} " in tcp_stats()
717 "{N:/connection%s updated cached RTT variance on close}\n"); in tcp_stats()
719 "{:connections-updated-ssthresh-on-close/%ju} " in tcp_stats()
720 "{N:/connection%s updated cached ssthresh on close}\n"); in tcp_stats()
721 p(tcps_conndrops, "\t{:embryonic-connections-dropped/%ju} " in tcp_stats()
722 "{N:/embryonic connection%s dropped}\n"); in tcp_stats()
723 p2(tcps_rttupdated, tcps_segstimed, "\t{:segments-updated-rtt/%ju} " in tcp_stats()
724 "{N:/segment%s updated rtt (of} " in tcp_stats()
725 "{:segment-update-attempts/%ju} {N:/attempt%s})\n"); in tcp_stats()
726 p(tcps_rexmttimeo, "\t{:retransmit-timeouts/%ju} " in tcp_stats()
727 "{N:/retransmit timeout%s}\n"); in tcp_stats()
729 "{:connections-dropped-by-retransmit-timeout/%ju} " in tcp_stats()
730 "{N:/connection%s dropped by rexmit timeout}\n"); in tcp_stats()
731 p(tcps_persisttimeo, "\t{:persist-timeout/%ju} " in tcp_stats()
732 "{N:/persist timeout%s}\n"); in tcp_stats()
734 "{:connections-dropped-by-persist-timeout/%ju} " in tcp_stats()
735 "{N:/connection%s dropped by persist timeout}\n"); in tcp_stats()
737 "{:connections-dropped-by-finwait2-timeout/%ju} " in tcp_stats()
738 "{N:/Connection%s (fin_wait_2) dropped because of timeout}\n"); in tcp_stats()
739 p(tcps_keeptimeo, "\t{:keepalive-timeout/%ju} " in tcp_stats()
740 "{N:/keepalive timeout%s}\n"); in tcp_stats()
741 p(tcps_keepprobe, "\t\t{:keepalive-probes/%ju} " in tcp_stats()
742 "{N:/keepalive probe%s sent}\n"); in tcp_stats()
743 p(tcps_keepdrops, "\t\t{:connections-dropped-by-keepalives/%ju} " in tcp_stats()
744 "{N:/connection%s dropped by keepalive}\n"); in tcp_stats()
745 p(tcps_progdrops, "\t{:connections-dropped-due-to-progress-time/%ju} " in tcp_stats()
746 "{N:/connection%s dropped due to exceeding progress time}\n"); in tcp_stats()
747 p(tcps_predack, "\t{:ack-header-predictions/%ju} " in tcp_stats()
748 "{N:/correct ACK header prediction%s}\n"); in tcp_stats()
749 p(tcps_preddat, "\t{:data-packet-header-predictions/%ju} " in tcp_stats()
750 "{N:/correct data packet header prediction%s}\n"); in tcp_stats()
754 p3(tcps_sc_added, "\t{:entries-added/%ju} " in tcp_stats()
755 "{N:/syncache entr%s added}\n"); in tcp_stats()
757 "{N:/retransmitted}\n"); in tcp_stats()
758 p1a(tcps_sc_dupsyn, "\t\t{:duplicates/%ju} {N:/dupsyn}\n"); in tcp_stats()
759 p1a(tcps_sc_dropped, "\t\t{:dropped/%ju} {N:/dropped}\n"); in tcp_stats()
760 p1a(tcps_sc_completed, "\t\t{:completed/%ju} {N:/completed}\n"); in tcp_stats()
761 p1a(tcps_sc_bucketoverflow, "\t\t{:bucket-overflow/%ju} " in tcp_stats()
762 "{N:/bucket overflow}\n"); in tcp_stats()
763 p1a(tcps_sc_cacheoverflow, "\t\t{:cache-overflow/%ju} " in tcp_stats()
764 "{N:/cache overflow}\n"); in tcp_stats()
765 p1a(tcps_sc_reset, "\t\t{:reset/%ju} {N:/reset}\n"); in tcp_stats()
766 p1a(tcps_sc_stale, "\t\t{:stale/%ju} {N:/stale}\n"); in tcp_stats()
767 p1a(tcps_sc_aborted, "\t\t{:aborted/%ju} {N:/aborted}\n"); in tcp_stats()
768 p1a(tcps_sc_badack, "\t\t{:bad-ack/%ju} {N:/badack}\n"); in tcp_stats()
769 p1a(tcps_sc_unreach, "\t\t{:unreachable/%ju} {N:/unreach}\n"); in tcp_stats()
770 p(tcps_sc_zonefail, "\t\t{:zone-failures/%ju} {N:/zone failure%s}\n"); in tcp_stats()
771 p(tcps_sc_sendcookie, "\t{:sent-cookies/%ju} {N:/cookie%s sent}\n"); in tcp_stats()
772 p(tcps_sc_recvcookie, "\t{:receivd-cookies/%ju} " in tcp_stats()
773 "{N:/cookie%s received}\n"); in tcp_stats()
779 p3(tcps_hc_added, "\t{:entries-added/%ju} " in tcp_stats()
780 "{N:/hostcache entr%s added}\n"); in tcp_stats()
781 p1a(tcps_hc_bucketoverflow, "\t\t{:buffer-overflows/%ju} " in tcp_stats()
782 "{N:/bucket overflow}\n"); in tcp_stats()
788 p(tcps_sack_recovery_episode, "\t{:recovery-episodes/%ju} " in tcp_stats()
789 "{N:/SACK recovery episode%s}\n"); in tcp_stats()
790 p(tcps_sack_rexmits, "\t{:segment-retransmits/%ju} " in tcp_stats()
791 "{N:/segment rexmit%s in SACK recovery episodes}\n"); in tcp_stats()
792 p(tcps_sack_rexmits_tso, "\t{:tso-chunk-retransmits/%ju} " in tcp_stats()
793 "{N:/tso chunk rexmit%s in SACK recovery episodes}\n"); in tcp_stats()
794 p(tcps_sack_rexmit_bytes, "\t{:byte-retransmits/%ju} " in tcp_stats()
795 "{N:/byte rexmit%s in SACK recovery episodes}\n"); in tcp_stats()
796 p(tcps_sack_rcv_blocks, "\t{:received-blocks/%ju} " in tcp_stats()
797 "{N:/SACK option%s (SACK blocks) received}\n"); in tcp_stats()
798 p(tcps_sack_send_blocks, "\t{:sent-option-blocks/%ju} " in tcp_stats()
799 "{N:/SACK option%s (SACK blocks) sent}\n"); in tcp_stats()
800 p(tcps_sack_lostrexmt, "\t{:lost-retransmissions/%ju} " in tcp_stats()
801 "{N:/SACK retransmission%s lost}\n"); in tcp_stats()
802 p1a(tcps_sack_sboverflow, "\t{:scoreboard-overflows/%ju} " in tcp_stats()
803 "{N:/SACK scoreboard overflow}\n"); in tcp_stats()
808 p(tcps_ecn_rcvce, "\t{:received-ce-packets/%ju} " in tcp_stats()
809 "{N:/packet%s received with ECN CE bit set}\n"); in tcp_stats()
810 p(tcps_ecn_rcvect0, "\t{:received-ect0-packets/%ju} " in tcp_stats()
811 "{N:/packet%s received with ECN ECT(0) bit set}\n"); in tcp_stats()
812 p(tcps_ecn_rcvect1, "\t{:received-ect1-packets/%ju} " in tcp_stats()
813 "{N:/packet%s received with ECN ECT(1) bit set}\n"); in tcp_stats()
814 p(tcps_ecn_sndect0, "\t{:sent-ect0-packets/%ju} " in tcp_stats()
815 "{N:/packet%s sent with ECN ECT(0) bit set}\n"); in tcp_stats()
816 p(tcps_ecn_sndect1, "\t{:sent-ect1-packets/%ju} " in tcp_stats()
817 "{N:/packet%s sent with ECN ECT(1) bit set}\n"); in tcp_stats()
819 "{N:/successful ECN handshake%s}\n"); in tcp_stats()
820 p(tcps_ecn_rcwnd, "\t{:congestion-reductions/%ju} " in tcp_stats()
821 "{N:/time%s ECN reduced the congestion window}\n"); in tcp_stats()
823 p(tcps_ace_nect, "\t{:ace-nonect-syn/%ju} " in tcp_stats()
824 "{N:/ACE SYN packet%s with Non-ECT}\n"); in tcp_stats()
825 p(tcps_ace_ect0, "\t{:ace-ect0-syn/%ju} " in tcp_stats()
826 "{N:/ACE SYN packet%s with ECT0}\n"); in tcp_stats()
827 p(tcps_ace_ect1, "\t{:ace-ect1-syn/%ju} " in tcp_stats()
828 "{N:/ACE SYN packet%s with ECT1}\n"); in tcp_stats()
829 p(tcps_ace_ce, "\t{:ace-ce-syn/%ju} " in tcp_stats()
830 "{N:/ACE SYN packet%s with CE}\n"); in tcp_stats()
833 xo_open_container("tcp-signature"); in tcp_stats()
834 p(tcps_sig_rcvgoodsig, "\t{:received-good-signature/%ju} " in tcp_stats()
835 "{N:/packet%s with matching signature received}\n"); in tcp_stats()
836 p(tcps_sig_rcvbadsig, "\t{:received-bad-signature/%ju} " in tcp_stats()
837 "{N:/packet%s with bad signature received}\n"); in tcp_stats()
838 p(tcps_sig_err_buildsig, "\t{:failed-make-signature/%ju} " in tcp_stats()
839 "{N:/time%s failed to make signature due to no SA}\n"); in tcp_stats()
840 p(tcps_sig_err_sigopt, "\t{:no-signature-expected/%ju} " in tcp_stats()
841 "{N:/time%s unexpected signature received}\n"); in tcp_stats()
842 p(tcps_sig_err_nosigopt, "\t{:no-signature-provided/%ju} " in tcp_stats()
843 "{N:/time%s no signature provided by segment}\n"); in tcp_stats()
845 xo_close_container("tcp-signature"); in tcp_stats()
848 p(tcps_pmtud_blackhole_activated, "\t{:pmtud-activated/%ju} " in tcp_stats()
849 "{N:/Path MTU discovery black hole detection activation%s}\n"); in tcp_stats()
851 "\t{:pmtud-activated-min-mss/%ju} " in tcp_stats()
852 "{N:/Path MTU discovery black hole detection min MSS activation%s}\n"); in tcp_stats()
853 p(tcps_pmtud_blackhole_failed, "\t{:pmtud-failed/%ju} " in tcp_stats()
854 "{N:/Path MTU discovery black hole detection failure%s}\n"); in tcp_stats()
860 "{N:/time%s connection in TIME-WAIT responded with ACK}\n"); in tcp_stats()
862 "{N:/time%s connection in TIME-WAIT was actively recycled}\n"); in tcp_stats()
864 "{N:/time%s connection in TIME-WAIT responded with RST}\n"); in tcp_stats()
874 xo_emit("{T:/TCP connection count by state}:\n"); in tcp_stats()
888 "{Np:/connection ,connections} in %s state\n", in tcp_stats()
918 xo_emit("{T:/%s}:\n", name); in udp_stats()
925 p(udps_ipackets, "{:received-datagrams/%ju} " in udp_stats()
926 "{N:/datagram%s received}\n"); in udp_stats()
927 p1a(udps_hdrops, "{:dropped-incomplete-headers/%ju} " in udp_stats()
928 "{N:/with incomplete header}\n"); in udp_stats()
929 p1a(udps_badlen, "{:dropped-bad-data-length/%ju} " in udp_stats()
930 "{N:/with bad data length field}\n"); in udp_stats()
931 p1a(udps_badsum, "{:dropped-bad-checksum/%ju} " in udp_stats()
932 "{N:/with bad checksum}\n"); in udp_stats()
933 p1a(udps_nosum, "{:dropped-no-checksum/%ju} " in udp_stats()
934 "{N:/with no checksum}\n"); in udp_stats()
935 p1a(udps_noport, "{:dropped-no-socket/%ju} " in udp_stats()
936 "{N:/dropped due to no socket}\n"); in udp_stats()
937 p(udps_noportbcast, "{:dropped-broadcast-multicast/%ju} " in udp_stats()
938 "{N:/broadcast\\/multicast datagram%s undelivered}\n"); in udp_stats()
939 p1a(udps_fullsock, "{:dropped-full-socket-buffer/%ju} " in udp_stats()
940 "{N:/dropped due to full socket buffers}\n"); in udp_stats()
941 p1a(udpps_pcbhashmiss, "{:not-for-hashed-pcb/%ju} " in udp_stats()
942 "{N:/not for hashed pcb}\n"); in udp_stats()
943 delivered = udpstat.udps_ipackets - in udp_stats()
944 udpstat.udps_hdrops - in udp_stats()
945 udpstat.udps_badlen - in udp_stats()
946 udpstat.udps_badsum - in udp_stats()
947 udpstat.udps_noport - in udp_stats()
948 udpstat.udps_noportbcast - in udp_stats()
951 xo_emit("\t{:delivered-packets/%ju} {N:/delivered}\n", in udp_stats()
953 p(udps_opackets, "{:output-packets/%ju} {N:/datagram%s output}\n"); in udp_stats()
955 p(udps_filtermcast, "{:multicast-source-filter-matches/%ju} " in udp_stats()
956 "{N:/time%s multicast source filter matched}\n"); in udp_stats()
975 xo_emit("{T:/%s}:\n", name); in carp_stats()
982 p(carps_ipackets, "\t{:received-inet-packets/%ju} " in carp_stats()
983 "{N:/packet%s received (IPv4)}\n"); in carp_stats()
984 p(carps_ipackets6, "\t{:received-inet6-packets/%ju} " in carp_stats()
985 "{N:/packet%s received (IPv6)}\n"); in carp_stats()
986 p(carps_badttl, "\t\t{:dropped-wrong-ttl/%ju} " in carp_stats()
987 "{N:/packet%s discarded for wrong TTL}\n"); in carp_stats()
988 p(carps_hdrops, "\t\t{:dropped-short-header/%ju} " in carp_stats()
989 "{N:/packet%s shorter than header}\n"); in carp_stats()
990 p(carps_badsum, "\t\t{:dropped-bad-checksum/%ju} " in carp_stats()
991 "{N:/discarded for bad checksum%s}\n"); in carp_stats()
992 p(carps_badver, "\t\t{:dropped-bad-version/%ju} " in carp_stats()
993 "{N:/discarded packet%s with a bad version}\n"); in carp_stats()
994 p2(carps_badlen, "\t\t{:dropped-short-packet/%ju} " in carp_stats()
995 "{N:/discarded because packet too short}\n"); in carp_stats()
996 p2(carps_badauth, "\t\t{:dropped-bad-authentication/%ju} " in carp_stats()
997 "{N:/discarded for bad authentication}\n"); in carp_stats()
998 p2(carps_badvhid, "\t\t{:dropped-bad-vhid/%ju} " in carp_stats()
999 "{N:/discarded for bad vhid}\n"); in carp_stats()
1000 p2(carps_badaddrs, "\t\t{:dropped-bad-address-list/%ju} " in carp_stats()
1001 "{N:/discarded because of a bad address list}\n"); in carp_stats()
1002 p(carps_opackets, "\t{:sent-inet-packets/%ju} " in carp_stats()
1003 "{N:/packet%s sent (IPv4)}\n"); in carp_stats()
1004 p(carps_opackets6, "\t{:sent-inet6-packets/%ju} " in carp_stats()
1005 "{N:/packet%s sent (IPv6)}\n"); in carp_stats()
1006 p2(carps_onomem, "\t\t{:send-failed-memory-error/%ju} " in carp_stats()
1007 "{N:/send failed due to mbuf memory error}\n"); in carp_stats()
1009 p(carps_ostates, "\t\t{:send-state-updates/%s} " in carp_stats()
1010 "{N:/state update%s sent}\n"); in carp_stats()
1030 xo_emit("{T:/%s}:\n", name); in ip_stats()
1037 p(ips_total, "\t{:received-packets/%ju} " in ip_stats()
1038 "{N:/total packet%s received}\n"); in ip_stats()
1039 p(ips_badsum, "\t{:dropped-bad-checksum/%ju} " in ip_stats()
1040 "{N:/bad header checksum%s}\n"); in ip_stats()
1041 p1a(ips_toosmall, "\t{:dropped-below-minimum-size/%ju} " in ip_stats()
1042 "{N:/with size smaller than minimum}\n"); in ip_stats()
1043 p1a(ips_tooshort, "\t{:dropped-short-packets/%ju} " in ip_stats()
1044 "{N:/with data size < data length}\n"); in ip_stats()
1045 p1a(ips_toolong, "\t{:dropped-too-long/%ju} " in ip_stats()
1046 "{N:/with ip length > max ip packet size}\n"); in ip_stats()
1047 p1a(ips_badhlen, "\t{:dropped-short-header-length/%ju} " in ip_stats()
1048 "{N:/with header length < data size}\n"); in ip_stats()
1049 p1a(ips_badlen, "\t{:dropped-short-data/%ju} " in ip_stats()
1050 "{N:/with data length < header length}\n"); in ip_stats()
1051 p1a(ips_badoptions, "\t{:dropped-bad-options/%ju} " in ip_stats()
1052 "{N:/with bad options}\n"); in ip_stats()
1053 p1a(ips_badvers, "\t{:dropped-bad-version/%ju} " in ip_stats()
1054 "{N:/with incorrect version number}\n"); in ip_stats()
1055 p(ips_fragments, "\t{:received-fragments/%ju} " in ip_stats()
1056 "{N:/fragment%s received}\n"); in ip_stats()
1057 p(ips_fragdropped, "\t{:dropped-fragments/%ju} " in ip_stats()
1058 "{N:/fragment%s dropped (dup or out of space)}\n"); in ip_stats()
1059 p(ips_fragtimeout, "\t{:dropped-fragments-after-timeout/%ju} " in ip_stats()
1060 "{N:/fragment%s dropped after timeout}\n"); in ip_stats()
1061 p(ips_reassembled, "\t{:reassembled-packets/%ju} " in ip_stats()
1062 "{N:/packet%s reassembled ok}\n"); in ip_stats()
1063 p(ips_delivered, "\t{:received-local-packets/%ju} " in ip_stats()
1064 "{N:/packet%s for this host}\n"); in ip_stats()
1065 p(ips_noproto, "\t{:dropped-unknown-protocol/%ju} " in ip_stats()
1066 "{N:/packet%s for unknown\\/unsupported protocol}\n"); in ip_stats()
1067 p(ips_forward, "\t{:forwarded-packets/%ju} " in ip_stats()
1068 "{N:/packet%s forwarded}"); in ip_stats()
1069 p(ips_fastforward, " ({:fast-forwarded-packets/%ju} " in ip_stats()
1070 "{N:/packet%s fast forwarded})"); in ip_stats()
1072 xo_emit("\n"); in ip_stats()
1073 p(ips_cantforward, "\t{:packets-cannot-forward/%ju} " in ip_stats()
1074 "{N:/packet%s not forwardable}\n"); in ip_stats()
1075 p(ips_notmember, "\t{:received-unknown-multicast-group/%ju} " in ip_stats()
1076 "{N:/packet%s received for unknown multicast group}\n"); in ip_stats()
1077 p(ips_redirectsent, "\t{:redirects-sent/%ju} " in ip_stats()
1078 "{N:/redirect%s sent}\n"); in ip_stats()
1079 p(ips_localout, "\t{:sent-packets/%ju} " in ip_stats()
1080 "{N:/packet%s sent from this host}\n"); in ip_stats()
1081 p(ips_rawout, "\t{:send-packets-fabricated-header/%ju} " in ip_stats()
1082 "{N:/packet%s sent with fabricated ip header}\n"); in ip_stats()
1083 p(ips_odropped, "\t{:discard-no-mbufs/%ju} " in ip_stats()
1084 "{N:/output packet%s dropped due to no bufs, etc.}\n"); in ip_stats()
1085 p(ips_noroute, "\t{:discard-no-route/%ju} " in ip_stats()
1086 "{N:/output packet%s discarded due to no route}\n"); in ip_stats()
1087 p(ips_fragmented, "\t{:sent-fragments/%ju} " in ip_stats()
1088 "{N:/output datagram%s fragmented}\n"); in ip_stats()
1089 p(ips_ofragments, "\t{:fragments-created/%ju} " in ip_stats()
1090 "{N:/fragment%s created}\n"); in ip_stats()
1091 p(ips_cantfrag, "\t{:discard-cannot-fragment/%ju} " in ip_stats()
1092 "{N:/datagram%s that can't be fragmented}\n"); in ip_stats()
1093 p(ips_nogif, "\t{:discard-tunnel-no-gif/%ju} " in ip_stats()
1094 "{N:/tunneling packet%s that can't find gif}\n"); in ip_stats()
1095 p(ips_badaddr, "\t{:discard-bad-address/%ju} " in ip_stats()
1096 "{N:/datagram%s with bad address in header}\n"); in ip_stats()
1115 xo_emit("{T:/%s}:\n", name); in arp_stats()
1122 p(txrequests, "{:sent-requests/%ju} {N:/ARP request%s sent}\n"); in arp_stats()
1123 p(txerrors, "{:sent-failures/%ju} {N:/ARP request%s failed to sent}\n"); in arp_stats()
1124 p2(txreplies, "{:sent-replies/%ju} {N:/ARP repl%s sent}\n"); in arp_stats()
1125 p(rxrequests, "{:received-requests/%ju} " in arp_stats()
1126 "{N:/ARP request%s received}\n"); in arp_stats()
1127 p2(rxreplies, "{:received-replies/%ju} " in arp_stats()
1128 "{N:/ARP repl%s received}\n"); in arp_stats()
1129 p(received, "{:received-packets/%ju} " in arp_stats()
1130 "{N:/ARP packet%s received}\n"); in arp_stats()
1131 p(dropped, "{:dropped-no-entry/%ju} " in arp_stats()
1132 "{N:/total packet%s dropped due to no ARP entry}\n"); in arp_stats()
1133 p(timeouts, "{:entries-timeout/%ju} " in arp_stats()
1134 "{N:/ARP entry%s timed out}\n"); in arp_stats()
1135 p(dupips, "{:dropped-duplicate-address/%ju} " in arp_stats()
1136 "{N:/Duplicate IP%s seen}\n"); in arp_stats()
1178 "IPv6 where-are-you",
1179 "IPv6 i-am-here",
1203 xo_emit("{T:/%s}:\n", name); in icmp_stats()
1212 p(icps_error, "\t{:icmp-calls/%lu} " in icmp_stats()
1213 "{N:/call%s to icmp_error}\n"); in icmp_stats()
1214 p(icps_oldicmp, "\t{:errors-not-from-message/%lu} " in icmp_stats()
1215 "{N:/error%s not generated in response to an icmp message}\n"); in icmp_stats()
1220 xo_open_list("output-histogram"); in icmp_stats()
1221 xo_emit("\tOutput histogram:\n"); in icmp_stats()
1224 xo_open_instance("output-histogram"); in icmp_stats()
1226 xo_emit("\t\t{k:name/%s}: {:count/%lu}\n", in icmp_stats()
1230 "{:count/%lu}\n", in icmp_stats()
1232 xo_close_instance("output-histogram"); in icmp_stats()
1236 xo_close_list("output-histogram"); in icmp_stats()
1238 p(icps_badcode, "\t{:dropped-bad-code/%lu} " in icmp_stats()
1239 "{N:/message%s with bad code fields}\n"); in icmp_stats()
1240 p(icps_tooshort, "\t{:dropped-too-short/%lu} " in icmp_stats()
1241 "{N:/message%s less than the minimum length}\n"); in icmp_stats()
1242 p(icps_checksum, "\t{:dropped-bad-checksum/%lu} " in icmp_stats()
1243 "{N:/message%s with bad checksum}\n"); in icmp_stats()
1244 p(icps_badlen, "\t{:dropped-bad-length/%lu} " in icmp_stats()
1245 "{N:/message%s with bad length}\n"); in icmp_stats()
1246 p1a(icps_bmcastecho, "\t{:dropped-multicast-echo/%lu} " in icmp_stats()
1247 "{N:/multicast echo requests ignored}\n"); in icmp_stats()
1248 p1a(icps_bmcasttstamp, "\t{:dropped-multicast-timestamp/%lu} " in icmp_stats()
1249 "{N:/multicast timestamp requests ignored}\n"); in icmp_stats()
1254 xo_open_list("input-histogram"); in icmp_stats()
1255 xo_emit("\tInput histogram:\n"); in icmp_stats()
1258 xo_open_instance("input-histogram"); in icmp_stats()
1260 xo_emit("\t\t{k:name/%s}: {:count/%lu}\n", in icmp_stats()
1265 "\t\tunknown ICMP #{k:name/%d}: {:count/%lu}\n", in icmp_stats()
1267 xo_close_instance("input-histogram"); in icmp_stats()
1271 xo_close_list("input-histogram"); in icmp_stats()
1273 p(icps_reflect, "\t{:sent-packets/%lu} " in icmp_stats()
1274 "{N:/message response%s generated}\n"); in icmp_stats()
1275 p2(icps_badaddr, "\t{:discard-invalid-return-address/%lu} " in icmp_stats()
1276 "{N:/invalid return address%s}\n"); in icmp_stats()
1277 p(icps_noroute, "\t{:discard-no-route/%lu} " in icmp_stats()
1278 "{N:/no return route%s}\n"); in icmp_stats()
1288 "{q:icmp-address-responses/%sabled}\n", i ? "en" : "dis"); in icmp_stats()
1334 xo_emit("{T:/%s}:\n", name); in igmp_stats()
1341 p64(igps_rcv_total, "\t{:received-messages/%ju} " in igmp_stats()
1342 "{N:/message%s received}\n"); in igmp_stats()
1343 p64(igps_rcv_tooshort, "\t{:dropped-too-short/%ju} " in igmp_stats()
1344 "{N:/message%s received with too few bytes}\n"); in igmp_stats()
1345 p64(igps_rcv_badttl, "\t{:dropped-wrong-ttl/%ju} " in igmp_stats()
1346 "{N:/message%s received with wrong TTL}\n"); in igmp_stats()
1347 p64(igps_rcv_badsum, "\t{:dropped-bad-checksum/%ju} " in igmp_stats()
1348 "{N:/message%s received with bad checksum}\n"); in igmp_stats()
1349 py64(igps_rcv_v1v2_queries, "\t{:received-membership-queries/%ju} " in igmp_stats()
1350 "{N:/V1\\/V2 membership quer%s received}\n"); in igmp_stats()
1351 py64(igps_rcv_v3_queries, "\t{:received-v3-membership-queries/%ju} " in igmp_stats()
1352 "{N:/V3 membership quer%s received}\n"); in igmp_stats()
1353 py64(igps_rcv_badqueries, "\t{:dropped-membership-queries/%ju} " in igmp_stats()
1354 "{N:/membership quer%s received with invalid field(s)}\n"); in igmp_stats()
1355 py64(igps_rcv_gen_queries, "\t{:received-general-queries/%ju} " in igmp_stats()
1356 "{N:/general quer%s received}\n"); in igmp_stats()
1357 py64(igps_rcv_group_queries, "\t{:received-group-queries/%ju} " in igmp_stats()
1358 "{N:/group quer%s received}\n"); in igmp_stats()
1359 py64(igps_rcv_gsr_queries, "\t{:received-group-source-queries/%ju} " in igmp_stats()
1360 "{N:/group-source quer%s received}\n"); in igmp_stats()
1361 py64(igps_drop_gsr_queries, "\t{:dropped-group-source-queries/%ju} " in igmp_stats()
1362 "{N:/group-source quer%s dropped}\n"); in igmp_stats()
1363 p64(igps_rcv_reports, "\t{:received-membership-requests/%ju} " in igmp_stats()
1364 "{N:/membership report%s received}\n"); in igmp_stats()
1365 p64(igps_rcv_badreports, "\t{:dropped-membership-reports/%ju} " in igmp_stats()
1366 "{N:/membership report%s received with invalid field(s)}\n"); in igmp_stats()
1368 "{:received-membership-reports-matching/%ju} " in igmp_stats()
1369 "{N:/membership report%s received for groups to which we belong}" in igmp_stats()
1370 "\n"); in igmp_stats()
1371 p64(igps_rcv_nora, "\t{:received-v3-reports-no-router-alert/%ju} " in igmp_stats()
1372 "{N:/V3 report%s received without Router Alert}\n"); in igmp_stats()
1373 p64(igps_snd_reports, "\t{:sent-membership-reports/%ju} " in igmp_stats()
1374 "{N:/membership report%s sent}\n"); in igmp_stats()
1394 xo_emit("{T:/%s}:\n", name); in pim_stats()
1401 p(pims_rcv_total_msgs, "\t{:received-messages/%ju} " in pim_stats()
1402 "{N:/message%s received}\n"); in pim_stats()
1403 p(pims_rcv_total_bytes, "\t{:received-bytes/%ju} " in pim_stats()
1404 "{N:/byte%s received}\n"); in pim_stats()
1405 p(pims_rcv_tooshort, "\t{:dropped-too-short/%ju} " in pim_stats()
1406 "{N:/message%s received with too few bytes}\n"); in pim_stats()
1407 p(pims_rcv_badsum, "\t{:dropped-bad-checksum/%ju} " in pim_stats()
1408 "{N:/message%s received with bad checksum}\n"); in pim_stats()
1409 p(pims_rcv_badversion, "\t{:dropped-bad-version/%ju} " in pim_stats()
1410 "{N:/message%s received with bad version}\n"); in pim_stats()
1411 p(pims_rcv_registers_msgs, "\t{:received-data-register-messages/%ju} " in pim_stats()
1412 "{N:/data register message%s received}\n"); in pim_stats()
1413 p(pims_rcv_registers_bytes, "\t{:received-data-register-bytes/%ju} " in pim_stats()
1414 "{N:/data register byte%s received}\n"); in pim_stats()
1416 "{:received-data-register-wrong-interface/%ju} " in pim_stats()
1417 "{N:/data register message%s received on wrong iif}\n"); in pim_stats()
1418 p(pims_rcv_badregisters, "\t{:received-bad-registers/%ju} " in pim_stats()
1419 "{N:/bad register%s received}\n"); in pim_stats()
1420 p(pims_snd_registers_msgs, "\t{:sent-data-register-messages/%ju} " in pim_stats()
1421 "{N:/data register message%s sent}\n"); in pim_stats()
1422 p(pims_snd_registers_bytes, "\t{:sent-data-register-bytes/%ju} " in pim_stats()
1423 "{N:/data register byte%s sent}\n"); in pim_stats()
1442 xo_emit("{T:/%s}:\n", name); in divert_stats()
1447 p(div_diverted, "\t{:diverted-packets/%ju} " in divert_stats()
1448 "{N:/packet%s successfully diverted to userland}\n"); in divert_stats()
1449 p(div_noport, "\t{:noport-fails/%ju} " in divert_stats()
1450 "{N:/packet%s failed to divert due to no socket bound at port}\n"); in divert_stats()
1451 p(div_outbound, "\t{:outbound-packets/%ju} " in divert_stats()
1452 "{N:/packet%s successfully re-injected as outbound}\n"); in divert_stats()
1453 p(div_inbound, "\t{:inbound-packets/%ju} " in divert_stats()
1454 "{N:/packet%s successfully re-injected as inbound}\n"); in divert_stats()
1485 snprintf(cp, sizeof(line) - alen, in inetprint()
1486 "%.15s ", sp ? sp->s_name : "*"); in inetprint()
1488 snprintf(cp, sizeof(line) - alen, in inetprint()
1493 xo_emit("{d:target/%-*s} ", width, line); in inetprint()
1495 xo_emit("{d:target/%-*.*s} ", width, width, line); in inetprint()
1497 plen = strlen(cp) - 1; in inetprint()
1498 alen--; in inetprint()
1519 if (!numeric_addr && inp->s_addr != INADDR_ANY) { in inetname()
1522 cp = hp->h_name; in inetname()
1526 if (inp->s_addr == INADDR_ANY) in inetname()
1531 inp->s_addr = ntohl(inp->s_addr); in inetname()
1534 C(inp->s_addr >> 24), C(inp->s_addr >> 16), in inetname()
1535 C(inp->s_addr >> 8), C(inp->s_addr)); in inetname()