问题描述
我想知道最近收到的路由器广告的m标志和o标志的值.从内核源代码中,我知道存储了m标志和o标志.
I want to know the value of m flag and o flag of recently received Router Advertisement. From the kernel source code I came to know that m flag and o flag are stored.
/*
* Remember the managed/otherconf flags from most recently
* received RA message (RFC 2462) -- yoshfuji
*/
in6_dev->if_flags = (in6_dev->if_flags & ~(IF_RA_MANAGED |
IF_RA_OTHERCONF)) |
(ra_msg->icmph.icmp6_addrconf_managed ?
IF_RA_MANAGED : 0) |
(ra_msg->icmph.icmp6_addrconf_other ?
IF_RA_OTHERCONF : 0);
.
.
.
然后,我相信必须可以使用ioctl或proc文件系统或任何其他方法来检索这些值.任何人都可以指出这一点.
Then I believe it must be possible to retrieve those values using ioctl or proc filesystem or any other method. Could anyone please point that way.
推荐答案
最后我找到了方法.感谢Google,也感谢Shirley Ma.请从我的博客中获取代码 http://kumaran127.blogspot.jp/2013/05/get-m-and-o-flag-of-most-recently.html
At last I found the way. Thanks to Google, Thanks to Shirley Ma. Please get the code from my blog http://kumaran127.blogspot.jp/2013/05/get-m-and-o-flag-of-most-recently.html
这篇关于其中m标志和o标志将存储在Linux中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!