No empty .Rs/.Re
[netbsd-mini2440.git] / external / bsd / libbind / dist / isc / logging_p.h
blobe069c996625e1e4eade26ff40ec2b579060ed5a9
1 /* $NetBSD$ */
3 /*
4 * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
5 * Copyright (c) 1996-1999 by Internet Software Consortium.
7 * Permission to use, copy, modify, and distribute this software for any
8 * purpose with or without fee is hereby granted, provided that the above
9 * copyright notice and this permission notice appear in all copies.
11 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
12 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
14 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
17 * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20 #ifndef LOGGING_P_H
21 #define LOGGING_P_H
23 typedef struct log_file_desc {
24 char *name;
25 size_t name_size;
26 FILE *stream;
27 unsigned int versions;
28 unsigned long max_size;
29 uid_t owner;
30 gid_t group;
31 } log_file_desc;
33 typedef union log_output {
34 int facility;
35 log_file_desc file;
36 } log_output;
38 struct log_channel {
39 int level; /*%< don't log messages > level */
40 log_channel_type type;
41 log_output out;
42 unsigned int flags;
43 int references;
46 typedef struct log_channel_list {
47 log_channel channel;
48 struct log_channel_list *next;
49 } *log_channel_list;
51 #define LOG_BUFFER_SIZE 20480
53 struct log_context {
54 int num_categories;
55 char **category_names;
56 log_channel_list *categories;
57 int flags;
58 int level;
59 char buffer[LOG_BUFFER_SIZE];
62 #endif /* !LOGGING_P_H */
63 /*! \file */