其中m flag和o flag将存储在Linux中

the*_*heB 7 linux kernel ipv6 netlink proc

我想知道最近收到的路由器广告的m标志和o标志的值.从内核源代码我知道存储了m标志和o标志.

  /*
   * 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);
  .
  .
  .
Run Code Online (Sandbox Code Playgroud)

然后我相信必须能够使用ioctl或proc文件系统或任何其他方法检索这些值.任何人都可以指出这一点.

the*_*heB 3

我终于找到了路。感谢谷歌,感谢雪莉·马。请从我的博客获取代码http://kumaran127.blogspot.jp/2013/05/get-m-and-o-flag-of-most-recently.html