[RFC] Proof-of-concept for netlink listener for mdev -i

Isaac Dunham ibid.ag at gmail.com
Fri Mar 20 04:58:55 UTC 2015


> On Mon, Mar 16, 2015 at 05:18:27PM +0100, Natanael Copa wrote:
> > Ininitial mdev -i patch for busybox which reads messages from stream
> > (so it should work with your fif manager):
> > 
> > http://sprunge.us/ZjLK
> > (also attached)
> > 
> > A few notes:
> > - Its completely untested but it compiles
> > - it needs the previously mentioned micro protocol ('\0' as message
> >   separator)
> > - my current nldev hack implementation (netlink socket activator) needs
> >   the helper application to read the messages from netlink socket and
> >   forward to mdev -i as the previous implementation did.
> > - needs be busyboxified.
> > 
> > Would be nice if someone with more busybox experience than me could
> > help clean it up.

Well, I've poked at this a little this evening.

See
https://github.com/idunham/busybox
(in branch mdev) if you're curious about details.

Overview:
I applied the two patches and did a little cleanup.
At least in theory, I've made it read Laurent's proposed protocol
(in which the netlink helper writes a series of NULL-terminated
VAR=VALUE pairs, followed by a NUL byte).

I've not tested it yet and it's getting latish here, so there are
almost certainly bugs.

I have not yet made this optional; it should be possible to disable
mdev -i completely before it gets merged. 

Thanks,
Isaac Dunham



More information about the busybox mailing list