Search code examples
linuxkernelipv6procnetlink

Where m flag and o flag will be stored in Linux


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);
  .
  .
  .

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.


Solution

  • 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