8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / common / net / wanboot / bootlog.h
blobe90b9df7e732ac41fd684fa26043775a20382ebd
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
20 * CDDL HEADER END
23 * Copyright 2002-2003 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 #ifndef _BOOTLOG_H
28 #define _BOOTLOG_H
30 #pragma ident "%Z%%M% %I% %E% SMI"
33 * bootlog - error notification and progress reporting interface
34 * for WAN boot components
35 * XXX some of this stuff should be split out into a bootlog_impl.h file.
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
43 * code translation struct for use in processing config file
45 struct code {
46 char *c_name;
47 int c_val;
50 #define BOOTLOG_CONN_RETRIES 3 /* max http connect retries */
51 #define BOOTLOG_HTTP_TIMEOUT 10 /* http read timeout */
53 #define BOOTLOG_MAX_URL 1024 /* max bootlog URL len */
54 #define BOOTLOG_QS_MAX 1024 /* max unencoded len of query string */
56 #define BOOTLOG_MSG_MAX_LEN 80 /* maximum message body length */
59 * severity codes
61 typedef enum {
62 BOOTLOG_EMERG = 1, /* panic condition */
63 BOOTLOG_ALERT, /* condition that should be corrected now */
64 BOOTLOG_CRIT, /* critical condition - e.g. network errors */
65 BOOTLOG_WARNING, /* warning messages */
66 BOOTLOG_INFO, /* informational messages */
67 BOOTLOG_PROGRESS, /* progress reports */
68 BOOTLOG_DEBUG, /* debug messages */
69 BOOTLOG_VERBOSE, /* verbose mode messages */
70 NOPRI /* 'no-priority' priority */
71 } bootlog_severity_t;
74 /* PRINTFLIKE3 */
75 extern void bootlog(const char *, bootlog_severity_t, char *, ...);
76 /* PRINTFLIKE2 */
77 extern void libbootlog(bootlog_severity_t, char *, ...);
79 #ifdef __cplusplus
81 #endif
83 #endif /* _BOOTLOG_H */