]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
re-arrange structures to help with packing
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 28 Jan 2022 21:09:37 +0000 (15:09 -0600)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 28 Jan 2022 21:09:37 +0000 (15:09 -0600)
src/lib/server/tmpl.h
src/lib/unlang/xlat_priv.h

index 818ad7ead8d7682276306ca1cc6c164fec53e63f..8e98b1d058c281126fc0cded2df031a70395e937 100644 (file)
@@ -285,38 +285,38 @@ struct tmpl_attr_rules_s {
        fr_dict_t const         *dict_def;              //!< Default dictionary to use
                                                        ///< with unqualified attribute references.
 
+       fr_dict_attr_t const    *parent;                //!< Point in dictionary tree to resume parsing
+                                                       ///< from.  If this is provided then dict_def
+                                                       ///< request_def and list_def will be ignored
+                                                       ///< and the presence of any of those qualifiers
+                                                       ///< will be treated as an error.
+
        tmpl_request_ref_t      request_def;            //!< Default request to use with
                                                        ///< unqualified attribute references.
 
        tmpl_pair_list_t        list_def;               //!< Default list to use with unqualified
                                                        ///< attribute reference.
 
-       fr_dict_attr_t const    *parent;                //!< Point in dictionary tree to resume parsing
-                                                       ///< from.  If this is provided then dict_def
-                                                       ///< request_def and list_def will be ignored
-                                                       ///< and the presence of any of those qualifiers
-                                                       ///< will be treated as an error.
+       tmpl_attr_prefix_t      prefix;                 //!< Whether the attribute reference requires
+                                                       ///< a prefix.
 
-       bool                    allow_unknown;          //!< Allow unknown attributes i.e. attributes
+       uint8_t                 allow_unknown:1;        //!< Allow unknown attributes i.e. attributes
                                                        ///< defined by OID string.
 
-       bool                    allow_unresolved;       //!< Allow attributes that look valid but were
+       uint8_t                 allow_unresolved:1;     //!< Allow attributes that look valid but were
                                                        ///< not found in the dictionaries.
                                                        ///< This should be used as part of a multi-pass
                                                        ///< approach to parsing.
 
-       bool                    allow_foreign;          //!< Allow arguments not found in dict_def.
+       uint8_t                 allow_foreign:1;                //!< Allow arguments not found in dict_def.
 
-       bool                    disallow_internal;      //!< Allow/fallback to internal attributes.
+       uint8_t                 disallow_internal:1;    //!< Allow/fallback to internal attributes.
 
-       bool                    disallow_qualifiers;    //!< disallow request / list qualifiers
+       uint8_t                 disallow_qualifiers:1;  //!< disallow request / list qualifiers
 
-       bool                    disallow_filters;       //!< disallow filters.
+       uint8_t                 disallow_filters:1;     //!< disallow filters.
 
-       bool                    list_as_attr;           //!< return #TMPL_TYPE_ATTR for lists, and not #TMPL_TYPE_LIST
-
-       tmpl_attr_prefix_t      prefix;                 //!< Whether the attribute reference requires
-                                                       ///< a prefix.
+       uint8_t                 list_as_attr:1;         //!< return #TMPL_TYPE_ATTR for lists, and not #TMPL_TYPE_LIST
 };
 
 struct tmpl_data_rules_s {
@@ -521,14 +521,13 @@ struct tmpl_s {
                _CONST struct {
                        bool                    ref_prefix;     //!< true if the reference was prefixed
                                                                ///< with a '&'.
+                       bool                    was_oid;        //!< Was originally a numeric OID.
 
                        tmpl_pair_list_t        list;           //!< List to search or insert in.
                                                                ///< deprecated.
 
                        FR_DLIST_HEAD(tmpl_request_list)        rr;     //!< Request to search or insert in.
                        FR_DLIST_HEAD(tmpl_attr_list)           ar;     //!< Head of the attribute reference list.
-
-                       bool                    was_oid;        //!< Was originally a numeric OID.
                } attribute;
 
                /*
index 3fa717e55b552fbea4fe07e08fbf255a7b3719e3..b6ebb36eb7f271a903eda9003e6c5a42a075fa44 100644 (file)
@@ -100,12 +100,12 @@ typedef struct {
                                                        ///< nodes by the time they were created.
 
        xlat_t const            *func;                  //!< The xlat expansion to expand format with.
-       bool                    ephemeral;              //!< Instance data is ephemeral (not inserted)
-                                                       ///< into the instance tree.
        xlat_inst_t             *inst;                  //!< Instance data for the #xlat_t.
        xlat_thread_inst_t      *thread_inst;           //!< Thread specific instance.
                                                        ///< ONLY USED FOR EPHEMERAL XLATS.
 
+       bool                    ephemeral;              //!< Instance data is ephemeral (not inserted)
+                                                       ///< into the instance tree.
        xlat_input_type_t       input_type;             //!< The input type used inferred from the
                                                        ///< bracketing style.
 } xlat_call_t;