diff options
author | Paul Jakma <paul.jakma@sun.com> | 2006-06-15 12:48:17 +0000 |
---|---|---|
committer | Paul Jakma <paul.jakma@sun.com> | 2006-06-15 12:48:17 +0000 |
commit | 630c97ce0f87a719f678a24bd84945d4f145fdc5 (patch) | |
tree | 1b87b2247617af51556f24a45b6735674d7f948d /zebra | |
parent | c024fd0c76bc305cd6b6bab0989226bd9ec5e763 (diff) |
[zebra] remove internal if_flag_dump, use libzebras version.
2006-06-15 Paul Jakma <paul.jakma@sun.com>
* lib/if.c: (if_flag_dump) remove the whitespace indentation, callers
should provide.
* zebra/interface.c: (if_flag_dump_vty) redundant code, remove.
(if_dump_vty) use libzebra if_flag_dump.
Diffstat (limited to 'zebra')
-rw-r--r-- | zebra/ChangeLog | 5 | ||||
-rw-r--r-- | zebra/interface.c | 47 |
2 files changed, 7 insertions, 45 deletions
diff --git a/zebra/ChangeLog b/zebra/ChangeLog index e70efaee..c31e3504 100644 --- a/zebra/ChangeLog +++ b/zebra/ChangeLog @@ -1,3 +1,8 @@ +2006-06-15 Paul Jakma <paul.jakma@sun.com> + + * interface.c: (if_flag_dump_vty) redundant code, remove. + (if_dump_vty) use libzebra if_flag_dump. + 2006-05-21 Andrew J. Schorr <ajschorr@alumni.princeton.edu> * connected.c: (connected_withdraw) Do not delete the connected diff --git a/zebra/interface.c b/zebra/interface.c index 3919c3f1..e386047f 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -548,46 +548,6 @@ if_refresh (struct interface *ifp) if_get_flags (ifp); } -/* Printout flag information into vty */ -static void -if_flag_dump_vty (struct vty *vty, uint64_t flag) -{ - int separator = 0; - -#define IFF_OUT_VTY(X, Y) \ - if ((X) && (flag & (X))) \ - { \ - if (separator) \ - vty_out (vty, ","); \ - else \ - separator = 1; \ - vty_out (vty, Y); \ - } - - vty_out (vty, "<"); - IFF_OUT_VTY (IFF_UP, "UP"); - IFF_OUT_VTY (IFF_BROADCAST, "BROADCAST"); - IFF_OUT_VTY (IFF_DEBUG, "DEBUG"); - IFF_OUT_VTY (IFF_LOOPBACK, "LOOPBACK"); - IFF_OUT_VTY (IFF_POINTOPOINT, "POINTOPOINT"); - IFF_OUT_VTY (IFF_NOTRAILERS, "NOTRAILERS"); - IFF_OUT_VTY (IFF_RUNNING, "RUNNING"); - IFF_OUT_VTY (IFF_NOARP, "NOARP"); - IFF_OUT_VTY (IFF_PROMISC, "PROMISC"); - IFF_OUT_VTY (IFF_ALLMULTI, "ALLMULTI"); - IFF_OUT_VTY (IFF_OACTIVE, "OACTIVE"); - IFF_OUT_VTY (IFF_SIMPLEX, "SIMPLEX"); - IFF_OUT_VTY (IFF_LINK0, "LINK0"); - IFF_OUT_VTY (IFF_LINK1, "LINK1"); - IFF_OUT_VTY (IFF_LINK2, "LINK2"); - IFF_OUT_VTY (IFF_MULTICAST, "MULTICAST"); -#ifdef SOLARIS_IPV6 - IFF_OUT_VTY (IFF_VIRTUAL, "IFF_VIRTUAL"); - IFF_OUT_VTY (IFF_NOXMIT, "IFF_NOXMIT"); -#endif /* SOLARIS_IPV6 */ - vty_out (vty, ">"); -} - /* Output prefix string to vty. */ static int prefix_vty_out (struct vty *vty, struct prefix *p) @@ -740,12 +700,9 @@ if_dump_vty (struct vty *vty, struct interface *ifp) if (ifp->mtu6 != ifp->mtu) vty_out (vty, "mtu6 %d ", ifp->mtu6); #endif - vty_out (vty, "%s flags: ", VTY_NEWLINE); + vty_out (vty, "%s flags: %s%s", VTY_NEWLINE, + if_flag_dump (ifp->flags), VTY_NEWLINE); - if_flag_dump_vty (vty, ifp->flags); - - vty_out (vty, "%s", VTY_NEWLINE); - /* Hardware address. */ #ifdef HAVE_SOCKADDR_DL sdl = &ifp->sdl; |