private DVPacket prepareDVPacket(int d) { DVPacket packet = new DVPacket(); foreach (KeyValuePair<int, RT> tmp in routingTable) { if ((tmp.Value.destination != d) && (tmp.Value.nextHop != d)) packet.addRow(tmp.Value.destination, tmp.Value.cost); } return packet; }