"Robert P. J. Day" | 63fc1a9 | 2006-07-02 19:47:05 +0000 | [diff] [blame] | 1 | /* vi: set sw=4 ts=4: */ |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 2 | /* common.h |
| 3 | * |
| 4 | * Russ Dill <Russ.Dill@asu.edu> September 2001 |
| 5 | * Rewritten by Vladimir Oleynik <dzo@simtreas.ru> (C) 2003 |
| 6 | * |
Rob Landley | 3f78561 | 2006-05-28 01:06:36 +0000 | [diff] [blame] | 7 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 8 | */ |
| 9 | |
| 10 | #ifndef _COMMON_H |
| 11 | #define _COMMON_H |
| 12 | |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 13 | #include "libbb_udhcp.h" |
| 14 | |
| 15 | |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 16 | enum syslog_levels { |
| 17 | LOG_EMERG = 0, |
| 18 | LOG_ALERT, |
| 19 | LOG_CRIT, |
| 20 | LOG_WARNING, |
| 21 | LOG_ERR, |
| 22 | LOG_INFO, |
| 23 | LOG_DEBUG |
| 24 | }; |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 25 | #include <syslog.h> |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 26 | |
| 27 | long uptime(void); |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 28 | |
| 29 | #define LOG(level, str, args...) udhcp_logging(level, str, ## args) |
| 30 | |
Rob Landley | 3f78561 | 2006-05-28 01:06:36 +0000 | [diff] [blame] | 31 | #if ENABLE_FEATURE_UDHCP_DEBUG |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 32 | # define DEBUG(level, str, args...) LOG(level, str, ## args) |
| 33 | #else |
| 34 | # define DEBUG(level, str, args...) do {;} while(0) |
| 35 | #endif |
| 36 | |
| 37 | #endif |