@Override
		public void receivePacket(Packet p_temp){
			if(p_temp instanceof ARPPacket){
				ARPPacket p=(ARPPacket)p_temp;
				if (p.operation == ARPPacket.ARP_REPLY){

					String srcip = p.getSenderProtocolAddress().toString().split("/")[1];
					if (ip_mac_list.containsKey(srcip)) return;

						if(gatewayip == null){
							if(Arrays.equals(gatewaymac , p.sender_hardaddr)){
								gatewayip = srcip;
								System.out.println("\nGATEWAY IP FOUND: "+gatewayip);
							}
						}
						ip_mac_list.put(srcip,
								p.getSenderHardwareAddress().toString());

						System.out.printf("\nHOST DISCOVERED\t-\t IP %s (MAC: %s)\n" ,
								p.getSenderProtocolAddress().toString().split("/")[1],
								p.getSenderHardwareAddress());
				}
			}
			else if(p_temp instanceof TCPPacket){
				if(!Arrays.equals(((EthernetPacket)p_temp.datalink).dst_mac,device.mac_address))
					gatewaymac = ((EthernetPacket)p_temp.datalink).dst_mac;
			}
		}