mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-12-22 09:41:54 +00:00
Implemented show route count' which is
show route stats' with
exception that it doesn't print the routes themselves.
This commit is contained in:
parent
0c3588bf5e
commit
33a368ad59
1
TODO
1
TODO
@ -15,7 +15,6 @@ Core
|
||||
- filters: user defined attributes?
|
||||
|
||||
- cli: show tables?
|
||||
- cli: show route count (like stats, but doesn't print the routes)
|
||||
- cli: show where is routed given IP address?
|
||||
|
||||
- client: Ctrl-R eats one more enter
|
||||
|
@ -22,7 +22,7 @@ CF_DECLS
|
||||
CF_KEYWORDS(ROUTER, ID, PROTOCOL, PREFERENCE, DISABLED, DEBUG, ALL, OFF, DIRECT)
|
||||
CF_KEYWORDS(INTERFACE, IMPORT, EXPORT, FILTER, NONE, TABLE, STATES, ROUTES, FILTERS)
|
||||
CF_KEYWORDS(PASSWORD, FROM, PASSIVE, TO, ID, EVENTS, PACKETS, PROTOCOLS, INTERFACES)
|
||||
CF_KEYWORDS(PRIMARY, STATS)
|
||||
CF_KEYWORDS(PRIMARY, STATS, COUNT)
|
||||
|
||||
CF_ENUM(T_ENUM_RTS, RTS_, DUMMY, STATIC, INHERIT, DEVICE, STATIC_DEVICE, REDIRECT,
|
||||
RIP, OSPF, OSPF_EXT, OSPF_IA, OSPF_BOUNDARY, BGP, PIPE)
|
||||
@ -294,6 +294,10 @@ r_args:
|
||||
$$ = $1;
|
||||
$$->stats = 1;
|
||||
}
|
||||
| r_args COUNT {
|
||||
$$ = $1;
|
||||
$$->stats = 2;
|
||||
}
|
||||
;
|
||||
|
||||
import_or_proto:
|
||||
|
@ -749,6 +749,7 @@ rt_show_net(struct cli *c, net *n, struct rt_show_data *d)
|
||||
if (ok)
|
||||
{
|
||||
d->show_counter++;
|
||||
if (d->stats < 2)
|
||||
rt_show_rte(c, ia, e, d, tmpa);
|
||||
ia[0] = 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user