// Send assignAddress packet
Layer3Packet.AssignAddress packet = new Layer3Packet.AssignAddress(
unassigned.getChildNonce(),
(short)unassigned.getAddress(), (short)unassigned.getMaxRoute(),
tree.baseNonce, networkKey);
RootNode rootNode;
if(unassigned instanceof RootNode){
rootNode = (RootNode) unassigned;
} else {
rootNode = tree.getRouteToNode(unassigned.getAddress());
}
rootNode.getNetInterface().sendLayer3Packet(packet.getRawBytes().array(), rootNode.getMacAddress());
}
return isSomebodyUnassigned;
}