xref: /illumos-gate/usr/src/cmd/bnu/log.h (revision 2a8bcb4efb45d99ac41c94a75c396b362c414f7f)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
28 /*	  All Rights Reserved  	*/
29 
30 #ifndef LOG_H
31 #define	LOG_H
32 
33 #define	MCHAR		'M'	/* Indicates master */
34 #define SCHAR		'S'	/* Indicates slave */
35 
36 #define	CLOSED		(-1)	/* Shows log file is closed. */
37 #define	EOR		"\n"	/* Unity end of record character. */
38 #define	LOGSIZE		1024	/* Maximum size of a log record. */
39 #define	MODSTR		50	/* Value to use for moderate sized strings. */
40 #define	COMPLETE	'C'	/* Value to use for completed transfer. */
41 #define	PARTIAL		'P'	/* Value to use for partial transfer. */
42 #define	NOTAVAIL	"\"\""	/* String to show that a field is not
43 				 *   available. */
44 #define	NOTIME		(-1)	/* Value to be used when no times have been
45 				 *   recorded. */
46 #ifndef STATIC_FUNC
47 #define	STATIC_FUNC	static	/* For debugging may not want static
48 				 *   functions. */
49 #endif
50 
51 /* Debug levels: */
52 
53 #define	DB_IMPORTANT	1	/* This message is printed if debugging is
54 				 *   turned on at all.  Thus, it should be
55 				 *   used for the most important messages. */
56 #define DB_TRACE	4	/* This level is useful in tracing program
57 				 *   actions. */
58 #define	DB_DETAIL	9	/* This level will only be printed when
59 				 *   great detail is needed. */
60 
61 extern void pfConnected();		/* perfstat.c */
62 extern void pfEndFile();		/* perfstat.c */
63 extern void pfEndXfer();		/* perfstat.c */
64 extern void pfFindFile();		/* perfstat.c */
65 extern void pfFound();			/* perfstat.c */
66 extern void pfInit();			/* perfstat.c */
67 extern void pfStrtConn();		/* perfstat.c */
68 extern void pfStrtXfer();		/* perfstat.c */
69 extern void pfPtcl();			/* perfstat.c */
70 extern void acConnected();		/* account.c */
71 extern void acDojob();			/* account.c */
72 extern void acInc();			/* account.c */
73 extern void acInit();			/* account.c */
74 extern void acEnd();			/* account.c */
75 extern void acRexe();			/* account.c */
76 extern void acEndexe();			/* account.c */
77 extern void scInit();			/* security.c */
78 extern void scReqsys();			/* security.c */
79 extern void scRequser();		/* security.c */
80 extern void scDest();			/* security.c */
81 extern void scSrc();			/* security.c */
82 extern void scStime();			/* security.c */
83 extern void scEtime();			/* security.c */
84 extern void scWrite();			/* security.c */
85 extern void scRexe();			/* security.c */
86 extern void scWlog();			/* security.c */
87 extern char * scMtime();		/* security.c */
88 extern char * scOwn();			/* security.c */
89 extern char * scSize();			/* security.c */
90 extern void copyText();			/* perfstat.c */
91 extern void writeLog();			/* perfstat.c */
92 extern int openLog();			/* perfstat.c */
93 extern void closeLog();			/* perfstat.c */
94 extern char *	gmt();			/* perfstat.c */
95 extern time_t  	cpucycle();		/* account.c */
96 
97 #endif	/* LOG_H */
98