summaryrefslogtreecommitdiff
path: root/lib/command_graph.h
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2022-10-04 13:30:04 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2022-10-06 15:34:32 +0200
commit9eebf97e3d3fe8bff0d3c5ecdae39f15bd93f40b (patch)
tree04b57dbd4183fd0f0b415a022e12cb72e29fdf16 /lib/command_graph.h
parent53d8bf6d7a233ccc97e0f466374878f2b8e3f657 (diff)
lib: make cmd_element->attr a bitmask & clarify
It already "looks" like a bitmask, but we currently can't flag a command both YANG and HIDDEN at the same time. It really should be a bitmask. Also clarify DEPRECATED behaviour (or the absence thereof.) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'lib/command_graph.h')
-rw-r--r--lib/command_graph.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/command_graph.h b/lib/command_graph.h
index ed4da6aa4c..57a70a8186 100644
--- a/lib/command_graph.h
+++ b/lib/command_graph.h
@@ -73,10 +73,10 @@ enum cmd_token_type {
#define IS_VARYING_TOKEN(x) ((x) >= VARIABLE_TKN && (x) < FORK_TKN)
/* Command attributes */
-enum { CMD_ATTR_NORMAL,
- CMD_ATTR_DEPRECATED,
- CMD_ATTR_HIDDEN,
- CMD_ATTR_YANG,
+enum {
+ CMD_ATTR_YANG = (1 << 0),
+ CMD_ATTR_HIDDEN = (1 << 1),
+ CMD_ATTR_DEPRECATED = (1 << 2),
};
enum varname_src {