Changed some includes for loopif and added comments

This commit is contained in:
goldsimon 2007-04-24 08:42:32 +00:00
parent 4bedb07aa0
commit 6006e2f917
2 changed files with 8 additions and 1 deletions

View File

@ -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);

View File

@ -34,11 +34,14 @@
#if LWIP_HAVE_LOOPIF
#include "netif/loopif.h"
#include "lwip/mem.h"
#include "lwip/pbuf.h"
#include <string.h>
#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);