diff --git a/src/include/netif/loopif.h b/src/include/netif/loopif.h index 7d856c9e..3fa8ecb5 100644 --- a/src/include/netif/loopif.h +++ b/src/include/netif/loopif.h @@ -33,6 +33,7 @@ #define __NETIF_LOOPIF_H__ #include "lwip/netif.h" +#include "lwip/err.h" #if !LWIP_LOOPIF_MULTITHREADING void loopif_poll(struct netif *netif); diff --git a/src/netif/loopif.c b/src/netif/loopif.c index 092655f0..01edd147 100644 --- a/src/netif/loopif.c +++ b/src/netif/loopif.c @@ -34,11 +34,14 @@ #if LWIP_HAVE_LOOPIF #include "netif/loopif.h" -#include "lwip/mem.h" +#include "lwip/pbuf.h" + +#include #if !LWIP_LOOPIF_MULTITHREADING #include "lwip/sys.h" +#include "lwip/mem.h" /* helper struct for the linked list of pbufs */ struct loopif_private { @@ -106,6 +109,9 @@ loopif_output(struct netif *netif, struct pbuf *p, } /* Copy the whole pbuf queue p into the single pbuf r */ + /* @todo: - extend this so that r can be a pbuf list also + * - could use pbuf_copy() for that! + */ ptr = r->payload; for(q = p; q != NULL; q = q->next) { memcpy(ptr, q->payload, q->len);