1/* 2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. 3 * 4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5 * 6 * This file contains Original Code and/or Modifications of Original Code 7 * as defined in and that are subject to the Apple Public Source License 8 * Version 2.0 (the 'License'). You may not use this file except in 9 * compliance with the License. The rights granted to you under the License 10 * may not be used to create, or enable the creation or redistribution of, 11 * unlawful or unlicensed copies of an Apple operating system, or to 12 * circumvent, violate, or enable the circumvention or violation of, any 13 * terms of an Apple operating system software license agreement. 14 * 15 * Please obtain a copy of the License at 16 * http://www.opensource.apple.com/apsl/ and read it before using this file. 17 * 18 * The Original Code and all software distributed under the License are 19 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23 * Please see the License for the specific language governing rights and 24 * limitations under the License. 25 * 26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 */ 28/* 29 * @OSF_COPYRIGHT@ 30 */ 31/* 32 * HISTORY 33 * 34 * Revision 1.1.1.1 1998/09/22 21:05:48 wsanchez 35 * Import of Mac OS X kernel (~semeria) 36 * 37 * Revision 1.1.1.1 1998/03/07 02:25:59 wsanchez 38 * Import of OSF Mach kernel (~mburg) 39 * 40 * Revision 1.2.6.1 1994/09/23 03:13:08 ezf 41 * change marker to not FREE 42 * [1994/09/22 21:58:52 ezf] 43 * 44 * Revision 1.2.2.3 1993/08/03 18:30:38 gm 45 * CR9596: Change KERNEL to MACH_KERNEL. 46 * [1993/08/02 19:02:56 gm] 47 * 48 * Revision 1.2.2.2 1993/06/09 02:55:27 gm 49 * Added to OSF/1 R1.3 from NMK15.0. 50 * [1993/06/02 21:30:57 jeffc] 51 * 52 * Revision 1.2 1993/04/19 17:16:58 devrcs 53 * Fixes for ANSI C 54 * [1993/02/26 14:02:39 sp] 55 * 56 * Revision 1.1 1992/09/30 02:36:56 robert 57 * Initial revision 58 * 59 * $EndLog$ 60 */ 61/* CMU_HIST */ 62/* 63 * Revision 2.4 91/05/14 17:40:18 mrt 64 * Correcting copyright 65 * 66 * Revision 2.3 91/05/13 06:07:15 af 67 * Removed CMU conditionals. 68 * [91/05/12 16:31:12 af] 69 * 70 * Revision 2.2 91/02/05 17:56:53 mrt 71 * Changed to new Mach copyright 72 * [91/02/01 17:49:22 mrt] 73 * 74 * Revision 2.1 89/08/03 16:10:10 rwd 75 * Created. 76 * 77 */ 78/* CMU_ENDHIST */ 79/* 80 * Mach Operating System 81 * Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University 82 * All Rights Reserved. 83 * 84 * Permission to use, copy, modify and distribute this software and its 85 * documentation is hereby granted, provided that both the copyright 86 * notice and this permission notice appear in all copies of the 87 * software, derivative works or modified versions, and any portions 88 * thereof, and that both notices appear in supporting documentation. 89 * 90 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 91 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR 92 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 93 * 94 * Carnegie Mellon requests users of this software to return to 95 * 96 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 97 * School of Computer Science 98 * Carnegie Mellon University 99 * Pittsburgh PA 15213-3890 100 * 101 * any improvements or extensions that they make and grant Carnegie Mellon rights 102 * to redistribute these changes. 103 */ 104/* 105 */ 106 107/* 108 * Copyright (c) 1982, 1986, 1988 Regents of the University of California. 109 * All rights reserved. 110 * 111 * Redistribution and use in source and binary forms are permitted 112 * provided that the above copyright notice and this paragraph are 113 * duplicated in all such forms and that any documentation, 114 * advertising materials, and other materials related to such 115 * distribution and use acknowledge that the software was developed 116 * by the University of California, Berkeley. The name of the 117 * University may not be used to endorse or promote products derived 118 * from this software without specific prior written permission. 119 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 120 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 121 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 122 * 123 * @(#)syslog.h 7.10 (Berkeley) 6/27/88 124 */ 125 126/* 127 * Facility codes 128 */ 129 130#ifndef _SYS_SYSLOG_H_ 131#define _SYS_SYSLOG_H_ 132 133#define LOG_KERN (0<<3) /* kernel messages */ 134#define LOG_USER (1<<3) /* random user-level messages */ 135#define LOG_MAIL (2<<3) /* mail system */ 136#define LOG_DAEMON (3<<3) /* system daemons */ 137#define LOG_AUTH (4<<3) /* security/authorization messages */ 138#define LOG_SYSLOG (5<<3) /* messages generated internally by syslogd */ 139#define LOG_LPR (6<<3) /* line printer subsystem */ 140#define LOG_NEWS (7<<3) /* network news subsystem */ 141#define LOG_UUCP (8<<3) /* UUCP subsystem */ 142 /* other codes through 15 reserved for system use */ 143#define LOG_LOCAL0 (16<<3) /* reserved for local use */ 144#define LOG_LOCAL1 (17<<3) /* reserved for local use */ 145#define LOG_LOCAL2 (18<<3) /* reserved for local use */ 146#define LOG_LOCAL3 (19<<3) /* reserved for local use */ 147#define LOG_LOCAL4 (20<<3) /* reserved for local use */ 148#define LOG_LOCAL5 (21<<3) /* reserved for local use */ 149#define LOG_LOCAL6 (22<<3) /* reserved for local use */ 150#define LOG_LOCAL7 (23<<3) /* reserved for local use */ 151 152#define LOG_NFACILITIES 24 /* maximum number of facilities */ 153#define LOG_FACMASK 0x03f8 /* mask to extract facility part */ 154 155#define LOG_FAC(p) (((p) & LOG_FACMASK) >> 3) /* facility of pri */ 156 157/* 158 * Priorities (these are ordered) 159 */ 160 161#define LOG_EMERG 0 /* system is unusable */ 162#define LOG_ALERT 1 /* action must be taken immediately */ 163#define LOG_CRIT 2 /* critical conditions */ 164#define LOG_ERR 3 /* error conditions */ 165#define LOG_WARNING 4 /* warning conditions */ 166#define LOG_NOTICE 5 /* normal but signification condition */ 167#define LOG_INFO 6 /* informational */ 168#define LOG_DEBUG 7 /* debug-level messages */ 169 170#define LOG_PRIMASK 0x0007 /* mask to extract priority part (internal) */ 171#define LOG_PRI(p) ((p) & LOG_PRIMASK) /* extract priority */ 172 173#define LOG_MAKEPRI(fac, pri) (((fac) << 3) | (pri)) 174 175#ifdef MACH_KERNEL 176#define LOG_PRINTF -1 /* pseudo-priority to indicate use of printf */ 177#endif 178 179/* 180 * arguments to setlogmask. 181 */ 182#define LOG_MASK(pri) (1 << (pri)) /* mask for one priority */ 183#define LOG_UPTO(pri) ((1 << ((pri)+1)) - 1) /* all priorities through pri */ 184 185/* 186 * Option flags for openlog. 187 * 188 * LOG_ODELAY no longer does anything; LOG_NDELAY is the 189 * inverse of what it used to be. 190 */ 191#define LOG_PID 0x01 /* log the pid with each message */ 192#define LOG_CONS 0x02 /* log on the console if errors in sending */ 193#define LOG_ODELAY 0x04 /* delay open until first syslog() (default) */ 194#define LOG_NDELAY 0x08 /* don't delay open */ 195#define LOG_NOWAIT 0x10 /* if forking to log on console, don't wait() */ 196 197#if defined(__STDC__) 198extern void openlog(const char *, int); 199extern void syslog(int, const char *, ...); 200extern void closelog(void); 201extern void setlogmask(int); 202#endif /* defined(__STDC__) */ 203#endif /* _SYS_SYSLOG_H_ */ 204