xref: /netbsd/external/bsd/blocklist/bin/internal.c (revision e1af1234)
1*e1af1234Schristos /*	$NetBSD: internal.c,v 1.1.1.1 2020/06/15 01:52:53 christos Exp $	*/
2*e1af1234Schristos 
3*e1af1234Schristos /*-
4*e1af1234Schristos  * Copyright (c) 2015 The NetBSD Foundation, Inc.
5*e1af1234Schristos  * All rights reserved.
6*e1af1234Schristos  *
7*e1af1234Schristos  * This code is derived from software contributed to The NetBSD Foundation
8*e1af1234Schristos  * by Christos Zoulas.
9*e1af1234Schristos  *
10*e1af1234Schristos  * Redistribution and use in source and binary forms, with or without
11*e1af1234Schristos  * modification, are permitted provided that the following conditions
12*e1af1234Schristos  * are met:
13*e1af1234Schristos  * 1. Redistributions of source code must retain the above copyright
14*e1af1234Schristos  *    notice, this list of conditions and the following disclaimer.
15*e1af1234Schristos  * 2. Redistributions in binary form must reproduce the above copyright
16*e1af1234Schristos  *    notice, this list of conditions and the following disclaimer in the
17*e1af1234Schristos  *    documentation and/or other materials provided with the distribution.
18*e1af1234Schristos  *
19*e1af1234Schristos  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20*e1af1234Schristos  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21*e1af1234Schristos  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22*e1af1234Schristos  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23*e1af1234Schristos  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24*e1af1234Schristos  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25*e1af1234Schristos  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26*e1af1234Schristos  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27*e1af1234Schristos  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28*e1af1234Schristos  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29*e1af1234Schristos  * POSSIBILITY OF SUCH DAMAGE.
30*e1af1234Schristos  */
31*e1af1234Schristos #ifdef HAVE_CONFIG_H
32*e1af1234Schristos #include "config.h"
33*e1af1234Schristos #endif
34*e1af1234Schristos 
35*e1af1234Schristos #include <sys/cdefs.h>
36*e1af1234Schristos __RCSID("$NetBSD: internal.c,v 1.1.1.1 2020/06/15 01:52:53 christos Exp $");
37*e1af1234Schristos 
38*e1af1234Schristos #include <stdio.h>
39*e1af1234Schristos #include <syslog.h>
40*e1af1234Schristos #include "conf.h"
41*e1af1234Schristos #include "internal.h"
42*e1af1234Schristos 
43*e1af1234Schristos int debug;
44*e1af1234Schristos const char *rulename = "blocklistd";
45*e1af1234Schristos const char *controlprog = _PATH_BLCONTROL;
46*e1af1234Schristos struct confset lconf, rconf;
47*e1af1234Schristos struct ifaddrs *ifas;
48*e1af1234Schristos void (*lfun)(int, const char *, ...) = syslog;
49