Implemented handle_arp_packet function