[riot-devel] Network API task force

Kaspar Schleiser kaspar at schleiser.de
Fri May 8 14:22:47 CEST 2015


Hi,

On 05/08/15 14:16, Oleg Hahm wrote:
>>> int ng_netapi_send(kernel_pid_t pid, ng_pktsnip_t *pkt);
>>
>> How do I use this without pktbuf or at least two threads?
> 
> Well, the memory for the packet (at least for the payload) has to be stored
> somewhere - at least until it is copied into the transceiver buffer.

That doesn't answer the question.

A "udp_send" could in one implementation fill a pktbuf and use netapi,
in another implementation just call the underlying send functions and
return only when the payload has been copied into the send buffer, not
malloc'ing extra memory. That should be abstracted from the user, but in
a way that doesn't force a stack to use netapi/pktbuf.

Kaspar


More information about the devel mailing list