Is if_nameindex() supported when combining linux ver5.5 and newlib?
Keita
stone.project.r@gmail.com
Wed Jun 24 08:35:22 GMT 2020
Hi,
Please tell us about the support status of Linux ver5.5.
Is if_nameindex() supported when combining linux ver5.5 and newlib?
Starting with Linux ve5.5, system call _sysctl() is no longer supported.
https://www.phoronix.com/scan.php?page=article&item=linux-55-features&num=1
the newlib library uses _sysctl() to implement if_nameindex().
----------------
newlib\libc\sys\linux\net\ifname.c
struct if_nameindex *
if_nameindex()
---
mib[0] = CTL_NET;
mib[1] = PF_ROUTE;
mib[2] = 0; /* protocol */
mib[3] = 0; /* wildcard address family */
mib[4] = 0;
mib[5] = 0; /* no flags */
if (__sysctl(mib, 6, NULL, &needed, NULL, 0) <0) // <- _sysctl() wrapper function
return NULL;
-------------------
If not support, are there any plans to fix this?
For example, changing to procfs(read "/proc/sys").
Regards,
Keita
More information about the Newlib
mailing list