def cb(tries):
                # Ack timeout/retransmit callback
                send_data = data

                # Decrease the hop count by the number of seconds the packet
                # has been buffered.
                buffered_time = int(seconds() - create_time)
                if buffered_time > 0:
                    hops = ord(data[8]) - buffered_time
                    if hops >= 0:
                        # Splice in the reduced hop count.
                        send_data = "%s%c%s" % (data[:8], hops, data[9:])
                    else:
                        # Drop packet.
                        tries = 0

                # Make an attempt now
                if tries > 0:
                    addr = Ad().setRawIPPort(nb_ipp).getAddrTuple()
                    ph.sendPacket(send_data, addr, broadcast=True)

                # Reschedule another attempt
                if tries-1 > 0:
                    when = random.uniform(1.0, 2.0)
                    self.sending[nb_ipp] = reactor.callLater(when, cb, tries-1)
                else:
                    del self.sending[nb_ipp]
                    self.cleanupIfDoneSending()