diff options
Diffstat (limited to 'sbin/ipf/libipf/save_nothing.c')
| -rw-r--r-- | sbin/ipf/libipf/save_nothing.c | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/sbin/ipf/libipf/save_nothing.c b/sbin/ipf/libipf/save_nothing.c new file mode 100644 index 000000000000..7d8db5215e91 --- /dev/null +++ b/sbin/ipf/libipf/save_nothing.c @@ -0,0 +1,59 @@ +#include "ipf.h" +#include "ipmon.h" + +static void *nothing_parse(char **); +static void nothing_destroy(void *); +static int nothing_send(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; + +#if 0 + strings = strings; /* gcc -Wextra */ +#endif + + ctx = calloc(1, sizeof(void *)); + + return (ctx); +} + + +static void +nothing_destroy(void *ctx) +{ + free(ctx); +} + + +static int +nothing_send(void *ctx, ipmon_msg_t *msg) +{ +#if 0 + ctx = ctx; /* gcc -Wextra */ + msg = msg; /* gcc -Wextra */ +#endif + /* + * Do nothing + */ + return (0); +} + |
