xref: /dflybsd-src/usr.sbin/clog/clog.h (revision 86d7f5d305c6adaa56ff4582ece9859d73106103)
1*86d7f5d3SJohn Marino /*-
2*86d7f5d3SJohn Marino  * Copyright (c) 2001
3*86d7f5d3SJohn Marino  *     Jeff Wheelhouse (jdw@wwwi.com)
4*86d7f5d3SJohn Marino  *
5*86d7f5d3SJohn Marino  * This code was originally developed by Jeff Wheelhouse (jdw@wwwi.com).
6*86d7f5d3SJohn Marino  *
7*86d7f5d3SJohn Marino  * Redistribution and use in source and binary forms, with or without
8*86d7f5d3SJohn Marino  * modification, are permitted provided that the following conditions
9*86d7f5d3SJohn Marino  * are met:
10*86d7f5d3SJohn Marino  * 1. Redistribution of source code must retail the above copyright
11*86d7f5d3SJohn Marino  *    notice, this list of conditions and the following disclaimer.
12*86d7f5d3SJohn Marino  * 2. Redistributions in binary form must reproduce the above copyright
13*86d7f5d3SJohn Marino  *    notice, this list of conditions and the following disclaimer in the
14*86d7f5d3SJohn Marino  *    documentation and/or other materials provided with the distribution.
15*86d7f5d3SJohn Marino  *
16*86d7f5d3SJohn Marino  * THIS SOFTWARE IS PROVIDED BY JEFF WHEELHOUSE ``AS IS'' AND ANY EXPRESS OR
17*86d7f5d3SJohn Marino  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18*86d7f5d3SJohn Marino  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN
19*86d7f5d3SJohn Marino  * NO EVENT SHALL JEFF WHEELHOUSE BE LIABLE FOR ANY DIRECT, INDIRECT,
20*86d7f5d3SJohn Marino  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING BUT NOT
21*86d7f5d3SJohn Marino  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
22*86d7f5d3SJohn Marino  * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
23*86d7f5d3SJohn Marino  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
24*86d7f5d3SJohn Marino  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
25*86d7f5d3SJohn Marino  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*86d7f5d3SJohn Marino  *
27*86d7f5d3SJohn Marino  * $Id: clog.h,v 1.2 2001/10/02 04:43:52 jdw Exp $
28*86d7f5d3SJohn Marino  * $DragonFly: src/usr.sbin/clog/clog.h,v 1.1 2004/10/30 20:26:46 dillon Exp $
29*86d7f5d3SJohn Marino  */
30*86d7f5d3SJohn Marino 
31*86d7f5d3SJohn Marino 
32*86d7f5d3SJohn Marino #ifndef _CLOG_H_
33*86d7f5d3SJohn Marino #define _CLOG_H_
34*86d7f5d3SJohn Marino 
35*86d7f5d3SJohn Marino /*
36*86d7f5d3SJohn Marino  *  This magic constant is used to identify a valid circular log file.
37*86d7f5d3SJohn Marino  *  syslogd will ignore any circular log file that doesn't have this constant.
38*86d7f5d3SJohn Marino  */
39*86d7f5d3SJohn Marino 
40*86d7f5d3SJohn Marino const char MAGIC_CONST[4] = "CLOG";
41*86d7f5d3SJohn Marino 
42*86d7f5d3SJohn Marino 
43*86d7f5d3SJohn Marino struct clog_footer {
44*86d7f5d3SJohn Marino 	uint32_t cf_magic;
45*86d7f5d3SJohn Marino 	uint32_t cf_wrap;
46*86d7f5d3SJohn Marino 	uint32_t cf_next;
47*86d7f5d3SJohn Marino 	uint32_t cf_max;
48*86d7f5d3SJohn Marino 	uint32_t cf_lock;
49*86d7f5d3SJohn Marino };
50*86d7f5d3SJohn Marino 
51*86d7f5d3SJohn Marino 
52*86d7f5d3SJohn Marino #endif  /* _CLOG_H_ */
53*86d7f5d3SJohn Marino 
54*86d7f5d3SJohn Marino 
55