[RFC] Proof-of-concept for netlink listener for mdev -i
Michael Conrad
mconrad at intellitree.com
Mon Mar 16 06:39:46 UTC 2015
On 03/15/2015 12:16 PM, Laurent Bercot wrote:
> On 15/03/2015 15:52, Natanael Copa wrote:
>> I have simplified the long-time living netlink listener more by
>> forwarding the netlink socket and letting the handler read
>> directly from netlink. This factorize out the pipe and remove the need
>> of any micro protocol.
>
> As I wrote in another message, there is basically no benefit in doing
> that, because it forces the handler to be netlink-aware.
>
But then it would still need to be micro-protocol-aware. The netlink
protocol is nearly identical to the micro-protocol you proposed earlier;
maybe being netlink-aware isn't so bad?
The main difference is whether it uses recv() expecting a datagram or
read() and has to parse some message framing. I'd bet the first
requires less code. And, it doesn't have to be a netlink socket; the
messages could be relayed through any datagram socket.
-Mike
More information about the busybox
mailing list