xref: /freebsd/usr.sbin/ppp/log.h (revision af57ed9fdcc4e2a81940fc2243c0d3949fc0e00f)
1af57ed9fSAtsushi Murai /*
2af57ed9fSAtsushi Murai  *	    Written by Toshiharu OHNO (tony-o@iij.ad.jp)
3af57ed9fSAtsushi Murai  *
4af57ed9fSAtsushi Murai  *   Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd.
5af57ed9fSAtsushi Murai  *
6af57ed9fSAtsushi Murai  * Redistribution and use in source and binary forms are permitted
7af57ed9fSAtsushi Murai  * provided that the above copyright notice and this paragraph are
8af57ed9fSAtsushi Murai  * duplicated in all such forms and that any documentation,
9af57ed9fSAtsushi Murai  * advertising materials, and other materials related to such
10af57ed9fSAtsushi Murai  * distribution and use acknowledge that the software was developed
11af57ed9fSAtsushi Murai  * by the Internet Initiative Japan.  The name of the
12af57ed9fSAtsushi Murai  * IIJ may not be used to endorse or promote products derived
13af57ed9fSAtsushi Murai  * from this software without specific prior written permission.
14af57ed9fSAtsushi Murai  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
15af57ed9fSAtsushi Murai  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
16af57ed9fSAtsushi Murai  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
17af57ed9fSAtsushi Murai  *
18af57ed9fSAtsushi Murai  * $Id:$
19af57ed9fSAtsushi Murai  *
20af57ed9fSAtsushi Murai  *	TODO:
21af57ed9fSAtsushi Murai  */
22af57ed9fSAtsushi Murai 
23af57ed9fSAtsushi Murai #ifndef _LOG_H_
24af57ed9fSAtsushi Murai #define	_LOG_H_
25af57ed9fSAtsushi Murai /*
26af57ed9fSAtsushi Murai  *  Definition of log level
27af57ed9fSAtsushi Murai  */
28af57ed9fSAtsushi Murai #define	LOG_PHASE	0
29af57ed9fSAtsushi Murai #		define	LM_PHASE	"Phase"
30af57ed9fSAtsushi Murai #define	LOG_CHAT	1
31af57ed9fSAtsushi Murai #		define	LM_CHAT		"Chat"
32af57ed9fSAtsushi Murai #define	LOG_LQM		2
33af57ed9fSAtsushi Murai #		define	LM_LQM		"LQM"
34af57ed9fSAtsushi Murai #define	LOG_LCP		3
35af57ed9fSAtsushi Murai #		define	LM_LCP		"LCP"
36af57ed9fSAtsushi Murai #define	LOG_TCPIP	4
37af57ed9fSAtsushi Murai #		define	LM_TCPIP	"TCP/IP"
38af57ed9fSAtsushi Murai #define	LOG_HDLC	5
39af57ed9fSAtsushi Murai #		define	LM_HDLC		"HDLC"
40af57ed9fSAtsushi Murai #define	LOG_ASYNC	6
41af57ed9fSAtsushi Murai #		define	LM_ASYNC	"Async"
42af57ed9fSAtsushi Murai #define	MAXLOGLEVEL	7
43af57ed9fSAtsushi Murai 
44af57ed9fSAtsushi Murai extern int loglevel;
45af57ed9fSAtsushi Murai 
46af57ed9fSAtsushi Murai extern void LogTimeStamp();
47af57ed9fSAtsushi Murai extern int LogOpen();
48af57ed9fSAtsushi Murai extern void DupLog();
49af57ed9fSAtsushi Murai extern void LogClose();
50af57ed9fSAtsushi Murai extern void logprintf(), LogPrintf();
51af57ed9fSAtsushi Murai extern void LogDumpBp(int level, char *header, struct mbuf *bp);
52af57ed9fSAtsushi Murai extern void LogDumpBuff(int level, char *header, u_char *ptr, int cnt);
53af57ed9fSAtsushi Murai #endif
54