/* Should allocate a pbuf and transfer the bytes of the incoming packet from the interface into the pbuf.  */
static struct pbuf* low_level_input(struct netif *netif)
/* Should allocate a pbuf and transfer the bytes of the incoming packet from the interface into the pbuf.  */
static struct pbuf* low_level_input(struct netif *netif)
{
	struct xemac_s *xemac = (struct xemac_s *)(netif->state);
	xemacpsif_s *xemacpsif = (xemacpsif_s *)(xemac->state);
	struct pbuf *p;
	if (pq_qlength(xemacpsif->recv_q) == 0)
		return NULL;
	p = (struct pbuf *)pq_dequeue(xemacpsif->recv_q);
	return p;
}