1 /* $NetBSD: extern.h,v 1.1 2008/10/31 16:12:19 christos Exp $ */
4 * Copyright (c) 2008 The NetBSD Foundation, Inc.
7 * This code is derived from software contributed to The NetBSD Foundation
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
18 * 3. All advertising materials mentioning features or use of this software
19 * must display the following acknowledgement:
20 * This product includes software developed by the NetBSD
21 * Foundation, Inc. and its contributors.
22 * 4. Neither the name of The NetBSD Foundation nor the names of its
23 * contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
26 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
27 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
28 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
30 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36 * POSSIBILITY OF SUCH DAMAGE.
41 * declarations for variables and functions from syslogd.c
42 * that are used in tls.c and sign.c
50 extern struct tls_global_options_t tls_opt
;
51 extern struct TLS_Incoming TLS_Incoming_Head
;
52 extern struct sign_global_t GlobalSign
;
54 extern size_t linebufsize
;
55 extern int RemoteAddDate
;
57 extern bool BSDOutputFormat
;
59 extern char timestamp
[];
60 extern char appname
[];
61 extern char *LocalFQDN
;
62 extern char *include_pid
;
65 extern void logerror(const char *, ...)
66 __attribute__((__format__(__printf__
,1,2)));
67 extern void loginfo(const char *, ...)
68 __attribute__((__format__(__printf__
,1,2)));
69 extern void printline(const char *, char *, int);
70 extern void die(int fd
, short event
, void *ev
)
71 __attribute__((__noreturn__
));
72 extern struct event
*allocev(void);
73 extern void send_queue(int __unused
, short __unused
, void *);
74 extern void schedule_event(struct event
**, struct timeval
*,
75 void (*)(int, short, void *), void *);
76 extern char *make_timestamp(time_t *, bool);
77 extern struct filed
*get_f_by_conninfo(struct tls_conn_settings
*conn_info
);
78 extern bool message_queue_remove(struct filed
*, struct buf_queue
*);
79 extern void buf_msg_free(struct buf_msg
*msg
);
80 extern void message_queue_freeall(struct filed
*);
81 extern bool copy_string(char **, const char *, const char *);
82 extern bool copy_config_value_quoted(const char *, char **, const char **);
83 extern size_t message_allqueues_purge(void);
84 extern bool format_buffer(struct buf_msg
*, char**, size_t*, size_t*, size_t*,
86 extern void fprintlog(struct filed
*, struct buf_msg
*, struct buf_queue
*);
87 extern struct buf_msg
*buf_msg_new(const size_t);