diff options
Diffstat (limited to 'networking/udhcp/common.h')
-rw-r--r-- | networking/udhcp/common.h | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/networking/udhcp/common.h b/networking/udhcp/common.h index 768f551b0..78eb1c147 100644 --- a/networking/udhcp/common.h +++ b/networking/udhcp/common.h | |||
@@ -18,10 +18,14 @@ | |||
18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #ifndef _COMMON_H | ||
22 | #define _COMMON_H | ||
23 | |||
21 | #include "version.h" | 24 | #include "version.h" |
22 | #include "busybox.h" | 25 | #include "libbb_udhcp.h" |
26 | |||
23 | 27 | ||
24 | #ifndef CONFIG_FEATURE_UDHCP_SYSLOG | 28 | #ifndef UDHCP_SYSLOG |
25 | enum syslog_levels { | 29 | enum syslog_levels { |
26 | LOG_EMERG = 0, | 30 | LOG_EMERG = 0, |
27 | LOG_ALERT, | 31 | LOG_ALERT, |
@@ -35,18 +39,17 @@ enum syslog_levels { | |||
35 | #include <syslog.h> | 39 | #include <syslog.h> |
36 | #endif | 40 | #endif |
37 | 41 | ||
38 | void start_log(const char *client_server); | 42 | void background(const char *pidfile); |
43 | void start_log_and_pid(const char *client_server, const char *pidfile); | ||
39 | void background(const char *pidfile); | 44 | void background(const char *pidfile); |
40 | void udhcp_logging(int level, const char *fmt, ...); | 45 | void udhcp_logging(int level, const char *fmt, ...); |
41 | 46 | ||
42 | extern int udhcp_signal_pipe[2]; | ||
43 | void udhcp_set_signal_pipe(int sig_add); | ||
44 | |||
45 | |||
46 | #define LOG(level, str, args...) udhcp_logging(level, str, ## args) | 47 | #define LOG(level, str, args...) udhcp_logging(level, str, ## args) |
47 | 48 | ||
48 | #ifdef CONFIG_FEATURE_UDHCP_DEBUG | 49 | #ifdef UDHCP_DEBUG |
49 | # define DEBUG(level, str, args...) udhcp_logging(level, str, ## args) | 50 | # define DEBUG(level, str, args...) LOG(level, str, ## args) |
50 | #else | 51 | #else |
51 | # define DEBUG(level, str, args...) do {;} while(0) | 52 | # define DEBUG(level, str, args...) do {;} while(0) |
52 | #endif | 53 | #endif |
54 | |||
55 | #endif | ||