summaryrefslogtreecommitdiff
path: root/lib/filter.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/filter.h')
-rw-r--r--lib/filter.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/filter.h b/lib/filter.h
index 623fb94527..c6dc269276 100644
--- a/lib/filter.h
+++ b/lib/filter.h
@@ -176,6 +176,33 @@ enum yang_prefix_list_action {
YPLA_PERMIT = 1,
};
+struct acl_dup_args {
+ /** Access list type ("ipv4", "ipv6" or "mac"). */
+ const char *ada_type;
+ /** Access list name. */
+ const char *ada_name;
+
+#define ADA_MAX_VALUES 4
+ /** Entry XPath for value. */
+ const char *ada_xpath[ADA_MAX_VALUES];
+ /** Entry value to match. */
+ const char *ada_value[ADA_MAX_VALUES];
+
+ /** Duplicated entry found in list? */
+ bool ada_found;
+
+ /** (Optional) Already existing `dnode`. */
+ const struct lyd_node *ada_entry_dnode;
+};
+
+/**
+ * Check for duplicated entries using the candidate configuration.
+ *
+ * \param vty so we can get the candidate config.
+ * \param ada the arguments to check.
+ */
+bool acl_is_dup(const struct lyd_node *dnode, struct acl_dup_args *ada);
+
/* filter_cli.c */
struct lyd_node;
struct vty;