]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
note TODOs
authorAlan T. DeKok <aland@freeradius.org>
Sun, 20 Nov 2016 03:35:35 +0000 (22:35 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Sun, 20 Nov 2016 14:56:21 +0000 (09:56 -0500)
src/util/track.c
src/util/track.h

index 39db692c1c364cd8cf72969dc2a4a4a2d0e1fc11..b5e403b53751db120c82ec660c2dcc9d02624883 100644 (file)
@@ -24,15 +24,22 @@ RCSID("$Id$")
 #include <freeradius-devel/util/track.h>
 #include <freeradius-devel/rad_assert.h>
 
-/*
- *     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.
 
index 9f39a616a9bbdeadead27cbc97ca9b85dabaf982..1b04d1ab4ba9cc729acf6ee2ead0aa9020b6eae5 100644 (file)
@@ -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