From owner-freebsd-net Fri Jul 26 22:58:44 2002 Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 98EB337B400 for ; Fri, 26 Jul 2002 22:58:41 -0700 (PDT) Received: from prism.flugsvamp.com (66-191-112-47.mad.wi.charter.com [66.191.112.47]) by mx1.FreeBSD.org (Postfix) with ESMTP id 020A243E31 for ; Fri, 26 Jul 2002 22:58:41 -0700 (PDT) (envelope-from jlemon@flugsvamp.com) Received: (from jlemon@localhost) by prism.flugsvamp.com (8.11.6/8.11.6) id g6R5w1322048; Sat, 27 Jul 2002 00:58:01 -0500 (CDT) (envelope-from jlemon) Date: Sat, 27 Jul 2002 00:58:01 -0500 From: Jonathan Lemon To: Brooks Davis Cc: net@FreeBSD.ORG Subject: Re: switching to if_xname from if_name and if_unit Message-ID: <20020727005801.D6547@prism.flugsvamp.com> References: <20020726211050.A30598@Odin.AC.HMC.Edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre2i In-Reply-To: <20020726211050.A30598@Odin.AC.HMC.Edu> Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Fri, Jul 26, 2002 at 09:10:50PM -0700, Brooks Davis wrote: > [Bcc to -arch for interested people not on -net] > > NetBSD and OpenBSD have replaced the "char *if_name" and "int if_unit" > members of struct ifnet with "char if_xname[IFNAMESIZ]". I propose that > we follow suit. > Note that the unit/name appears to be stored at three places right now: - interface (if_name, if_unit) - device_t (dev->devclass->name, dev->unit, dev->nameunit) - dev_t (dev->si_name) I'd prefer if we could figure out how to do away with the names at the interface level completely and see if it is possible to use the dev->nameunit instead. Perhaps it would be feasible to add a device_t to the ifp? Most uses of the if_name seem to be for error messages, and many newer drivers now use device_printf(dev, ...) for driver messages. -- Jonathan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message