summaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
authorEric Andersen2005-04-16 19:39:00 +0000
committerEric Andersen2005-04-16 19:39:00 +0000
commit14f5c8d764ab7429367feb407ab86191054e6a8a (patch)
tree2aa792b8a9d8f7af365c456f19f34a963236c26d /networking
parenta77b4f39708306d44058d7ca1683f448f51c5fce (diff)
downloadbusybox-14f5c8d764ab7429367feb407ab86191054e6a8a.zip
busybox-14f5c8d764ab7429367feb407ab86191054e6a8a.tar.gz
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 7279e86..95ca1ed 100644
--- a/networking/arping.c
+++ b/networking/arping.c
@@ -106,7 +106,7 @@ static int send_pack(int sock, struct in_addr *src_addr,
return err;
}
-void finish(void)
+static void finish(void)
{
if (!quiet) {
printf("Sent %d probes (%d broadcast(s))\n", sent, brd_sent);
@@ -129,7 +129,7 @@ void finish(void)
exit(!received);
}
-void catcher(void)
+static void catcher(void)
{
struct timeval tv;
static struct timeval start;
@@ -151,7 +151,7 @@ void catcher(void)
alarm(1);
}
-int recv_pack(unsigned char *buf, int len, struct sockaddr_ll *FROM)
+static int recv_pack(unsigned char *buf, int len, struct sockaddr_ll *FROM)
{
struct timeval tv;
struct arphdr *ah = (struct arphdr *) buf;
diff --git a/networking/ifupdown.c b/networking/ifupdown.c
index f93f502..9169481 100644
--- a/networking/ifupdown.c
+++ b/networking/ifupdown.c
@@ -462,7 +462,7 @@ static struct method_t methods6[] = {
{ "loopback", loopback_up6, loopback_down6, },
};
-struct address_family_t addr_inet6 = {
+static struct address_family_t addr_inet6 = {
"inet6",
sizeof(methods6) / sizeof(struct method_t),
methods6
@@ -611,7 +611,7 @@ static struct method_t methods[] =
{ "loopback", loopback_up, loopback_down, },
};
-struct address_family_t addr_inet =
+static struct address_family_t addr_inet =
{
"inet",
sizeof(methods) / sizeof(struct method_t),
diff --git a/networking/libiproute/ipaddress.c b/networking/libiproute/ipaddress.c
index 7e0c757..da7a67b 100644
--- a/networking/libiproute/ipaddress.c
+++ b/networking/libiproute/ipaddress.c
@@ -48,7 +48,7 @@ static struct
struct rtnl_handle *rth;
} filter;
-void print_link_flags(FILE *fp, unsigned flags, unsigned mdown)
+static void print_link_flags(FILE *fp, unsigned flags, unsigned mdown)
{
fprintf(fp, "<");
flags &= ~IFF_RUNNING;
diff --git a/networking/libiproute/iptunnel.c b/networking/libiproute/iptunnel.c
index f8713e0..85c6099 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)
return -1;
}
-int do_del(int argc, char **argv)
+static int do_del(int argc, char **argv)
{
struct ip_tunnel_parm p;
@@ -381,7 +381,7 @@ int do_del(int argc, char **argv)
return -1;
}
-void print_tunnel(struct ip_tunnel_parm *p)
+static void print_tunnel(struct ip_tunnel_parm *p)
{
char s1[256];
char s2[256];
diff --git a/networking/libiproute/ll_proto.c b/networking/libiproute/ll_proto.c
index 9b5260b..104fbca 100644
--- a/networking/libiproute/ll_proto.c
+++ b/networking/libiproute/ll_proto.c
@@ -90,7 +90,7 @@ __PF(ECONET,econet)
#undef __PF
-char * ll_proto_n2a(unsigned short id, char *buf, int len)
+const char * ll_proto_n2a(unsigned short id, char *buf, int len)
{
int i;
diff --git a/networking/libiproute/ll_types.c b/networking/libiproute/ll_types.c
index f39f777..6b42426 100644
--- a/networking/libiproute/ll_types.c
+++ b/networking/libiproute/ll_types.c
@@ -13,7 +13,7 @@
#include <linux/if_arp.h>
-char * ll_type_n2a(int type, char *buf, int len)
+const char * ll_type_n2a(int type, char *buf, int len)
{
#define __PF(f,n) { ARPHRD_##f, #n },
static struct {
diff --git a/networking/libiproute/rt_names.c b/networking/libiproute/rt_names.c
index d503645..ff93c9e 100644
--- a/networking/libiproute/rt_names.c
+++ b/networking/libiproute/rt_names.c
@@ -76,7 +76,7 @@ static void rtnl_rtprot_initialize(void)
rtnl_rtprot_tab, 256);
}
-char * rtnl_rtprot_n2a(int id, char *buf, int len)
+const char * rtnl_rtprot_n2a(int id, char *buf, int len)
{
if (id<0 || id>=256) {
snprintf(buf, len, "%d", id);
@@ -143,7 +143,7 @@ static void rtnl_rtscope_initialize(void)
rtnl_rtscope_tab, 256);
}
-char * rtnl_rtscope_n2a(int id, char *buf, int len)
+const char * rtnl_rtscope_n2a(int id, char *buf, int len)
{
if (id<0 || id>=256) {
snprintf(buf, len, "%d", id);
@@ -206,7 +206,7 @@ static void rtnl_rtrealm_initialize(void)
rtnl_rtrealm_tab, 256);
}
-char * rtnl_rtrealm_n2a(int id, char *buf, int len)
+const char * rtnl_rtrealm_n2a(int id, char *buf, int len)
{
if (id<0 || id>=256) {
snprintf(buf, len, "%d", id);
@@ -272,7 +272,7 @@ static void rtnl_rttable_initialize(void)
rtnl_rttable_tab, 256);
}
-char * rtnl_rttable_n2a(int id, char *buf, int len)
+const char * rtnl_rttable_n2a(int id, char *buf, int len)
{
if (id<0 || id>=256) {
snprintf(buf, len, "%d", id);
@@ -334,7 +334,7 @@ static void rtnl_rtdsfield_initialize(void)
rtnl_rtdsfield_tab, 256);
}
-char * rtnl_dsfield_n2a(int id, char *buf, int len)
+const char * rtnl_dsfield_n2a(int id, char *buf, int len)
{
if (id<0 || id>=256) {
snprintf(buf, len, "%d", id);
diff --git a/networking/nameif.c b/networking/nameif.c
index 10f13b4..769b777 100644
--- a/networking/nameif.c
+++ b/networking/nameif.c
@@ -86,7 +86,7 @@ static void serror(const char *s, ...)
}
/* Check ascii str_macaddr, convert and copy to *mac */
-struct ether_addr *cc_macaddr(char *str_macaddr)
+static struct ether_addr *cc_macaddr(char *str_macaddr)
{
struct ether_addr *lmac, *mac;
diff --git a/networking/ping.c b/networking/ping.c
index 50f3930..c7cbd70 100644
--- a/networking/ping.c
+++ b/networking/ping.c
@@ -178,7 +178,10 @@ static int myid, options;
static unsigned long tmin = ULONG_MAX, tmax, tsum;
static char rcvd_tbl[MAX_DUP_CHK / 8];
-struct hostent *hostent;
+#ifndef CONFIG_FEATURE_FANCY_PING6
+static
+#endif
+ struct hostent *hostent;
static void sendping(int);
static void pingstats(int);
diff --git a/networking/route.c b/networking/route.c
index 5c092f4..9e14944 100644
--- a/networking/route.c
+++ b/networking/route.c
@@ -485,6 +485,7 @@ void set_flags(char *flagstr, int flags)
}
}
+/* also used in netstat */
void displayroutes(int noresolve, int netstatfmt)
{
char devname[64], flags[16], sdest[16], sgw[16];
diff --git a/networking/tftp.c b/networking/tftp.c
index 3c94731..095dc58 100644
--- a/networking/tftp.c
+++ b/networking/tftp.c
@@ -71,8 +71,8 @@ static const char *tftp_bb_error_msg[] = {
"No such user"
};
-const int tftp_cmd_get = 1;
-const int tftp_cmd_put = 2;
+static const int tftp_cmd_get = 1;
+static const int tftp_cmd_put = 2;
#ifdef CONFIG_FEATURE_TFTP_BLOCKSIZE
diff --git a/networking/udhcp/script.h b/networking/udhcp/script.h
index 87a20cc..7100331 100644
--- a/networking/udhcp/script.h
+++ b/networking/udhcp/script.h
@@ -1,6 +1,6 @@
#ifndef _SCRIPT_H
#define _SCRIPT_H
-void run_script(struct dhcpMessage *packet, const char *name);
+extern void run_script(struct dhcpMessage *packet, const char *name);
#endif
diff --git a/networking/wget.c b/networking/wget.c
index 45acef4..59f30c0 100644
--- a/networking/wget.c
+++ b/networking/wget.c
@@ -117,9 +117,9 @@ static char *safe_fgets(char *s, int size, FILE *stream)
/*
* Base64-encode character string
* oops... isn't something similar in uuencode.c?
- * It would be better to use already existing code
+ * XXX: It would be better to use already existing code
*/
-char *base64enc(unsigned char *p, char *buf, int len) {
+static char *base64enc(unsigned char *p, char *buf, int len) {
char al[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
"0123456789+/";