比如访问
proc/sys/net/ipv4/conf下内容
正常做法是open,read,close
但是proc下这种文件很多,如果需要高效访问,有什么其他技巧吗
我目前想用ioctl,但是不知道proc下这些内容,储存在内核的什么地方
还是使用sysctl? man了下好像已经废弃了
Use of this system call was long discouraged: since Linux 2.6.24, uses of this system call result in warnings in the kernel log, and in Linux 5.5, the system
call was finally removed. Use the /proc/sys interface instead.
Note that on older kernels where this system call still exists, it is available only if the kernel was configured with the CONFIG_SYSCTL_SYSCALL option. Fur?
thermore, glibc does not provide a wrapper for this system call, necessitating the use of syscall(2).
--
修改:b0207191 FROM 59.61.184.*
FROM 112.111.1.*