From owner-freebsd-bugs Sun Mar 18 7:42:20 2001 Delivered-To: freebsd-bugs@freebsd.org Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by hub.freebsd.org (Postfix) with ESMTP id CBA6037B718 for ; Sun, 18 Mar 2001 07:42:11 -0800 (PST) (envelope-from ru@whale.sunbay.crimea.ua) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.11.2/8.11.2) id f2IFfCv70316; Sun, 18 Mar 2001 17:41:12 +0200 (EET) (envelope-from ru) Date: Sun, 18 Mar 2001 17:41:12 +0200 From: Ruslan Ermilov To: Garrett Wollman Cc: Bill Fumerola , freebsd-bugs@FreeBSD.ORG Subject: Re: bin/25584: arp.c - better printed ether address Message-ID: <20010318174112.A70202@sunbay.com> Mail-Followup-To: Garrett Wollman , Bill Fumerola , freebsd-bugs@FreeBSD.ORG References: <200103072200.f27M02o56673@freefall.freebsd.org> <20010307195349.H31752@elvis.mu.org> <20010309114537.A19746@sunbay.com> <200103130152.UAA66526@khavrinen.lcs.mit.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200103130152.UAA66526@khavrinen.lcs.mit.edu>; from wollman@khavrinen.lcs.mit.edu on Mon, Mar 12, 2001 at 08:52:53PM -0500 Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Mon, Mar 12, 2001 at 08:52:53PM -0500, Garrett Wollman wrote: > < said: > > > comparison, how route(8) and netstat(1) output Ethernet addresses. > > (I know that kernel prints Ethernet addresses differently.) > > route(8) does not output Ethernet addresses; it outputs generic > link-layer addresses. A utility which is Ethernet-specific should > output an Ethernet address in the appropriate format (i.e., > aa:bb:cc:dd:ee:ff or aa-bb-cc-dd-ee-ff). > > The output of netstat(8) is inconsistent. `netstat -i' shows: > > Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll > dc0 1500 00:a0:cc:58:41:30 819592 0 642740 0 19 > > The corresponding route is shown by `netstat -r' thus: > > Destination Gateway Flags Refs Use Netif Expire > 18.23.11.98 0:a0:cc:58:41:30 UHLW 0 1184 lo0 > > I don't think either `route' or `netstat' has any business knowing > anything more than ``it's a link-layer address, print it > appropriately''. `arp' on the other hand knows that it's dealing with > Ethernet addresses; I would by mighty pissed if I could not cut and > paste the output of `arp -a' into my router's `show fdb' command. > So you don't mind then if I fix ether_ntoa(3), and fix arp(8), route(8), and netstat(1) to call it to print IFT_ETHER addresses, and link_ntoa() for other possible types? Cheers, -- Ruslan Ermilov Oracle Developer/DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message