xref: /freebsd/contrib/blocklist/bin/old_internal.c (revision 7238317403b95a8e35cf0bc7cd66fbd78ecbe521)
1*72383174SJose Luis Duran /*	$NetBSD: internal.c,v 1.2 2025/02/11 17:48:30 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 #ifdef HAVE_CONFIG_H
32*72383174SJose Luis Duran #include "config.h"
33*72383174SJose Luis Duran #endif
34*72383174SJose Luis Duran 
35*72383174SJose Luis Duran #ifdef HAVE_SYS_CDEFS_H
36*72383174SJose Luis Duran #include <sys/cdefs.h>
37*72383174SJose Luis Duran #endif
38*72383174SJose Luis Duran __RCSID("$NetBSD: internal.c,v 1.2 2025/02/11 17:48:30 christos Exp $");
39*72383174SJose Luis Duran 
40*72383174SJose Luis Duran #include <stdio.h>
41*72383174SJose Luis Duran #include <syslog.h>
42*72383174SJose Luis Duran #include "conf.h"
43*72383174SJose Luis Duran #include "old_internal.h"
44*72383174SJose Luis Duran 
45*72383174SJose Luis Duran int debug;
46*72383174SJose Luis Duran const char *rulename = "blacklistd";
47*72383174SJose Luis Duran const char *controlprog = _PATH_BLCONTROL;
48*72383174SJose Luis Duran struct confset lconf, rconf;
49*72383174SJose Luis Duran struct ifaddrs *ifas;
50*72383174SJose Luis Duran void (*lfun)(int, const char *, ...) = syslog;
51