The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/sys/syslog.h

Version: -  FREEBSD  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-2  -  FREEBSD-11-1  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-4  -  FREEBSD-10-3  -  FREEBSD-10-2  -  FREEBSD-10-1  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-3  -  FREEBSD-9-2  -  FREEBSD-9-1  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-4  -  FREEBSD-8-3  -  FREEBSD-8-2  -  FREEBSD-8-1  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-4  -  FREEBSD-7-3  -  FREEBSD-7-2  -  FREEBSD-7-1  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-4  -  FREEBSD-6-3  -  FREEBSD-6-2  -  FREEBSD-6-1  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-5  -  FREEBSD-5-4  -  FREEBSD-5-3  -  FREEBSD-5-2  -  FREEBSD-5-1  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  linux-2.6  -  linux-2.4.22  -  MK83  -  MK84  -  PLAN9  -  DFBSD  -  NETBSD  -  NETBSD5  -  NETBSD4  -  NETBSD3  -  NETBSD20  -  OPENBSD  -  xnu-517  -  xnu-792  -  xnu-792.6.70  -  xnu-1228  -  xnu-1456.1.26  -  xnu-1699.24.8  -  xnu-2050.18.24  -  OPENSOLARIS  -  minix-3-1-1 
SearchContext: -  none  -  3  -  10 

    1 /* 
    2  * Mach Operating System
    3  * Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University
    4  * All Rights Reserved.
    5  * 
    6  * Permission to use, copy, modify and distribute this software and its
    7  * documentation is hereby granted, provided that both the copyright
    8  * notice and this permission notice appear in all copies of the
    9  * software, derivative works or modified versions, and any portions
   10  * thereof, and that both notices appear in supporting documentation.
   11  * 
   12  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
   13  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
   14  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
   15  * 
   16  * Carnegie Mellon requests users of this software to return to
   17  *
   18  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
   19  *  School of Computer Science
   20  *  Carnegie Mellon University
   21  *  Pittsburgh PA 15213-3890
   22  *
   23  * any improvements or extensions that they make and grant Carnegie Mellon rights
   24  * to redistribute these changes.
   25  */
   26 /*
   27  * HISTORY
   28  * $Log:        syslog.h,v $
   29  * Revision 2.4  91/05/14  17:40:18  mrt
   30  *      Correcting copyright
   31  * 
   32  * Revision 2.3  91/05/13  06:07:15  af
   33  *      Removed CMU conditionals.
   34  *      [91/05/12  16:31:12  af]
   35  * 
   36  * Revision 2.2  91/02/05  17:56:53  mrt
   37  *      Changed to new Mach copyright
   38  *      [91/02/01  17:49:22  mrt]
   39  * 
   40  * Revision 2.1  89/08/03  16:10:10  rwd
   41  * Created.
   42  * 
   43  */
   44 
   45 /*
   46  * Copyright (c) 1982, 1986, 1988 Regents of the University of California.
   47  * All rights reserved.
   48  *
   49  * Redistribution and use in source and binary forms are permitted
   50  * provided that the above copyright notice and this paragraph are
   51  * duplicated in all such forms and that any documentation,
   52  * advertising materials, and other materials related to such
   53  * distribution and use acknowledge that the software was developed
   54  * by the University of California, Berkeley.  The name of the
   55  * University may not be used to endorse or promote products derived
   56  * from this software without specific prior written permission.
   57  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
   58  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
   59  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   60  *
   61  *      @(#)syslog.h    7.10 (Berkeley) 6/27/88
   62  */
   63 
   64 /*
   65  *  Facility codes
   66  */
   67 
   68 #ifndef _SYS_SYSLOG_H_
   69 #define _SYS_SYSLOG_H_
   70 
   71 #define LOG_KERN        (0<<3)  /* kernel messages */
   72 #define LOG_USER        (1<<3)  /* random user-level messages */
   73 #define LOG_MAIL        (2<<3)  /* mail system */
   74 #define LOG_DAEMON      (3<<3)  /* system daemons */
   75 #define LOG_AUTH        (4<<3)  /* security/authorization messages */
   76 #define LOG_SYSLOG      (5<<3)  /* messages generated internally by syslogd */
   77 #define LOG_LPR         (6<<3)  /* line printer subsystem */
   78 #define LOG_NEWS        (7<<3)  /* network news subsystem */
   79 #define LOG_UUCP        (8<<3)  /* UUCP subsystem */
   80         /* other codes through 15 reserved for system use */
   81 #define LOG_LOCAL0      (16<<3) /* reserved for local use */
   82 #define LOG_LOCAL1      (17<<3) /* reserved for local use */
   83 #define LOG_LOCAL2      (18<<3) /* reserved for local use */
   84 #define LOG_LOCAL3      (19<<3) /* reserved for local use */
   85 #define LOG_LOCAL4      (20<<3) /* reserved for local use */
   86 #define LOG_LOCAL5      (21<<3) /* reserved for local use */
   87 #define LOG_LOCAL6      (22<<3) /* reserved for local use */
   88 #define LOG_LOCAL7      (23<<3) /* reserved for local use */
   89 
   90 #define LOG_NFACILITIES 24      /* maximum number of facilities */
   91 #define LOG_FACMASK     0x03f8  /* mask to extract facility part */
   92 
   93 #define LOG_FAC(p)      (((p) & LOG_FACMASK) >> 3)      /* facility of pri */
   94 
   95 /*
   96  *  Priorities (these are ordered)
   97  */
   98 
   99 #define LOG_EMERG       0       /* system is unusable */
  100 #define LOG_ALERT       1       /* action must be taken immediately */
  101 #define LOG_CRIT        2       /* critical conditions */
  102 #define LOG_ERR         3       /* error conditions */
  103 #define LOG_WARNING     4       /* warning conditions */
  104 #define LOG_NOTICE      5       /* normal but signification condition */
  105 #define LOG_INFO        6       /* informational */
  106 #define LOG_DEBUG       7       /* debug-level messages */
  107 
  108 #define LOG_PRIMASK     0x0007  /* mask to extract priority part (internal) */
  109 #define LOG_PRI(p)      ((p) & LOG_PRIMASK)     /* extract priority */
  110 
  111 #define LOG_MAKEPRI(fac, pri)   (((fac) << 3) | (pri))
  112 
  113 #ifdef KERNEL
  114 #define LOG_PRINTF      -1      /* pseudo-priority to indicate use of printf */
  115 #endif
  116 
  117 /*
  118  * arguments to setlogmask.
  119  */
  120 #define LOG_MASK(pri)   (1 << (pri))            /* mask for one priority */
  121 #define LOG_UPTO(pri)   ((1 << ((pri)+1)) - 1)  /* all priorities through pri */
  122 
  123 /*
  124  *  Option flags for openlog.
  125  *
  126  *      LOG_ODELAY no longer does anything; LOG_NDELAY is the
  127  *      inverse of what it used to be.
  128  */
  129 #define LOG_PID         0x01    /* log the pid with each message */
  130 #define LOG_CONS        0x02    /* log on the console if errors in sending */
  131 #define LOG_ODELAY      0x04    /* delay open until first syslog() (default) */
  132 #define LOG_NDELAY      0x08    /* don't delay open */
  133 #define LOG_NOWAIT      0x10    /* if forking to log on console, don't wait() */
  134 
  135 #if     defined(__STDC__)
  136 extern void openlog(const char *, int);
  137 extern void syslog(int, const char *, ...);
  138 extern void closelog(void);
  139 extern void setlogmask(int);
  140 #endif  defined(__STDC__)
  141 #endif  _SYS_SYSLOG_H_

Cache object: 2d356c85be146e67fcc4e30137caea0d


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.