Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Sep 2004 12:58:26 -0700
From:      Brooks Davis <brooks@one-eyed-alien.net>
To:        Valentin Nechayev <netch@lucky.net>
Cc:        freebsd-net@freebsd.org
Subject:   Re: original interface name? (5.*)
Message-ID:  <20040910195826.GE28085@odin.ac.hmc.edu>
In-Reply-To: <20040910194642.GC84228@lucky.net>
References:  <20040910191831.GP89036@lucky.net> <200409102130.20287.max@love2party.net> <20040910194642.GC84228@lucky.net>

next in thread | previous in thread | raw e-mail | index | archive | help

--o0ZfoUVt4BxPQnbU
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Sep 10, 2004 at 10:46:42PM +0300, Valentin Nechayev wrote:
>  Fri, Sep 10, 2004 at 21:30:11, max wrote about "Re: original interface n=
ame? (5.*)":=20
>=20
> >> Hi,
> >> is there a stable way to determine original interface name (before
> >> any renaming) in 5.3? I.e. as driver + sequence number?
> > From inside the kernel you can use ifnet.if_dname + ifnet.if_dunit, fro=
m the=20
> > userland I don't know if it's possible to get a look at those fields.
> > In any way, I suggest not to do that. ifnet.if_xname is supposed to be =
*the*=20
> > name of the interface. There is no such thing as "original name".
> Having driver name one can determine essential capabilities of the interf=
ace,
> including VLAN support, possibility and allowed style of media specificat=
ion,
> etc.

The output of ifconfig -m contains this information.

> Device number among with driver name are enough to determine needed
> information based on driver information and boot logs.
> It is pointless to use interface without such information, and it is poin=
tless
> to do manual logging as the only source.

This is a better reason, but if you want the logs to make sense, you
will have to be aware of changes.  Hmm, we may want to log(9) renames.

I'm considering adding an ifconfig -v option that would imply -m and add
more details like index, epoch, dname, dunit, etc.

-- Brooks

--=20
Any statement of the form "X is the one, true Y" is FALSE.
PGP fingerprint 655D 519C 26A7 82E7 2529  9BF0 5D8E 8BE9 F238 1AD4

--o0ZfoUVt4BxPQnbU
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQFBQgdiXY6L6fI4GtQRAhhyAKDZFYJrSCMhnyhpr/I7LiVV8bh1kgCfYzr2
Va6lfwDkoCHry3gEPSrpdrk=
=am40
-----END PGP SIGNATURE-----

--o0ZfoUVt4BxPQnbU--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040910195826.GE28085>