tcp: Fix 64 bit build with debugging features enabled.
[haiku.git] / src / kits / network / netresolv / isc / logging_p.h
blob5e6314f1902ff2d2659752e5f0614ce3fb5155ea
1 /*
2 * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
3 * Copyright (c) 1996-1999 by Internet Software Consortium.
5 * Permission to use, copy, modify, and distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
9 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
15 * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18 #ifndef LOGGING_P_H
19 #define LOGGING_P_H
21 typedef struct log_file_desc {
22 char *name;
23 size_t name_size;
24 FILE *stream;
25 unsigned int versions;
26 unsigned long max_size;
27 uid_t owner;
28 gid_t group;
29 } log_file_desc;
31 typedef union log_output {
32 int facility;
33 log_file_desc file;
34 } log_output;
36 struct log_channel {
37 int level; /*%< don't log messages > level */
38 log_channel_type type;
39 log_output out;
40 unsigned int flags;
41 int references;
44 typedef struct log_channel_list {
45 log_channel channel;
46 struct log_channel_list *next;
47 } *log_channel_list;
49 #define LOG_BUFFER_SIZE 20480
51 struct log_context {
52 int num_categories;
53 char **category_names;
54 log_channel_list *categories;
55 int flags;
56 int level;
57 char buffer[LOG_BUFFER_SIZE];
60 #endif /* !LOGGING_P_H */
61 /*! \file */