diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2022-03-04 02:01:34 +0100 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2022-06-27 21:13:31 +0200 |
commit | 8f3c6151b4ff11d98a20f6f9919723f0fb719161 (patch) | |
tree | 215ecd33d34beaeb685d982ac0de13181c39a3ef /nest/attrs.h | |
parent | 9b302c133f02f96edc5caa769dfd21dc9ef038b5 (diff) |
Nest: Cleanups in as_path_filter()
Use struct f_val as a common argument for as_path_filter(), as suggested
by Alexander Zubkov. That allows to use NULL sets as valid arguments.
Diffstat (limited to 'nest/attrs.h')
-rw-r--r-- | nest/attrs.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/nest/attrs.h b/nest/attrs.h index ef2b95e6..22e2ff4a 100644 --- a/nest/attrs.h +++ b/nest/attrs.h @@ -28,6 +28,7 @@ * to 16bit slot (like in 16bit AS_PATH). See RFC 4893 for details */ +struct f_val; struct f_tree; int as_path_valid(byte *data, uint len, int bs, int sets, int confed, char *err, uint elen); @@ -49,7 +50,7 @@ int as_path_get_last(const struct adata *path, u32 *last_as); u32 as_path_get_last_nonaggregated(const struct adata *path); int as_path_contains(const struct adata *path, u32 as, int min); int as_path_match_set(const struct adata *path, const struct f_tree *set); -const struct adata *as_path_filter(struct linpool *pool, const struct adata *path, const struct f_tree *set, u32 key, int pos); +const struct adata *as_path_filter(struct linpool *pool, const struct adata *path, const struct f_val *set, int pos); static inline struct adata *as_path_prepend(struct linpool *pool, const struct adata *path, u32 as) { return as_path_prepend2(pool, path, AS_PATH_SEQUENCE, as); } |