mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-08-24 07:05:56 +00:00
Changed some includes for loopif and added comments
This commit is contained in:
parent
4bedb07aa0
commit
6006e2f917
|
@ -33,6 +33,7 @@
|
||||||
#define __NETIF_LOOPIF_H__
|
#define __NETIF_LOOPIF_H__
|
||||||
|
|
||||||
#include "lwip/netif.h"
|
#include "lwip/netif.h"
|
||||||
|
#include "lwip/err.h"
|
||||||
|
|
||||||
#if !LWIP_LOOPIF_MULTITHREADING
|
#if !LWIP_LOOPIF_MULTITHREADING
|
||||||
void loopif_poll(struct netif *netif);
|
void loopif_poll(struct netif *netif);
|
||||||
|
|
|
@ -34,11 +34,14 @@
|
||||||
#if LWIP_HAVE_LOOPIF
|
#if LWIP_HAVE_LOOPIF
|
||||||
|
|
||||||
#include "netif/loopif.h"
|
#include "netif/loopif.h"
|
||||||
#include "lwip/mem.h"
|
#include "lwip/pbuf.h"
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
#if !LWIP_LOOPIF_MULTITHREADING
|
#if !LWIP_LOOPIF_MULTITHREADING
|
||||||
|
|
||||||
#include "lwip/sys.h"
|
#include "lwip/sys.h"
|
||||||
|
#include "lwip/mem.h"
|
||||||
|
|
||||||
/* helper struct for the linked list of pbufs */
|
/* helper struct for the linked list of pbufs */
|
||||||
struct loopif_private {
|
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 */
|
/* 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;
|
ptr = r->payload;
|
||||||
for(q = p; q != NULL; q = q->next) {
|
for(q = p; q != NULL; q = q->next) {
|
||||||
memcpy(ptr, q->payload, q->len);
|
memcpy(ptr, q->payload, q->len);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user