summaryrefslogtreecommitdiff
path: root/nest/attrs.h
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2009-04-17 01:48:36 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2009-04-17 01:48:36 +0200
commitc8a6b9a3d199444fd45879dd5cc5ececd9624822 (patch)
tree1ada700f499ec771ea68873c87b51bc71b455a27 /nest/attrs.h
parent024c310b537abc3ddbac3054de71fd759d422824 (diff)
Rewrite of buggy AS path matching.
Old AS path maching supposes thath AS number appears only once in AS path, but that is not true. It also contains some bugs related to AS path sets. New code does not use any assumptions about semantic structure of AS path. It is asymptotically slower than the old code, but on real paths it is not significant. It also allows '?' for matching one arbitrary AS number.
Diffstat (limited to 'nest/attrs.h')
-rw-r--r--nest/attrs.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/nest/attrs.h b/nest/attrs.h
index c12ce81d..5542be6f 100644
--- a/nest/attrs.h
+++ b/nest/attrs.h
@@ -32,15 +32,16 @@ int as_path_get_first(struct adata *path, u32 *orig_as);
int as_path_get_last(struct adata *path, u32 *last_as);
int as_path_is_member(struct adata *path, u32 as);
+#define PM_ASN 0
+#define PM_QUESTION 1
+#define PM_ASTERISK 2
struct f_path_mask {
struct f_path_mask *next;
+ int kind;
u32 val;
- int any;
};
-// #define PM_ANY -1
-
int as_path_match(struct adata *path, struct f_path_mask *mask);
/* a-set.c */