| Summary: | arp.c - better printed ether address | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | davidx <davidx> | ||||
| Component: | bin | Assignee: | freebsd-bugs (Nobody) <bugs> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Only Me | ||||||
| Priority: | Normal | ||||||
| Version: | Unspecified | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
|
Description
davidx
2001-03-07 08:30:03 UTC
Everything is OK, but why do you think it is better? :-) 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 On Wed, 7 Mar 2001 davidx@viasoft.com.cn wrote: > > >Number: 25584 > >Category: bin > >Synopsis: arp.c - better printed ether address > >Confidential: no > >Severity: non-critical > >Priority: low > >Responsible: freebsd-bugs > >State: open > >Quarter: > >Keywords: > >Date-Required: > >Class: sw-bug > >Submitter-Id: current-users > >Arrival-Date: Wed Mar 07 00:30:03 PST 2001 > >Closed-Date: > >Last-Modified: > >Originator: David Xu > >Release: FreeBSD 4.3-BETA > >Organization: > Viasoft > >Environment: > FreeBSD davidbsd.viasoft.com.cn 4.3-BETA FreeBSD 4.3-BETA #0: Wed Mar 7 15:30:1 > 1 CST 2001 xyf@davidbsd.viasoft.com.cn:/usr/obj/usr/src/sys/xu i386 > >Description: > the ether address printed by /usr/sbin/arp is not so fine, > some bytes is printed in two bytes while others not. > > > >How-To-Repeat: > stock version prints: > davidbsd# arp -n -a > ? (192.168.1.98) at 0:e0:4c:6b:a6:9 [ethernet] > ? (192.168.1.109) at 0:e0:4c:3f:49:eb [ethernet] > ? (192.168.1.254) at 0:b0:c2:89:a4:6e [ethernet] > ? (192.168.1.255) at ff:ff:ff:ff:ff:ff permanent [ethernet] > > better vesion prints > davidbsd# arp -n -a > ? (192.168.1.98) at 00:e0:4c:6b:a6:09 [ethernet] > ? (192.168.1.109) at 00:e0:4c:3f:49:eb [ethernet] > ? (192.168.1.254) at 00:b0:c2:89:a4:6e [ethernet] > ? (192.168.1.255) at ff:ff:ff:ff:ff:ff permanent [ethernet] This will probably turn into a bikeshed argument, but.... I would have to heartily agree with you that this is the correct way to do things. While it _might_ break something that parses arp(8) output, always using two digits is how I have seen it done everywhere else. You should be able to remove all of the colons and always have a correct MAC address (12 digits), which is not the case currently. -- Chris Dillon - cdillon@wolves.k12.mo.us - cdillon@inter-linc.net FreeBSD: The fastest and most stable server OS on the planet. For IA32 and Alpha architectures. IA64, PPC, and ARM under development. http://www.freebsd.org <<On Wed, 7 Mar 2001 00:25:46 -0800 (PST), davidx@viasoft.com.cn said: > - printf("%x:%x:%x:%x:%x:%x", cp[0], cp[1], cp[2], cp[3], cp[4], cp[5]); > + printf("%02x:%02x:%02x:%02x:%02x:%02x", cp[0], cp[1], cp[2], cp[3], cp[4], cp[5]); FWIW, I like this change. -GAWollman State Changed From-To: open->suspended committed, pr remains suspended to serve as a reminder to merge this to -stable after the thaw. State Changed From-To: suspended->closed billf said he didn't mind if someone else MFC'ed it, so I did. |