forked from Imagelibrary/lwip
Preparation for task #14369: Define ways to work with a netif having multiple ports
Add if_idx member to struct pbuf
This commit is contained in:
@@ -117,6 +117,7 @@ void eth_rx_irq()
|
|||||||
#include "lwip/memp.h"
|
#include "lwip/memp.h"
|
||||||
#include "lwip/pbuf.h"
|
#include "lwip/pbuf.h"
|
||||||
#include "lwip/sys.h"
|
#include "lwip/sys.h"
|
||||||
|
#include "lwip/netif.h"
|
||||||
#if LWIP_TCP && TCP_QUEUE_OOSEQ
|
#if LWIP_TCP && TCP_QUEUE_OOSEQ
|
||||||
#include "lwip/priv/tcp_priv.h"
|
#include "lwip/priv/tcp_priv.h"
|
||||||
#endif
|
#endif
|
||||||
@@ -290,6 +291,7 @@ pbuf_alloc(pbuf_layer layer, u16_t length, pbuf_type type)
|
|||||||
}
|
}
|
||||||
p->type = type;
|
p->type = type;
|
||||||
p->next = NULL;
|
p->next = NULL;
|
||||||
|
p->if_idx = NETIF_NO_INDEX;
|
||||||
|
|
||||||
/* make the payload pointer point 'offset' bytes into pbuf data memory */
|
/* make the payload pointer point 'offset' bytes into pbuf data memory */
|
||||||
p->payload = LWIP_MEM_ALIGN((void *)((u8_t *)p + (SIZEOF_STRUCT_PBUF + offset)));
|
p->payload = LWIP_MEM_ALIGN((void *)((u8_t *)p + (SIZEOF_STRUCT_PBUF + offset)));
|
||||||
|
|||||||
@@ -170,6 +170,9 @@ struct pbuf {
|
|||||||
* the stack itself, or pbuf->next pointers from a chain.
|
* the stack itself, or pbuf->next pointers from a chain.
|
||||||
*/
|
*/
|
||||||
LWIP_PBUF_REF_T ref;
|
LWIP_PBUF_REF_T ref;
|
||||||
|
|
||||||
|
/** For incoming packets, this contains the input netif's index */
|
||||||
|
u8_t if_idx;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user