Lines Matching refs:tp
241 struct protox *tp = NULL; /* for printing cblocks & stats */
360 if ((tp = name2protox(optarg)) == NULL) {
528 if (tp) {
530 printproto(tp, tp->pr_name, &first);
540 for (tp = protox; tp->pr_name; tp++)
541 printproto(tp, tp->pr_name, &first);
544 for (tp = ip6protox; tp->pr_name; tp++)
545 printproto(tp, tp->pr_name, &first);
549 for (tp = pfkeyprotox; tp->pr_name; tp++)
550 printproto(tp, tp->pr_name, &first);
554 for (tp = netgraphprotox; tp->pr_name; tp++)
555 printproto(tp, tp->pr_name, &first);
615 printproto(struct protox *tp, const char *name, bool *first)
623 if (tp->pr_istats)
624 intpr(tp->pr_istats, af);
627 tp->pr_name);
630 pr = tp->pr_stats;
634 tp->pr_name);
637 if (tp->pr_usesysctl && live)
639 else if (tp->pr_sindex < 0) {
642 "work on cores", tp->pr_name);
645 off = nl[tp->pr_sindex].n_value;
649 pr = tp->pr_cblocks;
652 xo_message("%s: no PCB routine", tp->pr_name);
655 if (tp->pr_usesysctl && live)
657 else if (tp->pr_index < 0) {
660 "cores", tp->pr_name);
663 off = nl[tp->pr_index].n_value;
665 if (pr != NULL && (off || (live && tp->pr_usesysctl) ||
672 (*pr)(off, name, af, tp->pr_protocol);
826 struct protox **tpp, *tp;
829 for (tp = *tpp; tp->pr_name; tp++)
830 if (strcmp(tp->pr_name, name) == 0)
831 return (tp);
841 struct protox *tp;
849 if ((tp = knownname(name)) != NULL)
850 return (tp);