mirror of
https://github.com/ep00ch/lwip-contrib-mac.git
synced 2024-06-11 09:29:40 +00:00
Fixed input thread handling: pass all supported packets to netif->input
This commit is contained in:
parent
44273aed6f
commit
3e130e4f7f
|
@ -79,7 +79,8 @@ static char errbuf[PCAP_ERRBUF_SIZE];
|
|||
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
static err_t
|
||||
pcapif_output(struct netif *netif, struct pbuf *p, ip_addr_t *ipaddr)
|
||||
pcapif_output(struct netif *netif, struct pbuf *p,
|
||||
ip_addr_t *ipaddr)
|
||||
{
|
||||
return ERR_OK;
|
||||
}
|
||||
|
@ -106,15 +107,15 @@ timeout(void *arg)
|
|||
|
||||
if (p != NULL) {
|
||||
/* We iterate over the pbuf chain until we have read the entire
|
||||
packet into the pbuf. */
|
||||
packet into the pbuf. */
|
||||
bufptr = (u_char *)pcapif->pkt;
|
||||
for(q = p; q != NULL; q = q->next) {
|
||||
/* Read enough bytes to fill this pbuf in the chain. The
|
||||
available data in the pbuf is given by the q->len
|
||||
variable. */
|
||||
/* read data into(q->payload, q->len); */
|
||||
bcopy(bufptr, q->payload, q->len);
|
||||
bufptr += q->len;
|
||||
/* Read enough bytes to fill this pbuf in the chain. The
|
||||
available data in the pbuf is given by the q->len
|
||||
variable. */
|
||||
/* read data into(q->payload, q->len); */
|
||||
bcopy(bufptr, q->payload, q->len);
|
||||
bufptr += q->len;
|
||||
}
|
||||
|
||||
#if defined(LWIP_DEBUG) && defined(LWIP_TCPDUMP)
|
||||
|
|
Loading…
Reference in New Issue
Block a user