ng_net: add new version of NETAPI#2400
Conversation
There was a problem hiding this comment.
can't this one be inline now? With
static inline int ng_netapi_send(kernel_pid_t pid, ng_pktsnip_t *pkt)
{
msg_t msg = { NETAPI_MSG_TYPE_SND, { pkt }};
return msg_send(&msg, pid);
}What do the experts on this, as @Kijewski, say?
There was a problem hiding this comment.
hm, would look nice! But I don't know about the static initializer with a variable in it...
There was a problem hiding this comment.
I meant the whole function. Not the struct initialization.
There was a problem hiding this comment.
it's not restricted to neighboring modules, is it?
There was a problem hiding this comment.
not technically restricted, but it's meant to be used that way...
sys/include/net/ng_netapi.h
Outdated
There was a problem hiding this comment.
[ Application | Socket ] < netapi > [ Transport Layer ] ?
|
addressed documentation flaw pointed out by @LudwigOrtmann |
sys/include/net/ng_netapi.h
Outdated
There was a problem hiding this comment.
Wouldn't it make sense to indicate different transport/network layers here as well?
Also I'm missing the integrated transport layer driver.
There was a problem hiding this comment.
By the way - I'm expecting a merged transport/network layer as well.
There was a problem hiding this comment.
So what you are saying is: This graphic is not complicated enough in your eyes? ;-P
There was a problem hiding this comment.
I'm saying it's misleading.
There was a problem hiding this comment.
It's just one example of how to use it. So one can at least understand easy, what this is good for.
There was a problem hiding this comment.
In that case: why are there several applications and mac layers?
There was a problem hiding this comment.
(Although - for my definition of 'what this is good for', I'd rather illustrate more (as indicated above) then less.
There was a problem hiding this comment.
actually I threw this image out -> it is/will be part of the network stack documentation in the wiki and paper and so on anyway, so in my opinion it's not something that belongs into the code.
|
addressed comments |
|
fixed includes |
|
I guess if there is nothing bad we can see, it would be nice if someone could ack this PR, because many others are depending on this... |
|
|
|
fixed indention |
|
ACK, but I think this PR has dependencies to other PRs?
|
|
jap, but like I said, the four basic elements (pktbuf, netapi, netdev and netreg) pretty much depend on each other in a circular fassion... So I think it makes no sense to try to base them on each other - I would just merge all of them singularily |
as promised the simplified version of
netapi, cut down to a very nice manageable size of ~50 lines of code...