Re: How to tell if a network interface was renamed (and from what)
- Reply: Mina_Galić : "Re: How to tell if a network interface was renamed (and from what)"
- Reply: Kristof Provost : "Re: How to tell if a network interface was renamed (and from what)"
- Reply: Jamie Landeg-Jones : "Re: How to tell if a network interface was renamed (and from what)"
- In reply to: Mina_Galić : "Re: How to tell if a network interface was renamed (and from what)"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 20 Nov 2023 20:29:49 UTC
On 19 Nov 2023, at 15:35, Mina Galić wrote: > Hi Zhenlei, > > >> Since it is just for physical devices, may I propose to have the driver name in their groups ? >> >> So an if_ure interface ue0 will look like: >> >> ``` >> ue0: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1500 >> >> options=60009b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,RXCSUM_IPV6,TXCSUM_IPV6> >> >> ether 00:e0:4c:xx:xx:xx >> media: Ethernet autoselect (1000baseT <full-duplex>) >> >> status: active >> +++ groups: ure >> nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL> >> >> ``` >> >> 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. 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? Mike > 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