Hi, I have a thing I want to do and I'm not sure what's the best way to do it, hopefully somebody could suggest a solution.
The idea is to create a 'tap' interfaces with a custom name, e.g. foobarN instead of tapN, from an application. So the current workflow looks this way: - a request comes to create new 'foobar' interface - 'tap' device is created via SIOCIFCREATE2 - code finds the first free interface name, that it could use by going from foobar0, foobar1 etc until it finds an unused name - code renames 'tap' device to the new 'foobarN' via SIOCSIFNAME As you can see, this code is not optimal and very fragile. It spends a lot of time trying to find an appropriate interface name and it will break if something happens while it's running (tap device will be deleted by user before it gets renamed, new foobarN will be created manually before the code will create it, etc). Is there any better to implement this? Roman Bogorodskiy
pgpEJ1vRhy8hI.pgp
Description: PGP signature