Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/smexe_ro.../usr/include/sys
File: syslog.h
/*
[0] Fix | Delete
* Copyright (c) 1982, 1986, 1988, 1993
[1] Fix | Delete
* The Regents of the University of California. All rights reserved.
[2] Fix | Delete
*
[3] Fix | Delete
* Redistribution and use in source and binary forms, with or without
[4] Fix | Delete
* modification, are permitted provided that the following conditions
[5] Fix | Delete
* are met:
[6] Fix | Delete
* 1. Redistributions of source code must retain the above copyright
[7] Fix | Delete
* notice, this list of conditions and the following disclaimer.
[8] Fix | Delete
* 2. Redistributions in binary form must reproduce the above copyright
[9] Fix | Delete
* notice, this list of conditions and the following disclaimer in the
[10] Fix | Delete
* documentation and/or other materials provided with the distribution.
[11] Fix | Delete
* 4. Neither the name of the University nor the names of its contributors
[12] Fix | Delete
* may be used to endorse or promote products derived from this software
[13] Fix | Delete
* without specific prior written permission.
[14] Fix | Delete
*
[15] Fix | Delete
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
[16] Fix | Delete
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
[17] Fix | Delete
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
[18] Fix | Delete
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
[19] Fix | Delete
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
[20] Fix | Delete
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
[21] Fix | Delete
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
[22] Fix | Delete
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
[23] Fix | Delete
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
[24] Fix | Delete
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
[25] Fix | Delete
* SUCH DAMAGE.
[26] Fix | Delete
*
[27] Fix | Delete
* @(#)syslog.h 8.1 (Berkeley) 6/2/93
[28] Fix | Delete
*/
[29] Fix | Delete
[30] Fix | Delete
#ifndef _SYS_SYSLOG_H
[31] Fix | Delete
#define _SYS_SYSLOG_H 1
[32] Fix | Delete
[33] Fix | Delete
#include <features.h>
[34] Fix | Delete
#define __need___va_list
[35] Fix | Delete
#include <stdarg.h>
[36] Fix | Delete
[37] Fix | Delete
/* This file defines _PATH_LOG. */
[38] Fix | Delete
#include <bits/syslog-path.h>
[39] Fix | Delete
[40] Fix | Delete
/*
[41] Fix | Delete
* priorities/facilities are encoded into a single 32-bit quantity, where the
[42] Fix | Delete
* bottom 3 bits are the priority (0-7) and the top 28 bits are the facility
[43] Fix | Delete
* (0-big number). Both the priorities and the facilities map roughly
[44] Fix | Delete
* one-to-one to strings in the syslogd(8) source code. This mapping is
[45] Fix | Delete
* included in this file.
[46] Fix | Delete
*
[47] Fix | Delete
* priorities (these are ordered)
[48] Fix | Delete
*/
[49] Fix | Delete
#define LOG_EMERG 0 /* system is unusable */
[50] Fix | Delete
#define LOG_ALERT 1 /* action must be taken immediately */
[51] Fix | Delete
#define LOG_CRIT 2 /* critical conditions */
[52] Fix | Delete
#define LOG_ERR 3 /* error conditions */
[53] Fix | Delete
#define LOG_WARNING 4 /* warning conditions */
[54] Fix | Delete
#define LOG_NOTICE 5 /* normal but significant condition */
[55] Fix | Delete
#define LOG_INFO 6 /* informational */
[56] Fix | Delete
#define LOG_DEBUG 7 /* debug-level messages */
[57] Fix | Delete
[58] Fix | Delete
#define LOG_PRIMASK 0x07 /* mask to extract priority part (internal) */
[59] Fix | Delete
/* extract priority */
[60] Fix | Delete
#define LOG_PRI(p) ((p) & LOG_PRIMASK)
[61] Fix | Delete
#define LOG_MAKEPRI(fac, pri) ((fac) | (pri))
[62] Fix | Delete
[63] Fix | Delete
#ifdef SYSLOG_NAMES
[64] Fix | Delete
#define INTERNAL_NOPRI 0x10 /* the "no priority" priority */
[65] Fix | Delete
/* mark "facility" */
[66] Fix | Delete
#define INTERNAL_MARK LOG_MAKEPRI(LOG_NFACILITIES << 3, 0)
[67] Fix | Delete
typedef struct _code {
[68] Fix | Delete
char *c_name;
[69] Fix | Delete
int c_val;
[70] Fix | Delete
} CODE;
[71] Fix | Delete
[72] Fix | Delete
CODE prioritynames[] =
[73] Fix | Delete
{
[74] Fix | Delete
{ "alert", LOG_ALERT },
[75] Fix | Delete
{ "crit", LOG_CRIT },
[76] Fix | Delete
{ "debug", LOG_DEBUG },
[77] Fix | Delete
{ "emerg", LOG_EMERG },
[78] Fix | Delete
{ "err", LOG_ERR },
[79] Fix | Delete
{ "error", LOG_ERR }, /* DEPRECATED */
[80] Fix | Delete
{ "info", LOG_INFO },
[81] Fix | Delete
{ "none", INTERNAL_NOPRI }, /* INTERNAL */
[82] Fix | Delete
{ "notice", LOG_NOTICE },
[83] Fix | Delete
{ "panic", LOG_EMERG }, /* DEPRECATED */
[84] Fix | Delete
{ "warn", LOG_WARNING }, /* DEPRECATED */
[85] Fix | Delete
{ "warning", LOG_WARNING },
[86] Fix | Delete
{ NULL, -1 }
[87] Fix | Delete
};
[88] Fix | Delete
#endif
[89] Fix | Delete
[90] Fix | Delete
/* facility codes */
[91] Fix | Delete
#define LOG_KERN (0<<3) /* kernel messages */
[92] Fix | Delete
#define LOG_USER (1<<3) /* random user-level messages */
[93] Fix | Delete
#define LOG_MAIL (2<<3) /* mail system */
[94] Fix | Delete
#define LOG_DAEMON (3<<3) /* system daemons */
[95] Fix | Delete
#define LOG_AUTH (4<<3) /* security/authorization messages */
[96] Fix | Delete
#define LOG_SYSLOG (5<<3) /* messages generated internally by syslogd */
[97] Fix | Delete
#define LOG_LPR (6<<3) /* line printer subsystem */
[98] Fix | Delete
#define LOG_NEWS (7<<3) /* network news subsystem */
[99] Fix | Delete
#define LOG_UUCP (8<<3) /* UUCP subsystem */
[100] Fix | Delete
#define LOG_CRON (9<<3) /* clock daemon */
[101] Fix | Delete
#define LOG_AUTHPRIV (10<<3) /* security/authorization messages (private) */
[102] Fix | Delete
#define LOG_FTP (11<<3) /* ftp daemon */
[103] Fix | Delete
[104] Fix | Delete
/* other codes through 15 reserved for system use */
[105] Fix | Delete
#define LOG_LOCAL0 (16<<3) /* reserved for local use */
[106] Fix | Delete
#define LOG_LOCAL1 (17<<3) /* reserved for local use */
[107] Fix | Delete
#define LOG_LOCAL2 (18<<3) /* reserved for local use */
[108] Fix | Delete
#define LOG_LOCAL3 (19<<3) /* reserved for local use */
[109] Fix | Delete
#define LOG_LOCAL4 (20<<3) /* reserved for local use */
[110] Fix | Delete
#define LOG_LOCAL5 (21<<3) /* reserved for local use */
[111] Fix | Delete
#define LOG_LOCAL6 (22<<3) /* reserved for local use */
[112] Fix | Delete
#define LOG_LOCAL7 (23<<3) /* reserved for local use */
[113] Fix | Delete
[114] Fix | Delete
#define LOG_NFACILITIES 24 /* current number of facilities */
[115] Fix | Delete
#define LOG_FACMASK 0x03f8 /* mask to extract facility part */
[116] Fix | Delete
/* facility of pri */
[117] Fix | Delete
#define LOG_FAC(p) (((p) & LOG_FACMASK) >> 3)
[118] Fix | Delete
[119] Fix | Delete
#ifdef SYSLOG_NAMES
[120] Fix | Delete
CODE facilitynames[] =
[121] Fix | Delete
{
[122] Fix | Delete
{ "auth", LOG_AUTH },
[123] Fix | Delete
{ "authpriv", LOG_AUTHPRIV },
[124] Fix | Delete
{ "cron", LOG_CRON },
[125] Fix | Delete
{ "daemon", LOG_DAEMON },
[126] Fix | Delete
{ "ftp", LOG_FTP },
[127] Fix | Delete
{ "kern", LOG_KERN },
[128] Fix | Delete
{ "lpr", LOG_LPR },
[129] Fix | Delete
{ "mail", LOG_MAIL },
[130] Fix | Delete
{ "mark", INTERNAL_MARK }, /* INTERNAL */
[131] Fix | Delete
{ "news", LOG_NEWS },
[132] Fix | Delete
{ "security", LOG_AUTH }, /* DEPRECATED */
[133] Fix | Delete
{ "syslog", LOG_SYSLOG },
[134] Fix | Delete
{ "user", LOG_USER },
[135] Fix | Delete
{ "uucp", LOG_UUCP },
[136] Fix | Delete
{ "local0", LOG_LOCAL0 },
[137] Fix | Delete
{ "local1", LOG_LOCAL1 },
[138] Fix | Delete
{ "local2", LOG_LOCAL2 },
[139] Fix | Delete
{ "local3", LOG_LOCAL3 },
[140] Fix | Delete
{ "local4", LOG_LOCAL4 },
[141] Fix | Delete
{ "local5", LOG_LOCAL5 },
[142] Fix | Delete
{ "local6", LOG_LOCAL6 },
[143] Fix | Delete
{ "local7", LOG_LOCAL7 },
[144] Fix | Delete
{ NULL, -1 }
[145] Fix | Delete
};
[146] Fix | Delete
#endif
[147] Fix | Delete
[148] Fix | Delete
/*
[149] Fix | Delete
* arguments to setlogmask.
[150] Fix | Delete
*/
[151] Fix | Delete
#define LOG_MASK(pri) (1 << (pri)) /* mask for one priority */
[152] Fix | Delete
#define LOG_UPTO(pri) ((1 << ((pri)+1)) - 1) /* all priorities through pri */
[153] Fix | Delete
[154] Fix | Delete
/*
[155] Fix | Delete
* Option flags for openlog.
[156] Fix | Delete
*
[157] Fix | Delete
* LOG_ODELAY no longer does anything.
[158] Fix | Delete
* LOG_NDELAY is the inverse of what it used to be.
[159] Fix | Delete
*/
[160] Fix | Delete
#define LOG_PID 0x01 /* log the pid with each message */
[161] Fix | Delete
#define LOG_CONS 0x02 /* log on the console if errors in sending */
[162] Fix | Delete
#define LOG_ODELAY 0x04 /* delay open until first syslog() (default) */
[163] Fix | Delete
#define LOG_NDELAY 0x08 /* don't delay open */
[164] Fix | Delete
#define LOG_NOWAIT 0x10 /* don't wait for console forks: DEPRECATED */
[165] Fix | Delete
#define LOG_PERROR 0x20 /* log to stderr as well */
[166] Fix | Delete
[167] Fix | Delete
__BEGIN_DECLS
[168] Fix | Delete
[169] Fix | Delete
/* Close descriptor used to write to system logger.
[170] Fix | Delete
[171] Fix | Delete
This function is a possible cancellation point and therefore not
[172] Fix | Delete
marked with __THROW. */
[173] Fix | Delete
extern void closelog (void);
[174] Fix | Delete
[175] Fix | Delete
/* Open connection to system logger.
[176] Fix | Delete
[177] Fix | Delete
This function is a possible cancellation point and therefore not
[178] Fix | Delete
marked with __THROW. */
[179] Fix | Delete
extern void openlog (const char *__ident, int __option, int __facility);
[180] Fix | Delete
[181] Fix | Delete
/* Set the log mask level. */
[182] Fix | Delete
extern int setlogmask (int __mask) __THROW;
[183] Fix | Delete
[184] Fix | Delete
/* Generate a log message using FMT string and option arguments.
[185] Fix | Delete
[186] Fix | Delete
This function is a possible cancellation point and therefore not
[187] Fix | Delete
marked with __THROW. */
[188] Fix | Delete
extern void syslog (int __pri, const char *__fmt, ...)
[189] Fix | Delete
__attribute__ ((__format__ (__printf__, 2, 3)));
[190] Fix | Delete
[191] Fix | Delete
#ifdef __USE_MISC
[192] Fix | Delete
/* Generate a log message using FMT and using arguments pointed to by AP.
[193] Fix | Delete
[194] Fix | Delete
This function is not part of POSIX and therefore no official
[195] Fix | Delete
cancellation point. But due to similarity with an POSIX interface
[196] Fix | Delete
or due to the implementation it is a cancellation point and
[197] Fix | Delete
therefore not marked with __THROW. */
[198] Fix | Delete
extern void vsyslog (int __pri, const char *__fmt, __gnuc_va_list __ap)
[199] Fix | Delete
__attribute__ ((__format__ (__printf__, 2, 0)));
[200] Fix | Delete
#endif
[201] Fix | Delete
[202] Fix | Delete
[203] Fix | Delete
/* Define some macros helping to catch buffer overflows. */
[204] Fix | Delete
#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function
[205] Fix | Delete
# include <bits/syslog.h>
[206] Fix | Delete
#endif
[207] Fix | Delete
#ifdef __LDBL_COMPAT
[208] Fix | Delete
# include <bits/syslog-ldbl.h>
[209] Fix | Delete
#endif
[210] Fix | Delete
[211] Fix | Delete
__END_DECLS
[212] Fix | Delete
[213] Fix | Delete
#endif /* sys/syslog.h */
[214] Fix | Delete
[215] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function