View | Details | Raw Unified | Return to bug 221676
Collapse All | Expand All

(-)b/usr.sbin/arp/arp.c (-11 / +11 lines)
Lines 612-618 print_entry(struct sockaddr_dl *sdl, Link Here
612
		if (h_errno == TRY_AGAIN)
612
		if (h_errno == TRY_AGAIN)
613
			nflag = 1;
613
			nflag = 1;
614
	}
614
	}
615
	xo_emit("{:hostname/%s} ({:ip-address/%s}) at ", host,
615
	xo_emit("{q:hostname/%s} ({q:ip-address/%s}) at ", host,
616
	    inet_ntoa(addr->sin_addr));
616
	    inet_ntoa(addr->sin_addr));
617
	if (sdl->sdl_alen) {
617
	if (sdl->sdl_alen) {
618
		if ((sdl->sdl_type == IFT_ETHER ||
618
		if ((sdl->sdl_type == IFT_ETHER ||
Lines 624-630 print_entry(struct sockaddr_dl *sdl, Link Here
624
		else {
624
		else {
625
			int n = sdl->sdl_nlen > 0 ? sdl->sdl_nlen + 1 : 0;
625
			int n = sdl->sdl_nlen > 0 ? sdl->sdl_nlen + 1 : 0;
626
626
627
			xo_emit("{:mac-address/%s}", link_ntoa(sdl) + n);
627
			xo_emit("{q:mac-address/%s}", link_ntoa(sdl) + n);
628
		}
628
		}
629
	} else
629
	} else
630
		xo_emit("{d:/(incomplete)}{en:incomplete/true}");
630
		xo_emit("{d:/(incomplete)}{en:incomplete/true}");
Lines 632-638 print_entry(struct sockaddr_dl *sdl, Link Here
632
	for (p = ifnameindex; p && ifnameindex->if_index &&
632
	for (p = ifnameindex; p && ifnameindex->if_index &&
633
	    ifnameindex->if_name; p++) {
633
	    ifnameindex->if_name; p++) {
634
		if (p->if_index == sdl->sdl_index) {
634
		if (p->if_index == sdl->sdl_index) {
635
			xo_emit(" on {:interface/%s}", p->if_name);
635
			xo_emit(" on {q:interface/%s}", p->if_name);
636
			break;
636
			break;
637
		}
637
		}
638
	}
638
	}
Lines 655-664 print_entry(struct sockaddr_dl *sdl, Link Here
655
655
656
	switch(sdl->sdl_type) {
656
	switch(sdl->sdl_type) {
657
	case IFT_ETHER:
657
	case IFT_ETHER:
658
		xo_emit(" [{:type/ethernet}]");
658
		xo_emit(" [{q:type/ethernet}]");
659
		break;
659
		break;
660
	case IFT_ISO88025:
660
	case IFT_ISO88025:
661
		xo_emit(" [{:type/token-ring}]");
661
		xo_emit(" [{q:type/token-ring}]");
662
		trld = SDL_ISO88025(sdl);
662
		trld = SDL_ISO88025(sdl);
663
		if (trld->trld_rcf != 0) {
663
		if (trld->trld_rcf != 0) {
664
			xo_emit(" rt=%x", ntohs(trld->trld_rcf));
664
			xo_emit(" rt=%x", ntohs(trld->trld_rcf));
Lines 669-690 print_entry(struct sockaddr_dl *sdl, Link Here
669
		}
669
		}
670
                break;
670
                break;
671
	case IFT_FDDI:
671
	case IFT_FDDI:
672
		xo_emit(" [{:type/fddi}]");
672
		xo_emit(" [{q:type/fddi}]");
673
		break;
673
		break;
674
	case IFT_ATM:
674
	case IFT_ATM:
675
		xo_emit(" [{:type/atm}]");
675
		xo_emit(" [{q:type/atm}]");
676
		break;
676
		break;
677
	case IFT_L2VLAN:
677
	case IFT_L2VLAN:
678
		xo_emit(" [{:type/vlan}]");
678
		xo_emit(" [{q:type/vlan}]");
679
		break;
679
		break;
680
	case IFT_IEEE1394:
680
	case IFT_IEEE1394:
681
		xo_emit(" [{:type/firewire}]");
681
		xo_emit(" [{q:type/firewire}]");
682
		break;
682
		break;
683
	case IFT_BRIDGE:
683
	case IFT_BRIDGE:
684
		xo_emit(" [{:type/bridge}]");
684
		xo_emit(" [{q:type/bridge}]");
685
		break;
685
		break;
686
	case IFT_INFINIBAND:
686
	case IFT_INFINIBAND:
687
		xo_emit(" [{:type/infiniband}]");
687
		xo_emit(" [{q:type/infiniband}]");
688
		break;
688
		break;
689
	default:
689
	default:
690
		break;
690
		break;

Return to bug 221676