xref: /freebsd/sbin/ipf/libipf/save_nothing.c (revision 44bc30192139b0b3c95510ab3b35802bcc6d63e4)
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 *
nothing_parse(char ** strings)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
nothing_destroy(void * ctx)41 nothing_destroy(void *ctx)
42 {
43 	free(ctx);
44 }
45 
46 
47 static int
nothing_send(void * ctx,ipmon_msg_t * msg)48 nothing_send(void *ctx, ipmon_msg_t *msg)
49 {
50 #if 0
51 	ctx = ctx;	/* gcc -Wextra */
52 	msg = msg;	/* gcc -Wextra */
53 #endif
54 	/*
55 	 * Do nothing
56 	 */
57 	return (0);
58 }
59 
60