aboutsummaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2013-01-14 15:57:44 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2013-01-14 15:57:44 +0100
commit60cb48ca50fcff24aa6c3927f51e4a508fa118f4 (patch)
tree493e30821f3d484b7395ce9d9e4be39ec9a43126 /networking
parentb8173b603f57dcf918a67f1ec00763ab5f4e1cf8 (diff)
downloadbusybox-w32-60cb48ca50fcff24aa6c3927f51e4a508fa118f4.tar.gz
busybox-w32-60cb48ca50fcff24aa6c3927f51e4a508fa118f4.tar.bz2
busybox-w32-60cb48ca50fcff24aa6c3927f51e4a508fa118f4.zip
whitespace cleanup. no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking')
-rw-r--r--networking/brctl.c8
-rw-r--r--networking/ether-wake.c8
-rw-r--r--networking/ifenslave.c2
-rw-r--r--networking/interface.c2
-rw-r--r--networking/libiproute/ipaddress.c10
-rw-r--r--networking/libiproute/iprule.c14
-rw-r--r--networking/libiproute/iptunnel.c2
-rw-r--r--networking/netstat.c2
-rw-r--r--networking/route.c4
-rw-r--r--networking/tc.c5
-rw-r--r--networking/traceroute.c7
-rw-r--r--networking/udhcp/dhcpc.c2
12 files changed, 36 insertions, 30 deletions
diff --git a/networking/brctl.c b/networking/brctl.c
index b4f5809df..207b069aa 100644
--- a/networking/brctl.c
+++ b/networking/brctl.c
@@ -133,9 +133,9 @@ int brctl_main(int argc UNUSED_PARAM, char **argv)
133 133
134 enum { ARG_addbr = 0, ARG_delbr, ARG_addif, ARG_delif 134 enum { ARG_addbr = 0, ARG_delbr, ARG_addif, ARG_delif
135 IF_FEATURE_BRCTL_FANCY(, 135 IF_FEATURE_BRCTL_FANCY(,
136 ARG_stp, 136 ARG_stp,
137 ARG_setageing, ARG_setfd, ARG_sethello, ARG_setmaxage, 137 ARG_setageing, ARG_setfd, ARG_sethello, ARG_setmaxage,
138 ARG_setpathcost, ARG_setportprio, ARG_setbridgeprio 138 ARG_setpathcost, ARG_setportprio, ARG_setbridgeprio
139 ) 139 )
140 IF_FEATURE_BRCTL_SHOW(, ARG_show) 140 IF_FEATURE_BRCTL_SHOW(, ARG_show)
141 }; 141 };
@@ -285,7 +285,7 @@ int brctl_main(int argc UNUSED_PARAM, char **argv)
285 bb_error_msg_and_die(bb_msg_invalid_arg, *argv, "port"); 285 bb_error_msg_and_die(bb_msg_invalid_arg, *argv, "port");
286 memset(ifidx, 0, sizeof ifidx); 286 memset(ifidx, 0, sizeof ifidx);
287 arm_ioctl(args, BRCTL_GET_PORT_LIST, (unsigned long)ifidx, 287 arm_ioctl(args, BRCTL_GET_PORT_LIST, (unsigned long)ifidx,
288 MAX_PORTS); 288 MAX_PORTS);
289 xioctl(fd, SIOCDEVPRIVATE, &ifr); 289 xioctl(fd, SIOCDEVPRIVATE, &ifr);
290 for (i = 0; i < MAX_PORTS; i++) { 290 for (i = 0; i < MAX_PORTS; i++) {
291 if (ifidx[i] == port) { 291 if (ifidx[i] == port) {
diff --git a/networking/ether-wake.c b/networking/ether-wake.c
index a73b0baea..bf09cd529 100644
--- a/networking/ether-wake.c
+++ b/networking/ether-wake.c
@@ -49,9 +49,9 @@
49 * Copyright 1999-2003 Donald Becker and Scyld Computing Corporation. 49 * Copyright 1999-2003 Donald Becker and Scyld Computing Corporation.
50 * 50 *
51 * The author may be reached as becker@scyld, or C/O 51 * The author may be reached as becker@scyld, or C/O
52 * Scyld Computing Corporation 52 * Scyld Computing Corporation
53 * 914 Bay Ridge Road, Suite 220 53 * 914 Bay Ridge Road, Suite 220
54 * Annapolis MD 21403 54 * Annapolis MD 21403
55 * 55 *
56 * Notes: 56 * Notes:
57 * On some systems dropping root capability allows the process to be 57 * On some systems dropping root capability allows the process to be
@@ -113,7 +113,7 @@ void bb_debug_dump_packet(unsigned char *outpack, int pktsize)
113 * Host name 113 * Host name
114 * IP address string 114 * IP address string
115 * MAC address string 115 * MAC address string
116*/ 116 */
117static void get_dest_addr(const char *hostid, struct ether_addr *eaddr) 117static void get_dest_addr(const char *hostid, struct ether_addr *eaddr)
118{ 118{
119 struct ether_addr *eap; 119 struct ether_addr *eap;
diff --git a/networking/ifenslave.c b/networking/ifenslave.c
index f7f87bc55..c3be8180b 100644
--- a/networking/ifenslave.c
+++ b/networking/ifenslave.c
@@ -270,7 +270,7 @@ static int set_if_addr(char *master_ifname, char *slave_ifname)
270 if (res < 0) { 270 if (res < 0) {
271 ifr.ifr_addr.sa_family = AF_INET; 271 ifr.ifr_addr.sa_family = AF_INET;
272 memset(ifr.ifr_addr.sa_data, 0, 272 memset(ifr.ifr_addr.sa_data, 0,
273 sizeof(ifr.ifr_addr.sa_data)); 273 sizeof(ifr.ifr_addr.sa_data));
274 } 274 }
275 275
276 res = set_ifrname_and_do_ioctl(ifra[i].s_ioctl, &ifr, slave_ifname); 276 res = set_ifrname_and_do_ioctl(ifra[i].s_ioctl, &ifr, slave_ifname);
diff --git a/networking/interface.c b/networking/interface.c
index 4b9b9485d..9ae8b3f03 100644
--- a/networking/interface.c
+++ b/networking/interface.c
@@ -27,7 +27,7 @@
27 * {1.34} - 19980630 - Arnaldo Carvalho de Melo <acme@conectiva.com.br> 27 * {1.34} - 19980630 - Arnaldo Carvalho de Melo <acme@conectiva.com.br>
28 * - gettext instead of catgets for i18n 28 * - gettext instead of catgets for i18n
29 * 10/1998 - Andi Kleen. Use interface list primitives. 29 * 10/1998 - Andi Kleen. Use interface list primitives.
30 * 20001008 - Bernd Eckenfels, Patch from RH for setting mtu 30 * 20001008 - Bernd Eckenfels, Patch from RH for setting mtu
31 * (default AF was wrong) 31 * (default AF was wrong)
32 */ 32 */
33 33
diff --git a/networking/libiproute/ipaddress.c b/networking/libiproute/ipaddress.c
index b3748e8c5..3fd3f4478 100644
--- a/networking/libiproute/ipaddress.c
+++ b/networking/libiproute/ipaddress.c
@@ -314,14 +314,16 @@ static int FAST_FUNC print_addrinfo(const struct sockaddr_nl *who UNUSED_PARAM,
314 if (rta_tb[IFA_BROADCAST]) { 314 if (rta_tb[IFA_BROADCAST]) {
315 printf("brd %s ", 315 printf("brd %s ",
316 rt_addr_n2a(ifa->ifa_family, 316 rt_addr_n2a(ifa->ifa_family,
317 RTA_DATA(rta_tb[IFA_BROADCAST]), 317 RTA_DATA(rta_tb[IFA_BROADCAST]),
318 abuf, sizeof(abuf))); 318 abuf, sizeof(abuf))
319 );
319 } 320 }
320 if (rta_tb[IFA_ANYCAST]) { 321 if (rta_tb[IFA_ANYCAST]) {
321 printf("any %s ", 322 printf("any %s ",
322 rt_addr_n2a(ifa->ifa_family, 323 rt_addr_n2a(ifa->ifa_family,
323 RTA_DATA(rta_tb[IFA_ANYCAST]), 324 RTA_DATA(rta_tb[IFA_ANYCAST]),
324 abuf, sizeof(abuf))); 325 abuf, sizeof(abuf))
326 );
325 } 327 }
326 printf("scope %s ", rtnl_rtscope_n2a(ifa->ifa_scope, b1)); 328 printf("scope %s ", rtnl_rtscope_n2a(ifa->ifa_scope, b1));
327 if (ifa->ifa_flags & IFA_F_SECONDARY) { 329 if (ifa->ifa_flags & IFA_F_SECONDARY) {
diff --git a/networking/libiproute/iprule.c b/networking/libiproute/iprule.c
index dd3265c7c..241a6bf9d 100644
--- a/networking/libiproute/iprule.c
+++ b/networking/libiproute/iprule.c
@@ -73,15 +73,17 @@ static int FAST_FUNC print_rule(const struct sockaddr_nl *who UNUSED_PARAM,
73 if (tb[RTA_SRC]) { 73 if (tb[RTA_SRC]) {
74 if (r->rtm_src_len != host_len) { 74 if (r->rtm_src_len != host_len) {
75 printf("%s/%u", rt_addr_n2a(r->rtm_family, 75 printf("%s/%u", rt_addr_n2a(r->rtm_family,
76 RTA_DATA(tb[RTA_SRC]), 76 RTA_DATA(tb[RTA_SRC]),
77 abuf, sizeof(abuf)), 77 abuf, sizeof(abuf)),
78 r->rtm_src_len 78 r->rtm_src_len
79 ); 79 );
80 } else { 80 } else {
81 fputs(format_host(r->rtm_family, 81 fputs(format_host(r->rtm_family,
82 RTA_PAYLOAD(tb[RTA_SRC]), 82 RTA_PAYLOAD(tb[RTA_SRC]),
83 RTA_DATA(tb[RTA_SRC]), 83 RTA_DATA(tb[RTA_SRC]),
84 abuf, sizeof(abuf)), stdout); 84 abuf, sizeof(abuf)),
85 stdout
86 );
85 } 87 }
86 } else if (r->rtm_src_len) { 88 } else if (r->rtm_src_len) {
87 printf("0/%d", r->rtm_src_len); 89 printf("0/%d", r->rtm_src_len);
diff --git a/networking/libiproute/iptunnel.c b/networking/libiproute/iptunnel.c
index 5942feafc..2b651b926 100644
--- a/networking/libiproute/iptunnel.c
+++ b/networking/libiproute/iptunnel.c
@@ -438,7 +438,7 @@ static void print_tunnel(struct ip_tunnel_parm *p)
438 printf(" inherit"); 438 printf(" inherit");
439 if (p->iph.tos & ~1) 439 if (p->iph.tos & ~1)
440 printf("%c%s ", p->iph.tos & 1 ? '/' : ' ', 440 printf("%c%s ", p->iph.tos & 1 ? '/' : ' ',
441 rtnl_dsfield_n2a(p->iph.tos & ~1, b1)); 441 rtnl_dsfield_n2a(p->iph.tos & ~1, b1));
442 } 442 }
443 if (!(p->iph.frag_off & htons(IP_DF))) 443 if (!(p->iph.frag_off & htons(IP_DF)))
444 printf(" nopmtudisc"); 444 printf(" nopmtudisc");
diff --git a/networking/netstat.c b/networking/netstat.c
index 9c239579f..c0c6ba501 100644
--- a/networking/netstat.c
+++ b/networking/netstat.c
@@ -187,7 +187,7 @@ static void prg_cache_add(long inode, char *name)
187 for (pnp = prg_hash + hi; (pn = *pnp) != NULL; pnp = &pn->next) { 187 for (pnp = prg_hash + hi; (pn = *pnp) != NULL; pnp = &pn->next) {
188 if (pn->inode == inode) { 188 if (pn->inode == inode) {
189 /* Some warning should be appropriate here 189 /* Some warning should be appropriate here
190 as we got multiple processes for one i-node */ 190 * as we got multiple processes for one i-node */
191 return; 191 return;
192 } 192 }
193 } 193 }
diff --git a/networking/route.c b/networking/route.c
index 45f2be542..f662031e9 100644
--- a/networking/route.c
+++ b/networking/route.c
@@ -507,8 +507,8 @@ void FAST_FUNC bb_displayroutes(int noresolve, int netstatfmt)
507 while (1) { 507 while (1) {
508 int r; 508 int r;
509 r = fscanf(fp, "%63s%lx%lx%X%d%d%d%lx%d%d%d\n", 509 r = fscanf(fp, "%63s%lx%lx%X%d%d%d%lx%d%d%d\n",
510 devname, &d, &g, &flgs, &ref, &use, &metric, &m, 510 devname, &d, &g, &flgs, &ref, &use, &metric, &m,
511 &mtu, &win, &ir); 511 &mtu, &win, &ir);
512 if (r != 11) { 512 if (r != 11) {
513 if ((r < 0) && feof(fp)) { /* EOF with no (nonspace) chars read. */ 513 if ((r < 0) && feof(fp)) { /* EOF with no (nonspace) chars read. */
514 break; 514 break;
diff --git a/networking/tc.c b/networking/tc.c
index 1574353a5..f968707a9 100644
--- a/networking/tc.c
+++ b/networking/tc.c
@@ -391,7 +391,7 @@ static int print_class(const struct sockaddr_nl *who UNUSED_PARAM,
391 printf("root "); 391 printf("root ");
392 else if (msg->tcm_parent) { 392 else if (msg->tcm_parent) {
393 classid = print_tc_classid(filter_qdisc ? 393 classid = print_tc_classid(filter_qdisc ?
394 TC_H_MIN(msg->tcm_parent) : msg->tcm_parent); 394 TC_H_MIN(msg->tcm_parent) : msg->tcm_parent);
395 printf("parent %s ", classid); 395 printf("parent %s ", classid);
396 if (ENABLE_FEATURE_CLEAN_UP) 396 if (ENABLE_FEATURE_CLEAN_UP)
397 free(classid); 397 free(classid);
@@ -526,7 +526,8 @@ int tc_main(int argc UNUSED_PARAM, char **argv)
526 duparg(*argv, "handle"); 526 duparg(*argv, "handle");
527 /* reject LONG_MIN || LONG_MAX */ 527 /* reject LONG_MIN || LONG_MAX */
528 /* TODO: for fw 528 /* TODO: for fw
529 if ((slash = strchr(handle, '/')) != NULL) 529 slash = strchr(handle, '/');
530 if (slash != NULL)
530 *slash = '\0'; 531 *slash = '\0';
531 */ 532 */
532 msg.tcm_handle = get_u32(*argv, "handle"); 533 msg.tcm_handle = get_u32(*argv, "handle");
diff --git a/networking/traceroute.c b/networking/traceroute.c
index d197e5410..6b7b2ebdd 100644
--- a/networking/traceroute.c
+++ b/networking/traceroute.c
@@ -290,9 +290,10 @@
290#endif 290#endif
291 291
292 292
293#define OPT_STRING "FIlnrdvxt:i:m:p:q:s:w:z:f:" \ 293#define OPT_STRING \
294 IF_FEATURE_TRACEROUTE_SOURCE_ROUTE("g:") \ 294 "FIlnrdvxt:i:m:p:q:s:w:z:f:" \
295 "4" IF_TRACEROUTE6("6") 295 IF_FEATURE_TRACEROUTE_SOURCE_ROUTE("g:") \
296 "4" IF_TRACEROUTE6("6")
296enum { 297enum {
297 OPT_DONT_FRAGMNT = (1 << 0), /* F */ 298 OPT_DONT_FRAGMNT = (1 << 0), /* F */
298 OPT_USE_ICMP = (1 << 1) * ENABLE_FEATURE_TRACEROUTE_USE_ICMP, /* I */ 299 OPT_USE_ICMP = (1 << 1) * ENABLE_FEATURE_TRACEROUTE_USE_ICMP, /* I */
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c
index f72217c84..086228871 100644
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -1723,7 +1723,7 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
1723#endif 1723#endif
1724 /* enter bound state */ 1724 /* enter bound state */
1725 timeout = lease_seconds / 2; 1725 timeout = lease_seconds / 2;
1726 temp_addr.s_addr = packet.yiaddr; 1726 temp_addr.s_addr = packet.yiaddr;
1727 bb_info_msg("Lease of %s obtained, lease time %u", 1727 bb_info_msg("Lease of %s obtained, lease time %u",
1728 inet_ntoa(temp_addr), (unsigned)lease_seconds); 1728 inet_ntoa(temp_addr), (unsigned)lease_seconds);
1729 requested_ip = packet.yiaddr; 1729 requested_ip = packet.yiaddr;