diff options
author | Martin Mares <mj@ucw.cz> | 1999-11-30 13:57:14 +0100 |
---|---|---|
committer | Martin Mares <mj@ucw.cz> | 1999-11-30 13:57:14 +0100 |
commit | 0d3e6bceeeec4ebf007e02374f799cd1fb21f20c (patch) | |
tree | 59bc75bd528f41cb458260d54f777f18300b9c85 /nest/iface.c | |
parent | 10b5baaef32076369b06b4318cc61e6fa11e5493 (diff) | |
download | bird-0d3e6bceeeec4ebf007e02374f799cd1fb21f20c.tar bird-0d3e6bceeeec4ebf007e02374f799cd1fb21f20c.zip |
`show interfaces' and `show protocols' works.
Diffstat (limited to 'nest/iface.c')
-rw-r--r-- | nest/iface.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/nest/iface.c b/nest/iface.c index 4b024e1..a2746b1 100644 --- a/nest/iface.c +++ b/nest/iface.c @@ -646,7 +646,7 @@ if_show_addr(struct ifa *a) bsprintf(opp, ", opposite %I", a->opposite); else opp[0] = 0; - cli_msg(-2003, "\t%I/%d (%s%s%s, scope %s)", + cli_msg(-1003, "\t%I/%d (%s%s%s, scope %s)", a->ip, a->pxlen, (a->flags & IA_PRIMARY) ? "Primary" : (a->flags & IA_SECONDARY) ? "Secondary" : "???", broad, opp, @@ -662,14 +662,14 @@ if_show(void) WALK_LIST(i, iface_list) { - cli_msg(-2001, "%s %s (index=%d)", i->name, (i->flags & IF_UP) ? "up" : "DOWN", i->index); + cli_msg(-1001, "%s %s (index=%d)", i->name, (i->flags & IF_UP) ? "up" : "DOWN", i->index); if (i->flags & IF_UNNUMBERED) type = "UnNum-PtP"; else if (!(i->flags & IF_MULTIACCESS)) type = "PtP"; else type = "MultiAccess"; - cli_msg(-2004, "\t%s%s%s Admin%s Link%s%s%s MTU=%d", + cli_msg(-1004, "\t%s%s%s Admin%s Link%s%s%s MTU=%d", type, (i->flags & IF_BROADCAST) ? " Broadcast" : "", (i->flags & IF_MULTICAST) ? " Multicast" : "", @@ -693,13 +693,14 @@ if_show_summary(void) struct iface *i; byte addr[STD_ADDRESS_P_LENGTH + 16]; + cli_msg(-2005, "interface state address"); WALK_LIST(i, iface_list) { if (i->addr) bsprintf(addr, "%I/%d", i->addr->ip, i->addr->pxlen); else addr[0] = 0; - cli_msg(-2005, "%s\t%s\t%s", i->name, (i->flags & IF_UP) ? "up" : "DOWN", addr); + cli_msg(-1005, "%-9s %-5s %s", i->name, (i->flags & IF_UP) ? "up" : "DOWN", addr); } cli_msg(0, ""); } |