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