xref: /freebsd/contrib/blocklist/bin/old_internal.h (revision 7238317403b95a8e35cf0bc7cd66fbd78ecbe521)
1*72383174SJose Luis Duran /*	$NetBSD: internal.h,v 1.1.1.1 2020/06/15 01:52:53 christos Exp $	*/
2*72383174SJose Luis Duran 
3*72383174SJose Luis Duran /*-
4*72383174SJose Luis Duran  * Copyright (c) 2015 The NetBSD Foundation, Inc.
5*72383174SJose Luis Duran  * All rights reserved.
6*72383174SJose Luis Duran  *
7*72383174SJose Luis Duran  * This code is derived from software contributed to The NetBSD Foundation
8*72383174SJose Luis Duran  * by Christos Zoulas.
9*72383174SJose Luis Duran  *
10*72383174SJose Luis Duran  * Redistribution and use in source and binary forms, with or without
11*72383174SJose Luis Duran  * modification, are permitted provided that the following conditions
12*72383174SJose Luis Duran  * are met:
13*72383174SJose Luis Duran  * 1. Redistributions of source code must retain the above copyright
14*72383174SJose Luis Duran  *    notice, this list of conditions and the following disclaimer.
15*72383174SJose Luis Duran  * 2. Redistributions in binary form must reproduce the above copyright
16*72383174SJose Luis Duran  *    notice, this list of conditions and the following disclaimer in the
17*72383174SJose Luis Duran  *    documentation and/or other materials provided with the distribution.
18*72383174SJose Luis Duran  *
19*72383174SJose Luis Duran  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20*72383174SJose Luis Duran  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21*72383174SJose Luis Duran  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22*72383174SJose Luis Duran  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23*72383174SJose Luis Duran  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24*72383174SJose Luis Duran  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25*72383174SJose Luis Duran  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26*72383174SJose Luis Duran  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27*72383174SJose Luis Duran  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28*72383174SJose Luis Duran  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29*72383174SJose Luis Duran  * POSSIBILITY OF SUCH DAMAGE.
30*72383174SJose Luis Duran  */
31*72383174SJose Luis Duran #ifndef _OLD_INTERNAL_H
32*72383174SJose Luis Duran #define _OLD_INTERNAL_H
33*72383174SJose Luis Duran 
34*72383174SJose Luis Duran #ifndef _PATH_BLCONF
35*72383174SJose Luis Duran #define	_PATH_BLCONF	"/etc/blacklistd.conf"
36*72383174SJose Luis Duran #endif
37*72383174SJose Luis Duran #ifndef _PATH_BLCONTROL
38*72383174SJose Luis Duran #define	_PATH_BLCONTROL	"/usr/libexec/blacklistd-helper"
39*72383174SJose Luis Duran #endif
40*72383174SJose Luis Duran #ifndef _PATH_BLSTATE
41*72383174SJose Luis Duran /* We want the new name, the old one would be incompatible after 24932b6 */
42*72383174SJose Luis Duran #define	_PATH_BLSTATE	"/var/db/blocklistd.db"
43*72383174SJose Luis Duran #endif
44*72383174SJose Luis Duran 
45*72383174SJose Luis Duran extern struct confset rconf, lconf;
46*72383174SJose Luis Duran extern int debug;
47*72383174SJose Luis Duran extern const char *rulename;
48*72383174SJose Luis Duran extern const char *controlprog;
49*72383174SJose Luis Duran extern struct ifaddrs *ifas;
50*72383174SJose Luis Duran 
51*72383174SJose Luis Duran #if !defined(__syslog_attribute__) && !defined(__syslog__)
52*72383174SJose Luis Duran #define __syslog__ __printf__
53*72383174SJose Luis Duran #endif
54*72383174SJose Luis Duran 
55*72383174SJose Luis Duran extern void (*lfun)(int, const char *, ...)
56*72383174SJose Luis Duran     __attribute__((__format__(__syslog__, 2, 3)));
57*72383174SJose Luis Duran 
58*72383174SJose Luis Duran #endif /* _OLD_INTERNAL_H */
59