summaryrefslogtreecommitdiff
path: root/lib/prefix.h
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2022-04-08 18:17:38 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2022-04-27 14:43:28 +0200
commit3125fa6d42c1c7a5da3530d3c1caf27748b6138a (patch)
treefd791f7040266b363457a03aeb3a2ccd56a9261c /lib/prefix.h
parentebc61d81b364db2c6c63a6716611752f8d43cd1a (diff)
lib: prefix unionization
Ahead of May 1st, the workers of the prefix have decided on more unionization. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'lib/prefix.h')
-rw-r--r--lib/prefix.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/prefix.h b/lib/prefix.h
index b85f3ce312..e043d41d30 100644
--- a/lib/prefix.h
+++ b/lib/prefix.h
@@ -435,8 +435,8 @@ extern void prefix_free(struct prefix **p);
* Function to handle prefix_free being used as a del function.
*/
extern void prefix_free_lists(void *arg);
-extern const char *prefix_family_str(const struct prefix *);
-extern int prefix_blen(const struct prefix *);
+extern const char *prefix_family_str(union prefixconstptr pu);
+extern int prefix_blen(union prefixconstptr pu);
extern int str2prefix(const char *, struct prefix *);
#define PREFIX2STR_BUFFER PREFIX_STRLEN
@@ -447,14 +447,14 @@ extern const char *prefix_sg2str(const struct prefix_sg *sg, char *str);
extern const char *prefix2str(union prefixconstptr, char *, int);
extern int evpn_type5_prefix_match(const struct prefix *evpn_pfx,
const struct prefix *match_pfx);
-extern int prefix_match(const struct prefix *, const struct prefix *);
-extern int prefix_match_network_statement(const struct prefix *,
- const struct prefix *);
-extern int prefix_same(union prefixconstptr, union prefixconstptr);
-extern int prefix_cmp(union prefixconstptr, union prefixconstptr);
-extern int prefix_common_bits(const struct prefix *, const struct prefix *);
-extern void prefix_copy(union prefixptr, union prefixconstptr);
-extern void apply_mask(struct prefix *);
+extern int prefix_match(union prefixconstptr unet, union prefixconstptr upfx);
+extern int prefix_match_network_statement(union prefixconstptr unet,
+ union prefixconstptr upfx);
+extern int prefix_same(union prefixconstptr ua, union prefixconstptr ub);
+extern int prefix_cmp(union prefixconstptr ua, union prefixconstptr ub);
+extern int prefix_common_bits(union prefixconstptr ua, union prefixconstptr ub);
+extern void prefix_copy(union prefixptr udst, union prefixconstptr usrc);
+extern void apply_mask(union prefixptr pu);
#ifdef __clang_analyzer__
/* clang-SA doesn't understand transparent unions, making it think that the