blob: b8eb969d8b2fb90b76807ea66d93eac98dfcdbbc [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001/* Shared library add-on to iptables to add TRACE target support. */
2#include <stdio.h>
3#include <string.h>
4#include <stdlib.h>
5#include <getopt.h>
6
7#include <xtables.h>
8#include <linux/netfilter/x_tables.h>
9
10static void TRACE_help(void)
11{
12 printf("TRACE target takes no options\n");
13}
14
15static int TRACE_parse(int c, char **argv, int invert, unsigned int *flags,
16 const void *entry, struct xt_entry_target **target)
17{
18 return 0;
19}
20
21static struct xtables_target trace_target = {
22 .family = AF_UNSPEC,
23 .name = "TRACE",
24 .version = XTABLES_VERSION,
25 .size = XT_ALIGN(0),
26 .userspacesize = XT_ALIGN(0),
27 .help = TRACE_help,
28 .parse = TRACE_parse,
29};
30
31void _init(void)
32{
33 xtables_register_target(&trace_target);
34}