- kget(isopcb.isop_laddr, laddr);
- isonetprint(&laddr, 1);
- }
- if (istp && tpcb.tp_fsuffixlen) {
- hexprint(tpcb.tp_fsuffixlen, tpcb.tp_fsuffix, "()");
- printf("\t");
- } else if (isopcb.isop_faddr == 0)
- printf("*.*\t");
- else {
- if ((char *)isopcb.isop_faddr == ((char *)kern_addr) +
- _offsetof(struct isopcb, isop_sfaddr))
- faddr.siso = isopcb.isop_sfaddr;
- else
- kget(isopcb.isop_faddr, faddr);
- isonetprint(&faddr, 0);
- }
-}
-
-tp_protopr(off, name)
-off_t off;
-char *name;
-{
- struct tp_ref *tpr, *tpr_base;
- struct tp_refinfo tpkerninfo;
- int size;
-
- kget(off, tpkerninfo);
- size = tpkerninfo.tpr_size * sizeof (*tpr);
- tpr_base = (struct tp_ref *)malloc(size);
- if (tpr_base == 0)
- return;
- kvm_read((off_t)(tpkerninfo.tpr_base), (char *)tpr_base, size);
- for (tpr = tpr_base; tpr < tpr_base + tpkerninfo.tpr_size; tpr++) {
- if (tpr->tpr_pcb == 0)
- continue;
- kget(tpr->tpr_pcb, tpcb);
- if (tpcb.tp_state == ST_ERROR)
- printf("undefined tpcb state: 0x%x\n", tpr->tpr_pcb);
- if (!aflag &&
- (tpcb.tp_state == TP_LISTENING ||
- tpcb.tp_state == TP_CLOSED ||
- tpcb.tp_state == TP_REFWAIT)) {
- continue;