summaryrefslogtreecommitdiff
path: root/lib/command_graph.h
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2017-08-08 17:10:23 -0400
committerQuentin Young <qlyoung@cumulusnetworks.com>2017-08-11 12:42:01 -0400
commit9779e3f19368fe05199cddc3bc4029288c34be3f (patch)
tree75e82daeba86fefd735f98f29b2f23c9148df572 /lib/command_graph.h
parent841dcb24d76217a192a1566230100c26af9674d0 (diff)
lib: add CLI token for 48-bit mac addresses
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
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)