@Override
	public void rout(NetworkPacket networkPacket) throws IOException {
		if (networkPacket.isFlagSet(NetworkPacket.ARP)) {
			if (!networkPacket.getSourceAddress().equals(networkInterface.getLocalHost())) {
				networkInterface.process(networkPacket);
				
				if (networkPacket.getHopcount() > 0) {
					networkPacket.decrementHopcount();
					networkInterface.send(networkPacket);
				}
			} else {
				if (networkPacket.getHopcount() > 0) {
					networkPacket.decrementHopcount();
					networkInterface.send(networkPacket);
				}
			}
			
			return;
		}
		
		if (networkPacket.isFlagSet(NetworkPacket.TRANSPORT)) {
			if (!networkPacket.getDestinationAddresses().contains(networkInterface.getLocalHost())) {
				if (networkPacket.getSourceAddress().equals(networkInterface.getLocalHost())) {
					return;
				}
				
				if (networkPacket.getHopcount() > 0) {
					networkPacket.decrementHopcount();
					networkInterface.send(networkPacket);
				}
			} else {
				if (networkPacket.getHopcount() > 0) {
					networkPacket.decrementHopcount();
					networkInterface.send(networkPacket);
					networkInterface.process(networkPacket);
				}
			}
			
			return;
		}
	}