summaryrefslogtreecommitdiff
path: root/lib/type.h
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2022-03-31 19:29:17 +0200
committerMaria Matejka <mq@ucw.cz>2022-05-04 15:37:41 +0200
commit0b871c170472202770691af8995766ee57920fdc (patch)
tree08c5045208a5d11838ca2735925ddf1d03d3d2c7 /lib/type.h
parent3fb70b26faca6788aa0bdf1d558414f9f777c6cd (diff)
Moved filter value union to lib
Diffstat (limited to 'lib/type.h')
-rw-r--r--lib/type.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/lib/type.h b/lib/type.h
index d0a887d8..6d19a250 100644
--- a/lib/type.h
+++ b/lib/type.h
@@ -10,6 +10,7 @@
#define _BIRD_TYPE_H_
#include "lib/birdlib.h"
+#include "lib/attrs.h"
union bval {
#define BVAL_ITEMS \
@@ -18,9 +19,25 @@ union bval {
const struct adata *ptr; /* Generic attribute data inherited from eattrs */ \
const struct adata *ad; /* Generic attribute data inherited from filters */ \
- BVAL_ITEMS
+ BVAL_ITEMS;
};
+union bval_long {
+ union bval bval; /* For direct assignments */
+ BVAL_ITEMS; /* For item-wise access */
+
+ u64 ec;
+ lcomm lc;
+ ip_addr ip;
+ const net_addr *net;
+ const char *s;
+ const struct f_tree *t;
+ const struct f_trie *ti;
+ const struct f_path_mask *path_mask;
+ struct f_path_mask_item pmi;
+};
+
+
/* Internal types */
enum btype {
/* Nothing. Simply nothing. */