dmake: do not set MAKEFLAGS=k
[unleashed/tickless.git] / usr / src / lib / libdhcputil / common / dhcpmsg.h
blob2dad24040a041ad1244002c73b09d7c56f2f590a
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
19 * CDDL HEADER END
22 * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
26 #ifndef _DHCPMSG_H
27 #define _DHCPMSG_H
29 #pragma ident "%Z%%M% %I% %E% SMI"
31 #include <sys/types.h>
32 #include <stdarg.h>
33 #include <syslog.h>
34 #include <errno.h> /* since consumers may want to 0 errno */
37 * dhcpmsg.[ch] comprise the interface used to log messages, either to
38 * syslog(3C), or to the screen, depending on the debug level. see
39 * dhcpmsg.c for documentation on how to use the exported functions.
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
47 * the syslog levels, while useful, do not provide enough flexibility
48 * to do everything we want. consequently, we introduce another set
49 * of levels, which map to a syslog level, but also potentially add
50 * additional behavior.
53 enum {
54 MSG_DEBUG, /* LOG_DEBUG, only if debug_level is 1 */
55 MSG_DEBUG2, /* LOG_DEBUG, only if debug_level is 1 or 2 */
56 MSG_INFO, /* LOG_INFO */
57 MSG_VERBOSE, /* LOG_INFO, only if is_verbose is true */
58 MSG_NOTICE, /* LOG_NOTICE */
59 MSG_WARNING, /* LOG_WARNING */
60 MSG_ERR, /* LOG_ERR, use errno if nonzero */
61 MSG_ERROR, /* LOG_ERR */
62 MSG_CRIT /* LOG_CRIT */
65 /* PRINTFLIKE2 */
66 extern void dhcpmsg(int, const char *, ...);
67 extern void dhcpmsg_init(const char *, boolean_t, boolean_t, int);
68 extern void dhcpmsg_fini(void);
70 #ifdef __cplusplus
72 #endif
74 #endif /* _DHCPMSG_H */