]> git.proxmox.com Git - mirror_frr.git/blobdiff - lib/routemap.h
libs: add atomic xxx_and_fetch apis
[mirror_frr.git] / lib / routemap.h
index 0aeba7e1f66d4e5627c9b1bb2641f0e289af002e..a193e325360c675be31041665fd3b47bf68ac572 100644 (file)
@@ -87,8 +87,10 @@ struct route_map_rule_cmd {
        const char *str;
 
        /* Function for value set or match. */
-       route_map_result_t (*func_apply)(void *, struct prefix *,
-                                        route_map_object_t, void *);
+       route_map_result_t (*func_apply)(void *rule,
+                                        const struct prefix *prefix,
+                                        route_map_object_t type,
+                                        void *object);
 
        /* Compile argument and return result as void *. */
        void *(*func_compile)(const char *);
@@ -167,6 +169,12 @@ DECLARE_QOBJ_TYPE(route_map)
 
 /* Prototypes. */
 extern void route_map_init(void);
+
+/*
+ * This should only be called on shutdown
+ * Additionally this function sets the hooks to NULL
+ * before any processing is done.
+ */
 extern void route_map_finish(void);
 
 /* Add match statement to route map. */
@@ -208,7 +216,7 @@ extern struct route_map *route_map_lookup_by_name(const char *name);
 
 /* Apply route map to the object. */
 extern route_map_result_t route_map_apply(struct route_map *map,
-                                         struct prefix *,
+                                         const struct prefix *prefix,
                                          route_map_object_t object_type,
                                          void *object);