summaryrefslogtreecommitdiffstats
path: root/lib/command_lex.l
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2017-08-08 23:10:23 +0200
committerQuentin Young <qlyoung@cumulusnetworks.com>2017-08-11 18:42:01 +0200
commit9779e3f19368fe05199cddc3bc4029288c34be3f (patch)
tree75e82daeba86fefd735f98f29b2f23c9148df572 /lib/command_lex.l
parentMerge pull request #953 from jbonor/nhrpd-fixes (diff)
downloadfrr-9779e3f19368fe05199cddc3bc4029288c34be3f.tar.xz
frr-9779e3f19368fe05199cddc3bc4029288c34be3f.zip
lib: add CLI token for 48-bit mac addresses
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'lib/command_lex.l')
-rw-r--r--lib/command_lex.l4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/command_lex.l b/lib/command_lex.l
index fddbf7b28..59d0d840a 100644
--- a/lib/command_lex.l
+++ b/lib/command_lex.l
@@ -40,6 +40,8 @@ IPV4 A\.B\.C\.D
IPV4_PREFIX A\.B\.C\.D\/M
IPV6 X:X::X:X
IPV6_PREFIX X:X::X:X\/M
+MAC M:A:C
+MAC_PREFIX M:A:C\/M
VARIABLE [A-Z][-_a-zA-Z:0-9]+
NUMBER (\-|\+)?[0-9]{1,20}
RANGE \({NUMBER}[ ]?\-[ ]?{NUMBER}\)
@@ -67,6 +69,8 @@ RANGE \({NUMBER}[ ]?\-[ ]?{NUMBER}\)
{IPV4_PREFIX} {yylval->string = XSTRDUP(MTYPE_LEX, yytext); return IPV4_PREFIX;}
{IPV6} {yylval->string = XSTRDUP(MTYPE_LEX, yytext); return IPV6;}
{IPV6_PREFIX} {yylval->string = XSTRDUP(MTYPE_LEX, yytext); return IPV6_PREFIX;}
+{MAC} {yylval->string = XSTRDUP(MTYPE_LEX, yytext); return MAC;}
+{MAC_PREFIX} {yylval->string = XSTRDUP(MTYPE_LEX, yytext); return MAC_PREFIX;}
{VARIABLE} {yylval->string = XSTRDUP(MTYPE_LEX, yytext); return VARIABLE;}
{RANGE} {yylval->string = XSTRDUP(MTYPE_LEX, yytext); return RANGE;}
. {return yytext[0];}