sys: net: Initial import of a general interface to a network protocol#1448
sys: net: Initial import of a general interface to a network protocol#1448miri64 merged 1 commit intoRIOT-OS:masterfrom
Conversation
|
@thomaseichinger @rousselk could you maybe look if the dummy MAC layer makes sense somehow. I based it mainly on #925, (edit ->) but tried to generalize the assumptions a bit. |
|
@LudwigOrtmann since HEAD~1 touches nativenet, this PR might interest you, too. |
|
The dummy_mac seems good to me. One thing we have to consider, what if we have 2+ radio devices of the same kind e.g. same radio driver implementation. We'd have to determine somehow which device to use. MAC / radio driver internally we can talk about either passing the device to each function call, what we do in low level drivers right now, or save the device in a variable. I'd plead for version 1, since it is more consistent to our existing model. |
|
The idea for dummy_mac here is very simple: the radio driver is "identified" by it's functions, which the driver developer supplies to dummy_mac via Since radio devices are very heterogenous and boards can have reattachable network devices (:point_right: arduino) I think there is no easy way via some |
|
I agree with you but I don't think we can find a generic way around |
|
Ah yes, now I see your problem. I totally forgot about that :/ |
|
Rebased to current status of #1492. |
|
Rebased and cleaned up PR a bit. |
|
Note: I'm aware that Travis is failing. Will fix that in a few hours ;-) |
fa256fc to
ecd3610
Compare
73d6fa0 to
4a7a728
Compare
|
Rebased due to b799292 and adapted dummy_mac for ISR event handling |
2120d7f to
f66b26d
Compare
sys/net/crosslayer/netapi/netapi.c
Outdated
There was a problem hiding this comment.
Use PRIkernel_pid instead of %d.
|
Be consistent with full-stops in the documentation. |
|
Addressed @OlegHahm's comments and added new functionality to the REG command. |
sys/net/include/netapi.h
Outdated
|
Fixed last comment |
There was a problem hiding this comment.
Isn't this member superfluous if it has to be NETAPI_CMD_RCV anyway?
There was a problem hiding this comment.
No, otherwise you wouldn't be able to identify the incoming netapi_cmd_t as a netapi_rcv_pkt_t.
There was a problem hiding this comment.
Why not doing it with pointers like
typedef struct {
netapi_cmd_type_t type;
void *data;
} netapi_msg_t;?
There was a problem hiding this comment.
Why have another pointer (and 2-4 byte more for every command depending on the platform) deeper down when you can have all the data on the same level?
Other answer: because I use it like this (very successfully, see this file in #1680 e.g.) for months now and it would cost way more time than I'd like to put into it to change it to your approach ;-)
|
Kicked Travis. Apart from the name of |
sys/net/include/netapi.h
Outdated
There was a problem hiding this comment.
@OlegHahm Use-case: Send data as it is intended to be: Payload and Headers seperated, a lower layer is in charge of the reassembly.
ef93fa4 to
8ceb24e
Compare
|
Rebased to master |
|
ACK. From my point of view, ready to be squashed and merged. @haukepetersen, you want to comment on this? |
8ceb24e to
598e73b
Compare
|
Squashed |
|
no, just looked through it again, looks fine to me -> ACK |
|
Very core-like for something that is not used by now :D |
598e73b to
b7a0794
Compare
|
Changed commit author. |
sys: net: Initial import of a general interface to a network protocol
The definitions for the new network stack API