1 /* 2 * Written by Toshiharu OHNO (tony-o@iij.ad.jp) 3 * 4 * Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd. 5 * 6 * Redistribution and use in source and binary forms are permitted 7 * provided that the above copyright notice and this paragraph are 8 * duplicated in all such forms and that any documentation, 9 * advertising materials, and other materials related to such 10 * distribution and use acknowledge that the software was developed 11 * by the Internet Initiative Japan. The name of the 12 * IIJ may not be used to endorse or promote products derived 13 * from this software without specific prior written permission. 14 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 15 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 16 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 17 * 18 * $Id: log.h,v 1.8 1997/02/22 16:10:27 peter Exp $ 19 * 20 * TODO: 21 */ 22 23 #ifndef _LOG_H_ 24 #define _LOG_H_ 25 #include "cdefs.h" 26 /* 27 * Definition of log level 28 */ 29 #define LOG_PHASE 0 30 #define LOG_PHASE_BIT (1 << LOG_PHASE) 31 # define LM_PHASE "Phase" 32 #define LOG_CHAT 1 33 #define LOG_CHAT_BIT (1 << LOG_CHAT) 34 # define LM_CHAT "Chat" 35 #define LOG_LQM 2 36 #define LOG_LQM_BIT (1 << LOG_LQM) 37 # define LM_LQM "LQM" 38 #define LOG_LCP 3 39 #define LOG_LCP_BIT (1 << LOG_LCP) 40 # define LM_LCP "LCP" 41 #define LOG_TCPIP 4 42 #define LOG_TCPIP_BIT (1 << LOG_TCPIP) 43 # define LM_TCPIP "TCP/IP" 44 #define LOG_HDLC 5 45 #define LOG_HDLC_BIT (1 << LOG_HDLC) 46 # define LM_HDLC "HDLC" 47 #define LOG_ASYNC 6 48 #define LOG_ASYNC_BIT (1 << LOG_ASYNC) 49 # define LM_ASYNC "Async" 50 #define LOG_LINK 7 51 #define LOG_LINK_BIT (1 << LOG_LINK) 52 # define LM_LINK "Link" 53 #define LOG_CONNECT 8 54 #define LOG_CONNECT_BIT (1 << LOG_CONNECT) 55 # define LM_CONNECT "Connect" 56 #define LOG_CARRIER 9 57 #define LOG_CARRIER_BIT (1 << LOG_CARRIER) 58 # define LM_CARRIER "Carrier" 59 #define MAXLOGLEVEL 10 60 61 extern int loglevel; 62 63 extern void LogTimeStamp __P((void)); 64 extern int LogOpen __P((void)); 65 extern void LogReOpen __P((int)); 66 extern void DupLog __P((void)); 67 extern void LogClose __P((void)); 68 extern void logprintf __P((char *, ...)), LogPrintf __P((int, char *, ...)); 69 extern void LogDumpBp __P((int level, char *header, struct mbuf *bp)); 70 extern void LogDumpBuff __P((int level, char *header, u_char *ptr, int cnt)); 71 extern void ListLog __P((void)); 72 #endif 73