Re: [B.A.T.M.A.N.] [RFC v2 0/5] batman-adv netlink query API

Sven Eckelmann
2016-04-18T11:10:23Z

[-- Attachment #1: Type: text/plain, Size: 1352 bytes --]

On Saturday 19 March 2016 10:19:39 Sven Eckelmann wrote:
> > > > > What about the "socket" file?
[...]
> How can this be implemented 100% in userspace? Lets ignore the
> reply/forwarding part for a second and just concentrate on the initiator of
> the ping/traceroute. It can use AF_PACKET in userspace to send batadv packets
> directly on the hardif. But here comes the first problem... which is the
> correct hardif? There can be multiple and the userspace does not really know
> which one is the one the kernel would use at a particular time. So you have to
> implement the same algorithms in userspace the emulate the kernel part (or you
> may do something completely different). And still then you would have problems
> when the kernel is tweaked and the userspace didn't receive this tweak.
>
> Maybe it is necessary to ask the kernel before sending the ping by asking him
> "hey, what interface would use use right now and what other parameters are now
> required". Similar to what "ip route get 8.8.8.8" would do.
>
> Or am I just overcomplicated things now?

It can also be postponed to later. No need to have this in netns from the
start.

But RTM_GETROUTE-like NLM_F_REQUEST requests sound feasible for a userspace
based ICMP-like request initiation. But most likely with generic messages
instead of structs.

Kind regards,
Sven

[-- Attachment #2: This is a digitally signed message part. --]