aboutsummaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2005-04-16 19:39:00 +0000
committerEric Andersen <andersen@codepoet.org>2005-04-16 19:39:00 +0000
commit14f5c8d764ab7429367feb407ab86191054e6a8a (patch)
tree2aa792b8a9d8f7af365c456f19f34a963236c26d /networking
parenta77b4f39708306d44058d7ca1683f448f51c5fce (diff)
downloadbusybox-w32-14f5c8d764ab7429367feb407ab86191054e6a8a.tar.gz
busybox-w32-14f5c8d764ab7429367feb407ab86191054e6a8a.tar.bz2
busybox-w32-14f5c8d764ab7429367feb407ab86191054e6a8a.zip
Patch from Bernhard Fischer to make a bunch of symbols static
which were otherwise cluttering the global namespace.
Diffstat (limited to 'networking')
-rw-r--r--networking/arping.c6
-rw-r--r--networking/ifupdown.c4
-rw-r--r--networking/libiproute/ipaddress.c2
-rw-r--r--networking/libiproute/iptunnel.c4
-rw-r--r--networking/libiproute/ll_proto.c2
-rw-r--r--networking/libiproute/ll_types.c2
-rw-r--r--networking/libiproute/rt_names.c10
-rw-r--r--networking/nameif.c2
-rw-r--r--networking/ping.c5
-rw-r--r--networking/route.c1
-rw-r--r--networking/tftp.c4
-rw-r--r--networking/udhcp/script.h2
-rw-r--r--networking/wget.c4
13 files changed, 26 insertions, 22 deletions
diff --git a/networking/arping.c b/networking/arping.c
index 7279e8653..95ca1ed2e 100644
--- a/networking/arping.c
+++ b/networking/arping.c
@@ -106,7 +106,7 @@ static int send_pack(int sock, struct in_addr *src_addr,
106 return err; 106 return err;
107} 107}
108 108
109void finish(void) 109static void finish(void)
110{ 110{
111 if (!quiet) { 111 if (!quiet) {
112 printf("Sent %d probes (%d broadcast(s))\n", sent, brd_sent); 112 printf("Sent %d probes (%d broadcast(s))\n", sent, brd_sent);
@@ -129,7 +129,7 @@ void finish(void)
129 exit(!received); 129 exit(!received);
130} 130}
131 131
132void catcher(void) 132static void catcher(void)
133{ 133{
134 struct timeval tv; 134 struct timeval tv;
135 static struct timeval start; 135 static struct timeval start;
@@ -151,7 +151,7 @@ void catcher(void)
151 alarm(1); 151 alarm(1);
152} 152}
153 153
154int recv_pack(unsigned char *buf, int len, struct sockaddr_ll *FROM) 154static int recv_pack(unsigned char *buf, int len, struct sockaddr_ll *FROM)
155{ 155{
156 struct timeval tv; 156 struct timeval tv;
157 struct arphdr *ah = (struct arphdr *) buf; 157 struct arphdr *ah = (struct arphdr *) buf;
diff --git a/networking/ifupdown.c b/networking/ifupdown.c
index f93f502bd..916948175 100644
--- a/networking/ifupdown.c
+++ b/networking/ifupdown.c
@@ -462,7 +462,7 @@ static struct method_t methods6[] = {
462 { "loopback", loopback_up6, loopback_down6, }, 462 { "loopback", loopback_up6, loopback_down6, },
463}; 463};
464 464
465struct address_family_t addr_inet6 = { 465static struct address_family_t addr_inet6 = {
466 "inet6", 466 "inet6",
467 sizeof(methods6) / sizeof(struct method_t), 467 sizeof(methods6) / sizeof(struct method_t),
468 methods6 468 methods6
@@ -611,7 +611,7 @@ static struct method_t methods[] =
611 { "loopback", loopback_up, loopback_down, }, 611 { "loopback", loopback_up, loopback_down, },
612}; 612};
613 613
614struct address_family_t addr_inet = 614static struct address_family_t addr_inet =
615{ 615{
616 "inet", 616 "inet",
617 sizeof(methods) / sizeof(struct method_t), 617 sizeof(methods) / sizeof(struct method_t),
diff --git a/networking/libiproute/ipaddress.c b/networking/libiproute/ipaddress.c
index 7e0c75785..da7a67bfe 100644
--- a/networking/libiproute/ipaddress.c
+++ b/networking/libiproute/ipaddress.c
@@ -48,7 +48,7 @@ static struct
48 struct rtnl_handle *rth; 48 struct rtnl_handle *rth;
49} filter; 49} filter;
50 50
51void print_link_flags(FILE *fp, unsigned flags, unsigned mdown) 51static void print_link_flags(FILE *fp, unsigned flags, unsigned mdown)
52{ 52{
53 fprintf(fp, "<"); 53 fprintf(fp, "<");
54 flags &= ~IFF_RUNNING; 54 flags &= ~IFF_RUNNING;
diff --git a/networking/libiproute/iptunnel.c b/networking/libiproute/iptunnel.c
index f8713e08b..85c6099ed 100644
--- a/networking/libiproute/iptunnel.c
+++ b/networking/libiproute/iptunnel.c
@@ -361,7 +361,7 @@ static int do_add(int cmd, int argc, char **argv)
361 return -1; 361 return -1;
362} 362}
363 363
364int do_del(int argc, char **argv) 364static int do_del(int argc, char **argv)
365{ 365{
366 struct ip_tunnel_parm p; 366 struct ip_tunnel_parm p;
367 367
@@ -381,7 +381,7 @@ int do_del(int argc, char **argv)
381 return -1; 381 return -1;
382} 382}
383 383
384void print_tunnel(struct ip_tunnel_parm *p) 384static void print_tunnel(struct ip_tunnel_parm *p)
385{ 385{
386 char s1[256]; 386 char s1[256];
387 char s2[256]; 387 char s2[256];
diff --git a/networking/libiproute/ll_proto.c b/networking/libiproute/ll_proto.c
index 9b5260b32..104fbca25 100644
--- a/networking/libiproute/ll_proto.c
+++ b/networking/libiproute/ll_proto.c
@@ -90,7 +90,7 @@ __PF(ECONET,econet)
90#undef __PF 90#undef __PF
91 91
92 92
93char * ll_proto_n2a(unsigned short id, char *buf, int len) 93const char * ll_proto_n2a(unsigned short id, char *buf, int len)
94{ 94{
95 int i; 95 int i;
96 96
diff --git a/networking/libiproute/ll_types.c b/networking/libiproute/ll_types.c
index f39f777e1..6b42426d5 100644
--- a/networking/libiproute/ll_types.c
+++ b/networking/libiproute/ll_types.c
@@ -13,7 +13,7 @@
13 13
14#include <linux/if_arp.h> 14#include <linux/if_arp.h>
15 15
16char * ll_type_n2a(int type, char *buf, int len) 16const char * ll_type_n2a(int type, char *buf, int len)
17{ 17{
18#define __PF(f,n) { ARPHRD_##f, #n }, 18#define __PF(f,n) { ARPHRD_##f, #n },
19static struct { 19static struct {
diff --git a/networking/libiproute/rt_names.c b/networking/libiproute/rt_names.c
index d503645b0..ff93c9e72 100644
--- a/networking/libiproute/rt_names.c
+++ b/networking/libiproute/rt_names.c
@@ -76,7 +76,7 @@ static void rtnl_rtprot_initialize(void)
76 rtnl_rtprot_tab, 256); 76 rtnl_rtprot_tab, 256);
77} 77}
78 78
79char * rtnl_rtprot_n2a(int id, char *buf, int len) 79const char * rtnl_rtprot_n2a(int id, char *buf, int len)
80{ 80{
81 if (id<0 || id>=256) { 81 if (id<0 || id>=256) {
82 snprintf(buf, len, "%d", id); 82 snprintf(buf, len, "%d", id);
@@ -143,7 +143,7 @@ static void rtnl_rtscope_initialize(void)
143 rtnl_rtscope_tab, 256); 143 rtnl_rtscope_tab, 256);
144} 144}
145 145
146char * rtnl_rtscope_n2a(int id, char *buf, int len) 146const char * rtnl_rtscope_n2a(int id, char *buf, int len)
147{ 147{
148 if (id<0 || id>=256) { 148 if (id<0 || id>=256) {
149 snprintf(buf, len, "%d", id); 149 snprintf(buf, len, "%d", id);
@@ -206,7 +206,7 @@ static void rtnl_rtrealm_initialize(void)
206 rtnl_rtrealm_tab, 256); 206 rtnl_rtrealm_tab, 256);
207} 207}
208 208
209char * rtnl_rtrealm_n2a(int id, char *buf, int len) 209const char * rtnl_rtrealm_n2a(int id, char *buf, int len)
210{ 210{
211 if (id<0 || id>=256) { 211 if (id<0 || id>=256) {
212 snprintf(buf, len, "%d", id); 212 snprintf(buf, len, "%d", id);
@@ -272,7 +272,7 @@ static void rtnl_rttable_initialize(void)
272 rtnl_rttable_tab, 256); 272 rtnl_rttable_tab, 256);
273} 273}
274 274
275char * rtnl_rttable_n2a(int id, char *buf, int len) 275const char * rtnl_rttable_n2a(int id, char *buf, int len)
276{ 276{
277 if (id<0 || id>=256) { 277 if (id<0 || id>=256) {
278 snprintf(buf, len, "%d", id); 278 snprintf(buf, len, "%d", id);
@@ -334,7 +334,7 @@ static void rtnl_rtdsfield_initialize(void)
334 rtnl_rtdsfield_tab, 256); 334 rtnl_rtdsfield_tab, 256);
335} 335}
336 336
337char * rtnl_dsfield_n2a(int id, char *buf, int len) 337const char * rtnl_dsfield_n2a(int id, char *buf, int len)
338{ 338{
339 if (id<0 || id>=256) { 339 if (id<0 || id>=256) {
340 snprintf(buf, len, "%d", id); 340 snprintf(buf, len, "%d", id);
diff --git a/networking/nameif.c b/networking/nameif.c
index 10f13b4bc..769b777f0 100644
--- a/networking/nameif.c
+++ b/networking/nameif.c
@@ -86,7 +86,7 @@ static void serror(const char *s, ...)
86} 86}
87 87
88/* Check ascii str_macaddr, convert and copy to *mac */ 88/* Check ascii str_macaddr, convert and copy to *mac */
89struct ether_addr *cc_macaddr(char *str_macaddr) 89static struct ether_addr *cc_macaddr(char *str_macaddr)
90{ 90{
91 struct ether_addr *lmac, *mac; 91 struct ether_addr *lmac, *mac;
92 92
diff --git a/networking/ping.c b/networking/ping.c
index 50f3930ff..c7cbd7078 100644
--- a/networking/ping.c
+++ b/networking/ping.c
@@ -178,7 +178,10 @@ static int myid, options;
178static unsigned long tmin = ULONG_MAX, tmax, tsum; 178static unsigned long tmin = ULONG_MAX, tmax, tsum;
179static char rcvd_tbl[MAX_DUP_CHK / 8]; 179static char rcvd_tbl[MAX_DUP_CHK / 8];
180 180
181struct hostent *hostent; 181#ifndef CONFIG_FEATURE_FANCY_PING6
182static
183#endif
184 struct hostent *hostent;
182 185
183static void sendping(int); 186static void sendping(int);
184static void pingstats(int); 187static void pingstats(int);
diff --git a/networking/route.c b/networking/route.c
index 5c092f452..9e14944c9 100644
--- a/networking/route.c
+++ b/networking/route.c
@@ -485,6 +485,7 @@ void set_flags(char *flagstr, int flags)
485 } 485 }
486} 486}
487 487
488/* also used in netstat */
488void displayroutes(int noresolve, int netstatfmt) 489void displayroutes(int noresolve, int netstatfmt)
489{ 490{
490 char devname[64], flags[16], sdest[16], sgw[16]; 491 char devname[64], flags[16], sdest[16], sgw[16];
diff --git a/networking/tftp.c b/networking/tftp.c
index 3c947318b..095dc58f9 100644
--- a/networking/tftp.c
+++ b/networking/tftp.c
@@ -71,8 +71,8 @@ static const char *tftp_bb_error_msg[] = {
71 "No such user" 71 "No such user"
72}; 72};
73 73
74const int tftp_cmd_get = 1; 74static const int tftp_cmd_get = 1;
75const int tftp_cmd_put = 2; 75static const int tftp_cmd_put = 2;
76 76
77#ifdef CONFIG_FEATURE_TFTP_BLOCKSIZE 77#ifdef CONFIG_FEATURE_TFTP_BLOCKSIZE
78 78
diff --git a/networking/udhcp/script.h b/networking/udhcp/script.h
index 87a20cc17..71003311c 100644
--- a/networking/udhcp/script.h
+++ b/networking/udhcp/script.h
@@ -1,6 +1,6 @@
1#ifndef _SCRIPT_H 1#ifndef _SCRIPT_H
2#define _SCRIPT_H 2#define _SCRIPT_H
3 3
4void run_script(struct dhcpMessage *packet, const char *name); 4extern void run_script(struct dhcpMessage *packet, const char *name);
5 5
6#endif 6#endif
diff --git a/networking/wget.c b/networking/wget.c
index 45acef4d6..59f30c06d 100644
--- a/networking/wget.c
+++ b/networking/wget.c
@@ -117,9 +117,9 @@ static char *safe_fgets(char *s, int size, FILE *stream)
117/* 117/*
118 * Base64-encode character string 118 * Base64-encode character string
119 * oops... isn't something similar in uuencode.c? 119 * oops... isn't something similar in uuencode.c?
120 * It would be better to use already existing code 120 * XXX: It would be better to use already existing code
121 */ 121 */
122char *base64enc(unsigned char *p, char *buf, int len) { 122static char *base64enc(unsigned char *p, char *buf, int len) {
123 123
124 char al[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" 124 char al[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
125 "0123456789+/"; 125 "0123456789+/";