diff options
| author | 2006-01-24 15:28:02 +0000 | |
|---|---|---|
| committer | 2006-01-24 15:28:02 +0000 | |
| commit | 16fcf8d29db30463fed9fb25da73acea9d67dbcd (patch) | |
| tree | ec61de15d97cfb7d50fca6384bd731edb619c05c /usr.sbin/bgpctl/parser.c | |
| parent | Fix NULL dereference on error condition in nfs_reply(). nmp->nm_so can (diff) | |
| download | wireguard-openbsd-16fcf8d29db30463fed9fb25da73acea9d67dbcd.tar.xz wireguard-openbsd-16fcf8d29db30463fed9fb25da73acea9d67dbcd.zip | |
introduce "bgpctl show summary terse", shows summary in an easy to parse
format, intended for monitoring puposes. claudio ok
Diffstat (limited to 'usr.sbin/bgpctl/parser.c')
| -rw-r--r-- | usr.sbin/bgpctl/parser.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/usr.sbin/bgpctl/parser.c b/usr.sbin/bgpctl/parser.c index 8a848c5a922..d72afbdf784 100644 --- a/usr.sbin/bgpctl/parser.c +++ b/usr.sbin/bgpctl/parser.c @@ -1,4 +1,4 @@ -/* $OpenBSD: parser.c,v 1.26 2006/01/03 22:51:14 claudio Exp $ */ +/* $OpenBSD: parser.c,v 1.27 2006/01/24 15:28:03 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -59,6 +59,7 @@ struct token { static const struct token t_main[]; static const struct token t_show[]; +static const struct token t_show_summary[]; static const struct token t_show_fib[]; static const struct token t_show_rib[]; static const struct token t_show_neighbor[]; @@ -100,10 +101,16 @@ static const struct token t_show[] = { { KEYWORD, "nexthop", SHOW_NEXTHOP, NULL}, { KEYWORD, "rib", SHOW_RIB, t_show_rib}, { KEYWORD, "ip", NONE, t_show_ip}, - { KEYWORD, "summary", SHOW_SUMMARY, NULL}, + { KEYWORD, "summary", SHOW_SUMMARY, t_show_summary}, { ENDTOKEN, "", NONE, NULL} }; +static const struct token t_show_summary[] = { + { NOTOKEN, "", NONE, NULL}, + { KEYWORD, "terse", SHOW_SUMMARY_TERSE, NULL}, + { ENDTOKEN, "", NONE, NULL} +}; + static const struct token t_show_fib[] = { { NOTOKEN, "", NONE, NULL}, { FLAG, "connected", F_CONNECTED, t_show_fib}, |
