My first bout of untangling udhcp. Make lots of gratuitous #defines go
[platform/upstream/busybox.git] / networking / udhcp / common.h
1 /* common.h
2  *
3  * Russ Dill <Russ.Dill@asu.edu> September 2001
4  * Rewritten by Vladimir Oleynik <dzo@simtreas.ru> (C) 2003
5  *
6  * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
7  */
8
9 #ifndef _COMMON_H
10 #define _COMMON_H
11
12 #include "libbb_udhcp.h"
13
14
15 enum syslog_levels {
16         LOG_EMERG = 0,
17         LOG_ALERT,
18         LOG_CRIT,
19         LOG_WARNING,
20         LOG_ERR,
21         LOG_INFO,
22         LOG_DEBUG
23 };
24 #include <syslog.h>
25
26 long uptime(void);
27
28 #define LOG(level, str, args...) udhcp_logging(level, str, ## args)
29
30 #if ENABLE_FEATURE_UDHCP_DEBUG
31 # define DEBUG(level, str, args...) LOG(level, str, ## args)
32 #else
33 # define DEBUG(level, str, args...) do {;} while(0)
34 #endif
35
36 #endif