From nobody Mon Nov 20 21:16:28 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 4SZ0gX5npsz51s7R for ; Mon, 20 Nov 2023 21:16:40 +0000 (UTC) (envelope-from franco@opnsense.org) Received: from mail.opnsense.org (mail.opnsense.org [81.171.24.236]) (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 did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4SZ0gX3mPGz3c4w; Mon, 20 Nov 2023 21:16:40 +0000 (UTC) (envelope-from franco@opnsense.org) Authentication-Results: mx1.freebsd.org; none Received: from localhost (mail.opnsense.org [127.0.0.1]) by mail.opnsense.org (Postfix) with ESMTP id 5AC6D15908D; Mon, 20 Nov 2023 22:16:39 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail.opnsense.org Received: from mail.opnsense.org ([127.0.0.1]) by localhost (mail.opnsense.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id K4Wni4v3KnGD; Mon, 20 Nov 2023 22:16:39 +0100 (CET) Content-Type: text/plain; charset=utf-8 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=opnsense.org; s=dkim; t=1700514999; bh=vVn9b+C6ulPnS1ZHjVBhkRe7VvfeJ2ncPc+WslwYVaI=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=KJ8yeyQ9sAg5VB8zsbA/C7Uiill1RMR3DhyCChDTXeSS5M7fG6tr70ja86+O7Pqis Kz/dLyUUa7pEXmxno4/60MBqZ4boUy7kbD5Hp/lS5wyXyqcUbvGb0lgqZt8tnJMUR+ m2+UQWRZOr3thYwhjeWB5qtoFSZpAecYJNOwSarU= 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 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: Re: How to tell if a network interface was renamed (and from what) From: Franco Fichtner In-Reply-To: Date: Mon, 20 Nov 2023 22:16:28 +0100 Cc: Mike Karels , =?utf-8?Q?Mina_Gali=C4=87?= , Zhenlei Huang , Kyle Evans , freebsd-net@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <9eef5488-e8da-4edd-bc00-baeb5aaf4a23@FreeBSD.org> <032BADD4-0A49-42E2-BAAB-40D2F76C64B9@FreeBSD.org> <31B38FCE-0B67-4122-A202-568150E971E1@karels.net> To: Kristof Provost 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:60781, ipnet:81.171.0.0/19, country:NL] X-Rspamd-Queue-Id: 4SZ0gX3mPGz3c4w > On 20. Nov 2023, at 21:56, Kristof Provost wrote: >=20 > I=E2=80=99d look in the direction of just adding a field to struct = ifnet with the original interface name (likely easily done in = if_attach()), along with a new ioctl to retrieve that field. ifconfig_get_orig_name() already exists, but apart from wlandebug nothing is using it. The internally used IFDATA_DRIVERNAME also appears in ifinfo (not installed in base) and bsnmpd but that's it. if_dname is the target and it exists in ifnet struct along with a man page entry in inet(9). All that is really missing is a way to print it via ifconfig command. Cheers, Franco=