handling arp request and ip packet code