c - 如何禁用 DST_METRIC_READ_ONLY 内核 3.0.26

标签 c network-programming linux-kernel ipv6 kernel

在 net/include/dst.h 中,在 struct dst 的 _metric 成员上设置标志 DST_METRICS_READ_ONLY。但我不希望该结构是只读的。如何禁用该标志。

提前致谢

最佳答案

仅当调用函数 *dst_init_metrics()* 且其参数 read_only 设置为 true 时,

*dst->_metrics* 才会设置为 *DST_METRICS_READ_ONLY*。因此,如果您想确保不启用此只读标志,请修补您的内核以在调用 dst_init_metrics 的所有地方使用 false。

关于c - 如何禁用 DST_METRIC_READ_ONLY 内核 3.0.26,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11407753/

相关文章:

C : How to shorten a string at the first letter

c - 解释 C 中的变量声明

c - 这是我可以为进程保留的最大内存吗?

c++ - 如何将文件存储在 char* 中

python - 扭曲的 XmlStream : How to connect to events?

linux - 1GB 页面和透明大页面 (Linux)

java - 在套接字上发送和接收文件

c - 打印 inet_aton() 函数的返回值

linux - Yocto如何生成这些/etc/limits文件

c - 如何开始在 Linux 中编写键盘背光驱动程序?