blob: cc2e17fbbaa0aaa97745b2514e3bea70d5dc4f8a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
/* $NetBSD: pfilter.c,v 1.4 2020/07/04 05:18:37 lukem Exp $ */
#include <stdio.h>
#include <unistd.h>
#include <blocklist.h>
#include "pfilter.h"
static struct blocklist *blstate;
void
pfilter_open(void)
{
if (blstate == NULL)
blstate = blocklist_open();
}
void
pfilter_notify(int what, const char *msg)
{
pfilter_open();
if (blstate == NULL)
return;
blocklist_r(blstate, what, STDIN_FILENO, msg);
}
|