diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-09-30 17:55:43 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-09-30 17:55:43 +0000 |
commit | deabacdf91c6d1c3cfcdb4cd06780807193de81d (patch) | |
tree | 546e3aac68a3d6388a518f0bb8c5a64b6570f158 | |
parent | d7b3350eb3eb8d906702db2d845196bab8c98e6e (diff) | |
download | busybox-w32-deabacdf91c6d1c3cfcdb4cd06780807193de81d.tar.gz busybox-w32-deabacdf91c6d1c3cfcdb4cd06780807193de81d.tar.bz2 busybox-w32-deabacdf91c6d1c3cfcdb4cd06780807193de81d.zip |
move udhcp_{client/server}_config to common_bufsiz1
udhcp_run_script 1108 1151 +43
init_packet 209 210 +1
udhcpc_main 2395 2393 -2
udhcp_client_config 56 - -56
udhcp_server_config 88 - -88
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 2/1 up/down: 44/-146) Total: -102 bytes
text data bss dec hex filename
771326 1029 9696 782051 beee3 busybox_old
771383 1029 9552 781964 bee8c busybox_unstripped
-rw-r--r-- | networking/udhcp/common.h | 4 | ||||
-rw-r--r-- | networking/udhcp/dhcpc.c | 2 | ||||
-rw-r--r-- | networking/udhcp/dhcpc.h | 2 | ||||
-rw-r--r-- | networking/udhcp/dhcpd.c | 2 | ||||
-rw-r--r-- | networking/udhcp/dhcpd.h | 3 |
5 files changed, 5 insertions, 8 deletions
diff --git a/networking/udhcp/common.h b/networking/udhcp/common.h index 33417af09..4864c8565 100644 --- a/networking/udhcp/common.h +++ b/networking/udhcp/common.h | |||
@@ -73,10 +73,6 @@ void udhcp_run_script(struct dhcpMessage *packet, const char *name); | |||
73 | /* from socket.h */ | 73 | /* from socket.h */ |
74 | #define listen_socket udhcp_listen_socket | 74 | #define listen_socket udhcp_listen_socket |
75 | #define read_interface udhcp_read_interface | 75 | #define read_interface udhcp_read_interface |
76 | /* from dhcpc.h */ | ||
77 | #define client_config udhcp_client_config | ||
78 | /* from dhcpd.h */ | ||
79 | #define server_config udhcp_server_config | ||
80 | 76 | ||
81 | void udhcp_sp_setup(void); | 77 | void udhcp_sp_setup(void); |
82 | int udhcp_sp_fd_set(fd_set *rfds, int extra_fd); | 78 | int udhcp_sp_fd_set(fd_set *rfds, int extra_fd); |
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c index 961a1712a..ca478b3c5 100644 --- a/networking/udhcp/dhcpc.c +++ b/networking/udhcp/dhcpc.c | |||
@@ -37,7 +37,7 @@ static smallint listen_mode; | |||
37 | 37 | ||
38 | static smallint state; | 38 | static smallint state; |
39 | 39 | ||
40 | struct client_config_t client_config; | 40 | /* struct client_config_t client_config is in bb_common_bufsiz1 */ |
41 | 41 | ||
42 | 42 | ||
43 | /* just a little helper */ | 43 | /* just a little helper */ |
diff --git a/networking/udhcp/dhcpc.h b/networking/udhcp/dhcpc.h index 20f4e52b8..8da1dd8e1 100644 --- a/networking/udhcp/dhcpc.h +++ b/networking/udhcp/dhcpc.h | |||
@@ -33,7 +33,7 @@ struct client_config_t { | |||
33 | uint8_t arp[6]; /* Our arp address */ | 33 | uint8_t arp[6]; /* Our arp address */ |
34 | }; | 34 | }; |
35 | 35 | ||
36 | extern struct client_config_t client_config; | 36 | #define client_config (*(struct client_config_t*)&bb_common_bufsiz1) |
37 | 37 | ||
38 | 38 | ||
39 | /*** clientpacket.h ***/ | 39 | /*** clientpacket.h ***/ |
diff --git a/networking/udhcp/dhcpd.c b/networking/udhcp/dhcpd.c index e722833e1..3466312d1 100644 --- a/networking/udhcp/dhcpd.c +++ b/networking/udhcp/dhcpd.c | |||
@@ -18,7 +18,7 @@ | |||
18 | 18 | ||
19 | /* globals */ | 19 | /* globals */ |
20 | struct dhcpOfferedAddr *leases; | 20 | struct dhcpOfferedAddr *leases; |
21 | struct server_config_t server_config; | 21 | /* struct server_config_t server_config is in bb_common_bufsiz1 */ |
22 | 22 | ||
23 | 23 | ||
24 | int udhcpd_main(int argc, char **argv); | 24 | int udhcpd_main(int argc, char **argv); |
diff --git a/networking/udhcp/dhcpd.h b/networking/udhcp/dhcpd.h index fc6b1d6ab..28106d306 100644 --- a/networking/udhcp/dhcpd.h +++ b/networking/udhcp/dhcpd.h | |||
@@ -54,7 +54,8 @@ struct server_config_t { | |||
54 | struct static_lease *static_leases; /* List of ip/mac pairs to assign static leases */ | 54 | struct static_lease *static_leases; /* List of ip/mac pairs to assign static leases */ |
55 | }; | 55 | }; |
56 | 56 | ||
57 | extern struct server_config_t server_config; | 57 | #define server_config (*(struct server_config_t*)&bb_common_bufsiz1) |
58 | |||
58 | extern struct dhcpOfferedAddr *leases; | 59 | extern struct dhcpOfferedAddr *leases; |
59 | 60 | ||
60 | 61 | ||