blob: eb73c216211d350a988da1bcc989f2768062d45e [file] [log] [blame]
"Robert P. J. Day"63fc1a92006-07-02 19:47:05 +00001/* vi: set sw=4 ts=4: */
Mike Frysinger7031f622006-05-08 03:20:50 +00002/* common.h
3 *
4 * Russ Dill <Russ.Dill@asu.edu> September 2001
5 * Rewritten by Vladimir Oleynik <dzo@simtreas.ru> (C) 2003
6 *
Rob Landley3f785612006-05-28 01:06:36 +00007 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
Mike Frysinger7031f622006-05-08 03:20:50 +00008 */
9
10#ifndef _COMMON_H
11#define _COMMON_H
12
Mike Frysinger7031f622006-05-08 03:20:50 +000013#include "libbb_udhcp.h"
14
15
Mike Frysinger7031f622006-05-08 03:20:50 +000016enum 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 Frysinger7031f622006-05-08 03:20:50 +000025#include <syslog.h>
Mike Frysinger7031f622006-05-08 03:20:50 +000026
27long uptime(void);
Mike Frysinger7031f622006-05-08 03:20:50 +000028
29#define LOG(level, str, args...) udhcp_logging(level, str, ## args)
30
Rob Landley3f785612006-05-28 01:06:36 +000031#if ENABLE_FEATURE_UDHCP_DEBUG
Mike Frysinger7031f622006-05-08 03:20:50 +000032# 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