Subject: Re: Generic netlink interface help

From: Thomas Graf <[email-masked]>
Date: Sat, 26 May 2007 00:18:02 +0200

* Johannes Berg <[email-masked]> 2007-05-24 18:34
> On Thu, 2007-05-24 at 09:43 +0000, Samuel Ortiz wrote:
> 
> > You probably want to use the libnl library. The latest SVN code has
> > support for generic netlink:
> > http://people.suug.ch/~tgr/libnl/
> 
> Huh. I just looked at it and I don't understand anything. What's the
> point with genl_register/genl_unregister and having a table of commands
> etc? Thomas, can you explain how I should use libnl for nl80211 now? I
> mean, I can see what I can do with just sending/receiving messages but
> it feels like I'm missing something with all that other infrastructure
> in libnl.

This area is still work in progress but the basic idea is that
like in kernel context, the application defines its set of
commands and assigns message parsers for each command. For now,
the message parser is linked into the cache operations which
means that you have to "update" a cache in order to use this
feature. This is obviously not optimal so what I might end up
is to allow changing the "valid message" callback to be set to
a parser function which takes the list of operations and does
the demuxing.