From nobody Sun Nov 19 21:35:03 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 4SYP7W4jZmz51NB8 for ; Sun, 19 Nov 2023 21:35:19 +0000 (UTC) (envelope-from freebsd@igalic.co) Received: from mail-4317.proton.ch (mail-4317.proton.ch [185.70.43.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "protonmail.com", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SYP7W2DTcz3Phq for ; Sun, 19 Nov 2023 21:35:19 +0000 (UTC) (envelope-from freebsd@igalic.co) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=igalic.co; s=protonmail2; t=1700429716; x=1700688916; bh=GRsSCp3DrkXi4MayR3zoSCG1gxR4RfFYUfiAQE1tfxI=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=qyf2dbc38e4r3JIf9KEV4AtIl+EItqH2iNrS7sDvONLAhYfWrhclXDKkFRVSf8OiG 4vZMNGnMFq90/3Jz5pHkWG3Cqm8gSgXLRS1qcu/sBsN6n3hT/+90roSMFIdZDRBKUc oRaCpprLNOBi0HRJk7SN4YdjotcHu7H0Ko0HhqnQLeLIhqHKP51dZ4e6Aswl9kzcmC LKkPdqZvXgw7ZRIbMFEVtXEEkQ0mhHuJX2bI4PiVsn6/7ejr56Zbkq9diKzMFBuiuo I5ct79XbUYHyoSZ7fuyVN3uw0ZSXnn7A5q60ctdv2EUo9kDNpHCHzm0Rw3QP72g/Yr Bk36o4hDEg0BA== Date: Sun, 19 Nov 2023 21:35:03 +0000 To: Zhenlei Huang From: =?utf-8?Q?Mina_Gali=C4=87?= Cc: Kyle Evans , freebsd-net@freebsd.org, "mike@karels.net" Subject: Re: How to tell if a network interface was renamed (and from what) Message-ID: In-Reply-To: <032BADD4-0A49-42E2-BAAB-40D2F76C64B9@FreeBSD.org> References: <9eef5488-e8da-4edd-bc00-baeb5aaf4a23@FreeBSD.org> <032BADD4-0A49-42E2-BAAB-40D2F76C64B9@FreeBSD.org> Feedback-ID: 66573723:user:proton 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=utf-8 Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:62371, ipnet:185.70.43.0/24, country:CH] X-Rspamd-Queue-Id: 4SYP7W2DTcz3Phq Hi Zhenlei, > Since it is just for physical devices, may I propose to have the driver n= ame in their groups ? >=20 > So an if_ure interface ue0 will look like: >=20 > ``` > ue0: flags=3D1008843 met= ric 0 mtu 1500 >=20 > options=3D60009b >=20 > ether 00:e0:4c:xx:xx:xx > media: Ethernet autoselect (1000baseT ) >=20 > status: active > +++ groups: ure > nd6 options=3D23 >=20 > ``` >=20 > That does not include the unit number. But could be useful to quickly get= the driver name of physical devices. > Given that currently on FreeBSD the easiest way to tell if something is a physical device is by checking the *absence* of groups, this would only really be acceptable if we add an "egress" group like OpenBSD does, in addition to the driver name. If we can't do that, then I think Mike's solution with having the driver (and unit) as a separate category would be preferable. Unrelatedly, I don't see anything in ure(4) mentioning that if_ure devices will be named "ue". Don't we usually document such deviation from the norm? Kind regards, Mina