1*0Sstevel@tonic-gate /* 2*0Sstevel@tonic-gate * Copyright (c) 1997-2001 by Sun Microsystems, Inc. 3*0Sstevel@tonic-gate * All rights reserved. 4*0Sstevel@tonic-gate */ 5*0Sstevel@tonic-gate 6*0Sstevel@tonic-gate /* 7*0Sstevel@tonic-gate * Copyright (c) 1996-1999 by Internet Software Consortium. 8*0Sstevel@tonic-gate * 9*0Sstevel@tonic-gate * Permission to use, copy, modify, and distribute this software for any 10*0Sstevel@tonic-gate * purpose with or without fee is hereby granted, provided that the above 11*0Sstevel@tonic-gate * copyright notice and this permission notice appear in all copies. 12*0Sstevel@tonic-gate * 13*0Sstevel@tonic-gate * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS 14*0Sstevel@tonic-gate * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES 15*0Sstevel@tonic-gate * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE 16*0Sstevel@tonic-gate * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 17*0Sstevel@tonic-gate * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 18*0Sstevel@tonic-gate * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS 19*0Sstevel@tonic-gate * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 20*0Sstevel@tonic-gate * SOFTWARE. 21*0Sstevel@tonic-gate */ 22*0Sstevel@tonic-gate 23*0Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 24*0Sstevel@tonic-gate 25*0Sstevel@tonic-gate #ifndef LOGGING_P_H 26*0Sstevel@tonic-gate #define LOGGING_P_H 27*0Sstevel@tonic-gate 28*0Sstevel@tonic-gate typedef struct log_file_desc { 29*0Sstevel@tonic-gate char *name; 30*0Sstevel@tonic-gate size_t name_size; 31*0Sstevel@tonic-gate FILE *stream; 32*0Sstevel@tonic-gate unsigned int versions; 33*0Sstevel@tonic-gate unsigned long max_size; 34*0Sstevel@tonic-gate uid_t owner; 35*0Sstevel@tonic-gate gid_t group; 36*0Sstevel@tonic-gate } log_file_desc; 37*0Sstevel@tonic-gate 38*0Sstevel@tonic-gate typedef union log_output { 39*0Sstevel@tonic-gate int facility; 40*0Sstevel@tonic-gate log_file_desc file; 41*0Sstevel@tonic-gate } log_output; 42*0Sstevel@tonic-gate 43*0Sstevel@tonic-gate struct log_channel { 44*0Sstevel@tonic-gate int level; /* don't log messages > level */ 45*0Sstevel@tonic-gate log_channel_type type; 46*0Sstevel@tonic-gate log_output out; 47*0Sstevel@tonic-gate unsigned int flags; 48*0Sstevel@tonic-gate int references; 49*0Sstevel@tonic-gate }; 50*0Sstevel@tonic-gate 51*0Sstevel@tonic-gate typedef struct log_channel_list { 52*0Sstevel@tonic-gate log_channel channel; 53*0Sstevel@tonic-gate struct log_channel_list *next; 54*0Sstevel@tonic-gate } *log_channel_list; 55*0Sstevel@tonic-gate 56*0Sstevel@tonic-gate #define LOG_BUFFER_SIZE 20480 57*0Sstevel@tonic-gate 58*0Sstevel@tonic-gate struct log_context { 59*0Sstevel@tonic-gate int num_categories; 60*0Sstevel@tonic-gate char **category_names; 61*0Sstevel@tonic-gate log_channel_list *categories; 62*0Sstevel@tonic-gate int flags; 63*0Sstevel@tonic-gate int level; 64*0Sstevel@tonic-gate char buffer[LOG_BUFFER_SIZE]; 65*0Sstevel@tonic-gate }; 66*0Sstevel@tonic-gate 67*0Sstevel@tonic-gate #endif /* !LOGGING_P_H */ 68