diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2010-05-25 09:55:42 +0200 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2010-05-25 10:25:52 +0200 |
commit | 49ee8393f4d11ee3091dcad41ce36741c6a4b4f8 (patch) | |
tree | 499ae217ed418a6361e522ee803a8926cb553d95 | |
parent | fc2bb8f04f048bf60a8b53bd6ad04eef1b8d3626 (diff) | |
download | busybox-w32-49ee8393f4d11ee3091dcad41ce36741c6a4b4f8.tar.gz busybox-w32-49ee8393f4d11ee3091dcad41ce36741c6a4b4f8.tar.bz2 busybox-w32-49ee8393f4d11ee3091dcad41ce36741c6a4b4f8.zip |
ipaddress: print OPERSTATEs and NO-CARRIER
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
-rw-r--r-- | networking/libiproute/ipaddress.c | 9 |
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) | |||
54 | "MULTICAST\0""NOARP\0""UP\0""LOWER_UP\0"; | 54 | "MULTICAST\0""NOARP\0""UP\0""LOWER_UP\0"; |
55 | 55 | ||
56 | bb_putchar('<'); | 56 | bb_putchar('<'); |
57 | if (flags & IFF_UP && !(flags & IFF_RUNNING)) | ||
58 | printf("NO-CARRIER,"); | ||
57 | flags &= ~IFF_RUNNING; | 59 | flags &= ~IFF_RUNNING; |
58 | #if 0 | 60 | #if 0 |
59 | _PF(ALLMULTI); | 61 | _PF(ALLMULTI); |
@@ -162,6 +164,13 @@ static NOINLINE int print_linkinfo(const struct nlmsghdr *n) | |||
162 | printf("master %s ", ll_idx_n2a(*(int*)RTA_DATA(tb[IFLA_MASTER]), b1)); | 164 | printf("master %s ", ll_idx_n2a(*(int*)RTA_DATA(tb[IFLA_MASTER]), b1)); |
163 | } | 165 | } |
164 | #endif | 166 | #endif |
167 | if (tb[IFLA_OPERSTATE]) { | ||
168 | static const char operstate_labels[] ALIGN1 = | ||
169 | "UNKNOWN\0""NOTPRESENT\0""DOWN\0""LOWERLAYERDOWN\0" | ||
170 | "TESTING\0""DORMANT\0""UP\0"; | ||
171 | printf("state %s ", nth_string(operstate_labels, | ||
172 | *(__u8 *)RTA_DATA(tb[IFLA_OPERSTATE]))); | ||
173 | } | ||
165 | if (G_filter.showqueue) | 174 | if (G_filter.showqueue) |
166 | print_queuelen((char*)RTA_DATA(tb[IFLA_IFNAME])); | 175 | print_queuelen((char*)RTA_DATA(tb[IFLA_IFNAME])); |
167 | 176 | ||