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