On Sun, Jan 24, 2010 at 07:18:46PM -0800, Philip Guenther wrote: > On Sun, Jan 24, 2010 at 6:11 PM, Christiano F. Haesbaert > <haesba...@haesbaert.org> wrote: > > Is there any way to receive interface/link state changes like down and > > up, address change and so on without root privilege ? > > Yes. > > > I looked into ripd (kroute.c) and noticed it uses a raw socket with > > domain AF_ROUTE, so it can receive all the RTM_* messages. > ... > > To my knowledge any raw socket also requires root privilege, therefore > > I can't use AF_ROUTE to receive the changes. > > Your knowledge needs updating, as that isn't true. Raw AF_ROUTE > sockets can be opened without root privilege, though some operations > on them do require root. I suggest you take a look at the 'route' > command's 'monitor' subcommand, which does what you want using a raw > AF_ROUTE socket and without root privilege. > sbin/route/route.c:monitor() >
Thanks, that should do it. -- Christiano Farina HAESBAERT Do NOT send me html mail.