summaryrefslogtreecommitdiff
path: root/external/bsd/ipf/dist/lib/save_nothing.c
blob: 85890eda32275bce9d6bab8a74ea053f0c8d5e17 (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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*	$NetBSD: save_nothing.c,v 1.1.1.2 2012/07/22 13:44:42 darrenr Exp $	*/

#include "ipf.h"
#include "ipmon.h"

static void *nothing_parse __P((char **));
static void nothing_destroy __P((void *));
static int nothing_send __P((void *, ipmon_msg_t *));

typedef struct nothing_opts_s {
	FILE	*fp;
	int	raw;
	char	*path;
} nothing_opts_t;

ipmon_saver_t nothingsaver = {
	"nothing",
	nothing_destroy,
	NULL,		/* dup */
	NULL,		/* match */
	nothing_parse,
	NULL,		/* print */
	nothing_send
};


static void *
nothing_parse(char **strings)
{
	void *ctx;

	strings = strings;	/* gcc -Wextra */

	ctx = calloc(1, sizeof(void *));

	return ctx;
}


static void
nothing_destroy(ctx)
	void *ctx;
{
	free(ctx);
}


static int
nothing_send(ctx, msg)
	void *ctx;
	ipmon_msg_t *msg;
{
	ctx = ctx;	/* gcc -Wextra */
	msg = msg;	/* gcc -Wextra */
	/*
	 * Do nothing
	 */
	return 0;
}