]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
tmpl: Move rules struct def higher
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 24 Jul 2020 16:33:36 +0000 (12:33 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 24 Jul 2020 16:33:36 +0000 (12:33 -0400)
src/lib/server/tmpl.h

index a1091f9b1e624fdb4957a5c2c9ae61c0b99c9810..f98ce9bf15acf20362bd4875abab01bb7117cade 100644 (file)
@@ -189,6 +189,46 @@ typedef struct vp_tmpl_rules_s vp_tmpl_rules_t;
 #  define _CONST
 #endif
 
+/** Specify whether attribute references require a prefix
+ *
+ */
+typedef enum {
+       TMPL_ATTR_REF_PREFIX_YES = 0,                   //!< Attribute refs must have '&' prefix.
+       TMPL_ATTR_REF_PREFIX_NO,                                //!< Attribute refs have no '&' prefix.
+       TMPL_ATTR_REF_PREFIX_AUTO                       //!< Attribute refs may have a '&' prefix.
+} tmpl_attr_ref_prefix_t;
+
+/** Optional arguments passed to vp_tmpl functions
+ *
+ */
+struct vp_tmpl_rules_s {
+       fr_dict_t const         *dict_def;              //!< Default dictionary to use
+                                                       ///< with unqualified attribute references.
+
+       request_ref_t           request_def;            //!< Default request to use with
+                                                       ///< unqualified attribute references.
+
+       pair_list_t             list_def;               //!< Default list to use with unqualified
+                                                       ///< attribute reference.
+
+       bool                    allow_unknown;          //!< Allow unknown attributes i.e. attributes
+                                                       ///< defined by OID string.
+
+       bool                    allow_unparsed;         //!< 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.
+
+       bool                    disallow_internal;      //!< Allow/fallback to internal attributes.
+
+       bool                    disallow_qualifiers;    //!< disallow request / list qualifiers
+
+       tmpl_attr_ref_prefix_t  prefix;                 //!< Whether the attribute reference requires
+                                                       ///< a prefix.
+};
+
 typedef enum {
        TMPL_ATTR_TYPE_NORMAL = 0,                      //!< Normal, resolved, attribute ref.
        TMPL_ATTR_TYPE_UNKNOWN,                         //!< We have an attribute number but
@@ -487,47 +527,6 @@ do {\
        }\
 } while (0)
 
-/** Specify whether attribute references require a prefix
- *
- */
-typedef enum {
-       TMPL_ATTR_REF_PREFIX_YES = 0,                   //!< Attribute refs must have '&' prefix.
-       TMPL_ATTR_REF_PREFIX_NO,                                //!< Attribute refs have no '&' prefix.
-       TMPL_ATTR_REF_PREFIX_AUTO                       //!< Attribute refs may have a '&' prefix.
-} vp_attr_ref_prefix_t;
-
-
-/** Optional arguments passed to vp_tmpl functions
- *
- */
-struct vp_tmpl_rules_s {
-       fr_dict_t const         *dict_def;              //!< Default dictionary to use
-                                                       ///< with unqualified attribute references.
-
-       request_ref_t           request_def;            //!< Default request to use with
-                                                       ///< unqualified attribute references.
-
-       pair_list_t             list_def;               //!< Default list to use with unqualified
-                                                       ///< attribute reference.
-
-       bool                    allow_unknown;          //!< Allow unknown attributes i.e. attributes
-                                                       ///< defined by OID string.
-
-       bool                    allow_unparsed; //!< 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.
-
-       bool                    disallow_internal;      //!< Allow/fallback to internal attributes.
-
-       bool                    disallow_qualifiers;    //!< disallow request / list qualifiers
-
-       vp_attr_ref_prefix_t    prefix;                 //!< Whether the attribute reference requires
-                                                       ///< a prefix.
-};
-
 typedef enum {
        ATTR_REF_ERROR_NONE = 0,                        //!< No error.
        ATTR_REF_ERROR_EMPTY,                           //!< Attribute ref contains no data.