diff options
author | "Vladimir N. Oleynik" <dzo@simtreas.ru> | 2005-09-22 15:07:33 +0000 |
---|---|---|
committer | "Vladimir N. Oleynik" <dzo@simtreas.ru> | 2005-09-22 15:07:33 +0000 |
commit | 2f9c30a2d567ba7bdb6351e0167eb0b59735b898 (patch) | |
tree | e811a2285654327b344c1fb242683acb2782f2b8 | |
parent | ac9731704a03d08b061ee02853e7cebe36964aba (diff) | |
download | busybox-w32-2f9c30a2d567ba7bdb6351e0167eb0b59735b898.tar.gz busybox-w32-2f9c30a2d567ba7bdb6351e0167eb0b59735b898.tar.bz2 busybox-w32-2f9c30a2d567ba7bdb6351e0167eb0b59735b898.zip |
safe exported namespace for udhcp. Not full, bore :-(
-rw-r--r-- | networking/udhcp/common.h | 4 | ||||
-rw-r--r-- | networking/udhcp/packet.h | 6 | ||||
-rw-r--r-- | networking/udhcp/pidfile.h | 3 | ||||
-rw-r--r-- | networking/udhcp/script.c | 1 | ||||
-rw-r--r-- | networking/udhcp/script.h | 1 |
5 files changed, 14 insertions, 1 deletions
diff --git a/networking/udhcp/common.h b/networking/udhcp/common.h index ca19a2497..e474f5e97 100644 --- a/networking/udhcp/common.h +++ b/networking/udhcp/common.h | |||
@@ -39,10 +39,12 @@ enum syslog_levels { | |||
39 | #include <syslog.h> | 39 | #include <syslog.h> |
40 | #endif | 40 | #endif |
41 | 41 | ||
42 | #define background udhcp_background | ||
43 | #define start_log_and_pid udhcp_start_log_and_pid | ||
44 | |||
42 | long uptime(void); | 45 | long uptime(void); |
43 | void background(const char *pidfile); | 46 | void background(const char *pidfile); |
44 | void start_log_and_pid(const char *client_server, const char *pidfile); | 47 | void start_log_and_pid(const char *client_server, const char *pidfile); |
45 | void background(const char *pidfile); | ||
46 | void udhcp_logging(int level, const char *fmt, ...); | 48 | void udhcp_logging(int level, const char *fmt, ...); |
47 | 49 | ||
48 | #define LOG(level, str, args...) udhcp_logging(level, str, ## args) | 50 | #define LOG(level, str, args...) udhcp_logging(level, str, ## args) |
diff --git a/networking/udhcp/packet.h b/networking/udhcp/packet.h index f5859e824..b2be5d7f7 100644 --- a/networking/udhcp/packet.h +++ b/networking/udhcp/packet.h | |||
@@ -29,6 +29,12 @@ struct udp_dhcp_packet { | |||
29 | struct dhcpMessage data; | 29 | struct dhcpMessage data; |
30 | }; | 30 | }; |
31 | 31 | ||
32 | #define init_header udhcp_init_header | ||
33 | #define get_packet udhcp_get_packet | ||
34 | #define checksum udhcp_checksum | ||
35 | #define raw_packet udhcp_raw_packet | ||
36 | #define kernel_packet udhcp_kernel_packet | ||
37 | |||
32 | void init_header(struct dhcpMessage *packet, char type); | 38 | void init_header(struct dhcpMessage *packet, char type); |
33 | int get_packet(struct dhcpMessage *packet, int fd); | 39 | int get_packet(struct dhcpMessage *packet, int fd); |
34 | uint16_t checksum(void *addr, int count); | 40 | uint16_t checksum(void *addr, int count); |
diff --git a/networking/udhcp/pidfile.h b/networking/udhcp/pidfile.h index ea97d1de5..b1292a816 100644 --- a/networking/udhcp/pidfile.h +++ b/networking/udhcp/pidfile.h | |||
@@ -20,6 +20,9 @@ | |||
20 | */ | 20 | */ |
21 | 21 | ||
22 | 22 | ||
23 | #define pidfile_acquire udhcp_pidfile_acquire | ||
24 | #define pidfile_write_release udhcp_pidfile_write_release | ||
25 | |||
23 | int pidfile_acquire(const char *pidfile); | 26 | int pidfile_acquire(const char *pidfile); |
24 | void pidfile_write_release(int pid_fd); | 27 | void pidfile_write_release(int pid_fd); |
25 | 28 | ||
diff --git a/networking/udhcp/script.c b/networking/udhcp/script.c index 820fbb064..e08d765bb 100644 --- a/networking/udhcp/script.c +++ b/networking/udhcp/script.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include "dhcpd.h" | 33 | #include "dhcpd.h" |
34 | #include "dhcpc.h" | 34 | #include "dhcpc.h" |
35 | #include "common.h" | 35 | #include "common.h" |
36 | #include "script.h" | ||
36 | 37 | ||
37 | /* get a rough idea of how long an option will be (rounding up...) */ | 38 | /* get a rough idea of how long an option will be (rounding up...) */ |
38 | static const int max_option_length[] = { | 39 | static const int max_option_length[] = { |
diff --git a/networking/udhcp/script.h b/networking/udhcp/script.h index 71003311c..ab2c9fba6 100644 --- a/networking/udhcp/script.h +++ b/networking/udhcp/script.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef _SCRIPT_H | 1 | #ifndef _SCRIPT_H |
2 | #define _SCRIPT_H | 2 | #define _SCRIPT_H |
3 | 3 | ||
4 | #define run_script udhcp_run_script | ||
4 | extern void run_script(struct dhcpMessage *packet, const char *name); | 5 | extern void run_script(struct dhcpMessage *packet, const char *name); |
5 | 6 | ||
6 | #endif | 7 | #endif |