1*0Sstevel@tonic-gate /* from UCB 7.1 6/5/86 */ 2*0Sstevel@tonic-gate 3*0Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 4*0Sstevel@tonic-gate 5*0Sstevel@tonic-gate /* 6*0Sstevel@tonic-gate * Copyright (c) 1982, 1986 Regents of the University of California. 7*0Sstevel@tonic-gate * All rights reserved. The Berkeley software License Agreement 8*0Sstevel@tonic-gate * specifies the terms and conditions for redistribution. 9*0Sstevel@tonic-gate */ 10*0Sstevel@tonic-gate 11*0Sstevel@tonic-gate #ifndef _sys_syslog_h 12*0Sstevel@tonic-gate #define _sys_syslog_h 13*0Sstevel@tonic-gate 14*0Sstevel@tonic-gate /* 15*0Sstevel@tonic-gate * Facility codes 16*0Sstevel@tonic-gate */ 17*0Sstevel@tonic-gate #define LOG_KERN (0<<3) /* kernel messages */ 18*0Sstevel@tonic-gate #define LOG_USER (1<<3) /* random user-level messages */ 19*0Sstevel@tonic-gate #define LOG_MAIL (2<<3) /* mail system */ 20*0Sstevel@tonic-gate #define LOG_DAEMON (3<<3) /* system daemons */ 21*0Sstevel@tonic-gate #define LOG_AUTH (4<<3) /* security/authorization messages */ 22*0Sstevel@tonic-gate #define LOG_SYSLOG (5<<3) /* messages generated internally by syslogd */ 23*0Sstevel@tonic-gate #define LOG_LPR (6<<3) /* line printer subsystem */ 24*0Sstevel@tonic-gate #define LOG_NEWS (7<<3) /* netnews subsystem */ 25*0Sstevel@tonic-gate #define LOG_UUCP (8<<3) /* uucp subsystem */ 26*0Sstevel@tonic-gate #define LOG_CRON (15<<3) /* cron/at subsystem */ 27*0Sstevel@tonic-gate /* other codes through 15 reserved for system use */ 28*0Sstevel@tonic-gate #define LOG_LOCAL0 (16<<3) /* reserved for local use */ 29*0Sstevel@tonic-gate #define LOG_LOCAL1 (17<<3) /* reserved for local use */ 30*0Sstevel@tonic-gate #define LOG_LOCAL2 (18<<3) /* reserved for local use */ 31*0Sstevel@tonic-gate #define LOG_LOCAL3 (19<<3) /* reserved for local use */ 32*0Sstevel@tonic-gate #define LOG_LOCAL4 (20<<3) /* reserved for local use */ 33*0Sstevel@tonic-gate #define LOG_LOCAL5 (21<<3) /* reserved for local use */ 34*0Sstevel@tonic-gate #define LOG_LOCAL6 (22<<3) /* reserved for local use */ 35*0Sstevel@tonic-gate #define LOG_LOCAL7 (23<<3) /* reserved for local use */ 36*0Sstevel@tonic-gate 37*0Sstevel@tonic-gate #define LOG_NFACILITIES 24 /* maximum number of facilities */ 38*0Sstevel@tonic-gate #define LOG_FACMASK 0x03f8 /* mask to extract facility part */ 39*0Sstevel@tonic-gate 40*0Sstevel@tonic-gate /* 41*0Sstevel@tonic-gate * Priorities (these are ordered) 42*0Sstevel@tonic-gate */ 43*0Sstevel@tonic-gate #define LOG_EMERG 0 /* system is unusable */ 44*0Sstevel@tonic-gate #define LOG_ALERT 1 /* action must be taken immediately */ 45*0Sstevel@tonic-gate #define LOG_CRIT 2 /* critical conditions */ 46*0Sstevel@tonic-gate #define LOG_ERR 3 /* error conditions */ 47*0Sstevel@tonic-gate #define LOG_WARNING 4 /* warning conditions */ 48*0Sstevel@tonic-gate #define LOG_NOTICE 5 /* normal but signification condition */ 49*0Sstevel@tonic-gate #define LOG_INFO 6 /* informational */ 50*0Sstevel@tonic-gate #define LOG_DEBUG 7 /* debug-level messages */ 51*0Sstevel@tonic-gate 52*0Sstevel@tonic-gate #define LOG_PRIMASK 0x0007 /* mask to extract priority part (internal) */ 53*0Sstevel@tonic-gate 54*0Sstevel@tonic-gate /* 55*0Sstevel@tonic-gate * arguments to setlogmask. 56*0Sstevel@tonic-gate */ 57*0Sstevel@tonic-gate #define LOG_MASK(pri) (1 << (pri)) /* mask for one priority */ 58*0Sstevel@tonic-gate #define LOG_UPTO(pri) ((1 << ((pri)+1)) - 1) /* all priorities through pri */ 59*0Sstevel@tonic-gate 60*0Sstevel@tonic-gate /* 61*0Sstevel@tonic-gate * Option flags for openlog. 62*0Sstevel@tonic-gate * 63*0Sstevel@tonic-gate * LOG_ODELAY no longer does anything; LOG_NDELAY is the 64*0Sstevel@tonic-gate * inverse of what it used to be. 65*0Sstevel@tonic-gate */ 66*0Sstevel@tonic-gate #define LOG_PID 0x01 /* log the pid with each message */ 67*0Sstevel@tonic-gate #define LOG_CONS 0x02 /* log on the console if errors in sending */ 68*0Sstevel@tonic-gate #define LOG_ODELAY 0x04 /* delay open until syslog() is called */ 69*0Sstevel@tonic-gate #define LOG_NDELAY 0x08 /* don't delay open */ 70*0Sstevel@tonic-gate #define LOG_NOWAIT 0x10 /* if forking to log on console, don't wait() */ 71*0Sstevel@tonic-gate 72*0Sstevel@tonic-gate #endif /*!_sys_syslog_h*/ 73