Date: Tue, 21 Nov 2023 10:51:17 +0100 (CET) From: Ronald Klop <ronald-lists@klop.ws> To: Franco Fichtner <franco@opnsense.org> Cc: freebsd-net@freebsd.org, Kyle Evans <kevans@FreeBSD.org>, Kristof Provost <kp@FreeBSD.org>, Mike Karels <mike@karels.net>, Zhenlei Huang <zlei@FreeBSD.org>, =?UTF-8?Q?Mina_Gali=C4=87?= <freebsd@igalic.co> Subject: Re: How to tell if a network interface was renamed (and from what) Message-ID: <1675481257.73541.1700560277016@localhost> In-Reply-To: <12724698-9B26-4CC2-BDBE-8142675BA4A7@opnsense.org> References: <pdHC0ObBkAbx2HfFIhWYaB5-dmQDEUzNTWvVVJAuJV7FWdWWeSwybVFD-uyBUxPlqDRpAW7D1aAZsbrTxEj9kqsq7ESgO41srPmS-PcXGqw=@igalic.co> <E5F5F61E-3827-404A-A46F-BBCF45A29A82@FreeBSD.org> <9eef5488-e8da-4edd-bc00-baeb5aaf4a23@FreeBSD.org> <ptnVEMJ_x48tdYePN4iYRiEW2vWqwulbEOUJ4dQ1cKGkxNXZPPfdEVHdJKNHFfs2onxNipVZKPwDZZKlDv1peS1Xttim1VitMFsdUiTkAKE=@igalic.co> <032BADD4-0A49-42E2-BAAB-40D2F76C64B9@FreeBSD.org> <rvRLOlpJc9xIf67ZwmZ4Si6TN2VtmIuyuguoQgEk5NTOeqsqkAwB_9KvlMbW6y-npSjCC2lmLVXbD4oIqyKJdDboThcWiehF_hU0L9D6GZc=@igalic.co> <31B38FCE-0B67-4122-A202-568150E971E1@karels.net> <F2536F44-5C61-4AE3-BEDA-705DD660A8F7@FreeBSD.org> <B514CB40-036E-442F-98E9-EFCF74EC8BCE@opnsense.org> <12724698-9B26-4CC2-BDBE-8142675BA4A7@opnsense.org>
next in thread | previous in thread | raw e-mail | index | archive | help
------=_Part_73539_964470319.1700560276913 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Interesting. Is this: /usr/src/tools/tools/ifinfo ? Regards, Ronald. =20 Van: Franco Fichtner <franco@opnsense.org> Datum: maandag, 20 november 2023 22:23 Aan: Kristof Provost <kp@FreeBSD.org> CC: Mike Karels <mike@karels.net>, "Mina Galic" <freebsd@igalic.co>, Zhenle= i Huang <zlei@FreeBSD.org>, Kyle Evans <kevans@FreeBSD.org>, freebsd-net@fr= eebsd.org Onderwerp: Re: How to tell if a network interface was renamed (and from wha= t) >=20 > FWIW, here is the relevant ifinfo output of a sample machine: >=20 > # ifinfo | grep ^Interface > Interface igb0 (igb0): > Interface igb1 (igb1): > Interface igb2 (igb2): > Interface igb3 (igb3): > Interface enc0 (enc0): > Interface lo0 (lo0): > Interface pflog0 (pflog0): > Interface pfsync0 (pfsync0): > Interface lagg0 (lagg0): > Interface igb2_vlan42 (vlan0): > Interface vlan0.1.23 (vlan1): > Interface vlan0.3 (vlan2): > Interface vlan0.5.6.7 (vlan3): > Interface vlan01. (vlan4): > Interface vlan06 (vlan5): > Interface vlan08 (vlan6): > Interface qinq0.123 (vlan7): > Interface gre2 (gre2): > Interface gre0 (gre0): > Interface gif4 (gif4): > Interface gif1 (gif1): > Interface gif0 (gif0): > Interface l2tp0 (ng0): > Interface bridge0 (bridge0): > Interface lo1 (lo1): > Interface lo2 (lo2): > Interface ovpns2 (tap2): > Interface ovpnc1 (tun1): > Interface ovpnc3 (tun3): > Interface ovpns4 (tun4): > Interface wg0 (wg0): > Interface wg1 (wg1): >=20 > > On 20. Nov 2023, at 22:16, Franco Fichtner <franco@opnsense.org> wrote: > > > > > >> On 20. Nov 2023, at 21:56, Kristof Provost <kp@FreeBSD.org> wrote: > >> > >> I=E2=80=99d look in the direction of just adding a field to struct ifn= et with the original interface name (likely easily done in if_attach()), al= ong 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 >=20 > =20 >=20 >=20 >=20 =20 ------=_Part_73539_964470319.1700560276913 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable <html><head></head><body>Interesting.<br> <br> Is this: /usr/src/tools/tools/ifinfo ?<br> <br> Regards,<br> Ronald.<br> <p><strong>Van:</strong> Franco Fichtner <franco@opnsense.org><br> <strong>Datum:</strong> maandag, 20 november 2023 22:23<br> <strong>Aan:</strong> Kristof Provost <kp@FreeBSD.org><br> <strong>CC:</strong> Mike Karels <mike@karels.net>, "Mina Galic" <= freebsd@igalic.co>, Zhenlei Huang <zlei@FreeBSD.org>, Kyle Evans &= lt;kevans@FreeBSD.org>, freebsd-net@freebsd.org<br> <strong>Onderwerp:</strong> Re: How to tell if a network interface was rena= med (and from what)</p> <blockquote style=3D"padding-right: 0px; padding-left: 5px; margin-left: 5p= x; border-left: #000000 2px solid; margin-right: 0px"> <div class=3D"MessageRFC822Viewer" id=3D"P"> <div class=3D"TextPlainViewer" id=3D"P.P">FWIW, here is the relevant ifinfo= output of a sample machine:<br> <br> # ifinfo | grep ^Interface<br> Interface igb0 (igb0):<br> Interface igb1 (igb1):<br> Interface igb2 (igb2):<br> Interface igb3 (igb3):<br> Interface enc0 (enc0):<br> Interface lo0 (lo0):<br> Interface pflog0 (pflog0):<br> Interface pfsync0 (pfsync0):<br> Interface lagg0 (lagg0):<br> Interface igb2_vlan42 (vlan0):<br> Interface vlan0.1.23 (vlan1):<br> Interface vlan0.3 (vlan2):<br> Interface vlan0.5.6.7 (vlan3):<br> Interface vlan01. (vlan4):<br> Interface vlan06 (vlan5):<br> Interface vlan08 (vlan6):<br> Interface qinq0.123 (vlan7):<br> Interface gre2 (gre2):<br> Interface gre0 (gre0):<br> Interface gif4 (gif4):<br> Interface gif1 (gif1):<br> Interface gif0 (gif0):<br> Interface l2tp0 (ng0):<br> Interface bridge0 (bridge0):<br> Interface lo1 (lo1):<br> Interface lo2 (lo2):<br> Interface ovpns2 (tap2):<br> Interface ovpnc1 (tun1):<br> Interface ovpnc3 (tun3):<br> Interface ovpns4 (tun4):<br> Interface wg0 (wg0):<br> Interface wg1 (wg1):<br> <br> > On 20. Nov 2023, at 22:16, Franco Fichtner <franco@opnsense.org>= wrote:<br> ><br> ><br> >> On 20. Nov 2023, at 21:56, Kristof Provost <kp@FreeBSD.org> = wrote:<br> >><br> >> 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.<br> ><br> > ifconfig_get_orig_name() already exists, but apart from wlandebug<br> > nothing is using it.<br> ><br> > The internally used IFDATA_DRIVERNAME also appears in ifinfo<br> > (not installed in base) and bsnmpd but that's it.<br> ><br> > if_dname is the target and it exists in ifnet struct along with<br> > a man page entry in inet(9).<br> ><br> > All that is really missing is a way to print it via ifconfig command.<= br> ><br> ><br> > Cheers,<br> > Franco<br> <br> </div> <hr></div> </blockquote> <br> </body></html> ------=_Part_73539_964470319.1700560276913--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1675481257.73541.1700560277016>