blob: 77e689446110260a7c174c6a0a58447837298216 [file] [log] [blame]
Mike Frysinger7031f622006-05-08 03:20:50 +00001/* common.h
2 *
3 * Russ Dill <Russ.Dill@asu.edu> September 2001
4 * Rewritten by Vladimir Oleynik <dzo@simtreas.ru> (C) 2003
5 *
Rob Landley3f785612006-05-28 01:06:36 +00006 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
Mike Frysinger7031f622006-05-08 03:20:50 +00007 */
8
9#ifndef _COMMON_H
10#define _COMMON_H
11
Mike Frysinger7031f622006-05-08 03:20:50 +000012#include "libbb_udhcp.h"
13
14
Mike Frysinger7031f622006-05-08 03:20:50 +000015enum 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};
Mike Frysinger7031f622006-05-08 03:20:50 +000024#include <syslog.h>
Mike Frysinger7031f622006-05-08 03:20:50 +000025
26long uptime(void);
Mike Frysinger7031f622006-05-08 03:20:50 +000027
28#define LOG(level, str, args...) udhcp_logging(level, str, ## args)
29
Rob Landley3f785612006-05-28 01:06:36 +000030#if ENABLE_FEATURE_UDHCP_DEBUG
Mike Frysinger7031f622006-05-08 03:20:50 +000031# 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