/* This function expects an IP packet with a prepended Ethernet header in the uip_buf buffer, and the length of the packet in the global variable uip_len.  */
void uip_arp_ipin(void)
/* This function expects an IP packet with a prepended Ethernet header in the uip_buf buffer, and the length of the packet in the global variable uip_len.  */
void uip_arp_ipin(void)
{
	uip_len -= sizeof( struct uip_eth_hdr );
	if( (IPBUF->srcipaddr[0] & uip_netmask[0]) != (uip_hostaddr[0] & uip_netmask[0]) )
	{
		return;
	}
	if( (IPBUF->srcipaddr[1] & uip_netmask[1]) != (uip_hostaddr[1] & uip_netmask[1]) )
	{
		return;
	}
	uip_arp_update( IPBUF->srcipaddr, &(IPBUF->ethhdr.src) );
	return;
}