[riot-notifications] [RIOT] net: initial import of the ZEP protocol (#2627)

Oleg Hahm notifications at github.com
Tue Jun 30 21:13:58 CEST 2015


> +    if (msg_init_queue(msg_q, NG_ZEP_MSG_QUEUE_SIZE)) {
> +        return NULL;
> +    }
> +
> +    my_reg.pid = thread_getpid();
> +
> +    ng_netreg_register(NG_NETTYPE_UDP, &my_reg);
> +
> +    while (1) {
> +        msg_receive(&msg);
> +
> +        switch (msg.type) {
> +            case NG_NETAPI_MSG_TYPE_RCV:
> +                DEBUG("zep: NG_NETAPI_MSG_TYPE_RCV\n");
> +                ringbuffer_add(&_rx_buf, (char *)(&msg.content.ptr),
> +                               sizeof(ng_pktsnip_t *));

nitpicky: but I think the indentation is off by one.

---
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/2627/files#r33611872
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20150630/c924d4c0/attachment.html>


More information about the notifications mailing list