-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add name_to_index()
& index_to_name()
#972
Conversation
Android support is blocked on rust-lang/libc#3487 |
bcb8739
to
ff23a3d
Compare
Nightly added a new dead code warning. The Dragonfly CI failure seem to stem from this change in libc. According to the docs linked by |
I've now fixed the DragonFly issue in #981. |
Thanks! I removed the dead code commit since you also already handled that. With CI being green, this PR should hopefully be done now. |
Thanks! |
This is released in rustix 0.38.29. |
This adds the
name_to_index()
andindex_to_name()
methods. They are basically wrappers around ioctl calls described here. The relevant code in glibc can be found here forname_to_index()
and here forindex_to_name()
.The tests pass locally but I'm not sure whether
lo
and/sys/class/net/lo/ifindex
are universal enough to consider them acceptable for tests.