Where the m flag and o flag will be saved on Linux

I want to know the value of the m flag and the o flag of a recently received router advertisement. From the kernel source code, I learned that the m flag and the o flag are saved.

/* * 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 that it should be possible to get these values ​​using the ioctl or proc file system or any other method. Can anyone point this way.

+7
source share
2 answers

I finally found a way. Thanks to Google, thanks to Shirley Ma. Please enter the code from my blog http://kumaran127.blogspot.jp/2013/05/get-m-and-o-flag-of-most-recently.html

+3
source

I am sure you will not find this in procfs, but you can parse these packages with radvdump: see http://www.tldp.org/HOWTO/Linux+IPv6-HOWTO/hints-daemons-radvd.html and for link to how it is implemented: http://svn.dd-wrt.com/browser/src/router/radvd/radvdump.c?rev=11491 . This is how they create the icmp6 filter on the raw socket http://svn.dd-wrt.com/browser/src/router/radvd/socket.c?rev=11491 , which is then used to listen.

Greetings

+1
source

All Articles