这个函数你是怎么处理的?我怀疑你没有释放内存,时间长了,导致内存溢出了。但是的程序进入pbuf_free(p)后,就死机
void ethernetif_input(struct netif *netif)
{
err_t err;
struct pbuf *p;
p = NULL;
/* move received packet into a new pbuf */
p = low_level_input(netif);
/* no packet could be read, silently ignore this */
if (p == NULL) return;
/* entry point to the LwIP stack */
err = netif->input(p, netif);
if (err != ERR_OK)
{
/* LWIP_DEBUGF(NETIF_DEBUG, ("ethernetif_input: IP input error\n")); */
pbuf_free(p);
p = NULL;
}
ETHrxcount=p->len;
if(ETHrxcount>99)
ETHrxcount=99;
// memcpy(ETHrxbuff,p->payload,ETHrxcount);
pbuf_free(p);
p = NULL;
ETHirqcount++;
}
|