Drizzled Public API Documentation

names.h
00001 /*
00002  * Copyright (C) 1982, 1986, 1988, 1993
00003  *      The Regents of the University of California.  All rights reserved.
00004  *
00005  * Redistribution and use in source and binary forms, with or without
00006  * modification, are permitted provided that the following conditions
00007  * are met:
00008  * 1. Redistributions of source code must retain the above copyright
00009  *    notice, this list of conditions and the following disclaimer.
00010  * 2. Redistributions in binary form must reproduce the above copyright
00011  *    notice, this list of conditions and the following disclaimer in the
00012  *    documentation and/or other materials provided with the distribution.
00013  * 4. Neither the name of the University nor the names of its contributors
00014  *    may be used to endorse or promote products derived from this software
00015  *    without specific prior written permission.
00016  *
00017  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00027  * SUCH DAMAGE.
00028  *
00029  *      @(#)syslog.h    8.1 (Berkeley) 6/2/93
00030  */
00031 #pragma once
00032 
00033 /* Solaris doesn't define these, so we copy them in. So Sad. */
00034 
00035 #ifndef LOG_FTP
00036 # define        LOG_FTP         (11<<3)
00037 #endif
00038 #ifndef LOG_AUTHPRIV
00039 # define        LOG_AUTHPRIV    (10<<3)
00040 #endif
00041 
00042 #define LOG_PRI(p)      ((p) & LOG_PRIMASK)
00043 #define LOG_MAKEPRI(fac, pri)   (((fac) << 3) | (pri))
00044 
00045 #define INTERNAL_NOPRI  0x10    /* the "no priority" priority */
00046                                 /* mark "facility" */
00047 #define INTERNAL_MARK   LOG_MAKEPRI(LOG_NFACILITIES, 0)
00048 typedef struct _code {
00049         const char    *c_name;
00050         int     c_val;
00051 } CODE;
00052 
00053 CODE prioritynames[] =
00054   {
00055     { "alert", LOG_ALERT },
00056     { "crit", LOG_CRIT },
00057     { "debug", LOG_DEBUG },
00058     { "emerg", LOG_EMERG },
00059     { "err", LOG_ERR },
00060     { "error", LOG_ERR },               /* DEPRECATED */
00061     { "info", LOG_INFO },
00062     { "none", INTERNAL_NOPRI },         /* INTERNAL */
00063     { "notice", LOG_NOTICE },
00064     { "panic", LOG_EMERG },             /* DEPRECATED */
00065     { "warn", LOG_WARNING },            /* DEPRECATED */
00066     { "warning", LOG_WARNING },
00067     { NULL, -1 }
00068   };
00069 
00070 
00071 CODE facilitynames[] =
00072   {
00073     { "auth", LOG_AUTH },
00074     { "authpriv", LOG_AUTHPRIV },
00075     { "cron", LOG_CRON },
00076     { "daemon", LOG_DAEMON },
00077     { "ftp", LOG_FTP },
00078     { "kern", LOG_KERN },
00079     { "lpr", LOG_LPR },
00080     { "mail", LOG_MAIL },
00081     { "mark", INTERNAL_MARK },          /* INTERNAL */
00082     { "news", LOG_NEWS },
00083     { "security", LOG_AUTH },           /* DEPRECATED */
00084     { "syslog", LOG_SYSLOG },
00085     { "user", LOG_USER },
00086     { "uucp", LOG_UUCP },
00087     { "local0", LOG_LOCAL0 },
00088     { "local1", LOG_LOCAL1 },
00089     { "local2", LOG_LOCAL2 },
00090     { "local3", LOG_LOCAL3 },
00091     { "local4", LOG_LOCAL4 },
00092     { "local5", LOG_LOCAL5 },
00093     { "local6", LOG_LOCAL6 },
00094     { "local7", LOG_LOCAL7 },
00095     { NULL, -1 }
00096   };
00097 
00098