Re: [RFC net-next 00/15] net: A socket API for LoRa

From
Alan Cox <hidden>
Date
2018-08-13 12:37:33
Also in
linux-arm-kernel, linux-devicetree, linux-spi, lkml
Reply to
Andreas Färber, 2018-08-12
The simple answer is that, inspired by CAN, it uses an ifindex to select
the interface the user asked to use. That then also answers Alan's next
question: This ifindex determines which interface it goes out to.

sockaddr_lora was in patch 02/15, latest code here:
https://git.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-lora.git/tree/include/uapi/linux/lora.h?h=lora-next
And any loopback just becomes an ifindex, likewise any virtual lorawan
device (eg when testing in a cloud or simulating radio properties).
I still think the user will need to explicitly say which interface they
want to bind their socket to. AFAIU the device EUI is more comparable to
It does make it very hard for any vaguely complex environment because if
for example you have two interfaces enumerated via USB they will appear
in random order each boot.

CANbus is a bit of a mess in this sense but it's so statically configured
and embedded into industrial devices it's less of a problem.

I just wonder if the name would be a better binding (so you can sort the
order out), or a local physical identifier of some kind so that your
enumeration is consistent.
Loopback mode would require a separate virtual device driver such as
fakelr or vlora.
And a tunnel device, which is easy enough if you've got tap support or
similar.

Alan
Thread (64 messages) 64 messages, 10 authors, last reply 2019-01-07
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help