Re: How to tell if a network interface was renamed (and from what)
Date: Sun, 19 Nov 2023 19:13:26 UTC
Hi Mike, > The kernel has a driver name for each interface, which looks like it > doesn't change currently in most cases. There is a kernel accessor > function, but I don't think it is exported to user space now. It could > be, though. Would this be sufficient for your purposes? There is also > a unit number, which could also be exported. As mentioned in my initial post, I'm happy to drop to C where alternatives are infeasible, slow, or otherwise cumbersome, or just plain don't exist. Here's the code we use to determine boottime: https://github.com/canonical/cloud-init/blob/5496745b394f9b7b9eaf57fd619330d484ce2da8/cloudinit/util.py#L2073-L2105 > Mike Mina