diff options
Diffstat (limited to 'usr.sbin/eigrpctl/parser.c')
-rw-r--r-- | usr.sbin/eigrpctl/parser.c | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/usr.sbin/eigrpctl/parser.c b/usr.sbin/eigrpctl/parser.c index 55d744633b6..d9af97ec046 100644 --- a/usr.sbin/eigrpctl/parser.c +++ b/usr.sbin/eigrpctl/parser.c @@ -1,4 +1,4 @@ -/* $OpenBSD: parser.c,v 1.3 2015/12/13 18:55:53 renato Exp $ */ +/* $OpenBSD: parser.c,v 1.4 2016/01/15 12:57:49 renato Exp $ */ /* * Copyright (c) 2015 Renato Westphal <renato@openbsd.org> @@ -71,11 +71,16 @@ static const struct token t_show_stats[]; static const struct token t_show_stats_af[]; static const struct token t_show_stats_as[]; static const struct token t_log[]; +static const struct token t_clear[]; +static const struct token t_clear_nbr[]; +static const struct token t_clear_nbr_af[]; +static const struct token t_clear_nbr_as[]; static const struct token t_main[] = { {KEYWORD, "reload", RELOAD, NULL}, {KEYWORD, "fib", FIB, t_fib}, {KEYWORD, "show", SHOW, t_show}, + {KEYWORD, "clear", NONE, t_clear}, {KEYWORD, "log", NONE, t_log}, {ENDTOKEN, "", NONE, NULL} }; @@ -185,6 +190,29 @@ static const struct token t_show_stats_as[] = { {ENDTOKEN, "", NONE, NULL} }; +static const struct token t_clear[] = { + {KEYWORD, "neighbors", CLEAR_NBR, t_clear_nbr}, + {ENDTOKEN, "", NONE, NULL} +}; + +static const struct token t_clear_nbr[] = { + {NOTOKEN, "", NONE, NULL}, + {KEYWORD, "as", NONE, t_clear_nbr_as}, + {KEYWORD, "family", NONE, t_clear_nbr_af}, + {ADDRESS, "", NONE, NULL}, + {ENDTOKEN, "", NONE, NULL} +}; + +static const struct token t_clear_nbr_af[] = { + {FAMILY, "", NONE, t_clear_nbr}, + {ENDTOKEN, "", NONE, NULL} +}; + +static const struct token t_clear_nbr_as[] = { + {ASNUM, "", NONE, t_clear_nbr}, + {ENDTOKEN, "", NONE, NULL} +}; + static const struct token t_log[] = { {KEYWORD, "verbose", LOG_VERBOSE, NULL}, {KEYWORD, "brief", LOG_BRIEF, NULL}, |