Kernel thread and netlink

Thomas Graf tgraf at suug.ch
Mon Nov 12 06:00:51 EST 2012


On 11/12/12 at 10:22am, Gareth Williams wrote:
> Hello.
> 
> New to list and new to netlink, sorry if this has been answered before.
> 
> Do all kernel netlink sockets have to use a 0 identifier?  What about threaded kernel modules?
> 
> I was hoping that a kernel thread could create a netlink socket and connect to the kernel bridge netlink socket and monitor bridge changes?
> 
> But if they all use the same pid (0) then bridge messages will not be sent to the kernel thread socket as it will have the same pid?

Right. The kernel uses its own internal notification mechanism called
netdevice notifier. See call_netdevice_notifiers() in net/core/dev.c



More information about the libnl mailing list