1176998Sphk/*-
2176998Sphk * Copyright (c) 2005-2008 Poul-Henning Kamp
3176998Sphk * All rights reserved.
4176998Sphk *
5176998Sphk * Redistribution and use in source and binary forms, with or without
6176998Sphk * modification, are permitted provided that the following conditions
7176998Sphk * are met:
8176998Sphk * 1. Redistributions of source code must retain the above copyright
9176998Sphk *    notice, this list of conditions and the following disclaimer.
10176998Sphk * 2. Redistributions in binary form must reproduce the above copyright
11176998Sphk *    notice, this list of conditions and the following disclaimer in the
12176998Sphk *    documentation and/or other materials provided with the distribution.
13176998Sphk *
14176998Sphk * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15176998Sphk * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16176998Sphk * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17176998Sphk * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18176998Sphk * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19176998Sphk * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20176998Sphk * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21176998Sphk * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22176998Sphk * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23176998Sphk * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24176998Sphk * SUCH DAMAGE.
25176998Sphk *
26176998Sphk * $FreeBSD$
27176998Sphk */
28176998Sphk
29176998Sphk#include <sys/stdint.h>
30176998Sphk
31176998Sphk/* CREATORS */
32219095Sphkconst char *fifolog_create(const char *fn, off_t size, ssize_t recsize);
33176998Sphk
34176998Sphk/* WRITERS */
35176998Sphk
36219095Sphk#include "fifolog_write.h"
37176998Sphk
38176998Sphk/* READERS */
39176998Sphk
40176998Sphktypedef void fifolog_reader_render_t(void *priv, time_t when, unsigned flag, const unsigned char *p, unsigned l);
41176998Sphkstruct fifolog_reader;
42176998Sphkstruct fifolog_reader *fifolog_reader_open(const char *fname);
43176998Sphkoff_t fifolog_reader_seek(const struct fifolog_reader *fl, time_t t0);
44176998Sphkvoid fifolog_reader_process(struct fifolog_reader *fl, off_t from, fifolog_reader_render_t *func, void *priv, time_t end);
45176998Sphk
46176998Sphk/* UTILS */
47176998Sphktime_t get_date(char *p);
48