summaryrefslogtreecommitdiff
path: root/lib/command_graph.h
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@diac24.net>2017-08-15 11:09:15 +0200
committerGitHub <noreply@github.com>2017-08-15 11:09:15 +0200
commit24fb3b187384563e59f2bfec60d8f9354d48ef53 (patch)
treebb64ffd2625cccafb9eb3b5fbf4d4586db505a61 /lib/command_graph.h
parent7e4f56d349f75ab07e70bf4edcd28085eb4cfcc6 (diff)
parent473196f613514b5bfb10ec8396b310911869e05b (diff)
Merge pull request #934 from qlyoung/mac-parser
lib: add CLI token for 48-bit mac addresses
Diffstat (limited to 'lib/command_graph.h')
-rw-r--r--lib/command_graph.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/command_graph.h b/lib/command_graph.h
index 879148844c..ec68e284ed 100644
--- a/lib/command_graph.h
+++ b/lib/command_graph.h
@@ -42,14 +42,17 @@ struct vty;
* The type determines what kind of data the token can match (in the
* matching use case) or hold (in the argv use case).
*/
+/* clang-format off */
enum cmd_token_type {
- WORD_TKN, // words
+ WORD_TKN, // words
VARIABLE_TKN, // almost anything
RANGE_TKN, // integer range
- IPV4_TKN, // IPV4 addresses
+ IPV4_TKN, // IPV4 addresses
IPV4_PREFIX_TKN, // IPV4 network prefixes
- IPV6_TKN, // IPV6 prefixes
+ IPV6_TKN, // IPV6 prefixes
IPV6_PREFIX_TKN, // IPV6 network prefixes
+ MAC_TKN, // Ethernet address
+ MAC_PREFIX_TKN, // Ethernet address w/ CIDR mask
/* plumbing types */
FORK_TKN, // marks subgraph beginning
@@ -59,6 +62,7 @@ enum cmd_token_type {
SPECIAL_TKN = FORK_TKN,
};
+/* clang-format on */
#define IS_VARYING_TOKEN(x) ((x) >= VARIABLE_TKN && (x) < FORK_TKN)