summaryrefslogtreecommitdiff
path: root/zebra/interface.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/interface.c')
-rw-r--r--zebra/interface.c38
1 files changed, 12 insertions, 26 deletions
diff --git a/zebra/interface.c b/zebra/interface.c
index 13582008a7..719cf05db1 100644
--- a/zebra/interface.c
+++ b/zebra/interface.c
@@ -1517,7 +1517,6 @@ static void if_dump_vty(struct vty *vty, struct interface *ifp)
#endif /* HAVE_PROC_NET_DEV */
#ifdef HAVE_NET_RT_IFLIST
-#if defined(__bsdi__) || defined(__NetBSD__)
/* Statistics print out using sysctl (). */
vty_out(vty,
" input packets %llu, bytes %llu, dropped %llu,"
@@ -1542,25 +1541,6 @@ static void if_dump_vty(struct vty *vty, struct interface *ifp)
vty_out(vty, " collisions %llu\n",
(unsigned long long)ifp->stats.ifi_collisions);
-#else
- /* Statistics print out using sysctl (). */
- vty_out(vty,
- " input packets %lu, bytes %lu, dropped %lu,"
- " multicast packets %lu\n",
- ifp->stats.ifi_ipackets, ifp->stats.ifi_ibytes,
- ifp->stats.ifi_iqdrops, ifp->stats.ifi_imcasts);
-
- vty_out(vty, " input errors %lu\n", ifp->stats.ifi_ierrors);
-
- vty_out(vty,
- " output packets %lu, bytes %lu, multicast packets %lu\n",
- ifp->stats.ifi_opackets, ifp->stats.ifi_obytes,
- ifp->stats.ifi_omcasts);
-
- vty_out(vty, " output errors %lu\n", ifp->stats.ifi_oerrors);
-
- vty_out(vty, " collisions %lu\n", ifp->stats.ifi_collisions);
-#endif /* __bsdi__ || __NetBSD__ */
#endif /* HAVE_NET_RT_IFLIST */
}
@@ -1613,12 +1593,13 @@ DEFPY(show_interface, show_interface_cmd,
/* Show all interfaces to vty. */
-DEFUN (show_interface_vrf_all,
+DEFPY (show_interface_vrf_all,
show_interface_vrf_all_cmd,
- "show interface vrf all",
+ "show interface vrf all [brief$brief]",
SHOW_STR
"Interface status and configuration\n"
- VRF_ALL_CMD_HELP_STR)
+ VRF_ALL_CMD_HELP_STR
+ "Interface status and configuration summary\n")
{
struct vrf *vrf;
struct interface *ifp;
@@ -1626,9 +1607,14 @@ DEFUN (show_interface_vrf_all,
interface_update_stats();
/* All interface print. */
- RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name)
- FOR_ALL_INTERFACES (vrf, ifp)
- if_dump_vty(vty, ifp);
+ RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name) {
+ if (brief) {
+ ifs_dump_brief_vty(vty, vrf);
+ } else {
+ FOR_ALL_INTERFACES (vrf, ifp)
+ if_dump_vty(vty, ifp);
+ }
+ }
return CMD_SUCCESS;
}