summaryrefslogtreecommitdiff
path: root/usr.sbin/ospf6ctl
diff options
context:
space:
mode:
authorEsben Norby <norby@cvs.openbsd.org>2007-10-12 09:23:38 +0000
committerEsben Norby <norby@cvs.openbsd.org>2007-10-12 09:23:38 +0000
commit6d3ee613b5a67f4025bddc09a68fa332112bb542 (patch)
tree7741c8b34ccbf6fe7833f23bfdddfd304cf07a08 /usr.sbin/ospf6ctl
parent92868557cbf6aeda8e2ea8d83f5b59441500720c (diff)
Properly format the output of "show interface".
In order to make room for the longer IPv6 addresses in the output, the two collumns nc and ac must go. Neighbor and Adjacent Neighbor Count is still avalable in "show interface detail". ok claudio@
Diffstat (limited to 'usr.sbin/ospf6ctl')
-rw-r--r--usr.sbin/ospf6ctl/ospf6ctl.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/usr.sbin/ospf6ctl/ospf6ctl.c b/usr.sbin/ospf6ctl/ospf6ctl.c
index 8994e55c564..2de12792969 100644
--- a/usr.sbin/ospf6ctl/ospf6ctl.c
+++ b/usr.sbin/ospf6ctl/ospf6ctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ospf6ctl.c,v 1.1 2007/10/12 08:22:53 norby Exp $ */
+/* $OpenBSD: ospf6ctl.c,v 1.2 2007/10/12 09:23:37 norby Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -128,9 +128,9 @@ main(int argc, char *argv[])
imsg_compose(ibuf, IMSG_CTL_SHOW_SUM, 0, 0, NULL, 0);
break;
case SHOW_IFACE:
- printf("%-11s %-18s %-6s %-10s %-10s %-8s %3s %3s\n",
+ printf("%-11s %-29s %-6s %-10s %-10s %-8s\n",
"Interface", "Address", "State", "HelloTimer", "Linkstate",
- "Uptime", "nc", "ac");
+ "Uptime");
case SHOW_IFACE_DTAIL:
if (*res->ifname) {
ifidx = if_nametoindex(res->ifname);
@@ -354,13 +354,11 @@ show_interface_msg(struct imsg *imsg)
if (asprintf(&netid, "%s", log_in6addr(&iface->addr)) == -1)
err(1, NULL);
- printf("%-11s %-18s %-6s %-10s %-10s %s %3d %3d\n",
+ printf("%-11s %-29s %-6s %-10s %-10s %s\n",
iface->name, netid, if_state_name(iface->state),
fmt_timeframe_core(iface->hello_timer),
get_linkstate(get_ifms_type(iface->mediatype),
- iface->linkstate), fmt_timeframe_core(iface->uptime),
- iface->nbr_cnt,
- iface->adj_cnt);
+ iface->linkstate), fmt_timeframe_core(iface->uptime));
free(netid);
break;
case IMSG_CTL_END: