xref: /freebsd/sbin/ipf/libipf/save_nothing.c (revision b3d14eaccc5f606690d99b1998bfdf32a22404f6)
1 #include "ipf.h"
2 #include "ipmon.h"
3 
4 static void *nothing_parse(char **);
5 static void nothing_destroy(void *);
6 static int nothing_send(void *, ipmon_msg_t *);
7 
8 typedef struct nothing_opts_s {
9 	FILE	*fp;
10 	int	raw;
11 	char	*path;
12 } nothing_opts_t;
13 
14 ipmon_saver_t nothingsaver = {
15 	"nothing",
16 	nothing_destroy,
17 	NULL,		/* dup */
18 	NULL,		/* match */
19 	nothing_parse,
20 	NULL,		/* print */
21 	nothing_send
22 };
23 
24 
25 static void *
26 nothing_parse(char **strings)
27 {
28 	void *ctx;
29 
30 #if 0
31 	strings = strings;	/* gcc -Wextra */
32 #endif
33 
34 	ctx = calloc(1, sizeof(void *));
35 
36 	return ctx;
37 }
38 
39 
40 static void
41 nothing_destroy(ctx)
42 	void *ctx;
43 {
44 	free(ctx);
45 }
46 
47 
48 static int
49 nothing_send(ctx, msg)
50 	void *ctx;
51 	ipmon_msg_t *msg;
52 {
53 #if 0
54 	ctx = ctx;	/* gcc -Wextra */
55 	msg = msg;	/* gcc -Wextra */
56 #endif
57 	/*
58 	 * Do nothing
59 	 */
60 	return 0;
61 }
62 
63