log.h revision 31921
1/*-
2 * Copyright (c) 1997 Brian Somers <brian@Awfulhak.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 *    notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 *    notice, this list of conditions and the following disclaimer in the
12 *    documentation and/or other materials provided with the distribution.
13 *
14 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 *	$Id$
27 */
28
29#define LogMIN		(1)
30#define LogASYNC	(1)	/* syslog(LOG_INFO, ....)	 */
31#define LogCARRIER	(2)
32#define LogCCP		(3)
33#define LogCHAT		(4)
34#define LogCOMMAND	(5)
35#define LogCONNECT	(6)
36#define LogDEBUG	(7)	/* syslog(LOG_DEBUG, ....)	 */
37#define LogHDLC		(8)
38#define LogID0		(9)
39#define LogIPCP		(10)
40#define LogLCP		(11)
41#define LogLINK		(12)
42#define LogLQM		(13)
43#define LogPHASE	(14)
44#define LogTCPIP	(15)
45#define LogTUN		(16)	/* If set, tun%d is output with each message */
46#define LogMAXCONF	(16)
47#define LogWARN		(17)	/* Sent to VarTerm else syslog(LOG_WARNING, ) */
48#define LogERROR	(18)	/* syslog(LOG_ERR, ....), + sent to VarTerm */
49#define LogALERT	(19)	/* syslog(LOG_ALERT, ....)	 */
50#define LogMAX		(19)
51
52/* The first int arg for all of the following is one of the above values */
53extern const char *LogName(int);
54extern void LogKeep(int);
55extern void LogKeepLocal(int);
56extern void LogDiscard(int);
57extern void LogDiscardLocal(int);
58extern void LogDiscardAll(void);
59extern void LogDiscardAllLocal(void);
60#define LOG_KEPT_SYSLOG (1)	/* Results of LogIsKept() */
61#define LOG_KEPT_LOCAL  (2)	/* Results of LogIsKept() */
62extern int LogIsKept(int);
63extern void LogOpen(const char *);
64extern void LogSetTun(int);
65extern void LogClose(void);
66extern void LogPrintf(int, const char *,...);
67extern void LogDumpBp(int, const char *, const struct mbuf *);
68extern void LogDumpBuff(int, const char *, const u_char *, int);
69