aboutsummaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2010-05-25 09:55:42 +0200
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2010-05-25 10:25:52 +0200
commit49ee8393f4d11ee3091dcad41ce36741c6a4b4f8 (patch)
tree499ae217ed418a6361e522ee803a8926cb553d95 /networking
parentfc2bb8f04f048bf60a8b53bd6ad04eef1b8d3626 (diff)
downloadbusybox-49ee8393f4d11ee3091dcad41ce36741c6a4b4f8.tar.gz
ipaddress: print OPERSTATEs and NO-CARRIER
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'networking')
-rw-r--r--networking/libiproute/ipaddress.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/networking/libiproute/ipaddress.c b/networking/libiproute/ipaddress.c
index daea9dd03..3f360f455 100644
--- a/networking/libiproute/ipaddress.c
+++ b/networking/libiproute/ipaddress.c
@@ -54,6 +54,8 @@ static void print_link_flags(unsigned flags, unsigned mdown)
"MULTICAST\0""NOARP\0""UP\0""LOWER_UP\0";
bb_putchar('<');
+ if (flags & IFF_UP && !(flags & IFF_RUNNING))
+ printf("NO-CARRIER,");
flags &= ~IFF_RUNNING;
#if 0
_PF(ALLMULTI);
@@ -162,6 +164,13 @@ static NOINLINE int print_linkinfo(const struct nlmsghdr *n)
printf("master %s ", ll_idx_n2a(*(int*)RTA_DATA(tb[IFLA_MASTER]), b1));
}
#endif
+ if (tb[IFLA_OPERSTATE]) {
+ static const char operstate_labels[] ALIGN1 =
+ "UNKNOWN\0""NOTPRESENT\0""DOWN\0""LOWERLAYERDOWN\0"
+ "TESTING\0""DORMANT\0""UP\0";
+ printf("state %s ", nth_string(operstate_labels,
+ *(__u8 *)RTA_DATA(tb[IFLA_OPERSTATE])));
+ }
if (G_filter.showqueue)
print_queuelen((char*)RTA_DATA(tb[IFLA_IFNAME]));