/*---------------------------------------------------------------------------*/ static void node_packet_timedout(struct runicast_conn *c, const rimeaddr_t *to, uint8_t transmissions) { struct collect_conn *tc = (struct collect_conn *) ((char *)c - offsetof(struct collect_conn, runicast_conn)); PRINTF("%d.%d: timedout after %d retransmissions: packet dropped\n", rimeaddr_node_addr.u8[RIMEADDR_SIZE-2], rimeaddr_node_addr.u8[RIMEADDR_SIZE-1], transmissions); tc->forwarding = 0; neighbor_timedout_etx(neighbor_find(to), transmissions); update_rtmetric(tc); /* Remove the first packet on the queue, the packet that just timed out. */ packetqueue_dequeue(&forwarding_queue); /* Send the next packet in the queue, if any. */ send_queued_packet(); }
/*---------------------------------------------------------------------------*/ static void node_packet_sent(struct runicast_conn *c, const rimeaddr_t *to, uint8_t transmissions) { struct collect_conn *tc = (struct collect_conn *) ((char *)c - offsetof(struct collect_conn, runicast_conn)); PRINTF("%d.%d: sent to %d.%d after %d retransmissions\n", rimeaddr_node_addr.u8[0], rimeaddr_node_addr.u8[1], to->u8[0], to->u8[1], transmissions); tc->forwarding = 0; neighbor_update_etx(neighbor_find(to), transmissions); update_rtmetric(tc); /* Remove the first packet on the queue, the packet that was just sent. */ packetqueue_dequeue(&forwarding_queue); /* Send the next packet in the queue, if any. */ send_queued_packet(); }