From nobody Wed Nov 22 01:35:08 2023 X-Original-To: freebsd-net@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SZkMS368Zz51V1y for ; Wed, 22 Nov 2023 01:35:16 +0000 (UTC) (envelope-from jamie@catflap.org) Received: from donotpassgo.dyslexicfish.net (donotpassgo.dyslexicfish.net [IPv6:2001:19f0:7400:8808:123::1]) by mx1.freebsd.org (Postfix) with ESMTP id 4SZkMQ6jHrz3Dlt; Wed, 22 Nov 2023 01:35:14 +0000 (UTC) (envelope-from jamie@catflap.org) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of jamie@catflap.org designates 2001:19f0:7400:8808:123::1 as permitted sender) smtp.mailfrom=jamie@catflap.org; dmarc=pass (policy=none) header.from=catflap.org X-Catflap-Envelope-From: X-Catflap-Envelope-To: freebsd-net@FreeBSD.org Received: from donotpassgo.dyslexicfish.net (donotpassgo.dyslexicfish.net [209.250.224.51]) by donotpassgo.dyslexicfish.net (8.14.5/8.14.5) with ESMTP id 3AM1Z8Xv054660; Wed, 22 Nov 2023 01:35:08 GMT (envelope-from jamie@donotpassgo.dyslexicfish.net) Received: (from jamie@localhost) by donotpassgo.dyslexicfish.net (8.14.5/8.14.5/Submit) id 3AM1Z8ED054659; Wed, 22 Nov 2023 01:35:08 GMT (envelope-from jamie) From: Jamie Landeg-Jones Message-Id: <202311220135.3AM1Z8ED054659@donotpassgo.dyslexicfish.net> Date: Wed, 22 Nov 2023 01:35:08 +0000 Organization: Dyslexic Fish To: mike@karels.net, freebsd@igalic.co Cc: zlei@FreeBSD.org, kevans@FreeBSD.org, freebsd-net@FreeBSD.org Subject: Re: How to tell if a network interface was renamed (and from what) References: <9eef5488-e8da-4edd-bc00-baeb5aaf4a23@FreeBSD.org> <032BADD4-0A49-42E2-BAAB-40D2F76C64B9@FreeBSD.org> <31B38FCE-0B67-4122-A202-568150E971E1@karels.net> In-Reply-To: <31B38FCE-0B67-4122-A202-568150E971E1@karels.net> User-Agent: Heirloom mailx 12.4 7/29/08 List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.7 (donotpassgo.dyslexicfish.net [209.250.224.51]); Wed, 22 Nov 2023 01:35:08 +0000 (GMT) X-Spamd-Result: default: False [-3.70 / 15.00]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[catflap.org,none]; R_SPF_ALLOW(-0.20)[+mx:dyslexicfish.net]; MIME_GOOD(-0.10)[text/plain]; RCVD_NO_TLS_LAST(0.10)[]; MLMMJ_DEST(0.00)[freebsd-net@FreeBSD.org]; R_DKIM_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; HAS_ORG_HEADER(0.00)[]; ASN(0.00)[asn:20473, ipnet:2001:19f0:7400::/38, country:US]; FREEFALL_USER(0.00)[jamie]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_FIVE(0.00)[5]; TO_DN_NONE(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Queue-Id: 4SZkMQ6jHrz3Dlt X-Spamd-Bar: --- Mike Karels wrote: > I have a proof of concept that makes the presumed original name > (driver name + unit number) available to ifconfig, which prints > the string with everything else in the standard output format. > I don't think that is the right solution, but the other details > should be easy. I'm tempted to print the driver name and unit > number separately, although possibly as two words using the same > option. It should probably be an option rather than a keyword, > so something like this: > > # ifconfig -N interface-name > igb 1 > # > > Or the unit number could be on a separate option. > > Comments? I prefer that idea to the use of "groups" (which can be modified anyway), though in your example, that should be documented as "driver name" not "interface name", seeing that the returned value is not actually now the interface name! (Similary, if a keyword is decided upon, it should be "driver-name" not "interface-name") I realise that writing "interface-name" was probably just muscle-memory, but just wanted clarification. No opinion on where to display the unit number - whatever works out better for you. Cheers, Jamie