Commit Graph

6 Commits (8c43fdd4433a90370b14d4f91e000b9f36b194a5)

Author SHA1 Message Date
Dario Nieuwenhuis 8c43fdd443 Remove braces that were previously needed to workaround SocketRef borrow issues. 2021-11-03 23:32:32 +01:00
Dario Nieuwenhuis f8cc1eacbe socket: remove SocketRef.
The intent was to run custom code after the user is done modifying the socket,
for example to update a (not yet existing) port->socket map in SocketSet. However
this wouldn't work, since the SocketRef would have to borrow the SocketSet at
the same time as the Socket to be able to notify the SocketSet.

I believe such indexing can be achieved by setting a "dirty" bit *before* giving
the socket to the user, then on poll() reindexing all dirty sockets. This could
even be faster: if user gets a socket multiple times between polls, it'd be reindexed
only once.
2021-11-03 23:32:32 +01:00
Dario Nieuwenhuis c08dd8dcf6 iface: own the SocketSet instead of borrowing it 2021-11-03 23:32:32 +01:00
Thibaut Vandervelden 1154390307 Use one PAN ID for source and destination
Also check for the correct destination PAN id when receiving a frame (as
discussed). Linux does this as well.
However, hardware implementations also can drop those packets.
2021-10-21 01:25:13 +02:00
Dario Nieuwenhuis 3b8a0781e5 example/6lowpan: expand readme, do not use monitor interface.
Using a raw socket on `monitor0` causes weird results: packets we receive
include FCS, packets we send are parsed as if they didn't have FCS, except
by wireshark which always expects a FCS??

Turns out the sane way is to use raw sockets on normal `wpanX` interfaces,
in which case all packets we send/receive are without FCS.
2021-10-21 01:25:13 +02:00
Thibaut Vandervelden fb2d0029d8 Add support for 802.15.4 and 6LoWPAN 2021-10-21 01:25:12 +02:00