]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
lean up structure and remove unused fields
authorAlan T. DeKok <aland@freeradius.org>
Fri, 8 Mar 2024 19:15:10 +0000 (14:15 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Sat, 9 Mar 2024 15:06:50 +0000 (10:06 -0500)
re-organize it for future needs and deletions

src/lib/util/packet.h

index 072759f79443eb812d98c2797b66874cb48e5097..99b4344a827e345c7660130ceaf5c83398c0f6bd 100644 (file)
@@ -54,22 +54,25 @@ extern "C" {
  *     data,data_len:  Used between fr_radius_recv and fr_radius_decode.
  */
 typedef struct {
-       fr_rb_node_t            node;                   //!< Allows insertion into the list.c
-                                                       ///< rbtree, may be removed in future.
-
        fr_socket_t             socket;                 //!< This packet was received on.
+       fr_time_t               timestamp;              //!< When we received the packet.
 
        int                     id;                     //!< Packet ID (used to link requests/responses).
        unsigned int            code;                   //!< Packet code (type).
 
-       uint8_t                 vector[RADIUS_AUTH_VECTOR_LENGTH];//!< RADIUS authentication vector.
-
-       uint32_t                count;                  //!< Number of times we've seen this packet
-       fr_time_t               timestamp;              //!< When we received the packet.
        uint8_t                 *data;                  //!< Packet data (body).
        size_t                  data_len;               //!< Length of packet data.
 
-       uint32_t                rounds;                 //!< for State[0]
+       /*
+        *      The vector should go away soon
+        */
+       uint8_t                 vector[RADIUS_AUTH_VECTOR_LENGTH];//!< RADIUS authentication vector.
+
+       /*
+        *      The following fields are deprecated, and only used by old code.
+        */
+       fr_rb_node_t            node;                   //!< Allows insertion into the list.c
+                                                       ///< rbtree, may be removed in future.
 
        size_t                  partial;