From: Alan T. DeKok Date: Sun, 20 Nov 2016 03:35:35 +0000 (-0500) Subject: note TODOs X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6dc2eb90bb5fea0d6ad6e525f3e92cb5c0460ee7;p=thirdparty%2Ffreeradius-server.git note TODOs --- diff --git a/src/util/track.c b/src/util/track.c index 39db692c1c3..b5e403b5375 100644 --- a/src/util/track.c +++ b/src/util/track.c @@ -24,15 +24,22 @@ RCSID("$Id$") #include #include -/* - * RADIUS-specific tracking table. +/** + * RADIUS-specific tracking table. + * + * It's a fixed-size array of 256 entries, indexed by ID. Which + * means we don't need to store ID in the table. We also don't + * need to store the packet type, as we assume that we have a + * unique tracking table per packet type. * - * It's a fixed-size array of 256 entries, indexed by ID. Which - * means we don't need to store ID in the table. We also don't - * need to store the packet type, as we assume that we have a - * unique tracking table per packet type. + * @todo add a "reply" heap / list, ordered by when we need to + * clean up the replies. The heap should contain nothing more than + * the time and the ID of the packet which needs cleaning up. + * + * @todo add an "allocation" heap, ordered by when the entry was + * freed. This is so that new allocations are O(1), and use the + * oldest unused ID. */ - struct fr_tracking_t { int num_entries; //!< number of used entries. diff --git a/src/util/track.h b/src/util/track.h index 9f39a616a9b..1b04d1ab4ba 100644 --- a/src/util/track.h +++ b/src/util/track.h @@ -36,6 +36,9 @@ typedef struct fr_tracking_t fr_tracking_t; /** * An entry for the tracking table. It contains the minimum * information required to track RADIUS packets. + * + * @todo include event information, so that this tracking entry can + * be cleaned up at an appropriate time. */ typedef struct fr_tracking_entry_t { fr_time_t timestamp; //!< when received