fr_io_nak_t nak; //!< Function to send a NAK.
+ /*
+ * @todo - this should compare two sets of track
+ * information, not packets. We also want a function
+ * that converts a packet to a tracking structure.
+ * Either in a buffer, or in a newly-allocated memory.
+ */
fr_io_data_cmp_t compare; //!< compare two packets
fr_io_connection_set_t connection_set; //!< set src/dst IP/port of a connection
my_track.address = address;
my_track.client = client;
+
+ /*
+ * @todo - convert the packet to a tracking structure,
+ * and look that up instead of the packet.
+ */
memcpy(my_track.packet, packet, sizeof(my_track.packet));
if (client->inst->app_io->track_duplicates) track = rbtree_finddata(client->table, &my_track);
track->address = client->connection->address;
}
+ /*
+ * @todo - copy my_track structure, not the packet.
+ */
memcpy(track->packet, packet, sizeof(track->packet));
track->timestamp = recv_time;
track->packets = 1;
/*
* Is it exactly the same packet?
+ *
+ * @todo - compare the tracking structure, not the packet
*/
if (memcmp(track->packet, my_track.packet, sizeof(my_track.packet)) == 0) {
/*
/*
* The new packet is different from the old one.
+ *
+ * @todo - copy my_track structure, not the packet.
*/
memcpy(track->packet, my_track.packet, sizeof(my_track.packet));
track->timestamp = recv_time;