From 145222eef6099c108493304a917439878e755774 Mon Sep 17 00:00:00 2001 From: Eshan Kelkar Date: Tue, 11 Jun 2024 09:38:00 +0530 Subject: [PATCH] match.c: Add function documentation for match_group() Signed-off-by: Eshan Kelkar Reviewed-by: Jakub Jelen Reviewed-by: Sahana Prasad --- src/match.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/match.c b/src/match.c index 75f743e5..9e3ce78f 100644 --- a/src/match.c +++ b/src/match.c @@ -578,6 +578,21 @@ match_cidr_address_list(const char *address, } #endif +/** + * @brief Tries to match an object against a comma separated group of objects + * + * The characters '*' and '?' are NOT considered wildcards and an object in the + * group preceded by a ! does NOT indicate negation. The characters '*', '?' + * and '!' are treated normally like other characters, only ',' (comma) is + * treated specially and is considered as a delimiter that separates objects in + * the group. + * + * @param[in] group Group of objects (comma separated) to match against. + * + * @param[in] object Object to match. + * + * @returns 1 if there is a match, 0 if there is no match at all. + */ int match_group(const char *group, const char *object) { const char *a;