aboutsummaryrefslogtreecommitdiff
path: root/networking/libiproute/ipneigh.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2015-10-14 13:56:42 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2015-10-14 13:56:42 +0200
commit926d801fa51717b3af3faf33f9d686e92a20ecfd (patch)
treebe5d1e982d1ec0330055ebeb0e216eca9a07892f /networking/libiproute/ipneigh.c
parent0f296a3a56b52842057e5a2bc653621a3a6c7bec (diff)
downloadbusybox-w32-926d801fa51717b3af3faf33f9d686e92a20ecfd.tar.gz
busybox-w32-926d801fa51717b3af3faf33f9d686e92a20ecfd.tar.bz2
busybox-w32-926d801fa51717b3af3faf33f9d686e92a20ecfd.zip
libiproute: make rt_addr_n2a() and format_host() return auto strings
function old new delta rt_addr_n2a 56 53 -3 print_addrinfo 1227 1178 -49 print_neigh 933 881 -52 print_rule 689 617 -72 print_tunnel 640 560 -80 print_route 1727 1588 -139 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/6 up/down: 0/-395) Total: -395 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/libiproute/ipneigh.c')
-rw-r--r--networking/libiproute/ipneigh.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/networking/libiproute/ipneigh.c b/networking/libiproute/ipneigh.c
index 6588c12f1..179505c2d 100644
--- a/networking/libiproute/ipneigh.c
+++ b/networking/libiproute/ipneigh.c
@@ -91,7 +91,6 @@ static int FAST_FUNC print_neigh(const struct sockaddr_nl *who UNUSED_PARAM,
91 struct ndmsg *r = NLMSG_DATA(n); 91 struct ndmsg *r = NLMSG_DATA(n);
92 int len = n->nlmsg_len; 92 int len = n->nlmsg_len;
93 struct rtattr *tb[NDA_MAX+1]; 93 struct rtattr *tb[NDA_MAX+1];
94 char abuf[256];
95 94
96 if (n->nlmsg_type != RTM_NEWNEIGH && n->nlmsg_type != RTM_DELNEIGH) { 95 if (n->nlmsg_type != RTM_NEWNEIGH && n->nlmsg_type != RTM_DELNEIGH) {
97 bb_error_msg_and_die("not RTM_NEWNEIGH: %08x %08x %08x", 96 bb_error_msg_and_die("not RTM_NEWNEIGH: %08x %08x %08x",
@@ -155,8 +154,8 @@ static int FAST_FUNC print_neigh(const struct sockaddr_nl *who UNUSED_PARAM,
155 printf("%s ", 154 printf("%s ",
156 format_host(r->ndm_family, 155 format_host(r->ndm_family,
157 RTA_PAYLOAD(tb[NDA_DST]), 156 RTA_PAYLOAD(tb[NDA_DST]),
158 RTA_DATA(tb[NDA_DST]), 157 RTA_DATA(tb[NDA_DST]))
159 abuf, sizeof(abuf))); 158 );
160 } 159 }
161 if (!G_filter.index && r->ndm_ifindex) 160 if (!G_filter.index && r->ndm_ifindex)
162 printf("dev %s ", ll_index_to_name(r->ndm_ifindex)); 161 printf("dev %s ", ll_index_to_name(r->ndm_ifindex));