move udhcp_{client/server}_config to common_bufsiz1
authorDenis Vlasenko <vda.linux@googlemail.com>
Sun, 30 Sep 2007 17:55:43 +0000 (17:55 -0000)
committerDenis Vlasenko <vda.linux@googlemail.com>
Sun, 30 Sep 2007 17:55:43 +0000 (17:55 -0000)
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

networking/udhcp/common.h
networking/udhcp/dhcpc.c
networking/udhcp/dhcpc.h
networking/udhcp/dhcpd.c
networking/udhcp/dhcpd.h

index 33417af098b6e1dbcec59e91c2702f111d8c6a38..4864c85659eb668e3e9e09f3ef8a5c5f5db3e3bb 100644 (file)
@@ -73,10 +73,6 @@ void udhcp_run_script(struct dhcpMessage *packet, const char *name);
 /* from socket.h */
 #define listen_socket          udhcp_listen_socket
 #define read_interface         udhcp_read_interface
-/* from dhcpc.h */
-#define client_config          udhcp_client_config
-/* from dhcpd.h */
-#define server_config          udhcp_server_config
 
 void udhcp_sp_setup(void);
 int udhcp_sp_fd_set(fd_set *rfds, int extra_fd);
index 961a1712af57e91d2ae8053f1ec6268305bf42cb..ca478b3c55db20541972f86a31d07d414fbf5756 100644 (file)
@@ -37,7 +37,7 @@ static smallint listen_mode;
 
 static smallint state;
 
-struct client_config_t client_config;
+/* struct client_config_t client_config is in bb_common_bufsiz1 */
 
 
 /* just a little helper */
index 20f4e52b8dc82bcc099fdd8229029ca1d2596809..8da1dd8e1726deaaf37dd1dc75f1cfe3a918f4ea 100644 (file)
@@ -33,7 +33,7 @@ struct client_config_t {
        uint8_t arp[6];                 /* Our arp address */
 };
 
-extern struct client_config_t client_config;
+#define client_config (*(struct client_config_t*)&bb_common_bufsiz1)
 
 
 /*** clientpacket.h ***/
index e722833e131dd0d78382e991715af5b230f7e571..3466312d1f511eeec24213b6f1fcc74387c8c679 100644 (file)
@@ -18,7 +18,7 @@
 
 /* globals */
 struct dhcpOfferedAddr *leases;
-struct server_config_t server_config;
+/* struct server_config_t server_config is in bb_common_bufsiz1 */
 
 
 int udhcpd_main(int argc, char **argv);
index fc6b1d6abf2cfb305136ab240200dc75bad3a344..28106d3060ea9ccc26167a00c41d35ee00afa851 100644 (file)
@@ -54,7 +54,8 @@ struct server_config_t {
        struct static_lease *static_leases; /* List of ip/mac pairs to assign static leases */
 };
 
-extern struct server_config_t server_config;
+#define server_config (*(struct server_config_t*)&bb_common_bufsiz1)
+
 extern struct dhcpOfferedAddr *leases;